:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #1d2733;
  background: #f6f8fb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

a {
  color: #0f766e;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.topbar {
  border-bottom: 1px solid #dfe5ec;
  background: #ffffff;
}

.topbar-inner {
  width: min(100% - 32px, 900px);
  min-height: 64px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  font-weight: 800;
}

.nav-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid #d7e0ea;
  border-radius: 999px;
  padding: 0 14px;
  color: #394a5f;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.nav-link:hover {
  text-decoration: none;
  background: #f3f6fa;
}

.nav-link.active {
  border-color: #0f766e;
  background: #e8f6f5;
  color: #0f766e;
}

.page {
  width: min(100% - 32px, 1180px);
  margin: 0 auto;
  padding: 48px 0;
}

.auth-page {
  display: flex;
  justify-content: center;
}

.panel {
  width: min(100%, 440px);
  border: 1px solid #dfe5ec;
  border-radius: 8px;
  padding: 28px;
  background: #ffffff;
  box-shadow: 0 18px 50px rgba(29, 39, 51, 0.08);
}

.stack {
  display: grid;
  gap: 18px;
}

label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cbd5df;
  border-radius: 6px;
  padding: 0 12px;
  font: inherit;
}

select {
  width: 100%;
  min-height: 44px;
  border: 1px solid #cbd5df;
  border-radius: 6px;
  padding: 0 12px;
  background: #ffffff;
  font: inherit;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border: 0;
  border-radius: 6px;
  padding: 0 16px;
  background: #0f766e;
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.button.secondary,
button.secondary {
  background: #e9eef4;
  color: #263342;
}

.message {
  border-radius: 6px;
  padding: 12px 14px;
  background: #fff7ed;
  color: #9a3412;
}

.message.success {
  background: #ecfdf5;
  color: #047857;
}

.message.info {
  background: #eff6ff;
  color: #1d4ed8;
}

.auth-switch {
  margin: 20px 0 0;
}

.dashboard-page {
  display: grid;
  gap: 24px;
}

.dashboard-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.dashboard-header h1,
.panel-header h2,
.equipment-row h3 {
  margin: 0;
}

.dashboard-header h1 {
  font-size: 34px;
  line-height: 1.15;
}

.eyebrow,
.metric-label,
.muted,
.timestamp,
.equipment-row p,
.alert-list span,
.timeline span {
  color: #627083;
}

.eyebrow,
.metric-label {
  margin: 0 0 8px;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0;
}

.muted {
  margin: 8px 0 0;
}

.status-pill,
.trend,
.status-dot {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.good {
  background: #ecfdf5;
  color: #047857;
}

.warning {
  background: #fff7ed;
  color: #b45309;
}

.danger {
  background: #fef2f2;
  color: #b91c1c;
}

.neutral {
  background: #eef2f7;
  color: #445468;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.metric-card,
.dashboard-panel {
  border: 1px solid #dfe5ec;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 34px rgba(29, 39, 51, 0.06);
}

.metric-card {
  min-height: 138px;
  padding: 20px;
}

.metric-card strong {
  display: block;
  margin-bottom: 16px;
  font-size: 32px;
  line-height: 1;
}

.dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 24px;
}

.dashboard-column,
.dashboard-sidebar {
  display: grid;
  gap: 24px;
  align-content: start;
}

.dashboard-panel {
  padding: 24px;
}

.panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.timestamp {
  font-size: 13px;
  white-space: nowrap;
}

.equipment-list {
  display: grid;
  gap: 12px;
}

.equipment-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 78px;
  border: 1px solid #edf1f5;
  border-radius: 8px;
  padding: 14px 16px;
  background: #fbfcfe;
}

.equipment-row p {
  margin: 6px 0 0;
}

.equipment-reading {
  display: grid;
  justify-items: end;
  gap: 8px;
  text-align: right;
}

.zone-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.zone-grid article {
  display: grid;
  gap: 10px;
}

.zone-grid strong {
  font-size: 24px;
}

.bar {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: #e9eef4;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #0f766e;
}

.bar.warning span {
  background: #f59e0b;
}

.alert-list,
.timeline {
  display: grid;
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.alert-list li,
.timeline li {
  display: grid;
  gap: 5px;
  border-left: 4px solid #cbd5df;
  padding-left: 12px;
}

.alert-list li.urgent {
  border-left-color: #dc2626;
}

.timeline time {
  font-weight: 800;
  color: #0f766e;
}

.inline-action {
  margin-bottom: 10px;
}

.compact {
  margin: 0 0 14px;
}

.meeting-timeline {
  margin-bottom: 18px;
}

.meeting-form {
  margin-top: 10px;
}

.meeting-form h3 {
  margin: 0;
}

.integration-list {
  display: grid;
  gap: 10px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}

.integration-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #edf1f5;
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfcfe;
}

.meetings-page {
  display: grid;
  gap: 24px;
}

.meetings-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 24px;
}

.tech-page {
  display: grid;
  gap: 24px;
}

.tech-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 24px;
}

.floorplan {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.zone-tile {
  border: 1px solid #e2e8ef;
  border-radius: 10px;
  padding: 14px;
  background: #f8fafc;
}

.zone-tile h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.zone-tile p {
  margin: 4px 0;
  font-size: 14px;
}

.alert-diagnostics-list {
  display: grid;
  gap: 12px;
}

.alert-card {
  border: 1px solid #e2e8ef;
  border-radius: 10px;
  padding: 12px 14px;
  background: #ffffff;
}

.alert-card summary {
  display: grid;
  gap: 4px;
  cursor: pointer;
  list-style: none;
}

.alert-card summary::-webkit-details-marker {
  display: none;
}

.alert-card p {
  margin: 10px 0;
}

.alert-card h4 {
  margin: 0 0 8px;
  font-size: 14px;
}

.alert-card ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.alert-title {
  font-weight: 800;
}

.alert-card.warning {
  border-color: #f5d0a8;
  background: #fff7ed;
}

.alert-card.urgent {
  border-color: #fecaca;
  background: #fef2f2;
}

.alert-card.info {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.equipment-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.equipment-stat-card {
  border: 1px solid #e2e8ef;
  border-radius: 10px;
  padding: 14px;
  background: #fbfcfe;
}

.equipment-stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.equipment-stat-header h3 {
  margin: 0;
  font-size: 16px;
}

.equipment-stat-card dl {
  margin: 10px 0 0;
  display: grid;
  gap: 8px;
}

.equipment-stat-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 14px;
}

.equipment-stat-card dt {
  color: #627083;
}

.equipment-stat-card dd {
  margin: 0;
  font-weight: 700;
}

.building-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
}

.dashboard-page,
.tech-page {
  width: min(100% - 32px, 1440px);
}

.building-main {
  display: grid;
  gap: 24px;
  align-self: start;
  align-content: start;
  grid-auto-rows: max-content;
}

.floor-menu {
  align-self: start;
  position: sticky;
  top: 22px;
}

.tech-page .floor-menu {
  padding: 0;
  max-height: min(760px, calc(100vh - 44px));
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-color: #9aabba #eef3f7;
  scrollbar-gutter: stable;
}

.tech-page .floor-menu > .panel-header {
  position: sticky;
  top: 0;
  z-index: 5;
  margin: 0;
  padding: 20px 24px 14px;
  border-bottom: 1px solid #e4eaf0;
  background: #ffffff;
  box-shadow: 0 5px 10px rgba(29, 39, 51, 0.05);
}

.tech-page .floor-menu > .floor-list {
  padding: 14px 24px 24px;
}

.compact-header {
  margin-bottom: 14px;
}

.floor-list {
  display: grid;
  gap: 12px;
}

.floor-card {
  border: 1px solid #e2e8ef;
  border-radius: 10px;
  padding: 12px;
  background: #f9fbfd;
}

.floor-card.active {
  border-color: #0f766e;
  background: #eef8f7;
}

.floor-title {
  font-weight: 800;
  color: #153347;
}

.zone-list {
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
}

.zone-link {
  display: block;
  border: 1px solid #d7e0ea;
  border-radius: 8px;
  padding: 8px 10px;
  color: #2e4258;
  background: #ffffff;
  font-size: 14px;
}

.zone-link:hover {
  text-decoration: none;
  background: #f4f8fc;
}

.zone-link.active {
  border-color: #0f766e;
  color: #0f766e;
  background: #e8f6f5;
  font-weight: 700;
}

.tech-link {
  border-style: dashed;
}

.unit-list {
  gap: 6px;
}

.unit-list .tech-link {
  padding: 6px 8px;
  font-size: 12px;
  line-height: 1.25;
}

.menu-subtitle {
  margin: 12px 0 4px;
  font-size: 12px;
  font-weight: 800;
  color: #5f7185;
  text-transform: uppercase;
}

.floor-map-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 10px;
  color: #5f7185;
  font-size: 12px;
}

.floor-map-meta p,
.map-legend {
  margin: 0;
}

.floor-map-meta p {
  display: flex;
  align-items: center;
  gap: 7px;
}

.map-compass {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid #aebdcc;
  border-radius: 50%;
  color: #223d52;
  font-size: 10px;
  font-weight: 900;
}

.map-compass::before {
  content: "";
  position: absolute;
  margin-top: -23px;
  border-right: 3px solid transparent;
  border-bottom: 6px solid #223d52;
  border-left: 3px solid transparent;
}

.map-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px 14px;
}

.map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.legend-swatch {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.zone-swatch {
  border: 1px solid #7895ad;
  background: #e7f0f6;
}

.service-swatch {
  border: 1px dashed #aebdcc;
  background: #f3f5f7;
}

.unit-swatch {
  border: 2px solid #0f766e;
  border-radius: 50%;
  background: #fff;
}

.floor-map-viewport {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid #cbd8e4;
  border-radius: 12px;
  background: #f8fafc;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  scrollbar-color: #9aabba #eef3f7;
}

.floor-map-viewport:focus-visible {
  outline: 3px solid rgba(15, 118, 110, 0.25);
  outline-offset: 2px;
}

.floor-map-viewport-mezzanine {
  overflow: hidden;
}

.floor-map {
  position: relative;
  min-width: 780px;
  aspect-ratio: 3 / 1;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(242, 247, 250, 0.96)),
    repeating-linear-gradient(
      90deg,
      rgba(61, 88, 112, 0.045) 0,
      rgba(61, 88, 112, 0.045) 1px,
      transparent 1px,
      transparent 28px
    ),
    repeating-linear-gradient(
      180deg,
      rgba(61, 88, 112, 0.045) 0,
      rgba(61, 88, 112, 0.045) 1px,
      transparent 1px,
      transparent 28px
    );
  overflow: hidden;
}

.floor-map-mezzanine {
  width: 100%;
  min-width: 0;
  min-height: 340px;
  aspect-ratio: 2.45 / 1;
}

.floor-footprint {
  position: absolute;
  left: 2%;
  top: 8%;
  width: 96%;
  height: 74%;
  border: 2px solid #8093a5;
  background: rgba(236, 242, 246, 0.58);
  box-shadow: 0 8px 20px rgba(50, 72, 91, 0.08);
  pointer-events: none;
}

.floor-map-mezzanine .floor-footprint {
  top: 8%;
  height: 83%;
  clip-path: polygon(0 0, 100% 0, 100% 61%, 80% 61%, 80% 100%, 0 100%);
}

.floor-guide {
  position: absolute;
  z-index: 1;
  border: 1px dashed #aebdcc;
  border-radius: 2px;
  background: rgba(245, 247, 249, 0.88);
  color: #68798a;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px;
  text-align: center;
  line-height: 1.15;
  overflow: hidden;
  pointer-events: none;
}

.floor-guide span {
  width: 100%;
  max-width: 100%;
  overflow-wrap: normal;
  word-break: normal;
}

.floor-map-mezzanine .floor-guide {
  font-size: clamp(7px, 0.72vw, 10px);
}

.floor-map-vaults .map-zone .map-label-full,
.floor-map-vaults .floor-guide .map-label-full,
.floor-map-mezzanine .map-zone .map-label-full,
.floor-map-mezzanine .floor-guide .map-label-full {
  font-size: 10px;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.floor-guide-circulation {
  background: repeating-linear-gradient(135deg, #f8fafb 0, #f8fafb 8px, #edf1f4 8px, #edf1f4 9px);
}

.floor-guide-plant {
  border-color: #b5a981;
  background: #f6f2e5;
  color: #75683d;
}

.floor-guide-garden {
  border-color: #91ad9b;
  background:
    linear-gradient(rgba(236, 246, 239, 0.92), rgba(236, 246, 239, 0.92)),
    repeating-linear-gradient(135deg, transparent 0, transparent 10px, rgba(81, 124, 93, 0.12) 10px, rgba(81, 124, 93, 0.12) 11px);
  color: #42674c;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.floor-guide-access {
  background: #eef2f5;
  writing-mode: vertical-rl;
}

.map-zone {
  position: absolute;
  z-index: 2;
  border: 1.5px solid #7895ad;
  border-radius: 2px;
  background: rgba(222, 235, 244, 0.92);
  color: #133147;
  font-size: 11px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5px;
  line-height: 1.15;
  word-break: normal;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.72);
  transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.map-zone::after {
  content: "";
  position: absolute;
  bottom: -2px;
  left: 50%;
  width: 22%;
  height: 3px;
  transform: translateX(-50%);
  background: #f7fafc;
}

.map-zone:hover {
  text-decoration: none;
  border-color: #2f698d;
  background: #d4e8f4;
  box-shadow: 0 6px 14px rgba(32, 78, 106, 0.14);
  transform: translateY(-1px);
}

.map-zone.active {
  border-color: #0f766e;
  background: #cce9e5;
  color: #07534e;
  box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.16), 0 8px 18px rgba(15, 76, 72, 0.15);
}

.floor-map .map-zone span {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.floor-map .map-label-short {
  display: none;
}

.floor-map-key {
  margin: 12px 0 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px 14px;
  color: #607184;
  font-size: 11px;
}

.floor-map-key div {
  display: flex;
  gap: 6px;
  min-width: 0;
}

.floor-map-key dt {
  flex: 0 0 auto;
  color: #29465c;
  font-weight: 900;
}

.floor-map-key dd {
  margin: 0;
}

.layout-docs {
  margin-top: 12px;
}

.map-unit {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 4;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 24px;
  min-width: 24px;
  max-width: 24px;
  min-height: 24px;
  padding: 2px;
  border: 2px solid #0f766e;
  border-radius: 999px;
  background: #ffffff;
  color: #0f766e;
  font-size: 7px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 5px 12px rgba(23, 43, 77, 0.2);
}

.map-zone-label-overlay {
  position: absolute;
  z-index: 6;
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 4px;
  color: #133147;
  font-size: 10px;
  line-height: 1;
  text-align: center;
  pointer-events: none;
}

.map-zone-label-overlay b {
  padding: 3px 5px;
  border: 1px solid rgba(120, 149, 173, 0.5);
  border-radius: 999px;
  background: rgba(248, 251, 253, 0.94);
  box-shadow: 0 2px 5px rgba(23, 43, 77, 0.1);
}

.map-zone-label-overlay.active b {
  border-color: #0f766e;
  background: rgba(204, 233, 229, 0.96);
  color: #07534e;
}

.map-unit:hover {
  text-decoration: none;
  background: #ffffff;
  transform: translate(-50%, -50%) scale(1.08);
}

.map-unit.active {
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.2), 0 6px 16px rgba(23, 43, 77, 0.24);
}

.map-unit span {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-unit-ac-system {
  border-color: #0f766e;
  color: #0f766e;
}

.map-unit-ahu {
  border-color: #7c3aed;
  color: #6d28d9;
}

.map-unit-duct {
  border-color: #b45309;
  color: #b45309;
}

.map-unit-condenser {
  border-color: #7c3aed;
  color: #6d28d9;
}

.map-unit-vrv-box {
  border-color: #2563eb;
  color: #1d4ed8;
}

.map-unit-ventilation {
  border-color: #0e7490;
  color: #0e7490;
}

.map-unit-duct.active {
  box-shadow: 0 0 0 4px rgba(180, 83, 9, 0.18), 0 6px 16px rgba(23, 43, 77, 0.24);
}

.map-direction {
  position: absolute;
  bottom: 4%;
  left: 2%;
  color: #8797a6;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.map-direction-east {
  right: 2%;
  left: auto;
}
.layout-docs strong {
  font-size: 14px;
}

.layout-docs ul {
  margin: 8px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.zone-details {
  align-self: start;
}

.missing-note {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px dashed #cf5f3f;
  border-radius: 8px;
  color: #8f2f17;
  background: #fff5ef;
  font-weight: 600;
}

.stats-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.stats-grid div {
  border: 1px solid #e2e8ef;
  border-radius: 8px;
  padding: 10px;
  background: #f9fbfd;
}

.stats-grid dt {
  color: #627083;
  font-size: 13px;
}

.stats-grid dd {
  margin: 6px 0 0;
  font-size: 20px;
  font-weight: 700;
  color: #1a3043;
}

.blank-floor-note {
  min-height: 260px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed #c1ccda;
  border-radius: 12px;
  background: #f8fbff;
  color: #4d6075;
  text-align: center;
  padding: 16px;
}

/* Architectural floorplan map */
.floor-map-viewport {
  background: #ffffff;
}

.floor-map-viewport-mezzanine {
  overflow-x: auto;
}

.floor-map,
.floor-map-mezzanine {
  width: 100%;
  min-width: 900px;
  min-height: 0;
  aspect-ratio: 1800 / 1272;
  background: #ffffff;
  overflow: hidden;
}

.floor-map-image {
  position: absolute;
  inset: 0;
  z-index: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
  user-select: none;
}

.map-zone {
  border: 2px solid rgba(27, 111, 154, 0.72);
  border-radius: 5px;
  background: rgba(67, 160, 207, 0.13);
  color: #0f405d;
  padding: 2px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
  backdrop-filter: blur(0.3px);
}

.map-zone::after {
  display: none;
}

.map-zone span {
  width: auto;
  padding: 3px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 4px rgba(19, 49, 71, 0.15);
  font-size: 9px;
  line-height: 1;
}

.map-zone:hover {
  background: rgba(67, 160, 207, 0.27);
  transform: none;
}

.map-zone.active {
  border-color: #0f766e;
  background: rgba(20, 184, 166, 0.25);
}

.map-unit {
  width: 27px;
  min-width: 27px;
  max-width: 27px;
  min-height: 27px;
  overflow: visible;
  background: rgba(255, 255, 255, 0.96);
}

.unit-health-dot {
  position: absolute;
  right: -3px;
  bottom: -3px;
  width: 8px;
  height: 8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 1px 3px rgba(20, 83, 45, 0.28);
}

.unmapped-swatch {
  border: 1px dashed #94a3b8;
  background: #f1f5f9;
}

.floor-map-key-wrap {
  margin-top: 12px;
  color: #607184;
  font-size: 12px;
}

.floor-map-key-wrap summary {
  cursor: pointer;
  color: #29465c;
  font-weight: 800;
}

.detail-status-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
  color: #607184;
  font-size: 13px;
}

.health-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1px solid #a7dfb5;
  border-radius: 999px;
  padding: 5px 9px;
  background: #effcf2;
  color: #187238;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.health-badge i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.13);
}

.source-note {
  margin: 0 0 14px;
  color: #607184;
  font-size: 13px;
}

.unit-stats-grid dd {
  overflow-wrap: anywhere;
  font-size: 16px;
}

.sensor-page {
  display: grid;
  gap: 24px;
}

.sensor-layout {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 24px;
}

.sensor-sidebar {
  align-self: start;
  position: sticky;
  top: 22px;
}

.sensor-callout {
  margin-top: 18px;
  border: 1px solid #e1e8f0;
  border-radius: 10px;
  padding: 12px;
  background: #f8fbff;
}

.sensor-callout h3 {
  margin: 0 0 10px;
  font-size: 15px;
}

.sensor-callout ul {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.sensor-main {
  display: grid;
  gap: 24px;
}

.placement-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.placement-card {
  border: 1px solid #dbe4ee;
  border-radius: 10px;
  padding: 14px;
  background: #fbfdff;
}

.placement-card h3,
.placement-card h4 {
  margin: 0;
}

.placement-card h4 {
  margin-top: 10px;
  font-size: 14px;
}

.placement-card p {
  margin: 8px 0;
}

.placement-card ul {
  margin: 6px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.placement-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.priority-high {
  border-left: 4px solid #0f766e;
}

.priority-medium {
  border-left: 4px solid #b45309;
}

.priority-conditional {
  border-left: 4px solid #475569;
}

.principles-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.principles-grid div {
  border: 1px solid #e2e8ef;
  border-radius: 8px;
  padding: 10px;
  background: #f9fbfd;
}

.principles-grid dt {
  color: #627083;
  font-size: 13px;
}

.principles-grid dd {
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.4;
}

.rule-list {
  margin: 8px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 7px;
}

.sensor-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.sensor-columns h3 {
  margin: 0;
}

@media (max-width: 900px) {
  .metric-grid,
  .dashboard-layout,
  .meetings-layout,
  .tech-layout,
  .equipment-stats-grid,
  .building-layout,
  .stats-grid,
  .sensor-layout,
  .placement-grid,
  .principles-grid,
  .sensor-columns {
    grid-template-columns: 1fr;
  }

  .dashboard-header,
  .panel-header,
  .equipment-row {
    align-items: stretch;
    flex-direction: column;
  }

  .equipment-reading {
    justify-items: start;
    text-align: left;
  }

  .floor-menu {
    position: static;
  }

  .building-layout,
  .sensor-layout {
    gap: 16px;
  }

  .building-main,
  .sensor-main {
    order: 1;
  }

  .floor-menu,
  .sensor-sidebar {
    order: 2;
    max-height: 42vh;
    overflow: auto;
  }

  .tech-page .floor-menu {
    max-height: 42vh;
  }

  .sensor-sidebar {
    position: static;
  }
}

@media (max-width: 760px) {
  .floor-map-mezzanine .responsive-label {
    display: none;
  }

  .floor-map-mezzanine .map-label-short {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .floor-map-key {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 620px) {
  .zone-grid,
  .floorplan {
    grid-template-columns: 1fr;
  }

  .dashboard-header h1 {
    font-size: 28px;
  }

  .floor-map-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .map-legend {
    justify-content: flex-start;
  }

  .map-unit {
    width: 22px;
    min-width: 22px;
    max-width: 22px;
    min-height: 22px;
    padding: 2px;
    font-size: 6.5px;
  }

  .map-zone-label-overlay b {
    padding: 2px 4px;
    font-size: 8px;
  }

  .floor-guide {
    font-size: 9px;
    padding: 5px;
  }
}
