* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #f8fafd;
  color: #263751;
  min-height: 100vh;
}

/* ── 顶栏 ── */
.topbar {
  background: #f8fafd;
  border-bottom: 1px solid #1e293b;
  padding: 0 24px;
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: sticky;
  top: 0;
  z-index: 100;
}
.logo { font-size: 18px; font-weight: 800; color: #192942; letter-spacing: -.3px; white-space: nowrap; }
.logo span { color: #a65a10; }
.tagline { font-size: 12px; color: #475569; white-space: nowrap; }
.spacer { flex: 1; }

/* ── Tab 切换 ── */
.tab-bar {
  display: flex;
  gap: 4px;
  background: #ffffff;
  border-radius: 10px;
  padding: 4px;
}
.tab-btn {
  padding: 6px 16px;
  font-size: 13px;
  font-weight: 600;
  background: none;
  border: none;
  border-radius: 7px;
  color: #64748b;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.tab-btn.active { background: #f59e0b; color: #0f172a; }
.tab-btn:not(.active):hover { color: #263751; }

/* ── 主区域 ── */
.main { max-width: 860px; margin: 0 auto; padding: 40px 20px 32px; transition: max-width .2s; }
/* 板块/ETF 看板需要宽屏：JS 切到这个 Tab 时给 body 加 .wide */
body.wide .main { max-width: min(1680px, 96vw); padding-left: 32px; padding-right: 32px; }

/* ── 搜索卡 ── */
.search-card {
  background: #ffffff;
  border: 1px solid #334155;
  border-radius: 16px;
  padding: 28px 28px 20px;
  margin-bottom: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.hero-text { text-align: center; margin-bottom: 22px; }
.hero-text h1 { font-size: 22px; font-weight: 800; color: #192942; margin-bottom: 6px; }
.hero-text p  { font-size: 13px; color: #64748b; }

/* 搜索行 */
.search-row { display: flex; gap: 10px; position: relative; margin-bottom: 14px; }
.input-wrap  { flex: 1; position: relative; }
.search-input {
  width: 100%; padding: 13px 18px; font-size: 15px;
  background: #f8fafd; border: 2px solid #334155; border-radius: 10px;
  color: #263751; outline: none; transition: border-color .2s;
}
.search-input::placeholder { color: #475569; }
.search-input:focus { border-color: #f59e0b; }
.query-btn {
  padding: 0 28px; font-size: 14px; font-weight: 700;
  background: #f59e0b; color: #0f172a; border: none; border-radius: 10px;
  cursor: pointer; transition: background .2s, transform .1s;
  white-space: nowrap; height: 48px; min-width: 90px;
}
.query-btn:hover  { background: #fbbf24; }
.query-btn:active { transform: scale(.98); }
.query-btn:disabled { background: #78350f; color: #9a5d12; cursor: not-allowed; transform: none; }

/* 自动补全 */
.ac-dropdown {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0;
  background: #ffffff; border: 1px solid #334155; border-radius: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.4); z-index: 200;
  max-height: 260px; overflow-y: auto; display: none;
}
.ac-dropdown.show { display: block; }
.ac-item {
  padding: 9px 16px; cursor: pointer; border-bottom: 1px solid #0f172a;
  display: flex; justify-content: space-between; align-items: center;
  transition: background .12s;
}
.ac-item:last-child { border-bottom: none; }
.ac-item:hover, .ac-item.active { background: #334155; }
.ac-name { font-size: 13px; font-weight: 600; color: #263751; }
.ac-code { font-size: 11px; color: #64748b; font-family: monospace; margin-left: 6px; }
.ac-type { font-size: 10px; padding: 1px 7px; border-radius: 7px; background: #f8fafd; color: #64748b; }
.ac-empty { padding: 10px 16px; color: #475569; font-size: 12px; text-align: center; }

/* 快捷按钮 */
.quick-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.quick-label { font-size: 12px; color: #475569; }
.quick-btn {
  padding: 4px 12px; font-size: 12px; background: #f8fafd; color: #64748b;
  border: 1px solid #1e293b; border-radius: 20px; cursor: pointer; transition: all .15s;
}
.quick-btn:hover { background: #ffffff; color: #a65a10; border-color: #f59e0b; }

/* ── 对比搜索区 ── */
.compare-card {
  background: #ffffff; border: 1px solid #334155; border-radius: 16px;
  padding: 28px 28px 20px; margin-bottom: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.4);
}
.compare-card .hero-text h1 { font-size: 20px; }
.compare-inputs { display: flex; flex-direction: column; gap: 10px; margin-bottom: 16px; }
.compare-input-row { display: flex; align-items: center; gap: 10px; }
.cmp-label {
  font-size: 12px; font-weight: 700; color: #64748b; width: 56px; flex-shrink: 0;
  text-align: right;
}
.compare-btn {
  width: 100%; padding: 13px; font-size: 14px; font-weight: 700;
  background: #3b82f6; color: #192942; border: none; border-radius: 10px;
  cursor: pointer; transition: background .2s;
}
.compare-btn:hover { background: #2563eb; }
.compare-btn:disabled { background: #1e3a5f; color: #64748b; cursor: not-allowed; }
.add-stock-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 9px; font-size: 13px; color: #3b82f6;
  background: none; border: 1px dashed #334155; border-radius: 8px;
  cursor: pointer; transition: all .15s;
}
.add-stock-btn:hover { border-color: #3b82f6; background: rgba(59,130,246,.06); }
.remove-btn {
  width: 24px; height: 24px; border-radius: 50%; background: #334155;
  border: none; color: #64748b; cursor: pointer; font-size: 14px;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
  transition: all .15s;
}
.remove-btn:hover { background: #ef4444; color: #192942; }

/* ── 状态 ── */
.error-box {
  background: #f8fafd; border: 1px solid #7f1d1d; color: #fca5a5;
  padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 13px; display: none;
}
.error-box.show { display: block; }
.loading-box { display: none; text-align: center; padding: 48px; }
.loading-box.show { display: block; }
.spinner {
  width: 36px; height: 36px; border: 3px solid #334155; border-top-color: #f59e0b;
  border-radius: 50%; animation: spin .8s linear infinite; margin: 0 auto 12px;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 13px; color: #64748b; }

/* ── 单股报告 ── */
.report-wrap { display: none; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 24px 80px rgba(0,0,0,.5); max-width: 1340px; margin: 0 auto; }
.report-wrap.show { display: block; }
.report-frame { width: 100%; max-width: 1320px; border: none; display: block; margin: 0 auto; min-height: 400px; }

/* ── 对比表格 ── */
.compare-result { display: none; }
.compare-result.show { display: block; }

.cmp-table-wrap {
  background: #ffffff; border: 1px solid #334155; border-radius: 16px;
  overflow: hidden; box-shadow: 0 24px 80px rgba(0,0,0,.5);
}
.cmp-header-row {
  display: grid;
  border-bottom: 2px solid #334155;
}
.cmp-label-cell {
  background: #f8fafd; padding: 14px 16px;
  font-size: 11px; font-weight: 700; color: #475569;
  text-transform: uppercase; letter-spacing: .6px;
  border-right: 1px solid #334155;
}
.cmp-stock-cell {
  padding: 16px 18px; border-right: 1px solid #1e293b;
  min-width: 0;
}
.cmp-stock-cell:last-child { border-right: none; }

/* 总分区 */
.cmp-score-row { display: grid; border-bottom: 1px solid #334155; }
.cmp-score-cell { padding: 16px 18px; border-right: 1px solid #1e293b; }
.cmp-score-cell:last-child { border-right: none; }
.cmp-score-num { font-size: 40px; font-weight: 900; line-height: 1; margin-bottom: 6px; }
.cmp-grade { display: inline-block; padding: 3px 12px; border-radius: 14px; font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.cmp-pos { font-size: 11px; color: #64748b; }

/* 通用数据行 */
.cmp-data-row { display: grid; border-bottom: 1px solid #1e293b; }
.cmp-data-row:last-child { border-bottom: none; }
.cmp-data-row:hover .cmp-data-cell { background: rgba(255,255,255,.02); }
.cmp-data-label {
  padding: 9px 16px; font-size: 12px; color: #64748b; font-weight: 600;
  background: #f8fafd; border-right: 1px solid #334155;
  display: flex; align-items: center;
}
.cmp-data-cell {
  padding: 9px 18px; font-size: 13px; color: #263751; border-right: 1px solid #1e293b;
  display: flex; align-items: center; gap: 8px;
  transition: background .1s;
}
.cmp-data-cell:last-child { border-right: none; }

/* 模块分数行 */
.cmp-mod-label {
  padding: 9px 16px; font-size: 12px; color: #64748b; font-weight: 600;
  background: #f8fafd; border-right: 1px solid #334155;
  display: flex; align-items: center; gap: 6px;
}
.cmp-mod-cell {
  padding: 9px 18px; border-right: 1px solid #1e293b;
  display: flex; align-items: center; gap: 10px;
}
.cmp-mod-cell:last-child { border-right: none; }
.cmp-mod-bar-wrap { flex: 1; height: 5px; background: #334155; border-radius: 3px; overflow: hidden; }
.cmp-mod-bar { height: 100%; border-radius: 3px; transition: width .3s; }
.cmp-mod-score { font-size: 12px; font-weight: 700; white-space: nowrap; }

/* 信号命中 */
.cmp-hits-section { padding: 12px 16px 0; }
.cmp-section-title { font-size: 11px; font-weight: 700; color: #475569; text-transform: uppercase; letter-spacing: .6px; margin-bottom: 10px; padding: 12px 16px 0; }
.cmp-hits-row { display: grid; border-top: 2px solid #334155; }
.cmp-hits-label {
  padding: 12px 16px; background: #f8fafd; border-right: 1px solid #334155;
  font-size: 12px; color: #64748b; font-weight: 600; min-width: 0;
}
.cmp-hits-cell {
  padding: 12px 18px; border-right: 1px solid #1e293b; min-width: 0;
}
.cmp-hits-cell:last-child { border-right: none; }
.hit-chip {
  display: inline-flex; align-items: center; gap: 4px; margin: 2px 3px 2px 0;
  padding: 3px 9px; border-radius: 5px; font-size: 11px; font-weight: 600;
}
.hit-chip.trend    { background: rgba(239,68,68,.15);  color: #c83d4b; }
.hit-chip.volume   { background: rgba(16,185,129,.15); color: #168263; }
.hit-chip.momentum { background: rgba(59,130,246,.15); color: #2058a5; }
.hit-chip.risk     { background: rgba(139,92,246,.15); color: #6954a5; }

/* 最佳/最差标记 */
.best  { color: #10b981; }
.worst { color: #ef4444; }

/* 分隔区标题 */
.cmp-section-header {
  padding: 10px 16px;
  background: #f8fafd;
  border-bottom: 1px solid #334155;
  border-top: 2px solid #334155;
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: .6px;
}

/* 颜色等级 */
.g-green  { background: #d1fae5; color: #065f46; }
.g-yellow { background: #fef3c7; color: #92400e; }
.g-orange { background: #fed7aa; color: #9a3412; }
.g-red    { background: #fee2e2; color: #991b1b; }

/* 响应式 */
@media (max-width: 640px) {
  .main { padding: 20px 12px 20px; }
  .search-card, .compare-card { padding: 20px 14px 16px; }
  .hero-text h1 { font-size: 18px; }
  .tab-btn { padding: 6px 12px; font-size: 12px; }
  .topbar { padding: 0 14px; }
  .tagline { display: none; }
  .cmp-score-num { font-size: 30px; }
}

/* ════════════════════════════════════════
   板块看板 CSS  v2 - 现代化重构
════════════════════════════════════════ */
#paneSector { padding: 24px 0; }

/* —— 工具栏 —— */
.sec-toolbar {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 20px; flex-wrap: wrap;
  padding: 14px 18px;
  background: linear-gradient(135deg, #1e293b 0%, #1a2540 100%);
  border: 1px solid #334155; border-radius: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,.25);
}
.sec-toolbar-title {
  font-size: 16px; font-weight: 800; color: #192942; flex: 1;
  display: flex; align-items: center; gap: 8px;
  letter-spacing: .3px;
}
.sec-toolbar-title .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: #22c55e; box-shadow: 0 0 8px #22c55e;
  animation: pulseDot 2s ease-in-out infinite;
}
@keyframes pulseDot { 0%,100%{opacity:1} 50%{opacity:.4} }
.sec-btn {
  padding: 7px 16px; font-size: 13px; font-weight: 600;
  border: none; border-radius: 8px; cursor: pointer;
  transition: all .15s ease;
}
.sec-btn-primary {
  background: linear-gradient(135deg, #f59e0b, #fb923c);
  color: #0f172a; box-shadow: 0 2px 8px rgba(245,158,11,.3);
}
.sec-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(245,158,11,.45);
}
.sec-btn-ghost {
  background: #f8fafd; color: #64748b;
  border: 1px solid #334155;
}
.sec-btn-ghost:hover {
  color: #263751; border-color: #e2e8f1; background: #f8fafd;
}
.sec-btn-active {
  background: rgba(34,197,94,.13);
  color: #22c55e; border-color: #22c55e;
}
.sec-btn-sm { padding: 5px 11px; font-size: 12px; }
.sec-market-select {
  background: #f8fafd; color: #53627a; border: 1px solid #334155;
  border-radius: 8px; padding: 6px 10px; font-size: 12px; cursor: pointer;
}
.sec-market-select:focus { outline: none; border-color: #f59e0b; }
.board-hint {
  margin: -4px 0 12px;
  padding: 9px 12px;
  border: 1px solid rgba(51,65,85,.9);
  border-radius: 10px;
  background: #f4f7fb;
  color: #64748b;
  font-size: 12px;
  line-height: 1.6;
}
.stock-report-link {
  color: #2058a5;
  text-decoration: none;
  border-bottom: 1px dashed rgba(96,165,250,.38);
}
.stock-report-link:hover {
  color: #2058a5;
  border-bottom-color: #93c5fd;
}
.metric-code {
  font-family: 'SF Mono', Menlo, monospace;
  color: #64748b;
}
.nowrap { white-space: nowrap; }
.sec-source-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border: 1px solid rgba(34,197,94,.35);
  border-radius: 999px;
  background: rgba(34,197,94,.10);
  color: #86efac;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.5;
}

/* —— 等级徽章 —— */
.sec-badge {
  display: inline-block; padding: 3px 10px; border-radius: 20px;
  font-size: 11px; font-weight: 700; letter-spacing: .3px;
}
.sec-badge-high   { background: linear-gradient(135deg, #dc2626, #ef4444); color: #192942; }
.sec-badge-mid    { background: linear-gradient(135deg, #d97706, #f59e0b); color: #192942; }
.sec-badge-low    { background: linear-gradient(135deg, #16a34a, #22c55e); color: #192942; }
.sec-badge-weak   { background: #334155; color: #64748b; }
.sec-badge-etf    { background: #1e40af; color: #bfdbfe; }
.sec-up   { color: #c83d4b; }
.sec-dn   { color: #168263; }
.sec-flat { color: #64748b; }

/* —— 总览表 —— */
.sec-overview-wrap {
  background: #ffffff;
  border: 1px solid #334155;
  border-radius: 14px;
  overflow-x: auto;            /* 关键：允许横向滚动 */
  overflow-y: visible;
  margin-bottom: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
}
.sec-overview-wrap::-webkit-scrollbar { height: 8px; }
.sec-overview-wrap::-webkit-scrollbar-track { background: #f8fafd; }
.sec-overview-wrap::-webkit-scrollbar-thumb {
  background: #334155; border-radius: 4px;
}
.sec-overview-wrap::-webkit-scrollbar-thumb:hover { background: #475569; }

.sec-overview-table {
  width: 100%; border-collapse: collapse; font-size: 12.5px;
  min-width: 1380px;            /* 6 引擎列 + 排序列要更宽 */
}
.sec-overview-table th {
  background: #f8fafd; color: #64748b;
  font-weight: 600; font-size: 11.5px; letter-spacing: .3px;
  padding: 12px 10px; text-align: left;
  white-space: nowrap;
  border-bottom: 2px solid #334155;
  text-transform: uppercase;
  /* 2026-07-17: 表头在滚动容器内固定,容器已加 max-height */
  position: sticky; top: 0; z-index: 40;
}
.sec-overview-table th.sortable { cursor: pointer; user-select: none; transition: color .15s; }
.sec-overview-table th.sortable:hover { color: #a65a10; }
.sec-overview-table th.sorted-asc, .sec-overview-table th.sorted-desc { color: #a65a10; }
.sec-overview-table th.eng-col {
  text-align: center; padding: 12px 6px; min-width: 44px;
  font-size: 11px; color: #53627a;
}
.sec-overview-table td.eng-cell {
  padding: 6px 4px; text-align: center;
}
/* 单个引擎徽块：颜色随强度变化，主推会加圈 */
.eng-pip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 34px; padding: 3px 7px;
  border-radius: 999px; font-size: 11.5px; font-weight: 800;
  font-family: 'SF Mono', Menlo, monospace;
  background: #f4f7fb; color: #64748b;
  border: 1px solid rgba(148,163,184,.18);
}
.eng-pip.s-fire    { background: rgba(251,191,36,.18); color: #a65a10; border-color: rgba(251,191,36,.50); box-shadow: 0 0 0 1px rgba(251,191,36,.18) inset; }
.eng-pip.s-strong  { background: rgba(52,211,153,.14); color: #168263; border-color: rgba(52,211,153,.35); }
.eng-pip.s-mid     { background: rgba(147,197,253,.08); color: #2058a5; border-color: rgba(147,197,253,.20); }
.eng-pip.s-weak    { background: rgba(100,116,139,.06); color: #64748b; border-color: transparent; }
.eng-pip.dominant  { box-shadow: 0 0 0 1px rgba(251,191,36,.6), 0 0 14px rgba(251,191,36,.18); }
.sec-overview-table td {
  padding: 9px 14px;
  border-bottom: 1px solid rgba(30,41,59,.6);
  white-space: nowrap; vertical-align: middle;
}
.sec-overview-table tr:last-child td { border-bottom: none; }
.sec-overview-table tbody tr.sec-row-expand:hover td {
  background: rgba(245,158,11,.06);
}
.sec-row-expand { cursor: pointer; transition: background .15s; }
.sec-row-open   td:first-child { color: #a65a10; }
.sec-row-detail td { padding: 0; background: #f8fafd; }
.sec-detail-panel {
  padding: 0; display: none;
  border-top: 2px solid #1e293b;
  border-bottom: 2px solid #1e293b;
  background: #f8fafd;
}
.sec-detail-panel.open { display: block; padding: 18px 22px; }

/* —— 详情面板 Tab —— */
.sec-tab-bar {
  display: flex; gap: 4px; margin-bottom: 16px;
  background: #ffffff; border-radius: 10px;
  padding: 4px; width: fit-content;
}
.sec-tab-btn {
  padding: 7px 16px; font-size: 12.5px; font-weight: 600;
  background: none; border: none; border-radius: 7px;
  color: #64748b; cursor: pointer; transition: all .15s;
}
.sec-tab-btn:hover:not(.active) { color: #53627a; background: rgba(255,255,255,.03); }
.sec-tab-btn.active {
  background: linear-gradient(135deg, #334155, #475569);
  color: #192942;
  box-shadow: 0 2px 8px rgba(0,0,0,.2);
}
.sec-tab-btn .badge {
  display: inline-block; margin-left: 6px; padding: 1px 6px;
  background: #f59e0b; color: #0f172a; border-radius: 8px;
  font-size: 10px; font-weight: 700;
}

/* —— 子表 —— */
.sec-sub-table {
  width: 100%; border-collapse: collapse; font-size: 12px;
  background: #f8fafd; border-radius: 8px; overflow: hidden;
}
.sec-sub-table th {
  color: #64748b; font-weight: 600; padding: 8px 10px;
  text-align: left; background: #ffffff;
  border-bottom: 1px solid #334155;
  font-size: 11px; letter-spacing: .3px;
}
.sec-sub-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(30,41,59,.5);
  color: #53627a;
}
.sec-sub-table tr:last-child td { border-bottom: none; }
.sec-sub-table tbody tr:hover td { background: rgba(255,255,255,.02); }

/* —— 景气条 —— */
.pros-bar-wrap { display: flex; align-items: center; gap: 8px; min-width: 110px; }
.pros-bar-bg {
  flex: 1; height: 6px; background: #f8fafd;
  border-radius: 3px; overflow: hidden;
}
.pros-bar-fill {
  height: 100%; border-radius: 3px;
  transition: width .4s ease-out;
  box-shadow: 0 0 6px currentColor;
}

/* —— 引擎分布行 —— */
.engine-dist { display: flex; gap: 4px; flex-wrap: wrap; }
.eng-chip {
  padding: 2px 8px; font-size: 10.5px;
  border-radius: 10px;
  background: #ffffff; border: 1px solid #334155;
  color: #64748b; white-space: nowrap;
}
.eng-chip.dominant {
  background: linear-gradient(135deg, #78350f, #92400e);
  border-color: #f59e0b; color: #9a5d12;
  box-shadow: 0 0 6px rgba(245,158,11,.3);
}

/* —— 涨跌幅紧凑列 —— */
.chg-compact {
  display: inline-flex; gap: 6px; font-family: 'SF Mono', Menlo, monospace;
  font-size: 11.5px;
}
.chg-compact span { min-width: 50px; text-align: right; }

/* —— 板块名称 —— */
.sec-name-cell { display: flex; align-items: center; gap: 8px; }
.sec-expand-icon {
  color: #64748b; font-size: 11px; transition: transform .2s;
  display: inline-block;
}
.sec-row-open .sec-expand-icon { transform: rotate(90deg); color: #a65a10; }

/* —— 空状态 —— */
.sec-empty { text-align: center; padding: 56px 20px; color: #475569; }
.sec-empty .icon { font-size: 42px; margin-bottom: 12px; opacity: .6; }

/* —— Loading —— */
.sec-loading-row td { text-align: center; padding: 32px; color: #64748b; }

/* —— 维护区 —— */
.sec-manage-wrap { margin-top: 16px; }
.sec-manage-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}
.sec-manage-card {
  background: linear-gradient(135deg, #1e293b, #1a2540);
  border: 1px solid #334155; border-radius: 12px;
  padding: 14px 16px; transition: all .2s;
}
.sec-manage-card:hover {
  border-color: #e2e8f1; transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0,0,0,.3);
}
.sec-manage-card-title { font-size: 14px; font-weight: 700; color: #192942; margin-bottom: 10px; }
.sec-manage-card-body { font-size: 12px; color: #64748b; margin-bottom: 10px; line-height: 1.7; }
.sec-manage-card-actions { display: flex; gap: 6px; }

/* —— Modal —— */
.sec-modal-bg {
  position: fixed; inset: 0; background: #f4f7fb;
  z-index: 500; display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(4px);
}
.sec-modal {
  background: #ffffff; border: 1px solid #334155;
  border-radius: 16px;
  width: min(560px, 96vw); max-height: 90vh; overflow-y: auto;
  padding: 24px; position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,.5);
}
.sec-modal-title { font-size: 17px; font-weight: 800; color: #192942; margin-bottom: 18px; }
.sec-modal label { display: block; font-size: 12px; color: #64748b; margin-bottom: 4px; margin-top: 12px; }
.sec-modal input, .sec-modal select {
  width: 100%; padding: 8px 12px; font-size: 13px;
  background: #f8fafd; border: 1px solid #334155; border-radius: 8px;
  color: #263751; outline: none;
}
.sec-modal textarea {
  width: 100%; padding: 8px 12px; font-size: 13px;
  background: #f8fafd; border: 1px solid #334155; border-radius: 8px;
  color: #263751; outline: none; resize: vertical; font-family: inherit;
}
.sec-modal input:focus,
.sec-modal textarea:focus { border-color: #f59e0b; }
.sec-members-list { margin-top: 6px; display: flex; flex-direction: column; gap: 6px; }
.sec-member-row { display: flex; gap: 6px; align-items: center; }
.sec-member-row input { flex: 1; }
.sec-del-btn {
  padding: 5px 10px; background: #f8fafd; color: #fca5a5; border: none;
  border-radius: 6px; cursor: pointer; font-size: 12px; flex-shrink: 0;
}
.sec-modal-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* ── sec-board-card / sec-table 自选股样式 ── */
.sec-board-card {
  background: #ffffff;
  border: 1px solid #334155;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 8px 28px rgba(0,0,0,.22);
}

.sec-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  color: #53627a;
}

.sec-table th {
  background: #f8fafd;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
  padding: 9px 10px;
  border-bottom: 1px solid #334155;
  text-align: left;
  white-space: nowrap;
  /* 2026-07-17: 表头在滚动容器内固定,容器已加 max-height */
  position: sticky;
  top: 0;
  z-index: 40;
}

.sec-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(30,41,59,.75);
  vertical-align: middle;
}

.sec-table tbody tr:hover td {
  background: rgba(255,255,255,.025);
}

/* ════════════════════════════════════════
   UI Polish Patch — CSS 变量 + 整体质感提升
════════════════════════════════════════ */

:root {
  --bg-main: #0f172a;
  --bg-soft: #111c31;
  --bg-card: #1e293b;
  --bg-card-2: #172033;
  --bg-deep: #020617;

  --border: #334155;
  --border-soft: rgba(148, 163, 184, .16);

  --text-main: #e2e8f0;
  --text-muted: #94a3b8;
  --text-faint: #64748b;

  --primary: #f59e0b;
  --primary-soft: rgba(245,158,11,.12);
  --blue: #3b82f6;
  --green: #22c55e;
  --red: #ef4444;
  --purple: #8b5cf6;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --shadow-card: 0 12px 36px rgba(0,0,0,.28);
  --shadow-hover: 0 16px 48px rgba(0,0,0,.38);
}

body {
  background:
    radial-gradient(circle at 20% -10%, rgba(59,130,246,.16), transparent 30%),
    radial-gradient(circle at 80% 0%, rgba(245,158,11,.12), transparent 30%),
    var(--bg-main);
  color: var(--text-main);
}

/* 顶栏增强 */
.topbar {
  background: #f4f7fb;
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(148,163,184,.12);
  box-shadow: 0 8px 26px rgba(0,0,0,.18);
}

/* Tab 横向滚动，避免小屏撑爆 */
.tab-bar {
  overflow-x: auto;
  scrollbar-width: none;
}
.tab-bar::-webkit-scrollbar { display: none; }

.tab-btn { position: relative; }
.tab-btn.active { box-shadow: 0 2px 10px rgba(245,158,11,.35); }

/* 主卡片统一质感 */
.search-card,
.compare-card,
.sec-toolbar,
.sec-overview-wrap,
.sec-opp-board,
.sec-imp-board,
.cmp-table-wrap,
.sec-board-card {
  background: linear-gradient(180deg, rgba(30,41,59,.98), rgba(17,28,49,.98));
  border: 1px solid var(--border-soft);
  box-shadow: var(--shadow-card);
}

/* 搜索框增强 */
.search-input {
  background: #f4f7fb;
  border-color: rgba(148,163,184,.2);
}
.search-input:hover { border-color: rgba(148,163,184,.35); }
.search-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(245,158,11,.12);
}

/* 主按钮增强 */
.query-btn,
.sec-btn-primary,
.compare-btn {
  background: linear-gradient(135deg, #f59e0b, #fb923c);
  box-shadow: 0 6px 16px rgba(245,158,11,.24);
}
.query-btn:hover,
.sec-btn-primary:hover,
.compare-btn:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

/* 表格增强：表头 sticky */
.sec-overview-table th,
.sec-table th {
  position: sticky;
  top: 0;
  z-index: 5;
}

.sec-overview-table tbody tr:hover td {
  background: rgba(245,158,11,.045);
}

.sec-overview-table td,
.sec-table td {
  border-bottom: 1px solid rgba(148,163,184,.08);
}

/* board card 增强 */
.board-card {
  border-color: rgba(148,163,184,.14);
  background: linear-gradient(180deg, rgba(15,23,42,.96), rgba(8,13,24,.98));
  box-shadow: 0 8px 26px rgba(0,0,0,.22);
}
.board-card:hover {
  border-color: var(--board-color, #3b82f6);
  box-shadow:
    0 12px 34px rgba(0,0,0,.38),
    0 0 0 1px rgba(59,130,246,.3);
}

/* 自动补全更现代 */
.ac-dropdown {
  background: #f4f7fb;
  backdrop-filter: blur(12px);
  border-color: rgba(148,163,184,.22);
}
.ac-item:hover,
.ac-item.active {
  background: rgba(245,158,11,.1);
}

/* Modal 优化 */
.sec-modal {
  background:
    radial-gradient(circle at top left, rgba(245,158,11,.08), transparent 35%),
    #1e293b;
  border-color: rgba(148,163,184,.2);
}
.sec-modal input:focus,
.sec-modal textarea:focus,
.sec-modal select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(245,158,11,.12);
}

/* 移动端优化 */
@media (max-width: 768px) {
  .topbar {
    gap: 8px;
    overflow-x: auto;
  }
  .logo { font-size: 16px; }
  .main { padding-top: 24px; }
  body.wide .main {
    padding-left: 12px;
    padding-right: 12px;
    max-width: 100vw;
  }
  .search-row { flex-direction: column; }
  .query-btn { width: 100%; }
  .sec-toolbar { align-items: stretch; }
  .sec-toolbar-title { width: 100%; flex-basis: 100%; }
  .sec-btn,
  .sec-market-select { flex: 1; }
}



/* —— 详情面板内部布局 —— */
.sec-detail-head {
  display: flex; align-items: center; gap: 16px;
  padding-bottom: 12px; margin-bottom: 14px;
  border-bottom: 1px solid #1e293b;
}
.sec-detail-head .name {
  font-size: 16px; font-weight: 800; color: #192942;
  display: flex; align-items: center; gap: 8px;
}
.sec-detail-head .meta {
  display: flex; gap: 12px; font-size: 11.5px; color: #64748b;
  margin-left: auto;
}
.sec-detail-head .meta b { color: #53627a; font-weight: 600; }

.sec-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px; margin-bottom: 14px;
}
.sec-kpi {
  background: #ffffff; border: 1px solid #334155;
  border-radius: 10px; padding: 10px 12px;
}
.sec-kpi .label {
  font-size: 10.5px; color: #64748b;
  letter-spacing: .3px; text-transform: uppercase;
  margin-bottom: 4px;
}
.sec-kpi .value {
  font-size: 17px; font-weight: 800;
  font-family: 'SF Mono', Menlo, monospace;
}

/* —— L2/L3 子赛道卡片 —— */
.sub-sector-card {
  background: linear-gradient(180deg, #1a2540 0%, #1e293b 100%);
  border: 1px solid #334155; border-radius: 12px;
  margin-bottom: 12px; overflow: hidden;
  transition: border-color .15s;
}
.sub-sector-card:hover { border-color: #e2e8f1; }
.sub-sector-card.is-l2 { border-left: 3px solid #8b5cf6; }
.sub-sector-card.is-l3 { border-left: 3px solid #06b6d4; }

.sub-sector-head {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; cursor: pointer;
  user-select: none;
  transition: background .12s;
}
.sub-sector-head:hover { background: rgba(255,255,255,.02); }
.sub-sector-head .lvl-tag {
  font-size: 9.5px; font-weight: 800; letter-spacing: .5px;
  padding: 2px 7px; border-radius: 4px;
}
.lvl-tag.l2 { background: #4c1d95; color: #ddd6fe; }
.lvl-tag.l3 { background: #155e75; color: #a5f3fc; }
.sub-sector-head .name {
  font-size: 13.5px; font-weight: 700; color: #263751;
  flex: 1;
}
.sub-sector-head .pros-pill {
  font-size: 13px; font-weight: 800;
  padding: 3px 10px; border-radius: 8px;
  background: #f8fafd;
  font-family: 'SF Mono', Menlo, monospace;
  min-width: 48px; text-align: center;
}
.sub-sector-head .stat {
  font-size: 11.5px; color: #64748b;
  font-family: 'SF Mono', Menlo, monospace;
}
.sub-sector-head .name {
  flex: 0 1 auto; min-width: 80px;
}
/* 引擎徽块（卡头里的小尺寸） */
.eng-chips-inline { display: inline-flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.eng-chip-mini {
  display: inline-flex; align-items: center; gap: 3px;
  background: #f8fafd; color: #53627a;
  padding: 2px 7px; border-radius: 6px;
  font-size: 10.5px; line-height: 1.3;
  border: 1px solid #1f2937;
}
.eng-chip-mini b { color: #a65a10; font-weight: 700; font-family: 'SF Mono', Menlo, monospace; }
.eng-chip-mini.is-dom {
  background: linear-gradient(135deg, #422006, #1e293b);
  border-color: #f59e0b;
  color: #9a5d12;
}
.eng-chip-mini.is-dom b { color: #9a5d12; }

/* 详情面板 - 引擎大徽块行 */
.eng-row {
  background: #f8fafd; border: 1px solid #1f2937;
  border-radius: 10px; padding: 10px 14px; margin: 8px 0 12px;
}
.eng-row-label { font-size: 11px; color: #64748b; margin-bottom: 6px; }
.eng-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.eng-chip {
  background: #f8fafd; color: #53627a;
  padding: 4px 10px; border-radius: 8px;
  font-size: 12px; border: 1px solid #1f2937;
}
.eng-chip b { color: #a65a10; font-weight: 700; font-family: 'SF Mono', Menlo, monospace; margin-left: 3px; }
.eng-chip.is-dom {
  background: linear-gradient(135deg, #422006, #1e293b);
  border-color: #f59e0b;
  color: #9a5d12;
}
.eng-chip.is-dom b { color: #9a5d12; }

.delta-row {
  background: #f8fafd; border-radius: 8px;
  padding: 8px 12px; margin-bottom: 10px;
  font-size: 12px; color: #64748b;
}

.sec-section-title {
  font-size: 12.5px; color: #64748b; font-weight: 600;
  margin: 14px 0 6px;
  border-left: 3px solid #f59e0b; padding-left: 8px;
}

/* 个股表（紧凑、引擎列宽度优化） */
.stocks-table th, .stocks-table td {
  white-space: nowrap;
  font-size: 11.5px;
}
.stocks-table th { color: #64748b; }
.sub-sector-head .icon {
  color: #475569; font-size: 11px; transition: transform .2s;
}
.sub-sector-card.open .sub-sector-head .icon { transform: rotate(90deg); color: #a65a10; }
.sub-sector-body {
  display: none; padding: 0 16px 16px;
  border-top: 1px dashed #334155;
}
.sub-sector-card.open .sub-sector-body { display: block; }

/* —— 🌟 今日机会榜 —— */
.sec-opp-board {
  background: linear-gradient(135deg, rgba(245,158,11,.05), rgba(124,58,237,.04));
  border: 1px solid #334155;
  border-radius: 14px; padding: 18px 20px;
  margin-bottom: 20px;
}
.sec-opp-head { margin-bottom: 14px; }
.sec-opp-head .title {
  font-size: 16px; font-weight: 800; color: #a65a10; letter-spacing: .5px;
}
.sec-opp-head .sub {
  font-size: 11.5px; color: #64748b; margin-top: 2px;
}
.sec-opp-head .filter-bar {
  display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px;
}
.opp-tab {
  background: #f8fafd; border: 1px solid #334155; color: #64748b;
  border-radius: 6px; padding: 4px 10px; font-size: 11.5px;
  cursor: pointer; transition: all .15s;
}
.opp-tab:hover { color: #a65a10; border-color: #f59e0b; }
.opp-tab.active { background: #f59e0b; color: #0f172a; border-color: #f59e0b; font-weight: 700; }
.sec-opp-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}
.opp-card {
  background: #f8fafd; border: 1px solid #1e293b;
  border-radius: 10px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 6px;
  cursor: pointer; transition: all .15s;
  position: relative; overflow: hidden;
}
.opp-card:hover { border-color: #f59e0b; transform: translateY(-1px); }
.opp-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--opp-color, #f59e0b);
}
.opp-card .row1 { display: flex; align-items: center; gap: 8px; }
.opp-card .name {
  font-size: 13.5px; font-weight: 700; color: #263751; flex: 1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.opp-card .lvl-mini {
  font-size: 9.5px; padding: 1px 5px; border-radius: 4px;
  background: #ffffff; color: #64748b; font-weight: 700;
}
.opp-card .pros-mini {
  font-size: 17px; font-weight: 900; font-family:'SF Mono',Menlo,monospace;
  color: var(--opp-color, #f59e0b); line-height: 1;
}
.opp-card .triggers {
  display: flex; gap: 5px; flex-wrap: wrap;
}
.opp-card .trig {
  background: #f8fafd; color: #a65a10; border: 1px solid rgba(251,191,36,.4);
  border-radius: 5px; padding: 1px 6px; font-size: 10.5px; font-weight: 700;
}
.opp-card .meta {
  font-size: 11px; color: #64748b; display: flex; gap: 10px;
}
.opp-card .meta .v.pos { color: #c83d4b; }
.opp-card .meta .v.neg { color: #168263; }
.opp-card .path-hint {
  font-size: 10px; color: #64748b; font-style: italic;
}

/* —— 📈 改善榜 —— */
.sec-imp-board {
  background: linear-gradient(135deg, rgba(34,197,94,.04), rgba(59,130,246,.04));
  border: 1px solid #1e3a5f;
  border-radius: 14px; padding: 18px 20px;
  margin-bottom: 20px;
}
.sec-imp-head { margin-bottom: 14px; }
.sec-imp-head .title {
  font-size: 16px; font-weight: 800; color: #2058a5; letter-spacing: .5px;
}
.sec-imp-head .title-sub { font-size: 11px; color: #64748b; font-weight: 400; margin-left: 6px; }
.sec-imp-head .sub { font-size: 11.5px; color: #64748b; margin-top: 2px; }
.sec-imp-head .filter-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.imp-tab {
  background: #f8fafd; border: 1px solid #1e3a5f; color: #64748b;
  border-radius: 6px; padding: 4px 10px; font-size: 11.5px;
  cursor: pointer; transition: all .15s;
}
.imp-tab:hover { color: #2058a5; border-color: #3b82f6; }
.imp-tab.active { background: #3b82f6; color: #0f172a; border-color: #3b82f6; font-weight: 700; }
.sec-imp-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
}
.imp-card {
  background: #f8fafd; border: 1px solid #1e293b;
  border-radius: 10px; padding: 12px 14px;
  display: flex; flex-direction: column; gap: 6px;
  cursor: pointer; transition: all .15s;
  position: relative; overflow: hidden;
}
.imp-card:hover { border-color: #3b82f6; transform: translateY(-1px); }
.imp-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--imp-color, #3b82f6);
}
.imp-card .row1 { display: flex; align-items: center; gap: 8px; }
.imp-card .name {
  font-size: 14px; font-weight: 700; color: #263751; flex: 1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.imp-card .streak-pill {
  font-size: 10.5px; font-weight: 800;
  padding: 2px 7px; border-radius: 5px;
  background: linear-gradient(135deg, #1e3a8a, #3b82f6);
  color: #192942;
}
.imp-card .streak-pill.s4 { background: linear-gradient(135deg, #be123c, #ef4444); }
.imp-card .streak-pill.s3 { background: linear-gradient(135deg, #b45309, #f59e0b); }
.imp-card .streak-pill.s2 { background: linear-gradient(135deg, #6d28d9, #8b5cf6); }
.imp-card .pros-mini {
  font-size: 16px; font-weight: 900; font-family:'SF Mono',Menlo,monospace;
}
.imp-card .summary { font-size: 11.5px; color: #53627a; line-height: 1.5; }
.imp-card .meta { font-size: 11px; color: #64748b; display: flex; gap: 10px; flex-wrap: wrap; }
.imp-card .trend-line {
  display: flex; align-items: center; gap: 3px; font-size: 10px;
  color: #64748b; font-family: 'SF Mono', Menlo, monospace;
}
.imp-card .trend-line .sparkbar {
  display: inline-block; width: 4px; background: #3b82f6; border-radius: 1px;
}

/* ── 一图流 board-card（机会榜 / 改善榜统一模板） ── */
.board-card {
  background: linear-gradient(180deg,#0f172a 0%, #0b1220 100%);
  border: 1px solid #1f2937;
  border-radius: 12px;
  padding: 12px 14px;
  display: flex; flex-direction: column; gap: 8px;
  cursor: pointer; transition: all .15s;
  position: relative; overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif;
}
.board-card:hover { border-color: #3b82f6; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,0,0,.35); }
.board-card::before {
  content:''; position:absolute; left:0; top:0; bottom:0; width:3px;
  background: var(--board-color, #3b82f6);
}
.board-card .bc-head {
  display: flex; align-items: center; gap: 6px;
  padding: 4px 8px 6px;
  margin: -12px -14px 6px;
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--board-color, #3b82f6) 22%, transparent) 0%,
    color-mix(in srgb, var(--board-color, #3b82f6) 6%, transparent) 50%,
    transparent 100%);
  border-bottom: 1px solid color-mix(in srgb, var(--board-color, #3b82f6) 28%, #1f2937);
}
.board-card .bc-head .mkt   { font-size: 12px; }
.board-card .bc-head .name  {
  font-size: 14.5px; font-weight: 850; color: #263751; flex: 1;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  letter-spacing: 0.1px;
}
.board-card .bc-head .pill {
  font-size: 10.5px; font-weight: 800; padding: 2px 6px; border-radius: 5px; color: #192942;
}
.board-card .bc-head .pill.s4 { background: linear-gradient(135deg, #be123c, #ef4444); }
.board-card .bc-head .pill.s3 { background: linear-gradient(135deg, #b45309, #f59e0b); }
.board-card .bc-head .pill.s2 { background: linear-gradient(135deg, #6d28d9, #8b5cf6); }
.board-card .bc-head .pill.s1 { background: linear-gradient(135deg, #1e3a8a, #3b82f6); }
.board-card .bc-head .pros {
  font-size: 19px; font-weight: 900;
  font-family: 'SF Mono', Menlo, monospace;
  min-width: 34px; text-align: right;
  color: var(--board-color, #f1f5f9);
}
.board-card .bc-imp {
  font-size: 12px; color: #263751; line-height: 1.55;
  font-weight: 500;
  padding: 3px 6px;
  border-radius: 5px;
  background: #f4f7fb;
}
.board-card .bc-imp .gain { color: #c83d4b; font-weight: 800; }
.board-card .bc-imp .loss { color: #168263; font-weight: 800; }
.board-card .bc-chgrow {
  display: grid; grid-template-columns: repeat(6, 1fr);
  gap: 4px; font-size: 10.5px;
  background: #f8fafd; border-radius: 6px; padding: 6px 6px;
}
.board-card .bc-chg { display: flex; flex-direction: column; align-items: center; gap: 1px; }
.board-card .bc-chg .lbl { color: #64748b; font-size: 9.5px; }
.board-card .bc-chg .val { font-weight: 700; font-family: 'SF Mono', Menlo, monospace; }
.board-card .bc-chg .val.pos { color: #c83d4b; }
.board-card .bc-chg .val.neg { color: #168263; }
.board-card .bc-chg .val.zero { color: #64748b; }
.board-card .bc-meta {
  display: flex; gap: 8px; font-size: 11px; color: #64748b;
  flex-wrap: wrap; align-items: center;
}
.board-card .bc-meta .ma20 {
  padding: 1px 6px; border-radius: 4px; font-weight: 700; font-size: 10.5px;
}
.board-card .bc-meta .ma20.BUY  { background: #14532d; color: #168263; }
.board-card .bc-meta .ma20.ADD  { background: #14532d; color: #86efac; }
.board-card .bc-meta .ma20.HOLD { background: #1e3a8a; color: #2058a5; }
.board-card .bc-meta .ma20.WARN { background: #78350f; color: #a65a10; }
.board-card .bc-meta .ma20.SELL { background: #7f1d1d; color: #fca5a5; }
.board-card .bc-meta .ma20.NONE { background: #ffffff; color: #64748b; }
.board-card .bc-meta .ma20.WATCH{ background: #ffffff; color: #53627a; }
.board-card .bc-engines {
  display: flex; flex-direction: column; gap: 4px;
  background: #f8fafd; border-radius: 6px; padding: 6px 7px;
}
.board-card .bc-eng-row {
  display: flex; align-items: center; gap: 6px; font-size: 11px;
}
.board-card .bc-eng-row .ename { color: #9a5d12; width: 60px; font-weight: 700; }
.board-card .bc-eng-row .escore {
  font-family: 'SF Mono', Menlo, monospace; font-weight: 800; color: #263751;
  width: 26px; text-align: right;
}
.board-card .bc-eng-row.s-fire .escore { color: #86efac; }
.board-card .bc-eng-row.s-strong .escore { color: #2058a5; }
.board-card .bc-eng-row.s-mid .escore { color: #a65a10; }
.board-card .bc-eng-row.s-weak .escore { color: #fca5a5; }
.board-card .bc-eng-row .edelta { font-size: 10px; font-weight: 700; width: 32px; text-align: right; }
.board-card .bc-eng-row .edelta.pos { color: #c83d4b; }
.board-card .bc-eng-row .edelta.neg { color: #168263; }
.board-card .bc-eng-row .eseries {
  flex: 1; display: flex; align-items: flex-end; gap: 2px; height: 22px;
}
.board-card .bc-eng-row .eseries .bar {
  display: inline-block; width: 6px;
  background: var(--board-color, #3b82f6);
  border-radius: 2px; opacity: .65;
}
.board-card .bc-eng-row .eseries .bar.last { opacity: 1; box-shadow: 0 0 6px color-mix(in srgb, var(--board-color, #3b82f6) 70%, transparent); }
.board-card .bc-eng-row .enums { font-size: 9.5px; color: #64748b; font-family: 'SF Mono', Menlo, monospace; }
.board-card .bc-leaders {
  font-size: 11.5px; color: #53627a; padding-top: 6px;
  border-top: 1px dashed #1f2937;
  display: flex; flex-wrap: wrap; gap: 5px 6px; align-items: center;
  line-height: 1.55;
}
.board-card .bc-leaders .lhead {
  color: #64748b; font-size: 10px; margin-right: 2px;
}
.board-card .bc-leaders .ldr {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 1px 6px; border-radius: 8px;
  background: #f8fafd; border: 1px solid #1e293b;
}
.board-card .bc-leaders .ldr .lname { color: #53627a; max-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.board-card .bc-leaders .ldr .lscore { color: #64748b; font-family: 'SF Mono', Menlo, monospace; font-size: 10px; }
.board-card .bc-leaders .ldr .lmc { color: #a65a10; font-family: 'SF Mono', Menlo, monospace; font-size: 9.5px; padding: 0 3px; border-left: 1px solid #1e293b; border-right: 1px solid #1e293b; }
.board-card .bc-leaders .ldr .ldelta { font-weight: 700; font-size: 10px; }
.board-card .bc-leaders .ldr .ldelta.pos { color: #c83d4b; }
.board-card .bc-leaders .ldr .ldelta.neg { color: #168263; }
.board-card .bc-leaders .ldr .ldelta.zero { color: #64748b; }
.board-card .bc-path { font-size: 10px; color: #64748b; font-style: italic; }

/* 网格容器：响应式，最少 340px 一卡 */
.sec-opp-grid, .sec-imp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
  gap: 14px;
}

/* ── AI 信息分拣面板 ── */
.ai-sort-wrap { margin: 14px 0 18px; }
.ai-sort-cta {
  background: linear-gradient(135deg, rgba(245,158,11,.16), rgba(59,130,246,.10));
  border: 1px solid #334155; border-radius: 14px; padding: 14px 16px;
  display: flex; align-items: center; gap: 12px; margin-bottom: 16px;
  color: #64748b; font-size: 12px;
}
.ai-sort-panel { margin: 12px 0 18px; border-color: #e2e8f1; background: #f4f7fb; }
.ai-sort-panel .fold-head { cursor: pointer; }
.ai-cache-badge {
  font-size: 10px; font-weight: 800; color: #2058a5; background: #1e3a8a;
  border-radius: 999px; padding: 1px 7px; margin-left: 6px; vertical-align: middle;
}
.ai-sort-headline {
  font-size: 16px; line-height: 1.55; color: #192942; font-weight: 800;
  background: linear-gradient(135deg, #111827, #0b1220); border: 1px solid #1f2937;
  border-radius: 10px; padding: 12px 14px; margin-bottom: 9px;
}
.ai-sort-brief { font-size: 12.5px; color: #53627a; line-height: 1.7; margin-bottom: 10px; }
.ai-market-read { background:#f8fafd; border:1px solid #1f2937; border-radius:10px; padding:10px 12px; margin:10px 0 12px; }
.ai-market-tags { display:flex; flex-wrap:wrap; gap:6px; margin-bottom:7px; }
.ai-market-tags span { font-size:10.5px; font-weight:800; color:#bfdbfe; background:#172554; border:1px solid #1d4ed8; border-radius:999px; padding:2px 8px; }
.ai-market-summary { color:#263751; font-size:12px; line-height:1.65; margin-bottom:8px; }
.ai-action-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(180px,1fr)); gap:9px; margin:10px 0 12px; }
.ai-action-block { border:1px solid #1f2937; border-radius:10px; padding:9px 10px; background:#f8fafd; }
.ai-action-block.focus { border-color:#14532d; }
.ai-action-block.avoid, .ai-action-block.risk { border-color:#7f1d1d; }
.ai-action-block.wait { border-color:#78350f; }
.ai-action-title { font-size:11px; font-weight:900; color:#192942; margin-bottom:6px; }
.ai-action-item { font-size:11.5px; color:#53627a; line-height:1.55; padding:3px 0; border-top:1px dashed #1f2937; }
.ai-action-item:first-of-type { border-top:none; }
.ai-ranking { display:grid; grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); gap:10px; margin:10px 0 12px; }
.ai-rank-section { background:#f8fafd; border:1px solid #1f2937; border-radius:10px; padding:9px 10px; }
.ai-rank-section.rank-opportunity { border-color:#14532d; }
.ai-rank-section.rank-risk { border-color:#7f1d1d; }
.ai-rank-section.rank-improve { border-color:#78350f; }
.ai-rank-title { font-size:11px; font-weight:900; color:#192942; margin-bottom:6px; }
.ai-rank-row { display:flex; flex-direction:column; gap:2px; padding:5px 0; border-top:1px dashed #1f2937; }
.ai-rank-row:first-of-type { border-top:none; }
.ai-rank-row b { color:#192942; font-size:12px; }
.ai-rank-row span { color:#64748b; font-size:11px; line-height:1.45; }
.ai-sort-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 12px; }
.ai-stat {
  display: inline-flex; align-items: baseline; gap: 5px; padding: 5px 9px;
  border-radius: 999px; background: #f8fafd; border: 1px solid #1f2937;
  color: #64748b; font-size: 11px;
}
.ai-stat b { font-size: 14px; color: #263751; font-family: 'SF Mono', Menlo, monospace; }
.ai-stat.tone-positive { border-color: #14532d; color: #86efac; }
.ai-stat.tone-risk { border-color: #7f1d1d; color: #fca5a5; }
.ai-stat.tone-warning { border-color: #78350f; color: #a65a10; }
.ai-sort-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.ai-sort-card { cursor: default; --board-color: #3b82f6; }
.ai-sort-card:hover { transform: none; }
.ai-sort-card.category-opportunity { --board-color: #22c55e; }
.ai-sort-card.category-watch { --board-color: #38bdf8; }
.ai-sort-card.category-wait { --board-color: #f59e0b; }
.ai-sort-card.category-avoid { --board-color: #991b1b; }
.ai-sort-card.category-positive { --board-color: #22c55e; }
.ai-sort-card.category-improvement { --board-color: #f59e0b; }
.ai-sort-card.category-risk { --board-color: #ef4444; }
.ai-sort-card.category-divergence { --board-color: #a78bfa; }
.ai-sort-card.category-negative { --board-color: #64748b; }
.ai-card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ai-category-badge, .ai-priority-badge {
  font-size: 10.5px; font-weight: 800; padding: 2px 7px; border-radius: 999px;
  background: #ffffff; border: 1px solid #1f2937; color: #53627a;
}
.ai-priority-badge.priority-high { color: #fca5a5; border-color: #7f1d1d; }
.ai-priority-badge.priority-medium { color: #a65a10; border-color: #78350f; }
.ai-priority-badge.priority-low { color: #2058a5; border-color: #1e3a8a; }
.ai-card-title { font-size: 14px; font-weight: 850; color: #192942; line-height: 1.45; }
.ai-card-target { font-size: 11px; color: #2058a5; font-weight: 700; }
.ai-decision-badge { display:inline-flex; width:max-content; font-size:11px; font-weight:900; color:#fef3c7; background:#f8fafd; border:1px solid #92400e; border-radius:999px; padding:3px 9px; }
.ai-card-summary { font-size: 12px; color: #53627a; line-height: 1.6; }
.ai-tech-view { display:flex; flex-direction:column; gap:4px; background:#f8fafd; border:1px solid #1f2937; border-radius:8px; padding:7px 9px; font-size:11px; color:#64748b; line-height:1.45; }
.ai-tech-view b { color:#a65a10; font-weight:800; }
.ai-evidence-row { display: flex; flex-wrap: wrap; gap: 5px; padding-top: 4px; border-top: 1px dashed #1f2937; }
.ai-evidence-chip {
  display: inline-flex; gap: 4px; align-items: center; max-width: 100%;
  padding: 3px 7px; border-radius: 7px; background: #f8fafd; border: 1px solid #1e293b;
  color: #64748b; font-size: 10.5px; line-height: 1.3;
}
.ai-evidence-chip b { color: #263751; }
.ai-evidence-empty { font-size: 11px; color: #fca5a5; }
.ai-card-risk { font-size: 11.5px; color: #fca5a5; line-height: 1.5; }
.ai-watch-mini { font-size: 11px; color: #a65a10; line-height: 1.5; }
.ai-data-warning, .ai-sort-error {
  background: rgba(127,29,29,.22); border: 1px solid #7f1d1d; color: #fca5a5;
  border-radius: 9px; padding: 9px 11px; font-size: 12px; line-height: 1.6; margin: 8px 0;
}
.ai-next-watch { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 12px; color: #64748b; font-size: 12px; }
.ai-next-watch span { padding: 3px 8px; border-radius: 999px; background: #f8fafd; border: 1px solid #1f2937; color: #53627a; }
.ai-disclaimer { margin-top: 10px; font-size: 10.5px; color: #64748b; }
.ai-sort-loading { text-align: center; color: #53627a; padding: 24px 10px; font-size: 13px; }
.ai-sort-loading .ring {
  width: 34px; height: 34px; border: 3px solid #1e293b; border-top-color: #f59e0b;
  border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 10px;
}
.ai-sort-loading span { display: block; margin-top: 5px; color: #64748b; font-size: 11px; }

/* —— 进度条(紧凑毛玻璃横向条)—— */
.sec-loading-fancy {
  position: sticky; top: 0; z-index: 30;
  padding: 10px 14px;
  margin: -8px 0 12px;
  background: linear-gradient(135deg, rgba(15,23,42,.88), rgba(30,41,59,.75));
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(59,130,246,.28);
  border-radius: 12px;
  display: flex; align-items: center; gap: 12px;
  text-align: left;
  box-shadow: 0 4px 16px rgba(0,0,0,.35);
}
.sec-loading-fancy .ring {
  width: 28px; height: 28px;
  border: 3px solid #1e293b;
  border-top-color: #f59e0b;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0; flex-shrink: 0;
}
@keyframes spin { to { transform: rotate(360deg); } }
.sec-loading-fancy .text {
  font-size: 13px; color: #263751; margin-bottom: 0;
  flex: 1; font-weight: 600;
}
.sec-loading-fancy .sub {
  font-size: 11.5px; color: #64748b; margin-bottom: 0;
  flex-shrink: 0;
  max-width: 240px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap;
}
.sec-loading-fancy .progress-bar {
  background: #f8fafd; border-radius: 999px; height: 4px;
  width: 120px; max-width: 120px; margin: 0;
  overflow: hidden;
  flex-shrink: 0;
  border: 1px solid #1e293b;
}
.sec-loading-fancy .progress-fill {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, #f59e0b, #22c55e);
  border-radius: 999px; transition: width .5s ease;
}
/* 加载完成时的淡出 */
.sec-loading-fancy.is-done {
  opacity: 0; transform: translateY(-6px);
  transition: opacity .35s, transform .35s;
}
.sec-modal-title { font-size: 17px; font-weight: 800; color: #192942; margin-bottom: 18px; }
.sec-modal label { display: block; font-size: 12px; color: #64748b; margin-bottom: 4px; margin-top: 12px; }
.sec-modal input, .sec-modal select {
  width: 100%; padding: 8px 12px; font-size: 13px;
  background: #f8fafd; border: 1px solid #334155; border-radius: 8px;
  color: #263751; outline: none;
}
.sec-modal input:focus { border-color: #f59e0b; }
.sec-members-list { margin-top: 6px; display: flex; flex-direction: column; gap: 6px; }
.sec-member-row { display: flex; gap: 6px; align-items: center; }
.sec-member-row input { flex: 1; }
.sec-del-btn {
  padding: 5px 10px; background: #f8fafd; color: #fca5a5; border: none;
  border-radius: 6px; cursor: pointer; font-size: 12px; flex-shrink: 0;
}
.sec-modal-footer { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }

/* ════════════════════════════════════════════════════════
   复盘 Tab 样式
════════════════════════════════════════════════════════ */

/* 整体布局：左录入 + 右结果 */
.review-layout {
  display: flex; gap: 20px; padding: 20px;
  min-height: calc(100vh - 80px); align-items: flex-start;
}
.review-input-panel  { width: 320px; flex-shrink: 0; display: flex; flex-direction: column; gap: 14px; }
.review-result-panel { flex: 1; min-width: 0; }

/* 录入卡片 */
.review-input-card {
  background: #ffffff; border-radius: 12px; padding: 20px;
  border: 1px solid #334155;
}
.review-card-title {
  font-size: 14px; font-weight: 700; color: #263751;
  margin: 0 0 16px; letter-spacing: 0.3px;
}
.review-stock-row {
  display: flex; align-items: center; gap: 8px; margin-bottom: 14px;
}
.review-stock-row label { font-size: 12px; color: #64748b; flex-shrink: 0; }
.rv-stock-input {
  width: 100%; padding: 7px 10px; background: #f8fafd;
  border: 1px solid #334155; border-radius: 6px; color: #263751;
  font-size: 13px; outline: none;
}
.rv-stock-input:focus { border-color: #6366f1; }
.rv-stock-name { font-size: 11px; color: #64748b; flex-shrink: 0; }

/* 交割单表格 */
.review-trades-wrap { margin-bottom: 12px; }
.rv-trade-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.rv-trade-table th {
  text-align: left; padding: 6px 4px; color: #64748b;
  border-bottom: 1px solid #1e293b; white-space: nowrap;
}
.rv-trade-table td { padding: 4px 3px; }
.rv-dir-sel {
  background: #f8fafd; border: 1px solid #334155; color: #263751;
  border-radius: 4px; font-size: 12px; padding: 3px 4px; width: 76px; cursor: pointer;
}
.rv-date-inp, .rv-price-inp, .rv-qty-inp {
  background: #f8fafd; border: 1px solid #334155; color: #263751;
  border-radius: 4px; font-size: 12px; padding: 3px 5px; width: 100%;
}
.rv-date-inp  { min-width: 110px; }
.rv-price-inp { min-width: 60px; }
.rv-qty-inp   { min-width: 40px; }
.rv-del-btn {
  background: none; border: none; color: #475569; cursor: pointer;
  font-size: 14px; padding: 2px 4px; border-radius: 4px;
}
.rv-del-btn:hover { color: #ef4444; }
.rv-add-btn {
  margin-top: 8px; background: none; border: 1px dashed #334155;
  color: #6366f1; font-size: 12px; padding: 5px 12px; border-radius: 6px;
  cursor: pointer; width: 100%;
}
.rv-add-btn:hover { background: #ffffff; }

/* 操作按钮行 */
.rv-btn-row { display: flex; gap: 8px; margin-top: 14px; }
.rv-start-btn {
  flex: 1; padding: 9px; background: linear-gradient(135deg, #6366f1, #4f46e5);
  color: #192942; border: none; border-radius: 8px; font-size: 13px; font-weight: 600;
  cursor: pointer;
}
.rv-start-btn:hover { opacity: 0.9; }
.rv-start-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.rv-clear-btn {
  padding: 9px 14px; background: #f8fafd; color: #64748b;
  border: 1px solid #334155; border-radius: 8px; font-size: 13px; cursor: pointer;
}
.rv-clear-btn:hover { color: #263751; }
.rv-error { color: #c83d4b; font-size: 12px; margin-top: 8px; }

/* 提示卡 */
.review-hint-card {
  background: #f8fafd; border-radius: 10px; padding: 14px 16px;
  border: 1px solid #1e3a5f;
}
.rv-hint-title { font-size: 12px; font-weight: 600; color: #7dd3fc; margin-bottom: 8px; }
.rv-hint-list { margin: 0; padding-left: 16px; }
.rv-hint-list li { font-size: 12px; color: #64748b; margin-bottom: 4px; line-height: 1.5; }

/* 结果区占位 */
.rv-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 300px; color: #64748b;
}
.rv-loading {
  display: flex; align-items: center; gap: 12px; padding: 40px;
  color: #64748b; font-size: 14px; justify-content: center;
}
@keyframes rv-spin { to { transform: rotate(360deg); } }
.rv-spinner {
  display: inline-block; width: 20px; height: 20px;
  border: 2px solid #334155; border-top-color: #6366f1;
  border-radius: 50%; animation: rv-spin 0.8s linear infinite;
}
.rv-err-block { color: #c83d4b; padding: 20px; font-size: 14px; }

/* 结果头部 */
.rv-result-header {
  display: flex; align-items: center; gap: 10px;
  padding: 0 0 14px; border-bottom: 1px solid #334155; margin-bottom: 16px;
}
.rv-stock-badge {
  background: #312e81; color: #a5b4fc; padding: 4px 10px;
  border-radius: 6px; font-size: 14px; font-weight: 700;
}
.rv-stock-code { color: #64748b; font-size: 12px; }
.rv-trade-count { color: #64748b; font-size: 12px; margin-left: auto; }

/* 汇总卡 */
.rv-summary-card {
  background: #f8fafd; border-radius: 12px; padding: 18px 20px;
  border: 1px solid #1e3a5f; margin-bottom: 16px;
}
.rv-summary-title {
  font-size: 13px; font-weight: 700; color: #7dd3fc; margin-bottom: 14px;
}
.rv-summary-stats {
  display: flex; gap: 20px; margin-bottom: 12px;
}
.rv-stat-item { text-align: center; }
.rv-stat-label { font-size: 11px; color: #64748b; margin-bottom: 4px; }
.rv-stat-val   { font-size: 20px; font-weight: 700; color: #263751; }
.rv-up   { color: #c83d4b; }  /* A股红涨 */
.rv-down { color: #168263; }  /* A股绿跌 */
.rv-quality-dist { font-size: 12px; color: #64748b; margin-bottom: 10px; }
.rv-issues { margin-top: 12px; }
.rv-issues-title { font-size: 12px; font-weight: 600; color: #a65a10; margin-bottom: 6px; }
.rv-issues-list { margin: 0; padding-left: 16px; }
.rv-issues-list li { font-size: 12px; color: #64748b; margin-bottom: 3px; line-height: 1.6; }

/* 质量徽章 */
.rv-qbadge {
  display: inline-block; padding: 2px 7px; border-radius: 4px;
  font-size: 11px; font-weight: 600; margin-left: 6px; vertical-align: middle;
}
.rv-q-excellent { background: #14532d; color: #168263; }
.rv-q-good      { background: #1e3a5f; color: #7dd3fc; }
.rv-q-fair      { background: #f8fafd; color: #a65a10; }
.rv-q-poor      { background: #f8fafd; color: #c83d4b; }
.rv-q-warn      { background: #f8fafd; color: #a65a10; }
.rv-q-stoploss  { background: #f8fafd; color: #a5b4fc; }
.rv-q-unknown   { background: #ffffff; color: #64748b; }

/* 单笔交易卡 */
.rv-trade-card {
  background: #ffffff; border-radius: 12px; padding: 18px 20px;
  border: 1px solid #334155; margin-bottom: 14px;
}
.rv-trade-err { border-color: #7f1d1d; background: #f8fafd; }
.rv-trade-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 14px;
  padding-bottom: 10px; border-bottom: 1px solid #334155;
  flex-wrap: wrap;
}
.rv-trade-no { font-size: 11px; color: #64748b; background: #f8fafd; padding: 2px 8px; border-radius: 4px; }
.rv-trade-dates { font-size: 13px; color: #64748b; flex: 1; }
.rv-trade-dates strong { color: #263751; }
.rv-trade-dates em { color: #64748b; font-style: normal; }
.rv-pnl { font-size: 14px; font-weight: 700; }

/* 双栏买卖点 */
.rv-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.rv-point-block { background: #f8fafd; border-radius: 8px; padding: 14px; }
.rv-holding { border: 1px dashed #334155; }
.rv-point-title {
  font-size: 12px; font-weight: 600; color: #64748b;
  margin-bottom: 10px; display: flex; align-items: center;
}

/* 快照指标格 */
.rv-snap-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px;
}
.rv-snap-item {
  background: #ffffff; border-radius: 6px; padding: 6px 8px;
  display: flex; flex-direction: column; gap: 2px;
}
.rv-snap-label { font-size: 10px; color: #64748b; }
.rv-snap-val   { font-size: 13px; font-weight: 600; color: #263751; }

/* 分析文字 */
.rv-verdict-text {
  font-size: 12px; color: #64748b; line-height: 1.7; margin-bottom: 8px;
}

/* 引擎分条形图 */
.rv-engine-bars { margin-top: 6px; }
.rv-eng-row {
  display: flex; align-items: center; gap: 6px; margin-bottom: 3px;
}
.rv-eng-name  { font-size: 11px; color: #64748b; width: 40px; flex-shrink: 0; }
.rv-bar-track {
  flex: 1; height: 4px; background: #ffffff; border-radius: 2px; overflow: hidden;
}
.rv-bar-fill   { height: 100%; border-radius: 2px; transition: width 0.4s ease; }
.rv-bar-good   { background: #22c55e; }
.rv-bar-mid    { background: #f59e0b; }
.rv-bar-low    { background: #64748b; }
.rv-eng-score  { font-size: 11px; color: #64748b; width: 24px; text-align: right; flex-shrink: 0; }

/* 折线图容器 */
.rv-chart-wrap {
  height: 180px; background: #f8fafd; border-radius: 8px; padding: 12px;
  border: 1px solid #1e293b;
}

/* 移动端适配 */
@media (max-width: 900px) {
  .review-layout     { flex-direction: column; }
  .review-input-panel { width: 100%; }
  .rv-two-col        { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════════════════════════
   Clean UI Refresh — 降噪、突出重点、表格更清爽
════════════════════════════════════════════════════════ */
:root {
  --bg-main: #0b1120;
  --bg-page: #0b1120;
  --surface-1: #111827;
  --surface-2: #151f32;
  --surface-3: #0f172a;
  --line: rgba(148,163,184,.14);
  --line-strong: rgba(148,163,184,.24);
  --text-main: #e5e7eb;
  --text-sub: #9ca3af;
  --text-dim: #6b7280;
  --accent: #f59e0b;
  --accent-2: #60a5fa;
  --good: #22c55e;
  --bad: #ef4444;
  --shadow-card: 0 10px 28px rgba(0,0,0,.22);
  --shadow-hover: 0 14px 34px rgba(0,0,0,.28);
}

body {
  background: var(--bg-page);
  color: var(--text-main);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 0%, rgba(96,165,250,.08), transparent 28%),
    linear-gradient(180deg, rgba(255,255,255,.018), transparent 220px);
  z-index: -1;
}

.topbar {
  height: 58px;
  background: #f4f7fb;
  border-bottom: 1px solid var(--line);
  box-shadow: none;
}
.logo { letter-spacing: 0; }
.logo span { color: var(--accent); }
.tagline { color: var(--text-dim); }
.tab-bar {
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 3px;
}
.tab-btn {
  color: var(--text-sub);
  border-radius: 9px;
  font-weight: 650;
}
.tab-btn.active {
  background: #e5e7eb;
  color: #0b1120;
  box-shadow: none;
}
.tab-btn:not(.active):hover {
  color: #192942;
  background: rgba(255,255,255,.06);
}

.main { padding-top: 28px; }
body.wide .main { max-width: min(1560px, 96vw); }

.search-card,
.compare-card,
.sec-toolbar,
.sec-overview-wrap,
.sec-opp-board,
.sec-imp-board,
.cmp-table-wrap,
.sec-board-card,
.review-input-card,
.rv-summary-card,
.rv-trade-card {
  background: var(--surface-1);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-card);
}
.search-card,
.compare-card {
  border-radius: 18px;
  padding: 30px;
}
.hero-text h1 { font-size: 23px; letter-spacing: -.02em; }
.hero-text p { color: var(--text-sub); }

.search-input,
.sec-market-select,
.sec-modal input,
.sec-modal select,
.sec-modal textarea {
  background: var(--surface-3);
  border: 1px solid var(--line-strong);
  color: var(--text-main);
}
.search-input:focus,
.sec-market-select:focus,
.sec-modal input:focus,
.sec-modal select:focus,
.sec-modal textarea:focus {
  border-color: rgba(245,158,11,.8);
  box-shadow: 0 0 0 3px rgba(245,158,11,.10);
}
.query-btn,
.compare-btn,
.sec-btn-primary {
  background: var(--accent);
  color: #111827;
  box-shadow: none;
}
.query-btn:hover,
.compare-btn:hover,
.sec-btn-primary:hover {
  background: #fbbf24;
  transform: none !important;
  filter: none;
}
.quick-btn,
.sec-btn-ghost,
.opp-tab,
.imp-tab {
  background: rgba(255,255,255,.035);
  border: 1px solid var(--line);
  color: var(--text-sub);
}
.quick-btn:hover,
.sec-btn-ghost:hover,
.opp-tab:hover,
.imp-tab:hover {
  background: rgba(255,255,255,.07);
  border-color: var(--line-strong);
  color: #192942;
  transform: none !important;
}
.opp-tab.active,
.imp-tab.active,
.sec-btn-active {
  background: rgba(245,158,11,.14);
  border-color: rgba(245,158,11,.45);
  color: #a65a10;
}

.sec-toolbar {
  padding: 12px 14px;
  margin-bottom: 10px;
  border-radius: 14px;
  background: var(--surface-1);
}
.sec-toolbar-title {
  font-size: 15px;
  letter-spacing: 0;
}
.sec-toolbar-title .dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  box-shadow: none;
  animation: none;
}
.board-hint {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(96,165,250,.055);
  border: 1px solid rgba(96,165,250,.16);
  color: #aebbd0;
}

.sec-overview-wrap {
  border-radius: 14px;
  /* 2026-07-17: 表头固定需要容器承担纵向滚动,max-height 限制高度 */
  overflow: auto;
  max-height: 70vh;
}
.sec-overview-table,
.sec-sub-table,
.sec-table {
  background: var(--surface-1);
  font-size: 12px;
}
.sec-overview-table th,
.sec-sub-table th,
.sec-table th {
  background: #f8fafd;
  color: #8d99ae;
  border-bottom: 1px solid var(--line-strong);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: none;
}
.sec-overview-table td,
.sec-sub-table td,
.sec-table td {
  border-bottom: 1px solid rgba(148,163,184,.075);
  color: #53627a;
}
.sec-overview-table tbody tr.sec-row-expand:hover td,
.sec-sub-table tbody tr:hover td,
.sec-table tbody tr:hover td {
  background: rgba(96,165,250,.045);
}
.sec-row-detail td { background: #f8fafd; }
.sec-detail-panel {
  background: #f8fafd;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.sec-detail-panel.open { padding: 16px; }

.pros-bar-wrap { min-width: 104px; }
.pros-bar-bg {
  height: 5px;
  background: rgba(255,255,255,.08);
}
.pros-bar-fill { box-shadow: none; }
.eng-pip {
  min-width: 32px;
  padding: 3px 7px;
  background: rgba(255,255,255,.04);
  border-color: var(--line);
  box-shadow: none;
}
.eng-pip.dominant {
  border-color: rgba(251,191,36,.58);
  background: rgba(251,191,36,.12);
}
.eng-pip.s-fire { color: #a65a10; background: rgba(251,191,36,.18); border-color: rgba(251,191,36,.50); box-shadow: 0 0 0 1px rgba(251,191,36,.18) inset; }
.eng-pip.s-strong { color: #168263; background: rgba(52,211,153,.14); border-color: rgba(52,211,153,.35); }
.eng-pip.s-mid { color: #2058a5; background: rgba(147,197,253,.08); border-color: rgba(147,197,253,.20); }
.eng-pip.s-weak { color: #64748b; background: rgba(100,116,139,.06); border-color: transparent; }

.sec-badge {
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 10.5px;
  box-shadow: none;
}
.sec-badge-high { background: rgba(239,68,68,.15); color: #fca5a5; }
.sec-badge-mid { background: rgba(245,158,11,.15); color: #a65a10; }
.sec-badge-low { background: rgba(34,197,94,.13); color: #86efac; }
.sec-badge-weak { background: rgba(148,163,184,.10); color: #aebbd0; }
.sec-source-badge {
  background: rgba(96,165,250,.10);
  color: #2058a5;
  border-color: rgba(96,165,250,.28);
}
.stock-report-link {
  color: #2058a5;
  border-bottom-color: rgba(147,197,253,.32);
}
.stock-report-link:hover { color: #bfdbfe; }

.sec-detail-head {
  border-bottom: 1px solid var(--line);
  margin-bottom: 12px;
}
.sec-kpi {
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.sec-kpi .label { color: var(--text-dim); }
.sec-kpi .value { font-size: 18px; }
.eng-row,
.delta-row,
.board-card .bc-chgrow,
.board-card .bc-engines,
.rv-point-block,
.rv-chart-wrap {
  background: var(--surface-3);
  border: 1px solid var(--line);
}

.sub-sector-card,
.opp-card,
.imp-card,
.board-card,
.sec-manage-card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  box-shadow: none;
}
.sub-sector-card:hover,
.opp-card:hover,
.imp-card:hover,
.board-card:hover,
.sec-manage-card:hover {
  border-color: rgba(96,165,250,.34);
  transform: none !important;
  box-shadow: var(--shadow-hover);
}
.sub-sector-head:hover { background: rgba(255,255,255,.035); }
.sub-sector-body { border-top: 1px solid var(--line); }
.sub-sector-card.is-l2 { border-left: 2px solid #8b5cf6; }
.sub-sector-card.is-l3 { border-left: 2px solid #06b6d4; }
.sub-sector-head .pros-pill {
  background: var(--surface-3);
  border: 1px solid var(--line);
}

.sec-opp-board,
.sec-imp-board {
  padding: 16px;
  margin-bottom: 16px;
}
.sec-opp-head .title,
.sec-imp-head .title {
  color: #263751;
  letter-spacing: 0;
}
.sec-opp-head .sub,
.sec-imp-head .sub { color: var(--text-dim); }
.filter-bar {
  gap: 6px !important;
}
.board-card::before,
.opp-card::before,
.imp-card::before { width: 2px; }
.board-card .bc-head { border-bottom-color: var(--line); }
.board-card .bc-head .pros,
.opp-card .pros-mini,
.imp-card .pros-mini {
  font-size: 18px;
}

.ac-dropdown,
.sec-modal {
  background: var(--surface-1);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-hover);
}
.ac-item:hover,
.ac-item.active { background: rgba(96,165,250,.08); }

.report-wrap { box-shadow: var(--shadow-card); }

@media (max-width: 768px) {
  .topbar { height: auto; min-height: 58px; padding: 8px 12px; }
  .tab-bar { width: 100%; }
  .main { padding-top: 18px; }
  .search-card, .compare-card { padding: 22px 16px; }
  .sec-toolbar { gap: 8px; }
}


/* ════════════════════════════════════════════════════════
   Board UX Refresh — watchlist / sector / ETF
════════════════════════════════════════════════════════ */
.board-head {
  display:flex; align-items:flex-end; justify-content:space-between; gap:16px;
  margin-bottom:12px; padding:14px 16px; border-radius:16px;
  background:var(--surface-1); border:1px solid var(--line); box-shadow:var(--shadow-card);
}
.board-title { display:flex; align-items:center; gap:8px; color:#192942; font-size:17px; font-weight:850; letter-spacing:-.01em; }
.board-title .dot { width:7px; height:7px; border-radius:50%; background:var(--accent); }
.board-desc { margin-top:5px; color:#64748b; font-size:12px; line-height:1.5; }
.board-meta { flex-shrink:0; color:#64748b; font-size:12px; padding:5px 10px; border-radius:999px; background:#f4f7fb; border:1px solid rgba(148,163,184,.12); }
.board-toolbar { margin-bottom:12px; }
.toolbar-spacer { flex:1; }
/* ── 工具栏分组(板块/自选股/ETF 看板通用) ── */
.sec-toolbar-group {
  display: flex; align-items: center; gap: 6px;
  flex-wrap: wrap;
  padding: 2px 10px 2px 0;
  position: relative;
}
.sec-toolbar-group + .sec-toolbar-group {
  padding-left: 12px;
  margin-left: auto;
  border-left: 1px dashed #1e293b;
}
.sec-toolbar-group-label {
  font-size: 10.5px; font-weight: 800; color: #64748b;
  letter-spacing: 0.6px; margin-right: 4px;
  text-transform: none;
}
.sec-toolbar-group-label .ico { margin-right: 3px; opacity: 0.85; }
/* 窄屏分组内自动换行 */
@media (max-width: 920px) {
  .sec-toolbar-group + .sec-toolbar-group {
    padding-left: 0; margin-left: 0;
    border-left: none;
    padding-top: 8px; margin-top: 4px;
    border-top: 1px dashed #1e2937;
    width: 100%;
  }
}
.metric-num { font-family:'SF Mono',Menlo,Consolas,monospace; font-variant-numeric:tabular-nums; }
.metric-pos,.sec-up { color:#c83d4b; font-weight:650; }
.metric-neg,.sec-down { color:#168263; font-weight:650; }
.metric-flat,.sec-flat { color:#64748b; }
.table-scroll { overflow-x:auto; -webkit-overflow-scrolling:touch; }
.stock-link { color:#263751; text-decoration:none; }
.stock-link:hover { text-decoration:underline; color:#192942; }
.sec-btn.danger { color:#fca5a5; }
.empty-filter-row { text-align:center; color:#64748b; padding:18px !important; }
.manage-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:14px; }
.manage-title { color:#263751; font-size:14px; font-weight:800; }
.manage-desc { color:#64748b; font-size:12px; margin-top:3px; }
.board-fold {
  border-radius: 12px;
  overflow: hidden;
}
.board-fold .fold-head {
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding:12px 14px; cursor:pointer;
  border-bottom:1px solid rgba(148,163,184,.10);
  transition: background .15s, border-color .15s;
}
.board-fold .fold-head:hover { background: rgba(59, 130, 246, 0.06); }
.board-fold.is-collapsed .fold-head { border-bottom-color: transparent; }
.board-fold .fold-body { display:block; padding:0 0 12px; }
.board-fold.is-collapsed .fold-body { display:none; }
.fold-toggle {
  flex-shrink: 0;
  width: 30px; height: 30px;
  padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border:1px solid rgba(148,163,184,.22);
  background:#f4f7fb;
  color: transparent;
  border-radius: 50%;
  font-size: 0;
  cursor:pointer;
  transition: background .15s, border-color .15s, transform .2s;
}
.fold-toggle::before {
  content: '';
  width: 7px; height: 7px;
  border-right: 2px solid #94a3b8;
  border-bottom: 2px solid #94a3b8;
  transform: rotate(-135deg);
  margin-top: -3px;
  transition: transform .2s, border-color .15s;
}
.board-fold.is-collapsed .fold-toggle::before {
  transform: rotate(45deg);
  margin-top: 3px;
}
.fold-toggle:hover { background: rgba(59, 130, 246, 0.18); border-color: #3b82f6; }
.fold-toggle:hover::before { border-color: #93c5fd; }
/* 折叠态标题强化 */
.board-fold.is-collapsed .title { color: #53627a; }
.board-fold .title { color:#192942; font-weight:850; font-size:15px; }
.board-fold .sub { color:#64748b; font-size:12px; margin-top:3px; }
/* 折叠面板头部右侧可挂 chip(由 JS 在 toggleBoardFold 时填充) */
.board-fold .fold-head-meta {
  display: flex; align-items: center; gap: 8px;
}
.board-fold .fold-count-chip {
  font-size: 11px; font-weight: 700;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.12);
  color: #2058a5;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.board-fold.is-collapsed .fold-count-chip {
  background: #f4f7fb;
  color: #64748b;
  border-color: rgba(148, 163, 184, 0.18);
}
#secOverviewTable th:nth-child(2), #secOverviewTable td:nth-child(2),
#etfTable th:nth-child(2), #etfTable td:nth-child(2) {
  position:sticky; left:0; z-index:6; background:#f8fafd; box-shadow:1px 0 0 rgba(148,163,184,.10); min-width:132px;
}
/* 左上角冻结列的表头: 同时纵向+横向 sticky,z-index 要高于普通表头(40) */
#secOverviewTable thead th:nth-child(2), #etfTable thead th:nth-child(2) {
  z-index:50; background:#f8fafd; top:0;
}
.wl-group-card { margin-bottom:18px; overflow:hidden; }
/* 2026-07-17: 自选股分组表格容器,加 max-height 让表头在容器内 sticky */
.wl-group-card .table-scroll { overflow:auto; max-height:70vh; }
.wl-group-head { display:flex; align-items:center; justify-content:space-between; gap:14px; padding:12px 16px; border-bottom:1px solid rgba(148,163,184,.10); background:#f4f7fb; }
.wl-group-title { color:#192942; font-size:15px; font-weight:850; }
.wl-summary { display:flex; flex-wrap:wrap; gap:8px; margin-top:7px; }
.wl-stat { font-size:11px; color:#64748b; background:#f4f7fb; border:1px solid rgba(148,163,184,.10); border-radius:999px; padding:3px 8px; }
.wl-stat b { color:#263751; }
.wl-group-actions { display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end; }
.wl-table { width:100%; }
.wl-compact-table { min-width:1180px; }
.wl-full-table    { min-width:1420px; }
/* Column widths are assigned by semantic <col> classes in core-workbench.css.
   Old nth-child rules accidentally made the 2w/4w return columns oversized. */
.wl-table th:first-child, .wl-table td:first-child { position:sticky; left:0; z-index:6; background:#f8fafd; min-width:82px; box-shadow:1px 0 0 rgba(148,163,184,.10); }
.wl-table th:nth-child(2), .wl-table td:nth-child(2) { position:sticky; left:82px; z-index:6; background:#f8fafd; min-width:132px; box-shadow:1px 0 0 rgba(148,163,184,.08); }
/* 左上角冻结列的表头: 同时纵向+横向 sticky,z-index 要高于普通表头(40) */
.wl-table thead th:first-child, .wl-table thead th:nth-child(2) { z-index:50; background:#f8fafd; top:0; }
/* 自选股 · 引擎 chip(对照 ETF .eng-pip 复刻) */
.wl-eng-col {
  font-size: 10.5px; white-space: nowrap; padding: 6px 4px !important;
  min-width: 56px; text-align: center !important; color: #53627a;
}
.wl-eng-cell {
  padding: 6px 4px !important; text-align: center !important;
}
.wl-eng-pip {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 40px; padding: 2px 6px;
  border-radius: 999px; font-size: 11.5px; font-weight: 800;
  font-family: 'SF Mono', Menlo, monospace;
  background: #f4f7fb; color: #64748b;
  border: 1px solid rgba(148,163,184,.18);
  letter-spacing: .2px;
}
.wl-eng-pip.s-fire   { background: rgba(251,191,36,.18); color: #a65a10; border-color: rgba(251,191,36,.50); box-shadow: 0 0 0 1px rgba(251,191,36,.18) inset; }
.wl-eng-pip.s-strong { background: rgba(52,211,153,.14); color: #168263; border-color: rgba(52,211,153,.35); }
.wl-eng-pip.s-mid    { background: rgba(147,197,253,.08); color: #2058a5; border-color: rgba(147,197,253,.20); }
.wl-eng-pip.s-weak   { background: rgba(100,116,139,.06); color: #64748b; border-color: transparent; }
.wl-eng-pip.dominant {
  border-color: rgba(251,191,36,.85);
  border-width: 1.5px;
  /* 去掉外发光,只用更亮更粗的边框标识主推 */
}
.wl-eng-pip .delta-pos { font-size: 9px; font-weight: 700; margin-left: 2px; color: #86efac; opacity: .8; }
.wl-eng-pip .delta-neg { font-size: 9px; font-weight: 700; margin-left: 2px; color: #fca5a5; opacity: .8; }
.wl-eng-pip .delta-flat { font-size: 9px; font-weight: 700; margin-left: 2px; color: #64748b; opacity: .8; }
/* 主引擎列(独立标签,主推高亮由 7 列 chip 自身 dominant 表达) */
.wl-primary-tag {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 8px; border-radius: 999px;
  background: rgba(251,191,36,.10); color: #a65a10;
  font-size: 11.5px; font-weight: 700;
  border: 1px solid rgba(251,191,36,.30);
}
.wl-primary-tag .score {
  font-family: 'SF Mono', Menlo, monospace; font-weight: 800; color: #9a5d12;
}
.wl-primary-engine { display:inline-flex; align-items:center; gap:4px; border:1px solid rgba(245,158,11,.28); background:rgba(245,158,11,.08); color:#a65a10; border-radius:999px; padding:3px 8px; font-size:11px; font-weight:750; }
.wl-ma20-label { color:#263751; font-weight:750; font-size:12px; }
/* 2026-07-08:近 3 日战法回溯 chip(平铺一字排开,避免一列 3 行影响观感) */
.wl-ma20-chip {
  display:inline-flex; align-items:center; gap:1px;
  padding:1px 4px; border-radius:4px;
  font-size:10px; font-weight:600; line-height:1.2;
  white-space:nowrap;
  font-family:'SF Mono', Menlo, monospace;
}
.wl-ma20-chip + .wl-ma20-chip { margin-left:2px; }
/* 2026-07-08:MA20 战法 5 日 chip 平铺容器,利用"主引擎"列腾出的空间 */
.wl-ma20-chips { margin-top:3px; display:flex; gap:2px; flex-wrap:wrap; align-items:center; }
.wl-action-cell { white-space:nowrap; }
.etf-cat-cell .muted { display:block; margin-top:2px; color:#64748b; font-size:10.5px; }
@media (max-width: 768px) {
  .board-head { flex-direction:column; align-items:stretch; }
  .board-meta { align-self:flex-start; }
  .board-toolbar { display:flex; flex-wrap:wrap; gap:8px; }
  .toolbar-spacer { display:none; }
  .table-scroll { margin-left:-4px; margin-right:-4px; padding-bottom:6px; }
  .sec-overview-table,.sec-table { min-width:920px; }
  .wl-compact-table { min-width:760px; }
  .sec-modal { width:min(96vw,560px); max-height:88vh; overflow-y:auto; }
  .wl-group-head { flex-direction:column; align-items:stretch; }
  .wl-group-actions { justify-content:flex-start; overflow-x:auto; }
}

/* ═══════════════════════════════════════════════
   自选股/ETF 引擎Δ角标 (红涨绿跌,跟板块个股看板一致)
   ═══════════════════════════════════════════════ */
.eng-deltas { margin-top: 2px; display: flex; gap: 2px; justify-content: center; }
.d-tag {
  display: inline-block;
  padding: 1px 4px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.4;
}
.d-tag.d-up   { background: rgba(248,113,113,.18); color: #fca5a5; }   /* 红涨 */
.d-tag.d-dn   { background: rgba(74,222,128,.14);  color: #168263; }   /* 绿跌 */
.d-tag.d-id   { background: rgba(255,255,255,.08); color: #64748b; }
.d-tag.d-na   { background: transparent; color: #64748b; }

/* ═══════════════════════════════════════════════
   ETF 云图(按今日涨跌):红涨绿跌,面积 = 涨跌幅绝对值
   ═══════════════════════════════════════════════ */
.etf-cloud-board {
  background: #ffffff;
  border: 1px solid #334155;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 18px;
}
.etf-cloud-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.etf-cloud-title { display: flex; align-items: center; gap: 8px; }
.etf-cloud-title-dot { width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; }
.etf-cloud-title-txt { color: #192942; font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.etf-cloud-badge2 { font-size: 11px; color: #8ea1bd; border: 1px solid #2e405e; background: #f8fafd; padding: 2px 8px; border-radius: 6px; }
.etf-cloud-count { font-size: 12px; color: #6f829d; }
.etf-cloud-stats { display: flex; gap: 12px; font-size: 12px; }
.etf-cloud-up { color: #c83d4b; }
.etf-cloud-dn { color: #168263; }
.etf-cloud-fl { color: #64748b; }
.etf-cloud-toolbar { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.etf-cloud-search { display: flex; align-items: center; gap: 6px; background: #f8fafd; border: 1px solid #2b3a53; border-radius: 8px; padding: 0 10px; height: 36px; }
.etf-cloud-search-ic { font-size: 13px; opacity: .7; }
.etf-cloud-search input { background: transparent; border: none; outline: none; color: #dbe7f8; font-size: 12px; width: 160px; }
.etf-cloud-search input::placeholder { color: #5f718a; }
.etf-cloud-btn { display: flex; align-items: center; gap: 5px; height: 36px; padding: 0 12px; font-size: 12px; color: #b5c2d5; background: #f8fafd; border: 1px solid #2b3a53; border-radius: 8px; cursor: pointer; transition: .15s; }
.etf-cloud-btn:hover { border-color: #425d85; background: #f8fafd; }
.etf-cloud-cats { display: flex; gap: 8px; margin-top: 12px; overflow-x: auto; padding-bottom: 2px; }
.etf-cloud-chip { white-space: nowrap; font-size: 12px; padding: 6px 12px; border-radius: 8px; border: 1px solid #2a3951; background: #f8fafd; color: #91a1b7; cursor: pointer; transition: .15s; }
.etf-cloud-chip:hover { border-color: #425d85; color: #d8e3f2; }
.etf-cloud-chip.is-active { border-color: #d89b28; background: #f8fafd; color: #ffc85c; box-shadow: 0 0 14px rgba(255,180,58,.12); }
.etf-cloud-legend { display: flex; align-items: center; gap: 6px; margin-top: 12px; font-size: 11px; color: #70819a; flex-wrap: wrap; }
.etf-cloud-swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.etf-cloud-sw-up { background: #7f1d1d; }
.etf-cloud-sw-up2 { background: #c83f54; }
.etf-cloud-sw-dn { background: #14532d; }
.etf-cloud-sw-dn2 { background: #16825e; }
.etf-cloud-legend-sep { opacity: .5; }
.etf-cloud-grid {
  display: grid; gap: 12px; margin-top: 14px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: 88px;
  grid-auto-flow: dense;
}
.etf-cloud-card {
  position: relative; overflow: hidden; border: 1px solid; border-radius: 12px;
  padding: 12px; text-align: left; cursor: pointer; color: #f4f7fc;
  font-family: inherit; font-size: 13px;
  transition: transform .2s cubic-bezier(.16,1,.3,1), box-shadow .2s, filter .2s;
}
.etf-cloud-card:hover { transform: translateY(-3px) scale(1.015); filter: brightness(1.1); box-shadow: 0 10px 24px rgba(0,0,0,.3); z-index: 5; }
.etf-cloud-card:focus { outline: none; box-shadow: 0 0 0 2px rgba(245,158,11,.7); }
.etf-cloud-deco { position: absolute; border: 1px solid rgba(255,255,255,.06); border-radius: 50%; pointer-events: none; }
.etf-cloud-deco-tr { width: 96px; height: 96px; top: -28px; right: -28px; }
.etf-cloud-deco-bl { width: 80px; height: 80px; bottom: -28px; left: -24px; }
.etf-cloud-inner { position: relative; display: flex; flex-direction: column; justify-content: space-between; height: 100%; }
.etf-cloud-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.etf-cloud-cat { max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 10px; color: rgba(215,227,239,.75); background: #f4f7fb; border: 1px solid rgba(255,255,255,.1); padding: 2px 6px; border-radius: 6px; }
.etf-cloud-badge { width: 24px; height: 24px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; border-radius: 6px; border: 1px solid rgba(255,255,255,.1); font-size: 12px; }
.etf-cloud-mid { margin-top: 4px; }
.etf-cloud-name { font-weight: 700; color: #f4f7fc; letter-spacing: .01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.etf-cloud-price-row { display: flex; align-items: baseline; gap: 6px; margin-top: 2px; }
.etf-cloud-price { font-family: 'SF Mono', Menlo, monospace; font-weight: 600; color: #f4f7fc; }
.etf-cloud-code { font-size: 10px; color: rgba(194,204,218,.65); }
.etf-cloud-code-sm { font-size: 10px; color: rgba(195,206,220,.65); font-family: 'SF Mono', Menlo, monospace; }
.etf-cloud-bottom { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; }
.etf-cloud-chg { font-family: 'SF Mono', Menlo, monospace; font-weight: 700; }
.etf-cloud-chg.etf-cloud-up { color: #fca5a5; }
.etf-cloud-chg.etf-cloud-dn { color: #86efac; }
.etf-cloud-chg.etf-cloud-flat { color: #a7b1c2; }
.etf-cloud-amt { font-size: 10px; margin-top: 1px; }
.etf-cloud-turn { text-align: right; }
.etf-cloud-turn-lbl { font-size: 10px; color: rgba(189,200,215,.6); }
.etf-cloud-turn-val { font-family: 'SF Mono', Menlo, monospace; font-size: 12px; color: rgba(220,229,240,.85); }
.etf-cloud-card.is-large .etf-cloud-name { font-size: 16px; }
.etf-cloud-card.is-large .etf-cloud-price { font-size: 18px; }
.etf-cloud-card.is-large .etf-cloud-chg { font-size: 18px; }
.etf-cloud-spin { display: inline-block; animation: etfCloudSpin .8s linear infinite; }
@keyframes etfCloudSpin { to { transform: rotate(360deg); } }
.etf-cloud-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; padding: 48px 0; color: #8ea0b8; font-size: 14px; }
.etf-cloud-empty-icon { font-size: 28px; opacity: .6; }
.etf-cloud-clear { margin-top: 6px; font-size: 12px; color: #a65a10; background: none; border: none; cursor: pointer; }
.etf-cloud-clear:hover { color: #ffd273; }

/* ════════════════════════════════════════════════
   周线走势图（自选股/ETF 共用） 2026-07-29
════════════════════════════════════════════════ */
/* 缩略图：嵌入今日涨跌单元格，数字在上、走势线在下 */
.trend-cell { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.trend-cell .trend-cell-num { font-family: 'SF Mono', Menlo, monospace; font-weight: 700; font-size: 12.5px; line-height: 1.1; }
.trend-spark { display: inline-flex; align-items: center; min-width: 96px; min-height: 30px; justify-content: flex-end; border-radius: 6px; padding: 1px 2px; transition: background .15s; }
.trend-spark.trend-ready:hover { background: rgba(96,165,250,.10); }
.trend-spark .trend-na { color: #475569; font-size: 12px; }

/* 弹窗 */
.trend-modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: #f4f7fb;
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.trend-modal {
  width: min(920px, 96vw);
  background: #f8fafd;
  border: 1px solid rgba(148,163,184,.18);
  border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0,0,0,.55);
  padding: 20px 22px 18px;
  animation: trendModalIn .22s cubic-bezier(.16,1,.3,1);
}
@keyframes trendModalIn { from { opacity: 0; transform: translateY(14px) scale(.98); } to { opacity: 1; transform: none; } }
.trend-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.trend-modal-title { font-size: 16px; font-weight: 800; color: #263751; letter-spacing: -.01em; }
.trend-modal-close {
  background: rgba(255,255,255,.05); border: 1px solid rgba(148,163,184,.18);
  color: #64748b; width: 30px; height: 30px; border-radius: 8px; cursor: pointer;
  font-size: 14px; line-height: 1; transition: all .15s;
}
.trend-modal-close:hover { background: rgba(248,113,113,.14); color: #fca5a5; border-color: rgba(248,113,113,.3); }

/* 顶部统计卡 */
.trend-modal-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px; margin-bottom: 16px;
}
.trend-stat {
  background: rgba(255,255,255,.03); border: 1px solid rgba(148,163,184,.12);
  border-radius: 11px; padding: 9px 12px;
}
.trend-stat-k { font-size: 10.5px; color: #64748b; margin-bottom: 3px; }
.trend-stat-v { font-size: 16px; font-weight: 800; font-family: 'SF Mono', Menlo, monospace; color: #263751; }
.trend-stat-v.sec-up { color: #c83d4b; }
.trend-stat-v.sec-dn { color: #168263; }
.trend-stat-s { font-size: 10px; color: #475569; margin-top: 2px; font-family: 'SF Mono', Menlo, monospace; }

.trend-modal-chart { height: 380px; position: relative; }
.trend-modal-chart canvas { width: 100% !important; height: 100% !important; }

@media (max-width: 640px) {
  .trend-modal-chart { height: 300px; }
  .trend-modal-stats { grid-template-columns: repeat(2, 1fr); }
}
