/* ============================================
   产业链新闻挖掘平台 - 样式表
   设计风格：专业金融风、深色主题、简洁商务
   ============================================ */

/* === CSS Variables === */
:root {
  /* 主色调 */
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --primary-light: #60a5fa;

  /* 背景 */
  --bg-body: #0f172a;
  --bg-surface: #1e293b;
  --bg-card: #1e293b;
  --bg-hover: #334155;
  --bg-active: #1e3a5f;

  /* 文字 */
  --text-primary: #f1f5f9;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* 边框 */
  --border: #334155;
  --border-light: #1e293b;

  /* 产业链节点颜色 */
  --color-upstream: #ef4444;
  --color-midstream: #f59e0b;
  --color-downstream: #22c55e;
  --color-equipment: #8b5cf6;
  --color-service: #06b6d4;
  --color-external: #ec4899;
  --color-demand: #f97316;

  /* 涨跌色（A股惯例） */
  --color-rise: #ef4444;
  --color-fall: #22c55e;

  /* 尺寸 */
  --navbar-height: 56px;
  --stats-height: 44px;
  --status-height: 32px;
  --news-panel-width: 380px;
  --resizer-width: 4px;

  /* 圆角 */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
}

/* === Reset === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  overflow: hidden;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg-body);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* === Scrollbar === */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-muted);
}

/* === Navbar === */
.navbar {
  height: var(--navbar-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  position: relative;
  z-index: 100;
}

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

.brand-icon {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  color: white;
  letter-spacing: 1px;
}

.brand-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
}

.brand-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  margin-left: -8px;
}

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

.chain-selector {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.chain-selector select {
  background: var(--bg-body);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 6px 32px 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2394a3b8' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  min-width: 140px;
}

.chain-selector select:hover {
  border-color: var(--primary);
}

.chain-selector select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

/* === Stats Bar === */
.stats-bar {
  height: var(--stats-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 20px;
  gap: 24px;
}

.stat-item {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

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

.stat-value {
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-light);
  font-variant-numeric: tabular-nums;
}

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

.stat-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
}

.time-filters {
  display: flex;
  gap: 4px;
}

.time-btn {
  padding: 4px 12px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

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

.time-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

/* === Main Content Layout === */
.main-content {
  display: flex;
  height: calc(100vh - var(--navbar-height) - var(--stats-height) - var(--status-height));
  overflow: hidden;
}

/* === News Panel (Left) === */
.news-panel {
  width: var(--news-panel-width);
  min-width: 280px;
  max-width: 600px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.panel-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.panel-header h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.panel-tools {
  display: flex;
  gap: 8px;
}

.search-input {
  flex: 1;
  background: var(--bg-body);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
}

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

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.15);
}

.refresh-btn {
  width: 32px;
  height: 32px;
  background: var(--bg-body);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}

.refresh-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
}

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

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

/* News List */
.news-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
}

.news-item {
  padding: 12px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.15s;
  margin-bottom: 4px;
  border: 1px solid transparent;
}

.news-item:hover {
  background: var(--bg-hover);
}

.news-item.active {
  background: var(--bg-active);
  border-color: var(--primary);
}

.news-item-title {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-primary);
  margin-bottom: 6px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-item-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
}

.news-tag {
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: 500;
}

.news-tag.upstream { background: rgba(239,68,68,0.15); color: #ef4444; }
.news-tag.midstream { background: rgba(245,158,11,0.15); color: #f59e0b; }
.news-tag.downstream { background: rgba(34,197,94,0.15); color: #22c55e; }
.news-tag.policy { background: rgba(139,92,246,0.15); color: #8b5cf6; }
.news-tag.price { background: rgba(236,72,153,0.15); color: #ec4899; }
.news-tag.event { background: rgba(6,182,212,0.15); color: #06b6d4; }

.news-item-summary {
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.5;
}

/* Skeleton Loading */
.skeleton-list .skeleton-item {
  padding: 12px;
  margin-bottom: 4px;
}

.skeleton-line {
  height: 14px;
  border-radius: 4px;
  background: linear-gradient(90deg, var(--bg-hover) 25%, var(--bg-body) 50%, var(--bg-hover) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  margin-bottom: 8px;
}

.skeleton-line.short { width: 60%; }
.skeleton-title { height: 16px; width: 90%; }
.skeleton-text { width: 100%; }

@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  text-align: center;
}

.empty-state p {
  margin-top: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

.empty-state span {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* === Panel Resizer === */
.panel-resizer {
  width: var(--resizer-width);
  cursor: col-resize;
  background: var(--border);
  position: relative;
  flex-shrink: 0;
  transition: background 0.2s;
}

.panel-resizer:hover,
.panel-resizer.dragging {
  background: var(--primary);
}

.resizer-handle {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 2px;
  height: 32px;
  background: var(--text-muted);
  border-radius: 1px;
  opacity: 0;
  transition: opacity 0.2s;
}

.panel-resizer:hover .resizer-handle {
  opacity: 1;
}

/* === Content Panel (Right) === */
.content-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-body);
}

/* === 分析面板（全宽纵向流式布局） === */
.analysis-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 各模块防止被压缩 */
.analysis-body > .report-section {
  flex-shrink: 0;
}

/* ① 新闻 section */
.section-news .section-body {
  padding: 12px 16px;
}

.section-news-title {
  font-size: 17px;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 8px;
}

.section-news-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.section-news-content {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.section-news-content.collapsed {
  max-height: 4.5em;
  overflow: hidden;
  position: relative;
}

.section-news-content.collapsed::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2.5em;
  background: linear-gradient(transparent, var(--bg-surface));
  pointer-events: none;
}

.section-news-toggle {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 16px;
  font-size: 12px;
  color: var(--primary-light);
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.section-news-toggle:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: var(--primary);
}

/* ② 事件冲击速览 */
.section-impact .section-header {
  background: rgba(245, 158, 11, 0.04);
}

/* ③ 产业链解读（内嵌双栏） */
.chain-interpret-body {
  display: flex;
  padding: 0 !important;
  overflow: hidden;
  height: 400px;
  min-height: 250px;
}

.chain-interpret-left {
  width: 40%;
  min-width: 200px;
  overflow-y: auto;
  padding: 12px;
  border-right: 1px solid var(--border);
}

.chain-interpret-resizer {
  width: var(--resizer-width);
  cursor: col-resize;
  background: var(--border);
  flex-shrink: 0;
  transition: background 0.2s;
}

.chain-interpret-resizer:hover,
.chain-interpret-resizer.dragging {
  background: var(--primary);
}

.chain-interpret-right {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

/* ④ 投资标的映射 */
.section-targets .section-header {
  background: rgba(239, 68, 68, 0.04);
}

/* ⑤ 跟踪验证 */
.section-verify .section-header {
  background: rgba(59, 130, 246, 0.04);
}

.content-tabs {
  display: flex;
  padding: 8px 16px 0;
  gap: 4px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.tab-btn {
  padding: 8px 20px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s;
}

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

.tab-btn.active {
  color: var(--primary-light);
  border-bottom-color: var(--primary);
}

.tab-content {
  display: none;
  flex: 1;
  overflow: hidden;
}

.tab-content.active {
  display: flex;
  flex-direction: column;
}

/* === Graph Container === */
.graph-container {
  flex: 1;
  position: relative;
  overflow: hidden;
}

.graph-placeholder {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--text-muted);
}

.graph-placeholder p {
  margin-top: 12px;
  font-size: 15px;
  color: var(--text-secondary);
}

.graph-placeholder span {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.graph-legend {
  display: flex;
  gap: 16px;
  padding: 8px 16px;
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  flex-wrap: wrap;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-dot.upstream { background: var(--color-upstream); }
.legend-dot.midstream { background: var(--color-midstream); }
.legend-dot.downstream { background: var(--color-downstream); }
.legend-dot.equipment { background: var(--color-equipment); }
.legend-dot.service { background: var(--color-service); }
.legend-dot.external { background: var(--color-external); }
.legend-dot.demand { background: var(--color-demand); }

/* === AI分析报告（通用滚动容器） === */
.analysis-report {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.detail-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  text-align: center;
  color: var(--text-muted);
}

.detail-placeholder p {
  margin-top: 12px;
  font-size: 15px;
  color: var(--text-secondary);
}

.detail-placeholder span {
  font-size: 12px;
  margin-top: 4px;
}

/* === Status Bar === */
.status-bar {
  height: var(--status-height);
  background: var(--bg-surface);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 24px;
  font-size: 11px;
  color: var(--text-muted);
}

.status-item {
  display: flex;
  align-items: center;
  gap: 4px;
}

.status-item::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-downstream);
}

/* === 结构化分析报告面板 === */
.analysis-card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 16px;
}

.analysis-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

/* 事件概要行 */
.analysis-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13px;
  line-height: 1.6;
}

.analysis-label {
  color: var(--text-muted);
  flex-shrink: 0;
  min-width: 80px;
}

/* 涨跌标签 */
.tag-rise {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.tag-fall {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.tag-neutral {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 3px;
  font-size: 12px;
  font-weight: 600;
  background: rgba(100, 116, 139, 0.15);
  color: #64748b;
}

/* 产业链解读：上/中/下游段落 */
.impact-section {
  margin-bottom: 12px;
}

.impact-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  padding-left: 8px;
  margin-bottom: 6px;
}

.impact-item {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
  padding: 4px 0 4px 16px;
  border-left: 2px solid transparent;
}

.impact-node {
  font-weight: 600;
  color: var(--text-primary);
  min-width: 100px;
}

.impact-logic {
  color: var(--text-secondary);
  font-size: 12px;
}

/* 公司影响 */
.company-section {
  margin-bottom: 10px;
}

.company-section-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
}

.company-section-title.rise {
  color: #ef4444;
}

.company-section-title.fall {
  color: #22c55e;
}

.company-section-title.neutral {
  color: #64748b;
}

.company-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-left: 8px;
}

.company-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 12px;
}

.company-tag.rise {
  background: rgba(239, 68, 68, 0.12);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.25);
}

.company-tag.fall {
  background: rgba(34, 197, 94, 0.12);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.company-tag.neutral {
  background: rgba(100, 116, 139, 0.12);
  color: #94a3b8;
  border: 1px solid rgba(100, 116, 139, 0.25);
}

/* 待验证指标 */
.verify-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.verify-label {
  color: var(--text-muted);
  font-size: 13px;
  flex-shrink: 0;
  min-width: 70px;
  padding-top: 2px;
}

.verify-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 12px;
  background: rgba(59, 130, 246, 0.12);
  color: #60a5fa;
  border: 1px solid rgba(59, 130, 246, 0.25);
  margin: 2px 4px 2px 0;
}

/* 风险提示 */
.risk-row {
  margin-bottom: 10px;
}

.risk-label {
  color: var(--text-muted);
  font-size: 13px;
  display: block;
  margin-bottom: 4px;
}

.risk-row ul {
  margin: 0;
  padding-left: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* 分析文本行（fallback） */
.analysis-text-row {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 8px;
}

.analysis-text-row b {
  color: var(--text-primary);
}

/* === 分析报告新布局（参考 gjhgszh.com） === */
.report-container {
  padding-top: 16px;
}

.report-section {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: 16px;
  overflow: hidden;
}

.section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border);
  background: rgba(59, 130, 246, 0.04);
}

.section-icon {
  font-size: 16px;
}

.section-body {
  padding: 16px;
}

/* --- 事件概览 --- */
.overview-summary {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.6;
  margin-bottom: 12px;
  padding: 10px 14px;
  background: rgba(59, 130, 246, 0.06);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--primary);
}

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

.overview-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.overview-label {
  color: var(--text-muted);
  font-size: 12px;
  flex-shrink: 0;
  min-width: 64px;
}

.overview-value {
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 500;
}

.overview-tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  font-weight: 600;
  border: 1px solid;
  background: transparent;
}

.historical-ref {
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(139, 92, 246, 0.06);
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--color-equipment);
  font-size: 13px;
  line-height: 1.7;
}

.ref-label {
  color: var(--color-equipment);
  font-weight: 600;
}

.ref-text {
  color: var(--text-secondary);
}

/* --- 产业链传导分析（链式流程） --- */
.chain-flow {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.chain-node {
  padding: 12px 16px;
  border-left: 3px solid;
  background: rgba(255,255,255,0.02);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.chain-node-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 4px;
}

.chain-layer {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 3px;
  background: rgba(255,255,255,0.05);
  flex-shrink: 0;
}

.chain-node-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.chain-dir {
  font-size: 12px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 3px;
  flex-shrink: 0;
}

.chain-node-logic {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-left: 8px;
  margin-top: 4px;
}

.chain-arrow {
  text-align: center;
  color: var(--text-muted);
  font-size: 18px;
  padding: 2px 0;
  line-height: 1;
}

/* --- 投资标的映射（卡片式） --- */
.company-group {
  margin-bottom: 14px;
}
.company-group:last-child {
  margin-bottom: 0;
}

.company-group-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.company-group-title.rise { color: #ef4444; }
.company-group-title.fall { color: #22c55e; }
.company-group-title.neutral { color: #94a3b8; }

.company-cards {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.company-card {
  display: flex;
  flex-direction: column;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid;
  background: rgba(255,255,255,0.02);
}

.company-card.rise {
  border-color: rgba(239, 68, 68, 0.2);
  background: rgba(239, 68, 68, 0.04);
}

.company-card.fall {
  border-color: rgba(34, 197, 94, 0.2);
  background: rgba(34, 197, 94, 0.04);
}

.company-card.neutral {
  border-color: rgba(100, 116, 139, 0.2);
  background: rgba(100, 116, 139, 0.04);
}

.company-card-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 3px;
}

.company-card-reason {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.6;
  padding-left: 12px;
  border-left: 2px solid var(--border);
}

/* --- 建议跟踪和验证清单 --- */
.verify-group {
  margin-bottom: 14px;
}

.verify-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.verify-label {
  color: var(--text-muted);
  font-size: 13px;
  flex-shrink: 0;
  min-width: 100px;
  padding-top: 2px;
}

.verify-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.risk-group {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.risk-item {
  margin-bottom: 10px;
}

/* === 产业链结构图（左栏） === */
.chain-structure {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

.chain-structure-flow {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.structure-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.structure-legend .legend-dot {
  width: 8px;
  height: 8px;
}

.structure-layer {
  margin-bottom: 4px;
}

.structure-layer-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--layer-color, var(--text-muted));
  margin-bottom: 8px;
  padding-left: 4px;
  letter-spacing: 1px;
}

.structure-nodes {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.structure-node {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid;
  min-width: 120px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.15s, box-shadow 0.15s;
}

.structure-node:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.structure-node-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.structure-node-dir {
  font-size: 12px;
  font-weight: 600;
  padding: 1px 8px;
  border-radius: 3px;
  display: inline-block;
  width: fit-content;
}

.structure-arrow {
  display: flex;
  justify-content: center;
  padding: 4px 0;
}

.structure-meta {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 12px;
  padding: 12px;
  background: var(--bg-surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.meta-item {
  display: flex;
  align-items: center;
  gap: 8px;
}

.meta-label {
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.meta-value {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-primary);
}

.dir-rise {
  background: rgba(239, 68, 68, 0.15);
  color: #ef4444;
}

.dir-fall {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.dir-neutral {
  background: rgba(100, 116, 139, 0.15);
  color: #64748b;
}

/* === AI分析报告（右栏） === */
.analysis-report {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
}

/* 投资标的内嵌到概览区 */
.targets-inline {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
}

/* === 新闻摘要折叠 === */
.detail-body {
  position: relative;
}

.detail-summary {
  font-size: 14px;
  line-height: 1.8;
  color: var(--text-secondary);
}

.detail-toggle {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 16px;
  font-size: 12px;
  color: var(--primary-light);
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
}

.detail-toggle:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: var(--primary);
}

/* === 新闻列表中的产业链标签 === */
.news-item-chains {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 4px;
}

.news-chain-tag {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(139, 92, 246, 0.12);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

/* === 响应式 === */
@media (max-width: 768px) {
  .main-content {
    flex-direction: column;
  }

  .news-panel {
    width: 100%;
    max-width: none;
    height: 40%;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .panel-resizer {
    width: 100%;
    height: var(--resizer-width);
    cursor: row-resize;
  }

  .content-panel {
    height: 60%;
  }

  .brand-subtitle {
    display: none;
  }

  .graph-legend {
    gap: 8px;
    padding: 6px 12px;
  }

  .stats-bar {
    flex-wrap: wrap;
    height: auto;
    padding: 8px 16px;
    gap: 8px;
  }
}
