/* ============================================================
   TradeGPT — 主样式表
   设计语言：深色金融终端 + 克制专业 + 高信息密度
   与现有投研工作台视觉体系保持一致
   ============================================================ */

/* ---------- 设计令牌 (Design Tokens) ---------- */
:root {
  /* 背景层级 */
  --bg-base: #060d1a;
  --bg-primary: #0b1220;
  --bg-elevated: #111827;
  --bg-panel: #162033;
  --bg-hover: #1c273d;
  --bg-inset: #0a101d;

  /* 边框 */
  --border: #263449;
  --border-light: #334155;
  --border-subtle: #1a2434;

  /* 文字 */
  --text-primary: #f1f5f9;
  --text-secondary: #a8b3c7;
  --text-muted: #64748b;
  --text-dim: #475569;

  /* 语义色 —— 中国市场习惯：涨红跌绿 */
  --up: #ef4444;
  --up-soft: rgba(239, 68, 68, 0.14);
  --down: #22c55e;
  --down-soft: rgba(34, 197, 94, 0.14);
  --flat: #94a3b8;

  /* 品牌/功能色 */
  --brand: #3b82f6;
  --brand-soft: rgba(59, 130, 246, 0.13);
  --brand-glow: rgba(59, 130, 246, 0.35);
  --gold: #d4a72c;
  --gold-soft: rgba(212, 167, 44, 0.13);
  --cyan: #22d3ee;
  --cyan-soft: rgba(34, 211, 238, 0.13);
  --purple: #a78bfa;
  --purple-soft: rgba(167, 139, 250, 0.13);
  --warn: #f59e0b;
  --warn-soft: rgba(245, 158, 11, 0.13);
  --danger: #ef4444;
  --danger-soft: rgba(239, 68, 68, 0.13);
  --success: #22c55e;

  /* AI 专属 —— 用于标识 AI 生成/智能能力 */
  --ai-from: #60a5fa;
  --ai-to: #a78bfa;
  --ai-soft: rgba(96, 165, 250, 0.1);

  /* 圆角 */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 18px;
  --r-pill: 999px;

  /* 阴影 */
  --sh-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 4px 12px rgba(0, 0, 0, 0.22);
  --sh-pop: 0 8px 28px rgba(0, 0, 0, 0.45);
  --sh-glow: 0 0 0 1px var(--brand-soft), 0 4px 20px rgba(59, 130, 246, 0.16);

  /* 尺寸 */
  --nav-h: 66px;
  --side-w: 268px;
  --aside-w: 336px;

  /* 字体 */
  --font-sans: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB",
    -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", "Roboto Mono", Consolas,
    "Courier New", monospace;

  /* 动效 */
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --dur: 0.26s;
}

/* ---------- 基础重置 ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-base);
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow: hidden;
}

/* 主背景纹理 —— 微妙径向光晕，增强质感 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1100px 620px at 12% -8%, rgba(59, 130, 246, 0.09), transparent 62%),
    radial-gradient(900px 520px at 92% 4%, rgba(167, 139, 250, 0.07), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

button,
input,
select,
textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  outline: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
}

/* 滚动条 */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--border-light);
  border-radius: var(--r-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: #45566e;
}

/* 数字统一用等宽字体 */
.num,
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* ============================================================
   APP 骨架
   ============================================================ */
.app {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* ============ 顶部导航 ============ */
.navbar {
  height: var(--nav-h);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  background: rgba(11, 18, 32, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  z-index: 40;
}

/* 品牌 */
.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  user-select: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--brand), #7c3aed);
  box-shadow: 0 3px 12px rgba(59, 130, 246, 0.4);
  flex-shrink: 0;
}
.brand-mark svg {
  width: 20px;
  height: 20px;
  display: block;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}
.brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.015em;
  background: linear-gradient(92deg, #fff, #b9d4ff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
/* XupanGPT 下方的平台副标题 */
.brand-tagline {
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0.09em;
  color: #8fb0ff;
  font-family: var(--font-mono);
  white-space: nowrap;
  margin-top: 1px;
}
.brand-sub {
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
}

/* 模块导航 Tab（紧凑间距，保证 6 项不被右侧登录区遮挡） */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
  padding: 0 2px;
  flex: 1;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 16px), transparent 100%);
  mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 16px), transparent 100%);
}
.nav-tabs::-webkit-scrollbar {
  display: none;
}

.nav-tab {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 11px;
  border-radius: var(--r-md);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  transition: all var(--dur) var(--ease);
  position: relative;
  flex-shrink: 0;
}
.nav-tab svg {
  width: 15px;
  height: 15px;
  opacity: 0.75;
  transition: opacity var(--dur);
}
.nav-tab:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
}
.nav-tab:hover svg {
  opacity: 1;
}
.nav-tab.active {
  background: linear-gradient(
    180deg,
    rgba(59, 130, 246, 0.2),
    rgba(59, 130, 246, 0.08)
  );
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.35);
}
.nav-tab.active svg {
  opacity: 1;
  color: #93c5fd;
}
.nav-tab.active::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -1px;
  transform: translateX(-50%);
  width: 22px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
  box-shadow: 0 0 8px var(--brand-glow);
}

/* 导航右侧工具 */
.nav-tools {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

/* 搜索框 */
.search-box {
  position: relative;
  width: 210px;
}
.search-box svg.search-ico {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  pointer-events: none;
}
.search-box input {
  width: 100%;
  height: 34px;
  padding: 0 12px 0 31px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-size: 13px;
  transition: all var(--dur) var(--ease);
}
.search-box input::placeholder {
  color: var(--text-dim);
}
.search-box input:focus {
  border-color: var(--brand);
  background: var(--bg-primary);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

/* 搜索下拉建议 */
.search-sugg {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  box-shadow: var(--sh-pop);
  overflow: hidden;
  z-index: 60;
  display: none;
  max-height: 320px;
  overflow-y: auto;
}
.search-sugg.show {
  display: block;
}
.search-sugg-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  cursor: pointer;
  transition: background 0.15s;
}
.search-sugg-item:hover {
  background: var(--bg-hover);
}
.search-sugg-item .ss-left {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.search-sugg-item .ss-name {
  font-size: 13px;
  font-weight: 500;
}
.search-sugg-item .ss-code {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* 右上角登录 / 注册按钮 */
.login-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 12px;
  margin-right: 2px;
  border-radius: var(--r-md);
  border: 1px solid rgba(212, 167, 44, 0.45);
  background: linear-gradient(180deg, rgba(212, 167, 44, 0.18), rgba(212, 167, 44, 0.06));
  color: var(--gold);
  font-size: 12.5px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  flex-shrink: 0;
  transition: all var(--dur) var(--ease);
}
.login-btn svg {
  width: 15px;
  height: 15px;
}
.login-btn:hover {
  background: linear-gradient(180deg, rgba(212, 167, 44, 0.3), rgba(212, 167, 44, 0.12));
  box-shadow: 0 0 14px rgba(212, 167, 44, 0.22);
}
.login-btn.on {
  border-color: rgba(59, 130, 246, 0.5);
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.22), rgba(59, 130, 246, 0.08));
  color: #dbeafe;
}
.login-btn .lg-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.9);
}
/* 演示模式：免登录态 */
.login-btn.demo {
  border-color: rgba(34, 197, 94, 0.5);
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.07));
  color: #86efac;
}
.login-btn.demo:hover {
  background: linear-gradient(180deg, rgba(34, 197, 94, 0.32), rgba(34, 197, 94, 0.14));
  box-shadow: 0 0 14px rgba(34, 197, 94, 0.24);
}
.login-btn .lg-dot.demo {
  background: #4ade80;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.9);
}
@media (max-width: 720px) {
  .login-btn {
    padding: 0 10px;
    font-size: 0;
    gap: 0;
    width: 34px;
    justify-content: center;
  }
  .login-btn svg { width: 16px; height: 16px; }
  .login-btn .lg-dot { display: none; }
}

/* 图标按钮 */
.icon-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  background: var(--bg-inset);
  border: 1px solid var(--border);
  transition: all var(--dur) var(--ease);
  flex-shrink: 0;
}
.icon-btn svg {
  width: 16px;
  height: 16px;
}
.icon-btn:hover {
  color: var(--text-primary);
  background: var(--bg-hover);
  border-color: var(--border-light);
}
.icon-btn.active {
  color: #93c5fd;
  background: var(--brand-soft);
  border-color: rgba(59, 130, 246, 0.4);
}

/* 头像 */
.avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #a855f7);
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  border: 2px solid var(--bg-elevated);
  cursor: pointer;
}

/* ============ 主布局 ============ */
.layout {
  flex: 1;
  display: flex;
  min-height: 0;
  overflow: hidden;
}

/* ---------- 左侧栏 ---------- */
.sidebar {
  width: var(--side-w);
  flex-shrink: 0;
  background: var(--bg-primary);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  transition: margin-left var(--dur) var(--ease);
}
.sidebar.collapsed {
  margin-left: calc(var(--side-w) * -1);
}

/* 当前标的卡 */
.subject-card {
  margin: 14px;
  padding: 14px;
  background: linear-gradient(
    160deg,
    var(--bg-panel),
    rgba(22, 32, 51, 0.55)
  );
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-card);
}
.subject-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.subject-name {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.25;
}
.subject-code {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 2px;
}
.subject-price {
  font-size: 24px;
  font-weight: 700;
  font-family: var(--font-mono);
  line-height: 1.1;
  margin-bottom: 4px;
}
.subject-chg {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-family: var(--font-mono);
}

/* 标的迷你指标网格 */
.subject-metrics {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  margin-top: 12px;
  background: var(--border-subtle);
  border-radius: var(--r-sm);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}
.subject-metric {
  background: var(--bg-inset);
  padding: 7px 9px;
}
.subject-metric .sm-label {
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.03em;
}
.subject-metric .sm-value {
  font-size: 12.5px;
  font-weight: 600;
  font-family: var(--font-mono);
  margin-top: 1px;
}

/* 侧栏区块 */
.side-block {
  padding: 0 14px 16px;
}
.side-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 9px;
}
.side-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.side-action {
  font-size: 11px;
  color: var(--brand);
  transition: opacity 0.18s;
}
.side-action:hover {
  opacity: 0.78;
}

/* 自选列表 */
.watch-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background 0.16s;
  border: 1px solid transparent;
}
.watch-item:hover {
  background: var(--bg-hover);
}
.watch-item.active {
  background: var(--brand-soft);
  border-color: rgba(59, 130, 246, 0.28);
}
/* 自选项前的星标：已加入为金色实心，点击移除 */
.watch-item .wi-star {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border: none;
  background: transparent;
  border-radius: var(--r-sm);
  color: var(--text-dim);
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.16s;
}
.watch-item .wi-star svg { width: 13px; height: 13px; }
.watch-item .wi-star:hover { background: var(--bg-inset); }
.watch-item .wi-star.on { color: var(--gold); }
.watch-item .wi-star.on:hover { background: rgba(212, 167, 44, 0.14); }
.watch-item .wi-left {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.watch-item .wi-name {
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.watch-item .wi-code {
  font-size: 10px;
  color: var(--text-dim);
  font-family: var(--font-mono);
}
.watch-item .wi-right {
  text-align: right;
  flex-shrink: 0;
}
.watch-item .wi-price {
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 600;
}
.watch-item .wi-pct {
  font-size: 11px;
  font-family: var(--font-mono);
}

/* 空状态 */
.empty-hint {
  padding: 16px 12px;
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  background: var(--bg-inset);
  border: 1px dashed var(--border);
  border-radius: var(--r-md);
  line-height: 1.7;
}

/* ---------- 主内容区 ---------- */
.main {
  flex: 1;
  min-width: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 18px 20px 40px;
  scroll-behavior: smooth;
}

/* 模块页头 */
.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}
.page-title-wrap {
  display: flex;
  align-items: center;
  gap: 11px;
}
.page-icon {
  width: 38px;
  height: 38px;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  flex-shrink: 0;
}
.page-icon svg {
  width: 19px;
  height: 19px;
}
.page-title {
  font-size: 19px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}
.page-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 3px 0 0;
  max-width: 620px;
  line-height: 1.55;
}
.page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* 卡片网格 */
.grid {
  display: grid;
  gap: 14px;
}
.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.grid-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

/* 卡片 */
.card {
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-card);
  overflow: hidden;
  transition: border-color var(--dur) var(--ease),
    box-shadow var(--dur) var(--ease);
}
.card:hover {
  border-color: var(--border-light);
}
.card.accent-brand {
  border-top: 2px solid var(--brand);
}
.card.accent-gold {
  border-top: 2px solid var(--gold);
}
.card.accent-cyan {
  border-top: 2px solid var(--cyan);
}
.card.accent-purple {
  border-top: 2px solid var(--purple);
}
.card.accent-warn {
  border-top: 2px solid var(--warn);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}
.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  font-weight: 600;
  min-width: 0;
}
.card-title svg {
  width: 15px;
  height: 15px;
  color: var(--brand);
  flex-shrink: 0;
}
.card-sub {
  font-size: 11.5px;
  color: var(--text-dim);
  font-weight: 400;
}
.card-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.card-body {
  padding: 15px 16px;
}
.card-body.tight {
  padding: 12px;
}
.card-body.flush {
  padding: 0;
}

/* ============================================================
   通用组件
   ============================================================ */

/* 徽章 */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: var(--r-pill);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.7;
  white-space: nowrap;
}
.badge-up {
  background: var(--up-soft);
  color: #fca5a5;
}
.badge-down {
  background: var(--down-soft);
  color: #86efac;
}
.badge-flat {
  background: rgba(148, 163, 184, 0.13);
  color: var(--flat);
}
.badge-brand {
  background: var(--brand-soft);
  color: #93c5fd;
}
.badge-gold {
  background: var(--gold-soft);
  color: #fcd34d;
}
.badge-cyan {
  background: var(--cyan-soft);
  color: #67e8f9;
}
.badge-purple {
  background: var(--purple-soft);
  color: #c4b5fd;
}
.badge-warn {
  background: var(--warn-soft);
  color: #fcd34d;
}
.badge-danger {
  background: var(--danger-soft);
  color: #fca5a5;
}
.badge-dot::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* AI 徽章 —— 渐变 */
.badge-ai {
  background: linear-gradient(92deg, var(--ai-soft), var(--purple-soft));
  color: #c4b5fd;
  box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.26);
}
.badge-ai svg {
  width: 11px;
  height: 11px;
}

/* 按钮 */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 32px;
  padding: 0 13px;
  border-radius: var(--r-md);
  font-size: 12.5px;
  font-weight: 500;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all var(--dur) var(--ease);
  white-space: nowrap;
}
.btn svg {
  width: 14px;
  height: 14px;
}
.btn:hover {
  background: var(--bg-hover);
  color: var(--text-primary);
  border-color: var(--border-light);
}
.btn:active {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}
.btn-primary {
  background: linear-gradient(180deg, #3b82f6, #2563eb);
  border-color: #3b82f6;
  color: #fff;
  box-shadow: 0 2px 10px rgba(37, 99, 235, 0.32);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #4f8ff7, #3b82f6);
  color: #fff;
  box-shadow: 0 3px 14px rgba(37, 99, 235, 0.42);
}
.btn-sm {
  height: 27px;
  padding: 0 10px;
  font-size: 11.5px;
}
.btn-xs {
  height: 24px;
  padding: 0 8px;
  font-size: 11px;
  border-radius: var(--r-sm);
}
.btn-ghost {
  background: transparent;
  border-color: transparent;
}
.btn-ghost:hover {
  background: var(--bg-hover);
  border-color: var(--border);
}
.btn-ai {
  background: linear-gradient(92deg, rgba(59, 130, 246, 0.2), rgba(167, 139, 250, 0.2));
  border-color: rgba(139, 139, 250, 0.35);
  color: #c4b5fd;
}
.btn-ai:hover {
  background: linear-gradient(92deg, rgba(59, 130, 246, 0.32), rgba(167, 139, 250, 0.32));
  color: #ddd6fe;
}

/* 分段控制 */
.segmented {
  display: inline-flex;
  padding: 2px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  gap: 2px;
}
.segmented button {
  padding: 4px 11px;
  border-radius: var(--r-sm);
  font-size: 12px;
  color: var(--text-muted);
  transition: all 0.18s var(--ease);
  white-space: nowrap;
}
.segmented button:hover {
  color: var(--text-primary);
}
.segmented button.active {
  background: var(--bg-hover);
  color: var(--text-primary);
  box-shadow: inset 0 0 0 1px var(--border-light);
  font-weight: 500;
}

/* 表单控件 */
.field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.field-label {
  font-size: 11.5px;
  color: var(--text-muted);
  font-weight: 500;
}
.input,
.select {
  height: 34px;
  padding: 0 11px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-size: 13px;
  transition: all var(--dur) var(--ease);
  width: 100%;
}
.input:focus,
.select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.5' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 28px;
  cursor: pointer;
}
.textarea {
  min-height: 76px;
  padding: 9px 11px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-size: 13px;
  resize: vertical;
  line-height: 1.6;
  transition: all var(--dur) var(--ease);
  width: 100%;
}
.textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

/* 勾选框 */
.check-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 0;
  cursor: pointer;
  font-size: 12.5px;
  color: var(--text-secondary);
  transition: color 0.16s;
}
.check-row:hover {
  color: var(--text-primary);
}
.check-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--border-light);
  border-radius: 4px;
  background: var(--bg-inset);
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition: all 0.16s;
}
.check-row input[type="checkbox"]:checked {
  background: var(--brand);
  border-color: var(--brand);
}
.check-row input[type="checkbox"]:checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

/* 滑块 */
.slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  border-radius: var(--r-pill);
  background: var(--border);
  cursor: pointer;
}
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--brand);
  border: 2px solid var(--bg-primary);
  box-shadow: 0 0 0 1px var(--brand);
  cursor: pointer;
  transition: transform 0.15s;
}
.slider::-webkit-slider-thumb:hover {
  transform: scale(1.18);
}
.slider::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--brand);
  border: 2px solid var(--bg-primary);
  cursor: pointer;
}

/* 进度条 */
.progress {
  height: 6px;
  background: var(--bg-inset);
  border-radius: var(--r-pill);
  overflow: hidden;
}
.progress-bar {
  height: 100%;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--brand), #60a5fa);
  transition: width 0.7s var(--ease);
}
.progress-bar.up {
  background: linear-gradient(90deg, #dc2626, #f87171);
}
.progress-bar.down {
  background: linear-gradient(90deg, #16a34a, #4ade80);
}
.progress-bar.gold {
  background: linear-gradient(90deg, #a16207, var(--gold));
}
.progress-bar.cyan {
  background: linear-gradient(90deg, #0891b2, var(--cyan));
}
.progress-bar.purple {
  background: linear-gradient(90deg, #7c3aed, var(--purple));
}

/* 统计块 */
.stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.stat-label {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}
.stat-value {
  font-size: 19px;
  font-weight: 700;
  font-family: var(--font-mono);
  line-height: 1.2;
}
.stat-extra {
  font-size: 11px;
  color: var(--text-muted);
  font-family: var(--font-mono);
}

/* 紧凑型统计列表（盯盘页额度：标的 / 信号种类 / 提示条数 / 提醒邮箱） */
.sg-stats .stat { gap: 1px; }
.sg-stats .stat-label { font-size: 10px; letter-spacing: 0.04em; white-space: nowrap; }
.sg-stats .stat-value { font-size: 13px; font-weight: 600; line-height: 1.25; }
.sg-stats .stat-extra { font-size: 9.5px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 数据表 */
.table-wrap {
  overflow-x: auto;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
table.data th {
  text-align: left;
  padding: 9px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  background: var(--bg-inset);
  position: sticky;
  top: 0;
  z-index: 2;
}
table.data td {
  padding: 9px 12px;
  border-bottom: 1px solid var(--border-subtle);
  white-space: nowrap;
  font-family: var(--font-mono);
}
table.data td.txt {
  font-family: var(--font-sans);
}
table.data tbody tr {
  transition: background 0.15s;
}
table.data tbody tr:hover {
  background: var(--bg-hover);
}
table.data tbody tr:last-child td {
  border-bottom: none;
}

/* 颜色工具类 */
.c-up {
  color: var(--up);
}
.c-down {
  color: var(--down);
}
.c-flat {
  color: var(--flat);
}
.c-brand {
  color: #93c5fd;
}
.c-gold {
  color: var(--gold);
}
.c-cyan {
  color: var(--cyan);
}
.c-purple {
  color: var(--purple);
}
.c-warn {
  color: var(--warn);
}
.c-muted {
  color: var(--text-muted);
}
.c-dim {
  color: var(--text-dim);
}

/* 图表容器 */
.chart {
  width: 100%;
}

/* 提示条 */
.alert {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 12px;
  border-radius: var(--r-md);
  font-size: 12px;
  line-height: 1.6;
  border: 1px solid transparent;
}
.alert svg {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  margin-top: 2px;
}
.alert-info {
  background: var(--brand-soft);
  border-color: rgba(59, 130, 246, 0.22);
  color: #bfdbfe;
}
.alert-info svg {
  color: #60a5fa;
}
.alert-warn {
  background: var(--warn-soft);
  border-color: rgba(245, 158, 11, 0.22);
  color: #fde68a;
}
.alert-warn svg {
  color: var(--warn);
}
.alert-danger {
  background: var(--danger-soft);
  border-color: rgba(239, 68, 68, 0.22);
  color: #fecaca;
}
.alert-danger svg {
  color: var(--danger);
}
.alert-ai {
  background: linear-gradient(92deg, var(--ai-soft), rgba(167, 139, 250, 0.07));
  border-color: rgba(139, 139, 250, 0.22);
  color: #ddd6fe;
}
.alert-ai svg {
  color: var(--purple);
}

/* 免责声明条 */
.disclaimer {
  margin-top: 20px;
  padding: 11px 14px;
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  font-size: 11.5px;
  color: var(--text-dim);
  line-height: 1.7;
}

/* ---------- 通用弹窗 ---------- */
.tg-modal-mask {
  position: fixed;
  inset: 0;
  z-index: 2200;
  background: rgba(3, 7, 15, 0.74);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  animation: tgFadeIn .16s ease both;
}
.tg-modal {
  width: 100%;
  max-width: 560px;
  max-height: 86vh;
  overflow: auto;
  background: linear-gradient(180deg, var(--bg-panel), var(--bg-elevated));
  border: 1px solid var(--border-light);
  border-radius: 14px;
  box-shadow: 0 26px 64px rgba(0, 0, 0, .62);
  animation: tgPopIn .18s ease both;
}
.tg-modal.wide { max-width: 760px; }
.tg-modal-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 15px 18px 11px;
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  background: var(--bg-panel);
  z-index: 2;
}
.tg-modal-title { font-size: 15px; font-weight: 800; color: var(--text-primary); letter-spacing: .2px; }
.tg-modal-sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.tg-modal-x {
  margin-left: auto;
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-inset);
  color: var(--text-secondary);
  font-size: 13px;
  cursor: pointer;
  line-height: 1;
}
.tg-modal-x:hover { color: var(--text-primary); background: var(--bg-hover); }
.tg-modal-body { padding: 14px 18px; font-size: 12px; line-height: 1.9; color: var(--text-secondary); }
.tg-modal-foot {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
  padding: 12px 18px 16px;
  border-top: 1px solid var(--border-subtle);
}
@keyframes tgFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes tgPopIn {
  from { opacity: 0; transform: translateY(10px) scale(.98); }
  to { opacity: 1; transform: none; }
}

/* 弹窗内的简介分块 */
.intro-sec { margin-bottom: 12px; }
.intro-sec:last-child { margin-bottom: 0; }
.intro-h {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--gold);
  letter-spacing: .3px;
  margin-bottom: 6px;
  padding-left: 8px;
  border-left: 3px solid var(--gold);
  line-height: 1.4;
}
.intro-p { font-size: 12px; line-height: 1.9; color: var(--text-secondary); }
.intro-ul { margin: 0; padding-left: 18px; font-size: 11.5px; line-height: 1.95; color: var(--text-secondary); }
.intro-ul li { margin-bottom: 2px; }
.intro-ul b { color: var(--text-primary); }

/* 订阅页风险提示 */
.sg-risk-item {
  padding: 9px 11px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-inset);
  margin-bottom: 8px;
  font-size: 11.5px;
  line-height: 1.85;
  color: var(--text-secondary);
}
.sg-risk-item b { color: var(--text-primary); }
.sg-risk-item .rt {
  display: inline-block;
  margin-right: 6px;
  padding: 1px 7px;
  border-radius: 5px;
  background: var(--gold-soft);
  color: var(--gold);
  font-size: 10.5px;
  font-weight: 800;
}

@media (max-width: 640px) {
  .tg-modal { max-height: 90vh; border-radius: 12px; }
  .tg-modal-body { padding: 12px 14px; }
  .tg-modal-foot { padding: 10px 14px 14px; }
}

/* 轻提示 toast */
.tg-toast {
  position: fixed;
  left: 50%;
  bottom: 40px;
  transform: translateX(-50%) translateY(14px);
  max-width: min(520px, 88vw);
  padding: 10px 16px;
  border-radius: 10px;
  background: rgba(17, 24, 39, .96);
  border: 1px solid var(--border-light);
  color: var(--text-primary);
  font-size: 12px;
  line-height: 1.6;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .5);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 3000;
}
.tg-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 智能体对话 ---------- */
.agent-skills {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.agent-skill {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 12px 8px;
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-panel);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all .16s ease;
}
.agent-skill:hover {
  border-color: var(--gold);
  background: var(--bg-hover);
  color: var(--text-primary);
  transform: translateY(-1px);
}
.agent-skill .as-top {
  display: flex;
  align-items: center;
  gap: 6px;
}
.agent-skill .as-icon { font-size: 20px; line-height: 1; }
.agent-skill .as-name { font-size: 12px; font-weight: 700; }
.agent-skill .as-q {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
  text-align: center;
}
.agent-skill .as-d {
  font-size: 10px;
  color: var(--text-muted);
  text-align: center;
}
.agent-skill:hover .as-q { color: var(--gold); }
.agent-skill:active { transform: translateY(0); }

/* 快捷追问（点击即反馈） */
.ag-qq {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed var(--border-subtle);
}
.ag-qq-lab {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 600;
  margin-right: 2px;
}
.ag-qq-btn {
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-inset);
  color: var(--text-secondary);
  font-size: 11px;
  cursor: pointer;
  transition: all .16s ease;
  white-space: nowrap;
}
.ag-qq-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--bg-hover);
  transform: translateY(-1px);
}

.agent-flow {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 260px;
  max-height: calc(100vh - 320px);
  overflow-y: auto;
  padding: 4px 2px 8px;
}
.agent-msg { display: flex; }
.agent-msg.user { justify-content: flex-end; }
.agent-msg .ag-bubble {
  max-width: 92%;
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 12.5px;
  line-height: 1.85;
  background: var(--bg-panel);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}
.agent-msg.user .ag-bubble {
  background: var(--brand-soft);
  border-color: rgba(59, 130, 246, .28);
  color: #dbeafe;
}
.ag-card { width: min(760px, 100%); }
.ag-card .card { margin: 0; }
.ag-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.ag-p { font-size: 12.5px; line-height: 1.9; color: var(--text-secondary); }
.ag-sub-h {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--gold);
  margin: 6px 0 4px;
  padding-left: 8px;
  border-left: 3px solid var(--gold);
  line-height: 1.4;
}
.ag-ul { margin: 0; padding-left: 18px; font-size: 12px; line-height: 1.9; color: var(--text-secondary); }
.ag-ul b { color: var(--text-primary); }
.ag-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ag-mini-h { font-size: 11.5px; font-weight: 800; margin-bottom: 3px; }
.ag-kv-bar { display: flex; flex-wrap: wrap; gap: 10px 18px; margin-top: 10px; }
.ag-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 10px; }
.ag-score-row { display: grid; grid-template-columns: 56px 1fr 34px; gap: 8px; align-items: center; margin-bottom: 5px; }
.ag-score-k { font-size: 11px; color: var(--text-muted); }
.ag-score-v { font-size: 11px; text-align: right; color: var(--text-secondary); font-weight: 700; }
.ag-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.ag-chip {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  border: 1px solid var(--border);
  background: var(--bg-inset);
  color: var(--text-secondary);
}
.ag-chip.up { border-color: rgba(239, 68, 68, .3); color: #fca5a5; }
.ag-chip.down { border-color: rgba(34, 197, 94, .3); color: #86efac; }

.agent-input {
  position: sticky;
  bottom: 0;
  padding: 10px 0 4px;
  background: linear-gradient(180deg, rgba(6, 13, 26, 0), var(--bg-base) 42%);
}
.ag-ctx { margin-bottom: 6px; }
.ag-tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  border: 1px solid var(--border);
  background: var(--bg-inset);
  color: var(--text-muted);
}
.ag-row { display: flex; gap: 8px; align-items: flex-end; }
.ag-text {
  flex: 1;
  min-height: 42px;
  max-height: 120px;
  resize: none;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text-primary);
  font-size: 12.5px;
  line-height: 1.7;
  outline: none;
}
.ag-text:focus { border-color: var(--brand); }
.ag-paste {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--bg-inset);
  color: var(--text-primary);
  font-size: 12px;
  line-height: 1.7;
  font-family: inherit;
}

/* ---------- 智能盯盘 ---------- */
.sg-form { display: flex; flex-direction: column; gap: 8px; }
.sg-form-row { display: flex; gap: 8px; flex-wrap: wrap; }
.sg-form-row .inp { flex: 1; min-width: 150px; }
.sg-mail { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.sg-mail .inp { flex: 1; min-width: 180px; }
.sg-add-row { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; align-items: center; }
.sg-add-row .inp { flex: 1; min-width: 180px; }
.sg-watch-list { display: flex; flex-direction: column; gap: 8px; }
.sg-watch-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--border-subtle);
  border-radius: 8px;
  background: var(--bg-inset);
}
.sg-watch-right { display: flex; align-items: center; gap: 10px; }
/* 盯盘标的：序号 + 名称代码 + 现价涨跌 + 删除 */
.sg-watch-item { padding: 8px 10px; transition: border-color .15s ease, background .15s ease; }
.sg-watch-item:hover { border-color: rgba(212,167,44,.45); background: rgba(255,255,255,.04); }
.sg-w-idx {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 700; color: var(--text-muted);
  background: rgba(255,255,255,.05);
}
.sg-w-main { flex: 1; min-width: 0; }
.sg-w-name { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-w-code { font-size: 10.5px; color: var(--text-muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sg-w-price { font-size: 12px; font-weight: 600; min-width: 56px; text-align: right; font-variant-numeric: tabular-nums; }
.sg-w-del {
  flex: 0 0 auto; width: 24px; height: 24px; border-radius: 6px; cursor: pointer;
  border: 1px solid var(--border-subtle); background: transparent;
  color: var(--text-muted); font-size: 12px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s ease;
}
.sg-w-del:hover { border-color: #ef4444; background: rgba(239,68,68,.12); color: #ef4444; }
.sg-chan-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }

@media (max-width: 900px) {
  .agent-skills { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ag-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ag-grid2 { grid-template-columns: 1fr; }
}

/* 加载骨架 */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-inset) 25%,
    var(--bg-hover) 50%,
    var(--bg-inset) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.3s infinite;
  border-radius: var(--r-sm);
}
@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* AI 思考动画 */
.thinking {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  color: var(--text-secondary);
  padding: 14px 0;
}
.thinking-dots {
  display: flex;
  gap: 3px;
}
.thinking-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
  animation: bounce 1.2s infinite ease-in-out;
}
.thinking-dots span:nth-child(2) {
  animation-delay: 0.16s;
}
.thinking-dots span:nth-child(3) {
  animation-delay: 0.32s;
}
@keyframes bounce {
  0%, 80%, 100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* AI 打字机光标 */
.ai-cursor {
  display: inline-block;
  width: 2px;
  height: 13px;
  background: var(--brand);
  vertical-align: text-bottom;
  margin-left: 2px;
  animation: blink 0.95s step-end infinite;
}
@keyframes blink {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* 淡入动画 */
.fade-in {
  animation: fadeIn 0.34s var(--ease) both;
}
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* AI 报告文本区 */
.ai-report {
  font-size: 13px;
  line-height: 1.85;
  color: var(--text-secondary);
}
.ai-report h4 {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin: 16px 0 7px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.ai-report h4::before {
  content: "";
  width: 3px;
  height: 13px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--brand), var(--purple));
}
.ai-report h4:first-child {
  margin-top: 0;
}
.ai-report p {
  margin: 0 0 9px;
}
.ai-report ul {
  margin: 0 0 9px;
  padding-left: 18px;
}
.ai-report li {
  margin-bottom: 5px;
}
.ai-report strong {
  color: var(--text-primary);
  font-weight: 600;
}
.ai-report code {
  background: var(--bg-inset);
  padding: 1px 5px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--cyan);
}

/* 键值列表 */
.kv-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--r-md);
  overflow: hidden;
}
.kv-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  background: var(--bg-inset);
}
.kv-item .kv-k {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
}
.kv-item .kv-v {
  font-size: 12.5px;
  font-weight: 600;
  font-family: var(--font-mono);
  text-align: right;
}

/* 分隔线 */
.divider {
  height: 1px;
  background: var(--border-subtle);
  margin: 14px 0;
}

/* 标签组 */
.tag-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.tag {
  padding: 3px 9px;
  border-radius: var(--r-sm);
  font-size: 11.5px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all 0.16s;
}
.tag:hover {
  border-color: var(--border-light);
  color: var(--text-primary);
}
.tag.active {
  background: var(--brand-soft);
  border-color: rgba(59, 130, 246, 0.35);
  color: #93c5fd;
}

/* 评分环 */
.score-ring {
  position: relative;
  display: grid;
  place-items: center;
}
.score-ring-inner {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}
.score-ring-value {
  font-size: 22px;
  font-weight: 700;
  font-family: var(--font-mono);
}
.score-ring-label {
  font-size: 10px;
  color: var(--text-dim);
}

/* ============================================================
   右侧 AI 助手面板
   ============================================================ */
.aside {
  width: var(--aside-w);
  flex-shrink: 0;
  background: var(--bg-primary);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: margin-right var(--dur) var(--ease);
  overflow: hidden;
}
.aside.collapsed {
  margin-right: calc(var(--aside-w) * -1);
}

.aside-head {
  height: 52px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
  border-bottom: 1px solid var(--border-subtle);
}
.aside-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
}
.aside-title .ai-orb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--purple));
  display: grid;
  place-items: center;
  box-shadow: 0 0 10px rgba(139, 139, 250, 0.45);
}
.aside-title .ai-orb svg {
  width: 12px;
  height: 12px;
  color: #fff;
}

/* 对话流 */
.chat-flow {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.chat-msg {
  display: flex;
  gap: 9px;
  animation: fadeIn 0.3s var(--ease) both;
}
.chat-msg.user {
  flex-direction: row-reverse;
}
.chat-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  font-size: 11px;
}
.chat-msg.ai .chat-avatar {
  background: linear-gradient(135deg, var(--brand), var(--purple));
  color: #fff;
}
.chat-msg.ai .chat-avatar svg {
  width: 13px;
  height: 13px;
}
.chat-msg.user .chat-avatar {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  font-weight: 600;
}
.chat-bubble {
  padding: 9px 12px;
  border-radius: var(--r-md);
  font-size: 12.5px;
  line-height: 1.7;
  max-width: 84%;
}
.chat-msg.ai .chat-bubble {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  border-top-left-radius: 3px;
}
.chat-msg.user .chat-bubble {
  background: var(--brand-soft);
  border: 1px solid rgba(59, 130, 246, 0.22);
  color: #e0e7ff;
  border-top-right-radius: 3px;
}
.chat-bubble strong {
  color: var(--text-primary);
}

/* 快捷提问 */
.chat-quick {
  padding: 10px 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chat-quick button {
  padding: 5px 10px;
  border-radius: var(--r-pill);
  font-size: 11.5px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  color: var(--text-secondary);
  transition: all 0.16s;
}
.chat-quick button:hover {
  background: var(--bg-hover);
  border-color: var(--brand);
  color: #93c5fd;
}

/* 输入区 */
.chat-input {
  padding: 11px 14px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  gap: 8px;
  align-items: flex-end;
  flex-shrink: 0;
}
.chat-input textarea {
  flex: 1;
  min-height: 34px;
  max-height: 92px;
  padding: 8px 11px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text-primary);
  font-size: 12.5px;
  resize: none;
  line-height: 1.55;
}
.chat-input textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.chat-send {
  width: 34px;
  height: 34px;
  border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--brand), #7c3aed);
  display: grid;
  place-items: center;
  color: #fff;
  flex-shrink: 0;
  transition: all 0.18s;
}
.chat-send svg {
  width: 15px;
  height: 15px;
}
.chat-send:hover {
  box-shadow: 0 0 14px rgba(59, 130, 246, 0.5);
}
.chat-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ============================================================
   响应式
   ============================================================ */
@media (max-width: 1440px) {
  .grid-4,
  .grid-5 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 1180px) {
  :root {
    --aside-w: 300px;
  }
  .grid-3,
  .grid-5 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 960px) {
  .search-box {
    width: 150px;
  }
  .aside {
    position: fixed;
    right: 0;
    top: var(--nav-h);
    bottom: 0;
    z-index: 50;
    box-shadow: var(--sh-pop);
  }
  .grid-2,
  .grid-3,
  .grid-4,
  .grid-5 {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .sidebar {
    position: fixed;
    left: 0;
    top: var(--nav-h);
    bottom: 0;
    z-index: 50;
    box-shadow: var(--sh-pop);
  }
  .sidebar:not(.collapsed) {
    box-shadow: var(--sh-pop);
  }
  .main {
    padding: 14px 12px 34px;
  }
  .nav-tabs {
    gap: 0;
  }
  .nav-tab span {
    display: none;
  }
  .nav-tab {
    padding: 8px 11px;
  }
  .brand-text {
    display: none;
  }
  .search-box {
    width: 120px;
  }
}

/* 打印/嵌入模式 */
body.embed-mode {
  overflow: auto;
}
body.embed-mode .navbar,
body.embed-mode .sidebar,
body.embed-mode .aside {
  display: none;
}
body.embed-mode .app {
  height: auto;
}
body.embed-mode .main {
  overflow: visible;
  padding: 0;
}

/* ============================================================
   趋势模块：绘图图层勾选 + 指标文字解读
   ============================================================ */
.layer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px dashed var(--border-subtle);
}
.layer-bar-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  letter-spacing: 0.4px;
}
.layer-bar-tip {
  font-size: 10.5px;
  color: var(--text-muted);
  margin-left: auto;
}
.layer-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 27px;
  padding: 0 11px;
  border-radius: 999px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 11.5px;
  cursor: pointer;
  transition: all 0.18s var(--ease);
  white-space: nowrap;
}
.layer-chip:hover {
  color: var(--text-primary);
  border-color: var(--border-light);
}
.layer-chip.on {
  color: var(--text-primary);
  background: var(--bg-hover);
  box-shadow: inset 0 0 0 1px rgba(212, 167, 44, 0.42);
}
.layer-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  opacity: 0.3;
  transition: opacity 0.18s var(--ease);
}
.layer-chip.on .layer-dot {
  opacity: 1;
}
.layer-ic {
  display: inline-flex;
  width: 13px;
  height: 13px;
}
.layer-ic svg {
  width: 13px;
  height: 13px;
}
.layer-tick {
  display: none;
  width: 12px;
  height: 12px;
  color: #d4a72c;
}
.layer-tick svg {
  width: 12px;
  height: 12px;
}
.layer-chip.on .layer-tick {
  display: inline-flex;
}

/* 区块小标题 */
.section-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}
.section-sub {
  font-size: 11px;
  color: var(--text-muted);
}

/* 解读卡片网格 */
.reading-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

/* 解读内容块 */
.read-block {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed var(--border-subtle);
}
.read-h {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 4px;
}
.read-p {
  font-size: 11.5px;
  line-height: 1.78;
  color: var(--text-muted);
}
.read-ul {
  margin: 0;
  padding-left: 16px;
}
.read-ul li {
  font-size: 11.5px;
  line-height: 1.72;
  color: var(--text-muted);
  margin-bottom: 3px;
}

/* 顶部四项速览 */
.read-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 9px;
}
.read-sum-item {
  padding: 6px 7px;
  border-radius: 6px;
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  text-align: center;
}
.read-sum-k {
  font-size: 9.5px;
  color: var(--text-muted);
}
.read-sum-v {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 2px;
}

/* 中枢区间四格 */
.read-zone {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 9px;
}
.read-zone-cell {
  padding: 6px 7px;
  border-radius: 6px;
  background: var(--bg-panel);
  text-align: center;
  font-size: 9.5px;
  color: var(--text-muted);
}
.read-zone-cell .num {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
  margin-top: 2px;
}
.read-zone-cell.up {
  background: rgba(239, 68, 68, 0.1);
}
.read-zone-cell.up .num {
  color: #fca5a5;
}
.read-zone-cell.down {
  background: rgba(34, 197, 94, 0.1);
}
.read-zone-cell.down .num {
  color: #86efac;
}

/* 紧凑列表 */
.read-list {
  margin-bottom: 4px;
}
.read-list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 8px;
  border-radius: 5px;
  background: var(--bg-inset);
  margin-bottom: 4px;
  font-size: 11px;
}
.read-list-k {
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.read-list-v {
  color: var(--text-muted);
  font-size: 11px;
  flex-shrink: 0;
}

/* 压力支撑两列 */
.read-2col {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.read-col-h {
  font-size: 11px;
  font-weight: 600;
  margin-bottom: 5px;
}
.read-lv {
  padding: 6px 8px;
  border-radius: 6px;
  background: var(--bg-inset);
  border-left: 2px solid rgba(148, 163, 184, 0.3);
  margin-bottom: 5px;
}
.read-empty {
  font-size: 11px;
  color: var(--text-muted);
  padding: 4px 0;
}

@media (max-width: 1100px) {
  .reading-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ============================================================
   A股实时行情状态
   ============================================================ */
/* 导航栏行情徽标 */
.quote-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  font-size: 11px;
  color: var(--text-muted);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s var(--ease);
}
.quote-status:hover {
  border-color: var(--border-light);
  color: var(--text-primary);
}
.quote-status .qs-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}
.quote-status.live {
  color: #86efac;
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.1);
}
.quote-status.live .qs-dot {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
  animation: qsPulse 2s ease-in-out infinite;
}
@keyframes qsPulse {
  0%, 100% { box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18); }
  50% { box-shadow: 0 0 0 5px rgba(34, 197, 94, 0.06); }
}
.qs-sep {
  margin: 0 5px;
  opacity: 0.4;
}

/* 趋势页数据源状态条 */
.src-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 7px 11px;
  margin-bottom: 10px;
  border-radius: 8px;
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  font-size: 11.5px;
  color: var(--text-muted);
}
.src-bar.live {
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.28);
}
.src-bar .src-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-muted);
  flex-shrink: 0;
}
.src-bar.live .src-dot {
  background: #22c55e;
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.18);
}
.src-bar .src-main {
  color: var(--text-secondary);
  font-size: 12px;
}
.src-bar .src-main strong {
  color: var(--text-primary);
}
.src-bar .src-price {
  font-weight: 700;
  color: var(--text-primary);
  font-size: 13px;
}
.src-bar .src-meta {
  font-size: 10.5px;
  color: var(--text-muted);
}
.src-bar #trRefresh {
  margin-left: auto;
}

/* ============================================================
   同业对比（精准匹配）
   ============================================================ */
.peer-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 0 2px 8px;
  margin-bottom: 8px;
  border-bottom: 1px dashed var(--border-subtle);
  font-size: 11px;
  color: var(--text-muted);
}
.peer-arrow {
  color: var(--text-muted);
  opacity: 0.6;
}
.peer-sec {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-secondary);
}
.peer-tip {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--text-muted);
}
.peer-tag {
  display: inline-block;
  margin-left: 4px;
  padding: 0 5px;
  height: 15px;
  line-height: 15px;
  border-radius: 3px;
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  font-size: 9px;
  color: var(--text-muted);
  vertical-align: middle;
}
.peer-self {
  background: rgba(59, 130, 246, 0.1);
}
.peer-self .txt {
  color: var(--text-primary);
}
.peer-empty {
  padding: 14px 10px;
  font-size: 11.5px;
  line-height: 1.7;
  color: var(--text-muted);
  text-align: center;
}

/* ============================================================
   周期选择器（8 档：1分~月线）
   ============================================================ */
.segmented.wrap {
  flex-wrap: wrap;
}
/* 时间维度选择器：字体统一纯白，选中态靠底色/描边区分 */
.segmented.periods button,
.segmented.time-dim button {
  padding: 4px 9px;
  font-size: 11.5px;
  color: #ffffff;
}
.segmented.periods button:hover,
.segmented.time-dim button:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.12);
}
.segmented.periods button.active,
.segmented.time-dim button.active {
  color: #ffffff;
  font-weight: 600;
  background: rgba(212, 167, 44, 0.22);
  box-shadow: inset 0 0 0 1px rgba(212, 167, 44, 0.6);
}

/* ============================================================
   全市场搜索框增强（代码 / 名称 / 拼音首字母 + 自选星标）
   ============================================================ */
/* 输入框加宽 + 聚焦时进一步展开，便于输入多字符关键字 */
.search-box {
  width: 100%;
  transition: width 0.22s var(--ease);
}
.search-box input {
  font-family: var(--font-mono);
  letter-spacing: 0.2px;
}
.search-box input::placeholder {
  font-family: var(--font-sans);
  letter-spacing: 0;
}

/* 键盘高亮项 */
.search-sugg-item.active {
  background: var(--bg-hover);
  box-shadow: inset 2px 0 0 var(--brand);
}
.search-sugg-item .ss-left {
  align-items: center;
}
.search-sugg-item .ss-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
}
.search-sugg-item .ss-code {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
}
/* 拼音首字母（斜体弱化） */
.search-sugg-item .ss-code .ss-py {
  font-style: italic;
  color: #7c8aa5;
}
/* 类型标签：A股 / 指数 */
.search-sugg-item .ss-code .ss-kind {
  font-style: normal;
  padding: 0 4px;
  border-radius: 3px;
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
  font-size: 9px;
  color: var(--text-muted);
  line-height: 14px;
}
/* 命中高亮 */
.search-sugg mark {
  background: rgba(212, 167, 44, 0.28);
  color: #f6d97a;
  border-radius: 2px;
  padding: 0 1px;
}
.search-sugg b {
  color: var(--text-secondary);
  font-weight: 600;
}
/* 右侧价格 + 涨跌 */
.search-sugg-item .ss-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.search-sugg-item .ss-price {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-mono);
}
.search-sugg-item .ss-price i {
  font-style: normal;
  margin-left: 3px;
}
/* 自选星标 */
.search-sugg-item .ss-star {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 5px;
  color: var(--text-dim);
  cursor: pointer;
  transition: all 0.16s var(--ease);
}
.search-sugg-item .ss-star:hover {
  color: #d4a72c;
  background: rgba(212, 167, 44, 0.14);
}
.search-sugg-item .ss-star.on {
  color: #d4a72c;
}
/* 空态 / 加载提示 */
.search-sugg .sugg-tip {
  padding: 12px 13px;
  font-size: 11.5px;
  line-height: 1.75;
  color: var(--text-muted);
}
/* 底部操作提示 */
.search-sugg .sugg-foot {
  padding: 7px 12px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-inset);
  font-size: 10px;
  color: var(--text-muted);
  letter-spacing: 0.2px;
}

@media (max-width: 1280px) {
  .search-box {
    width: 210px;
  }
  .search-box:focus-within {
    width: 280px;
  }
}
/* ===== 侧栏股票搜索区 ===== */
/* 侧栏搜索区：标的卡下方的全 A 股搜索 */
.side-search {
  padding: 10px 12px 2px;
  flex-shrink: 0;
}
.side-search-hint {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 6px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: var(--text-muted);
}
.side-search-hint svg {
  width: 12px;
  height: 12px;
  color: var(--brand);
}
.side-search .search-box,
.side-search .search-box:focus-within {
  width: 100%;
}
.side-search .search-box input {
  height: 32px;
  font-size: 12px;
}
.side-search .search-sugg {
  max-height: 380px;
  z-index: 200;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
}
/* 窄侧栏下压缩建议项，保证名称 + 代码 + 拼音 + 星标都在一屏内 */
.side-search .search-sugg-item {
  padding: 7px 9px;
  gap: 6px;
}
.side-search .search-sugg-item .ss-name {
  font-size: 12.5px;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.side-search .search-sugg-item .ss-code {
  font-size: 10px;
}
.side-search .search-sugg-item .ss-price {
  font-size: 11px;
}
.side-search .search-sugg-item .ss-star {
  width: 20px;
  height: 20px;
}
.side-search .sugg-foot {
  display: none;
}
/* ===== 复盘：上传持仓图弹层 ===== */
/* ============================================================
   复盘页：上传持仓图（扫码 OCR）弹层
   ============================================================ */
.rv-import-bar {
  animation: fadeIn .3s var(--ease);
}
.up-modal {
  display: none;
}
.up-modal.show {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 400;
}
.up-mask {
  position: absolute;
  inset: 0;
  background: rgba(3, 7, 18, 0.72);
  backdrop-filter: blur(3px);
}
.up-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: min(880px, 94vw);
  max-height: 90vh;
  overflow: auto;
  background: var(--bg-elevated, #111827);
  border: 1px solid var(--border);
  border-radius: var(--r-lg, 14px);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
  animation: upIn .22s var(--ease);
}
@keyframes upIn {
  from { opacity: 0; transform: translate(-50%, -46%); }
  to { opacity: 1; transform: translate(-50%, -50%); }
}
.up-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}
.up-x {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--bg-inset);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
}
.up-x:hover {
  color: var(--text-primary);
}
.up-body {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 16px;
  padding: 16px;
}
.up-qrcol {
  text-align: center;
}
.up-qr {
  display: inline-grid;
  place-items: center;
  min-height: 150px;
  padding: 8px;
  border-radius: 12px;
  background: #fff;
}
.up-qr img,
.up-qr canvas {
  display: block;
}
.up-qrurl {
  margin-top: 6px;
  font-size: 10.5px;
  color: var(--text-muted);
  word-break: break-all;
}
.up-hint {
  margin-top: 10px;
  font-size: 11px;
  line-height: 1.85;
  color: var(--text-muted);
  text-align: left;
}
.up-side {
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}
.up-status {
  padding: 8px 11px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
}
.up-status .up-err {
  color: #fca5a5;
}
.up-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.up-actions .btn {
  height: 34px;
  font-size: 12px;
  padding: 0 12px;
}
.up-text {
  width: 100%;
  min-height: 118px;
  padding: 10px 11px;
  border-radius: 9px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 11.5px;
  line-height: 1.7;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  resize: vertical;
}
.up-text:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}
.up-side > .btn-ai {
  height: 38px;
  font-size: 13px;
}

@media (max-width: 760px) {
  .up-body {
    grid-template-columns: minmax(0, 1fr);
  }
}
/* ===== 绘图图层条（醒目样式覆盖） ===== */
/* ============================================================
   绘图图层条：文字与操作背景更醒目
   ============================================================ */
.layer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(37, 51, 74, 0.95), rgba(17, 25, 40, 0.95));
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
.layer-bar-label {
  font-size: 12.5px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: 1px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.layer-bar-tip {
  font-size: 11.5px;
  font-weight: 600;
  color: #cbd5e1;
  margin-left: auto;
}
.layer-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 13px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: #e2e8f0;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s var(--ease);
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.layer-chip:hover {
  color: #ffffff;
  border-color: rgba(212, 167, 44, 0.65);
  background: rgba(51, 65, 85, 0.95);
}
.layer-chip.on {
  color: #ffffff;
  background: rgba(212, 167, 44, 0.22);
  border-color: rgba(212, 167, 44, 0.85);
  box-shadow: inset 0 0 0 1px rgba(212, 167, 44, 0.35), 0 3px 12px rgba(0, 0, 0, 0.4);
}
.layer-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  opacity: 0.35;
  transition: opacity 0.18s var(--ease);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35);
}
.layer-chip.on .layer-dot {
  opacity: 1;
  box-shadow: 0 0 6px currentColor, 0 0 0 2px rgba(0, 0, 0, 0.35);
}
.layer-ic {
  display: inline-flex;
  width: 13px;
  height: 13px;
}
.layer-ic svg {
  width: 13px;
  height: 13px;
}
.layer-tick {
  display: none;
  width: 13px;
  height: 13px;
  color: #fbbf24;
}
.layer-tick svg {
  width: 13px;
  height: 13px;
}
.layer-chip.on .layer-tick {
  display: inline-flex;
}
/* ===== 绘图图层条（醒目样式覆盖） ===== */
.layer-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(37, 51, 74, 0.95), rgba(17, 25, 40, 0.95));
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
.layer-bar-label {
  font-size: 12.5px;
  font-weight: 800;
  color: #f8fafc;
  letter-spacing: 1px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.layer-bar-tip {
  font-size: 11.5px;
  font-weight: 600;
  color: #cbd5e1;
  margin-left: auto;
}
.layer-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 30px;
  padding: 0 13px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
  color: #e2e8f0;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.18s var(--ease);
  white-space: nowrap;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
.layer-chip:hover {
  color: #ffffff;
  border-color: rgba(212, 167, 44, 0.65);
  background: rgba(51, 65, 85, 0.95);
}
.layer-chip.on {
  color: #ffffff;
  background: rgba(212, 167, 44, 0.22);
  border-color: rgba(212, 167, 44, 0.85);
  box-shadow: inset 0 0 0 1px rgba(212, 167, 44, 0.35), 0 3px 12px rgba(0, 0, 0, 0.4);
}
.layer-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  opacity: 0.35;
  transition: opacity 0.18s var(--ease);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.35);
}
.layer-chip.on .layer-dot {
  opacity: 1;
  box-shadow: 0 0 6px currentColor, 0 0 0 2px rgba(0, 0, 0, 0.35);
}
.layer-ic {
  display: inline-flex;
  width: 13px;
  height: 13px;
}
.layer-ic svg {
  width: 13px;
  height: 13px;
}
.layer-tick {
  display: none;
  width: 13px;
  height: 13px;
  color: #fbbf24;
}
.layer-tick svg {
  width: 13px;
  height: 13px;
}
.layer-chip.on .layer-tick {
  display: inline-flex;
}

/* ===== 信号订阅：卡片 / 开关 / 套餐 ===== */
.sg-card {
  padding: 11px 12px;
  border-radius: 10px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: all 0.18s var(--ease);
}
.sg-card:hover {
  background: var(--bg-hover);
  transform: translateY(-1px);
}
.sg-card.on {
  background: rgba(59, 130, 246, 0.12);
  border-color: rgba(59, 130, 246, 0.5);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}
.sg-toggle {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--bg-panel);
  border: 1px solid var(--border);
  color: var(--text-muted);
  white-space: nowrap;
}
.sg-toggle.on {
  color: #ffffff;
  background: rgba(34, 197, 94, 0.25);
  border-color: rgba(34, 197, 94, 0.6);
}
.sg-plan {
  padding: 14px 15px;
  border-radius: 12px;
  background: var(--bg-inset);
  border: 1px solid var(--border);
}
.sg-plan.on {
  border-color: rgba(212, 167, 44, 0.65);
  background: rgba(212, 167, 44, 0.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.32);
}
.field-input {
  height: 34px;
  padding: 0 11px;
  width: 100%;
  border-radius: var(--r-sm);
  background: var(--bg-inset);
  border: 1px solid var(--border);
  color: var(--text-primary);
  font-size: 12.5px;
}
.field-input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
}

/* ===== 搜索栏：输入框与提示更醒目 ===== */
.nav-tab.hidden {
  display: none !important;
}
.side-search {
  padding: 12px 12px 6px;
  margin: 0 0 2px;
  background: linear-gradient(180deg, rgba(37, 51, 74, 0.55), rgba(15, 23, 42, 0.25));
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.22);
}
.side-search-hint {
  font-size: 11px;
  font-weight: 800;
  color: #e2e8f0;
  letter-spacing: 0.8px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}
.side-search-hint svg {
  color: #fbbf24;
  width: 13px;
  height: 13px;
}
.side-search .search-box input {
  height: 38px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.4px;
  color: #ffffff;
  background: #0a0f1a;
  border: 1.5px solid rgba(148, 163, 184, 0.45);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
  border-radius: 10px;
}
.side-search .search-box input::placeholder {
  color: #7c8aa5;
  font-weight: 500;
  letter-spacing: 0;
}
.side-search .search-box input:focus {
  border-color: #d4a72c;
  background: #0d1420;
  box-shadow: 0 0 0 3px rgba(212, 167, 44, 0.22), inset 0 1px 3px rgba(0, 0, 0, 0.5);
}
.side-search .search-box svg.search-ico {
  width: 15px;
  height: 15px;
  color: #cbd5e1;
  left: 11px;
}
.side-search .search-box:focus-within svg.search-ico {
  color: #fbbf24;
}

/* ===== 左上角品牌下方的行情状态（实时 / 收盘） ===== */
.brand {
  gap: 10px;
}
.brand-text {
  gap: 1px;
}
.brand .quote-status {
  height: 18px;
  padding: 0 8px;
  margin-top: 2px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid rgba(148, 163, 184, 0.32);
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2px;
  width: fit-content;
  max-width: 100%;
}
.brand .quote-status .qs-dot {
  width: 6px;
  height: 6px;
}
.brand .quote-status.live {
  color: #86efac;
  background: rgba(34, 197, 94, 0.14);
  border-color: rgba(34, 197, 94, 0.45);
}
.brand .quote-status.closed {
  color: #fbbf24;
  background: rgba(212, 167, 44, 0.12);
  border-color: rgba(212, 167, 44, 0.4);
}
.brand .quote-status.closed .qs-dot {
  background: #d4a72c;
  box-shadow: 0 0 0 3px rgba(212, 167, 44, 0.16);
}
.brand .quote-status .qs-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 1280px) {
  .brand .quote-status {
    display: none;
  }
}

/* ===== 绘图图层条：两排布局（标题排 + 可选项排） ===== */
.layer-bar {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 9px;
  padding: 10px 12px;
  margin-bottom: 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(37, 51, 74, 0.95), rgba(17, 25, 40, 0.95));
  border: 1px solid rgba(148, 163, 184, 0.3);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}
.layer-bar-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.layer-bar-items {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 9px;
  border-top: 1px dashed rgba(148, 163, 184, 0.25);
}
.layer-bar-tip {
  margin-left: auto;
}
/* 周期切换下移到图层栏第一排右侧 */
.layer-bar-split {
  flex: 1 1 auto;
  min-width: 8px;
}
.layer-bar-top .segmented.periods {
  margin-left: auto;
  background: rgba(15, 23, 42, 0.55);
  border-color: rgba(148, 163, 184, 0.35);
}
.layer-bar-top .segmented.periods button.active {
  background: rgba(212, 167, 44, 0.28);
  box-shadow: inset 0 0 0 1px rgba(212, 167, 44, 0.7);
}

/* ===== 信号订阅：频率/接收方式文字纯白 + 计费卡片 ===== */
.sg-lab {
  font-size: 11.5px;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.3px;
}
#sgFreq button,
#sgChan button {
  color: #ffffff;
  font-weight: 600;
}
#sgFreq button.active,
#sgChan button.active {
  color: #ffffff;
}
#sgFreq button:hover,
#sgChan button:hover {
  color: #ffffff;
}
.sg-plan .badge {
  vertical-align: middle;
}
.sg-plan .btn {
  height: 34px;
  font-size: 12.5px;
}

/* ============================================================
   超买超卖扫描（obos）
   ============================================================ */
.ob-params {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 10px;
}
.ob-field {
  display: flex;
  align-items: center;
  gap: 6px;
}
.ob-lab {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}
.ob-inp {
  width: 88px;
  height: 28px;
  font-size: 11.5px;
  padding: 0 8px;
}
.ob-chks {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 8px 0 10px;
  border-top: 1px dashed var(--border-subtle);
}
.ob-chk {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  color: var(--text-secondary);
  cursor: pointer;
}
.ob-chk input { accent-color: var(--gold); cursor: pointer; }
.ob-prog {
  height: 6px;
  border-radius: 999px;
  background: var(--bg-inset);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}
.ob-bar-in {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #d4a72c, #f59e0b);
  transition: width .25s ease;
}
.ob-prog-txt {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-top: 6px;
}
.ob-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.ob-table-wrap {
  overflow-x: auto;
  max-height: 460px;
  overflow-y: auto;
}
.ob-table { font-size: 11.5px; min-width: 940px; }
.ob-table .ob-code { color: var(--text-muted); font-size: 10.5px; }
.ob-table .ob-name { font-weight: 600; white-space: nowrap; }
.ob-table .ob-why {
  color: var(--text-muted);
  font-size: 10.5px;
  max-width: 260px;
  white-space: normal;
  line-height: 1.5;
}
.ob-sc {
  display: inline-block;
  min-width: 34px;
  padding: 1px 7px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 11.5px;
  text-align: center;
}
.ob-sc-h { background: rgba(239, 68, 68, .16); color: #f87171; }
.ob-sc-m { background: rgba(212, 167, 44, .16); color: var(--gold); }
.ob-sc-l { background: rgba(148, 163, 184, .14); color: var(--text-secondary); }
.ob-act {
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-inset);
  color: var(--text-secondary);
  font-size: 10.5px;
  cursor: pointer;
  white-space: nowrap;
}
.ob-act:hover { border-color: var(--gold); color: var(--gold); }
.ob-empty {
  padding: 22px 12px;
  text-align: center;
  color: var(--text-muted);
  font-size: 12px;
}
.ob-trunc {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-muted);
}
@media (max-width: 720px) {
  .ob-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ============================================================
   五绝筛选（five-unique）
   ============================================================ */
.fu-panel { display: block; }
.fu-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 10px; }
.fu-card {
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  background: var(--bg-inset);
  padding: 11px 13px 12px;
}
.fu-title { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; }
.fu-rank {
  width: 24px; height: 24px; border-radius: 7px;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 800;
  background: var(--bg-elevated); color: var(--text-secondary);
  border: 1px solid var(--border); flex: none;
}
.fu-rank.top { background: linear-gradient(135deg, #d4a72c, #f59e0b); color: #1a1206; border-color: transparent; }
.fu-name { font-size: 13px; font-weight: 700; }
.fu-code { font-size: 10px; color: var(--text-muted); font-family: var(--font-mono); }
.fu-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.fu-metric { background: var(--bg-elevated); border-radius: var(--r-sm); padding: 6px 8px; }
.fu-metric .label { font-size: 9.5px; color: var(--text-dim); }
.fu-metric .value { font-size: 12.5px; font-weight: 700; font-family: var(--font-mono); margin-top: 1px; }
.fu-chart-h { font-size: 11px; color: var(--text-muted); font-weight: 600; margin-bottom: 4px; }
.fu-intro { padding: 9px 11px; border-radius: 10px; margin-bottom: 10px; background: var(--bg-inset); border: 1px solid var(--border-subtle); }
.fu-intro-t { font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.fu-intro-d { font-size: 11px; line-height: 1.75; color: var(--text-secondary); }
.fu-sec-h { display: flex; align-items: baseline; gap: 8px; margin: 0 0 7px; font-size: 12.5px; font-weight: 700; }
.fu-sec-sub { font-size: 10.5px; font-weight: 500; color: var(--text-muted); }
.fu-table { max-height: 340px; overflow: auto; border-radius: 10px; border: 1px solid var(--border-subtle); }
.fu-table table.data { font-size: 11.5px; }
.fu-table th { position: sticky; top: 0; z-index: 2; background: var(--bg-elevated); white-space: nowrap; }
.fu-th-on { color: #d4a72c !important; }
.fu-td-on { background: rgba(212,167,44,0.09); font-weight: 700; }
.fu-row-top td { background: rgba(212,167,44,0.05); }
.fu-table td.mono { font-family: var(--font-mono); }

/* ============================================================
   小市值因子（smallcap）
   ============================================================ */
.sc-panel { display: block; }
.sc-branch-bar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.sc-branch {
  padding: 6px 13px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--bg-inset);
  color: var(--text-secondary); font-size: 12px; font-weight: 600; cursor: pointer;
  transition: all var(--dur) var(--ease);
}
.sc-branch:hover { color: var(--text-primary); background: var(--bg-hover); }
.sc-branch.active {
  border-color: rgba(212, 167, 44, 0.5);
  background: rgba(212, 167, 44, 0.14);
  color: var(--gold);
}
.sc-branch-desc { font-size: 11px; color: var(--text-muted); line-height: 1.8; margin-bottom: 8px; }
.sc-weights {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 8px 14px; margin-bottom: 6px;
}
.sc-w-row { display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--text-secondary); }
.sc-w-row > span:first-child { width: 152px; flex: none; }
.sc-range { flex: 1; accent-color: var(--gold); height: 3px; }
.sc-w-val { width: 22px; text-align: right; font-family: var(--font-mono); color: var(--gold); font-size: 11.5px; }
.sc-pos-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; margin-top: 10px; }
.sc-pos { border: 1px solid var(--border); border-radius: var(--r-sm); padding: 7px 9px; background: var(--bg-inset); }
.sc-pos-h { display: flex; align-items: baseline; gap: 6px; }
.sc-pos-h b { font-size: 12px; }
.sc-pos-h span { font-size: 10px; color: var(--text-dim); font-family: var(--font-mono); }
.sc-pos-b { display: flex; gap: 10px; margin-top: 3px; font-size: 10.5px; color: var(--text-muted); }
.sc-code { font-size: 10px; color: var(--text-dim); font-family: var(--font-mono); }
/* --- 小市值因子：结果区（说明 / 概要 / 明细 / 风控 / 模拟 / 因子） --- */
.sc-intro { padding: 9px 11px; border-radius: 10px; margin-bottom: 10px; background: var(--bg-inset); border: 1px solid var(--border-subtle); }
.sc-intro-t { font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.sc-intro-d { font-size: 11px; line-height: 1.75; color: var(--text-secondary); }
.sc-sec-h { display: flex; align-items: baseline; gap: 8px; margin: 0 0 7px; font-size: 12.5px; font-weight: 700; }
.sc-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(122px, 1fr)); gap: 8px; margin-bottom: 8px; }
.sc-sum-item { background: var(--bg-inset); border: 1px solid var(--border-subtle); border-radius: 10px; padding: 7px 9px; }
.sc-sum-item span { display: block; font-size: 10px; color: var(--text-dim); }
.sc-sum-item b { font-size: 13px; font-family: var(--font-mono); }
.sc-table-wrap { overflow-x: auto; border-radius: 10px; border: 1px solid var(--border-subtle); }
.sc-table-scroll { max-height: 340px; overflow: auto; border-radius: 10px; border: 1px solid var(--border-subtle); }
.sc-table-in { font-size: 11.5px; }
.sc-table-in th { position: sticky; top: 0; z-index: 2; background: var(--bg-elevated); white-space: nowrap; }
.sc-table-in td { white-space: nowrap; }
.sc-table-in td.mono { font-family: var(--font-mono); }
.sc-row-top { background: rgba(212, 167, 44, 0.08); }
.sc-limit { display: inline-block; margin-left: 4px; padding: 0 4px; border-radius: 4px; font-size: 9.5px; line-height: 15px; vertical-align: middle; white-space: nowrap; }
.sc-limit.up { color: #fff; background: #c0392b; }
.sc-limit.down { color: #fff; background: #1a8a55; }
.sc-limit.warn { color: var(--text-secondary); background: rgba(139, 152, 171, 0.16); }
.sc-limit.on { color: #2b1d00; background: var(--gold); font-weight: 700; }
.sc-pos-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(216px, 1fr)); gap: 8px; }
.sc-pos-b { flex-wrap: wrap; }
.sc-stop b { color: var(--warn); }
.sc-post { color: var(--warn); }
.sc-sim-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; margin-bottom: 8px; }
.sc-stat { background: var(--bg-inset); border: 1px solid var(--border-subtle); border-radius: 10px; padding: 7px 9px; }
.sc-stat span { display: block; font-size: 10px; color: var(--text-dim); }
.sc-stat b { font-size: 14px; font-family: var(--font-mono); }
.sc-chart { width: 100%; }
.sc-note { font-size: 10.5px; color: var(--text-dim); line-height: 1.7; margin-top: 6px; }

/* ============================================================
   智能体：复盘阶段状态 / 扫码上传
   ============================================================ */
.ag-stage {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 9px 11px; border-radius: var(--r-md);
  background: var(--bg-inset); border: 1px dashed var(--border);
}
.ag-stage-ic {
  width: 16px; height: 16px; flex: none; margin-top: 1px;
  border-radius: 50%; border: 2px solid var(--gold);
  border-top-color: transparent; animation: agSpin 0.9s linear infinite;
  display: grid; place-items: center; font-size: 10px; font-weight: 800; color: #22c55e;
}
.ag-stage.done { border-style: solid; border-color: rgba(34, 197, 94, 0.35); background: rgba(34, 197, 94, 0.07); }
.ag-stage.done .ag-stage-ic { animation: none; border-color: #22c55e; }
.ag-stage-h { font-size: 12px; font-weight: 700; }
.ag-stage-d { font-size: 10.5px; color: var(--text-muted); margin-top: 2px; line-height: 1.6; }
@keyframes agSpin { to { transform: rotate(360deg); } }
.ag-upload { display: flex; flex-direction: column; gap: 8px; }
.ag-qr {
  width: 176px; height: 176px; padding: 8px; margin: 0 auto;
  background: #fff; border-radius: var(--r-md);
  display: grid; place-items: center;
}
.ag-qr img, .ag-qr canvas { width: 156px; height: 156px; display: block; }
.ag-qr-url { font-size: 11px; color: var(--text-secondary); word-break: break-all; line-height: 1.7; }

/* ---------- 定时自动运行开关（早盘 / 尾盘多因子） ---------- */
.qsw-wrap {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 11px; border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-inset);
  cursor: pointer; user-select: none;
  transition: border-color .15s ease, background .15s ease;
}
.qsw-wrap:hover { border-color: rgba(212,167,44,.5); }
.qsw-wrap.on { border-color: rgba(34,197,94,.55); background: rgba(34,197,94,.10); }
.qsw-wrap.locked { opacity: .55; cursor: not-allowed; }
.qsw-lab { font-size: 11px; font-weight: 700; color: var(--text-secondary); white-space: nowrap; line-height: 1; }
.qsw-wrap.on .qsw-lab { color: #16a34a; }
.qsw {
  position: relative; flex: 0 0 auto;
  width: 34px; height: 18px; border-radius: 999px;
  background: var(--bg-panel); border: 1px solid var(--border);
  transition: background .18s ease, border-color .18s ease;
}
.qsw::after {
  content: ''; position: absolute; top: 2px; left: 2px;
  width: 12px; height: 12px; border-radius: 50%;
  background: var(--text-muted);
  transition: transform .18s ease, background .18s ease;
}
.qsw-wrap.on .qsw { background: rgba(34,197,94,.3); border-color: rgba(34,197,94,.65); }
.qsw-wrap.on .qsw::after { transform: translateX(16px); background: #22c55e; }
.qsw-hint { font-size: 10px; color: var(--text-muted); line-height: 1.6; margin-top: 8px; }

/* ---------- 智能体免责声明 ---------- */
.ag-disclaimer {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 9px 12px; margin-bottom: 12px;
  border-radius: 10px;
  border: 1px solid rgba(212,167,44,.32);
  background: rgba(212,167,44,.07);
  font-size: 11px; line-height: 1.85; color: var(--text-secondary);
}
.ag-disclaimer svg { width: 14px; height: 14px; flex: 0 0 auto; margin-top: 2px; color: #d4a72c; }

/* ---------- 课程到期：导航锁定 ---------- */
.nav-tab.locked { opacity: .5; cursor: not-allowed; }
.nav-tab.locked::after {
  content: ''; flex: 0 0 auto;
  width: 12px; height: 12px; margin-left: 6px; display: inline-block;
  vertical-align: -1px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Crect x='4' y='11' width='16' height='9' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Crect x='4' y='11' width='16' height='9' rx='2'/%3E%3Cpath d='M8 11V8a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* ---------- 课程到期提示条（智能体页） ---------- */
.ag-expired {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 14px; margin-bottom: 12px;
  border-radius: 10px;
  border: 1px solid rgba(239, 68, 68, .34);
  background: rgba(239, 68, 68, .07);
}
.ag-expired .ae-ic { flex: 0 0 auto; width: 16px; height: 16px; color: #dc2626; }
.ag-expired .ae-ic svg { width: 100%; height: 100%; }
.ag-expired .ae-main { flex: 1; min-width: 0; }
.ag-expired .ae-t { font-size: 12.5px; font-weight: 700; color: #b91c1c; }
.ag-expired .ae-d { font-size: 11px; color: var(--text-secondary); line-height: 1.7; margin-top: 3px; }
.ag-pay:empty { display: none; }
.ag-pay { margin-bottom: 12px; }
.agent-skill.locked { opacity: .45; cursor: not-allowed; }

/* ---------- 标题右侧 POWERED BY（沿用原 brand-sub 字体，仅靠排版与标题区分） ---------- */
.page-title-row { display: flex; align-items: baseline; gap: 9px; flex-wrap: wrap; }
.page-title-row .page-title { margin: 0; }
.page-powered {
  padding: 2px 8px; border-radius: 999px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-inset);
  white-space: nowrap;
}

/* ---------- 课程套餐模块 ---------- */
/* 我的课程状态：紧凑单排（小字号，横向一行） */
.cs-status-row {
  display: flex; align-items: center; flex-wrap: wrap;
  gap: 4px 10px;
  padding: 7px 10px;
  border-radius: var(--r-md);
  background: var(--bg-inset);
  border: 1px solid var(--border-subtle);
}
.cs-status-i {
  display: inline-flex; align-items: baseline; gap: 5px;
  white-space: nowrap; min-width: 0;
}
.cs-status-l {
  font-size: 10.5px; color: var(--text-dim);
  letter-spacing: .02em; flex: 0 0 auto;
}
.cs-status-v {
  font-size: 12px; font-weight: 700; color: var(--text-primary);
  font-family: var(--font-mono);
  overflow: hidden; text-overflow: ellipsis; max-width: 190px;
}
.cs-status-e {
  font-size: 10px; color: var(--text-muted); font-family: var(--font-mono);
  flex: 0 0 auto;
}
.cs-status-i.warn .cs-status-v { color: var(--warn); }
@media (max-width: 760px) {
  .cs-status-v { max-width: 120px; }
}

.cs-plan-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
@media (max-width: 980px) { .cs-plan-grid { grid-template-columns: 1fr; } }
.cs-plan {
  position: relative; display: flex; flex-direction: column;
  padding: 14px 14px 12px; border-radius: 12px;
  border: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, rgba(212,167,44,0.05), transparent 60%);
  transition: border-color .16s ease, transform .16s ease;
}
.cs-plan:hover { border-color: rgba(212,167,44,.42); transform: translateY(-2px); }
.cs-plan.on { border-color: rgba(212,167,44,.7); background: linear-gradient(180deg, rgba(212,167,44,0.12), transparent 60%); }
.cs-plan-tag {
  align-self: flex-start; margin-bottom: 6px;
  padding: 2px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: .02em;
  color: #d4a72c; background: rgba(212,167,44,.12);
  border: 1px solid rgba(212,167,44,.34);
}
.cs-plan-k { font-size: 14px; font-weight: 800; }
.cs-plan-price { display: flex; align-items: baseline; gap: 4px; margin: 8px 0 2px; }
.cs-plan-price b { font-size: 26px; font-weight: 800; color: var(--text-primary); }
.cs-plan-price span { font-size: 11px; color: var(--text-muted); }
.cs-plan-note { font-size: 11px; color: var(--text-secondary); font-weight: 600; }
.cs-plan-sum { font-size: 11.5px; line-height: 1.75; color: var(--text-muted); margin: 8px 0 10px; }
.cs-plan-items { flex: 1; display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.cs-item { display: flex; align-items: flex-start; gap: 6px; font-size: 11.5px; line-height: 1.6; color: var(--text-secondary); }
.cs-ck { flex: 0 0 auto; width: 13px; height: 13px; margin-top: 2px; color: #22c55e; }
.cs-ck svg { width: 100%; height: 100%; }
.cs-learn { padding: 12px; border-radius: 10px; border: 1px solid var(--border-subtle); background: var(--bg-inset); }
.cs-learn-t { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.cs-learn-d { font-size: 11.5px; line-height: 1.8; color: var(--text-secondary); }

/* 课程内容 · 四大模块详情卡 */
.cs-topic-grid {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px;
}
@media (max-width: 980px) { .cs-topic-grid { grid-template-columns: 1fr; } }
.cs-topic {
  display: flex; flex-direction: column;
  padding: 14px 15px 13px; border-radius: var(--r-lg);
  border: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.06), transparent 55%), var(--bg-inset);
  transition: border-color .16s var(--ease), transform .16s var(--ease), box-shadow .16s var(--ease);
}
.cs-topic:hover {
  border-color: rgba(59, 130, 246, .42);
  transform: translateY(-2px);
  box-shadow: 0 10px 26px rgba(15, 23, 42, .45);
}
.cs-topic-hd { display: flex; align-items: center; gap: 11px; margin-bottom: 9px; }
.cs-topic-ic {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 17px; line-height: 1;
  background: linear-gradient(140deg, rgba(59, 130, 246, .22), rgba(167, 139, 250, .16));
  border: 1px solid rgba(99, 132, 255, .32);
}
.cs-topic-hm { min-width: 0; }
.cs-topic-n { display: flex; align-items: baseline; gap: 7px; }
.cs-topic-n b {
  font-size: 11px; font-weight: 800; letter-spacing: .06em;
  color: #60a5fa; font-variant-numeric: tabular-nums;
}
.cs-topic-n span { font-size: 14.5px; font-weight: 800; color: var(--text-primary); }
.cs-topic-tag {
  display: inline-block; margin-top: 3px;
  padding: 1px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 700;
  color: #93c5fd;
  background: rgba(59, 130, 246, .12);
  border: 1px solid rgba(59, 130, 246, .28);
}
.cs-topic-d {
  font-size: 11.5px; line-height: 1.85; color: var(--text-secondary);
  padding-bottom: 9px; margin-bottom: 9px;
  border-bottom: 1px dashed var(--border-subtle);
}
.cs-topic-pts { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.cs-topic-li {
  display: flex; align-items: flex-start; gap: 8px;
  font-size: 11.5px; line-height: 1.7; color: var(--text-secondary);
}
.cs-topic-dot {
  flex: 0 0 auto; width: 5px; height: 5px; margin-top: 7px; border-radius: 50%;
  background: linear-gradient(140deg, #60a5fa, #a78bfa);
  box-shadow: 0 0 6px rgba(96, 165, 250, .55);
}
.cs-rules { display: flex; flex-direction: column; gap: 8px; }
.cs-rule { display: flex; align-items: flex-start; gap: 9px; font-size: 11.5px; line-height: 1.75; color: var(--text-secondary); }
.cs-rule-n {
  flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px; font-weight: 700; color: #d4a72c;
  background: rgba(212,167,44,.12); border: 1px solid rgba(212,167,44,.34);
}

/* ---------- 购买 / 下单 强调（CTA） ---------- */
.btn-buy {
  height: 36px; padding: 0 18px;
  font-size: 13.5px; font-weight: 800; letter-spacing: .01em;
  color: #231600;
  background: linear-gradient(135deg, #ffd75e 0%, #f5b301 42%, #f08c00 100%);
  border: 1px solid rgba(255, 214, 102, .85);
  box-shadow:
    0 4px 16px rgba(240, 140, 0, .38),
    inset 0 1px 0 rgba(255, 255, 255, .45);
  position: relative; overflow: hidden;
  transition: transform .16s var(--ease), box-shadow .16s var(--ease), filter .16s var(--ease);
}
.btn-buy::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .55) 48%, transparent 62%);
  transform: translateX(-120%);
  animation: csBuyShine 3.2s ease-in-out infinite;
  pointer-events: none;
}
@keyframes csBuyShine {
  0%   { transform: translateX(-120%); }
  38%  { transform: translateX(120%); }
  100% { transform: translateX(120%); }
}
.btn-buy:hover {
  color: #231600;
  background: linear-gradient(135deg, #ffe28a 0%, #ffc21a 42%, #ff9d00 100%);
  border-color: rgba(255, 226, 138, .95);
  transform: translateY(-1px);
  filter: saturate(1.06);
  box-shadow:
    0 8px 24px rgba(240, 140, 0, .52),
    inset 0 1px 0 rgba(255, 255, 255, .55);
}
.btn-buy:active { transform: translateY(1px); box-shadow: 0 3px 12px rgba(240, 140, 0, .4); }
.btn-buy-lg { height: 42px; padding: 0 26px; font-size: 14.5px; }
@media (prefers-reduced-motion: reduce) {
  .btn-buy::after { animation: none; }
}

/* 下单引导条 */
.cs-cta-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  flex-wrap: wrap;
  padding: 13px 16px; margin-bottom: 14px;
  border-radius: var(--r-lg);
  border: 1px solid rgba(240, 140, 0, .38);
  background:
    linear-gradient(120deg, rgba(240, 140, 0, .18) 0%, rgba(245, 179, 1, .10) 55%, rgba(255, 215, 94, .05) 100%),
    var(--bg-inset);
  box-shadow: 0 6px 20px rgba(240, 140, 0, .12);
}
.cs-cta-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cs-cta-txt b { font-size: 14.5px; font-weight: 800; color: #ffd75e; letter-spacing: .01em; }
.cs-cta-txt span { font-size: 11.5px; line-height: 1.6; color: var(--text-secondary); }
@media (max-width: 640px) {
  .cs-cta-bar { flex-direction: column; align-items: stretch; }
  .cs-cta-bar .btn { width: 100%; }
}

/* 套餐卡：付费档高亮 + 角标 + 丝带 */
.cs-plan.paid {
  border-color: rgba(240, 140, 0, .38);
  background:
    linear-gradient(180deg, rgba(240, 140, 0, .14) 0%, rgba(245, 179, 1, .05) 45%, transparent 78%),
    var(--bg-inset);
  box-shadow: 0 6px 22px rgba(240, 140, 0, .10);
}
.cs-plan.paid:hover {
  border-color: rgba(255, 190, 60, .72);
  transform: translateY(-3px);
  box-shadow: 0 14px 34px rgba(240, 140, 0, .24);
}
.cs-plan.paid .cs-plan-price b { color: #ffd75e; }
.cs-plan.paid .cs-plan-price span { color: #f0b44e; }
.cs-plan.paid .cs-plan-sum { color: var(--text-secondary); }
.cs-plan.paid .cs-item { color: var(--text-primary); }
.cs-plan.hot, .cs-plan.best { border-color: rgba(255, 190, 60, .55); }
.cs-plan.on {
  border-color: rgba(255, 190, 60, .8);
  box-shadow: 0 0 0 1px rgba(255, 190, 60, .35), 0 10px 28px rgba(240, 140, 0, .22);
}
.cs-plan-tag.hot {
  color: #2b1a00; font-weight: 800;
  background: linear-gradient(135deg, #ffd75e, #f5b301);
  border-color: rgba(255, 226, 138, .9);
  box-shadow: 0 3px 12px rgba(240, 140, 0, .34);
}
.cs-plan-tag.best {
  color: #04140c; font-weight: 800;
  background: linear-gradient(135deg, #4ade80, #16a34a);
  border-color: rgba(74, 222, 128, .8);
  box-shadow: 0 3px 12px rgba(22, 163, 74, .30);
}
/* 右上角丝带 */
.cs-plan-ribbon {
  position: absolute; top: 11px; right: -30px;
  transform: rotate(38deg);
  padding: 2px 30px;
  font-size: 9.5px; font-weight: 800; letter-spacing: .06em;
  color: #2b1a00;
  background: linear-gradient(135deg, #ffd75e, #f08c00);
  box-shadow: 0 2px 8px rgba(240, 140, 0, .4);
  pointer-events: none;
}
.cs-plan.best .cs-plan-ribbon {
  color: #04140c;
  background: linear-gradient(135deg, #4ade80, #16a34a);
  box-shadow: 0 2px 8px rgba(22, 163, 74, .36);
}
/* 卡片内价格条提示 */
.cs-plan-cta {
  margin-bottom: 9px; padding: 6px 9px;
  border-radius: 8px;
  font-size: 10.5px; font-weight: 700; line-height: 1.5;
  color: #ffce5c;
  background: rgba(240, 140, 0, .12);
  border: 1px dashed rgba(240, 140, 0, .42);
}
.cs-plan .btn-buy { width: 100%; }
.cs-plan > button.btn { width: 100%; }

/* 导航「AITrading」促单角标 */
.nav-tab[data-module="course"] { position: relative; }
.nav-tab[data-module="course"] span { position: relative; }
.nav-tab[data-module="course"] span::after {
  content: '';
  position: absolute; top: -6px; right: -9px;
  width: 7px; height: 7px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #ffe28a, #f08c00);
  box-shadow: 0 0 0 2px rgba(240, 140, 0, .22), 0 0 8px rgba(240, 140, 0, .8);
  animation: csDotPulse 1.8s ease-in-out infinite;
}
@keyframes csDotPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(1.35); opacity: .7; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-tab[data-module="course"] span::after { animation: none; }
}

/* ============================================================
   做T时钟（套利工具 · KDJ 顶底分型）
   ============================================================ */
.tc-root { display: flex; flex-direction: column; gap: 12px; }
.tc-root .intro-p { font-size: 12px; line-height: 1.85; color: var(--text-secondary); }
.tc-intro .card-head { margin-bottom: 6px; }

.tc-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 12px; align-items: start; }
.tc-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; position: relative; }
.tc-side { display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 1180px) {
  .tc-layout { grid-template-columns: minmax(0, 1fr); }
}

/* 状态条 */
.tc-status { margin: 2px 0 8px; }
.tc-status-row { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 11px; color: var(--text-muted); }
.tc-status-txt { font-size: 11.5px; font-weight: 700; color: var(--text-primary); }
.tc-status-item b { color: var(--text-secondary); font-weight: 600; font-family: var(--font-mono); }
.tc-err { color: var(--warn); }
.tc-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--text-dim); flex: none; }
.tc-dot.on { background: var(--success); box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.16); }
.tc-dot.run { background: var(--brand); animation: tcPulse 1s ease-in-out infinite; }
.tc-dot.off { background: var(--text-dim); }
@keyframes tcPulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

/* 标的列表 */
.tc-list .empty-hint { padding: 14px; }
.tc-table-scroll { max-height: 360px; overflow: auto; border: 1px solid var(--border-subtle); border-radius: var(--r-md); }
.tc-table-scroll .data th { position: sticky; top: 0; background: var(--bg-panel); z-index: 1; }
.tc-code { font-size: 10px; color: var(--text-dim); font-family: var(--font-mono); }
.tc-row-hit { background: var(--gold-soft); }
.tc-j { font-family: var(--font-mono); font-weight: 700; }
.tc-j.buy, .tc-state.buy { color: var(--up); }
.tc-j.sell, .tc-state.sell { color: var(--down); }
.tc-j.low { color: var(--cyan); }
.tc-j.high { color: var(--warn); }
.tc-j.mid { color: var(--text-secondary); }
.tc-j.na, .tc-state.na { color: var(--text-dim); }
.tc-state { font-size: 10.5px; padding: 1px 6px; border-radius: 999px; border: 1px solid var(--border-subtle); background: var(--bg-inset); white-space: nowrap; }
.tc-state.buy { border-color: rgba(239, 68, 68, 0.35); background: var(--up-soft); }
.tc-state.sell { border-color: rgba(34, 197, 94, 0.35); background: var(--down-soft); }
.tc-sig { display: inline-block; font-size: 10.5px; padding: 1px 6px; margin-right: 5px; border-radius: var(--r-sm); border: 1px solid var(--border-subtle); background: var(--bg-inset); font-family: var(--font-mono); }
.tc-sig.buy { color: var(--up); border-color: rgba(239, 68, 68, 0.35); background: var(--up-soft); }
.tc-sig.sell { color: var(--down); border-color: rgba(34, 197, 94, 0.35); background: var(--down-soft); }
.tc-none { font-size: 10.5px; color: var(--text-dim); }

/* 信号时间轴 */
.tc-timeline { display: flex; flex-direction: column; gap: 4px; }
.tc-tl-item {
  display: grid; grid-template-columns: 26px minmax(70px, 1fr) 66px 64px 88px 62px;
  align-items: center; gap: 8px; padding: 5px 8px; border-radius: var(--r-sm);
  border: 1px solid var(--border-subtle); background: var(--bg-inset); font-size: 11px;
}
.tc-tl-item.buy { border-left: 2px solid var(--up); }
.tc-tl-item.sell { border-left: 2px solid var(--down); }
.tc-tl-tag { font-size: 10.5px; font-weight: 700; text-align: center; border-radius: var(--r-sm); padding: 1px 0; }
.tc-tl-item.buy .tc-tl-tag { color: var(--up); background: var(--up-soft); }
.tc-tl-item.sell .tc-tl-tag { color: var(--down); background: var(--down-soft); }
.tc-tl-name { color: var(--text-primary); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-tl-price, .tc-tl-j { font-family: var(--font-mono); color: var(--text-secondary); }
.tc-tl-time { font-family: var(--font-mono); font-size: 10.5px; color: var(--text-muted); }
.tc-tl-ago { font-size: 10px; color: var(--text-dim); text-align: right; }
@media (max-width: 720px) {
  .tc-tl-item { grid-template-columns: 26px minmax(60px, 1fr) 60px 88px; }
  .tc-tl-j, .tc-tl-ago { display: none; }
}

/* 横幅提示 */
.tc-banner {
  border: 1px solid rgba(212, 167, 44, 0.4); background: linear-gradient(90deg, rgba(212, 167, 44, 0.16), rgba(212, 167, 44, 0.04));
  border-radius: var(--r-md); padding: 8px 12px;
}
.tc-banner-inner { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; font-size: 11.5px; color: var(--text-primary); }
.tc-banner-inner b { color: var(--gold); }
.tc-banner-inner em { font-style: normal; font-size: 11px; padding: 1px 7px; border-radius: 999px; margin-right: 4px; }
.tc-buy { color: var(--up); background: var(--up-soft); border: 1px solid rgba(239, 68, 68, 0.35); }
.tc-sell { color: var(--down); background: var(--down-soft); border: 1px solid rgba(34, 197, 94, 0.35); }
.tc-banner-list { color: var(--text-secondary); }

/* 右侧常驻操作条 */
.tc-rail { position: sticky; bottom: 12px; align-self: flex-end; display: flex; gap: 6px; z-index: 20; }
.tc-rail-btn {
  position: relative; padding: 6px 12px; font-size: 11px; color: var(--text-secondary); cursor: pointer;
  background: var(--bg-panel); border: 1px solid var(--border-subtle); border-radius: 999px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}
.tc-rail-btn:hover { color: var(--text-primary); border-color: var(--gold); }
.tc-rail-badge {
  display: inline-block; margin-left: 4px; min-width: 15px; padding: 0 4px; border-radius: 999px;
  background: var(--gold); color: #1a1305; font-size: 9.5px; font-weight: 700; line-height: 15px; text-align: center;
}

/* 侧栏配置 */
.tc-add-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: flex-start; }
.tc-add-row .af-input-wrap { position: relative; flex: 1 1 150px; min-width: 130px; }
.tc-add-row .input { width: 100%; }
.tc-sug { position: absolute; z-index: 30; top: calc(100% + 3px); left: 0; right: 0; max-height: 210px; overflow: auto;
  list-style: none; margin: 0; padding: 4px; background: var(--bg-elevated); border: 1px solid var(--border-subtle); border-radius: var(--r-md); box-shadow: 0 8px 24px rgba(0, 0, 0, .45); }
.tc-sug li { padding: 5px 8px; font-size: 11.5px; border-radius: var(--r-sm); cursor: pointer; color: var(--text-secondary); }
.tc-sug li:hover { background: var(--bg-hover); color: var(--text-primary); }
.tc-sug-code { color: var(--text-dim); font-family: var(--font-mono); font-size: 10.5px; }
.tc-sub { margin: 12px 0 6px; font-size: 11.5px; font-weight: 700; color: var(--text-secondary); }
.tc-cfg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 10px; }
.tc-field { display: flex; flex-direction: column; gap: 3px; font-size: 10.5px; color: var(--text-muted); }
.tc-field select.input { padding: 4px 6px; font-size: 11.5px; }
.tc-chk { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-secondary); cursor: pointer; }
.tc-chk input { accent-color: var(--gold); }
.tc-run-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tc-run-row .btn { padding: 4px 10px; font-size: 11px; }
.tc-hint { margin-top: 8px; font-size: 10.5px; line-height: 1.75; color: var(--text-dim); }

/* 折叠说明 */
.tc-fold { border: 1px solid var(--border-subtle); border-radius: var(--r-md); background: var(--bg-panel); padding: 8px 12px; }
.tc-fold summary { cursor: pointer; font-size: 11.5px; font-weight: 700; color: var(--text-secondary); list-style: none; }
.tc-fold summary::before { content: "\25B8  "; color: var(--gold); }
.tc-fold[open] summary::before { content: "\25BE  "; }
.tc-fold .intro-p { margin-top: 6px; font-size: 11px; }

/* 风险区 */
.tc-risk-body { font-size: 11px; line-height: 1.8; color: var(--text-secondary); }
.tc-risk-body p { margin: 0 0 6px; }
.tc-risk-body ul { margin: 0 0 6px; padding-left: 16px; }
.tc-risk-body li { margin-bottom: 3px; }
.tc-risk-body b { color: var(--text-primary); }

/* 消息历史弹层 */
.tc-modal { position: fixed; inset: 0; z-index: 120; display: flex; align-items: center; justify-content: center; }
.tc-modal-mask { position: absolute; inset: 0; background: rgba(3, 7, 15, .66); backdrop-filter: blur(2px); }
.tc-modal-box { position: relative; width: min(860px, 92vw); max-height: 82vh; display: flex; flex-direction: column;
  background: var(--bg-panel); border: 1px solid var(--border-subtle); border-radius: var(--r-lg); box-shadow: 0 24px 64px rgba(0, 0, 0, .55); }
.tc-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--border-subtle); }
.tc-modal-title { font-size: 13.5px; font-weight: 700; color: var(--text-primary); }
.tc-modal-title em { font-style: normal; margin-left: 8px; font-size: 11px; color: var(--text-muted); }
.tc-modal-x { background: none; border: none; color: var(--text-muted); font-size: 20px; line-height: 1; cursor: pointer; padding: 0 4px; }
.tc-modal-x:hover { color: var(--text-primary); }
.tc-modal-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 14px; border-bottom: 1px solid var(--border-subtle); flex-wrap: wrap; }
.tc-modal-bar .segmented button { padding: 3px 10px; font-size: 11px; }
.tc-modal-acts { display: flex; gap: 6px; }
.tc-modal-body { padding: 12px 14px; overflow: auto; }

/* 盯盘提醒 · 套利工具线信号分组 */
.sg-group-sep {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 2px; padding-top: 8px; border-top: 1px dashed var(--border-subtle);
}
.sg-group-sep .sg-lab { color: var(--gold); font-weight: 700; }

/* ===== 价格提醒（盯盘助手）：条件设置 · 监控列表 · 触发记录 ===== */
.pa-toolbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 9px 11px; margin-bottom: 10px; border-radius: 10px;
  background: var(--bg-inset); border: 1px solid var(--border-subtle);
}
.pa-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; box-shadow: 0 0 0 3px rgba(34,197,94,.16); }
.pa-dot.on { background: #22c55e; animation: paPulse 1.8s ease-in-out infinite; }
.pa-dot.off { background: var(--text-muted); box-shadow: none; }
@keyframes paPulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
.pa-stat { font-size: 11px; color: var(--text-muted); flex: 1; min-width: 190px; line-height: 1.6; }
.pa-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.pa-form-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pa-form-row .input { flex: 1; min-width: 170px; }
.pa-unit { font-size: 11px; color: var(--text-muted); }
.pa-check { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--text-secondary); cursor: pointer; }
.pa-check input { width: 14px; height: 14px; accent-color: var(--gold); }
.pa-tip {
  font-size: 11px; color: var(--text-muted); line-height: 1.8;
  padding: 7px 10px; border-radius: 8px;
  background: var(--bg-inset); border: 1px dashed var(--border-subtle);
}
.pa-tip b { color: var(--text-primary); }
.pa-list { display: flex; flex-direction: column; gap: 8px; }
.pa-row {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 11px; border-radius: 10px;
  background: var(--bg-inset); border: 1px solid var(--border-subtle);
  transition: border-color .15s ease, background .15s ease;
}
.pa-row:hover { border-color: rgba(212,167,44,.45); background: var(--bg-hover); }
.pa-row.off { opacity: .62; }
.pa-row-main { flex: 1; min-width: 210px; }
.pa-name { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 12.5px; }
.pa-code { font-size: 10px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.pa-badge {
  font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 999px;
  border: 1px solid var(--border); color: var(--text-muted); background: var(--bg-panel);
}
.pa-badge.on { color: #4ade80; border-color: rgba(34,197,94,.55); background: rgba(34,197,94,.14); }
.pa-badge.fired { color: var(--gold); border-color: rgba(212,167,44,.6); background: rgba(212,167,44,.14); }
.pa-badge.off { color: var(--text-muted); }
.pa-cond { font-size: 11.5px; color: var(--text-secondary); margin-top: 3px; }
.pa-sub { font-size: 10px; color: var(--text-muted); margin-top: 2px; }
.pa-num { text-align: right; min-width: 78px; }
.pa-price { font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pa-chg { font-size: 11px; font-variant-numeric: tabular-nums; }
.pa-gap { font-size: 11px; color: var(--text-muted); min-width: 130px; text-align: right; }
.pa-act { display: flex; gap: 6px; }
.pa-act .btn { padding: 4px 10px; font-size: 11px; }
.pa-log-head { font-size: 11px; font-weight: 700; color: var(--text-muted); margin: 12px 0 6px; }
.pa-log { display: flex; flex-direction: column; gap: 6px; }
.pa-log-item {
  display: flex; gap: 10px; flex-wrap: wrap; align-items: baseline;
  padding: 7px 10px; border-radius: 8px; font-size: 11px;
  background: var(--bg-inset); border: 1px solid var(--border-subtle);
}
.pa-log-t { color: var(--text-muted); font-variant-numeric: tabular-nums; flex: none; }
.pa-log-m { color: var(--text-secondary); flex: 1; min-width: 200px; line-height: 1.7; }
.pa-log-m b { color: var(--text-primary); }
@media (max-width: 640px) {
  .pa-row { gap: 8px; }
  .pa-num { text-align: left; min-width: 0; display: flex; gap: 8px; align-items: baseline; }
  .pa-gap { text-align: left; min-width: 0; }
}


/* ============================================================
   竞价弱转强（量化策略 · 移植自量化因子模块）
   —— 变量别名：源模块使用的变量名 → 站内主题变量
   ============================================================ */
:root {
  --bg-2: var(--bg-primary);
  --bg-3: var(--bg-elevated);
  --bg-4: var(--bg-hover);
  --text: var(--text-primary);
  --text-2: var(--text-secondary);
  --text-3: var(--text-muted);
  --primary: var(--brand);
  --primary-light: #93c5fd;
  --accent-gold: var(--gold);
  --accent-cyan: var(--cyan);
  --accent-green: var(--success);
  --accent-red: var(--danger);
}

.ob-add { border: 1px solid var(--border); background: transparent; color: var(--text-2); border-radius: 5px; padding: 2px 7px; font-size: 11px; cursor: pointer; }
.ob-add:hover { border-color: var(--accent-gold); color: var(--accent-gold); }
.ob-add:disabled { opacity: .5; cursor: default; }
/* 早盘/尾盘因子 —— 显示列勾选 */
.if-cols { display: block; margin: 0 0 12px; }
.if-cols-main { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
/* 未勾选的列统一收进「更多」，点击才展开 */
.if-cmore-btn { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 11px; background: var(--bg-3); border: 1px dashed var(--border); color: var(--text-2); font-size: 11.5px; line-height: 1.5; cursor: pointer; white-space: nowrap; }
.if-cmore-btn:hover { border-color: var(--primary); color: var(--primary-light); }
.if-cmore-btn.on { background: rgba(31, 111, 235, .14); border-style: solid; border-color: var(--primary); color: var(--primary-light); }
.if-cmore-ico { font-size: 9px; }
.if-cmore-n { min-width: 16px; padding: 0 4px; border-radius: 8px; background: var(--border); color: var(--text-2); font-size: 10px; text-align: center; line-height: 15px; }
.if-cols-more { margin-top: 8px; padding: 9px 10px 10px; border: 1px dashed var(--border); border-radius: 8px; background: rgba(0, 0, 0, .16); }
.if-cols-more[hidden] { display: none; }
.if-cols-more-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; }
.if-cmore-tip { font-size: 11px; color: var(--text-3); }
.if-cmore-link { background: transparent; border: 1px solid var(--border); border-radius: 4px; color: var(--text-2); font-size: 11px; padding: 2px 9px; cursor: pointer; white-space: nowrap; }
.if-cmore-link:hover { border-color: var(--primary); color: var(--primary-light); }
.if-cols-more-b { display: flex; gap: 6px; flex-wrap: wrap; }
/* ===================== 弱转强因子 ===================== */
.wu-config { margin-bottom: 14px; }
.wu-config h4 { margin: 0 0 10px; font-size: 13px; color: var(--text); }
.wu-config h4 + .wu-cfg-grid { margin-bottom: 10px; }
.wu-cfg-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 22px; }
.wu-field { display: flex; flex-direction: row; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.wu-field span { font-size: 11.5px; color: #fff; flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wu-field input { background: var(--bg-3); border: 1px solid var(--border); border-radius: 5px; color: var(--text); font-size: 12.5px; padding: 5px 8px; width: 88px; max-width: 42%; flex: 0 0 auto; text-align: right; }
.wu-field input:focus { outline: none; border-color: var(--primary); }
.wu-switches, .wu-radios, .wu-excludes { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; font-size: 12px; color: var(--text-2); margin-bottom: 10px; }
.wu-switches label, .wu-radios label, .wu-excludes label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.wu-switches input, .wu-radios input, .wu-excludes input { margin: 0; cursor: pointer; }
.wu-radio-label { color: #fff; font-size: 11.5px; }
.wu-excludes { margin-top: 2px; }
.wu-run-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.wu-progress { font-size: 12px; color: #fff; flex: 1; min-width: 200px; }
.wu-stop { background: transparent; border: 1px solid var(--danger); color: var(--danger); border-radius: 5px; font-size: 12px; padding: 6px 14px; cursor: pointer; }
.wu-stop:hover { background: rgba(248, 81, 73, .12); }
.wu-bar-wrap { height: 3px; background: var(--bg-3); border-radius: 2px; overflow: hidden; margin-top: 8px; }
.wu-bar { height: 100%; width: 0%; background: var(--accent-gold); transition: width .25s ease; }
.wu-databar { margin-bottom: 10px; padding: 8px 12px; font-size: 12px; line-height: 1.7; background: rgba(227, 179, 65, .08); border: 1px solid rgba(227, 179, 65, .35); border-radius: 7px; color: #fff; }
.wu-databar b { color: var(--accent-gold); }
.wu-databar strong { color: var(--danger); }
.wu-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(112px, 1fr)); gap: 8px; margin-bottom: 14px; }
.wu-sum { background: var(--bg-2); border: 1px solid var(--border); border-radius: 7px; padding: 9px 10px; text-align: center; }
.wu-sum b { display: block; font-size: 18px; color: #fff; }
.wu-sum span { display: block; font-size: 11.5px; color: #fff; margin-top: 2px; }
.wu-sum.wu-hl { border-color: var(--accent-gold); }
.wu-sum.wu-hl b { color: var(--accent-gold); }
.wu-sum.wu-hl2 { border-color: var(--accent-teal, #39c5bb); }
.wu-sum.wu-hl2 b { color: var(--accent-teal, #39c5bb); }
.wu-block { margin-bottom: 18px; }
.wu-block h4 { margin: 0 0 8px; font-size: 13.5px; color: var(--text); }
.wu-table-wrap { overflow: auto; max-height: 62vh; border: 1px solid var(--border); border-radius: 7px; }
.wu-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
/* 表头：吸顶 + 白字 */
.wu-table th { position: sticky; top: 0; z-index: 4; background: #1f2a36; color: #fff; font-weight: 600; font-size: 12px; padding: 9px 10px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--border); }
.wu-table th:first-child, .wu-table th:nth-child(2) { text-align: left; }
.wu-table th.wu-sort { cursor: pointer; user-select: none; }
.wu-table th.wu-sort:hover { color: var(--accent-gold); }
.wu-table th.wu-sorton { color: var(--accent-gold); }
.wu-table th.wu-sorton::after { content: attr(data-arrow); }
.wu-table td { padding: 7px 10px; text-align: right; white-space: nowrap; vertical-align: middle; border-bottom: 1px solid rgba(45, 58, 71, .55); color: #fff; }
.wu-table td:first-child, .wu-table td:nth-child(2) { text-align: left; }
.wu-table tbody tr:last-child td { border-bottom: none; }
/* 斑马纹 —— sticky 列需显式背景 */
.wu-table tbody tr:nth-child(odd) td { background: #131a22; }
.wu-table tbody tr:nth-child(even) td { background: var(--bg-2); }
.wu-table tbody tr:hover td { background: #1e2b39; }
/* 序号 / 标的 / 总分 三列横向滚动时吸附左侧 */
.wu-table th:nth-child(1), .wu-table td:nth-child(1) { position: sticky; left: 0; z-index: 2; width: 44px; min-width: 44px; }
.wu-table th:nth-child(2), .wu-table td:nth-child(2) { position: sticky; left: 44px; z-index: 2; width: 98px; min-width: 98px; }
.wu-table th:nth-child(3), .wu-table td:nth-child(3) { position: sticky; left: 142px; z-index: 2; width: 62px; min-width: 62px; }
.wu-table th:nth-child(1), .wu-table th:nth-child(2), .wu-table th:nth-child(3) { z-index: 5; }
.wu-table td:nth-child(1), .wu-table td:nth-child(2), .wu-table td:nth-child(3) { background: var(--bg-2); }
.wu-table tbody tr:nth-child(odd) td:nth-child(1),
.wu-table tbody tr:nth-child(odd) td:nth-child(2),
.wu-table tbody tr:nth-child(odd) td:nth-child(3) { background: #131a22; }
.wu-table tbody tr:hover td:nth-child(1),
.wu-table tbody tr:hover td:nth-child(2),
.wu-table tbody tr:hover td:nth-child(3) { background: #1e2b39; }
.wu-table td:nth-child(3) { border-right: 1px solid var(--border); }
.wu-table th:nth-child(3) { border-right: 1px solid var(--border); }
/* 小字：全部白色 */
.wu-table em { display: block; font-style: normal; font-size: 11px; color: #fff; margin-top: 2px; line-height: 1.3; }
.wu-table td.wu-rank { text-align: center; color: #fff; width: 44px; font-size: 12px; }
.wu-table td.wu-rk1 { color: #ffd666; font-weight: 700; font-size: 13px; }
.wu-table td.wu-rk2 { color: #d8dce3; font-weight: 700; font-size: 13px; }
.wu-table td.wu-rk3 { color: #e0a468; font-weight: 700; font-size: 13px; }
.wu-name b { display: block; color: #fff; font-size: 12.5px; font-weight: 600; }
.wu-code { display: block; font-size: 11px; color: #fff; opacity: .95; }
.wu-warn { display: inline-block; margin-left: 4px; width: 13px; height: 13px; line-height: 13px; border-radius: 50%; background: rgba(227, 179, 65, .2); color: var(--accent-gold); font-size: 10px; font-weight: 700; text-align: center; cursor: help; vertical-align: 1px; }
.wu-proxy { display: inline-block; margin-right: 3px; padding: 0 4px; border-radius: 3px; background: rgba(227, 179, 65, .18); color: var(--accent-gold); font-size: 10px; font-weight: 600; cursor: help; }
.wu-seq { white-space: nowrap; font-size: 11.5px; }
.wu-seq .wu-up { color: var(--up); }
.wu-seq .wu-down { color: var(--down); }
.wu-seq .wu-arrow { color: #fff; opacity: .8; margin: 0 3px; }
.wu-seq em { color: #fff; }
.wu-sc { display: inline-block; min-width: 44px; padding: 3px 8px; border-radius: 11px; font-weight: 700; font-size: 13px; text-align: center; letter-spacing: .3px; }
.wu-sc-h { background: rgba(255, 77, 79, .18); color: #ff7875; }
.wu-sc-m { background: rgba(227, 179, 65, .16); color: var(--accent-gold); }
.wu-sc-l { background: rgba(255, 255, 255, .10); color: #fff; }
.wu-failrow td { background: rgba(248, 81, 73, .05); font-size: 11.5px; color: #fff; text-align: left; white-space: normal; }
.wu-failtag { display: inline-block; margin-right: 6px; padding: 1px 7px; border-radius: 9px; background: rgba(248, 81, 73, .14); color: var(--danger); font-weight: 600; }
.wu-chart { height: 180px; }
.wu-note { font-size: 12px; color: #fff; line-height: 1.85; border: 1px dashed var(--border); border-radius: 7px; padding: 10px 12px; }
.wu-note b { color: var(--accent-gold); margin-right: 4px; }
.wu-note strong { color: var(--danger); }
.wu-empty { padding: 22px 14px; text-align: center; color: #fff; font-size: 12.5px; }
.wu-empty p { margin: 0 0 6px; line-height: 1.7; }
.wu-empty b { color: var(--accent-gold); }
.wu-error { color: var(--danger); }
.wu-cfg-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px 12px; }
.wu-field { gap: 6px; }
.wu-field input { width: 72px; max-width: 46%; }
@media (max-width: 640px) {
  .wu-cfg-grid { grid-template-columns: 1fr; gap: 7px; }
  .wu-field input { width: 76px; max-width: 44%; }
}
.wu-summary { grid-template-columns: repeat(3, 1fr); }
/* ===================== 表格内小字统一白色 ===================== */
/* 单元格副文本 */
.wu-table em,
.if-table em,
.ob-table em,
.sc-table em,
.pos-row em,
.w-row em,
.smc-chip em,
.smc-stat em,
.gt-cell em,
.hg-card em { font-style: normal; color: #fff; }
/* 代码 / 时间 / 题材 一类次要字段 */
.wu-code,
.if-table .if-time,
.if-table .if-theme,
.sc-code,
.w-row .c-code,
.pos-row .c-name em,
.info-code,
.info-time,
.watch-item .code,
.a-rule-code,
.analysis-note,
.np-hint,
.pos-hint,
.pos-foot,
.smc-hint,
.smc-field span,
.smc-stat span,
.gt-cell span,
.hg-kv span,
.ob-label,
.sc-note { color: #fff; }
/* ---- 顶部横向说明 ---- */
.wu-top { margin-bottom: 12px; }
.wu-top-row { display: flex; align-items: center; gap: 10px 14px; flex-wrap: wrap; margin-bottom: 8px; }
.wu-top-row h2 { margin: 0; font-size: 18px; color: #fff; white-space: nowrap; }
.wu-flow { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.wu-flow-step { font-size: 12px; padding: 3px 11px; border-radius: 12px; white-space: nowrap; background: var(--bg-3); border: 1px solid var(--border); color: #fff; }
.wu-flow-hot { background: rgba(255, 77, 79, .14); border-color: rgba(255, 77, 79, .42); color: #ff7875; font-weight: 600; }
.wu-flow-arrow { color: #fff; opacity: .5; font-size: 12px; }
.wu-top-tail { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; margin-left: auto; }
.wu-desc-row { display: flex; align-items: center; gap: 5px; flex-wrap: wrap; }
.wu-desc-label { font-size: 11.5px; font-weight: 600; color: var(--accent-gold); white-space: nowrap; padding-right: 3px; }
.wu-tag { font-size: 11.5px; padding: 3px 10px; border-radius: 4px; white-space: nowrap; background: var(--bg-3); border: 1px solid var(--border); color: #fff; }
.wu-tag-gold { background: rgba(227, 179, 65, .10); border-color: rgba(227, 179, 65, .32); color: var(--accent-gold); }
.wu-tag-mute { background: transparent; border-style: dashed; opacity: .75; }
/* ---- 配置区横向 ---- */
.wu-cfg-head { display: flex; align-items: center; gap: 8px 18px; flex-wrap: wrap; margin-bottom: 9px; }
.wu-cfg-head h4 { margin: 0; font-size: 13px; color: #fff; white-space: nowrap; }
.wu-cfg-head .wu-switches, .wu-cfg-head .wu-radios, .wu-cfg-head .wu-excludes { margin-bottom: 0; }
.wu-cfg-head2 { margin-top: 13px; align-items: flex-start; }
.wu-cfg-head2 h4 { margin-top: 3px; }
.wu-hint { font-size: 11px; color: #fff; opacity: .68; white-space: nowrap; }
.wu-cfg-head2 .if-cols { flex: 1 1 100%; margin-bottom: 0; }
.wu-config .wu-cfg-grid { margin-bottom: 2px; }
.wu-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.wu-charts { grid-template-columns: 1fr; }
/* ---- 表格区域滚动 ---- */
.wu-table-wrap { overflow: auto; max-height: 58vh; scrollbar-gutter: stable; overscroll-behavior: contain; }
.wu-table { width: 100%; min-width: 720px; }
.wu-block h4 { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.wu-block h4 em { font-style: normal; font-size: 11.5px; color: #fff; opacity: .7; }

/* 弱转强：涨跌色（A股口径 涨红跌绿） */
.wu-wrap .up { color: var(--up); }
.wu-wrap .down { color: var(--down); }
.wu-wrap .wu-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.wu-wrap .wu-table th,
.wu-wrap .wu-table td { padding: 6px 8px; border-bottom: 1px solid var(--border-subtle); white-space: nowrap; }
.wu-wrap .wu-table th { color: var(--text-secondary); font-weight: 600; background: var(--bg-inset); }
.wu-wrap .wu-table tbody tr:hover { background: var(--bg-hover); }
.wu-wrap .wu-table-wrap { overflow-x: auto; }
.wu-wrap .btn-primary { background: var(--brand); color: #fff; border: 0; border-radius: var(--r-sm);
  padding: 7px 16px; font-size: 13px; cursor: pointer; }
.wu-wrap .btn-primary:hover { filter: brightness(1.1); }
.wu-wrap .btn-primary:disabled { opacity: .55; cursor: default; }
.wu-wrap input[type="number"],
.wu-wrap input[type="text"] { background: var(--bg-inset); color: var(--text-primary);
  border: 1px solid var(--border); border-radius: var(--r-sm); padding: 4px 7px; font-size: 12px; }
.wu-wrap .card { background: var(--bg-elevated); border: 1px solid var(--border);
  border-radius: var(--r-md); padding: 14px; }
.wu-wrap h2 { font-size: 17px; margin: 0; color: var(--text-primary); }
.wu-wrap h4 { font-size: 13.5px; margin: 0 0 8px; color: var(--text-primary); }
.wu-wrap .wu-chart { height: 220px; }

/* 量化策略 · 候选规则竖排（每条独占一行） */
.q-rule-list { display: grid; gap: 6px; margin-top: 6px; }
.q-rule-list .q-rule {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  width: 100%;
  justify-content: flex-start;
  text-align: left;
  white-space: normal;
  border-radius: 8px;
  padding: 4px 9px;
  line-height: 1.65;
}
.q-rule-dot {
  width: 5px;
  height: 5px;
  margin-top: 8px;
  border-radius: 50%;
  background: currentColor;
  opacity: .78;
  flex: 0 0 auto;
}


/* ---- 竞价弱转强 · 列排序（正序/倒序切换） ---- */
.wu-sortbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; flex: 1 1 100%; margin-top: 9px; }
.wu-sortbar-lb { font-size: 11.5px; color: #fff; opacity: .82; }
.wu-select { background: var(--bg-3); border: 1px solid var(--border); border-radius: 5px; color: var(--text); font-size: 12px; padding: 4px 6px; max-width: 152px; }
.wu-select:focus { outline: none; border-color: var(--accent-gold); }
.wu-sortdir { background: var(--bg-3); border: 1px solid var(--border); border-radius: 999px; color: var(--text); font-size: 11.5px; padding: 4px 11px; cursor: pointer; white-space: nowrap; min-width: 76px; }
.wu-sortdir:hover, .wu-sortdir.asc { border-color: var(--accent-gold); color: var(--accent-gold); }
.wu-table th.wu-sort::after { content: attr(data-arrow); opacity: .38; font-size: 10px; }
.wu-table th.wu-sort:hover { background: #26333f; color: var(--accent-gold); }
.wu-table th.wu-sort:hover::after { opacity: .85; }
.wu-table th.wu-sorton::after { opacity: 1; }
@media (max-width: 640px) {
  .wu-sortbar { gap: 6px; }
  .wu-select { max-width: 118px; }
  .wu-sortdir { padding: 4px 9px; min-width: 68px; }
}

/* ---- 暴力洗盘反转 · 大盘情绪预警条 ---- */
.wo-mktbar { margin: 0 0 12px; padding: 8px 12px; font-size: 12px; line-height: 1.7;
  background: var(--bg-3); border: 1px solid var(--border); border-radius: 7px; color: #fff; }
.wo-mktbar b { color: var(--accent-gold); }
.wo-mktbar em { display: block; font-style: normal; font-size: 11px; opacity: .72; margin-top: 2px; }
.wo-mktbar strong { color: var(--danger); }
.wo-mktbar.wo-mkt-ok { background: rgba(63, 185, 80, .08); border-color: rgba(63, 185, 80, .32); }
.wo-mktbar.wo-mkt-bad { background: rgba(248, 81, 73, .10); border-color: rgba(248, 81, 73, .45); }
.wo-mktbar.wo-mkt-warn { background: rgba(227, 179, 65, .08); border-color: rgba(227, 179, 65, .38); }
.wo-mktbar.wo-mkt-off { opacity: .82; border-style: dashed; }
@media (max-width: 640px) {
  .wo-mktbar { font-size: 11.5px; padding: 7px 10px; }
}

/* ---- ROE 红利 · 结果表数值列排序（点击表头正/倒序切换） ---- */
.roe-table th.roe-th-sort { cursor: pointer; user-select: none; }
.roe-table th.roe-th-sort:hover { color: var(--accent-gold); }
.roe-table th.roe-th-on { color: var(--accent-gold); }
.roe-table .roe-arrow { opacity: .42; font-size: 9px; margin-left: 3px; }

/* ---- 量化策略 · 自身模块介绍（策略介绍部分可收起 / 展开） ---- */
.md-intro-head { display: flex; align-items: center; gap: 12px; margin: 4px 0 8px; }
.md-toggle { font-size: 12px; color: var(--text-secondary); background: var(--bg-3);
  border: 1px solid var(--border); border-radius: 8px; padding: 4px 12px; cursor: pointer;
  transition: background .15s, color .15s; white-space: nowrap; }
.md-toggle:hover { background: var(--accent-soft); color: var(--accent-gold); }
.md-detail-wrap { overflow: hidden; }
.md-detail-wrap:not(.open) { display: none; }
.md-detail .read-h { margin-bottom: 6px; }
.md-detail .data, .md-detail .q-rule-list { background: var(--bg-1); }

/* ---- 量化策略结果列表 · 操作栏（加自选 / 看K线） ---- */
.sa-btn { display: inline-block; margin: 1px 2px; padding: 3px 9px; font-size: 11px; line-height: 1.5;
  border-radius: 7px; border: 1px solid var(--border); background: var(--bg-3); color: var(--text-secondary);
  cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, border-color .15s; }
.sa-btn:hover { background: var(--accent-soft); color: var(--accent-gold); border-color: var(--accent-gold); }
.sa-watch.is-on { background: var(--accent-soft); color: var(--accent-gold); border-color: var(--accent-gold); }
.sa-kline { color: var(--text-primary); }
td.op-col { white-space: nowrap; text-align: center; }
th.op-col, td.op-col { width: 1%; }
.roe-table th.roe-th-on .roe-arrow { opacity: 1; }

/* ============================================================
   板块情绪 · 龙头轮动（SecLead / #arb 板块情绪 tab）
   样式沿用站内深色金融终端令牌，与套利工具其它策略页保持一致
   ============================================================ */
.sl-card-body { padding: 12px 16px; }
.sl-ops { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; }
.sl-ops .sl-hint { flex: 1 1 320px; }
.sl-hint { font-size: 11.5px; color: var(--text-muted); line-height: 1.5; }
.sl-cfg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(184px, 1fr)); gap: 10px 14px; }
.sl-field { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-secondary); }
.sl-field > span { font-size: 11px; color: var(--text-muted); }
.sl-input {
  height: 32px; padding: 0 10px; width: 100%;
  background: var(--bg-inset); border: 1px solid var(--border); border-radius: var(--r-md);
  color: var(--text-primary); font-size: 13px; transition: all var(--dur) var(--ease);
}
.sl-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); outline: none; }
.sl-switches { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

.sl-chart { height: 380px; min-width: 640px; }
.sl-now-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 10px; }
.sl-now-card {
  border: 1px solid var(--border); border-radius: var(--r-md); padding: 12px 14px;
  background: var(--bg-elevated);
}
.sl-now-card b { font-size: 12px; color: var(--text-muted); display: block; margin-bottom: 6px; font-weight: 600; }
.sl-now-card .sl-big { font-size: 21px; font-weight: 700; color: var(--text-primary); }
.sl-now-card .sl-big.sl-act { font-size: 15px; line-height: 1.45; }
.sl-now-card .sl-sub { font-size: 11.5px; color: var(--text-muted); margin-top: 4px; }
.sl-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; margin: 10px 0; }
.sl-stat {
  border: 1px solid var(--border); border-radius: var(--r-sm); padding: 8px 10px;
  display: flex; flex-direction: column; gap: 3px; background: var(--bg-elevated);
}
.sl-stat-label { font-size: 11px; color: var(--text-muted); }
.sl-stat-val { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.sl-stat-val.up { color: var(--up); }
.sl-stat-val.down { color: var(--down); }
.sl-table-wrap { overflow: auto; max-height: 62vh; border: 1px solid var(--border); border-radius: var(--r-md); }
.sl-table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 12.5px; }
.sl-table th, .sl-table td {
  padding: 6px 9px; text-align: right; white-space: nowrap;
  border-bottom: 1px solid var(--border); color: var(--text-primary);
}
.sl-table th {
  position: sticky; top: 0; z-index: 2; background: var(--bg-panel);
  font-weight: 600; font-size: 11.5px; color: var(--text-secondary);
}
.sl-table th:first-child, .sl-table th:nth-child(2), .sl-table td:first-child, .sl-table td:nth-child(2) { text-align: left; }
.sl-table tbody tr:hover td { background: var(--bg-hover); }
.sl-table td.sl-rank { color: var(--text-secondary); opacity: .8; font-weight: 700; }
.sl-table td.up { color: var(--up); font-weight: 600; }
.sl-table td.down { color: var(--down); font-weight: 600; }
.sl-table td.sl-mono { font-family: var(--font-mono, Consolas, Menlo, monospace); font-size: 12px; }
.sl-etf-name { display: block; font-size: 10.5px; color: var(--text-muted); }
.sl-row-hold td { background: var(--gold-soft); }
.sl-heat-cell { min-width: 130px; }
.sl-heatbar {
  display: inline-block; vertical-align: middle; width: 84px; height: 7px;
  border-radius: 4px; background: var(--bg-inset); overflow: hidden; margin-right: 6px;
}
.sl-heatbar i { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, var(--gold), var(--up)); }
.sl-heatnum { font-weight: 700; font-size: 12.5px; color: var(--text-primary); }
.sl-tags { text-align: left !important; }
.sl-tag {
  display: inline-block; padding: 1px 7px; margin: 1px 2px; border-radius: 9px;
  font-size: 10.5px; border: 1px solid var(--border-light); color: var(--text-secondary); opacity: .85;
}
.sl-tag.sl-gold { border-color: var(--gold); color: #f0d28a; opacity: 1; }
.sl-tag.sl-hot { border-color: var(--up); color: #ff9a90; opacity: 1; }
.sl-tag.sl-hold { border-color: var(--gold); background: var(--gold-soft); color: #f0d28a; opacity: 1; }
.sl-tag.sl-2 { border-color: #7aa2c8; color: #a9cdf0; opacity: 1; }
.sl-tag.sl-opt { border-color: var(--down); color: #7fe0a8; opacity: 1; }
.sl-row-rec td { background: rgba(212,167,44,.10); }
.sl-bt-note { margin-bottom: 12px; font-size: 12px; color: var(--text-secondary); line-height: 1.6; }
.sl-bt-note b { color: var(--gold); }
.sl-note { margin-top: 8px; font-size: 11.5px; color: var(--text-muted); line-height: 1.6; }
.sl-trades-wrap { max-height: 46vh; }
.sl-reason { font-size: 11.5px; color: var(--text-secondary); }

/* 板块涨停家数徽标 + 悬浮提示 */
.sl-zt-badge { cursor: help; color: var(--up); font-weight: 700; border-bottom: 1px dashed var(--up); white-space: nowrap; }
.sl-zt-zero { color: var(--text-muted); }
.sl-zt-tip { position: fixed; z-index: 99999; max-width: 260px; background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--r-md); padding: 8px 10px; font-size: 12px; line-height: 1.5; color: var(--text-primary); box-shadow: 0 8px 24px rgba(0,0,0,.45); pointer-events: none; display: none; }
.sl-zt-tip-h { font-weight: 700; margin-bottom: 4px; color: var(--text-primary); }
.sl-zt-list { margin: 0; padding-left: 16px; }
.sl-zt-list li { line-height: 1.8; }
.sl-zt-lb { color: var(--gold); font-size: 11px; margin-left: 2px; }
.sl-zt-empty { color: var(--text-muted); }
