﻿:root {
  --bg: #060b14;
  --deep: #0a2463;
  --blue: #1e6df5;
  --cyan: #00d4aa;
  --orange: #f5a623;
  --red: #ff6b6b;
  --text: #eaf3ff;
  --muted: #8aa7c8;
  --line: rgba(98, 164, 255, 0.22);
  --panel: rgba(10, 27, 62, 0.66);
  --panel-strong: rgba(12, 37, 88, 0.78);
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  overflow: hidden;
  color: var(--text);
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", Arial, sans-serif;
  background:
    radial-gradient(circle at 50% 8%, rgba(30, 109, 245, 0.26), transparent 34%),
    radial-gradient(circle at 12% 92%, rgba(0, 212, 170, 0.14), transparent 28%),
    linear-gradient(135deg, #060b14 0%, #081733 48%, #061126 100%);
}

body::before {
  position: fixed;
  inset: 0;
  pointer-events: none;
  content: "";
  background-image:
    linear-gradient(rgba(71, 144, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(71, 144, 255, 0.08) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: radial-gradient(circle at center, black 0%, transparent 78%);
}

button {
  font: inherit;
}

.dashboard-shell {
  width: 100vw;
  height: 100vh;
  min-height: 720px;
  padding: 14px 18px 18px;
  overflow: hidden;
}

.topbar {
  display: grid;
  grid-template-columns: 330px 1fr 180px;
  align-items: center;
  height: 90px;
  padding: 0 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(12, 38, 88, 0.88), rgba(6, 16, 36, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 12px 34px rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(14px);
}

.live-status {
  display: flex;
  gap: 9px;
  align-items: center;
  color: #d7eaff;
  font-size: 12px;
}

.live-status i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px rgba(0, 212, 170, 0.85);
  animation: status-blink 1.8s ease-in-out infinite;
}

.brand-title {
  justify-self: center;
  color: #ffffff;
  font-size: 56px;
  font-weight: 400;
  letter-spacing: 0;
}

.live-status span,
.meta span,
.kpi-card span,
.kpi-card small,
.title-note,
.panel span,
.panel em {
  color: var(--muted);
}

.tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
}

.tab {
  min-width: 128px;
  height: 38px;
  color: #b9d6ff;
  cursor: pointer;
  border: 1px solid rgba(93, 157, 255, 0.28);
  border-radius: var(--radius);
  background: rgba(7, 21, 50, 0.74);
  transition: transform 0.16s ease, color 0.16s ease, border-color 0.16s ease, background 0.16s ease;
}

.tab:hover,
.tab.is-active {
  color: #ffffff;
  border-color: rgba(30, 109, 245, 0.9);
  background: linear-gradient(180deg, rgba(30, 109, 245, 0.72), rgba(20, 72, 170, 0.52));
}

.tab:active,
.primary-action:active {
  transform: translateY(1px);
}

.meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  font-size: 12px;
}

.meta strong {
  font-size: 15px;
}

@keyframes status-blink {
  50% { opacity: 0.45; }
}

.page {
  display: none;
  position: relative;
  height: calc(100vh - 122px);
  min-height: 620px;
  padding-top: 12px;
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 0.45s cubic-bezier(0.22, 1, 0.36, 1), transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.page.is-active {
  display: block;
  opacity: 1;
  transform: scale(1);
}

.kpi-grid {
  display: grid;
  gap: 12px;
  height: 102px;
}

.kpi-grid.five {
  grid-template-columns: repeat(5, 1fr);
}

.kpi-grid.four {
  grid-template-columns: repeat(4, 1fr);
}

.kpi-card,
.panel,
.phone-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 42%),
    var(--panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 14px 42px rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(12px);
}

.kpi-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 14px 16px;
  overflow: hidden;
}

.kpi-card::after {
  display: none;
}

.kpi-card strong {
  margin-top: 6px;
  color: #ffffff;
  font-size: 28px;
  line-height: 1;
}

.kpi-card em {
  margin-left: 4px;
  font-size: 12px;
  font-style: normal;
  font-weight: 600;
}

.kpi-card small {
  margin-top: 8px;
  font-size: 12px;
}

.kpi-card.danger strong,
.danger-text {
  color: var(--red);
}

.kpi-card.warn strong,
.warn-text {
  color: var(--orange);
}

.up,
.safe {
  color: var(--cyan) !important;
}

.down {
  color: #86c8ff !important;
}

.overview-layout,
.flood-layout {
  display: grid;
  grid-template-columns: 22% 1fr 28%;
  gap: 12px;
  height: calc(100% - 114px);
  margin-top: 12px;
}

.left-column,
.center-column,
.right-column {
  display: grid;
  gap: 12px;
  min-width: 0;
  min-height: 0;
}

.overview-layout .left-column {
  grid-template-rows: 44% 1fr;
}

.overview-layout .center-column {
  grid-template-rows: minmax(0, 1fr) auto;
}

.overview-layout .right-column {
  grid-template-rows: 28% 20% 22% 1fr;
}

.flood-layout .left-column {
  grid-template-rows: 28% 36% 1fr;
}

.flood-layout .center-column {
  grid-template-rows: 1fr 22% 18%;
}

.flood-layout .right-column {
  grid-template-rows: 22% 23% 27% 1fr;
}

.panel {
  min-height: 0;
  padding: 12px;
  overflow: hidden;
}

.report-panel {
  display: grid;
  grid-template-rows: 24px 1fr 1fr;
  gap: 8px;
}

.report-panel .panel-title {
  margin-bottom: 0;
}

.report-panel .chart,
.report-panel .chart.compact,
.report-panel .chart.tall {
  height: 100%;
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 34px;
  margin-bottom: 8px;
  color: #ffffff;
  font-size: 28px;
  font-weight: 400;
}

.panel-title::before {
  width: 3px;
  height: 24px;
  margin-right: 8px;
  content: "";
  border-radius: 3px;
  background: var(--blue);
  box-shadow: 0 0 14px rgba(30, 109, 245, 0.8);
}

.panel-title > span:first-child,
.panel-title {
  min-width: 0;
}

.title-note {
  margin-left: auto;
  font-size: 12px;
  font-weight: 500;
}

.risk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  height: calc(100% - 42px);
}

.risk-card {
  position: relative;
  min-height: 0;
  padding: 9px 9px 8px 12px;
  cursor: pointer;
  border: 1px solid rgba(83, 145, 238, 0.22);
  border-left: 3px solid var(--blue);
  border-radius: var(--radius);
  background: rgba(5, 18, 44, 0.54);
}

.risk-card.alert {
  border-color: rgba(255, 107, 107, 0.7);
  border-left-color: var(--red);
  box-shadow: 0 0 20px rgba(255, 107, 107, 0.12);
}

.risk-card strong {
  display: block;
  margin: 5px 0 3px;
  color: #ffffff;
  font-family: "Bebas", "Arial Narrow", sans-serif;
  font-size: 24px;
}

.risk-card > span {
  display: flex;
  gap: 7px;
  align-items: center;
  color: #ffffff;
  font-size: 12px;
}

.risk-card > span b {
  overflow: hidden;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.risk-icon {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  color: #b8d6ff;
}

.risk-card small {
  position: static;
  margin-top: 4px;
  color: #ffffff;
  font-size: 12px;
}

.risk-card em {
  color: var(--red);
  font-style: normal;
}

.risk-card .status {
  display: inline-block;
  padding: 1px 5px;
  color: #dbeaff;
  border-radius: 4px;
  background: rgba(30, 109, 245, 0.18);
}

.chart {
  width: 100%;
  height: calc(100% - 30px);
}

.chart.tall {
  height: 52%;
}

.chart.compact {
  height: calc(48% - 8px);
}

.chart.medium {
  height: calc(100% - 30px);
}

.map-panel {
  position: relative;
}

.map-stage {
  position: relative;
  height: calc(100% - 42px);
  overflow: hidden;
  border: 1px solid rgba(57, 133, 255, 0.25);
  border-radius: var(--radius);
}

.map-stage .minemapgl-canvas,
.map-stage .minemap-canvas,
.map-stage canvas {
  outline: none;
}

.map-stage .mapboxgl-ctrl,
.map-stage .minemapgl-ctrl,
.map-stage .minemap-ctrl {
  display: none !important;
}

.map-fallback {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 52% 48%, rgba(30, 109, 245, 0.32), transparent 28%),
    linear-gradient(135deg, rgba(11, 48, 103, 0.9), rgba(3, 12, 31, 0.95));
}

.map-fallback-title {
  position: absolute;
  top: 14px;
  left: 16px;
  z-index: 2;
  color: rgba(234, 243, 255, 0.82);
  font-size: 12px;
  font-weight: 700;
}

.map-fallback-label {
  position: absolute;
  z-index: 2;
  padding: 3px 8px;
  color: #d9ecff;
  font-size: 12px;
  border: 1px solid rgba(112, 180, 255, 0.28);
  border-radius: 4px;
  background: rgba(2, 12, 31, 0.64);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.static-geo-map {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 45%, rgba(30, 109, 245, 0.28), transparent 28%),
    linear-gradient(135deg, rgba(6, 25, 60, 0.94), rgba(2, 10, 28, 0.96));
}

.static-geo-svg {
  position: absolute;
  inset: 4% 3% 2%;
  width: 94%;
  height: 92%;
  filter: drop-shadow(0 0 18px rgba(30, 109, 245, 0.34));
}

.static-community-shape {
  fill: rgba(30, 109, 245, 0.35);
  stroke: rgba(113, 190, 255, 0.86);
  stroke-width: 0.34;
  vector-effect: non-scaling-stroke;
}

.static-community-shape.shape-1 {
  fill: rgba(30, 109, 245, 0.32);
}

.static-community-shape.shape-2 {
  fill: rgba(30, 109, 245, 0.3);
}

.static-community-shape.shape-3 {
  fill: rgba(30, 109, 245, 0.28);
}

.static-community-name {
  fill: rgba(234, 243, 255, 0.9);
  font-family: "TXFONT", "YouSheBiaoTiHei", "Microsoft YaHei", sans-serif;
  font-size: 3px;
  text-anchor: middle;
  paint-order: stroke fill;
  stroke: rgba(4, 12, 31, 0.78);
  stroke-width: 0.9px;
}

.map-label {
  position: absolute;
  z-index: 2;
  padding: 4px 7px;
  color: #cfe6ff;
  font-size: 12px;
  border: 1px solid rgba(115, 176, 255, 0.24);
  border-radius: 5px;
  background: rgba(2, 12, 31, 0.62);
}

.risk-point {
  position: absolute;
  z-index: 3;
  width: 12px;
  height: 12px;
  cursor: pointer;
  border: 2px solid rgba(255, 255, 255, 0.75);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}

.risk-point.red {
  width: 18px;
  height: 18px;
  background: var(--red);
  box-shadow: 0 0 0 9px rgba(255, 107, 107, 0.12), 0 0 28px rgba(255, 107, 107, 0.82);
}

.risk-point.orange {
  width: 14px;
  height: 14px;
  background: var(--orange);
  box-shadow: 0 0 0 7px rgba(245, 166, 35, 0.12);
}

.risk-point.blue {
  width: 13px;
  height: 13px;
  background: #35a4ff;
  animation: pulse 1.6s infinite;
}

.risk-point.yellow {
  background: #ffe27a;
}

.risk-point.normal {
  width: 7px;
  height: 7px;
  border-width: 1px;
  background: rgba(157, 211, 255, 0.68);
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(53, 164, 255, 0.45);
  }
  50% {
    box-shadow: 0 0 0 12px rgba(53, 164, 255, 0);
  }
}

.map-popup {
  position: absolute;
  z-index: 5;
  width: 240px;
  padding: 12px;
  color: #eaf3ff;
  border: 1px solid rgba(112, 183, 255, 0.46);
  border-radius: var(--radius);
  background: rgba(4, 16, 39, 0.92);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

.map-popup h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.map-popup p {
  display: flex;
  justify-content: space-between;
  margin: 5px 0;
  color: var(--muted);
  font-size: 12px;
}

.map-popup b {
  color: #ffffff;
  font-weight: 700;
}

.popup-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.popup-actions button,
.primary-action {
  height: 32px;
  color: #ffffff;
  cursor: pointer;
  border: 1px solid rgba(91, 166, 255, 0.5);
  border-radius: var(--radius);
  background: rgba(30, 109, 245, 0.42);
}

.ai-fab {
  display: block;
  margin: 12px 0 0 auto;
  height: 42px;
  padding: 0 18px;
  color: #ffffff;
  cursor: pointer;
  border: 1px solid rgba(0, 212, 170, 0.62);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(30, 109, 245, 0.94), rgba(0, 137, 119, 0.86));
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28), 0 0 22px rgba(0, 212, 170, 0.22);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.ai-fab:hover {
  border-color: rgba(255, 255, 255, 0.72);
}

.detail-header {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 42px;
  margin-bottom: 10px;
  padding: 0 4px;
}

.detail-header > div {
  display: flex;
  gap: 12px;
  align-items: baseline;
  min-width: 0;
}

.detail-header strong {
  color: #eaf3ff;
  font-family: "YouSheBiaoTiHei", "Microsoft YaHei", sans-serif;
  font-size: 21px;
  white-space: nowrap;
}

.detail-header span {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.back-button {
  height: 30px;
  padding: 0 11px;
  color: #d8ecff;
  cursor: pointer;
  border: 1px solid rgba(112, 183, 255, 0.42);
  border-radius: 4px;
  background: rgba(10, 42, 88, 0.56);
  font-size: 12px;
}

.back-button::before {
  margin-right: 5px;
  content: "←";
}

.back-button:hover {
  color: #ffffff;
  border-color: rgba(153, 206, 255, 0.84);
  background: rgba(30, 109, 245, 0.38);
}

.popup-actions button:last-child,
.primary-action {
  border-color: rgba(0, 212, 170, 0.74);
  background: linear-gradient(180deg, rgba(0, 212, 170, 0.9), rgba(0, 130, 107, 0.75));
}

.call-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr)) minmax(188px, 0.9fr);
  gap: 10px;
  grid-auto-rows: auto;
}

.call-grid div,
.resource-grid div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 10px;
  border: 1px solid rgba(90, 157, 255, 0.22);
  border-radius: var(--radius);
  background: rgba(6, 22, 54, 0.54);
}

.call-grid strong {
  margin-top: 8px;
  font-size: 21px;
}

.primary-action {
  height: 100%;
  min-width: 0;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.focus-list,
.warning-list,
.task-progress,
.ai-stat-list {
  display: grid;
  gap: 8px;
}

.focus-list {
  height: calc(100% - 32px);
  overflow: hidden;
}

.focus-item,
.warning-item,
.task-item,
.rank-list p {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 0;
  padding: 8px 10px;
  border: 1px solid rgba(92, 156, 255, 0.18);
  border-radius: var(--radius);
  background: rgba(6, 22, 54, 0.42);
}

.focus-item strong,
.warning-item strong,
.task-item strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tag {
  padding: 2px 6px;
  color: #ffffff;
  font-size: 12px;
  border-radius: 4px;
  background: rgba(30, 109, 245, 0.42);
}

.tag.red {
  background: rgba(255, 107, 107, 0.75);
}

.tag.orange {
  background: rgba(245, 166, 35, 0.75);
}

.tag.green {
  background: rgba(0, 212, 170, 0.68);
}

.metric-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  margin: 8px 0 6px;
  font-size: 12px;
}

.metric-row strong {
  color: #ffffff;
  font-size: 16px;
}

.metric-row em {
  font-style: normal;
  font-size: 12px;
}

.bar,
.building-bars i {
  display: block;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(100, 153, 220, 0.16);
}

.bar i,
.building-bars b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--blue);
}

.bar.teal i,
.building-bars b {
  background: var(--cyan);
}

.bar.orange i {
  background: var(--orange);
}

.timeout {
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
}

.timeout strong {
  color: var(--red);
}

.people-grid,
.relief-grid,
.review-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.people-grid div,
.relief-grid div,
.review-grid span {
  padding: 8px;
  border-radius: var(--radius);
  background: rgba(5, 20, 48, 0.55);
}

.people-grid strong,
.relief-grid strong {
  display: block;
  color: #ffffff;
  font-size: 20px;
}

.people-grid span,
.relief-grid span {
  font-size: 12px;
}

.device-wrap {
  display: grid;
  grid-template-columns: 42% 1fr;
  gap: 8px;
  height: calc(100% - 32px);
}

.chart.ring {
  height: 100%;
}

.advice {
  display: grid;
  gap: 7px;
  align-content: center;
}

.advice p,
.prediction {
  margin: 0;
  padding: 7px 8px;
  color: #d9ebff;
  font-size: 12px;
  border-left: 2px solid var(--cyan);
  border-radius: 5px;
  background: rgba(0, 212, 170, 0.08);
}

.building-bars {
  display: grid;
  gap: 8px;
}

.building-bars label {
  display: grid;
  grid-template-columns: 34px 1fr 42px;
  gap: 8px;
  align-items: center;
  color: #cfe5ff;
  font-size: 12px;
}

.resource-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.resource-grid strong {
  margin-top: 6px;
  font-size: 14px;
}

.dept-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 10px;
}

.dept-tags span,
.dept-tags b {
  padding: 5px 8px;
  color: #e8f4ff;
  font-size: 12px;
  border-radius: 5px;
  background: rgba(0, 212, 170, 0.18);
}

.dept-tags .pending {
  background: rgba(245, 166, 35, 0.18);
}

.rank-list {
  display: grid;
  gap: 7px;
  margin-bottom: 8px;
}

.rank-list p {
  margin: 0;
  padding: 7px 9px;
}

.prediction {
  color: #fff1c8;
  border-left-color: var(--orange);
  background: rgba(245, 166, 35, 0.12);
}

.ai-layout {
  display: grid;
  grid-template-columns: 58% 1fr;
  gap: 14px;
  height: 100%;
}

.phone-panel {
  min-height: 0;
  padding: 14px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(6, 20, 48, 0.84), rgba(2, 11, 26, 0.78)),
    var(--panel);
}

.wechat-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 44px;
  padding: 0 14px;
  border-radius: var(--radius);
  background: rgba(8, 34, 67, 0.9);
}

.chat-stream {
  display: grid;
  gap: 10px;
  align-content: start;
  height: calc(100% - 58px);
  margin-top: 14px;
  padding: 8px 6px 0;
  overflow: hidden;
}

.chat-row {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 10px;
  max-width: 78%;
}

.chat-row.ai,
.chat-row.self {
  grid-template-columns: 1fr 48px;
  justify-self: end;
}

.avatar {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(30, 109, 245, 0.34);
}

.bubble {
  padding: 10px 12px;
  color: #e7f2ff;
  border-radius: var(--radius);
  background: rgba(25, 51, 91, 0.9);
}

.chat-row.ai .bubble {
  border: 1px solid rgba(74, 160, 255, 0.48);
  background: rgba(18, 84, 171, 0.88);
}

.chat-row.self .bubble {
  background: rgba(0, 130, 107, 0.72);
}

.bubble header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: #b9d6ff;
  font-size: 12px;
}

.bubble p {
  margin: 0;
  font-size: 13px;
  line-height: 1.55;
}

.highlight {
  color: #fff1c8;
  font-weight: 800;
}

.ai-side {
  display: grid;
  grid-template-rows: 118px 1fr;
  gap: 12px;
  min-height: 0;
}

.flow-line {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto 1fr auto 1fr auto;
  gap: 8px;
  align-items: center;
  height: calc(100% - 32px);
}

.flow-line span {
  padding: 8px 10px;
  color: #e7f2ff;
  font-size: 12px;
  border-radius: var(--radius);
  background: rgba(30, 109, 245, 0.26);
}

.flow-line i {
  height: 1px;
  background: linear-gradient(90deg, rgba(30, 109, 245, 0.2), var(--cyan));
}

.ai-stat-list {
  grid-template-rows: repeat(5, 1fr);
  min-height: 0;
}

.ai-stat-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(10, 27, 62, 0.66);
}

.ai-stat-card span {
  color: var(--muted);
  font-size: 12px;
}

.ai-stat-card strong {
  display: block;
  margin: 7px 0;
  font-size: 26px;
}

.capability-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 8px;
}

.capability-tags i {
  padding: 5px 8px;
  color: #dff6ff;
  font-style: normal;
  font-size: 12px;
  border-radius: 5px;
  background: rgba(0, 212, 170, 0.14);
}

@media (max-width: 1200px) {
  body {
    overflow: auto;
  }

  .dashboard-shell {
    min-width: 1100px;
    height: auto;
    min-height: 100vh;
  }

  .page {
    height: 980px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

.brand-title,
.panel-title,
.ai-fab {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
}

.kpi-card strong,
.metric-row strong,
.clock strong,
.people-grid strong,
.relief-grid strong,
.review-grid strong {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  letter-spacing: 0;
}

.map-stage {
  position: relative;
  overflow: hidden;
}

.map-chart,
.map-marker-layer,
.map-popup-layer {
  position: absolute;
  inset: 0;
}

.map-chart {
  z-index: 1;
}

.map-marker-layer {
  z-index: 3;
  pointer-events: none;
}

.map-popup-layer {
  z-index: 4;
  pointer-events: none;
}

.map-marker {
  position: absolute;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  transform: translate(-50%, -50%);
  pointer-events: auto;
}

.map-marker::before {
  position: absolute;
  inset: -7px;
  content: "";
  border-radius: 50%;
  background: transparent;
  box-shadow: 0 0 0 6px rgba(30, 109, 245, 0.12), 0 0 18px rgba(30, 109, 245, 0.4);
}

.map-marker-core {
  position: relative;
  z-index: 1;
  width: 10px;
  height: 10px;
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 10px rgba(30, 109, 245, 0.8);
}

.map-marker.red .map-marker-core {
  background: var(--red);
  box-shadow: 0 0 12px rgba(255, 107, 107, 0.9);
}

.map-marker.orange .map-marker-core {
  background: var(--orange);
  box-shadow: 0 0 12px rgba(245, 166, 35, 0.9);
}

.map-marker.blue .map-marker-core {
  background: #35a4ff;
}

.map-marker.normal .map-marker-core {
  background: rgba(157, 211, 255, 0.88);
}

.map-marker:hover {
  z-index: 5;
}

.map-community-label {
  position: absolute;
  padding: 3px 8px;
  color: #d9ecff;
  font-size: 12px;
  border: 1px solid rgba(112, 180, 255, 0.28);
  border-radius: 4px;
  background: rgba(2, 12, 31, 0.64);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.map-popup {
  position: absolute;
  width: 240px;
  padding: 12px;
  color: #eaf3ff;
  border: 1px solid rgba(112, 183, 255, 0.46);
  border-radius: var(--radius);
  background: rgba(4, 16, 39, 0.94);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
  pointer-events: none;
}

.map-popup h3 {
  margin: 0 0 8px;
  font-size: 14px;
}

.map-popup p {
  display: flex;
  justify-content: space-between;
  margin: 5px 0;
  color: var(--muted);
  font-size: 12px;
}

.map-popup b {
  color: #ffffff;
  font-weight: 700;
}

.popup-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.popup-actions button {
  height: 32px;
  color: #ffffff;
  cursor: pointer;
  border: 1px solid rgba(91, 166, 255, 0.5);
  border-radius: var(--radius);
  background: rgba(30, 109, 245, 0.42);
}

.popup-actions button:last-child {
  border-color: rgba(0, 212, 170, 0.74);
  background: linear-gradient(180deg, rgba(0, 212, 170, 0.9), rgba(0, 130, 107, 0.75));
}

/* 覆盖旧版 CSS 模拟地图残留样式，保证 MineData Marker 与社区标签优先显示。 */
.map-stage .map-community-label {
  position: relative;
  display: inline-block;
  width: auto !important;
  max-width: 112px;
  padding: 3px 7px;
  color: rgba(255, 255, 255, 0.88);
  font-family: "TXFONT", "YouSheBiaoTiHei", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid rgba(153, 206, 255, 0.24);
  border-radius: 4px;
  background: rgba(5, 29, 72, 0.78);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.28);
  transform: none;
  pointer-events: none;
  user-select: none;
}

.map-community-label {
  display: block;
  padding: 4px 9px;
  color: rgba(255, 255, 255, 0.88);
  font-family: "TXFONT", "YouSheBiaoTiHei", "Microsoft YaHei", sans-serif;
  font-size: 13px;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid rgba(153, 206, 255, 0.24);
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(15, 68, 148, 0.9), rgba(15, 68, 148, 0.12));
  box-shadow: 0 0 16px rgba(30, 109, 245, 0.28);
  pointer-events: none;
  user-select: none;
  text-overflow: ellipsis;
  overflow: hidden;
}

.map-risk-marker {
  position: relative;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  cursor: pointer;
  border: 0;
  background: transparent;
  transform: translate(-50%, -50%);
  pointer-events: auto;
}

.map-risk-marker-glow {
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: rgba(30, 109, 245, 0.14);
  box-shadow: 0 0 0 7px rgba(30, 109, 245, 0.12), 0 0 26px rgba(30, 109, 245, 0.5);
  animation: pulse 1.8s infinite;
}

.map-risk-marker-core {
  position: relative;
  z-index: 1;
  display: block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.88);
  border-radius: 50%;
  background: #35a4ff;
  box-shadow: 0 0 12px rgba(53, 164, 255, 0.85);
}

.map-risk-marker.red .map-risk-marker-core {
  width: 17px;
  height: 17px;
  background: var(--red);
  box-shadow: 0 0 16px rgba(255, 107, 107, 0.95);
}

.map-risk-marker.red .map-risk-marker-glow {
  background: rgba(255, 107, 107, 0.18);
  box-shadow: 0 0 0 10px rgba(255, 107, 107, 0.12), 0 0 32px rgba(255, 107, 107, 0.72);
}

.map-risk-marker.orange .map-risk-marker-core {
  width: 15px;
  height: 15px;
  background: var(--orange);
  box-shadow: 0 0 14px rgba(245, 166, 35, 0.88);
}

.map-risk-marker.orange .map-risk-marker-glow {
  background: rgba(245, 166, 35, 0.16);
  box-shadow: 0 0 0 8px rgba(245, 166, 35, 0.12), 0 0 28px rgba(245, 166, 35, 0.58);
}

.map-risk-marker.yellow .map-risk-marker-core {
  background: #ffe27a;
  box-shadow: 0 0 12px rgba(255, 226, 122, 0.78);
}

.map-risk-marker.normal .map-risk-marker-core {
  width: 8px;
  height: 8px;
  border-width: 1px;
  background: rgba(157, 211, 255, 0.9);
}

.map-risk-marker.normal .map-risk-marker-glow {
  inset: 7px;
  animation: none;
  opacity: 0.6;
}

.map-risk-marker:hover {
  z-index: 10;
}

.map-risk-marker:hover .map-risk-marker-core {
  transform: scale(1.12);
}

.map-risk-detail-popup,
.map-risk-info-popup {
  pointer-events: auto;
}

.map-risk-detail-popup .minemapgl-popup-content,
.map-risk-detail-popup .minemap-popup-content,
.map-risk-detail-popup .mapboxgl-popup-content,
.map-risk-info-popup .minemapgl-popup-content,
.map-risk-info-popup .minemap-popup-content,
.map-risk-info-popup .mapboxgl-popup-content {
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.map-risk-detail-popup .minemap-popup-tip,
.map-risk-detail-popup .minemapgl-popup-tip,
.map-risk-detail-popup .mapboxgl-popup-tip,
.map-risk-info-popup .minemap-popup-tip,
.map-risk-info-popup .minemapgl-popup-tip,
.map-risk-info-popup .mapboxgl-popup-tip {
  border-top-color: #99ceff !important;
  border-bottom-color: #99ceff !important;
}

.map-risk-card {
  width: 252px;
  max-width: 252px;
  max-height: none;
  overflow: hidden;
  padding: 12px;
  color: #eaf3ff;
  border: 2px solid transparent;
  border-radius: 8px;
  background:
    radial-gradient(72px 92px at 0% 0%, rgba(201, 226, 255, 0.9) 0%, rgba(68, 186, 248, 0.58) 18%, rgba(6, 77, 183, 0.42) 52%, rgba(6, 10, 16, 0.2) 100%) padding-box,
    linear-gradient(rgba(8, 31, 72, 0.92), rgba(5, 16, 38, 0.94)) padding-box,
    linear-gradient(180deg, #c9e2ff 0%, rgba(5, 122, 255, 0.62) 34%, rgba(153, 206, 255, 0.16) 100%) border-box;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.36);
}

.map-risk-card--info {
  width: 190px;
  padding: 8px 10px;
}

.map-risk-card h3 {
  margin: 0 0 8px;
  overflow: hidden;
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-risk-card-head {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  margin-bottom: 8px;
  border-bottom: 1px dashed rgba(153, 206, 255, 0.3);
}

.map-risk-card-head h3 {
  margin: 0;
}

.map-risk-card-head span {
  flex: 0 0 auto;
  padding: 2px 7px;
  color: #ffffff;
  font-size: 12px;
  border: 1px solid rgba(255, 107, 107, 0.4);
  border-radius: 4px;
  background: rgba(255, 107, 107, 0.18);
}

.map-risk-card p {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  margin: 5px 0;
  color: var(--muted);
  font-size: 12px;
}

.map-risk-card b {
  overflow: hidden;
  max-width: 150px;
  color: #ffffff;
  font-weight: 800;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-legend {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 8;
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 9px 12px;
  color: #ffffff;
  border: 1px solid rgba(112, 180, 255, 0.34);
  border-radius: 5px;
  background: rgba(3, 17, 40, 0.84);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
  font-size: 12px;
  pointer-events: none;
}

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

.map-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border: 1px solid rgba(255, 255, 255, 0.76);
  border-radius: 50%;
}

.map-legend i.red { background: var(--red); box-shadow: 0 0 7px rgba(255, 107, 107, 0.78); }
.map-legend i.orange { background: var(--orange); box-shadow: 0 0 7px rgba(245, 166, 35, 0.66); }
.map-legend i.blue { background: #35a4ff; box-shadow: 0 0 7px rgba(53, 164, 255, 0.68); }
.map-legend i.normal { background: rgba(157, 211, 255, 0.88); }

.map-stage .minemapgl-popup,
.map-stage .minemap-popup,
.map-stage .mapboxgl-popup {
  max-width: none !important;
}

.map-stage .minemapgl-popup-content,
.map-stage .minemap-popup-content,
.map-stage .mapboxgl-popup-content {
  max-width: none !important;
  max-height: none !important;
  padding: 0 !important;
  overflow: visible !important;
}

/* 标题统一使用常规字重，数值指标保留强调层级。 */
.detail-header strong,
.wechat-head strong,
.map-fallback-title,
.map-popup h3,
.map-risk-card h3,
.risk-card > span b,
.focus-item strong,
.warning-item strong,
.task-item strong {
  font-weight: 400;
}

/* 参考深色工作台风格：石墨层级、大圆角容器、克制的边缘高光。 */
:root {
  --bg: #34343e;
  --blue: #2186e8;
  --cyan: #26c7b8;
  --orange: #f1a43a;
  --red: #ea6b70;
  --text: #f7f7fa;
  --muted: #a3a4af;
  --line: rgba(255, 255, 255, 0.08);
  --panel: #20212a;
  --radius: 16px;
}

body {
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #34343e;
}

.topbar {
  height: 62px;
  border-color: transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.brand-title {
  color: #f8f8fb;
  font-size: 27px;
}

.live-status,
.meta { color: #afb0bb; }

.kpi-card,
.panel,
.phone-panel {
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 18px;
  background: #20212a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025), 0 14px 28px rgba(0, 0, 0, 0.16);
  backdrop-filter: none;
}

.kpi-card {
  border-top-color: rgba(255, 255, 255, 0.08);
  background: #24252f;
}

#overview .kpi-card:nth-child(1) { border-right-color: rgba(33, 134, 232, 0.52); }
#overview .kpi-card:nth-child(2) { border-right-color: rgba(234, 107, 112, 0.5); }
#overview .kpi-card:nth-child(3) { border-right-color: rgba(241, 164, 58, 0.5); }
#overview .kpi-card:nth-child(4) { border-right-color: rgba(38, 199, 184, 0.5); }

.panel { padding: 14px; }
.panel-title {
  justify-content: flex-start;
  color: #f6f6f8;
  font-size: 17px;
  text-align: left;
}
.panel-title::before { background: var(--cyan); }
.panel-title .title-note { margin-left: 10px; }

.risk-card,
.focus-item,
.warning-item,
.task-item,
.rank-list p,
.call-grid div,
.resource-grid div,
.people-grid div,
.relief-grid div,
.review-grid span {
  border-color: rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  background: #262731;
  box-shadow: none;
}

.risk-card { border-left: 2px solid var(--blue); }
.risk-card:hover { background: #2b2c37; }

.map-stage { border-color: rgba(33, 134, 232, 0.28); border-radius: 14px; }

.tag {
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

.primary-action,
.popup-actions button:last-child,
.ai-fab {
  border-color: rgba(55, 149, 235, 0.8);
  border-radius: 12px;
  background: #1e73cf;
  box-shadow: 0 8px 18px rgba(30, 115, 207, 0.18);
}

.map-legend,
.map-risk-card {
  border-color: rgba(255, 255, 255, 0.12);
  background: #20212a;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
  backdrop-filter: none;
}

.phone-panel,
.ai-stat-card { background: #20212a; }
.wechat-head,
.bubble,
.flow-line span { background: #292a34; }
.chat-row.ai .bubble { background: #1769bf; }
.chat-row.self .bubble { background: #167d70; }

/* 页面可用高度按各自头部结构计算，避免二级页裁剪。 */
.flood-layout {
  height: calc(100% - 160px);
  margin-top: 10px;
}

#overview .ai-fab {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 12;
  margin: 0;
}

.tag,
.risk-card .status,
.dept-tags span,
.dept-tags b,
.map-risk-card-head span {
  color: #ffffff !important;
}

/* 风险卡片与重点清单交互。 */
.risk-card .status {
  position: absolute;
  top: 8px;
  right: 8px;
  margin: 0;
  padding: 3px 7px;
  line-height: 1;
}

.risk-card .status.green { background: rgba(48, 209, 88, 0.88); }
.risk-card .status.orange { background: rgba(255, 159, 10, 0.9); }
.risk-card .status.red { background: rgba(255, 69, 58, 0.9); }

.focus-list,
.warning-list,
.task-progress {
  position: relative;
  overflow: hidden;
}

.scroll-track,
.scroll-group {
  display: grid;
  gap: 8px;
}

.scroll-track {
  width: 100%;
  will-change: transform;
  animation: list-scroll 28s linear infinite;
}

.warning-track { animation-duration: 18s; }
.task-track { animation-duration: 21s; }

.focus-list:hover .scroll-track,
.warning-list:hover .scroll-track,
.task-progress:hover .scroll-track {
  animation-play-state: paused;
}

@keyframes list-scroll {
  to { transform: translateY(calc(-50% - 4px)); }
}

#overview .ai-fab {
  min-width: 128px;
  height: 42px;
  padding: 0 16px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.28);
  background: #1976d2;
}

/* 二级页按业务闭环划分四个维度，保留原图表和地图节点。 */
#flood .four-dimension-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.86fr) minmax(560px, 1.8fr) minmax(310px, 1.05fr);
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  height: calc(100% - 160px);
  margin-top: 10px;
}

#flood .dimension-panel {
  display: grid;
  grid-template-rows: 34px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.065);
  border-radius: 18px;
  background: #20212a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025), 0 14px 28px rgba(0, 0, 0, 0.16);
}

#flood .dimension-heading {
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0;
  border-bottom: 0;
}

#flood .dimension-heading > span {
  display: none;
}

#flood .dimension-heading h2 {
  display: flex;
  align-items: center;
  margin: 0;
  color: #ffffff;
  font-size: 17px;
  font-weight: 400;
  line-height: 1;
}

#flood .dimension-heading h2::before {
  width: 3px;
  height: 24px;
  margin-right: 8px;
  content: "";
  border-radius: 3px;
  background: var(--cyan);
}

#flood .dimension-heading p {
  display: none;
}

#flood .dimension-content {
  display: grid;
  min-width: 0;
  min-height: 0;
  gap: 10px;
  padding-top: 8px;
}

#flood .dimension-sensing .dimension-content {
  grid-template-columns: 1fr;
  grid-template-rows: minmax(0, 0.95fr) minmax(0, 1.1fr) minmax(0, 0.8fr);
}

#flood .dimension-sensing { grid-column: 1; grid-row: 1 / -1; }
#flood .dimension-command { grid-column: 2; grid-row: 1 / -1; }
#flood .dimension-supervision { grid-column: 3; grid-row: 1; }
#flood .dimension-review { grid-column: 3; grid-row: 2; }

#flood .dimension-command .dimension-content {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) minmax(150px, 0.35fr);
}
#flood .dimension-command .map-panel { grid-column: 1 / -1; grid-row: 1; }
#flood .dimension-command .task-panel { grid-column: 1; grid-row: 2; }
#flood .dimension-command .resource-panel { grid-column: 2; grid-row: 2; }
#flood .dimension-supervision .dimension-content { grid-template-columns: 1fr; grid-template-rows: minmax(0, 1fr) minmax(0, 1.25fr); }
#flood .dimension-review .dimension-content { grid-template-rows: minmax(0, 1.1fr) minmax(0, 0.9fr); }

#flood .dimension-content .panel {
  display: grid;
  grid-template-rows: 28px minmax(0, 1fr);
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  background: #262731;
  box-shadow: none;
}

#flood .dimension-content > .panel:not(.map-panel) {
  background: var(--surface-raised) !important;
}

#flood .dimension-content > .panel:not(.map-panel) .relief-grid > div,
#flood .dimension-content > .panel:not(.map-panel) .review-grid > span,
#flood .dimension-content > .panel:not(.map-panel) .resource-grid > div,
#flood .dimension-content > .panel:not(.map-panel) .rank-list p,
#flood .dimension-content > .panel:not(.map-panel) .warning-item,
#flood .dimension-content > .panel:not(.map-panel) .task-item {
  background: var(--surface-card) !important;
}

#flood .dimension-content .panel-title {
  height: 28px;
  margin: 0;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(135, 153, 178, 0.1);
  color: rgba(235, 242, 252, 0.9);
  font-size: 14px;
  font-weight: 400;
}

#flood .dimension-content .panel-title::before {
  width: 4px;
  height: 4px;
  margin-right: 6px;
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(0, 212, 170, 0.8);
}

#flood .dimension-content .chart.medium,
#flood .dimension-content .chart.tall,
#flood .dimension-content .chart.compact {
  height: 100%;
}

#flood .dimension-command .map-panel {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

#flood .dimension-command .map-panel .panel-title { display: none; }

#flood .dimension-command .map-stage {
  grid-row: 1;
  min-height: 0;
  height: auto;
}
#flood .dimension-command .task-panel .task-progress { height: auto; }
#flood .dimension-command .resource-panel { min-height: 102px; }
#flood .dimension-supervision .dimension-content {
  grid-template-rows: minmax(126px, auto) minmax(0, 1fr);
}

#flood .dimension-supervision .protection-panel {
  grid-template-rows: 28px auto minmax(0, 1fr);
}

#flood .dimension-supervision .building-bars {
  align-content: center;
  gap: 8px;
}

#flood .dimension-supervision .patrol-panel { grid-template-rows: 28px minmax(0, 1fr); }

#flood .dimension-supervision .relief-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  min-height: 0;
}

#flood .dimension-supervision .relief-grid div {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 8px;
}

#flood .dimension-review .cause-panel,
#flood .dimension-review .recommendation-panel { min-height: 0; }

#flood .dimension-review .cause-panel {
  display: grid;
  grid-template-columns: minmax(118px, 0.78fr) minmax(0, 1.22fr);
  grid-template-rows: 28px minmax(0, 1fr);
  column-gap: 8px;
}

#flood .dimension-review .cause-panel .panel-title { grid-column: 1 / -1; }

#flood .dimension-review .cause-panel .review-grid {
  grid-template-columns: 1fr;
  grid-template-rows: repeat(4, minmax(0, 1fr));
  min-height: 0;
}

#flood .dimension-review .cause-panel #causePie {
  width: 100%;
  min-height: 0;
  height: 100%;
}

@media (max-width: 1280px) {
  #flood .four-dimension-layout {
    grid-template-columns: minmax(220px, 0.82fr) minmax(460px, 1.5fr) minmax(250px, 0.95fr);
  }

  #flood .dimension-heading h2 { font-size: 17px; }
  #flood .dimension-heading p { display: none; }
  #flood .dimension-supervision .dimension-content,
  #flood .dimension-review .dimension-content { grid-template-columns: 1fr; }
}

/* 全局文字仅使用固定层级，避免模块间字号失序。 */
:root {
  --type-meta: 12px;
  --type-body: 14px;
  --type-subtitle: 16px;
  --type-section: 18px;
  --type-page: 28px;
  --type-display: 56px;
}

body {
  font-size: var(--type-body);
  line-height: 1.4;
}

.brand-title { font-size: var(--type-display); }
.detail-header strong { font-size: var(--type-page); }

.panel-title,
#flood .dimension-heading h2 {
  font-size: var(--type-section);
  font-weight: 400;
}

#flood .dimension-content .panel-title,
.map-popup h3,
.wechat-head strong,
.ai-stat-card h3 {
  font-size: var(--type-subtitle);
  font-weight: 400;
}

.tab,
.meta strong,
.resource-grid strong,
.metric-row,
.rank-list p,
.map-popup h3,
.ai-fab,
.primary-action {
  font-size: var(--type-body);
}

.kpi-card strong { font-size: var(--type-page); }
.call-grid strong,
.people-grid strong,
.relief-grid strong,
.metric-row strong { font-size: var(--type-section); }

.risk-card strong,
.ai-stat-card strong { font-size: var(--type-page); }

.live-status,
.meta,
.kpi-card span,
.kpi-card small,
.kpi-card em,
.detail-header span,
.title-note,
.tag,
.focus-item strong,
.warning-item strong,
.task-item strong,
.map-popup p,
.metric-row em,
.building-bars label,
.people-grid span,
.relief-grid span,
.dept-tags span,
.dept-tags b,
.prediction,
.advice p,
.back-button {
  font-size: var(--type-meta);
}

.review-grid span { font-size: var(--type-meta); }
.review-grid strong { font-size: var(--type-body); }

/* 统计卡片使用统一的线性图标角标。 */
.kpi-card,
.call-grid > div,
.resource-grid > div,
.people-grid > div,
.relief-grid > div,
.review-grid > span,
.ai-stat-card {
  position: relative;
}

.stat-icon {
  position: absolute;
  top: 50%;
  left: 10px;
  width: 28px;
  height: 28px;
  padding: 6px;
  transform: translateY(-50%);
  color: #8ac7ff;
  border-radius: 8px;
  background: rgba(33, 134, 232, 0.16);
}

.stat-icon-1 { color: #ffb25b; background: rgba(241, 164, 58, 0.16); }
.stat-icon-2 { color: #72ded2; background: rgba(38, 199, 184, 0.16); }
.stat-icon-3 { color: #9abaff; background: rgba(33, 134, 232, 0.14); }
.stat-icon-4 { color: #f1878d; background: rgba(234, 107, 112, 0.16); }
.stat-icon-5 { color: #b4a6ff; background: rgba(132, 111, 246, 0.14); }

.kpi-card .stat-icon {
  left: 16px;
  width: 38px;
  height: 38px;
  padding: 8px;
  border-radius: 11px;
}

.kpi-card > span,
.kpi-card > strong,
.kpi-card > small {
  margin-left: 50px;
}

.call-grid > div,
.resource-grid > div,
.ai-stat-card {
  padding-left: 46px;
}

.people-grid > div,
.relief-grid > div,
.review-grid > span {
  padding-left: 34px !important;
  padding-right: 8px;
}

.people-grid .stat-icon,
.relief-grid .stat-icon,
.review-grid .stat-icon {
  left: 8px;
  top: 10px;
  width: 20px;
  height: 20px;
  padding: 4px;
  transform: none;
  border-radius: 6px;
}

.primary-action span,
.ai-fab span {
  color: #ffffff !important;
}

.primary-action .button-icon,
.ai-fab .button-icon {
  color: #d7edff !important;
}

.advice p {
  color: #ffffff;
  font-size: var(--type-body);
  border-left: 0;
  background: var(--surface-card);
}

/* 全局容器改用背景色阶分层，取消卡片描边。 */
:root {
  --surface-main: #20212a;
  --surface-card: #262731;
  --surface-raised: #2d2e39;
}

.kpi-card,
.panel,
.phone-panel,
.ai-stat-card,
.dimension-panel,
.risk-card,
.focus-item,
.warning-item,
.task-item,
.rank-list p,
.call-grid > div,
.resource-grid > div,
.people-grid > div,
.relief-grid > div,
.review-grid > span {
  border: 0 !important;
  box-shadow: none !important;
}

.kpi-card,
.panel,
.phone-panel,
.dimension-panel,
.ai-stat-card {
  background: var(--surface-main) !important;
}

.risk-card,
.focus-item,
.warning-item,
.task-item,
.rank-list p,
.call-grid > div,
.resource-grid > div,
.people-grid > div,
.relief-grid > div,
.review-grid > span {
  background: var(--surface-card) !important;
}

.risk-card:hover,
.focus-item:hover,
.warning-item:hover,
.task-item:hover,
.rank-list p:hover {
  background: var(--surface-raised) !important;
}

.panel-title,
#flood .dimension-content .panel-title {
  border-bottom: 0;
}

.map-stage,
.map-legend,
.map-risk-card {
  border: 0 !important;
}

.tabs .tab,
.back-button,
.popup-actions button,
.primary-action,
.ai-fab {
  border-color: transparent;
}

.ai-fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 132px;
  height: 40px;
  padding: 0 14px;
  color: #ffffff;
  font-size: var(--type-body);
  font-weight: 400;
  text-shadow: none;
  border-radius: 8px;
  background: #2879d1;
  box-shadow: 0 8px 18px rgba(40, 121, 209, 0.24);
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #ffffff;
  font-size: var(--type-body);
  font-weight: 400;
  text-shadow: none;
  border-radius: 8px;
  background: #2879d1;
  box-shadow: 0 8px 18px rgba(40, 121, 209, 0.24);
}

.primary-action:hover { background: #3488e2; }

.primary-action .button-icon {
  width: 18px;
  height: 18px;
  color: #c9e6ff;
}

/* 首页与二级页两侧信息栏统一等宽。 */
.overview-layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr) minmax(0, 1fr);
}

#flood .four-dimension-layout {
  grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr) minmax(0, 1fr);
}

@media (max-width: 1280px) {
  #flood .four-dimension-layout {
    grid-template-columns: minmax(220px, 1fr) minmax(460px, 2.2fr) minmax(220px, 1fr);
  }
}

/* 顶部系统区、专题返回区及 KPI 信息对齐。 */
.topbar {
  height: 112px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.brand-title {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: var(--type-display);
  font-weight: 400;
  line-height: 1;
}

#overview { padding-top: 28px; }

#overview .overview-layout {
  height: calc(100% - 142px);
}

.detail-header {
  height: 50px;
  margin-bottom: 16px;
  padding: 0 8px;
}

.detail-header strong {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: var(--type-page);
  font-weight: 400;
}

.back-button {
  height: 34px;
  padding: 0 10px;
  color: #cbd5e1;
  border: 0;
  border-radius: 8px;
  background: var(--surface-card);
  font-size: var(--type-meta);
}

.back-button:hover {
  color: #ffffff;
  border: 0;
  background: var(--surface-raised);
}

.kpi-card > small {
  grid-row: 2;
  align-self: end;
}

/* 首页地图作为主视觉直接铺满容器。 */
#overview .map-panel {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  padding: 0;
  overflow: hidden;
}

#overview .map-panel .panel-title { display: none; }

#overview .map-panel .map-stage {
  grid-row: 1;
  height: 100%;
  border-radius: 18px;
}

/* 以真实可用高度分配页面，避免标题、KPI 和内容区高度叠加后裁剪。 */
.dashboard-shell {
  display: grid;
  grid-template-rows: 112px minmax(0, 1fr);
  min-height: 0;
  padding: 18px;
  overflow: hidden;
  border-radius: 0;
  background: #0e0f14;
  box-shadow: none;
}

.page {
  grid-row: 2;
  height: 100% !important;
  min-height: 0;
}

#overview.is-active {
  display: grid;
  grid-template-rows: 102px minmax(0, 1fr);
  gap: 12px;
  padding-top: 28px;
}

#overview .overview-layout {
  height: auto;
  min-height: 0;
  margin-top: 0;
}

#flood.is-active {
  display: grid;
  grid-template-rows: 50px 102px minmax(0, 1fr);
  gap: 16px;
  padding-top: 12px;
}

#flood .detail-header {
  height: 50px;
  margin: 0;
}

#flood .four-dimension-layout {
  height: auto;
  min-height: 0;
  margin: 0;
}

/* AI 识别页沿用二级页的页头与内容区框架。 */
#ai.is-active {
  display: grid;
  grid-template-rows: 50px minmax(0, 1fr);
  gap: 16px;
  padding-top: 12px;
}

#ai .detail-header {
  height: 50px;
  margin: 0;
}

#ai .ai-layout {
  height: auto;
  min-height: 0;
  grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr);
  gap: 16px;
}

#ai .phone-panel,
#ai .ai-side,
#ai .ai-stat-list {
  min-height: 0;
}

#ai .ai-chat-panel {
  display: grid;
  grid-template-rows: 28px 44px minmax(0, 1fr);
  gap: 8px;
  padding: 12px;
}

#ai .ai-chat-panel .panel-title,
#ai .ai-title-panel .panel-title {
  height: 28px;
  margin: 0;
}

#ai .wechat-head {
  height: 44px;
}

#ai .chat-stream {
  min-height: 0;
  height: auto;
  gap: 8px;
  margin-top: 0;
  padding-top: 4px;
}

#ai .ai-side {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
}

#ai .ai-title-panel {
  margin: 0;
  padding: 12px;
}

#ai .flow-line span {
  min-width: 0;
  padding: 8px 6px;
  text-align: center;
  white-space: nowrap;
}

#ai .ai-stat-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  align-content: center;
  gap: 4px 10px;
}

#ai .ai-stat-card > span:first-of-type {
  grid-column: 1;
  grid-row: 1;
}

#ai .ai-stat-card > strong {
  grid-column: 1;
  grid-row: 2;
  margin: 0;
}

#ai .ai-stat-card > span:last-of-type,
#ai .ai-stat-card .capability-tags {
  grid-column: 2;
  grid-row: 1 / -1;
  align-self: center;
  max-width: 56%;
  margin: 0;
}

#ai .ai-stat-card > span:last-of-type {
  text-align: right;
  line-height: 1.45;
}

#ai .capability-tags {
  justify-content: flex-end;
}

#ai .ai-stat-list {
  grid-template-rows: repeat(5, minmax(0, 1fr));
}

.ai-fab:hover {
  background: #3488e2;
  box-shadow: 0 10px 22px rgba(40, 121, 209, 0.3);
}

.ai-fab .button-icon {
  width: 18px;
  height: 18px;
  color: #c9e6ff;
}

#overview .ai-fab {
  min-width: 132px;
  height: 40px;
  padding: 0 14px;
  color: #ffffff;
  font-size: var(--type-body);
  font-weight: 400;
  background: #2879d1;
  box-shadow: 0 8px 18px rgba(40, 121, 209, 0.24);
  animation: ai-fab-float 2.4s ease-in-out infinite;
}

@keyframes ai-fab-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

/* KPI 统一为图标、数据、状态三段式布局。 */
.kpi-card {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 2px 8px;
  align-items: center;
}

.kpi-card .stat-icon {
  position: static;
  grid-column: 1;
  grid-row: 1 / -1;
  width: 38px;
  height: 38px;
  margin: 0;
  padding: 8px;
  transform: none;
}

.kpi-card > span {
  grid-column: 2;
  grid-row: 1;
  margin: 0;
}

.kpi-card > strong {
  grid-column: 2;
  grid-row: 2;
  margin: 0;
}

.kpi-card > small {
  grid-column: 3;
  grid-row: 1 / -1;
  margin: 0;
  text-align: right;
}

/* 风险类型卡片沿用统计卡片的图标与数据关系，状态标签保留右上角。 */
.risk-card {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-left: 1px solid rgba(33, 134, 232, 0.7);
  border-radius: 12px;
  background: #262731;
}

.risk-card.alert { border-color: rgba(234, 107, 112, 0.8); }

.risk-card > .risk-category-icon {
  display: grid;
  grid-column: 1;
  grid-row: 1;
  width: 30px;
  height: 30px;
  place-items: center;
  color: #8ac7ff;
  border-radius: 8px;
  background: rgba(33, 134, 232, 0.16);
}

.risk-category-icon .risk-icon {
  width: 17px;
  height: 17px;
  color: currentColor;
}

.risk-card-copy {
  display: grid;
  grid-column: 2;
  min-width: 0;
  padding-right: 42px;
}

.risk-card-copy b {
  overflow: hidden;
  color: #ffffff;
  font-size: var(--type-meta);
  font-weight: 400;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.risk-card-copy strong {
  display: block;
  margin: 1px 0 0;
  color: #ffffff;
  font-size: var(--type-section);
  line-height: 1.1;
}

.risk-card .major-count {
  position: absolute;
  right: 10px;
  bottom: 26px;
  color: var(--red);
  font-size: var(--type-meta);
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
}

.risk-card.alert::after {
  position: absolute;
  inset: -1px;
  pointer-events: none;
  content: "";
  border: 1px solid rgba(255, 107, 107, 0.82);
  border-radius: inherit;
  box-shadow: 0 0 10px rgba(255, 107, 107, 0.4), 0 0 22px rgba(255, 107, 107, 0.2);
  animation: risk-alert-glow 1.8s ease-in-out infinite;
}

@keyframes risk-alert-glow {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 1; }
}

.map-risk-card-head .tag {
  padding: 2px 6px;
  border: 0;
  border-radius: 4px;
  box-shadow: none;
}

.popup-actions button {
  height: 34px;
  border: 0 !important;
  border-radius: 999px !important;
  background: #2468b4;
  box-shadow: none;
  font-size: var(--type-meta);
  font-weight: 400;
}

.popup-actions button:last-child { background: #2879d1; }

