/* ================================================================
   Jacky Research — Shared Design System
   所有页面统一引用: <link rel="stylesheet" href="shared.css">
   ================================================================ */

/* ── CSS VARIABLES ── */
:root {
  /* 背景 */
  --bg: #1a1a1a;
  --surface: #232323;
  --surface-raised: #2a2a2a;
  --surface-hover: #303030;

  /* 边框 */
  --border: rgba(255,255,255,0.08);
  --border-hover: rgba(255,255,255,0.14);

  /* 文字 */
  --text: #ececec;
  --text-secondary: #a0a0a0;
  --text-tertiary: #6b6b6b;

  /* 主色 */
  --accent: #d97757;
  --accent-soft: rgba(217,119,87,0.12);
  --accent-hover: rgba(217,119,87,0.18);

  /* 涨跌 */
  --green: #3fb68b;
  --red: #ef6461;
  --green-soft: rgba(63,182,139,0.10);
  --red-soft: rgba(239,100,97,0.10);

  /* 圆角 */
  --radius: 16px;
  --radius-sm: 10px;
  --radius-xs: 6px;

  /* 字体 */
  --title: "Microsoft YaHei", "微软雅黑", "PingFang SC", sans-serif;
  --body: "KaiTi", "Kaiti SC", "STKaiti", "楷体", serif;
  --eng: "Arial", "Helvetica Neue", sans-serif;
  --mono: "Arial", "Helvetica Neue", sans-serif;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: var(--body);
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

/* ── TYPOGRAPHY ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--title);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  line-height: 1.3;
}

h1 { font-size: clamp(28px, 3.5vw, 48px); line-height: 1.1; }
h2 { font-size: 20px; }
h3 { font-size: 16px; }

/* 英文、数字用 Arial */
.num,
strong[data-num],
[data-index-price],
[data-index-change],
.turnover-total-value,
.metric-card strong,
.stat-tile strong,
.gex-stat strong,
.watch-card .meta-line,
.stock-top span,
.sector-top span,
.ticker-main,
.ticker-delta,
.clock {
  font-family: var(--eng);
}

/* ── LAYOUT SHELL ── */
.shell {
  width: min(1400px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 20px 0 120px;
}

/* ── TOPBAR ── */
.topbar {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 20px;
  padding: 12px 20px;
  margin-bottom: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  transition: opacity 0.2s;
}

.brand:hover { opacity: 0.8; }

.mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-xs);
  background: var(--accent);
  color: white;
  font-family: var(--title);
  font-size: 15px;
  font-weight: 600;
}

.brand strong {
  font-family: var(--title);
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

/* ── NAV ── */
.nav {
  display: flex;
  gap: 4px;
  justify-self: end;
}

.nav a {
  padding: 7px 14px;
  border-radius: var(--radius-xs);
  font-size: 13px;
  font-family: var(--body);
  font-weight: 500;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.nav a:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.nav a.active {
  color: var(--text);
  background: var(--surface-raised);
  border: 1px solid var(--border);
}

/* ── LABELS / EYEBROW ── */
.eyebrow,
.meta,
.label {
  color: var(--text-secondary);
  font-family: var(--eng);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--accent);
  font-weight: 600;
}

.clock {
  font-family: var(--eng);
  color: var(--text-tertiary);
  font-size: 12px;
}

/* ── STATUS BAR ── */
.status-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 4px;
  margin-bottom: 20px;
  font-size: 12px;
  font-family: var(--eng);
  color: var(--text-tertiary);
}

.status-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  flex-shrink: 0;
}

/* ── LAYOUT GRID ── */
.layout {
  display: grid;
  grid-template-columns: 360px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.sidebar {
  display: grid;
  gap: 16px;
  position: sticky;
  top: 20px;
}

.content {
  display: grid;
  gap: 16px;
}

/* ── PANELS ── */
.panel {
  padding: 20px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}

.panel:hover {
  border-color: var(--border-hover);
}

.panel h2 { margin: 6px 0 0; }
.panel h3 { margin: 4px 0 0; }

.panel p {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 1.7;
}

/* ── SUB PANEL ── */
.sub-panel {
  padding: 18px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s;
}

.sub-panel:hover {
  border-color: var(--border-hover);
}

.sub-panel p {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

/* ── HERO ── */
.hero {
  border-radius: var(--radius);
  padding: 24px;
  display: grid;
  gap: 16px;
  margin-bottom: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
}

.hero p {
  margin: 0;
  max-width: 800px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.7;
}

/* ── TABS ── */
.tab-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 12px 0 10px;
}

.tab-switch {
  display: flex;
  gap: 4px;
  background: rgba(255,255,255,0.04);
  border-radius: var(--radius-xs);
  padding: 3px;
}

.tab-pill {
  padding: 5px 12px;
  border-radius: 4px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-family: var(--body);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.tab-pill:hover { color: var(--text); }

.tab-pill.active {
  color: var(--text);
  background: var(--surface-hover);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.dashboard-view-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.dashboard-view-nav a {
  padding: 6px 14px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-family: var(--body);
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  transition: all 0.2s;
}

.dashboard-view-nav a.active,
.dashboard-view-nav a:hover {
  color: var(--text);
  background: var(--surface-hover);
  border-color: var(--border-hover);
}

/* ── TABLE / ROW ── */
.table {
  display: grid;
  gap: 0;
  margin-top: 14px;
}

.row {
  display: grid;
  grid-template-columns: 1.6fr 0.9fr 0.9fr 0.9fr;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
  font-size: 13px;
}

.row:last-child { border-bottom: none; }
.row strong { font-weight: 500; }

/* ── TURNOVER ── */
.turnover-total {
  text-align: left;
  padding: 16px 0 14px;
  border-bottom: 1px solid var(--border);
}

.turnover-total-label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.turnover-total-value {
  display: block;
  font-family: var(--eng);
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.03em;
  color: var(--text);
  line-height: 1.1;
}

.turnover-adline {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-secondary);
}

.turnover-adline .ad-item {
  display: flex;
  gap: 4px;
  align-items: center;
  font-family: var(--eng);
  font-size: 12px;
}

/* ── UP / DOWN ── */
.up { color: var(--red); }
.down { color: var(--green); }

/* ── CARDS ── */
.metric-card,
.watch-card,
.table-card {
  padding: 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-raised);
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}

.metric-card:hover,
.watch-card:hover {
  border-color: var(--border-hover);
}

.metric-card strong {
  display: block;
  margin-top: 10px;
  font-family: var(--eng);
  font-size: 28px;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.03em;
}

.metric-card span {
  display: block;
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.watch-card strong {
  display: block;
  margin-top: 8px;
  font-family: var(--title);
  font-size: 18px;
  font-weight: 600;
}

.watch-card p {
  margin: 8px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.watch-card .meta-line {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-secondary);
  font-family: var(--eng);
}

/* ── STAT TILES ── */
.ashare-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.stat-tile {
  padding: 16px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.stat-tile strong {
  display: block;
  margin-top: 8px;
  font-family: var(--eng);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.stat-tile small,
.stat-tile span {
  display: block;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.stat-sparkline {
  margin-top: 10px;
  height: 44px;
  border-radius: var(--radius-xs);
  overflow: hidden;
  background: rgba(255,255,255,0.03);
}

.stat-sparkline svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ── STOCK LINK ── */
.stock-link {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: var(--radius-xs);
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  transition: all 0.2s;
}

.stock-link:hover {
  background: rgba(255,255,255,0.04);
  border-color: var(--border-hover);
  transform: translateY(-1px);
}

.stock-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 10px;
}

.stock-top strong {
  font-size: 14px;
  font-family: var(--title);
  font-weight: 500;
}

.stock-top span {
  font-family: var(--eng);
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
}

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

.stock-meta span {
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.04);
  font-size: 11px;
  font-family: var(--eng);
  color: var(--text-secondary);
}

.stock-turnover,
.sector-turnover,
.limit-time {
  font-family: var(--eng);
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
}

/* ── SECTOR ── */
.sector-list,
.stock-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.sector-item {
  border-radius: var(--radius-xs);
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: border-color 0.2s;
}

.sector-item:hover {
  border-color: var(--border-hover);
}

.sector-summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  display: grid;
  gap: 8px;
  transition: background 0.15s;
}

.sector-summary:hover {
  background: rgba(255,255,255,0.02);
}

.sector-summary::-webkit-details-marker {
  display: none;
}

.sector-top {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
}

.sector-top strong {
  font-size: 14px;
  font-family: var(--title);
  font-weight: 500;
  line-height: 1.3;
}

.sector-top span {
  font-family: var(--eng);
  font-size: 13px;
  font-weight: 500;
}

.sector-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.sector-tags span {
  padding: 3px 8px;
  border-radius: 4px;
  background: rgba(255,255,255,0.05);
  font-size: 11px;
  color: var(--text-secondary);
}

.core-stock-list {
  display: grid;
  gap: 0;
  padding: 0 14px 12px;
}

.core-stock {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  padding: 7px 0;
  border-top: 1px solid var(--border);
  font-size: 13px;
}

.core-stock strong {
  font-size: 13px;
  font-family: var(--title);
  font-weight: 500;
}

.core-stock a { transition: color 0.15s; }
.core-stock a:hover { color: var(--accent); }

/* ── GRIDS ── */
.hero-grid,
.watch-grid,
.market-grid,
.signal-grid,
.gex-grid,
.gex-stats {
  display: grid;
  gap: 12px;
}

.hero-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.watch-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.market-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.signal-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.gex-grid { grid-template-columns: 0.9fr 1.1fr; margin-top: 14px; }
.gex-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 14px; }

.ashare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 16px;
}

/* ── CHART BOX ── */
.chart-box {
  height: 240px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--border);
}

.chart-box svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* ── GEX ── */
.gex-filter {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.gex-pill {
  padding: 5px 12px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border);
  background: transparent;
  font-size: 12px;
  font-family: var(--body);
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.gex-pill:hover {
  color: var(--text);
  background: var(--surface-hover);
}

.gex-pill.active {
  color: var(--text);
  background: var(--surface-hover);
  border-color: var(--border-hover);
}

.gex-stat {
  padding: 16px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}

.gex-stat strong {
  display: block;
  margin-top: 8px;
  font-family: var(--eng);
  font-size: 20px;
  font-weight: 500;
  letter-spacing: -0.03em;
}

.gex-stat span {
  display: block;
  color: var(--text-secondary);
  font-size: 12px;
}

.gex-chart {
  padding: 18px;
  background: var(--surface-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.gex-chart svg {
  width: 100%;
  height: 540px;
  display: block;
}

.gex-legend {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: 12px;
}

.legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 4px;
}

/* ── MISC ── */
.is-hidden { display: none !important; }

.sort-pill {
  padding: 5px 12px;
  border-radius: var(--radius-xs);
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  font-size: 12px;
  font-family: var(--eng);
  color: var(--text);
}

.mini-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--radius-xs);
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  font-size: 12px;
  color: var(--text);
}

.list {
  display: grid;
  gap: 0;
  margin-top: 14px;
}

.list-item {
  display: block;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
  line-height: 1.6;
}

.list-item:last-child { border-bottom: none; }

/* ── MACRO PORTFOLIO ── */
.macro-portfolio-inline {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 14px;
}

.macro-portfolio-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}

.macro-portfolio-head strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
  line-height: 1.1;
}

.macro-portfolio-inline .portfolio-row,
.macro-portfolio-inline .portfolio-empty {
  padding: 16px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s;
}

.macro-portfolio-inline .portfolio-row:hover { border-color: var(--border-hover); }
.macro-portfolio-inline .portfolio-list { display: grid; gap: 10px; }

.macro-portfolio-inline .portfolio-row.is-cash {
  background: var(--green-soft);
  border-color: rgba(63,182,139,0.18);
}

.macro-portfolio-inline .portfolio-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin-bottom: 10px;
}

.macro-portfolio-inline .portfolio-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.macro-portfolio-inline .portfolio-title strong,
.macro-portfolio-inline .portfolio-weight {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.1;
}

.macro-portfolio-inline .portfolio-title span,
.macro-portfolio-inline .portfolio-change {
  font-family: var(--eng);
  font-size: 12px;
  color: var(--text-secondary);
}

.macro-portfolio-inline .portfolio-bar-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}

.macro-portfolio-inline .portfolio-bar-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 600ms cubic-bezier(.22,1,.36,1);
}

.macro-portfolio-inline .portfolio-row.is-cash .portfolio-bar-fill {
  background: var(--green);
}

.macro-portfolio-inline .portfolio-footnote {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.macro-portfolio-inline .portfolio-reason { text-align: right; }

.macro-portfolio-inline .portfolio-empty strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
}

.macro-portfolio-inline .portfolio-empty p {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

/* ── MACRO ALLOCATION ── */
.macro-allocation-inline {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 14px;
}

.macro-allocation-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  flex-wrap: wrap;
}

.macro-allocation-head strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.1;
}

.macro-allocation-inline .macro-allocation-row,
.macro-allocation-inline .macro-allocation-empty {
  padding: 16px;
  background: rgba(255,255,255,0.02);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s;
}

.macro-allocation-inline .macro-allocation-row:hover { border-color: var(--border-hover); }
.macro-allocation-inline .macro-allocation-list { display: grid; gap: 10px; }

.macro-allocation-inline .macro-allocation-row.is-cash {
  background: var(--green-soft);
  border-color: rgba(63,182,139,0.18);
}

.macro-allocation-inline .macro-allocation-heading {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
  margin-bottom: 10px;
}

.macro-allocation-inline .macro-allocation-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}

.macro-allocation-inline .macro-allocation-title strong,
.macro-allocation-inline .macro-allocation-weight {
  font-size: 18px;
  font-weight: 600;
  line-height: 1.1;
}

.macro-allocation-inline .macro-allocation-title span,
.macro-allocation-inline .macro-allocation-change {
  font-family: var(--eng);
  font-size: 12px;
  color: var(--text-secondary);
}

.macro-allocation-inline .macro-allocation-bar-track {
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}

.macro-allocation-inline .macro-allocation-bar-fill {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 600ms cubic-bezier(.22,1,.36,1);
}

.macro-allocation-inline .macro-allocation-row.is-cash .macro-allocation-bar-fill {
  background: var(--green);
}

.macro-allocation-inline .macro-allocation-footnote {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.macro-allocation-inline .macro-allocation-reason { text-align: right; }

.macro-allocation-inline .macro-allocation-empty strong {
  display: block;
  font-size: 16px;
  font-weight: 600;
}

.macro-allocation-inline .macro-allocation-empty p {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

/* ── HOVER EFFECTS ── */

/* 面板 hover 微浮 + 边框发光 */
.panel {
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.panel:hover {
  border-color: var(--border-hover);
  box-shadow: 0 8px 24px rgba(0,0,0,0.25);
  transform: translateY(-2px);
}

/* 子面板 hover */
.sub-panel {
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.sub-panel:hover {
  border-color: var(--border-hover);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
  transform: translateY(-1px);
}

/* 股票卡片 hover 浮起 + 左侧accent线 */
.stock-link {
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.stock-link::after {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
  opacity: 0;
  transform: scaleY(0);
  transition: opacity 0.25s, transform 0.25s;
}

.stock-link:hover {
  background: rgba(255,255,255,0.05);
  border-color: var(--border-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.stock-link:hover::after {
  opacity: 1;
  transform: scaleY(1);
}

/* 板块 details hover */
.sector-item {
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.sector-item:hover {
  border-color: var(--border-hover);
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  transform: translateY(-1px);
}

/* 指标卡片 hover */
.metric-card,
.watch-card,
.stat-tile,
.gex-stat {
  transition: border-color 0.3s, box-shadow 0.3s, transform 0.3s;
}

.metric-card:hover,
.watch-card:hover,
.stat-tile:hover,
.gex-stat:hover {
  border-color: var(--border-hover);
  box-shadow: 0 8px 24px rgba(0,0,0,0.22);
  transform: translateY(-2px);
}

/* Tab pill hover 过渡 */
.tab-pill {
  transition: all 0.2s ease;
}

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

.tab-pill.active:hover {
  background: var(--surface-hover);
}

/* 导航链接 hover 底线效果 */
.nav a {
  position: relative;
  transition: all 0.2s;
}

.nav a::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 1px;
  transition: width 0.25s, left 0.25s;
}

.nav a:hover::after,
.nav a.active::after {
  width: 60%;
  left: 20%;
}

/* 品牌 hover 缩放 */
.brand {
  transition: opacity 0.2s, transform 0.2s;
}

.brand:hover {
  opacity: 0.85;
  transform: scale(0.98);
}

/* 行数据 hover 高亮行 */
.row {
  transition: background 0.15s;
  border-radius: 4px;
  padding-left: 6px;
  padding-right: 6px;
  margin-left: -6px;
  margin-right: -6px;
}

.row:hover {
  background: rgba(255,255,255,0.03);
}

/* 核心个股 hover */
.core-stock {
  transition: background 0.15s;
  border-radius: 4px;
  padding-left: 6px;
  padding-right: 6px;
  margin-left: -6px;
  margin-right: -6px;
}

.core-stock:hover {
  background: rgba(255,255,255,0.03);
}

/* 标签 hover */
.sector-tags span,
.stock-meta span {
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.sector-tags span:hover,
.stock-meta span:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text);
}

/* 资产配置行 hover */
.macro-portfolio-inline .portfolio-row,
.macro-allocation-inline .macro-allocation-row {
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
}

.macro-portfolio-inline .portfolio-row:hover,
.macro-allocation-inline .macro-allocation-row:hover {
  border-color: var(--border-hover);
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  transform: translateY(-1px);
}

/* Dashboard view nav hover */
.dashboard-view-nav a {
  transition: all 0.25s;
}

.dashboard-view-nav a:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Mini chip hover */
.mini-chip {
  transition: background 0.2s, border-color 0.2s;
}

.mini-chip:hover {
  background: rgba(255,255,255,0.08);
  border-color: var(--border-hover);
}

/* GEX pill hover */
.gex-pill {
  transition: all 0.2s;
}

.gex-pill:hover {
  transform: translateY(-1px);
}

/* 图表容器 hover */
.chart-box,
.gex-chart {
  transition: border-color 0.3s, box-shadow 0.3s;
}

.chart-box:hover,
.gex-chart:hover {
  border-color: var(--border-hover);
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.14); }

::selection {
  background: rgba(217,119,87,0.25);
  color: var(--text);
}

/* ── RESPONSIVE ── */
@media (max-width: 1180px) {
  .hero-grid, .watch-grid, .market-grid, .signal-grid,
  .ashare-stats, .ashare-grid, .gex-grid, .gex-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
}

@media (max-width: 760px) {
  .shell {
    width: min(100vw - 24px, 1400px);
    padding-top: 12px;
  }
  .topbar {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 14px 16px;
  }
  .nav { justify-self: start; }
  .panel, .hero { padding: 16px; }
  .hero-grid, .watch-grid, .market-grid, .signal-grid,
  .ashare-stats, .ashare-grid, .gex-grid, .gex-stats, .row {
    grid-template-columns: 1fr;
  }
  .dashboard-view-nav a {
    flex: 1 1 calc(50% - 6px);
    text-align: center;
  }
  .macro-portfolio-inline .portfolio-heading,
  .macro-portfolio-inline .portfolio-footnote,
  .macro-allocation-inline .macro-allocation-heading,
  .macro-allocation-inline .macro-allocation-footnote {
    display: grid;
    grid-template-columns: 1fr;
  }
  .chart-box { height: 200px; }
  .gex-chart svg { height: 420px; }
  .macro-portfolio-inline .portfolio-reason,
  .macro-allocation-inline .macro-allocation-reason { text-align: left; }
  .turnover-total-value { font-size: 24px; }
}
