/* A股投研专业版 — 4 栏暗色界面 (1:1 复刻截图布局)
   配色规则: 红涨绿跌, 暗色调主题, 圆角面板, 蓝色 accent
*/
/* ★ 2026 重构: 电影感暗色量化终端 — 分层背景/发丝描边/靛蓝辉光/立体/Expo缓动. A股红涨绿跌不变. */
:root, body.pro {
  --bg-deep:    #07080c;     /* 最深 (图表区/底层) */
  --bg:         #0b0d13;     /* 基础背景 (非纯黑, 防 OLED 涂抹) */
  --pane:       #12141c;     /* 面板 */
  --pane-2:     #191c25;     /* 次面板 / 抬升面 */
  --hover:      #222632;
  --border:        rgba(255,255,255,.07);   /* 发丝描边 */
  --border-strong: rgba(255,255,255,.13);
  --text:       #eceef4;
  --text-2:     #aab1be;
  --dim:        #6b7280;
  /* 别名: 给内联样式的自定义组件(回测自定义策略/参数输入框)用 — 引用真实 token, 自动跟随深/浅主题 */
  --surface-2:  var(--pane-2);
  --surface:    var(--pane);
  --line:       var(--border-strong);
  --text-muted: var(--text-2);
  --accent:     #5b78ff;     /* 精致靛蓝 */
  --accent-2:   #4661f0;
  --accent-soft: rgba(91,120,255,.13);
  --accent-glow: rgba(91,120,255,.42);
  --up:         #E63946;     /* 红 — 涨 (A股, 全站统一值) */
  --down:       #06A77D;     /* 绿 — 跌 (A股, 全站统一值) */
  --up-soft:    rgba(230,57,70,.12);
  --down-soft:  rgba(6,167,125,.12);
  --warn:       #B8893E;     /* 持有/中性 黄铜金 (全站统一品牌点缀) */
  --hold:       #B8893E;
  --hold-soft:  rgba(184,137,62,.12);
  --pro-gold:   #B8893E;
  --shadow-sm:  0 1px 2px rgba(0,0,0,.45);
  --shadow:     0 8px 26px rgba(0,0,0,.42), 0 1px 2px rgba(0,0,0,.40);
  --shadow-lg:  0 24px 64px rgba(0,0,0,.55);
  --radius-sm:  8px;
  --radius:     12px;
  --radius-lg:  16px;
  --glass:      rgba(18,20,28,.72);
  --hi:         inset 0 1px 0 rgba(255,255,255,.05);   /* 顶部高光线 */
  --ease:       cubic-bezier(.16,1,.3,1);              /* Expo.out — 高级缓动 */
  --ease-out:   cubic-bezier(.22,1,.36,1);
  --mono:       "JetBrains Mono", ui-monospace, "SF Mono", Consolas, monospace;
  --font-display: "Newsreader", "Songti SC", "Noto Serif SC", Georgia, serif;     /* 衬线标题 (全站统一编辑风) */
  --font:         "Plus Jakarta Sans", "PingFang SC", "Noto Sans SC", "Microsoft YaHei", -apple-system, system-ui, sans-serif;  /* 正文/UI (全站统一) */
}

/* 亮色主题 — A 股惯例: 红涨绿跌的色不变, 只换背景/字色/阴影 */
body.pro.light {
  /* ★ 参考 Perplexity Finance: 通透近白、极淡边框(靠留白+微阴影分隔)、配色克制。暖底保留。 */
  --bg-deep:    #f4f1eb;     /* 画布略深 (暖, 淡) */
  --bg:         #faf8f5;     /* 画布 (页面, 暖纸 — 用户要求保留暖底) */
  --pane:       #ffffff;     /* 卡片纯白 */
  --pane-2:     #f7f5f0;     /* 内陷 (极淡暖) */
  --hover:      #f2efe9;
  --border:        #ece9e2;  /* ★极淡描边 (Perplexity 几乎无框感) */
  --border-strong: #ddd8ce;
  --text:       #1a1815;     /* 一级文字 (近黑, 微暖) */
  --text-2:     #6b665e;     /* 二级 (暖灰) */
  --dim:        #a8a39a;     /* 三级 (暖灰) */
  --accent:     #1a1815;     /* accent: 近黑(克制, 仅少量主元素用) */
  --accent-2:   #000000;
  --accent-soft: rgba(26,24,21,.05);    /* 中性弱底 */
  --accent-glow: rgba(26,24,21,.14);    /* 焦点环(淡) */
  --up-soft:    rgba(230,57,70,.09);
  --down-soft:  rgba(6,167,125,.09);
  --hold-soft:  rgba(184,137,62,.11);
  --shadow-sm:  0 1px 2px rgba(20,18,14,.04);                                   /* ★软·淡 */
  --shadow:     0 1px 3px rgba(20,18,14,.05), 0 8px 20px -8px rgba(20,18,14,.06);
  --shadow-lg:  0 16px 40px -12px rgba(20,18,14,.11), 0 4px 12px -4px rgba(20,18,14,.05);
  --glass:      rgba(250,248,245,.82);
  --hi:         inset 0 1px 0 rgba(255,255,255,.7);
}
body.pro.light { background: var(--bg); color: var(--text); }
/* 亮色下需要重写的几个半透明色 (rgba 不走变量, 单独覆盖) */
body.pro.light .ai-msg.report-link,
body.pro.light #pro-app.sidebar-collapsed { background: var(--bg); }
body.pro.light .sw-item.active {
  background: rgba(28, 25, 23, 0.06);
}
body.pro.light .watchlist-list .sw-item.active {
  background: rgba(28, 25, 23, 0.06);
}
body.pro.light .news-sub.active {
  background: rgba(28, 25, 23, 0.07);
}
body.pro.light .new-chat-btn kbd {
  background: rgba(255, 255, 255, 0.22);
}
body.pro.light .sidebar-toggle:hover { background: var(--hover); }
/* 亮色下滚动条更柔 */
body.pro.light ::-webkit-scrollbar-thumb { background: var(--border-strong); }
body.pro.light ::-webkit-scrollbar-thumb:hover { background: var(--dim); }

/* 主题切换按钮内的 sun/moon icon — 默认暗色显月亮, 亮色显太阳 */
.th-icon { display: none; }
body.pro:not(.light) .th-moon { display: block; }
body.pro.light .th-sun { display: block; }

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

html, body {
  height: 100%; overflow: hidden;
  font-family: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text);
  /* 流式根字号: 15px@小屏 → 17px@大屏, 让 rem/em 随视口等比缩放, 缓解换屏比例错位;
     夹紧上下限保证开发者大屏观感基本不变 (pro 页不引 tokens.css, 故此处单独设) */
  font-size: clamp(15px, 0.28vw + 13.4px, 18px);
}
.hidden { display: none !important; }

/* ===== 登录遮罩 (跟简易版同款, 简单复用) ===== */
#login-overlay {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
}
.login-box {
  width: 340px; padding: 32px;
  background: var(--pane); border: 1px solid var(--border);
  border-radius: 12px; text-align: center;
}
.login-box h2 { font-size: 20px; margin-bottom: 4px; }
.login-sub { color: var(--dim); font-size: 14.5px; margin-bottom: 20px; }
.login-box input {
  width: 100%; padding: 10px 12px; margin-bottom: 10px;
  background: var(--pane-2); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text); font-size: 15.5px;
}
.login-box input:focus { outline: none; border-color: var(--accent); }
.code-row { display: flex; gap: 8px; margin-bottom: 10px; }
.code-row input { flex: 1; margin-bottom: 0; }
.code-row button {
  white-space: nowrap; padding: 0 14px; border: 1px solid var(--border);
  border-radius: 6px; background: var(--pane-2); color: var(--text);
  font-size: 13.5px; cursor: pointer;
}
.code-row button:disabled { opacity: .55; cursor: not-allowed; }
.login-actions { display: flex; gap: 8px; margin-top: 6px; }
.login-actions button {
  flex: 1; padding: 9px 14px; border: none; border-radius: 6px;
  background: var(--accent); color: #fff; font-size: 14.5px; cursor: pointer;
}
.login-actions button.secondary { background: var(--pane-2); color: var(--text); }
.login-error { color: var(--up); font-size: 13.5px; margin-top: 10px; min-height: 16px; }

/* ============================================================
   主布局 — 4 列 (左侧两栏可整体折叠)
   ============================================================ */
#pro-app {
  display: grid;
  grid-template-columns: 288px 1fr 660px;
  height: 100vh; width: 100vw;
  position: relative;          /* 折叠把手绝对定位的参照 */
}
/* 左栏指数条 (搜代码上方) — 上证/深证/创业板, 三列各自名称/值/涨跌 */
.wl-index-strip {
  display: flex; gap: 6px;
  padding: 8px 10px 6px;
  border-bottom: 1px solid var(--border);
}
.wlx {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  padding: 4px 2px; border-radius: 6px; background: var(--hover);
}
.wlx-n { font-size: 11px; color: var(--dim); }
.wlx-v { font-size: 13px; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; font-family: ui-monospace, Consolas, monospace; }
.wlx-c { font-size: 11px; color: var(--dim); font-variant-numeric: tabular-nums; font-family: ui-monospace, Consolas, monospace; }
.wlx.up   .wlx-v, .wlx.up   .wlx-c { color: #ef5350; }
.wlx.down .wlx-v, .wlx.down .wlx-c { color: #26a69a; }
/* 显式定列, 防止 display:none 后后面元素跑位 (grid 隐式 placement 会让后续 item 顶到前面的空列) */
.sessions-watchlist { grid-column: 1; }
.chart-area        { grid-column: 2; min-width: 0; }
.ai-pane           { grid-column: 3; min-width: 0; }

#pro-app.sidebar-collapsed {
  grid-template-columns: 0 1fr 660px;
}
#pro-app.sidebar-collapsed .sessions-watchlist {
  display: none;
}
/* 折叠把手: 贴左栏右缘 · 垂直居中 · 默认隐藏, 悬停才浮现 */
.sidebar-toggle {
  position: absolute;
  /* 贴 rail+自选栏 右缘分界线; 自选栏改流式后用变量计算, 不再写死 338px */
  left: calc(var(--pro-rail-w, 58px) + var(--pro-wl-w, 280px)); top: 50%;
  transform: translate(-50%, -50%);      /* 正骑在分界线上 = 贴左栏最右缘 */
  z-index: 65;
  width: 22px; height: 46px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--pane); color: var(--text-2);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  box-shadow: 0 1px 5px rgba(0,0,0,.14);
  cursor: pointer; font-size: 15.5px;
  opacity: 0;                              /* 默认隐藏 */
  transition: opacity .18s, background .15s, color .15s;
}
/* 加大悬停感应区(纵向更高 + 跨边界一点), 便于在中部唤出 */
.sidebar-toggle::before {
  content: ''; position: absolute;
  top: -32px; bottom: -32px; left: -8px; right: -8px;
}
.sidebar-toggle:hover {
  opacity: 1;
  background: var(--hover); color: var(--text);
}
/* 折叠态: 移到 rail 右缘(自选栏收为 0), 箭头反向(指向右=展开) */
#pro-app.sidebar-collapsed .sidebar-toggle {
  left: 58px;
  transform: translate(-50%, -50%) rotate(180deg);
}

/* 登录页大号 Z 标识 */
.login-logo {
  width: 60px; height: 60px; border-radius: 14px; margin: 0 auto 14px;
  background: linear-gradient(135deg, #06d6e0 0%, #4f6cff 52%, #9b5cf6 100%);
  color: #fff; font-weight: 800; font-size: 34px; font-style: italic;
  letter-spacing: -1px;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 18px rgba(26, 24, 21, 0.5);
}

/* ============================================================
   Col 1: 会话历史 + 自选
   ============================================================ */
.sessions-watchlist {
  background: var(--pane);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.new-chat-btn {
  margin: 12px 12px 8px;
  padding: 10px 12px; border-radius: 8px;
  background: var(--accent); color: #fff;
  border: none; cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  font-size: 14.5px; font-weight: 500;
  transition: background .15s;
}
.new-chat-btn:hover { background: var(--accent-2); }
.new-chat-btn kbd {
  margin-left: auto; padding: 1px 5px; font-size: 11.5px;
  background: rgba(255,255,255,0.18); border-radius: 3px;
  font-family: ui-monospace, Consolas, monospace;
}

.sw-section {
  display: flex; flex-direction: column;
  flex: 0 0 auto;
  padding: 8px 0 4px;
  border-top: 1px solid var(--border);
}
.sw-section:nth-of-type(2) { flex: 1 1 auto; overflow: hidden; }
.sw-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px 10px;
  font-size: 14px; font-weight: 600;
  color: var(--text-2); letter-spacing: 0.3px;
}
.sw-head-icons { display: flex; gap: 4px; }
.icon-btn {
  background: transparent; border: none; color: var(--dim);
  padding: 3px 6px; cursor: pointer; font-size: 14.5px; border-radius: 4px;
}
.icon-btn:hover { color: var(--text); background: var(--hover); }
.balance-pill {
  font-size: 12px; color: var(--text); background: var(--hover);
  padding: 3px 9px; border-radius: 11px; cursor: pointer; white-space: nowrap;
  border: 1px solid var(--border, rgba(128,128,128,.25));
}
.balance-pill:hover { background: var(--accent, #5b8def); color: #fff; }
.balance-pill.low { color: #ef5350; border-color: #ef5350; font-weight: 600; }

/* ===== 充值弹窗 ===== */
#recharge-overlay { position: fixed; inset: 0; z-index: 1100; background: rgba(0,0,0,.55);
  display: flex; align-items: center; justify-content: center; }
#recharge-overlay.hidden { display: none; }
.rc-modal { position: relative; width: min(460px, 92vw); max-height: 90vh; overflow-y: auto;
  background: var(--pane, #fff); color: var(--text); border: 1px solid var(--border-strong);
  border-radius: 16px; padding: 26px 26px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.45); }
.rc-close { position: absolute; top: 14px; right: 16px; border: none; background: transparent;
  color: var(--dim); font-size: 18px; cursor: pointer; line-height: 1; padding: 4px; border-radius: 6px; }
.rc-close:hover { background: var(--hover); color: var(--text); }
.rc-title { margin: 0 0 18px; font-size: 24px; font-weight: 800; }
.rc-tabs { display: inline-flex; gap: 4px; background: var(--hover); border-radius: 10px; padding: 4px; margin-bottom: 6px; }
.rc-tab { border: none; background: transparent; color: var(--dim); font-size: 14px; font-weight: 600;
  padding: 7px 16px; border-radius: 8px; cursor: pointer; }
.rc-tab.active { background: var(--bg); color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,.15); }
.rc-section-label { font-size: 13px; color: var(--dim); margin: 18px 0 10px; }
.rc-amounts { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.rc-amt { min-width: 76px; padding: 12px 8px; border: 1px solid var(--border); background: var(--hover);
  color: var(--text); border-radius: 10px; font-size: 15px; font-weight: 700; cursor: pointer; text-align: center; }
.rc-amt:hover { border-color: var(--accent, #5b8def); }
.rc-amt.active { background: var(--accent, #5b8def); border-color: var(--accent, #5b8def); color: #fff; }
.rc-pricing { color: var(--dim); font-size: 13.5px; cursor: pointer; margin-left: 2px; text-decoration: none; }
.rc-pricing:hover { color: var(--accent, #5b8def); text-decoration: underline; }
.rc-custom-input, .rc-redeem-input { width: 100%; box-sizing: border-box; margin-top: 10px; padding: 11px 12px;
  background: var(--bg); border: 1px solid var(--border); border-radius: 10px; color: var(--text); font-size: 14px; }
.rc-custom-input:focus, .rc-redeem-input:focus { outline: none; border-color: var(--accent, #5b8def); }
.rc-methods { display: flex; flex-direction: column; gap: 10px; }
.rc-method { display: flex; align-items: center; gap: 12px; width: 100%; padding: 13px 14px;
  border: 1.5px solid var(--border); background: var(--bg); border-radius: 12px; cursor: pointer; color: var(--text); }
.rc-method:hover { border-color: var(--accent, #5b8def); }
.rc-method.active { border-color: var(--text); }
.rc-mi { width: 30px; height: 30px; border-radius: 7px; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 16px; flex: none; }
.rc-mi-alipay { background: #1677ff; }
.rc-mi-wechat { background: #07c160; }
.rc-mname { flex: 1; text-align: left; font-size: 15px; font-weight: 600; }
.rc-mcheck { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: var(--border); color: transparent; font-size: 13px; flex: none; }
.rc-method.active .rc-mcheck { background: var(--text); color: var(--bg); }
.rc-pay-btn { width: 100%; margin-top: 22px; padding: 14px; border: none; border-radius: 12px;
  background: var(--accent, #5b8def); color: #fff; font-size: 16px; font-weight: 700; cursor: pointer; }
.rc-pay-btn:hover { filter: brightness(1.08); }
.rc-pay-btn:disabled { opacity: .55; cursor: not-allowed; }
.rc-foot { text-align: center; color: var(--dim); font-size: 12.5px; margin-top: 14px; }
.rc-bank-box { background: var(--hover); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; }
.rc-bank-row { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; padding: 5px 0; }
.rc-bank-row span { color: var(--dim); }
.rc-bank-tip { color: var(--dim); font-size: 12.5px; margin-top: 8px; line-height: 1.5; }
.rc-redeem { display: flex; gap: 10px; }
.rc-redeem-input { margin-top: 0; flex: 1; }
.rc-redeem-btn { padding: 0 18px; border: none; border-radius: 10px; background: var(--accent, #5b8def); color: #fff; font-weight: 700; cursor: pointer; white-space: nowrap; }
.rc-qr { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 6px 0; }
.rc-qr-amt { font-size: 26px; font-weight: 800; margin-bottom: 14px; }
.rc-qr-imgwrap { width: 200px; height: 200px; background: #fff; border-radius: 12px; padding: 8px; display: flex; align-items: center; justify-content: center; }
.rc-qr-img { width: 100%; height: 100%; object-fit: contain; }
.rc-qr-tip { margin-top: 14px; font-size: 14px; color: var(--text); }
.rc-qr-status { margin-top: 8px; font-size: 13px; color: var(--dim); }
.rc-qr-status.paid { color: #26a69a; font-weight: 700; }
.rc-qr-status.err { color: #ef5350; }
.rc-qr-back { margin-top: 16px; border: none; background: transparent; color: var(--dim); cursor: pointer; font-size: 13px; }
.rc-qr-back:hover { color: var(--text); }

.sw-list { flex: 1; overflow-y: auto; padding: 0 6px; }
.sw-empty { color: var(--dim); font-size: 13.5px; padding: 12px; text-align: center; }
.sw-item {
  padding: 8px 10px; margin: 2px 0; border-radius: 6px; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
}
.sw-item:hover { background: var(--hover); }
.sw-item.active { background: var(--pane-2); }
.sw-item-left { min-width: 0; flex: 1; }
.sw-item-del {
  background: transparent; border: none; color: var(--dim);
  padding: 2px 6px; cursor: pointer; font-size: 12.5px;
  opacity: 0; transition: opacity .15s, color .15s;
  border-radius: 4px;
}
.sw-item:hover .sw-item-del { opacity: 1; }
.sw-item-del:hover { color: var(--up); background: var(--hover); }
/* #13 重命名按钮 (✎) — 与删除同款, hover 用主题色 */
.sw-item-ren {
  background: transparent; border: none; color: var(--dim);
  padding: 2px 5px; cursor: pointer; font-size: 12.5px;
  opacity: 0; transition: opacity .15s, color .15s; border-radius: 4px;
}
.sw-item:hover .sw-item-ren { opacity: 1; }
.sw-item-ren:hover { color: var(--accent); background: var(--hover); }

/* 吐司 (轻量提示, 自选添加成功 / 失败用) */
.pro-flash {
  position: fixed; left: 50%; bottom: 32px;
  transform: translate(-50%, 30px); opacity: 0;
  background: var(--pane); color: var(--text);
  padding: 9px 18px; border-radius: 8px;
  border: 1px solid var(--border-strong);
  font-size: 14.5px; z-index: 9999;
  transition: opacity .2s, transform .2s;
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
}
.pro-flash.show { opacity: 1; transform: translate(-50%, 0); }
.sw-item-title {
  font-size: 14.5px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sw-item-meta { color: var(--dim); font-size: 12.5px; margin-top: 2px; }

/* 自选列表 — 个股行 (名称/代码 + 迷你走势线 + 价 + 涨跌) */
/* 列表头 — 名称/代码 | (走势占位) | 最新价 | 涨跌幅, 与下方各行列对齐 */
.watchlist-list .wl-colhead {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 10px 7px;
  font-size: 12px; color: var(--dim);
  border-bottom: 1px solid var(--line);
  margin-bottom: 2px;
}
.watchlist-list .wl-ch-name  { flex: 1; min-width: 0; white-space: nowrap; }
.watchlist-list .wl-ch-spark { flex: 0 0 46px; }
.watchlist-list .wl-ch-price { flex: 0 0 54px; text-align: right; }
.watchlist-list .wl-ch-chg   { flex: 0 0 56px; text-align: right; }
.watchlist-list .sw-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 10px;
  margin: 1px 0;
  border-radius: 6px;
  position: relative;
  border-left: 2px solid transparent;
  transition: background .12s, border-left-color .12s;
}
.watchlist-list .sw-item:hover {
  background: var(--hover);
}
.watchlist-list .sw-item.active {
  background: rgba(26, 24, 21, 0.08);
  border-left-color: var(--accent);
}
.watchlist-list .sw-item-left {
  flex: 1; min-width: 0;
}
.watchlist-list .sw-item-title {
  font-size: 15px; font-weight: 500;
  color: var(--text);
  line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.watchlist-list .sw-item-meta {
  color: var(--dim); font-size: 12.5px;
  margin-top: 2px;
  font-family: ui-monospace, Consolas, monospace;
  letter-spacing: 0.2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;   /* 代码不再溢出压到走势线 */
}
.watchlist-list .wl-spark {
  flex: 0 0 46px; height: 22px;
  display: flex; align-items: center;
  opacity: .92; overflow: hidden;
}
.watchlist-list .wl-spark svg { display: block; width: 46px; height: 22px; }
.watchlist-list .wl-price {
  flex: 0 0 54px; text-align: right;
  color: var(--text);
  font-size: 15px; font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, Consolas, monospace;
  line-height: 1.1;
}
.watchlist-list .wl-change {
  flex: 0 0 56px; text-align: right;
  font-size: 13.5px; font-weight: 600;
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, Consolas, monospace;
  color: var(--dim);
}
.watchlist-list .wl-change.up   { color: var(--up); }
.watchlist-list .wl-change.down { color: var(--down); }
.watchlist-list .sw-item-del {
  position: absolute; top: 4px; right: 4px;
  font-size: 12.5px; padding: 2px 5px;
  background: var(--accent-soft);
  border-radius: 4px;
}
.watchlist-list .sw-item:hover .sw-item-del {
  background: rgba(239, 83, 80, 0.18);
  color: #ff7a76;
}

.view-all, .manage-watchlist {
  background: transparent; border: none;
  color: var(--dim); font-size: 14px; padding: 9px 14px;
  text-align: left; cursor: pointer; text-decoration: none;
  border-top: 1px solid var(--border);
}
.view-all:hover, .manage-watchlist:hover { color: var(--text-2); }
.manage-watchlist {
  margin-top: auto; text-align: center;
  padding: 10px; font-weight: 500;
}

/* ============================================================
   Col 3: 行情主区
   ============================================================ */
.chart-area {
  background: var(--bg);
  display: flex; flex-direction: column;
  overflow: hidden; min-width: 0;
  container-type: inline-size;   /* 让头部能按主区实际宽度(随侧栏伸缩)动态自适应 */
}

/* 头部信息条 */
.stock-header {
  flex: 0 0 auto;   /* 钉死, 不被下面内容挤压/盖住 */
  padding: 9px 22px 0;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: grid;
  /* 行1: 名称/标签 + 价格/信号 ; 行2: 全宽 5 列指标网格 (参考截图) */
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 18px; row-gap: 6px;
  align-items: center;
}
.sh-left {
  grid-column: 1 / 2; grid-row: 1;
  display: flex; align-items: center; gap: 8px;
}
.sh-left .sh-name, .sh-left .sh-code, .sh-left .sh-tags {
  align-self: baseline;
}
.sh-name { font-size: 20px; font-weight: 700; color: var(--text); }
.sh-code { font-size: 14.5px; color: var(--text-2);
           font-family: ui-monospace, Consolas, monospace; }
.sh-tags { display: inline-flex; gap: 4px; margin-left: 4px; }
.sh-tag {
  font-size: 12px; padding: 3px 10px; border-radius: 7px;
  background: var(--pane-2); color: var(--text-2);
  border: 1px solid var(--border); white-space: nowrap;
}
.sh-tag:first-child { background: var(--accent-soft); color: var(--accent); border-color: transparent; font-weight: 600; }
/* 今日信号徽章 — 颜色由 JS 按 买红/卖绿/持琥珀 内联设置 (A股红涨绿跌). 克制的淡底胶囊+圆点 */
.sh-signal { margin-left: auto; display: inline-flex; align-items: center; }
.sh-sig-chip {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  font-size: 13px; font-weight: 700; padding: 5px 13px; border-radius: 999px;
}
.sh-sig-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; flex: none; }
.sh-sig-str { font-size: 11px; font-weight: 700; opacity: .85; margin-left: 1px; }
.sh-price-row {
  grid-column: 2; grid-row: 1;
  display: flex; align-items: center; flex-wrap: nowrap; gap: 4px 12px; min-width: 0;
}
.sh-price {
  font-size: 30px; font-weight: 700;
  font-family: ui-monospace, Consolas, monospace;
}
.sh-change {
  font-size: 16.5px; font-weight: 600;
  font-family: ui-monospace, Consolas, monospace;
}
/* 红涨绿跌 — 三个元素都跟着 stock-header 的 up/down/flat class 走 */
.stock-header.up   .sh-price,
.stock-header.up   .sh-change   { color: var(--up); }
.stock-header.down .sh-price,
.stock-header.down .sh-change   { color: var(--down); }
.stock-header.flat .sh-price,
.stock-header.flat .sh-change   { color: var(--text); }

.sh-status-bar {
  display: inline-flex; align-items: center; gap: 6px;
  margin-left: 14px; color: var(--dim); font-size: 13px; white-space: nowrap;
}
.sh-status-icon { color: var(--down); font-size: 10.5px; }
.stock-header.is-trading .sh-status-icon { color: var(--up); animation: blink 2s infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0.3} }
.sh-time { font-family: ui-monospace, Consolas, monospace; }
.sh-zone { color: var(--dim); }

.sh-metrics {
  grid-column: 1 / 3; grid-row: 2;
  /* 全宽 5 列 × 3 行: 标签上 / 数值下, 列间竖分隔 (参考截图) */
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  border-top: 1px solid var(--border);
}
.m-cell {
  display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px;
  padding: 5px 0 5px 16px; min-width: 0;
  border-left: 1px solid var(--border);
}
.m-cell:nth-child(5n+1) { border-left: none; padding-left: 0; }
.m-cell .k { color: var(--dim); font-size: 11.5px; line-height: 1.15; }
.m-cell .v {
  color: var(--text); font-size: 14.5px; font-weight: 600; line-height: 1.2;
  font-family: var(--mono);
  overflow: hidden; text-overflow: ellipsis; max-width: 100%; white-space: nowrap;
}
.m-cell .v.up   { color: var(--up); }
.m-cell .v.down { color: var(--down); }

/* 窄屏: 指标降列数, 重置竖分隔位置 */
@container (max-width: 880px) {
  .sh-metrics { grid-template-columns: repeat(3, 1fr); }
  .m-cell:nth-child(5n+1) { border-left: 1px solid var(--border); padding-left: 18px; }
  .m-cell:nth-child(3n+1) { border-left: none; padding-left: 0; }
}
@container (max-width: 600px) {
  .stock-header { grid-template-columns: 1fr; }
  .sh-left      { grid-column: 1; grid-row: 1; }
  .sh-price-row { grid-column: 1; grid-row: 2; }
  .sh-metrics   { grid-column: 1; grid-row: 3; grid-template-columns: repeat(2, 1fr); }
  .m-cell:nth-child(3n+1) { border-left: 1px solid var(--border); padding-left: 18px; }
  .m-cell:nth-child(2n+1) { border-left: none; padding-left: 0; }
}

/* Tab 切换 */
.ca-tabs {
  flex: 0 0 auto;   /* 钉死, 切到长内容的子tab时不被盖住 */
  display: flex; gap: 2px; padding: 0 20px;
  background: var(--bg); border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.ca-tab {
  position: relative;
  padding: 12px 15px; background: transparent; border: none;
  color: var(--dim); font-size: 14.5px; cursor: pointer; white-space: nowrap;
  transition: color .16s var(--ease);
}
.ca-tab:hover { color: var(--text-2); }
.ca-tab.active { color: var(--accent); font-weight: 600; }
.ca-tab.active::after {
  content: ''; position: absolute; left: 15px; right: 15px; bottom: 0;
  height: 2.5px; background: var(--accent);
}
.ca-pane { flex: 1 1 auto; min-height: 0; overflow: hidden; display: none; }
.ca-pane.active { display: flex; flex-direction: column; }

/* ===== K线 tab 内的多图网格 (最多 6 窗). 2~3 窗全宽上下排; 4 窗 2×2; 5~6 窗 2 列 3 行 ===== */
#chart-grid {
  flex: 1 1 auto; min-height: 0;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: 1fr;
  gap: 2px;
  background: var(--border);   /* gap 透出来当分隔线 */
}
#chart-grid[data-count="2"] { grid-template-columns: 1fr;     grid-template-rows: 1fr 1fr; }
#chart-grid[data-count="3"] { grid-template-columns: 1fr;     grid-template-rows: 1fr 1fr 1fr; }
#chart-grid[data-count="4"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
#chart-grid[data-count="5"],
#chart-grid[data-count="6"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr 1fr; }
#chart-grid[data-count="7"],
#chart-grid[data-count="8"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr 1fr 1fr; }
.chart-cell { position: relative; min-width: 0; min-height: 0; background: var(--bg); display: flex; flex-direction: column; }
.cc-chart { flex: 1 1 auto; min-height: 0; min-width: 0; }
.cc-chart > div, .cc-chart > iframe { width: 100%; height: 100%; }   /* TradingView 注入的容器撑满 */
/* ★ 每窗精简头 — 单窗隐藏(主表头已够), 多窗显示 名称/现价/涨跌% + ✗ */
.cc-head { display: none; }
#chart-grid:not([data-count="1"]) .cc-head {
  display: flex; align-items: center; gap: 8px; flex: 0 0 26px; height: 26px;
  padding: 0 5px 0 10px; font-size: 12px; line-height: 1;
  background: var(--pane); border-bottom: 1px solid var(--border); user-select: none;
}
.cc-name  { font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 130px; }
.cc-price { font-family: var(--mono); color: var(--text-2); }
.cc-chg   { font-family: var(--mono); font-size: 11.5px; }
.cc-chg.up { color: var(--up); }  .cc-chg.down { color: var(--down); }
.cc-close { margin-left: auto; flex: none; width: 20px; height: 20px; border: none; background: transparent;
  color: var(--dim); cursor: pointer; border-radius: 5px; font-size: 12px; line-height: 1; transition: background .14s, color .14s; }
.cc-close:hover { background: var(--hover); color: var(--up); }
/* 焦点高亮: 多窗 (非单图) 时给焦点格描蓝边 */
#chart-grid:not([data-count="1"]) .chart-cell.focused { box-shadow: inset 0 0 0 2px var(--accent); }
.ca-todo, .ca-loading {
  color: var(--dim); padding: 40px; text-align: center;
}

/* ===== 情景预测工具条 (K线 tab 顶部) ===== */
.fc-toolbar {
  flex: 0 0 auto; position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 6px 14px; min-height: 34px;
  background: var(--bg); border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.fc-title { color: var(--text-2); font-weight: 600; white-space: nowrap; }
.fc-modes { display: inline-flex; border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }
.fc-mode {
  padding: 4px 13px; background: transparent; border: none; border-right: 1px solid var(--border);
  color: var(--dim); font-size: 13px; cursor: pointer;
}
.fc-mode:last-child { border-right: none; }
.fc-mode:hover { color: var(--text); background: rgba(127,127,127,0.10); }
.fc-mode.active { color: #fff; background: var(--accent); }
.fc-caption { color: var(--text-2); display: inline-flex; align-items: center; gap: 7px; flex-wrap: nowrap; overflow: hidden; }
.fc-caption .fc-act-buy  { color: #ef5350; font-weight: 700; }   /* 买入=红 (A股涨) */
.fc-caption .fc-act-sell { color: #26a69a; font-weight: 700; }   /* 卖出=绿 (A股跌) */
.fc-caption .fc-act-hold { color: var(--warn); font-weight: 700; }
/* AI预测结果小标签 (紧凑彩色, 替代旧的长串截断文字) */
.fc-pill {
  display: inline-flex; align-items: center; gap: 3px; white-space: nowrap;
  padding: 2px 9px; border-radius: 999px; font-size: 12px; line-height: 1.5;
  background: var(--pane-2); border: 1px solid var(--border); color: var(--text-2);
}
.fc-pill b { font-weight: 700; font-variant-numeric: tabular-nums; }
.fc-pill.up   { background: rgba(239,83,80,.10);  border-color: rgba(239,83,80,.35);  color: #ef5350; }
.fc-pill.down { background: rgba(38,166,154,.10); border-color: rgba(38,166,154,.35); color: #26a69a; }
.fc-note { color: var(--dim); font-size: 11px; white-space: nowrap; }
/* AI预测结果条 (独立一行, 置于 fc-toolbar 之下) — pill 可换行, 永不挤压工具栏的 MA/MACD/RSI */
#fc-result-bar:not(:empty) {
  display: flex; flex-wrap: wrap; align-items: center; gap: 7px;
  padding: 6px 14px; background: var(--bg); border-bottom: 1px solid var(--border);
}
.fc-caption:empty { display: none; }   /* AI结果已移到下方行, 工具栏内空占位不吃 gap */
/* #18 今日信号可展开看依据 (独立一行, 置于 fc-toolbar 之下) */
#fc-sig-detail:not(:empty) { padding: 5px 14px; background: var(--bg); border-bottom: 1px solid var(--border); }
.fc-basis { margin: 0; }
.fc-basis > summary { cursor: pointer; font-size: 11.5px; color: var(--dim); list-style: none; user-select: none; }
.fc-basis > summary::-webkit-details-marker { display: none; }
.fc-basis[open] > summary { color: var(--text-2); }
.fc-basis ul { margin: 5px 0 2px; padding-left: 16px; }
.fc-basis li { font-size: 11.5px; line-height: 1.6; color: var(--text-2); }
.fc-basis-note { font-size: 10.5px; color: var(--dim); opacity: .85; margin-top: 2px; }
.fc-switch-day { color: var(--accent); cursor: pointer; font-weight: 600; }
.fc-switch-day:hover { text-decoration: underline; }
.fc-disclaimer { margin-left: auto; color: var(--dim); font-size: 11.5px; white-space: nowrap; }

/* ===== 群体推演 按钮 + 全屏 overlay ===== */
.fc-swarm-btn { margin-left: 10px; padding: 4px 11px; border: 1px solid var(--accent); border-radius: 6px;
  background: rgba(26,24,21,0.12); color: var(--accent); font-size: 13px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.fc-swarm-btn:hover { background: rgba(26,24,21,0.22); }
/* 一键画线 — 按钮 + 目的卡弹层 */
.fc-drawkit-btn { margin-left: 8px; padding: 4px 11px; border: 1px solid var(--border-strong, var(--border));
  border-radius: 6px; background: var(--pane-2); color: var(--text); font-size: 13px; cursor: pointer; white-space: nowrap; }
.fc-drawkit-btn:hover { border-color: var(--accent); color: var(--accent); }
.fc-drawkit-btn.active { background: rgba(26,24,21,0.16); border-color: var(--accent); color: var(--accent); }
.ca-pane[data-pane="kline"] { position: relative; }
.dk-pop { position: absolute; top: 54px; left: 12px; z-index: 80; width: 470px; max-width: calc(100% - 24px);
  max-height: calc(100% - 78px); overflow-y: auto; transform-origin: top left;
  background: var(--pane); border: 1px solid var(--border-strong); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: 10px 12px; }
.dk-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
/* 系统进化进度卡 (资讯页顶部) */
.evo-card { border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; background: var(--pane); }
.evo-title { font-size: 13.5px; font-weight: 600; color: var(--text); margin-bottom: 10px; }
.evo-sub { font-weight: 400; color: var(--dim); font-size: 11.5px; }
.evo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.evo-item { background: var(--hover); border-radius: 8px; padding: 10px 12px; }
.evo-it-t { font-size: 11.5px; color: var(--dim); }
.evo-it-big { font-size: 20px; font-weight: 700; font-family: ui-monospace, Consolas; color: var(--accent); margin: 2px 0; }
.evo-it-sub { font-size: 12px; color: var(--text-2); }
.evo-it-hint { font-size: 10.5px; color: var(--dim); margin-top: 3px; }
/* 结构分析 (多周期共振 + 区间位置 + 仓位计算器) — 常驻 AI 助手栏第三 tab, 完全不压图 */
.mtf-pane { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px; font-size: 12.5px; }
.mtf-hint { color: var(--dim); padding: 16px; text-align: center; }
.mtf-head { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 10px; }
.mtf-top { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.mtf-lbl { font-size: 11px; color: var(--dim); margin-bottom: 2px; }
.mtf-big { font-size: 20px; font-weight: 700; font-family: ui-monospace, Consolas; color: var(--text); }
.mtf-big.up { color: #ef5350; } .mtf-big.down { color: #26a69a; }
.mtf-tone { font-size: 11px; font-weight: 500; color: var(--dim); }
.mtf-sec { margin-bottom: 12px; }
.mtf-h { font-weight: 600; color: var(--text); margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.mtf-h b { font-family: ui-monospace, Consolas; }
.mtf-badge { padding: 1px 8px; border-radius: 10px; background: var(--accent-soft, rgba(47,83,230,.12)); color: var(--accent); font-size: 11.5px; font-weight: 700; }
.mtf-badge.warn { background: rgba(255,179,0,.16); color: #d98c00; }
.mtf-tbl { width: 100%; border-collapse: collapse; }
.mtf-tbl th { text-align: left; color: var(--dim); font-weight: 500; font-size: 11.5px; padding: 3px 6px; border-bottom: 1px solid var(--border); }
.mtf-tbl td { padding: 4px 6px; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.mtf-tbl td.up { color: #ef5350; font-weight: 600; } .mtf-tbl td.down { color: #26a69a; font-weight: 600; }
.mtf-track { position: relative; height: 8px; border-radius: 5px; background: linear-gradient(90deg, #26a69a33, #88888822, #ef535033); margin: 2px 0 4px; }
.mtf-mark { position: absolute; top: -3px; width: 4px; height: 14px; border-radius: 2px; background: var(--accent); transform: translateX(-50%); }
.mtf-range { display: flex; justify-content: space-between; color: var(--dim); font-size: 11px; }
.mtf-calc { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 8px; }
.mtf-calc label { display: flex; flex-direction: column; gap: 2px; font-size: 11px; color: var(--dim); }
.mtf-calc input { padding: 5px 7px; background: var(--bg); border: 1px solid var(--border-strong); border-radius: 6px; color: var(--text); font-size: 12.5px; }
.mtf-out { margin-top: 8px; padding: 7px 9px; background: var(--hover); border-radius: 6px; line-height: 1.6; color: var(--text-2); }
.mtf-out b { color: var(--text); font-family: ui-monospace, Consolas; } .mtf-out b.up { color: #ef5350; }
.mtf-disc { font-size: 10.5px; color: var(--dim); margin-top: 8px; }
.dk-pop-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 8px; font-size: 12.5px; color: var(--dim); }
.dk-head-btns { display: flex; align-items: center; gap: 6px; }
.dk-clear { background: transparent; border: 1px solid var(--border); color: var(--text-2); border-radius: 6px;
  padding: 3px 9px; font-size: 12px; cursor: pointer; }
.dk-clear:hover { border-color: #ef5350; color: #ef5350; }
.dk-close { background: transparent; border: none; color: var(--dim); cursor: pointer;
  font-size: 18px; line-height: 1; padding: 0 4px; border-radius: 6px; }
.dk-close:hover { color: var(--text); background: var(--hover); }
.dk-card { display: block; width: 100%; text-align: left; background: var(--pane-2); border: 1px solid var(--border);
  border-radius: 9px; padding: 9px 11px; margin: 0; cursor: pointer; transition: all .14s var(--ease); }
.dk-card:hover { border-color: var(--accent); background: var(--accent-soft); transform: translateY(-1px); }
.dk-card.active { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.dk-card-name { font-size: 13.5px; color: var(--text); font-weight: 600; }
.dk-card-sub { font-size: 11.5px; color: var(--dim); margin-top: 2px; }
.dk-cap { font-size: 12.5px; color: var(--text-2); line-height: 1.5; padding: 8px 6px 4px; border-top: 1px solid var(--border); margin-top: 4px; }
.dk-cap:empty { display: none; }
.prem-tag { font-size: 10px; font-weight: 700; background: linear-gradient(135deg,#d9a55c,#f0c75e);
  color: #1a1a1a; border-radius: 4px; padding: 1px 5px; }
#swarm-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center; }
.sw-modal { width: 94vw; height: 92vh; background: var(--bg); border: 1px solid var(--border-strong);
  border-radius: 14px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 20px 60px rgba(0,0,0,0.5); }
.sw-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.sw-title { font-size: 18px; font-weight: 700; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.sw-sub { color: var(--dim); font-size: 12.5px; flex: 1; }
.sw-close { background: var(--pane-2); border: none; color: var(--text-2); width: 30px; height: 30px;
  border-radius: 6px; cursor: pointer; font-size: 15px; }
.sw-launch { display: flex; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--border); }
.sw-stock { font-weight: 700; font-size: 15px; white-space: nowrap; }
.sw-param { display: inline-flex; align-items: center; gap: 5px; color: var(--dim); font-size: 12.5px; white-space: nowrap; }
.sw-param input { width: 52px; padding: 7px 8px; background: var(--pane-2); border: 1px solid var(--border);
  border-radius: 6px; color: var(--text); font-size: 13px; text-align: center; }
.sw-param input:focus { outline: none; border-color: var(--accent); }
#sw-event { flex: 1; padding: 9px 12px; background: var(--pane-2); border: 1px solid var(--border);
  border-radius: 7px; color: var(--text); font-size: 14px; }
#sw-event:focus { outline: none; border-color: var(--accent); }
#sw-go { padding: 9px 20px; background: var(--accent); color: #fff; border: none; border-radius: 7px;
  cursor: pointer; font-size: 14px; white-space: nowrap; }
#sw-go:disabled { opacity: .5; cursor: not-allowed; }
.sw-status { color: var(--dim); font-size: 12.5px; white-space: nowrap; }
.sw-ground { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 14px; padding: 8px 18px;
  border-bottom: 1px solid var(--border); background: var(--pane); font-size: 12px; color: var(--text-2); }
.sw-ground .sg-tag { color: #ffca28; font-weight: 700; }
.sw-ground .sg-anchor { padding: 2px 8px; border-radius: 5px; background: var(--pane-2); border: 1px solid var(--border); }
.sw-ground .sg-up { color: #ef5350; } .sw-ground .sg-down { color: #26a69a; }
.sw-ground b { color: var(--text); font-family: ui-monospace, Consolas; }
.sw-param select { padding: 7px 6px; background: var(--pane-2); border: 1px solid var(--border); border-radius: 6px;
  color: var(--text); font-size: 13px; }
/* 持仓诊断卡 — 结论先行, 这是产品主角 */
.sw-diag { padding: 12px 18px; border-bottom: 1px solid var(--border); background: linear-gradient(180deg, rgba(91,141,239,0.08), transparent); }
.sw-diag.kind-act { background: linear-gradient(180deg, rgba(255,179,0,0.12), transparent); }
.sd-row1 { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.sd-title { font-size: 14px; font-weight: 700; }
.sd-pnl { font-family: ui-monospace, Consolas; font-size: 13px; }
.sd-pnl.up { color: #ef5350; } .sd-pnl.down { color: #26a69a; }
.sd-verdict { font-size: 19px; font-weight: 800; margin: 2px 0 4px; }
.sd-verdict.act { color: #ffb300; } .sd-verdict.hold { color: #5b8def; }
.sd-verdict .sd-str { font-size: 12px; font-weight: 600; color: var(--dim); }
.sd-reasons { font-size: 12.5px; color: var(--text-2); margin-bottom: 7px; }
.sd-sc { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 6px; }
.sd-sc span { font-size: 12.5px; background: var(--pane-2); border: 1px solid var(--border); border-radius: 6px; padding: 4px 9px; }
.sd-safety { font-size: 12.5px; color: var(--text-2); }
.sd-disc { font-size: 11px; color: var(--dim); margin-top: 6px; }
/* 控制条 (个股+事件+参数+发起, 一行紧凑) */
.sw-ctrl { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 18px; border-bottom: 1px solid var(--border); flex: none; }
.sw-event { flex: 1 1 300px; min-width: 200px; padding: 8px 12px; background: var(--pane); border: 1px solid var(--border-strong);
  border-radius: 8px; color: var(--text); font-size: 13px; }
/* 推演舞台(左) | 决策&叙事(右) — 填满视口, 各面板内部滚动, 结构上不溢出 */
.sw-body { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 440px; }
.sw-stage { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.sw-minibar { flex: none; display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 10px 16px; border-bottom: 1px solid var(--border); font-size: 12.5px; color: var(--text-2); }
.sw-minibar b { font-size: 17px; font-family: ui-monospace, Consolas; }
.sw-minibar i { font-style: normal; color: var(--dim); font-size: 11.5px; margin-left: 2px; }
.sw-rgm { padding: 3px 11px; border-radius: 12px; background: var(--accent-soft, rgba(47,83,230,.12)); color: var(--accent); font-weight: 700; font-size: 13px; }
.sw-round { color: var(--dim); font-weight: 600; margin-left: auto; }
#sw-net { flex: 1; min-height: 0; position: relative; background: radial-gradient(circle at 50% 40%, #1b1f2a, #12141b); transition: background .3s; }
body.pro.light #sw-net { background: radial-gradient(circle at 50% 40%, #eef1f6, #e2e7f0); }
.sw-legend { flex: none; display: flex; flex-wrap: wrap; gap: 4px 14px; padding: 8px 16px; border-top: 1px solid var(--border);
  font-size: 11px; color: var(--dim); max-height: 58px; overflow: auto; }
.sw-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 3px; vertical-align: middle; }
.sw-side { border-left: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; min-width: 0; }
.sw-tabs { flex: none; display: flex; border-bottom: 1px solid var(--border); }
.sw-tab { flex: 1; padding: 9px; background: transparent; border: none; color: var(--dim); cursor: pointer; font-size: 13.5px; }
.sw-tab.active { color: var(--text); font-weight: 600; box-shadow: inset 0 -2px 0 var(--accent); }
.sw-panels { flex: 1; min-height: 0; display: flex; }
.sw-diag, .sw-feed, .sw-reppane { flex: 1; min-height: 0; min-width: 0; overflow: auto; }
.sw-diag.hidden, .sw-feed.hidden, .sw-reppane.hidden { display: none; }
.sw-diag { padding: 14px 16px; border-bottom: none; background: none; }
.sw-reppane { display: flex; flex-direction: column; overflow: hidden; }
.sw-report { flex: 1; min-height: 0; overflow: auto; padding: 12px 14px; }
.sw-feed { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; padding: 12px 14px; }
.sw-fl { background: var(--pane); border: 1px solid var(--border); border-radius: 6px; padding: 6px 9px; line-height: 1.45; animation: swin .32s cubic-bezier(.22,1,.36,1); }
@keyframes swin { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
/* #2 思考中转圈 */
.reason-spin { display: inline-block; width: 11px; height: 11px; border: 2px solid rgba(127,127,127,.25); border-top-color: var(--accent, #2962ff); border-radius: 50%; animation: proSpin .8s linear infinite; margin-right: 6px; vertical-align: -1px; }
@keyframes proSpin { to { transform: rotate(360deg); } }
.sw-fl .who { color: #ffca28; }
.sw-fl .sg-up { color: #ef5350; font-weight: 600; } .sw-fl .sg-down { color: #26a69a; font-weight: 600; } .sw-fl .sw-act-n { color: var(--dim); }
.sw-rd { margin-top: 6px; padding-top: 6px; font-size: 11px; color: var(--dim); text-align: center; border-top: 1px dashed var(--border); }
.sw-rd:first-child { border-top: none; padding-top: 0; margin-top: 0; }
.sw-rd b.sg-up { color: #ef5350; } .sw-rd b.sg-down { color: #26a69a; }
.sw-report { font-size: 13.5px; line-height: 1.7; }
.sw-regen-bar { background: rgba(239,83,80,0.12); border: 1px solid rgba(239,83,80,0.4); border-radius: 7px;
  padding: 9px 11px; margin-bottom: 12px; font-size: 12.5px; color: var(--text-2); }
.sw-regen-bar button { margin-left: 4px; padding: 5px 12px; background: var(--accent); color: #fff; border: none;
  border-radius: 6px; cursor: pointer; font-size: 12.5px; }
.sw-regen-bar button:disabled { opacity: .55; cursor: not-allowed; }
.sw-report h2 { font-size: 16px; margin: 14px 0 6px; color: var(--accent); }
.sw-hint { color: var(--dim); font-size: 12.5px; padding: 20px; text-align: center; }
/* P4 ReportAgent 追问框 */
.sw-ask { flex: none; border-top: 1px solid var(--border); padding: 8px 12px; display: flex; flex-direction: column; gap: 8px; }
.sw-ask-log { max-height: 240px; overflow: auto; display: flex; flex-direction: column; gap: 8px; }
.sw-ask-log:empty { display: none; }
.sw-ask-q { font-size: 12.5px; font-weight: 600; color: var(--text); }
.sw-ask-a { font-size: 12.5px; line-height: 1.65; color: var(--text-2); background: var(--hover); border-radius: 8px; padding: 8px 10px; }
.sw-ask-row { display: flex; gap: 8px; }
.sw-foot { padding: 8px 18px; border-top: 1px solid var(--border); color: var(--dim); font-size: 11.5px; text-align: center; }

/* ===== Tab 面板内容通用样式 (财务/研报/股东/资金/资料/公告) ===== */
.ca-pane.active { overflow-y: auto; }
/* 资讯区例外: 它内部已是 subtabs(钉顶) + news-list(自己滚) 的两段结构,
   若让整个 pane 再 overflow 滚动, 切到行业/板块/大盘 内容长时会把 subtabs 顶出视野(挡住tab)。
   所以资讯 pane 自身不滚, 只让 news-list 内部滚, subtabs 永远在顶。 */
.ca-pane[data-pane="news"].active { overflow: hidden; }
.tab-table-wrap {
  padding: 16px 20px; color: var(--text);
  overflow-x: auto;   /* P2: 资金7列/龙虎榜席位/股东等宽表在窄面板可横向滚动, 不再裁列 */
}
.tab-h3 {
  font-size: 15.5px; font-weight: 600; color: var(--text);
  margin-bottom: 10px; padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.tab-table {
  width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 10px;
}
.tab-table th, .tab-table td {
  border-bottom: 1px solid var(--border);
  padding: 8px 10px; text-align: left;
  font-family: ui-monospace, Consolas, monospace;
}
.tab-table th {
  background: var(--pane); color: var(--text-2);
  font-weight: 600; font-size: 13.5px;
  position: sticky; top: 0; z-index: 1;
}
.tab-table tr:hover td { background: var(--hover); }
.tab-table td.up   { color: var(--up); }
.tab-table td.down { color: var(--down); }
.tab-source {
  color: var(--dim); font-size: 12.5px; margin-top: 6px; font-style: italic;
}

/* 研报 tab — 评级 pill 配色 */
.reports-summary { color: var(--text-2); font-size: 13.5px; margin-bottom: 8px; }
.rating-dist { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.rating-pill {
  padding: 3px 9px; border-radius: 10px; font-size: 13px;
  background: var(--pane-2); border: 1px solid var(--border); color: var(--text-2);
}
.rating-pill b { color: var(--text); font-weight: 600; margin-left: 2px; }
.tab-table td.rating-buy    { color: var(--up);   font-weight: 600; }
.tab-table td.rating-add    { color: #ff9800;     font-weight: 600; }
.tab-table td.rating-hold   { color: var(--text-2); }
.tab-table td.rating-reduce { color: var(--down); font-weight: 600; }
.tab-table td.rating-sell   { color: var(--down); font-weight: 700; }
.report-title { font-family: inherit; max-width: 480px; }

/* 资料 tab — 板块 tag */
.info-table .info-k { color: var(--text-2); width: 120px; }
.info-table .info-v { color: var(--text); font-weight: 500; }
.info-boards { display: flex; flex-wrap: wrap; gap: 6px; }
.info-tag {
  padding: 3px 10px; border-radius: 12px;
  background: var(--pane-2); border: 1px solid var(--border);
  color: var(--text-2); font-size: 13px;
}

/* 分时 tab — canvas 容器 */
.intraday-wrap canvas {
  width: 100%; max-width: 1200px; height: 380px; display: block;
  background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
  margin-bottom: 8px;
}

/* 资讯 list (个股 / 行业 / 板块 / 大盘 共用) */
.news-list {
  flex: 1; overflow-y: auto; padding: 8px 16px 12px;
}
.news-item {
  padding: 10px 4px; border-bottom: 1px solid var(--border);
}
.news-item:hover { background: var(--pane); }
.news-title { color: var(--text); font-size: 15px; margin-bottom: 4px; font-weight: 500; }
.news-title a { color: var(--text); text-decoration: none; }
.news-title a:hover { color: var(--accent); }
.news-summary {
  color: var(--text-2); font-size: 13px;
  line-height: 1.55; margin-bottom: 4px;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden;
}
.news-meta { color: var(--dim); font-size: 12px; }
.news-meta .kw { color: var(--accent); }

/* 资讯 sub-tab (个股 / 行业 / 板块 / 大盘) */
.news-subtabs {
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
  flex: 0 0 auto;                 /* 钉在顶, 不被下面的列表挤压/顶掉 */
  padding: 10px 16px 8px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.news-sub {
  background: transparent; border: 1px solid var(--border);
  color: var(--text-2);
  padding: 5px 14px; border-radius: 14px;
  cursor: pointer; font-size: 13px;
  transition: background .12s, color .12s, border-color .12s;
}
.news-sub:hover { color: var(--text); border-color: var(--border-strong); }
.news-sub.active {
  background: rgba(26, 24, 21, 0.14);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 500;
}
.news-sub-meta {
  margin-left: auto; color: var(--dim); font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ============================================================
   Col 4: AI 投研助手面板
   ============================================================ */
.ai-pane {
  background: var(--pane);
  border-left: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.ai-head {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}
.ai-title {
  flex: 1; font-size: 15.5px; font-weight: 600; color: var(--text);
  display: inline-flex; align-items: center; gap: 6px;
}
.ai-icon { font-size: 15.5px; }

.ai-tabs {
  display: flex; padding: 0 16px;
  border-bottom: 1px solid var(--border);
}
.ai-tab {
  position: relative; padding: 8px 14px;
  background: transparent; border: none;
  color: var(--dim); font-size: 14.5px; cursor: pointer;
}
.ai-tab:hover { color: var(--text-2); }
.ai-tab.active { color: var(--text); }
.ai-tab.active::after {
  content: ''; position: absolute; left: 14px; right: 14px; bottom: 0;
  height: 2px; background: var(--accent);
}

.ai-content {
  flex: 1; overflow-y: auto; padding: 12px 14px 6px;
}

/* ===== AI 对话视图 (输入后覆盖摘要面板) ===== */
.ai-chat-view {
  flex: 1; display: flex; flex-direction: column;
  overflow: hidden; min-height: 0;
}
.ai-chat-view.hidden { display: none; }
.ai-chat-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--pane);
}
.back-summary-btn {
  background: transparent; border: 1px solid var(--border);
  color: var(--text-2); padding: 4px 10px; border-radius: 6px;
  cursor: pointer; font-size: 13.5px;
}
.back-summary-btn:hover { background: var(--hover); color: var(--text); }
.ai-chat-title { color: var(--text); font-size: 14.5px; font-weight: 600; }

/* ===== 长任务进度卡片 (生成报告时显示, 在对话视图头部下方) ===== */
.task-progress {
  flex: 0 0 auto; padding: 10px 14px;
  background: var(--pane); border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.task-progress .tp-header {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 8px; cursor: pointer; user-select: none;
}
.task-progress.collapsed .tp-header { margin-bottom: 0; }
.task-progress.collapsed .tp-stages,
.task-progress.collapsed .tp-current { display: none; }
.task-progress .tp-toggle {
  background: none; border: none; padding: 2px; margin-left: 2px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--dim); cursor: pointer;
}
.task-progress .tp-toggle:hover { color: var(--text); }
.task-progress .tp-chevron { transition: transform .2s ease; }
.task-progress.collapsed .tp-chevron { transform: rotate(-90deg); }
.task-progress svg,
.task-progress svg polyline { stroke: currentColor !important; fill: none !important; }
.task-progress .tp-spinner {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--accent); animation: tp-pulse 1.2s ease-in-out infinite;
}
@keyframes tp-pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.5); opacity: .4; } }
.task-progress .tp-title { flex: 1; font-weight: 600; color: var(--text); }
.task-progress .tp-pct {
  font-family: ui-monospace, Consolas, monospace;
  color: var(--accent); font-size: 11px; font-weight: 600;
  min-width: 30px; text-align: right;
}
.task-progress .tp-elapsed {
  font-family: ui-monospace, Consolas, monospace; color: var(--dim); font-size: 11px;
}
.task-progress .tp-bar {
  position: relative; height: 4px; border-radius: 3px;
  background: var(--border); overflow: hidden; margin: 2px 0 4px;
}
.task-progress .tp-fill {
  display: block; height: 100%; width: 0%;
  background: var(--accent); border-radius: 3px; transition: width .35s ease;
}
.task-progress.done .tp-fill { background: var(--down); }
.task-progress.indeterminate .tp-fill {
  width: 35% !important; transition: none; animation: tp-indet 1.1s ease-in-out infinite;
}
.task-progress.indeterminate .tp-pct { display: none; }
@keyframes tp-indet { 0% { margin-left: -35%; } 100% { margin-left: 100%; } }
.task-progress .tp-stages {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 3px 12px; margin-bottom: 6px;
}
.task-progress .tp-stage {
  display: flex; align-items: center; gap: 5px;
  color: var(--dim); font-size: 11.5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.task-progress .tp-stage.done { color: var(--down); }
.task-progress .tp-stage.active { color: var(--accent); font-weight: 600; }
.task-progress .tp-stage .tp-mark { display: inline-block; width: 12px; text-align: center; font-size: 10px; }
.task-progress .tp-current {
  color: var(--text); font-size: 11.5px;
  border-top: 1px dashed var(--border); padding-top: 5px; margin-top: 2px; min-height: 16px;
}
.task-progress.done .tp-spinner { animation: none; background: var(--down); }
.task-progress.done .tp-current { color: var(--down); }
/* 失败/中断态 — 用琥珀(既非涨红也非跌绿, 避免误读为涨跌), 明确告知"出错了"而非永远转圈 */
.task-progress.failed .tp-spinner { animation: none; background: #e0922e; }
.task-progress.failed .tp-fill { background: #e0922e; }
.task-progress.failed .tp-current { color: #e0922e; font-weight: 600; }
/* 卡死提示 — 长时间无新进展时 tp-current 变琥珀, 提示后端繁忙/可刷新 */
.task-progress .tp-current.stuck { color: #e0922e; }

.ai-msg-list {
  flex: 1; overflow-y: auto; padding: 14px;
  display: flex; flex-direction: column; gap: 10px;
}
.ai-msg { font-size: 14.5px; line-height: 1.7; word-break: break-word; }
.ai-msg.user {
  align-self: flex-end; max-width: 88%;
  background: var(--pane-2); border: 1px solid var(--border);
  padding: 7px 11px; border-radius: 10px;
  white-space: pre-wrap;
}
.ai-msg.assistant {
  align-self: flex-start; max-width: 96%;
}
.ai-msg.assistant .role {
  color: var(--accent); font-size: 12.5px; margin-bottom: 3px;
}
.ai-msg.assistant .content { color: var(--text); }
/* 标题分级 — 拉开 h1/h2/h3 字号与间距, 一眼看出结构层次 (原来 h1~h3 统一 15.5px, 几乎与正文同号) */
.ai-msg.assistant .content.markdown h1,
.ai-msg.assistant .content.markdown h2,
.ai-msg.assistant .content.markdown h3,
.rp-md.markdown h1, .rp-md.markdown h2, .rp-md.markdown h3 {
  color: var(--text); font-weight: 700; line-height: 1.35;
}
.ai-msg.assistant .content.markdown h1, .rp-md.markdown h1 {
  font-size: 18px; margin: 15px 0 9px; padding-bottom: 4px;
  border-bottom: 1px solid var(--border);
}
.ai-msg.assistant .content.markdown h2, .rp-md.markdown h2 {
  font-size: 16px; margin: 14px 0 7px;
  border-left: 3px solid var(--accent); padding-left: 8px;
}
.ai-msg.assistant .content.markdown h3, .rp-md.markdown h3 {
  font-size: 14.5px; margin: 11px 0 5px; font-weight: 600; color: var(--text-2);
}
/* 首个块不要顶部留白 (否则消息一上来一道空隙) */
.ai-msg.assistant .content.markdown > *:first-child,
.rp-md.markdown > *:first-child { margin-top: 0; }
/* 正文呼吸感 — 段距/列表缩进放宽, 中文密排不挤 */
.ai-msg.assistant .content.markdown p,
.rp-md.markdown p { margin: 7px 0; }
.ai-msg.assistant .content.markdown ul,
.ai-msg.assistant .content.markdown ol,
.rp-md.markdown ul, .rp-md.markdown ol { margin: 7px 0; padding-left: 22px; }
.ai-msg.assistant .content.markdown li,
.rp-md.markdown li { margin: 3px 0; }
.ai-msg.assistant .content.markdown li > ul,
.ai-msg.assistant .content.markdown li > ol,
.rp-md.markdown li > ul, .rp-md.markdown li > ol { margin: 3px 0; }
.ai-msg.assistant .content.markdown strong,
.rp-md.markdown strong { color: var(--text); font-weight: 600; }
.ai-msg.assistant .content.markdown table,
.rp-md.markdown table {
  border-collapse: collapse; margin: 6px 0; font-size: 13px;
  display: block; overflow-x: auto; max-width: 100%;
  border: 1px solid var(--border-strong); border-radius: 4px;
}
.ai-msg.assistant .content.markdown th,
.ai-msg.assistant .content.markdown td,
.rp-md.markdown th, .rp-md.markdown td {
  border: 1px solid var(--border-strong); padding: 4px 7px; white-space: nowrap;
}
.ai-msg.assistant .content.markdown th,
.rp-md.markdown th { background: var(--pane-2); color: var(--text); font-weight: 600; }
.ai-msg.assistant .content.markdown code,
.rp-md.markdown code {
  background: var(--pane-2); padding: 1px 4px; border-radius: 3px;
  font-family: ui-monospace, Consolas, monospace; font-size: 13px;
}
.ai-msg.assistant .content.markdown blockquote,
.rp-md.markdown blockquote {
  border-left: 3px solid var(--accent); padding: 2px 10px;
  margin: 6px 0; color: var(--text-2);
  background: rgba(26, 24, 21, 0.05); border-radius: 0 4px 4px 0;
}
/* 多行代码块 — 独立底色/内边距/横向滚动, 不再与正文糊在一起 (原来只有 inline code 有底色) */
.ai-msg.assistant .content.markdown pre,
.rp-md.markdown pre {
  background: var(--pane-2); border: 1px solid var(--border);
  padding: 10px 12px; border-radius: 6px; margin: 8px 0;
  overflow-x: auto; font-size: 13px; line-height: 1.5;
}
.ai-msg.assistant .content.markdown pre code,
.rp-md.markdown pre code { background: none; padding: 0; font-size: 13px; }
/* 引用溯源角标 [value](claim:N) → 小上标 [N] (renderMd 里转换), 替代原来指向 claim:N 的死链 */
.ai-msg.assistant .content.markdown sup.cite,
.rp-md.markdown sup.cite {
  color: var(--accent); font-size: 0.72em; font-weight: 600;
  cursor: help; padding: 0 1px; vertical-align: super;
}
/* 生成中占位光标 — 空 assistant 节点到首 token 之间显示, 缓解"卡住"观感 */
.ai-msg.assistant .content.streaming-pending::after {
  content: '▋'; color: var(--accent); margin-left: 1px;
  animation: ai-caret-blink 1s step-start infinite;
}
@keyframes ai-caret-blink { 50% { opacity: 0; } }

.ai-msg.reasoning {
  align-self: flex-start; max-width: 96%;
  background: var(--pane-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 10px;
}
.ai-msg.reasoning > summary {
  cursor: pointer; color: var(--dim); font-size: 13px;
  user-select: none; list-style: none;
}
.ai-msg.reasoning > summary::-webkit-details-marker { display: none; }
.ai-msg.reasoning > summary::before { content: '▸ '; }
.ai-msg.reasoning[open] > summary::before { content: '▾ '; }
.ai-msg.reasoning .reasoning-body {
  margin-top: 5px; padding-top: 5px; border-top: 1px dashed var(--border-strong);
  color: var(--dim); font-size: 13px;
  white-space: pre-wrap; max-height: 240px; overflow-y: auto;
}

.ai-msg.tool {
  align-self: flex-start; max-width: 96%;
  background: var(--pane-2); border: 1px solid var(--border);
  border-radius: 6px; padding: 6px 9px; font-size: 13px;
}
.ai-msg.tool .tool-name { color: var(--accent); font-weight: 600; }
.ai-msg.tool .tool-args {
  color: var(--dim); margin-top: 2px;
  white-space: pre-wrap; word-break: break-all;
  font-family: ui-monospace, Consolas, monospace; font-size: 12.5px;
}
.ai-msg.tool .tool-result {
  color: var(--dim); margin-top: 4px;
  border-top: 1px solid var(--border-strong); padding-top: 4px;
  white-space: pre-wrap; word-break: break-all;
  max-height: 100px; overflow-y: auto;
}

.ai-msg.working {
  align-self: flex-start; display: flex; align-items: center; gap: 9px;
  color: var(--dim); font-size: 13.5px; padding: 5px 2px; max-width: 96%;
}
.ai-msg.working .wk-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent, #5b8def);
  flex: none; animation: wkpulse 1.1s ease-in-out infinite;
}
.ai-msg.working .wk-text { color: var(--text-2, var(--text)); }
.ai-msg.working .wk-step { color: var(--dim); opacity: .6; font-size: 12px; }
@keyframes wkpulse { 0%, 100% { opacity: .3; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.1); } }
.ai-msg.system {
  align-self: center; color: var(--dim); font-size: 12.5px;
}
.ai-msg.report-link {
  align-self: center; padding: 7px 14px;
  background: rgba(26, 24, 21, 0.1);
  border: 1px solid var(--accent); border-radius: 8px;
}
.ai-msg.report-link a {
  color: var(--accent); text-decoration: none; font-size: 14.5px; font-weight: 600;
}
.ai-msg.report-link a:hover { text-decoration: underline; }

.ai-sec {
  background: var(--pane-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 14px;
  margin-bottom: 10px;
}
.ai-sec-head {
  display: flex; align-items: center; gap: 6px;
  font-size: 15px; font-weight: 600; color: var(--text);
  margin-bottom: 8px;
}
.ai-sec-meta {
  margin-left: auto; color: var(--dim); font-size: 12.5px; font-weight: normal;
  font-family: ui-monospace, Consolas, monospace;
}
.ai-help { color: var(--dim); font-size: 12.5px; cursor: help; }

/* 盘中速览 */
.ai-narrative {
  color: var(--text-2); font-size: 15px; line-height: 1.6;
  margin-bottom: 10px;
}
.ai-quick-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
}
.qg-cell {
  display: flex; flex-direction: column; gap: 2px;
  padding: 6px 0;
}
.qg-cell .v {
  font-family: ui-monospace, Consolas, monospace;
  font-weight: 600; font-size: 15.5px; color: var(--text);
}
.qg-cell .v.up   { color: var(--up); }
.qg-cell .v.down { color: var(--down); }
.qg-cell .k { color: var(--dim); font-size: 12.5px; }

/* 关键价位 */
#key-levels-list .kl-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0;
  font-size: 15px;
}
.kl-label { color: var(--dim); width: 50px; }
.kl-label.res { color: var(--up); }
.kl-label.sup { color: var(--down); }
.kl-price {
  font-family: ui-monospace, Consolas, monospace;
  color: var(--text); font-weight: 600; min-width: 60px;
}
.kl-note { color: var(--dim); font-size: 12.5px; margin-left: auto; }

/* 资金流向 */
.flow-top {
  display: flex; align-items: center; gap: 14px; margin-bottom: 10px;
}
.flow-net { flex: 1; }
.flow-net .k { display: block; color: var(--dim); font-size: 12.5px; margin-bottom: 2px; }
.flow-net .v {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 19.5px; font-weight: 700;
}
.flow-net .v.up   { color: var(--up); }
.flow-net .v.down { color: var(--down); }
#flow-donut { flex-shrink: 0; }

.flow-breakdown {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px;
  font-size: 13px;
}
.fb { display: flex; align-items: center; gap: 5px; color: var(--text-2); }
.fb .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.fb .v {
  margin-left: auto; font-family: ui-monospace, Consolas, monospace;
  font-weight: 500;
}
.fb .v.up   { color: var(--up); }
.fb .v.down { color: var(--down); }

/* 情绪指标 */
.senti-row {
  display: flex; align-items: baseline; gap: 8px; margin-bottom: 6px;
}
.senti-label-k { color: var(--dim); font-size: 13.5px; }
.senti-score {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 20px; font-weight: 700; color: var(--text);
}
.senti-label-v {
  margin-left: auto; padding: 2px 8px; border-radius: 10px;
  font-size: 12.5px; font-weight: 600;
  background: rgba(239, 83, 80, 0.15); color: var(--up);
}
.senti-label-v.bear { background: rgba(38, 166, 154, 0.15); color: var(--down); }
.senti-label-v.neutral { background: rgba(125, 125, 125, 0.18); color: var(--text-2); }

.senti-bar {
  height: 6px; background: var(--bg); border-radius: 3px;
  margin-bottom: 6px; overflow: hidden;
}
.senti-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--down) 0%, var(--warn) 50%, var(--up) 100%);
  transition: width .4s ease;
}
.senti-bull-bear {
  display: flex; justify-content: space-between;
  font-size: 12.5px; color: var(--dim);
}
.senti-bull-bear b {
  color: var(--text); font-family: ui-monospace, Consolas, monospace; margin-left: 4px;
}
/* #16 情绪驱动因子: 解释当前情绪分的来由 */
.senti-drivers { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.senti-dr-head { width: 100%; font-size: 11px; color: var(--dim); margin-bottom: 1px; }
.senti-dr {
  font-size: 11.5px; line-height: 1.5; padding: 2px 8px; border-radius: 10px;
  background: var(--pane-2); border: 1px solid var(--border); color: var(--text-2);
}

/* 技术信号 */
.tech-list .ts-row {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 0; font-size: 15px;
}
.ts-name { flex: 1; color: var(--text); }
.ts-value { color: var(--text-2); font-size: 13px; }
.ts-strength {
  padding: 1px 8px; border-radius: 8px; font-size: 12.5px; font-weight: 600;
}
.ts-strength.strong  { background: rgba(239, 83, 80, 0.18); color: var(--up); }
.ts-strength.medium  { background: rgba(240, 176, 69, 0.18); color: var(--warn); }
.ts-strength.weak    { background: rgba(125, 125, 125, 0.18); color: var(--text-2); }
.ts-strength.neutral { background: rgba(125, 125, 125, 0.12); color: var(--dim); }
.ts-row.bearish .ts-strength.strong { background: rgba(38, 166, 154, 0.18); color: var(--down); }
.ts-row.bearish .ts-strength.medium { background: rgba(38, 166, 154, 0.12); color: var(--down); }

/* AI 观点 + 操作建议 */
.opinion-tag {
  margin-left: auto; padding: 2px 8px; border-radius: 10px;
  font-size: 12.5px; font-weight: 600;
  background: rgba(239, 83, 80, 0.15); color: var(--up);
}
.opinion-tag.bear { background: rgba(38, 166, 154, 0.15); color: var(--down); }
.opinion-tag.neutral { background: rgba(125, 125, 125, 0.18); color: var(--text-2); }
.opinion-text, .suggestion-text {
  color: var(--text-2); font-size: 15px; line-height: 1.65;
}

.more-analysis {
  background: transparent; border: 1px solid var(--border);
  color: var(--text-2); padding: 9px;
  border-radius: 8px; cursor: pointer;
  width: 100%; font-size: 14px;
  margin: 4px 0 10px;
}
.more-analysis:hover {
  background: var(--hover); color: var(--text); border-color: var(--border-strong);
}

/* AI 输入栏 */
.ai-input {
  padding: 10px 14px 12px;
  border-top: 1px solid var(--border);
  background: var(--pane);
}
.ai-input-row {
  display: flex; align-items: flex-end; gap: 8px;
  background: var(--pane-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 10px;
  transition: border-color .15s;
}
.ai-input-row:focus-within { border-color: var(--accent); }
#ai-input-text {
  flex: 1; resize: none;
  background: transparent; border: none;
  color: var(--text); font-size: 14.5px; font-family: inherit;
  outline: none; line-height: 1.5; max-height: 100px;
}
#ai-input-text::placeholder { color: var(--dim); }
.ai-send {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); color: #fff;
  border: none; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.ai-send:hover { background: var(--accent-2); }
/* 运行中: 箭头圆点 → 停止方块, 点击中断当前轮 (仿 Claude). 用中性灰, 不与A股涨红跌绿冲突 */
.ai-send .ic-stop { display: none; }
.ai-send.stop { background: #6b7280; animation: ai-stop-pulse 1.4s ease-in-out infinite; }
.ai-send.stop:hover { background: #545b66; }
.ai-send.stop .ic-send { display: none; }
.ai-send.stop .ic-stop { display: inline-block; }
@keyframes ai-stop-pulse { 0%,100% { box-shadow: 0 0 0 0 rgba(107,114,128,.5); } 50% { box-shadow: 0 0 0 4px rgba(107,114,128,0); } }
.ai-input-meta {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 6px;
  font-size: 12px; color: var(--dim);
}
.model-tag {
  background: var(--pane-2); padding: 2px 8px; border-radius: 8px;
  color: var(--text-2); cursor: pointer;
}
.model-tag:hover { background: var(--hover); }
.disclaimer { font-size: 11.5px; }
/* 高级模式 💎 切换 (从 chat 版移植: Bull/Bear/Risk/RM/Coordinator 升档 Opus) */
.meta-left { display: flex; align-items: center; gap: 8px; }
.premium-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 9px; font-size: 11px; line-height: 1;
  background: var(--pane-2); color: var(--text-2);
  border: 1px solid var(--border); border-radius: 12px;
  cursor: pointer; transition: all .15s; white-space: nowrap;
}
.premium-btn:hover { border-color: var(--dim); color: var(--text); }
.premium-btn.active {
  background: linear-gradient(135deg, #c89b3c 0%, #f0c75e 100%);
  color: #1a1a1a; border-color: #c89b3c; font-weight: 600;
}
.premium-btn.active:hover { filter: brightness(1.08); }
.premium-btn .premium-icon { font-size: 12px; }

/* 滚动条美化 */
.sw-list::-webkit-scrollbar, .ai-content::-webkit-scrollbar,
.news-list::-webkit-scrollbar {
  width: 5px;
}
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: var(--border-strong); border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover { background: var(--dim); }

/* AI 投研栏 — 相关新闻区块 */
.ai-news-list { display: flex; flex-direction: column; gap: 7px; }
.ai-news-item {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--border);
}
.ai-news-item:last-child { border-bottom: none; }
.ai-news-tag {
  flex-shrink: 0;
  font-size: 11px; font-weight: 600;
  padding: 1px 6px; border-radius: 3px;
  line-height: 1.4;
}
.ai-news-tag.stock {
  background: var(--up-soft);
  color: var(--up);
}
.ai-news-tag.industry {
  background: var(--accent-soft);
  color: var(--accent);
}
.ai-news-title {
  flex: 1; min-width: 0;
  color: var(--text); font-size: 13px;
  line-height: 1.5; text-decoration: none;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;
  overflow: hidden;
}
a.ai-news-title:hover { color: var(--accent); }

/* ============================================================
   通用模态框 — 查看全部对话 / 管理自选 用同一套样式
   ============================================================ */
.pro-modal-mask {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, 0.55);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(2px);
  animation: pmFadeIn .12s ease-out;
}
@keyframes pmFadeIn { from { opacity: 0; } to { opacity: 1; } }
.pro-modal {
  width: 560px; max-width: 92vw;
  max-height: 80vh;
  background: var(--pane);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  display: flex; flex-direction: column;
  overflow: hidden;
}
.pm-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--pane-2);
}
.pm-title {
  font-size: 15.5px; font-weight: 600; color: var(--text);
}
.pm-close {
  width: 24px; height: 24px;
  border: none; background: transparent;
  color: var(--dim);
  font-size: 15.5px; cursor: pointer;
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
}
.pm-close:hover { background: var(--hover); color: var(--text); }
.pm-body {
  padding: 12px 14px;
  overflow-y: auto;
  flex: 1;
  min-height: 100px;
}
.pm-loading {
  padding: 28px 12px; text-align: center;
  color: var(--dim); font-size: 14px;
}
.pm-row {
  display: flex; gap: 8px;
  margin-bottom: 10px;
}
.pm-search {
  width: 100%;
  padding: 7px 10px;
  background: var(--pane-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 14px;
  margin-bottom: 10px;
  box-sizing: border-box;
}
.pm-row .pm-search { margin-bottom: 0; }
.pm-search:focus { outline: none; border-color: var(--accent); }
.pm-list {
  display: flex; flex-direction: column;
  gap: 4px;
  max-height: 52vh;
  overflow-y: auto;
}
.pm-item {
  display: flex; align-items: center;
  padding: 8px 10px;
  background: var(--pane-2);
  border: 1px solid transparent;
  border-radius: 6px;
  transition: background .12s, border-color .12s;
}
.pm-item:hover {
  background: var(--hover);
  border-color: var(--border);
}
.pm-item-main {
  flex: 1; min-width: 0;
  cursor: pointer;
}
.pm-item-title {
  font-size: 14.5px; color: var(--text);
  font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pm-item-meta {
  font-size: 12px; color: var(--dim);
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pm-item-actions {
  display: flex; gap: 4px;
  margin-left: 10px;
  flex-shrink: 0;
}
.pm-btn {
  padding: 4px 10px;
  background: var(--pane);
  border: 1px solid var(--border);
  border-radius: 5px;
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
  transition: background .12s, border-color .12s, color .12s;
}
.pm-btn:hover {
  background: var(--hover);
  border-color: var(--border-strong);
  color: var(--text);
}
.pm-btn.danger { color: #ef5350; }
.pm-btn.danger:hover {
  background: rgba(239, 83, 80, 0.12);
  border-color: rgba(239, 83, 80, 0.4);
  color: #ff7470;
}
.pm-btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.pm-btn-primary:hover {
  background: var(--accent-2);
  border-color: var(--accent-2);
  color: #fff;
}
.pm-added {
  font-size: 12.5px; color: var(--text-2);
  padding: 5px 8px; white-space: nowrap;
}
.pm-list::-webkit-scrollbar { width: 6px; }

/* ===== 精简推送: 订阅设置 + 要点卡 ===== */
.sub-manage-btn {
  margin-left: auto; background: transparent; border: 1px solid var(--border-strong);
  color: var(--text-2); font-size: 12px; padding: 3px 9px; border-radius: 6px; cursor: pointer;
}
.sub-manage-btn:hover { background: var(--hover); color: var(--text); }
.sub-sec { margin: 10px 0; }
.sub-h { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.sub-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sub-chip {
  border: 1px solid var(--border-strong); background: var(--pane-2); color: var(--text-2);
  font-size: 12.5px; padding: 4px 10px; border-radius: 14px; cursor: pointer; transition: all .12s;
}
.sub-chip:hover { border-color: var(--accent); color: var(--text); }
.sub-chip.on { background: rgba(26,24,21,.14); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.sub-kws { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.sub-kw {
  display: inline-flex; align-items: center; gap: 5px; background: var(--pane-2);
  border: 1px solid var(--border-strong); border-radius: 12px; padding: 3px 9px; font-size: 12.5px;
}
.sub-kw b { cursor: pointer; color: var(--dim); font-weight: 400; }
.sub-kw b:hover { color: #ef5350; }
.digest-meta { font-size: 11px; color: var(--dim); padding: 4px 2px 8px; }
.digest-card {
  background: var(--pane-2); border: 1px solid var(--border); border-radius: 8px;
  padding: 10px 12px; margin-bottom: 10px;
}
.dg-head { font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.dg-sum { font-weight: 400; color: var(--text-2); font-size: 13px; }
.dg-points { margin: 4px 0 0; padding-left: 4px; list-style: none; }
.dg-points li { margin: 5px 0; font-size: 13px; line-height: 1.5; }
.dg-text { color: var(--text); }
.dg-impact { color: var(--accent); margin-left: 6px; font-size: 12px; }
.dg-rawbox { margin-top: 8px; }
.dg-rawbox summary { cursor: pointer; color: var(--dim); font-size: 12px; }
.dg-raw { display: block; color: var(--text-2); font-size: 12px; padding: 3px 0; text-decoration: none; }
.dg-raw:hover { color: var(--accent); }

/* 报告查看弹窗 — 比默认宽, 容纳 markdown 正文 */
.pro-modal.pm-wide { width: 820px; }
.rp-actions {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 12px; flex-wrap: wrap;
}
.rp-meta { color: var(--dim); font-size: 12.5px; margin-left: auto; }
.rp-md {
  font-size: 14px; line-height: 1.7; color: var(--text);
  border-top: 1px solid var(--border); padding-top: 12px;
}

/* 左栏"我的报告"列表 — 限高, 不挤占自选区 */
.reports-list { max-height: 24vh; flex: none; }
.sw-item-badge { font-size: 14px; opacity: .65; flex-shrink: 0; }
.rp-tag { font-size: 10.5px; color: #ffca28; background: rgba(255,202,40,.12); border-radius: 4px; padding: 1px 5px; margin-left: 4px; vertical-align: middle; }
/* 我的报告: 每行的删除小叉 — 默认半透明, hover 时变红, 防止误触 (点击事件 stopPropagation) */
.sw-item .rp-del {
  background: transparent; border: none; color: var(--dim); cursor: pointer;
  font-size: 14px; padding: 4px 7px; border-radius: 5px; opacity: .55;
  margin-right: 2px; line-height: 1; flex-shrink: 0;
}
.sw-item .rp-del:hover { opacity: 1; color: #ef5350; background: rgba(239,83,80,.10); }
/* 猜你想问 — 可点击的预判问题 chip (pro 页对话输入框上方) */
.ai-suggestions { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 0 8px; }
.ai-suggestions:empty { display: none; }
.sg-chip { font-size: 12.5px; padding: 6px 10px; background: var(--pane-2); border: 1px solid var(--border);
  border-radius: 14px; color: var(--text-2); cursor: pointer; line-height: 1.3; max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: border-color .12s, color .12s; animation: sgin .2s; }
.sg-chip:hover { border-color: var(--accent); color: var(--text); }
@keyframes sgin { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; } }
/* AI 对我的了解 — 画像 modal 内容 (复用 .pro-modal/.pm-body) */
.pf-sub { color: var(--dim); font-size: 12.5px; margin-bottom: 12px; line-height: 1.5; }
.pf-row { display: flex; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; }
.pf-row b { flex: 0 0 72px; color: var(--text-2); font-weight: 600; }
.pf-foot { display: flex; align-items: center; justify-content: space-between; margin-top: 14px; }
.pf-meta { color: var(--dim); font-size: 12px; }

/* ===== 移植自 chat: 底盘 agent 完成卡 / 牛熊辩论气泡 / 性能剖析卡 / 模型切换 ===== */
/* 工具步骤卡: 清爽一行「✓ 步骤名」, 细柔描边, 无沉重黑粗左条 */
.ai-msg.agent-step {
  align-self: stretch; max-width: 100%;
  background: transparent; border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px 11px; font-size: 13px;
  margin: 3px 0;
}
.ai-msg.agent-step.decision { background: var(--pane-2); }
.ai-msg.agent-step .as-head { display: flex; align-items: center; gap: 7px; font-weight: 500; }
.ai-msg.agent-step .as-label { flex: 1; line-height: 1.45; }
/* 完成态: 淡绿对勾(柔和, A股绿=跌色但此处仅作"完成"语义, 降透明度不刺眼) */
.ai-msg.agent-step .as-check {
  color: var(--down); opacity: .75; font-size: 12px;
  flex: 0 0 auto; line-height: 1;
}
.ai-msg.agent-step .as-summary { color: var(--dim); margin-top: 3px; line-height: 1.5; padding-left: 19px; }
.ai-msg.agent-step .as-process { margin-top: 6px; font-size: 12px; }
.ai-msg.agent-step .as-process > summary { cursor: pointer; color: var(--accent); user-select: none; outline: none; }
.ai-msg.agent-step .as-process > summary:hover { text-decoration: underline; }
.ai-msg.agent-step .as-tool { margin-top: 5px; padding-left: 8px; border-left: 2px solid var(--border); }
.ai-msg.agent-step .as-tline { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.ai-msg.agent-step .as-tname { color: var(--accent); font-family: monospace; }
.ai-msg.agent-step .as-targs { color: var(--dim); font-family: monospace; word-break: break-all; }
.ai-msg.agent-step .as-tres { color: var(--dim); margin-top: 1px; white-space: pre-wrap; word-break: break-word; }

/* 牛熊辩论气泡 — A股口径: 看多🐂=红(涨)靠左, 看空🐻=绿(跌)靠右 */
.ai-msg.debate-turn {
  max-width: 88%; border-radius: 12px; padding: 9px 13px;
  border: 1px solid var(--border); font-size: 13px; line-height: 1.6;
}
.ai-msg.debate-turn.bull {
  align-self: flex-start;
  background: rgba(239, 83, 80, 0.10); border-color: rgba(239, 83, 80, 0.35);
  border-bottom-left-radius: 3px;
}
.ai-msg.debate-turn.bear {
  align-self: flex-end;
  background: rgba(38, 166, 154, 0.10); border-color: rgba(38, 166, 154, 0.35);
  border-bottom-right-radius: 3px;
}
.ai-msg.debate-turn .dt-head { font-weight: 700; font-size: 12px; margin-bottom: 4px; }
.ai-msg.debate-turn.bull .dt-head { color: var(--up); }
.ai-msg.debate-turn.bear .dt-head { color: var(--down); }
.ai-msg.debate-turn .dt-body p { margin: 4px 0; }
.ai-msg.debate-turn .dt-body ul,
.ai-msg.debate-turn .dt-body ol { margin: 4px 0; padding-left: 18px; }

/* 性能剖析卡 */
.ai-msg.perf-report {
  align-self: stretch; background: var(--pane-2); border: 1px solid var(--border);
  border-radius: 8px; padding: 8px 12px; font-size: 12px;
}
.ai-msg.perf-report .perf-details > summary { cursor: pointer; color: var(--accent); font-weight: 600; list-style: none; }
.ai-msg.perf-report .perf-details > summary::-webkit-details-marker { display: none; }
.ai-msg.perf-report .perf-pre {
  margin: 8px 0 0; padding: 8px; border-radius: 6px;
  background: var(--bg); color: var(--dim);
  white-space: pre-wrap; word-break: break-word;
  font-family: ui-monospace, Consolas, monospace; font-size: 11px;
}

/* 模型切换芯片 + 弹出菜单 */
.model-chip-wrap { position: relative; }
.model-chip {
  display: inline-flex; align-items: center; gap: 5px;
  background: var(--pane-2); border: 1px solid var(--border); color: var(--text-2);
  font-size: 12px; padding: 3px 9px; border-radius: 14px; cursor: pointer;
}
.model-chip:hover { border-color: var(--dim); color: var(--text); }
.model-chip[aria-expanded="true"] { border-color: var(--accent); color: var(--text); }
.model-chip-arrow { font-size: 9px; opacity: .7; }
.model-menu {
  position: absolute; bottom: calc(100% + 6px); left: 0; z-index: 50;
  min-width: 240px; max-height: 320px; overflow-y: auto;
  background: var(--pane); border: 1px solid var(--border-strong); border-radius: 10px;
  padding: 5px; box-shadow: 0 8px 28px rgba(0,0,0,.35);
}
.model-menu.hidden { display: none; }
.model-menu-item {
  display: block; width: 100%; text-align: left; cursor: pointer;
  background: none; border: none; color: var(--text); padding: 7px 9px; border-radius: 7px;
}
.model-menu-item:hover { background: var(--hover); }
.model-menu-item.selected { background: rgba(26, 24, 21, .15); }
.model-menu-item-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; }
.model-menu-item-tier { font-size: 10px; padding: 1px 7px; border-radius: 8px; }
.model-menu-item-tier.cheap   { color: #26a69a; background: rgba(38, 166, 154, .12); }
.model-menu-item-tier.mid     { color: #ffb74d; background: rgba(255, 183, 77, .12); }
.model-menu-item-tier.premium { color: #ef5350; background: rgba(239, 83, 80, .12); }
.model-menu-item-note { font-size: 11px; color: var(--dim); margin-top: 2px; }

/* ===== 回测工作台 (回测 tab) ===== */
.bt-bar {
  flex: 0 0 auto; display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  padding: 7px 14px; background: var(--bg); border-bottom: 1px solid var(--border); font-size: 13px;
}
.bt-title { font-weight: 600; color: var(--text); }
.bt-ctl { display: inline-flex; align-items: center; gap: 5px; color: var(--text-2); font-size: 12px; }
.bt-ctl select {
  background: var(--pane-2); color: var(--text); border: 1px solid var(--border-strong);
  border-radius: 6px; padding: 3px 6px; font-size: 12px;
}
.bt-run, .bt-pdf {
  border: 1px solid var(--border-strong); border-radius: 6px; padding: 4px 12px;
  font-size: 12px; cursor: pointer; color: var(--text); background: var(--pane-2);
}
.bt-run { background: var(--accent); border-color: var(--accent); color: #fff; }
.bt-run:hover { background: var(--accent-2); }
.bt-pdf:not(:disabled):hover { background: var(--hover); }
.bt-run:disabled, .bt-pdf:disabled { opacity: .5; cursor: default; }
.bt-status { color: var(--text-2); font-size: 12px; }
.bt-disclaimer { margin-left: auto; color: var(--dim); font-size: 11px; }

.bt-result { flex: 1 1 auto; overflow-y: auto; padding: 14px 18px 26px; }
.bt-head { font-size: 15px; color: var(--text); margin-bottom: 6px; }
.bt-period { color: var(--dim); font-size: 12px; font-weight: 400; margin-left: 6px; }
.bt-sec-t {
  font-size: 13px; color: var(--text-2); font-weight: 600; margin: 18px 0 9px;
  padding-left: 8px; border-left: 3px solid var(--accent);
}
.bt-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 9px; }
.bt-kpi { background: var(--pane-2); border: 1px solid var(--border); border-radius: 8px; padding: 9px 11px; }
.bt-klab { color: var(--dim); font-size: 11px; }
.bt-kval { font-size: 18px; font-weight: 650; margin-top: 2px; color: var(--text); }
.bt-ksub { color: var(--dim); font-size: 10px; margin-top: 2px; }
.bt-chart { width: 100%; height: auto; display: block; }
.bt-ax { fill: var(--dim); font-size: 10px; }
.bt-lg { fill: var(--text-2); font-size: 11px; }
.bt-muted { color: var(--dim); font-size: 13px; padding: 10px 0; }
.bt-heat { border-collapse: collapse; width: 100%; font-size: 11px; margin-top: 4px; }
.bt-heat td, .bt-heat th { text-align: center; padding: 5px 3px; border: 1px solid var(--bg); }
.bt-heat td { color: var(--text); font-weight: 600; }
.bt-heat .bt-na { background: var(--pane-2); }
.bt-heat thead th, .bt-heat .bt-yr { background: var(--pane-2); color: var(--dim); font-weight: 600; }
.bt-heat .bt-yt { background: var(--pane-2); font-weight: 700; }
.bt-tl { border-collapse: collapse; width: 100%; font-size: 12px; margin-top: 4px; }
.bt-tl th { background: var(--pane-2); color: var(--text-2); text-align: left; padding: 6px 10px; border-bottom: 1px solid var(--border); }
.bt-tl td { padding: 5px 10px; border-bottom: 1px solid var(--border); color: var(--text); }
.bt-dis {
  margin-top: 22px; padding: 11px 13px; background: rgba(240, 176, 69, .08);
  border: 1px solid rgba(240, 176, 69, .25); border-radius: 8px;
  color: var(--warn); font-size: 12px; line-height: 1.6;
}
.bt-screen, .bt-best {
  border: 1px solid var(--border-strong); border-radius: 6px; padding: 4px 12px;
  font-size: 12px; cursor: pointer; color: var(--text); background: var(--pane-2);
}
.bt-screen:hover, .bt-best:hover { background: var(--hover); }
.fc-ai-btn {
  display: inline-flex; align-items: center; gap: 4px; cursor: pointer;
  background: var(--pane-2); color: var(--accent); border: 1px solid var(--accent);
  border-radius: 6px; padding: 3px 10px; font-size: 12px;
}
.fc-ai-btn:hover { background: var(--hover); }
.bt-best { border-color: var(--pro-gold); color: var(--pro-gold); }
.bt-best:disabled { opacity: .5; cursor: default; }
.bt-best-card {
  background: var(--pane-2); border: 1px solid var(--pro-gold); border-radius: 9px; padding: 12px 14px;
}
.bbc-title { font-size: 15px; font-weight: 650; color: var(--text); }
.bbc-verdict { color: var(--text-2); font-size: 12px; margin-top: 3px; }
.bbc-action { margin-top: 7px; padding: 7px 10px; background: var(--pane); border-radius: 7px;
  color: var(--text); font-size: 12.5px; border: 1px solid var(--border); }
.bt-regime { margin: 10px 0; padding: 8px 12px; background: var(--pane-2); border-radius: 8px;
  border: 1px solid var(--border); font-size: 12.5px; color: var(--text); }
.bt-regime-m { color: var(--text-2); font-size: 11.5px; margin-left: 4px; }

/* ===== 全市场选股 弹窗 ===== */
#screen-overlay {
  position: fixed; inset: 0; z-index: 1000; background: rgba(0, 0, 0, .55);
  display: flex; align-items: center; justify-content: center;
}
#screen-overlay.hidden { display: none; }
.scr-modal {
  width: min(880px, 94vw); max-height: 88vh; display: flex; flex-direction: column;
  background: var(--pane); border: 1px solid var(--border-strong); border-radius: 12px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, .5); overflow: hidden;
}
.scr-head {
  display: flex; align-items: center; gap: 12px; padding: 13px 18px;
  border-bottom: 1px solid var(--border); background: var(--pane-2);
}
.scr-title { font-size: 15px; font-weight: 650; }
.scr-sub { color: var(--dim); font-size: 12px; flex: 1; }
.scr-close { background: none; border: none; color: var(--dim); font-size: 16px; cursor: pointer; }
.scr-close:hover { color: var(--text); }
.scr-launch {
  display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  padding: 12px 18px; border-bottom: 1px solid var(--border);
}
.scr-param { display: inline-flex; align-items: center; gap: 5px; color: var(--text-2); font-size: 12px; }
.scr-param select {
  background: var(--pane-2); color: var(--text); border: 1px solid var(--border-strong);
  border-radius: 6px; padding: 4px 7px; font-size: 12px; max-width: 260px;
}
.scr-desc { color: var(--dim); font-size: 11px; flex: 1 1 100%; order: 9; }
.scr-go, .scr-bt {
  border-radius: 6px; padding: 5px 14px; font-size: 12px; cursor: pointer; color: #fff; border: none;
}
.scr-go { background: var(--accent); }
.scr-go:hover { background: var(--accent-2); }
.scr-bt { background: var(--pane-2); color: var(--text); border: 1px solid var(--border-strong); }
.scr-bt:hover { background: var(--hover); }
.scr-go:disabled, .scr-bt:disabled { opacity: .5; cursor: default; }
.scr-status { color: var(--text-2); font-size: 12px; }
.scr-body { overflow-y: auto; padding: 14px 18px 18px; }
.scr-picks-head { font-size: 13px; color: var(--text-2); margin-bottom: 10px; }
.scr-hint-inline { color: var(--dim); font-size: 11px; margin-left: 6px; }
.scr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.scr-pick {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px; cursor: pointer;
  background: var(--pane-2); border: 1px solid var(--border); border-radius: 7px;
}
.scr-pick:hover { border-color: var(--accent); background: var(--hover); }
.scr-rank { color: var(--dim); font-size: 11px; min-width: 18px; }
.scr-code { font-weight: 600; color: var(--text); flex: 1; }
.scr-score { color: var(--up); font-size: 12px; }
.scr-bt-result {
  margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--border);
}
.scr-bt-head { font-size: 13px; color: var(--text-2); margin-bottom: 10px; }
.scr-bt-kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.scr-bt-kpi { background: var(--pane-2); border: 1px solid var(--border); border-radius: 7px; padding: 8px 9px; text-align: center; }
.scr-bt-kpi .k { display: block; color: var(--dim); font-size: 11px; }
.scr-bt-kpi .v { display: block; font-size: 16px; font-weight: 650; margin-top: 2px; }
.scr-bt-dis { margin-top: 10px; color: var(--dim); font-size: 11px; line-height: 1.6; }
.scr-foot { padding: 10px 18px; border-top: 1px solid var(--border); color: var(--dim); font-size: 11px; }

/* ════════════════════════════════════════════════════════════════════════
   ★★★ 高级重构层 (2026) — 在原样式之上叠加: 立体 / 辉光 / 微动 / 入场动画
   只动视觉与动效, 不改任何结构/类名/JS 钩子. A股红涨绿跌不变.
   ════════════════════════════════════════════════════════════════════════ */

/* ── 全局: 等宽数字对齐 + 文本选区 + 平滑滚动 ── */
body.pro { font-feature-settings: "tnum" 1, "cnum" 1; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
.sh-price, .sh-change, .m-cell .v, .wl-price, .wl-change, .qg-cell .v, .senti-score,
.kl-price, .flow-net .v, .fb .v, .bt-kval, .scr-bt-kpi .v, .sd-pnl {
  font-feature-settings: "tnum" 1; font-variant-numeric: tabular-nums;
}
body.pro ::selection { background: var(--accent-soft); color: var(--text); }
.ai-content, .ai-msg-list, .sw-list, .news-list, .bt-result, .scr-body, .pm-list { scroll-behavior: smooth; }

/* ── 背景层次: 主区更深, 营造"屏中屏"纵深 ── */
.chart-area { background: var(--bg-deep); }
/* 头部/Tab/工具条/内容面板/子栏: 全白底 (参考图12/13, 干净统一) */
.stock-header, .ca-tabs, .fc-toolbar, .bt-bar, .news-subtabs { background: var(--pane); }
.ca-pane { background: var(--pane); }
.tab-table th { background: var(--pane-2); }   /* 白面板上表头用次浅底, 行更清晰 */
#chart-grid { background: var(--border); }
.chart-cell { background: var(--bg-deep); }
body.pro:not(.light) .sessions-watchlist,
body.pro:not(.light) .ai-pane {
  background: linear-gradient(180deg, var(--pane), var(--bg) 140%);
}

/* ── 卡片/区块: 抬升立体 + 顶部高光 + 悬浮微动 ── */
.ai-sec {
  background: var(--pane); box-shadow: var(--shadow-sm), var(--hi);
  border-color: var(--border);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
  will-change: transform;
}
.ai-sec:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow), var(--hi);
  border-color: var(--border-strong);
}
.ai-opinion {
  background:
    radial-gradient(120% 140% at 100% 0%, var(--accent-soft), transparent 55%),
    var(--pane);
}

/* ── 弹层/模态: 大投影 + 大圆角 + 缩放入场 ── */
.sw-modal, .scr-modal, .rc-modal, .pro-modal, .dk-pop, .model-menu, .pro-flash {
  box-shadow: var(--shadow-lg), var(--hi) !important;
}
.scr-modal, .rc-modal, .pro-modal { border-radius: var(--radius-lg); }
.sw-modal, .scr-modal, .rc-modal, .pro-modal { animation: popIn .26s var(--ease); }
.dk-pop, .model-menu { animation: menuIn .18s var(--ease); transform-origin: top right; }
@keyframes popIn  { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes menuIn { from { opacity: 0; transform: translateY(6px)  scale(.97);  } to { opacity: 1; transform: none; } }

/* ── 主按钮: 渐变 + 辉光 + 悬浮抬升 + 按下回弹 ── */
.new-chat-btn, .bt-run, .scr-go, #sw-go, .rc-pay-btn, .rc-redeem-btn,
.login-actions button:not(.secondary), .pm-btn-primary, .sw-regen-bar button {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 4px 14px var(--accent-glow), var(--hi);
  border: none;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), filter .18s var(--ease);
}
.new-chat-btn:hover, .bt-run:hover, .scr-go:hover, #sw-go:hover, .rc-pay-btn:hover,
.rc-redeem-btn:hover, .login-actions button:not(.secondary):hover, .pm-btn-primary:hover {
  transform: translateY(-1px); filter: brightness(1.06);
  box-shadow: 0 8px 22px var(--accent-glow), var(--hi);
}
.new-chat-btn:active, .bt-run:active, .scr-go:active, #sw-go:active, .rc-pay-btn:active { transform: translateY(0) scale(.98); }
.ai-send {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 3px 12px var(--accent-glow);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background .18s;
}
.ai-send:hover { transform: scale(1.08); box-shadow: 0 5px 18px var(--accent-glow); }
.ai-send:active { transform: scale(.94); }

/* ── 次级按钮/控件: 平滑反馈 ── */
.icon-btn, .more-analysis, .back-summary-btn, .sub-chip, .news-sub, .model-chip,
.premium-btn, .rc-amt, .rc-method, .rc-tab, .fc-drawkit-btn, .fc-swarm-btn, .fc-ai-btn,
.bt-screen, .bt-best, .scr-bt, .dk-card, .pm-btn, .sg-chip {
  transition: background .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease), transform .16s var(--ease), box-shadow .16s var(--ease);
}
.icon-btn:hover { transform: translateY(-1px); }
.icon-btn:active { transform: scale(.9); }

/* ── 左栏会话/报告行: 圆角 + 平滑 hover, 自选行 active 描边辉光 ── */
.sw-item { transition: background .14s var(--ease), box-shadow .14s var(--ease); }
.watchlist-list .sw-item {
  transition: background .14s var(--ease), border-left-color .14s var(--ease), box-shadow .14s var(--ease);
}
.watchlist-list .sw-item.active {
  background: var(--accent-soft);
  box-shadow: inset 2px 0 0 var(--accent), 0 0 0 1px var(--accent-soft);
}
.wl-change { transition: background .25s var(--ease), color .25s var(--ease); }

/* ── Tab: 圆头滑入式指示条 + 辉光 ── */
.ca-tab.active::after, .ai-tab.active::after {
  border-radius: 2px;
  box-shadow: 0 0 8px var(--accent-glow);
  animation: tabUnderline .3s var(--ease);
}
@keyframes tabUnderline { from { transform: scaleX(.2); opacity: 0; } to { transform: scaleX(1); opacity: 1; } }
.ca-tab.active::after, .ai-tab.active::after { transform-origin: center; }
.news-sub.active { box-shadow: 0 0 0 1px var(--accent-soft); }

/* ── 输入聚焦: 主题色辉光环 ── */
.ai-input-row:focus-within { box-shadow: 0 0 0 3px var(--accent-soft); }
.login-box input:focus, .pm-search:focus, #sw-event:focus, .sw-param input:focus,
.rc-custom-input:focus, .rc-redeem-input:focus, .bt-ctl select:focus, .scr-param select:focus {
  box-shadow: 0 0 0 3px var(--accent-soft);
}

/* ── 胶囊/标签: 余额、信号、预测 pill 微光 ── */
.balance-pill { transition: background .16s var(--ease), color .16s var(--ease), box-shadow .16s var(--ease); }
.balance-pill:hover { box-shadow: 0 4px 14px var(--accent-glow); }
.prem-tag { box-shadow: 0 2px 8px rgba(217,165,92,.35); }
.premium-btn.active { box-shadow: 0 3px 12px rgba(200,155,60,.4); }
.sh-tag, .info-tag, .fc-pill, .rating-pill, .senti-dr { transition: border-color .16s var(--ease), background .16s var(--ease); }

/* ── 价格更大气 + 头部信号胶囊轻投影 ── */
.sh-price { font-size: 32px; letter-spacing: -.5px; }
.sh-sig-chip { box-shadow: var(--shadow-sm); }

/* ── 登录卡: 立体 + 入场 ── */
.login-box { box-shadow: var(--shadow-lg), var(--hi); border-radius: var(--radius-lg); animation: popIn .3s var(--ease); }
.login-logo { box-shadow: 0 6px 22px var(--accent-glow); }

/* ── 入场动画: 三栏淡入 + 摘要卡片错峰浮现 + 对话气泡滑入 ── */
#pro-app:not(.hidden) { animation: appIn .4s var(--ease); }
@keyframes appIn { from { opacity: 0; } to { opacity: 1; } }
.ai-content > .ai-sec { animation: secIn .5s var(--ease) backwards; }
.ai-content > .ai-sec:nth-child(1) { animation-delay: .02s; }
.ai-content > .ai-sec:nth-child(2) { animation-delay: .07s; }
.ai-content > .ai-sec:nth-child(3) { animation-delay: .12s; }
.ai-content > .ai-sec:nth-child(4) { animation-delay: .17s; }
.ai-content > .ai-sec:nth-child(5) { animation-delay: .22s; }
.ai-content > .ai-sec:nth-child(6) { animation-delay: .27s; }
.ai-content > .ai-sec:nth-child(7) { animation-delay: .32s; }
@keyframes secIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.ai-msg { animation: msgIn .34s var(--ease) backwards; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* ── 加载态: 轻微呼吸, 不再死板 ── */
.ca-loading, .sw-empty, .pm-loading, .ca-todo { animation: breathe 1.6s ease-in-out infinite; }
@keyframes breathe { 0%,100% { opacity: .55; } 50% { opacity: 1; } }

/* ── 细化滚动条 ── */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 8px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: var(--dim); background-clip: padding-box; }

/* ── 无障碍: 尊重"减少动态"系统偏好 ── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ════════════════════════════════════════════════════════════════════════
   ★★★ 版面重构 — 4 栏: 图标导航栏 + 自选/对话/报告 列表栏 + 行情主区 + AI 栏
   ════════════════════════════════════════════════════════════════════════ */
/* 流式 4 栏: rail 固定; 自选栏/AI 栏随视口等比缩放(clamp), 中间行情主区吃掉剩余 →
   换屏(尤其 1366/1440 笔记本)时侧栏按比例收窄, 中间不会被挤到过窄。变量便于断点统一调。 */
:root, body.pro {
  --pro-rail-w:  58px;
  --pro-wl-w:    clamp(216px, 16vw, 296px);      /* 自选/会话栏 (流体, 笔记本段更窄给图表) */
  --pro-ai-w:    clamp(300px, 21vw, 408px);      /* 右侧 AI 栏 (流体, 笔记本段更窄给图表) */
}
#pro-app { grid-template-columns: var(--pro-rail-w) var(--pro-wl-w) minmax(0, 1fr) var(--pro-ai-w); }
#pro-app.sidebar-collapsed { grid-template-columns: var(--pro-rail-w) 0 minmax(0, 1fr) var(--pro-ai-w); }
.pro-rail            { grid-column: 1; }
.sessions-watchlist  { grid-column: 2; }
.chart-area          { grid-column: 3; }
.ai-pane             { grid-column: 4; }

/* 窄屏 (≈1280 及以下笔记本) — AI 栏更窄, 把空间还给行情主区, 防中间被压 */
@media (max-width: 1280px) {
  :root, body.pro { --pro-wl-w: clamp(200px, 14.5vw, 244px); --pro-ai-w: clamp(280px, 20vw, 320px); }
}
/* 真窄屏 (<1024) — 收起右侧 AI 栏(可用顶部按钮再唤出), 仅留 rail+自选+主区 */
@media (max-width: 1024px) {
  #pro-app, #pro-app.sidebar-collapsed { grid-template-columns: var(--pro-rail-w) var(--pro-wl-w) minmax(0, 1fr) 0; }
  #pro-app .ai-pane { display: none; }
}
/* 超窄屏 (<768, 缩窗) — 自选栏也收起, 主区独占 (真·手机请走 /m) */
@media (max-width: 768px) {
  #pro-app, #pro-app.sidebar-collapsed { grid-template-columns: var(--pro-rail-w) 0 minmax(0, 1fr) 0; }
  #pro-app .sessions-watchlist { display: none; }
}
/* 超宽屏 (>2400) — AI 栏与自选栏给上限, 避免它们被无限拉宽 */
@media (min-width: 2400px) {
  :root, body.pro { --pro-wl-w: 320px; --pro-ai-w: 440px; }
}

/* ── 左侧图标导航栏 ── */
.pro-rail {
  display: flex; flex-direction: column; align-items: center;
  padding: 12px 0 10px; gap: 4px;
  background: var(--bg-deep);
  border-right: 1px solid var(--border);
  z-index: 70;   /* 高于 .feature-view(60): 否则功能页会盖住从左栏弹出的账户菜单/tooltip */
}
.rail-logo {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 21px; font-style: italic; color: #fff; letter-spacing: -1px;
  background: linear-gradient(135deg, #06d6e0 0%, var(--accent) 52%, #9b5cf6 100%);
  box-shadow: 0 6px 18px var(--accent-glow);
  margin-bottom: 12px;
}
.rail-nav { display: flex; flex-direction: column; gap: 16px; flex: 1; padding-top: 6px; }
.rail-foot { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 8px; }
.rail-item {
  position: relative; width: 44px; height: auto; min-height: 44px; flex: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  padding: 6px 0;
  background: transparent; border: none; cursor: pointer;
  color: var(--dim); border-radius: 12px;
  transition: color .18s var(--ease), background .18s var(--ease), transform .18s var(--ease);
}
.rail-item svg { width: 20px; height: 20px; }
/* 图标下的中文标签 (常驻可见) */
.rail-label {
  font-size: 10.5px; line-height: 1; font-weight: 500;
  letter-spacing: .3px; white-space: nowrap;
}
.rail-item:hover { color: var(--text); background: var(--hover); transform: translateY(-1px); }
.rail-item:active { transform: scale(.92); }
.rail-item.active { color: var(--accent); background: var(--accent-soft); }
.rail-item.active::before {
  content: ''; position: absolute; left: -9px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 22px; border-radius: 0 3px 3px 0;
  background: var(--accent); box-shadow: 0 0 10px var(--accent-glow);
}
/* hover 浮出中文名 tooltip */
.rail-tip {
  position: absolute; left: 52px; top: 50%; transform: translateY(-50%) translateX(-4px);
  white-space: nowrap; padding: 5px 10px; border-radius: 8px;
  background: var(--pane-2); color: var(--text); font-size: 12.5px; font-weight: 500;
  border: 1px solid var(--border-strong); box-shadow: var(--shadow);
  opacity: 0; pointer-events: none; z-index: 50;
  transition: opacity .16s var(--ease), transform .16s var(--ease);
}
.rail-item:hover .rail-tip { opacity: 1; transform: translateY(-50%) translateX(0); }
.rail-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
  font-size: 14px; font-weight: 700; border: none;
  box-shadow: 0 3px 10px var(--accent-glow); transition: transform .18s var(--ease);
}
.rail-avatar:hover { transform: scale(1.08); }

/* ── 列表栏: 自选/对话/报告 顶部标签 ── */
.sw-toptabs {
  display: flex; gap: 2px; padding: 10px 10px 8px; flex: none;
}
.sw-toptab {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  padding: 8px 4px; border: none; cursor: pointer; border-radius: 9px;
  background: transparent; color: var(--dim); font-size: 13px; font-weight: 500;
  transition: color .16s var(--ease), background .16s var(--ease);
}
.sw-toptab:hover { color: var(--text-2); background: var(--hover); }
.sw-toptab.active { color: var(--accent); background: var(--accent-soft); font-weight: 600; }
.sw-toptab svg { width: 15px; height: 15px; }
/* 搜索框 */
.sw-search { padding: 0 10px 8px; flex: none; }
.sw-search input {
  width: 100%; padding: 8px 12px 8px 32px; border-radius: 10px;
  background: var(--pane-2); border: 1px solid var(--border); color: var(--text);
  font-size: 13.5px; outline: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='15' height='15' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='7' cy='7' r='5.2'/%3E%3Cline x1='14' y1='14' x2='10.5' y2='10.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: 11px center;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.sw-search input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
/* 列表容器: 自选/对话/报告 三个面板切换显示, 占满中间 */
.sw-listwrap { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; overflow: hidden; }
.sw-listpane { display: none; flex-direction: column; min-height: 0; flex: 1; }
.sw-listpane.active { display: flex; }
.sw-listpane > .sw-list { flex: 1 1 auto; min-height: 0; }
.sw-listpane .reports-list { max-height: none; flex: 1 1 auto; }
.sw-pane-foot { display: flex; align-items: center; gap: 6px; padding: 6px 10px 2px; flex: none; border-top: 1px solid var(--border); }
.sw-pane-foot .icon-btn { font-size: 12.5px; padding: 5px 9px; border-radius: 7px; }
.sw-pane-foot .manage-watchlist, .sw-pane-foot .view-all { border-top: none; padding: 5px 8px; margin: 0; font-size: 12.5px; }
.sw-pane-foot .manage-watchlist { margin-left: auto; }
/* 底部余额: 去掉胶囊底, 融入底栏 */
.sw-userfoot .balance-pill { background: transparent; border: none; padding: 0; font-size: 13px; color: var(--text-2); border-radius: 0; }
.sw-userfoot .balance-pill:hover { background: transparent; color: var(--accent); }
.sw-userfoot .balance-pill.low { color: var(--up); }
.uf-avatar svg { width: 16px; height: 16px; }
.new-chat-btn { margin: 8px 12px; justify-content: center; }
/* 底部: 新建对话 + 用户/余额 */
.sw-userfoot {
  display: flex; align-items: center; gap: 9px; padding: 8px 12px 10px; flex: none;
  border-top: 1px solid var(--border);
}
.sw-userfoot .uf-avatar {
  width: 30px; height: 30px; border-radius: 50%; flex: none;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff;
  font-size: 13px; font-weight: 700; cursor: pointer;
}
.sw-userfoot .uf-bal { font-size: 13px; color: var(--text-2); cursor: pointer; }
.sw-userfoot .uf-bal b { color: var(--text); font-family: var(--mono); }

/* ===================================================================
   ★ 左栏功能整页 (回测·量化选股 / 群体推演 / 资讯订阅)
   点 rail → rail 右侧整屏铺开功能页, rail 常驻、不刷新。
=================================================================== */
.feature-view {
  position: fixed; left: 58px; top: 0; right: 0; bottom: 0;
  background: var(--bg); z-index: 60;
  display: flex; flex-direction: column;
  animation: fvIn .34s var(--ease);
}
.feature-view.hidden { display: none; }
@keyframes fvIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.fv-head {
  display: flex; align-items: center; gap: 13px; flex: none;
  padding: 14px 24px; border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--pane), var(--bg));
}
.fv-head .fv-ic { width: 26px; height: 26px; color: var(--accent); flex: none; }
/* 资讯页顶部统计卡 */
.fv-stats { display: flex; gap: 10px; margin-right: 12px; }
.fvs { display: flex; flex-direction: column; align-items: center; min-width: 76px;
  padding: 6px 12px; border-radius: 9px; background: var(--hover); border: 1px solid var(--border); }
.fvs-n { font-size: 16px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; line-height: 1.1; }
.fvs-l { font-size: 11px; color: var(--dim); margin-top: 2px; }
.fv-htext { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.fv-title { font-size: 16.5px; font-weight: 700; color: var(--text); letter-spacing: .2px; }
.fv-sub { font-size: 11.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fv-tabs { display: flex; gap: 6px; margin-left: 8px; flex: none; }
.fv-tab {
  padding: 7px 16px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--pane); color: var(--text-2); cursor: pointer;
  font-size: 13.5px; font-weight: 600; transition: all .2s var(--ease);
}
.fv-tab:hover { color: var(--text); border-color: var(--border-strong); }
.fv-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); box-shadow: 0 4px 14px var(--accent-glow); }
.fv-spacer { flex: 1; }
.fv-close {
  width: 32px; height: 32px; border-radius: 9px; flex: none;
  background: var(--pane); border: 1px solid var(--border); color: var(--text-2);
  cursor: pointer; font-size: 15px; line-height: 1; transition: all .2s var(--ease);
}
.fv-close:hover { color: var(--up); border-color: var(--up); background: var(--up-soft); }

.fv-scroll { flex: 1; overflow-y: auto; min-height: 0; }
.fv-pane { padding: 18px 24px 28px; }
.fv-pane.hidden { display: none; }

/* 个股选择器 (回测/推演 复用) */
.fv-picker { position: relative; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.fv-picker-label { font-size: 13px; color: var(--text-2); font-weight: 600; }
.fv-picker-box { position: relative; width: 300px; max-width: 60vw; }
.fv-picker-box input {
  width: 100%; padding: 9px 13px; border-radius: 10px;
  background: var(--pane); border: 1px solid var(--border); color: var(--text);
  font-size: 13.5px; outline: none; transition: all .2s var(--ease);
}
.fv-picker-box input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.fv-picker-drop {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0; z-index: 8;
  background: var(--pane); border: 1px solid var(--border-strong); border-radius: 10px;
  box-shadow: var(--shadow-lg); max-height: 340px; overflow-y: auto; padding: 5px;
}
.fv-picker-drop.hidden { display: none; }
.fv-pick-row { padding: 8px 11px; border-radius: 8px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.fv-pick-row:hover, .fv-pick-row.kbd { background: var(--accent-soft); }
.fv-pick-rname { font-size: 13.5px; color: var(--text); }
.fv-pick-rmeta { font-size: 11.5px; color: var(--dim); font-family: var(--mono); }
.fv-pick-cur { font-size: 14px; color: var(--accent); font-weight: 700; font-family: var(--mono); }
.fv-pick-empty { font-size: 13px; color: var(--dim); padding: 10px; }

/* 资讯订阅页: 左设置 + 右今日要点 */
.fv-news-wrap { display: grid; grid-template-columns: minmax(380px, 1fr) minmax(360px, 1.1fr); gap: 22px; align-items: start; }
@media (max-width: 1180px) { .fv-news-wrap { grid-template-columns: 1fr; } }
.fv-news-settings, .fv-news-digest {
  background: var(--pane); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 16px 18px; box-shadow: var(--shadow-sm);
}
.fv-digest-head { font-size: 14px; font-weight: 700; color: var(--text); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fv-news-digest .news-list { max-height: calc(100vh - 230px); overflow-y: auto; }

/* swarm / screen 在整页里的尺寸兜底 */
#fv-swarm #sw-net { width: 100%; height: 440px; }
#fv-swarm .sw-body { min-height: 500px; }
#fv-screen .bt-result, #fv-screen .scr-picks { margin-top: 4px; }

/* ===== 融资融券 / 龙虎榜 tab ===== */
.tab-h3 .tab-sub {
  font-size: 12.5px; font-weight: 500; color: var(--dim);
  font-family: var(--mono); margin-left: 6px;
}
.margin-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 4px 0 6px; }
@media (max-width: 1280px) { .margin-grid { grid-template-columns: 1fr; } }
.margin-cap {
  font-size: 13.5px; font-weight: 600; margin-bottom: 6px;
  padding: 4px 0 5px; border-bottom: 1px dashed var(--border);
}
.margin-cap.up   { color: var(--up); }
.margin-cap.down { color: var(--down); }
.margin-col .info-table .info-k { width: 96px; }
.lhb-dates { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 10px; }
.lhb-chip {
  padding: 3px 10px; border-radius: 12px; font-size: 12.5px;
  font-family: var(--mono);
  background: var(--pane-2); border: 1px solid var(--border); color: var(--text-2);
}
.lhb-chip.latest { border-color: var(--accent); color: var(--accent); font-weight: 600; }
.lhb-reason {
  font-size: 13px; color: var(--text-2); margin: 2px 0 10px;
  padding: 7px 10px; border-radius: 6px; background: var(--pane-2);
  border-left: 3px solid var(--accent);
}
.lhb-seat { font-family: inherit; max-width: 360px; white-space: normal; line-height: 1.4; }

/* ===== 两融历史 双轴线图 + 表 ===== */
.mh-legend { display: flex; gap: 18px; font-size: 12px; color: var(--text-2); margin: 2px 0 8px; }
.mh-lg { display: inline-flex; align-items: center; gap: 6px; }
.mh-lg::before { content: ''; width: 16px; height: 3px; border-radius: 2px; }
.mh-lg-total::before { background: #4caf72; }
.mh-lg-close::before { background: var(--up); }
.mh-svg { width: 100%; height: auto; display: block; background: var(--pane-2);
  border: 1px solid var(--border); border-radius: 10px; }
.mh-grid { stroke: var(--border); stroke-width: 1; }
.mh-ylab, .mh-xlab { fill: var(--dim); font-size: 11px; font-family: var(--mono); }
.mh-line { fill: none; stroke-width: 1.7;
  stroke-dasharray: 6000; stroke-dashoffset: 6000; animation: mhDraw 1.6s var(--ease) forwards; }
.mh-total { stroke: #4caf72; }
.mh-close { stroke: var(--up); animation-delay: .18s; }
@keyframes mhDraw { to { stroke-dashoffset: 0; } }
.mh-tablewrap { overflow-x: auto; margin-top: 12px; }
.mh-table { font-size: 12px; min-width: 720px; }
.mh-table th, .mh-table td { white-space: nowrap; text-align: right; padding: 6px 9px; font-family: var(--mono); }
.mh-table th:first-child, .mh-table td:first-child { text-align: left; }
@media (prefers-reduced-motion: reduce) { .mh-line { animation: none; stroke-dashoffset: 0; } }

/* ===== 全市场选股结果表 (image#9 风格) ===== */
.scr-picks-head { font-size: 12.5px; color: var(--text-2); margin: 2px 0 8px; }
.scr-hint-inline { color: var(--dim); margin-left: 6px; }
.scr-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.scr-table th { text-align: right; font-weight: 600; color: var(--text-2); font-size: 12.5px;
  padding: 9px 12px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--bg); z-index: 1; }
.scr-table th:first-child { text-align: center; }
.scr-table th:nth-child(2), .scr-table th:nth-child(3) { text-align: left; }
.scr-table td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: right; font-family: var(--mono); color: var(--text); }
.scr-row { cursor: pointer; transition: background .15s var(--ease); }
.scr-row:hover { background: var(--accent-soft); }
.scr-rank-c { text-align: center; }
.scr-rankb { display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px;
  padding: 0 6px; border-radius: 7px; background: var(--pane-2); color: var(--text-2); font-weight: 700; font-size: 12.5px; }
.scr-rankb.top { background: var(--accent); color: #fff; box-shadow: 0 3px 10px var(--accent-glow); }
.scr-name { text-align: left !important; font-family: inherit; font-weight: 600; }
.scr-code-c { text-align: left !important; color: var(--text-2); }
.scr-comp { white-space: nowrap; }
.scr-comp .scr-bar { display: inline-block; width: 70px; height: 6px; border-radius: 4px;
  background: var(--pane-2); overflow: hidden; vertical-align: middle; margin-right: 8px; }
.scr-comp .scr-bar i { display: block; height: 100%; border-radius: 4px;
  background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.scr-comp b { color: var(--text); font-weight: 700; }
.scr-quant { color: var(--text-2); }
.scr-table td.up { color: var(--up); }
.scr-table td.down { color: var(--down); }

/* ===== 我的报告 整页卡片 (image#10 风格) ===== */
.rep-newbtn { padding: 8px 16px; border-radius: 9px; border: none; background: var(--accent); color: #fff;
  font-weight: 600; font-size: 13px; cursor: pointer; box-shadow: 0 4px 14px var(--accent-glow); flex: none;
  transition: background .2s var(--ease); }
.rep-newbtn:hover { background: var(--accent-2); }
.rep-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.rep-card { background: var(--pane); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  cursor: pointer; box-shadow: var(--shadow-sm); transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease); }
.rep-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.rep-preview { position: relative; height: 128px; padding: 16px;
  background: linear-gradient(135deg, var(--pane-2), var(--bg)); border-bottom: 1px solid var(--border); }
.rep-badge { position: absolute; top: 10px; right: 12px; font-size: 11px; font-weight: 700; color: var(--accent); }
.rep-faux { display: flex; flex-direction: column; gap: 9px; margin-top: 8px; }
.rep-faux i { height: 7px; border-radius: 4px; background: var(--border-strong); opacity: .5; }
.rep-faux i:nth-child(1) { width: 58%; } .rep-faux i:nth-child(2) { width: 86%; }
.rep-faux i:nth-child(3) { width: 72%; } .rep-faux i:nth-child(4) { width: 90%; } .rep-faux i:nth-child(5) { width: 48%; }
.rep-cbody { padding: 12px 14px 14px; }
.rep-ctitle { font-size: 15px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rep-cmeta { font-size: 12px; color: var(--dim); margin-top: 6px; font-family: var(--mono); }
.rep-pdf { color: var(--accent); font-weight: 600; }
.rep-kindtag { font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.rep-kindtag.k-daily { background: var(--accent-soft); color: var(--accent); }
.rep-kindtag.k-portfolio { background: rgba(139,92,246,.16); color: #a78bfa; }
.rep-kindtag.k-weekly { background: var(--down-soft); color: var(--down); }
.rep-kindtag.k-backtest { background: rgba(240,176,69,.18); color: var(--warn); }
.rep-kindtag.k-swarm { background: var(--up-soft); color: var(--up); }

/* 两融历史描线动画: pathLength=1 归一 + 放慢 + 匀速缓动, 左→右清晰可见 */
.mh-line { stroke-dasharray: 1; stroke-dashoffset: 1; animation: mhDraw 2.6s cubic-bezier(.65,0,.35,1) forwards; }
.mh-close { animation-delay: .3s; }

/* 龙虎榜日期 chip 可点击 (点哪天看哪天席位) */
.lhb-chip { cursor: pointer; transition: all .15s var(--ease); }
.lhb-chip:hover { border-color: var(--accent); color: var(--accent); }
.lhb-chip.active { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }

/* ===== 图表统一工具条 (周期/工具/指标/全屏) — 参考图12 ===== */
.fc-toolbar { gap: 6px; flex-wrap: nowrap; overflow-x: auto; }
.tf-group { display: inline-flex; gap: 2px; background: var(--pane-2); border-radius: 9px; padding: 2px; flex: none; }
.tf-pill {
  padding: 4px 11px; border: none; background: transparent; color: var(--text-2);
  font-size: 13px; border-radius: 7px; cursor: pointer; white-space: nowrap;
  transition: all .15s var(--ease);
}
.tf-pill:hover { color: var(--text); }
.tf-pill.active { background: var(--pane); color: var(--accent); font-weight: 600; box-shadow: var(--shadow-sm); }
.fc-div { width: 1px; height: 18px; background: var(--border); flex: none; margin: 0 3px; }
.fc-spacer { flex: 1 1 auto; }
.ct-btn {
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; flex: none;
  padding: 5px 10px; border: 1px solid transparent; background: transparent;
  color: var(--text-2); font-size: 13px; border-radius: 8px; cursor: pointer;
  transition: all .15s var(--ease);
}
.ct-btn:hover { background: var(--pane-2); color: var(--text); }
.ct-btn svg { flex: none; }
.ct-btn.fc-ai-btn { color: var(--accent); }
.ct-icon { padding: 6px; }
.ind-tog {
  padding: 5px 11px; border: 1px solid var(--border); background: var(--pane); flex: none;
  color: var(--text-2); font-size: 12.5px; font-weight: 600; border-radius: 8px; cursor: pointer;
  transition: all .15s var(--ease);
}
.ind-tog:hover { border-color: var(--border-strong); color: var(--text); }
.ind-tog.active { background: var(--accent-soft); color: var(--accent); border-color: transparent; }

/* 全屏图表: 隐藏自选 + AI 栏, rail 常驻 */
#pro-app.chart-max { grid-template-columns: 58px 0 minmax(0,1fr) 0; }
#pro-app.chart-max .sessions-watchlist, #pro-app.chart-max .ai-pane { display: none; }

/* 功能页(回测/报告/资讯/推演)覆盖左栏时, 隐藏折叠把手 */
body.fv-active #sidebar-toggle { display: none !important; }

/* ★ 内嵌面板模式 (?panel=1): 多窗"完整面板"用 — 只留中间列(精简头+图表+10tab), 隐藏 rail/自选/AI + 不适用的工具按钮 */
body.panel-embed #pro-app { display: block !important; }
body.panel-embed .pro-rail,
body.panel-embed .sessions-watchlist,
body.panel-embed .ai-pane { display: none !important; }
body.panel-embed .chart-area { width: 100vw !important; height: 100vh !important; }
body.panel-embed #btn-multi,
body.panel-embed #btn-tb-swarm,
body.panel-embed #sidebar-toggle { display: none !important; }
/* 多股面板简要化: 隐藏 10 个 tab 栏 + 那一大片 15 格指标网格 →
   每窗 = 名称/代码 + 价/涨跌/状态 一行 + TradingView 图 (开高低/MA 在图自带图例里) */
body.panel-embed .ca-tabs { display: none !important; }
body.panel-embed .sh-metrics { display: none !important; }
/* 多股面板: 表头/工具条整体缩小, 把垂直空间让给 K 线 */
body.panel-embed .stock-header { padding: 4px 12px 2px; row-gap: 2px; column-gap: 10px; }
body.panel-embed .sh-name { font-size: 14px; }
body.panel-embed .sh-code { font-size: 11.5px; }
body.panel-embed .sh-price { font-size: 18px; }
body.panel-embed .sh-change { font-size: 12px; }
body.panel-embed .sh-tag { font-size: 10px; padding: 1px 6px; }
body.panel-embed .sh-sig-chip { font-size: 10.5px; padding: 2px 8px; }
body.panel-embed .sh-sig-str { font-size: 9.5px; }
body.panel-embed .sh-status-bar { font-size: 10.5px; margin-left: 8px; }
body.panel-embed .fc-toolbar { padding: 3px 10px; }
body.panel-embed .fc-toolbar .tf-pill, body.panel-embed .fc-toolbar .ct-btn { font-size: 11px; padding: 3px 7px; }

/* ★ 完整面板网格 (2-4窗): 隐藏原生 表头/tab/pane, 铺 iframe 面板网格 */
#panel-grid { display: none; }
.chart-area.panel-grid-mode > .stock-header,
.chart-area.panel-grid-mode > .ca-tabs,
.chart-area.panel-grid-mode > .ca-pane { display: none !important; }
.chart-area.panel-grid-mode #panel-grid {
  display: grid; gap: 2px; background: var(--border);
  flex: 1 1 auto; min-height: 0;
}
/* 1 窗全屏(关到只剩一只时), 2~3 窗上下竖排(每窗全宽), 4 窗 2×2 */
#panel-grid[data-count="1"] { grid-template-columns: 1fr; grid-template-rows: 1fr; }
#panel-grid[data-count="2"] { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
#panel-grid[data-count="3"] { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr 1fr; }
#panel-grid[data-count="4"] { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
/* 多窗面板 = iframe TradingView 图; ✕/⋯ 浮在右上角 */
.pg-cell { position: relative; min-width: 0; min-height: 0; background: var(--bg); overflow: hidden; }
.pg-cell iframe { width: 100%; height: 100%; border: 0; display: block; }
.pg-cell.focused { box-shadow: inset 0 0 0 2px var(--accent); z-index: 1; }
.pg-menu, .pg-close {
  position: absolute; top: 6px; z-index: 6; width: 22px; height: 22px; border: none;
  background: rgba(0,0,0,.42); color: #fff; cursor: pointer; border-radius: 5px;
  font-size: 13px; line-height: 22px; padding: 0; text-align: center;
}
.pg-menu { right: 34px; } .pg-close { right: 7px; }
.pg-menu:hover { background: rgba(0,0,0,.6); }
.pg-close:hover { background: rgba(239,83,80,.75); }
.pg-cellmenu {
  position: absolute; top: 30px; right: 8px; z-index: 20;
  background: var(--pane-2); border: 1px solid var(--border-strong); border-radius: 8px;
  box-shadow: var(--shadow); padding: 4px; display: flex; flex-direction: column; min-width: 132px;
}
.pg-cellmenu button { text-align: left; background: transparent; border: none; color: var(--text); cursor: pointer; font-size: 12.5px; padding: 7px 9px; border-radius: 5px; white-space: nowrap; }
.pg-cellmenu button:hover { background: var(--hover); }
/* AI 栏 多股同屏对比卡 */
#ai-compare-card { margin-bottom: 12px; }
.acmp-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 6px; }
.acmp-tbl th { color: var(--dim); font-weight: 500; font-size: 11.5px; text-align: left; padding: 3px 6px; border-bottom: 1px solid var(--border); }
.acmp-tbl td { padding: 5px 6px; border-bottom: 1px solid var(--border); color: var(--text); font-variant-numeric: tabular-nums; }
.acmp-code { color: var(--dim); font-size: 10.5px; font-family: ui-monospace, Consolas, monospace; }
.acmp-btn { margin-top: 8px; width: 100%; padding: 7px; border: none; border-radius: 7px; cursor: pointer;
  background: var(--accent); color: #fff; font-size: 12.5px; font-weight: 600; }
.acmp-btn:hover { filter: brightness(1.08); }
/* 多窗选股弹窗 */
.mw-picker {
  position: fixed; z-index: 10050; width: 288px; max-width: calc(100vw - 16px);
  background: var(--pane-2); border: 1px solid var(--border-strong); border-radius: 10px;
  box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden;
}
.mwp-head { padding: 10px 12px; font-size: 12.5px; font-weight: 600; color: var(--text); border-bottom: 1px solid var(--border); }
.mwp-search { margin: 8px 10px 4px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 7px;
  background: var(--bg); color: var(--text); font-size: 12.5px; outline: none; }
.mwp-search:focus { border-color: var(--accent); }
.mwp-list { flex: 1 1 auto; min-height: 0; max-height: 60vh; overflow-y: auto; padding: 2px 6px; }
.mwp-row { display: flex; align-items: center; gap: 8px; padding: 7px 6px; border-radius: 6px; cursor: pointer; }
.mwp-row:hover { background: var(--hover); }
.mwp-row input { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; flex: none; }
.mwp-nm { flex: 1; min-width: 0; font-size: 13px; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mwp-cd { font-size: 11px; color: var(--dim); font-family: ui-monospace, Consolas, monospace; flex: none; }
.mwp-empty { padding: 16px; text-align: center; color: var(--dim); font-size: 12.5px; }
.mwp-foot { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-top: 1px solid var(--border); }
.mwp-count { flex: 1; font-size: 12px; color: var(--dim); }
.mwp-cancel, .mwp-ok { padding: 6px 14px; border: none; border-radius: 7px; cursor: pointer; font-size: 12.5px; font-weight: 600; }
.mwp-cancel { background: var(--hover); color: var(--text); }
.mwp-ok { background: var(--accent); color: #fff; }
.mwp-ok:disabled { opacity: .45; cursor: not-allowed; }
/* 股票观察池 标签 + 添加 */
.wpool { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 6px; }
.wp-chip { display: inline-flex; align-items: center; gap: 5px; padding: 4px 8px; border-radius: 7px;
  background: var(--accent-soft); color: var(--accent); font-size: 12.5px; font-weight: 500; }
.wp-chip .wp-x { cursor: pointer; opacity: .7; font-size: 11px; font-weight: 700; }
.wp-chip .wp-x:hover { opacity: 1; color: #ef5350; }
.wp-empty { color: var(--dim); font-size: 12px; }
.wp-add { padding: 4px 10px; border: 1px dashed var(--border-strong); border-radius: 7px; cursor: pointer;
  background: transparent; color: var(--accent); font-size: 12.5px; font-weight: 600; }
.wp-add:hover { background: var(--hover); }
.fv-pick-hint { padding: 5px 10px; font-size: 11px; color: var(--dim); border-bottom: 1px solid var(--border); }

/* ===================================================================
   推送设置编辑器 重设计 (.pse-*) — 语义分区卡 + 整行开关 + 渐进披露
   仅作用于 .se-push 内; 全部沿用既有 token, 暗/亮主题自动跟随.
   开关由隐藏 checkbox(:checked) 驱动纯 CSS 滑块, 零 JS 改动.
=================================================================== */
.pse-editor { display: flex; flex-direction: column; gap: 12px; }
/* 语义分区卡 */
.pse-sec { background: var(--pane-2); border: 1px solid var(--border); border-radius: 8px; padding: 11px 13px 5px; }
.pse-sec-head { font-family: var(--font-display); font-size: 13.5px; font-weight: 600; color: var(--text);
  letter-spacing: .1px; margin-bottom: 4px; padding-bottom: 7px; border-bottom: 1px solid var(--border); }
.pse-sec-hint { font-family: var(--font); font-size: 12px; font-weight: 400; color: var(--text-2); letter-spacing: 0; margin-left: 6px; }
/* 单个开关行: 整行可点 */
.pse-row { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-top: 1px solid var(--border);
  cursor: pointer; position: relative; transition: background .12s; border-radius: 6px; margin: 0 -7px; padding-left: 7px; padding-right: 7px; }
.pse-sec-head + .pse-row, .pse-fold-body > .pse-row:first-child { border-top: none; }
.pse-row:hover { background: var(--hover); }
.pse-row-static, .pse-row-static:hover { cursor: default; background: transparent; }
.pse-ico { flex: 0 0 auto; font-size: 15px; line-height: 1; width: 18px; text-align: center; }
.pse-rmain { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.pse-rtitle { font-size: 13px; font-weight: 500; color: var(--text); line-height: 1.35; }
.pse-rdesc { font-size: 12px; font-weight: 400; color: var(--text-2); line-height: 1.4; }
.pse-row-thin { padding: 7px; }
/* 实时提醒 优先级左缘色条 (替代彩色发光; 红=高 琥珀=中) */
.pse-row-urgent::before, .pse-row-changes::before {
  content: ""; position: absolute; left: 0; top: 9px; bottom: 9px; width: 3px; border-radius: 999px; }
.pse-row-urgent::before { background: #ef5350; }
.pse-row-changes::before { background: #ff9800; }
/* 钟点选择器 (药丸内嵌输入) */
.pse-hour { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2);
  background: var(--accent-soft); border-radius: 999px; padding: 3px 11px; white-space: nowrap; }
.pse-hourin { width: 34px; padding: 1px 2px; text-align: center; border: none; background: transparent;
  color: var(--text); font-family: var(--mono); font-size: 13px; font-feature-settings: "tnum" 1;
  font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.pse-hourin::-webkit-outer-spin-button, .pse-hourin::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.pse-hourin:focus { outline: none; }
.pse-hour:focus-within { box-shadow: 0 0 0 2px var(--accent-glow); }
/* iOS 式滑块: 隐藏原 checkbox(保留可聚焦) + :checked 驱动 */
.pse-cb { position: absolute; opacity: 0; width: 38px; height: 22px; margin: 0; right: 7px; cursor: pointer; }
.pse-sw { flex: 0 0 auto; position: relative; width: 38px; height: 22px; border-radius: 999px;
  background: var(--border-strong); transition: background .16s cubic-bezier(.2,0,0,1); }
.pse-sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.28); transition: transform .18s cubic-bezier(.2,0,0,1); }
.pse-cb:checked ~ .pse-sw { background: var(--accent); }
.pse-cb:checked ~ .pse-sw::after { transform: translateX(16px); }
.pse-cb:focus-visible ~ .pse-sw { box-shadow: 0 0 0 2px var(--accent-glow); }
/* 折叠区 (通道与绑定 / 投递选项) */
.pse-fold { background: var(--pane-2); border: 1px solid var(--border); border-radius: 8px; }
.pse-fold[open] { padding-bottom: 4px; }
.pse-fold-inline { background: transparent; border: none; border-top: 1px solid var(--border); border-radius: 0; margin: 4px -13px 0; }
.pse-fold-head { display: flex; align-items: center; gap: 8px; padding: 11px 13px; cursor: pointer;
  list-style: none; font-family: var(--font-display); font-size: 13.5px; font-weight: 600; color: var(--text); }
.pse-fold-head-sm { font-family: var(--font); font-size: 12px; font-weight: 500; color: var(--text-2); padding: 9px 13px; }
.pse-fold-head::-webkit-details-marker { display: none; }
.pse-fold-title { flex: 0 0 auto; }
.pse-fold-now { flex: 1 1 auto; min-width: 0; font-family: var(--mono); font-size: 12px; font-weight: 400; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: right; }
.pse-fold-caret { flex: 0 0 auto; color: var(--dim); font-size: 11px; transition: transform .16s; }
.pse-fold[open] > .pse-fold-head .pse-fold-caret { transform: rotate(180deg); }
.pse-fold-body { padding: 2px 13px 11px; display: flex; flex-direction: column; gap: 9px; }
.pse-fold-inline .pse-fold-body { padding: 0 13px 4px; }
.pse-field { display: flex; flex-direction: column; gap: 4px; }
.pse-flabel { font-size: 12px; font-weight: 500; color: var(--text-2); }
.pse-input { margin: 0 !important; width: 100%; box-sizing: border-box; }
.pse-bindbtn { align-self: flex-start; }
/* 底部操作条 + 状态脚注 */
.pse-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.pse-msg { font-size: 12px; color: var(--text-2); margin-top: 6px; line-height: 1.45; min-height: 14px; }
/* 亮色(Perplexity 暖纸): 分区卡 / 折叠区 → 白底 + 描边, 与弹窗白体分层靠极淡 surface */
body.pro.light .pse-sec, body.pro.light .pse-fold { background: var(--pane); }
/* 窄屏: 开关名+说明换行, 滑块/钟点仍右对齐 */
@media (max-width: 460px) {
  .pse-sec { padding: 10px 11px 4px; }
  .pse-row { gap: 9px; }
  .pse-hour { padding: 3px 9px; }
  .pse-fold-now { display: none; }
}

/* ===================================================================
   ★★★ 设计系统换肤: 字体角色 / 深色导航轨 / 等宽数字 / 微交互
=================================================================== */
body.pro { font-family: var(--font); font-size: 13px; line-height: 1.55; }
/* 标题/品牌/大数字 → Sora (层级靠字重+字号) */
.sh-name, .fv-title, .rep-ctitle, .ai-title, .fv-digest-head, .tab-h3, .sh-price,
.login-logo, .rail-logo, .sw-toptab, .pm-title, .rc-title, h1, h2, h3 {
  font-family: var(--font-display); letter-spacing: .1px;
}
/* 一切数字 → JetBrains Mono + 等宽对齐 */
.sh-price, .sh-change, .m-cell .v, .wl-price, .wl-change, .qg-cell .v, .senti-score,
.scr-table td, .scr-quant, .mh-table td, .mh-table th, .tab-table td, .lhb-chip,
.fv-pick-cur, .fv-pick-rmeta, .rep-cmeta, .bt-status, .scr-status,
.kl-price, .flow-net .v, .fb .v, .sd-pnl {
  font-family: var(--mono); font-feature-settings: "tnum" 1; font-variant-numeric: tabular-nums;
}
/* 深色导航轨 — 全局唯一大块深色 #16181d */
body.pro.light .pro-rail { background: #16181d; border-right: 1px solid #0f1115; }
body.pro.light .pro-rail .rail-item { color: #8b929c; }
body.pro.light .pro-rail .rail-item:hover { color: #e4e7ec; background: rgba(255,255,255,.06); }
body.pro.light .pro-rail .rail-item.active { color: #fff; background: rgba(47,83,230,.22); box-shadow: inset 2px 0 0 var(--accent); }
body.pro.light .pro-rail .rail-logo { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; }
body.pro.light .pro-rail .rail-tip { background: #ffffff; color: #14171c; box-shadow: var(--shadow); }
/* 微交互: 控件 :active 回弹 (按下) */
.ct-btn:active, .tf-pill:active, .fv-tab:active, .ca-tab:active, .rail-item:active,
.ind-tog:active, .sw-toptab:active, .dk-card:active, .icon-btn:active, .pm-btn:active { transform: scale(.975); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* 规范: 红绿只贴价格/涨跌数据 — 以下装饰性红绿改中性/accent/琥珀 */
.margin-cap.up, .margin-cap.down { color: var(--text-2); }              /* 融资/融券 标签不用涨跌色 */
.task-progress.done .tp-fill, .task-progress.done .tp-spinner { background: var(--accent); }   /* 完成=accent 非绿 */
.task-progress.done .tp-stage.done, .task-progress.done .tp-current { color: var(--accent); }
.dk-clear:hover { border-color: var(--accent); color: var(--accent); }  /* 清除按钮 hover 不用红 */
.balance-pill.low { color: var(--warn); border-color: var(--warn); }    /* 低余额=琥珀提醒 非红 */
.rc-qr-status.paid { color: var(--accent); }                            /* 支付成功=accent 非绿 */
.login-error { color: var(--warn); }                                    /* 表单报错=琥珀 非涨跌红 */

/* 左导航轨改浅色, 与整体统一 (撤销 #16181d 深色轨) */
body.pro.light .pro-rail { background: var(--pane); border-right: 1px solid var(--border); }
body.pro.light .pro-rail .rail-item { color: var(--dim); }
body.pro.light .pro-rail .rail-item:hover { color: var(--text); background: var(--pane-2); }
body.pro.light .pro-rail .rail-item.active { color: var(--accent); background: var(--accent-soft); box-shadow: inset 2px 0 0 var(--accent); }
body.pro.light .pro-rail .rail-tip { background: #1c1917; color: #faf8f5; box-shadow: var(--shadow); }

/* 报告卡片: 名字·类型·日期 标题 + 开头内容摘录 (替换灰条占位) */
.rep-preview { height: auto; min-height: 132px; padding: 14px 16px 16px; }
.rep-faux { display: none; }
.rep-ptitle { font-size: 15px; font-weight: 700; color: var(--text); font-family: var(--font-display);
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap; line-height: 1.3; padding-right: 34px; }
.rep-pdate { font-size: 11.5px; color: var(--dim); font-family: var(--mono); margin-top: 4px; }
.rep-pexcerpt { font-size: 12px; color: var(--text-2); line-height: 1.55; margin-top: 9px;
  display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.rep-noexc { color: var(--dim); }

/* 群体推演: 力导向粒子网络 canvas (绝对填充 #sw-net, 不参与 flex 布局计算) */
#sw-net { position: relative; }
.sw-canvas { position: absolute; inset: 0; display: block; }

/* 群体推演整页: 填满视口 → "实时群聊/剧本报告"在各自框内滚动, 不再把整页(外层 .fv-scroll)撑开整体滚动 */
#fv-swarm .fv-scroll { overflow: hidden; display: flex; flex-direction: column; }
#fv-swarm .fv-pane   { flex: 1; min-height: 0; display: flex; flex-direction: column; padding: 0; }
#fv-swarm .sw-ground { flex: none; }                              /* 接地条: 一行细条, 不占大高度 */
#fv-swarm .sw-body   { flex: 1 1 auto; min-height: 0; }          /* 填充剩余高度 */
#fv-swarm #sw-net    { height: auto; flex: 1; min-height: 0; }   /* 画布由 .sw-stage 撑满 */

/* 余额 + 头像 移入左侧 rail 底部 (对齐甲方图#23: 第1栏底部只剩"新建对话"按钮) */
.rail-bal {
  display: block; width: 48px; text-align: center; box-sizing: border-box;
  font-size: 9.5px; line-height: 1.32; padding: 5px 3px; border-radius: 9px;
  background: var(--pane-2); border: 1px solid var(--border); color: var(--text-2);
  font-family: var(--mono); white-space: normal; overflow-wrap: anywhere; cursor: pointer;
  transition: color .16s var(--ease), background .16s var(--ease), border-color .16s var(--ease);
}
.rail-bal:hover { color: var(--accent); background: var(--accent-soft); border-color: var(--accent-soft); box-shadow: none; }
.rail-bal.low  { color: var(--warn); border-color: var(--warn); }
.rail-avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none; padding: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--pane-2); border: 1px solid var(--border); color: var(--text-2); cursor: pointer;
  transition: color .16s var(--ease), border-color .16s var(--ease);
}
.rail-avatar:hover { color: var(--accent); border-color: var(--accent); }
.rail-avatar svg { width: 16px; height: 16px; }

/* ===== 头像账号菜单 (点头像弹出: 账号·会员 / 余额·充值 / 额度 / 画像 / 账号信息 / 退出) ===== */
.rail-user { position: relative; display: flex; }
.rail-avatar[aria-expanded="true"] { color: var(--accent); border-color: var(--accent); }
.user-menu {
  position: absolute; left: calc(100% + 10px); bottom: 0; z-index: 1200;
  width: 244px; padding: 8px; box-sizing: border-box;
  background: var(--pane); border: 1px solid var(--border); border-radius: 14px;
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: 1px;
  animation: um-pop .15s var(--ease);
}
.user-menu.hidden { display: none; }
@keyframes um-pop { from { opacity: 0; transform: translateY(8px) scale(.97); } to { opacity: 1; transform: none; } }
.um-head { display: flex; align-items: center; gap: 10px; padding: 7px 8px 10px; }
.um-ava { width: 38px; height: 38px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #06d6e0 0%, var(--accent) 58%, #9b5cf6 100%); color: #fff; }
.um-meta { min-width: 0; }
.um-acct { font-size: 13.5px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 168px; }
.um-tier { font-size: 11px; color: var(--accent); margin-top: 2px; }
.um-balance { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 9px 11px; margin: 2px 0; border-radius: 10px; background: var(--pane-2); }
.um-bal-info { display: flex; flex-direction: column; gap: 1px; }
.um-bal-label { font-size: 10.5px; color: var(--text-3); }
.um-bal-val { font-size: 15px; font-weight: 700; color: var(--text); font-family: var(--mono); }
.um-bal-val.low { color: var(--warn); }
.um-recharge { padding: 6px 15px; border: none; border-radius: 8px; cursor: pointer;
  background: var(--accent); color: #fff; font-size: 12px; font-weight: 600; flex: none;
  transition: filter .14s var(--ease); }
.um-recharge:hover { filter: brightness(1.1); }
.um-quota { font-size: 11px; color: var(--text-3); padding: 1px 11px 5px; }
.um-sep { height: 1px; background: var(--border); margin: 5px 4px; }
.um-item { display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 10px; border: none; background: transparent; border-radius: 9px;
  color: var(--text-2); font-size: 13px; cursor: pointer; text-align: left;
  transition: background .14s var(--ease), color .14s var(--ease); }
.um-item svg { width: 17px; height: 17px; flex: none; }
.um-item > span { flex: 1; }
.um-item:hover { background: var(--hover); color: var(--text); }
.um-item .um-chev { width: 14px; height: 14px; opacity: .5; transition: transform .16s var(--ease); }
.um-item[aria-expanded="true"] .um-chev { transform: rotate(90deg); }
.um-logout:hover { background: var(--hover); color: var(--warn); }
.um-acct-detail { padding: 2px 11px 8px; font-size: 11.5px; line-height: 2.0; }
.um-acct-detail.hidden { display: none; }
.um-acct-detail .um-row { display: flex; justify-content: space-between; gap: 12px; }
.um-acct-detail .k { color: var(--text-3); }
.um-acct-detail .v { color: var(--text); font-family: var(--mono); }

/* rail-logo 改为可点链接 → 返回 Watchpilot 主页/大盘看板 */
a.rail-logo { text-decoration: none; cursor: pointer; transition: transform .14s var(--ease), box-shadow .14s var(--ease), filter .14s var(--ease); }
a.rail-logo:hover { transform: translateY(-1px); box-shadow: 0 6px 18px var(--accent-glow); filter: brightness(1.06); }
a.rail-logo:active { transform: scale(.97); }

/* ===== 交付甲方前临时隐藏: 群体推演(swarm) 入口与功能. 恢复时删除本块 (2026-06-08) ===== */
.rail-item[data-rail="swarm"],
#btn-tb-swarm,
[data-repkind="swarm"],
#fv-swarm { display: none !important; }


/* ============================================================
   资讯页 (图15 重构) — 5 统计卡 + 3 栏 (nv-* 命名, 用 pro 设计令牌, 自动适配亮/暗)
   ============================================================ */
#fv-news .nv-updated { font-size: 12.5px; color: var(--dim); margin-right: 12px; font-variant-numeric: tabular-nums; }
#fv-news .nv-btn {
  height: 32px; padding: 0 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong); background: var(--pane-2); color: var(--text);
  font-size: 13px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: all .15s var(--ease);
}
#fv-news .nv-btn:hover { background: var(--hover); border-color: var(--accent); }
#fv-news .nv-btn:disabled { opacity: .55; cursor: default; }
#fv-news .nv-btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
#fv-news .nv-btn-primary:hover { background: var(--accent-2); }

/* 顶部 5 统计卡 */
.nv-stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; padding: 18px 22px 4px; }
.nv-stat { display: flex; align-items: center; gap: 12px; background: var(--pane); border: 1px solid var(--border); border-radius: var(--radius); padding: 13px 16px; box-shadow: var(--shadow-sm); }
.nv-stat-ic { width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }
.nv-stat-n { font-family: var(--font-display); font-size: 22px; font-weight: 700; color: var(--text); line-height: 1.1; letter-spacing: -.5px; }
.nv-stat-n.sm { font-size: 14.5px; font-weight: 600; }
.nv-stat-l { font-size: 12px; color: var(--dim); margin-top: 2px; }

/* 3 栏布局 */
.nv-grid { display: grid; grid-template-columns: 264px minmax(0, 1fr) 300px; gap: 18px; padding: 14px 22px 26px; align-items: start; }
@media (max-width: 1040px) { .nv-stats { grid-template-columns: repeat(3, 1fr); } .nv-grid { grid-template-columns: minmax(0, 1fr); } }
.nv-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.nv-card { background: var(--pane); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow-sm); }
.nv-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.nv-card-title { font-family: var(--font-display); font-size: 14px; font-weight: 700; color: var(--text); letter-spacing: -.2px; }
.nv-edit { font-size: 12px; color: var(--accent); cursor: pointer; }
.nv-edit:hover { text-decoration: underline; }

/* 左: 我的订阅 */
.nv-sub-sec { margin-bottom: 12px; }
.nv-sub-sec:last-child { margin-bottom: 0; }
.nv-sub-h { font-size: 12px; color: var(--dim); margin-bottom: 6px; }
.nv-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.nv-chip { font-size: 12.5px; padding: 3px 9px; border-radius: 7px; background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.nv-chip[data-sym] { background: var(--pane-2); color: var(--text-2); }
.nv-chip-empty { font-size: 12px; color: var(--dim); }

/* 左: 快速筛选 */
.nv-frow { display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 8px 10px; border: none; background: transparent; color: var(--text-2); font-size: 13px; cursor: pointer; border-radius: 8px; transition: background .12s; }
.nv-frow:hover { background: var(--hover); color: var(--text); }
.nv-frow.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nv-fcount { font-family: var(--mono); font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; }
.nv-frow.active .nv-fcount { color: var(--accent); }

/* 中: 今日要点 */
.nv-digest-card { padding: 0; overflow: hidden; }
.nv-digest-head { display: flex; align-items: center; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.nv-dh-title { font-family: var(--font-display); font-size: 15px; font-weight: 700; color: var(--text); }
.nv-spacer { flex: 1 1 auto; }
.nv-tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.nv-tab { font-size: 12.5px; padding: 4px 10px; border-radius: 7px; border: 1px solid transparent; background: transparent; color: var(--text-2); cursor: pointer; transition: all .12s; }
.nv-tab:hover { background: var(--hover); color: var(--text); }
.nv-tab.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
#fv-news .news-list { padding: 6px 14px 14px; max-height: none; }

/* 富要点卡 */
.nv-news-card { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 14px 16px; margin-top: 12px; background: var(--pane); transition: border-color .15s, box-shadow .15s; }
.nv-news-card:first-child { margin-top: 6px; }
.nv-news-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.nv-news-card.read { opacity: .68; }
.nv-nc-top { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.nv-topic-tag { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); }
.nv-sent { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.nv-sent.bull { background: var(--up-soft); color: var(--up); }
.nv-sent.bear { background: var(--down-soft); color: var(--down); }
.nv-sent.neutral { background: var(--hold-soft); color: var(--warn); }
/* 舆情情绪极性(媒体语气, 区别于投资倾向 nv-sent) — ⚠铁律: 绝不可用红(--up)/绿(--down)!
   否则"负面"染绿会被读成"跌"、"正面"染红会被读成"涨", 与 A股红涨绿跌语义撞车。
   故用「信息色」: 正面=蓝 / 负面=紫 / 中性=灰; 且标签必带文字"正面/中性/负面"兜底, 不靠颜色单独表意。 */
.nv-emo { font-size: 11.5px; font-weight: 600; padding: 2px 8px; border-radius: 6px; }
.nv-emo.pos { background: rgba(47, 111, 237, .12); color: #2F6FED; }   /* 正面 = 信息蓝 */
.nv-emo.neg { background: rgba(139, 92, 246, .14); color: #8B5CF6; }   /* 负面 = 紫 */
.nv-emo.neu { background: var(--pane-2); color: var(--text-2); }       /* 中性 = 中性灰 */
.nv-src { font-size: 11.5px; color: var(--dim); font-family: var(--mono); }
.nv-unread { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.nv-nc-title { font-size: 15px; font-weight: 700; color: var(--text); line-height: 1.45; margin-bottom: 6px; letter-spacing: -.2px; }
.nv-nc-sum { font-size: 13.5px; color: var(--text-2); line-height: 1.62; margin-bottom: 9px; }
.nv-nc-row { display: flex; align-items: baseline; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.nv-nc-lbl { font-size: 11.5px; color: var(--dim); flex-shrink: 0; }
.nv-nc-tags { display: inline-flex; flex-wrap: wrap; gap: 5px; }
.nv-tagb { font-size: 11.5px; padding: 2px 8px; border-radius: 6px; background: var(--pane-2); color: var(--text-2); border: 1px solid var(--border); }
.nv-tags { font-size: 11.5px; padding: 2px 8px; border-radius: 6px; background: var(--up-soft); color: var(--up); cursor: pointer; transition: background .12s; }
.nv-tags:hover { background: var(--up); color: #fff; }
.nv-nc-detail { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.nv-nc-detail.hidden { display: none; }
.nv-nc-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.nv-cbtn { font-size: 12.5px; padding: 5px 12px; border-radius: 7px; border: 1px solid var(--border-strong); background: var(--pane-2); color: var(--text-2); cursor: pointer; transition: all .12s; }
.nv-cbtn:hover { background: var(--hover); color: var(--text); }
.nv-cbtn-pick { border-color: var(--accent); color: var(--accent); }
.nv-cbtn-pick.on { background: var(--accent); color: #fff; border-color: var(--accent); }

/* 要点卡详情 (展开/来源) */
#fv-news .dg-points { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
#fv-news .dg-points li { font-size: 13px; color: var(--text-2); line-height: 1.55; }
#fv-news .dg-impact { font-size: 11.5px; color: var(--dim); margin-left: 6px; }
#fv-news .dg-rawbox { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }
#fv-news .dg-raw { font-size: 12.5px; color: var(--text-2); text-decoration: none; padding: 2px 0; }
#fv-news .dg-raw:hover { color: var(--accent); }

/* 右: 推送设置 / 系统状态 行 */
.nv-pr { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.nv-pr:last-of-type { border-bottom: none; }
.nv-pr-l { color: var(--text-2); }
.nv-pr-v { font-weight: 600; color: var(--text); font-size: 12.5px; }
.nv-pr-v.on { color: var(--down); }
.nv-pr-v.off { color: var(--dim); font-weight: 500; }
.nv-pr-btns { display: flex; gap: 8px; margin-top: 11px; }
.nv-pr-btns .nv-cbtn { flex: 1; text-align: center; }

/* 右: 观察池 + 系统状态尾注 */
.nv-pool-row { display: flex; align-items: center; justify-content: space-between; padding: 8px 6px; border-radius: 7px; cursor: pointer; transition: background .12s; }
.nv-pool-row:hover { background: var(--hover); }
.nv-pool-nm { font-size: 13px; color: var(--text); font-weight: 500; }
.nv-pool-code { font-size: 11px; color: var(--dim); font-family: var(--mono); }
.nv-empty { font-size: 12.5px; color: var(--dim); padding: 8px 6px; }
.nv-sys-note { font-size: 11px; color: var(--dim); margin-top: 10px; text-align: center; }


/* ============================================================
   资讯页 图17 一比一 — 增量 (彩色图标/内容筛选/排序/图标卡/右栏行/快速操作)
   ============================================================ */
.nv-grid { grid-template-columns: 240px minmax(0, 1fr) 296px; }
@media (max-width: 1040px) { .nv-grid { grid-template-columns: minmax(0, 1fr); } }

/* 5 统计卡: 副标题 + 彩色图标底 */
.nv-stat-n { font-size: 21px; }
.nv-stat-s { font-size: 11px; color: var(--dim); margin-top: 1px; }
.nv-stat-ic.ic-p { background: rgba(124, 92, 255, .14); }
.nv-stat-ic.ic-g { background: rgba(22, 165, 99, .14); }
.nv-stat-ic.ic-o { background: rgba(216, 144, 42, .16); }
.nv-stat-ic.ic-b { background: var(--accent-soft); }
.nv-stat-ic.ic-r { background: rgba(239, 68, 68, .13); }

/* 左: 内容筛选 */
.nv-fgroup { margin-bottom: 14px; }
.nv-fg-h { font-size: 11.5px; color: var(--dim); margin: 4px 2px 6px; font-weight: 600; }
.nv-check { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-2); padding: 5px 2px; cursor: pointer; }
.nv-check input { width: 14px; height: 14px; accent-color: var(--accent); cursor: pointer; }
.nv-edit-btn { width: 100%; margin-top: 6px; padding: 9px; border: 1px solid var(--border-strong); border-radius: var(--radius-sm); background: var(--pane-2); color: var(--text); font-size: 13px; font-weight: 600; cursor: pointer; transition: all .15s var(--ease); }
.nv-edit-btn:hover { background: var(--accent); color: #fff; border-color: var(--accent); }

/* 中: 排序 pills + 计数 + 查看全部 */
.nv-sorts { display: flex; gap: 4px; flex-wrap: wrap; }
.nv-sort { font-size: 12.5px; padding: 4px 11px; border-radius: 999px; border: 1px solid transparent; background: var(--pane-2); color: var(--text-2); cursor: pointer; transition: all .12s; }
.nv-sort:hover { color: var(--text); }
.nv-sort.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nv-count { font-size: 12.5px; color: var(--dim); font-variant-numeric: tabular-nums; }
.nv-more { text-align: center; padding: 12px; color: var(--accent); font-size: 13px; cursor: pointer; border-top: 1px solid var(--border); }
.nv-more:empty { display: none; }
.nv-more:hover { background: var(--hover); }

/* 富要点卡 → 图标 + 正文 flex */
.nv-news-card { display: flex; gap: 12px; align-items: flex-start; }
.nv-nc-ic { width: 40px; height: 40px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 19px; flex-shrink: 0; background: var(--pane-2); }
.nv-nc-ic.ic-p { background: rgba(124, 92, 255, .14); }
.nv-nc-ic.ic-g { background: rgba(22, 165, 99, .14); }
.nv-nc-ic.ic-o { background: rgba(216, 144, 42, .16); }
.nv-nc-ic.ic-b { background: var(--accent-soft); }
.nv-nc-ic.ic-r { background: rgba(239, 68, 68, .13); }
.nv-nc-body { flex: 1; min-width: 0; }
.nv-time { font-size: 11.5px; color: var(--dim); font-family: var(--mono); }
.nv-act { font-size: 12.5px; padding: 4px 10px; border-radius: 7px; border: 1px solid transparent; background: transparent; color: var(--text-2); cursor: pointer; transition: all .12s; }
.nv-act:hover { background: var(--hover); color: var(--text); }
.nv-act.on { color: var(--accent); font-weight: 600; }
.nv-dim { font-size: 12px; color: var(--dim); }

/* 右: 我的订阅 行 */
.nv-sub-row { display: flex; align-items: flex-start; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--border); }
.nv-sub-row:last-child { border-bottom: none; }
.nv-sub-ic { width: 30px; height: 30px; border-radius: 8px; background: var(--pane-2); display: flex; align-items: center; justify-content: center; font-size: 15px; flex-shrink: 0; }
.nv-sub-main { flex: 1; min-width: 0; }
.nv-sub-l { font-size: 13px; color: var(--text); font-weight: 500; display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.nv-sub-c { font-size: 12px; color: var(--accent); font-weight: 600; white-space: nowrap; }
.nv-sub-d { font-size: 11.5px; color: var(--dim); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 推送方式 chip + 系统状态 ✓ */
.nv-chip-mini { font-size: 11.5px; padding: 1px 8px; border-radius: 6px; background: var(--accent-soft); color: var(--accent); font-weight: 500; }
.nv-ok { color: var(--down); font-weight: 700; }

/* 右: 快速操作 2×2 */
.nv-quick-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.nv-quick { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 12px 6px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--pane-2); color: var(--text-2); font-size: 12px; cursor: pointer; transition: all .15s var(--ease); }
.nv-quick:hover { background: var(--accent-soft); color: var(--accent); border-color: var(--accent); }
.nv-quick-ic { font-size: 18px; }
.nv-quick:disabled { opacity: .5; }

/* 今日要点 分页器 (替代"查看全部") */
.nv-more { cursor: default; padding: 10px 12px; }
.nv-more:hover { background: transparent; }
.nv-pager { display: flex; align-items: center; justify-content: center; gap: 5px; flex-wrap: wrap; }
.nv-pg-btn, .nv-pg-num { font-size: 12.5px; min-width: 30px; height: 30px; padding: 0 10px; border: 1px solid var(--border); border-radius: 7px; background: var(--pane); color: var(--text-2); cursor: pointer; transition: all .12s; font-variant-numeric: tabular-nums; }
.nv-pg-btn:not([disabled]):hover, .nv-pg-num:hover { border-color: var(--accent); color: var(--accent); }
.nv-pg-num.active { background: var(--accent); color: #fff; border-color: var(--accent); font-weight: 600; }
.nv-pg-btn[disabled] { opacity: .4; cursor: default; }
.nv-pg-ell { color: var(--dim); padding: 0 2px; }
.nv-pg-info { font-size: 11.5px; color: var(--dim); margin-left: 8px; }


/* ════════════════════════════════════════════════════════════════════════
   ★★★ 亮色 = Perplexity Finance 风: 暖色页底 + 纯白卡片框 (2026-06-10)
   原则: 凡"框/卡片/面板/内嵌块/输入框"在亮色下原本是暖色填充
   (var(--pane-2)/var(--bg)/var(--bg-deep)/var(--hover)/暖 hex) 的, 一律拨成纯白
   var(--pane)=#fff; 框与框靠 暖页底 + 极淡描边(var(--border)) + 微阴影 分隔。
   只动亮色, 全部 body.pro.light 作用域, 绝不影响暗色; A股红涨绿跌色一概不动。
   副作用修正: 选中/激活/hover 高亮 与 聊天气泡 改 中性灰微底, 在白框上仍清晰。
   放文件末尾 = 同特异度下后者胜, 保证盖过前面所有重构层/功能页规则。
   ════════════════════════════════════════════════════════════════════════ */

/* ── Col 1: 自选 / 对话 / 报告 列表栏 ── */
/* 顶部 上证/深证/创业板 指数卡: 白底无边框 (跟白列融成一片, 用户要求去框) */
body.pro.light .wlx { background: var(--pane); border: none; }
/* 搜索框 (原 var(--pane-2)) → 白底 + 保留描边 */
body.pro.light .sw-search input { background: var(--pane); }
/* 对话/报告 列表项 选中态: 原 var(--pane-2), 白框上看不见 → 中性灰微底 */
body.pro.light .sw-item.active { background: rgba(26, 24, 21, .06); }
/* 自选行选中态: 用 accent 弱底已够, 这里只统一成中性灰避免和白卡糊在一起 */
body.pro.light .watchlist-list .sw-item.active { background: rgba(26, 24, 21, .06); }

/* ── Col 2: 行情主区 ── */
/* 股票头部标签 chip (原 var(--pane-2)) → 白 + 描边 */
body.pro.light .sh-tag { background: var(--pane); }
/* 图表工具条: 周期 pill 组容器(原 var(--pane-2)) → 白; 选中 pill 已是白+投影, 保持 */
body.pro.light .tf-group { background: var(--pane); border: 1px solid var(--border); }
body.pro.light .ct-btn:hover { background: rgba(26, 24, 21, .06); }
/* 指标网格各格 .m-cell 本就透明(随 stock-header 白底) — 无需改, 仅确保头部白(重构层已白) */
/* AI 预测结果小 pill (中性态) → 白 + 描边 (涨/跌彩色 pill 不动) */
body.pro.light .fc-pill { background: var(--pane); }
/* 一键画线弹层里的卡片 (原 var(--pane-2)) → 白 */
body.pro.light .dk-card { background: var(--pane); }
/* 一键画线 / 群体推演 工具按钮 (原 var(--pane-2)) → 白 + 描边 */
body.pro.light .fc-drawkit-btn,
body.pro.light .fc-ai-btn { background: var(--pane); }
/* tab 内容表: 表头(原 var(--pane-2)/var(--pane)) → 极淡中性, 白行更清晰; 评级/资料 tag → 白 */
body.pro.light .tab-table th { background: rgba(26, 24, 21, .04); }
body.pro.light .rating-pill,
body.pro.light .info-tag,
body.pro.light .lhb-chip:not(.active) { background: var(--pane); }
/* 龙虎榜理由块 + 两融历史 svg 底 (原 var(--pane-2)) → 白 */
body.pro.light .lhb-reason,
body.pro.light .mh-svg { background: var(--pane); }
/* 全市场选股结果表内 排名徽章/占比条底 (原 var(--pane-2)) → 极淡中性 */
body.pro.light .scr-rankb { background: rgba(26, 24, 21, .06); }
body.pro.light .scr-comp .scr-bar { background: rgba(26, 24, 21, .07); }

/* ── Col 3: AI 投研助手栏 ── */
/* AI 各分块卡 .ai-sec 重构层已白; 这里统一描边即可(保险, 不改背景) */
/* 聊天气泡: 用户气泡/推理折叠/工具调用/底盘 agent 卡/性能卡 (原 var(--pane-2)) →
   它们是"浮在白栏上的框", 纯白会消失 → 中性灰微底, 既干净又可辨 */
body.pro.light .ai-msg.user,
body.pro.light .ai-msg.reasoning,
body.pro.light .ai-msg.tool,
body.pro.light .ai-msg.perf-report { background: rgba(26, 24, 21, .045); }
/* 工具步骤卡保持透明(仅细描边), decision 步骤给极淡暖底以作区分 */
body.pro.light .ai-msg.agent-step.decision { background: var(--pane-2); }
/* markdown 内的 表头/行内码/代码块 (原 var(--pane-2)) → 中性灰微底 */
body.pro.light .ai-msg.assistant .content.markdown th,
body.pro.light .rp-md.markdown th,
body.pro.light .ai-msg.assistant .content.markdown code,
body.pro.light .rp-md.markdown code,
body.pro.light .ai-msg.assistant .content.markdown pre,
body.pro.light .rp-md.markdown pre { background: rgba(26, 24, 21, .05); }
/* 性能卡内嵌的 pre (原 var(--bg)) → 中性灰微底 */
body.pro.light .ai-msg.perf-report .perf-pre { background: rgba(26, 24, 21, .05); }
/* 情绪驱动因子 chip (原 var(--pane-2)) → 白 + 描边 */
body.pro.light .senti-dr { background: var(--pane); }
/* 输入框胶囊: 整条输入框 / 模型芯片 / model-tag / 高级按钮 (原 var(--pane-2)) → 白 */
body.pro.light .ai-input-row,
body.pro.light .model-chip,
body.pro.light .model-tag,
body.pro.light .premium-btn { background: var(--pane); }
/* 猜你想问 chip (原 var(--pane-2)) → 白 + 描边 */
body.pro.light .sg-chip { background: var(--pane); }
/* 模型下拉菜单内 选中项 (原 rgba 深底) → 中性灰微底 */
body.pro.light .model-menu-item.selected { background: rgba(26, 24, 21, .06); }
/* 多周期 仓位计算器输入 (原 var(--bg)) → 白; 结果块(原 var(--hover)) → 白 + 描边 */
body.pro.light .mtf-calc input { background: var(--pane); }
body.pro.light .mtf-out { background: var(--pane); border: 1px solid var(--border); }

/* ── 回测 · 量化选股 整页 (#fv-screen) ── */
/* 顶部工具条 select / 运行·导出·选股·最优 次级按钮 (原 var(--pane-2)) → 白 */
body.pro.light .bt-ctl select,
body.pro.light .bt-pdf,
body.pro.light .bt-screen,
body.pro.light .bt-best,
body.pro.light .scr-bt,
body.pro.light .scr-param select { background: var(--pane); }
/* KPI 卡 / 最优策略卡 / regime 块 / 选股票卡 / 截面 KPI 卡 (原 var(--pane-2)) → 白 */
body.pro.light .bt-kpi,
body.pro.light .bt-best-card,
body.pro.light .bt-regime,
body.pro.light .scr-pick,
body.pro.light .scr-bt-kpi { background: var(--pane); }
/* 回测 年度热力表 表头/年份/合计/空格 (原 var(--pane-2)) → 极淡中性, 数据格不动 */
body.pro.light .bt-heat .bt-na,
body.pro.light .bt-heat thead th,
body.pro.light .bt-heat .bt-yr,
body.pro.light .bt-heat .bt-yt,
body.pro.light .bt-tl th { background: rgba(26, 24, 21, .04); }
/* 选股结果表 sticky 表头 (原 var(--bg)) → 白 */
body.pro.light .scr-table th { background: var(--pane); }

/* ── 资讯订阅 整页 (#fv-news) ── */
/* 顶部 生成/推送 次级按钮 (原 var(--pane-2)) → 白 */
body.pro.light #fv-news .nv-btn { background: var(--pane); }
/* 富要点卡 图标底 / 订阅图标底 / 自选 chip / 排序 pill / 标签 b / 操作按钮 / 编辑按钮 / 快速操作格
   (原 var(--pane-2)) → 白 (彩色 ic-p/ic-g/... 图标底有各自规则更靠后, 不受影响) */
body.pro.light .nv-chip[data-sym],
body.pro.light .nv-sort,
body.pro.light .nv-tagb,
body.pro.light .nv-cbtn,
body.pro.light .nv-edit-btn,
body.pro.light .nv-nc-ic,
body.pro.light .nv-sub-ic,
body.pro.light .nv-quick { background: var(--pane); }

/* ── 弹窗 / 模态 / 杂项框 ── */
/* 充值弹窗: 金额格/支付方式/兑换输入/对公框/tab选中 (原 var(--bg)/var(--hover)) → 白 */
body.pro.light .rc-amt,
body.pro.light .rc-method,
body.pro.light .rc-custom-input,
body.pro.light .rc-redeem-input,
body.pro.light .rc-bank-box,
body.pro.light .rc-tab.active,
body.pro.light .rc-tabs { background: var(--pane); }
body.pro.light .rc-tabs { border: 1px solid var(--border); }
/* 修复: 亮色主题把 .rc-amt 背景统一刷白(var--pane), 但 .rc-amt.active 仍 color:#fff → 选中金额白底白字看不见. 恢复选中态 蓝底白字 */
body.pro.light .rc-amt.active { background: var(--accent, #5b8def); border-color: var(--accent, #5b8def); color: #fff; }
/* 通用模态: 头部条/搜索框/列表项 (原 var(--pane-2)) → 白; 列表项选中靠 hover, 保持 */
body.pro.light .pm-head,
body.pro.light .pm-search,
body.pro.light .pm-item { background: var(--pane); }
/* 报告/订阅 子卡片 与 chips (原 var(--pane-2)/var(--hover)) → 白 + 描边 */
body.pro.light .digest-card,
body.pro.light .sub-chip,
body.pro.light .sub-kw,
body.pro.light .evo-item { background: var(--pane); }
/* 多窗选股弹窗 容器/搜索框/取消键 (原 var(--pane-2)/var(--bg)/var(--hover)) → 白 */
body.pro.light .mw-picker,
body.pro.light .mwp-search,
body.pro.light .mwp-cancel { background: var(--pane); }
/* 图表格右上 单元菜单 (原 var(--pane-2)) → 白 */
body.pro.light .pg-cellmenu { background: var(--pane); }
/* 左 rail 底部 余额胶囊/头像 (原 var(--pane-2)) → 白 + 描边 */
body.pro.light .rail-bal,
body.pro.light .rail-avatar { background: var(--pane); }
/* 头像账号菜单 余额行 (原 var(--pane-2)) → 中性灰微底, 与白菜单分层 */
body.pro.light .um-balance { background: rgba(26, 24, 21, .05); }
/* 资讯页顶部统计卡(整页 fvs, 原 var(--hover)) → 白 + 描边 */
body.pro.light .fvs { background: var(--pane); }

/* ── 亮色主按钮收尾: 去暗色渐变+辉光黑块, 改 Perplexity 干净风 ── */
/* 新建对话: 轮廓白按钮(白底+描边+深字, 像 Perplexity 侧栏的 +新建), 不再是发光黑块 */
body.pro.light .new-chat-btn {
  background: var(--pane);
  color: var(--text);
  border: 1px solid var(--border-strong);
  box-shadow: none;
}
body.pro.light .new-chat-btn:hover {
  background: var(--hover); color: var(--text);
  filter: none; transform: none;
  box-shadow: var(--shadow-sm);
}
body.pro.light .new-chat-btn kbd { background: var(--accent-soft); color: var(--text-2); }
body.pro.light .new-chat-btn svg { stroke: var(--text); }
/* 其余主按钮(回测运行/选股/发送/充值等): 纯色近黑·去渐变去辉光, 干净利落 */
body.pro.light .bt-run, body.pro.light .scr-go, body.pro.light #sw-go,
body.pro.light .rc-pay-btn, body.pro.light .rc-redeem-btn,
body.pro.light .login-actions button:not(.secondary), body.pro.light .pm-btn-primary,
body.pro.light .sw-regen-bar button, body.pro.light .ai-send {
  background: var(--accent);
  box-shadow: none;
}
body.pro.light .bt-run:hover, body.pro.light .scr-go:hover, body.pro.light #sw-go:hover,
body.pro.light .rc-pay-btn:hover, body.pro.light .rc-redeem-btn:hover,
body.pro.light .login-actions button:not(.secondary):hover, body.pro.light .pm-btn-primary:hover {
  filter: brightness(1.08); transform: none;
  box-shadow: var(--shadow-sm);
}
/* 修"白底白字": 生成今日要点(#nv-gen .nv-btn-primary) 被白框遍历刷白了底但字仍 #fff → 恢复深色主按钮(可见·主次分明) */
body.pro.light #fv-news .nv-btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
body.pro.light #fv-news .nv-btn-primary:hover { background: var(--accent-2); }


/* ════════════════════════════════════════════════════════════════════════
   响应式自适应 (pro 功能页内部网格) — 行情主区被左右栏夹窄, 或功能页(回测/
   选股/推演)在窄屏铺开时, 把写死列数的 KPI 网格 / 双栏舞台降级, 防溢出/挤压。
   A股红涨绿跌色不变, 仅改布局尺寸。
   ════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1400px) {
  .scr-bt-kpis { grid-template-columns: repeat(3, 1fr); }   /* 6 → 3 */
  .bt-grid     { grid-template-columns: repeat(2, 1fr); }   /* 4 → 2 */
}
@media (max-width: 1100px) {
  /* 推演/模拟舞台: 右侧 440px 定栏在窄屏改为上下堆叠, 让舞台拿到整宽 */
  .sw-body { grid-template-columns: 1fr; grid-auto-rows: minmax(0, 1fr); }
  .evo-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .scr-bt-kpis { grid-template-columns: repeat(2, 1fr); }
  .bt-grid     { grid-template-columns: 1fr; }
  .evo-grid    { grid-template-columns: 1fr; }
}
/* 超宽屏 (>2400) — 行情主区内容给上限并居中, 防图表/表格/资讯被拉得过宽、信息稀疏。
   只约束内容块(.ca-pane 行情各 tab / .fv-pane 功能页内容), 不动栅格列与图表自身高度。 */
@media (min-width: 2400px) {
  /* K线 pane 不限宽(图表填满更佳); 其余信息型 tab 与功能页内容居中限宽 */
  .chart-area .ca-pane:not([data-pane="kline"]),
  .feature-view .fv-pane { max-width: 1840px; margin-inline: auto; }
}

/* ============================================================
   我的订单 (重设计 2026-06-29) — 统计卡 + 流水行 + 状态徽章
   A股红涨绿跌: 入账/充值(credit)=红 --up, 消费(debit)=绿 --down
   ============================================================ */
.od-sum {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1px;
  background: var(--border); border: 1px solid var(--border);
  border-radius: 12px; overflow: hidden; margin-bottom: 14px;
}
.od-stat {
  background: var(--pane-2); padding: 13px 8px;
  display: flex; flex-direction: column; gap: 5px; align-items: center; text-align: center;
}
.od-stat-k { font-size: 12px; color: var(--dim); }
.od-stat-v {
  font-size: 16.5px; font-weight: 700; color: var(--text);
  letter-spacing: -.2px; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.od-stat-bal { background: var(--accent-soft); }
.od-stat-bal .od-stat-v { color: var(--accent); }

.od-list { display: flex; flex-direction: column; gap: 6px; max-height: 56vh; overflow-y: auto; padding: 1px; }
.od-item {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 12px; background: var(--pane-2);
  border: 1px solid transparent; border-radius: 12px;
  transition: background .12s, border-color .12s;
}
.od-item:hover { background: var(--hover); border-color: var(--border); }
.od-ic {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 11px;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
}
.od-ic.od-credit { background: var(--up-soft); }
.od-ic.od-debit  { background: var(--down-soft); }
.od-main { flex: 1; min-width: 0; }
.od-title {
  font-size: 14px; font-weight: 600; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.od-meta {
  font-size: 12px; color: var(--dim); margin-top: 3px;
  display: flex; align-items: center; gap: 6px;
  white-space: nowrap; overflow: hidden;
}
.od-badge { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 6px; line-height: 1.55; }
.od-badge-done    { color: var(--text-2); background: var(--hover); }
.od-badge-pending { color: #b8860b; background: rgba(234,179,8,.15); }
.od-badge-closed  { color: var(--dim); background: var(--hover); }
.od-amt {
  font-size: 15.5px; font-weight: 700; flex-shrink: 0;
  letter-spacing: -.2px; font-variant-numeric: tabular-nums;
}
.od-amt.od-credit, .od-stat-v.od-credit { color: var(--up); }
.od-amt.od-debit,  .od-stat-v.od-debit  { color: var(--down); }
.od-note { font-size: 11.5px; color: var(--dim); text-align: center; margin-top: 12px; }
.od-empty { text-align: center; padding: 42px 16px; color: var(--text-2); font-size: 14px; }
.od-empty-ic { font-size: 34px; margin-bottom: 10px; opacity: .65; }
.od-empty-sub { font-size: 12.5px; color: var(--dim); margin-top: 6px; }

