/* ==========================================================================
   MMU · T+1 Quant — INS 极简科技风毛玻璃主题
   遵循 modern-web-guidance: dark-mode / tabs / responsive-table
   ========================================================================== */

:root {
  color-scheme: dark;

  --bg-canvas: #05070c;
  --glass-bg: rgba(13, 18, 28, 0.72);
  --glass-bg-strong: rgba(16, 22, 34, 0.86);
  --glass-inner: rgba(8, 12, 20, 0.68);
  --glass-hover: rgba(255, 255, 255, 0.06);

  --border-subtle: rgba(255, 255, 255, 0.085);
  --border-strong: rgba(255, 255, 255, 0.16);
  --specular: inset 0 1px 0 rgba(255, 255, 255, 0.07);

  --text-primary: #f8fafc;
  --text-secondary: #9aa8bc;
  --text-muted: #6c7c93;

  /* INS 科技极光渐变主色 */
  --accent: #5eead4;
  --accent-strong: #2dd4bf;
  --accent-cyan: #38bdf8;
  --accent-indigo: #818cf8;
  --accent-dim: rgba(94, 234, 212, 0.14);

  /* A股红涨绿跌语义色 */
  --up: #fb7185;
  --up-bg: rgba(251, 113, 133, 0.14);
  --down: #34d399;
  --down-bg: rgba(52, 211, 153, 0.14);
  --warn: #fbbf24;
  --warn-bg: rgba(251, 191, 36, 0.14);
  --danger: #f87171;
  --danger-bg: rgba(248, 113, 113, 0.16);
  --info: #38bdf8;
  --info-dim: rgba(56, 189, 248, 0.14);

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --radius-pill: 999px;
  --shadow-glass: 0 16px 44px rgba(0, 0, 0, 0.44);

  --scrollbar-track: #080c14;
  --scrollbar-thumb: #2b384d;

  accent-color: var(--accent-cyan);
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

*, *::before, *::after {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  overflow-x: clip;
  background-color: var(--bg-canvas);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", "PingFang SC", "Microsoft YaHei UI", sans-serif;
  font-size: 13.5px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---------- INS 极光氛围背景 ---------- */
.aurora-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background: radial-gradient(circle at 50% -10%, rgba(56, 189, 248, 0.08), transparent 55%);
}

.aurora-bg .orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(95px);
  opacity: 0.42;
}

.aurora-bg .orb-1 {
  width: 520px;
  height: 520px;
  top: -190px;
  left: -120px;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.36), transparent 70%);
}

.aurora-bg .orb-2 {
  width: 480px;
  height: 480px;
  top: -150px;
  right: -110px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.30), transparent 70%);
}

.aurora-bg .orb-3 {
  width: 420px;
  height: 420px;
  bottom: -180px;
  left: 38%;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.22), transparent 70%);
}

.container {
  position: relative;
  z-index: 1;
  width: min(1360px, 100% - 28px);
  margin-inline: auto;
}

.tabular {
  font-variant-numeric: tabular-nums;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- 顶部悬浮毛玻璃导航 ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(5, 7, 12, 0.72);
  backdrop-filter: blur(22px) saturate(150%);
  border-bottom: 1px solid var(--border-subtle);
}

.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 10px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-text {
  min-width: 0;
}

.brand-mark svg {
  width: 32px;
  height: 32px;
  display: block;
}

.brand-title-row {
  display: flex;
  align-items: center;
  gap: 9px;
}

.brand h1 {
  margin: 0;
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(120deg, #f8fafc 30%, #93c5fd 75%, #5eead4 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.pill-live {
  background: rgba(94, 234, 212, 0.12);
  color: var(--accent);
  border: 1px solid rgba(94, 234, 212, 0.30);
}

.pill-live::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.countdown-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
}

.countdown-label {
  font-size: 11.5px;
  color: var(--text-secondary);
}

.countdown-timer {
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
}

/* ---------- INS 胶囊按钮系统 ---------- */
.pill-group {
  display: inline-flex;
  align-items: center;
  padding: 3px;
  gap: 2px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
}

.pill-tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.16s ease, color 0.16s ease, transform 0.1s ease;
}

.pill-tab:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.pill-tab:active {
  transform: scale(0.97);
}

.pill-tab.is-active {
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.24), rgba(129, 140, 248, 0.24));
  color: #f8fafc;
  box-shadow: inset 0 0 0 1px rgba(147, 197, 253, 0.36);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-pill);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  white-space: nowrap;
  transition: background-color 0.16s ease, border-color 0.16s ease, transform 0.1s ease, box-shadow 0.16s ease;
}

.btn:active {
  transform: scale(0.97);
}

.btn:disabled {
  opacity: 0.52;
  cursor: not-allowed;
}

.btn-accent {
  background: linear-gradient(135deg, #38bdf8, #818cf8 55%, #2dd4bf);
  color: #04111a;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(56, 189, 248, 0.24);
}

.btn-accent:hover:not(:disabled) {
  filter: brightness(1.08);
  box-shadow: 0 8px 24px rgba(56, 189, 248, 0.36);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

.btn-glass:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.10);
  border-color: var(--border-strong);
}

.btn-icon-toggle {
  background: rgba(255, 255, 255, 0.04);
  color: var(--text-secondary);
  border-color: var(--border-subtle);
  padding: 6px 11px;
}

.btn-icon-toggle.is-on {
  background: rgba(94, 234, 212, 0.12);
  color: var(--accent);
  border-color: rgba(94, 234, 212, 0.34);
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.btn-xs {
  padding: 4px 10px;
  font-size: 11.5px;
}

.mini-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
}

.icon {
  width: 14px;
  height: 14px;
  flex: none;
}

.is-spinning .icon {
  animation: spin 0.7s linear infinite;
}

.btn-accent.is-done {
  background: linear-gradient(135deg, #10b981, #34d399);
  color: #03221a;
}

@keyframes flashGlow {
  0% { box-shadow: var(--specular), 0 0 0 1px rgba(94, 234, 212, 0.75), 0 0 26px rgba(56, 189, 248, 0.35); }
  100% { box-shadow: var(--specular), var(--shadow-glass); }
}

.just-refreshed {
  animation: flashGlow 0.85s ease-out;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- 主体与毛玻璃卡片 ---------- */
.main-content {
  padding-block: 16px 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.main-content > *,
.tabs-shell,
.tabpanels-stack,
.panel-inner,
.glass-card {
  min-width: 0;
  max-width: 100%;
}

.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(20px) saturate(140%);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--specular), var(--shadow-glass);
}

.notice-banner {
  padding: 10px 16px;
  border-radius: var(--radius-md);
  background: rgba(56, 189, 248, 0.10);
  border: 1px solid rgba(56, 189, 248, 0.30);
  color: #e0f2fe;
  font-size: 12.5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.notice-banner[hidden],
.toast[hidden],
.spotlight-card[hidden],
.spotlight-body[hidden],
.paper-open-strip[hidden] {
  display: none;
}

.eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  text-transform: uppercase;
}

.meta-chip {
  font-size: 11px;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border-subtle);
  padding: 2px 9px;
  border-radius: var(--radius-pill);
  white-space: nowrap;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.tag-ok { background: rgba(45, 212, 191, 0.14); color: #5eead4; border: 1px solid rgba(94, 234, 212, 0.30); }
.tag-info { background: var(--info-dim); color: #7dd3fc; border: 1px solid rgba(56, 189, 248, 0.30); }
.tag-warn { background: var(--warn-bg); color: #fde68a; border: 1px solid rgba(251, 191, 36, 0.30); }
.tag-danger { background: var(--danger-bg); color: #fca5a5; border: 1px solid rgba(248, 113, 113, 0.32); }
.tag-muted { background: rgba(255, 255, 255, 0.07); color: #cbd5e1; border: 1px solid rgba(255, 255, 255, 0.12); }

.txt-up { color: var(--up); }
.txt-down { color: var(--down); }
.txt-flat { color: var(--text-secondary); }

/* ---------- 1. 顶部置顶 14:45 精选 ---------- */
.spotlight-card {
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
  border-color: rgba(129, 140, 248, 0.28);
  background: linear-gradient(155deg, rgba(99, 102, 241, 0.10), rgba(13, 18, 28, 0.78) 46%);
}

.spotlight-card.spot-level-green {
  border-color: rgba(94, 234, 212, 0.38);
  background: linear-gradient(155deg, rgba(45, 212, 191, 0.12), rgba(13, 18, 28, 0.78) 46%);
}

.spotlight-card.spot-level-red {
  border-color: rgba(251, 113, 133, 0.34);
}

.spotlight-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.spotlight-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.spotlight-pin {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 700;
  color: #f8fafc;
}

.spotlight-pin::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #38bdf8, #5eead4);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.8);
  flex: none;
}

.spotlight-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.spotlight-body {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.spot-summary-bar {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.spot-sum-card {
  padding: 11px 14px;
  border-radius: var(--radius-md);
  background: var(--glass-inner);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
}

.spot-sum-card.is-highlight {
  border-color: rgba(56, 189, 248, 0.30);
  background: linear-gradient(155deg, rgba(56, 189, 248, 0.10), rgba(8, 12, 20, 0.78));
}

.spot-sum-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
  color: var(--text-secondary);
}

.spot-sum-val {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #f8fafc;
}

.spot-sum-val small {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: 2px;
}

.spot-sum-val.val-high { color: #5eead4; }
.spot-sum-val.val-mid { color: #7dd3fc; }
.spot-sum-val.val-neutral { color: #fde68a; }
.spot-sum-val.val-low { color: #fca5a5; }
.spot-sum-val.val-sm { font-size: 15.5px; letter-spacing: -0.01em; line-height: 1.25; }

.spot-sum-sub {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spot-sum-sub strong {
  color: #fde68a;
}

.spotlight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.spotlight-grid.is-single {
  grid-template-columns: 1fr;
}

.spot-col {
  background: var(--glass-inner);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  min-width: 0;
}

.spot-col[hidden] {
  display: none;
}

.spot-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.spot-col-title {
  font-size: 13px;
  font-weight: 700;
  color: #f1f5f9;
}

.spot-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.spot-item {
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(18, 24, 38, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.075);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: border-color 0.16s ease, transform 0.14s ease;
}

.spot-item:hover {
  border-color: rgba(147, 197, 253, 0.24);
}

.spot-item.is-strict {
  border-color: rgba(94, 234, 212, 0.28);
  background: linear-gradient(155deg, rgba(45, 212, 191, 0.08), rgba(18, 24, 38, 0.76));
}

.spot-item.is-danger {
  border-color: rgba(248, 113, 113, 0.28);
}

.spot-row-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.spot-stock {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}

.spot-name {
  font-size: 14.5px;
  font-weight: 700;
  color: #f8fafc;
  white-space: nowrap;
}

.spot-code {
  font-size: 11px;
  color: var(--text-muted);
}

.spot-px-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.spot-price {
  font-size: 14px;
  font-weight: 700;
  color: #f8fafc;
}

.spot-kpi-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.38fr);
  gap: 8px;
}

.spot-conf-box {
  padding: 8px 9px;
  border-radius: 11px;
  background: rgba(5, 8, 14, 0.64);
  border: 1px solid rgba(255, 255, 255, 0.06);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 5px;
  min-width: 0;
}

.spot-kpi-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  font-size: 10.5px;
  color: var(--text-muted);
  white-space: nowrap;
}

.spot-conf-num {
  font-size: 21px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
}

.spot-conf-num small {
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: 1px;
}

.spot-conf-num.tier-high { color: #5eead4; }
.spot-conf-num.tier-mid { color: #7dd3fc; }
.spot-conf-num.tier-neutral { color: #fde68a; }
.spot-conf-num.tier-low { color: #fca5a5; }

.spot-conf-track {
  height: 5px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.spot-sell-box {
  padding: 8px 9px;
  border-radius: 11px;
  background: linear-gradient(145deg, rgba(251, 191, 36, 0.09), rgba(56, 189, 248, 0.05));
  border: 1px solid rgba(251, 191, 36, 0.24);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
}

.spot-sell-range {
  font-size: 15px;
  font-weight: 800;
  color: #fde68a;
  line-height: 1.15;
  white-space: nowrap;
}

.spot-sell-pct {
  font-size: 10.5px;
  font-weight: 600;
  color: #fcd34d;
  margin-left: 3px;
}

.spot-profit-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
  font-size: 11px;
}

.spot-profit-val {
  color: #5eead4;
  font-weight: 700;
}

.spot-stop-val {
  color: var(--text-secondary);
}

.spot-track-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
  padding: 5px 9px;
  border-radius: 9px;
  background: rgba(56, 189, 248, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.22);
  font-size: 11px;
}

.spot-track-label {
  color: #7dd3fc;
  font-weight: 700;
}

.spot-track-vals {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.spot-row-bot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.spot-meta {
  font-size: 11px;
  color: var(--text-secondary);
}

.spot-empty {
  padding: 18px 8px;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

/* ---------- 2. 大盘信号 + 四大指数 ---------- */
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 14px;
}

.verdict-card {
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
}

.verdict-card.level-green { border-color: rgba(94, 234, 212, 0.36); }
.verdict-card.level-green .signal-dot { background: #2dd4bf; box-shadow: 0 0 0 5px rgba(45, 212, 191, 0.16), 0 0 16px #2dd4bf; }
.verdict-card.level-green .verdict-badge { color: #5eead4; }

.verdict-card.level-yellow { border-color: rgba(251, 191, 36, 0.30); }
.verdict-card.level-yellow .signal-dot { background: #fbbf24; box-shadow: 0 0 0 5px rgba(251, 191, 36, 0.14), 0 0 16px #fbbf24; }
.verdict-card.level-yellow .verdict-badge { color: #fde68a; }

.verdict-card.level-red { border-color: rgba(251, 113, 133, 0.36); }
.verdict-card.level-red .signal-dot { background: #fb7185; box-shadow: 0 0 0 5px rgba(251, 113, 133, 0.16), 0 0 16px #fb7185; }
.verdict-card.level-red .verdict-badge { color: #fda4af; }

.verdict-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.verdict-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}

.signal-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  flex: none;
  margin-left: 3px;
}

.verdict-badge {
  margin: 2px 0 0;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.meta-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.verdict-chips {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.breadth-block {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.breadth-bar {
  display: flex;
  height: 7px;
  border-radius: var(--radius-pill);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
  gap: 2px;
}

.breadth-seg { height: 100%; transition: width 0.35s ease; }
.breadth-up { background: linear-gradient(90deg, #f43f5e, #fb7185); }
.breadth-flat { background: #64748b; }
.breadth-down { background: linear-gradient(90deg, #10b981, #34d399); }

.breadth-legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11.5px;
  color: var(--text-secondary);
}

.breadth-legend strong { color: var(--text-primary); }

.dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 4px;
  vertical-align: middle;
}
.dot-up { background: var(--up); }
.dot-flat { background: #64748b; }
.dot-down { background: var(--down); }

.hero-quick-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.indices-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.idx-card {
  padding: 13px 15px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 5px;
}

.idx-anchor {
  border-color: rgba(56, 189, 248, 0.30);
  background: linear-gradient(155deg, rgba(56, 189, 248, 0.09), var(--glass-bg) 72%);
}

.idx-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.idx-name {
  font-size: 12.5px;
  font-weight: 700;
  color: #e2e8f0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.anchor-tag {
  font-style: normal;
  font-size: 10px;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: var(--info-dim);
  color: #7dd3fc;
}

.idx-code {
  font-size: 10.5px;
  color: var(--text-muted);
}

.idx-price {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.idx-chg {
  font-size: 12px;
  font-weight: 600;
}

/* ---------- 3. 按钮化控制条 ---------- */
.controls-bar {
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.ctrl-cluster {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.ctrl-k {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
}

.mini-input {
  width: 78px;
  padding: 5px 9px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: rgba(5, 8, 14, 0.72);
  color: var(--text-primary);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.mini-input:focus,
.watchlist-form input:focus {
  outline: 2px solid rgba(56, 189, 248, 0.55);
  outline-offset: 1px;
  border-color: var(--accent-cyan);
}

.budget-summary {
  font-size: 12px;
  color: var(--text-secondary);
  padding: 4px 12px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
}

.budget-summary strong {
  color: var(--accent);
}

/* ---------- 4. Tabs（遵循 modern-web-guidance tabs） ---------- */
.tabs-shell {
  display: flex;
  flex-direction: column;
}

.tablist {
  display: flex;
  align-items: stretch;
  gap: 4px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: inline proximity;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 12px;
  scrollbar-width: none;
}

.tablist::-webkit-scrollbar {
  display: none;
}

[role="tab"] {
  position: relative;
  flex: none;
  scroll-snap-align: start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 15px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s ease;
}

[role="tab"]:hover {
  color: var(--text-primary);
}

[role="tab"]:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: -3px;
  border-radius: 8px;
}

[role="tab"][aria-selected="true"] {
  color: var(--accent);
}

[role="tab"][aria-selected="true"]::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  border-block-end: 3px solid var(--accent);
}

.tab-count {
  font-size: 11px;
  padding: 1px 7px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text-secondary);
}

[role="tab"][aria-selected="true"] .tab-count {
  background: rgba(94, 234, 212, 0.16);
  color: var(--accent);
}

.tab-count-paper {
  font-weight: 700;
}

/* tabpanel 本体不加 padding/border/margin/bg，全部放到 .panel-inner */
.tabpanels-stack {
  display: block;
}

.panel-inner {
  padding: 16px 18px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.panel-title-group {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.panel-header h3 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
}

/* ---------- 信心与卖价组件 ---------- */
.conf-pill {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  font-size: 10.5px;
  font-weight: 700;
  white-space: nowrap;
}

.conf-high { background: rgba(45, 212, 191, 0.18); color: #5eead4; border: 1px solid rgba(94, 234, 212, 0.34); }
.conf-mid { background: rgba(56, 189, 248, 0.16); color: #7dd3fc; border: 1px solid rgba(56, 189, 248, 0.32); }
.conf-neutral { background: rgba(251, 191, 36, 0.14); color: #fde68a; border: 1px solid rgba(251, 191, 36, 0.28); }
.conf-low { background: rgba(248, 113, 113, 0.15); color: #fca5a5; border: 1px solid rgba(248, 113, 113, 0.32); }

.conf-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 92px;
}

.conf-cell-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.conf-bar-track {
  height: 5px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.conf-bar-fill { height: 100%; border-radius: var(--radius-pill); }
.conf-bar-high { background: linear-gradient(90deg, #14b8a6, #5eead4); }
.conf-bar-mid { background: linear-gradient(90deg, #38bdf8, #818cf8); }
.conf-bar-neutral { background: linear-gradient(90deg, #f59e0b, #fde68a); }
.conf-bar-low { background: linear-gradient(90deg, #ef4444, #fb7185); }

.sell-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 148px;
}

.sell-target-line {
  font-size: 12px;
  font-weight: 700;
  color: #fde68a;
  white-space: nowrap;
}

.sell-stop-line {
  font-size: 11px;
  color: var(--text-secondary);
  white-space: nowrap;
}

.sell-win-line {
  font-size: 10.5px;
  color: var(--text-muted);
}

/* ---------- 独立 Tab：¥10K 模拟盘 ---------- */
.paper-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.paper-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.paper-kpi {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--glass-inner);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.paper-kpi-label {
  font-size: 11px;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.paper-kpi-val {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #f8fafc;
}

.paper-kpi-val.val-sm {
  font-size: 15.5px;
  letter-spacing: -0.01em;
}

.paper-kpi-sub {
  font-size: 11px;
  color: var(--text-secondary);
}

.paper-open-strip {
  padding: 10px 14px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(94, 234, 212, 0.08));
  border: 1px solid rgba(94, 234, 212, 0.30);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
}

.paper-open-main {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.paper-body-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
  gap: 12px;
}

.paper-chart-panel,
.paper-trades-panel {
  background: var(--glass-inner);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.paper-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.paper-subtitle {
  font-size: 13px;
  font-weight: 700;
  color: #e2e8f0;
}

.chart-legend {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  color: var(--text-secondary);
}

.leg-dot {
  display: inline-block;
  width: 9px;
  height: 3px;
  border-radius: 2px;
  margin-right: 4px;
  vertical-align: middle;
}
.leg-port { background: #fb7185; }
.leg-bench { background: #38bdf8; }

.chart-readout {
  font-size: 11.5px;
  color: #cbd5e1;
  padding: 5px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-subtle);
}

.paper-svg-wrap {
  width: 100%;
  flex: 1 1 auto;
  min-height: 205px;
}

.paper-svg {
  width: 100%;
  height: auto;
  display: block;
}

.paper-table-wrap {
  max-block-size: 320px;
}

/* ---------- 自选排雷表单 ---------- */
.watchlist-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.watchlist-form input {
  flex: 1 1 240px;
  min-width: 180px;
  padding: 7px 14px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: rgba(5, 8, 14, 0.72);
  color: var(--text-primary);
  font: inherit;
  font-size: 13px;
}

.chips-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  font-size: 12px;
  color: #e2e8f0;
}

.chip button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 0 2px;
  font-size: 14px;
  line-height: 1;
}

.chip button:hover {
  color: var(--danger);
}

/* ---------- 响应式表格（遵循 modern-web-guidance responsive-table） ---------- */
.table-wrapper {
  overflow: auto;
  max-inline-size: 100%;
  max-block-size: min(560px, 72vh);
  container-type: inline-size;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: rgba(8, 12, 20, 0.74);
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

.table-wrapper:focus-visible {
  outline: 2px solid var(--accent-cyan);
  outline-offset: 2px;
}

.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 12.5px;
}

.data-table thead {
  position: sticky;
  inset-block-start: 0;
  z-index: 2;
}

.data-table thead th {
  background: #0e1522;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 11.5px;
  text-align: left;
  padding: 9px 9px;
  border-bottom: 1px solid var(--border-strong);
  white-space: nowrap;
}

.data-table th.num,
.data-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.data-table tbody th,
.data-table tbody td {
  padding: 9px 9px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  vertical-align: middle;
}

.data-table tbody th {
  position: sticky;
  inset-inline-start: 0;
  z-index: 1;
  background: #0b101b;
  text-align: left;
  font-weight: 600;
  min-width: 122px;
}

.data-table tbody tr:hover th,
.data-table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.045);
}

.data-table tbody tr.row-danger th,
.data-table tbody tr.row-danger td {
  background: rgba(248, 113, 113, 0.06);
}

.data-table tbody tr.row-strict th,
.data-table tbody tr.row-strict td {
  background: rgba(45, 212, 191, 0.05);
}

.stock-cell {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.stock-name {
  color: #f8fafc;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
}

.stock-meta {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}

.pct-pill {
  display: inline-block;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 12px;
}

.pct-up { color: var(--up); background: var(--up-bg); }
.pct-down { color: var(--down); background: var(--down-bg); }
.pct-flat { color: var(--text-secondary); background: rgba(255, 255, 255, 0.08); }

.tip-cell {
  color: var(--text-secondary);
  font-size: 11.5px;
  max-width: 220px;
}

.action-cell {
  display: flex;
  gap: 5px;
  white-space: nowrap;
}

.empty-cell {
  text-align: center;
  padding: 28px 16px !important;
  color: var(--text-secondary);
}

.cols-stock {
  --label-2: "信心指数";
  --label-3: "现价";
  --label-4: "涨跌幅";
  --label-5: "换手率";
  --label-6: "PE";
  --label-7: "成交额";
  --label-8: "建议手数";
  --label-9: "信号";
  --label-10: "次日建议卖";
  --label-11: "操作";
}

.cols-watchlist {
  --label-2: "评级/信心";
  --label-3: "现价";
  --label-4: "涨跌幅";
  --label-5: "换手率";
  --label-6: "PE";
  --label-7: "成交额";
  --label-8: "排雷明细";
  --label-9: "次日建议卖";
  --label-10: "操作";
}

.cols-paper {
  --label-2: "状态";
  --label-3: "买入";
  --label-4: "股数/金额";
  --label-5: "卖出/现价";
  --label-6: "税费";
  --label-7: "净盈亏";
}

.cols-history {
  --label-2: "策略池";
  --label-3: "买价";
  --label-4: "当日涨跌";
  --label-5: "09:30";
  --label-6: "10:00";
  --label-7: "11:30";
  --label-8: "15:00";
}

@container (width < 720px) {
  .data-table,
  .data-table thead,
  .data-table tbody,
  .data-table tr,
  .data-table th,
  .data-table td {
    display: block;
  }

  .data-table thead {
    display: none;
  }

  .data-table tbody {
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .data-table tbody tr {
    border: 1px solid var(--border-subtle);
    border-radius: 14px;
    overflow: hidden;
    background: rgba(15, 21, 33, 0.85);
  }

  .data-table tbody th {
    position: sticky;
    inset-block-start: 0;
    inset-inline-start: auto;
    z-index: 2;
    background: #121a2a;
    border-bottom: 1px solid var(--border-subtle);
    padding: 9px 12px;
  }

  .data-table tbody td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: right !important;
    padding: 7px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  }

  .data-table tbody td:last-child {
    border-bottom: 0;
  }

  .data-table tbody td.empty-cell {
    display: block;
    text-align: center !important;
  }

  .data-table tbody td.empty-cell::before {
    content: none !important;
  }

  .data-table tbody td::before {
    color: var(--text-muted);
    font-size: 11.5px;
    font-weight: 600;
    text-align: left;
    flex: none;
  }

  .data-table td:nth-child(2)::before { content: var(--label-2) ": "; }
  .data-table td:nth-child(3)::before { content: var(--label-3) ": "; }
  .data-table td:nth-child(4)::before { content: var(--label-4) ": "; }
  .data-table td:nth-child(5)::before { content: var(--label-5) ": "; }
  .data-table td:nth-child(6)::before { content: var(--label-6) ": "; }
  .data-table td:nth-child(7)::before { content: var(--label-7) ": "; }
  .data-table td:nth-child(8)::before { content: var(--label-8) ": "; }
  .data-table td:nth-child(9)::before { content: var(--label-9) ": "; }
  .data-table td:nth-child(10)::before { content: var(--label-10) ": "; }
  .data-table td:nth-child(11)::before { content: var(--label-11) ": "; }

  .tip-cell,
  .sell-cell {
    max-width: none;
    align-items: flex-end;
  }
}

/* ---------- 历史时间线与折叠速查 ---------- */
.schedule-timeline {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 14px;
}

.tl-step {
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--glass-inner);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tl-step.tl-primary {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.36);
}

.tl-time { font-size: 12px; font-weight: 700; color: var(--accent); }
.tl-name { font-size: 11px; color: var(--text-secondary); }

.history-list { display: flex; flex-direction: column; gap: 12px; }

.history-card {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: var(--glass-inner);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.history-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.history-card-title {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
  font-weight: 700;
  font-size: 13px;
}

.playbook-details {
  padding: 0;
  overflow: hidden;
}

.playbook-summary {
  padding: 13px 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 600;
  color: #e2e8f0;
  list-style: none;
}

.playbook-summary::-webkit-details-marker { display: none; }
.playbook-summary-title { display: inline-flex; align-items: center; gap: 8px; }
.playbook-icon { color: var(--accent-cyan); }
.summary-hint { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--text-muted); }
.chevron-icon { transition: transform 0.2s ease; }
.playbook-details[open] .chevron-icon { transform: rotate(180deg); }

.playbook-grid {
  padding: 0 18px 16px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.playbook-item {
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--glass-inner);
  border: 1px solid var(--border-subtle);
}

.playbook-item h4 { margin: 0 0 5px; font-size: 13px; color: var(--accent); }
.playbook-item p { margin: 0; font-size: 12px; color: var(--text-secondary); line-height: 1.55; }
.playbook-item strong { color: var(--text-primary); }

.footer {
  padding-block: 4px 26px;
  text-align: center;
  font-size: 11.5px;
  color: var(--text-muted);
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 22px;
  z-index: 60;
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  background: rgba(15, 23, 38, 0.92);
  backdrop-filter: blur(16px);
  border: 1px solid rgba(94, 234, 212, 0.40);
  color: #f8fafc;
  font-size: 12.5px;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
}

@supports not (scrollbar-color: auto) {
  .table-wrapper { scrollbar-width: auto; }
  .table-wrapper::-webkit-scrollbar { width: 8px; height: 8px; }
  .table-wrapper::-webkit-scrollbar-thumb { background: var(--scrollbar-thumb); border-radius: 999px; }
  .table-wrapper::-webkit-scrollbar-track { background: var(--scrollbar-track); }
}

@media (max-width: 1040px) {
  .hero-grid,
  .paper-body-grid,
  .spotlight-grid,
  .playbook-grid {
    grid-template-columns: 1fr;
  }
  .spot-summary-bar,
  .paper-kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .schedule-timeline {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .container { width: calc(100% - 20px); }
  .topbar-inner { gap: 8px; padding-block: 9px; }
  .topbar-actions { width: 100%; justify-content: space-between; gap: 6px; }
  .countdown-pill { width: 100%; justify-content: space-between; }
  .pill-tab { padding: 5px 9px; font-size: 11.5px; }
  .btn { padding: 6px 11px; font-size: 12px; }
  .spotlight-card,
  .verdict-card,
  .panel-inner { padding: 14px 12px; }
  .spot-sum-card,
  .paper-kpi { padding: 10px 10px; }
  .spot-sum-val,
  .paper-kpi-val { font-size: 18px; }
  .spot-sum-val.val-sm,
  .paper-kpi-val.val-sm { font-size: 14px; }
  .spot-kpi-grid { grid-template-columns: minmax(0, 0.76fr) minmax(0, 1.34fr); gap: 6px; }
  .spot-sell-range { font-size: 13.5px; white-space: normal; }
  .spot-sell-pct { display: inline-block; margin-left: 0; }
  .indices-grid { gap: 8px; }
  .idx-card { padding: 11px 12px; }
  .idx-price { font-size: 18px; }
  .controls-bar { padding: 10px 12px; gap: 8px; }
  .ctrl-cluster { width: 100%; justify-content: space-between; }
  .budget-summary { width: 100%; text-align: center; }
  .schedule-timeline { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
