:root {
  --page: #07100e;
  --panel: rgba(9, 20, 18, 0.91);
  --panel-strong: rgba(12, 30, 28, 0.96);
  --line: rgba(141, 207, 193, 0.28);
  --line-strong: rgba(185, 244, 228, 0.58);
  --text: #f1fbf6;
  --muted: #9bb8af;
  --teal: #2dd4bf;
  --amber: #f59e0b;
  --blue: #60a5fa;
  --rose: #fb7185;
  --soil: #b98a56;
  --shadow: rgba(0, 0, 0, 0.36);
}

.demo-badge { display: inline-block; vertical-align: middle; padding: 5px 7px; font-size: 11px; color: #051a18; background: #2dd4bf; border-radius: 4px; letter-spacing: 1px; }
.topbar { grid-template-columns: 190px minmax(0, 1fr) 300px !important; }
.about-dialog { width: min(980px, 92vw); max-height: 88vh; padding: 26px; color: #f1fbf6; background: #0b1c1a; border: 1px solid #3e7368; border-radius: 12px; overflow-y: auto; box-shadow: 0 20px 100px #0009; }
.about-dialog::backdrop { background: #020e0bd9; backdrop-filter: blur(6px); }
.about-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.about-dialog p { font-size: 14px; line-height: 1.8; color: #bcd5cd; }
.source-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin: 18px 0; }
.source-grid article { padding: 16px; border: 1px solid #2b4e46; background: #102923; border-radius: 8px; }
.source-grid strong,.source-grid span { display: block; }
.source-grid strong { color: #5eead4; margin-bottom: 6px; }
.source-grid span { font-size: 13px; line-height: 1.7; color: #bcd5cd; }
.source-note { margin: 14px 0 !important; }
.source-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.source-table td,.source-table th { border-bottom: 1px solid #2b4e46; padding: 10px; text-align: left; }
.source-table th { color: #5eead4; background: #123129; }
.source-table small { display: block; margin-top: 4px; color: #8cab9f; }
.about-dialog a,.warning-copy a { color: #6edccc; font-size: 12px; }

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  color: var(--text);
  background: var(--page);
  font-family: "Microsoft YaHei", "Segoe UI", sans-serif;
}

body {
  background:
    linear-gradient(120deg, rgba(45, 212, 191, 0.08), transparent 30%),
    linear-gradient(300deg, rgba(185, 138, 86, 0.14), transparent 42%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 32px),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.026) 0 1px, transparent 1px 32px),
    #07100e;
}

button {
  font: inherit;
}

.app-shell {
  width: 100vw;
  height: 100vh;
  display: grid;
  grid-template-rows: 72px 36px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 10px 30px;
}

.topbar,
.panel,
.map-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 14px 34px var(--shadow), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(10px);
}

.topbar {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr) 230px;
  align-items: center;
  gap: 16px;
  padding: 0 18px;
  background:
    linear-gradient(90deg, rgba(12, 35, 32, 0.98), rgba(11, 23, 22, 0.95)),
    var(--panel-strong);
}

.brand,
.top-actions,
.status-chip,
.map-tools,
.panel-head {
  display: flex;
  align-items: center;
}

.brand {
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border: 4px solid var(--teal);
  border-radius: 50%;
  box-shadow: 0 0 0 7px rgba(45, 212, 191, 0.12), 0 0 24px rgba(45, 212, 191, 0.4);
}

.brand span {
  display: block;
  color: var(--teal);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
}

.brand strong {
  display: block;
  margin-top: 3px;
  color: #f7fffc;
  font-size: 14px;
  letter-spacing: 0;
}

.title-block {
  min-width: 0;
  text-align: center;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 25px;
  line-height: 1.1;
  font-weight: 850;
  letter-spacing: 0;
}

.title-block p {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
}

.footer-credit,
.footer-clock {
  position: fixed;
  bottom: 7px;
  z-index: 12;
  color: rgba(223, 253, 244, 0.72);
  font-size: 12px;
  font-weight: 720;
  letter-spacing: 0;
  line-height: 1;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.85);
  white-space: nowrap;
  pointer-events: none;
}

.footer-credit {
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
}

.footer-clock {
  right: 16px;
  color: rgba(188, 230, 255, 0.78);
}

.situation-ticker {
  min-width: 0;
  min-height: 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  border: 1px solid rgba(141, 207, 193, 0.26);
  border-radius: 8px;
  background:
    linear-gradient(90deg, rgba(11, 31, 29, 0.96), rgba(7, 16, 14, 0.92)),
    var(--panel);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.situation-ticker-track {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  padding-left: 100%;
  animation: situation-scroll 96s linear infinite;
}

.situation-ticker:hover .situation-ticker-track {
  animation-play-state: paused;
}

.ticker-item,
.ticker-risk {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 6px;
  color: #eafff8;
  background: rgba(18, 43, 39, 0.84);
  font-size: 12px;
  font-weight: 820;
  white-space: nowrap;
}

.ticker-item.weather {
  color: #d8f7ff;
  background: rgba(14, 72, 91, 0.7);
}

.ticker-risk.green,
.risk-card.green {
  color: #082118;
  background: linear-gradient(135deg, #86efac, #22c55e);
}

.ticker-risk.yellow,
.risk-card.yellow {
  color: #211a04;
  background: linear-gradient(135deg, #fde68a, #facc15);
}

.ticker-risk.orange,
.risk-card.orange {
  color: #251006;
  background: linear-gradient(135deg, #fdba74, #fb923c);
}

.ticker-risk.red,
.risk-card.red {
  color: #fff5f5;
  background: linear-gradient(135deg, #fb7185, #dc2626);
}

@keyframes situation-scroll {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-100%);
  }
}

.top-actions {
  justify-content: flex-end;
  gap: 10px;
}

.status-chip {
  gap: 8px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid rgba(245, 158, 11, 0.36);
  border-radius: 999px;
  color: #ffeec0;
  background: rgba(245, 158, 11, 0.12);
  font-size: 13px;
  font-weight: 700;
}

.status-chip i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.12);
}

.status-chip i.ready {
  background: var(--teal);
  box-shadow: 0 0 0 5px rgba(45, 212, 191, 0.12), 0 0 16px rgba(45, 212, 191, 0.7);
}

.tool-button {
  height: 34px;
  padding: 0 13px;
  color: var(--text);
  background: rgba(20, 43, 40, 0.94);
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 750;
}

.tool-button:hover,
.tool-button.active {
  border-color: var(--line-strong);
  background: rgba(45, 212, 191, 0.16);
}

.workspace {
  min-height: 0;
  display: grid;
  grid-template-columns: 328px minmax(0, 1fr) 370px;
  gap: 10px;
}

.panel {
  min-height: 0;
  padding: 14px;
  overflow-y: auto;
}

.basin-panel {
  display: grid;
  grid-template-rows: auto auto auto minmax(165px, 1fr) auto;
  gap: 12px;
}

.detail-panel {
  display: grid;
  grid-template-rows: auto minmax(240px, 1.12fr) minmax(175px, 0.74fr) minmax(165px, 0.85fr);
  gap: 12px;
  overflow-y: auto;
}

.panel-head {
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 11px;
  border-bottom: 1px solid var(--line);
}

.panel-head span,
.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
}

.panel-head strong {
  color: #f7fffc;
  font-size: 14px;
}

.overview-button,
.basin-button {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}

.overview-button {
  height: 66px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(45, 212, 191, 0.18), rgba(185, 138, 86, 0.14)),
    rgba(11, 26, 24, 0.9);
}

.overview-button span,
.overview-button strong {
  display: block;
}

.overview-button span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.overview-button strong {
  margin-top: 5px;
  color: #ffffff;
  font-size: 18px;
}

.basin-buttons {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: start;
  gap: 6px;
  max-height: none;
  overflow: visible;
  padding-right: 0;
}

.basin-button {
  height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: 5px minmax(0, 1fr) auto;
  align-items: center;
  gap: 3px;
  padding: 7px 7px 6px;
  background: rgba(12, 27, 25, 0.82);
}

.basin-button.green {
  background: linear-gradient(160deg, rgba(34, 197, 94, 0.16), rgba(12, 27, 25, 0.82) 58%);
}

.basin-button.yellow {
  background: linear-gradient(160deg, rgba(250, 204, 21, 0.2), rgba(12, 27, 25, 0.82) 58%);
}

.basin-button.orange {
  background: linear-gradient(160deg, rgba(251, 146, 60, 0.22), rgba(12, 27, 25, 0.82) 58%);
}

.basin-button.red {
  background: linear-gradient(160deg, rgba(220, 38, 38, 0.3), rgba(12, 27, 25, 0.82) 58%);
}

.basin-button i {
  width: 100%;
  height: 5px;
  border-radius: 999px;
  background: var(--basin-color);
  box-shadow: 0 0 18px color-mix(in srgb, var(--basin-color), transparent 40%);
}

.basin-button span {
  min-width: 0;
  overflow: hidden;
  color: #f5fffb;
  font-size: 12px;
  font-weight: 780;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
}

.basin-button strong {
  color: var(--muted);
  font-size: 10px;
  text-align: center;
}

.overview-button.active,
.basin-button.active {
  border-color: rgba(255, 255, 255, 0.68);
  background: rgba(45, 212, 191, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12), 0 10px 24px rgba(0, 0, 0, 0.22);
}

.rain-module,
.chart-module,
.device-module,
.rain-id-module,
.risk-module,
.warning-module,
.left-info {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(96, 165, 250, 0.1), transparent 42%),
    rgba(12, 27, 25, 0.82);
}

.rain-module {
  padding: 12px;
}

.left-info {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
  overflow: auto;
}

.device-module,
.rain-id-module,
.risk-module,
.warning-module {
  padding: 12px;
}

.device-module {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  overflow: hidden;
}

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

.module-title span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.module-title strong {
  color: #ffffff;
  font-size: 14px;
}

.rain-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 11px;
}

.preset-button {
  height: 32px;
  border: 1px solid rgba(141, 207, 193, 0.3);
  border-radius: 7px;
  color: #dffdf4;
  background: rgba(11, 26, 24, 0.86);
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.preset-button:hover,
.preset-button.active {
  border-color: rgba(255, 255, 255, 0.62);
  color: #ffffff;
  background: rgba(96, 165, 250, 0.22);
}

.range-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 780;
}

.range-field strong {
  color: #ffffff;
  font-size: 13px;
  white-space: nowrap;
}

.rain-module input[type="range"] {
  width: 100%;
  height: 18px;
  margin: 6px 0 1px;
  accent-color: var(--blue);
  cursor: pointer;
}

.calculate-button {
  width: 100%;
  height: 38px;
  margin-top: 12px;
  border: 1px solid rgba(45, 212, 191, 0.72);
  border-radius: 7px;
  color: #06221d;
  background: linear-gradient(135deg, #7dd3fc, #2dd4bf 58%, #facc15);
  cursor: pointer;
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(45, 212, 191, 0.16);
}

.calculate-button:hover {
  filter: brightness(1.08);
}

.calculation-status {
  min-height: 34px;
  margin-top: 9px;
  color: #bfd7d0;
  font-size: 12px;
  line-height: 1.45;
}

.chart-module {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(112px, 1fr) auto auto;
  gap: 8px;
  padding: 12px;
  overflow: hidden;
}

#processChart {
  width: 100%;
  height: 100%;
  min-height: 112px;
  border: 1px solid rgba(141, 207, 193, 0.18);
  border-radius: 7px;
  background: rgba(6, 15, 14, 0.55);
}

.chart-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  min-height: 56px;
}

.timeline-control {
  display: grid;
  gap: 6px;
  padding: 8px 9px;
  border: 1px solid rgba(141, 207, 193, 0.16);
  border-radius: 7px;
  background: rgba(7, 16, 14, 0.36);
}

.timeline-control .range-field {
  margin: 0;
}

.timeline-control input[type="range"] {
  width: 100%;
  height: 18px;
  accent-color: var(--teal);
  cursor: pointer;
}

.chart-kpis div {
  min-width: 0;
  padding: 9px;
  border: 1px solid rgba(141, 207, 193, 0.18);
  border-radius: 7px;
  background: rgba(7, 16, 14, 0.42);
}

.chart-kpis span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chart-kpis strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  color: #ffffff;
  font-size: 14px;
  font-weight: 850;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rain-id-module {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(110px, 1fr) auto;
  gap: 8px;
  overflow: hidden;
}

#rainIdChart {
  width: 100%;
  height: 100%;
  min-height: 110px;
  border: 1px solid rgba(141, 207, 193, 0.18);
  border-radius: 7px;
  background: rgba(6, 15, 14, 0.55);
}

.rain-id-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
}

.rain-id-kpis div {
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(141, 207, 193, 0.16);
  border-radius: 7px;
  background: rgba(7, 16, 14, 0.42);
}

.rain-id-kpis span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 820;
}

.rain-id-kpis strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: #ffffff;
  font-size: 13px;
  font-weight: 860;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rain-id-risk-card.green strong {
  color: #86efac;
}

.rain-id-risk-card.yellow strong {
  color: #fde047;
}

.rain-id-risk-card.orange strong {
  color: #fdba74;
}

.rain-id-risk-card.red strong {
  color: #fb7185;
}

.risk-module {
  min-height: 126px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.risk-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.risk-card {
  min-width: 0;
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto;
  gap: 3px 5px;
  align-items: center;
  padding: 7px 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 7px;
  cursor: pointer;
  text-align: left;
}

.risk-card:hover,
.risk-card.active {
  border-color: rgba(185, 244, 228, 0.48);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.risk-card span,
.risk-card small {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.risk-card span {
  color: inherit;
  font-size: 12px;
  font-weight: 850;
}

.risk-card strong {
  justify-self: start;
  padding: 0;
  color: inherit;
  background: transparent;
  font-size: 11px;
  font-weight: 900;
}

.risk-card small {
  display: none;
  grid-column: 2;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.2;
}

.risk-card.green small,
.risk-card.yellow small,
.risk-card.orange small {
  color: rgba(7, 16, 14, 0.72);
}

.device-kpis {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.device-kpis div {
  min-width: 0;
  padding: 9px 8px;
  border: 1px solid rgba(141, 207, 193, 0.18);
  border-radius: 7px;
  background: rgba(7, 16, 14, 0.42);
}

.device-kpis span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.device-kpis strong {
  display: block;
  margin-top: 3px;
  color: #ffffff;
  font-size: 18px;
  line-height: 1.15;
}

.device-list {
  display: grid;
  grid-template-rows: auto auto;
  align-content: start;
  gap: 8px;
  max-height: none;
  margin-top: 10px;
  overflow: auto;
}

.basin-panel .device-list {
  max-height: none;
  min-height: 0;
}

.device-group {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 6px;
  padding: 8px;
  border: 1px solid rgba(141, 207, 193, 0.16);
  border-radius: 7px;
  background: rgba(7, 16, 14, 0.34);
  overflow: hidden;
}

.device-group summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  color: #effff9;
  font-size: 12px;
  font-weight: 860;
  cursor: pointer;
  list-style: none;
}

.device-group summary::-webkit-details-marker {
  display: none;
}

.device-group summary small {
  color: var(--muted);
  font-size: 11px;
}

.device-group summary::after {
  content: "展开";
  margin-left: 6px;
  padding: 2px 5px;
  border-radius: 999px;
  color: #07100e;
  background: rgba(209, 213, 219, 0.86);
  font-size: 10px;
  font-weight: 900;
}

.device-group[open] summary::after {
  content: "收起";
  color: #05211d;
  background: rgba(45, 212, 191, 0.82);
}

.device-group:not([open]) {
  grid-template-rows: auto;
}

.device-group:not([open]) .device-chip-grid {
  display: none;
}

.device-chip-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-content: start;
  gap: 6px;
  overflow: hidden;
}

.device-chip {
  min-width: 0;
  min-height: 34px;
  padding: 5px 6px;
  border: 1px solid rgba(141, 207, 193, 0.16);
  border-radius: 6px;
  color: #f4fffb;
  background: rgba(12, 27, 25, 0.72);
  cursor: pointer;
  text-align: left;
}

.device-chip:hover {
  border-color: rgba(45, 212, 191, 0.58);
  background: rgba(45, 212, 191, 0.12);
}

.device-chip strong,
.device-chip span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-chip strong {
  font-size: 11px;
  font-weight: 820;
}

.device-chip span {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.device-group.online {
  border-color: rgba(45, 212, 191, 0.28);
}

.device-group.offline {
  border-color: rgba(245, 158, 11, 0.28);
}

.device-chip.online strong {
  color: #d9fff5;
}

.device-chip.offline strong {
  color: #ffd2a6;
}

.device-empty {
  grid-column: 1 / -1;
  padding: 7px;
  border: 1px dashed rgba(141, 207, 193, 0.18);
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.device-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 8px 9px;
  border: 1px solid rgba(141, 207, 193, 0.16);
  border-radius: 7px;
  background: rgba(7, 16, 14, 0.36);
}

.device-row span {
  min-width: 0;
  overflow: hidden;
  color: #f4fffb;
  font-size: 13px;
  font-weight: 760;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-row small {
  color: var(--muted);
  font-size: 12px;
}

.device-row strong {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #d9fff5;
  font-size: 12px;
  white-space: nowrap;
}

.device-row strong::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 12px rgba(45, 212, 191, 0.78);
  content: "";
}

.device-row.offline strong {
  color: #ffd2a6;
}

.device-row.offline strong::before {
  background: var(--amber);
  box-shadow: 0 0 10px rgba(245, 158, 11, 0.62);
}

.warning-module {
  min-height: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 8px;
  overflow: hidden;
}

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

.warning-count {
  min-width: 0;
  padding: 7px 6px;
  border: 1px solid rgba(141, 207, 193, 0.16);
  border-radius: 7px;
  background: rgba(7, 16, 14, 0.42);
}

.warning-count span,
.warning-count strong {
  display: block;
  text-align: center;
}

.warning-count span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.warning-count strong {
  margin-top: 3px;
  color: #ffffff;
  font-size: 19px;
  line-height: 1;
}

.warning-count.blue strong {
  color: #93c5fd;
}

.warning-count.yellow strong {
  color: #fde047;
}

.warning-count.orange strong {
  color: #fdba74;
}

.warning-count.red strong {
  color: #fda4af;
}

.warning-list {
  min-height: 0;
  height: 100%;
  overflow-y: auto;
  border: 1px solid rgba(141, 207, 193, 0.16);
  border-radius: 7px;
  background: rgba(7, 16, 14, 0.36);
}

.warning-track {
  display: grid;
  gap: 7px;
  padding: 8px;
  animation: none;
}

.warning-list:hover .warning-track {
  animation-play-state: paused;
}

.warning-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px 10px;
  align-items: start;
  padding: 8px;
  border-radius: 6px;
  background: rgba(12, 27, 25, 0.82);
}

.warning-level {
  min-width: 34px;
  padding: 4px 6px;
  border-radius: 6px;
  color: #07100e;
  background: #facc15;
  text-align: center;
  font-size: 12px;
  font-weight: 900;
}

.warning-level.blue {
  background: #60a5fa;
}

.warning-level.yellow {
  background: #facc15;
}

.warning-level.orange {
  background: #fb923c;
}

.warning-level.red {
  background: #fb7185;
}

.warning-copy {
  min-width: 0;
}

.warning-copy strong {
  display: block;
  overflow: hidden;
  color: #ffffff;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.warning-copy span {
  display: block;
  margin-top: 3px;
  color: #b8d2ca;
  font-size: 12px;
  line-height: 1.35;
}

@keyframes warning-roll {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-50%);
  }
}

.map-panel {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr);
  overflow: hidden;
}

body[data-view="overview"] .map-panel {
  grid-template-rows: 58px minmax(0, 1fr);
}

.map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 0 15px;
  border-bottom: 1px solid var(--line);
}

.map-toolbar strong {
  display: block;
  margin-top: 4px;
  color: #ffffff;
  font-size: 17px;
}

.map-tools {
  gap: 8px;
}

.map-frame {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: #08110f;
}

#cesiumContainer {
  position: absolute;
  inset: 0;
}

.map-hud,
.map-scale {
  position: absolute;
  z-index: 5;
  display: none;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(7, 16, 14, 0.78);
  backdrop-filter: blur(8px);
}

.map-hud {
  left: 16px;
  bottom: 16px;
  gap: 12px;
  min-width: 230px;
  padding: 11px 13px;
}

.map-hud span {
  color: var(--teal);
  font-size: 12px;
  font-weight: 850;
}

.map-hud strong {
  color: #ffffff;
  font-size: 18px;
}

.map-scale {
  display: flex !important;
  flex-direction: column;
  align-items: flex-start;
  left: 8px;
  right: auto;
  bottom: 8px;
  max-width: calc(100% - 16px);
  gap: 2px;
  padding: 5px 7px;
  pointer-events: none;
}

.map-scale span {
  padding: 0;
  border-radius: 6px;
  color: #dffdf4;
  background: transparent;
  font-size: 10px;
  font-weight: 400;
}

.camera-distance {
  position: absolute;
  right: 16px;
  top: 78px;
  z-index: 6;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 9px 8px;
  border: 1px solid rgba(185, 244, 228, 0.34);
  border-radius: 8px;
  background: rgba(5, 14, 13, 0.74);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(8px);
}

.camera-zoom-button {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(185, 244, 228, 0.36);
  border-radius: 6px;
  color: #effff9;
  background: rgba(16, 47, 43, 0.9);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.camera-zoom-button:hover {
  border-color: rgba(45, 212, 191, 0.82);
  background: rgba(20, 81, 72, 0.95);
}

.camera-distance-slider {
  width: 28px;
  height: 132px;
  accent-color: var(--teal);
  writing-mode: vertical-rl;
  direction: rtl;
}

.camera-distance output {
  min-width: 48px;
  padding: 4px 6px;
  border-radius: 6px;
  color: #dffdf4;
  background: rgba(45, 212, 191, 0.12);
  font-size: 11px;
  font-weight: 850;
  text-align: center;
}

.water-legend {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 6;
  width: auto;
  min-width: 148px;
  display: grid;
  gap: 6px;
  padding: 9px 10px;
  border: 1px solid rgba(185, 244, 228, 0.34);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(4, 18, 23, 0.72), rgba(5, 14, 13, 0.54));
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.24);
  backdrop-filter: blur(8px);
}

.water-legend[hidden] {
  display: none;
}

.water-legend strong {
  color: #ffffff;
  font-size: 13px;
}

.water-legend span {
  display: grid;
  grid-template-columns: 22px max-content;
  align-items: center;
  gap: 7px;
  color: #d5ebe5;
  font-size: 12px;
  font-weight: 760;
}

.water-legend i {
  width: 22px;
  height: 9px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  box-shadow: 0 0 8px rgba(34, 211, 238, 0.24);
}

.depth-0 {
  background: #c7f9ff;
}

.depth-1 {
  background: #00e5ff;
}

.depth-2 {
  background: #0078ff;
}

.depth-3 {
  background: #5b21ff;
}

.selected-summary {
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.selected-summary h2 {
  color: #ffffff;
  font-size: 16px;
  line-height: 1.2;
}

.selected-summary p {
  margin-top: 7px;
  color: #b8d2ca;
  font-size: 12px;
  line-height: 1.55;
}

.stats-list {
  min-height: 0;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 8px 10px;
  margin: 0;
  padding: 10px 0 0;
  border: 1px solid var(--line);
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
  border-radius: 8px;
  background: transparent;
  overflow: auto;
}

.stats-list dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.stats-list dd {
  min-width: 0;
  margin: 0;
  color: #f5fffb;
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.loading {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-content: center;
  gap: 10px;
  color: #ffffff;
  text-align: center;
  background: rgba(7, 16, 14, 0.92);
}

.loading strong {
  font-size: 22px;
}

.loading span {
  color: var(--muted);
  font-size: 13px;
}

.loading.hidden {
  display: none;
}

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

  .app-shell {
    min-height: 100vh;
    height: auto;
    grid-template-rows: auto auto;
  }

  .topbar {
    grid-template-columns: 1fr !important;
    min-height: 160px;
    padding: 14px;
    text-align: left;
  }

  .title-block {
    text-align: left;
  }

  .top-actions {
    justify-content: flex-start;
  }

  .workspace {
    grid-template-columns: 1fr;
  }

  .basin-panel,
  .detail-panel {
    grid-template-rows: auto;
  }

  .map-panel {
    height: 64vh;
    min-height: 520px;
  }

  .chart-module {
    min-height: 300px;
  }

  .basin-buttons {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .basin-buttons {
    grid-template-columns: 1fr;
  }

  .map-tools,
  .map-scale {
    display: none;
  }

  .map-hud {
    left: 10px;
    right: 10px;
    bottom: 10px;
  }
}
