.overview-field {
  display: flex;
  flex-direction: column;
}
.fm-full {
  display: grid;
  grid-template-columns: minmax(0, 2.8fr) minmax(240px, 1fr);
  gap: 16px;
  align-items: start;
}
.fm-map-card,
.fd-card {
  background: #fff;
  border: 1px solid var(--line, #dee5eb);
  border-radius: var(--radius, 12px);
  min-width: 0;
  overflow: hidden;
}
.fm-map-card {
  display: flex;
  flex-direction: column;
}
.fm-details {
  display: grid;
  gap: 14px;
}
.fm-viewport {
  position: relative;
  isolation: isolate;
  background: #f0f3eb;
  overflow: hidden;
  flex: 1;
  min-height: 265px;
  color: #243649;
}
.fm-full .fm-viewport {
  height: clamp(460px, 58vh, 690px);
  flex: auto;
}
.fm-diagram {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  cursor: grab;
  touch-action: none;
  user-select: none;
  overflow: visible;
}
.fm-diagram.fm-dragging,
.fm-diagram.fm-dragging * {
  cursor: grabbing !important;
}
.fm-diagram:focus-visible {
  outline-offset: -3px;
}
.fm-contours {
  fill: none;
  stroke: #bfcdb8;
  stroke-width: 0.9;
  opacity: 0.75;
}
.fm-lot-label {
  font:
    8.7px -apple-system,
    BlinkMacSystemFont,
    'PingFang SC',
    sans-serif;
  letter-spacing: 0.4px;
  text-anchor: middle;
}
.fm-block-tag rect {
  fill: #edf1e6;
  stroke: #9eafa3;
  stroke-width: 0.7;
}
.fm-block-tag text {
  fill: #526a59;
  text-anchor: middle;
  font:
    600 9.2px -apple-system,
    BlinkMacSystemFont,
    sans-serif;
}
.fm-device {
  cursor: pointer;
}
.fm-device:focus-visible {
  outline: none;
}
.fm-device:hover > circle:first-of-type,
.fm-device:focus-visible > circle:first-of-type {
  fill: #135bdb;
  opacity: 0.4;
}
.fm-panel {
  cursor: pointer;
}
.fm-panel-pending {
  color: #90a6b3;
  fill: #cedbe2;
}
.fm-panel-completed {
  color: #397e65;
  fill: #7bb998;
}
.fm-panel-active {
  color: #245dba;
  fill: #74a5ea;
}
.fm-panel:hover {
  color: #245ac0;
  fill: #a7c7f5;
}
.fm-route-layer,
.fm-block-tag {
  pointer-events: none;
}
.fm-raw {
  background: #f6f6ef;
}
.fm-layer {
  position: absolute;
  top: 14px;
  left: 15px;
}
.fm-map-type,
.fm-layer-menu,
.fm-zoom,
.fm-popup {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid #d5ddd5;
  border-radius: 6px;
  box-shadow: 0 2px 5px #263c3410;
}
.fm-map-type {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 9px;
  color: #405549;
  font-size: 11px;
  font-weight: 550;
  line-height: 1.4;
}
.fm-map-type:hover,
.fm-layer-menu button:hover,
.fm-zoom button:hover {
  background: #f2f5f0;
}
.fm-layer-menu {
  margin-top: 4px;
  min-width: 100%;
  overflow: hidden;
}
.fm-layer-menu button {
  padding: 8px 10px;
  display: block;
  width: 100%;
  text-align: left;
  font-size: 12px;
}
.fm-zoom {
  position: absolute;
  right: 14px;
  bottom: 13px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.fm-zoom button {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  padding: 0;
  color: #4b5c51;
  font-size: 20px;
}
.fm-zoom button + button {
  border-top: 1px solid #e1e7de;
}
.fm-north {
  position: absolute;
  right: 22px;
  top: 14px;
  display: grid;
  justify-items: center;
  gap: 2px;
  color: #3e5246;
  font:
    9px ui-monospace,
    SFMono-Regular,
    monospace;
}
.fm-scale {
  position: absolute;
  bottom: 13px;
  left: 16px;
  color: #68766c;
  display: flex;
  align-items: center;
  gap: 7px;
  font:
    9px -apple-system,
    BlinkMacSystemFont,
    'PingFang SC',
    sans-serif;
  letter-spacing: 0.04em;
}
.fm-scale i {
  width: 30px;
  height: 4px;
  border: solid #89968c;
  border-width: 0 1px 1px;
}
.fm-raw .fm-scale,
.fm-raw .fm-north {
  display: none;
}
.fm-popup {
  position: absolute;
  bottom: 14px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  white-space: nowrap;
  font-size: 11px;
}
.fm-popup[hidden],
.fm-layer-menu[hidden] {
  display: none;
}
.fm-popup span {
  color: #647387;
}
.fm-popup a,
.fm-popup button {
  display: grid;
  place-items: center;
  padding: 3px;
  color: #426b9d;
}
.fm-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  padding: 11px 16px;
  color: #5d6d79;
  font-size: 11px;
  background: #fff;
  border-top: 1px solid #e3e9e3;
  line-height: 1.45;
}
.fm-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
}
.fm-legend small {
  margin-left: auto;
  color: #718078;
  font-size: 10px;
}
.fm-swatch {
  width: 9px;
  height: 9px;
  border-radius: 2px;
  display: inline-block;
  border: 1px solid;
}
.fm-swatch.completed {
  background: #81bca3;
  border-color: #68a78e;
}
.fm-swatch.active {
  background: #7eaae7;
  border-color: #5a8dd7;
}
.fm-swatch.pending {
  background: #d1dde3;
  border-color: #aec1cb;
}
.fm-line {
  width: 14px;
  height: 0;
  border-top: 2px dashed #4879c9;
}
.fd-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 50px;
  padding: 15px 18px;
  border-bottom: 1px solid #e7ebef;
}
.fd-heading h2 {
  font-size: 16px;
  color: var(--ink, #192737);
  font-weight: 630;
  letter-spacing: -0.025em;
  margin: 0;
}
.fd-heading p {
  font-size: 12px;
  color: #64768a;
  margin: 4px 0 0;
}
.fd-heading > .icon {
  color: #6c8295;
}
.fd-subtle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #617589;
  font-size: 12px;
  white-space: nowrap;
}
.fm-detail-content {
  padding: 16px 18px;
}
.fm-selected-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
}
.fm-selected-title strong {
  font-size: 27px;
  letter-spacing: -0.04em;
  font-weight: 630;
  font-variant-numeric: tabular-nums;
}
.fd-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  line-height: 1.4;
  white-space: nowrap;
  color: #53667a;
}
.fd-status i {
  width: 6px;
  height: 6px;
  flex: none;
  border-radius: 50%;
  background: currentColor;
}
.fd-status.fd-completed,
.fd-status.fd-working {
  color: #278464;
}
.fd-status.fd-active {
  color: #2263c5;
}
.fd-status.fd-warning {
  color: #996a1a;
}
.fd-status.fd-fault {
  color: #aa4a3d;
}
.fd-status.fd-idle,
.fd-status.fd-pending {
  color: #647588;
}
.fm-array-picker {
  margin: 15px 0 9px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: #667789;
  font-size: 12px;
  white-space: nowrap;
}
.fm-array-picker select {
  display: block;
  flex: 1;
  font-size: 12px;
  min-width: 0;
  padding: 5px 7px;
  min-height: 30px;
}
.fm-detail-content dl {
  margin: 0;
}
.fd-stat {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 9px;
  font-size: 12px;
  line-height: 1.55;
  padding: 8px 0;
  border-bottom: 1px solid #edf0f3;
}
.fd-stat dt {
  color: #637587;
  white-space: nowrap;
}
.fd-stat dd {
  margin: 0;
  text-align: right;
  color: #2e4358;
  font-weight: 550;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.fm-caption {
  margin: 0;
  padding: 14px 17px;
  color: #687888;
  font-size: 12px;
  line-height: 1.6;
}
.fm-detail-content .fm-caption {
  padding: 9px 0 0;
  font-size: 11px;
}
.fm-task-link,
.fm-device-link {
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #3f5267;
  gap: 8px;
}
.fm-task-link:hover,
.fm-device-link:hover,
.fd-family:hover {
  background: #f7faff;
}
.fm-task-link strong,
.fm-task-link small {
  display: block;
}
.fm-task-link strong {
  font-size: 15px;
  color: #245caa;
}
.fm-task-link small {
  margin-top: 4px;
  font-size: 12px;
  color: #617184;
}
.fm-device-link {
  padding: 9px 17px;
  font-size: 13px;
}
.fm-device-link > .fd-status {
  margin-left: auto;
}
.fm-device-link + .fm-device-link {
  border-top: 1px solid #eff2f5;
}
.fd-units {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}
.fd-unit {
  border: 1px solid var(--line, #dee5eb);
  border-radius: 11px;
  background: #fff;
  padding: 14px;
  min-width: 0;
}
.fd-unit:hover {
  border-color: #aabbd2;
}
.fd-unit.fd-current {
  border-color: #6795e2;
  background: #f6f9ff;
  box-shadow: inset 0 2px 0 #3979dd;
}
.fd-unit-name {
  font-size: clamp(14px, 1.25vw, 19px);
  font-weight: 640;
  letter-spacing: -0.035em;
  margin-bottom: 6px;
}
.fd-power {
  margin-top: 13px;
  display: flex;
  gap: 7px;
  align-items: center;
  color: #66798a;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}
.fd-battery {
  display: block;
  width: 18px;
  height: 9px;
  border: 1px solid #8d9d9d;
  border-radius: 2px;
  position: relative;
  padding: 1px;
}
.fd-battery:after {
  content: '';
  position: absolute;
  top: 2px;
  right: -3px;
  width: 1.5px;
  height: 3px;
  background: #97a7a8;
}
.fd-battery b {
  display: block;
  background: #6c9384;
  height: 100%;
  border-radius: 0.5px;
}
.fd-device-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}
.fd-equipment {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 20px 22px 14px;
}
.fd-machine-image {
  width: 43%;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background:
    linear-gradient(#f5f7fa 1px, transparent 1px),
    linear-gradient(90deg, #f5f7fa 1px, transparent 1px);
  background-size: 18px 18px;
}
.fd-machine-image img {
  height: 95%;
  max-width: 94%;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.fd-kicker {
  font-size: 12px;
  color: #63778b;
  font-weight: 560;
}
.fd-machine-body h3 {
  font-size: clamp(23px, 2vw, 32px);
  margin: 3px 0 5px;
  letter-spacing: -0.04em;
  font-weight: 630;
}
.fd-machine-body p {
  font-size: 13px;
  color: #586c80;
}
.fd-telemetry {
  margin: 0 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 22px;
}
.fd-machine-note,
.fd-alarm {
  display: flex;
  gap: 8px;
  color: #586b7e;
  align-items: flex-start;
  font-size: 12px;
  line-height: 1.65;
  margin: 12px 18px;
}
.fd-machine-note .icon,
.fd-alarm .icon {
  flex: none;
  margin-top: 2px;
}
.fd-alarm {
  padding: 9px 11px;
  border-radius: 6px;
  background: #fdf2ee;
  color: #944f40;
}
.fd-alarm strong {
  font-weight: 600;
}
.fd-actions {
  display: flex;
  gap: 17px;
  align-items: center;
  padding: 4px 18px 15px;
}
.fd-actions a {
  display: inline-flex;
  align-items: center;
  color: #3263a1;
  gap: 4px;
  font-size: 12px;
}
.fd-actions a:hover,
.fd-device-name:hover {
  text-decoration: underline;
}
.fd-families {
  padding: 2px 18px;
}
.fd-family {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 10px 0;
  min-height: 90px;
}
.fd-family + .fd-family {
  border-top: 1px solid #edf0f3;
}
.fd-family img {
  width: 26%;
  height: 69px;
  object-fit: contain;
  mix-blend-mode: multiply;
}
.fd-family > div {
  min-width: 0;
}
.fd-family > div > * {
  display: block;
}
.fd-family strong {
  font-size: 15px;
  font-weight: 610;
}
.fd-family span {
  font-size: 12px;
  color: #546a7d;
  margin: 3px 0;
}
.fd-family small {
  font-size: 11px;
  color: #738494;
}
.fd-family > .icon {
  margin-left: auto;
  color: #778a9b;
}
.fd-table-card {
  margin-top: 16px;
}
.fd-table-wrap {
  overflow-x: auto;
}
.fd-table-wrap table {
  width: 100%;
  border-collapse: collapse;
}
.fd-table-wrap th,
.fd-table-wrap td {
  font-size: 12px;
  padding: 11px 14px;
  text-align: left;
  white-space: nowrap;
}
.fd-table-wrap th {
  background: #f7f9fb;
  color: #61768a;
  border-bottom: 1px solid #e5eaf0;
  font-weight: 520;
}
.fd-table-wrap td {
  border-bottom: 1px solid #eef1f4;
}
.fd-table-wrap tr:last-child td {
  border: 0;
}
.fd-selected-row {
  background: #f5f9ff;
}
.fd-device-name {
  font-weight: 600;
  color: #395f92;
}
.fd-attention {
  color: #a26437;
}
@media (max-width: 1199px) {
  .fm-full {
    grid-template-columns: minmax(0, 2.2fr) minmax(225px, 1fr);
  }
  .fd-heading {
    padding: 13px 15px;
  }
  .fd-legend {
    gap: 10px;
  }
  .fd-unit {
    padding: 11px;
  }
  .fd-units {
    gap: 7px;
  }
  .fd-equipment {
    gap: 16px;
  }
  .fd-families {
    padding: 1px 13px;
  }
  .fm-legend {
    gap: 10px;
    padding: 10px 12px;
  }
  .fm-legend small {
    display: none;
  }
  .fm-viewport {
    min-height: 256px;
  }
}
@media (max-width: 980px) {
  .fm-full {
    grid-template-columns: minmax(0, 1fr);
  }
  .fm-full .fm-viewport {
    height: clamp(370px, 54vw, 470px);
  }
  .fm-details {
    grid-template-columns: 1.2fr 1fr;
    align-items: start;
  }
  .fm-details > .fd-card:first-child {
    grid-row: span 2;
  }
  .fd-units {
    grid-template-columns: repeat(3, 1fr);
  }
  .fd-telemetry {
    gap: 0 12px;
  }
  .fd-device-layout {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  }
  .fd-equipment {
    padding: 14px;
    gap: 10px;
  }
  .fd-machine-image {
    height: 90px;
  }
  .fd-family {
    gap: 8px;
  }
  .fd-family img {
    width: 24%;
  }
}
@media (max-width: 650px) {
  .fm-legend {
    gap: 10px;
    padding: 9px 11px;
    font-size: 10px;
  }
  .fm-layer {
    left: 10px;
    top: 10px;
  }
  .fm-north {
    right: 15px;
    top: 10px;
  }
  .fm-zoom {
    right: 8px;
    bottom: 8px;
  }
  .fm-zoom button {
    width: 26px;
    height: 26px;
  }
  .fm-full .fm-viewport {
    height: 360px;
  }
  .fm-details {
    grid-template-columns: 1fr;
  }
  .fm-details > .fd-card:first-child {
    grid-row: auto;
  }
  .fd-device-layout {
    grid-template-columns: 1fr;
  }
  .fd-families {
    display: flex;
    padding: 10px;
    align-items: flex-start;
  }
  .fd-family {
    width: 33.33%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 4px 6px;
  }
  .fd-family + .fd-family {
    border: 0;
  }
  .fd-family img {
    width: 100%;
    height: 46px;
  }
  .fd-family small {
    display: none;
  }
  .fd-family > svg {
    display: none;
  }
  .fd-family span {
    font-size: 11px;
  }
  .fd-equipment {
    gap: 20px;
  }
  .fd-units {
    gap: 7px;
  }
  .fd-unit {
    padding: 10px 9px;
  }
  .fd-status {
    font-size: 11px;
  }
  .fd-stat {
    font-size: 12px;
  }
  .fd-power {
    margin-top: 8px;
  }
  .field-legend {
    gap: 6px;
  }
}
.fm-zone-switch {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #63768a;
  font-size: 12px;
  white-space: nowrap;
}
.fm-zone-switch select {
  width: auto;
  min-height: 31px;
  font-size: 12px;
  padding: 5px 7px;
}
.fm-focused-device circle[r='10'] {
  stroke: #155bc2;
  stroke-width: 2;
  opacity: 0.65;
  fill: #ecf3ff;
}
