/* ===== 景桁产业智库 — 深色财经风 ===== */

:root {
  --bg-primary: #0a0e17;
  --bg-secondary: #111827;
  --bg-card: #1a2332;
  --bg-card-hover: #1f2b3d;
  --bg-input: #0d1321;
  --border: #2a3548;
  --border-light: #374357;

  --text-primary: #e8edf5;
  --text-secondary: #8b95a5;
  --text-muted: #5a6475;
  --text-accent: #60a5fa;

  --accent-blue: #3b82f6;
  --accent-blue-light: #60a5fa;
  --accent-green: #22c55e;
  --accent-red: #ef4444;
  --accent-amber: #f59e0b;
  --accent-purple: #a78bfa;
  --accent-cyan: #22d3ee;

  --font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
  font-family: var(--font-family);
  background: var(--bg-primary);
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

#app {
  min-height: 100vh;
  padding-bottom: 70px; /* TabBar height */
  animation: fadeIn 0.3s ease;
}

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

/* ===== TabBar ===== */
.tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: rgba(17, 24, 39, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.tab-bar-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  color: var(--text-muted);
  font-size: 11px;
  cursor: pointer;
  transition: color 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.tab-bar-item.active {
  color: var(--accent-blue);
}

.tab-bar-item svg {
  width: 22px;
  height: 22px;
}

/* ===== Header ===== */
.page-header {
  padding: 16px 20px 12px;
  background: var(--bg-secondary);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}

.page-header h1 {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
}

.page-header p {
  font-size: 13px;
  color: var(--text-secondary);
  margin-top: 2px;
}

/* ===== Content ===== */
.content {
  padding: 16px 20px;
}

/* ===== Cards ===== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  transition: background 0.2s;
}

.card:active {
  background: var(--bg-card-hover);
}

.card-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.card-desc {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-muted);
}

/* ===== Tags ===== */
.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}

.tag-blue { background: rgba(59, 130, 246, 0.15); color: var(--accent-blue-light); }
.tag-green { background: rgba(34, 197, 94, 0.15); color: var(--accent-green); }
.tag-amber { background: rgba(245, 158, 11, 0.15); color: var(--accent-amber); }
.tag-red { background: rgba(239, 68, 68, 0.15); color: var(--accent-red); }
.tag-purple { background: rgba(167, 139, 250, 0.15); color: var(--accent-purple); }

/* ===== Input ===== */
.search-box {
  position: relative;
  margin-bottom: 16px;
}

.search-box input {
  width: 100%;
  height: 44px;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0 16px 0 40px;
  font-size: 15px;
  color: var(--text-primary);
  outline: none;
  transition: border-color 0.2s;
}

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

.search-box input:focus {
  border-color: var(--accent-blue);
}

.search-box .search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  z-index: 1;
}

/* 搜索建议下拉 */
.search-suggest {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  border-top: none;
  max-height: 240px;
  overflow-y: auto;
  z-index: 100;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.suggest-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.15s;
}

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

.suggest-item + .suggest-item {
  border-top: 1px solid var(--border);
}

.suggest-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  flex: 1;
}

.suggest-code {
  font-size: 12px;
  color: var(--accent-blue);
  font-family: 'SF Mono', 'Menlo', monospace;
}

.suggest-market {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-secondary);
  padding: 1px 6px;
  border-radius: 3px;
}

/* ===== Button ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  padding: 0 20px;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s;
  -webkit-tap-highlight-color: transparent;
}

.btn:active { opacity: 0.8; }

.btn-primary {
  background: var(--accent-blue);
  color: #fff;
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text-primary);
}

.btn-block {
  width: 100%;
}

/* ===== Loading ===== */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--text-secondary);
  font-size: 14px;
}

.loading-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--accent-blue);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-right: 8px;
}

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

/* ===== Disclaimer ===== */
.disclaimer {
  margin: 20px;
  padding: 12px 16px;
  background: rgba(245, 158, 11, 0.08);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: var(--radius-sm);
  font-size: 12px;
  color: var(--accent-amber);
  line-height: 1.6;
}

/* ===== Empty ===== */
.empty {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.empty-text {
  font-size: 14px;
}

/* ===== Finance Result (v3 — Card Modules) ===== */

/* 行情卡片 */
.fin-quote {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 12px;
}
.fin-quote-name {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
}
.fin-quote-period {
  font-size: 11px;
  color: var(--text-muted);
  margin-left: 6px;
  font-weight: 400;
}
.fin-quote-right {
  text-align: right;
}
.fin-quote-price {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.fin-quote-change {
  font-size: 12px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.fin-quote-amount {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 4px;
}
.fin-quote-up { color: var(--accent-red); }
.fin-quote-down { color: var(--accent-green); }

/* 数据来源 + 缓存提示 */
.fin-source-badge {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 0 2px;
}
.fin-source-text {
  font-size: 11px;
  color: var(--text-muted);
}
.fin-source-text svg {
  width: 12px;
  height: 12px;
  vertical-align: -1px;
  margin-right: 3px;
}
.fin-cache-hint {
  font-size: 11px;
  color: var(--text-muted);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 8px;
  margin-left: auto;
  cursor: pointer;
}
.fin-cache-hint:active {
  background: var(--bg-card-hover);
}

/* 一句话结论 */
.fin-conclusion {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-primary);
  text-align: center;
  padding: 14px 16px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  margin-bottom: 16px;
  line-height: 1.6;
}

/* 核心指标网格 */
.fin-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 16px;
}
.fin-metric-item {
  background: var(--bg-card);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  border: 1px solid var(--border);
}
.fin-metric-label {
  font-size: 11px;
  color: var(--text-muted);
}
.fin-metric-value {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}

/* 分析模块卡片 */
.fin-section {
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 14px 16px;
  margin-bottom: 10px;
}
.fin-section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}
.fin-section-title svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}
.fin-section-body {
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.7;
}

/* 主题色 */
.fin-section--conclusion .fin-section-title { color: var(--accent-amber); }
.fin-section--metrics .fin-section-title { color: var(--accent-blue); }
.fin-section--revenue .fin-section-title { color: var(--accent-green); }
.fin-section--profit .fin-section-title { color: var(--accent-cyan); }
.fin-section--management .fin-section-title { color: var(--accent-purple); }
.fin-section--industry .fin-section-title { color: var(--accent-blue); }
.fin-section--moat .fin-section-title { color: var(--accent-amber); }
.fin-section--risk .fin-section-title { color: var(--accent-red); }
.fin-section--valuation .fin-section-title { color: var(--accent-cyan); }

/* 风险模块特殊左边框 */
.fin-section--risk {
  border-left: 3px solid var(--accent-red);
}

/* 管理层信号列表 */
.fin-signal-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.fin-signal-list li {
  position: relative;
  padding-left: 14px;
  margin-bottom: 6px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.6;
}
.fin-signal-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 9px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-purple);
}

/* 免费额度用完 */
.fin-paywall {
  text-align: center;
  padding: 24px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.fin-paywall-icon {
  font-size: 28px;
  margin-bottom: 8px;
  opacity: 0.8;
}
.fin-paywall-title {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 8px;
}
.fin-paywall-desc {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 16px;
}
.fin-paywall-price {
  display: inline-block;
  font-size: 13px;
  padding: 6px 16px;
  background: rgba(245, 158, 11, 0.12);
  color: var(--accent-amber);
  border-radius: 6px;
  font-weight: 500;
}

/* 免责声明 */
.fin-disclaimer {
  margin: 16px 0 0;
  padding: 10px 12px;
  background: rgba(245, 158, 11, 0.06);
  border: 1px solid rgba(245, 158, 11, 0.15);
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* 使用次数 */
.fin-usage {
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 16px;
}

/* 加载骨架 */
.fin-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 40px 20px;
  gap: 8px;
}
.fin-loading-text {
  font-size: 14px;
  color: var(--text-muted);
}

/* 错误状态 */
.fin-error {
  text-align: center;
  padding: 24px;
  background: var(--bg-card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}
.fin-error-icon {
  font-size: 28px;
  margin-bottom: 8px;
  opacity: 0.8;
}
.fin-error-text {
  font-size: 14px;
  color: var(--text-secondary);
}

/* ===== Industry Map (v2 Flow Layout) ===== */
.flow-map {
  padding: 0;
}

.flow-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
  padding: 8px 12px;
  background: var(--bg-secondary);
  border-radius: var(--radius-sm);
  font-size: 11px;
  color: var(--text-muted);
}

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

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

.flow-layer {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 0;
}

.flow-layer-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.flow-stage-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 4px;
  letter-spacing: 0.5px;
}

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

.flow-vitality-note {
  font-size: 11px;
}

.flow-bottleneck-tag {
  font-size: 10px;
  font-weight: 600;
  color: var(--accent-red);
  background: rgba(239,68,68,0.1);
  padding: 2px 8px;
  border-radius: 4px;
}

.flow-nodes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
}

.flow-connector {
  text-align: center;
  color: var(--text-muted);
  font-size: 20px;
  padding: 4px 0;
  margin: 2px 0;
}

.chain-node {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
}

.chain-node:active {
  background: var(--bg-card-hover);
  border-color: var(--accent-blue);
  transform: scale(0.98);
}

.chain-node.node-featured {
  border-width: 2px;
  background: var(--bg-card-hover);
}

.chain-node.node-followed {
  box-shadow: inset 0 0 0 1px var(--accent-amber);
}

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

.chain-node .quote-line {
  min-height: 16px;
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.chain-node .code {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 1px;
}

.chain-node .role {
  font-size: 11px;
  color: var(--accent-blue-light);
  margin-top: 3px;
}

.chain-node .rank-note {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 3px;
  line-height: 1.4;
}

.rank-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: 3px;
}

.bottleneck-note {
  margin-top: 8px;
  padding: 6px 10px;
  background: rgba(239,68,68,0.06);
  border-radius: 4px;
  font-size: 11px;
  color: var(--accent-red);
  line-height: 1.4;
}

.insight-card {
  margin-bottom: 16px !important;
}

.guide-card .guide-content {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.7;
}

.guide-content p {
  margin: 8px 0;
}

.guide-content strong {
  color: var(--text-primary);
}

/* ===== Weekly Report ===== */
.weekly-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}

.weekly-card .date {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.weekly-card .headline {
  font-size: 15px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.weekly-card .body {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ===== Related Articles (推荐阅读) ===== */
.related-articles {
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.related-articles .ra-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--accent-purple);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.related-articles .ra-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.related-articles .ra-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 6px 8px;
  background: rgba(167, 139, 250, 0.06);
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s;
  text-decoration: none;
}

.related-articles .ra-item:active {
  background: rgba(167, 139, 250, 0.12);
}

.related-articles .ra-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent-purple);
  flex-shrink: 0;
  margin-top: 6px;
}

.related-articles .ra-text {
  flex: 1;
  min-width: 0;
}

.related-articles .ra-headline {
  font-size: 12px;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.related-articles .ra-meta {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 2px;
  display: flex;
  gap: 6px;
  align-items: center;
}

.related-articles .ra-column {
  color: var(--accent-purple);
  font-weight: 500;
}

/* 产业级推荐阅读（在层级下方） */
.industry-related {
  margin-top: 16px;
  margin-bottom: 8px;
}

.industry-related .ir-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
}

.industry-related .ir-header span {
  font-size: 14px;
}

.industry-related .ir-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.industry-related .ir-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent-purple);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  cursor: pointer;
  transition: background 0.2s;
}

.industry-related .ir-item:active {
  background: var(--bg-card-hover);
}

.industry-related .ir-num {
  font-size: 14px;
  font-weight: 700;
  color: var(--accent-purple);
  flex-shrink: 0;
  width: 20px;
  text-align: center;
  line-height: 1.4;
}

.industry-related .ir-text {
  flex: 1;
  min-width: 0;
}

.industry-related .ir-headline {
  font-size: 13px;
  color: var(--text-primary);
  font-weight: 500;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.industry-related .ir-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
  display: flex;
  gap: 8px;
  align-items: center;
}

.industry-related .ir-column-tag {
  font-size: 10px;
  font-weight: 500;
  padding: 1px 6px;
  border-radius: 3px;
  background: rgba(167, 139, 250, 0.12);
  color: var(--accent-purple);
}

/* ===== Scrollbar ===== */
::-webkit-scrollbar {
  width: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 2px;
}

/* ===== Responsive ===== */
@media (min-width: 640px) {
  .content {
    max-width: 640px;
    margin: 0 auto;
  }
}

/* ===== Portfolio 页面样式 (pf- 前缀) ===== */
.pf-summary-card { padding: 14px 16px; }
.pf-refresh { color: var(--text-secondary); font-size: 13px; margin-bottom: 10px; }
.pf-grade-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.pf-stat-item { display: flex; align-items: center; gap: 6px; }
.pf-stat-num { font-size: 16px; font-weight: 700; }
.pf-active-hint { font-size: 13px; color: var(--text-secondary); }
.pf-active-section { margin-top: 14px; }
.pf-section-title { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 10px; }
.pf-active-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.pf-active-chip { background: var(--bg-card-hover); border: 1px solid rgba(245,158,11,0.3); border-radius: var(--radius-sm); padding: 10px; cursor: pointer; transition: transform .15s; }
.pf-active-chip:active { transform: scale(0.97); }
.pf-active-name { font-size: 14px; font-weight: 600; color: var(--text-primary); }
.pf-active-score { color: var(--accent-amber); font-size: 12px; }
.pf-active-gains { font-size: 12px; color: var(--text-secondary); margin: 4px 0; }
.pf-active-op { font-size: 11px; color: var(--text-muted); }

.pf-filter-row { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 8px; padding: 0 4px; }
.pf-filter-label { font-size: 12px; color: var(--text-muted); min-width: 32px; padding-top: 6px; }
.pf-filter-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.pf-chip { font-size: 12px; padding: 5px 10px; border-radius: 14px; background: var(--bg-card); color: var(--text-secondary); cursor: pointer; border: 1px solid transparent; }
.pf-chip.active { background: var(--accent-blue); color: #fff; }

.pf-table-wrap { overflow-x: auto; margin-top: 8px; }
.pf-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.pf-table th { position: sticky; top: 0; background: var(--bg-card); color: var(--text-secondary); font-weight: 600; padding: 8px 6px; text-align: right; white-space: nowrap; border-bottom: 1px solid rgba(255,255,255,0.08); }
.pf-table th:first-child { text-align: left; }
.pf-th-sort { cursor: pointer; user-select: none; }
.pf-th-sort:hover { color: var(--accent-blue); }
.pf-table td { padding: 9px 6px; border-bottom: 1px solid rgba(255,255,255,0.04); text-align: right; white-space: nowrap; }
.pf-table td:first-child { text-align: left; }
.pf-row { cursor: pointer; transition: background .12s; }
.pf-row:hover, .pf-row.expanded { background: var(--bg-card-hover); }
.pf-cell-name { font-weight: 600; color: var(--text-primary); }
.pf-cell-code { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.pf-hk { font-size: 10px; background: var(--accent-purple); color: #fff; border-radius: 3px; padding: 0 4px; }
.pf-num { font-variant-numeric: tabular-nums; color: var(--text-primary); }
.pf-up { color: var(--accent-red) !important; font-weight: 600; }
.pf-down { color: var(--accent-green) !important; font-weight: 600; }
.pf-score { font-weight: 700; }
.pf-grade-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }

.pf-detail td { padding: 0 !important; }
.pf-detail-body { padding: 14px 16px; background: var(--bg-card); }
.pf-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.pf-detail-card { background: var(--bg-card-hover); border-radius: var(--radius-sm); padding: 10px; }
.pf-detail-label { font-size: 12px; color: var(--accent-blue); font-weight: 600; margin-bottom: 5px; }
.pf-detail-text { font-size: 13px; color: var(--text-primary); line-height: 1.5; }
.pf-radar { background: var(--bg-card-hover); border-radius: var(--radius-sm); padding: 10px; }
.pf-radar-title { font-size: 12px; color: var(--text-secondary); margin-bottom: 8px; }
.pf-dims { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; text-align: center; }
.pf-dim span { display: block; font-size: 10px; color: var(--text-muted); }
.pf-dim b { font-size: 14px; color: var(--accent-amber); }

.pf-portfolio-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 12px 16px 16px; }
.pf-bucket { background: var(--bg-card-hover); border-radius: var(--radius-sm); padding: 12px; }
.pf-bucket-head { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.pf-bucket-grade { font-size: 12px; color: var(--accent-amber); margin: 4px 0; }
.pf-bucket-desc { font-size: 12px; color: var(--text-secondary); line-height: 1.4; }

/* ===== Portfolio 子tab/入口/组合/深度卡/Top6 补充样式 ===== */
.pf-subtabs { display: flex; gap: 4px; padding: 0 4px 12px; overflow-x: auto; border-bottom: 1px solid rgba(255,255,255,0.06); margin-bottom: 12px; }
.pf-subtab { font-size: 13px; padding: 8px 14px; color: var(--text-secondary); white-space: nowrap; cursor: pointer; border-bottom: 2px solid transparent; }
.pf-subtab.active { color: var(--accent-blue); border-bottom-color: var(--accent-blue); font-weight: 600; }

.pf-entry-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px; }
.pf-entry-card { background: var(--bg-card-hover); border: 1px solid rgba(59,130,246,0.25); border-radius: var(--radius-sm); padding: 14px; cursor: pointer; text-align: center; }
.pf-entry-card:active { transform: scale(0.97); }
.pf-entry-card b { display: block; font-size: 15px; color: var(--text-primary); }
.pf-entry-card span { font-size: 12px; color: var(--text-muted); }

.pf-disc { font-size: 13px; color: var(--text-primary); padding: 6px 16px; line-height: 1.5; border-bottom: 1px solid rgba(255,255,255,0.03); }
.pf-disc:last-child { border-bottom: none; }
.pf-disc b { color: var(--accent-blue); }
.pf-pf-head { font-size: 15px; font-weight: 700; padding: 12px 16px 2px; }
.pf-pf-sub { font-size: 12px; color: var(--text-secondary); padding: 0 16px 10px; }

/* 深度卡 */
.dc-card { margin-bottom: 12px; padding: 0; overflow: hidden; }
.dc-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; background: var(--bg-card-hover); }
.dc-name { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.dc-meta { font-size: 11px; color: var(--text-muted); margin-top: 2px; }
.dc-chg { font-size: 13px; font-weight: 600; color: var(--accent-red); }
.dc-row { padding: 10px 16px; border-top: 1px solid rgba(255,255,255,0.04); }
.dc-row.dc-op { background: rgba(59,130,246,0.05); }
.dc-row.dc-risk .dc-text { color: var(--accent-red); }
.dc-label { font-size: 11px; color: var(--accent-blue); font-weight: 600; margin-bottom: 4px; }
.dc-text { font-size: 13px; color: var(--text-primary); line-height: 1.5; }
.dc-levels { padding: 8px 16px; }
.dc-level { display: flex; justify-content: space-between; padding: 6px 0; font-size: 13px; border-bottom: 1px dashed rgba(255,255,255,0.05); }
.dc-level:last-child { border-bottom: none; }
.dc-level-name { color: var(--text-secondary); }
.dc-level-price { color: var(--accent-amber); font-weight: 700; font-variant-numeric: tabular-nums; }
.dc-level-pos { color: var(--text-muted); font-size: 12px; }

/* Top6 横向表 */
.pf-top6 th { font-size: 12px; }
.pf-top6 td { font-size: 12px; }
.pf-top6-metric { text-align: left !important; color: var(--text-secondary); font-weight: 600; }

/* ===== 重点关注8只 ===== */
.pf-focus-section { margin-bottom: 16px; }
.pf-focus-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.pf-focus-card { background: linear-gradient(135deg, var(--bg-card) 0%, var(--bg-card-hover) 100%); border: 1px solid rgba(245,158,11,0.35); border-radius: var(--radius-sm); padding: 12px; cursor: pointer; transition: transform .15s; }
.pf-focus-card:active { transform: scale(0.97); }
.pf-focus-head { display: flex; justify-content: space-between; align-items: center; }
.pf-focus-name { font-size: 14px; font-weight: 700; color: var(--text-primary); }
.pf-focus-score { font-size: 15px; font-weight: 700; }
.pf-focus-sub { font-size: 11px; color: var(--text-muted); margin: 3px 0 6px; }
.pf-focus-gains { display: flex; gap: 10px; font-size: 11px; font-variant-numeric: tabular-nums; margin-bottom: 4px; flex-wrap: wrap; }
.pf-focus-meta { font-size: 11px; color: var(--text-secondary); margin-bottom: 4px; }
.pf-focus-grade { font-size: 11px; color: var(--text-secondary); }
.pf-star { color: var(--accent-amber); margin-right: 2px; }

/* ===== Portfolio 响应式(平板768+/电脑1024+) ===== */
@media (min-width: 768px) {
  .pf-wide { max-width: 960px; }
  .pf-focus-grid { grid-template-columns: repeat(3, 1fr); }
  .pf-active-grid { grid-template-columns: repeat(4, 1fr); }
  .pf-entry-grid { grid-template-columns: repeat(3, 1fr); }
  .pf-detail-grid { grid-template-columns: repeat(4, 1fr); }
  .pf-portfolio-grid { grid-template-columns: repeat(4, 1fr); }
  .pf-dims { grid-template-columns: repeat(8, 1fr); }
  .pf-table { font-size: 13px; }
  .pf-table th, .pf-table td { padding: 10px 8px; }
}
@media (min-width: 1024px) {
  .pf-wide { max-width: 1280px; }
  .pf-focus-grid { grid-template-columns: repeat(4, 1fr); }
  .pf-active-grid { grid-template-columns: repeat(6, 1fr); }
  .pf-entry-grid { grid-template-columns: repeat(4, 1fr); }
  .pf-subtabs { justify-content: center; }
  .pf-subtab { padding: 10px 20px; font-size: 14px; }
  .pf-summary-card, .dc-card { padding: 16px 20px; }
  .pf-focus-card { padding: 14px; }
  .pf-focus-name { font-size: 15px; }
}
@media (min-width: 1440px) {
  .pf-wide { max-width: 1400px; }
}

/* ===== 深度卡网格(宽屏一行多列) ===== */
.dc-grid { display: grid; gap: 12px; margin-bottom: 12px; }
.dc-grid .dc-card { margin-bottom: 0; }
@media (min-width: 768px) {
  .dc-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1280px) {
  .dc-grid { grid-template-columns: repeat(3, 1fr); }
}
