/* 缠论买卖点自动筛选 · 样式（浅色主题，涨红跌绿） */

:root {
  --bg: #f4f5f7;
  --card: #ffffff;
  --border: #e5e7eb;
  --text: #1f2937;
  --text-2: #6b7280;
  --text-3: #9ca3af;
  --up: #e11d48;      /* 涨 · 红 */
  --up-bg: #fdeef1;
  --down: #059669;    /* 跌 · 绿 */
  --down-bg: #e7f6f0;
  --brand: #9f1239;
  --brand-2: #be123c;
  --stroke: #4f6bd8;  /* 笔 */
  --pivot: #d97706;   /* 中枢 */
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 1px 2px rgba(16, 24, 40, 0.04);
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", sans-serif;
  font-size: 14px;
  line-height: 1.6;
}

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 18px;
  padding: 10px 22px;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark {
  /* 品牌标记用程序图标本身（红底白柱+箭头，与 exe / 标签页 favicon 同一张图），
     不再是「主」字，所以这里只负责框住 38×38 的图片。 */
  width: 38px; height: 38px; border-radius: 9px;
  overflow: hidden; flex: 0 0 38px;
  display: flex; align-items: center; justify-content: center;
}
.brand-mark img {
  width: 100%; height: 100%;
  display: block; object-fit: cover;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 15px; }
.brand-text small { font-size: 11px; color: var(--text-3); }

.search-box { position: relative; flex: 1; max-width: 420px; }
#searchInput {
  width: 100%; padding: 8px 14px;
  border: 1px solid var(--border); border-radius: 8px;
  font-size: 13px; background: #fafafa; outline: none;
  transition: border-color .15s, background .15s;
}
#searchInput:focus { border-color: var(--brand-2); background: #fff; }

.dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: #fff; border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 8px 24px rgba(16, 24, 40, .12);
  max-height: 320px; overflow-y: auto; z-index: 200;
}
.dropdown.hidden { display: none; }
.dropdown-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 9px 14px; cursor: pointer; font-size: 13px;
}
.dropdown-item:hover { background: #f8fafc; }
.dropdown-item .dd-code { color: var(--text-3); font-size: 12px; font-family: ui-monospace, monospace; }

.freq-select {
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
  background: #fafafa; font-size: 13px; cursor: pointer; outline: none;
}

.tabs { display: flex; gap: 4px; margin-left: auto; }
.tab {
  padding: 8px 16px; border: none; border-radius: 8px;
  background: transparent; color: var(--text-2);
  font-size: 14px; cursor: pointer; transition: all .15s;
}
.tab:hover { color: var(--text); background: #f3f4f6; }
.tab.active { color: var(--brand); background: var(--up-bg); font-weight: 600; }

/* ---------- 主区域 ---------- */
/* 不再固定 1480px：历史表有 28 列，宽屏留白纯浪费，改为跟随窗口宽度 */
main { max-width: none; margin: 0 auto; padding: 18px 22px 40px; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }

.card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: var(--shadow);
}

/* ---------- 个股分析 ---------- */
/* 左图右卡两栏：align-items 改 stretch，让左边的图表卡拉伸到与右侧
   评分/检查卡列同高（用户要求两边“持平”）。图表本体用 flex:1 吃掉
   剩余高度，右侧卡片加载完变高后由 app.js 里的 zhuChart.resize() 跟随。 */
.analysis-layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 16px;
  align-items: stretch;
}
.chart-card {
  padding: 16px 18px 12px; min-width: 0;
  display: flex; flex-direction: column;
}
/* 图表高度＝「屏幕高度减去页头/图例/滑块那些固定占位」，一屏放得下四格（K线/量/MACD/KDJ），
   不用滚动就能看全；窗口越矮图越矮，但保底 460px（再矮就不给低于这个，宁可整页滚一点）。
   250px ≈ 顶栏+子页签+图头+两行图例+外边距 */
.chart-card .chart { flex: none; height: clamp(460px, calc(100vh - 250px), 1200px); }
/* 图表不再被右栏拉高/压扁 → 两栏各按自身高度排（顶部对齐） */
.analysis-layout { align-items: start; }

.chart-header {
  display: flex; justify-content: space-between; align-items: baseline;
  flex-wrap: wrap; gap: 6px; margin-bottom: 8px;
}
.chart-title { display: flex; align-items: baseline; gap: 10px; }
.stock-name { font-size: 18px; font-weight: 700; }
.stock-code { font-size: 12px; color: var(--text-3); font-family: ui-monospace, monospace; }
.stock-price { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stock-change { font-size: 13px; font-weight: 600; }
.stock-meta { font-size: 12px; color: var(--text-3); }

/* 右上角：行情说明 + 图上叠加内容切换（MA / SAR / MA+SAR） */
.chart-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.chart-mode { display: inline-flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.chart-mode .zcm-btn {
  border: 0; border-right: 1px solid var(--border); background: var(--card);
  padding: 2px 9px; font-size: 11.5px; line-height: 1.7; color: var(--text-2);
  cursor: pointer; font-family: inherit; white-space: nowrap;
}
.chart-mode .zcm-btn:last-child { border-right: 0; }
.chart-mode .zcm-btn:hover { background: #f3f4f6; color: var(--text); }
.chart-mode .zcm-btn.active { background: var(--text-2); color: #fff; }
.chart-mode .zcm-btn.active:hover { background: var(--text); }

.chart { width: 100%; height: 560px; }

.legend {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 8px 2px 2px; font-size: 12px; color: var(--text-2);
}
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend-note { margin-left: auto; color: var(--text-3); }
.swatch { width: 16px; height: 3px; border-radius: 2px; display: inline-block; }
.swatch.stroke { background: var(--stroke); }
.swatch.pivot { background: rgba(217, 119, 6, .35); border: 1px solid var(--pivot); height: 10px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot.buy { background: var(--up); }
.dot.sell { background: var(--down); }
.dot.dead { background: #d1d5db; }

/* 侧栏 */
.side-col { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.side-card { padding: 14px 16px; }
.side-card h3 {
  font-size: 13px; color: var(--text-2); font-weight: 600;
  margin-bottom: 10px; display: flex; align-items: center; gap: 8px;
}
.badge {
  background: #f3f4f6; color: var(--text-2); border-radius: 10px;
  font-size: 11px; padding: 1px 8px; font-weight: 500;
}

.latest-signal .ls-type {
  font-size: 20px; font-weight: 700; margin-bottom: 2px;
}
.latest-signal .ls-type.buy { color: var(--up); }
.latest-signal .ls-type.sell { color: var(--down); }
.latest-signal .ls-row { display: flex; justify-content: space-between; font-size: 13px; padding: 3px 0; }
.latest-signal .ls-row .k { color: var(--text-3); }
.latest-signal .ls-row .v { font-variant-numeric: tabular-nums; }
.latest-signal .ls-desc { font-size: 12px; color: var(--text-2); margin-top: 6px; }
.latest-signal.empty { color: var(--text-3); font-size: 13px; padding: 12px 0; }

.signal-list { max-height: 300px; overflow-y: auto; }
.signal-item {
  display: grid; grid-template-columns: 74px 1fr auto; gap: 8px;
  align-items: center; padding: 8px 6px; border-radius: 8px;
  border-bottom: 1px dashed #f0f1f3; font-size: 12px; cursor: pointer;
}
.signal-item:hover { background: #fafafa; }
.signal-item .si-date { color: var(--text-2); font-variant-numeric: tabular-nums; }
.signal-item .si-name { font-weight: 600; }
.signal-item .si-name.buy { color: var(--up); }
.signal-item .si-name.sell { color: var(--down); }
.signal-item .si-price { font-variant-numeric: tabular-nums; }
.signal-item.dead { opacity: .55; }
.signal-item.dead .si-name { color: var(--text-3); text-decoration: line-through; }
.signal-item .si-str {
  font-size: 11px; color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.structure-stats { font-size: 13px; }
.structure-stats .row {
  display: flex; justify-content: space-between; padding: 4px 0;
  border-bottom: 1px dashed #f0f1f3;
}
.structure-stats .row:last-child { border-bottom: none; }
.structure-stats .k { color: var(--text-3); }
.structure-stats .v { font-variant-numeric: tabular-nums; }
.pos-above { color: var(--up); font-weight: 600; }
.pos-below { color: var(--down); font-weight: 600; }
.pos-inside { color: var(--pivot); font-weight: 600; }

/* ---------- 自动选股 ---------- */
.screener-card { padding: 18px 20px; }
.screener-controls {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 14px;
}
/* 五步选股：日/周/月筛选分段按钮 */
.zfreq-group {
  display: inline-flex; border: 1px solid var(--border);
  border-radius: 8px; overflow: hidden; background: #fff;
}
.zfreq-btn {
  padding: 8px 14px; border: none; background: transparent;
  color: var(--text-2); font-size: 13px; cursor: pointer;
  border-right: 1px solid var(--border);
  transition: background .12s, color .12s;
}
.zfreq-btn:last-child { border-right: none; }
.zfreq-btn:hover:not(.active) { background: #f8fafc; color: var(--brand); }
.zfreq-btn.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-weight: 700;
}
.btn-primary {
  padding: 9px 22px; border: none; border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
  transition: opacity .15s, transform .1s;
}
.btn-primary:hover { opacity: .92; }
.btn-primary:active { transform: scale(.98); }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.type-filters { display: flex; gap: 10px; flex-wrap: wrap; }
.type-filters label {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; cursor: pointer; user-select: none;
}
.type-filters input { accent-color: var(--brand); }
.type-filters .t.buy { color: var(--up); font-weight: 600; }
.type-filters .t.sell { color: var(--down); font-weight: 600; }

.recent-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; color: var(--text-2); cursor: pointer; user-select: none;
}
.recent-toggle input { accent-color: var(--brand); }

.scan-status { font-size: 12px; color: var(--text-2); margin-left: auto; }
.scan-status.loading::after {
  content: ""; display: inline-block; width: 12px; height: 12px;
  border: 2px solid var(--border); border-top-color: var(--brand);
  border-radius: 50%; margin-left: 8px; vertical-align: -2px;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 历史记录：切换日期/周期后的居中加载遮罩（半透明，带旋转圆圈） */
.hist-loading {
  position: fixed; inset: 0; z-index: 200;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px;
  background: rgba(244, 245, 247, 0.55);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.hist-loading[hidden] { display: none; }
.hl-spin {
  width: 44px; height: 44px; border-radius: 50%;
  border: 3px solid rgba(159, 18, 57, 0.16);
  border-top-color: var(--brand);
  animation: spin .8s linear infinite;
}
.hl-text { font-size: 13px; color: var(--text-2); letter-spacing: .5px; }

/* ---------- 「更新」方式选择弹窗 ---------- */
.upd-modal {
  position: fixed; inset: 0; z-index: 210;
  display: flex; align-items: center; justify-content: center;
  background: rgba(15, 23, 42, 0.38);
}
.upd-modal[hidden] { display: none; }
.upd-card {
  width: min(480px, 92vw); max-height: 84vh; overflow-y: auto;
  background: #fff; border-radius: 14px; padding: 18px 20px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.22);
}
.upd-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.upd-head h3 { margin: 0; font-size: 16px; }
.upd-x {
  border: 0; background: none; font-size: 22px; line-height: 1;
  color: var(--text-2); cursor: pointer; padding: 2px 8px; border-radius: 8px;
}
.upd-x:hover { background: #f3f4f6; }
.upd-opt {
  display: block; width: 100%; text-align: left; cursor: pointer;
  border: 1px solid var(--border); border-radius: 10px;
  background: #fafafa; padding: 11px 14px; margin: 8px 0;
}
.upd-opt:hover { border-color: var(--brand); background: #fff; }
.upd-opt b { display: block; font-size: 14px; margin-bottom: 3px; }
.upd-opt span { display: block; font-size: 12px; color: var(--text-2); }
.upd-range {
  display: flex; gap: 14px; margin: 8px 0;
  font-size: 13px; color: var(--text-2);
}
.upd-range input,
.upd-code input {
  border: 1px solid var(--border); border-radius: 8px; padding: 4px 8px;
  font-size: 13px;
}
.upd-code { margin: 4px 0 8px; font-size: 13px; color: var(--text-2); }
.upd-code input { width: 160px; }
/* 提交前回显真实区间，防止「界面显示到 10-30、实际只补到 10-09」这类误操作 */
.upd-hint {
  margin: -2px 0 8px; padding: 6px 10px; border-radius: 8px;
  background: var(--bg-2, #f6f7f9); font-size: 12.5px; color: var(--text-2);
  line-height: 1.5;
}
#updRun { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 14px 0 4px; }
#updRun[hidden] { display: none; }
.upd-bar {
  width: 100%; height: 8px; border-radius: 4px; overflow: hidden;
  background: #eef0f3;
}
.upd-bar > div {
  height: 100%; width: 0; border-radius: 4px;
  background: var(--brand); transition: width .6s ease;
}

.table-wrap { overflow-x: auto; }
.scan-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.scan-table th {
  text-align: left; padding: 9px 10px; color: var(--text-2);
  font-weight: 600; font-size: 12px; white-space: nowrap;
  border-bottom: 1px solid var(--border); background: #fafafa;
}
.scan-table td {
  padding: 9px 10px; border-bottom: 1px solid #f3f4f6;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
/* 只有「代码 / 名称」两格是链接（手型 + 虚下划线）；整行不跳，
   所以行光标保持默认，免得点哪都以为能进个股分析 */
.scan-table tbody tr { cursor: default; transition: background .12s; }
.scan-table tbody tr:hover { background: #f8fafc; }
.scan-table .placeholder td {
  text-align: center; color: var(--text-3); padding: 40px 0; cursor: default;
}
.scan-table .num { text-align: right; }
.scan-table .sig-buy { color: var(--up); font-weight: 600; }
.scan-table .sig-sell { color: var(--down); font-weight: 600; }
.scan-table .chg-up { color: var(--up); }
.scan-table .chg-down { color: var(--down); }
.scan-note { font-size: 12px; color: var(--text-3); margin-top: 12px; }

/* ---------- 信号说明 ---------- */
.about-card { padding: 24px 28px; max-width: 900px; }
.about-card h2 {
  font-size: 16px; margin: 22px 0 12px; padding-left: 10px;
  border-left: 3px solid var(--brand);
}
.about-card h2:first-child { margin-top: 0; }
.def-table, .algo-list { width: 100%; }
.def-table { border-collapse: collapse; font-size: 13px; }
.def-table th, .def-table td {
  border: 1px solid var(--border); padding: 8px 12px; text-align: left;
  vertical-align: top;
}
.def-table th { background: #fafafa; color: var(--text-2); font-weight: 600; }
.def-table td.buy { color: var(--up); font-weight: 600; white-space: nowrap; }
.def-table td.sell { color: var(--down); font-weight: 600; white-space: nowrap; }
.algo-list { padding-left: 20px; font-size: 13.5px; }
.algo-list li { margin-bottom: 8px; }
.algo-note { font-size: 13px; color: var(--text-2); background: #fafafa;
  border: 1px dashed var(--border); border-radius: 8px; padding: 10px 14px; margin-top: 10px; }
.about-card p { font-size: 13.5px; margin-bottom: 8px; }
.disclaimer {
  background: #fffbeb; border: 1px solid #fde68a; color: #92400e;
  border-radius: 8px; padding: 12px 16px; font-size: 13px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 1080px) {
  .analysis-layout { grid-template-columns: 1fr; }
  /* 窄屏单列堆叠时不再追求两栏同高，图表回到固定高度 */
  .chart { height: 480px; }
  .chart-card .chart { flex: none; height: 480px; min-height: 0; }
}
@media (max-width: 760px) {
  .topbar { flex-wrap: wrap; gap: 10px; padding: 10px 12px; }
  .search-box { max-width: none; order: 3; flex-basis: 100%; }
  .tabs { margin-left: 0; }
  /* 手机端：去掉大留白，内容撑满屏宽；图表不要僵成又高又窄的一条 */
  main { padding: 12px 12px 32px; }
  .analysis-layout { grid-template-columns: 1fr; gap: 12px; }
  .chart-card { padding: 12px 8px 10px; }
  .side-card { padding: 14px 12px; }
  .chart { height: 360px; }
  .chart-card .chart { flex: none; height: 360px; }
  .chart-header { gap: 4px; }
  .stock-name { font-size: 16px; }
}

/* ---------- 朱家泓主控战略 ---------- */
.zhu-subnav {
  display: flex; gap: 6px; margin-bottom: 16px;
  border-bottom: 1px solid var(--border); padding-bottom: 0;
}
.ztab {
  padding: 8px 18px; border: none; background: transparent;
  color: var(--text-2); font-size: 14px; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.ztab:hover { color: var(--text); }
.ztab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

/* 直达个股分析页：右上角的「✕ 关闭」按钮，推到子导航最右边 */
.zhu-subnav .zhu-close { margin-left: auto; }
.zhu-subnav .zhu-close:hover { color: var(--up); border-bottom-color: var(--up); }

.zsub-panel { display: none; }
.zsub-panel.active { display: block; }

.zhu-filter-note { font-size: 12px; color: var(--text-2); }

/* 主图可点击：点 K 线跳到那天的快照 */
#zhuChart { cursor: pointer; }

/* 综合评分 */
/* 历史快照角标：这一屏分数是选中日收盘的状态 */
.zhu-score .zs-asof {
  display: inline-block; margin-bottom: 6px; padding: 2px 8px;
  font-size: 11.5px; line-height: 1.6; border-radius: 10px;
  color: #92400e; background: #fef3c7; border: 1px solid #fcd34d;
  white-space: nowrap;
}
.zhu-score .zs-num {
  font-size: 44px; font-weight: 800; line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.zhu-score .zs-advice { font-size: 16px; font-weight: 700; margin: 2px 0 4px; }
.zhu-score .zs-detail { font-size: 12px; color: var(--text-2); line-height: 1.5; }
/* 历史短（上市较晚）的降级评分提示：分数旁的 * 与一行说明 */
.zhu-score .score-short { color: #d97706; font-size: 12px; margin-left: 2px; cursor: help; }
.zhu-score .zs-short {
  font-size: 11.5px; color: #b45309; background: rgba(217, 119, 6, .1);
  border-left: 2px solid #d97706; padding: 3px 6px; margin: 4px 0; line-height: 1.5;
  border-radius: 0 4px 4px 0;
}
.zhu-score .zs-bar {
  display: flex; height: 8px; border-radius: 4px; overflow: hidden;
  margin: 10px 0 6px; background: #f3f4f6;
}
.zhu-score .zs-bar span { display: block; height: 100%; }
/* 全栏目评分条：13 个维度各占一段（段宽=该维度满分占比），
   段内填充部分=实得分比例，浅灰是这一维度还差的那部分。 */
.zhu-score .zs-bar-seg { gap: 1px; }
.zhu-score .zs-bar-seg .zs-seg {
  display: block; height: 100%; background: #e5e7eb; overflow: hidden;
}
.zhu-score .zs-bar-seg .zs-seg i { display: block; height: 100%; }
.zhu-score .zs-legend { font-size: 11px; color: var(--text-3); line-height: 1.7; }
.zhu-score .zs-legend-wrap { display: flex; flex-wrap: wrap; gap: 3px 8px; }
.zhu-score .zs-legend-wrap span { white-space: nowrap; }
.zhu-score.empty { color: var(--text-3); font-size: 13px; padding: 12px 0; }

/* 全栏目检查清单 */
.zhu-steps { display: flex; flex-direction: column; gap: 8px; }
.zstep {
  display: grid; grid-template-columns: 26px 1fr; gap: 8px;
  padding: 9px 10px; border-radius: 8px; background: #fafafa;
  border: 1px solid #f0f1f3;
}
.zstep .zs-icon {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 700; color: #fff;
}
.zstep.pass .zs-icon { background: var(--up); }
.zstep.fail .zs-icon { background: #d1d5db; }
.zstep.warn .zs-icon { background: var(--pivot); }
.zstep .zs-name { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
.zstep.pass .zs-name { color: var(--up); }
/* 检查项右侧的得分徽标：该项当前得分/满分（综合评分的加分规则） */
.zstep .zs-pts {
  display: inline-block; margin-left: 6px; padding: 0 6px;
  border-radius: 8px; font-size: 11px; font-weight: 600;
  background: #ecfdf5; color: #059669; vertical-align: 1px;
}
.zstep.fail .zs-pts { background: #fef2f2; color: #dc2626; }
.zstep.warn .zs-pts { background: #fffbeb; color: #d97706; }
/* 综合评分卡最下面的计算式说明 */
.zhu-score .zs-calc {
  margin-top: 8px; padding-top: 6px; border-top: 1px dashed var(--border);
  font-size: 11px; color: var(--text-2);
}
.zstep .zs-detail { font-size: 12px; color: var(--text-2); line-height: 1.5; }

/* 选股结果表 */
.zhu-table td { font-size: 12.5px; }
.zhu-table .sel { font-weight: 700; }
.zhu-table .sel-yes { color: var(--up); }
.zhu-table .sel-no { color: var(--text-3); }
.zhu-table .score-hi { color: var(--up); font-weight: 700; }
.zhu-table .score-mid { color: var(--pivot); font-weight: 700; }
.zhu-table .score-lo { color: var(--text-2); }

/* 页脚 */
.page-footer {
  max-width: none; margin: 0 auto; padding: 6px 22px 22px;
  display: flex; gap: 14px; align-items: center; flex-wrap: wrap;
  font-size: 11px; color: var(--text-3);
}
.page-footer .ver {
  background: #eef2f7; color: #64748b; border-radius: 4px;
  padding: 1px 6px; font-family: ui-monospace, monospace;
}

/* ---------- DeepSeek 战法 ---------- */
.dstab {
  padding: 8px 18px; border: none; background: transparent;
  color: var(--text-2); font-size: 14px; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.dstab:hover { color: var(--text); }
.dstab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

.dsub-panel { display: none; }
.dsub-panel.active { display: block; }

.ds-h3 {
  font-size: 15px; font-weight: 700; margin-bottom: 12px;
  display: flex; align-items: center; gap: 8px;
}
.chart-half { height: 300px; width: 100%; }

/* 结论卡 */
.ds-verdict.empty { color: var(--text-3); font-size: 13px; padding: 10px 0; }
.ds-verdict .dv-tag {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  font-size: 13px; font-weight: 700; color: #fff; background: #9ca3af;
  margin-bottom: 8px;
}
.ds-verdict.go .dv-tag { background: var(--up); }
.ds-verdict.watch .dv-tag { background: var(--pivot); }
.ds-verdict.no .dv-tag { background: #9ca3af; }
.ds-verdict .dv-reason { font-size: 12.5px; color: var(--text-2); line-height: 1.65; }
.ds-verdict .dv-note {
  margin-top: 8px; font-size: 11.5px; color: var(--text-3);
  border-top: 1px dashed var(--border); padding-top: 8px; line-height: 1.6;
}

/* 交易计划 */
.ds-plan .dp-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 5px 0; font-size: 12.5px; border-bottom: 1px dashed #f1f3f5;
}
.ds-plan .dp-row:last-child { border-bottom: none; }
.ds-plan .dp-key { color: var(--text-2); }
.ds-plan .dp-val { font-weight: 700; font-variant-numeric: tabular-nums; }
.ds-plan .dp-val.up { color: var(--up); }
.ds-plan .dp-val.down { color: var(--down); }
.ds-plan .dp-empty { color: var(--text-3); font-size: 12.5px; padding: 8px 0; line-height: 1.65; }
.ds-plan .dp-hint {
  margin-top: 8px; font-size: 11.5px; color: var(--text-3);
  background: #f8fafc; border-radius: 5px; padding: 7px 9px; line-height: 1.6;
}

/* 条件清单 */
.ds-conditions .dc-item {
  display: flex; gap: 8px; padding: 6px 0; font-size: 12.5px;
  border-bottom: 1px dashed #f1f3f5;
}
.ds-conditions .dc-item:last-child { border-bottom: none; }
.ds-conditions .dc-icon {
  flex: 0 0 16px; height: 16px; border-radius: 50%; color: #fff;
  font-size: 10px; line-height: 16px; text-align: center; margin-top: 2px;
  background: #d1d5db;
}
.ds-conditions .dc-item.pass .dc-icon { background: var(--up); }
.ds-conditions .dc-item.fail .dc-icon { background: #d1d5db; }
.ds-conditions .dc-name { font-weight: 600; }
.ds-conditions .dc-detail { color: var(--text-2); font-size: 11.5px; line-height: 1.55; }

/* 回测指标卡 */
.ds-bt-stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 10px; margin-bottom: 14px;
}
.ds-metric {
  background: #fafbfc; border: 1px solid var(--border);
  border-radius: 8px; padding: 10px 12px;
}
.ds-metric .dm-label { font-size: 11px; color: var(--text-2); }
.ds-metric .dm-value {
  font-size: 21px; font-weight: 800; line-height: 1.25;
  font-variant-numeric: tabular-nums;
}
.ds-metric .dm-sub { font-size: 11px; color: var(--text-3); }
.ds-metric .dm-value.up { color: var(--up); }
.ds-metric .dm-value.down { color: var(--down); }
.ds-metric .dm-value.warn { color: var(--pivot); }

/* 全池汇总 */
.ds-summary-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px; margin: 14px 0;
}
.ds-summary-empty { color: var(--text-3); font-size: 13px; padding: 10px 0; }

.ds-yearly { margin: 14px 0; }
.ds-yearly table {
  width: 100%; border-collapse: collapse; font-size: 12.5px;
}
.ds-yearly th {
  text-align: left; padding: 7px 10px; color: var(--text-2);
  font-weight: 600; border-bottom: 1px solid var(--border); font-size: 11.5px;
}
.ds-yearly td {
  padding: 7px 10px; border-bottom: 1px solid #f3f4f6;
  font-variant-numeric: tabular-nums;
}
.ds-yearly tr:last-child td { border-bottom: none; }
.ds-yearly .y-neg { color: var(--down); font-weight: 700; }
.ds-yearly .y-pos { color: var(--up); font-weight: 700; }

/* 立场说明块 */
.ds-stance {
  background: #fffbeb; border-left: 4px solid var(--pivot);
  border-radius: 6px; padding: 14px 16px; margin: 16px 0 22px;
  font-size: 13.5px; line-height: 1.8; color: #78350f;
}
.ds-stance strong { color: #92400e; }

@media (max-width: 760px) {
  .zhu-subnav { flex-wrap: wrap; }
  .dstab, .ztab { padding: 7px 12px; font-size: 13px; }
  .ds-bt-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- 全市场扫描 ---------- */
.tabs { flex-wrap: wrap; justify-content: flex-end; }

.market-head {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 16px; flex-wrap: wrap; margin-bottom: 14px;
}
.market-title {
  font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 10px;
}
.market-badge {
  font-size: 11px; font-weight: 500; color: var(--brand);
  background: var(--up-bg); border-radius: 999px; padding: 2px 9px;
}
.market-meta { font-size: 12px; color: var(--text-2); margin-top: 5px; line-height: 1.6; }
.market-actions { display: flex; align-items: center; gap: 10px; }

.btn-ghost {
  padding: 7px 16px; border-radius: 8px; cursor: pointer;
  border: 1px solid var(--border); background: #fff; color: var(--text);
  font-size: 13px; transition: all .15s;
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-ghost:disabled { opacity: .5; cursor: not-allowed; }

.market-progress { font-size: 12px; color: var(--pivot); font-weight: 600; }

.market-stats { margin-bottom: 12px; }

.market-filters {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 0 12px; border-top: 1px solid var(--border);
}
.market-search {
  flex: 0 0 200px; padding: 7px 11px; font-size: 13px;
  border: 1px solid var(--border); border-radius: 8px; outline: none;
}
.market-search:focus { border-color: var(--brand); }
.market-select {
  padding: 7px 10px; font-size: 13px; border-radius: 8px;
  border: 1px solid var(--border); background: #fff; color: var(--text);
  outline: none; cursor: pointer;
}
.market-check {
  display: flex; align-items: center; gap: 5px;
  font-size: 12.5px; color: var(--text-2); cursor: pointer; user-select: none;
}
.market-check input { cursor: pointer; }
.market-count { margin-left: auto; font-size: 12px; color: var(--text-2); }

/* 历史工具栏：日期选择器改成自绘月历（原生日历没法给个别日期加粗），
   有存档的日期加粗、没存档的灰色；下方是“更新”按钮的结果提示。 */
.hcal { position: relative; display: inline-block; }
.hcal-btn {
  display: inline-flex; align-items: center; gap: 6px;
  font-variant-numeric: tabular-nums; min-width: 132px;
  justify-content: space-between;
}
.hcal-btn:hover { border-color: var(--brand); }
.hcal-ico { color: var(--text-2); flex: 0 0 auto; }
.hcal-pop {
  position: absolute; z-index: 60; top: calc(100% + 6px); left: 0;
  width: 258px; padding: 10px 10px 8px;
  background: #fff; border: 1px solid var(--border); border-radius: 12px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, .14);
  user-select: none;
}
.hcal-pop[hidden] { display: none; }
.hcal-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 6px;
}
.hcal-nav {
  width: 26px; height: 26px; border: 1px solid var(--border); border-radius: 7px;
  background: #fff; color: var(--text-2); font-size: 15px; line-height: 1;
  cursor: pointer; padding: 0;
}
.hcal-nav:hover { border-color: var(--brand); color: var(--brand); }
.hcal-title { font-size: 13px; font-weight: 700; color: var(--text); }
.hcal-week, .hcal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px;
}
.hcal-week span {
  text-align: center; font-size: 11px; color: var(--text-3);
  padding: 3px 0 4px; font-weight: 600;
}
/* 月历模式：12 个月按 3×4 网格排列（历史记录页已改为纯月线） */
.hcal-grid-month {
  grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 2px 0;
}
.hcal-month {
  height: 34px; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--border); background: #fff; border-radius: 8px; padding: 0;
  font-size: 13px; color: var(--text-3); cursor: pointer;
  font-variant-numeric: tabular-nums; font-weight: 400;
}
.hcal-month.has-data { color: var(--text); font-weight: 800; border-color: var(--brand); }
/* 没存档的月份：虚线边框 + 灰字，但仍可点（点了就选中该月并弹出“更新”现算） */
.hcal-month.no-data { border-style: dashed; color: var(--text-3); }
.hcal-month:hover { background: #f1f5f9; border-color: var(--brand); }
.hcal-month.no-data:hover { border-style: solid; color: var(--text); }
.hcal-month.is-sel {
  background: var(--brand); color: #fff !important; font-weight: 800;
  border-color: var(--brand); box-shadow: 0 2px 6px rgba(37, 99, 235, .28);
}
.hcal-day {
  height: 30px; display: flex; align-items: center; justify-content: center;
  border: 0; background: transparent; border-radius: 7px; padding: 0;
  font-size: 12.5px; color: var(--text-3); cursor: pointer;
  font-variant-numeric: tabular-nums; font-weight: 400;
}
/* 有存档：加粗加黑，一眼能看出哪几天有数据 */
.hcal-day.has-data { color: var(--text); font-weight: 800; }
.hcal-day:hover { background: #f1f5f9; }
.hcal-day.is-weekend.has-data { color: var(--brand); }
/* 当前选中：实心块 */
.hcal-day.is-sel {
  background: var(--brand); color: #fff !important;
  font-weight: 800; box-shadow: 0 2px 6px rgba(37, 99, 235, .28);
}
.hcal-day.is-today:not(.is-sel) { box-shadow: inset 0 0 0 1.5px var(--brand); }
.hcal-day.is-blank { visibility: hidden; cursor: default; }
.hcal-foot {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 8px;
  margin-top: 6px; padding-top: 6px; border-top: 1px solid var(--border);
}
.hcal-tip { font-size: 11px; color: var(--text-3); flex: 1 1 auto; line-height: 1.35; }
.hcal-tip b { color: var(--text); }
.hcal-link {
  border: 0; background: transparent; color: var(--brand);
  font-size: 12px; font-weight: 700; cursor: pointer; padding: 2px 4px;
  flex: 0 0 auto; white-space: nowrap;
}
.hcal-link:hover { text-decoration: underline; }
.hc-msg { font-size: 11.5px; color: var(--text-2); max-width: 340px; line-height: 1.35; }
.hc-msg:empty { display: none; }

.market-table td { font-variant-numeric: tabular-nums; }

/* 历史表已到 32 列：放弃“挤进一屏”，全部完整显示——
     · 单元格一律 nowrap，不做省略号截断（之前 m-sub/hist-ind/avoid-tip 的
       max-width 截断让文字看不全，用户反馈明确不要）
     · 表头也 nowrap，与列对齐
     · 整表自然宽度超出屏幕时由 .table-wrap 的 overflow-x 横向滚动 */
.market-table th {
  white-space: nowrap; line-height: 1.25;
  font-size: 11px; padding: 7px 6px; vertical-align: bottom;
}
.market-table td { padding: 7px 6px; white-space: nowrap; }
.market-table tbody tr { cursor: default; }
.market-table tbody tr:hover { background: #f8fafc; }
.market-table .m-rank {
  color: var(--text-3); font-size: 11.5px; font-weight: 600;
}
.market-table .m-score {
  font-weight: 800; font-size: 14px;
}
.market-table .m-score.hi { color: var(--up); }
.market-table .m-score.mid { color: var(--pivot); }
.market-table .m-score.lo { color: var(--text-2); font-weight: 600; }
/* 旧判准快照的评分：虚线下划线提示「与现在的评分不可比」 */
.market-table .m-score.score-old {
  text-decoration: underline dotted #9ca3af; text-underline-offset: 3px;
}
/* 月线不足 70 根的降级评分（2019 年后上市）：右上角小星号 */
.market-table .score-short {
  color: #d97706; font-size: 11px; margin-left: 1px; cursor: help;
}
.market-table .m-sub { font-size: 11px; color: var(--text-3); }
.market-table .m-tag {
  display: inline-block; font-size: 11px; padding: 1px 7px;
  border-radius: 999px; background: #f3f4f6; color: var(--text-2);
}
.market-table .m-tag.a { background: var(--up-bg); color: var(--up); font-weight: 700; }
.market-table .m-tag.b { background: #fef3c7; color: #92400e; }
.market-table .m-conflict {
  font-size: 10px; color: var(--pivot); border: 1px solid #fcd34d;
  border-radius: 4px; padding: 0 4px; margin-left: 3px;
}

.market-pager {
  display: flex; align-items: center; justify-content: center;
  gap: 6px; padding: 14px 0 4px; flex-wrap: wrap;
}
.market-pager button {
  min-width: 32px; height: 30px; padding: 0 9px; border-radius: 7px;
  border: 1px solid var(--border); background: #fff; color: var(--text-2);
  font-size: 12.5px; cursor: pointer; transition: all .12s;
}
.market-pager button:hover:not(:disabled) { border-color: var(--brand); color: var(--brand); }
.market-pager button.active {
  background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 700;
}
.market-pager button:disabled { opacity: .4; cursor: not-allowed; }
.market-pager .pg-info { font-size: 12px; color: var(--text-2); margin: 0 8px; }

@media (max-width: 1080px) {
  .market-search { flex: 1 1 140px; }
  .market-count { margin-left: 0; flex-basis: 100%; }
}

/* ---------- 全市场：子页签与历史记录 ---------- */
.mktab {
  padding: 8px 18px; border: none; background: transparent;
  color: var(--text-2); font-size: 14px; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  transition: color .15s, border-color .15s;
}
.mktab:hover { color: var(--text); }
.mktab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }

.msub-panel { display: none; }
.msub-panel.active { display: block; }

.history-controls {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 0 14px; border-top: 1px solid var(--border); margin-bottom: 6px;
}
.hc-label { font-size: 12.5px; color: var(--text-2); }
.history-controls .market-select { min-width: 110px; }
/* 行业下拉：行业名长短不一，给个上限免得把搜索框挤走；选中「全部行业」时保持窄一点 */
.history-controls #histIndustry { min-width: 128px; max-width: 190px; }
.history-controls #histIndustry:disabled { opacity: .55; cursor: default; }
.history-controls #histMeta { font-size: 12px; color: var(--text-2); }
/* 没有说明文字时整块不占位（flex 里留个空 span 会多出一段 gap） */
.history-controls #histMeta:empty { display: none; }

/* ---------- 历史记录：分页条 ---------- */
.table-pager {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-top: 10px; padding: 8px 12px;
  border: 1px solid var(--border); border-radius: 10px; background: #fafafa;
}
.table-pager[hidden] { display: none; }
.table-pager .tp-info { font-size: 12px; color: var(--text-2); }
.table-pager .tp-size {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; color: var(--text-2);
}
.table-pager .tp-size .market-select { min-width: 68px; padding: 3px 6px; font-size: 12px; }
.table-pager .tp-nav {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.table-pager .tp-btn { padding: 3px 10px; font-size: 12px; border-radius: 7px; }
.table-pager .tp-num {
  min-width: 58px; text-align: center; font-size: 12px; font-weight: 600;
  color: var(--text); font-variant-numeric: tabular-nums;
}
.table-pager .tp-jump {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; color: var(--text-2);
}
.table-pager .tp-input {
  width: 58px; padding: 3px 6px; font-size: 12px; text-align: center;
  border: 1px solid var(--border); border-radius: 7px; outline: none;
}
.table-pager .tp-input:focus { border-color: var(--brand); }

/* ---------- 历史记录：栏目设置（勾选要显示的列） ---------- */
.hc-colset { position: relative; margin-left: auto; }
.hc-colset .btn-ghost { padding: 6px 14px; font-size: 13px; }
.hc-colset .btn-ghost.on { border-color: var(--brand); color: var(--brand); }
/* 有列被隐藏时给按钮一点提示色，避免“怎么少了几列”找不到原因 */
.hc-colset .btn-ghost.filtered { border-color: var(--brand); color: var(--brand); background: #f5f7ff; }

.col-panel {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 60;
  width: 220px; padding: 8px 10px 7px;
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, .14), 0 2px 6px rgba(15, 23, 42, .06);
}
.col-panel[hidden] { display: none; }
.col-panel .cp-head {
  font-size: 12px; color: var(--text-3); padding: 0 2px 6px;
  border-bottom: 1px solid var(--border);
}
.col-panel .cp-list {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px 6px;
  max-height: 292px; overflow-y: auto; padding: 6px 0;
}
.col-panel .cp-item {
  display: flex; align-items: center; gap: 5px; padding: 3px 2px;
  font-size: 12.5px; color: var(--text); white-space: nowrap;
  border-radius: 6px; cursor: pointer;
}
.col-panel .cp-item:hover { background: #f5f8fc; }
.col-panel .cp-item input { margin: 0; cursor: pointer; }
.col-panel .cp-foot {
  display: flex; gap: 8px; padding-top: 6px;
  border-top: 1px solid var(--border);
}
.col-panel .cp-act {
  flex: 1; padding: 4px 0; font-size: 12px; cursor: pointer;
  border: none; border-radius: 6px; background: #f3f4f6; color: var(--text-2);
}
.col-panel .cp-act:hover { background: #e8ecf3; color: var(--brand); }

.hist-state {
  display: inline-block; font-size: 11px; padding: 1px 8px;
  border-radius: 999px; font-weight: 600;
}
.hist-state.hit { background: var(--up-bg); color: var(--up); }
.hist-state.stop { background: var(--down-bg); color: var(--down); }
.hist-state.hold { background: #f3f4f6; color: var(--text-2); }
.hist-state.na { background: #f9fafb; color: var(--text-3); }

.market-table .m-chg { font-weight: 700; font-variant-numeric: tabular-nums; }

@media (max-width: 760px) {
  .history-controls { gap: 8px; }
  .history-controls .market-select { flex: 1 1 90px; min-width: 0; }
}

/* ---------- 历史记录：可排序表头 ---------- */
.market-table th.sortable {
  cursor: pointer; user-select: none; white-space: nowrap;
  transition: color .12s;
}
.market-table th.sortable:hover { color: var(--brand); }
.market-table th.sortable::after {
  content: "⇅"; font-size: 9px; opacity: .3; margin-left: 3px;
}
.market-table th.sortable.asc::after { content: "▲"; opacity: 1; color: var(--brand); }
.market-table th.sortable.desc::after { content: "▼"; opacity: 1; color: var(--brand); }

/* 历史记录：入选 / 观察 类型标签 */
.hist-type {
  display: inline-block; font-size: 11px; padding: 1px 7px;
  border-radius: 999px; font-weight: 600; white-space: nowrap;
}
.hist-type.sel { background: var(--up-bg); color: var(--up); }
.hist-type.watch { background: #f1f5f9; color: var(--text-2); }
/* SAR 战法池：与「入选」同色系但描边区分——它不按评分入选，只是 SAR 型态命中 */
.hist-type.sar { background: var(--up-bg); color: var(--up); box-shadow: inset 0 0 0 1px currentColor; }

/* 历史记录：前 20 日炸板标记（炸板=橙，仙人指路=红，悬停看具体日期） */
.blast-badge {
  display: inline-block; font-size: 11px; padding: 1px 7px; font-weight: 600;
  border-radius: 999px; white-space: nowrap; cursor: help;
  background: #fff7ed; color: #c2410c; border: 1px solid #fed7aa;
}
.blast-badge.xr { background: var(--up-bg); color: var(--up); border-color: transparent; }

/* 历史记录 · SAR 序列：BSB（大前日买→前日卖→昨日买）是 SAR 战法入池的标准型态，
   洗盘后立刻翻回多，比其他序列更值得注意，单独标出来 */
.sar-bsb {
  display: inline-block; font-size: 11px; padding: 1px 7px; font-weight: 700;
  border-radius: 999px; white-space: nowrap; cursor: help;
  letter-spacing: .5px;
  background: var(--up-bg); color: var(--up); border: 1px solid transparent;
}

/* 历史记录：是否站上 250 日线（年线）。这是“多空状态”不是涨跌，
   所以“站上”用红底红字（强），“未站上”用灰底灰字（弱），不借用绿色免得误读成下跌 */
.year-badge {
  display: inline-block; font-size: 11px; padding: 1px 7px; font-weight: 600;
  border-radius: 999px; white-space: nowrap; cursor: help;
}
.year-badge.up { background: var(--up-bg); color: var(--up); }
.year-badge.down { background: #f1f5f9; color: var(--text-2); }

/* ---------- 《活用技术分析宝典》战法字段样式 ---------- */
/* 多排行数 / 站上月线 / 进场红K / MACD / KD 用的胶囊标签 */
.book-badge {
  display: inline-block; font-size: 11px; padding: 1px 7px; font-weight: 600;
  border-radius: 999px; white-space: nowrap; cursor: help;
  background: #f1f5f9; color: var(--text-2);
}
.book-badge.ok { background: var(--up-bg); color: var(--up); }
.book-badge.no { background: #f1f5f9; color: var(--text-2); }
.book-badge.b3 { background: #fff7ed; color: #c2410c; }
.book-badge.b4 { background: var(--up-bg); color: var(--up); }
.book-badge.b6 { background: #7f1d1d; color: #fff; }

/* 价量关系标签：价涨量增＝健康；价涨量缩／价平量增＝背离警示 */
.vp-tag {
  display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 4px;
  white-space: nowrap; color: var(--text-2); background: #f8fafc; cursor: help;
}
.vp-tag.good { background: var(--up-bg); color: var(--up); }
.vp-tag.warn { background: #fff7ed; color: #b45309; }

/* 避开讯号：命中戒律的条目 */
.avoid-tip { color: #b45309; cursor: help; }

/* 历史记录：所属行业（申万二级，单行不折行，避免挤压相邻列） */
.market-table .hist-ind {
  white-space: nowrap; font-size: 12px; color: var(--text-2);
}

/* 代码 / 名称：可悬浮出 K 线小窗，给个可交互的暗示 */
.market-table td[data-hk] { cursor: pointer; }
.market-table td[data-hk]:hover { text-decoration: underline dotted; text-underline-offset: 3px; }

/* ---------- 悬浮 K 线小窗 ---------- */
.kline-pop {
  position: fixed; z-index: 9000; width: 380px;
  padding: 8px 10px 6px;
  background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, .16), 0 2px 6px rgba(15, 23, 42, .06);
  /* 纯预览：不吃鼠标事件，避免和“移出单元格即收起”打架 */
  pointer-events: none;
  animation: kp-in .12s ease-out;
}
.kline-pop[hidden] { display: none; }
@keyframes kp-in {
  from { opacity: 0; transform: translateY(-3px); }
  to { opacity: 1; transform: none; }
}
.kline-pop .kp-head {
  display: flex; align-items: baseline; gap: 8px;
  padding: 0 2px 4px; border-bottom: 1px solid #f1f5f9;
}
.kline-pop .kp-name { font-size: 13px; font-weight: 700; color: #111827; }
.kline-pop .kp-meta { font-size: 11px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.kline-pop .kp-chart { width: 100%; height: 178px; }
.kline-pop .kp-foot {
  font-size: 11px; color: var(--text-3); padding: 2px 2px 0;
  font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* ============ 登录遮罩 ============ */
.login-page-body { margin: 0; min-height: 100vh; background: #0d1117; }
.login-gate {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 30% 20%, #1c2433 0%, #0d1117 70%);
}
.login-gate[hidden] { display: none; }
.login-card {
  width: 360px; max-width: calc(100vw - 32px);
  background: #151a23; border: 1px solid #2a3140;
  border-radius: 16px; padding: 32px 28px;
  box-shadow: 0 24px 60px rgba(0,0,0,.5);
}
.login-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; }
.login-brand img { border-radius: 10px; }
.login-title { font-size: 18px; font-weight: 700; color: #e8ebf0; }
.login-sub { font-size: 12px; color: #8b95a5; margin-top: 2px; }
.login-label { display: block; font-size: 13px; color: #a6b0c0; margin: 14px 0 6px; }
.login-input {
  width: 100%; padding: 11px 13px; font-size: 14px;
  background: #0f141b; border: 1px solid #2a3140; border-radius: 9px;
  color: #e8ebf0; outline: none;
}
.login-input:focus { border-color: #4f6bd8; }
.login-btn {
  width: 100%; margin-top: 22px; padding: 12px; font-size: 15px; font-weight: 600;
  color: #fff; background: #4f6bd8; border: none; border-radius: 9px; cursor: pointer;
}
.login-btn:hover { background: #4159c4; }
.login-btn:disabled { opacity: .6; cursor: default; }
.login-err { min-height: 18px; margin-top: 10px; font-size: 13px; color: #f87171; text-align: center; }

/* 服务器设置（登录页下方） */
.login-server { margin-top: 18px; border-top: 1px solid #2a3140; padding-top: 14px; }
.login-server-head {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer; color: #8b95a5; font-size: 13px; user-select: none;
}
.login-server-head:hover { color: #a6b0c0; }
.login-server-title { font-weight: 500; }
.login-server-arrow { font-size: 12px; transition: transform .15s; }
.login-server-head.open .login-server-arrow { transform: rotate(180deg); }
.login-server-body { margin-top: 12px; }
.login-server-body .login-label { margin-top: 0; }
.login-btn.server-save { margin-top: 14px; background: #2f3a52; }
.login-btn.server-save:hover { background: #3a4768; }
.login-err.ok { color: #34d399; }
