:root {
  --bg: #f2f5fa;
  --card: #ffffff;
  --text: #1f2733;
  --muted: #7a8599;
  --line: #e6ebf2;
  --primary: #2563eb;
  --primary-soft: #eaf1ff;
  --up: #e5484d;      /* A股红涨 */
  --down: #0f9d58;    /* A股绿跌 */
  --flat: #7a8599;
  --shadow: 0 2px 12px rgba(28, 45, 80, .06);
  --radius: 14px;
  --font: "Microsoft YaHei UI", "PingFang SC", "Segoe UI", "微软雅黑", sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }

a { color: var(--primary); cursor: pointer; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 18px;
  height: 58px; padding: 0 22px;
  background: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.brand-logo {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 10px;
  background: linear-gradient(135deg, #2563eb, #60a5fa);
  color: #fff; font-weight: 800; font-size: 15px;
  box-shadow: 0 4px 10px rgba(37,99,235,.3);
}
.brand-text { font-size: 17px; font-weight: 700; }
.brand-sub { font-size: 11px; color: var(--muted); margin-left: 4px; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a {
  padding: 7px 14px; border-radius: 9px; color: var(--text);
  font-size: 14px; font-weight: 500; text-decoration: none;
  transition: background .15s, color .15s;
}
.nav a:hover { background: #f0f4fa; }
.nav a.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }
.search-wrap { position: relative; width: 250px; }
#globalSearch, #analysisSearch, #chatInput, input[type=text], input[type=password], input[type=number], select {
  width: 100%; height: 36px; padding: 0 12px;
  border: 1px solid var(--line); border-radius: 9px;
  font-size: 13px; font-family: var(--font); color: var(--text);
  background: #fff; outline: none; transition: border .15s, box-shadow .15s;
}
#globalSearch:focus, #analysisSearch:focus, input:focus, select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.dropdown {
  position: absolute; top: 42px; left: 0; right: 0; z-index: 200;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow); max-height: 300px; overflow-y: auto;
}
.dropdown-item { padding: 9px 13px; cursor: pointer; display: flex; justify-content: space-between; }
.dropdown-item:hover, .dropdown-item.active { background: var(--primary-soft); }
.dropdown-item .code { color: var(--muted); font-size: 12px; }
.icon-btn {
  width: 34px; height: 34px; border: 1px solid var(--line); border-radius: 9px;
  background: #fff; font-size: 17px; cursor: pointer; color: var(--text);
  transition: transform .2s;
}
.icon-btn:hover { transform: rotate(90deg); }

/* ---------- 主体 ---------- */
main { max-width: 1280px; margin: 0 auto; padding: 22px 20px 60px; }
.view { animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.page-head h2 { font-size: 20px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.tiny { font-size: 11px; }

.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 20px; margin-bottom: 16px;
}
.card h3 { font-size: 15px; margin-bottom: 12px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.card-head h3 { margin: 0; }
.link { font-size: 12px; }

.grid { display: grid; gap: 14px; margin-bottom: 16px; }
.index-grid { grid-template-columns: repeat(4, 1fr); }
.two-col { grid-template-columns: 1fr 1fr; }

/* ---------- 指数卡片 ---------- */
.index-card { padding: 16px 18px; cursor: pointer; transition: transform .15s, box-shadow .15s; }
.index-card:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(28,45,80,.10); }
.index-card .name { font-size: 13px; color: var(--muted); }
.index-card .price { font-size: 24px; font-weight: 700; margin: 6px 0 4px; font-variant-numeric: tabular-nums; }
.index-card .pct { font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- 涨跌色 ---------- */
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--flat); }
.pct-badge {
  display: inline-block; min-width: 76px; padding: 3px 8px; border-radius: 8px;
  text-align: center; font-weight: 700; font-size: 13px;
  font-variant-numeric: tabular-nums; color: #fff;
}
.pct-badge.up { background: var(--up); }
.pct-badge.down { background: var(--down); }
.pct-badge.flat { background: var(--flat); }
.pct-big { font-size: 26px; font-weight: 800; font-variant-numeric: tabular-nums; }

/* ---------- 迷你榜 ---------- */
.mini-list { display: flex; flex-direction: column; }
.mini-row {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 4px; border-bottom: 1px solid #f1f4f9; cursor: pointer;
}
.mini-row:last-child { border-bottom: none; }
.mini-row:hover { background: #f8fafd; }
.mini-row .rank { width: 22px; font-size: 12px; color: var(--muted); text-align: center; }
.mini-row .nm { flex: 1; min-width: 0; }
.mini-row .nm .n { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mini-row .nm .c { font-size: 11px; color: var(--muted); }
.mini-row .px { width: 70px; text-align: right; font-variant-numeric: tabular-nums; }
.mini-row .pct { width: 82px; text-align: right; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }

/* ---------- 表格 ---------- */
.table-card { padding: 10px 8px; }
.table-scroll { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th {
  text-align: left; padding: 10px 10px; color: var(--muted);
  font-weight: 600; font-size: 12px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.data-table td { padding: 11px 10px; border-bottom: 1px solid #f1f4f9; white-space: nowrap; }
.data-table tbody tr { cursor: pointer; transition: background .12s; }
.data-table tbody tr:hover { background: #f8fafd; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .pct-cell { font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.data-table .stock-cell .n { font-weight: 600; }
.data-table .stock-cell .c { color: var(--muted); font-size: 11px; margin-left: 6px; }
.tag-btn { font-size: 12px; padding: 3px 8px; border-radius: 7px; cursor: pointer; border: 1px solid var(--line); background: #fff; color: var(--text); }
.tag-btn:hover { border-color: var(--primary); color: var(--primary); }
.tag-btn.danger:hover { border-color: var(--up); color: var(--up); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.tab {
  padding: 8px 18px; border-radius: 10px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--text);
  transition: all .15s;
}
.tab:hover { border-color: var(--primary); color: var(--primary); }
.tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }

/* ---------- 分析页 ---------- */
.empty-state { text-align: center; padding: 60px 20px; }
.empty-state h3 { font-size: 19px; margin-bottom: 8px; }
.inline-search { display: flex; gap: 10px; max-width: 520px; margin: 20px auto 14px; position: relative; }
.inline-search input { flex: 1; height: 40px; }
.inline-search .btn { height: 40px; }
.quick-codes { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.quick-codes button {
  padding: 6px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; font-size: 12px;
}
.quick-codes button:hover { border-color: var(--primary); color: var(--primary); }

.stock-header { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.stock-id h2 { font-size: 22px; display: inline; }
.stock-id .chip {
  margin-left: 8px; padding: 2px 9px; border-radius: 7px; font-size: 11px;
  background: var(--primary-soft); color: var(--primary);
}
.stock-price { margin-left: auto; text-align: right; }
.stock-actions { display: flex; gap: 8px; }

.mini-grid { grid-template-columns: repeat(6, 1fr); }
.mini-grid .cell { background: #f8fafd; border-radius: 10px; padding: 10px 12px; }
.mini-grid .cell .k { font-size: 11px; color: var(--muted); }
.mini-grid .cell .v { font-size: 15px; font-weight: 700; margin-top: 3px; font-variant-numeric: tabular-nums; }

.score-grid { grid-template-columns: 1fr 1.2fr 1fr; }
.score-card { text-align: center; }
.ring-wrap { position: relative; width: 150px; height: 150px; margin: 8px auto; }
.ring { width: 150px; height: 150px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: #eef2f8; stroke-width: 11; }
.ring-fg {
  fill: none; stroke: var(--primary); stroke-width: 11; stroke-linecap: round;
  stroke-dasharray: 326.7; stroke-dashoffset: 326.7;
  transition: stroke-dashoffset .8s ease, stroke .3s;
}
.ring-center {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.ring-center span { font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ring-center small { color: var(--muted); font-size: 11px; }
.grade-chip { display: inline-block; padding: 4px 14px; border-radius: 20px; font-weight: 700; font-size: 13px; }
.grade-chip.high { background: #fff1f0; color: var(--up); }
.grade-chip.mid { background: #fff7e6; color: #d48806; }
.grade-chip.low { background: #f0f4fa; color: var(--muted); }
.score-parts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 14px; }
.score-parts .sp { background: #f8fafd; border-radius: 8px; padding: 6px 4px; }
.score-parts .sp .k { font-size: 10px; color: var(--muted); display: block; }
.score-parts .sp .v { font-weight: 700; font-size: 13px; }

.expect-row { display: flex; align-items: stretch; gap: 18px; }
.expect-item { flex: 1; text-align: center; padding: 8px 0; }
.expect-num { font-size: 30px; font-weight: 800; margin: 6px 0; font-variant-numeric: tabular-nums; }
.divider-v { width: 1px; background: var(--line); }

.risk-level { font-size: 20px; font-weight: 800; margin-bottom: 8px; }
.risk-level.low { color: var(--down); }
.risk-level.mid { color: #d48806; }
.risk-level.high { color: var(--up); }
.kv { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed #eef1f6; font-size: 13px; }
.kv:last-child { border-bottom: none; }
.kv b { font-variant-numeric: tabular-nums; }

.timing-advice {
  background: var(--primary-soft); border-left: 4px solid var(--primary);
  border-radius: 8px; padding: 12px 14px; margin-bottom: 10px; font-size: 14px; line-height: 1.6;
}
.budget-row label { display: block; margin-bottom: 6px; }
.budget-input-row { display: flex; align-items: center; gap: 8px; }
.budget-input-row .cny { font-size: 17px; font-weight: 700; color: var(--muted); }
.budget-input-row input { width: 180px; height: 36px; }
.quick-chips { display: flex; gap: 6px; margin-top: 8px; }
.quick-chips button {
  padding: 4px 10px; border-radius: 7px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; font-size: 11px;
}
.quick-chips button:hover { border-color: var(--primary); color: var(--primary); }
.position-result { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 14px 0; }
.position-result .kv { flex-direction: column; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; }
.big-accent { font-size: 24px; color: var(--primary); font-weight: 800; }
.sub-h { font-size: 13px; margin: 12px 0 8px; color: var(--muted); }
.plan-list { display: flex; flex-direction: column; gap: 6px; }
.plan-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 12px;
  background: #f8fafd; border-radius: 9px; font-size: 12px;
}
.plan-item .batch {
  flex: none; width: 54px; padding: 3px 0; text-align: center; border-radius: 7px;
  background: var(--primary-soft); color: var(--primary); font-weight: 700;
}

.chart-card { padding: 14px 14px 8px; }
.kline-chart { width: 100%; height: 460px; }
.klt-tabs { display: flex; gap: 4px; }
.klt {
  padding: 4px 13px; border-radius: 7px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; font-size: 12px;
}
.klt.active { background: var(--primary); color: #fff; border-color: var(--primary); }

.indicator-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.indicator-grid .ind {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  background: #f8fafd; border-radius: 10px;
}
.indicator-grid .dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.indicator-grid .dot.good { background: var(--down); }
.indicator-grid .dot.bad { background: var(--up); }
.indicator-grid .dot.neutral { background: var(--flat); }
.indicator-grid .meta { flex: 1; min-width: 0; }
.indicator-grid .meta .n { font-size: 12px; font-weight: 600; }
.indicator-grid .meta .h { font-size: 10px; color: var(--muted); }
.indicator-grid .val { font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---------- AI 聊天 ---------- */
.chat-card { display: flex; flex-direction: column; height: calc(100vh - 150px); min-height: 460px; }
.chat-box { flex: 1; overflow-y: auto; padding: 8px 4px; }
.chat-msg { display: flex; margin: 10px 0; }
.chat-msg.user { justify-content: flex-end; }
.chat-msg .bubble {
  max-width: 78%; padding: 11px 15px; border-radius: 14px;
  font-size: 13px; line-height: 1.7; white-space: pre-wrap; word-break: break-word;
}
.chat-msg.ai .bubble { background: #f2f5fa; border-top-left-radius: 4px; }
.chat-msg.user .bubble { background: var(--primary); color: #fff; border-top-right-radius: 4px; }
.chat-msg.thinking .bubble { color: var(--muted); }
.dots::after { content: "…"; animation: dots 1.2s steps(4, end) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
.quick-qa { display: flex; gap: 8px; flex-wrap: wrap; padding: 4px 0 10px; }
.quick-qa button {
  padding: 6px 12px; border-radius: 20px; border: 1px solid var(--line);
  background: #fff; font-size: 12px; cursor: pointer; color: var(--text);
}
.quick-qa button:hover { border-color: var(--primary); color: var(--primary); }
.chat-input-row { display: flex; gap: 10px; }
.chat-input-row input { flex: 1; height: 42px; }
.chat-input-row .btn { height: 42px; padding: 0 22px; }

/* ---------- 按钮 ---------- */
.btn {
  padding: 8px 18px; border-radius: 9px; border: none; cursor: pointer;
  font-size: 13px; font-weight: 600; font-family: var(--font);
  transition: all .15s;
}
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 3px 10px rgba(37,99,235,.25); }
.btn-primary:hover { background: #1d4fd7; }
.btn-primary:disabled { opacity: .55; cursor: not-allowed; }
.btn-outline { background: #fff; color: var(--primary); border: 1px solid var(--primary); }
.btn-outline:hover { background: var(--primary-soft); }
.btn-sm { padding: 6px 13px; font-size: 12px; }

/* ---------- 表单 ---------- */
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.key-row { display: flex; gap: 8px; }
.key-row input { flex: 1; }
.form-actions { display: flex; gap: 10px; margin-top: 16px; }
.ref-list { padding-left: 18px; font-size: 12px; line-height: 2; }

/* ---------- AI 总结 ---------- */
.ai-summary { font-size: 13px; line-height: 1.8; }
.ai-summary pre { white-space: pre-wrap; font-family: var(--font); }

/* ---------- 其它 ---------- */
.disclaimer {
  text-align: center; color: var(--muted); font-size: 12px;
  padding: 18px 0 6px; line-height: 1.8;
}
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%);
  background: #1f2733; color: #fff; padding: 10px 20px; border-radius: 10px;
  font-size: 13px; z-index: 999; box-shadow: 0 8px 24px rgba(0,0,0,.25);
  animation: fadeIn .2s ease;
}

@media (max-width: 1080px) {
  .index-grid { grid-template-columns: repeat(2, 1fr); }
  .mini-grid { grid-template-columns: repeat(3, 1fr); }
  .score-grid, .two-col { grid-template-columns: 1fr; }
  .indicator-grid { grid-template-columns: repeat(2, 1fr); }
  .brand-sub { display: none; }
  .search-wrap { width: 170px; }
}


/* ---------- AI 投手模拟大赛 ---------- */
.sim-tools { display: flex; align-items: center; gap: 12px; }
.chip {
  display: inline-block; padding: 2px 9px; border-radius: 7px; font-size: 11px;
  background: var(--primary-soft); color: var(--primary); margin-left: 6px;
}
.loading-card { text-align: center; padding: 50px 20px; }
.loader {
  width: 42px; height: 42px; margin: 0 auto 14px; border-radius: 50%;
  border: 4px solid var(--line); border-top-color: var(--primary);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.copy-stocks { display: flex; flex-direction: column; gap: 8px; margin: 12px 0; }
.copy-stock {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  background: #f8fafd; border-radius: 10px; flex-wrap: wrap;
}
.copy-stock .cs-name { font-weight: 700; width: 150px; }
.copy-stock .cs-w {
  min-width: 90px; height: 8px; background: #e8edf5; border-radius: 6px; overflow: hidden; flex: 1;
}
.copy-stock .cs-w i { display: block; height: 100%; background: linear-gradient(90deg, #2563eb, #60a5fa); border-radius: 6px; }
.copy-stock .cs-amt { font-weight: 700; color: var(--primary); font-variant-numeric: tabular-nums; }
.copy-stock .cs-ret { font-size: 12px; font-weight: 700; }
.copy-plan { display: flex; flex-direction: column; gap: 6px; margin-bottom: 8px; }
.copy-plan .plan-line {
  padding: 8px 12px; background: var(--primary-soft); border-radius: 8px; font-size: 13px; line-height: 1.6;
}
.sim-chart { width: 100%; height: 320px; }

.persona-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 16px; }
.persona-card { position: relative; padding: 18px 18px 14px; }
.persona-card .rank-badge {
  position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px;
  background: #f0f4fa; color: var(--muted);
}
.persona-card.rank1 { border-color: #f0c674; box-shadow: 0 4px 18px rgba(240,198,116,.35); }
.persona-card.rank1 .rank-badge { background: linear-gradient(135deg,#f7d774,#e8b23a); color: #fff; }
.persona-card.rank2 .rank-badge { background: linear-gradient(135deg,#cdd6e4,#aab8cc); color: #fff; }
.persona-card.rank3 .rank-badge { background: linear-gradient(135deg,#d9a06b,#c07f43); color: #fff; }
.p-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; padding-right: 44px; }
.p-avatar {
  width: 48px; height: 48px; border-radius: 13px; flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 26px;
  background: var(--primary-soft);
}
.p-name { font-size: 16px; font-weight: 700; }
.p-return { font-size: 22px; font-weight: 800; font-variant-numeric: tabular-nums; }
.p-stats { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.p-philosophy { font-size: 12.5px; line-height: 1.7; color: #3c4658; background: #f8fafd; border-radius: 9px; padding: 10px 12px; margin-bottom: 10px; }
.p-holdings { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.p-holding {
  padding: 5px 10px; border-radius: 8px; font-size: 12px; background: #fff;
  border: 1px solid var(--line); cursor: pointer;
}
.p-holding:hover { border-color: var(--primary); }
.p-holding .w { font-weight: 700; }
details { margin-top: 8px; }
details summary {
  cursor: pointer; font-size: 13px; font-weight: 600; color: var(--primary);
  padding: 6px 0; user-select: none;
}
.p-kb { font-size: 12.5px; line-height: 1.8; color: #3c4658; }
.p-kb .kb-title { font-weight: 700; color: var(--text); margin: 8px 0 4px; }
.p-kb ul { padding-left: 18px; }
.p-log { max-height: 220px; overflow-y: auto; font-size: 12px; line-height: 1.7; }
.p-log .log-day { margin: 8px 0 2px; font-weight: 700; color: var(--text); }
.p-log .log-act { color: #4a5568; margin-left: 6px; }
.ask-persona-btn { margin-top: 10px; width: 100%; }

.chat-head-right { display: flex; align-items: center; gap: 10px; }
.persona-select {
  width: 190px; height: 32px; padding: 0 8px; font-size: 12px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text);
  font-family: var(--font);
}
.empty-sim { text-align: center; padding: 40px; color: var(--muted); }

@media (max-width: 1080px) {
  .persona-grid { grid-template-columns: 1fr; }
  .chat-head-right { flex-direction: column; align-items: flex-end; gap: 4px; }
}


/* ---------- 新闻板块雷达 / AI 计划 ---------- */
.hot-sectors { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }
.hs-card {
  flex: 1; min-width: 210px; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; background: #f8fafd;
}
.hs-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.hs-name { font-weight: 700; font-size: 14px; }
.hs-heat {
  padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: 700;
  background: #fff1f0; color: var(--up);
}
.hs-stocks { display: flex; flex-wrap: wrap; gap: 6px; }
.hs-stock {
  padding: 4px 10px; border-radius: 8px; font-size: 12px; background: #fff;
  border: 1px solid var(--line); cursor: pointer;
}
.hs-stock:hover { border-color: var(--primary); color: var(--primary); }
.hs-headline { font-size: 11px; color: var(--muted); margin-top: 8px; line-height: 1.5; }
.news-list { border-top: 1px solid var(--line); padding-top: 10px; line-height: 1.9; }
.news-list .nl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ai-plan-text {
  white-space: pre-wrap; word-break: break-word; font-family: var(--font);
  font-size: 13.5px; line-height: 1.9; color: #2c3648; background: #f8fafd;
  border-radius: 10px; padding: 14px 16px; margin: 0;
}
.log-table { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 1px solid var(--line); border-radius: 9px; overflow: hidden; }
.log-table .lt-head { padding: 8px 10px; font-weight: 700; font-size: 12px; background: var(--primary-soft); color: var(--primary); }
.log-table .lt-body { padding: 8px 10px; font-size: 12px; line-height: 1.7; }
.log-table .lt-body.up { background: #f6fbf8; }
.log-table .lt-body.down { background: #fff8f8; }
.plan-item-text { color: #4a5568; margin-bottom: 3px; }
.exec-item-text { color: #2c3648; margin-bottom: 3px; }


/* ---------- AI 百分比仪表盘 ---------- */
.mood-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.toggle-label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 5px; cursor: pointer; }
.toggle-label input { accent-color: var(--primary); width: 14px; height: 14px; }
.mood-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 6px; }
.mood-item {
  background: #f8fafd; border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; text-align: center;
}
.mood-gauge { width: 100%; height: 120px; margin: 2px auto; }
.mood-big { font-size: 30px; font-weight: 800; margin: 8px 0 4px; font-variant-numeric: tabular-nums; }
.mood-label { font-size: 13px; font-weight: 700; }
.mood-label.up { color: var(--up); }
.mood-label.down { color: var(--down); }
.mood-label.flat { color: var(--flat); }
.breadth-bar { height: 8px; border-radius: 6px; background: #e8edf5; overflow: hidden; margin-top: 8px; }
.breadth-bar i { display: block; height: 100%; background: linear-gradient(90deg, #2563eb, #60a5fa); border-radius: 6px; }

/* ---------- AI 回复百分比高亮 ---------- */
.pct-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-bottom: 7px; }
.pct-chip {
  padding: 2px 9px; border-radius: 8px; font-size: 12px; font-weight: 700;
  background: var(--primary-soft); color: var(--primary); font-variant-numeric: tabular-nums;
}
.pct-chip.up { background: #fff1f0; color: var(--up); }
.pct-chip.down { background: #e9f7ef; color: var(--down); }
.pct-inline {
  display: inline-block; padding: 0 5px; border-radius: 6px; font-weight: 700;
  background: #eaf1ff; color: var(--primary); font-variant-numeric: tabular-nums;
}
.pct-inline.up { background: #fff1f0; color: var(--up); }
.pct-inline.down { background: #e9f7ef; color: var(--down); }

@media (max-width: 1080px) {
  .mood-grid { grid-template-columns: repeat(2, 1fr); }
}


/* ---------- 首页彩色比例模块 ---------- */
.ratio-modules { grid-template-columns: repeat(4, 1fr); }
.rm-card { cursor: pointer; transition: transform .15s, box-shadow .15s; position: relative; overflow: hidden; }
.rm-card:hover { transform: translateY(-3px); box-shadow: 0 8px 22px rgba(28,45,80,.12); }
.rm-card .rm-ico { font-size: 22px; }
.rm-card .rm-title { font-size: 12px; color: var(--muted); margin-top: 4px; }
.rm-card .rm-big { font-size: 24px; font-weight: 800; margin: 4px 0; font-variant-numeric: tabular-nums; }
.rm-card .rm-sub { font-size: 11px; color: var(--muted); }
.rm-bar { height: 7px; border-radius: 6px; background: #eef2f8; overflow: hidden; margin-top: 8px; display: flex; }
.rm-bar i { display: block; height: 100%; }
.rm-bar .r-up { background: linear-gradient(90deg,#f87171,#e5484d); }
.rm-bar .r-down { background: linear-gradient(90deg,#34c97a,#0f9d58); }
.rm-bar .r-mid { background: linear-gradient(90deg,#fbbf24,#f59e0b); }
.rm-card.hot { background: linear-gradient(135deg,#fff7ed,#ffedd5); border-color:#fed7aa; }
.rm-card.blue { background: linear-gradient(135deg,#eff6ff,#dbeafe); border-color:#bfdbfe; }
.rm-card.green { background: linear-gradient(135deg,#ecfdf5,#d1fae5); border-color:#a7f3d0; }
.rm-card.red { background: linear-gradient(135deg,#fff1f2,#ffe4e6); border-color:#fecdd3; }
.rm-card.purple { background: linear-gradient(135deg,#f5f3ff,#ede9fe); border-color:#ddd6fe; }

/* ---------- 行情彩色比例条 ---------- */
.ratio-card { padding: 12px 16px; }
.ratio-row { display: flex; align-items: center; gap: 12px; margin: 6px 0; flex-wrap: wrap; }
.ratio-label { font-size: 12px; color: var(--muted); white-space: nowrap; }
.ratio-label b { font-size: 14px; }
.ratio-bar { flex: 1; display: flex; height: 14px; border-radius: 8px; overflow: hidden; min-width: 180px; }
.ratio-bar .up-bar { background: linear-gradient(90deg,#f87171,#e5484d); }
.ratio-bar .down-bar { background: linear-gradient(90deg,#34c97a,#0f9d58); }
.sector-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.sector-chip {
  padding: 4px 11px; border-radius: 16px; font-size: 12px; cursor: pointer;
  border: 1px solid var(--line); background: #fff; font-weight: 600;
}
.sector-chip:hover { border-color: var(--primary); color: var(--primary); }
.sector-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.sector-chip .heat { font-size: 10px; opacity: .75; }

/* ---------- 智能分析百分比速览 ---------- */
.pct-summary-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.ps-chip {
  flex: 1; min-width: 120px; background: #fff; border: 1px solid var(--line);
  border-radius: 11px; padding: 9px 12px; text-align: center; box-shadow: var(--shadow);
}
.ps-chip .ps-k { font-size: 11px; color: var(--muted); }
.ps-chip .ps-v { font-size: 17px; font-weight: 800; margin-top: 2px; font-variant-numeric: tabular-nums; }

/* ---------- 新闻影响度列表 ---------- */
.news-tools { display: flex; gap: 8px; }
.news-tools input { width: 240px; height: 34px; }
.news-impact-list { display: flex; flex-direction: column; gap: 8px; max-height: 430px; overflow-y: auto; padding-right: 4px; }
.news-item {
  border: 1px solid var(--line); border-radius: 11px; padding: 10px 13px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.news-item:hover { border-color: #c3d4f5; box-shadow: var(--shadow); }
.news-item.alert { border: 2px solid #e5484d; background: #fff8f8; animation: alertPulse 2s ease-in-out infinite; }
@keyframes alertPulse { 0%,100% { box-shadow: 0 0 0 0 rgba(229,72,77,.35);} 50% { box-shadow: 0 0 0 8px rgba(229,72,77,0);} }
.ni-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ni-title { font-weight: 600; font-size: 13px; flex: 1; min-width: 200px; line-height: 1.5; }
.ni-badge {
  padding: 2px 9px; border-radius: 8px; font-size: 11px; font-weight: 800; white-space: nowrap;
  background: #f0f4fa; color: var(--muted);
}
.ni-badge.up { background: #fff1f0; color: var(--up); }
.ni-badge.down { background: #e9f7ef; color: var(--down); }
.ni-alert {
  padding: 2px 8px; border-radius: 8px; font-size: 11px; font-weight: 800; color: #fff;
  background: linear-gradient(90deg,#e5484d,#f87171); animation: alertBlink 1s steps(2) infinite;
}
@keyframes alertBlink { 50% { opacity: .55; } }
.ni-summary { font-size: 12px; color: #667085; margin-top: 5px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ni-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 7px; }
.ni-impact-bar { height: 5px; border-radius: 4px; background: #eef2f8; overflow: hidden; margin-top: 6px; }
.ni-impact-bar i { display: block; height: 100%; border-radius: 4px; }
.ni-impact-bar .pos { background: linear-gradient(90deg,#f87171,#e5484d); }
.ni-impact-bar .neg { background: linear-gradient(90deg,#34c97a,#0f9d58); }
.ni-impact-bar .neu { background: linear-gradient(90deg,#fbbf24,#f59e0b); }

@media (max-width: 1080px) {
  .ratio-modules { grid-template-columns: repeat(2, 1fr); }
}

.ni-watch {
  padding: 2px 8px; border-radius: 8px; font-size: 11px; font-weight: 800;
  background: #fff7e6; color: #d48806; border: 1px solid #ffe7ba;
}
