/* 验算中心 · Glassmorphism 科技风（对齐 Webo 设计体系） */
:root {
  --bg: #0a0d12;
  --panel: #111722;
  --panel-2: #0d121c;
  --border: #232b38;
  --border-soft: #1a2130;
  --text: #e8edf5;
  --muted: #8b97a8;
  --accent: #ff7043;
  --accent-blue: #4ea1ff;
  --ok: #5cff8d;
  --ok-bg: rgba(92, 255, 141, 0.1);
  --warn: #ffb703;
  --warn-bg: rgba(255, 183, 3, 0.1);
  --danger: #ff6b6b;
  --danger-bg: rgba(255, 107, 107, 0.1);
  --gradient-primary: linear-gradient(135deg, #4ea1ff 0%, #7b61ff 55%, #4ea1ff 100%);
  --gradient-accent: linear-gradient(135deg, #ff7043 0%, #ff3b5c 100%);
  --gradient-success: linear-gradient(135deg, #00e676 0%, #5cff8d 100%);
  --glow-blue: 0 0 18px rgba(78, 161, 255, 0.38), 0 0 46px rgba(78, 161, 255, 0.14);
  --glow-orange: 0 0 18px rgba(255, 112, 67, 0.4), 0 0 46px rgba(255, 112, 67, 0.16);
  --glow-green: 0 0 18px rgba(92, 255, 141, 0.4), 0 0 46px rgba(92, 255, 141, 0.16);
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-family: "Microsoft YaHei UI", "Segoe UI", Arial, sans-serif;
  display: flex;
  flex-direction: column;
  color: var(--text);
  background:
    repeating-linear-gradient(
      0deg,
      rgba(78, 161, 255, 0.03) 0px,
      rgba(78, 161, 255, 0.03) 1px,
      transparent 1px,
      transparent 40px
    ),
    repeating-linear-gradient(
      90deg,
      rgba(78, 161, 255, 0.03) 0px,
      rgba(78, 161, 255, 0.03) 1px,
      transparent 1px,
      transparent 40px
    ),
    radial-gradient(circle at 10% 0%, rgba(78, 161, 255, 0.12) 0%, rgba(78, 161, 255, 0) 52%),
    radial-gradient(circle at 92% 92%, rgba(255, 112, 67, 0.06) 0%, rgba(255, 112, 67, 0) 46%),
    linear-gradient(180deg, #0a0d12 0%, #0d1118 50%, #0a0d12 100%);
  background-attachment: fixed;
}

/* ── 顶栏 ── */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(70, 90, 120, 0.3);
  background: rgba(17, 23, 34, 0.6);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.brand-lockup { display: flex; align-items: center; gap: 12px; }

.brand-logo {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: var(--glow-blue), 0 4px 18px rgba(0, 0, 0, 0.35);
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--gradient-primary);
  display: grid;
  place-items: center;
  font-weight: 800;
}

.brand-title { font-size: 15px; font-weight: 700; letter-spacing: 0.02em; }

.brand-sub {
  font-size: 12px;
  color: var(--muted);
  background: linear-gradient(135deg, #9eb0c8 0%, #6b7d96 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.top-actions { display: flex; align-items: center; gap: 12px; }

.env-badge {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.env-badge.sm { padding: 2px 8px; font-size: 11px; }

.env-formal {
  color: var(--ok);
  background: rgba(92, 255, 141, 0.1);
  border: 1px solid rgba(92, 255, 141, 0.35);
  box-shadow: var(--glow-green);
}

.env-lab {
  color: #c4a0ff;
  background: rgba(123, 97, 255, 0.12);
  border: 1px solid rgba(123, 97, 255, 0.35);
}

/* ── 标签导航 ── */
.main-tabs {
  display: flex;
  gap: 4px;
  padding: 10px 18px 0;
  max-width: 1280px;
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: none;
  border-bottom: 1px solid rgba(70, 90, 120, 0.28);
  background: rgba(17, 23, 34, 0.55);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.main-tabs::-webkit-scrollbar { display: none; }

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  border: none;
  border-radius: 10px 10px 0 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
  white-space: nowrap;
  transition: color 0.22s var(--ease), background 0.22s var(--ease), box-shadow 0.22s var(--ease), transform 0.22s var(--ease);
  position: relative;
}

.tab-btn:hover {
  color: #d6deeb;
  background: rgba(78, 161, 255, 0.08);
}

.tab-btn:active { transform: scale(0.97); }

.tab-btn.active {
  color: #fff;
  background: rgba(17, 23, 34, 0.72);
  border-bottom-color: var(--accent);
  text-shadow: 0 0 14px rgba(255, 112, 67, 0.28);
  box-shadow: inset 0 -2px 0 rgba(255, 112, 67, 0.45), 0 0 20px rgba(255, 112, 67, 0.12);
}

.tab-btn::after { display: none; }

.tab-icon { font-size: 11px; opacity: 0.85; }

.tab-soon {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(123, 97, 255, 0.2);
  color: #c4a0ff;
  font-weight: 500;
}

.tab-lab { opacity: 0.9; }

.tab-pane {
  display: none;
  animation: tabFadeIn 0.32s var(--ease);
}

.tab-pane.active { display: block; }

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── 布局 / 面板 ── */
.shell { max-width: 1280px; margin: 0 auto; padding: 20px 18px 48px; flex: 1; }

.panel,
.stat-card,
.kpi-card,
.mon-hero,
.prog-subpanel,
.lab-card {
  position: relative;
  overflow: hidden;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.panel {
  background: rgba(17, 23, 34, 0.62);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(70, 90, 120, 0.35);
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 14px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.panel::before,
.kpi-card::before,
.stat-card::before,
.lab-card::before,
.prog-subpanel::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: linear-gradient(90deg, rgba(78, 161, 255, 0) 0%, rgba(78, 161, 255, 0.55) 35%, rgba(255, 112, 67, 0.45) 70%, rgba(255, 112, 67, 0) 100%);
  pointer-events: none;
  opacity: 0.9;
}

.panel:hover {
  transform: translateY(-2px);
  border-color: rgba(78, 161, 255, 0.45);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.panel,
.kpi-card,
.stat-card,
.lab-card {
  animation: cardEnter 0.32s var(--ease) both;
}

.panel:nth-child(1) { animation-delay: 0.02s; }
.panel:nth-child(2) { animation-delay: 0.06s; }
.panel:nth-child(3) { animation-delay: 0.1s; }
.panel:nth-child(4) { animation-delay: 0.14s; }
.panel:nth-child(n+5) { animation-delay: 0.18s; }

@keyframes cardEnter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.panel-head .section-title { margin: 0; }

.section-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 8px;
  color: #f0f4fa;
  padding-left: 10px;
  border-left: 3px solid var(--accent);
}

.hint { color: var(--muted); font-size: 13px; line-height: 1.6; }

.hidden { display: none !important; }

/* ── 统计卡片 ── */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin: 16px 0;
}

.stat-card {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(70, 90, 120, 0.35);
  background: rgba(17, 23, 34, 0.6);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(78, 161, 255, 0.45);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.stat-card span { display: block; font-size: 12px; color: var(--muted); }

.stat-card strong {
  font-size: 22px;
  margin-top: 6px;
  display: block;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, #8eb8ff 0%, #4ea1ff 45%, #7b61ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 12px rgba(78, 161, 255, 0.22));
}

/* ── 按钮 ── */
button, .btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border: 0;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  background: var(--gradient-primary);
  border: 1px solid rgba(78, 161, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(78, 161, 255, 0.15) inset, var(--glow-blue);
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), filter 0.22s var(--ease), background 0.22s var(--ease), border-color 0.22s var(--ease);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

button:hover:not(:disabled) {
  filter: brightness(1.1);
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(78, 161, 255, 0.22), var(--glow-blue);
}

button:active:not(:disabled) {
  filter: brightness(0.96);
  transform: translateY(1px) scale(0.97);
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.35);
}

button:disabled { opacity: 0.5; cursor: not-allowed; transform: none; box-shadow: none; }

button.secondary {
  background: transparent;
  border: 1px solid rgba(78, 161, 255, 0.45);
  color: #c8d4e8;
  box-shadow: none;
}

button.secondary:hover:not(:disabled) {
  background: rgba(78, 161, 255, 0.08);
  box-shadow: 0 0 16px rgba(78, 161, 255, 0.12);
}

button.primary {
  background: var(--gradient-primary);
  border-color: rgba(78, 161, 255, 0.65);
  box-shadow: 0 0 0 1px rgba(78, 161, 255, 0.2) inset, var(--glow-blue);
}

button.accent {
  background: var(--gradient-accent);
  border-color: rgba(255, 112, 67, 0.7);
  box-shadow: var(--glow-orange);
}

button.danger {
  background: linear-gradient(135deg, #ff6b6b 0%, #d63b3b 100%);
  border-color: rgba(255, 107, 107, 0.7);
  box-shadow: 0 0 18px rgba(255, 107, 107, 0.26);
}

/* ── 输入框 ── */
input, textarea, select, .field-input {
  background: rgba(13, 17, 24, 0.62);
  color: var(--text);
  border: 1px solid rgba(50, 59, 74, 0.72);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  transition: border-color 0.22s var(--ease), box-shadow 0.22s var(--ease), background-color 0.22s var(--ease);
}

.field-label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; }

.field-input {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
}

input:focus, textarea:focus, select:focus, .field-input:focus {
  outline: none;
  border-color: rgba(78, 161, 255, 0.65);
  box-shadow: 0 0 0 3px rgba(78, 161, 255, 0.14), 0 0 18px rgba(78, 161, 255, 0.18), var(--glow-blue);
}

.funnel-form {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 14px;
  margin-top: 12px;
}

.funnel-form label { font-size: 13px; color: var(--muted); display: flex; flex-direction: column; gap: 6px; }

.funnel-form input {
  padding: 8px 10px;
  border-radius: 8px;
}

.login-card { max-width: 420px; margin: 48px auto; }

.login-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }

/* ── 状态胶囊 ── */
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid rgba(70, 90, 120, 0.35);
  background: rgba(17, 23, 34, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.pill::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5f6d82;
  animation: pillPulse 2s var(--ease) infinite;
}

.pill.ok {
  color: var(--ok);
  background: rgba(92, 255, 141, 0.08);
  border-color: rgba(92, 255, 141, 0.45);
  box-shadow: var(--glow-green);
}

.pill.ok::before { background: var(--ok); }

.pill.pending {
  color: var(--warn);
  background: rgba(255, 183, 3, 0.08);
  border-color: rgba(255, 183, 3, 0.45);
  box-shadow: 0 0 18px rgba(255, 183, 3, 0.22);
}

.pill.pending::before { background: var(--warn); }

.pill.danger {
  color: var(--danger);
  background: rgba(255, 107, 107, 0.08);
  border-color: rgba(255, 107, 107, 0.45);
  box-shadow: 0 0 18px rgba(255, 107, 107, 0.24);
}

.pill.danger::before { background: var(--danger); }

.pill.active {
  color: #ffb38a;
  background: rgba(255, 112, 67, 0.12);
  border-color: rgba(255, 112, 67, 0.55);
  box-shadow: var(--glow-orange);
}

.pill.active::before { background: var(--accent); }

@keyframes pillPulse {
  0% { opacity: 0.35; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.12); }
  100% { opacity: 0.35; transform: scale(1); }
}

/* ── Toast ── */
.toast {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  display: none;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.toast.show { display: block; }

.toast.ok { background: var(--ok-bg); color: var(--ok); border: 1px solid rgba(92, 255, 141, 0.28); }

.toast.error { background: var(--danger-bg); color: #ff8f8f; border: 1px solid rgba(255, 107, 107, 0.28); }

/* ── 页脚 ── */
.footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 16px;
  border-top: 1px solid rgba(70, 90, 120, 0.3);
  margin-top: auto;
  background: rgba(10, 13, 18, 0.72);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

/* ═══ 监控中心 ═══ */
.mon-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 20px;
  padding: 20px 24px;
  border-radius: 16px;
  border: 1px solid rgba(78, 161, 255, 0.32);
  background: linear-gradient(135deg, rgba(78, 161, 255, 0.14) 0%, rgba(123, 97, 255, 0.1) 55%, rgba(78, 161, 255, 0.12) 100%);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.04) inset, 0 14px 40px rgba(0, 0, 0, 0.22), 0 0 24px rgba(78, 161, 255, 0.08);
}

.mon-title { margin: 0 0 6px; font-size: 22px; font-weight: 800; color: #f2f6fc; }

.mon-sub { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.5; }

.mon-ring-wrap {
  position: relative;
  width: 120px;
  height: 120px;
  flex-shrink: 0;
}

.mon-ring { width: 100%; height: 100%; transform: rotate(-90deg); }

.mon-ring-bg {
  fill: none;
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 10;
}

.mon-ring-fill {
  fill: none;
  stroke: #4ea1ff;
  stroke-width: 10;
  stroke-linecap: round;
  stroke-dasharray: 0 327;
  transition: stroke-dasharray 0.6s var(--ease);
  filter: drop-shadow(0 0 8px rgba(78, 161, 255, 0.55));
}

.mon-ring-label {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.mon-ring-label strong {
  font-size: 26px;
  font-weight: 800;
  background: linear-gradient(135deg, #a8ccff 0%, #4ea1ff 50%, #7b61ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 14px rgba(78, 161, 255, 0.35));
}

.mon-ring-label span { font-size: 11px; color: var(--muted); margin-top: 2px; }

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.kpi-card {
  padding: 16px;
  border-radius: 14px;
  border: 1px solid rgba(70, 90, 120, 0.35);
  background: rgba(17, 23, 34, 0.6);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.kpi-card:hover {
  transform: translateY(-2px);
  border-color: rgba(78, 161, 255, 0.45);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.kpi-card.pulse strong { animation: kpiPulse 2s var(--ease) infinite; }

@keyframes kpiPulse {
  0%, 100% { filter: drop-shadow(0 0 8px rgba(78, 161, 255, 0.3)); }
  50% { filter: drop-shadow(0 0 16px rgba(92, 255, 141, 0.45)); }
}

.kpi-lbl { display: block; font-size: 12px; color: var(--muted); }

.kpi-card strong {
  display: block;
  font-size: 24px;
  margin: 6px 0 4px;
  font-variant-numeric: tabular-nums;
  background: linear-gradient(135deg, #8eb8ff 0%, #4ea1ff 45%, #7b61ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 12px rgba(78, 161, 255, 0.25));
}

.kpi-hint { font-size: 11px; color: rgba(139, 151, 168, 0.8); }

.mon-row {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 14px;
  margin-bottom: 14px;
}

.mon-panel { margin-top: 0; }

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.slot-card {
  padding: 14px;
  border-radius: 12px;
  border: 1px solid rgba(70, 90, 120, 0.35);
  background: rgba(10, 13, 18, 0.45);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 88px;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.slot-card.slot-busy {
  border-color: rgba(78, 161, 255, 0.45);
  background: linear-gradient(135deg, rgba(78, 161, 255, 0.1) 0%, rgba(10, 13, 18, 0.5) 100%);
  animation: slotGlow 3s var(--ease) infinite;
}

@keyframes slotGlow {
  0%, 100% { box-shadow: 0 0 12px rgba(78, 161, 255, 0.12); }
  50% { box-shadow: 0 0 22px rgba(78, 161, 255, 0.28); }
}

.slot-card.slot-idle { opacity: 0.65; }

.slot-num { font-size: 11px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }

.slot-sym { font-size: 18px; font-weight: 700; color: var(--accent-blue); }

.slot-detail { font-size: 12px; color: var(--text); }

.slot-time { font-size: 11px; color: var(--muted); }

.slot-status { font-size: 13px; color: var(--muted); margin-top: 8px; }

.gauge-row { display: flex; flex-direction: column; gap: 12px; margin: 12px 0; }

.gauge { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }

.gauge-bar {
  height: 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.gauge-fill {
  height: 100%;
  border-radius: 6px;
  width: 0;
  transition: width 0.5s var(--ease);
}

.gauge-cpu { background: linear-gradient(90deg, #4ea1ff, #7b61ff); }

.gauge-mem { background: linear-gradient(90deg, #5cff8d, #4ea1ff); }

.gauge-load { background: linear-gradient(90deg, #ffb703, #ff6b6b); }

.pipeline {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.pipe-step {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid rgba(70, 90, 120, 0.35);
  background: rgba(10, 13, 18, 0.4);
  transition: all 0.3s var(--ease);
}

.pipe-step.active {
  color: var(--accent-blue);
  border-color: rgba(78, 161, 255, 0.5);
  background: rgba(78, 161, 255, 0.12);
  box-shadow: 0 0 14px rgba(78, 161, 255, 0.12);
}

.pipe-step.done {
  color: var(--ok);
  border-color: rgba(92, 255, 141, 0.4);
  background: rgba(92, 255, 141, 0.08);
  box-shadow: 0 0 12px rgba(92, 255, 141, 0.1);
}

.pipe-arrow { color: rgba(139, 151, 168, 0.5); font-size: 14px; }

.mon-table { margin-top: 8px; }

.mono { font-family: "Cascadia Code", "Consolas", monospace; font-size: 12px; }

/* ═══ 验算进度 ═══ */
.prog-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 16px; margin-bottom: 10px; }

.prog-pct {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, #a8ccff 0%, #4ea1ff 50%, #7b61ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 0 16px rgba(78, 161, 255, 0.3));
}

.prog-bar {
  flex: 1 1 200px;
  height: 10px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  min-width: 160px;
}

.prog-bar-fill {
  height: 100%;
  background: var(--gradient-primary);
  border-radius: 6px;
  transition: width 0.4s var(--ease);
  box-shadow: 0 0 12px rgba(78, 161, 255, 0.35);
}

.prog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.prog-subpanel {
  border: 1px solid rgba(70, 90, 120, 0.35);
  border-radius: 10px;
  padding: 12px;
  background: rgba(17, 23, 34, 0.55);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.prog-subpanel h3 { margin: 0 0 8px; font-size: 13px; color: var(--muted); font-weight: 600; }

.prog-table { width: 100%; border-collapse: collapse; font-size: 12px; }

.prog-table th,
.prog-table td {
  padding: 6px 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  text-align: left;
  transition: background 0.22s var(--ease);
}

.prog-table th {
  color: var(--muted);
  font-weight: 600;
  background: rgba(17, 23, 34, 0.55);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
}

.prog-table tbody tr:hover td { background: rgba(78, 161, 255, 0.06); }

.sym-wait td { color: var(--muted); }
.sym-queue td { color: #c8d4e0; }
.sym-run td { color: var(--accent-blue); }
.sym-part td { color: var(--warn); }
.sym-done td { color: var(--ok); }

.res-row { display: flex; flex-wrap: wrap; gap: 10px 16px; font-size: 12px; margin-top: 8px; }

.res-chip {
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid rgba(70, 90, 120, 0.35);
  background: rgba(17, 23, 34, 0.5);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.res-chip strong { font-variant-numeric: tabular-nums; }

/* ═══ 优策榜 ═══ */
.honor-panel { margin-top: 0; }

.honor-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 8px;
}

.honor-head .section-title { margin: 0; border-left: none; padding-left: 0; }

.honor-count { font-size: 12px; color: var(--muted); }

.honor-ms {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.honor-ms label.field-lbl {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.honor-ms-btn {
  min-width: 108px;
  height: 28px;
  padding: 0 10px;
  border-radius: 8px;
  border: 1px solid rgba(70, 90, 120, 0.35);
  background: rgba(10, 13, 18, 0.55);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
  text-align: left;
  box-shadow: none;
  transition: border-color 0.22s var(--ease), background 0.22s var(--ease);
}

.honor-ms-btn:hover {
  border-color: rgba(78, 161, 255, 0.45);
  background: rgba(78, 161, 255, 0.08);
}

.honor-ms-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 30;
  min-width: 200px;
  max-height: 240px;
  overflow: auto;
  padding: 8px;
  border-radius: 10px;
  border: 1px solid rgba(70, 90, 120, 0.35);
  background: rgba(18, 24, 36, 0.92);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  display: none;
}

.honor-ms.open .honor-ms-menu { display: block; }

.honor-ms-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 2px;
  font-size: 12px;
  cursor: pointer;
}

.honor-ms-item input { accent-color: var(--accent-blue); }

.honor-thresholds {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}

.honor-thresholds .th-lbl {
  font-size: 12px;
  color: #9aa7b4;
  white-space: nowrap;
}

.honor-thresholds input[type="number"] {
  width: 62px;
  height: 26px;
  padding: 2px 6px;
  border-radius: 6px;
  border: 1px solid rgba(70, 90, 120, 0.35);
  background: rgba(10, 13, 18, 0.55);
  color: var(--text);
  font-size: 12px;
}

.honor-thresholds input.wide { width: 68px; }

.honor-win-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin: 8px 0 10px;
}

.window-btn {
  min-width: 44px;
  height: 26px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid rgba(78, 161, 255, 0.25);
  background: rgba(10, 13, 18, 0.45);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  box-shadow: none;
  transition: all 0.22s var(--ease);
}

.window-btn.active {
  color: #fff;
  border-color: rgba(255, 112, 67, 0.55);
  background: rgba(255, 112, 67, 0.14);
  box-shadow: inset 0 0 0 1px rgba(255, 112, 67, 0.25), 0 0 14px rgba(255, 112, 67, 0.12);
}

.window-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.honor-win-row .spacer { flex: 1; min-width: 12px; }

.honor-link-btn {
  height: 26px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid rgba(78, 161, 255, 0.35);
  background: transparent;
  color: var(--accent-blue);
  font-size: 12px;
  cursor: pointer;
  box-shadow: none;
  transition: background 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.honor-link-btn:hover {
  background: rgba(78, 161, 255, 0.1);
  box-shadow: 0 0 14px rgba(78, 161, 255, 0.12);
}

.honor-stale { font-size: 12px; color: var(--warn); margin-right: 8px; }

.honor-table-wrap,
.honor-wall-wrap {
  overflow-x: auto;
  border: 1px solid rgba(70, 90, 120, 0.35);
  border-radius: 12px;
  background: rgba(17, 23, 34, 0.52);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 18px 44px rgba(0, 0, 0, 0.18);
}

.honor-wall-wrap { max-height: 520px; overflow-y: auto; }

.honor-table,
.honor-wall-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.honor-table th,
.honor-table td,
.honor-wall-table th,
.honor-wall-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left;
  transition: background 0.22s var(--ease);
}

.honor-table th,
.honor-wall-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: var(--muted);
  font-weight: 600;
  background: rgba(21, 28, 40, 0.72);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.honor-wall-table th { cursor: pointer; user-select: none; white-space: nowrap; }

.honor-wall-table th.sort-active {
  color: var(--accent-blue);
  background: rgba(78, 161, 255, 0.14);
}

.honor-wall-table td.params {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.honor-wall-table td.num { font-variant-numeric: tabular-nums; }

.honor-wall-table tbody tr:nth-child(even) td { background: rgba(255, 255, 255, 0.008); }

.honor-wall-table tr:hover td,
.honor-table tr:hover td { background: rgba(78, 161, 255, 0.07); }

.honor-empty {
  padding: 48px 16px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}

.metric-good { color: var(--ok); text-shadow: 0 0 10px rgba(92, 255, 141, 0.2); }

.metric-warn { color: var(--warn); text-shadow: 0 0 10px rgba(255, 183, 3, 0.15); }

.metric-bad { color: #ff8f8f; text-shadow: 0 0 10px rgba(255, 107, 107, 0.15); }

/* ═══ 实验室 / 设置 ═══ */
.lab-panel { text-align: center; }

.lab-hero { padding: 24px 0 20px; }

.lab-icon { font-size: 48px; margin-bottom: 8px; }

.lab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-top: 20px;
  text-align: left;
}

.lab-card {
  padding: 20px;
  border-radius: 14px;
  border: 1px solid rgba(70, 90, 120, 0.35);
  background: rgba(17, 23, 34, 0.6);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 16px 44px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform 0.22s var(--ease), border-color 0.22s var(--ease), box-shadow 0.22s var(--ease);
}

.lab-card:hover {
  transform: translateY(-2px);
  border-color: rgba(78, 161, 255, 0.45);
}

.lab-card h3 { margin: 0 0 10px; font-size: 15px; color: #f2f6fc; }

.lab-card-future {
  border-style: dashed;
  border-color: rgba(123, 97, 255, 0.35);
  background: rgba(123, 97, 255, 0.06);
}

.settings-list {
  margin: 12px 0 0;
  padding-left: 20px;
  line-height: 1.8;
}

.settings-list code {
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(78, 161, 255, 0.1);
  color: var(--accent-blue);
}

/* ── 滚动条 ── */
*::-webkit-scrollbar { width: 8px; height: 8px; }

*::-webkit-scrollbar-track {
  background: rgba(13, 17, 24, 0.35);
  border-radius: 10px;
}

*::-webkit-scrollbar-thumb {
  background: rgba(78, 161, 255, 0.22);
  border-radius: 10px;
  border: 2px solid rgba(13, 17, 24, 0.35);
}

*::-webkit-scrollbar-thumb:hover { background: rgba(78, 161, 255, 0.34); }

/* ── 响应式 ── */
@media (max-width: 900px) {
  .mon-row { grid-template-columns: 1fr; }
  .mon-hero { flex-direction: column; text-align: center; }
}

@media (max-width: 768px) {
  .shell { padding: 14px 12px 40px; }
  .top { padding: 10px 12px; }
  .main-tabs { padding: 8px 10px 0; }
  .tab-btn { padding: 8px 12px; font-size: 13px; }
  .kpi-card strong,
  .stat-card strong,
  .mon-ring-label strong,
  .prog-pct {
    background: none;
    -webkit-background-clip: unset;
    background-clip: unset;
    color: var(--accent-blue);
    -webkit-text-fill-color: currentColor;
    filter: none;
    text-shadow: 0 0 10px rgba(78, 161, 255, 0.2);
  }
  .panel:hover { transform: none; }
  .kpi-card:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .tab-pane,
  .panel,
  .kpi-card,
  .stat-card,
  .lab-card,
  .slot-card.slot-busy,
  .kpi-card.pulse strong,
  .pill::before {
    animation: none !important;
    transition: none !important;
  }
}
