/* ==========================================================================
   PulseMesh 云脉智网 — 全局设计系统与响应式组件样式
   支持深色/浅色双主题切换、响应式布局、仪表盘、文档中心与博客排版
   ========================================================================== */

:root {
  /* 通用品牌与语义色 */
  --brand-primary: #0ea5e9;
  --brand-primary-hover: #0284c7;
  --brand-secondary: #6366f1;
  --brand-accent: #22d3ee;
  --brand-gradient: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
  --status-success: #10b981;
  --status-success-bg: rgba(16, 185, 129, 0.14);
  --status-warning: #f59e0b;
  --status-warning-bg: rgba(245, 158, 11, 0.14);
  --status-danger: #ef4444;
  --status-danger-bg: rgba(239, 68, 68, 0.14);
  --status-info: #38bdf8;
  --status-info-bg: rgba(56, 189, 248, 0.14);

  /* 字体与圆角 */
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: "JetBrains Mono", "Fira Code", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-full: 9999px;

  /* 布局与动效 */
  --container-max: 1240px;
  --header-height: 68px;
  --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 240ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* 深色主题（默认企业级暗夜控制台风格） */
[data-theme="dark"] {
  --bg-page: #070b12;
  --bg-elevated: #0d1420;
  --bg-surface: #111927;
  --bg-surface-hover: #172234;
  --bg-subtle: rgba(148, 163, 184, 0.08);
  --bg-header: rgba(7, 11, 18, 0.82);
  --bg-code: #090e17;
  --border-subtle: rgba(148, 163, 184, 0.14);
  --border-strong: rgba(148, 163, 184, 0.28);
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 30px -10px rgba(0, 0, 0, 0.55);
  --shadow-lg: 0 24px 60px -15px rgba(0, 0, 0, 0.75);
  --grid-line: rgba(148, 163, 184, 0.06);
  --glow-primary: rgba(14, 165, 233, 0.16);
  --glow-secondary: rgba(99, 102, 241, 0.14);
}

/* 浅色主题（高对比度极简工程白） */
[data-theme="light"] {
  --bg-page: #f8fafc;
  --bg-elevated: #ffffff;
  --bg-surface: #ffffff;
  --bg-surface-hover: #f1f5f9;
  --bg-subtle: rgba(15, 23, 42, 0.04);
  --bg-header: rgba(248, 250, 252, 0.86);
  --bg-code: #0f172a;
  --border-subtle: rgba(15, 23, 42, 0.1);
  --border-strong: rgba(15, 23, 42, 0.2);
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-muted: #64748b;
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 10px 28px -8px rgba(15, 23, 42, 0.09);
  --shadow-lg: 0 24px 50px -12px rgba(15, 23, 42, 0.14);
  --grid-line: rgba(15, 23, 42, 0.045);
  --glow-primary: rgba(14, 165, 233, 0.1);
  --glow-secondary: rgba(99, 102, 241, 0.08);
}

/* 基础重置 */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  margin: 0;
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.65;
  color: var(--text-primary);
  background-color: var(--bg-page);
  transition: background-color var(--transition-normal), color var(--transition-normal);
  overflow-x: hidden;
}

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

img, svg {
  display: block;
  max-width: 100%;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

code, pre {
  font-family: var(--font-mono);
}

/* 辅助与无障碍 */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 24px;
}

.mono {
  font-family: var(--font-mono);
}

.text-gradient {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ==========================================================================
   全局顶部导航栏
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: var(--bg-header);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 20px;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -0.01em;
  flex-shrink: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: var(--brand-gradient);
  display: grid;
  place-items: center;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35);
}

.brand-sub {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-left: 2px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
}

.nav-link {
  padding: 7px 13px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color var(--transition-fast), background-color var(--transition-fast);
  white-space: nowrap;
}

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

.nav-link.active {
  color: var(--brand-primary);
  background: rgba(14, 165, 233, 0.1);
  font-weight: 600;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.icon-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
  background: var(--bg-surface-hover);
}

.mobile-menu-btn {
  display: none;
}

/* 按钮体系 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
  white-space: nowrap;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 13px;
}

.btn-lg {
  padding: 12px 24px;
  font-size: 15px;
  border-radius: var(--radius-md);
}

.btn-primary {
  background: var(--brand-gradient);
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.3);
}

.btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(14, 165, 233, 0.4);
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--text-primary);
  border-color: var(--border-strong);
}

.btn-secondary:hover {
  background: var(--bg-surface-hover);
  border-color: var(--brand-primary);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-subtle);
}

/* 移动端导航抽屉 */
.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 23, 0.65);
  backdrop-filter: blur(4px);
  z-index: 190;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.mobile-drawer-backdrop.open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(320px, 86vw);
  background: var(--bg-elevated);
  border-left: 1px solid var(--border-subtle);
  z-index: 200;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: translateX(100%);
  transition: transform var(--transition-normal);
  box-shadow: var(--shadow-lg);
}

.mobile-drawer.open {
  transform: translateX(0);
}

.mobile-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
}

.mobile-nav-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.mobile-nav-link {
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.mobile-nav-link.active,
.mobile-nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-subtle);
}

.mobile-nav-link.active {
  color: var(--brand-primary);
  font-weight: 600;
}

.mobile-drawer-footer {
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ==========================================================================
   徽章、标签与通用卡片
   ========================================================================== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--radius-full);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  color: var(--text-secondary);
}

.badge-accent {
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(14, 165, 233, 0.28);
  color: var(--brand-primary);
}

.badge-success {
  background: var(--status-success-bg);
  border-color: rgba(16, 185, 129, 0.3);
  color: var(--status-success);
}

.badge-warning {
  background: var(--status-warning-bg);
  border-color: rgba(245, 158, 11, 0.3);
  color: var(--status-warning);
}

.badge-danger {
  background: var(--status-danger-bg);
  border-color: rgba(239, 68, 68, 0.3);
  color: var(--status-danger);
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--status-success);
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
  animation: pulse-ring 2.2s infinite;
}

@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6); }
  70% { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}

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

.section {
  padding: 80px 0;
  position: relative;
}

.section-sm {
  padding: 48px 0;
}

.section-alt {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.section-header {
  max-width: 720px;
  margin-bottom: 44px;
}

.section-header.centered {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

.section-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand-primary);
  margin-bottom: 10px;
}

.section-title {
  margin: 0 0 14px;
  font-size: clamp(26px, 3.2vw, 38px);
  line-height: 1.22;
  letter-spacing: -0.02em;
  font-weight: 700;
}

.section-desc {
  margin: 0;
  font-size: 16px;
  color: var(--text-secondary);
}

/* ==========================================================================
   Hero 区域与网格背景
   ========================================================================== */
.hero-section {
  position: relative;
  padding: 76px 0 84px;
  overflow: hidden;
  background-image:
    radial-gradient(circle at 18% 20%, var(--glow-primary), transparent 45%),
    radial-gradient(circle at 82% 28%, var(--glow-secondary), transparent 45%),
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 100% 100%, 100% 100%, 44px 44px, 44px 44px;
  border-bottom: 1px solid var(--border-subtle);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 48px;
  align-items: center;
}

.hero-title {
  margin: 16px 0 20px;
  font-size: clamp(32px, 4.3vw, 52px);
  line-height: 1.15;
  letter-spacing: -0.025em;
  font-weight: 800;
}

.hero-lead {
  margin: 0 0 28px;
  font-size: 17px;
  color: var(--text-secondary);
  max-width: 580px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 28px;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px;
  font-size: 13px;
  color: var(--text-muted);
}

.hero-trust span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Hero 右侧实时拓扑面板 */
.telemetry-preview {
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-lg);
  position: relative;
}

.telemetry-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 16px;
}

.window-dots {
  display: flex;
  gap: 6px;
}

.window-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--border-strong);
}

.telemetry-canvas-wrap {
  position: relative;
  border-radius: var(--radius-md);
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
  padding: 12px;
  margin-bottom: 16px;
}

.telemetry-mini-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.mini-stat {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
}

.mini-stat-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.mini-stat-value {
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 700;
}

/* ==========================================================================
   栅格布局与图标盒子
   ========================================================================== */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: -36px;
  position: relative;
  z-index: 5;
}

.stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  box-shadow: var(--shadow-md);
}

.stat-value {
  font-family: var(--font-mono);
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

.stat-label {
  font-size: 13px;
  color: var(--text-secondary);
}

.icon-box {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: rgba(14, 165, 233, 0.12);
  border: 1px solid rgba(14, 165, 233, 0.24);
  color: var(--brand-primary);
  display: grid;
  place-items: center;
  margin-bottom: 16px;
}

.feature-title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 700;
}

.feature-desc {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
}

/* ==========================================================================
   标签页 (Tabs)
   ========================================================================== */
.tabs-nav {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 5px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 28px;
}

.tab-btn {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.tab-btn:hover {
  color: var(--text-primary);
}

.tab-btn.active {
  background: var(--brand-gradient);
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(14, 165, 233, 0.3);
}

.tab-panel {
  display: none;
  animation: fadeSlideUp 220ms ease-out;
}

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

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

/* ==========================================================================
   手风琴折叠 (Accordion)
   ========================================================================== */
.accordion-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.accordion-item {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--transition-fast);
}

.accordion-item.open {
  border-color: var(--brand-primary);
}

.accordion-trigger {
  width: 100%;
  padding: 18px 22px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.accordion-icon {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform var(--transition-fast);
}

.accordion-item.open .accordion-icon {
  transform: rotate(180deg);
  color: var(--brand-primary);
}

.accordion-content {
  display: none;
  padding: 0 22px 18px;
  color: var(--text-secondary);
  font-size: 14px;
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
}

.accordion-item.open .accordion-content {
  display: block;
}

/* ==========================================================================
   代码块与拷贝按钮
   ========================================================================== */
.code-block-wrap {
  position: relative;
  margin: 18px 0;
  border-radius: var(--radius-md);
  background: var(--bg-code);
  border: 1px solid var(--border-strong);
  overflow: hidden;
}

.code-block-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 14px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
  color: #94a3b8;
}

.copy-code-btn {
  padding: 4px 10px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #e2e8f0;
  font-size: 12px;
  cursor: pointer;
  transition: background var(--transition-fast);
}

.copy-code-btn:hover {
  background: rgba(14, 165, 233, 0.25);
  border-color: rgba(14, 165, 233, 0.5);
}

.code-block-wrap pre {
  margin: 0;
  padding: 16px;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.6;
  color: #e2e8f0;
}

/* ==========================================================================
   页面头部横幅 (子页面)
   ========================================================================== */
.page-hero {
  padding: 54px 0 44px;
  border-bottom: 1px solid var(--border-subtle);
  background-image:
    radial-gradient(circle at 80% 0%, var(--glow-primary), transparent 48%),
    linear-gradient(to right, var(--grid-line) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-line) 1px, transparent 1px);
  background-size: 100% 100%, 40px 40px, 40px 40px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.breadcrumb a:hover {
  color: var(--brand-primary);
}

.page-title {
  margin: 0 0 12px;
  font-size: clamp(28px, 3.6vw, 42px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.page-subtitle {
  margin: 0;
  font-size: 16px;
  color: var(--text-secondary);
  max-width: 720px;
}

/* ==========================================================================
   模拟数据仪表盘专用样式
   ========================================================================== */
.dashboard-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  margin-bottom: 24px;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.pill-switch {
  display: inline-flex;
  background: var(--bg-page);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 3px;
}

.pill-btn {
  padding: 6px 12px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.pill-btn.active {
  background: var(--brand-primary);
  color: #ffffff;
}

.select-control,
.input-control {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-page);
  color: var(--text-primary);
  font-size: 13px;
  outline: none;
  transition: border-color var(--transition-fast);
}

.select-control:focus,
.input-control:focus {
  border-color: var(--brand-primary);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.kpi-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
}

.kpi-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.kpi-number {
  font-family: var(--font-mono);
  font-size: 26px;
  font-weight: 800;
  margin-bottom: 6px;
}

.kpi-trend {
  font-size: 12px;
  font-weight: 600;
}

.charts-grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 20px;
  margin-bottom: 24px;
}

.chart-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.chart-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.chart-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 12px;
  color: var(--text-secondary);
}

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

.legend-swatch {
  width: 10px;
  height: 10px;
  border-radius: 3px;
}

.canvas-container {
  position: relative;
  width: 100%;
  height: 280px;
}

.canvas-container canvas {
  width: 100%;
  height: 100%;
  display: block;
}

.chart-tooltip {
  position: absolute;
  pointer-events: none;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 8px 11px;
  font-size: 12px;
  box-shadow: var(--shadow-md);
  z-index: 20;
  opacity: 0;
  transition: opacity 100ms ease;
  min-width: 145px;
}

.chart-tooltip.visible {
  opacity: 1;
}

/* 数据表格 */
.table-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.table-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.table-scroll {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  text-align: left;
}

.data-table th {
  padding: 12px 16px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.data-table th.sortable {
  cursor: pointer;
  user-select: none;
}

.data-table th.sortable:hover {
  color: var(--text-primary);
}

.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
}

.data-table tbody tr {
  transition: background-color var(--transition-fast);
}

.data-table tbody tr:hover {
  background: var(--bg-surface-hover);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.progress-bar {
  width: 84px;
  height: 6px;
  border-radius: 99px;
  background: var(--bg-subtle);
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
  margin-right: 8px;
}

.progress-fill {
  height: 100%;
  border-radius: 99px;
  background: var(--brand-primary);
}

/* ==========================================================================
   知识库文档中心布局 (Docs Layout)
   ========================================================================== */
.docs-shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 210px;
  gap: 36px;
  padding: 40px 0 72px;
  align-items: start;
}

.docs-sidebar {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 18px;
}

.docs-sidebar-group {
  margin-bottom: 18px;
}

.docs-sidebar-group:last-child {
  margin-bottom: 0;
}

.docs-group-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin: 0 0 8px 10px;
}

.docs-nav-link {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--text-secondary);
  transition: all var(--transition-fast);
  margin-bottom: 2px;
}

.docs-nav-link:hover {
  color: var(--text-primary);
  background: var(--bg-subtle);
}

.docs-nav-link.active {
  color: var(--brand-primary);
  background: rgba(14, 165, 233, 0.12);
  font-weight: 600;
}

.docs-article {
  min-width: 0;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 36px 40px;
}

.docs-article h1 {
  margin: 0 0 12px;
  font-size: 32px;
  line-height: 1.25;
}

.docs-article h2 {
  margin: 34px 0 14px;
  padding-top: 22px;
  border-top: 1px solid var(--border-subtle);
  font-size: 21px;
}

.docs-article h3 {
  margin: 24px 0 10px;
  font-size: 17px;
}

.docs-article p {
  margin: 0 0 16px;
  color: var(--text-secondary);
}

.docs-article ul, .docs-article ol {
  margin: 0 0 18px;
  padding-left: 22px;
  color: var(--text-secondary);
}

.docs-article li {
  margin-bottom: 8px;
}

.callout {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border-left: 4px solid var(--brand-primary);
  background: rgba(14, 165, 233, 0.08);
  margin: 20px 0;
  font-size: 14px;
}

.callout-warn {
  border-left-color: var(--status-warning);
  background: var(--status-warning-bg);
}

.callout-title {
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--text-primary);
}

.docs-toc {
  position: sticky;
  top: calc(var(--header-height) + 24px);
  font-size: 13px;
}

.docs-toc-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.docs-toc a {
  display: block;
  padding: 5px 0 5px 12px;
  border-left: 2px solid var(--border-subtle);
  color: var(--text-secondary);
  transition: all var(--transition-fast);
}

.docs-toc a:hover {
  color: var(--brand-primary);
  border-left-color: var(--brand-primary);
}

.docs-pager {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 38px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.pager-link {
  display: block;
  padding: 16px 18px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--bg-page);
  transition: border-color var(--transition-fast), transform var(--transition-fast);
}

.pager-link:hover {
  border-color: var(--brand-primary);
  transform: translateY(-1px);
}

.pager-link.next {
  text-align: right;
}

.pager-dir {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.pager-title {
  font-size: 14px;
  font-weight: 700;
}

/* ==========================================================================
   博客与更新日志排版
   ========================================================================== */
.blog-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.blog-article-shell {
  max-width: 820px;
  margin: 0 auto;
  padding: 48px 0 80px;
}

.blog-article-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 42px 46px;
}

.blog-article-card h2 {
  margin: 32px 0 14px;
  font-size: 22px;
}

.blog-article-card p,
.blog-article-card li {
  color: var(--text-secondary);
}

/* ==========================================================================
   表单与联系页
   ========================================================================== */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-field.full {
  grid-column: 1 / -1;
}

.form-label {
  font-size: 13.5px;
  font-weight: 600;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-page);
  color: var(--text-primary);
  font-size: 14px;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--brand-primary);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.form-error {
  font-size: 12px;
  color: var(--status-danger);
  min-height: 16px;
}

.chip-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.chip-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-strong);
  background: var(--bg-page);
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  transition: all var(--transition-fast);
}

.chip-option input {
  display: none;
}

.chip-option.selected {
  background: rgba(14, 165, 233, 0.14);
  border-color: var(--brand-primary);
  color: var(--brand-primary);
  font-weight: 600;
}

/* ==========================================================================
   模态框 (Modal) & 通知提示 (Toast)
   ========================================================================== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: rgba(2, 6, 23, 0.72);
  backdrop-filter: blur(5px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop.open {
  display: flex;
  animation: fadeIn 160ms ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.modal-dialog {
  width: 100%;
  max-width: 540px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
}

.modal-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.modal-body {
  padding: 22px 24px;
  overflow-y: auto;
}

.modal-footer {
  padding: 16px 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 400;
  background: var(--bg-elevated);
  border: 1px solid var(--brand-primary);
  color: var(--text-primary);
  padding: 12px 18px;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  transform: translateY(18px);
  opacity: 0;
  pointer-events: none;
  transition: all var(--transition-normal);
}

.toast.show {
  transform: translateY(0);
  opacity: 1;
}

/* ==========================================================================
   全局页脚
   ========================================================================== */
.site-footer {
  background: var(--bg-elevated);
  border-top: 1px solid var(--border-subtle);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 44px;
}

.footer-desc {
  margin: 14px 0 18px;
  font-size: 13.5px;
  color: var(--text-secondary);
  max-width: 320px;
}

.footer-col-title {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-primary);
}

.footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  font-size: 13.5px;
  color: var(--text-secondary);
  transition: color var(--transition-fast);
}

.footer-links a:hover {
  color: var(--brand-primary);
}

.footer-bottom {
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  font-size: 12.5px;
  color: var(--text-muted);
}

/* ==========================================================================
   响应式适配
   ========================================================================== */
@media (max-width: 1080px) {
  .docs-shell {
    grid-template-columns: 230px minmax(0, 1fr);
  }
  .docs-toc {
    display: none;
  }
  .charts-grid {
    grid-template-columns: 1fr;
  }
  .kpi-grid,
  .stat-strip {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 900px) {
  .main-nav,
  .header-cta-desktop {
    display: none;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
  .hero-grid,
  .grid-2,
  .grid-3,
  .grid-4,
  .footer-grid {
    grid-template-columns: 1fr;
  }
  .docs-shell {
    grid-template-columns: 1fr;
    gap: 24px;
  }
  .docs-sidebar {
    position: static;
  }
  .docs-article,
  .blog-article-card {
    padding: 24px 20px;
  }
  .docs-pager {
    grid-template-columns: 1fr;
  }
  .form-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .kpi-grid,
  .stat-strip,
  .telemetry-mini-stats {
    grid-template-columns: 1fr;
  }
  .stat-strip {
    margin-top: 20px;
  }
  .section {
    padding: 54px 0;
  }
}
