:root {
  --bg: #050a18;
  --panel: rgba(7, 20, 43, .86);
  --panel-deep: rgba(4, 13, 31, .94);
  --line: rgba(59, 211, 255, .26);
  --line-bright: rgba(78, 223, 255, .76);
  --cyan: #36cfff;
  --cyan-soft: #a6efff;
  --blue: #4887ff;
  --red: #ff4d5b;
  --red-deep: #ff2647;
  --amber: #ffc24b;
  --green: #45e5a4;
  --text: #e7f8ff;
  --muted: #7898b8;
  --shadow: 0 16px 45px rgba(0, 0, 0, .38);
  color-scheme: dark;
  font-family: "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
}

button,
input { font: inherit; }

button { color: inherit; }

.screen-shell {
  position: relative;
  display: grid;
  grid-template-rows: 82px 28px minmax(0, 1fr) 28px;
  width: 100vw;
  height: 100vh;
  min-width: 1180px;
  min-height: 680px;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 42%, rgba(27, 92, 147, .22), transparent 39%),
    linear-gradient(rgba(25, 96, 145, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(25, 96, 145, .035) 1px, transparent 1px),
    linear-gradient(160deg, #060e20 0%, #040916 48%, #071226 100%);
  background-size: auto, 42px 42px, 42px 42px, auto;
}

.screen-shell::before,
.screen-shell::after {
  content: "";
  position: absolute;
  z-index: 1;
  pointer-events: none;
}

.screen-shell::before {
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, .18), transparent 18%, transparent 82%, rgba(0, 0, 0, .18));
}

.screen-shell::after {
  inset: 2px;
  border: 1px solid rgba(54, 207, 255, .12);
  clip-path: polygon(0 0, 16% 0, 17% 2px, 83% 2px, 84% 0, 100% 0, 100% 100%, 0 100%);
}

.ambient {
  position: absolute;
  z-index: 0;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  filter: blur(100px);
  opacity: .14;
  pointer-events: none;
}

.ambient-a { left: -220px; top: 18%; background: #0a88d8; }
.ambient-b { right: -260px; bottom: 0; background: #173aef; }

.scanline {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: -12%;
  height: 110px;
  pointer-events: none;
  opacity: .13;
  background: linear-gradient(180deg, transparent, rgba(54, 207, 255, .24), transparent);
  animation: screen-scan 9s linear infinite;
}

@keyframes screen-scan { to { transform: translateY(112vh); } }

.screen-header {
  position: relative;
  z-index: 10;
  display: grid;
  grid-template-columns: 1fr minmax(640px, 1.5fr) 1fr;
  align-items: center;
  padding: 0 26px;
  background:
    linear-gradient(180deg, rgba(8, 31, 60, .94), rgba(4, 13, 29, .72)),
    linear-gradient(90deg, transparent, rgba(54, 207, 255, .08), transparent);
  border-bottom: 1px solid rgba(54, 207, 255, .36);
  box-shadow: 0 8px 30px rgba(0, 0, 0, .26), inset 0 -1px rgba(54, 207, 255, .16);
}

.screen-header::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  width: 48%;
  height: 8px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  clip-path: polygon(0 43%, 47% 43%, 49% 0, 51% 0, 53% 43%, 100% 43%, 100% 57%, 0 57%);
  opacity: .76;
  filter: drop-shadow(0 0 6px var(--cyan));
}

.header-side {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #85a9c8;
  font-size: 12px;
  letter-spacing: 1px;
}

.header-side strong {
  padding: 2px 6px;
  color: var(--green);
  font-size: 9px;
  border: 1px solid rgba(69, 229, 164, .34);
  background: rgba(69, 229, 164, .06);
}

.system-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}

.system-dot::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px solid var(--green);
  border-radius: 50%;
  animation: system-pulse 1.8s ease-out infinite;
}

@keyframes system-pulse {
  0% { opacity: .8; transform: scale(.45); }
  100% { opacity: 0; transform: scale(1.4); }
}

.header-right { justify-content: flex-end; }

.title-block {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  min-width: 0;
  text-align: center;
}

.title-block h1 {
  margin: 0;
  white-space: nowrap;
  color: #f1fbff;
  font-size: clamp(22px, 1.55vw, 31px);
  font-weight: 700;
  letter-spacing: 3px;
  text-shadow: 0 0 18px rgba(54, 207, 255, .3), 0 2px 5px rgba(0, 0, 0, .8);
}

.title-block h1 span { color: #8de7ff; }

.title-block p {
  margin: 5px 0 0;
  color: #5884a9;
  font-size: 9px;
  letter-spacing: 5px;
}

.title-wing {
  width: 68px;
  height: 18px;
  opacity: .68;
  background: linear-gradient(90deg, transparent, rgba(54, 207, 255, .8));
  clip-path: polygon(0 45%, 72% 45%, 86% 0, 100% 0, 84% 55%, 55% 55%, 42% 100%, 28% 100%, 42% 55%, 0 55%);
}

.title-wing-right { transform: scaleX(-1); }

.clock-box { text-align: right; font-variant-numeric: tabular-nums; }
.clock-box strong { display: block; padding: 0; border: 0; background: none; color: var(--cyan-soft); font-size: 19px; letter-spacing: 2px; }
.clock-box span { color: #668cac; font-size: 10px; letter-spacing: 1px; }

.signal-strip {
  position: relative;
  z-index: 8;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  background: rgba(5, 15, 32, .78);
  border-bottom: 1px solid rgba(54, 207, 255, .1);
}

.signal-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #6487a7;
  font-size: 10px;
  letter-spacing: 1px;
}

.signal-chip i {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 6px var(--cyan);
}

.signal-line { width: 90px; height: 1px; background: linear-gradient(90deg, transparent, rgba(54, 207, 255, .2), transparent); overflow: hidden; }
.signal-line span { display: block; width: 28px; height: 1px; background: var(--cyan); animation: signal-run 2.6s linear infinite; }
@keyframes signal-run { from { transform: translateX(-28px); } to { transform: translateX(96px); } }

.dashboard-grid {
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: minmax(280px, 19%) minmax(540px, 1fr) minmax(300px, 20%);
  gap: 10px;
  min-height: 0;
  padding: 9px 13px 8px;
}

.side-column {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
  min-height: 0;
}

.tech-panel {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(54, 207, 255, .045), transparent 28%),
    linear-gradient(180deg, rgba(9, 27, 55, .92), rgba(5, 15, 33, .88));
  box-shadow: var(--shadow), inset 0 0 28px rgba(32, 130, 186, .05);
  clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 14px, 100% 100%, 14px 100%, 0 calc(100% - 14px));
}

.tech-panel::before,
.tech-panel::after {
  content: "";
  position: absolute;
  z-index: 2;
  pointer-events: none;
}

.tech-panel::before {
  inset: 0;
  background:
    linear-gradient(90deg, var(--cyan), transparent 72px) top left / 92px 1px no-repeat,
    linear-gradient(180deg, var(--cyan), transparent 65px) top left / 1px 88px no-repeat,
    linear-gradient(270deg, rgba(54, 207, 255, .65), transparent 60px) bottom right / 82px 1px no-repeat;
  opacity: .7;
}

.tech-panel::after {
  top: 42px;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(54, 207, 255, .22), transparent);
}

.panel-title {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 43px;
  padding: 0 13px;
  background: linear-gradient(90deg, rgba(54, 207, 255, .08), transparent 72%);
}

.panel-title > div { display: flex; align-items: center; gap: 8px; }
.panel-title strong { font-size: 13px; font-weight: 650; letter-spacing: 1px; }
.panel-title em { color: #446f92; font-size: 9px; font-style: normal; letter-spacing: 1.4px; }
.panel-index { color: var(--cyan); font-size: 9px; font-family: ui-monospace, monospace; }

.overview-panel { flex: 0 0 188px; }
.level-panel { flex: 0 0 245px; }
.town-panel { flex: 1 1 auto; }
.zone-panel { flex: 0 0 215px; }
.list-panel { display: flex; flex: 1 1 auto; flex-direction: column; }

.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 11px 12px 12px;
}

.kpi-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  height: 57px;
  padding: 7px 8px;
  border: 1px solid rgba(107, 196, 230, .13);
  background: linear-gradient(110deg, rgba(11, 42, 72, .62), rgba(6, 20, 40, .38));
  overflow: hidden;
}

.kpi-card::after {
  content: "";
  position: absolute;
  right: -12px;
  bottom: -18px;
  width: 48px;
  height: 48px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: .09;
}

.kpi-card.danger { color: var(--red); }
.kpi-card.warning { color: var(--amber); }
.kpi-card.cyan { color: var(--cyan); }
.kpi-card.blue { color: #779aff; }

.kpi-icon {
  display: grid;
  flex: 0 0 31px;
  width: 31px;
  height: 31px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  background: color-mix(in srgb, currentColor 10%, transparent);
  box-shadow: 0 0 14px color-mix(in srgb, currentColor 16%, transparent);
  font-size: 16px;
}

.pulse-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; animation: kpi-pulse 1.6s ease-in-out infinite; }
@keyframes kpi-pulse { 50% { transform: scale(1.45); opacity: .5; } }

.kpi-card strong { color: #effcff; font-size: 22px; line-height: 1; font-family: Bahnschrift, "DIN Alternate", ui-monospace, monospace; font-weight: 600; }
.kpi-card small { margin-left: 3px; color: #6387a7; font-size: 9px; }
.kpi-card p { margin: 4px 0 0; color: #6f91ae; font-size: 10px; white-space: nowrap; }

.chart-wrap { position: relative; height: 144px; }
.chart { width: 100%; height: 100%; }
.donut-wrap { margin-top: 2px; }
.donut-core { position: absolute; left: 50%; top: 50%; display: flex; flex-direction: column; align-items: center; transform: translate(-50%, -50%); pointer-events: none; }
.donut-core strong { color: #effcff; font-size: 24px; font-family: Bahnschrift, ui-monospace, monospace; line-height: 1; text-shadow: 0 0 10px rgba(54, 207, 255, .4); }
.donut-core span { margin-top: 4px; color: #668aaa; font-size: 9px; }

.mini-legend {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 0 12px 11px;
}

.mini-legend > div {
  display: flex;
  align-items: center;
  gap: 5px;
  color: #7294b0;
  font-size: 9px;
}

.mini-legend i { width: 6px; height: 6px; border-radius: 50%; box-shadow: 0 0 6px currentColor; }
.mini-legend b { margin-left: auto; color: #dff8ff; font-family: ui-monospace, monospace; font-size: 11px; }
.town-chart { min-height: 150px; padding: 4px 2px 3px; }

.map-column { min-width: 0; min-height: 0; }

.map-frame {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border: 1px solid rgba(54, 207, 255, .36);
  background: #050d1f;
  box-shadow: 0 0 35px rgba(16, 87, 129, .17), inset 0 0 35px rgba(54, 207, 255, .06);
  clip-path: polygon(15px 0, calc(100% - 15px) 0, 100% 15px, 100% calc(100% - 15px), calc(100% - 15px) 100%, 15px 100%, 0 calc(100% - 15px), 0 15px);
}

.map-frame::after {
  content: "";
  position: absolute;
  z-index: 580;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 52px rgba(4, 12, 28, .72), inset 0 0 4px rgba(54, 207, 255, .25);
}

#map { width: 100%; height: 100%; background: #061226; }
#map .leaflet-tile-pane { filter: saturate(.68) brightness(.74) contrast(1.08) hue-rotate(2deg); }
#map .leaflet-control-attribution { color: #54738e; background: rgba(3, 10, 22, .72); font-size: 8px; }
#map .leaflet-control-attribution a { color: #6faecc; }
#map .leaflet-control-zoom { margin: 0 12px 54px 0; border: 1px solid rgba(54, 207, 255, .28); box-shadow: none; }
#map .leaflet-control-zoom a { width: 28px; height: 28px; line-height: 27px; color: #9ae9ff; background: rgba(5, 18, 39, .88); border-color: rgba(54, 207, 255, .16); }
#map .leaflet-control-zoom a:hover { background: rgba(22, 82, 116, .92); }

.map-corner {
  position: absolute;
  z-index: 800;
  width: 32px;
  height: 32px;
  pointer-events: none;
  border-color: var(--cyan);
  filter: drop-shadow(0 0 5px rgba(54, 207, 255, .65));
}

.corner-tl { left: 6px; top: 6px; border-left: 2px solid; border-top: 2px solid; }
.corner-tr { right: 6px; top: 6px; border-right: 2px solid; border-top: 2px solid; }
.corner-bl { left: 6px; bottom: 6px; border-left: 2px solid; border-bottom: 2px solid; }
.corner-br { right: 6px; bottom: 6px; border-right: 2px solid; border-bottom: 2px solid; }

.map-toolbar {
  position: absolute;
  z-index: 900;
  top: 16px;
  right: 16px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(54, 207, 255, .26);
  background: rgba(4, 15, 33, .88);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
  backdrop-filter: blur(10px);
}

.tool-button {
  min-width: 44px;
  height: 27px;
  padding: 0 9px;
  cursor: pointer;
  color: #769ab7;
  font-size: 10px;
  border: 0;
  background: transparent;
  transition: color .2s, background .2s, box-shadow .2s;
}

.tool-button:hover,
.tool-button.active { color: #e4fbff; background: rgba(54, 207, 255, .15); box-shadow: inset 0 -1px var(--cyan); }
.tool-divider { width: 1px; height: 16px; background: rgba(54, 207, 255, .2); }
.icon-button { min-width: 28px; width: 28px; padding: 0; font-size: 15px; }

.layer-switches {
  position: absolute;
  z-index: 900;
  top: 59px;
  right: 16px;
  display: flex;
  gap: 4px;
}

.layer-switches label {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 25px;
  padding: 0 8px;
  cursor: pointer;
  color: #6f91ac;
  font-size: 9px;
  border: 1px solid rgba(54, 207, 255, .18);
  background: rgba(4, 15, 33, .82);
  backdrop-filter: blur(8px);
}

.layer-switches input { position: absolute; opacity: 0; pointer-events: none; }
.layer-switches label > span { position: relative; width: 16px; height: 8px; border-radius: 8px; background: #263f55; transition: .2s; }
.layer-switches label > span::after { content: ""; position: absolute; left: 1px; top: 1px; width: 6px; height: 6px; border-radius: 50%; background: #7592a9; transition: .2s; }
.layer-switches input:checked + span { background: rgba(54, 207, 255, .35); box-shadow: 0 0 7px rgba(54, 207, 255, .28); }
.layer-switches input:checked + span::after { transform: translateX(8px); background: var(--cyan); box-shadow: 0 0 5px var(--cyan); }

.map-badge {
  position: absolute;
  z-index: 900;
  top: 17px;
  left: 17px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border-left: 2px solid var(--cyan);
  background: linear-gradient(90deg, rgba(4, 19, 42, .92), rgba(4, 19, 42, .58));
  box-shadow: 0 8px 22px rgba(0, 0, 0, .24);
  backdrop-filter: blur(8px);
}

.map-badge strong { display: block; color: #dffaff; font-size: 11px; letter-spacing: 1px; }
.map-badge small { display: block; margin-top: 2px; color: #557c9c; font-size: 8px; }
.radar-icon { position: relative; display: block; width: 25px; height: 25px; border: 1px solid rgba(54, 207, 255, .45); border-radius: 50%; }
.radar-icon::before,
.radar-icon::after { content: ""; position: absolute; background: rgba(54, 207, 255, .38); }
.radar-icon::before { left: 50%; top: 2px; bottom: 2px; width: 1px; }
.radar-icon::after { top: 50%; left: 2px; right: 2px; height: 1px; }
.radar-icon i { position: absolute; left: 50%; top: 50%; width: 50%; height: 1px; transform-origin: left center; background: var(--cyan); box-shadow: 0 0 5px var(--cyan); animation: radar-spin 2.5s linear infinite; }
@keyframes radar-spin { to { transform: rotate(360deg); } }

.map-legend {
  position: absolute;
  z-index: 900;
  left: 17px;
  bottom: 43px;
  width: 174px;
  padding: 10px 11px 9px;
  border: 1px solid rgba(54, 207, 255, .22);
  background: linear-gradient(145deg, rgba(5, 20, 43, .92), rgba(4, 13, 29, .88));
  box-shadow: 0 10px 28px rgba(0, 0, 0, .3), inset 0 0 18px rgba(54, 207, 255, .035);
  backdrop-filter: blur(10px);
}

.legend-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid rgba(54, 207, 255, .12); }
.legend-head span { color: #d8f7ff; font-size: 10px; font-weight: 600; }
.legend-head em { color: #456c8b; font-size: 8px; font-style: normal; letter-spacing: 1px; }
.legend-row { display: grid; grid-template-columns: 18px 1fr auto; align-items: center; gap: 4px; height: 20px; color: #7899b5; font-size: 9px; }
.legend-row b { color: #cceef7; font-family: ui-monospace, monospace; font-size: 10px; }
.ring-swatch { position: relative; display: block; width: 8px; height: 8px; margin-left: 3px; border-radius: 50%; background: currentColor; box-shadow: 0 0 6px currentColor; }
.ring-swatch::after { content: ""; position: absolute; inset: -4px; border: 1px solid currentColor; border-radius: 50%; opacity: .62; }
.ring-swatch.extreme,
.ring-swatch.high { color: #ff4d5b; }
.ring-swatch.medium { color: #ffc24b; }
.legend-divider { height: 1px; margin: 6px 0 7px; background: linear-gradient(90deg, transparent, rgba(54, 207, 255, .18), transparent); }
.zone-scale { display: grid; grid-template-columns: repeat(4, 1fr); height: 7px; overflow: hidden; }
.zone-scale i { background: var(--zone); box-shadow: inset 0 0 5px rgba(255, 255, 255, .28); }
.zone-labels { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 4px; color: #6687a3; font-size: 7px; text-align: center; }

.map-status {
  position: absolute;
  z-index: 900;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  gap: 7px;
  height: 29px;
  padding: 0 14px;
  background: linear-gradient(90deg, rgba(3, 12, 28, .94), rgba(6, 23, 45, .82), rgba(3, 12, 28, .94));
  border-top: 1px solid rgba(54, 207, 255, .17);
  backdrop-filter: blur(8px);
}

.map-status > span { width: 5px; height: 5px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 7px var(--amber); }
.map-status > span.ready { background: var(--green); box-shadow: 0 0 7px var(--green); }
.map-status strong { color: #688ba7; font-size: 8px; font-weight: 400; letter-spacing: .3px; }
.map-status em { margin-left: auto; color: #6486a3; font-family: ui-monospace, monospace; font-size: 8px; font-style: normal; }

.loading-screen {
  position: absolute;
  z-index: 1300;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--cyan);
  background: radial-gradient(circle, rgba(12, 54, 85, .92), rgba(3, 10, 24, .98) 58%);
  transition: opacity .5s ease, visibility .5s ease;
}

.loading-screen.done { opacity: 0; visibility: hidden; }
.loading-screen strong { margin-top: 20px; color: #d9f8ff; font-size: 12px; letter-spacing: 2px; }
.loading-screen > span { margin-top: 6px; color: #4d7898; font-size: 8px; letter-spacing: 2px; }
.loader-radar { position: relative; width: 70px; height: 70px; border: 1px solid rgba(54, 207, 255, .38); border-radius: 50%; }
.loader-radar::before { content: ""; position: absolute; inset: 13px; border: 1px solid rgba(54, 207, 255, .24); border-radius: 50%; }
.loader-radar::after { content: ""; position: absolute; left: 50%; top: 50%; width: 48%; height: 2px; transform-origin: left center; background: linear-gradient(90deg, var(--cyan), transparent); animation: radar-spin 1.6s linear infinite; }
.loader-radar i { position: absolute; width: 4px; height: 4px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 7px var(--cyan); }
.loader-radar i:nth-child(1) { left: 18px; top: 19px; }
.loader-radar i:nth-child(2) { right: 15px; top: 31px; }
.loader-radar i:nth-child(3) { left: 34px; bottom: 10px; }

.zone-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 11px 12px; }
.zone-item { position: relative; height: 67px; padding: 9px 9px 7px 12px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--zone-color) 36%, transparent); background: linear-gradient(115deg, color-mix(in srgb, var(--zone-color) 12%, transparent), rgba(4, 14, 31, .3)); }
.zone-item::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--zone-color); box-shadow: 0 0 8px var(--zone-color); }
.zone-item span { display: block; color: #7697b2; font-size: 9px; }
.zone-item strong { display: inline-block; margin-top: 4px; color: #effcff; font-size: 21px; font-family: Bahnschrift, ui-monospace, monospace; font-weight: 500; }
.zone-item small { margin-left: 3px; color: #547590; font-size: 8px; }
.zone-item i { position: absolute; right: 9px; bottom: 9px; width: 22px; height: 15px; border: 1px solid var(--zone-color); opacity: .55; transform: skewX(-17deg); box-shadow: inset 0 0 8px color-mix(in srgb, var(--zone-color) 22%, transparent); }

.list-tools { position: relative; z-index: 3; padding: 10px 11px 8px; }
.filter-tabs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.filter-tabs button { height: 25px; cursor: pointer; color: #6687a2; font-size: 9px; border: 1px solid rgba(54, 207, 255, .13); background: rgba(8, 27, 50, .48); transition: .2s; }
.filter-tabs button:hover,
.filter-tabs button.active { color: #e5fbff; border-color: rgba(54, 207, 255, .43); background: rgba(54, 207, 255, .12); box-shadow: inset 0 -1px var(--cyan), 0 0 10px rgba(54, 207, 255, .07); }
.search-box { display: flex; align-items: center; gap: 7px; height: 29px; margin-top: 7px; padding: 0 9px; border: 1px solid rgba(54, 207, 255, .15); background: rgba(4, 14, 31, .66); }
.search-box span { color: var(--cyan); font-size: 14px; }
.search-box input { width: 100%; min-width: 0; color: #caedf6; font-size: 9px; outline: none; border: 0; background: transparent; }
.search-box input::placeholder { color: #4d6d88; }

.hazard-list {
  position: relative;
  z-index: 3;
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 0 9px 10px 11px;
  scrollbar-color: rgba(54, 207, 255, .42) rgba(5, 17, 35, .4);
  scrollbar-width: thin;
}

.hazard-list::-webkit-scrollbar { width: 4px; }
.hazard-list::-webkit-scrollbar-track { background: rgba(5, 17, 35, .4); }
.hazard-list::-webkit-scrollbar-thumb { background: rgba(54, 207, 255, .42); }

.hazard-item {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  align-items: center;
  gap: 7px;
  min-height: 46px;
  margin-bottom: 5px;
  padding: 5px 8px;
  cursor: pointer;
  border: 1px solid rgba(54, 207, 255, .11);
  background: linear-gradient(90deg, rgba(10, 36, 62, .55), rgba(6, 19, 39, .36));
  transition: border-color .18s, background .18s, transform .18s;
}

.hazard-item::before { content: ""; position: absolute; left: -1px; top: 8px; bottom: 8px; width: 2px; background: var(--item-color); box-shadow: 0 0 7px var(--item-color); opacity: .75; }
.hazard-item:hover,
.hazard-item.active { transform: translateX(2px); border-color: color-mix(in srgb, var(--item-color) 50%, transparent); background: linear-gradient(90deg, color-mix(in srgb, var(--item-color) 12%, transparent), rgba(6, 19, 39, .58)); }
.hazard-item .item-marker { position: relative; width: 18px; height: 18px; }
.hazard-item .item-marker::before { content: ""; position: absolute; left: 50%; top: 50%; width: 7px; height: 7px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--item-color); box-shadow: 0 0 7px var(--item-color); }
.hazard-item .item-marker::after { content: ""; position: absolute; inset: 2px; border: 1px solid var(--item-color); border-radius: 50%; opacity: .52; }
.hazard-item .item-main { min-width: 0; }
.hazard-item .item-name { overflow: hidden; color: #d8f2f8; font-size: 10px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.hazard-item .item-meta { overflow: hidden; margin-top: 3px; color: #567995; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.hazard-item .item-level { padding: 2px 5px; color: var(--item-color); font-size: 8px; border: 1px solid color-mix(in srgb, var(--item-color) 40%, transparent); background: color-mix(in srgb, var(--item-color) 8%, transparent); }
.empty-list { display: grid; height: 130px; place-items: center; color: #56738d; font-size: 10px; border: 1px dashed rgba(54, 207, 255, .14); }

.screen-footer {
  position: relative;
  z-index: 8;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 16px;
  color: #4f718c;
  font-size: 8px;
  border-top: 1px solid rgba(54, 207, 255, .12);
  background: rgba(3, 10, 23, .82);
}

.screen-footer > div { display: flex; align-items: center; gap: 6px; }
.screen-footer > div:last-child { justify-content: flex-end; }
.screen-footer i { width: 5px; height: 5px; border-radius: 50%; background: var(--green); box-shadow: 0 0 6px var(--green); }
.screen-footer strong { color: var(--cyan-soft); font-family: ui-monospace, monospace; font-size: 9px; }
.footer-center { color: #41627e; letter-spacing: 1px; }

.hazard-circle-marker { position: relative; width: 22px; height: 22px; }
.hazard-circle-marker .core { position: absolute; z-index: 3; left: 50%; top: 50%; width: 10px; height: 10px; transform: translate(-50%, -50%); border: 1px solid rgba(255, 255, 255, .82); border-radius: 50%; background: var(--risk-color); box-shadow: 0 0 5px #fff, 0 0 12px var(--risk-color); }
.hazard-circle-marker .ring,
.hazard-circle-marker .ring-2 { position: absolute; z-index: 2; left: 50%; top: 50%; width: 10px; height: 10px; transform: translate(-50%, -50%); border: 2px solid var(--risk-color); border-radius: 50%; animation: marker-pulse 1.6s ease-out infinite; }
.hazard-circle-marker .ring-2 { animation-delay: .8s; }
@keyframes marker-pulse { 0% { opacity: .95; transform: translate(-50%, -50%) scale(.55); } 100% { opacity: 0; transform: translate(-50%, -50%) scale(2.3); } }

.hazard-thematic-overlay {
  animation: overlay-breathe 3.2s ease-in-out infinite;
  filter: drop-shadow(0 0 11px #ffc24b) drop-shadow(0 0 26px rgba(255, 194, 75, .36)) drop-shadow(0 3px 8px rgba(0, 0, 0, .58));
}

@keyframes overlay-breathe {
  0%, 100% { filter: drop-shadow(0 0 8px #ffc24b) drop-shadow(0 0 18px rgba(255, 194, 75, .26)) drop-shadow(0 3px 7px rgba(0, 0, 0, .5)); }
  50% { filter: drop-shadow(0 0 18px #ffc24b) drop-shadow(0 0 34px rgba(255, 194, 75, .46)) drop-shadow(0 4px 10px rgba(0, 0, 0, .62)); }
}

.region-glow-line { animation: region-line-breathe 3s ease-in-out infinite; filter: drop-shadow(0 0 4px #36cfff) drop-shadow(0 0 10px rgba(54, 207, 255, .45)); }
@keyframes region-line-breathe { 50% { stroke-opacity: 1; filter: drop-shadow(0 0 8px #36cfff) drop-shadow(0 0 16px rgba(54, 207, 255, .55)); } }
.risk-zone-hit { transition: fill-opacity .15s, stroke-opacity .15s; }

.leaflet-tooltip.hazard-name-label {
  margin-top: 0;
  padding: 1px 3px;
  color: #f1fcff;
  font-size: 8px;
  line-height: 1.1;
  white-space: nowrap;
  text-shadow: 0 0 3px #000, 0 1px 3px #000, 0 0 7px rgba(4, 14, 26, .9);
  border: 0;
  border-radius: 0;
  background: rgba(2, 10, 23, .42);
  box-shadow: none;
}

.leaflet-tooltip.hazard-name-label::before { display: none; }

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  color: #b8d7e7;
  border: 1px solid rgba(54, 207, 255, .3);
  background: rgba(4, 17, 36, .96);
  box-shadow: 0 10px 35px rgba(0, 0, 0, .45), inset 0 0 24px rgba(54, 207, 255, .04);
}

.leaflet-popup-content { min-width: 210px; margin: 13px 15px; font-size: 11px; line-height: 1.65; }
.leaflet-popup-close-button { color: #70a0bd !important; }
.popup-title { margin-bottom: 7px; padding-bottom: 6px; color: #effcff; font-size: 13px; font-weight: 650; border-bottom: 1px solid rgba(54, 207, 255, .17); }
.popup-title i { display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--popup-color); box-shadow: 0 0 7px var(--popup-color); }
.popup-grid { display: grid; grid-template-columns: 63px 1fr; gap: 2px 6px; }
.popup-grid span { color: #5f819c; }
.popup-grid b { color: #c7e9f2; font-weight: 500; overflow-wrap: anywhere; }
.popup-grid b.risk { color: var(--popup-color); }

.fatal-error {
  position: fixed;
  z-index: 9999;
  inset: 50% auto auto 50%;
  width: min(460px, calc(100% - 40px));
  padding: 24px;
  transform: translate(-50%, -50%);
  color: #b9d9e8;
  text-align: center;
  border: 1px solid rgba(255, 77, 91, .58);
  background: rgba(8, 17, 33, .98);
  box-shadow: 0 20px 60px rgba(0, 0, 0, .56);
}

.fatal-error strong { color: #ff7380; }
.fatal-error p { color: #dceef4; font-size: 12px; }
.fatal-error span { color: #6f8ca2; font-size: 10px; }

@media (max-height: 820px) {
  .screen-shell { grid-template-rows: 72px 24px minmax(0, 1fr) 24px; }
  .screen-header { padding: 0 20px; }
  .title-block h1 { font-size: 23px; }
  .dashboard-grid { gap: 8px; padding-top: 7px; padding-bottom: 6px; }
  .side-column { gap: 7px; }
  .overview-panel { flex-basis: 167px; }
  .level-panel { flex-basis: 218px; }
  .zone-panel { flex-basis: 193px; }
  .panel-title { height: 38px; }
  .tech-panel::after { top: 37px; }
  .kpi-grid { gap: 6px; padding: 8px 10px; }
  .kpi-card { height: 52px; }
  .chart-wrap { height: 125px; }
  .zone-item { height: 60px; }
  .zone-summary { gap: 6px; padding: 9px 10px; }
  .hazard-item { min-height: 42px; }
}

@media (min-width: 1900px) and (min-height: 1000px) {
  .dashboard-grid { grid-template-columns: 350px minmax(700px, 1fr) 370px; gap: 14px; padding: 13px 18px 12px; }
  .side-column { gap: 12px; }
  .overview-panel { flex-basis: 205px; }
  .level-panel { flex-basis: 270px; }
  .zone-panel { flex-basis: 235px; }
  .panel-title { height: 46px; padding: 0 16px; }
  .tech-panel::after { top: 45px; }
  .panel-title strong { font-size: 14px; }
  .kpi-card { height: 63px; padding-left: 10px; }
  .chart-wrap { height: 158px; }
  .hazard-item { min-height: 49px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}
