:root {
  --bg: #f6f7f9;
  --panel: #fff;
  --line: #e6e8eb;
  --text: #1f2328;
  --dim: #6b7280;
  --pos: #d64545;  /* 中国习惯：涨/正 = 红 */
  --neg: #2e9e5b;  /* 跌/负 = 绿 */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.6 -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
}

.topbar {
  display: flex; align-items: center; gap: 24px;
  padding: 0 24px; height: 56px;
  background: #111827; color: #fff;
}
.topbar .brand { font-weight: 700; font-size: 16px; color: #fff; text-decoration: none; letter-spacing: .5px; }
.topbar nav a { color: #cbd5e1; text-decoration: none; margin-right: 18px; font-size: 14px; }
.topbar nav a:hover { color: #fff; }

.wrap { max-width: 1280px; margin: 0 auto; padding: 20px 24px 60px; }

h1 { font-size: 20px; margin: 12px 0 16px; }
h1 small, h2 small { font-size: 13px; font-weight: 400; color: var(--dim); margin-left: 8px; }
h2 { font-size: 15px; margin: 26px 0 10px; color: #374151; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 16px; display: flex; flex-direction: column; gap: 2px;
}
.card .k { font-size: 12px; color: var(--dim); }
.card b { font-size: 20px; font-weight: 600; font-variant-numeric: tabular-nums; }
.card.idx b { font-size: 18px; }

.tbl { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.tbl th, .tbl td { padding: 8px 12px; border-bottom: 1px solid var(--line); text-align: left; white-space: nowrap; }
.tbl th { background: #fafbfc; font-weight: 600; font-size: 12px; color: var(--dim); }
.tbl tbody tr:hover { background: #f9fafb; }
.tbl .r { text-align: right; font-variant-numeric: tabular-nums; }
.tbl.small th, .tbl.small td { padding: 6px 10px; font-size: 13px; }
.tbl a { color: #1d4ed8; text-decoration: none; }

.amount-pos { color: var(--pos); }
.amount-neg { color: var(--neg); }
.dim { color: var(--dim); }
.ok { color: #2e9e5b; }
.bad { color: #d64545; }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filters input, .filters select, .filters button {
  height: 34px; padding: 0 10px; border: 1px solid var(--line); border-radius: 6px;
  background: #fff; font-size: 13px; color: var(--text);
}
.filters button { background: #111827; color: #fff; border-color: #111827; cursor: pointer; }

.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }

.chart { width: 100%; height: 460px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; margin: 16px 0; }
.chart-sm { height: 220px; }

.crumb { font-size: 13px; color: var(--dim); margin-bottom: 4px; }
.crumb a { color: #1d4ed8; text-decoration: none; }

.pager { margin-top: 14px; display: flex; gap: 12px; align-items: center; color: var(--dim); font-size: 13px; }
.pager a { color: #1d4ed8; text-decoration: none; }

.empty { background: #fff8e6; border: 1px solid #f5e2b3; padding: 12px 16px; border-radius: 8px; }
code { background: #eef1f5; padding: 1px 6px; border-radius: 4px; font-size: 12.5px; }

.foot { text-align: center; color: var(--dim); font-size: 12px; padding: 24px 0 40px; }

/* ---- 自选股看板 ---- */
.acts { white-space: nowrap; }
.btn {
  height: 26px; padding: 0 10px; margin-right: 6px;
  border: 1px solid #111827; background: #111827; color: #fff;
  border-radius: 5px; font-size: 12px; cursor: pointer;
}
.btn.ghost { background: #fff; color: #374151; border-color: var(--line); }
.btn:disabled { opacity: .55; cursor: default; }
.brief-row td { padding: 0; border-bottom: 1px solid var(--line); }
.brief-cell { padding: 0 !important; }
.brief { padding: 14px 16px; background: #fafbfc; }
.brief-h { font-weight: 600; margin-bottom: 10px; display: flex; gap: 10px; align-items: baseline; }
.brief-h .dim { font-weight: 400; font-size: 12px; }
.factors { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; }
.factor { border: 1px solid var(--line); border-radius: 6px; background: #fff; padding: 8px 10px; }
.factor-h { font-size: 12px; color: var(--dim); display: flex; justify-content: space-between; }
.factor-b { font-size: 13px; margin-top: 4px; }
.score { font-variant-numeric: tabular-nums; }
.brief-sec { margin-top: 10px; font-size: 13px; }
.brief-sec ul { margin: 4px 0 0; padding-left: 18px; }
.conclusion { padding: 8px 10px; background: #fff; border: 1px solid var(--line); border-radius: 6px; }
.brief-pre { white-space: pre-wrap; margin: 0; padding: 12px 14px; font-size: 13px; }
.news-list { margin: 6px 0 0; padding-left: 18px; }
.news-list li { margin-bottom: 8px; }
.news-list a { color: #1d4ed8; text-decoration: none; }
.foot-note { margin-top: 14px; font-size: 12px; color: var(--dim); }
.idxbar { margin-bottom: 16px; }
