/* ==========================================================================
   集沣云脑服务器观测台 (Server Observatory Pro) - 高级视觉系统
   ========================================================================== */

:root {
  /* 基础色彩调色板 - 深邃黑曜石与科技夜空 */
  --bg-app: #080c14;
  --bg-app-radial: radial-gradient(circle at 50% 0%, #111a2e 0%, #080c14 75%);
  --bg-sidebar: rgba(10, 15, 26, 0.92);
  --bg-surface: rgba(16, 23, 38, 0.72);
  --bg-surface-solid: #101726;
  --bg-surface-hover: rgba(22, 32, 53, 0.85);
  --bg-card: rgba(18, 26, 43, 0.65);
  --bg-card-hover: rgba(24, 34, 57, 0.85);
  --bg-card-active: #192338;
  --bg-muted: rgba(255, 255, 255, 0.04);
  --bg-pill: rgba(255, 255, 255, 0.06);

  /* 边框体系与光影 */
  --border-subtle: rgba(255, 255, 255, 0.07);
  --border-medium: rgba(255, 255, 255, 0.12);
  --border-hover: rgba(56, 189, 248, 0.45);
  --border-glow: rgba(56, 189, 248, 0.25);
  --shadow-card: 0 8px 32px 0 rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --shadow-card-hover: 0 16px 40px -10px rgba(0, 0, 0, 0.7), 0 0 25px -5px rgba(56, 189, 248, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.12);

  /* 文字层级色彩 */
  --text-primary: #f8fafc;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --text-subtle: #475569;

  /* 业务状态语义色 */
  --emerald-400: #34d399;
  --emerald-500: #10b981;
  --emerald-bg: rgba(16, 185, 129, 0.12);
  --emerald-border: rgba(16, 185, 129, 0.28);
  --emerald-glow: rgba(16, 185, 129, 0.4);

  --rose-400: #fb7185;
  --rose-500: #f43f5e;
  --rose-bg: rgba(244, 63, 94, 0.14);
  --rose-border: rgba(244, 63, 94, 0.32);
  --rose-glow: rgba(244, 63, 94, 0.4);

  --amber-400: #fbbf24;
  --amber-500: #f59e0b;
  --amber-bg: rgba(245, 158, 11, 0.14);
  --amber-border: rgba(245, 158, 11, 0.32);
  --amber-glow: rgba(245, 158, 11, 0.35);

  --cyan-400: #38bdf8;
  --cyan-500: #0ea5e9;
  --cyan-bg: rgba(14, 165, 233, 0.12);
  --cyan-border: rgba(14, 165, 233, 0.3);

  --indigo-400: #818cf8;
  --indigo-500: #6366f1;
  --indigo-bg: rgba(99, 102, 241, 0.12);
  --indigo-border: rgba(99, 102, 241, 0.3);

  --purple-400: #c084fc;
  --purple-500: #a855f7;
  --purple-bg: rgba(168, 85, 247, 0.12);

  /* 云平台专属色 */
  --cloud-tencent: #0066ff;
  --cloud-aliyun: #ff6a00;
  --cloud-tailscale: #2da44e;
  --cloud-default: #64748b;

  /* 基础尺寸与过渡 */
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --transition-fast: 0.18s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-base: 0.26s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ================= 全局重置与排版规范 ================= */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 14px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei UI", "Microsoft YaHei", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background-color: var(--bg-app);
  color: var(--text-primary);
  color-scheme: dark;
}

body {
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
  background-color: #070a12;
  background-image: 
    radial-gradient(ellipse 90% 50% at 50% -10%, rgba(14, 165, 233, 0.16), transparent 70%),
    radial-gradient(ellipse 60% 40% at 85% 55%, rgba(99, 102, 241, 0.1), transparent 60%),
    radial-gradient(circle at 12% 75%, rgba(16, 185, 129, 0.06), transparent 50%);
  background-attachment: fixed;
}

/* 优雅暗黑滚动条 */
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-track {
  background: rgba(10, 15, 26, 0.6);
}
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.28);
}

code, kbd, samp, pre, .mono {
  font-family: ui-monospace, "SF Mono", "Cascadia Code", "Source Code Pro", Menlo, Monaco, Consolas, monospace;
  font-variant-numeric: tabular-nums;
}

button {
  border: none;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  outline: none;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ================= 页面主体骨架 (Shell) ================= */
.shell {
  display: flex;
  min-height: 100vh;
  position: relative;
}

/* 背景科技微点阵纹理 */
.shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 28px 28px;
  z-index: 0;
}

/* ================= 侧边栏 (Sidebar) ================= */
.sidebar {
  width: 260px;
  flex: none;
  height: 100vh;
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--bg-sidebar);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  padding: 24px 18px 20px;
  box-shadow: 4px 0 24px rgba(0, 0, 0, 0.25);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 4px 6px 28px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 22px;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: linear-gradient(135deg, #0ea5e9 0%, #38bdf8 45%, #818cf8 100%);
  display: grid;
  place-items: center;
  color: #030712;
  box-shadow: 0 0 24px rgba(14, 165, 233, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.6);
  flex: none;
}

.brand-mark svg {
  width: 22px;
  height: 22px;
}

.brand-info {
  display: flex;
  flex-direction: column;
}

.brand-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.brand-title .badge-pro {
  font-size: 9px;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  color: #fff;
  text-transform: uppercase;
}

.brand-sub {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  margin-top: 1px;
}

.nav-section-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  padding: 0 10px;
  margin-bottom: 10px;
}

.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 6px;
  list-style: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 42px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  transition: all var(--transition-fast);
  flex: none;
}

.nav-item:hover {
  background: var(--bg-surface-hover);
  color: var(--text-primary);
}

.nav-item:hover svg {
  color: var(--cyan-400);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.16) 0%, rgba(99, 102, 241, 0.08) 100%);
  color: #fff;
  font-weight: 600;
  border: 1px solid rgba(56, 189, 248, 0.28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 4px 16px rgba(0, 0, 0, 0.3);
}

.nav-item.active svg {
  color: var(--cyan-400);
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(to bottom, var(--cyan-400), var(--indigo-400));
  box-shadow: 0 0 8px var(--cyan-400);
}

.nav-item .nav-count {
  margin-left: auto;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
  font-weight: 600;
}

/* 侧边栏底部遥测状态卡 */
.sidebar-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.telemetry-card {
  background: rgba(14, 21, 35, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 11px 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.telemetry-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 600;
}

.pulse-indicator {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--emerald-400);
  font-weight: 500;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--emerald-400);
  position: relative;
}

.pulse-dot::after {
  content: "";
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: var(--emerald-400);
  opacity: 0.6;
  animation: pulse-ring 2s cubic-bezier(0.24, 0, 0.38, 1) infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(0.6); opacity: 0.8; }
  100% { transform: scale(2.4); opacity: 0; }
}

.telemetry-sub {
  font-size: 10px;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
}

/* ================= 主区域 (Main) ================= */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  position: relative;
  z-index: 10;
}

/* ================= 顶栏 (Topbar) ================= */
.topbar {
  height: 64px;
  border-bottom: 1px solid var(--border-subtle);
  background: rgba(8, 12, 20, 0.75);
  backdrop-filter: blur(16px);
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  gap: 20px;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.breadcrumbs {
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.breadcrumbs span {
  color: var(--text-subtle);
}

.breadcrumbs strong {
  color: var(--text-primary);
  font-weight: 600;
}

/* 全局实时搜索框 */
.search-wrapper {
  position: relative;
  width: 320px;
}

.search-wrapper svg {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 15px;
  height: 15px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-input {
  width: 100%;
  height: 36px;
  background: rgba(22, 32, 53, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 0 36px 0 34px;
  font-size: 12px;
  color: var(--text-primary);
  transition: all var(--transition-fast);
}

.search-input::placeholder {
  color: var(--text-muted);
}

.search-input:focus {
  background: rgba(22, 32, 53, 0.95);
  border-color: var(--cyan-400);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.15);
  outline: none;
}

.search-shortcut {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
  pointer-events: none;
}

/* 顶栏右侧控制区 */
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: none;
}

/* 自动刷新倒计时微组件 */
.sync-status {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
  font-size: 11px;
  color: var(--text-secondary);
}

.sync-ring {
  width: 14px;
  height: 14px;
  transform: rotate(-90deg);
}

.sync-ring-bg {
  stroke: rgba(255, 255, 255, 0.12);
}

.sync-ring-fill {
  stroke: var(--cyan-400);
  transition: stroke-dashoffset 0.8s linear;
}

.refresh-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.15), rgba(99, 102, 241, 0.15));
  border: 1px solid rgba(56, 189, 248, 0.35);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  transition: all var(--transition-fast);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.refresh-btn svg {
  width: 15px;
  height: 15px;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.refresh-btn:hover {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.28), rgba(99, 102, 241, 0.28));
  border-color: var(--cyan-400);
  box-shadow: 0 4px 18px rgba(14, 165, 233, 0.25);
  transform: translateY(-1px);
}

.refresh-btn:active {
  transform: translateY(0);
}

.refresh-btn.loading svg {
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ================= 页面主体内容区 (Content) ================= */
.content {
  max-width: 1560px;
  width: 100%;
  margin: 0 auto;
  padding: 30px 32px 60px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

/* ================= 头部 Hero 区域 ================= */
.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
}

.hero-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  letter-spacing: 0.18em;
  font-weight: 700;
  color: var(--cyan-400);
  text-transform: uppercase;
}

.hero-tag-glow {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--cyan-400);
  box-shadow: 0 0 10px var(--cyan-400);
}

.hero-title {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #fff;
  line-height: 1.2;
}

.hero-desc {
  font-size: 13px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-desc .cluster-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text-muted);
  font-size: 11px;
}

.hero-clock {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  background: var(--bg-surface);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 18px;
  box-shadow: var(--shadow-card);
}

.clock-label {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.clock-time {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
  line-height: 1.1;
}

.clock-date {
  font-size: 11px;
  color: var(--text-secondary);
}

/* ================= KPI 核心指标卡 (Stats Cards - Minimalist Hi-End) ================= */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stat-card {
  position: relative;
  background: rgba(14, 21, 37, 0.6);
  backdrop-filter: blur(24px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: 0 12px 32px -4px rgba(0, 0, 0, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  transition: all var(--transition-base);
}

.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
  transition: all var(--transition-base);
}

.stat-card:hover {
  transform: translateY(-3px);
  border-color: rgba(56, 189, 248, 0.35);
  box-shadow: 0 20px 44px -8px rgba(0, 0, 0, 0.6), 0 0 25px -4px rgba(56, 189, 248, 0.15), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.stat-card.variant-total:hover::before {
  background: linear-gradient(90deg, transparent, var(--indigo-400), transparent);
}
.stat-card.variant-online:hover::before {
  background: linear-gradient(90deg, transparent, var(--emerald-400), transparent);
}
.stat-card.variant-containers:hover::before {
  background: linear-gradient(90deg, transparent, var(--cyan-400), transparent);
}
.stat-card.variant-health:hover::before {
  background: linear-gradient(90deg, transparent, var(--amber-400), transparent);
}

.stat-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.stat-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.stat-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  transition: transform var(--transition-fast);
}

.stat-card:hover .stat-icon {
  transform: scale(1.08);
}

.stat-icon svg {
  width: 17px;
  height: 17px;
}

.stat-icon.violet {
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.28);
  color: var(--indigo-400);
}
.stat-icon.green {
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.28);
  color: var(--emerald-400);
}
.stat-icon.blue {
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.28);
  color: var(--cyan-400);
}
.stat-icon.amber {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.28);
  color: var(--amber-400);
}

.stat-value {
  font-size: 38px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  background: linear-gradient(180deg, #ffffff 40%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}

.stat-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

.stat-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
}

.stat-badge.success { color: var(--emerald-400); }
.stat-badge.warning { color: var(--amber-400); }
.stat-badge.info { color: var(--cyan-400); }

/* ================= 视图容器 (Views) ================= */
.view {
  display: none;
  animation: fadeIn var(--transition-base);
}

.view.active {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

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

/* ================= 区块标题头 (Section Header) ================= */
.section-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 4px;
}

.section-title-group {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.section-kicker {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cyan-400);
}

.section-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.01em;
}

.section-meta {
  font-size: 12px;
  color: var(--text-muted);
}

/* ================= 服务器卡片网格 (Server Grid) ================= */
.server-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

/* 核心服务器节点卡片 */
.server-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all var(--transition-base);
  overflow: hidden;
}

.server-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.4), transparent);
  opacity: 0;
  transition: opacity var(--transition-fast);
}

.server-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.server-card:hover::before {
  opacity: 1;
}

.server-card.offline {
  background: rgba(18, 22, 33, 0.55);
  border-color: rgba(244, 63, 94, 0.2);
}

.server-card.offline::before {
  background: linear-gradient(90deg, transparent, var(--rose-400), transparent);
  opacity: 0.7;
}

/* 卡片头部 */
.node-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.node-identity {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.node-avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: rgba(22, 32, 53, 0.8);
  border: 1px solid var(--border-medium);
  display: grid;
  place-items: center;
  color: var(--cyan-400);
  flex: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.node-avatar svg {
  width: 22px;
  height: 22px;
}

.node-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.node-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.node-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 云厂商微标签 */
.cloud-pill {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.cloud-pill.tencent {
  background: rgba(0, 102, 255, 0.15);
  border: 1px solid rgba(0, 102, 255, 0.35);
  color: #60a5fa;
}

.cloud-pill.aliyun {
  background: rgba(255, 106, 0, 0.15);
  border: 1px solid rgba(255, 106, 0, 0.35);
  color: #fb923c;
}

.cloud-pill.tailscale {
  background: rgba(16, 185, 129, 0.15);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: var(--emerald-400);
}

.cloud-pill.internal {
  background: rgba(148, 163, 184, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: var(--text-secondary);
}

.node-hostname {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 状态标签 */
.node-status-area {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  flex: none;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.status-badge.online {
  background: var(--emerald-bg);
  border: 1px solid var(--emerald-border);
  color: var(--emerald-400);
  box-shadow: 0 0 12px var(--emerald-glow);
}

.status-badge.offline {
  background: var(--rose-bg);
  border: 1px solid var(--rose-border);
  color: var(--rose-400);
}

.status-badge.pending {
  background: var(--indigo-bg);
  border: 1px solid var(--indigo-border);
  color: var(--indigo-400);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.status-badge.online .status-dot {
  box-shadow: 0 0 6px var(--emerald-400);
  animation: pulse-dot 1.8s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.4); opacity: 0.6; }
}

.latency-pill {
  font-size: 10px;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* 地址条 (连接 IP & 出口 IP) */
.node-network-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(14, 21, 35, 0.7);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 11px;
  color: var(--text-secondary);
}

.ip-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ip-group .ip-label {
  color: var(--text-muted);
}

.ip-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 11px;
  transition: all var(--transition-fast);
  white-space: nowrap;
  flex-shrink: 0;
  user-select: none;
}

.ip-chip:hover {
  background: rgba(255, 255, 255, 0.09);
  border-color: var(--cyan-400);
}

.ip-chip .copy-icon {
  width: 12px;
  height: 12px;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--transition-fast);
}

.ip-chip:hover .copy-icon {
  color: var(--cyan-400);
}

.ip-changed-badge {
  color: var(--amber-400);
  background: var(--amber-bg);
  border: 1px solid var(--amber-border);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
}

/* ================= 资源利用率遥测仪表 (Telemetry Gauges) ================= */
.node-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  padding: 6px 0;
}

.metric-gauge {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.gauge-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 11px;
}

.gauge-label {
  color: var(--text-secondary);
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 5px;
}

.gauge-label svg {
  width: 13px;
  height: 13px;
  color: var(--text-muted);
}

.gauge-val {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}

.gauge-track {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}

.gauge-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.gauge-fill.cpu {
  background: linear-gradient(90deg, #0ea5e9, #38bdf8);
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.4);
}

.gauge-fill.memory {
  background: linear-gradient(90deg, #818cf8, #a78bfa);
  box-shadow: 0 0 10px rgba(167, 139, 250, 0.4);
}

.gauge-fill.disk {
  background: linear-gradient(90deg, #38bdf8, #818cf8);
}

.gauge-fill.high {
  background: linear-gradient(90deg, #f59e0b, #f43f5e) !important;
  box-shadow: 0 0 12px rgba(244, 63, 94, 0.5) !important;
}

.gauge-subtext {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 系统运行信息条 */
.node-sysinfo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 2px;
  border-top: 1px solid var(--border-subtle);
  font-size: 11px;
  color: var(--text-muted);
  gap: 10px;
}

.node-sysinfo span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.node-uptime {
  color: var(--text-secondary);
  font-weight: 500;
  flex: none;
}

/* 部署网站微型矩阵 (Ingress Sites) */
.node-sites-box {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sites-box-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.sites-box-title .badge-count {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.sites-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

.site-card-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 11px;
  background: rgba(14, 21, 35, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: all var(--transition-fast);
  color: var(--text-primary);
}

.site-card-chip:hover {
  background: rgba(22, 32, 53, 0.9);
  border-color: var(--cyan-400);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.site-chip-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.site-chip-name {
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  gap: 4px;
}

.site-chip-url {
  font-size: 9px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.site-chip-status {
  font-size: 9px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  flex: none;
}

.site-chip-status.ok {
  background: var(--emerald-bg);
  color: var(--emerald-400);
  border: 1px solid var(--emerald-border);
}

.site-chip-status.fail {
  background: var(--rose-bg);
  color: var(--rose-400);
  border: 1px solid var(--rose-border);
}

.site-chip-status.unknown {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-muted);
}

.sites-empty {
  font-size: 11px;
  color: var(--text-muted);
  padding: 6px 0;
  font-style: italic;
}

/* 离线诊断警示 */
.offline-banner {
  background: rgba(244, 63, 94, 0.08);
  border: 1px dashed rgba(244, 63, 94, 0.28);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--rose-400);
  font-size: 12px;
}

.offline-banner svg {
  width: 20px;
  height: 20px;
  flex: none;
}

/* ================= 仪表盘下半部分 (Lower Grid) ================= */
.lower-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 18px;
}

.panel {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-title-area {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.panel-select {
  background: rgba(22, 32, 53, 0.8);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-size: 11px;
  padding: 6px 12px;
  outline: none;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.panel-select:hover, .panel-select:focus {
  border-color: var(--cyan-400);
}

/* 贝塞尔曲线平滑趋势图 */
.chart-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chart-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-secondary);
}

.legend-items {
  display: flex;
  align-items: center;
  gap: 18px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.legend-color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.legend-color-dot.cpu {
  background: var(--cyan-400);
  box-shadow: 0 0 8px var(--cyan-400);
}

.legend-color-dot.memory {
  background: var(--purple-400);
  box-shadow: 0 0 8px var(--purple-400);
}

/* SVG 交互式图表区 */
.chart-canvas-wrap {
  height: 190px;
  position: relative;
  border-radius: var(--radius-md);
  background: rgba(10, 15, 26, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
}

.chart-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart-grid-line {
  stroke: rgba(255, 255, 255, 0.05);
  stroke-dasharray: 4 4;
}

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(14, 21, 35, 0.95);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 11px;
  color: #fff;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 20;
  white-space: nowrap;
}

.chart-cursor-line {
  stroke: rgba(255, 255, 255, 0.25);
  stroke-dasharray: 3 3;
}

.chart-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}

/* 健康检查监控列表 */
.health-probes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.probe-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  background: rgba(14, 21, 35, 0.5);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  transition: all var(--transition-fast);
}

.probe-row:hover {
  background: rgba(20, 30, 48, 0.7);
  border-color: var(--border-medium);
}

.probe-info {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.probe-icon {
  width: 30px;
  height: 30px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  flex: none;
}

.probe-icon.ok {
  background: var(--emerald-bg);
  color: var(--emerald-400);
}

.probe-icon.fail {
  background: var(--rose-bg);
  color: var(--rose-400);
}

.probe-icon svg {
  width: 16px;
  height: 16px;
}

.probe-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.probe-name {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.probe-sub {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.probe-status-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  flex: none;
}

.probe-status-badge.ok {
  background: var(--emerald-bg);
  color: var(--emerald-400);
  border: 1px solid var(--emerald-border);
}

.probe-status-badge.fail {
  background: var(--rose-bg);
  color: var(--rose-400);
  border: 1px solid var(--rose-border);
}

/* ================= 详细服务器视窗 (Servers Detailed View) ================= */
.servers-detail-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.detail-section-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 26px 28px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.detail-subheading {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan-400);
  margin-bottom: 8px;
}

.chips-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-chip {
  padding: 5px 10px;
  background: rgba(22, 32, 53, 0.6);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.detail-chip:hover {
  background: rgba(30, 44, 72, 0.8);
  border-color: var(--cyan-400);
  color: #fff;
}

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

.container-table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.container-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}

.container-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
  color: #fff;
}

/* ================= 网站与服务视窗 (Web & Ingress View) ================= */
.sites-view-wrapper {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.filter-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  background: rgba(14, 21, 35, 0.8);
  padding: 4px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.filter-tab {
  padding: 6px 14px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  transition: all var(--transition-fast);
}

.filter-tab:hover {
  color: #fff;
}

.filter-tab.active {
  background: rgba(56, 189, 248, 0.15);
  color: var(--cyan-400);
  font-weight: 600;
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 16px;
}

.service-card {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all var(--transition-base);
}

.service-card:hover {
  transform: translateY(-2px);
  border-color: var(--cyan-400);
  box-shadow: var(--shadow-card-hover);
}

.service-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.service-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.service-url-link {
  font-size: 11px;
  color: var(--cyan-400);
  word-break: break-all;
  display: flex;
  align-items: center;
  gap: 4px;
}

.service-url-link:hover {
  text-decoration: underline;
}

/* ================= 浮动通知与 Toast ================= */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

.toast {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: var(--radius-md);
  background: rgba(14, 21, 35, 0.95);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-medium);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.6);
  font-size: 12px;
  color: #fff;
  animation: toast-in 0.28s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(16px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.toast.fade-out {
  opacity: 0;
  transform: translateY(10px) scale(0.95);
}

/* ================= 业务工作流与定时调度体系 (Workflows & Jobs System) ================= */
.overview-workflows-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 10px;
}

.overview-workflows-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

/* 服务器卡片内部嵌入的定时任务与工作流模块 */
.node-workflows-box {
  margin-top: 4px;
  padding-top: 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.node-workflows-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.workflow-mini-card.inside-server {
  background: rgba(14, 21, 35, 0.72);
  border: 1px solid var(--border-subtle);
  padding: 14px 16px;
  gap: 10px;
}

.workflow-card-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  padding-top: 8px;
}

.workflow-policy-text {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex: 1;
}

.copy-btn-nowrap {
  white-space: nowrap !important;
  flex-shrink: 0 !important;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.workflow-mini-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: all var(--transition-base);
  overflow: hidden;
}

.workflow-mini-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(to bottom, var(--cyan-400), var(--indigo-400));
  opacity: 0.8;
}

.workflow-mini-card:hover {
  transform: translateY(-2px);
  border-color: var(--cyan-400);
  box-shadow: var(--shadow-card-hover);
}

.workflow-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.workflow-title-box {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.workflow-avatar {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.28);
  color: var(--cyan-400);
  display: grid;
  place-items: center;
  flex: none;
}

.workflow-avatar svg {
  width: 17px;
  height: 17px;
}

.workflow-heading-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.workflow-name {
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.workflow-meta-sub {
  font-size: 10px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* 工作流流水线步骤流程图 (Hi-End Architecture Flow) */
.workflow-pipeline {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 10px 12px;
  background: rgba(9, 14, 25, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-sm);
  scrollbar-width: none;
}

.workflow-pipeline::-webkit-scrollbar {
  display: none;
}

.pipeline-step {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  background: rgba(18, 27, 46, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  font-size: 11px;
  color: var(--text-primary);
  flex: none;
  transition: all var(--transition-fast);
  cursor: default;
}

.pipeline-step:hover {
  background: rgba(26, 42, 72, 0.95);
  border-color: rgba(56, 189, 248, 0.6);
  box-shadow: 0 0 14px rgba(56, 189, 248, 0.25);
  transform: translateY(-1px);
  color: #fff;
}

.pipeline-step-num {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.3), rgba(99, 102, 241, 0.3));
  border: 1px solid rgba(56, 189, 248, 0.5);
  color: #38bdf8;
  font-weight: 700;
  font-size: 10px;
  display: grid;
  place-items: center;
  flex: none;
  box-shadow: 0 0 8px rgba(56, 189, 248, 0.3);
}

.pipeline-arrow {
  color: var(--cyan-400);
  opacity: 0.55;
  font-size: 12px;
  flex: none;
}

/* 独立工作流全景卡片 */
.workflow-cards-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}

.workflow-card {
  position: relative;
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px 26px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: all var(--transition-base);
}

.workflow-card:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-card-hover);
}

.workflow-spec-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 14px;
  background: rgba(14, 21, 35, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  font-size: 11px;
  color: var(--text-secondary);
}

.spec-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

.spec-item .spec-label {
  color: var(--text-muted);
}

/* 定时器表格 */
.timers-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.timers-table th {
  text-align: left;
  padding: 12px 14px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-subtle);
}

.timers-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
}

.timers-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
  color: #fff;
}

/* ==========================================================================
   主题切换胶囊 (Theme Switcher Button)
   ========================================================================== */
.theme-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-medium);
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
  transition: all var(--transition-fast);
  cursor: pointer;
  white-space: nowrap;
}

.theme-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: var(--cyan-400);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.theme-btn svg {
  color: var(--amber-400);
  transition: transform var(--transition-base);
}

.theme-btn:hover svg {
  transform: rotate(20deg) scale(1.1);
}

/* ==========================================================================
   空灵云雾白金主题 (BeatAPI & TypeSafe AI Hi-End Light Theme)
   ========================================================================== */
body.light-theme {
  --bg-app: #f4f7fb;
  --bg-app-radial: radial-gradient(circle at 50% 0%, #e0f2fe 0%, #f4f7fb 80%);
  --bg-sidebar: rgba(255, 255, 255, 0.88);
  --bg-surface: rgba(255, 255, 255, 0.82);
  --bg-surface-solid: #ffffff;
  --bg-surface-hover: rgba(241, 245, 249, 0.95);
  --bg-card: rgba(255, 255, 255, 0.85);
  --bg-card-hover: #ffffff;
  --bg-card-active: #f8fafc;
  --bg-muted: rgba(15, 23, 42, 0.04);
  --bg-pill: rgba(15, 23, 42, 0.05);

  --border-subtle: rgba(226, 232, 240, 0.9);
  --border-medium: rgba(203, 213, 225, 0.9);
  --border-hover: rgba(14, 165, 233, 0.6);
  --border-glow: rgba(14, 165, 233, 0.25);
  --shadow-card: 0 10px 30px -8px rgba(15, 23, 42, 0.06), 0 0 0 1px rgba(226, 232, 240, 0.85);
  --shadow-card-hover: 0 20px 45px -12px rgba(15, 23, 42, 0.12), 0 0 0 1px rgba(14, 165, 233, 0.45), 0 0 24px rgba(14, 165, 233, 0.12);

  --text-primary: #0f172a;
  --text-secondary: #334155;
  --text-muted: #64748b;
  --text-subtle: #94a3b8;

  --emerald-400: #059669;
  --emerald-500: #047857;
  --emerald-bg: rgba(16, 185, 129, 0.1);
  --emerald-border: rgba(16, 185, 129, 0.35);

  --rose-400: #e11d48;
  --rose-500: #be123c;
  --rose-bg: rgba(244, 63, 94, 0.08);
  --rose-border: rgba(244, 63, 94, 0.28);

  --amber-400: #d97706;
  --amber-500: #b45309;
  --amber-bg: rgba(245, 158, 11, 0.09);
  --amber-border: rgba(245, 158, 11, 0.28);

  --cyan-400: #0284c7;
  --cyan-500: #0369a1;
  --cyan-bg: rgba(14, 165, 233, 0.08);
  --cyan-border: rgba(14, 165, 233, 0.25);

  --indigo-400: #4f46e5;
  --indigo-500: #4338ca;
  --indigo-bg: rgba(99, 102, 241, 0.08);
  --indigo-border: rgba(99, 102, 241, 0.25);

  background-color: #f8fafc;
  background-image: 
    radial-gradient(ellipse 95% 55% at 50% -12%, rgba(186, 230, 253, 0.65), transparent 75%),
    radial-gradient(ellipse 70% 45% at 85% 40%, rgba(224, 231, 255, 0.55), transparent 60%),
    radial-gradient(circle at 8% 65%, rgba(209, 250, 229, 0.5), transparent 50%),
    linear-gradient(180deg, #f0f7ff 0%, #f8fafc 35%, #ffffff 100%);
  background-attachment: fixed;
  color: #0f172a;
}

body.light-theme .shell::before {
  background-image: radial-gradient(rgba(15, 23, 42, 0.055) 1px, transparent 1px);
}

body.light-theme ::-webkit-scrollbar-track {
  background: rgba(241, 245, 249, 0.8);
}

body.light-theme ::-webkit-scrollbar-thumb {
  background: rgba(15, 23, 42, 0.16);
}

body.light-theme ::-webkit-scrollbar-thumb:hover {
  background: rgba(15, 23, 42, 0.28);
}

/* 浅色侧边栏 */
body.light-theme .sidebar {
  background: rgba(255, 255, 255, 0.88);
  border-right-color: rgba(226, 232, 240, 0.95);
  box-shadow: 4px 0 24px rgba(15, 23, 42, 0.03);
}

body.light-theme .brand {
  border-bottom-color: rgba(226, 232, 240, 0.9);
}

body.light-theme .brand-title {
  color: #0f172a;
}

body.light-theme .nav-item {
  color: #475569;
}

body.light-theme .nav-item svg {
  color: #64748b;
}

body.light-theme .nav-item:hover {
  background: rgba(241, 245, 249, 0.9);
  color: #0f172a;
}

body.light-theme .nav-item:hover svg {
  color: #0284c7;
}

body.light-theme .nav-item.active {
  background: linear-gradient(90deg, rgba(14, 165, 233, 0.12) 0%, rgba(99, 102, 241, 0.06) 100%);
  color: #0284c7;
  border: 1px solid rgba(14, 165, 233, 0.35);
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.08);
}

body.light-theme .nav-item.active svg {
  color: #0284c7;
}

body.light-theme .nav-item .nav-count {
  background: rgba(15, 23, 42, 0.06);
  color: #475569;
}

body.light-theme .sidebar-footer {
  border-top-color: rgba(226, 232, 240, 0.9);
}

body.light-theme .telemetry-card {
  background: rgba(248, 250, 252, 0.95);
  border-color: rgba(226, 232, 240, 0.95);
}

/* 浅色顶栏 */
body.light-theme .topbar {
  background: rgba(255, 255, 255, 0.86);
  border-bottom-color: rgba(226, 232, 240, 0.95);
}

body.light-theme .breadcrumbs strong {
  color: #0f172a;
}

body.light-theme .search-input {
  background: rgba(241, 245, 249, 0.9);
  border-color: rgba(203, 213, 225, 0.9);
  color: #0f172a;
}

body.light-theme .search-input::placeholder {
  color: #94a3b8;
}

body.light-theme .search-input:focus {
  background: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

body.light-theme .search-shortcut {
  background: rgba(15, 23, 42, 0.06);
  color: #64748b;
}

body.light-theme .theme-btn {
  background: rgba(15, 23, 42, 0.04);
  border-color: rgba(203, 213, 225, 0.9);
  color: #334155;
}

body.light-theme .theme-btn:hover {
  background: #ffffff;
  border-color: #0284c7;
  color: #0284c7;
  box-shadow: 0 3px 12px rgba(14, 165, 233, 0.15);
}

body.light-theme .theme-btn svg {
  color: #6366f1;
}

body.light-theme .sync-status {
  background: rgba(241, 245, 249, 0.9);
  border-color: rgba(226, 232, 240, 0.95);
  color: #475569;
}

body.light-theme .sync-ring-bg {
  stroke: rgba(15, 23, 42, 0.12);
}

body.light-theme .refresh-btn {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.12), rgba(99, 102, 241, 0.12));
  border-color: rgba(14, 165, 233, 0.35);
  color: #0369a1;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.08);
}

body.light-theme .refresh-btn:hover {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.2), rgba(99, 102, 241, 0.2));
  color: #0284c7;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.15);
}

/* 浅色 Hero 区域 */
body.light-theme .hero-title {
  color: #0f172a;
}

body.light-theme .hero-desc {
  color: #475569;
}

body.light-theme .hero-desc .cluster-badge {
  background: rgba(15, 23, 42, 0.05);
  color: #64748b;
}

body.light-theme .hero-clock {
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(226, 232, 240, 0.95);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.04);
}

body.light-theme .clock-time {
  color: #0f172a;
}

body.light-theme .clock-date {
  color: #64748b;
}

/* 浅色 KPI 展台卡片 (BeatAPI 同款大数字) */
body.light-theme .stat-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 10px 28px -6px rgba(15, 23, 42, 0.06), 0 0 0 1px rgba(255, 255, 255, 0.9);
}

body.light-theme .stat-card::before {
  background: linear-gradient(90deg, transparent, rgba(14, 165, 233, 0.25), transparent);
}

body.light-theme .stat-card:hover {
  border-color: rgba(14, 165, 233, 0.45);
  box-shadow: 0 18px 40px -8px rgba(15, 23, 42, 0.1), 0 0 20px rgba(14, 165, 233, 0.12);
}

body.light-theme .stat-title {
  color: #64748b;
}

body.light-theme .stat-value {
  background: linear-gradient(180deg, #0f172a 30%, #334155 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* 浅色服务器卡片 */
body.light-theme .section-title {
  color: #0f172a;
}

body.light-theme .server-card {
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 10px 28px -6px rgba(15, 23, 42, 0.06), 0 0 0 1px rgba(255, 255, 255, 0.9);
}

body.light-theme .server-card:hover {
  border-color: rgba(14, 165, 233, 0.45);
  box-shadow: 0 20px 45px -10px rgba(15, 23, 42, 0.12), 0 0 24px rgba(14, 165, 233, 0.12);
}

body.light-theme .server-card.offline {
  background: rgba(255, 241, 242, 0.7);
  border-color: rgba(244, 63, 94, 0.3);
}

body.light-theme .node-avatar {
  background: rgba(241, 245, 249, 0.95);
  border-color: rgba(203, 213, 225, 0.9);
  color: #0284c7;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

body.light-theme .node-name {
  color: #0f172a;
}

body.light-theme .node-network-bar {
  background: rgba(248, 250, 252, 0.95);
  border-color: rgba(226, 232, 240, 0.95);
  color: #475569;
}

body.light-theme .ip-chip {
  background: #ffffff;
  border-color: rgba(203, 213, 225, 0.85);
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

body.light-theme .ip-chip:hover {
  background: #ffffff;
  border-color: #0284c7;
  color: #0284c7;
}

body.light-theme .gauge-label {
  color: #475569;
}

body.light-theme .gauge-val {
  color: #0f172a;
}

body.light-theme .gauge-track {
  background: rgba(15, 23, 42, 0.08);
}

body.light-theme .node-sysinfo {
  border-top-color: rgba(226, 232, 240, 0.9);
  color: #64748b;
}

body.light-theme .node-uptime {
  color: #334155;
}

body.light-theme .node-sites-box {
  border-top-color: rgba(226, 232, 240, 0.9);
}

body.light-theme .sites-box-title {
  color: #334155;
}

body.light-theme .sites-box-title .badge-count {
  background: rgba(15, 23, 42, 0.06);
  color: #64748b;
}

body.light-theme .site-card-chip {
  background: rgba(248, 250, 252, 0.95);
  border-color: rgba(226, 232, 240, 0.9);
  color: #0f172a;
}

body.light-theme .site-card-chip:hover {
  background: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.12);
}

body.light-theme .site-chip-name {
  color: #0f172a;
}

/* 浅色卡片内嵌工作流流向图 (BeatAPI Micro Flow Graph) */
body.light-theme .workflow-mini-card,
body.light-theme .workflow-mini-card.inside-server,
body.light-theme .workflow-card-embedded {
  background: rgba(248, 250, 252, 0.92);
  border: 1px solid rgba(226, 232, 240, 0.95);
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
}

body.light-theme .workflow-card-bottom {
  border-top-color: rgba(226, 232, 240, 0.9);
}

body.light-theme .workflow-name {
  color: #0f172a;
}

body.light-theme .workflow-avatar {
  background: rgba(14, 165, 233, 0.1);
  border-color: rgba(14, 165, 233, 0.3);
  color: #0284c7;
}

body.light-theme .workflow-pipeline {
  background: #ffffff;
  border-color: rgba(226, 232, 240, 0.95);
  box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.02);
}

body.light-theme .pipeline-step {
  background: rgba(248, 250, 252, 0.95);
  border: 1px solid rgba(203, 213, 225, 0.85);
  color: #0f172a;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

body.light-theme .pipeline-step:hover {
  background: #ffffff;
  border-color: #0284c7;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
  color: #0284c7;
}

body.light-theme .pipeline-step-num {
  background: linear-gradient(135deg, #0ea5e9, #6366f1);
  border-color: rgba(14, 165, 233, 0.4);
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(14, 165, 233, 0.3);
}

body.light-theme .pipeline-arrow {
  color: #0284c7;
  opacity: 0.7;
}

body.light-theme .workflow-policy-text {
  color: #64748b;
}

/* 浅色独立工作流与定时器视图 */
body.light-theme .workflow-card {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(226, 232, 240, 0.95);
  box-shadow: 0 10px 28px -6px rgba(15, 23, 42, 0.06);
}

body.light-theme .workflow-spec-bar {
  background: rgba(248, 250, 252, 0.95);
  border-color: rgba(226, 232, 240, 0.9);
  color: #475569;
}

body.light-theme .timers-table th {
  color: #64748b;
  border-bottom-color: rgba(226, 232, 240, 0.95);
}

body.light-theme .timers-table td {
  color: #334155;
  border-bottom-color: rgba(226, 232, 240, 0.7);
}

body.light-theme .timers-table tr:hover td {
  background: rgba(241, 245, 249, 0.6);
  color: #0f172a;
}

body.light-theme .filter-tab {
  background: rgba(241, 245, 249, 0.9);
  border-color: rgba(203, 213, 225, 0.85);
  color: #475569;
}

body.light-theme .filter-tab:hover {
  background: #ffffff;
  color: #0f172a;
}

body.light-theme .filter-tab.active {
  background: #ffffff;
  border-color: #0284c7;
  color: #0284c7;
  box-shadow: 0 2px 8px rgba(14, 165, 233, 0.12);
}

/* 浅色历史图表卡片 */
body.light-theme .chart-card {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(226, 232, 240, 0.95);
  box-shadow: 0 10px 28px -6px rgba(15, 23, 42, 0.06);
}

body.light-theme .chart-title {
  color: #0f172a;
}

body.light-theme .chart-select {
  background: rgba(241, 245, 249, 0.9);
  border-color: rgba(203, 213, 225, 0.9);
  color: #0f172a;
}


/* ================= 响应式断点适配 (Media Queries) ================= */
@media (max-width: 1280px) {
  .server-grid {
    grid-template-columns: 1fr;
  }
  .lower-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1024px) {
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .search-wrapper {
    width: 240px;
  }
}

@media (max-width: 768px) {
  .sidebar {
    width: 70px;
    padding: 20px 10px;
  }
  .brand-info, .nav-section-title, .nav-item span, .nav-item .nav-count, .telemetry-card {
    display: none;
  }
  .nav-item {
    justify-content: center;
    padding: 0;
  }
  .topbar {
    padding: 0 18px;
  }
  .content {
    padding: 20px 18px 40px;
  }
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }
  .hero-clock {
    align-self: stretch;
    align-items: flex-start;
  }
  .stats-grid {
    grid-template-columns: 1fr;
  }
  .search-wrapper {
    display: none;
  }
}
