/* ==========================================================================
   LVC 合成仿真与 AI 智能推演平台 · Cockpit 态势大屏
   深空蓝黑 / 青蓝发光描边 / 等宽数字 / 军事指挥风格
   ========================================================================== */

:root {
  --bg0: #04080f;
  --bg1: #081422;
  --panel-a: rgba(11, 28, 47, .80);
  --panel-b: rgba(5, 13, 24, .76);
  --line: rgba(63, 182, 255, .18);
  --line-2: rgba(63, 182, 255, .34);
  --cyan: #3fb6ff;
  --cyan-2: #8fe3ff;
  --teal: #2fe6c8;
  --warn: #ffb020;
  --crit: #ff4d6d;
  --txt: #d6e6f5;
  --txt-2: #a8c0d4;
  --dim: #7d96ad;
  --faint: #4a6076;
  --mono: "Consolas", "DIN Alternate", "SF Mono", monospace;
  --ui: "Microsoft YaHei UI", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --gap: 10px;
  --r: 3px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  width: 100%;
}

body {
  overflow: hidden;
  background: var(--bg0);
  color: var(--txt);
  font-family: var(--ui);
  font-size: 12px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 背景：深空渐变 + 细网格 + 角落辉光 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(1200px 620px at 16% -12%, rgba(30, 110, 180, .22), transparent 62%),
    radial-gradient(900px 520px at 102% -4%, rgba(20, 180, 190, .14), transparent 60%),
    radial-gradient(1100px 720px at 50% 122%, rgba(24, 78, 148, .18), transparent 66%),
    linear-gradient(180deg, #04080f 0%, #06101d 46%, #04080f 100%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    repeating-linear-gradient(0deg, rgba(63, 182, 255, .05) 0 1px, transparent 1px 44px),
    repeating-linear-gradient(90deg, rgba(63, 182, 255, .045) 0 1px, transparent 1px 44px);
  -webkit-mask-image: radial-gradient(ellipse at 50% 42%, rgba(0, 0, 0, .95), rgba(0, 0, 0, .35) 72%, transparent 100%);
  mask-image: radial-gradient(ellipse at 50% 42%, rgba(0, 0, 0, .95), rgba(0, 0, 0, .35) 72%, transparent 100%);
}

button { font-family: inherit; }

#app {
  position: relative;
  display: grid;
  grid-template-rows: 56px minmax(0, 1fr) 84px;
  height: 100vh;
  min-width: 0;
}

/* ============================== 顶栏 ============================== */

.topbar {
  position: relative;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  height: 56px;
  padding: 0 14px;
  background: linear-gradient(180deg, rgba(9, 26, 45, .94), rgba(5, 14, 25, .80));
  box-shadow: 0 8px 28px -14px rgba(0, 0, 0, .95), inset 0 -1px 0 rgba(63, 182, 255, .10);
}

.topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(63, 182, 255, .18) 10%, #3fb6ff 40%, #2fe6c8 60%, rgba(63, 182, 255, .18) 92%, transparent);
  box-shadow: 0 0 14px rgba(63, 182, 255, .65), 0 0 32px rgba(47, 230, 200, .25);
  opacity: .9;
}

.tb-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 0 1 auto;
}

.logo {
  flex: 0 0 auto;
  width: 34px;
  height: 39px;
  filter: drop-shadow(0 0 9px rgba(63, 182, 255, .55));
}
.logo svg { display: block; width: 100%; height: 100%; }
.logo .hex-o { fill: rgba(63, 182, 255, .07); stroke: url(#lgHex); stroke-width: 1.6; }
.logo .hex-i { fill: none; stroke: rgba(63, 182, 255, .38); stroke-width: 1; }
.logo .hex-g {
  fill: none;
  stroke: #b6f2ff;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 0 4px #3fb6ff);
}

.brand { min-width: 0; }
.brand h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: .7px;
  color: #eaf6ff;
  text-shadow: 0 0 20px rgba(63, 182, 255, .35);
  white-space: nowrap;
}
.brand h1 span {
  font-family: var(--mono);
  letter-spacing: 1.4px;
  color: var(--cyan);
}
.brand p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 3px 0 0;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 2.4px;
  color: rgba(125, 150, 173, .92);
  white-space: nowrap;
}
.brand p i {
  display: inline-block;
  width: 1px;
  height: 8px;
  background: rgba(63, 182, 255, .5);
}

.tb-center {
  display: flex;
  justify-content: center;
  min-width: 0;
  flex: 1 1 auto;
}

.tabs { display: flex; align-items: center; gap: 4px; }

.tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding: 5px 12px 6px;
  border: 1px solid rgba(63, 182, 255, .14);
  border-radius: 2px;
  background: rgba(63, 182, 255, .03);
  color: var(--txt-2);
  cursor: pointer;
  transition: border-color .18s, background .18s, color .18s, box-shadow .18s;
  white-space: nowrap;
}
.tab em {
  font-style: normal;
  font-size: 11.5px;
  letter-spacing: .5px;
  line-height: 1.3;
}
.tab span {
  font-size: 9px;
  letter-spacing: 1.1px;
  color: var(--faint);
  line-height: 1.3;
}
.tab:hover {
  border-color: rgba(63, 182, 255, .4);
  background: rgba(63, 182, 255, .08);
  color: #dff2ff;
}
.tab.active {
  border-color: rgba(63, 182, 255, .55);
  background: linear-gradient(180deg, rgba(63, 182, 255, .20), rgba(63, 182, 255, .05));
  color: #eaf9ff;
  box-shadow: inset 0 0 0 1px rgba(63, 182, 255, .10), 0 0 20px -6px rgba(63, 182, 255, .65);
}
.tab.active span { color: rgba(143, 227, 255, .85); }
.tab.active::after {
  content: "";
  position: absolute;
  left: 9px;
  right: 9px;
  bottom: -1px;
  height: 1px;
  background: #7fe4ff;
  box-shadow: 0 0 9px #3fb6ff;
}

.tb-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
}

.clock {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  line-height: 1;
  min-width: 96px;
}
.clock-sim {
  font-family: var(--mono);
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 1.2px;
  color: #e4f6ff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 14px rgba(63, 182, 255, .6);
}
.clock-wall {
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--dim);
}
.clock-wall b { font-weight: 400; letter-spacing: .3px; }
.clock-run {
  max-width: 128px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .3px;
  color: rgba(90, 120, 145, .85);
}

.conn-dot {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #5a7186;
  box-shadow: 0 0 6px rgba(90, 113, 134, .7);
}
.conn-dot.is-on { background: var(--teal); box-shadow: 0 0 8px var(--teal); }
.conn-dot.is-off { background: #6b3a45; box-shadow: 0 0 7px rgba(255, 77, 109, .6); }
.conn-dot.is-link { background: var(--warn); box-shadow: 0 0 8px var(--warn); animation: pulse 1.4s infinite; }

.lamp {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 9px;
  border: 1px solid var(--line);
  border-radius: 2px;
  background: rgba(4, 12, 22, .6);
  font-size: 10.5px;
  letter-spacing: .6px;
  color: var(--txt-2);
  white-space: nowrap;
}
.lamp-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #5a7186;
}
.lamp.is-run { color: #bff6ea; border-color: rgba(47, 230, 200, .3); }
.lamp.is-run .lamp-dot { background: var(--teal); box-shadow: 0 0 9px var(--teal); animation: pulse 1.6s infinite; }
.lamp.is-pause { color: #ffe2b0; border-color: rgba(255, 176, 32, .3); }
.lamp.is-pause .lamp-dot { background: var(--warn); box-shadow: 0 0 9px var(--warn); }
.lamp.is-end .lamp-dot { background: #8397a9; box-shadow: 0 0 7px rgba(131, 151, 169, .8); }
.lamp.is-idle .lamp-dot { background: #5a7186; }
.lamp.is-warn .lamp-dot { background: var(--crit); box-shadow: 0 0 9px var(--crit); animation: pulse 1s infinite; }

.btns { display: flex; align-items: center; gap: 6px; }

.btn {
  position: relative;
  height: 26px;
  padding: 0 10px;
  border: 1px solid rgba(63, 182, 255, .26);
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(63, 182, 255, .13), rgba(63, 182, 255, .04));
  color: #c8e4f8;
  font-size: 11px;
  letter-spacing: .4px;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color .16s, box-shadow .16s, color .16s, background .16s;
}
.btn:hover {
  border-color: rgba(63, 182, 255, .6);
  color: #fff;
  box-shadow: 0 0 16px -3px rgba(63, 182, 255, .6);
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .38; cursor: not-allowed; box-shadow: none; }
.btn-primary {
  border-color: rgba(63, 182, 255, .62);
  background: linear-gradient(180deg, rgba(63, 182, 255, .34), rgba(63, 182, 255, .10));
  color: #eafaff;
  font-weight: 600;
}
.btn-primary.is-run {
  border-color: rgba(255, 77, 109, .5);
  background: linear-gradient(180deg, rgba(255, 77, 109, .28), rgba(255, 77, 109, .08));
}
.btn-ai {
  border-color: rgba(47, 230, 200, .34);
  background: linear-gradient(180deg, rgba(47, 230, 200, .16), rgba(47, 230, 200, .04));
  color: #bff6ea;
}
.btn-ai:hover { box-shadow: 0 0 16px -3px rgba(47, 230, 200, .65); border-color: rgba(47, 230, 200, .7); }
.btn-ai.busy { opacity: .65; }
.btn-icon { display: grid; place-items: center; width: 30px; padding: 0; }
.btn-icon svg { width: 14px; height: 14px; }

.seg-speed {
  display: flex;
  border: 1px solid rgba(63, 182, 255, .2);
  border-radius: 2px;
  overflow: hidden;
}
.seg-speed button {
  height: 24px;
  padding: 0 7px;
  border: 0;
  border-left: 1px solid rgba(63, 182, 255, .14);
  background: transparent;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10.5px;
  cursor: pointer;
}
.seg-speed button:first-child { border-left: 0; }
.seg-speed button:hover { color: #dff4ff; background: rgba(63, 182, 255, .1); }
.seg-speed button.active {
  color: #eaf9ff;
  background: rgba(63, 182, 255, .24);
  text-shadow: 0 0 9px rgba(63, 182, 255, .8);
}

.drop { position: relative; }
.caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 4px;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-top: 4px solid currentColor;
  vertical-align: middle;
  opacity: .7;
}
.drop-menu {
  position: absolute;
  right: 0;
  top: 32px;
  z-index: 80;
  display: none;
  width: 224px;
  padding: 5px;
  border: 1px solid rgba(63, 182, 255, .38);
  border-radius: var(--r);
  background: linear-gradient(180deg, rgba(10, 26, 44, .98), rgba(5, 14, 25, .98));
  box-shadow: 0 22px 44px -14px #000, 0 0 0 1px rgba(0, 0, 0, .5), 0 0 26px -8px rgba(63, 182, 255, .5);
}
.drop-menu.open { display: block; }
.drop-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 6px 8px;
  border: 0;
  border-radius: 2px;
  background: transparent;
  color: var(--txt-2);
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}
.drop-item:hover { background: rgba(63, 182, 255, .12); color: #eaf6ff; }
.di-dot { width: 5px; height: 5px; border-radius: 50%; flex: 0 0 auto; }
.di-label { flex: 1 1 auto; }
.di-tag { font-size: 9px; color: var(--faint); }

/* ============================== 主体三栏 ============================== */

#layout {
  display: grid;
  grid-template-columns: clamp(300px, 17vw, 340px) minmax(0, 1fr) clamp(340px, 19vw, 382px);
  gap: var(--gap);
  padding: var(--gap);
  min-height: 0;
  min-width: 0;
}

.col {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
  min-height: 0;
  min-width: 0;
}

/* ---------- 地图区 ---------- */

.map-wrap {
  position: relative;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(63, 182, 255, .22);
  border-radius: var(--r);
  background: #03070d;
  box-shadow: inset 0 0 70px rgba(8, 30, 55, .6), 0 0 0 1px rgba(0, 0, 0, .55), 0 20px 50px -30px #000;
}
.map-wrap::before,
.map-wrap::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  z-index: 9;
  pointer-events: none;
  opacity: .8;
}
.map-wrap::before {
  left: 4px;
  top: 4px;
  border-left: 1px solid rgba(127, 228, 255, .8);
  border-top: 1px solid rgba(127, 228, 255, .8);
}
.map-wrap::after {
  right: 4px;
  bottom: 4px;
  border-right: 1px solid rgba(127, 228, 255, .55);
  border-bottom: 1px solid rgba(127, 228, 255, .55);
}

#cesiumContainer {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: transparent;
}
#cesiumContainer .cesium-viewer { position: absolute; inset: 0; }

/* 地图模块未就绪时的战术网格底衬（地图就绪后自动淡出） */
#mapBackdrop {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: .95;
  transition: opacity .8s ease;
  background:
    radial-gradient(circle at 50% 46%, rgba(18, 58, 94, .4), transparent 64%),
    repeating-linear-gradient(0deg, rgba(63, 182, 255, .055) 0 1px, transparent 1px 38px),
    repeating-linear-gradient(90deg, rgba(63, 182, 255, .05) 0 1px, transparent 1px 38px),
    linear-gradient(180deg, #050b13, #03070c);
}
.map-wrap.map-live #mapBackdrop { opacity: 0; }
#mapBackdrop .mb-svg { display: block; width: 100%; height: 100%; opacity: .8; }
.mb-tag {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding-right: 5px;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 5px;
  color: rgba(63, 182, 255, .26);
  white-space: nowrap;
}
.mb-coord {
  position: absolute;
  right: 14px;
  top: 104px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .5px;
  color: rgba(125, 150, 173, .55);
}

.map-head {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  z-index: 6;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 28px;
  padding: 0 10px;
  background: linear-gradient(180deg, rgba(4, 12, 22, .92), rgba(4, 12, 22, .38) 72%, transparent);
  border-bottom: 1px solid rgba(63, 182, 255, .1);
}
.mh-title {
  position: relative;
  padding-left: 9px;
  font-size: 11.5px;
  letter-spacing: .9px;
  color: #cfe9fb;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mh-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 11px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}
.mh-right {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: .5px;
  color: rgba(125, 150, 173, .92);
  white-space: nowrap;
}
.live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 8px var(--teal);
  animation: pulse 2s infinite;
}

.kpi-host {
  position: absolute;
  left: 10px;
  right: 10px;
  top: 34px;
  z-index: 5;
}
.kpi-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(63, 182, 255, .16);
  border-radius: var(--r);
  background: linear-gradient(180deg, rgba(9, 26, 44, .88), rgba(6, 16, 28, .74));
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 0 26px rgba(63, 182, 255, .06), 0 12px 26px -20px #000;
}
.kpi-cell {
  position: relative;
  min-width: 0;
  padding: 7px 10px 8px;
}
.kpi-cell + .kpi-cell { border-left: 1px solid rgba(63, 182, 255, .1); }
.kpi-idx {
  position: absolute;
  right: 7px;
  top: 5px;
  font-family: var(--mono);
  font-size: 8px;
  color: rgba(63, 182, 255, .42);
}
.kpi-lab {
  display: block;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 9.5px;
  letter-spacing: .4px;
  color: var(--dim);
}
.kpi-val {
  display: flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--mono);
}
.kpi-val b {
  font-size: 19px;
  font-weight: 600;
  line-height: 1;
  color: #e8f7ff;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 12px rgba(63, 182, 255, .45);
}
.kpi-val i { font-style: normal; font-size: 9px; color: var(--dim); }
.kpi-cell.tone-crit .kpi-val b { color: #ff7d94; text-shadow: 0 0 14px rgba(255, 77, 109, .6); }
.kpi-cell.tone-warn .kpi-val b { color: #ffc55c; text-shadow: 0 0 14px rgba(255, 176, 32, .5); }
.kpi-cell.tone-ok .kpi-val b { color: #7ff0dc; text-shadow: 0 0 14px rgba(47, 230, 200, .45); }

.map-tools {
  position: absolute;
  left: 10px;
  bottom: 10px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.seg {
  display: flex;
  overflow: hidden;
  border: 1px solid rgba(63, 182, 255, .24);
  border-radius: 2px;
  background: rgba(4, 12, 22, .74);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.seg-btn {
  height: 24px;
  min-width: 38px;
  padding: 0 8px;
  border: 0;
  border-left: 1px solid rgba(63, 182, 255, .14);
  background: transparent;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 10.5px;
  cursor: pointer;
}
.seg-btn:first-child { border-left: 0; }
.seg-btn:hover { color: #dff4ff; }
.seg-btn.active {
  color: #eaf9ff;
  background: rgba(63, 182, 255, .22);
  box-shadow: inset 0 0 12px rgba(63, 182, 255, .28);
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  max-width: 300px;
  padding: 5px 8px;
  border: 1px solid rgba(63, 182, 255, .14);
  border-radius: 2px;
  background: rgba(4, 12, 22, .68);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.lg {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 9.5px;
  color: var(--txt-2);
  white-space: nowrap;
}
.lg[hidden] { display: none; }
.lg i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 6px var(--c);
}
.lg i.sq { border-radius: 1px; }

.map-env {
  position: absolute;
  right: 10px;
  bottom: 10px;
  z-index: 5;
  max-width: 46%;
  padding: 5px 9px;
  border: 1px solid rgba(63, 182, 255, .14);
  border-radius: 2px;
  background: rgba(4, 12, 22, .68);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  font-family: var(--mono);
  font-size: 9.5px;
  line-height: 1.5;
  color: var(--dim);
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.map-hint {
  position: absolute;
  left: 50%;
  bottom: 52px;
  z-index: 6;
  transform: translateX(-50%);
  max-width: 88%;
  padding: 4px 11px 4px 9px;
  overflow: hidden;
  border: 1px dashed rgba(255, 176, 32, .35);
  border-radius: 2px;
  background: rgba(4, 12, 22, .78);
  font-size: 10px;
  color: rgba(255, 197, 92, .92);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.map-hint[hidden] { display: none; }
.map-hint::before { content: "! "; font-family: var(--mono); opacity: .8; }

.wait-mask {
  position: absolute;
  inset: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, rgba(4, 10, 18, .4), rgba(3, 7, 12, .74));
  opacity: 0;
  visibility: hidden;
  transition: opacity .4s ease, visibility .4s;
}
.wait-mask.show { opacity: 1; visibility: visible; }
.wm-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: 24px 38px;
  border: 1px dashed rgba(63, 182, 255, .3);
  border-radius: 4px;
  background: rgba(5, 14, 25, .74);
  box-shadow: inset 0 0 40px rgba(63, 182, 255, .06), 0 24px 60px -30px #000;
}
.wm-ring {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(63, 182, 255, .22);
  border-top-color: var(--cyan);
  border-radius: 50%;
  box-shadow: 0 0 24px -6px rgba(63, 182, 255, .8);
  animation: spin 1.7s linear infinite;
}
.wm-box p {
  margin: 0;
  font-size: 14px;
  letter-spacing: 5px;
  color: #bcd8ee;
  text-shadow: 0 0 16px rgba(63, 182, 255, .35);
}
.wm-box span {
  font-size: 10px;
  letter-spacing: .8px;
  color: var(--dim);
}

/* AI 推演浮层 */
.ai-float {
  position: absolute;
  right: 10px;
  bottom: 46px;
  z-index: 8;
  width: 330px;
  max-width: calc(100% - 20px);
  overflow: hidden;
  border: 1px solid rgba(47, 230, 200, .35);
  border-radius: var(--r);
  background: linear-gradient(180deg, rgba(8, 30, 42, .97), rgba(4, 14, 24, .97));
  box-shadow: 0 24px 54px -20px #000, inset 0 0 34px rgba(47, 230, 200, .07);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity .26s, transform .26s, visibility .26s;
}
.ai-float.show { opacity: 1; visibility: visible; transform: none; }
.ai-float header {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border-bottom: 1px solid rgba(47, 230, 200, .18);
  font-size: 11px;
  color: #c9f8ee;
}
.ai-ico {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border: 1px solid rgba(47, 230, 200, .45);
  border-radius: 2px;
  background: rgba(47, 230, 200, .16);
  font-family: var(--mono);
  font-size: 8px;
  font-style: normal;
  color: #7ff0dc;
}
.ai-tag { margin-left: auto; font-family: var(--mono); font-size: 9px; color: rgba(125, 150, 173, .9); }
.ai-close {
  border: 0;
  background: none;
  color: var(--dim);
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}
.ai-close:hover { color: #fff; }
.ai-reason { margin: 8px 10px 6px; font-size: 10.5px; line-height: 1.55; color: var(--txt-2); }
.ai-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 158px;
  margin: 0;
  padding: 0 10px 10px;
  overflow-y: auto;
  list-style: none;
}
.ai-act { display: flex; gap: 7px; font-size: 10.5px; line-height: 1.4; color: #cfe6f6; }
.ai-idx { padding-top: 1px; font-family: var(--mono); font-size: 9px; color: rgba(47, 230, 200, .8); }
.ai-empty { font-size: 10.5px; color: var(--faint); }

/* ============================== 面板 ============================== */

.panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(180deg, var(--panel-a), var(--panel-b));
  box-shadow: inset 0 0 34px rgba(63, 182, 255, .05), 0 14px 30px -26px #000;
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
  transition: opacity .3s, filter .3s;
}
.panel::before,
.panel::after {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  pointer-events: none;
  opacity: .75;
  z-index: 2;
}
.panel::before {
  left: -1px;
  top: -1px;
  border-left: 1px solid rgba(127, 228, 255, .7);
  border-top: 1px solid rgba(127, 228, 255, .7);
}
.panel::after {
  right: -1px;
  bottom: -1px;
  border-right: 1px solid rgba(63, 182, 255, .5);
  border-bottom: 1px solid rgba(63, 182, 255, .5);
}

.panel-hd {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 0 0 auto;
  min-width: 0;
  padding: 7px 9px 6px;
  border-bottom: 1px solid rgba(63, 182, 255, .12);
  background: linear-gradient(90deg, rgba(63, 182, 255, .1), rgba(63, 182, 255, 0) 62%);
}
.ph-bar {
  flex: 0 0 auto;
  width: 2px;
  height: 11px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}
.ph-title {
  flex: 0 1 auto;
  margin: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .7px;
  color: #dcecf9;
}
.ph-meta {
  flex: 0 0 auto;
  margin-left: auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 9px;
  color: rgba(125, 150, 173, .88);
}
.ph-ic { display: flex; flex: 0 0 auto; color: rgba(63, 182, 255, .55); }
.ph-ic .ic { width: 13px; height: 13px; }

.panel-bd {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  padding: 7px 8px 8px;
  overflow: hidden;
}

/* ---------- 表格 ---------- */

.dt {
  position: relative;
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}
.dt-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(63, 182, 255, .28) transparent;
}
.dt table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.dt th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 0 4px 4px;
  overflow: hidden;
  border-bottom: 1px solid rgba(63, 182, 255, .14);
  background: #071626;
  font-size: 9.5px;
  font-weight: 400;
  letter-spacing: .3px;
  color: rgba(125, 150, 173, .95);
  text-align: left;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.dt th:first-child { padding-left: 5px; }
.dt td {
  padding: 4px;
  overflow: hidden;
  border-bottom: 1px solid rgba(63, 182, 255, .055);
  font-size: 10.5px;
  color: #c7dced;
  white-space: nowrap;
  text-overflow: ellipsis;
  vertical-align: middle;
}
.dt td:first-child { padding-left: 5px; }
.dt tbody tr:hover td { background: rgba(63, 182, 255, .07); }
.dt td.a-right { text-align: right; }
.dt td.t-mono .v,
.dt td.t-num .v { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.dt td.t-num .v { color: #dff0ff; }
.dt td.t-badge .v { font-size: 10px; }
.dt td.a-right .pc { justify-content: flex-end; }

.dt .v {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.bdot {
  display: inline-block;
  width: 4px;
  height: 4px;
  margin-right: 4px;
  border-radius: 50%;
  background: currentColor;
  vertical-align: middle;
  box-shadow: 0 0 6px currentColor;
}
.dt td.tone-ok { color: #7ff0dc; }
.dt td.tone-warn { color: #ffc55c; }
.dt td.tone-crit { color: #ff8a9e; }
.dt td.tone-info { color: #8fd6ff; }
.dt td.tone-dim { color: #8ba1b5; }
.dt td.best { color: #7ff0dc; background: rgba(47, 230, 200, .06); }

/* 预案收益对比块 */
.plan-delta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 2px 0 4px;
}
.pd {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 8px;
  border: 1px solid rgba(47, 230, 200, .16);
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(47, 230, 200, .07), transparent);
}
.pd-k {
  font-size: 9px;
  letter-spacing: .3px;
  color: var(--dim);
  white-space: nowrap;
}
.pd-v { display: flex; align-items: baseline; gap: 3px; }
.pd-v b {
  font-family: var(--mono);
  font-size: 16px;
  font-weight: 600;
  color: #7ff0dc;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 12px rgba(47, 230, 200, .4);
}
.pd-v i { font-style: normal; font-size: 9px; color: var(--faint); }
.flex-spacer { flex: 1 1 auto; min-height: 0; }

.pc {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.pbar {
  flex: 1 1 auto;
  min-width: 14px;
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(63, 182, 255, .13);
}
.pbar i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 2px;
  background: linear-gradient(90deg, #2b8fd8, #3fe0d0);
  box-shadow: 0 0 8px rgba(63, 224, 208, .6);
  transition: width .35s ease;
}
.pbar-lg { height: 6px; }
.pc .pv,
.dt .pv {
  flex: 0 0 auto;
  width: 27px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 400;
  color: var(--dim);
  text-align: right;
}

.dt-empty {
  position: absolute;
  left: 0;
  right: 0;
  top: 24px;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  color: var(--faint);
}.dt-empty[hidden] { display: none; }

/* 表格底部汇总条 */
.dt-foot {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 3px 12px;
  padding-top: 5px;
  border-top: 1px solid rgba(63, 182, 255, .12);
}
.df {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-size: 9px;
  color: var(--dim);
  white-space: nowrap;
}
.df-k { color: var(--faint); }
.df-v {
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  color: #cfe9fb;
}
.df.tone-ok .df-v { color: #7ff0dc; }
.df.tone-warn .df-v { color: #ffc55c; }
.df.tone-info .df-v { color: #8fd6ff; }
.df.tone-crit .df-v { color: #ff8a9e; }
.dt-skel {
  position: absolute;
  left: 0;
  right: 0;
  top: 24px;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0 4px;
  overflow: hidden;
}
.dt-skel[hidden] { display: none; }
.sk-row {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 24px;
  padding: 0 1px;
  border-bottom: 1px solid rgba(63, 182, 255, .05);
}
.sk-cell {
  display: block;
  flex: 1 1 0;
  height: 6px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(63, 182, 255, .07), rgba(63, 182, 255, .22), rgba(63, 182, 255, .07));
  background-size: 220% 100%;
  animation: skmove 2.2s linear infinite;
}
@keyframes skmove {
  0% { background-position: 180% 0; }
  100% { background-position: -80% 0; }
}

/* ---------- 骨架屏 / 空态 ---------- */

.skel {
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.skel-line {
  position: relative;
  height: 9px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(63, 182, 255, .075);
}
.skel-bar {
  position: absolute;
  inset: 0;
  width: 45%;
  background: linear-gradient(90deg, transparent, rgba(63, 182, 255, .3), transparent);
  animation: shimmer 1.9s infinite;
}
.feed-skel {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 2px 2px;
  overflow: hidden;
}
.sk-feed-row {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 8px 3px;
  border-bottom: 1px solid rgba(63, 182, 255, .05);
}
.sk-feed-dot {
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  margin-top: 4px;
  border-radius: 50%;
  background: rgba(63, 182, 255, .28);
}
.sk-feed-lines {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}
.sk-feed-l1,
.sk-feed-l2 {
  display: block;
  height: 7px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(63, 182, 255, .07), rgba(63, 182, 255, .2), rgba(63, 182, 255, .07));
  background-size: 220% 100%;
  animation: skmove 2.2s linear infinite;
}
.sk-feed-l2 {
  width: 34%;
  height: 5px;
  opacity: .6;
}
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 10px;
  color: var(--faint);
}
.empty-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(63, 182, 255, .5);
  box-shadow: 0 0 8px rgba(63, 182, 255, .6);
}
.empty-t { margin: 0; font-size: 10.5px; }
.empty-s { margin: 0; font-size: 9px; opacity: .75; }

/* ---------- 事件流 ---------- */

.feed {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 1px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(63, 182, 255, .28) transparent;
}
.feed-item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 6px 6px 6px 8px;
  border-bottom: 1px solid rgba(63, 182, 255, .06);
  border-left: 2px solid transparent;
}
.feed-item:hover { background: rgba(63, 182, 255, .05); }
.feed-item.tone-crit {
  border-left-color: rgba(255, 77, 109, .85);
  background: linear-gradient(90deg, rgba(255, 77, 109, .1), transparent 55%);
}
.feed-item.tone-warn {
  border-left-color: rgba(255, 176, 32, .8);
  background: linear-gradient(90deg, rgba(255, 176, 32, .08), transparent 55%);
}
.feed-item.tone-info { border-left-color: rgba(63, 182, 255, .6); }
.feed-item.tone-ok { border-left-color: rgba(47, 230, 200, .6); }
.feed-item.is-handled { opacity: .55; }
.feed-item.tone-crit .fi-dot { color: #ff4d6d; }
.feed-item.tone-warn .fi-dot { color: #ffb020; }
.feed-item.tone-info .fi-dot { color: #3fb6ff; }
.feed-item.tone-ok .fi-dot { color: #2fe6c8; }
.fi-dot {
  flex: 0 0 auto;
  width: 5px;
  height: 5px;
  margin-top: 4px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 7px currentColor;
}
.fi-main {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.fi-line {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.fi-time {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 9px;
  color: rgba(125, 150, 173, .9);
}
.fi-txt {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10.5px;
  color: #cfe4f4;
}
.fi-sub {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .3px;
  color: var(--faint);
}
.fi-tag {
  flex: 0 0 auto;
  margin-top: 1px;
  padding: 1px 4px;
  border: 1px solid rgba(63, 182, 255, .2);
  border-radius: 2px;
  font-size: 8.5px;
  color: var(--dim);
  white-space: nowrap;
}
.fi-tag[hidden] { display: none; }

/* ---------- 维度条 ---------- */

.dims {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 6px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
}
.dim {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 3px 6px;
}
.dim-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  color: var(--txt-2);
}
.dim-val {
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 400;
  color: #dff0ff;
  font-variant-numeric: tabular-nums;
}
.dim-bar {
  grid-column: 1 / 3;
  height: 3px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(63, 182, 255, .12);
}
.dim-bar i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #2b8fd8, #3fb6ff);
  box-shadow: 0 0 7px rgba(63, 182, 255, .6);
  transition: width .4s ease;
}
.dim.tone-ok .dim-bar i { background: linear-gradient(90deg, #1a9d8a, #2fe6c8); box-shadow: 0 0 7px rgba(47, 230, 200, .6); }
.dim.tone-warn .dim-bar i { background: linear-gradient(90deg, #b57a12, #ffb020); box-shadow: 0 0 7px rgba(255, 176, 32, .55); }
.dim.tone-crit .dim-bar i { background: linear-gradient(90deg, #b5324c, #ff4d6d); box-shadow: 0 0 7px rgba(255, 77, 109, .55); }

/* ---------- 评分 ---------- */

.score-wrap {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
}
.score-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
  padding: 1px 2px 6px;
  border-bottom: 1px solid rgba(63, 182, 255, .1);
}
.score-main { display: flex; align-items: baseline; gap: 3px; }
.score-num {
  font-family: var(--mono);
  font-size: 34px;
  font-weight: 600;
  line-height: .9;
  color: #7ff0dc;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 22px rgba(47, 230, 200, .45);
}
.score-unit { font-size: 9px; color: var(--dim); }
.score-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}
.score-level {
  padding: 1px 6px;
  border: 1px solid rgba(47, 230, 200, .35);
  border-radius: 2px;
  background: rgba(47, 230, 200, .08);
  font-size: 10.5px;
  color: #7ff0dc;
}
.stars {
  font-size: 10px;
  letter-spacing: 2px;
  color: #ffb020;
  text-shadow: 0 0 8px rgba(255, 176, 32, .5);
}
.dims-host { display: flex; flex: 1 1 auto; min-height: 0; }
.dims-host .dims { flex: 1 1 auto; }

/* ---------- Canvas ---------- */

.canvas-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
}
.canvas-wrap canvas {
  position: absolute;
  inset: 0;
  display: block;
}
.radar-cap {
  flex: 0 0 auto;
  padding-bottom: 1px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: .4px;
  color: var(--faint);
  text-align: center;
}

/* ---------- 训练曲线 ---------- */

.curve-bar {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  min-width: 0;
}
.chip {
  height: 19px;
  padding: 0 7px;
  border: 1px solid rgba(63, 182, 255, .2);
  border-radius: 2px;
  background: transparent;
  color: var(--dim);
  font-size: 9.5px;
  cursor: pointer;
}
.chip:hover { color: #dff4ff; }
.chip.active {
  border-color: rgba(63, 182, 255, .55);
  background: rgba(63, 182, 255, .16);
  color: #dff4ff;
}
.curve-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-left: auto;
  overflow: hidden;
}
.cl-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 9px;
  color: var(--txt-2);
  white-space: nowrap;
}
.cl-item i { width: 5px; height: 5px; border-radius: 50%; flex: 0 0 auto; }
.cl-item b { font-family: var(--mono); font-weight: 400; color: #cfe9fb; }

/* ---------- 自博弈 ---------- */

.selfplay-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 1px 0;
}
.sp-side {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 76px;
  padding: 4px 8px;
  border: 1px solid rgba(63, 182, 255, .18);
  border-radius: 2px;
}
.sp-side.blue { background: linear-gradient(180deg, rgba(63, 182, 255, .13), transparent); }
.sp-side.red {
  align-items: flex-end;
  border-color: rgba(255, 77, 109, .22);
  background: linear-gradient(180deg, rgba(255, 77, 109, .13), transparent);
}
.sp-lab { font-size: 8.5px; color: var(--dim); }
.sp-val { font-family: var(--mono); font-size: 14px; font-weight: 600; color: #dff4ff; }
.sp-vs { font-family: var(--mono); font-size: 9px; letter-spacing: 1px; color: var(--faint); }
.sp-roundbar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 2px 0;
}
.sp-roundlab { flex: 0 0 auto; font-size: 9.5px; color: var(--dim); }
.sp-roundbar .pbar { flex: 1 1 auto; height: 4px; }
.sp-roundpct {
  flex: 0 0 auto;
  width: 30px;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 400;
  color: #8fd6ff;
  text-align: right;
}
.sp-prog { margin-top: auto; }
.sp-note {
  padding: 1px 0 2px;
  font-size: 9px;
  letter-spacing: .3px;
  color: var(--faint);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sp-bar {
  display: flex;
  height: 6px;
  overflow: hidden;
  border-radius: 3px;
  background: rgba(63, 182, 255, .1);
}
.sp-bar i { display: block; height: 100%; transition: width .4s ease; }
.sp-bar .sp-a { background: linear-gradient(90deg, #2b8fd8, #3fb6ff); box-shadow: 0 0 8px rgba(63, 182, 255, .6); }
.sp-bar .sp-b { background: linear-gradient(90deg, #ff8a9e, #ff4d6d); box-shadow: 0 0 8px rgba(255, 77, 109, .55); }
.sp-rounds {
  margin-top: 5px;
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--dim);
  text-align: center;
}

/* ---------- 红蓝兵力 ---------- */

.forces {
  display: grid;
  flex: 1 1 auto;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  min-height: 0;
}
.force-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}
.force-hd {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 5px;
  padding: 4px 6px;
  border: 1px solid rgba(63, 182, 255, .16);
  border-radius: 2px;
  font-size: 10px;
  color: var(--txt-2);
  white-space: nowrap;
}
.force-col.blue .force-hd { background: linear-gradient(90deg, rgba(63, 182, 255, .18), transparent); }
.force-col.red .force-hd {
  border-color: rgba(255, 77, 109, .2);
  background: linear-gradient(90deg, rgba(255, 77, 109, .18), transparent);
}
.side-dot { flex: 0 0 auto; width: 5px; height: 5px; border-radius: 50%; }
.force-col.blue .side-dot { background: #3fb6ff; box-shadow: 0 0 7px #3fb6ff; }
.force-col.red .side-dot { background: #ff4d6d; box-shadow: 0 0 7px #ff4d6d; }
.force-name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; }
.force-cnt { font-family: var(--mono); font-size: 11px; color: #dff4ff; }
.force-list {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 1px;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-width: thin;
}
.force-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 1px 4px;
  padding: 5px 2px;
  border-bottom: 1px solid rgba(63, 182, 255, .05);
}
.force-type {
  grid-column: 1;
  grid-row: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 8.5px;
  color: var(--faint);
}
.force-status { grid-column: 2; grid-row: 1; justify-self: end; font-size: 8.5px; }
.force-unit {
  grid-column: 1;
  grid-row: 2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 9.5px;
  color: #cfe4f4;
}
.force-qty {
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 400;
  color: var(--dim);
}
.force-status.tone-ok { color: #7ff0dc; }
.force-status.tone-warn { color: #ffc55c; }
.force-status.tone-crit { color: #ff8a9e; }
.force-status.tone-dim { color: var(--faint); }
.force-empty { padding: 6px 2px; font-size: 9.5px; color: var(--faint); }

/* ---------- 训练任务卡 ---------- */

.train {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 7px;
  min-height: 0;
}
.train-top { display: flex; align-items: center; gap: 6px; min-width: 0; }
.train-name {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  font-weight: 600;
  color: #dcecf9;
}
.train-bar { display: flex; align-items: center; gap: 6px; }
.train-bar .pbar { flex: 1 1 auto; height: 6px; }
.train-pv {
  width: 32px;
  font-family: var(--mono);
  font-size: 10px;
  color: #8fd6ff;
  text-align: right;
}
.train-meta {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 9px;
  color: var(--dim);
}
.train-ind { display: flex; flex: 1 1 auto; min-height: 0; }
.train-ind .dims { flex: 1 1 auto; gap: 9px; }
.train-ind .dim-bar { height: 4px; }

.tag {
  padding: 1px 5px;
  border: 1px solid currentColor;
  border-radius: 2px;
  font-size: 8.5px;
  white-space: nowrap;
}
.tag.tone-info { color: #8fd6ff; background: rgba(63, 182, 255, .1); }
.tag.tone-ok { color: #7ff0dc; background: rgba(47, 230, 200, .1); }
.tag.tone-warn { color: #ffc55c; background: rgba(255, 176, 32, .1); }
.tag.tone-crit { color: #ff8a9e; background: rgba(255, 77, 109, .1); }
.tag.tone-dim { color: var(--dim); border-color: rgba(125, 150, 173, .3); }

.comm-legend {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 4px 9px;
  justify-content: center;
}

/* ---------- 进度列表（通用） ---------- */

.plist {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  overflow-y: auto;
}
.prow { display: flex; flex-direction: column; gap: 3px; }
.prow-top { display: flex; align-items: baseline; gap: 6px; }
.pname {
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 10px;
  color: var(--txt-2);
}
.pnote { font-family: var(--mono); font-size: 8.5px; color: var(--faint); }
.pval {
  flex: 0 0 auto;
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 400;
  color: #dff0ff;
}

/* ============================== 时间轴 ============================== */

#timelineBar {
  position: relative;
  z-index: 20;
  min-width: 0;
  height: 84px;
  padding: 0 10px 10px;
}

.tl {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
  padding: 7px 10px 8px;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: linear-gradient(180deg, rgba(10, 26, 44, .84), rgba(5, 13, 24, .8));
  box-shadow: inset 0 0 30px rgba(63, 182, 255, .05), 0 16px 34px -30px #000;
  -webkit-backdrop-filter: blur(9px);
  backdrop-filter: blur(9px);
}
.tl-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tl-label {
  position: relative;
  padding-left: 8px;
  font-size: 10.5px;
  letter-spacing: .6px;
  color: #cfe4f4;
  white-space: nowrap;
}
.tl-label::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2px;
  height: 10px;
  background: var(--cyan);
  box-shadow: 0 0 7px var(--cyan);
}
.tl-time {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--dim);
  white-space: nowrap;
}
.tl-track {
  position: relative;
  flex: 1 1 auto;
  min-width: 60px;
  height: 20px;
  cursor: pointer;
  touch-action: none;
}
.tl-rail {
  position: absolute;
  left: 0;
  right: 0;
  top: 8px;
  height: 4px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(63, 182, 255, .13);
}
.tl-fill {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, #1f6ea8, #3fb6ff, #2fe6c8);
  box-shadow: 0 0 10px rgba(63, 182, 255, .6);
}
.tl-markers { position: absolute; left: 0; right: 0; top: 0; height: 8px; }
.tl-marker {
  position: absolute;
  top: 0;
  width: 2px;
  height: 8px;
  border-radius: 1px;
  transform: translateX(-1px);
  cursor: pointer;
}
.tl-marker::after {
  content: attr(data-tip);
  position: absolute;
  left: 50%;
  bottom: 12px;
  z-index: 30;
  transform: translateX(-50%);
  padding: 3px 6px;
  border: 1px solid rgba(63, 182, 255, .35);
  border-radius: 2px;
  background: rgba(4, 12, 22, .97);
  color: #dff4ff;
  font-family: var(--ui);
  font-size: 9.5px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
}
.tl-marker:hover::after { opacity: 1; }
.tl-cursor {
  position: absolute;
  top: 2px;
  bottom: 0;
  width: 0;
  border-left: 1px solid #9be7ff;
  box-shadow: 0 0 10px rgba(155, 231, 255, .8);
  transform: translateX(-.5px);
  pointer-events: none;
}
.tl-cursor i {
  position: absolute;
  left: -3.5px;
  top: -3px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #9be7ff;
  box-shadow: 0 0 10px #3fb6ff;
}
.tl-cur {
  min-width: 64px;
  font-family: var(--mono);
  font-size: 11px;
  color: #9be7ff;
  text-align: right;
  text-shadow: 0 0 10px rgba(63, 182, 255, .6);
  font-variant-numeric: tabular-nums;
}
.tl-ctl { gap: 6px; }
.tl-btn {
  display: grid;
  place-items: center;
  width: 24px;
  height: 22px;
  border: 1px solid rgba(63, 182, 255, .22);
  border-radius: 2px;
  background: rgba(63, 182, 255, .08);
  color: #bcd8ee;
  cursor: pointer;
}
.tl-btn:hover { border-color: rgba(63, 182, 255, .55); color: #fff; }
.tl-btn.active {
  border-color: rgba(63, 182, 255, .55);
  background: rgba(63, 182, 255, .24);
  color: #eaf9ff;
  box-shadow: 0 0 12px -2px rgba(63, 182, 255, .6);
}
.tl-speeds {
  display: flex;
  overflow: hidden;
  border: 1px solid rgba(63, 182, 255, .18);
  border-radius: 2px;
}
.tl-sp {
  height: 20px;
  padding: 0 7px;
  border: 0;
  border-left: 1px solid rgba(63, 182, 255, .12);
  background: transparent;
  color: var(--dim);
  font-family: var(--mono);
  font-size: 9.5px;
  cursor: pointer;
}
.tl-sp:first-child { border-left: 0; }
.tl-sp:hover { color: #dff4ff; }
.tl-sp.active { color: #dff4ff; background: rgba(63, 182, 255, .2); }
.tl-spacer { flex: 1 1 auto; }
.tl-legend { display: flex; align-items: center; gap: 8px; }
.tl-lg { display: flex; align-items: center; gap: 4px; font-size: 9px; color: var(--dim); }
.tl-lg i { width: 5px; height: 5px; border-radius: 50%; }
.tl-prog {
  font-family: var(--mono);
  font-size: 9.5px;
  color: var(--dim);
  white-space: nowrap;
}

/* ============================== Toast ============================== */

.toasts {
  position: fixed;
  left: 50%;
  bottom: 98px;
  z-index: 99;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border: 1px solid rgba(63, 182, 255, .35);
  border-radius: 2px;
  background: rgba(6, 18, 32, .96);
  box-shadow: 0 16px 32px -16px #000, 0 0 0 1px rgba(0, 0, 0, .45), 0 0 22px -10px rgba(63, 182, 255, .6);
  font-size: 11px;
  color: #dcecf9;
  animation: toastIn .22s ease-out;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.toast.out { opacity: 0; transform: translateY(4px); transition: opacity .3s, transform .3s; }
.toast-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 8px var(--cyan); }
.toast.t-ok .toast-dot { background: var(--teal); box-shadow: 0 0 8px var(--teal); }
.toast.t-ok { border-color: rgba(47, 230, 200, .38); }
.toast.t-warn { border-color: rgba(255, 176, 32, .42); }
.toast.t-warn .toast-dot { background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.toast.t-crit { border-color: rgba(255, 77, 109, .48); }
.toast.t-crit .toast-dot { background: var(--crit); box-shadow: 0 0 8px var(--crit); }

/* ============================== 状态 / 动效 ============================== */

body.is-stale .panel { opacity: .88; filter: saturate(.7); }
body.is-stale .kpi-strip { opacity: .9; }
body.is-fullscreen .topbar { height: 58px; }

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer {
  0% { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

/* 滚动条 */
*::-webkit-scrollbar { width: 4px; height: 4px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { border-radius: 2px; background: rgba(63, 182, 255, .26); }
*::-webkit-scrollbar-thumb:hover { background: rgba(63, 182, 255, .48); }

/* ============================== 响应式 ============================== */

@media (max-width: 1600px) {
  .brand h1 { font-size: 16px; letter-spacing: .5px; }
  .brand p { letter-spacing: 1.8px; }
  .tab { padding: 4px 9px 5px; }
  .tab em { font-size: 10.5px; }
  .clock-sim { font-size: 18px; }
  .btn { padding: 0 8px; font-size: 10.5px; }
  .kpi-cell { padding: 6px 8px 7px; }
  .kpi-val b { font-size: 18px; }
}

@media (max-width: 1440px) {
  .brand p { display: none; }
  .brand h1 { font-size: 15px; }
  .tab span { display: none; }
  .tab { padding: 6px 10px; }
  .clock-run { display: none; }
  .lamp { padding: 4px 7px; font-size: 10px; }
  .seg-speed button { padding: 0 5px; }
  .btn { padding: 0 7px; }
  .ph-title { font-size: 11px; }
  .tl-legend { display: none; }
  #layout { gap: 8px; padding: 8px; }
  .col { gap: 8px; }
  .legend { max-width: 250px; }
  .map-env { max-width: 44%; }
}

@media (max-height: 820px) {
  #app { grid-template-rows: 52px minmax(0, 1fr) 76px; }
  #timelineBar { height: 76px; padding: 0 8px 8px; }
  .tl { padding: 4px 9px 5px; }
  .kpi-cell { padding: 5px 8px 6px; }
  .kpi-val b { font-size: 17px; }
  .panel-hd { padding: 5px 8px 5px; }
  .panel-bd { padding: 5px 7px 6px; }
  .score-num { font-size: 28px; }
  .tl-track { height: 17px; }
  .tl-rail { top: 7px; }
  .toasts { bottom: 86px; }
}

@media (max-width: 1200px) {
  #layout {
    grid-template-columns: 260px minmax(0, 1fr) 300px;
  }
  .logo { width: 28px; height: 32px; }
  .brand h1 { font-size: 13.5px; }
  .btn-report { display: none; }
  .map-env { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
