/* ══════════════════════════════════════════════════════════════
   AI算力产业图谱 — 全局样式（含移动端响应式）
   ══════════════════════════════════════════════════════════════ */

/* ─── CSS 变量 ─── */
:root {
  --bg: #f5f6fa;
  --card: #ffffff;
  --border: #e2e5ec;
  --text: #2c3e50;
  --text-dim: #64748b;
  --accent: #3b82f6;
  --accent-light: #eff6ff;

  --role-core: #3b82f6;
  --role-support: #f59e0b;
  --role-edge: #94a3b8;
  --role-next-gen: #10b981;

  --heat-hot: #ef4444;
  --heat-warm: #f59e0b;
  --heat-cool: #94a3b8;

  --severity-critical: #ef4444;
  --severity-high: #f59e0b;
  --severity-medium: #3b82f6;

  --tier1-bg: #eff6ff;
  --tier1-border: #93c5fd;
  --tier2-bg: #fefce8;
  --tier2-border: #fde68a;
  --tier3-bg: #f8fafc;
  --tier3-border: #e2e5ec;

  --font: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
  --font-mono: 'Cascadia Code', 'SF Mono', 'Consolas', monospace;

  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.08);
}

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

html, body {
  height: 100%;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── 顶部栏 ─── */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 52px;
  padding: 0 20px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  position: relative;
  flex-shrink: 0;
}
.top-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
}
.app-title {
  font-size: 20px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 3px;
  background: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.title-dot {
  width: 22px;
  height: 22px;
  display: inline-block;
}
.mega-score-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  background: var(--accent-light);
  color: var(--accent);
}
.mega-score-badge.hot { background: #fef2f2; color: var(--heat-hot); }
.mega-score-badge.warm { background: #fffbeb; color: var(--heat-warm); }

/* ═══ 产业主线上下文栏 ═══ */
.context-bar {
  display: none;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  border-radius: 0 0 10px 10px;
  padding: 0 24px;
  flex-shrink: 0;
  box-sizing: border-box;
  min-width: 0;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
}
.context-bar.visible { display: block; }
.context-bar-inner {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  font-size: 13px;
  color: var(--text);
  min-width: 0;
}
.context-bar-icon { font-size: 14px; }
.context-bar-label {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.context-bar-sep {
  color: var(--border);
  font-size: 16px;
  margin: 0 2px;
}
.context-bar-hint {
  margin-left: auto;
  font-size: 10px;
  color: var(--text-dim);
  white-space: nowrap;
  opacity: 0.7;
  text-align: right;
}
.hint-br { display: none; }

/* ─── Mega Pill 选择器 ─── */
.mega-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.mega-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border: 1px solid var(--accent);
  border-radius: 16px;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.5;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
  white-space: nowrap;
}
.mega-pill-btn:hover {
  border-color: var(--accent-dark);
  box-shadow: 0 0 0 2px var(--accent-light);
}
.mega-pill-label {
  font-size: 11px;
  color: var(--text-dim);
  font-weight: 400;
  opacity: 0.8;
}
.mega-pill-name {
  font-weight: 700;
  color: var(--text);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex-shrink: 1;
}
.mega-pill-arrow {
  font-size: 10px;
  color: var(--text-dim);
  transition: transform 0.2s;
  line-height: 1;
}
.mega-pill.open .mega-pill-arrow {
  transform: rotate(180deg);
}
.mega-pill.open .mega-pill-btn {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-light);
}
/* ─── 下拉菜单 ─── */
.mega-pill-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 200px;
  max-height: 360px;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 200;
  padding: 4px 0;
}
.mega-pill.open .mega-pill-menu { display: block; }
.mega-pill-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  transition: background 0.12s;
}
.mega-pill-item:hover { background: var(--accent-light); }
.mega-pill-item.active {
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-light);
}
.mega-pill-item .check {
  width: 16px;
  font-size: 12px;
  color: var(--accent);
  flex-shrink: 0;
  text-align: center;
}
.mega-pill-item:not(.active) .check { visibility: hidden; }

/* ─── 层级树内 Mega Pill ─── */
.vt-mega-pill {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.vt-mega-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  border: 1px solid var(--accent);
  border-radius: 14px;
  background: var(--card);
  color: var(--text);
  cursor: pointer;
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.5;
  transition: border-color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.vt-mega-pill-btn:hover {
  border-color: var(--accent-dark);
  box-shadow: 0 0 0 2px var(--accent-light);
}
.vt-mega-pill-arrow {
  font-size: 10px;
  color: var(--text-dim);
  transition: transform 0.2s;
  line-height: 1;
}
.vt-mega-pill.open .vt-mega-pill-arrow {
  transform: rotate(180deg);
}
.vt-mega-pill.open .vt-mega-pill-btn {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px var(--accent-light);
}
.vt-mega-pill-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 180px;
  max-height: 320px;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 200;
  padding: 4px 0;
}
.vt-mega-pill.open .vt-mega-pill-menu { display: block; }
.vt-mega-pill-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  transition: background 0.12s;
}
.vt-mega-pill-item:hover { background: var(--accent-light); }
.vt-mega-pill-item.active {
  font-weight: 700;
  color: var(--accent);
  background: var(--accent-light);
}
.vt-mega-pill-item .check {
  width: 16px;
  font-size: 12px;
  color: var(--accent);
  flex-shrink: 0;
  text-align: center;
}
.vt-mega-pill-item:not(.active) .check { visibility: hidden; }

.top-bar-right {
  display: flex;
  align-items: center;
  gap: 16px;
}
.update-time {
  font-size: 12px;
  color: var(--text-dim);
}
/* ─── 视图切换器 ─── */
.view-switcher {
  display: flex;
  gap: 3px;
  background: #f1f5f9;
  border-radius: 8px;
  padding: 3px;
}
.view-btn {
  padding: 5px 14px;
  border: none;
  background: transparent;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.view-btn:hover { color: var(--text); }
.view-btn.active {
  background: var(--card);
  color: var(--accent);
  box-shadow: 0 1px 2px rgba(0,0,0,0.06);
}

/* ─── 视图容器切换 ─── */
.view-container { display: none; flex: 1; flex-direction: column; min-height: 0; overflow-y: auto; }
.view-container.active { display: flex; }

/* ─── 工具栏提示 ─── */
/* ─── 层级树 (卡片式) ─── */
.vtree-container {
  flex: 1; min-height: 0;
  overflow: auto;
  padding: 20px 24px;
  background: #f8fafc;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}
.vt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 0 12px 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 2px solid var(--border);
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.vt-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}
.vt-header-right {
  display: flex;
  align-items: center;
}
.vt-header-icon { font-size: 18px; }
.vt-header-label {
  font-size: 13px;
  color: var(--text-dim);
  font-weight: 400;
}
.vt-header-heat {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-light);
  padding: 2px 8px;
  border-radius: 10px;
  white-space: nowrap;
}
.vt-header-hint {
  font-size: 10px;
  font-weight: 400;
  color: var(--text-dim);
  white-space: nowrap;
  opacity: 0.7;
}

/* 产业卡片 */
.vt-tree-wrapper { margin-bottom: 2px; }
.vt-card {
  margin: 3px 0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.15s;
  border: 1px solid transparent;
}
.vt-card:hover {
  background: #fff;
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.vt-card-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
}

/* ─── v9: 节点卡片化（圆角白底 + 左侧热度色条） ─── */
.vt-node-card {
  position: relative;
  margin: 6px 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.vt-node-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
/* 左侧 3px 热度色条（颜色由 JS 内联写入） */
.vt-node-heat {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  border-radius: 8px 0 0 8px;
  background: #e2e5ec;
}
/* 给色条留出位置 */
.vt-node-card .vt-card-inner { padding-left: 15px; }
.vt-node-card .vt-card-name { font-weight: 700; }

.vt-heat-ring {
  width: 10px; height: 10px;
  border-radius: 50%;
  border: 2px solid #e2e5ec;
  flex-shrink: 0;
}
.vt-expand-icon { font-size: 9px; color: var(--text-dim); width: 14px; flex-shrink: 0; }
.vt-card-name { font-size: 14px; font-weight: 600; color: var(--text); }
.vt-card-change {
  font-size: 12px; font-weight: 700;
  padding: 1px 5px; border-radius: 4px;
  flex-shrink: 0;
}
.vt-card-change.up   { color: #e03131; background: #fef2f2; }
.vt-card-change.down { color: #2f9e44; background: #f0fdf4; }
.vt-card-change.zero { color: #94a3b8; background: #f8fafc; }
.vt-card-role {
  font-size: 10px; padding: 2px 8px; border-radius: 4px;
  font-weight: 500; text-transform: uppercase;
}
.vt-role-core { background: #eff6ff; color: #2563eb; }
.vt-role-support { background: #fefce8; color: #b45309; }
.vt-role-edge { background: #f8fafc; color: #64748b; }
.vt-role-next_gen { background: #ecfdf5; color: #059669; }

.vt-card-imp { font-size: 10px; letter-spacing: 1px; }
.vt-card-badge {
  font-size: 10px; font-weight: 600;
  padding: 2px 8px; border-radius: 10px;
  background: #f1f5f9; color: #64748b;
}
.vt-badge-stocks { background: #eff6ff; color: #2563eb; }

/* ─── v3: 节点类型样式 ─── */
.vt-card-navigation {
  border-style: dashed !important;
  opacity: 0.88;
}
.vt-card-navigation .vt-card-name {
  color: #94a3b8;
}
.vt-card-type {
  font-size: 13px;
  margin-left: 2px;
  line-height: 1;
}
.vt-type-navigation { opacity: 0.7; }

/* 导航节点在仪表盘的显示 */
.dashboard-card .vt-card-navigation { display: none; }

/* meta tag for node type */
.meta-type {
  font-size: 12px;
  padding: 2px 10px;
  border-radius: 10px;
  font-weight: 600;
}
.type-investable {
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
}
.type-navigation {
  background: #f8fafc;
  color: #64748b;
  border: 1px dashed #cbd5e1;
}

/* 子节点容器 */
.vt-kids {
  border-left: 2px solid #e2e5ec;
  margin-left: 16px;
  padding-left: 4px;
}

/* 股票小卡片 */
.vt-stock-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  margin: 1px 0;
  border-radius: 5px;
  font-size: 12px;
  border-left: 3px solid #e2e5ec;
  transition: background 0.12s;
}
.vt-stock-card:hover { background: #fff; }
.vt-stock-card.tier-1 { border-left-color: #3b82f6; }
.vt-stock-card.tier-2 { border-left-color: #f59e0b; }
.vt-stock-card.tier-3 { border-left-color: #cbd5e1; }
.vt-stock-code { font-family: var(--font-mono); color: var(--text-dim); font-size: 11px; }
.vt-stock-tier {
  font-size: 10px; font-weight: 700; padding: 1px 5px; border-radius: 3px;
  flex-shrink: 0;
}
.vt-stock-tier.t1 { background: #eff6ff; color: #2563eb; }
.vt-stock-tier.t2 { background: #fefce8; color: #b45309; }
.vt-stock-tier.t3 { background: #f8fafc; color: #94a3b8; }
.vt-stock-name { font-weight: 500; color: var(--text); }
.vt-stock-note { font-size: 11px; color: var(--text-dim); }

/* ─── 主容器 ─── */
.main-container {
  display: flex;
  flex: 1;
  overflow: hidden;
  min-height: 0;
}

/* ─── 树图面板 ─── */
.tree-panel {
  flex: 1 1 55%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  background: #fafbfc;
  position: relative;
}
/* ─── 空状态 ─── */
.tree-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  font-size: 16px;
}

/* ─── 按钮 ─── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--card);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}
.btn:hover { background: #f1f5f9; border-color: #cbd5e1; }
.btn:active { background: #e2e5ec; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-primary {
  background: var(--accent);
  color: white;
  border-color: var(--accent);
}
.btn-primary:hover { background: #2563eb; }

/* ─── 详情面板 ─── */
.detail-panel {
  flex: 0 0 0;
  width: 0;
  min-width: 0;
  max-width: 600px;
  background: var(--card);
  border-left: 1px solid var(--border);
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: flex 0.3s ease, width 0.3s ease;
}
.detail-panel.expanded {
  flex: 0 0 45%;
  width: 45%;
  min-width: 360px;
}

/* 折叠触发器（面板左边缘的竖条按钮）— button 元素，需重置 UA 默认样式 */
.detail-toggle-tab {
  appearance: none;
  padding: 0;
  font-family: inherit;
  position: absolute;
  left: -28px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 80px;
  background: var(--card);
  border: 1px solid var(--border);
  border-right: none;
  border-radius: 8px 0 0 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-dim);
  z-index: 10;
  transition: background 0.15s;
  writing-mode: vertical-rl;
  letter-spacing: 4px;
  font-weight: 600;
  font-size: 12px;
}
.detail-toggle-tab:hover {
  background: #f1f5f9;
  color: var(--accent);
}
/* 面板折叠时 tab 始终可见；面板展开时调整 */
.detail-panel.expanded .detail-toggle-tab {
  left: -28px;
}

.detail-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
  text-align: center;
  gap: 12px;
  padding: 20px;
  white-space: nowrap;
}
.detail-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--text-dim);
  gap: 10px;
}
.detail-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: detailSpin 0.7s linear infinite;
}
@keyframes detailSpin {
  to { transform: rotate(360deg); }
}
.empty-icon { font-size: 40px; }

.detail-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}

/* 详情头部 */
.detail-header {
  padding: 20px 20px 12px;
  border-bottom: 1px solid var(--border);
  position: relative;
}
.detail-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: none;
  background: none;
  font-size: 18px;
  color: var(--text-dim);
  cursor: pointer;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.detail-close:hover { background: #f1f5f9; }
.detail-breadcrumb {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 6px;
}
.detail-title {
  display: inline-block;  /* 与右侧自选星标同行 */
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* 元数据标签 */
.meta-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}
.meta-tag.role-core { background: #eff6ff; color: var(--role-core); }
.meta-tag.role-support { background: #fefce8; color: #b45309; }
.meta-tag.role-edge { background: #f8fafc; color: #64748b; }
.meta-tag.role-next-gen { background: #ecfdf5; color: #059669; }
.meta-tag.importance { background: #f1f5f9; color: #475569; }
.meta-tag.meta-vcr { font-family: var(--font-mono); }
.meta-tag.meta-cpr { font-family: var(--font-mono); }
.vcr-强, .cpr-强 { background: #ecfdf5; color: #059669; }
.vcr-中, .cpr-中 { background: #fffbeb; color: #b45309; }
.vcr-弱, .cpr-弱 { background: #f8fafc; color: #94a3b8; }

/* 选项卡导航 */
.detail-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid var(--border);
  padding: 0 20px;
}
.tab-btn {
  padding: 10px 16px;
  border: none;
  background: none;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* 选项卡内容 */
.tab-content {
  display: none;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 16px 20px;
}
.tab-content.active { display: block; }
.tab-section {
  margin-bottom: 20px;
}
.tab-section h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}

/* 概览卡片通用 */
.ocard {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 16px 20px;
  border-left: 3px solid var(--accent);
}
.ocard-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ocard-icon { font-size: 18px; }
.ocard-empty {
  color: var(--text-dim);
  font-size: 13px;
  padding: 8px 0;
}

/* ─── 摘要选项卡 ─── */
.summary-oneliner {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.7;
  padding: 12px 16px;
  background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 100%);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  margin-bottom: 16px;
}
.summary-oneliner-icon {
  font-size: 16px;
  margin-right: 6px;
}

/* 六栏网格 — 单列，逐栏展示 */
.summary-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* 摘要卡片 */
.ocard-summary {
  border-left-color: #6366f1;
  padding: 12px 16px;
  overflow-x: auto;
}
.ocard-summary .ocard-title {
  font-size: 13px;
  margin-bottom: 8px;
}

/* 利润地图代码块 */
.profit-map-chart {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.5;
  background: #f8fafc;
  padding: 10px 12px;
  border-radius: 6px;
  overflow-x: auto;
  white-space: pre;
  margin: 0 0 8px 0;
  color: var(--text);
}
.profit-map-note {
  font-size: 12px;
  color: var(--text-dim);
  font-style: italic;
  margin: 0;
}

/* ── 卡片 1: 产业时钟 ── */
.ocard-clock { border-left-color: #8b5cf6; }

/* ── 卡片 2: 投资结论 ── */
.ocard-conclusion { border-left-color: #10b981; }

/* ── 卡片 3: 市场温度 ── */
.ocard-heat { border-left-color: #f59e0b; }
.heat-main {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}
.heat-bar-wrap {
  flex: 1;
  height: 12px;
  background: #e5e7eb;
  border-radius: 6px;
  overflow: hidden;
}
.heat-bar {
  height: 100%;
  border-radius: 6px;
  transition: width 0.6s ease;
}
/* 五级温度条配色（冰/冻/温/热/沸） */
.heat-frozen { background: linear-gradient(90deg, #a78bfa, #7c3aed); }
.heat-ice { background: linear-gradient(90deg, #60a5fa, #2563eb); }
.heat-mild { background: linear-gradient(90deg, #fbbf24, #f59e0b); }
.heat-warm { background: linear-gradient(90deg, #fb923c, #ea580c); }
.heat-boiling { background: linear-gradient(90deg, #f59e0b, #ef4444); }
.heat-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.heat-score {
  font-size: 22px;
  font-weight: 800;
  font-family: var(--font-mono);
  color: var(--text);
}
.heat-trend {
  font-size: 16px;
}
.heat-themes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.heat-themes-label {
  font-size: 12px;
  color: var(--text-dim);
}
.heat-theme-tag {
  font-size: 11px;
  padding: 2px 8px;
  background: #fffbeb;
  border: 1px solid #fcd34d;
  border-radius: 10px;
  color: #92400e;
}
.heat-theme-tag small {
  color: var(--text-dim);
}

/* ── 卡片 4: 核心逻辑 ── */
.ocard-logic { border-left-color: #3b82f6; }

.tier-label.t1 { background: var(--tier1-bg); color: var(--accent); }
.tier-label.t2 { background: var(--tier2-bg); color: #b45309; }
.tier-label.t3 { background: var(--tier3-bg); color: #64748b; }
.tier-label.etf-label { background: #e6f7ff; color: #0070c9; }
.etf-item { border-left: 3px solid #1890ff; }

/* 股票列表（详情面板新格式） */
.stock-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stock-item {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 13px;
  transition: background 0.12s;
}
.stock-item:hover { background: #f8fafc; }
.stock-item-name { font-weight: 600; color: var(--text); white-space: nowrap; }
.stock-item-code { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); margin-left: 2px; }
.stock-item-note { font-size: 12px; color: var(--text-dim); flex: 1 1 100%; min-width: 0; }
.stock-change { font-family: var(--font-mono); font-size: 12px; font-weight: 600; margin-left: 6px; white-space: nowrap; }
.stock-change.up { color: #e03131; }
.stock-change.down { color: #2f9e44; }

/* 个股研报图标（股票行内，各自独立点击） */
.stock-report-icons { display: inline-flex; gap: 6px; margin-left: 2px; }
.sri-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; font-size: 13px; line-height: 1;
  border-radius: 6px; cursor: pointer;
  opacity: 0.85; transition: all 0.18s;
  background: #f1f5f9; border: 1px solid #e2e8f0;
}
.sri-icon:hover { opacity: 1; transform: translateY(-1px); }
.sri-icon.sri-tracking { background: #eff6ff; border-color: #bfdbfe; }
.sri-icon.sri-tracking:hover { background: #dbeafe; box-shadow: 0 1px 3px rgba(59,130,246,0.15); }
.sri-icon.sri-deep { background: #fffbeb; border-color: #fde68a; }
.sri-icon.sri-deep:hover { background: #fef3c7; box-shadow: 0 1px 3px rgba(245,158,11,0.15); }

/* 侧滑研报面板 */
.stock-report-overlay {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,0.3); display: none;
}
.stock-report-overlay.open { display: block; }

.stock-report-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 1000;
  width: 55%; max-width: 700px; min-width: 380px;
  background: #fff; display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: -4px 0 24px rgba(0,0,0,0.15);
}
.stock-report-panel.open { transform: translateX(0); }

.srp-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; border-bottom: 1px solid var(--border);
  background: #fafafa; flex-shrink: 0;
}
.srp-title { font-size: 15px; font-weight: 700; color: var(--text); }
.srp-toolbar-actions { display: flex; gap: 8px; }
.srp-btn {
  border: 1px solid var(--border); background: #fff;
  padding: 4px 10px; border-radius: 6px; font-size: 12px;
  cursor: pointer; color: var(--text-dim); transition: all 0.12s;
}
.srp-btn:hover { background: #f0f0f0; color: var(--text); }
.srp-fullscreen { border-color: var(--accent); color: var(--accent); }
.srp-close { font-size: 16px; padding: 2px 8px; }

.srp-scorebar { padding: 12px 16px; border-bottom: 1px solid var(--border); background: #f8fafc; flex-shrink: 0; }
.srp-scorecard { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.srp-score-total { font-size: 28px; font-weight: 900; font-family: var(--font-mono); color: #1A1A1A; }
.srp-score-grade { font-size: 13px; font-weight: 700; padding: 2px 8px; border-radius: 4px; }
.srp-score-grade.grade-a { background: #e6f7ff; color: #0072FF; }
.srp-score-grade.grade-b { background: #f6ffed; color: #52c41a; }
.srp-score-grade.grade-c { background: #fff7e6; color: #fa8c16; }
.srp-score-detail { font-size: 12px; color: var(--text-dim); }
.srp-score-nodes { font-size: 11px; color: var(--text-dim); flex: 1 1 100%; }
.srp-loading { font-size: 13px; color: var(--text-dim); }

.srp-tabs {
  display: flex; border-bottom: 1px solid var(--border); flex-shrink: 0;
}
.srp-tab {
  flex: 1; padding: 10px; border: none; background: transparent;
  font-size: 13px; font-weight: 500; cursor: pointer; color: var(--text-dim);
  border-bottom: 2px solid transparent; transition: all 0.12s;
}
.srp-tab:hover { color: var(--text); }
.srp-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 700; }

.srp-content { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.srp-iframe { flex: 1; border: none; }

@media (max-width: 600px) {
  .stock-report-panel { width: 100%; max-width: none; min-width: 0; }
}

/* 风险卡片 */
.risk-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  border-left: 4px solid var(--severity-medium);
}
.risk-card.severity-critical { border-left-color: var(--severity-critical); }
.risk-card.severity-high { border-left-color: var(--severity-high); }
.risk-card .risk-signal {
  font-weight: 600;
  font-size: 13px;
  margin-bottom: 4px;
}
.risk-card .risk-detail {
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}
.severity-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}
.severity-badge.critical { background: #fef2f2; color: #dc2626; }
.severity-badge.high { background: #fffbeb; color: #b45309; }
.severity-badge.medium { background: #eff6ff; color: #2563eb; }

/* 指标表 */
.indicator-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.indicator-table th {
  text-align: left;
  padding: 8px 10px;
  background: #f8fafc;
  border-bottom: 2px solid var(--border);
  font-weight: 600;
  font-size: 12px;
  color: var(--text-dim);
}
.indicator-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--border);
}
.freq-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}
.freq-monthly { background: #eff6ff; color: #2563eb; }
.freq-quarterly { background: #f5f3ff; color: #7c3aed; }
.freq-annual { background: #f8fafc; color: #64748b; }

/* 研报链接（底部紧凑条） */
.detail-reports {
  padding: 10px 20px;
  border-top: 1px solid var(--border);
}
.reports-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.reports-bar-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.report-link-compact {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 4px 10px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  color: var(--accent);
  transition: background 0.15s;
}
.report-link-compact:hover { background: var(--accent-light); }
.report-link {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 6px;
  font-size: 13px;
  transition: all 0.15s;
}
.report-link:hover {
  background: #eff6ff;
  border-color: #93c5fd;
  text-decoration: none;
}
.report-depth {
  font-size: 11px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 500;
}
.report-depth.mega { background: #fef2f2; color: #dc2626; }
.report-depth.segment { background: #eff6ff; color: #2563eb; }
.report-depth.mention { background: #f8fafc; color: #64748b; }

/* 一行横排 */
.heat-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  flex-wrap: wrap;
}
.heat-row-kids {
  padding-left: 20px;
  border-left: 2px solid #e2e8f0;
  margin-left: 4px;
}

/* 分支活跃度：每维度一个列容器，kids 嵌在 dim bar 下方 */
.hm-col {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hm-kids {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding-left: 16px;
  border-left: 2px solid #e2e8f0;
  margin-left: 4px;
}

/* 热度标签（维度 / L2 子节点）*/
.heat-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  cursor: pointer;
  user-select: none;
  transition: all 0.15s;
  white-space: nowrap;
}
.heat-tag:hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
  transform: translateY(-1px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.06);
}
.heat-tag.active {
  background: #eff6ff;
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px #3b82f644;
}

/* 子节点标签 */
.heat-tag-kid {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 12px;
}

/* 标签名 */
.heat-tag-name {
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  flex-shrink: 0;
}
.heat-tag-kid .heat-tag-name {
  font-size: 11px;
  font-weight: 500;
  color: #475569;
}

/* 热度标签（如 龙头驱动）*/
.heat-tag-label {
  font-size: 9px;
  color: #fff;
  padding: 1px 5px;
  border-radius: 6px;
  flex-shrink: 0;
  line-height: 14px;
}

/* 条状轨道 */
.heat-tag-track {
  width: 48px;
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
  flex-shrink: 0;
  display: inline-block;
  vertical-align: middle;
}
.heat-tag-kid .heat-tag-track {
  width: 40px;
  height: 5px;
}
.heat-tag-fill {
  display: block;
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s, background 0.4s;
}

/* 百分比 */
.heat-tag-pct {
  font-size: 12px;
  font-weight: 700;
  font-family: var(--font-mono);
  flex-shrink: 0;
}
.heat-tag-kid .heat-tag-pct {
  font-size: 11px;
}

/* 响应式 */
@media (max-width: 768px) {
  .heat-row { gap: 4px; }
  .heat-tag { padding: 4px 7px; gap: 4px; }
  .heat-tag-name { font-size: 11px; }
  .heat-tag-track { width: 32px; }
  .heat-tag-pct { font-size: 10px; }
  .heat-row-kids { padding-left: 12px; margin-left: 2px; }
}

/* ─── 移动端覆盖层 ─── */
.mobile-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: var(--card);
  z-index: 200;
  overflow-y: auto;
  flex-direction: column;
}
.mobile-overlay.active {
  display: flex;
}

/* ═══════════════════════════════════════════════════════
   响应式：平板 (600-899px)
   ═══════════════════════════════════════════════════════ */
@media (max-width: 899px) {
  .main-container { flex-direction: column; }
  .tree-panel { flex: 1 1 60%; }
  .detail-panel {
    flex: 0 0 40%;
    max-width: none;
    min-width: 0;
    border-left: none;
    border-top: 1px solid var(--border);
  }
  .top-bar { padding: 0 12px; }
  .app-title { font-size: 16px; }
}

/* ═══════════════════════════════════════════════════════
   响应式：手机 (< 600px)
   ═══════════════════════════════════════════════════════ */
@media (max-width: 599px) {
  /* 顶栏改两行布局：第一行 logo+选择器+热度徽章（数据日期绝对定位于右上角），
     第二行 搜索框+视图切换（.top-bar-center 基础规则在下方，覆盖见文末响应式补充块） */
  .top-bar { height: auto; flex-wrap: wrap; padding: 6px 10px; row-gap: 6px; column-gap: 8px; }
  .top-bar-left { order: 1; flex: 1 1 100%; min-width: 0; gap: 6px; justify-content: space-between; }
  .top-bar-center { order: 2; flex: 1 1 0; min-width: 0; max-width: none; margin: 0; }
  .top-bar-right { order: 2; display: flex; flex-shrink: 0; }
  .top-bar-right .update-time { display: none; }
  .top-bar-right .auth-btn { display: none; }
  .auth-btn-mobile { display: inline-flex !important; }
  .app-title { font-size: 14px; white-space: nowrap; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; }
  .context-bar { padding: 4px 10px; }
  .context-bar-inner { height: auto; gap: 4px; font-size: 12px; }
  .context-bar-icon { font-size: 14px; }
  .context-bar-hint { font-size: 9px; line-height: 1.3; }
  .hint-dot { display: none; }
  .hint-br { display: inline; }
  .vt-mega-pill-btn { font-size: 12px; padding: 3px 10px; gap: 4px; }
  .vt-mega-pill-name { max-width: 18vw; }
  .context-bar .vt-mega-pill-name { max-width: 24vw; }
  .mega-score-badge { font-size: 10px; padding: 2px 6px; white-space: nowrap; flex-shrink: 0; }
  .update-time { display: block; }
  .view-btn { padding: 4px 8px; font-size: 11px; }

  .main-container {
    flex-direction: column;
    height: calc(100vh - 44px - 60px);
  }
  .tree-panel { flex: 1; }
  .vt-header { padding: 0 0 10px 0; font-size: 13px; gap: 4px; }
  .vt-header-left { gap: 4px; }
  .vt-header-icon { font-size: 16px; }
  .vt-header-heat { font-size: 10px; padding: 1px 6px; }
  .vt-header-hint { font-size: 9px; line-height: 1.3; }
  .vtree-container { padding: 14px 12px; }

  /* 移动端详情面板 = 全屏覆盖 */
  .detail-panel { display: none; }
  .detail-close { display: flex; }

  .heat-tag { padding: 3px 6px; gap: 3px; }
  .heat-tag-name { font-size: 10px; }
  .heat-tag-track { width: 28px; }
  .heat-tag-pct { font-size: 10px; }
}

/* ═══════════════════════════════════════════════════════
   搜索框
   ═══════════════════════════════════════════════════════ */

.top-bar-center {
  flex: 1;
  display: flex;
  justify-content: center;
  max-width: 400px;
  margin: 0 20px;
}
.search-wrapper {
  position: relative;
  width: 100%;
}
.search-input {
  width: 100%;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 13px;
  font-family: var(--font);
  color: var(--text);
  background: #f8fafc;
  outline: none;
  transition: all 0.2s;
}
.search-input:focus {
  border-color: var(--accent);
  background: var(--card);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.12);
}
.search-input::placeholder { color: #94a3b8; }

.search-results {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  margin-top: 4px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  max-height: 360px;
  overflow-y: auto;
  z-index: 300;
}
.search-result-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  cursor: pointer;
  border-bottom: 1px solid #f1f5f9;
  transition: background 0.1s;
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover,
.search-result-item.highlighted {
  background: var(--accent-light);
}
.search-result-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
}
.search-result-name mark {
  background: #fde68a;
  color: var(--text);
  border-radius: 2px;
  padding: 0 1px;
}
.search-result-path {
  width: 100%;
  font-size: 11px;
  color: var(--text-dim);
}
.search-no-results {
  padding: 20px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}

/* ═══════════════════════════════════════════════════════
   加载骨架屏
   ═══════════════════════════════════════════════════════ */

.loading-skeleton {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 40px 24px;
  position: absolute;
  inset: 0;
  z-index: 20;
  background: var(--bg);
}
.skeleton-spinner-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.skeleton-spinner {
  width: 36px;
  height: 36px;
  border-width: 4px;
}
.skeleton-text {
  font-size: 14px;
  color: var(--text-dim);
  margin: 0;
}
.skeleton-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 420px;
}
.skeleton-card {
  height: 40px;
  border-radius: 8px;
  background: linear-gradient(90deg, #e2e8f0 25%, #f1f5f9 50%, #e2e8f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite ease-in-out;
  width: 100%;
}
@keyframes shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* 移动端骨架屏 */
@media (max-width: 599px) {
  .loading-skeleton {
    padding: 30px 16px;
    gap: 18px;
  }
  .skeleton-spinner { width: 28px; height: 28px; }
  .skeleton-text { font-size: 12px; }
  .skeleton-bars { max-width: 100%; gap: 8px; }
  .skeleton-card { height: 32px; }
}

/* 加载错误 */
.load-error {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 60px 20px;
  position: absolute;
  inset: 40px 0 0 0;
  z-index: 10;
  background: #fafbfc;
  text-align: center;
}
.load-error .error-icon { font-size: 36px; }
.load-error p { color: var(--text-dim); font-size: 14px; }

/* ═══════════════════════════════════════════════════════
   仪表盘
   ═══════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════
   仪表盘 v2 — 投资者视角
   ═══════════════════════════════════════ */

.dashboard-container {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ─── 仪表盘容器 ─── */
#dashboardContainer {
  padding: 20px 24px;
  max-width: 1100px;
  margin: 0 auto;
  min-width: 0;
  box-sizing: border-box;
  width: 100%;
}

/* ─── 1. 市场脉搏 ─── */
.dash-pulse {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.dash-pulse-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 20px;
  text-align: center;
}
.dash-pulse-label {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.dash-pulse-value {
  font-size: 28px;
  font-weight: 800;
  font-family: var(--font-mono);
  margin-bottom: 4px;
}
.dash-pulse-sub {
  font-size: 11px;
  color: var(--text-dim);
}

/* ─── v9: 统计卡语义色（淡色底 ~10% 透明度，色值与温度徽章/涨跌色一致） ─── */
.dash-pulse-boiling { background: rgba(220,38,38,0.10); border-color: rgba(220,38,38,0.25); }
.dash-pulse-warm    { background: rgba(234,88,12,0.10); border-color: rgba(234,88,12,0.25); }
.dash-pulse-mild    { background: rgba(202,138,4,0.10); border-color: rgba(202,138,4,0.25); }
.dash-pulse-ice     { background: rgba(37,99,235,0.10); border-color: rgba(37,99,235,0.25); }
.dash-pulse-frozen  { background: rgba(124,58,237,0.10); border-color: rgba(124,58,237,0.25); }
.dash-pulse-trend-up   { background: rgba(239,68,68,0.10); border-color: rgba(239,68,68,0.25); }   /* 上行=红 */
.dash-pulse-trend-down { background: rgba(34,197,94,0.10); border-color: rgba(34,197,94,0.25); }    /* 下行=绿 */

/* ─── 通用区块 ─── */
.dash-section {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0;
  overflow: hidden;
}
.dash-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px 12px;
}
.dash-section-header h3 {
  font-size: 15px;
  font-weight: 700;
}
.dash-section-hint {
  font-size: 11px;
  color: var(--text-dim);
}
.dash-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-dim);
  font-size: 13px;
}

/* ─── 2. 热门分支 ─── */
.dash-hot-list {
  display: flex;
  flex-direction: column;
}
.dash-hot-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  cursor: pointer;
  transition: background 0.12s;
  border-top: 1px solid #f8fafc;
}
.dash-hot-item:hover {
  background: #f8fafc;
}
.dash-hot-rank {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
  color: #fff;
  background: #94a3b8;
}
.dash-hot-rank.r1 { background: #ef4444; }
.dash-hot-rank.r2 { background: #f59e0b; }
.dash-hot-rank.r3 { background: #3b82f6; }
.dash-hot-name {
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
  min-width: 70px;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dash-hot-path {
  flex: 1;
  font-size: 11px;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.dash-hot-mid {
  font-size: 11px;
  font-weight: 600;
  font-family: var(--font-mono);
  flex-shrink: 0;
  min-width: 38px;
}
.dash-hot-label {
  font-size: 9px;
  color: #fff;
  padding: 1px 6px;
  border-radius: 8px;
  flex-shrink: 0;
}
.dash-hot-leader {
  font-size: 10px;
  color: #6366f1;
  flex-shrink: 0;
  max-width: 60px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: #eef2ff;
  padding: 1px 6px;
  border-radius: 4px;
}
.dash-hot-track {
  flex: 1;
  min-width: 60px;
  height: 6px;
  background: #f1f5f9;
  border-radius: 3px;
  overflow: hidden;
  display: inline-block;
  vertical-align: middle;
}
.dash-hot-fill {
  display: block;
  height: 100%;
  border-radius: 3px;
  transition: width 0.4s;
}
.dash-hot-pct {
  font-size: 13px;
  font-weight: 700;
  font-family: var(--font-mono);
  width: 36px;
  text-align: right;
  flex-shrink: 0;
}

/* ─── 3. 维度覆盖 ─── */
.dash-dims {
  padding: 8px 20px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.dash-dim-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  background: #f8fafc;
  border-radius: 6px;
}
.dash-dim-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dash-dim-name {
  flex: 1;
  font-size: 12px;
  font-weight: 500;
}
.dash-dim-num {
  font-size: 11px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}
.dash-summary {
  display: flex;
  gap: 16px;
  font-size: 11px;
  color: var(--text-dim);
  border-top: 1px solid #f1f5f9;
  margin-top: 4px;
  padding-top: 12px;
}

/* ─── 响应式 ─── */
@media (max-width: 768px) {
  .dash-pulse { grid-template-columns: 1fr; }
  .dash-pulse-value { font-size: 22px; }
  .dashboard-container { padding: 12px; gap: 14px; }
  .dash-hot-name { min-width: 50px; max-width: 80px; font-size: 12px; }
  .dash-hot-path { display: none; }
  .dash-hot-track { width: 50px; }
}

/* ═══════════════════════════════════════════════════════
   v8: 维度分组树视图
   ═══════════════════════════════════════════════════════ */

/* 维度分组容器 */
.vt-dim-section {
  margin: 4px 0 8px 0;
  border-radius: var(--radius);
  overflow: hidden;
}

/* 维度头部 */
.vt-dim-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: linear-gradient(135deg, #f0f4ff 0%, #e8edf8 100%);
  border: 1px solid #e0e7ff;
  border-left: 3px solid #8b5cf6;
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  cursor: pointer;
  user-select: none;
  transition: background 0.2s, transform 0.15s, box-shadow 0.15s;
}
.vt-dim-header:hover {
  background: linear-gradient(135deg, #e8edfa 0%, #dce3f2 100%);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
.vt-dim-toggle {
  font-size: 12px;
  color: #8b5cf6;
  width: 16px;
  text-align: center;
}
.vt-dim-name {
  font-weight: 700;
  font-size: 15px;
  color: #4c1d95;
  flex: 1;
}
.vt-dim-meta {
  font-size: 11px;
  color: var(--text-dim);
  white-space: nowrap;
}

/* 维度子方向体 */
.vt-dim-body {
  padding: 4px 0 4px 24px;
  background: #fafbfd;
}
.vt-dim-empty {
  padding: 16px;
  text-align: center;
  color: var(--text-dim);
  font-size: 12px;
}

/* 维度子节点卡片（紧凑行） */
.vt-dim-child-wrapper {
  margin: 2px 0;
}
.vt-dim-child-card {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.vt-dim-child-card:hover {
  box-shadow: var(--shadow);
  border-color: #8b5cf6;
}
.vt-dim-child-type {
  font-size: 16px;
  flex-shrink: 0;
}
.vt-dim-child-name {
  font-weight: 600;
  font-size: 13px;
  color: var(--text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vt-dim-child-change {
  font-size: 11px; font-weight: 700;
  padding: 1px 5px; border-radius: 4px;
  flex-shrink: 0;
}
.vt-dim-child-change.up   { color: #e03131; background: #fef2f2; }
.vt-dim-child-change.down { color: #2f9e44; background: #f0fdf4; }
.vt-dim-child-change.zero { color: #94a3b8; background: #f8fafc; }
.vt-dim-child-role {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 8px;
  background: #f1f5f9;
  color: var(--text-dim);
  flex-shrink: 0;
}
.vt-dim-child-imp {
  font-size: 10px;
  color: #f59e0b;
  letter-spacing: 1px;
  flex-shrink: 0;
}
.vt-dim-child-badge {
  font-size: 10px;
  padding: 1px 6px;
  background: #eff6ff;
  color: #3b82f6;
  border-radius: 8px;
  flex-shrink: 0;
}

/* 维度子节点热度条 */
.vt-dim-heat-bar {
  width: 60px;
  height: 4px;
  background: #f0f0f0;
  border-radius: 2px;
  overflow: hidden;
  flex-shrink: 0;
}
.vt-dim-heat-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.3s;
}

/* 维度内嵌套子节点 */
.vt-dim-nested {
  padding-left: 20px;
  border-left: 1px dashed #e2e5ec;
  margin-left: 16px;
}

/* ═══════════════════════════════════════════════════════
   v8: 维度详情聚合视图
   ═══════════════════════════════════════════════════════ */

.dim-detail {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 0;
}

.dim-def-text {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text);
  padding: 12px 0 4px;
}

/* 覆盖状态卡片 */
.dim-coverage-row {
  display: flex;
  gap: 16px;
  padding: 12px 0;
  flex-wrap: wrap;
}
.dim-coverage-stat {
  text-align: center;
  flex: 1;
  min-width: 60px;
}
.dim-coverage-num {
  display: block;
  font-size: 22px;
  font-weight: 800;
  color: #8b5cf6;
}
.dim-coverage-label {
  display: block;
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}
.dim-coverage-badge {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  text-align: center;
}
.dim-coverage-badge.covered {
  background: #ecfdf5;
  color: #059669;
}
.dim-coverage-badge.partial {
  background: #fffbeb;
  color: #d97706;
}

/* 子方向网格（维度详情 → 股票池 tab 中展示） */
.dim-child-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
  padding: 4px 0;
}
.dim-child-card-item {
  padding: 10px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: box-shadow 0.15s, border-color 0.15s;
}
.dim-child-card-item:hover {
  box-shadow: var(--shadow);
  border-color: #8b5cf6;
}
.dim-child-card-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.dim-child-card-type {
  font-size: 14px;
}
.dim-child-card-name {
  font-weight: 700;
  font-size: 13px;
  color: var(--text);
}
.dim-child-card-thesis {
  font-size: 11px;
  color: var(--text-dim);
  line-height: 1.5;
  margin-bottom: 6px;
}
.dim-child-card-meta {
  display: flex;
  gap: 10px;
  font-size: 11px;
  color: var(--accent);
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════
   v8: L1 子产业 — 子方向快览行
   ═══════════════════════════════════════════════════════ */

.child-quick-look {
  margin-bottom: 12px;
}
.child-quick-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.child-quick-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 16px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  font-size: 12px;
  white-space: nowrap;
}
.child-quick-item:hover {
  border-color: #8b5cf6;
  background: #f0f4ff;
}
.child-quick-icon {
  font-size: 12px;
}
.child-quick-name {
  font-weight: 500;
  color: var(--text);
}
.child-quick-lp {
  font-size: 10px;
  color: var(--accent);
  font-weight: 600;
}

/* ═══════════════════════════════════════════════════════
   响应式补充
   ═══════════════════════════════════════════════════════ */

@media (max-width: 899px) {
  .top-bar-center { max-width: 200px; margin: 0 10px; }
}

@media (max-width: 599px) {
  .search-input { font-size: 12px; padding: 4px 10px; }
  .dashboard-container { padding: 12px; gap: 12px; }
  .dash-pulse { grid-template-columns: 1fr; }
  .dash-pulse-value { font-size: 22px; }

  /* 仪表盘：内容自适应不溢出 */
  .dash-section-header { padding: 12px 14px 8px; flex-wrap: wrap; gap: 6px; }
  .dash-hot-item { padding: 8px 12px; gap: 6px; }
  .dash-hot-name { min-width: 40px; max-width: 60px; font-size: 11px; }
  .dash-hot-mid { font-size: 10px; min-width: 28px; }
  .dash-hot-path { font-size: 10px; }
  .dash-hot-leader { max-width: 40px; font-size: 9px; }
  /* 热力标签允许换行 */
  .heat-tag { padding: 4px 7px; gap: 4px; white-space: normal; flex-shrink: 1; }
  .heat-tag-name { font-size: 10px; }

  /* 热点卡片移动端：名字/badge 截断 + 热度条收窄 */
  .hp-hot-main { padding: 10px 12px; }
  .hp-hot-name { max-width: 90px; font-size: 12px; }
  .hp-hot-mega { max-width: 60px; font-size: 10px; }
  .hp-hot-row2 { gap: 4px; font-size: 10px; }
  .hp-hot-stat { font-size: 10px; }
  .heat-tag-track { width: 24px; }
  .heat-tag-pct { font-size: 10px; }
  .heat-row-kids { padding-left: 12px; margin-left: 2px; }

  /* 层级树缩进减半 */
  .vt-kids { margin-left: 8px; padding-left: 2px; }
  .vt-node-card .vt-card-inner { padding: 6px 8px; gap: 4px; }
  .vt-card-name { font-size: 12px; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* 移动端允许主容器纵向滚动 */
  .main-container { overflow-y: auto; }
}

/* ═══════════════════════════════════════════════════════════
   首页 v3 — 仪表盘风格（atlas-website-plan.md §四）
   ═══════════════════════════════════════════════════════════ */

.homepage-container {
  padding: 20px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.hp-section {
  margin-bottom: 32px;
}

.hp-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

.hp-section-header h2 {
  font-size: 17px;
  font-weight: 700;
  color: #1e293b;
  margin: 0;
  letter-spacing: 0.3px;
}

.hp-section-icon { font-size: 20px; }

/* ═══════════ 一、大主线总览 ═══════════ */

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

.hp-mega-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 16px 18px 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.hp-mega-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 4px 16px rgba(59,130,246,0.08);
  transform: translateY(-1px);
}

.hp-mega-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.hp-mega-left {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.hp-mega-icon { font-size: 22px; line-height: 1; }

.hp-mega-name {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
  margin-bottom: 2px;
}

.hp-mega-meta {
  font-size: 11px;
  color: #94a3b8;
}

.hp-mega-right {
  display: flex;
  align-items: baseline;
  gap: 2px;
}

.hp-mega-score {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.hp-mega-unit {
  font-size: 12px;
  color: #94a3b8;
  font-weight: 500;
}

.hp-mega-bar {
  height: 6px;
  border-radius: 3px;
  overflow: hidden;
}

.hp-mega-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══════════ 二、今日热点 ═══════════ */

.hp-hot-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.hp-hot-card {
  display: flex;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}

.hp-hot-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 4px 12px rgba(59,130,246,0.06);
}

.hp-hot-accent {
  width: 4px;
  flex-shrink: 0;
}

.hp-hot-main {
  flex: 1;
  padding: 12px 16px;
  min-width: 0;
}

.hp-hot-row1 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
  gap: 12px;
}

.hp-hot-info {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.hp-hot-rank {
  font-size: 12px;
  font-weight: 700;
  color: #94a3b8;
  min-width: 18px;
}

.hp-hot-name {
  font-size: 13.5px;
  font-weight: 700;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}

.hp-hot-mega {
  font-size: 11px;
  color: #94a3b8;
  background: #f1f5f9;
  padding: 1px 7px;
  border-radius: 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100px;
}

.hp-hot-numbers {
  flex-shrink: 0;
}

.hp-hot-change {
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.hp-hot-change.up   { color: #ef4444; }
.hp-hot-change.down { color: #10b981; }
.hp-hot-change.flat { color: #94a3b8; }

/* 动态右侧分值（趋势/热度/质地维度） */
.hp-hot-score {
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* row2 嵌入式涨跌幅（当不按涨幅排序时显示在统计行） */
.hp-hot-embedded-change {
  font-size: 11px;
  color: #64748b;
}
.hp-hot-embedded-change.up b   { color: #ef4444; }
.hp-hot-embedded-change.down b { color: #10b981; }
.hp-hot-embedded-change.flat b { color: #94a3b8; }

.hp-hot-row2 {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.hp-hot-stat {
  font-size: 11px;
  color: #64748b;
}
.hp-hot-stat b { color: #334155; }

.hp-hot-dot {
  color: #cbd5e1;
  font-weight: 700;
}

.hp-hot-tag {
  font-size: 11px;
  color: #64748b;
  white-space: nowrap;
}

/* 温度标签 */
.hp-hot-temp {
  font-size: 11px;
  font-weight: 700;
  padding: 0 6px;
  border-radius: 3px;
  white-space: nowrap;
}
.hp-temp-boiling { background: #fef2f2; color: #dc2626; }
.hp-temp-warm    { background: #fff7ed; color: #ea580c; }
.hp-temp-mild    { background: #fefce8; color: #ca8a04; }
.hp-temp-ice     { background: #eff6ff; color: #2563eb; }
.hp-temp-frozen  { background: #f5f3ff; color: #7c3aed; }

/* ═══════════ 三、趋势关注 ═══════════ */

.hp-watch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 10px;
}

.hp-watch-card {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
}

.hp-watch-card:hover {
  border-color: #93c5fd;
  box-shadow: 0 4px 12px rgba(59,130,246,0.06);
  transform: translateY(-1px);
}

.hp-watch-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.hp-watch-name {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
}

.hp-watch-star {
  font-size: 10px;
  font-weight: 600;
  color: #d97706;
  background: #fffbeb;
  padding: 1px 6px;
  border-radius: 6px;
}

/* 综合标签行 */
.hp-watch-label-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
}

.hp-watch-label {
  font-size: 14px;
  font-weight: 700;
}

.hp-watch-ts {
  font-size: 12px;
  color: #64748b;
  font-weight: 600;
  background: #f1f5f9;
  padding: 1px 8px;
  border-radius: 10px;
}

.hp-watch-upinfo {
  font-size: 11px;
  color: #94a3b8;
  margin-left: 4px;
}

.hp-watch-desc {
  font-size: 11px;
  color: #64748b;
  font-style: italic;
}

.hp-watch-change {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 8px;
}
.hp-watch-change .up   { color: #ef4444; font-weight: 600; }
.hp-watch-change .down { color: #10b981; font-weight: 600; }

/* 风险节点红色边框 */
.hp-watch-card.hp-watch-risk {
  border-color: #fecaca;
  background: #fff5f5;
}
.hp-watch-card.hp-watch-risk:hover {
  border-color: #f87171;
  box-shadow: 0 4px 12px rgba(239,68,68,0.08);
}

.hp-watch-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #94a3b8;
}

/* ═══════════ 四、全部主线 ═══════════ */

.hp-mega-nav-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.hp-mega-chip {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  transition: all 0.15s ease;
}

.hp-mega-chip:hover {
  border-color: #93c5fd;
  color: #1e293b;
  box-shadow: 0 2px 8px rgba(59,130,246,0.06);
}

.hp-mega-chip.active {
  border-color: #f59e0b;
  background: #fffbeb;
}

.hp-mega-chip-icon { font-size: 14px; }

/* 静默主线紧凑区（0 分主线收编，不再各占一张大卡） */
.hp-mega-silent { margin-top: 12px; }
.hp-mega-silent-title {
  font-size: 12px;
  color: #94a3b8;
  margin-bottom: 8px;
}
.hp-mega-silent-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.hp-mega-silent .hp-mega-chip {
  padding: 5px 12px;
  font-size: 12px;
  color: #94a3b8;
}

/* ═══════════ 空/加载/错误 ═══════════ */

.hp-empty {
  padding: 24px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
  background: #f8fafc;
  border-radius: 10px;
  border: 1px dashed #e2e8f0;
}

.hp-loading {
  padding: 60px 20px;
  text-align: center;
  color: #94a3b8;
  font-size: 14px;
}

.hp-spinner {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 2px solid #e2e8f0;
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: hp-spin 0.7s linear infinite;
  margin-right: 10px;
  vertical-align: middle;
}

@keyframes hp-spin { to { transform: rotate(360deg); } }

.hp-error {
  padding: 40px;
  text-align: center;
  color: #ef4444;
  font-size: 14px;
}
.hp-error button {
  margin-top: 12px;
  padding: 6px 16px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}

/* ═══════════════════════════════════════════
   v3 五维: 排序按钮栏
   ═══════════════════════════════════════════ */
.hp-sort-bar {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.hp-sort-btn {
  padding: 5px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #f8fafc;
  color: #64748b;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
.hp-sort-btn:hover { border-color: #93c5fd; color: #3b82f6; }
.hp-sort-btn.active {
  background: #3b82f6;
  color: #fff;
  border-color: #3b82f6;
}

/* 滚动容器 */
.hp-hot-scroll {
  max-height: 65vh;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 #f8fafc;
}
.hp-hot-scroll::-webkit-scrollbar { width: 6px; }
.hp-hot-scroll::-webkit-scrollbar-track { background: #f8fafc; border-radius: 3px; }
.hp-hot-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }

/* 提醒图标 */
.hp-hot-alert {
  font-size: 14px;
  margin-left: 4px;
}

/* ═══════════════════════════════════════════
   v3 五维: 详情页概览 — 基本面卡片
   ═══════════════════════════════════════════ */
.ocard-fundamentals {
  padding: 14px 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}
.fund-sub {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #f1f5f9;
}
.fund-sub-title {
  font-size: 13px;
  color: #334155;
  margin-bottom: 4px;
}
.fund-sub-title b {
  color: #1e293b;
  margin-left: 4px;
}
.fund-sub-detail {
  font-size: 11px;
  color: #94a3b8;
}
/* 基本面预警 */
.fund-warnings {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid #fef3c7;
}
.fund-warning-item {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 3px 0;
  font-size: 12px;
}
.fund-warning-icon { flex-shrink: 0; font-size: 13px; }
.fund-warning-text { color: #92400e; flex: 1; }
.fund-warning-penalty { color: #ef4444; font-size: 11px; font-weight: 600; flex-shrink: 0; }
.fund-sub-items {
  margin-top: 4px;
}
.fund-item {
  font-size: 11px;
  color: #475569;
  padding: 2px 0;
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.fund-item small {
  color: #94a3b8;
  margin-left: auto;
}

/* ═══════════════════════════════════════════
   v3 五维: 详情页 — 提醒区
   ═══════════════════════════════════════════ */
.ocard-alerts {
  padding: 14px 16px;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 10px;
}
.alert-item {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #fef3c7;
}
.alert-item:last-child { border-bottom: none; }
.alert-icon {
  font-size: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}
.alert-body { flex: 1; min-width: 0; }
.alert-title {
  font-size: 13px;
  font-weight: 600;
  color: #92400e;
}
.alert-detail {
  font-size: 12px;
  color: #a16207;
  margin-top: 2px;
}

/* ═══════════════════════════════════════════
   v3 五维: 通用 — 涨跌颜色
   ═══════════════════════════════════════════ */
.dim-up { color: #ef4444; font-weight: 700; }     /* 涨=红（A股习惯） */
.dim-down { color: #22c55e; font-weight: 700; }   /* 跌=绿 */
.dim-flat { color: #94a3b8; }
.dim-na { color: #94a3b8; }

/* ═══════════════════════════════════════════
   首页响应式：小屏降低卡片最小宽度
   （须放在 .hp-mega-grid 基础规则之后才能覆盖）
   ═══════════════════════════════════════════ */
@media (max-width: 599px) {
  .hp-mega-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}

/* ═══════════════════════════════════════════
   v9: 微交互 — 浮起 / 渐入 / 过渡（纯追加，不改旧规则）
   ═══════════════════════════════════════════ */

/* 可点卡片 hover 浮起（首页 Mega 卡 / 热点卡 / vtree 节点卡） */
.hp-mega-card,
.hp-hot-card,
.vt-node-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.hp-mega-card:hover,
.hp-hot-card:hover,
.vt-node-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

/* 列表渲染渐入（首页热点列表 / dashboard 热门分支列表共用 .hp-hot-list） */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hp-hot-list .hp-hot-card { animation: fadeSlideIn 0.3s ease both; }
.hp-hot-list .hp-hot-card:nth-child(1)  { animation-delay: 0ms; }
.hp-hot-list .hp-hot-card:nth-child(2)  { animation-delay: 30ms; }
.hp-hot-list .hp-hot-card:nth-child(3)  { animation-delay: 60ms; }
.hp-hot-list .hp-hot-card:nth-child(4)  { animation-delay: 90ms; }
.hp-hot-list .hp-hot-card:nth-child(5)  { animation-delay: 120ms; }
.hp-hot-list .hp-hot-card:nth-child(6)  { animation-delay: 150ms; }
.hp-hot-list .hp-hot-card:nth-child(7)  { animation-delay: 180ms; }
.hp-hot-list .hp-hot-card:nth-child(8)  { animation-delay: 210ms; }
.hp-hot-list .hp-hot-card:nth-child(9)  { animation-delay: 240ms; }
.hp-hot-list .hp-hot-card:nth-child(10) { animation-delay: 270ms; }
/* 超过 10 档统一 300ms， stagger 不再累加 */
.hp-hot-list .hp-hot-card:nth-child(n+11) { animation-delay: 300ms; }

/* 进度条 / 热度条宽度变化过渡 */
.hp-mega-fill,
.dash-hot-fill,
.heat-tag-fill,
.vt-dim-heat-fill,
.heat-bar {
  transition: width 0.3s ease;
}

/* 视图切换容器淡入
   注：起点取 0.85 而非 0 —— 无头 Chrome 截图按需产帧会把动画冻结在起始帧，
   0 起点会让整个视图在截图里近乎不可见；真实浏览器中 0.85→1 仍是 150ms 淡入 */
@keyframes viewFadeIn {
  from { opacity: 0.85; }
  to   { opacity: 1; }
}
.view-container.active { animation: viewFadeIn 0.15s ease; }

/* 减少动态偏好：关闭以上动画与过渡 */
@media (prefers-reduced-motion: reduce) {
  .hp-mega-card,
  .hp-hot-card,
  .vt-node-card,
  .hp-mega-fill,
  .dash-hot-fill,
  .heat-tag-fill,
  .vt-dim-heat-fill,
  .heat-bar,
  .view-container.active {
    animation: none !important;
    transition: none !important;
  }
}

/* ═══════════════════════════════════════════════════════
   详情概览页优化（2026-07-17）
   ═══════════════════════════════════════════════════════ */
/* 市场温度：分数+徽章收进标题行右侧，温度条独占一行全宽 */
.heat-head-right { margin-left: auto; display: flex; align-items: baseline; gap: 8px; }
.heat-badge { color: #fff; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 500; line-height: 1.6; }
.heat-bar-lg { height: 14px; border-radius: 7px; margin-bottom: 4px; }
.heat-bar-lg .heat-bar { border-radius: 7px; }

/* 基本面底座标签 chips 化 */
.fund-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.fund-chip { background: #f1f5f9; border-radius: 10px; padding: 3px 10px; font-size: 11px; color: #475569; }

/* 摘要表格（产业时钟/预期差/配置）— 此前完全无样式，用的浏览器默认渲染 */
.summary-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.summary-table th { text-align: left; font-size: 11px; font-weight: 600; color: var(--text-dim); padding: 6px 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.summary-table td { padding: 8px; line-height: 1.55; vertical-align: top; border-bottom: 1px solid #f1f5f9; color: var(--text); }
.summary-table tbody tr:last-child td { border-bottom: none; }
.summary-table tbody tr:nth-child(even) { background: #f8fafc; }
.summary-table td:first-child { font-weight: 600; }
/* 产业时钟：固定布局防挤压，按列内容分配宽度（子赛道/阶段/渗透率/估值框架/下一拐点） */
.clock-table { table-layout: fixed; }
.clock-table th:nth-child(1) { width: 13%; }
.clock-table th:nth-child(2) { width: 18%; }
.clock-table th:nth-child(3) { width: 18%; }
.clock-table th:nth-child(4) { width: 24%; }

/* ─── 利润地图 HTML 条形图（替代 ASCII 方块图，2026-07-17） ─── */
.pm-chart { font-size: 12px; overflow-x: auto; }
.pm-text { color: var(--text-dim); font-size: 11px; margin: 4px 0; }
.pm-row { display: flex; align-items: center; gap: 6px; margin: 3px 0; flex-wrap: nowrap; }
.pm-prefix { color: var(--text-dim); font-family: var(--font-mono); font-size: 11px; white-space: pre; flex-shrink: 0; }
.pm-label { font-weight: 600; color: var(--text); flex-shrink: 0; white-space: nowrap; }
.pm-barwrap { flex-shrink: 0; height: 12px; display: flex; align-items: center; }
.pm-bar { display: block; height: 10px; background: #60a5fa; border-radius: 2px; }
.pm-val { font-weight: 700; color: var(--text); font-family: var(--font-mono); font-size: 11px; flex-shrink: 0; min-width: 38px; }
.pm-note { color: var(--text-dim); font-size: 11px; line-height: 1.5; flex: 0 0 auto; white-space: nowrap; }

/* ═══════════════════════════════════════════════════════
   核心资产池视图（2026-07-17）
   ═══════════════════════════════════════════════════════ */
.assets-container { max-width: 960px; margin: 0 auto; padding: 20px 24px; overflow-y: auto; }
.as-header { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.as-title { font-size: 17px; font-weight: 700; color: var(--text); }
.as-title small { font-size: 12px; font-weight: 400; color: var(--text-dim); margin-left: 8px; }
.as-stats { font-size: 12px; color: var(--text-dim); }
.as-filter-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.as-chip { padding: 3px 12px; font-size: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); color: var(--text-dim); cursor: pointer; transition: all .15s; }
.as-chip:hover { border-color: var(--accent); color: var(--accent); }
.as-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.as-list { display: flex; flex-direction: column; gap: 8px; }
.as-row { display: flex; gap: 10px; align-items: flex-start; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease; }
.as-row:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(15,23,42,.08); }
.as-rank { font-family: var(--font-mono); font-size: 13px; font-weight: 700; color: var(--text-dim); min-width: 22px; padding-top: 2px; }
.as-main { flex: 1; min-width: 0; }
.as-row1 { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.as-name { font-size: 14px; font-weight: 700; color: var(--text); }
.as-code { font-family: var(--font-mono); font-size: 11px; color: var(--text-dim); }
.as-change { margin-left: auto; font-size: 14px; font-weight: 700; font-family: var(--font-mono); }
.as-change.up { color: #ef4444; } .as-change.down { color: #22c55e; } .as-change.flat { color: var(--text-dim); }
.as-row2 { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.as-node { font-size: 12px; color: var(--accent); }
.as-ranks { font-size: 11px; color: var(--text-dim); }
.as-ranks b { color: var(--text); margin-left: 2px; }
.as-note { font-size: 11px; color: var(--text-dim); line-height: 1.5; margin-top: 4px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
/* 静默主线 chip 分值 */
.hp-mega-chip-score { font-family: var(--font-mono); font-size: 11px; font-weight: 700; color: var(--text-dim); margin-left: 4px; }

/* 核心资产池：加载更多按钮 */
.as-more-btn { margin: 12px auto 0; display: block; padding: 6px 20px; font-size: 12px; border: 1px solid var(--border); border-radius: 14px; background: var(--card); color: var(--text-dim); cursor: pointer; }
.as-more-btn:hover { border-color: var(--accent); color: var(--accent); }

/* 核心资产池：范围切换 */
.as-scope-bar { display: flex; gap: 6px; margin-bottom: 8px; }
.as-scope-chip { font-weight: 600; }

/* 核心资产池：跨节点角标 */
.as-dup { font-size: 10px; color: var(--accent); background: #eff6ff; border-radius: 8px; padding: 1px 6px; }

/* ═══════════════════════════════════════════════════════
   AI 对话面板（2026-07-17）
   ═══════════════════════════════════════════════════════ */
.chat-fab { position: fixed; right: 22px; bottom: 22px; z-index: 900; width: 52px; height: 52px; border-radius: 50%; border: none; background: var(--accent); color: #fff; font-size: 22px; cursor: pointer; box-shadow: 0 4px 14px rgba(59,130,246,.4); transition: transform .15s ease; }
.chat-fab:hover { transform: scale(1.08); }
.chat-fab.hidden { display: none; }
.chat-panel { position: fixed; top: 0; right: 0; z-index: 901; width: 420px; max-width: 96vw; height: 100vh; background: var(--bg); border-left: 1px solid var(--border); box-shadow: -6px 0 24px rgba(15,23,42,.12); display: flex; flex-direction: column; transform: translateX(105%); transition: transform .22s ease; }
.chat-panel.open { transform: translateX(0); }
.chat-resize-handle { position: absolute; left: 0; top: 0; width: 5px; height: 100%; cursor: ew-resize; z-index: 2; background: transparent; transition: background .15s; }
.chat-resize-handle:hover { background: var(--accent); opacity: .4; }
.chat-header { display: flex; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--border); background: var(--card); }
.chat-title { font-size: 14px; font-weight: 700; color: var(--text); }
.chat-header-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.chat-new-btn { border: none; background: none; font-size: 16px; color: var(--text-dim); cursor: pointer; padding: 0 6px; border-radius: 4px; }
.chat-new-btn:hover { color: var(--text); background: var(--border); }
.chat-close { border: none; background: none; font-size: 20px; color: var(--text-dim); cursor: pointer; padding: 0 4px; }
.chat-close:hover { color: var(--text); }
.chat-send-stop { background: #e53e3e !important; color: #fff !important; }
.chat-send-stop:hover { background: #c53030 !important; }
.chat-msgs { flex: 1; overflow-y: auto; padding: 14px 12px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { display: flex; }
.chat-msg.user { justify-content: flex-end; }
.chat-bubble { max-width: 88%; padding: 8px 12px; border-radius: 12px; font-size: 13px; line-height: 1.65; word-break: break-word; }
.chat-msg.user .chat-bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 4px; }
.chat-msg.assistant .chat-bubble { background: var(--card); border: 1px solid var(--border); color: var(--text); border-bottom-left-radius: 4px; }
.chat-msg.error .chat-bubble { border-color: #fca5a5; color: #b91c1c; }
.chat-typing { color: var(--text-dim); font-size: 12px; animation: chatBlink 1.2s infinite; }
@keyframes chatBlink { 0%,100% { opacity: .4; } 50% { opacity: 1; } }
.chat-h { font-weight: 700; margin: 6px 0 2px; }
.chat-li { padding-left: 4px; }
.chat-code { background: #f1f5f9; border-radius: 6px; padding: 8px 10px; font-family: var(--font-mono); font-size: 11px; overflow-x: auto; margin: 6px 0; }
.chat-bubble code { background: #f1f5f9; border-radius: 4px; padding: 0 4px; font-family: var(--font-mono); font-size: 12px; }
.chat-msg.user .chat-bubble code { background: rgba(255,255,255,.2); }
.chat-node-ref { color: var(--accent); cursor: pointer; border-bottom: 1px dashed var(--accent); transition: all .15s; }
.chat-node-ref:hover { background: rgba(59,130,246,.08); border-bottom-style: solid; }
.chat-msg.user .chat-node-ref { color: #fff; border-bottom-color: rgba(255,255,255,.6); }
.chat-msg.user .chat-node-ref:hover { background: rgba(255,255,255,.15); }
.chat-tool-card { align-self: stretch; background: #f8fafc; border: 1px dashed var(--border); border-radius: 8px; padding: 6px 10px; font-size: 11px; color: var(--text-dim); }
.chat-tool-card summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.chat-tool-card pre { margin: 6px 0 0; font-family: var(--font-mono); font-size: 10px; max-height: 200px; overflow: auto; white-space: pre-wrap; }
.chat-quick { display: flex; gap: 6px; padding: 8px 12px; flex-wrap: wrap; border-top: 1px solid var(--border); }
.chat-quick-btn { font-size: 11px; padding: 4px 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--card); color: var(--text-dim); cursor: pointer; }
.chat-quick-btn:hover { border-color: var(--accent); color: var(--accent); }
.chat-input-row { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--border); background: var(--card); }
.chat-input { flex: 1; resize: none; border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; font-size: 13px; font-family: var(--font); outline: none; max-height: 100px; }
.chat-input:focus { border-color: var(--accent); }
.chat-send { border: none; border-radius: 8px; background: var(--accent); color: #fff; font-size: 13px; padding: 0 16px; cursor: pointer; }
.chat-send:disabled { opacity: .5; cursor: default; }
@media (max-width: 599px) { .chat-panel { width: 100vw; max-width: 100vw; } .chat-fab { right: 14px; bottom: 14px; } }

/* 聊天气泡内的表格/引用/分隔线 */
.chat-table { font-size: 11px; margin: 6px 0; display: block; overflow-x: auto; }
.chat-table th, .chat-table td { padding: 5px 7px; }
.chat-table th { white-space: normal; }
.chat-quote { border-left: 3px solid var(--accent); background: #f8fafc; border-radius: 0 6px 6px 0; padding: 6px 10px; margin: 6px 0; color: var(--text-dim); font-size: 12px; line-height: 1.6; }
.chat-hr { border: none; border-top: 1px solid var(--border); margin: 10px 0; }

/* ═══════════════════════════════════════════════════════
   用户认证（登录态按钮 + 登录/注册弹窗）
   ═══════════════════════════════════════════════════════ */
.auth-btn-mobile { display: none; }
.auth-btn { border: 1px solid var(--border); background: var(--card); color: var(--text-dim); border-radius: 14px; padding: 4px 12px; font-size: 12px; cursor: pointer; white-space: nowrap; }
.auth-btn:hover { border-color: var(--accent); color: var(--accent); }
.auth-btn.logged-in { color: var(--accent); border-color: var(--accent); }
.auth-overlay { position: fixed; inset: 0; z-index: 950; background: rgba(15,23,42,.4); display: flex; align-items: center; justify-content: center; }
.auth-card { position: relative; width: 340px; background: var(--bg); border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 12px 40px rgba(15,23,42,.25); padding: 20px 22px 14px; }
.auth-tabs { display: flex; gap: 4px; margin-bottom: 14px; }
.auth-tab { flex: 1; border: none; background: none; padding: 8px 0; font-size: 14px; color: var(--text-dim); cursor: pointer; border-bottom: 2px solid transparent; }
.auth-tab.active { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.auth-input { width: 100%; box-sizing: border-box; border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; font-size: 13px; margin-bottom: 10px; outline: none; background: var(--card); color: var(--text); }
.auth-input:focus { border-color: var(--accent); }
.auth-err { min-height: 18px; font-size: 12px; color: #dc2626; margin-bottom: 6px; }
.auth-submit { width: 100%; border: none; border-radius: 8px; background: var(--accent); color: #fff; font-size: 14px; padding: 9px 0; cursor: pointer; }
.auth-foot { margin-top: 12px; font-size: 10px; color: var(--text-dim); text-align: center; }
.auth-close { position: absolute; top: 8px; right: 10px; border: none; background: none; font-size: 18px; color: var(--text-dim); cursor: pointer; }
.auth-close:hover { color: var(--text); }

/* 邮箱登录面板 */
.auth-panel { display: none; }
.auth-panel.active { display: block; }
.auth-email-form { padding: 4px 0; }
.auth-field { margin-bottom: 10px; }
.auth-field input {
  width: 100%; box-sizing: border-box; border: 1px solid var(--border);
  border-radius: 8px; padding: 9px 12px; font-size: 13px; outline: none;
  background: var(--card); color: var(--text);
}
.auth-field input:focus { border-color: var(--accent); }
.auth-email-btn { width: 100%; border: none; border-radius: 8px; background: var(--accent); color: #fff; font-size: 14px; padding: 9px 0; cursor: pointer; }
.auth-email-btn:hover { filter: brightness(1.08); }
.auth-email-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.auth-email-btn.register { background: #10b981; }
.auth-switch { margin-top: 12px; font-size: 12px; color: var(--text-dim); text-align: center; }
.auth-switch a { color: var(--accent); text-decoration: none; margin-left: 4px; }
.auth-switch a:hover { text-decoration: underline; }

/* 微信登录 */
.auth-tab-wechat.active { color: #07C160; border-bottom-color: #07C160; }
.auth-wechat-box { text-align: center; padding: 10px 0; }
.auth-wechat-icon { margin-bottom: 8px; }
.auth-wechat-hint { font-size: 13px; color: var(--text-dim); margin: 0 0 16px; }
.auth-wechat-btn { display: inline-block; border: none; border-radius: 8px; background: #07C160; color: #fff; font-size: 14px; padding: 9px 32px; cursor: pointer; }
.auth-wechat-btn:hover { background: #06AD56; }
.auth-wechat-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* 免责声明 */
.auth-disclaimer-box {
  text-align: left;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 10px;
  overflow: hidden;
}
.auth-disclaimer-title {
  margin: 0;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 700;
  color: #475569;
  background: #f8fafc;
  border-bottom: 1px solid var(--border);
}
.auth-disclaimer-text {
  max-height: 170px;
  overflow-y: auto;
  padding: 10px 12px;
  font-size: 11px;
  line-height: 1.7;
  color: #64748b;
}
.auth-disclaimer-text p {
  margin: 0 0 8px;
}
.auth-disclaimer-text p:last-child { margin-bottom: 0; }
.auth-disclaimer-text b {
  color: #475569;
}
.auth-agree {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 12px;
  color: #475569;
  cursor: pointer;
  margin-bottom: 12px;
  user-select: none;
}
.auth-agree input[type="checkbox"] {
  width: 15px;
  height: 15px;
  cursor: pointer;
  accent-color: #07C160;
}

/* 移动端登录弹窗适配 */
@media (max-width: 599px) {
  .auth-card {
    width: calc(100vw - 28px);
    max-width: 340px;
    padding: 16px 14px 12px;
  }
  .auth-disclaimer-text {
    max-height: 130px;
    font-size: 10px;
    line-height: 1.6;
  }
  .auth-wechat-hint {
    font-size: 12px;
    margin-bottom: 12px;
  }
  .auth-wechat-btn {
    padding: 8px 24px;
    font-size: 13px;
  }
}

/* 聊天配额提示 + 自选星标 */
.chat-quota { padding: 0 14px 8px; font-size: 10px; color: var(--text-dim); text-align: right; }
.watch-star { border: none; background: none; font-size: 16px; cursor: pointer; color: #cbd5e1; padding: 0 4px; line-height: 1; }
.watch-star.on { color: #f59e0b; }
.watch-star:hover { transform: scale(1.15); }

/* 详情头部星标与标题对齐 */
#detailWatchStar { vertical-align: 4px; margin-left: 6px; font-size: 18px; }

/* 自选范围：节点/股票分组 */
.as-watch-sec { margin-bottom: 18px; }
.as-watch-title { font-size: 13px; font-weight: 700; color: var(--text-dim); margin: 8px 0 6px; }
.as-node-row { cursor: pointer; }

/* ══════════════════════════════════════════════════════
   自选视图（⭐ 自选）
   ══════════════════════════════════════════════════════ */

/* 容器 = 首页同级容器，复用 hp-section / hp-loading / hp-empty / hp-spinner */
.watchlist-container {
  padding: 20px 24px 40px;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  box-sizing: border-box;
}

/* 未登录 & 空状态 */
.wl-unauth {
  text-align: center;
  padding: 60px 20px;
}
.wl-unauth-icon {
  font-size: 48px;
  margin-bottom: 16px;
}
.wl-unauth-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.wl-unauth-desc {
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 20px;
}
.wl-unauth-btn {
  display: inline-block;
  padding: 10px 28px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}
.wl-unauth-btn:hover {
  filter: brightness(1.08);
}

/* section 复用 hp-section 的结构，加额外间距 */
.wl-section {
  margin-bottom: 24px;
}
.wl-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.wl-section-icon {
  font-size: 18px;
}
.wl-section-header h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}

/* ─── 自选节点卡片 ─── */
.wl-node-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.wl-node-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  cursor: pointer;
  transition: box-shadow 0.15s;
}
.wl-node-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,.08);
}
.wl-node-top {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.wl-node-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
}
.wl-node-mega {
  font-size: 11px;
  color: var(--text-dim);
  background: #f1f5f9;
  padding: 2px 8px;
  border-radius: 4px;
}
.wl-node-trend {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.wl-node-change {
  font-size: 15px;
  font-weight: 700;
  white-space: nowrap;
}
.wl-node-change.up { color: #ef4444; }
.wl-node-change.down { color: #22c45e; }
.wl-node-change.flat { color: #94a3b8; }
.wl-node-change.dim-up { color: #fca5a5; }
.wl-node-change.dim-down { color: #86efac; }
.wl-node-stats {
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.6;
}
.wl-node-stats b {
  font-weight: 600;
}
/* 复用首页 .hp-hot-temp / .hp-hot-tag / .hp-hot-dot / .hp-hot-embedded-change 样式，无需额外定义 */

/* ─── 自选股票列表 ─── */
.wl-stock-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.wl-stock-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 6px;
}
.wl-stock-code {
  font-size: 12px;
  color: var(--text-dim);
  font-family: monospace;
  min-width: 54px;
}
.wl-stock-name {
  font-size: 14px;
  color: var(--text);
  flex: 1;
}
.wl-stock-trend {
  font-size: 12px;
  font-weight: 600;
  min-width: 50px;
  text-align: right;
  flex: 1;
}
.wl-stock-change {
  font-size: 13px;
  font-weight: 600;
  min-width: 56px;
  text-align: right;
}
.wl-stock-change.up { color: #ef4444; }
.wl-stock-change.down { color: #22c45e; }
.wl-stock-change.flat { color: #94a3b8; }

/* ─── 移动端 ─── */
@media (max-width: 599px) {
  .watchlist-container {
    padding: 12px 12px 32px;
    max-width: none;
  }
  .wl-node-stats {
    flex-wrap: wrap;
    gap: 8px 12px;
  }
  .wl-stock-row {
    gap: 8px;
  }
}
