:root {
  --bg-900: #071628;
  --bg-850: #0a1b2cc7;
  --bg-800: #091624db;
  --gold: #b89a61;
  --gold-soft: #b89a6166;
  --cyan: #43e9d0;
  --cyan-soft: #43e9d040;
  --text-main: #d9edf1;
  --text-dim: #89a6b2;
}

* {
  box-sizing: border-box;
}

html, body, #root {
  width: 100%;
  height: 100%;
  color: var(--text-main);
  scrollbar-color: #51adbdbf #041421d1;
  scrollbar-width: thin;
  background: radial-gradient(circle at 50% -20%, #154868 0%, #081724 45%, #040d18 100%);
  margin: 0;
  font-family: Noto Sans SC, Microsoft YaHei, PingFang SC, sans-serif;
  overflow: hidden;
}

.dashboard-root {
  width: 100%;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.dashboard-map-layer {
  z-index: 0;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.dashboard-map {
  width: 100%;
  height: 100%;
}

.dashboard-root:after {
  content: "";
  pointer-events: none;
  z-index: 1;
  background: none;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

.leaflet-tile-pane {
  filter: brightness(.6) contrast(1.3) saturate(.7);
}

.dashboard-header {
  z-index: 4;
  pointer-events: none;
  justify-content: center;
  align-items: flex-start;
  display: flex;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
}

.matte-frame {
  border: 1px solid var(--gold-soft);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  background: linear-gradient(#0a1f31e0 0%, #071522d1 100%);
  box-shadow: inset 0 0 0 1px #375c7233, 0 0 22px #0d223473, 0 0 18px #43e9d014;
}

.stats-group {
  pointer-events: auto;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  display: grid;
}

.left-stats {
  margin-bottom: 2px;
}

.stat-card {
  border-radius: 9px;
  flex-direction: column;
  gap: 4px;
  min-height: 70px;
  padding: 8px 10px 10px;
  display: flex;
  overflow: hidden;
}

.stat-label {
  color: var(--text-main);
  letter-spacing: .02em;
  font-size: 14px;
}

.stat-value {
  letter-spacing: .02em;
  color: var(--cyan);
  text-shadow: 0 0 14px #43e9d066;
  white-space: nowrap;
  font-size: max(24px, min(2.2vw, 32px));
  line-height: 1;
  display: inline-block;
}

.stat-main {
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  display: inline-flex;
}

.stat-unit {
  white-space: nowrap;
  color: #8ccdc2;
  font-size: 14px;
}

.header-ribbon {
  pointer-events: auto;
  width: 100vw;
  height: 82px;
  box-shadow: none;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  background-image: url(/static/image/bg.f17c9118.png);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
  border: none;
  border-radius: 0;
  justify-content: center;
  place-items: center;
  padding: 0 14vw;
  display: flex;
}

.header-ribbon h1 {
  letter-spacing: .04em;
  color: #d2f2ef;
  text-shadow: 0 0 12px #3ed9c652;
  white-space: nowrap;
  margin: 0;
  font-size: max(22px, min(2.25vw, 40px));
  font-weight: 700;
}

.header-time {
  pointer-events: auto;
  letter-spacing: .01em;
  color: #c8dde3;
  white-space: nowrap;
  text-overflow: clip;
  border-radius: 8px;
  place-items: center;
  width: max-content;
  max-width: 100%;
  min-height: 48px;
  padding: 0 12px;
  font-family: Consolas, Menlo, monospace;
  font-size: max(20px, min(1.2vw, 24px));
  display: grid;
  position: absolute;
  top: 10px;
  right: 14px;
  overflow: hidden;
}

.dashboard-main {
  z-index: 3;
  pointer-events: none;
  grid-template-columns: 360px 1fr 360px;
  gap: 12px;
  display: grid;
  position: absolute;
  top: 82px;
  bottom: 44px;
  left: 12px;
  right: 12px;
}

.left-column, .right-column {
  pointer-events: auto;
  gap: 12px;
  min-height: 0;
  display: grid;
}

.left-column {
  grid-column: 1;
  grid-template-rows: auto minmax(160px, .9fr) minmax(130px, .75fr) minmax(150px, 1fr);
}

.left-column .panel, .left-column .tab-btn {
  font-family: Consolas, SimHei, Microsoft YaHei, monospace;
}

.left-column .tab-btn {
  letter-spacing: .02em;
}

.right-column {
  grid-column: 3;
  grid-template-rows: 1fr;
}

.panel-title-row {
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  display: flex;
}

.panel-title-inline {
  margin: 0;
}

.data-panel {
  min-height: 0;
}

.data-panel .bar-list {
  padding-right: 2px;
}

.panel {
  border-radius: 10px;
  flex-direction: column;
  min-height: 0;
  padding: 10px 12px 12px;
  display: flex;
  overflow: hidden;
}

.panel-title {
  color: #d7eef3;
  letter-spacing: .04em;
  border-left: 3px solid var(--cyan);
  margin: 0 0 8px;
  padding-left: 8px;
  font-size: 18px;
  font-weight: 700;
}

.zone-list {
  gap: 4px;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  overflow: auto;
}

.zone-row {
  background: linear-gradient(90deg, #0b1f3099, #07141f75);
  border: 1px solid #5f8f9c3d;
  border-radius: 7px;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  display: flex;
}

.zone-row.is-real {
  background: linear-gradient(90deg, #245c70c2, #0d2935c7);
  border-color: #58f2dee6;
  box-shadow: inset 0 0 0 1px #70fce833, 0 0 14px #3ee9d22e;
}

.zone-row.is-real .zone-name, .zone-row.is-real .zone-values {
  color: #d7fbf4;
  font-weight: 700;
}

.zone-name {
  letter-spacing: .02em;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  display: inline-flex;
}

.zone-dot {
  background: var(--dot-color);
  width: 8px;
  height: 8px;
  box-shadow: 0 0 8px color-mix(in srgb, var(--dot-color) 70%, transparent);
  border-radius: 2px;
}

.zone-values {
  letter-spacing: .01em;
  color: #acd2d9;
  font-size: 13px;
}

.tabs-panel {
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  display: flex;
}

.tab-header {
  flex-shrink: 0;
  gap: 8px;
  margin-left: auto;
  display: flex;
}

.tab-btn {
  color: #adc8cf;
  cursor: pointer;
  background: #091a29bf;
  border: 1px solid #7babb673;
  border-radius: 999px;
  min-width: 76px;
  height: 30px;
  font-size: 14px;
}

.tab-btn.active {
  color: #0d2a38;
  background: linear-gradient(#56edd9 0%, #29c7b4 100%);
  border-color: #0000;
  font-weight: 600;
}

.bar-list {
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  overflow: auto;
}

.bar-row {
  grid-template-columns: 78px 1fr auto;
  align-items: center;
  gap: 8px;
  display: grid;
}

.bar-label {
  color: #c0dce4;
  letter-spacing: .02em;
  font-size: 14px;
}

.bar-track {
  background: #143546b8;
  border: 1px solid #4e84926b;
  border-radius: 999px;
  width: 100%;
  height: 12px;
  overflow: hidden;
}

.bar-fill {
  border-radius: inherit;
  background: linear-gradient(90deg, #20baa8 0%, #61f0db 100%);
  height: 100%;
  transition: width .26s;
  display: block;
  box-shadow: 0 0 8px #43e9d066;
}

.bar-row.is-real .bar-label, .bar-row.is-real .bar-value {
  color: #d7fbf4;
  font-weight: 700;
}

.bar-row.is-real .bar-track {
  border-color: #59f1de9e;
  box-shadow: inset 0 0 0 1px #59f1de2e;
}

.bar-row.is-real .bar-fill {
  background: linear-gradient(90deg, #46e9d4 0%, #9bfff1 100%);
  box-shadow: 0 0 10px #62f4e29e;
}

.bar-value {
  color: #99bec6;
  letter-spacing: .01em;
  letter-spacing: .02em;
  text-align: right;
  min-width: 108px;
  font-family: Consolas, SimHei, Microsoft YaHei, monospace;
  font-size: 13px;
  font-weight: 700;
}

.team-list {
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  overflow: auto;
}

.team-row {
  background: #07192694;
  border: 1px solid #628d9766;
  border-radius: 7px;
  justify-content: space-between;
  gap: 10px;
  padding: 8px;
  display: flex;
}

.team-unit {
  letter-spacing: .02em;
  color: #d5eaf0;
  font-size: 14px;
  font-weight: 600;
}

.team-meta, .team-metric {
  letter-spacing: .01em;
  color: #8fb4be;
  margin-top: 2px;
  font-size: 12px;
}

.team-status {
  border-radius: 999px;
  justify-content: center;
  align-items: center;
  min-width: 64px;
  height: 24px;
  font-size: 12px;
  font-weight: 600;
  display: inline-flex;
}

.status-稳定 {
  color: #74ecd7;
  background: #38b19b33;
  border: 1px solid #54cfb873;
}

.status-巡查中 {
  color: #8ec7ff;
  background: #5282c733;
  border: 1px solid #6e9ee073;
}

.status-保障中 {
  color: #f0cc8d;
  background: #a47a3533;
  border: 1px solid #c89d5773;
}

.timeline-panel {
  min-height: 0;
  overflow: hidden;
}

.timeline-list {
  gap: 12px;
  margin: 0;
  padding: 2px 6px 2px 22px;
  list-style: none;
  display: grid;
  overflow: hidden auto;
}

.timeline-item {
  padding-left: 6px;
  position: relative;
}

.timeline-item:after {
  content: "";
  background: linear-gradient(#3ed9c661, #3ed9c614);
  border-radius: 999px;
  width: 1px;
  position: absolute;
  top: 20px;
  bottom: -12px;
  left: -7px;
}

.timeline-item:last-child:after {
  display: none;
}

.timeline-node {
  background: #182531;
  border: 2px solid #3ed9c6d9;
  border-radius: 50%;
  width: 12px;
  height: 12px;
  position: absolute;
  top: 20px;
  left: -12px;
  box-shadow: 0 0 0 2px #3ed9c629;
}

.timeline-card {
  background: linear-gradient(120deg, #182531e6, #182531c2);
  border: 1px solid #3ed9c633;
  border-radius: 10px;
  width: 100%;
  min-width: 0;
  padding: 10px 12px 11px;
  transition: border-color .18s, background-color .18s;
  box-shadow: inset 0 0 0 1px #3ed9c614;
}

.timeline-item:hover .timeline-card {
  border-color: #3ed9c657;
  box-shadow: inset 0 0 0 1px #3ed9c61f;
}

.timeline-head {
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  display: flex;
}

.timeline-time {
  color: #d6ecef;
  letter-spacing: .01em;
  align-items: center;
  gap: 6px;
  font-family: Consolas, SimHei, Microsoft YaHei, monospace;
  font-size: 15px;
  font-weight: 700;
  display: inline-flex;
}

.timeline-badge {
  color: #96ece1eb;
  letter-spacing: .02em;
  background: #3ed9c61a;
  border: 1px solid #3ed9c647;
  border-radius: 999px;
  justify-content: center;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  font-size: 11px;
  display: inline-flex;
}

.timeline-meta-grid {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 6px 8px;
  min-width: 0;
  margin-bottom: 8px;
  display: grid;
}

.timeline-chip {
  color: #9fbcc3;
  letter-spacing: .01em;
  background: #182531f0;
  border: 1px solid #3ed9c62e;
  border-radius: 999px;
  align-items: center;
  gap: 5px;
  width: 100%;
  min-width: 0;
  min-height: 22px;
  padding: 0 8px;
  font-size: 12px;
  line-height: 1;
  display: inline-flex;
  overflow: hidden;
}

.timeline-chip svg {
  color: #3ed9c6c2;
  flex: none;
}

.timeline-chip-label {
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
}

.timeline-desc {
  color: #d3e5e9;
  text-align: left;
  word-break: break-word;
  letter-spacing: .01em;
  max-width: none;
  font-size: 14px;
  line-height: 1.45;
}

.timeline-meta-grid, .timeline-meta, .timeline-desc {
  font-family: Consolas, SimHei, Microsoft YaHei, monospace;
}

.map-zoom-pad {
  z-index: 900;
  gap: 6px;
  display: grid;
  position: absolute;
  bottom: 18px;
  right: 16px;
}

.map-zoom-btn {
  color: #d6e8ec;
  cursor: pointer;
  background: #081825bf;
  border: 1px solid #7295a18c;
  border-radius: 7px;
  width: 34px;
  height: 34px;
  font-size: 22px;
  line-height: 1;
}

.map-zoom-btn:hover {
  background: #142e3edb;
}

.leaflet-container {
  font: inherit;
  background: none;
}

.leaflet-control-container {
  display: none;
}

.leaflet-overlay-pane svg path.greenland-polygon {
  transform-origin: center;
  vector-effect: non-scaling-stroke;
  filter: none;
  animation: 1.8s cubic-bezier(.45, .05, .55, .95) infinite polygon-breathe;
}

.leaflet-overlay-pane svg path.greenland-polygon.is-selected {
  animation: none;
  stroke: #02fff4 !important;
  stroke-width: 3.2px !important;
  stroke-opacity: 1 !important;
  fill: #007c6c !important;
  fill-opacity: 1 !important;
  filter: none !important;
}

@keyframes polygon-breathe {
  0%, 100% {
    stroke: #19d9cf;
    stroke-width: 1.3px;
    stroke-opacity: .7;
    fill: #007c6c;
    fill-opacity: .16;
    filter: none;
  }

  50% {
    stroke: #4ae3cf;
    stroke-width: 2.8px;
    stroke-opacity: 1;
    fill: #007c6c;
    fill-opacity: .62;
    filter: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .leaflet-overlay-pane svg path.greenland-polygon {
    animation: none;
  }
}

.leaflet-interactive:focus, .leaflet-container:focus, .leaflet-container svg:focus, .leaflet-container path:focus {
  outline: none !important;
}

.leaflet-rich-popup .leaflet-popup-content-wrapper {
  color: #d7eef4;
  background: #182531f5;
  border: 1px solid #3ed9c657;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px #3ed9c61a, 0 8px 20px #06111985;
}

.leaflet-rich-popup .leaflet-popup-content {
  margin: 8px 10px;
}

.leaflet-rich-popup .leaflet-popup-tip {
  background: #182531f5;
  border: 1px solid #3ed9c633;
}

.leaflet-rich-popup .polygon-tip-title {
  color: #bff6ed;
  margin-bottom: 4px;
  font-size: 14px;
  font-weight: 700;
}

.leaflet-rich-popup .polygon-tip-item {
  color: #a8cad2;
  font-size: 12px;
  line-height: 1.35;
}

.selection-summary {
  z-index: 6;
  pointer-events: auto;
  border-radius: 9px;
  min-width: 210px;
  max-width: 280px;
  padding: 10px 32px 10px 12px;
  position: absolute;
  top: 92px;
  left: 50%;
  transform: translateX(-50%);
}

.selection-summary-meta {
  color: #94b7bf;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-family: Consolas, SimHei, Microsoft YaHei, monospace;
  font-size: 12px;
  display: flex;
}

.selection-summary-label {
  letter-spacing: .01em;
}

.selection-summary-count {
  color: #82d7cb;
}

.selection-summary-value {
  letter-spacing: .02em;
  color: #b9f8ef;
  text-shadow: 0 0 8px #3ed9c652;
  margin-top: 5px;
  font-family: Consolas, SimHei, Microsoft YaHei, monospace;
  font-size: 21px;
  font-weight: 700;
}

.selection-clear-btn {
  color: #b2d7dec2;
  cursor: pointer;
  background: #1825315c;
  border: 1px solid #71abb54d;
  border-radius: 999px;
  justify-content: center;
  align-items: center;
  width: 20px;
  height: 20px;
  font-size: 9px;
  transition: border-color .14s, color .14s, background-color .14s;
  display: flex;
  position: absolute;
  top: 8px;
  right: 8px;
}

.selection-clear-btn:hover:not(:disabled) {
  color: #d8f0f4;
  background: #1e30407a;
  border-color: #97dce694;
}

.selection-clear-btn:disabled {
  opacity: .34;
  cursor: default;
}

.status-bar {
  z-index: 5;
  pointer-events: none;
  background: linear-gradient(#081421ad, #06111dd6);
  border-top: 1px solid #3ed9c624;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  height: 34px;
  padding: 0 12px;
  display: flex;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
}

.status-left {
  align-items: center;
  gap: 14px;
  min-width: 0;
  display: inline-flex;
}

.status-item {
  letter-spacing: .01em;
  color: #a4c2cadb;
  white-space: nowrap;
  align-items: center;
  gap: 5px;
  font-family: Consolas, SimHei, Microsoft YaHei, monospace;
  font-size: 12px;
  display: inline-flex;
}

.status-right {
  white-space: nowrap;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  display: inline-flex;
}

.status-copy {
  letter-spacing: .01em;
  color: #a4c2cadb;
  font-family: Consolas, SimHei, Microsoft YaHei, monospace;
  font-size: 12px;
}

::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

::-webkit-scrollbar-track {
  background: linear-gradient(#051421eb, #020c15eb);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(#64c5d5d1, #288a9cd1);
  border: 1px solid #abdbe43d;
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(#86dfece0, #38a9bce6);
}

@media (max-width: 1320px) {
  .dashboard-main {
    grid-template-columns: 294px 1fr 294px;
  }

  .header-time {
    font-size: 20px;
  }
}

@media (max-width: 1100px) {
  html, body, #root {
    overflow: auto;
  }

  .dashboard-root {
    height: auto;
    min-height: 100%;
  }

  .dashboard-map-layer {
    position: fixed;
  }

  .dashboard-header {
    gap: 10px;
    padding: 0;
    display: block;
    position: relative;
    top: 0;
    left: 0;
    right: 0;
  }

  .stats-group {
    grid-template-columns: 1fr 1fr;
  }

  .header-ribbon {
    background-size: 100% 100%;
    width: 100vw;
    height: max(58px, min(10vw, 82px));
    padding: 0 10vw;
  }

  .header-time {
    width: calc(100% - 20px);
    height: 42px;
    margin: 8px 10px 0;
    font-size: 16px;
    position: static;
  }

  .dashboard-main {
    flex-direction: column;
    padding: 8px 10px 14px;
    display: flex;
    position: relative;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
  }

  .left-column, .right-column {
    grid-template-rows: none;
  }

  .data-panel {
    max-height: none;
  }

  .timeline-panel, .left-column .panel, .right-column .panel {
    max-height: 300px;
  }

  .selection-summary {
    min-width: 170px;
    max-width: 240px;
    position: fixed;
    top: 72px;
    left: 50%;
    transform: translateX(-50%);
  }

  .status-bar {
    flex-wrap: wrap;
    row-gap: 4px;
    height: auto;
    min-height: 34px;
    padding: 6px 10px;
    position: fixed;
  }

  .status-left {
    flex-wrap: wrap;
    gap: 10px;
  }

  .status-item, .status-copy {
    font-size: 11px;
  }

  .dashboard-map {
    border: 1px solid #ad966361;
    border-radius: 10px;
    height: 42vh;
    min-height: 42vh;
    margin: 0 10px;
  }
}

