:root {
  color-scheme: light;
  --bg: #f2f8fb;
  --surface: #ffffff;
  --surface-soft: #edf7fa;
  --surface-tint: #e8f8f1;
  --text: #294f63;
  --muted: #668295;
  --line: #cfe3eb;
  --brand: #079a78;
  --blue: #2389d7;
  --orange: #f47b35;
  --purple: #8b6fcb;
  --red: #df5b55;
  --green: #21a46f;
  --nav: #ffffff;
  --nav-soft: #e8f6fa;
  --nav-muted: #6f8998;
  --signal-orange: #ff7a2f;
  --shadow: 0 14px 34px rgba(48, 114, 143, 0.11);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    "Microsoft YaHei", sans-serif;
}

button,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

p {
  color: var(--muted);
  line-height: 1.7;
}

.site-shell {
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  background: var(--nav);
  color: var(--text);
  box-shadow: 8px 0 28px rgba(48, 114, 143, 0.08);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 8px 22px;
}

.brand-block strong,
.brand-block small {
  display: block;
}

.brand-block small,
.footer,
.metric span,
.metric em,
.status-card span,
.status-card small,
.axis-text,
.line-label,
.case-meta,
th {
  color: var(--muted);
}

.sidebar .brand-block small {
  color: var(--nav-muted);
}

.sidebar .brand-block strong {
  color: #087b67;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  aspect-ratio: 1;
  border-radius: 10px;
  background: var(--signal-orange);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 8px 18px rgba(255, 122, 47, 0.24);
}

.module-nav {
  display: grid;
  gap: 4px;
}

.module-link,
.tab,
.segment-button {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
}

.module-link {
  width: 100%;
  padding: 10px 12px;
  border-color: #dcebf1;
  border-radius: 6px;
  background: #f8fcfd;
  color: #4d7286;
  text-align: left;
}

.tab.active,
.segment-button.active {
  border-color: #55c3a5;
  background: #dcf6ed;
  color: #08765e;
  box-shadow: 0 5px 14px rgba(7, 154, 120, 0.12);
}

.module-link:hover,
.module-link:focus-visible {
  background: var(--nav-soft);
  color: #176d91;
}

.module-link.active {
  border-color: #69cdb1;
  background: #dff7ee;
  color: #08765e;
  box-shadow: inset 4px 0 0 var(--brand);
}

.module-link:disabled {
  opacity: 0.48;
}

.workspace {
  width: min(1500px, calc(100% - 32px));
  margin: 0 auto;
  padding: 26px 0 42px;
}

.module-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 18px;
  align-items: end;
  margin-bottom: 16px;
}

.eyebrow {
  margin-bottom: 8px;
  color: var(--brand);
  font-weight: 700;
  letter-spacing: 0;
}

h1 {
  margin-bottom: 10px;
  font-size: 48px;
  line-height: 1.04;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 7px;
  font-size: 21px;
}

h3 {
  margin-bottom: 8px;
  font-size: 16px;
}

.status-card,
.metric,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.status-card {
  display: grid;
  gap: 7px;
  padding: 18px;
  border-radius: 12px;
  border-top: 4px solid var(--blue);
}

.status-card strong {
  font-size: 24px;
}

.status-card .refresh-ok {
  color: var(--brand);
}

.status-card .refresh-warn {
  color: var(--orange);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.metric {
  display: grid;
  gap: 8px;
  min-height: 122px;
  padding: 17px;
  border-radius: 12px;
  border-top: 4px solid var(--brand);
}

.metric-grid > .metric:nth-child(2) {
  border-top-color: var(--blue);
}

.metric-grid > .metric:nth-child(3) {
  border-top-color: var(--purple);
}

.metric-grid > .metric:nth-child(4) {
  border-top-color: var(--orange);
}

.metric strong {
  font-size: 27px;
  line-height: 1.08;
  overflow-wrap: anywhere;
}

.metric em {
  font-style: normal;
}

.metric.emphasis {
  border-color: #ffd3b8;
  border-top-color: var(--orange);
  background: #fff7f1;
}

.tabs,
.segment {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}

.tab,
.segment-button {
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 999px;
}

.view {
  display: none;
}

.view.active {
  display: grid;
  gap: 14px;
}

.research-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border-left: 4px solid var(--orange);
  background: #fff7ef;
}

.research-note strong {
  display: block;
  margin-bottom: 4px;
}

.research-note p,
.source-line {
  margin-bottom: 0;
}

.disclosure-date {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
}

.national-metrics {
  margin-bottom: 0;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, 0.75fr);
  gap: 14px;
}

.panel {
  min-width: 0;
  padding: 20px;
  border-radius: 14px;
}

.panel.wide {
  min-height: 430px;
}

.panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.chart,
.chart-block svg {
  width: 100%;
}

.chart {
  min-height: 320px;
  margin-top: 6px;
}

.chart.compact {
  min-height: 310px;
}

svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.axis,
.grid-line {
  stroke: var(--line);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.axis-text,
.line-label,
.axis-caption {
  fill: var(--muted);
  font-size: 12px;
}

.axis-caption {
  font-weight: 600;
}

.series-line {
  fill: none;
  stroke-width: 2.3;
  vector-effect: non-scaling-stroke;
  transition: opacity 140ms ease, stroke-width 140ms ease;
}

.series-lock-hit {
  fill: none;
  stroke: transparent;
  stroke-width: 16;
  vector-effect: non-scaling-stroke;
  pointer-events: stroke;
  cursor: pointer;
}

.price-line {
  stroke-dasharray: 7 5;
}

.focus-dot {
  stroke: var(--surface);
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
  transition: opacity 140ms ease;
}

.bar {
  fill: rgba(35, 137, 215, 0.36);
  transition: opacity 140ms ease;
}

.volume-bar {
  fill: rgba(120, 132, 148, 0.48);
  stroke: rgba(120, 132, 148, 0.78);
  stroke-width: 0.45;
  vector-effect: non-scaling-stroke;
  transition: opacity 140ms ease, filter 140ms ease;
}

.volume-bar.is-up {
  fill: rgba(239, 68, 68, 0.62);
  stroke: rgba(220, 38, 38, 0.9);
}

.volume-bar.is-down {
  fill: rgba(16, 185, 129, 0.62);
  stroke: rgba(5, 150, 105, 0.9);
}

.volume-bar.is-flat {
  fill: rgba(120, 132, 148, 0.48);
  stroke: rgba(100, 116, 139, 0.82);
}

.volume-hit {
  fill: transparent;
  stroke: transparent;
  pointer-events: all;
}

.volume-divider {
  stroke: #9fc5ee;
  stroke-width: 1;
  stroke-dasharray: 4 5;
  vector-effect: non-scaling-stroke;
}

.volume-caption,
.volume-max-label,
.volume-series-label {
  fill: #1769aa;
  font-weight: 700;
}

.series-volume-bars,
.series-price-proxy {
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.series-volume-bars.is-volume-default,
.series-price-proxy.is-volume-default {
  opacity: 1;
  pointer-events: auto;
}

svg.chart-series-focused .series-volume-bars,
svg.chart-series-focused .series-price-proxy {
  opacity: 0;
  pointer-events: none;
}

svg.chart-series-focused .series-volume-bars.is-chart-volume-active,
svg.chart-series-focused .series-price-proxy.is-chart-volume-active {
  opacity: 1;
  pointer-events: auto;
}

.board-price-line {
  stroke-width: 3;
}

.line-label {
  transition: opacity 140ms ease;
}

svg.chart-series-focused .series-line,
svg.chart-series-focused .focus-dot[data-chart-series],
svg.chart-series-focused .line-label[data-chart-series],
svg.chart-series-focused .bar[data-chart-series] {
  opacity: 0.14;
}

svg.chart-series-focused .series-line.is-chart-series-active {
  opacity: 1;
  stroke-width: 4.8;
}

svg.chart-series-locked {
  cursor: crosshair;
}

svg.chart-series-focused.chart-series-locked .series-line.is-chart-series-active {
  stroke-width: 5.2;
}

svg.chart-series-focused .focus-dot.is-chart-series-active,
svg.chart-series-focused .line-label.is-chart-series-active,
svg.chart-series-focused .bar.is-chart-series-active {
  opacity: 1;
}

svg.chart-series-focused .volume-bar.is-chart-series-active {
  opacity: 1;
  filter: saturate(1.25);
}

svg.chart-series-focused .line-label.is-chart-series-active {
  font-weight: 700;
}

.legend,
.chart-note {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 15px;
  margin-top: 9px;
  color: var(--muted);
  font-size: 13px;
}

.chart-note {
  justify-content: space-between;
}

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

.legend-series-control {
  min-height: 30px;
  padding: 4px 9px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.legend-series-control:hover,
.legend-series-control:focus-visible {
  border-color: #9dcfc3;
  background: #effaf7;
  color: #075f52;
  outline: none;
}

.legend-series-control.is-active {
  border-color: #1b9a82;
  background: #dcf7f0;
  color: #075f52;
  font-weight: 700;
}

.swatch {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  background: currentColor;
}

.volume-swatch {
  border-radius: 2px;
  background: linear-gradient(90deg, #ef4444 0 50%, #10b981 50% 100%);
}

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

.case-card,
.rank-card {
  display: grid;
  gap: 11px;
  padding: 16px;
  border-radius: 12px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
}

.case-card strong {
  font-size: 24px;
}

.case-result {
  color: var(--text);
  font-weight: 600;
}

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

.mini-stat {
  display: grid;
  gap: 2px;
  padding: 10px;
  border-radius: 10px;
  background: #ffffff;
}

.mini-stat span {
  color: var(--muted);
}

.up {
  color: var(--red);
}

.down {
  color: var(--green);
}

.chart-stack {
  display: grid;
  gap: 18px;
}

.chart-block {
  min-width: 0;
  position: relative;
}

.chart-lock-reset {
  position: fixed;
  right: 22px;
  bottom: 24px;
  z-index: 1400;
  min-height: 38px;
  padding: 7px 14px;
  border: 1px solid #1b9a82;
  border-radius: 6px;
  background: #ffffff;
  box-shadow: 0 5px 16px rgba(21, 93, 112, 0.16);
  color: #087663;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.chart-lock-reset:hover,
.chart-lock-reset:focus-visible {
  background: #e8fbf6;
  outline: 2px solid rgba(27, 154, 130, 0.22);
  outline-offset: 1px;
}

.chart-hit-point {
  fill: transparent;
  stroke: transparent;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  pointer-events: all;
  cursor: crosshair;
}

.chart-hit-point:hover,
.chart-hit-point:focus-visible {
  fill: rgba(244, 124, 70, 0.18);
  stroke: var(--orange);
  outline: none;
}

.chart-hit-point.is-chart-point-current {
  fill: rgba(244, 124, 70, 0.18);
  stroke: var(--orange);
}

[data-chart-tooltip] {
  cursor: crosshair;
}

.chart-tooltip {
  position: fixed;
  z-index: 1000;
  width: max-content;
  max-width: min(320px, calc(100vw - 24px));
  padding: 10px 12px;
  border: 1px solid #9bd9e1;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 10px 30px rgba(21, 93, 112, 0.18);
  color: var(--text);
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-line;
  pointer-events: none;
}

.chart-tooltip[hidden] {
  display: none;
}

.chart-title {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 4px;
}

.control-row {
  display: grid;
  grid-template-columns: minmax(180px, 0.6fr) minmax(280px, 1.4fr);
  gap: 12px;
  margin-bottom: 14px;
}

.control-row label {
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.fund-control-row {
  grid-template-columns: minmax(130px, 0.55fr) minmax(160px, 0.65fr) minmax(250px, 1.15fr) minmax(260px, 1.2fr);
  align-items: end;
}

.search-input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

input[type="search"] {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
}

input[type="search"]:focus,
select:focus {
  border-color: var(--brand);
  outline: 3px solid rgba(15, 142, 117, 0.12);
}

.search-button,
.inline-button {
  min-height: 42px;
  padding: 8px 15px;
  border: 1px solid var(--brand);
  border-radius: 9px;
  background: var(--brand);
  color: #ffffff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.inline-button {
  min-height: 32px;
  padding: 5px 10px;
  white-space: nowrap;
}

.search-button:hover,
.search-button:focus-visible,
.inline-button:hover,
.inline-button:focus-visible {
  background: #0b7966;
  outline: 3px solid rgba(15, 142, 117, 0.16);
}

.national-view-controls {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  margin: 4px 0 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.national-fund-picker {
  display: grid;
  width: min(100%, 380px);
  gap: 6px;
  color: var(--muted);
}

.national-fund-picker[hidden] {
  display: none;
}

.national-analysis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 18px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.analysis-cell {
  min-width: 0;
  padding: 14px;
  border-right: 1px solid var(--line);
}

.analysis-cell:last-child {
  border-right: 0;
}

.analysis-cell span,
.analysis-cell small {
  display: block;
  color: var(--muted);
}

.analysis-cell strong {
  display: block;
  margin: 4px 0;
  font-size: 20px;
}

.analysis-note {
  grid-column: 1 / -1;
  margin: 0;
  padding: 12px 14px;
  border-top: 1px solid var(--line);
  background: #f1fbf8;
  color: #315e68;
}

select {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
}

.fund-metrics {
  grid-template-columns: 1.2fr 0.8fr 0.8fr;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 640px;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

th {
  background: #edf8fc;
  color: #4b7185;
}

tbody tr:hover {
  background: #f4fafc;
}

.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.national-table {
  min-width: 1240px;
}

.holder-cell {
  min-width: 220px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.national-table strong,
.row-meta,
.trend-flag {
  display: block;
}

.row-meta {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.trend-flag {
  width: max-content;
  max-width: 150px;
  margin: 5px 0 0 auto;
  padding: 3px 6px;
  border: 1px solid rgba(223, 91, 85, 0.26);
  border-radius: 4px;
  background: rgba(223, 91, 85, 0.08);
  color: var(--red);
  font-size: 11px;
  line-height: 1.25;
  white-space: normal;
}

.source-link {
  color: var(--blue);
  text-decoration: none;
}

.source-link:hover,
.source-link:focus-visible {
  text-decoration: underline;
}

.source-line {
  padding-top: 14px;
  font-size: 13px;
}

.footer {
  padding-top: 18px;
  font-size: 13px;
}

code {
  color: var(--text);
  background: rgba(7, 154, 120, 0.1);
  padding: 2px 5px;
  border-radius: 6px;
}

.module-page {
  display: none;
}

.module-page.active {
  display: block;
}

.research-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 24px;
  align-items: end;
  padding: 4px 0 20px;
}

.research-header h1 {
  margin-bottom: 9px;
  font-size: 40px;
  line-height: 1.1;
}

.research-header > div > p:last-child {
  max-width: 820px;
  margin-bottom: 0;
}

.research-meta {
  display: grid;
  justify-items: end;
  gap: 5px;
  color: var(--muted);
  text-align: right;
}

.research-meta strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.data-badge {
  padding: 4px 8px;
  border: 1px solid rgba(249, 115, 22, 0.35);
  border-radius: 4px;
  background: rgba(249, 115, 22, 0.08);
  color: #c2510a;
  font-size: 12px;
  font-weight: 700;
}

.toolbar {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 14px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.toolbar-between {
  justify-content: space-between;
}

.toolbar .segment {
  margin: 0;
}

.field-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.field-inline input,
.field-inline select,
.dialog-field input {
  min-height: 38px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
}

.compact-segment .segment-button {
  padding: 7px 13px;
}

.dashboard-grid {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
}

.flow-layout,
.auction-layout {
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.65fr);
}

.mood-layout {
  grid-template-columns: minmax(0, 1.45fr) minmax(310px, 0.55fr);
}

.news-layout,
.signal-layout {
  grid-template-columns: minmax(360px, 0.9fr) minmax(0, 1.1fr);
}

.market-chart {
  min-height: 320px;
}

.market-chart.compact {
  min-height: 250px;
}

.market-chart svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

.range-control {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.range-control input {
  width: 100%;
  accent-color: var(--signal-orange);
}

.interactive-legend {
  padding-top: 8px;
}

.legend-button,
.tag-button {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--surface);
  color: var(--muted);
}

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

.legend-button i {
  width: 14px;
  height: 3px;
  background: currentColor;
}

.legend-button.active,
.tag-button.active {
  border-color: var(--signal-orange);
  color: #c2510a;
  background: rgba(249, 115, 22, 0.08);
}

.interactive-series {
  cursor: pointer;
  pointer-events: stroke;
  transition: opacity 160ms ease, stroke-width 160ms ease;
}

.interactive-series:hover,
.interactive-series:focus {
  stroke-width: 4;
  opacity: 1;
  outline: none;
}

.muted-series {
  opacity: 0.36;
}

.market-rank-list,
.news-list,
.signal-list {
  display: grid;
  gap: 4px;
}

.market-rank-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  width: 100%;
  padding: 10px 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
}

.market-rank-row:hover,
.market-rank-row.active {
  background: rgba(249, 115, 22, 0.07);
}

.market-rank-row > span:first-child,
.rank-number {
  display: inline-grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 4px;
  background: var(--nav-soft);
  color: #fff;
  font-size: 12px;
}

.market-rank-row strong,
.market-rank-row small {
  display: block;
}

.market-rank-row em {
  font-style: normal;
  font-weight: 700;
}

.detail-band {
  display: grid;
  grid-template-columns: 0.7fr 1fr 0.8fr 2fr;
  gap: 1px;
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--line);
}

.detail-band > div {
  display: grid;
  gap: 4px;
  padding: 13px 15px;
  background: var(--surface);
}

.detail-band span,
.detail-stat-grid span,
.account-summary span,
.account-summary dt {
  color: var(--muted);
  font-size: 12px;
}

.module-source-note {
  margin: 14px 0 0;
  padding: 9px 11px;
  border-left: 3px solid var(--signal-orange);
  background: rgba(249, 115, 22, 0.05);
  font-size: 12px;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover,
.clickable-row:focus {
  background: rgba(249, 115, 22, 0.07);
  outline: none;
}

.hot-number {
  color: var(--red);
  font-size: 18px;
  font-weight: 800;
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.tag {
  display: inline-block;
  padding: 3px 6px;
  border-radius: 4px;
  background: #eef2f7;
  color: #475569;
  font-size: 11px;
  line-height: 1.25;
}

.detail-panel h3 {
  margin-top: 20px;
}

.detail-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 15px 0;
}

.detail-stat-grid > div {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}

.stock-list {
  display: grid;
  gap: 7px;
}

.stock-list span {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.market-metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.compact-metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mood-bar {
  fill: var(--signal-orange);
  opacity: 0.82;
}

.mood-bar:hover {
  opacity: 1;
}

.bar-label {
  fill: var(--text);
  font-size: 11px;
  font-weight: 700;
}

.news-panel {
  max-height: 650px;
  overflow: auto;
}

.news-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  padding: 13px 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
}

.news-row:hover,
.news-row.active {
  background: #f8fafc;
}

.news-row strong,
.news-row small {
  display: block;
  margin-top: 5px;
}

.news-row small,
.news-time {
  color: var(--muted);
  font-size: 12px;
}

.news-tag,
.signal-type,
.concept-label,
.side,
.status-ok {
  display: inline-block;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
}

.news-tag.up,
.side.buy {
  background: rgba(239, 68, 68, 0.1);
  color: var(--red);
}

.news-tag.down,
.side.sell {
  background: rgba(16, 185, 129, 0.1);
  color: var(--green);
}

.concept-label,
.status-ok {
  background: rgba(59, 130, 246, 0.1);
  color: var(--blue);
}

.panel-head h2 small,
.signal-row strong small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.command-button {
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-weight: 650;
}

.command-button:hover,
.command-button.active {
  border-color: var(--signal-orange);
  color: #c2510a;
}

.command-button.primary {
  border-color: var(--signal-orange);
  background: var(--signal-orange);
  color: #fff;
}

.command-button.danger {
  border-color: rgba(239, 68, 68, 0.35);
  color: var(--red);
}

.auction-bar {
  fill: rgba(249, 115, 22, 0.55);
}

.auction-price-line {
  stroke: var(--blue);
}

.auction-dot {
  fill: var(--blue);
}

.signal-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) 72px 62px;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 12px 8px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
}

.signal-row:hover,
.signal-row.active {
  background: #f8fafc;
}

.signal-row time,
.signal-row div span {
  color: var(--muted);
  font-size: 12px;
}

.signal-row strong,
.signal-row div span {
  display: block;
}

.signal-row em {
  font-style: normal;
  font-weight: 800;
  text-align: right;
}

.signal-type {
  background: rgba(239, 68, 68, 0.1);
  color: var(--red);
  text-align: center;
}

.signal-type.danger {
  background: rgba(16, 185, 129, 0.1);
  color: var(--green);
}

.annotation-arrow {
  fill: none;
  stroke: var(--signal-orange);
  stroke-width: 2;
}

.annotation-text {
  fill: var(--signal-orange);
  font-size: 12px;
  font-weight: 700;
}

.tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 14px 0;
}

.tag-button {
  padding: 6px 10px;
}

.ladder-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(190px, 1fr));
  gap: 10px;
  overflow-x: auto;
}

.ladder-column {
  min-width: 190px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.ladder-column > header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  background: #fff7ed;
}

.ladder-column.board-4 > header {
  background: #fee2e2;
  color: #b91c1c;
}

.ladder-column.board-3 > header {
  background: #ffedd5;
  color: #c2410c;
}

.ladder-column.board-2 > header {
  background: #fef3c7;
  color: #a16207;
}

.ladder-stock {
  display: grid;
  gap: 5px;
  width: 100%;
  padding: 11px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  text-align: left;
}

.ladder-stock:hover {
  background: #f8fafc;
}

.ladder-stock small {
  color: var(--muted);
}

.empty-state {
  padding: 22px 12px;
  color: var(--muted);
  text-align: center;
}

.account-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: stretch;
  margin-bottom: 14px;
}

.account-summary {
  display: grid;
  grid-template-columns: 64px minmax(180px, 0.65fr) minmax(0, 1.35fr);
  gap: 18px;
  align-items: center;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 58px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--nav);
  color: #fff;
  font-size: 24px;
  font-weight: 800;
}

.account-summary strong,
.account-summary small {
  display: block;
  margin-top: 4px;
}

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

.account-summary dl div {
  padding-left: 10px;
  border-left: 1px solid var(--line);
}

.account-summary dd {
  margin: 5px 0 0;
  font-weight: 700;
}

.account-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(118px, 1fr));
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
}

.market-dialog {
  width: min(520px, calc(100% - 28px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
}

.market-dialog::backdrop {
  background: rgba(15, 23, 42, 0.54);
}

.market-dialog form {
  position: relative;
  padding: 24px;
}

.dialog-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 24px;
}

.dialog-metrics {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.dialog-metrics strong {
  font-size: 28px;
}

.dialog-field {
  display: grid;
  gap: 5px;
  margin: 12px 0;
  color: var(--muted);
}

.dialog-field input {
  width: 100%;
}

.market-toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 20;
  max-width: min(420px, calc(100% - 48px));
  padding: 11px 14px;
  border-radius: 6px;
  background: var(--nav);
  color: #fff;
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
}

.market-toast.visible {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 1040px) {
  .site-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 16px;
  }

  .brand-block {
    padding: 0;
  }

  .module-nav {
    display: flex;
    flex-wrap: nowrap;
    overflow-x: auto;
  }

  .module-link {
    flex: 0 0 auto;
    width: auto;
  }
}

@media (max-width: 880px) {
  .module-hero,
  .research-header,
  .metric-grid,
  .content-grid,
  .case-grid,
  .rank-grid,
  .fund-metrics,
  .control-row,
  .national-analysis,
  .flow-layout,
  .mood-layout,
  .news-layout,
  .auction-layout,
  .signal-layout,
  .account-layout {
    grid-template-columns: 1fr;
  }

  .national-view-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .national-fund-picker {
    width: 100%;
  }

  .analysis-cell {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .analysis-cell:last-of-type {
    border-bottom: 0;
  }

  .workspace {
    width: min(100% - 22px, 1240px);
  }

  .research-meta {
    justify-items: start;
    text-align: left;
  }

  .market-metrics,
  .compact-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .detail-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .account-summary {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .account-summary dl {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .sidebar {
    align-items: start;
    flex-direction: column;
  }

  .module-nav {
    width: 100%;
  }

  .module-link {
    flex: 0 0 auto;
  }

  .panel,
  .metric,
  .status-card {
    padding: 14px;
    border-radius: 10px;
  }

  h1 {
    font-size: 32px;
  }

  .mini-grid {
    grid-template-columns: 1fr;
  }

  .research-note {
    align-items: start;
    flex-direction: column;
  }

  .research-header h1 {
    font-size: 32px;
  }

  .toolbar,
  .field-inline {
    align-items: stretch;
  }

  .field-inline {
    flex-direction: column;
    width: 100%;
  }

  .market-metrics,
  .compact-metrics,
  .detail-band,
  .detail-stat-grid,
  .account-summary,
  .account-summary dl,
  .account-actions {
    grid-template-columns: 1fr;
  }

  .detail-band > div,
  .account-summary dl {
    grid-column: auto;
  }

  .signal-row {
    grid-template-columns: 52px minmax(0, 1fr) 64px;
  }

  .signal-row .signal-type {
    grid-column: 2 / -1;
    width: max-content;
  }

  .ladder-grid {
    grid-template-columns: repeat(5, 190px);
  }
}

/* 行情终端皮肤仅在扩展行情页面启用，基金份额页继续使用原有浅色界面。 */
body.market-mode {
  color-scheme: dark;
  background: #061526;
  color: #eef6ff;
}

body.market-mode .site-shell {
  background: #061526;
}

body.market-mode .sidebar {
  border-right-color: #17314d;
  background: #020d1a;
}

body.market-mode .brand-mark {
  background: #346df1;
  box-shadow: 0 0 18px rgba(52, 109, 241, 0.42);
}

body.market-mode .workspace {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 14px 16px 34px;
  background: #07192b;
}

body.market-mode .module-page {
  --terminal-bg: #07192b;
  --terminal-panel: #102338;
  --terminal-panel-deep: #09192b;
  --terminal-panel-soft: #172b41;
  --terminal-line: #29435f;
  --terminal-text: #f1f7ff;
  --terminal-muted: #86a0bc;
  --terminal-blue: #43a3ff;
  --terminal-orange: #ff9f2c;
  --terminal-red: #ff4d4f;
  --terminal-green: #3add99;
  color: var(--terminal-text);
}

body.market-mode .research-header {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin: -14px -16px 14px;
  padding: 18px 22px 15px;
  border-bottom: 1px solid #1b3551;
  background: #0d2948;
}

body.market-mode .research-header h1 {
  margin-bottom: 5px;
  color: #fff;
  font-size: 30px;
  line-height: 1.08;
}

body.market-mode .research-header .eyebrow {
  margin-bottom: 5px;
  color: #ff5757;
  font-size: 12px;
  text-transform: uppercase;
}

body.market-mode .research-header > div > p:last-child,
body.market-mode p,
body.market-mode .field-inline,
body.market-mode .range-control,
body.market-mode .module-source-note,
body.market-mode .news-time,
body.market-mode .news-row small,
body.market-mode .signal-row time,
body.market-mode .signal-row div span,
body.market-mode .ladder-stock small,
body.market-mode .research-meta {
  color: var(--terminal-muted);
}

body.market-mode .research-header > div > p:last-child {
  font-size: 13px;
  line-height: 1.5;
}

body.market-mode .research-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  font-size: 12px;
}

body.market-mode .research-meta strong {
  color: #dcecff;
}

body.market-mode .data-badge {
  border-color: rgba(58, 221, 153, 0.42);
  background: rgba(58, 221, 153, 0.1);
  color: var(--terminal-green);
}

body.market-mode .data-badge.live {
  border-color: rgba(58, 221, 153, 0.65);
  background: rgba(58, 221, 153, 0.16);
  color: #65f2b7;
}

body.market-mode .data-badge.connecting {
  border-color: rgba(255, 159, 44, 0.55);
  background: rgba(255, 159, 44, 0.12);
  color: #ffc26b;
}

body.market-mode .toolbar {
  gap: 8px;
  margin-bottom: 12px;
  padding: 7px 2px;
  border-color: #1d3855;
}

body.market-mode .panel,
body.market-mode .metric,
body.market-mode .account-summary,
body.market-mode .account-actions,
body.market-mode .ladder-column {
  border-color: var(--terminal-line);
  background: var(--terminal-panel);
  color: var(--terminal-text);
  box-shadow: none;
}

body.market-mode .panel {
  padding: 14px;
  border-radius: 7px;
}

body.market-mode .panel h2,
body.market-mode .panel h3,
body.market-mode .market-rank-row,
body.market-mode .news-row,
body.market-mode .signal-row,
body.market-mode .ladder-stock,
body.market-mode .account-summary,
body.market-mode th,
body.market-mode td {
  color: var(--terminal-text);
}

body.market-mode .panel-head h2 {
  margin-bottom: 3px;
  font-size: 17px;
}

body.market-mode .panel-head p {
  margin-bottom: 5px;
  font-size: 12px;
  line-height: 1.5;
}

body.market-mode .metric-grid {
  gap: 9px;
  margin-bottom: 12px;
}

body.market-mode .metric {
  min-height: 82px;
  gap: 4px;
  padding: 13px;
  border-radius: 7px;
}

body.market-mode .metric span,
body.market-mode .metric em {
  color: #93aac2;
  font-size: 12px;
}

body.market-mode .metric strong {
  color: #fff;
  font-size: 24px;
}

body.market-mode .metric.emphasis {
  border-color: rgba(255, 159, 44, 0.45);
  background: #172b3f;
}

body.market-mode .segment-button,
body.market-mode .legend-button,
body.market-mode .tag-button,
body.market-mode .command-button,
body.market-mode .field-inline input,
body.market-mode .field-inline select,
body.market-mode .dialog-field input {
  border-color: #36516e;
  background: #0b1d30;
  color: #cfdef0;
}

body.market-mode .segment-button {
  min-height: 34px;
  padding: 6px 13px;
  border-radius: 6px;
}

body.market-mode .segment-button.active,
body.market-mode .command-button.active,
body.market-mode .command-button.primary {
  border-color: #3f8ee8;
  background: #1d5b99;
  color: #fff;
}

body.market-mode .command-button:hover,
body.market-mode .legend-button:hover,
body.market-mode .tag-button:hover {
  border-color: #4e97e5;
  color: #fff;
}

body.market-mode .dashboard-grid {
  gap: 10px;
  margin-bottom: 10px;
}

body.market-mode .flow-layout {
  grid-template-columns: minmax(0, 1fr) 295px;
}

body.market-mode .mood-layout {
  grid-template-columns: minmax(0, 1fr) 300px;
}

body.market-mode .news-layout,
body.market-mode .signal-layout {
  grid-template-columns: minmax(390px, 0.82fr) minmax(0, 1.18fr);
}

body.market-mode .auction-layout {
  grid-template-columns: minmax(0, 1.35fr) minmax(330px, 0.65fr);
}

body.market-mode .market-chart {
  min-height: 360px;
}

body.market-mode [data-module-page="main-flow"] .market-chart {
  min-height: 500px;
}

body.market-mode [data-module-page="main-flow"] .market-chart svg {
  min-height: 500px;
}

body.market-mode [data-module-page="market-mood"] .market-chart {
  min-height: 430px;
}

body.market-mode .grid-line,
body.market-mode .axis {
  stroke: #2c425b;
}

body.market-mode .axis-text,
body.market-mode .line-label,
body.market-mode .axis-caption {
  fill: #9cb0c7;
}

body.market-mode .line-label,
body.market-mode .bar-label {
  fill: #eef6ff;
  font-weight: 700;
}

body.market-mode .focus-dot {
  stroke: #07192b;
}

body.market-mode .muted-series {
  opacity: 0.72;
}

body.market-mode .range-control input {
  accent-color: #3f8ee8;
}

body.market-mode .legend-button.active,
body.market-mode .tag-button.active {
  border-color: #3f8ee8;
  background: rgba(63, 142, 232, 0.14);
  color: #8bc7ff;
}

body.market-mode .market-rank-row,
body.market-mode .news-row,
body.market-mode .signal-row,
body.market-mode th,
body.market-mode td,
body.market-mode .stock-list span,
body.market-mode .ladder-stock {
  border-bottom-color: #263e58;
}

body.market-mode .market-rank-row {
  padding: 8px;
}

body.market-mode .market-rank-row:hover,
body.market-mode .market-rank-row.active,
body.market-mode .news-row:hover,
body.market-mode .news-row.active,
body.market-mode .signal-row:hover,
body.market-mode .signal-row.active,
body.market-mode .clickable-row:hover,
body.market-mode .clickable-row:focus,
body.market-mode .ladder-stock:hover {
  background: #173352;
}

body.market-mode .market-rank-row > span:first-child,
body.market-mode .rank-number {
  background: #1b4b57;
  color: #58edb5;
}

body.market-mode .rank-panel {
  max-height: 596px;
  overflow: auto;
}

body.market-mode .detail-band {
  border-color: var(--terminal-line);
  background: var(--terminal-line);
}

body.market-mode .detail-band > div,
body.market-mode .detail-stat-grid > div {
  border-color: var(--terminal-line);
  background: var(--terminal-panel-deep);
}

body.market-mode .detail-band span,
body.market-mode .detail-stat-grid span,
body.market-mode .account-summary span,
body.market-mode .account-summary dt {
  color: var(--terminal-muted);
}

body.market-mode .module-source-note {
  margin-top: 10px;
  border-left-color: #3f8ee8;
  background: #0b2035;
}

body.market-mode .tag {
  border: 1px solid #3b5169;
  background: #2c3f51;
  color: #dbe7f5;
}

body.market-mode .market-table {
  min-width: 720px;
}

body.market-mode .market-table th {
  background: #0a1c2f;
  color: #8fa8c2;
  font-size: 12px;
}

body.market-mode .market-table td {
  padding-top: 8px;
  padding-bottom: 8px;
  font-size: 13px;
}

body.market-mode .hot-number,
body.market-mode .up {
  color: var(--terminal-red);
}

body.market-mode .down {
  color: var(--terminal-green);
}

body.market-mode .mood-bar {
  fill: #ff9f2c;
  filter: drop-shadow(0 0 7px rgba(255, 159, 44, 0.28));
}

body.market-mode .news-panel,
body.market-mode .signal-list {
  scrollbar-color: #315475 #0b1d30;
}

body.market-mode .news-row,
body.market-mode .signal-row {
  padding: 10px 8px;
}

body.market-mode .news-tag.up,
body.market-mode .side.buy,
body.market-mode .signal-type {
  background: rgba(255, 77, 79, 0.13);
  color: #ff6d6f;
}

body.market-mode .news-tag.down,
body.market-mode .side.sell,
body.market-mode .signal-type.danger {
  background: rgba(58, 221, 153, 0.12);
  color: #52eaaa;
}

body.market-mode .concept-label,
body.market-mode .status-ok {
  background: rgba(67, 163, 255, 0.13);
  color: #74bbff;
}

body.market-mode .auction-bar {
  fill: rgba(255, 77, 79, 0.42);
}

body.market-mode .auction-price-line {
  stroke: #ff9f2c;
}

body.market-mode .auction-dot {
  fill: #ff9f2c;
}

body.market-mode .ladder-grid {
  grid-template-columns: 1fr;
  overflow: visible;
}

body.market-mode .ladder-column {
  min-width: 0;
  overflow: hidden;
}

body.market-mode .ladder-column > header,
body.market-mode .ladder-column.board-4 > header,
body.market-mode .ladder-column.board-3 > header,
body.market-mode .ladder-column.board-2 > header {
  border-bottom-color: #3e4b53;
  background: #30383f;
  color: #ffbd66;
}

body.market-mode .ladder-column > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 10px;
}

body.market-mode .ladder-stock {
  width: auto;
  min-width: 150px;
  max-width: 260px;
  padding: 8px 10px;
  border: 1px solid #40546a;
  border-radius: 5px;
  background: #263747;
}

body.market-mode .ladder-stock .tag-list {
  display: none;
}

body.market-mode .account-avatar {
  background: #1e5f9c;
}

body.market-mode .account-summary dl div {
  border-left-color: var(--terminal-line);
}

body.market-mode .market-dialog {
  border-color: #36516e;
  background: #102338;
  color: #eef6ff;
}

body.market-mode .market-dialog::backdrop {
  background: rgba(0, 8, 18, 0.76);
}

body.market-mode .dialog-close {
  color: #eef6ff;
}

body.market-mode .market-toast {
  border: 1px solid #3b5876;
  background: #102b47;
}

@media (max-width: 1200px) {
  body.market-mode .flow-layout,
  body.market-mode .mood-layout,
  body.market-mode .auction-layout,
  body.market-mode .news-layout,
  body.market-mode .signal-layout {
    grid-template-columns: 1fr;
  }

  body.market-mode .rank-panel {
    max-height: none;
  }
}

@media (max-width: 1040px) {
  body.market-mode .workspace {
    padding: 12px;
  }

  body.market-mode .research-header {
    margin: -12px -12px 12px;
  }
}

@media (max-width: 700px) {
  body.market-mode .research-header {
    grid-template-columns: 1fr;
  }

  body.market-mode .research-meta {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  body.market-mode .market-metrics,
  body.market-mode .compact-metrics {
    grid-template-columns: 1fr 1fr;
  }
}

.member-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.member-card {
  display: grid;
  min-width: 0;
  gap: 5px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: 8px;
  background: #f2fbf8;
}

.member-card.broader-member {
  border-left-color: var(--orange);
  background: #fff8ef;
}

.member-card span,
.member-card small {
  color: var(--muted);
}

.member-card strong {
  overflow-wrap: anywhere;
}

.flow-periods {
  margin: 14px 0;
}

.flow-control-row {
  grid-template-columns: minmax(150px, 0.55fr) minmax(250px, 0.85fr) minmax(260px, 1.1fr);
  align-items: end;
}

.flow-metrics {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.flow-table {
  min-width: 1320px;
}

.flow-table tbody tr {
  transition: background 120ms ease;
}

.flow-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted);
}

.flow-pagination > div {
  display: flex;
  gap: 8px;
}

.flow-pagination button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.flow-signal {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.signal-strong {
  border-color: rgba(223, 91, 85, 0.3);
  background: #fff0ee;
  color: var(--red);
}

.signal-absorb {
  border-color: rgba(226, 132, 41, 0.35);
  background: #fff7e8;
  color: #b35e12;
}

.signal-distribute {
  border-color: rgba(35, 137, 215, 0.3);
  background: #edf7ff;
  color: #166ca9;
}

.signal-weak {
  border-color: rgba(22, 157, 117, 0.3);
  background: #ebfaf4;
  color: var(--green);
}

.signal-neutral {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--muted);
}

.empty-cell {
  padding: 28px 12px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1040px) {
  .member-grid,
  .flow-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flow-control-row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .member-grid,
  .flow-metrics,
  .flow-control-row {
    grid-template-columns: 1fr;
  }

  .flow-pagination {
    align-items: flex-start;
    flex-direction: column;
  }
}
