:root {
  color-scheme: dark;
  --bg: #08090b;
  --panel: #101114;
  --panel-2: #16181c;
  --panel-3: #1b1e23;
  --line: #24262b;
  --line-soft: #1c1f24;
  --txt: #ecedef;
  --muted: #9aa0a8;
  --dim: #646a73;
  --up: #22c55e;
  --down: #ef4444;
  --accent: #4cc9f0;
  --amber: #f5b301;
  --up-bg: rgba(34, 197, 94, .13);
  --down-bg: rgba(239, 68, 68, .13);
  --accent-bg: rgba(76, 201, 240, .1);
  --radius: 8px;
}

* { box-sizing: border-box; }
.hidden { display: none !important; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 12px;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

button, a { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
a { text-decoration: none; }

.up { color: var(--up); }
.down { color: var(--down); }
.warn { color: var(--amber); }
.up-bg { background: var(--up); }
.down-bg { background: var(--down); }
.warn-bg { background: var(--amber); }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  min-width: 0;
}
.flash { animation: panel-flash 1.2s ease; }
@keyframes panel-flash {
  0% { box-shadow: 0 0 0 1px var(--accent), 0 0 28px rgba(76, 201, 240, .14); }
  100% { box-shadow: none; }
}

/* ---------- 方法说明 ---------- */

.method-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(2, 4, 7, .72);
  backdrop-filter: blur(4px);
}
.method-card {
  width: min(760px, 100%);
  max-height: 82vh;
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .55);
}
.method-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px 12px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}
.method-head h2 { margin: 0; font-size: 15px; }
.method-head p { margin: 3px 0 0; color: var(--dim); font-size: 10px; }
#methodClose {
  width: 26px;
  height: 26px;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
}
#methodClose:hover { color: var(--txt); }
.method-body { padding: 4px 18px 18px; }
.method-body section { padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.method-body section:last-child { border-bottom: 0; }
.method-body h3 { margin: 0 0 6px; font-size: 12px; color: var(--txt); }
.method-body p { margin: 0; color: var(--muted); font-size: 10.5px; line-height: 1.75; }
.method-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.method-table td {
  padding: 5px 0;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
  vertical-align: top;
}
.method-table td:first-child { width: 90px; color: var(--dim); white-space: nowrap; }
.method-table tr:last-child td { border-bottom: 0; }

/* ---------- 顶部栏 ---------- */

.topbar {
  flex: 0 0 54px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 18px;
  background: rgba(8, 9, 11, .92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  z-index: 30;
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 168px; }
.logo {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border: 1px solid rgba(76, 201, 240, .35);
  border-radius: 8px;
  color: var(--accent);
  background: rgba(76, 201, 240, .07);
}
.logo svg { width: 24px; height: 24px; }
.brand-text h1 { margin: 0; font-size: 15px; letter-spacing: .2px; }
.brand-text p { margin: 0; font-size: 10px; color: var(--dim); }

.search {
  width: 250px;
  height: 30px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--dim);
  text-align: left;
}
.search:focus-within { border-color: var(--accent); }
.search svg { width: 14px; height: 14px; flex: 0 0 auto; }
.search input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--txt);
  font: inherit;
  font-size: 11px;
}
.search input::placeholder { color: var(--dim); }
.search kbd {
  font-family: inherit;
  font-size: 10px;
  color: var(--dim);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 1px 5px;
}
.load-banner {
  margin: 8px 14px 0;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  background: var(--panel);
  font-size: 10px;
}
.load-banner.error { border-color: rgba(239, 68, 68, .4); color: var(--down); }
.load-banner.info { border-color: rgba(76, 201, 240, .3); color: var(--accent); }
.market-state.open { color: var(--up); }
.market-state.open i { background: var(--up); box-shadow: 0 0 0 3px rgba(34, 197, 94, .12); }
.market-state.pre, .market-state.post { color: var(--amber); }
.market-state.pre i, .market-state.post i { background: var(--amber); }
.market-state.closed { color: var(--muted); }
.market-state.closed i { background: var(--dim); }

.nav { display: flex; align-items: center; gap: 20px; margin-left: 4px; }
.nav a {
  position: relative;
  font-size: 12px;
  color: var(--muted);
  padding: 18px 0;
  white-space: nowrap;
}
.nav a:hover { color: var(--txt); }
.nav a.active { color: var(--accent); }
.nav a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--accent);
  border-radius: 2px 2px 0 0;
}

.top-status {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--dim);
  font-size: 11px;
  white-space: nowrap;
}
.demo-badge {
  color: var(--amber);
  background: rgba(245, 179, 1, .08);
  border: 1px solid rgba(245, 179, 1, .3);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 9px;
  white-space: nowrap;
}
.market-state { color: var(--muted); display: flex; align-items: center; gap: 6px; }
.market-state i {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--dim);
}
.icon-btn {
  width: 24px; height: 24px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--dim);
  font-size: 11px;
}
.icon-btn:hover { color: var(--txt); border-color: var(--muted); }

/* ---------- 主网格 ---------- */

.dashboard {
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 1920px;
  margin: 0 auto;
  padding: 10px 14px 12px;
  display: grid;
  grid-template-rows: 96px 82px minmax(300px, 1fr) 202px;
  gap: 9px;
}

/* ---------- 市场态度 ---------- */

.posture {
  display: grid;
  grid-template-columns: 196px minmax(0, 1fr) 286px;
  align-items: center;
  gap: 16px;
  padding: 10px 16px;
}

.posture-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ring { position: relative; width: 64px; height: 64px; flex: 0 0 64px; }
.ring svg { width: 64px; height: 64px; display: block; }
.ring-num {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  font-size: 21px; font-weight: 700; letter-spacing: -.5px;
  padding-bottom: 4px;
}
.ring-label {
  position: absolute; left: 0; right: 0; bottom: 9px;
  text-align: center; font-size: 8px; color: var(--dim);
}
.posture-copy { min-width: 0; }
.posture-copy strong { display: block; font-size: 14px; margin-bottom: 3px; }
.posture-copy p { margin: 0; font-size: 10.5px; color: var(--muted); white-space: nowrap; }
.state-down { color: var(--down); }
.state-up { color: var(--up); }
.state-warn { color: var(--amber); }
.flat { color: var(--muted); }

.gauges {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  padding: 0 4px;
}
.gauge { min-width: 0; }
.gauge-head {
  display: flex; align-items: baseline; justify-content: space-between;
  color: var(--muted); font-size: 10px; margin-bottom: 5px;
}
.gauge-head span { border-bottom: 1px dotted rgba(154, 160, 168, .35); }
.gauge-head b { font-size: 13px; font-weight: 650; }
.track { height: 3px; border-radius: 2px; background: var(--line); overflow: hidden; }
.track i { display: block; height: 100%; border-radius: 2px; }
.gauge em {
  display: block;
  margin-top: 6px;
  font-style: normal;
  font-size: 9px;
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.gauge-legend {
  grid-column: 1 / -1;
  margin: 1px 0 0;
  color: var(--dim);
  font-size: 8.5px;
}

.dist { border-left: 1px solid var(--line-soft); padding-left: 16px; }
.dist-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.dist-name { width: 48px; color: var(--muted); font-size: 9.5px; white-space: nowrap; }
.squares { display: flex; gap: 2px; flex: 1; }
.squares i { width: 5px; height: 9px; border-radius: 1px; background: var(--line); }
.squares i.on { background: var(--down); }
.dist b { font-size: 10.5px; color: var(--muted); font-weight: 500; }
.dist p { margin: 8px 0 0; color: var(--dim); font-size: 9px; }

/* ---------- 涨跌分布 ---------- */

.breadth {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 520px;
  align-items: center;
  gap: 20px;
  padding: 8px 16px;
}
.histogram {
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 64px;
  padding-top: 12px;
}
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 3px; }
.bar-col b { font-size: 9px; color: var(--dim); font-weight: 500; line-height: 1; }
.bar-col i { width: 70%; max-width: 34px; border-radius: 2px 2px 0 0; min-height: 2px; }
.bar-col span { font-size: 9px; color: var(--dim); line-height: 1; }
.bar-col.zero i { background: var(--panel-3); }

.breadth-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  border-left: 1px solid var(--line-soft);
  padding-left: 18px;
}
.stat { min-width: 0; }
.stat span { display: block; font-size: 9px; color: var(--dim); white-space: nowrap; margin-bottom: 4px; }
.stat b { font-size: 13px; font-weight: 600; white-space: nowrap; }
.stat b i { font-style: normal; }

/* ---------- 榜单 ---------- */

.workspace {
  display: grid;
  grid-template-columns: var(--chart-w, 360px) minmax(0, 1fr) 290px;
  gap: 9px;
  min-height: 0;
}

/* ---------- 左侧 K 线 ---------- */

.chart-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding: 10px 12px 8px;
}

.chart-head { flex: 0 0 auto; }
.chart-top { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.chart-ident { display: flex; align-items: baseline; gap: 6px; min-width: 0; }
.chart-ident span {
  font-family: "SF Mono", ui-monospace, Menlo, monospace;
  font-size: 15px; font-weight: 700; letter-spacing: -.2px;
}
.chart-ident em {
  font-style: normal;
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chart-quote { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.chart-quote b { font-size: 15px; letter-spacing: -.2px; }
.chart-quote span { font-size: 10px; font-weight: 600; }
.chart-tools { display: flex; align-items: center; gap: 8px; margin-top: 7px; }
.chart-tools a { color: var(--dim); font-size: 9px; }
.chart-tools a:hover { color: var(--accent); }
.chart-tools-right { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.chart-hint { color: var(--dim); font-size: 8.5px; white-space: nowrap; margin-left: auto; }
.chart-hide {
  height: 20px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--dim);
  font-size: 9px;
}
.chart-hide:hover { color: var(--txt); border-color: var(--muted); }

.chart-main {
  position: relative;
  flex: 1;
  min-height: 284px;
  margin-top: 7px;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
}
.tradingview-widget-container,
.tradingview-widget-container__widget { width: 100%; height: 100%; }
.chart-main iframe { width: 100% !important; height: 100% !important; border: 0; }
.tv-loading {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--dim);
  font-size: 10px;
}
.tv-fallback {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  place-items: center;
  padding: 18px;
  text-align: center;
  color: var(--dim);
  font-size: 10px;
  line-height: 1.7;
  background: rgba(16, 17, 20, .9);
}
.tv-fallback.show { display: grid; }

.chart-show-btn {
  display: none;
  height: 22px;
  padding: 0 8px;
  border: 1px solid rgba(76, 201, 240, .35);
  border-radius: 4px;
  color: var(--accent);
  background: var(--accent-bg);
  font-size: 9.5px;
  white-space: nowrap;
}
.chart-show-btn:hover { border-color: var(--accent); }
.workspace.chart-hidden { grid-template-columns: 0 minmax(0, 1fr) 290px; }
.workspace.chart-hidden .chart-panel {
  visibility: hidden;
  overflow: hidden;
  padding: 0;
  border: 0;
}
.workspace.chart-hidden .chart-show-btn { display: inline-flex; align-items: center; }

.chart-stats {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px 8px;
  padding-top: 8px;
}
.chart-stats div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.chart-stats span { color: var(--dim); font-size: 8.5px; white-space: nowrap; }
.chart-stats b { font-size: 10.5px; font-weight: 600; white-space: nowrap; }

.resizer {
  position: absolute;
  top: 0; right: -5px; bottom: 0;
  width: 10px;
  cursor: col-resize;
  z-index: 8;
}
.resizer::before {
  content: "";
  position: absolute;
  top: 50%; left: 3px;
  width: 4px; height: 46px; margin-top: -23px;
  border-radius: 2px;
  background: repeating-linear-gradient(
    to bottom,
    var(--dim) 0 3px,
    transparent 3px 6px
  );
  opacity: .35;
}
.resizer::after {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 4px;
  width: 1px;
  background: var(--line);
}
.resizer:hover { background: rgba(76, 201, 240, .05); }
.resizer:hover::before { opacity: .9; background: var(--accent); }
.resizer:hover::after { background: var(--accent); opacity: .35; }
body.resizing { cursor: col-resize; user-select: none; }

/* ---------- 悬浮说明 ---------- */

.has-tip { cursor: help; }
.tooltip {
  position: fixed;
  z-index: 100;
  max-width: 280px;
  padding: 8px 10px;
  background: #1b1e23;
  border: 1px solid #32363d;
  border-radius: 6px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.55;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .45);
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, 4px);
  transition: opacity .12s ease, transform .12s ease;
}
.tooltip.show { opacity: 1; transform: translate(-50%, 0); }

.board { position: relative; display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.board.compact .board-head { flex-wrap: wrap; row-gap: 3px; }
.board.compact .tabs { flex: 1; }
.board.compact .board-meta {
  display: block;
  flex-basis: 100%;
  margin-left: 0;
  font-size: 9px;
  line-height: 1.35;
  white-space: normal;
  max-height: 2.7em;
  overflow: hidden;
}
.board.compact::after {
  content: "";
  position: absolute;
  top: 60px; right: 0; bottom: 0;
  width: 16px;
  background: linear-gradient(to right, transparent, rgba(16, 17, 20, .92));
  pointer-events: none;
}

.board-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 7px 12px 6px;
  border-bottom: 1px solid var(--line-soft);
}
.tabs { display: flex; align-items: center; gap: 2px; overflow-x: auto; min-width: 0; }
.tabs button {
  height: 24px;
  padding: 0 9px;
  border-radius: 4px;
  color: var(--muted);
  font-size: 10.5px;
  white-space: nowrap;
}
.tabs button:hover { color: var(--txt); background: var(--panel-2); }
.tabs button.active { color: var(--accent); background: var(--accent-bg); }
.board-meta {
  margin-left: auto;
  color: var(--dim);
  font-size: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-wrap { flex: 1; min-height: 0; overflow: auto; }
.board-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed;
}
.board-table thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--panel-2);
  color: var(--dim);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .2px;
  text-align: right;
  padding: 5px 6px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.board-table thead th.left { text-align: left; }
.board-table tbody td {
  padding: 5px 6px;
  font-size: 11px;
  text-align: right;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  border-bottom: 1px solid var(--line-soft);
  color: var(--muted);
}
.board.compact .co { max-width: 108px; }
.board-table tbody tr { height: 26px; cursor: pointer; }
.board-table tbody tr:hover td { background: rgba(76, 201, 240, .035); }
.board-table tbody tr.sel td { background: rgba(76, 201, 240, .06); }
.board-table tbody tr.sel td:first-child { box-shadow: inset 2px 0 0 var(--accent); }
.board-table td.left { text-align: left; }
.board-table td.num { color: var(--txt); }
.board-table .rank { color: var(--dim); font-size: 9px; }

.sym { font-family: "SF Mono", ui-monospace, Menlo, monospace; font-weight: 650; font-size: 11px; color: var(--txt); }
.co {
  display: inline-block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
  color: var(--dim);
  margin-left: 5px;
  font-size: 10px;
}
.tag {
  display: inline-block;
  margin-left: 5px;
  padding: 0 4px;
  border-radius: 3px;
  font-size: 8px;
  line-height: 14px;
  vertical-align: 1px;
}
.tag.brk { color: var(--up); background: var(--up-bg); }
.tag.rev { color: var(--accent); background: var(--accent-bg); }
.tag.sig { color: var(--amber); background: rgba(245, 179, 1, .1); }
.tag.pre { color: var(--accent); background: var(--accent-bg); }

.ma { color: var(--txt); }
.ma em { font-style: normal; color: var(--dim); margin-left: 4px; font-size: 9px; }
.score-hi { color: var(--accent); font-weight: 650; }
.score-mid { color: var(--txt); }
.score-low { color: var(--dim); }
.streak { color: var(--muted); }
.streak em { font-style: normal; color: var(--dim); margin-left: 4px; font-size: 9px; }

/* ---------- 右侧板块栏 ---------- */

.rail { display: flex; flex-direction: column; min-height: 0; padding: 8px 10px; overflow: hidden; }
.rail-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding-bottom: 7px;
}
.seg { display: inline-flex; background: var(--panel-2); border-radius: 5px; padding: 2px; }
.seg button {
  height: 20px; padding: 0 8px;
  border-radius: 4px;
  color: var(--dim); font-size: 9.5px;
}
.seg button.active { color: var(--txt); background: var(--panel-3); }
.seg.small button { height: 20px; }
.rail-head > span { color: var(--dim); font-size: 9px; white-space: nowrap; }

.rail-list { flex: 1; min-height: 0; overflow: auto; }
.rail-row {
  padding: 7px 2px 6px;
  border-bottom: 1px solid var(--line-soft);
  cursor: pointer;
}
.rail-row:last-child { border-bottom: 0; }
.rail-row:hover { background: rgba(255, 255, 255, .015); }
.rail-row.active { background: rgba(76, 201, 240, .06); box-shadow: inset 2px 0 0 var(--accent); }
.rail-row.active .rail-name { color: var(--accent); }
.rail-row.active .rail-bar i { background: var(--accent); opacity: .8; }
.rail-row-top .rail-name { color: var(--txt); }
.rail-row-top .rail-bar i { background: var(--accent); opacity: .8; }
.rail-line1 { display: flex; align-items: baseline; gap: 6px; }
.rail-name { color: var(--muted); font-size: 10.5px; font-weight: 600; }
.rail-count { margin-left: auto; color: var(--muted); font-size: 9.5px; }
.rail-share { color: var(--dim); font-size: 9px; width: 30px; text-align: right; }
.rail-bar { height: 2px; background: var(--line-soft); border-radius: 1px; margin: 5px 0 5px; overflow: hidden; }
.rail-bar i { display: block; height: 100%; background: var(--muted); opacity: .35; border-radius: 1px; }
.rail-meta { color: var(--dim); font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-summary {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 12px;
  border-top: 1px solid var(--line-soft);
  margin-top: 6px;
  padding-top: 8px;
}
.rail-summary div { display: flex; align-items: baseline; justify-content: space-between; }
.rail-summary span { color: var(--dim); font-size: 8.5px; }
.rail-summary b { color: var(--txt); font-size: 10.5px; font-weight: 600; }
.rail-foot { flex: 0 0 auto; margin: 7px 0 0; color: var(--dim); font-size: 9px; border-top: 1px solid var(--line-soft); padding-top: 6px; }

/* ---------- 板块表现 ---------- */

.sectors { display: flex; flex-direction: column; min-height: 0; padding: 8px 12px 7px; overflow: hidden; }
.sectors-head { display: flex; align-items: center; gap: 16px; flex: 0 0 auto; }
.sectors-title { display: flex; align-items: baseline; gap: 8px; }
.sectors-title h2 { margin: 0; font-size: 12px; font-weight: 600; }
.sectors-title span { color: var(--dim); font-size: 9px; }
.sectors-controls { margin-left: auto; }
.seg.tiny button { height: 18px; padding: 0 7px; font-size: 9px; }

.sector-grid {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
  margin-top: 5px;
}
.sector-table { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.sector-table-head {
  display: flex; justify-content: space-between;
  color: var(--dim);
  font-size: 8.5px;
  padding: 0 2px 4px;
  border-bottom: 1px solid var(--line-soft);
}
.sector-scroll { flex: 1; min-height: 0; overflow: auto; }
.empty-cell { color: var(--dim); text-align: center; padding: 16px 8px; font-size: 10px; }
.sector-row {
  display: grid;
  grid-template-columns: 68px minmax(40px, 1fr) 52px;
  align-items: center;
  gap: 8px;
  height: 18px;
  padding: 0 2px;
}
.sector-row:hover { background: rgba(255, 255, 255, .015); }
.sector-row span:first-child { color: var(--muted); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sector-bar { height: 3px; background: var(--line-soft); border-radius: 2px; overflow: hidden; display: flex; }
.sector-bar i { display: block; height: 100%; border-radius: 2px; }
.sector-row b { text-align: right; font-size: 10px; font-weight: 500; }

@media (max-width: 1480px) {
  .workspace { grid-template-columns: var(--chart-w, 320px) minmax(0, 1fr) 260px; }
  .chart-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1360px) {
  .dashboard { grid-template-rows: 96px 82px minmax(300px, 1fr) 202px; }
  .posture { grid-template-columns: 180px minmax(0, 1fr) 250px; gap: 10px; }
  .gauges { gap: 10px; }
  .breadth { grid-template-columns: minmax(0, 1fr) 440px; }
  .board-table .co { display: none; }
}

@media (max-width: 1120px) {
  body { overflow: auto; }
  .dashboard { display: block; }
  .posture, .breadth, .workspace, .sectors { margin-bottom: 9px; }
  .workspace { grid-template-columns: 1fr; height: 470px; }
  .chart-panel { min-height: 380px; }
  .resizer { display: none; }
  .rail { display: none; }
  .top-status .time, .top-status .update { display: none; }
}

@media (max-height: 900px) {
  body { overflow: auto; }
  .dashboard { display: block; height: auto; }
  .posture, .breadth, .workspace, .sectors { margin-bottom: 9px; }
  .workspace { height: 470px; }
  .sectors { height: 240px; }
}
