/* ==================================================================
   村南资本 · 套利分析终端 —— 视觉美化版 (2026-09-09)
   ⚠️ 只改观感：CSS 变量名、类名、DOM 结构、交互逻辑一律未动。
      回滚：cp style.css.bak_20260909 style.css
   ================================================================== */

/* 自用工具 - 浅蓝灰底 + 深墨蓝顶栏 + 金铜点缀 */
:root {
  --bg: #eef3f8;
  --panel: #ffffff;
  --line: #d9e4ee;
  --line-strong: #c2d0dd;
  --text: #1f2a36;
  --text-sub: #5a6b7e;
  --accent: #2b6fb6;
  --accent-soft: #d6e6f4;
  --mark: #f0e9d8;
  --red: #e63946;
  --green: #2d6a4f;
  --orange: #e76f51;
  --blue: #457b9d;

  /* 新增：美化专用 */
  --ink: #101d2e;          /* 顶栏深墨蓝 */
  --ink-2: #1b3a5c;
  --gold: #d8b26a;         /* 金铜点缀 */
  --gold-2: #b98f45;
  --accent-hi: #3a86cf;
  --sh-sm: 0 1px 2px rgba(16, 32, 52, .05), 0 2px 8px rgba(16, 32, 52, .04);
  --sh-md: 0 4px 12px rgba(16, 32, 52, .10), 0 2px 4px rgba(16, 32, 52, .05);
  --sh-lg: 0 8px 26px rgba(12, 26, 44, .16);
  --r-lg: 14px;
  --r-md: 12px;
  --r-sm: 8px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  font-size: 13px; color: var(--text);
  /* 顶部略亮、向下过渡到浅蓝灰；fixed 保证滚动时渐变相对视口不动 */
  background: linear-gradient(180deg, #f6f9fd 0%, #eaf0f7 280px, #eaf0f7 100%);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
}

.app {
  max-width: 1600px; width: 95vw; margin: 0 auto; padding: 14px 20px 36px;
  position: relative; z-index: 1;
}

/* 顶栏 —— 深墨蓝渐变 + 悬浮 */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  background: linear-gradient(100deg, #101d2e 0%, #1b3a5c 55%, #22496f 100%);
  border: 1px solid #2a4568;
  border-radius: var(--r-lg);
  padding: 9px 16px; margin: 0 0 14px;
  box-shadow: var(--sh-lg);
  position: sticky; top: 0; z-index: 50;
}
/* 贴顶时遮住上方滚过的内容，避免出现"缝隙" */
.topbar::before {
  content: ''; position: absolute; left: -40px; right: -40px; top: -40px; height: 40px;
  background: #f6f9fd;   /* 必须等于 html 背景渐变的顶部色，贴顶后才无缝 */
}

.brand { display: flex; align-items: center; gap: 10px; font-weight: 600; }
/* 2026-09-13：品牌 logo 由 ♟ emoji 换为正式图标图（E4 数据流箭头） */
.brand-logo {
  width: 32px; height: 32px; flex: 0 0 32px;
  display: block;
  border-radius: 9px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .45);
}
.brand-name {
  font-size: 18px; font-weight: 700; color: #fff;
  letter-spacing: 2px;
}
.brand-tag {
  font-size: 11px; padding: 3px 9px; border-radius: 999px;
  background: rgba(216, 178, 106, .16);
  border: 1px solid rgba(216, 178, 106, .45);
  color: var(--gold); letter-spacing: 1px;
}
.nav { display: flex; gap: 4px; flex-wrap: wrap; }
.nav-item {
  font-size: 13.5px; padding: 7px 13px; border-radius: 8px;
  text-decoration: none; color: rgba(255, 255, 255, .74);
  transition: background .15s ease, color .15s ease, box-shadow .15s ease;
  white-space: nowrap;
}
.nav-item:hover { background: rgba(255, 255, 255, .11); color: #fff; }
.nav-item.active {
  background: linear-gradient(180deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, .10));
  color: #fff; font-weight: 600;
  box-shadow: inset 0 -2px 0 var(--gold), 0 1px 6px rgba(0, 0, 0, .18);
}
.nav-item.disabled { color: #6b7f96; cursor: not-allowed; }
.meta { display: flex; align-items: center; gap: 8px; }
.badge { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); }
.topbar .badge {
  background: rgba(255, 255, 255, .13); color: #eaf2fb;
  border: 1px solid rgba(255, 255, 255, .20);
}
.time { font-size: 13px; color: var(--text-sub); }
.topbar .time { color: rgba(255, 255, 255, .70); font-variant-numeric: tabular-nums; }

/* 页面头 */
.page-head {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 16px 18px 14px; margin-bottom: 12px;
  box-shadow: var(--sh-sm);
  position: relative; overflow: hidden;
}
.page-head::before {
  content: ''; position: absolute; left: 0; top: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--accent) 0%, #5aa9dd 45%, var(--gold) 100%);
}
.page-head h1 {
  margin: 0 0 14px; font-size: 19px; font-weight: 700; letter-spacing: .5px;
  display: flex; align-items: center; gap: 9px;
}
.page-head h1::before {
  content: ''; width: 4px; height: 17px; border-radius: 2px;
  background: linear-gradient(180deg, var(--accent), #6cb3e0);
}
.params { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.params label { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-sub); }
.params select {
  padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: #fff; font-size: 13px; min-width: 76px; color: var(--text);
  box-shadow: 0 1px 2px rgba(16, 32, 52, .04);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.params select:hover { border-color: #9dbbd6; }
.params select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(43, 111, 182, .16); }

.btn {
  padding: 7px 16px; border: 1px solid var(--line-strong);
  background: #fff; border-radius: var(--r-sm); font-size: 13px; cursor: pointer;
  color: var(--text); box-shadow: 0 1px 2px rgba(16, 32, 52, .05);
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover {
  background: #f2f7fc; border-color: #9dbbd6; color: var(--accent);
  transform: translateY(-1px); box-shadow: 0 4px 10px rgba(16, 32, 52, .10);
}
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(180deg, #3479c2, #215f9e); border-color: #215f9e; color: #fff;
  box-shadow: 0 2px 6px rgba(33, 95, 158, .28);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #3f8ad6, #2569ab); border-color: #2569ab; color: #fff;
  box-shadow: 0 6px 14px rgba(33, 95, 158, .32);
}

/* 快捷时间节点 */
.quick-marks {
  display: flex; gap: 7px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 11px 14px; margin-bottom: 12px;
  box-shadow: var(--sh-sm);
}
/* 跨期价差页的合约到期月快捷胶囊：将军 2026-09-09 指示「把这个去掉」→ 整行隐藏
   （只命中 #quick-marks；日历页 #cal-filters 是另一容器，不受影响） */
#quick-marks { display: none; }
.mark {
  font-size: 11px; padding: 4px 11px; border-radius: 999px;
  background: var(--mark); color: #7a5a1a; cursor: pointer;
  border: 1px solid #e3d7b3;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease;
}
.mark:hover { background: #e8dfc2; transform: translateY(-1px); box-shadow: 0 3px 8px rgba(122, 90, 26, .16); }

/* 图壳 */
.chart-shell {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 12px; margin-bottom: 12px;
  box-shadow: var(--sh-sm);
  transition: box-shadow .2s ease;
}
.chart-shell:hover { box-shadow: var(--sh-md); }
.chart { width: 100%; height: 700px; }

/* 摘要 */
.summary {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 14px 18px; font-size: 14px;
  color: var(--text-sub); box-shadow: var(--sh-sm); line-height: 1.8;
}

/* 底栏 */
.footer {
  margin-top: 22px; padding: 14px; font-size: 12px;
  color: var(--text-sub); text-align: center; letter-spacing: .5px;
  border-top: 1px solid var(--line);
}
.footer-beian { margin-top: 6px; }
.footer-beian a { color: var(--text-sub); text-decoration: none; border-bottom: 1px dashed currentColor; }
.footer-beian a:hover { color: var(--accent, #3b82f6); }
.footer-sep { margin: 0 6px; }

/* 统计卡片 */
.stat-card {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 10px 14px 11px;
  box-shadow: var(--sh-sm);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.stat-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: linear-gradient(180deg, var(--accent), #7fb6e0);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--sh-md); border-color: #c9dced; }
.stat-label {
  font-size: 12px; color: var(--text-sub); margin-bottom: 5px; letter-spacing: .3px;
}
.stat-value {
  font-size: 21px; font-weight: 700; color: var(--text);
  font-variant-numeric: tabular-nums; letter-spacing: .2px;
}

/* 导航项（可点击切换页） */
.nav-item { cursor: pointer; }
.nav-item.disabled { cursor: not-allowed; }

/* 扫描器表格 */
.scan-table {
  width: 100%; border-collapse: separate; border-spacing: 0;
  background: var(--panel); font-size: 12px;
  border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden;
  box-shadow: var(--sh-sm);
}
.scan-table th, .scan-table td {
  border: none; border-bottom: 1px solid var(--line); border-right: 1px solid #eef2f7;
  padding: 8px 10px; text-align: center; white-space: nowrap;
}
.scan-table th:last-child, .scan-table td:last-child { border-right: none; }
.scan-table thead th {
  background: linear-gradient(180deg, #e9f2fa, #dbe9f6);
  color: #1c3c5e; font-weight: 700; letter-spacing: .3px;
}
.scan-table tbody tr:nth-child(even) { background: #fafcfe; }
.scan-table tbody tr:hover { background: #eaf4fd; }
.scan-table tbody tr:last-child td { border-bottom: none; }
.scan-table td.lv-a { color: var(--green); font-weight: 700; font-size: 14px; }
.scan-table td.lv-b { color: #b8860b; font-weight: 700; font-size: 14px; }
.scan-table td.lv-c { color: var(--text-sub); font-weight: 700; }

/* ---------- 自由价差页 ---------- */
.leg-group {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 11px; border-radius: 10px;
  background: linear-gradient(180deg, #f8fbfe, #f1f6fb);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 #fff;
}
.leg-tag {
  font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  background: linear-gradient(180deg, #3d80c4, #215f9e); color: #fff;
  letter-spacing: .5px;
}
.leg-tag.b { background: linear-gradient(180deg, #8b6cb5, #6b4d92); }
.leg-op {
  font-size: 20px; font-weight: 700; color: var(--accent);
  padding: 0 4px; min-width: 22px; text-align: center;
}
/* 次图（当下合约对走势）比主图矮 */
.chart-sm { width: 100%; height: 400px; }
/* 图表小标题 */
.chart-cap {
  font-size: 12.5px; color: var(--text-sub); padding: 2px 6px 8px;
  letter-spacing: .3px;
}

/* ---------- 扫描器 Tab ---------- */
.tab-bar { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.tab {
  padding: 8px 18px; border: 1px solid var(--line-strong); border-radius: 999px;
  background: #fff; font-size: 13px; cursor: pointer; color: var(--text-sub);
  transition: transform .15s ease, box-shadow .15s ease, color .15s ease, border-color .15s ease;
}
.tab:hover { border-color: #9dbbd6; color: var(--accent); transform: translateY(-1px); }
.tab.active {
  background: linear-gradient(180deg, #3479c2, #215f9e); border-color: #215f9e;
  color: #fff; font-weight: 600;
  box-shadow: 0 3px 10px rgba(33, 95, 158, .26);
}
.tab .tab-n {
  display: inline-block; margin-left: 6px; padding: 0 7px; border-radius: 9px;
  background: rgba(255, 255, 255, .25); font-size: 12px;
}
.tab:not(.active) .tab-n { background: var(--accent-soft); color: var(--accent); }

/* ==================================================================
   扫描器进度条（2026-09-10 新增）
   将军反馈：点进扫描器后表格空白好几秒，以为卡死了。
   观感跟随 2026-09-09 美化版：渐变填充 + 卡片阴影 + 金铜点缀。
   ================================================================== */
.scan-progress {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-md); padding: 13px 16px 12px; margin-bottom: 10px;
  box-shadow: var(--sh-sm);
}
.sp-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 12px; margin-bottom: 10px;
}
.sp-title { font-size: 14px; font-weight: 600; color: var(--text); }
.sp-title.sp-done { color: var(--green); font-weight: 700; }
.sp-title.sp-warn { color: var(--red); font-weight: 700; }
.sp-meta {
  font-size: 12px; color: var(--text-sub);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.sp-meta b { font-size: 15px; color: var(--accent); }
.sp-title.sp-done ~ .sp-meta b { color: var(--green); }

.sp-track {
  height: 10px; border-radius: 999px; background: #e4ebf3;
  overflow: hidden; box-shadow: inset 0 1px 3px rgba(16, 32, 52, .10);
}
.sp-fill {
  height: 100%; width: 0%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-hi), #215f9e);
  box-shadow: 0 0 8px rgba(43, 111, 182, .35);
  transition: width .3s cubic-bezier(.4, 0, .2, 1);
}
.sp-fill.done {
  background: linear-gradient(90deg, #3f9c6d, #2a7a52);
  box-shadow: 0 0 8px rgba(45, 106, 79, .32);
}
.sp-fill.fail {
  background: linear-gradient(90deg, #ec6b76, #c62d3a);
  box-shadow: 0 0 8px rgba(230, 57, 70, .32);
}

/* 后端没给进度时的兜底：流光条纹，明确表示「在动，别急」 */
.sp-fill.indet {
  width: 100% !important;
  background: linear-gradient(90deg, #dce9f6 0%, var(--accent) 45%, #dce9f6 90%);
  background-size: 45% 100%; background-repeat: no-repeat;
  animation: sp-flow 1.15s linear infinite;
}
@keyframes sp-flow {
  0%   { background-position: -50% 0; }
  100% { background-position: 150% 0; }
}

.sp-sub {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  margin-top: 9px; font-size: 12px; color: var(--text-sub);
}
.sp-sub #sp-stage { flex: 1; min-width: 180px; color: var(--text); }
.sp-cnt { white-space: nowrap; font-variant-numeric: tabular-nums; }
.sp-cnt i { font-style: normal; color: #8a9bab; margin-right: 5px; }
.sp-cnt b { color: var(--accent); }

/* 扫描未出结果时口径提示条还是空的，别留一条空黄杠占位 */
#scan-notice:empty { display: none; }

/* 窄屏：进度条阶段文案允许换行，计数别挤成一团 */
@media (max-width: 600px) {
  .sp-sub #sp-stage { min-width: 100%; }
}

/* 口径提示条 */
.notice {
  background: linear-gradient(180deg, #fffaf0, #fff5e2);
  border: 1px solid #f2e2b8; border-left: 3px solid #e0b657;
  color: #7a5a1a;
  border-radius: 10px; padding: 10px 14px; font-size: 12px; margin-bottom: 12px;
  line-height: 1.75; box-shadow: var(--sh-sm);
}
.notice b { color: #6b4c0c; }

/* ==================================================================
   Tailwind 兼容层（2026-09-01 本地化）
   原先引 https://cdn.tailwindcss.com，国内云服务器访问不稳会整页错位。
   这里把 index.html 里实际用到的 12 个工具类按 Tailwind 原值手写一份，
   删掉 CDN 引用后视觉与原来完全一致，且零外网依赖。
   ⚠️ 全部用 px 定值而非 rem：本项目 html{font-size:13px}，若照抄 Tailwind 的 rem 值
   会被 13px 基准带偏（text-sm 变成 11.4px）。这里直接钉死为 Tailwind 默认 16px 基准
   下的目标像素，任何环境渲染结果完全一致。
   ================================================================== */
.text-sm { font-size: 14px; line-height: 20px; }
.text-xs { font-size: 12px; line-height: 16px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.px-6 { padding-left: 24px;  padding-right: 24px; }
.mt-3 { margin-top: 12px; }
.mb-3 { margin-bottom: 12px; }
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gap-3 { gap: 12px; }

/* md: 断点 = 768px（Tailwind 默认），仅在宽屏生效 */
@media (min-width: 768px) {
  .md\:grid-cols-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .md\:grid-cols-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

/* ==================================================================
   产业链套利 · 公式卡片 + 腿标签（2026-09-02 新增）
   ================================================================== */
.formula-card {
  margin-top: 14px;
  padding: 12px 16px;
  border: 1px solid var(--line); border-left: 3px solid var(--accent);
  border-radius: var(--r-md);
  background: linear-gradient(135deg, #fbfdff, #f3f8fc);
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.formula-text {
  font-family: 'Consolas, "Courier New", monospace';
  font-size: 15px;
  font-weight: 700;
  color: #d6336c;
  letter-spacing: .4px;
}
.formula-desc {
  font-size: 12px;
  color: var(--text-sub, #888);
  line-height: 1.6;
}
.legs-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 2px;
}
.leg-pill {
  display: inline-block;
  padding: 3px 11px;
  border: 1px solid #d5e2ee;
  border-radius: 999px;
  background: #fff;
  font-family: 'Consolas, "Courier New", monospace';
  font-size: 12px;
  color: #33475c;
  box-shadow: 0 1px 2px rgba(16, 32, 52, .04);
}

/* ==================================================================
   事件日历页（2026-09-06 新增 · page-calendar）
   ================================================================== */
.tag-cal {
  display: inline-block;
  padding: 0 7px; border-radius: 4px;
  font-size: 11px; font-weight: 700; margin-left: 4px;
  vertical-align: 1px;
}
.tag-cal.off    { background: #fdecec; color: #a93226; border: 1px solid #edc2c2; }
.tag-cal.due    { background: #fdf3e7; color: #a35f1a; border: 1px solid #ecd9b8; }
.tag-cal.tbd    { background: #f4f0fa; color: #6b4fa0; border: 1px solid #d9ccee; }
.tag-cal.sea    { background: #eaf3ef; color: #1e6b46; border: 1px solid #bfd9cb; }
.tag-cal.today  { background: #e63946; color: #fff; }
.tag-cal.t1     { background: #e76f51; color: #fff; }
.tag-cal.tn     { background: #2b6fb6; color: #fff; }
.tag-cal.star   { background: #b8860b; color: #fff; }
.level-a { display:inline-block; padding:1px 7px; border-radius:4px; font-size:11.5px;
           font-weight:700; background:#fff2d6; color:#8a6d1a; border:1px solid #ecd9a8; }

.cal-chip { cursor: pointer; user-select: none; transition: transform .15s ease; }
.cal-chip:hover { transform: translateY(-1px); }
.cal-chip.off { opacity: .45; text-decoration: line-through; }
.cal-chip.on  { background: #ffe9a8; border-color: #d8b95a; }

.cal-month {
  background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--r-lg); padding: 12px 16px; margin-bottom: 12px;
  box-shadow: var(--sh-sm); transition: box-shadow .2s ease;
}
.cal-month:hover { box-shadow: var(--sh-md); }
.cal-month.cur { border: 1px solid #b9a05e; box-shadow: 0 0 0 2px rgba(185, 160, 94, .12), var(--sh-sm); }
.cal-mhead {
  font-size: 14px; font-weight: 700; padding: 2px 4px 8px;
  border-bottom: 1px solid var(--line); margin-bottom: 4px;
}
.cal-cnt { float: right; font-size: 11px; font-weight: 400; color: var(--text-sub); }
.cal-empty { color: #9aa7b4; font-size: 12px; padding: 8px 4px; }

.cal-row {
  display: flex; align-items: baseline; gap: 10px;
  padding: 7px 6px; border-bottom: 1px dashed #eef1f4; font-size: 13px;
  flex-wrap: wrap; transition: background .15s ease;
}
.cal-row:hover { background: #f7fbff; }
.cal-row:last-child { border-bottom: none; }
.cal-row.hit { background: #fff7ec; }
.cal-row.vague { opacity: .8; }
.cal-d { min-width: 86px; font-weight: 700; color: var(--text); }
.cal-d i { font-style: normal; font-weight: 400; color: var(--text-sub); font-size: 11.5px; }
.cal-t { flex: 1; min-width: 260px; }
.cal-b { min-width: 52px; text-align: right; }
.cal-h { color: #7b8ca0; font-size: 12px; white-space: nowrap; }
.cal-f { white-space: nowrap; }
.cal-note { width: 100%; padding-left: 96px; color: var(--text-sub); font-size: 11.5px; }

/* ==================================================================
   下拉搜索组件（品种 / 协整组合选择器）—— 2026-09-15
   55 品种、72 组合逐个翻太慢：原生 <select> 被包一层，
   输入代码（ma）或中文名（甲醇）直接过滤。
   ================================================================== */
.ss { position: relative; display: inline-block; }
/* 原生 select 留在 DOM（.value / .options / change 事件照旧可用），只做视觉隐藏 */
.ss-native {
  position: absolute !important; width: 1px !important; height: 1px !important;
  min-width: 0 !important; padding: 0 !important; margin: 0 !important;
  border: 0 !important; opacity: 0 !important; pointer-events: none !important;
  clip: rect(0 0 0 0); overflow: hidden;
}
.ss-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 10px 7px 12px; min-width: 124px; max-width: 200px;
  border: 1px solid var(--line-strong); border-radius: var(--r-sm);
  background: #fff; font-size: 13px; color: var(--text); font-family: inherit;
  cursor: pointer; text-align: left; box-shadow: 0 1px 2px rgba(16, 32, 52, .04);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ss-btn:hover { border-color: #9dbbd6; }
.ss-open .ss-btn { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(43, 111, 182, .16); }
.ss-label { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-caret {
  flex: 0 0 auto; width: 0; height: 0;
  border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid #8a9bb0; transition: transform .15s ease;
}
.ss-open .ss-caret { transform: rotate(180deg); }

.ss-pop {
  position: fixed; z-index: 9999; display: none; box-sizing: border-box;
  background: #fff; border: 1px solid var(--line-strong); border-radius: 10px;
  box-shadow: 0 12px 34px rgba(16, 32, 52, .18); padding: 8px;
}
.ss-open .ss-pop { display: block; }
.ss-input {
  width: 100%; box-sizing: border-box; margin-bottom: 6px; padding: 7px 10px;
  border: 1px solid var(--line-strong); border-radius: 8px; outline: none;
  font-size: 13px; color: var(--text); font-family: inherit;
}
.ss-input::placeholder { color: #9aa9ba; }
.ss-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(43, 111, 182, .14); }
.ss-list { max-height: 320px; overflow-y: auto; overscroll-behavior: contain; }
.ss-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 7px 9px; border: 0; border-radius: 7px; background: transparent;
  font-size: 13px; color: var(--text); font-family: inherit;
  cursor: pointer; text-align: left; line-height: 1.4;
}
.ss-item .ss-name { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ss-item .ss-code {
  flex: 0 0 auto; padding: 1px 6px; border-radius: 5px; font-size: 11.5px;
  color: var(--text-sub); background: #f0f4f8; border: 1px solid #e2eaf2;
  font-variant-numeric: tabular-nums;
}
.ss-item.is-active { background: #eaf2fa; }
.ss-item.is-cur { color: var(--accent); font-weight: 600; }
.ss-item.is-cur .ss-code { color: var(--accent); background: var(--accent-soft); border-color: #bcd8ee; }
.ss-empty { padding: 14px 10px; text-align: center; font-size: 12.5px; color: var(--text-sub); }

/* ==================================================================
   滚动条美化
   ================================================================== */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: #e9eff5; }
::-webkit-scrollbar-thumb {
  background: #c3d3e2; border-radius: 6px; border: 2px solid #e9eff5;
}
::-webkit-scrollbar-thumb:hover { background: #a6bdd3; }

/* ==================================================================
   窄屏适配（手机 / 平板）—— 2026-09-09 随美化一并放开 viewport
   ================================================================== */
@media (max-width: 900px) {
  .app { width: 100%; padding: 10px 12px 28px; }
  .topbar { flex-wrap: wrap; gap: 10px; }
  .nav { width: 100%; }
  .chart { height: 520px; }
  .chart-sm { height: 340px; }
  .page-head h1 { font-size: 17px; }
}
@media (max-width: 600px) {
  .chart { height: 430px; }
  .stat-value { font-size: 18px; }
  .brand-name { font-size: 16px; letter-spacing: 1px; }
}
