/* ============================================================
   智慧农业物联网数字孪生平台 · HUD 样式
   1920 × 1080 设计稿，整体等比缩放
   ============================================================ */

@font-face {
  font-family: 'Rajdhani';
  src: url('../assets/fonts/rajdhani-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Rajdhani';
  src: url('../assets/fonts/rajdhani-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Rajdhani';
  src: url('../assets/fonts/rajdhani-700.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Noto Sans SC';
  src: url('../assets/fonts/noto-sans-sc.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --cyan: #4ff2ff;
  --cyan-soft: #8ff7ff;
  --teal: #35ffc9;
  --blue: #4f9dff;
  --amber: #ffc857;
  --red: #ff5c7a;
  --ink: #dcefff;
  --ink-dim: #7ea6bd;
  --panel-bg: linear-gradient(155deg, rgba(9, 30, 50, .95) 0%, rgba(5, 17, 31, .91) 48%, rgba(4, 13, 25, .96) 100%);
  --font-cn: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', 'Hiragino Sans GB', sans-serif;
  --font-num: 'Rajdhani', 'DIN Alternate', 'Bahnschrift', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #01060c;
  color: var(--ink);
  font-family: var(--font-cn);
  -webkit-font-smoothing: antialiased;
  user-select: none;
}

#app { position: fixed; inset: 0; overflow: hidden; }

#stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1920px;
  height: 1080px;
  transform: translate(-50%, -50%);
  transform-origin: center center;
  background: #01070e;
  overflow: hidden;
}

#scene-holder { position: absolute; inset: 0; z-index: 0; }
#scene-holder canvas { display: block; width: 100% !important; height: 100% !important; }

/* ---------------- 屏幕氛围层 ---------------- */
.fx { position: absolute; inset: 0; pointer-events: none; }
.fx-vignette {
  z-index: 3;
  background:
    radial-gradient(ellipse 68% 62% at 50% 46%, transparent 42%, rgba(1, 7, 14, .34) 78%, rgba(1, 5, 10, .82) 100%),
    linear-gradient(180deg, rgba(2, 10, 18, .5) 0%, transparent 18%, transparent 76%, rgba(1, 7, 13, .62) 100%);
}
.fx-scanlines {
  z-index: 4;
  opacity: .16;
  background: repeating-linear-gradient(to bottom, rgba(140, 235, 255, .13) 0 1px, transparent 1px 3px);
  mix-blend-mode: overlay;
}
.fx-beam {
  z-index: 2;
  width: 46%;
  left: -46%;
  background: linear-gradient(90deg, transparent, rgba(79, 242, 255, .055), transparent);
  filter: blur(18px);
  animation: screen-sweep 14s linear infinite;
}
@keyframes screen-sweep {
  0% { transform: translateX(0); opacity: 0; }
  8% { opacity: 1; }
  55% { opacity: .7; }
  70% { transform: translateX(320%); opacity: 0; }
  100% { transform: translateX(320%); opacity: 0; }
}

.hud { position: absolute; inset: 0; z-index: 5; pointer-events: none; }

/* ---------------- 顶部 ---------------- */
.hud-header {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 106px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
  background: linear-gradient(180deg, rgba(3, 15, 27, .9) 0%, rgba(4, 16, 29, .42) 62%, transparent 100%);
}
.hud-header::before {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, transparent, rgba(79, 242, 255, .55) 22%, rgba(79, 242, 255, .95) 50%, rgba(79, 242, 255, .55) 78%, transparent);
  opacity: .7;
}
.header-side { display: flex; align-items: center; gap: 26px; width: 470px; z-index: 2; }
.header-right { justify-content: flex-end; gap: 22px; }

.clock-block { display: flex; flex-direction: column; gap: 2px; }
.clock-time {
  font-family: var(--font-num);
  font-size: 36px;
  font-weight: 600;
  line-height: .92;
  letter-spacing: 2px;
  color: #eafcff;
  text-shadow: 0 0 18px rgba(79, 242, 255, .45);
  font-variant-numeric: tabular-nums;
}
.clock-ms { font-size: 16px; color: var(--cyan); margin-left: 4px; letter-spacing: 1px; }
.clock-date {
  display: flex; align-items: center; gap: 8px;
  font-size: 11px; letter-spacing: 1.4px; color: #7fa9c0;
  font-family: var(--font-num);
}
.clock-sep { width: 26px; height: 1px; background: rgba(79, 242, 255, .4); }
.clock-zone { color: rgba(79, 242, 255, .7); }

.weather { display: flex; align-items: center; gap: 10px; padding-left: 22px; border-left: 1px solid rgba(79, 242, 255, .16); }
.wx-icon { width: 34px; height: 34px; color: var(--amber); filter: drop-shadow(0 0 8px rgba(255, 200, 87, .55)); }
.wx-text { display: flex; flex-direction: column; gap: 3px; }
.wx-main { font-family: var(--font-num); font-size: 19px; font-weight: 600; letter-spacing: .5px; color: #e6faff; }
.wx-main .unit { font-size: 12px; color: #9fc4d6; margin-left: 2px; }
.wx-sub { font-size: 10px; color: #6f98ae; letter-spacing: .6px; }

.header-center {
  position: absolute;
  left: 50%; top: 12px;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 26px;
  width: 900px;
  justify-content: center;
}
.title-wrap { position: relative; text-align: center; }
.title-en {
  font-family: var(--font-num);
  font-size: 10px;
  letter-spacing: 5.5px;
  color: rgba(79, 242, 255, .72);
  margin-bottom: 5px;
  white-space: nowrap;
}
.title-cn {
  font-size: 43px;
  font-weight: 700;
  letter-spacing: 4px;
  line-height: 1.06;
  white-space: nowrap;
  background: linear-gradient(180deg, #ffffff 8%, #d7f9ff 42%, #58d9f2 82%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 18px rgba(79, 242, 255, .34));
}
.title-cn em {
  font-style: normal;
  margin-left: 10px;
  background: linear-gradient(180deg, #d6fff6 5%, #35ffc9 55%, #12b9a0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.title-sub {
  margin-top: 7px;
  font-family: var(--font-num);
  font-size: 9px;
  letter-spacing: 3.2px;
  color: rgba(126, 166, 189, .78);
}
.title-wing { display: flex; align-items: center; gap: 7px; flex: 1; min-width: 120px; }
.title-wing i { height: 1px; background: linear-gradient(90deg, transparent, rgba(79, 242, 255, .6)); display: block; }
.title-wing i:nth-child(1) { width: 34%; opacity: .4; }
.title-wing i:nth-child(2) { width: 24%; opacity: .8; }
.title-wing i:nth-child(3) {
  width: 8px; height: 8px;
  background: none;
  border: 1px solid rgba(79, 242, 255, .8);
  transform: rotate(45deg);
  box-shadow: 0 0 10px rgba(79, 242, 255, .5);
}
.title-wing-l { justify-content: flex-end; }
.title-wing-r { flex-direction: row-reverse; }
.title-wing-r i { background: linear-gradient(270deg, transparent, rgba(79, 242, 255, .6)); }

.live-chip {
  display: flex; align-items: center; gap: 8px;
  height: 30px; padding: 0 13px;
  border: 1px solid rgba(53, 255, 201, .32);
  background: rgba(10, 52, 47, .38);
  color: #b9ffe9;
  font-size: 12px; letter-spacing: 1px;
  clip-path: polygon(7px 0, 100% 0, 100% calc(100% - 7px), calc(100% - 7px) 100%, 0 100%, 0 7px);
}
.live-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 0 0 rgba(53, 255, 201, .65);
  animation: pulse-dot 2s infinite;
}
@keyframes value-flash {
  0% { color: #7ffbff; text-shadow: 0 0 22px currentColor; }
  100% { color: #eefdff; }
}
.kpi-value b.flash { animation: value-flash .7s ease-out; }

@keyframes pulse-dot {
  0% { box-shadow: 0 0 0 0 rgba(53, 255, 201, .6); }
  70% { box-shadow: 0 0 0 8px rgba(53, 255, 201, 0); }
  100% { box-shadow: 0 0 0 0 rgba(53, 255, 201, 0); }
}
.signal-group { display: flex; flex-direction: column; gap: 4px; }
.signal-label { font-size: 9px; letter-spacing: 2px; color: #5d849b; }
.signal-val { font-family: var(--font-num); font-size: 14px; color: #c9f7ff; letter-spacing: 1px; }
.signal-bars { display: flex; align-items: flex-end; gap: 2px; height: 10px; }
.signal-bars i {
  width: 3px; background: var(--cyan);
  box-shadow: 0 0 5px rgba(79, 242, 255, .7);
  animation: signal 2.4s ease-in-out infinite;
}
.signal-bars i:nth-child(1) { height: 3px; animation-delay: 0s; }
.signal-bars i:nth-child(2) { height: 5px; animation-delay: .2s; }
.signal-bars i:nth-child(3) { height: 7px; animation-delay: .4s; }
.signal-bars i:nth-child(4) { height: 9px; animation-delay: .6s; }
.signal-bars i:nth-child(5) { height: 10px; animation-delay: .8s; }
@keyframes signal { 0%, 100% { opacity: .45; } 50% { opacity: 1; } }

.header-underline {
  position: absolute; left: 34px; right: 34px; bottom: 6px; height: 1px;
  background: linear-gradient(90deg, rgba(79, 242, 255, .3), transparent 30%, transparent 70%, rgba(79, 242, 255, .3));
}
.header-underline span {
  position: absolute; left: 50%; top: -1px; width: 360px; height: 3px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(79, 242, 255, .65), transparent 70%);
}

/* ---------------- KPI ---------------- */
.kpi-strip {
  position: absolute; top: 114px; left: 50%; transform: translateX(-50%);
  width: 1040px; height: 80px;
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px;
  z-index: 6;
}
.kpi-card {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  padding: 0 14px;
  background: linear-gradient(140deg, rgba(8, 27, 45, .82), rgba(3, 12, 23, .72));
  border: 1px solid rgba(79, 242, 255, .16);
  backdrop-filter: blur(12px);
  clip-path: polygon(0 0, calc(100% - 13px) 0, 100% 13px, 100% 100%, 13px 100%, 0 calc(100% - 13px));
  overflow: hidden;
}
.kpi-card::before {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 2px;
  background: var(--kpi); opacity: .75; box-shadow: 0 0 12px var(--kpi);
}
.kpi-card::after {
  content: ''; position: absolute; right: -24px; top: -34px;
  width: 84px; height: 84px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--kpi) 22%, transparent), transparent 68%);
}
.kpi-icon {
  width: 34px; height: 34px; flex: 0 0 34px;
  display: grid; place-items: center;
  border: 1px solid color-mix(in srgb, var(--kpi) 32%, transparent);
  background: color-mix(in srgb, var(--kpi) 9%, transparent);
  color: var(--kpi);
  clip-path: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}
.kpi-icon svg { width: 20px; height: 20px; }
.kpi-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.kpi-label { font-size: 11.5px; letter-spacing: 1px; color: #84acc2; white-space: nowrap; }
.kpi-value { display: flex; align-items: baseline; gap: 4px; font-family: var(--font-num); }
.kpi-value b {
  font-size: 29px; font-weight: 600; line-height: 1;
  color: #eefdff; letter-spacing: .5px;
  text-shadow: 0 0 14px color-mix(in srgb, var(--kpi) 42%, transparent);
  font-variant-numeric: tabular-nums;
}
.kpi-unit { font-size: 11px; color: #7fa7bd; }
.kpi-delta {
  margin-left: auto; font-size: 10px; letter-spacing: .5px; color: #7fa7bd;
  font-family: var(--font-num);
}
.kpi-delta.up { color: var(--teal); }
.kpi-spark { margin-left: auto; width: 48px; opacity: .7; color: var(--kpi); }
.kpi-spark svg { width: 48px; height: 22px; overflow: visible; }

/* ---------------- 面板通用 ---------------- */
.col { position: absolute; top: 126px; width: 400px; display: flex; flex-direction: column; gap: 16px; }
.col-left { left: 28px; }
.col-right { right: 28px; }

.panel {
  position: relative;
  background: var(--panel-bg);
  border: 1px solid rgba(79, 242, 255, .17);
  box-shadow:
    inset 0 1px 0 rgba(140, 245, 255, .08),
    inset 0 0 38px rgba(17, 108, 150, .1),
    0 12px 34px rgba(0, 0, 0, .34);
  backdrop-filter: blur(10px) saturate(1.15);
  overflow: hidden;
}
.panel::before {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--accent) 60%, transparent) 30%, transparent 90%);
}
.panel::after {
  content: ''; position: absolute; right: -60px; bottom: -80px; width: 180px; height: 180px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 8%, transparent), transparent 65%);
  pointer-events: none;
}
.panel-head {
  position: relative;
  height: 50px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 15px;
  border-bottom: 1px solid rgba(79, 242, 255, .1);
  background: linear-gradient(90deg, rgba(79, 242, 255, .055), transparent 55%);
}
.panel-title { display: flex; align-items: center; gap: 9px; font-size: 17px; font-weight: 700; letter-spacing: 1.6px; color: #e2f8ff; }
.panel-title small { font-family: var(--font-num); font-size: 8.5px; letter-spacing: 2px; color: #54839c; font-weight: 500; align-self: flex-end; margin-bottom: 3px; }
.panel-bar { width: 3px; height: 15px; background: var(--accent); box-shadow: 0 0 10px var(--accent); display: block; }
.panel-tools { display: flex; align-items: center; gap: 8px; }
.panel-pill {
  font-size: 9px; letter-spacing: 1px; color: color-mix(in srgb, var(--accent) 85%, white);
  border: 1px solid color-mix(in srgb, var(--accent) 34%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  padding: 3px 7px; border-radius: 2px;
}
.panel-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); animation: blink 2.2s infinite; }
@keyframes blink { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.panel-foot {
  position: absolute; left: 15px; right: 15px; bottom: 9px;
  display: flex; justify-content: space-between; align-items: center;
  font-size: 10px; letter-spacing: .8px; color: #5f8aa0;
  padding-top: 7px; border-top: 1px solid rgba(79, 242, 255, .07);
}
.panel-foot .ok { color: var(--teal); }

/* 环境监测 */
.panel-env { height: 312px; }
.env-list { padding: 8px 15px 0; display: flex; flex-direction: column; }
.env-row {
  height: 44px;
  display: grid; grid-template-columns: 1fr 120px 46px;
  align-items: center; gap: 8px;
  border-bottom: 1px solid rgba(79, 242, 255, .055);
  position: relative;
}
.env-meta { display: flex; flex-direction: column; gap: 1px; }
.env-name { font-size: 12px; color: #9bc2d5; letter-spacing: 1px; }
.env-val { font-family: var(--font-num); display: flex; align-items: baseline; gap: 3px; }
.env-val b { font-size: 23px; font-weight: 600; color: #e8fcff; font-variant-numeric: tabular-nums; }
.env-val i { font-style: normal; font-size: 10px; color: #5f8ba2; }
.env-chart { width: 120px; height: 27px; opacity: .9; }
.env-chart canvas { width: 120px; height: 27px; display: block; }
.env-trend { font-family: var(--font-num); font-size: 9px; text-align: right; letter-spacing: .3px; }
.env-trend.up { color: #46e6ad; }
.env-trend.down { color: #ff9a63; }

/* 作物长势 */
.panel-crop { height: 286px; }
.crop-list { padding: 12px 15px 0; display: flex; flex-direction: column; gap: 12px; }
.crop-row { display: flex; flex-direction: column; gap: 5px; }
.crop-top { display: flex; align-items: center; gap: 7px; }
.crop-name { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: #b3d3e3; letter-spacing: .5px; }
.crop-name i { width: 4px; height: 4px; background: var(--teal); transform: rotate(45deg); box-shadow: 0 0 6px var(--teal); }
.crop-stage {
  font-size: 9.5px; color: rgba(53, 255, 201, .78);
  border: 1px solid rgba(53, 255, 201, .22); padding: 1px 5px; border-radius: 2px;
}
.crop-pct { margin-left: auto; font-family: var(--font-num); font-size: 19px; font-weight: 600; color: #dffeff; line-height: 1; }
.crop-pct small { font-size: 9px; color: #5f8ba2; margin-left: 1px; }
.crop-bar {
  position: relative; height: 6px;
  background: rgba(79, 242, 255, .08);
  border: 1px solid rgba(79, 242, 255, .1);
  overflow: hidden;
}
.crop-bar i {
  display: block; height: 100%; width: var(--p);
  background: linear-gradient(90deg, rgba(53, 197, 255, .5), var(--teal));
  box-shadow: 0 0 12px rgba(53, 255, 201, .55);
  position: relative;
  transition: width .8s cubic-bezier(.2, .7, .3, 1);
}
.crop-bar i::after {
  content: ''; position: absolute; right: 0; top: -80%; width: 22px; height: 260%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .5));
  filter: blur(2px);
}
.crop-target {
  position: absolute; top: 0; right: 0; bottom: 0; width: 1px;
  background: rgba(79, 242, 255, .22);
}
.crop-summary {
  position: absolute; left: 15px; right: 15px; bottom: 11px;
  display: flex; justify-content: space-between;
  font-size: 9.5px; color: #5d879e; letter-spacing: .5px;
}
.crop-summary b { color: #c7f2ff; font-family: var(--font-num); font-size: 13px; }
.crop-summary em { color: var(--teal); font-style: normal; font-family: var(--font-num); }

/* 水肥 */
.panel-water { height: 214px; }
.water-main { display: flex; align-items: center; gap: 18px; padding: 12px 16px 0; }
.water-ring { position: relative; width: 92px; height: 92px; flex: 0 0 92px; }
.water-ring svg { width: 92px; height: 92px; transform: rotate(-90deg); }
.water-ring circle { fill: none; stroke-width: 5; }
.water-ring .ring-bg { stroke: rgba(79, 242, 255, .1); }
.water-ring .ring-fg {
  stroke: var(--cyan);
  stroke-linecap: round;
  stroke-dasharray: 239;
  stroke-dashoffset: 62;
  filter: drop-shadow(0 0 6px rgba(79, 242, 255, .8));
  transition: stroke-dashoffset 1s ease;
}
.water-ring-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.water-ring-label b { font-family: var(--font-num); font-size: 23px; color: #eefeff; line-height: 1; }
.water-ring-label span { font-size: 8px; color: #6a98ae; letter-spacing: .5px; }
.water-stats { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.water-stats div { display: flex; flex-direction: column; gap: 2px; }
.water-stats span { font-size: 9px; color: #5f8aa0; letter-spacing: .8px; }
.water-stats b { font-family: var(--font-num); font-size: 17px; font-weight: 600; color: #d9f8ff; }
.water-stats small { font-size: 8px; color: #5f8aa0; margin-left: 2px; font-weight: 400; }
.water-foot {
  position: absolute; left: 15px; right: 15px; bottom: 10px;
  display: flex; align-items: center; gap: 8px;
  padding-top: 7px; border-top: 1px solid rgba(79, 242, 255, .07);
  font-size: 9.5px; color: #739eb4;
}
.water-foot .mono { margin-left: auto; color: var(--teal); font-family: var(--font-num); letter-spacing: 1px; }
.valve { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 8px var(--teal); }

/* 设备 */
.panel-device { height: 322px; }
.device-top { display: flex; align-items: center; gap: 14px; padding: 10px 16px 6px; }
.device-donut { position: relative; width: 108px; height: 108px; flex: 0 0 108px; }
.device-donut canvas { width: 108px; height: 108px; display: block; }
.device-donut-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.device-donut-label b { font-family: var(--font-num); font-size: 22px; color: #f0feff; line-height: 1; }
.device-donut-label small { font-size: 9px; color: #6f9cb2; margin-left: 1px; }
.device-donut-label span { font-size: 8px; color: #5f8aa0; letter-spacing: 1px; margin-top: 2px; }
.device-legend { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; flex: 1; }
.device-legend div { display: flex; align-items: center; gap: 6px; font-size: 9.5px; color: #7fa6bb; }
.device-legend i { width: 6px; height: 6px; background: var(--c); box-shadow: 0 0 7px var(--c); border-radius: 1px; }
.device-legend b { margin-left: auto; font-family: var(--font-num); font-size: 14px; color: #d6f5ff; }
.device-list { padding: 2px 15px 0; }
.device-row {
  height: 27px; display: flex; align-items: center; gap: 8px;
  border-top: 1px solid rgba(79, 242, 255, .055);
  font-size: 11px; color: #9dc1d3;
}
.device-row .st { width: 5px; height: 5px; border-radius: 50%; flex: 0 0 5px; }
.device-row .st.online { background: var(--teal); box-shadow: 0 0 7px var(--teal); }
.device-row .st.run { background: var(--cyan); box-shadow: 0 0 7px var(--cyan); animation: blink 1.6s infinite; }
.device-row .st.warn { background: var(--amber); box-shadow: 0 0 7px var(--amber); }
.device-row .st.off { background: var(--red); box-shadow: 0 0 7px var(--red); }
.device-row .nm { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.device-row .zone { font-family: var(--font-num); color: #5c879e; font-size: 9.5px; letter-spacing: .5px; }
.device-row .bat { width: 34px; height: 3px; background: rgba(79, 242, 255, .1); position: relative; }
.device-row .bat i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--teal); opacity: .8; }

/* 病虫害 */
.panel-risk { height: 296px; }
.risk-body { display: flex; gap: 8px; padding: 10px 14px 0; }
#risk-radar { width: 172px; height: 172px; flex: 0 0 172px; }
.risk-info { flex: 1; display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.risk-level { display: flex; align-items: baseline; gap: 7px; }
.risk-level span { font-size: 9.5px; color: #6e98ad; letter-spacing: .6px; }
.risk-level b {
  font-size: 28px; font-weight: 700; color: var(--teal);
  text-shadow: 0 0 16px rgba(53, 255, 201, .5); line-height: 1;
}
.risk-info p { font-size: 10px; line-height: 1.7; color: #7ba3b8; letter-spacing: .3px; }
.risk-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: auto; padding-bottom: 8px; }
.risk-tags span {
  font-size: 8.5px; color: #d7b06a; padding: 2px 5px;
  border: 1px solid rgba(255, 200, 87, .2); background: rgba(255, 200, 87, .05);
}

/* 告警 */
.panel-alert { height: 190px; }
.alert-count { font-family: var(--font-num); font-size: 18px; color: var(--red); letter-spacing: 1px; text-shadow: 0 0 10px rgba(255, 92, 122, .5); }
.alert-list { padding: 4px 15px 0; display: flex; flex-direction: column; }
.alert-row { display: flex; align-items: center; gap: 9px; height: 42px; border-bottom: 1px solid rgba(255, 92, 122, .08); }
.alert-row .a-time { font-family: var(--font-num); font-size: 11px; color: #547f95; letter-spacing: .5px; }
.alert-row .a-bar { width: 2px; height: 16px; background: var(--red); box-shadow: 0 0 8px var(--red); opacity: .6; }
.alert-row .a-text { flex: 1; font-size: 11px; color: #b1cfdf; line-height: 1.3; }
.alert-row .a-text em { font-style: normal; color: var(--amber); }
.alert-row .a-tag { font-size: 8px; color: #ff9bae; border: 1px solid rgba(255, 92, 122, .25); padding: 1px 5px; }
.alert-row.warn .a-bar { background: var(--amber); box-shadow: 0 0 8px var(--amber); }
.alert-row.warn .a-tag { color: #ffd690; border-color: rgba(255, 200, 87, .25); }

/* ---------------- 视角控制 ---------------- */
.view-bar {
  position: absolute; top: 206px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 4px;
  padding: 5px 8px;
  background: rgba(4, 16, 29, .55);
  border: 1px solid rgba(79, 242, 255, .14);
  backdrop-filter: blur(8px);
  clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
  pointer-events: auto;
  z-index: 7;
}
.view-label { font-size: 9px; color: #547f95; letter-spacing: 2px; padding: 0 6px 0 2px; }
.view-btn {
  height: 26px; padding: 0 12px;
  background: transparent; border: 1px solid transparent;
  color: #7ba4ba; font-family: var(--font-cn); font-size: 11px; letter-spacing: 1px;
  cursor: pointer; transition: all .25s; display: flex; align-items: center; gap: 6px;
}
.view-btn:hover { color: #d9fbff; background: rgba(79, 242, 255, .07); }
.view-btn.active {
  color: #04141f; background: linear-gradient(90deg, rgba(79, 242, 255, .85), rgba(53, 255, 201, .8));
  box-shadow: 0 0 18px rgba(79, 242, 255, .25);
  font-weight: 700;
}
.view-divider { width: 1px; height: 14px; background: rgba(79, 242, 255, .18); margin: 0 4px; }
.view-btn.toggle i {
  width: 7px; height: 7px; border-radius: 50%; border: 1px solid currentColor; display: block; position: relative;
}
.view-btn.toggle.on { color: var(--teal); }
.view-btn.toggle.on i::after { content: ''; position: absolute; inset: 1px; background: var(--teal); border-radius: 50%; box-shadow: 0 0 6px var(--teal); }

/* ---------------- 详情卡 ---------------- */
.detail-card {
  position: absolute; left: 50%; bottom: 108px;
  width: 740px; height: 196px;
  transform: translate(-50%, 24px);
  opacity: 0; visibility: hidden;
  pointer-events: none;
  background: linear-gradient(150deg, rgba(8, 32, 49, .94), rgba(4, 14, 26, .92));
  border: 1px solid rgba(79, 242, 255, .35);
  box-shadow: 0 0 44px rgba(11, 127, 168, .28), inset 0 0 44px rgba(13, 97, 128, .12);
  backdrop-filter: blur(16px);
  padding: 16px 20px;
  clip-path: polygon(0 0, calc(100% - 18px) 0, 100% 18px, 100% 100%, 18px 100%, 0 calc(100% - 18px));
  transition: opacity .35s, transform .35s, visibility .35s;
  z-index: 9;
}
.detail-card.open { opacity: 1; visibility: visible; transform: translate(-50%, 0); pointer-events: auto; }
.detail-card::before {
  content: ''; position: absolute; left: 0; top: 0; width: 3px; height: 100%;
  background: linear-gradient(180deg, var(--teal), transparent);
}
.detail-close {
  position: absolute; right: 10px; top: 8px;
  width: 24px; height: 24px; border: 1px solid rgba(79, 242, 255, .2);
  background: rgba(79, 242, 255, .05); color: #86b3c9; font-size: 17px; line-height: 1;
  cursor: pointer; pointer-events: auto;
}
.detail-close:hover { color: #fff; border-color: var(--cyan); }
.detail-head { display: flex; align-items: center; justify-content: space-between; }
.detail-title { display: flex; align-items: baseline; gap: 10px; }
.detail-tag {
  font-family: var(--font-num); font-size: 11px; letter-spacing: 1.5px;
  color: var(--teal); border: 1px solid rgba(53, 255, 201, .35); padding: 2px 7px;
}
.detail-title h3 { font-size: 23px; letter-spacing: 2px; font-weight: 700; color: #effeff; }
.detail-stage { font-size: 10px; color: #7fa9c0; letter-spacing: 1px; }
.detail-ring-wrap { position: relative; width: 60px; height: 60px; margin-right: 10px; }
.detail-ring-wrap canvas { width: 60px; height: 60px; }
.detail-ring-label { position: absolute; inset: 0; display: flex; align-items: baseline; justify-content: center; padding-top: 21px; }
.detail-ring-label b { font-family: var(--font-num); font-size: 19px; color: #e9ffff; }
.detail-ring-label span { font-size: 8px; color: #6f9bb1; }
.detail-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 14px; }
.detail-stats div {
  display: flex; flex-direction: column; gap: 3px;
  border-left: 1px solid rgba(79, 242, 255, .14); padding-left: 12px;
}
.detail-stats span { font-size: 9.5px; color: #618ca3; letter-spacing: .6px; }
.detail-stats b { font-family: var(--font-num); font-size: 21px; font-weight: 600; color: #dcfaff; }
.detail-stats small { font-size: 8px; color: #5f8aa0; margin-left: 2px; font-weight: 400; }
.detail-foot { display: flex; align-items: center; gap: 6px; margin-top: 13px; font-size: 9px; color: #567f95; letter-spacing: .6px; }
.detail-foot b { font-family: var(--font-num); color: #88bed2; font-weight: 500; }
.pulse-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 8px var(--teal); animation: blink 1.8s infinite; }

/* ---------------- 底部 ---------------- */
.bottom-bar { position: absolute; left: 440px; right: 440px; bottom: 26px; z-index: 6; }
.ticker {
  height: 46px; display: flex; align-items: stretch;
  background: linear-gradient(90deg, rgba(6, 24, 40, .9), rgba(4, 14, 26, .78));
  border: 1px solid rgba(79, 242, 255, .15);
  backdrop-filter: blur(10px);
}
.ticker-label {
  display: flex; flex-direction: column; justify-content: center; gap: 1px;
  padding: 0 14px; flex: 0 0 132px;
  border-right: 1px solid rgba(79, 242, 255, .12);
  background: linear-gradient(90deg, rgba(79, 242, 255, .08), transparent);
  position: relative;
}
.ticker-label i {
  position: absolute; left: 0; top: 0; bottom: 0; width: 2px;
  background: var(--cyan); box-shadow: 0 0 10px var(--cyan);
}
.ticker-label { font-size: 12px; letter-spacing: 1.4px; color: #b9e8f5; flex-direction: row; align-items: center; gap: 8px; }
.ticker-label small { display: none; }
.ticker-window { flex: 1; overflow: hidden; display: flex; align-items: center; position: relative; mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent); }
.ticker-track { display: flex; gap: 46px; white-space: nowrap; padding-left: 20px; animation: ticker-move 52s linear infinite; }
.ticker-track span { font-size: 11.5px; color: #91b8cc; letter-spacing: .6px; display: flex; align-items: center; gap: 7px; }
.ticker-track span i { width: 4px; height: 4px; background: var(--teal); transform: rotate(45deg); display: inline-block; box-shadow: 0 0 6px var(--teal); }
.ticker-track b { font-family: var(--font-num); color: #d7f8ff; font-weight: 600; font-size: 12px; }
.ticker-track em { font-style: normal; color: var(--amber); }
@keyframes ticker-move { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.ticker-status {
  flex: 0 0 92px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 1px;
  border-left: 1px solid rgba(79, 242, 255, .12);
  font-size: 8px; color: #5c869c; letter-spacing: 1px;
}
.ticker-status .mono { font-family: var(--font-num); font-size: 15px; color: var(--cyan); }
.legend { display: flex; align-items: center; justify-content: flex-end; gap: 18px; height: 26px; font-size: 10px; color: #6e99b0; letter-spacing: .6px; }
.legend span { display: flex; align-items: center; gap: 5px; }
.lg { width: 8px; height: 4px; display: block; }
.lg-field { background: var(--teal); box-shadow: 0 0 6px var(--teal); }
.lg-green { background: #ff8bd0; box-shadow: 0 0 6px #ff8bd0; }
.lg-device { background: var(--cyan); box-shadow: 0 0 6px var(--cyan); border-radius: 50%; width: 5px; height: 5px; }
.legend-tip { margin-left: 8px; color: #496f85; }

/* ---------------- 四角 ---------------- */
.corner { position: absolute; width: 26px; height: 26px; z-index: 8; pointer-events: none; opacity: .6; }
.corner-tl { left: 14px; top: 14px; border-top: 1px solid var(--cyan); border-left: 1px solid var(--cyan); }
.corner-tr { right: 14px; top: 14px; border-top: 1px solid var(--cyan); border-right: 1px solid var(--cyan); }
.corner-bl { left: 14px; bottom: 14px; border-bottom: 1px solid var(--cyan); border-left: 1px solid var(--cyan); }
.corner-br { right: 14px; bottom: 14px; border-bottom: 1px solid var(--cyan); border-right: 1px solid var(--cyan); }

/* ---------------- 加载页 ---------------- */
#loader {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(ellipse at 50% 42%, #082235 0%, #04101c 42%, #01060c 100%);
  transition: opacity .8s ease, visibility .8s;
}
#loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loader-grid {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(79, 242, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 242, 255, .05) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at center, #000 10%, transparent 68%);
  animation: grid-drift 20s linear infinite;
}
@keyframes grid-drift { from { background-position: 0 0, 0 0; } to { background-position: 0 64px, 64px 0; } }
.loader-inner { position: relative; width: 480px; text-align: center; }
.loader-logo { width: 120px; height: 120px; margin: 0 auto 22px; filter: drop-shadow(0 0 26px rgba(79, 242, 255, .35)); animation: logo-float 4s ease-in-out infinite; }
.loader-logo svg { width: 100%; height: 100%; }
@keyframes logo-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.loader-title { font-size: 25px; font-weight: 700; letter-spacing: 5px; color: #e8fdff; text-shadow: 0 0 26px rgba(79, 242, 255, .35); }
.loader-sub { margin-top: 10px; font-size: 11px; letter-spacing: 1.6px; color: #6f9fb6; }
.dots i { font-style: normal; animation: dot-blink 1.4s infinite; }
.dots i:nth-child(2) { animation-delay: .2s; }
.dots i:nth-child(3) { animation-delay: .4s; }
@keyframes dot-blink { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
.loader-bar { width: 100%; height: 3px; margin-top: 26px; background: rgba(79, 242, 255, .1); position: relative; overflow: hidden; }
.loader-bar i {
  position: absolute; left: 0; top: 0; bottom: 0; width: 0%;
  background: linear-gradient(90deg, #35ffc9, #4ff2ff);
  box-shadow: 0 0 14px rgba(79, 242, 255, .7);
  transition: width .45s ease;
}
.loader-meta { display: flex; justify-content: space-between; margin-top: 9px; font-family: var(--font-num); font-size: 10px; letter-spacing: 1px; color: #5a879e; }
.loader-foot { position: absolute; bottom: 30px; left: 0; right: 0; text-align: center; font-family: var(--font-num); font-size: 8.5px; letter-spacing: 3px; color: #365c71; }
.noscript { position: fixed; inset: 0; display: grid; place-items: center; background: #04101c; color: #cdefff; z-index: 200; }

/* 滚动条隐藏 */
::-webkit-scrollbar { display: none; }
