/* ============================================================
   A股财经复盘 - 专业金融风格设计系统 (V0.4 UI 重构)
   A股惯例: 红涨绿跌 | 深海军蓝护眼底色 | 纯CSS轻量可视化
   ============================================================ */
:root {
  --bg: #0b1220;
  --bg-soft: #0e1626;
  --panel: #111a2c;
  --panel2: #16203a;
  --line: rgba(148, 163, 184, .14);
  --line-strong: rgba(148, 163, 184, .25);
  --text: #e6ebf5;
  --muted: #8a94a8;
  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, .12);
  --up: #f0443e;
  --up-soft: rgba(240, 68, 62, .14);
  --down: #1fae5c;
  --down-soft: rgba(31, 174, 92, .14);
  --flat: #6b7a93;
  --gold: #f5b942;
  --bar-bg: rgba(148, 163, 184, .10);
  --nav-h: 56px;
  --radius: 14px;
  --shadow: 0 8px 24px rgba(0, 0, 0, .25);
}
[data-theme="light"] {
  --bg: #f2f5fa;
  --bg-soft: #eef2f8;
  --panel: #ffffff;
  --panel2: #f0f3f9;
  --line: rgba(30, 41, 59, .10);
  --line-strong: rgba(30, 41, 59, .18);
  --text: #1a2333;
  --muted: #64748b;
  --accent: #2563eb;
  --accent-soft: rgba(37, 99, 235, .08);
  --up: #e03131;
  --up-soft: rgba(224, 49, 49, .08);
  --down: #0e9f4f;
  --down-soft: rgba(14, 159, 79, .08);
  --flat: #94a3b8;
  --bar-bg: rgba(30, 41, 59, .07);
  --shadow: 0 6px 20px rgba(30, 41, 59, .10);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg); color: var(--text); min-height: 100vh;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Noto Sans CJK SC", "Segoe UI", Roboto, sans-serif;
  line-height: 1.65; font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 18px; }
.num { font-variant-numeric: tabular-nums; }

/* ---------------- 顶部固定导航 ---------------- */
.topnav {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topnav-inner { display: flex; align-items: center; gap: 16px; height: var(--nav-h); }
.logo { font-size: 17px; font-weight: 700; letter-spacing: .5px; white-space: nowrap;
  display: flex; align-items: center; gap: 8px; }
.logo .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--up);
  box-shadow: 0 0 10px var(--up); animation: pulse 2s infinite; }
@keyframes pulse { 50% { opacity: .4; } }
.nav-links { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav-links::-webkit-scrollbar { display: none; }
.nav-links a { padding: 6px 12px; border-radius: 8px; color: var(--muted); font-size: 13.5px;
  white-space: nowrap; transition: all .18s; }
.nav-links a:hover { color: var(--text); background: var(--panel2); }
.nav-links a.active { color: var(--accent); background: var(--accent-soft); }
.top-actions { display: flex; gap: 8px; align-items: center; margin-left: auto; }
input[type="date"] { background: var(--panel2); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 10px; font-size: 12.5px; outline: none; }
.btn { background: var(--panel2); color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: 6px 13px; cursor: pointer; font-size: 13px;
  transition: all .18s; white-space: nowrap; }
.btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn.small { padding: 2px 10px; font-size: 12px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.1); color: #fff; }

/* ---------------- 模块卡片 ---------------- */
main { padding: 18px 0 70px; }
section { margin: 30px 0; scroll-margin-top: calc(var(--nav-h) + 14px); }
.mod-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.mod-title { font-size: 18px; font-weight: 700; letter-spacing: .3px;
  display: flex; align-items: center; gap: 10px; }
.mod-title .idx { font-size: 12px; font-weight: 700; color: var(--accent);
  background: var(--accent-soft); border: 1px solid rgba(59,130,246,.3);
  padding: 2px 8px; border-radius: 6px; letter-spacing: 1px; }
.mod-title::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line-strong), transparent); }
.mod-sub { color: var(--muted); font-size: 12.5px; margin-left: auto; }

/* ---------------- 核心数据 Hero ---------------- */
.hero-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; }
.hero-card { background: linear-gradient(160deg, var(--panel), var(--panel2));
  border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px;
  position: relative; overflow: hidden; transition: transform .2s, border-color .2s; }
.hero-card:hover { transform: translateY(-3px); border-color: var(--line-strong); }
.hero-card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 2px;
  background: var(--hc, var(--accent)); opacity: .8; }
.hero-card .k { font-size: 12px; color: var(--muted); margin-bottom: 6px; letter-spacing: .5px; }
.hero-card .v { font-size: 27px; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.hero-card .s { font-size: 12px; color: var(--muted); margin-top: 4px; }
.hero-card .v.up { color: var(--up); } .hero-card .v.down { color: var(--down); }
.hero-card .v.gold { color: var(--gold); } .hero-card .v.accent { color: var(--accent); }
.hero-card .trend { font-size: 12.5px; font-weight: 600; margin-top: 2px; font-variant-numeric: tabular-nums; }

/* ---------------- 指数卡片 ---------------- */
.group-title { font-size: 13px; color: var(--muted); margin: 16px 0 8px; font-weight: 500;
  display: flex; align-items: center; gap: 6px; }
.group-title::before { content: ""; width: 4px; height: 12px; border-radius: 2px; background: var(--accent); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 12px 14px; transition: transform .18s, border-color .18s; }
.card:hover { transform: translateY(-2px); border-color: var(--line-strong); }
.q-name { font-size: 13px; color: var(--muted); }
.q-price { font-size: 18px; font-weight: 700; margin: 3px 0 2px; font-variant-numeric: tabular-nums; }
.q-pct { font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.q-code { font-size: 11px; color: var(--muted); margin-top: 3px; opacity: .7; }
.up { color: var(--up); } .down { color: var(--down); } .flat { color: var(--flat); }

/* ---------------- 表格 ---------------- */
.tbl-wrap { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th, td { padding: 10px 14px; text-align: right; border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums; white-space: nowrap; }
th { background: var(--panel2); color: var(--muted); font-weight: 500; font-size: 12px; }
th:first-child, td:first-child { text-align: left; }
tr:last-child td { border-bottom: none; }
tbody tr { transition: background .15s; }
tbody tr:hover { background: var(--accent-soft); }

/* ---------------- 纯CSS可视化 ---------------- */
/* 涨跌分布: 环形图 (conic-gradient) */
.donut { width: 132px; height: 132px; border-radius: 50%; position: relative;
  background: conic-gradient(var(--up) 0 var(--p-up),
    var(--down) var(--p-up) calc(var(--p-up) + var(--p-down)),
    var(--flat) calc(var(--p-up) + var(--p-down)) 100%); }
.donut::after { content: ""; position: absolute; inset: 24px; background: var(--panel);
  border-radius: 50%; box-shadow: inset 0 0 12px rgba(0,0,0,.2); }
.donut .center { position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; z-index: 1; }
.donut .center b { font-size: 20px; font-variant-numeric: tabular-nums; }
.donut .center span { font-size: 11px; color: var(--muted); }
/* 占比进度条 (堆叠) */
.ratio-bar { display: flex; height: 10px; border-radius: 6px; overflow: hidden; gap: 2px; }
.ratio-bar i.up { background: var(--up); } .ratio-bar i.down { background: var(--down); }
.ratio-bar i.flat { background: var(--flat); }
/* 条形图通用 */
.bar { display: inline-block; width: 64px; height: 8px; background: var(--bar-bg);
  border-radius: 4px; overflow: hidden; vertical-align: middle; margin-left: 8px; }
.bar i { display: block; height: 100%; border-radius: 4px; }
/* 板块条形图 (左对齐, 宽度按涨跌幅) */
.hb-list { display: flex; flex-direction: column; gap: 7px; }
.hb-row { display: grid; grid-template-columns: 96px 1fr 58px 92px; gap: 10px; align-items: center; font-size: 12.5px; }
.hb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text); }
.hb-track { height: 12px; background: var(--bar-bg); border-radius: 6px; position: relative; overflow: hidden; }
.hb-track i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 6px;
  background: linear-gradient(90deg, rgba(240,68,62,.35), var(--up)); }
.hb-track i.dn { background: linear-gradient(90deg, rgba(31,174,92,.35), var(--down)); }
.hb-pct { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }
.hb-fund { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; font-size: 11.5px; }
/* 资金流向示意 (中心轴: 右红流入 / 左绿流出) */
.fund-track { height: 10px; background: linear-gradient(90deg, transparent 49.5%, var(--line-strong) 49.5%, var(--line-strong) 50.5%, transparent 50.5%);
  border-radius: 5px; position: relative; }
.fund-track i { position: absolute; top: 0; bottom: 0; border-radius: 5px; }
.fund-track i.in { left: 50%; background: linear-gradient(90deg, rgba(240,68,62,.3), var(--up)); }
.fund-track i.out { right: 50%; background: linear-gradient(270deg, rgba(31,174,92,.3), var(--down)); }

/* 情绪统计卡 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.stat-card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.stat-card .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat-card .k { font-size: 12px; color: var(--muted); margin-top: 2px; }
.sentiment-layout { display: grid; grid-template-columns: 220px 1fr; gap: 18px; align-items: center; }
.legend { display: flex; flex-direction: column; gap: 6px; font-size: 13px; margin-top: 10px; }
.legend div { display: flex; justify-content: space-between; gap: 10px; }
.legend b { font-variant-numeric: tabular-nums; }
.legend .sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ---------------- AI 复盘 (卡片式) ---------------- */
.review { font-size: 14px; }
/* Hero 头图 */
.review-hero { background: linear-gradient(135deg, var(--panel2) 0%, var(--panel) 60%, var(--accent-soft) 130%);
  border: 1px solid var(--line); border-radius: 16px; padding: 22px 26px; margin-bottom: 18px;
  position: relative; overflow: hidden; }
.review-hero::before { content: ""; position: absolute; top: -70px; right: -50px; width: 240px; height: 240px;
  border-radius: 50%; background: radial-gradient(circle, var(--accent-soft), transparent 70%); }
.review-hero h3 { font-size: 21px; font-weight: 800; letter-spacing: .6px; position: relative;
  display: flex; align-items: center; gap: 10px; }
.review-hero h3 .hero-emoji { font-size: 26px; }
.review-hero .meta-line { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; position: relative; }
.meta-chip { display: inline-flex; align-items: center; gap: 5px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 999px; padding: 3px 12px; font-size: 12px; color: var(--muted); }
.meta-chip b { color: var(--text); font-weight: 600; }
/* 分节卡片 */
.review-card { background: linear-gradient(180deg, var(--bg-soft) 0%, var(--panel) 100%);
  border: 1px solid var(--line); border-left: 3px solid var(--sec, var(--accent));
  border-radius: 14px; padding: 18px 22px; margin-bottom: 16px;
  transition: transform .2s, box-shadow .2s, border-color .2s; }
.review-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-strong); }
.review-card .sec-idx { width: 32px; height: 32px; border-radius: 9px; display: inline-flex;
  align-items: center; justify-content: center; font-size: 13px; font-weight: 800; color: #fff;
  background: var(--sec, var(--accent)); box-shadow: 0 3px 10px rgba(0,0,0,.2); }
.review-card .sec-text { margin-top: 12px; }
.review-card .sec-text p { margin: 8px 0; line-height: 1.85; }
.review-card .sec-text strong { color: var(--accent); font-weight: 700; }
/* 个股推荐黄金卡 */
.review-card.reco { border-color: rgba(245,185,66,.5);
  background: linear-gradient(180deg, rgba(245,185,66,.06) 0%, var(--panel) 40%); }
.review-card.reco .sec-idx { background: linear-gradient(135deg, #f5b942, #e8920c); }
.review-card.reco .sec-text strong { color: var(--gold); }
/* 入场动画 */
@keyframes fadeUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.review-hero, .review-card { animation: fadeUp .45s ease both; }
/* 免责声明 */
.disclaimer { color: var(--muted); font-size: 12px; margin-top: 18px; padding: 14px 18px;
  border: 1px dashed var(--line-strong); border-radius: 10px; background: var(--bg-soft); text-align: center; }
.review h3 { color: var(--accent); font-size: 15px; margin: 16px 0 8px; padding-left: 10px;
  border-left: 3px solid var(--accent); }
.review p { margin: 7px 0; }
.review .meta { color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.review.compact h3 { font-size: 14px; margin: 10px 0 6px; }
.review.compact p { margin: 4px 0; }
.disclaimer { color: var(--muted); font-size: 12px; margin-top: 16px; padding-top: 12px;
  border-top: 1px dashed var(--line-strong); }

/* ---------------- 财经要闻 ---------------- */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--line);
  cursor: pointer; font-size: 12px; color: var(--muted); background: transparent;
  transition: all .15s; }
.chip:hover { border-color: var(--accent); color: var(--text); }
.chip.active { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.search-row { margin-bottom: 12px; }
.search-row input { width: 100%; max-width: 340px; background: var(--panel2); color: var(--text);
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 14px; font-size: 13px; outline: none;
  transition: border-color .18s; }
.search-row input:focus { border-color: var(--accent); }
.news-item { background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 15px; margin-bottom: 8px; font-size: 13.5px;
  transition: border-color .15s, transform .15s; }
.news-item:hover { border-color: var(--line-strong); transform: translateX(2px); }
.news-time { color: var(--muted); font-size: 12px; margin-right: 8px; font-variant-numeric: tabular-nums; }
.news-src { display: inline-block; font-size: 11px; color: var(--accent);
  border: 1px solid rgba(59,130,246,.35); border-radius: 4px; padding: 0 6px; margin-right: 6px; }
.news-title { font-weight: 500; }
.news-title a:hover { color: var(--accent); }
.news-summary { color: var(--muted); font-size: 12.5px; margin-top: 4px; }

/* ---------------- 资讯 AI 解读 ---------------- */
.news-ai { margin-top: 8px; }
.ai-int-btn { background: var(--accent-soft); color: var(--accent);
  border: 1px solid rgba(59,130,246,.35); border-radius: 6px; padding: 3px 10px;
  font-size: 12px; cursor: pointer; transition: all .15s; }
.ai-int-btn:hover { background: var(--accent); color: #fff; }
.ai-int { margin-top: 8px; padding: 10px 13px; background: var(--panel2);
  border-left: 3px solid var(--accent); border-radius: 8px; font-size: 12.5px;
  color: var(--muted); line-height: 1.75; }

/* =============== AI 复盘 - 研报式版式 =============== */
.rv-nav { display: flex; gap: 6px; overflow-x: auto; padding: 2px 2px 14px; scrollbar-width: none; }
.rv-nav::-webkit-scrollbar { display: none; }
.rv-nav a { flex: none; color: var(--muted); text-decoration: none; font-size: 12.5px;
  padding: 5px 13px; border-radius: 999px; border: 1px solid var(--line); transition: all .15s; }
.rv-nav a:hover, .rv-nav a.active { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }

.rv-hero { background: linear-gradient(135deg, #1f2a44 0%, #243a6b 100%); border-radius: 16px;
  color: #fff; padding: 24px 26px; margin-bottom: 20px; position: relative; overflow: hidden; }
.rv-hero::after { content: ""; position: absolute; top: -90px; right: -40px; width: 280px; height: 280px;
  border-radius: 50%; background: radial-gradient(circle, rgba(59,130,246,.35), transparent 70%); }
.rv-hero h1 { font-size: 22px; letter-spacing: .5px; position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; }
.rv-hero .sub { color: #b9c4dc; font-size: 12.5px; margin-top: 5px; position: relative; z-index: 1; }
.rv-kpi-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 18px; position: relative; z-index: 1; }
.rv-kpi { position: relative; min-width: 0; border-radius: 14px; padding: 14px 15px 12px;
  overflow: hidden; border: 1px solid rgba(255,255,255,.14);
  background: linear-gradient(160deg, rgba(255,255,255,.10), rgba(255,255,255,.03));
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease; }
/* 方向性光效 */
.rv-kpi[data-dir="up"] { background: linear-gradient(160deg, rgba(255,122,107,.20), rgba(255,122,107,.05)); }
.rv-kpi[data-dir="down"] { background: linear-gradient(160deg, rgba(95,224,176,.18), rgba(95,224,176,.05)); }
.rv-kpi[data-dir="gold"] { background: linear-gradient(160deg, rgba(245,185,66,.20), rgba(245,185,66,.05)); }
.rv-kpi[data-dir="blue"] { background: linear-gradient(160deg, rgba(94,138,255,.20), rgba(94,138,255,.05)); }
/* 顶部高光条 */
.rv-kpi::before { content: ""; position: absolute; top: 0; left: 14px; right: 14px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.55), transparent); }
/* 右上角光斑 */
.rv-kpi::after { content: ""; position: absolute; top: -34px; right: -34px; width: 90px; height: 90px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.16), transparent 70%); pointer-events: none; }
.rv-kpi:hover { transform: translateY(-4px); border-color: rgba(255,255,255,.38);
  box-shadow: 0 12px 28px rgba(0,0,0,.38); }
.rv-ic { position: absolute; top: 10px; right: 12px; font-size: 15px; font-style: normal; opacity: .9; }
.rv-lb { display: block; font-size: 11.5px; color: #b9c4dc; letter-spacing: .4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 22px; }
.rv-kpi strong { display: flex; align-items: baseline; justify-content: flex-start; gap: 6px;
  font-size: 21px; font-weight: 800; line-height: 1.35; margin-top: 3px;
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.rv-kpi strong span { white-space: nowrap; }
/* 数值辉光 */
.rv-kpi[data-dir="up"] strong.up, .rv-kpi[data-dir="up"] strong span.up { text-shadow: 0 0 18px rgba(255,122,107,.65); }
.rv-kpi[data-dir="down"] strong.down, .rv-kpi[data-dir="down"] strong span.down { text-shadow: 0 0 18px rgba(95,224,176,.65); }
.rv-kpi[data-dir="gold"] strong { text-shadow: 0 0 18px rgba(245,185,66,.6); }
.rv-kpi em { display: block; font-style: normal; font-size: 10.5px; color: #8fa0c4; margin-top: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rv-kpi strong.up { color: #ff7a6b; } .rv-kpi strong.down { color: #5fe0b0; }

.rv-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px 22px; margin-bottom: 16px; scroll-margin-top: 70px; }
.rv-card.reco { border-color: color-mix(in srgb, var(--gold) 45%, transparent); }
.rv-title { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 700; margin-bottom: 2px; }
.rv-title .num { flex: none; width: 26px; height: 26px; border-radius: 8px; background: var(--accent);
  color: #fff; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; }
.rv-sub { color: var(--muted); font-size: 12px; margin-bottom: 14px; border-bottom: 1px dashed var(--line); padding-bottom: 10px; }
.rv-core { background: color-mix(in srgb, var(--accent) 8%, transparent); border-left: 3px solid var(--accent);
  padding: 10px 14px; border-radius: 0 8px 8px 0; font-size: 13.5px; margin-bottom: 14px; }
.rv-core b { color: var(--accent); }
.rv-para { font-size: 13.5px; color: var(--text); opacity: .92; margin-bottom: 8px; text-align: justify; }
.rv-para b, .rv-core b, .rv-summary b { color: var(--accent); }

.rv-index-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 14px; }
.rv-ix { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 11px; text-align: center; }
.rv-ix .nm { font-size: 12px; color: var(--muted); }
.rv-ix .pt { font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; margin: 2px 0; }
.rv-ix .chg { font-size: 13px; font-weight: 600; }
.rv-ix .dlt { font-size: 11px; color: var(--muted); }

.rv-big-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(158px, 1fr)); gap: 10px; margin-bottom: 14px; }
.rv-bn { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.rv-bn .lb { font-size: 12px; color: var(--muted); }
.rv-bn .vl { font-size: 23px; font-weight: 800; font-variant-numeric: tabular-nums; margin: 2px 0; }
.rv-bn .dt { font-size: 11.5px; color: var(--muted); }

.rv-stacked { height: 20px; border-radius: 6px; overflow: hidden; display: flex; background: var(--bar-bg); }
.rv-stacked .seg { height: 100%; }
.rv-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12.5px; margin-top: 8px; color: var(--muted); }
.rv-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 5px; vertical-align: -1px; }

.rv-hbar { margin: 8px 0; }
.rv-hbar .hd { display: flex; justify-content: space-between; font-size: 13px; margin-bottom: 3px; }
.rv-hbar .hd .nm { font-weight: 600; }
.rv-hbar .hd .num { font-variant-numeric: tabular-nums; }
.rv-hbar .track { height: 12px; background: var(--bar-bg); border-radius: 6px; overflow: hidden; }
.rv-hbar .fill { height: 100%; border-radius: 6px; }
.rv-hbar .meta { font-size: 11.5px; color: var(--muted); margin-top: 3px; }

.rv-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 8px; }
.rv-money { display: flex; align-items: center; gap: 8px; margin: 6px 0; font-size: 12.5px; }
.rv-money .lb { width: 92px; flex: none; color: var(--text); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-money .track { flex: 1; height: 12px; background: var(--bar-bg); border-radius: 6px; overflow: hidden; }
.rv-money .vl { width: 84px; text-align: right; font-variant-numeric: tabular-nums; flex: none; font-weight: 600; }

.rv-ladder { display: grid; grid-template-columns: repeat(auto-fit, minmax(215px, 1fr)); gap: 10px; margin-top: 10px; }
.rv-lvl { background: var(--bg-soft); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; }
.rv-lvl .h { font-size: 12.5px; font-weight: 700; color: var(--accent); margin-bottom: 5px; }
.rv-lvl .h span { color: var(--muted); font-weight: 400; font-size: 11px; margin-left: 6px; }
.rv-lvl li { list-style: none; font-size: 12.5px; margin: 3px 0; color: var(--text); opacity: .9; }

.rv-summary { background: linear-gradient(135deg, color-mix(in srgb, var(--gold) 12%, transparent), color-mix(in srgb, var(--gold) 4%, transparent));
  border: 1px solid color-mix(in srgb, var(--gold) 40%, transparent); border-radius: 12px; padding: 14px 16px; font-size: 13.5px; }
.rv-risk { background: color-mix(in srgb, var(--up) 7%, transparent); border: 1px solid color-mix(in srgb, var(--up) 35%, transparent);
  border-radius: 12px; padding: 14px 16px; margin-top: 12px; font-size: 13px; }
.rv-risk b { color: var(--up); }
.rv-footer { color: var(--muted); font-size: 11.5px; margin: 4px 2px 8px; line-height: 1.8; }

.brief .detail { display: none !important; }
.brief .rv-core { margin-bottom: 0; }

@media (max-width: 1000px) {
  .rv-kpi-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 820px) {
  .rv-two-col { grid-template-columns: 1fr; }
  .rv-index-grid { grid-template-columns: repeat(2, 1fr); }
  .rv-hero { padding: 18px 16px; }
  .rv-hero h1 { font-size: 18px; }
  .rv-card { padding: 16px 15px; }
}
@media (max-width: 560px) {
  .rv-kpi-grid { grid-template-columns: repeat(2, 1fr); }
  .rv-kpi strong { font-size: 17px; }
}

.rv-h4 { font-size: 14px; margin: 16px 0 10px; padding-left: 10px; border-left: 3px solid var(--accent); }

/* ---------------- 状态与骨架 ---------------- */
.state { color: var(--muted); font-size: 13px; padding: 26px; text-align: center;
  border: 1px dashed var(--line-strong); border-radius: var(--radius); }
.state.error { color: var(--up); }
.skeleton { background: linear-gradient(90deg, var(--panel) 25%, var(--panel2) 50%, var(--panel) 75%);
  background-size: 200% 100%; animation: shimmer 1.3s infinite; border-radius: 10px; min-height: 90px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.center { text-align: center; margin: 14px 0; }
footer { margin-top: 40px; padding: 20px 0; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 12px; text-align: center; }

/* ---------------- 管理后台 ---------------- */
.topbar { background: var(--panel); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 100; backdrop-filter: blur(12px); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between;
  padding: 12px 0; flex-wrap: wrap; gap: 8px; }

.admin-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(170px,1fr)); gap: 10px; margin-bottom: 18px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.stat .n { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.stat .k { font-size: 12px; color: var(--muted); margin-top: 2px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }
.log-line { display: flex; gap: 12px; font-size: 13px; padding: 7px 0; border-bottom: 1px dashed var(--line);
  align-items: center; flex-wrap: wrap; }
.log-line .st { min-width: 62px; font-weight: 600; }
.st.success { color: var(--down); } .st.failed { color: var(--up); } .st.skipped { color: var(--muted); }
.sub { color: var(--muted); font-size: 12px; }

/* ---------------- 视图切换 ---------------- */
.view { min-height: 62vh; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 860px) {
  .sentiment-layout { grid-template-columns: 1fr; justify-items: center; }
  .hb-row { grid-template-columns: 78px 1fr 52px; }
  .hb-fund { display: none; }
  .hero-card .v { font-size: 22px; }
  /* 移动端导航折叠: 导航链接独立整行, 不被日期/按钮遮挡 */
  .topnav-inner { flex-wrap: wrap; height: auto; padding: 8px 0; gap: 8px; }
  .logo { order: 1; font-size: 15px; }
  .top-actions { order: 2; margin-left: auto; }
  .nav-links { order: 3; flex: 0 0 100%; width: 100%; padding: 2px 0 4px; }
  .nav-links a { padding: 6px 10px; font-size: 13px; }
  input[type="date"] { max-width: 128px; }
}
@media (max-width: 560px) {
  .wrap { padding: 0 12px; }
  .topnav-inner { gap: 6px; }
  .top-actions { gap: 5px; flex-wrap: wrap; }
  .top-actions .btn.small { padding: 3px 8px; font-size: 12px; }
  input[type="date"] { max-width: 112px; }
  .cards { grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
  th, td { padding: 8px 10px; font-size: 12.5px; }
  .review { padding: 14px; }
  .review-card { padding: 12px 12px; }
  .donut { width: 108px; height: 108px; }
  .donut::after { inset: 20px; }
  .hb-row { grid-template-columns: 72px 1fr 50px; }
  .hb-fund { display: none; }
  .mod-title { font-size: 16px; }
  .legend { font-size: 12px; }
  .sentiment-layout { gap: 12px; }
}

/* NEWS-EDITORIAL-LAYOUT-20260821 */
#news { position: relative; }
/* 模块头部 */
.news-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.news-head-left { min-width: 0; }
.news-sub { margin-top: 4px; font-size: 12px; color: var(--muted); }
.news-stats { display: flex; gap: 8px; flex-wrap: wrap; }
.stat-item { font-size: 11.5px; color: var(--muted); background: var(--panel2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; white-space: nowrap; font-variant-numeric: tabular-nums; }
/* 统一工具栏 */
.news-toolbar { border: 1px solid var(--line); border-radius: 14px; background: var(--panel); padding: 10px 12px; margin-bottom: 4px; }
.news-toolbar .search-row { position: relative; margin-bottom: 10px; }
.search-ic { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); font-size: 13px; opacity: .75; pointer-events: none; }
.news-toolbar .search-row input { width: 100%; min-height: 42px; padding: 9px 14px 9px 36px; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--line); color: var(--text); font-size: 13.5px; outline: none; transition: border-color .15s, box-shadow .15s; }
.news-toolbar .search-row input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
#channelTabs, #sentiFilters { display: flex; gap: 8px; overflow-x: auto; flex-wrap: nowrap; padding: 2px 0 6px; scrollbar-width: thin; }
#channelTabs { margin-bottom: 6px; }
#channelTabs .chip, #sentiFilters .chip { flex: 0 0 auto; border-radius: 999px; padding: 6px 13px; font-size: 12.5px; min-height: 32px; }
/* 内容区 */
#newsBox { display: block; }
#newsBox .group-title { display: flex; align-items: center; gap: 8px; margin: 20px 0 12px; padding: 9px 14px; border: 1px solid var(--line); border-radius: 12px; background: linear-gradient(135deg, rgba(79,140,255,.10), rgba(167,139,250,.04)); font-size: 14px; font-weight: 700; letter-spacing: .3px; }
#newsBox .group-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.news-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: stretch; }
/* 编辑式新闻卡片 */
.news-item { min-width: 0; display: flex; flex-direction: column; padding: 17px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease; }
.news-item:hover { transform: translateY(-2px); border-color: var(--line-strong); box-shadow: var(--shadow); }
.news-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; margin-bottom: 9px; font-size: 11px; color: var(--muted); }
.news-time { font-variant-numeric: tabular-nums; white-space: nowrap; }
.news-src { background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 2px 8px; font-weight: 600; white-space: nowrap; }
.badge { display: inline-block; border: 1px solid var(--line-strong); border-radius: 999px; padding: 1px 7px; font-size: 10.5px; line-height: 1.5; white-space: nowrap; }
.badge-top { color: #f59e0b; border-color: #f59e0b; background: rgba(245,158,11,.08); }
.badge-hot { color: #f0443e; border-color: #f0443e; background: rgba(240,68,62,.08); }
.badge-chan { font-weight: 600; }
.badge-senti { font-weight: 600; }
.news-title { font-size: 16px; line-height: 1.55; font-weight: 700; margin-bottom: 7px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.news-title a { color: var(--text); text-decoration: none; transition: color .15s; }
.news-title a:hover { color: var(--accent); }
.news-summary { flex: 1; color: var(--muted); font-size: 13px; line-height: 1.75; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin-bottom: 12px; }
.news-ai { margin-top: auto; padding-top: 11px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 8px; }
.ai-int-btn { min-height: 34px; padding: 5px 13px; border-radius: 9px; font-size: 12.5px; }
/* 焦点资讯 */
.news-feature { grid-column: 1 / -1; background: linear-gradient(150deg, rgba(79,140,255,.14), rgba(167,139,250,.06)), var(--panel); border-color: rgba(79,140,255,.35); padding: 22px 24px; }
.news-feature .tag-feature { background: linear-gradient(135deg, #f59e0b, #f97316); color: #fff; border-radius: 6px; padding: 2px 9px; font-size: 11px; font-weight: 700; }
.news-feature .news-title { font-size: 21px; line-height: 1.5; -webkit-line-clamp: 2; margin: 4px 0 10px; }
.news-feature .news-summary { -webkit-line-clamp: 3; font-size: 13.5px; }
.news-feature .news-ai { padding-top: 13px; }
/* 加载更多 */
#news .center { margin-top: 22px; }
#btnMore { min-width: 160px; border-radius: 999px; min-height: 40px; }
/* 响应式 */
@media (max-width: 820px) {
  .news-grid { grid-template-columns: 1fr; gap: 12px; }
  .news-feature { padding: 18px 18px; }
  .news-feature .news-title { font-size: 19px; }
  #newsBox .group-title { margin-top: 14px; }
}
@media (max-width: 560px) {
  .news-head { align-items: flex-start; }
  .news-stats { width: 100%; }
  .stat-item { font-size: 11px; padding: 3px 9px; }
  .news-toolbar { padding: 8px 9px; }
  .news-toolbar .search-row input { min-height: 42px; }
  #channelTabs, #sentiFilters { gap: 6px; }
  #channelTabs .chip, #sentiFilters .chip { padding: 6px 11px; font-size: 12px; min-height: 36px; }
  .news-item { padding: 14px 15px; }
  .news-title { font-size: 15.5px; }
  .news-summary { font-size: 12.5px; -webkit-line-clamp: 4; }
  .ai-int-btn { min-height: 40px; }
}
