/* ============================================================
   客户管理系统 · 宇宙星际主题 v3
   "宇宙的感觉 + 动态效果 + 交互" —— 星云战场数据大屏
   - 深空星云背景 + 旋转星系 + 流星
   - 3D tilt 卡片（鼠标跟随倾斜）
   - 卡片光晕跟随鼠标 (spotlight)
   - 扫描线 / 能量流动 / 粒子跃迁
   ============================================================ */
:root {
  --space0: #020208;
  --space1: #06061d;
  --space2: #0d1035;
  --card: rgba(15, 18, 55, 0.72);
  --card-line: rgba(120, 140, 255, 0.18);
  --text: #eef2ff;
  --muted: #93a2d0;
  --gold: #ffc93c;
  --gold2: #ffe9a8;
  --cyan: #41e6ff;
  --pink: #ff4f9e;
  --purple: #a06bff;
  --green: #41ffb0;
  --red: #ff4d6b;
  --orange: #ffab40;
  --blue: #5aa2ff;
  --neptune: #7fe7ff;
}
* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "HarmonyOS Sans SC", sans-serif;
  color: var(--text);
  min-height: 100vh;
  background:
    radial-gradient(1400px 900px at 85% -10%, rgba(96, 45, 160, .35) 0%, transparent 55%),
    radial-gradient(1200px 800px at -10% 30%, rgba(20, 80, 180, .3) 0%, transparent 55%),
    radial-gradient(1000px 1000px at 60% 120%, rgba(160, 40, 120, .22) 0%, transparent 55%),
    var(--space0);
  position: relative;
  overflow-x: hidden;
}

/* 星云流动层 */
body::before {
  content: ""; position: fixed; inset: -20%; z-index: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 60% 40% at 20% 20%, rgba(80, 120, 255, .15), transparent 60%),
    radial-gradient(ellipse 50% 35% at 75% 30%, rgba(255, 100, 200, .10), transparent 65%),
    radial-gradient(ellipse 60% 45% at 50% 90%, rgba(60, 220, 255, .12), transparent 60%);
  animation: nebulaDrift 26s ease-in-out infinite alternate;
  filter: blur(30px);
}
@keyframes nebulaDrift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-3%, 2%) scale(1.06); }
  100% { transform: translate(3%, -2%) scale(1.04); }
}

/* 扫描线层 */
body::after {
  content: ""; position: fixed; left: 0; right: 0; height: 220px; z-index: 3;
  pointer-events: none; mix-blend-mode: screen;
  background: linear-gradient(180deg, transparent, rgba(90, 162, 255, .05), rgba(90, 162, 255, .08), transparent);
  animation: scanMove 7s linear infinite;
}
@keyframes scanMove { 0% { top: -220px; } 100% { top: 110vh; } }

#bgfx { position: fixed; inset: 0; z-index: 1; pointer-events: none; }
.wrap { position: relative; z-index: 5; padding: 16px 20px; max-width: 1500px; margin: 0 auto; }
a { color: var(--cyan); text-decoration: none; }

/* ---------- 游戏化：赛博朋克 HUD ---------- */
/* 屏幕四角 L 形发光角框 */
.hud-corner {
  position: fixed; width: 46px; height: 46px; z-index: 120;
  pointer-events: none; opacity: .85;
  animation: hudCornerPulse 2.6s ease-in-out infinite;
}
.hud-corner.tl { top: 10px; left: 10px; border-top: 2px solid var(--cyan); border-left: 2px solid var(--cyan); box-shadow: -2px -2px 12px rgba(65,230,255,.4); border-radius: 8px 0 0 0; }
.hud-corner.tr { top: 10px; right: 10px; border-top: 2px solid var(--cyan); border-right: 2px solid var(--cyan); box-shadow: 2px -2px 12px rgba(65,230,255,.4); border-radius: 0 8px 0 0; }
.hud-corner.bl { bottom: 10px; left: 10px; border-bottom: 2px solid var(--gold); border-left: 2px solid var(--gold); box-shadow: -2px 2px 12px rgba(255,201,60,.4); border-radius: 0 0 0 8px; }
.hud-corner.br { bottom: 10px; right: 10px; border-bottom: 2px solid var(--gold); border-right: 2px solid var(--gold); box-shadow: 2px 2px 12px rgba(255,201,60,.4); border-radius: 0 0 8px 0; }
@keyframes hudCornerPulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }

/* 游戏启动画面（Boot Screen） */
.boot-screen {
  position: fixed; inset: 0; z-index: 400; display: flex;
  align-items: center; justify-content: center; flex-direction: column;
  background: radial-gradient(1200px 700px at 50% 30%, rgba(20,30,90,.55), #020208 75%);
  backdrop-filter: blur(4px);
  transition: opacity .55s ease, visibility .55s;
}
.boot-screen.done { opacity: 0; visibility: hidden; pointer-events: none; }
.boot-logo {
  font-size: 30px; font-weight: 900; letter-spacing: 8px; color: var(--gold2);
  text-shadow: 0 0 30px rgba(255,201,60,.8);
  animation: logoBreath 1.6s ease-in-out infinite;
  margin-bottom: 22px;
}
@keyframes logoBreath { 0%,100% { opacity: .6; filter: blur(0); } 50% { opacity: 1; filter: blur(.5px); } }
.boot-bar-wrap {
  width: 300px; height: 8px; background: rgba(90,162,255,.12);
  border: 1px solid rgba(120,140,255,.35); border-radius: 6px; overflow: hidden;
}
.boot-bar { height: 100%; width: 0%; border-radius: 6px;
  background: linear-gradient(90deg, var(--cyan), var(--gold));
  box-shadow: 0 0 16px rgba(65,230,255,.6);
  transition: width .12s linear; }
.boot-text { margin-top: 14px; font-size: 12px; color: var(--muted);
  font-family: "Consolas", monospace; letter-spacing: 3px; }
.boot-text .ok { color: var(--green); }
.boot-text .warn { color: var(--gold); }

/* 终端打字（状态行） */
.term {
  font-family: "Consolas", "Courier New", monospace; font-size: 11px;
  color: var(--cyan); letter-spacing: 1.5px; line-height: 1.7;
}
.term .cursor { display: inline-block; width: 8px; height: 12px; background: var(--cyan);
  vertical-align: -2px; animation: cursorBlink .9s step-end infinite; }
@keyframes cursorBlink { 0%,100% { opacity: 1; } 50% { opacity: 0; } }

/* 游戏化导航：任务/关卡感 */
.nav a .key-hint {
  font-size: 9px; opacity: .6; margin-left: 3px; font-family: monospace; color: var(--gold);
}

/* 数据行游戏化：进度血条 hover */
tr.clickable td .hp {
  height: 4px; width: 90px; background: rgba(120,140,255,.12); border-radius: 3px; overflow: hidden; display: inline-block; vertical-align: middle; margin-left: 7px;
}
tr.clickable td .hp i { display: block; height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--gold), var(--cyan)); box-shadow: 0 0 7px var(--cyan); }

/* 主按钮机器人扫描 */
button.primary::after {
  content: ""; position: absolute; inset: 0; border-radius: 11px;
  background: linear-gradient(100deg, transparent 30%, rgba(255,255,255,.5) 50%, transparent 70%);
  transform: translateX(-120%); transition: transform .5s;
  mix-blend-mode: overlay;
}
button.primary { position: relative; overflow: hidden; }
button.primary:hover::after { transform: translateX(120%); }

/* 游戏化闪烁的"进度百分比" */
.stat-percent { font-family: "Bahnschrift", monospace; font-size: 11px; color: var(--muted); }

/* 侧边科技刻度尺 */
.hud-scale {
  position: fixed; right: 8px; top: 20%; bottom: 20%; width: 2px; z-index: 119; pointer-events: none;
  background: linear-gradient(180deg, rgba(65,230,255,.12), rgba(255,201,60,.35), rgba(65,230,255,.12));
  opacity: .5;
}
.hud-scale::after {
  content: ""; position: absolute; left: -3px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--gold); box-shadow: 0 0 12px var(--gold);
  animation: scaleDot 3.2s linear infinite;
}
@keyframes scaleDot { 0% { top: 0; } 50% { top: 100%; } 100% { top: 0; } }

/* ---------- AI 销售参谋 ---------- */
.ai-card {
  border: 1px solid rgba(65, 230, 255, .35) !important;
  background: linear-gradient(160deg, rgba(10, 25, 55, .92), rgba(20, 12, 50, .92)) !important;
  box-shadow: 0 0 24px rgba(65, 230, 255, .12), inset 0 0 40px rgba(65, 230, 255, .04) !important;
}
.ai-badge {
  display: inline-block; font-size: 10px; font-weight: 600; letter-spacing: 1px;
  padding: 2px 8px; border-radius: 10px; vertical-align: middle; margin-left: 6px;
  color: #a5f3fc; background: rgba(65, 230, 255, .1); border: 1px solid rgba(65, 230, 255, .35);
  animation: aiPulse 2s ease-in-out infinite;
}
@keyframes aiPulse { 0%,100% { opacity: .8 } 50% { opacity: 1 } }
.ai-body { margin-top: 6px; }
.ai-loading { color: var(--muted); font-size: 13px; animation: aiLoading 1.2s infinite; }
@keyframes aiLoading { 0% { opacity: .4 } 50% { opacity: 1 } 100% { opacity: .4 } }
.ai-chip {
  flex: 1 1 150px; min-width: 140px; border: 1px solid var(--card-line);
  border-radius: 12px; padding: 10px 14px; background: rgba(13, 16, 45, .6);
}
.ai-chip .k { font-size: 11px; color: var(--muted); margin-bottom: 4px; }
.ai-chip .v { font-size: 14px; font-weight: 700; color: #fff; }
.ai-talk {
  background: linear-gradient(160deg, rgba(5, 30, 15, .55), rgba(8, 40, 30, .45));
  border: 1px solid rgba(74, 222, 128, .3); border-radius: 12px; padding: 12px 14px;
  font-size: 13px; color: #d1fae5; line-height: 1.7;
}
.ai-talk-head { display: flex; align-items: center; font-size: 12px; color: #86efac; font-weight: 700; margin-bottom: 8px; }
.ai-step {
  display: flex; align-items: flex-start; gap: 8px; font-size: 13px;
  color: var(--text); padding: 6px 0;
}
.ai-step-no {
  flex: 0 0 20px; height: 20px; border-radius: 50%; display: inline-flex;
  align-items: center; justify-content: center; font-size: 11px; font-weight: 700;
  color: #041018; background: linear-gradient(135deg, #41e6ff, #7c3aed);
}
.ai-tip {
  display: flex; align-items: flex-start; gap: 4px; font-size: 13px; color: var(--text);
  background: rgba(65, 230, 255, .05); border-left: 3px solid rgba(65, 230, 255, .5);
  border-radius: 6px; padding: 8px 12px; line-height: 1.5;
}

/* ---------- 综艺开场大横幅：指挥中心主视觉 ---------- */
.hero {
  position: relative; z-index: 6;
  min-height: 300px;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  padding: 56px 20px 30px;
  overflow: hidden;
}
.hero-glow {
  position: absolute; inset: -40%; pointer-events: none;
  background:
    radial-gradient(ellipse 45% 55% at 50% 40%, rgba(255, 201, 60, .22) 0%, transparent 60%),
    radial-gradient(ellipse 35% 40% at 28% 55%, rgba(65, 230, 255, .16) 0%, transparent 60%),
    radial-gradient(ellipse 30% 38% at 72% 50%, rgba(255, 79, 158, .13) 0%, transparent 60%);
  animation: heroBreath 5s ease-in-out infinite;
}
@keyframes heroBreath {
  0%, 100% { opacity: .75; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}
.hero-inner { position: relative; z-index: 2; }
.hero-kicker {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  font-size: 12px; letter-spacing: 6px; color: var(--cyan);
  text-shadow: 0 0 14px rgba(65, 230, 255, .7);
  margin-bottom: 14px;
  animation: kickerIn .8s both;
}
.hero-line { width: 70px; height: 1px; background: linear-gradient(90deg, transparent, var(--cyan)); display: inline-block; }
.hero-line:last-child { background: linear-gradient(90deg, var(--cyan), transparent); }
@keyframes kickerIn { from { opacity: 0; letter-spacing: 16px; } to { opacity: 1; } }
.hero-title {
  font-family: "PingFang SC", "Microsoft YaHei", "HarmonyOS Sans SC", sans-serif;
  font-size: clamp(36px, 6vw, 64px);
  font-weight: 600; letter-spacing: 14px; text-indent: 14px;
  color: #f3efe4;
  background: linear-gradient(180deg, #ffffff 0%, #f3efe4 35%, #d8c9a3 65%, #b8a878 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 14px rgba(190, 165, 100, .28));
  position: relative;
  white-space: nowrap;
  transform: translateZ(0);
}
/* 标题上下细线 + 中央菱形装饰 */
.hero-title::before,
.hero-title::after {
  content: ""; position: absolute; top: 50%; width: 90px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(220, 200, 150, .75));
}
.hero-title::before { right: calc(100% + 26px); }
.hero-title::after { left: calc(100% + 26px); background: linear-gradient(90deg, rgba(220, 200, 150, .75), transparent); }
.hero-title .diamond { position: absolute; top: 50%; right: calc(100% + 6px); width: 7px; height: 7px; transform: translateY(-50%) rotate(45deg); background: rgba(230, 210, 165, .9); box-shadow: 0 0 8px rgba(230, 210, 165, .6); }
.hero-title .diamond.r { right: auto; left: calc(100% + 6px); }
.hero-sub {
  margin-top: 12px; font-size: 13px; color: var(--muted); letter-spacing: 5px;
  animation: kickerIn 1s .15s both;
}
.hero-stats-row {
  display: flex; justify-content: center; gap: clamp(16px, 5vw, 70px);
  margin-top: 30px; animation: kickerIn 1s .3s both;
}
.hero-stat { text-align: center; position: relative; padding: 0 12px; }
.hero-stat:not(:last-child)::after {
  content: ""; position: absolute; right: -35px; top: 20%; height: 60%; width: 1px;
  background: linear-gradient(180deg, transparent, rgba(120, 140, 255, .4), transparent);
}
.hero-stat-num {
  font-size: clamp(26px, 4vw, 44px); font-weight: 900; font-family: "Bahnschrift", monospace;
  display: block; color: var(--gold2);
  text-shadow: 0 0 24px rgba(255, 201, 60, .7);
  animation: corePulse 3s ease-in-out infinite;
}
.hero-stat-label { font-size: 11px; color: var(--muted); letter-spacing: 3px; margin-top: 4px; display: block; }

/* 内联导航条（hero 下方的通道栏） */
.topbar-inline {
  position: relative; z-index: 60;
  max-width: 1500px; margin: 0 auto; padding: 4px 20px 10px;
  display: flex; justify-content: center;
}
.topbar-inline .nav a {
  padding: 9px 22px; border-radius: 14px; font-size: 14px; font-weight: 700;
  color: var(--muted); border: 1px solid rgba(120, 140, 255, .18);
  background: rgba(10, 12, 40, .45); backdrop-filter: blur(8px);
  transition: all .3s cubic-bezier(0.34,1.56,0.64,1);
}
.topbar-inline .nav a:hover { color: #fff; transform: translateY(-2px); border-color: var(--cyan); box-shadow: 0 0 18px rgba(65, 230, 255, .25); }
.topbar-inline .nav a.active {
  color: #0a0818; font-weight: 800;
  background: linear-gradient(135deg, var(--gold2), var(--gold) 60%, var(--cyan));
  box-shadow: 0 0 26px rgba(255, 201, 60, .5), 0 0 60px rgba(65, 230, 255, .2);
}
.topbar-inline .nav a.warn-link { border-color: rgba(255, 77, 107, .3); }
.topbar-inline .nav a.warn-link:hover { border-color: var(--red); color: var(--red); box-shadow: 0 0 18px rgba(255, 77, 107, .3); }

/* 大屏网格：图表更大 */
.big-grid .card { padding: 20px 22px; }
.big-grid h3 { font-size: 16px; margin-bottom: 16px; }
.big-pie { display: flex; justify-content: center; padding: 14px 0; }
.big-pie svg { width: 150px !important; height: 150px !important; filter: drop-shadow(0 0 16px rgba(65, 230, 255, .35)); }
.legend { text-align: center; margin-top: 6px; }
.legend-item { font-size: 13px; color: var(--muted); margin: 0 8px; display: inline-block; }
.status-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 4px; border-bottom: 1px dashed rgba(110, 150, 230, .16); }
.status-row .status-num { font-size: 18px; font-weight: 800; font-family: "Bahnschrift", monospace; color: var(--text); }

/* 员工红黑榜排行条 */
.emp-line {
  display: flex; align-items: center; gap: 10px; padding: 9px 6px;
  border-bottom: 1px dashed rgba(110, 150, 230, .16); font-size: 13px;
  border-radius: 8px; transition: all .25s;
}
.emp-line:hover { background: linear-gradient(90deg, rgba(65, 230, 255, .08), transparent); transform: translateX(4px); }
.emp-line:last-child { border-bottom: none; }
.emp-name { min-width: 60px; font-weight: 700; }
.emp-bar { flex: 1; height: 10px; background: rgba(90, 162, 255, .08); border-radius: 6px; overflow: hidden; box-shadow: inset 0 0 6px rgba(0,0,0,.4); }
.emp-bar i { display: block; height: 100%; border-radius: 6px; transition: width .7s ease; }
.emp-bar i.red { background: linear-gradient(90deg, var(--red), var(--pink)); box-shadow: 0 0 10px var(--red); }
.emp-bar i.orange { background: linear-gradient(90deg, var(--orange), var(--gold)); box-shadow: 0 0 10px var(--orange); }
.emp-bar i.green { background: linear-gradient(90deg, var(--green), var(--cyan)); box-shadow: 0 0 10px var(--green); }
.emp-num { min-width: 110px; text-align: right; font-size: 12px; color: var(--muted); }

/* 页脚 */
.footer { text-align: center; color: rgba(147, 162, 208, .5); font-size: 11px; padding: 26px 0 10px; letter-spacing: 2px; position: relative; z-index: 5; }

/* ---------- 顶栏：星际任务指挥中心 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 24px;
  background: linear-gradient(180deg, rgba(4, 4, 20, .92), rgba(8, 8, 34, .75));
  border-bottom: 1px solid rgba(120, 140, 255, .25);
  backdrop-filter: blur(18px);
  box-shadow: 0 6px 40px rgba(70, 90, 255, .12);
}
.topbar h1 {
  font-size: 24px; font-weight: 900; letter-spacing: 3px;
  background: linear-gradient(92deg, #fff 0%, var(--gold2) 30%, var(--cyan) 55%, var(--gold) 80%, #fff 100%);
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: titleFlow 6s linear infinite;
}
@keyframes titleFlow { to { background-position: -200% center; } }
.topbar .sub { font-size: 11px; color: var(--muted); margin-top: 2px; letter-spacing: 2px; }
.nav { display: flex; gap: 8px; position: relative; z-index: 1; }
.nav a {
  padding: 8px 15px; border-radius: 12px; font-size: 13px; font-weight: 600;
  color: var(--muted); border: 1px solid transparent; position: relative;
  transition: all .3s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}
.nav a::before { /* 悬停扫光 */
  content: ""; position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .14), transparent);
  transition: left .5s;
}
.nav a:hover { color: #fff; transform: translateY(-2px); }
.nav a:hover::before { left: 100%; }
.nav a.active {
  color: #0a0818; font-weight: 800;
  background: linear-gradient(135deg, var(--gold2), var(--gold) 60%, var(--cyan));
  background-size: 160% 160%;
  box-shadow: 0 0 24px rgba(255, 201, 60, .5), 0 0 60px rgba(65, 230, 255, .2);
  border-color: transparent;
  animation: activeGlow 2.6s ease-in-out infinite;
}
@keyframes activeGlow {
  0%, 100% { box-shadow: 0 0 18px rgba(255, 201, 60, .4), 0 0 40px rgba(65, 230, 255, .15); }
  50% { box-shadow: 0 0 30px rgba(255, 201, 60, .7), 0 0 70px rgba(65, 230, 255, .35); }
}

/* ---------- KPI：能量核心 ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(154px, 1fr)); gap: 14px; margin-bottom: 18px; perspective: 900px; }
.kpi {
  position: relative; overflow: hidden;
  background: linear-gradient(160deg, rgba(18, 22, 66, .88), rgba(8, 10, 40, .9));
  border: 1px solid var(--card-line); border-radius: 16px; padding: 15px 16px;
  backdrop-filter: blur(10px);
  transition: border-color .3s, box-shadow .3s;
}
.kpi::before { /* 顶部流光 */
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; z-index: 2;
  background: linear-gradient(90deg, transparent, var(--gold), var(--cyan), transparent);
  background-size: 220% 100%;
  animation: barFlow 3s linear infinite;
}
@keyframes barFlow { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }
.kpi:hover { border-color: rgba(65, 230, 255, .5); box-shadow: 0 6px 24px rgba(70, 90, 255, .18); }
.kpi .label { font-size: 12px; color: var(--muted); letter-spacing: 1.5px; position: relative; z-index: 1; }
.kpi .value {
  font-size: 32px; font-weight: 900; margin-top: 5px; position: relative; z-index: 1;
  font-family: "Bahnschrift", "Rajdhani", "Segoe UI", monospace; letter-spacing: 1px;
  animation: corePulse 3.4s ease-in-out infinite;
}
.kpi .value.gold { color: var(--gold2); }
.kpi .value.green { color: var(--green); }
.kpi .value.red { color: var(--red); }
.kpi .value.orange { color: var(--orange); }
.kpi .value.blue { color: var(--cyan); }
.kpi .value.purple { color: #d9b8ff; }
@keyframes corePulse {
  0%, 100% { text-shadow: 0 0 14px currentColor; filter: brightness(1); }
  50% { text-shadow: 0 0 30px currentColor, 0 0 60px currentColor; filter: brightness(1.35); }
}
.kpi .hint { font-size: 11px; color: var(--muted); margin-top: 3px; opacity: .85; position: relative; z-index: 1; }

/* ---------- 卡片：空间站面板 ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.grid-3 { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 14px; margin-bottom: 18px; }
@media (max-width: 900px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }
.card, .emp-card {
  position: relative;
  background: var(--card);
  border: 1px solid var(--card-line); border-radius: 18px; padding: 16px 18px;
  backdrop-filter: blur(14px);
  box-shadow: 0 10px 40px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .06);
  transition: border-color .35s, box-shadow .35s;
  overflow: hidden;
}
.card::before, .emp-card::before { /* 渐变光环描边 */
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; z-index: 0;
  background: linear-gradient(135deg, rgba(65, 230, 255, .4), transparent 30%, transparent 70%, rgba(255, 201, 60, .35));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .5; transition: opacity .35s;
  pointer-events: none;
}
.card:hover, .emp-card:hover { border-color: rgba(120, 140, 255, .5); box-shadow: 0 12px 50px rgba(70, 90, 255, .2); }
.card > * , .emp-card > * { position: relative; z-index: 2; }
.card h3 {
  font-size: 15px; margin-bottom: 12px; font-weight: 800; letter-spacing: 1.5px;
  display: flex; align-items: center; gap: 8px;
}
.card h3::before {
  content: ""; width: 5px; height: 17px; border-radius: 3px; display: inline-block;
  background: linear-gradient(180deg, var(--gold), var(--cyan));
  box-shadow: 0 0 12px rgba(255, 201, 60, .8);
  animation: h3blink 2.2s ease-in-out infinite;
}
@keyframes h3blink { 0%,100% { opacity: 1; } 50% { opacity: .55; } }
.card h3 .more { margin-left: auto; font-size: 11px; font-weight: 400; }

/* ---------- 条形图：级联能量 ---------- */
.bar-row { display: flex; align-items: center; margin-bottom: 10px; font-size: 12px; }
.bar-row .name { width: 92px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-row .bar-bg { flex: 1; height: 17px; background: rgba(90, 162, 255, .07); border: 1px solid rgba(120, 140, 255, .15); border-radius: 7px; overflow: hidden; margin: 0 8px; }
.bar-row .bar {
  height: 100%; border-radius: 6px; min-width: 2px; position: relative;
  background: linear-gradient(90deg, var(--blue), var(--cyan) 50%, var(--gold));
  box-shadow: 0 0 14px rgba(65, 230, 255, .55);
  transition: width .8s cubic-bezier(0.22, 1, 0.36, 1);
}
.bar-row .bar::after {
  content: ""; position: absolute; inset: 0; opacity: .4;
  background: linear-gradient(90deg, transparent, #fff, transparent);
  animation: slide-sheen 2.2s linear infinite;
}
@keyframes slide-sheen { 0% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.bar-row .num { width: 138px; text-align: right; color: var(--text); white-space: nowrap; font-family: "Bahnschrift", monospace; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; box-shadow: 0 0 9px currentColor; }

/* ---------- 表格：全息数据 ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th {
  text-align: left; color: var(--cyan); font-weight: 600; font-size: 11px;
  letter-spacing: 1.5px; padding: 8px 10px;
  border-bottom: 1px solid rgba(65, 230, 255, .28);
  text-shadow: 0 0 8px rgba(65, 230, 255, .5);
}
td { padding: 10px; border-bottom: 1px solid rgba(110, 140, 220, .13); vertical-align: middle; transition: background .2s; }
tr { transition: all .2s; }
tr:hover td { background: linear-gradient(90deg, rgba(65, 230, 255, .09), transparent 70%); }
tr.clickable { cursor: pointer; }
tr.clickable td:first-child { position: relative; }
tr.clickable td:first-child::before {
  content:""; position:absolute; left:0; top:30%; bottom:30%; width:3px; border-radius:3px;
  background: linear-gradient(180deg, var(--gold), var(--cyan));
  opacity: 0; transition: opacity .2s;
}
tr.clickable:hover td:first-child::before { opacity: 1; }

/* ---------- 徽章：行星能量场 ---------- */
.badge {
  display: inline-block; padding: 2px 10px; border-radius: 20px; font-size: 11px;
  font-weight: 700; letter-spacing: .5px;
  transition: transform .25s cubic-bezier(0.34,1.56,0.64,1), box-shadow .25s;
}
.badge:hover { transform: translateY(-1px) scale(1.08); }
.badge.S { background: rgba(255, 201, 60, .16); color: var(--gold2); box-shadow: inset 0 0 9px rgba(255, 201, 60, .3); }
.badge.A { background: rgba(65, 230, 255, .15); color: var(--cyan); box-shadow: inset 0 0 9px rgba(65, 230, 255, .25); }
.badge.B { background: rgba(160, 107, 255, .18); color: #d9b8ff; }
.badge.C { background: rgba(147, 162, 208, .13); color: var(--muted); }
.badge.red { background: rgba(255, 77, 107, .2); color: var(--red); }
.badge.orange { background: rgba(255, 171, 64, .18); color: var(--orange); }
.badge.green { background: rgba(65, 255, 176, .16); color: var(--green); }
.badge.blue { background: rgba(65, 230, 255, .17); color: var(--cyan); }
.badge.gray { background: rgba(147, 162, 208, .14); color: var(--muted); }
.badge.purple { background: rgba(160, 107, 255, .2); color: #d9b8ff; }
.badge.gold { background: linear-gradient(135deg, rgba(255, 201, 60, .25), rgba(255, 233, 168, .15)); color: var(--gold2); border: 1px solid rgba(255, 201, 60, .45); box-shadow: 0 0 12px rgba(255, 201, 60, .35); animation: goldShine 2.4s ease-in-out infinite; }
@keyframes goldShine { 0%, 100% { box-shadow: 0 0 8px rgba(255, 201, 60, .3); } 50% { box-shadow: 0 0 18px rgba(255, 201, 60, .7); } }
.board-tag {
  display: inline-block; padding: 1px 7px; border-radius: 5px; font-size: 10px;
  background: rgba(90, 162, 255, .14); color: #a8c8ff; margin-right: 4px;
  border: 1px solid rgba(90, 162, 255, .22); transition: all .2s;
}
.board-tag:hover { background: rgba(65, 230, 255, .2); transform: translateY(-1px); }
.board-tag.hot { background: rgba(255, 201, 60, .15); color: var(--gold2); border-color: rgba(255, 201, 60, .3); }

/* ---------- 情报滚动区 ---------- */
.risk-item, .stale-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 6px;
  border-bottom: 1px dashed rgba(110, 150, 230, .16); font-size: 13px;
  transition: all .25s; border-radius: 8px;
}
.risk-item:hover, .stale-item:hover {
  background: linear-gradient(90deg, rgba(65, 230, 255, .08), transparent);
  transform: translateX(4px);
}
.risk-item:last-child, .stale-item:last-child { border-bottom: none; }
.risk-item .info { flex: 1; min-width: 0; }
.risk-item .name { font-weight: 700; }
.risk-item .desc { font-size: 11px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 控件：星舰输入 ---------- */
.filters { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 14px; align-items: center; }
select, input, button, textarea {
  background: rgba(8, 10, 40, .85); color: var(--text); border: 1px solid rgba(120, 140, 255, .3);
  border-radius: 11px; padding: 7px 11px; font-size: 13px; outline: none;
  transition: all .25s;
}
select:hover, input:hover, textarea:hover { border-color: rgba(65, 230, 255, .45); }
select:focus, input:focus, textarea:focus { border-color: var(--cyan); box-shadow: 0 0 16px rgba(65, 230, 255, .4); }
button.primary {
  background: linear-gradient(135deg, var(--gold2), var(--gold)); border: none;
  color: #140e00; cursor: pointer; font-weight: 800; letter-spacing: .5px;
  box-shadow: 0 0 18px rgba(255, 201, 60, .4);
  transition: transform .25s cubic-bezier(0.34,1.56,0.64,1), box-shadow .25s, filter .25s;
}
button.primary:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 0 30px rgba(255, 201, 60, .7); filter: brightness(1.1); }
button.primary:active { transform: scale(.97); }
button.ghost { cursor: pointer; }
button.ghost:hover { border-color: var(--cyan); color: var(--cyan); box-shadow: 0 0 12px rgba(65, 230, 255, .2); }
button.small { padding: 4px 9px; font-size: 12px; }

/* ---------- 详情：星际档案 ---------- */
.detail-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.avatar {
  width: 62px; height: 62px; border-radius: 50%; padding: 3px; position: relative;
  background: conic-gradient(from 0deg, var(--gold), var(--pink), var(--cyan), var(--purple), var(--gold));
  animation: avatarSpin 8s linear infinite;
  box-shadow: 0 0 30px rgba(255, 201, 60, .4);
  display: flex; align-items: center; justify-content: center;
}
@keyframes avatarSpin { to { filter: hue-rotate(360deg); } }
.avatar span {
  width: 100%; height: 100%; border-radius: 50%; background: #0b0e2e;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 900; color: var(--gold2);
}
.detail-head .nm { font-size: 27px; font-weight: 900; letter-spacing: 1.5px; }
.detail-head .meta { font-size: 12px; color: var(--muted); margin-top: 5px; }
.info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 11px; margin-bottom: 16px; }
.info-cell {
  background: rgba(90, 162, 255, .06); border: 1px solid rgba(120, 140, 255, .16);
  border-radius: 11px; padding: 10px 12px; transition: all .3s;
}
.info-cell:hover { border-color: rgba(65, 230, 255, .4); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(65, 230, 255, .12); }
.info-cell .k { font-size: 11px; color: var(--muted); letter-spacing: .5px; }
.info-cell .v { font-size: 14px; font-weight: 700; margin-top: 3px; word-break: break-all; }

.timeline { position: relative; padding-left: 22px; }
.timeline::before {
  content: ""; position: absolute; left: 6px; top: 4px; bottom: 4px; width: 2px;
  background: linear-gradient(180deg, var(--gold), var(--cyan), var(--pink), transparent);
  box-shadow: 0 0 8px rgba(65, 230, 255, .4);
}
.tl-item { position: relative; padding: 8px 0 14px; transition: transform .2s; }
.tl-item:hover { transform: translateX(3px); }
.tl-item::before {
  content: ""; position: absolute; left: -22px; top: 12px; width: 13px; height: 13px;
  border-radius: 50%; background: #0b0e2e; border: 2px solid var(--cyan);
  box-shadow: 0 0 12px rgba(65, 230, 255, .7);
}
.tl-item .t { font-size: 11px; color: var(--muted); }
.tl-item .c { font-size: 13px; margin-top: 2px; }
.tl-item .s { font-size: 12px; color: var(--gold2); margin-top: 2px; }

/* ---------- 弹窗：全息舱 ---------- */
.modal-bg {
  position: fixed; inset: 0; background: rgba(2, 2, 14, .8); display: none;
  align-items: center; justify-content: center; z-index: 200; padding: 20px;
  backdrop-filter: blur(12px);
}
.modal-bg.show { display: flex; animation: modalIn .3s; }
@keyframes modalIn { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: linear-gradient(160deg, rgba(18, 22, 66, .96), rgba(8, 10, 40, .96));
  border: 1px solid rgba(65, 230, 255, .4); border-radius: 18px; width: 100%; max-width: 460px;
  padding: 22px; box-shadow: 0 0 50px rgba(65, 230, 255, .25);
  animation: modalPop .35s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes modalPop { from { opacity: 0; transform: scale(.92) translateY(12px); } to { opacity: 1; transform: none; } }
.modal h3 { margin-bottom: 14px; letter-spacing: 1.5px; }
.form-row { margin-bottom: 12px; }
.form-row label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.form-row input, .form-row select, .form-row textarea { width: 100%; }
textarea { resize: vertical; min-height: 60px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }

/* ---------- 员工卡：星舰成员 ---------- */
.emp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.emp-card { padding: 16px; }
.emp-card .head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.emp-card .hname { font-size: 17px; font-weight: 800; letter-spacing: .5px; transition: color .3s; }
.emp-card:hover .hname { color: var(--gold2); }
.emp-card .hmeta { font-size: 11px; color: var(--muted); }
.emp-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0; }
.emp-stat {
  background: rgba(90, 162, 255, .06); border: 1px solid rgba(120, 140, 255, .15);
  border-radius: 11px; padding: 9px 6px; text-align: center; transition: all .3s;
}
.emp-stat:hover { transform: translateY(-2px); border-color: rgba(65, 230, 255, .4); }
.emp-stat .v { font-size: 20px; font-weight: 900; font-family: "Bahnschrift", monospace; }
.emp-stat .k { font-size: 10px; color: var(--muted); }
.redlines { font-size: 12px; margin-top: 8px; }
.redline-item { padding: 4px 0; color: var(--red); animation: dangerPulse 1.6s ease-in-out infinite; }
@keyframes dangerPulse { 0%,100% { opacity: 1; } 50% { opacity: .55; } }
.warnline-item { padding: 4px 0; color: var(--orange); }
.empty { text-align: center; color: var(--muted); padding: 30px 0; font-size: 13px; }

/* ---------- 页签 / 分页 ---------- */
.tabs { display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.tab {
  padding: 7px 14px; border-radius: 11px; font-size: 13px; color: var(--muted);
  cursor: pointer; border: 1px solid transparent; transition: all .25s;
}
.tab:hover { color: #fff; border-color: rgba(120, 140, 255, .4); }
.tab.active {
  color: #0a0818; font-weight: 800;
  background: linear-gradient(135deg, var(--gold2), var(--gold));
  box-shadow: 0 0 16px rgba(255, 201, 60, .45);
}
.page-section { display: none; }
.page-section.show { display: block; }
.pagination { display: flex; gap: 8px; justify-content: center; margin-top: 14px; align-items: center; font-size: 13px; color: var(--muted); }

/* ---------- Toast / 入场 ---------- */
.toast {
  position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(135deg, rgba(18, 22, 66, .95), rgba(8, 10, 40, .95));
  color: #fff; padding: 11px 20px; border-radius: 13px; font-size: 13px; z-index: 300;
  border: 1px solid var(--gold); box-shadow: 0 0 26px rgba(255, 201, 60, .4);
  display: none;
}
.toast.show { display: block; animation: fadein .25s; }
@keyframes fadein { from { opacity: 0; transform: translateX(-50%) translateY(10px); } to { opacity: 1; } }

/* 卡片入场 */
@keyframes cardIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }
.card, .kpi, .emp-card { animation: cardIn .55s cubic-bezier(0.22,1,0.36,1) both; }
.card:nth-child(2), .kpi:nth-child(2) { animation-delay: .07s; }
.card:nth-child(3), .kpi:nth-child(3) { animation-delay: .14s; }
.card:nth-child(4), .kpi:nth-child(4) { animation-delay: .21s; }
.card:nth-child(5), .kpi:nth-child(5) { animation-delay: .28s; }
.card:nth-child(6), .kpi:nth-child(6) { animation-delay: .35s; }
.card:nth-child(7), .kpi:nth-child(7) { animation-delay: .42s; }

/* 链接拖动禁止 */
a, button { -webkit-user-select: none; user-select: none; }

@media (max-width: 640px) {
  .wrap { padding: 12px; }
  .topbar { padding: 10px 14px; }
  .topbar h1 { font-size: 16px; letter-spacing: 1px; }
  .nav a { padding: 5px 9px; font-size: 12px; }
  .kpi .value { font-size: 25px; }
  .bar-row .num { width: 92px; }
}