/* ============================================================================
   知识中枢 · 数据大屏样式（三屏共用）
   设计基准：1920×1080，等比缩放；深空底 + 青绿能量色，避免彩色堆砌
   ========================================================================== */
:root {
  --bg-0: #04090e;
  --bg-1: #071219;
  --ink-0: #eaf6f2;
  --ink-1: #b8d2cb;
  --ink-2: #7a958e;
  --ink-3: #4d6660;
  --a: #12d6a8;          /* 主能量色 · 青绿 */
  --a-dim: rgba(18, 214, 168, .18);
  --a-soft: rgba(18, 214, 168, .06);
  --b: #4da3ff;          /* 结构色 · 蓝 */
  --c: #ffb84d;          /* 琥珀 · 提示 */
  --d: #ff5c6c;          /* 红 · 风险 */
  --line: rgba(18, 214, 168, .16);
  --line-2: rgba(120, 200, 190, .09);
  --num: 'Bahnschrift', 'DIN Alternate', 'SF Mono', 'Consolas', ui-monospace, monospace;
}

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

html, body {
  width: 100%; height: 100%;
  background: var(--bg-0);
  color: var(--ink-0);
  font-family: 'PingFang SC', 'Microsoft YaHei', -apple-system, sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 舞台：固定 1920×1080，由 JS 等比缩放 */
.stage {
  position: absolute; top: 0; left: 0;
  width: 1920px; height: 1080px;
  transform-origin: top left;
  padding: 0 32px 28px;
  display: flex; flex-direction: column;
  gap: 16px;
}

/* ---------- 背景层 ---------- */
.bg, .bg-grid, .bg-glow, .bg-scan { position: absolute; inset: 0; pointer-events: none; }
.bg {
  z-index: 0;
  background:
    radial-gradient(ellipse 1100px 620px at 50% -8%, #0d3a33 0%, transparent 62%),
    radial-gradient(ellipse 900px 500px at 100% 108%, #0a2036 0%, transparent 60%),
    radial-gradient(ellipse 700px 400px at 0% 100%, #07231e 0%, transparent 60%),
    linear-gradient(180deg, #050c11 0%, #04090e 100%);
}
.bg-grid {
  z-index: 1;
  background-image:
    linear-gradient(rgba(18, 214, 168, .045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(18, 214, 168, .045) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 78% 70% at 50% 42%, #000 30%, transparent 88%);
  animation: gridDrift 24s linear infinite;
}
@keyframes gridDrift { to { background-position: 48px 48px, 48px 48px; } }
.bg-glow {
  z-index: 2;
  background:
    radial-gradient(circle 420px at 22% 18%, rgba(18, 214, 168, .10), transparent 70%),
    radial-gradient(circle 520px at 82% 74%, rgba(77, 163, 255, .08), transparent 72%);
  animation: glowBreath 9s ease-in-out infinite alternate;
}
@keyframes glowBreath { from { opacity: .55; } to { opacity: 1; } }
.bg-scan {
  z-index: 3;
  background: linear-gradient(180deg, transparent 0%, rgba(18, 214, 168, .055) 48%, transparent 100%);
  background-size: 100% 320px;
  background-repeat: no-repeat;
  animation: scanDown 11s linear infinite;
  opacity: .8;
}
@keyframes scanDown {
  0% { background-position: 0 -320px; }
  100% { background-position: 0 1080px; }
}

/* 内容层立于背景之上 */
.topbar, .main, .footline { position: relative; z-index: 5; }

/* ---------- 顶栏 ---------- */
.topbar {
  height: 92px; flex: none;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  border-bottom: 1px solid var(--line);
  position: relative;
}
.topbar::after {
  content: ''; position: absolute; left: 50%; bottom: -1px; transform: translateX(-50%);
  width: 520px; height: 2px;
  background: linear-gradient(90deg, transparent, var(--a), transparent);
  filter: blur(.4px);
  animation: barPulse 3.4s ease-in-out infinite;
}
@keyframes barPulse { 0%, 100% { opacity: .35; width: 380px; } 50% { opacity: 1; width: 620px; } }

.brand { display: flex; align-items: center; gap: 14px; }
.brand__mark {
  width: 38px; height: 38px; position: relative; flex: none;
  border: 1.5px solid var(--a); border-radius: 10px;
  box-shadow: 0 0 18px rgba(18, 214, 168, .35), inset 0 0 12px rgba(18, 214, 168, .18);
  display: grid; place-items: center;
}
.brand__mark::before {
  content: ''; width: 14px; height: 14px; border-radius: 50%;
  background: var(--a); box-shadow: 0 0 14px var(--a);
  animation: coreBeat 2.6s ease-in-out infinite;
}
@keyframes coreBeat { 0%, 100% { transform: scale(.72); opacity: .7; } 50% { transform: scale(1); opacity: 1; } }
.brand__txt b { display: block; font-size: 15px; letter-spacing: 3px; color: var(--ink-0); font-weight: 600; }
.brand__txt span { display: block; font-size: 10.5px; letter-spacing: 2.4px; color: var(--ink-3); margin-top: 3px; }

.title { text-align: center; }
.title h1 {
  font-size: 30px; font-weight: 600; letter-spacing: 8px;
  background: linear-gradient(180deg, #ffffff 6%, #8ff0d6 58%, #12d6a8 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 16px rgba(18, 214, 168, .35));
}
.title p {
  margin-top: 5px; font-size: 10.5px; letter-spacing: 4px; color: var(--ink-3);
  text-transform: uppercase;
}

.meta { display: flex; align-items: center; justify-content: flex-end; gap: 20px; }
.meta__clock { text-align: right; }
.meta__clock b {
  display: block; font-family: var(--num); font-size: 24px; letter-spacing: 1.5px;
  color: var(--ink-0); font-variant-numeric: tabular-nums; line-height: 1;
}
.meta__clock span { display: block; font-size: 10.5px; color: var(--ink-3); margin-top: 5px; letter-spacing: 1.4px; }
.pulse { display: flex; align-items: center; gap: 7px; font-size: 11px; color: var(--a); letter-spacing: 1.2px; }
.pulse i {
  width: 7px; height: 7px; border-radius: 50%; background: var(--a);
  box-shadow: 0 0 10px var(--a); animation: dotPulse 1.6s ease-in-out infinite;
}
@keyframes dotPulse { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.15); } }

/* ---------- 主区网格 ---------- */
.main { flex: 1; display: grid; gap: 16px; min-height: 0; }
.main--3 { grid-template-columns: 384px 1fr 400px; }
.main--3r { grid-template-columns: 400px 1fr 384px; }
.col { display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.col--center { min-width: 0; }

/* ---------- 面板 ---------- */
.panel {
  position: relative;
  background: linear-gradient(158deg, rgba(18, 214, 168, .062) 0%, rgba(8, 18, 24, .82) 46%, rgba(6, 14, 19, .9) 100%);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 16px 18px 16px;
  display: flex; flex-direction: column; min-height: 0;
  box-shadow: inset 0 0 42px rgba(18, 214, 168, .045), 0 10px 30px -18px #000;
  backdrop-filter: blur(2px);
}
/* 四角切角标记 */
.panel::before, .panel::after {
  content: ''; position: absolute; width: 12px; height: 12px; pointer-events: none;
  border-color: var(--a); opacity: .65;
}
.panel::before { top: -1px; left: -1px; border-top: 1.5px solid; border-left: 1.5px solid; }
.panel::after { bottom: -1px; right: -1px; border-bottom: 1.5px solid; border-right: 1.5px solid; }

.panel--tight { padding: 14px 16px; }
.panel--glow { border-color: rgba(18, 214, 168, .3); box-shadow: inset 0 0 60px rgba(18, 214, 168, .07), 0 0 34px -14px rgba(18, 214, 168, .45); }

.p-head { display: flex; align-items: center; justify-content: space-between; flex: none; margin-bottom: 12px; }
.p-head h2 {
  font-size: 13.5px; font-weight: 600; letter-spacing: 2.6px; color: var(--ink-0);
  display: flex; align-items: center; gap: 9px;
}
.p-head h2::before {
  content: ''; width: 3px; height: 13px; border-radius: 2px;
  background: linear-gradient(180deg, var(--a), rgba(18, 214, 168, .15));
  box-shadow: 0 0 10px rgba(18, 214, 168, .7);
}
.p-head em {
  font-style: normal; font-size: 10px; letter-spacing: 1.6px; color: var(--ink-3);
  border: 1px solid var(--line-2); border-radius: 2px; padding: 2px 7px;
}
.p-body { flex: 1; min-height: 0; position: relative; }

/* ---------- 数字卡 ---------- */
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi {
  position: relative; padding: 13px 14px 12px; border-radius: 2px;
  background: linear-gradient(150deg, rgba(18, 214, 168, .09), rgba(6, 14, 19, .2));
  border: 1px solid rgba(18, 214, 168, .14);
  overflow: hidden;
}
.kpi::after {
  content: ''; position: absolute; left: 0; top: 0; height: 100%; width: 2px;
  background: linear-gradient(180deg, var(--a), transparent);
  opacity: .8;
}
.kpi span { display: block; font-size: 10.5px; color: var(--ink-2); letter-spacing: 1.4px; }
.kpi b {
  display: block; margin-top: 7px; font-family: var(--num);
  font-size: 30px; line-height: 1; letter-spacing: 1px; color: var(--ink-0);
  text-shadow: 0 0 22px rgba(18, 214, 168, .42);
  font-variant-numeric: tabular-nums;
}
.kpi b small { font-size: 12px; color: var(--ink-2); margin-left: 4px; letter-spacing: 0; }
.kpi i { display: block; margin-top: 7px; font-style: normal; font-size: 10px; color: var(--ink-3); letter-spacing: .6px; }
.kpi--b::after { background: linear-gradient(180deg, var(--b), transparent); }
.kpi--c::after { background: linear-gradient(180deg, var(--c), transparent); }
.kpi--b b { text-shadow: 0 0 22px rgba(77, 163, 255, .42); }
.kpi--c b { text-shadow: 0 0 22px rgba(255, 184, 77, .42); }

/* ---------- 健康度圆环 ---------- */
.health { display: flex; align-items: center; gap: 18px; }
.health__ring { width: 132px; height: 132px; flex: none; position: relative; }
.health__ring canvas { width: 132px; height: 132px; display: block; }
.health__val {
  position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
}
.health__val b {
  font-family: var(--num); font-size: 34px; line-height: 1; color: #fff;
  text-shadow: 0 0 24px rgba(18, 214, 168, .7);
}
.health__val span { display: block; font-size: 9.5px; color: var(--ink-3); letter-spacing: 1.6px; margin-top: 4px; }
.health__bars { flex: 1; display: flex; flex-direction: column; gap: 11px; min-width: 0; }
.hbar__top { display: flex; justify-content: space-between; align-items: baseline; font-size: 11px; color: var(--ink-1); }
.hbar__top b { font-family: var(--num); color: var(--ink-0); font-size: 12.5px; }
.hbar__track { margin-top: 5px; height: 4px; border-radius: 3px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.hbar__fill {
  height: 100%; border-radius: 3px; width: 0;
  background: linear-gradient(90deg, rgba(18, 214, 168, .35), var(--a));
  box-shadow: 0 0 12px rgba(18, 214, 168, .65);
  transition: width 1.1s cubic-bezier(.2, .8, .2, 1);
}

/* ---------- 列表 / 条 ---------- */
.rows { display: flex; flex-direction: column; gap: 9px; overflow: hidden; }
.row {
  display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px;
  font-size: 11.5px; color: var(--ink-1);
}
.row__name { display: flex; align-items: center; gap: 7px; min-width: 0; }
.row__name i {
  width: 5px; height: 5px; border-radius: 50%; background: var(--a);
  box-shadow: 0 0 8px var(--a); flex: none;
}
.row__name span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row__val { font-family: var(--num); color: var(--ink-0); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.barline { grid-column: 1 / -1; height: 3px; background: rgba(255, 255, 255, .06); border-radius: 2px; overflow: hidden; margin-top: -3px; }
.barline > i {
  display: block; height: 100%; width: 0; border-radius: 2px;
  background: linear-gradient(90deg, rgba(77, 163, 255, .3), var(--b));
  box-shadow: 0 0 10px rgba(77, 163, 255, .55);
  transition: width .9s cubic-bezier(.2, .8, .2, 1);
}

/* ---------- 滚动信息流 ---------- */
.feed { display: flex; flex-direction: column; gap: 8px; overflow: hidden; height: 100%; }
.feed__item {
  display: grid; grid-template-columns: 42px 1fr auto; gap: 9px; align-items: center;
  padding: 8px 10px; border-radius: 2px;
  background: rgba(255, 255, 255, .022);
  border-left: 2px solid rgba(18, 214, 168, .3);
  font-size: 11.5px; color: var(--ink-1);
  animation: feedIn .5s ease both;
}
.feed__item.is-miss { border-left-color: var(--c); background: rgba(255, 184, 77, .05); }
@keyframes feedIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
.feed__t { font-family: var(--num); font-size: 10.5px; color: var(--ink-3); }
.feed__q { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed__m { font-family: var(--num); font-size: 10.5px; color: var(--ink-2); }
.feed__m u { text-decoration: none; color: var(--a); }

/* ---------- 底部 ---------- */
.footline {
  flex: none; height: 26px; display: flex; align-items: center; justify-content: space-between;
  font-size: 10px; letter-spacing: 1.6px; color: var(--ink-3);
  border-top: 1px solid rgba(120, 200, 190, .07);
}
.footline .dots { display: flex; gap: 5px; }
.footline .dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--a); opacity: .35; }
.footline .dots i:nth-child(2) { opacity: .6; }
.footline .dots i:nth-child(3) { opacity: 1; box-shadow: 0 0 8px var(--a); }

/* ---------- 画面切换（多屏导航） ---------- */
.nav {
  position: fixed; right: 20px; bottom: 18px; z-index: 30;
  display: flex; gap: 8px;
}
.nav a {
  display: grid; place-items: center; width: 34px; height: 34px;
  border: 1px solid rgba(18, 214, 168, .25); border-radius: 3px;
  color: var(--ink-2); text-decoration: none; font-size: 11px;
  background: rgba(6, 14, 19, .8); transition: .2s;
  font-family: var(--num);
}
.nav a:hover, .nav a.is-on { color: #04120e; background: var(--a); border-color: var(--a); box-shadow: 0 0 18px rgba(18, 214, 168, .5); }

/* ---------- 动效收敛 ---------- */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
