.metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
.metric dt {
  line-height: 1.45;
}
.tile.red {
  background: #f8e5e1;
  color: #a84034;
}
.monitor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(282px, 0.85fr);
  gap: 17px;
  align-items: start;
  margin: 0 0 17px;
}
.monitor-grid[hidden],
.telemetry-history[hidden],
.fleet-alerts[hidden] {
  display: none;
}
.geography .panel-head,
.station .panel-head,
.telemetry-history .panel-head,
.fleet-alerts .panel-head {
  padding: 19px 20px 12px;
}
.station .panel-head h2 {
  font-size: 1.32rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.station-branch {
  font-size: 0.83rem;
  color: var(--muted);
  margin: 0;
}
.map-filters {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.2fr);
  gap: 10px;
  padding: 0 20px 14px;
}
.map-filters label {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}
.map-filters select,
.telemetry-history select {
  width: 100%;
  min-width: 0;
  min-height: 36px;
  padding: 3px 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
}
#fleet-map {
  position: relative;
  margin: 0 12px;
  border: 1px solid #cfdad4;
  border-radius: 10px;
  overflow: hidden;
  background: #eae8dc;
  isolation: isolate;
}
#fleet-map > svg {
  display: block;
  width: 100%;
  height: auto;
  min-height: 205px;
  background: #eae8dc;
}
.map-caption {
  position: absolute;
  inset: auto auto 4px 8px;
  background: #fff9;
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.62rem;
  color: #4c625a;
  pointer-events: none;
}
.map-grid {
  fill: none;
  stroke: #698c84;
  stroke-opacity: 0.15;
  stroke-width: 0.65;
  pointer-events: none;
}
.coast,
.road,
.road-edge,
.runway {
  fill: none;
}
.coast {
  stroke: #a1b7ac;
  stroke-width: 1.4;
}
.road-edge {
  stroke: #d8d1bd;
  stroke-width: 7;
}
.road {
  stroke: #fffefa;
  stroke-width: 4.5;
}
.runway {
  stroke: #a6a79e;
  stroke-width: 6;
}
.geo-label,
.map-north text,
.map-scale text {
  font-family: Tahoma, Arial, sans-serif;
  fill: #52625a;
  font-size: 11px;
}
.geo-label,
.map-north text {
  text-anchor: middle;
}
.map-north path {
  fill: #3c554e;
}
.map-scale path {
  stroke: #53665e;
  stroke-width: 2;
  fill: none;
}
.map-pin {
  cursor: pointer;
  color: #86918b;
}
.map-pin .pin-touch {
  fill: transparent;
  stroke: none;
}
.map-pin .pin-ring {
  fill: #fff8;
  stroke: #956e28;
  stroke-width: 2.5;
}
.map-pin path,
.map-pin rect,
.map-pin circle:not(.pin-touch, .pin-ring, .manual-pin-ring) {
  fill: currentColor;
  stroke: #fff;
  stroke-width: 1.8;
}
.map-pin:focus .pin-touch {
  fill: #eef3d5aa;
  stroke: #155950;
  stroke-width: 3;
}
.map-pin .manual-pin-ring {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-dasharray: 3 2;
}
.map-pin text {
  font:
    600 11px Tahoma,
    Arial,
    sans-serif;
  fill: #233f38;
  paint-order: stroke;
  stroke: #f5f2e8;
  stroke-width: 4px;
  stroke-linejoin: round;
}
.map-pin.working {
  color: #21815b;
}
.map-pin.attention {
  color: #a97416;
}
.map-pin.stopped {
  color: #b33e30;
}
.map-pin.scheduled {
  color: #687576;
}
.map-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  justify-content: space-between;
  padding: 12px 16px 16px;
}
.map-legend,
.report-legend,
.map-zoom {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}
.map-legend > span,
.report-legend > span,
.monitor-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.76rem;
  white-space: nowrap;
}
.map-zoom {
  direction: ltr;
  gap: 3px;
}
.map-zoom .icon-btn,
.map-zoom .btn {
  min-height: 30px;
  height: 30px;
  min-width: 32px;
  border-color: var(--border);
  padding: 1px 7px;
}
.map-zoom .icon-btn {
  font-size: 1.2rem;
}
.state-shape {
  display: inline-block;
  flex: none;
  width: 10px;
  height: 10px;
  background: #607272;
}
.state-shape.working {
  border-radius: 50%;
  background: #21815b;
}
.state-shape.attention {
  width: 12px;
  background: #a97416;
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.state-shape.stopped {
  background: #b33e30;
}
.state-shape.scheduled {
  width: 8px;
  height: 8px;
  transform: rotate(45deg);
  background: #687576;
}
.monitor-badge {
  font-weight: 650;
  color: #314c43;
}
.monitor-badge.stopped {
  color: #963b30;
}
.monitor-badge.attention {
  color: #885910;
}
.no-fix {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(86%, 305px);
  display: grid;
  gap: 4px;
  text-align: center;
  background: #ffffffed;
  border: 1px solid #d1dacf;
  border-radius: 10px;
  padding: 14px;
  box-shadow: 0 4px 18px #334e3e18;
  color: #284236;
}
.no-fix span,
.geo-reading span,
.station-buttons {
  font-size: 0.83rem;
}
.geo-reading {
  margin: 0 18px 10px;
  padding: 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #f1f6f1;
  border-radius: 9px;
}
.geo-reading .tile {
  width: 31px;
  height: 31px;
  min-width: 31px;
}
.geo-reading > div {
  display: grid;
  gap: 2px;
}
.geo-reading > div > span {
  color: var(--muted);
}
.geo-reading bdi {
  direction: ltr;
  justify-self: start;
  font-family: Consolas, monospace;
  font-weight: 600;
}
.geo-reading a {
  width: fit-content;
  font-size: 0.76rem;
}
.station > .details,
.system-info .details {
  margin: 0 18px 10px;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 4px 12px;
  font-size: 0.85rem;
}
.station .details dt,
.station .details dd {
  border: 0;
  margin: 0;
  padding: 1px 0;
}
.station .details dd {
  text-align: end;
  overflow-wrap: anywhere;
}
.system-info {
  margin: 5px 18px 10px;
  border: 1px solid #dce5df;
  border-radius: 8px;
  background: #f7f9f7;
}
.system-info summary {
  padding: 8px 11px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 650;
}
.system-info .details {
  margin-inline: 11px;
}
.station-buttons {
  padding: 0 18px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}
.station-buttons .btn {
  min-height: 32px;
  padding: 4px 9px;
  font-size: 0.78rem;
}
.fleet-alerts,
.telemetry-history {
  margin-block: 0 17px;
}
.event-list {
  padding: 0 18px 15px;
  margin: 0;
  list-style: none;
}
.event-list button {
  background: #fff;
  color: var(--ink);
  border: 0;
  border-block-start: 1px solid var(--border);
  display: grid;
  grid-template-columns: 6em minmax(5em, 1fr) minmax(7em, 1.3fr) max-content;
  align-items: center;
  gap: 10px;
  text-align: start;
  width: 100%;
  padding: 9px 1px;
}
.event-list button:hover {
  background: #f2f6f3;
}
.event-list time,
.event-list button > span:not(.monitor-badge) {
  font-size: 0.8rem;
  color: var(--muted);
}
.cell-note {
  display: block;
  color: var(--muted);
  font-size: 0.76rem;
}
.telemetry-history .panel-head {
  align-items: center;
}
.telemetry-history select {
  max-width: 260px;
}
#health-content {
  padding: 0 20px 20px;
}
#health-content h3 {
  font-size: 1rem;
  margin: 22px 0 8px;
}
.report-title,
.percentages,
.day-axis {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.report-title {
  padding: 10px 12px;
  background: #f0f4ed;
  border-radius: 8px;
}
.report-title span,
.day-axis {
  color: var(--muted);
  font-size: 0.82rem;
}
.percentages {
  margin: 12px 0;
  justify-content: flex-start;
}
.percentages > span {
  display: grid;
  gap: 2px;
  min-width: 90px;
  padding: 7px 9px;
  border-inline-start: 2px solid #d8e5d8;
}
.heat-scroll {
  overflow-x: auto;
}
.heatmap {
  min-width: 460px;
  direction: ltr;
}
.heat-row {
  display: grid;
  grid-template-columns: 76px repeat(24, minmax(0, 1fr));
  gap: 2px;
  margin: 3px 0;
  align-items: center;
}
.heat-row > span,
.heat-row small {
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
}
.heat-cell {
  display: block;
  height: 15px;
  background: #eceeeb;
  border-radius: 2px;
  border: 1px solid #d7ddd7;
}
.heat-cell.working {
  background: #3e8f6e;
  border-color: #3e8f6e;
}
.heat-cell.attention {
  background: #dbad4d;
  border-color: #dbad4d;
}
.heat-cell.stopped {
  background: #c86050;
  border-color: #c86050;
}
.heat-cell.scheduled {
  background: #959e9b;
  border-color: #959e9b;
}
.heat-cell.future {
  background: #fff;
  border-style: dashed;
}
.report-legend {
  margin-top: 10px;
}
.report-legend .heat-cell {
  width: 10px;
  height: 10px;
}
.daily-history {
  display: flex;
  gap: 1px;
}
.daily-history .heat-cell {
  flex: 1;
  min-width: 0;
}
.day-axis {
  margin-top: 5px;
}
@media (max-width: 1200px) {
  .monitor-grid {
    grid-template-columns: minmax(0, 1.18fr) minmax(245px, 1fr);
  }
  .metrics {
    gap: 8px;
  }
}
@media (max-width: 1000px) {
  .monitor-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .metrics {
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
  }
  .station > .details {
    grid-template-columns: max-content 1fr max-content 1fr;
  }
}
@media (max-width: 620px) {
  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .monitor-grid {
    gap: 10px;
    margin-bottom: 10px;
  }
  .geography .panel-head,
  .station .panel-head,
  .telemetry-history .panel-head,
  .fleet-alerts .panel-head {
    padding: 14px 12px 10px;
  }
  .map-filters {
    padding: 0 12px 10px;
  }
  #fleet-map {
    margin: 0 8px;
  }
  #fleet-map > svg {
    min-height: 165px;
  }
  .map-pin text {
    font-size: 16px;
    stroke-width: 3px;
  }
  .map-pin.working > circle:last-of-type,
  .map-pin.stopped > rect,
  .map-pin.attention > path,
  .map-pin.scheduled > path {
    transform: scale(1.18);
  }
  .map-controls {
    padding: 8px;
  }
  .geo-reading,
  .system-info {
    margin-inline: 12px;
  }
  .station > .details {
    grid-template-columns: max-content minmax(0, 1fr);
    margin-inline: 12px;
  }
  .station-buttons {
    padding-inline: 12px;
  }
  .event-list {
    padding-inline: 12px;
  }
  .event-list button {
    grid-template-columns: 6.5em minmax(0, 1fr);
    gap: 3px;
  }
  .telemetry-history .panel-head {
    align-items: stretch;
    flex-direction: column;
  }
  #health-content {
    padding-inline: 12px;
  }
  .percentages > span {
    min-width: 72px;
  }
}
