:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface-2: #eef3f5;
  --ink: #172026;
  --muted: #64717b;
  --line: #d9e0e5;
  --accent: #0f766e;
  --accent-2: #2563eb;
  --warn: #b45309;
  --bad: #b91c1c;
  --good: #15803d;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
  --dashboard-row-height: 52px;
  --dashboard-header-height: 38px;
  --rank-col-width: 44px;
  --symbol-col-width: 150px;
  --route-col-width: 150px;
  --funding-col-width: 240px;
  --font:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
  --mono:
    "JetBrains Mono", "IBM Plex Mono", ui-monospace, SFMono-Regular, Consolas,
    monospace;
}
* {
  box-sizing: border-box;
}
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}
body {
  margin: 0px;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 14px;
}
.topbar {
  display: grid;
  grid-template-columns: minmax(240px, 340px) minmax(0px, 1fr);
  gap: 16px;
  align-items: flex-start;
  padding: 18px 24px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.title-block {
  min-width: 260px;
}
.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 8px 10px;
  max-width: none;
  min-width: 0px;
}
h1,
h2 {
  margin: 0px;
  letter-spacing: 0px;
}
h1 {
  font-size: 20px;
}
h2 {
  font-size: 16px;
}
main {
  display: grid;
  gap: 18px;
  padding: 18px 24px 32px;
  width: 100%;
  max-width: 100%;
}
.muted {
  color: var(--muted);
  margin: 4px 0px 0px;
}
.status-pill {
  order: 3;
  flex: 0 0 auto;
  min-width: 104px;
  text-align: center;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-2);
  font-weight: 650;
}
.status-pill.ok {
  color: var(--good);
  background: rgb(236, 253, 243);
  border-color: rgb(187, 247, 208);
}
.status-pill.fail {
  color: var(--bad);
  background: rgb(254, 242, 242);
  border-color: rgb(254, 202, 202);
}
.summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 10px;
}
.summary-grid-collapsed {
  display: none;
}
.compact-status-bar {
  order: 1;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1 1 430px;
  max-width: 520px;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(248, 250, 252);
  color: rgb(51, 65, 85);
  font-size: 12px;
  line-height: 1.3;
}
.compact-status-item {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.compact-status-item strong {
  font-weight: 750;
  color: var(--ink);
}
.compact-status-separator {
  color: var(--line);
}
.compact-version {
  color: var(--muted);
  font-size: 11px;
}
.metric {
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}
.metric-label {
  color: var(--muted);
  font-size: 12px;
}
.metric-value {
  margin-top: 8px;
  font-size: 20px;
  font-weight: 750;
}
.board-section,
.detail-section {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.venue-filter-actions {
  display: inline-flex;
  gap: 8px;
  flex: 0 0 auto;
}
.venue-filter-actions.compact {
  order: 2;
  gap: 5px;
  flex: 0 0 auto;
}
.venue-filter-actions.compact button {
  height: 28px;
  padding: 0px 8px;
  font-size: 11px;
}
.venue-filter-actions button,
.venue-filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  padding: 0px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 650;
  cursor: pointer;
}
.venue-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.venue-filter-bar.compact {
  order: 4;
  display: flex;
  flex: 0 0 100%;
  max-width: none;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  min-width: 0px;
}
.venue-filter-bar.compact .venue-filter-button {
  height: 28px;
  justify-content: center;
  padding: 0px 8px;
  font-size: 11px;
}
.venue-filter-button.active {
  color: rgb(255, 255, 255);
  background: var(--accent);
  border-color: var(--accent);
}
.venue-filter-button.inactive {
  color: var(--muted);
  background: rgb(241, 245, 249);
  text-decoration: line-through;
}
.section-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  background: rgb(251, 252, 253);
}
.heading-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.sort-label {
  padding: 4px 8px;
  border: 1px solid rgb(191, 219, 254);
  border-radius: 999px;
  color: var(--accent-2);
  background: rgb(239, 246, 255);
  font-size: 12px;
  font-weight: 750;
}
.table-wrap {
  overflow-y: auto;
  max-height: calc(
    var(--dashboard-header-height) + var(--dashboard-row-height) * 6
  );
}
.table-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.symbol-market-wrap {
  max-height: calc(
    var(--dashboard-header-height) + var(--dashboard-row-height) * 8
  );
}
table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 1080px;
}
#reversionTable,
#symbolMarketTable[data-board-type="reversion"] {
  min-width: 640px;
}
#positiveCarryTable {
  min-width: 640px;
}
#fundingTable,
#symbolMarketTable[data-board-type="funding"] {
  min-width: 680px;
}
#fundingAbsTable {
  min-width: 520px;
}
#rawSpreadWatchTable {
  min-width: 1480px;
}
#bboOpportunityTable {
  min-width: 1690px;
}
#hedgeLedgerTable {
  min-width: 2200px;
}
#exchangeTruthTable,
#reconcileTable {
  min-width: 1280px;
}
.hedge-ledger-wrap {
  max-height: calc(
    var(--dashboard-header-height) + var(--dashboard-row-height) * 8
  );
}
.reversion-split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0px, 1fr));
  gap: 0px;
}
.funding-split-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0px, 1fr));
  gap: 0px;
}
.reversion-panel {
  min-width: 0px;
}
.funding-panel {
  min-width: 0px;
}
.reversion-panel + .reversion-panel,
.funding-panel + .funding-panel {
  border-left: 1px solid var(--line);
}
.split-board-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--line);
  background: rgb(248, 250, 252);
}
.split-board-heading h3 {
  margin: 0px;
  font-size: 13px;
  line-height: 1.3;
}
.exchange-truth-wrap,
.reconcile-wrap {
  max-height: calc(
    var(--dashboard-header-height) + var(--dashboard-row-height) * 6
  );
}
.hedge-ledger-table .leg-cell,
.hedge-ledger-table .id-cell,
.hedge-ledger-table .action-cell {
  white-space: nowrap;
}
.observe-only-action {
  color: var(--muted);
  font-size: 12px;
}
.manual-close-button {
  min-height: 28px;
  padding: 0px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgb(255, 255, 255);
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}
.manual-close-button:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}
.manual-close-button:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.55;
}
.manual-intent-form {
  display: grid;
  grid-template-columns: repeat(8, minmax(120px, 1fr)) auto;
  gap: 8px;
  align-items: end;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.manual-intent-form label {
  display: grid;
  gap: 4px;
  min-width: 0px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.manual-intent-form input,
.manual-intent-form select,
.manual-intent-form button {
  width: 100%;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}
.manual-intent-form input,
.manual-intent-form select {
  padding: 0px 8px;
}
.manual-intent-form button {
  min-width: 138px;
  padding: 0px 10px;
  background: var(--accent);
  border-color: var(--accent);
  color: rgb(255, 255, 255);
  font-weight: 750;
  cursor: pointer;
}
.manual-review-panel,
.manual-status-panel {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
}
.manual-review-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 8px;
}
.manual-review-card {
  display: grid;
  gap: 4px;
  min-width: 0px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
}
.manual-review-label,
.manual-status-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.manual-review-value {
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
}
.manual-gate-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.manual-gate {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  max-width: 100%;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(248, 250, 252);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}
.manual-gate.ok {
  border-color: rgb(134, 239, 172);
  background: rgb(236, 253, 245);
  color: rgb(22, 101, 52);
}
.manual-gate.block {
  border-color: rgb(254, 202, 202);
  background: rgb(254, 242, 242);
  color: rgb(153, 27, 27);
}
.manual-submit-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
.manual-submit-actions button {
  height: 32px;
  min-width: 112px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  background: var(--accent);
  color: rgb(255, 255, 255);
  font-style: inherit;
  font-variant: inherit;
  font-stretch: inherit;
  font-size: inherit;
  line-height: inherit;
  font-family: inherit;
  font-optical-sizing: inherit;
  font-size-adjust: inherit;
  font-kerning: inherit;
  font-feature-settings: inherit;
  font-variation-settings: inherit;
  font-language-override: inherit;
  font-weight: 750;
  cursor: pointer;
}
.manual-submit-actions button:disabled {
  border-color: var(--line);
  background: rgb(226, 232, 240);
  color: var(--muted);
  cursor: not-allowed;
}
.manual-status-table {
  width: 100%;
  border-collapse: collapse;
}
.manual-status-table th,
.manual-status-table td {
  max-width: 180px;
}
.manual-intent-json {
  margin: 0px;
  min-height: 96px;
  max-height: 240px;
  overflow: auto;
  padding: 12px 14px;
  background: rgb(15, 23, 42);
  color: rgb(226, 232, 240);
  font-size: 12px;
  line-height: 1.5;
}
th,
td {
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}
th {
  position: sticky;
  top: 0px;
  z-index: 1;
  background: rgb(248, 250, 252);
  color: rgb(51, 65, 85);
  font-size: 12px;
  font-weight: 750;
}
th[data-sort] {
  cursor: pointer;
}
tbody tr {
  cursor: pointer;
}
tbody tr:hover,
tbody tr.selected {
  background: rgb(238, 246, 255);
}
tbody tr.selected {
  box-shadow: inset 3px 0 0 var(--accent-2);
}
#fundingTable,
#fundingAbsTable,
#reversionTable,
#symbolMarketTable,
#rawSpreadWatchTable {
  font-variant-numeric: tabular-nums;
}
.hidden {
  display: none !important;
}
.tag {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  font-size: 12px;
  font-weight: 650;
}
.tag.good {
  color: var(--good);
  background: rgb(236, 253, 243);
  border-color: rgb(187, 247, 208);
}
.tag.warn {
  color: var(--warn);
  background: rgb(255, 247, 237);
  border-color: rgb(254, 215, 170);
}
.tag.blue {
  color: var(--accent-2);
  background: rgb(239, 246, 255);
  border-color: rgb(191, 219, 254);
}
.value-good {
  color: var(--good);
  font-weight: 700;
}
.value-bad {
  color: var(--bad);
  font-weight: 700;
}
.value-warn {
  color: var(--warn);
  font-weight: 700;
}
.value-neutral,
.value-missing {
  color: var(--muted);
}
.funding-text {
  font-variant-numeric: tabular-nums;
  min-width: var(--funding-col-width);
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  line-height: 1.35;
}
.funding-net {
  display: inline-block;
  min-width: 86px;
  margin-right: 6px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.funding-leg-detail {
  color: rgb(51, 65, 85);
}
.rank-cell {
  text-align: center;
  color: var(--muted);
  font-weight: 700;
}
.symbol-cell {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 750;
  letter-spacing: 0px;
}
.route-cell {
  white-space: normal;
  overflow: hidden;
  text-overflow: clip;
}
.route-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0px;
  overflow: hidden;
  line-height: 1.24;
}
.route-leg {
  display: grid;
  grid-template-columns: 30px minmax(92px, 1fr) minmax(56px, 74px);
  align-items: center;
  column-gap: 6px;
  row-gap: 2px;
  min-width: 0px;
}
.side-label {
  flex: 0 0 auto;
  min-width: 30px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}
.side-long {
  color: rgb(15, 118, 110);
}
.side-short {
  color: rgb(185, 28, 28);
}
.venue-name {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 700;
}
.venue-name > span:last-child {
  min-width: 0px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.asset-icon {
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 0px;
  border: 0;
  background: transparent;
  color: inherit;
  font-size: 0px;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
  box-shadow: none;
}
.asset-icon-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 0px;
}
.asset-icon-broken {
  display: none;
}
.venue-link {
  color: rgb(31, 41, 55);
  text-decoration: none;
  cursor: pointer;
}
.venue-link:hover,
.venue-link:focus-visible {
  color: rgb(15, 23, 42);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.route-l1-line {
  display: block;
  max-width: 74px;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  color: rgb(100, 116, 139);
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.25;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.l1-spread-line {
  color: rgb(100, 116, 139);
  font-size: 10.5px;
  font-weight: 750;
  line-height: 1.15;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.l1-fresh {
  color: rgb(15, 118, 110);
}
.l1-weak {
  color: rgb(180, 83, 9);
}
.l1-stale,
.l1-missing {
  color: rgb(100, 116, 139);
}
tr.selected .venue-link,
.detail-card .venue-link {
  color: rgb(17, 24, 39);
}
.funding-cell {
  min-width: var(--funding-col-width);
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
  font-variant-numeric: tabular-nums;
}
.funding-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0px;
  line-height: 1.25;
}
.funding-stack .funding-net {
  display: block;
  min-width: 0px;
  margin-right: 0px;
  font-size: 13px;
  line-height: 1.2;
}
.funding-detail {
  display: block;
  color: rgb(71, 85, 105);
  font-size: 11.5px;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}
.funding-settlement-sequence {
  display: block;
  margin-top: 1px;
  color: rgb(100, 116, 139);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}
.funding-settlement-sequence.staggered-collect {
  color: rgb(15, 118, 110);
}
.funding-settlement-sequence.staggered-mixed {
  color: rgb(180, 83, 9);
}
.ad-hoc-spread-form {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0px;
  padding: 8px;
  border: 1px solid rgb(219, 227, 238);
  border-radius: 8px;
  background: rgb(248, 250, 252);
}
.ad-hoc-spread-form label {
  color: rgb(51, 65, 85);
  font-size: 12px;
  font-weight: 800;
}
.ad-hoc-spread-form input {
  flex: 1 1 280px;
  min-width: 180px;
  padding: 6px 8px;
  border: 1px solid rgb(203, 213, 225);
  border-radius: 6px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
}
.ad-hoc-spread-form select,
.ad-hoc-spread-form button {
  padding: 6px 8px;
  border: 1px solid rgb(203, 213, 225);
  border-radius: 6px;
  background: rgb(255, 255, 255);
  font-size: 12px;
}
.ad-hoc-spread-form button {
  cursor: pointer;
  font-weight: 750;
}
.ad-hoc-spread-hint {
  flex: 1 0 100%;
  color: rgb(71, 85, 105);
  font-size: 11px;
  line-height: 1.35;
}
.num-cell {
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.align-center {
  text-align: center;
}
.edge-cell {
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.spread-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 0px;
  line-height: 1.2;
}
.spread-value {
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.spread-meta {
  max-width: 100%;
  color: rgb(100, 116, 139);
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}
.edge-value {
  text-align: center;
}
.latency-badge {
  display: block;
  text-align: center;
}
.num-cell .spread-source-badge {
  margin-left: 4px;
}
.ladder-cell,
.advice-cell,
.quality-cell {
  white-space: normal;
}
.spread-source-badge {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  padding: 1px 5px;
  border-radius: 6px;
  background: rgb(238, 242, 247);
  color: rgb(71, 85, 105);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.raw-spread-section .notice {
  margin: 10px 14px 14px;
}
.raw-spread-wrap {
  max-height: calc(
    var(--dashboard-header-height) + var(--dashboard-row-height) * 6
  );
}
.raw-spread-table th,
.raw-spread-table td {
  text-align: center;
}
.raw-spread-table .symbol-cell,
.raw-spread-table .raw-venue-cell,
.raw-spread-table .raw-risk-cell,
.raw-spread-table .raw-reasons-cell {
  text-align: left;
}
.raw-venue-cell {
  white-space: normal;
  overflow: visible;
  text-overflow: clip;
}
.raw-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}
.raw-tag,
.raw-reason {
  display: inline-flex;
  max-width: 100%;
  padding: 2px 6px;
  border: 1px solid rgb(226, 232, 240);
  border-radius: 999px;
  color: rgb(71, 85, 105);
  background: rgb(248, 250, 252);
  font-size: 11px;
  line-height: 1.2;
  white-space: normal;
}
.raw-reasons-cell {
  white-space: normal;
}
#fundingTable th:nth-child(1),
#fundingTable td:nth-child(1),
#reversionTable th:nth-child(1),
#reversionTable td:nth-child(1),
#positiveCarryTable th:nth-child(1),
#positiveCarryTable td:nth-child(1),
#symbolMarketTable th:nth-child(1),
#symbolMarketTable td:nth-child(1) {
  width: var(--rank-col-width);
  text-align: right;
}
#fundingTable th:nth-child(2),
#fundingTable td:nth-child(2),
#reversionTable th:nth-child(2),
#reversionTable td:nth-child(2),
#positiveCarryTable th:nth-child(2),
#positiveCarryTable td:nth-child(2),
#symbolMarketTable th:nth-child(2),
#symbolMarketTable td:nth-child(2) {
  width: var(--symbol-col-width);
}
#fundingTable th:nth-child(3),
#fundingTable td:nth-child(3),
#reversionTable th:nth-child(3),
#reversionTable td:nth-child(3),
#positiveCarryTable th:nth-child(3),
#positiveCarryTable td:nth-child(3),
#symbolMarketTable th:nth-child(3),
#symbolMarketTable td:nth-child(3) {
  width: var(--route-col-width);
}
#fundingTable th:nth-child(4),
#fundingTable td:nth-child(4),
#reversionTable th:nth-child(5),
#reversionTable td:nth-child(5),
#symbolMarketTable[data-board-type="funding"] th:nth-child(4),
#symbolMarketTable[data-board-type="funding"] td:nth-child(4),
#symbolMarketTable[data-board-type="reversion"] th:nth-child(5),
#symbolMarketTable[data-board-type="reversion"] td:nth-child(5) {
  width: var(--funding-col-width);
}
#fundingTable th:nth-child(4),
#fundingTable td:nth-child(4) {
  min-width: var(--funding-col-width);
}
#reversionTable th:nth-child(1),
#reversionTable td:nth-child(1),
#fundingTable th:nth-child(1),
#fundingTable td:nth-child(1),
#symbolMarketTable th:nth-child(1),
#symbolMarketTable td:nth-child(1) {
  width: var(--rank-col-width);
  text-align: center;
}
#reversionTable th:nth-child(2),
#reversionTable td:nth-child(2),
#fundingTable th:nth-child(2),
#fundingTable td:nth-child(2),
#symbolMarketTable th:nth-child(2),
#symbolMarketTable td:nth-child(2) {
  width: var(--symbol-col-width);
}
#reversionTable th:nth-child(3),
#reversionTable td:nth-child(3),
#fundingTable th:nth-child(3),
#fundingTable td:nth-child(3),
#symbolMarketTable th:nth-child(3),
#symbolMarketTable td:nth-child(3) {
  width: var(--route-col-width);
}
#reversionTable th:nth-child(4),
#reversionTable td:nth-child(4),
#positiveCarryTable th:nth-child(4),
#positiveCarryTable td:nth-child(4),
#fundingTable th:nth-child(5),
#fundingTable td:nth-child(5),
#symbolMarketTable[data-board-type="reversion"] th:nth-child(4),
#symbolMarketTable[data-board-type="reversion"] td:nth-child(4),
#symbolMarketTable[data-board-type="funding"] th:nth-child(5),
#symbolMarketTable[data-board-type="funding"] td:nth-child(5) {
  width: 112px;
}
#reversionTable th:nth-child(5),
#reversionTable td:nth-child(5),
#positiveCarryTable th:nth-child(5),
#positiveCarryTable td:nth-child(5),
#fundingTable th:nth-child(4),
#fundingTable td:nth-child(4),
#symbolMarketTable[data-board-type="reversion"] th:nth-child(5),
#symbolMarketTable[data-board-type="reversion"] td:nth-child(5),
#symbolMarketTable[data-board-type="funding"] th:nth-child(4),
#symbolMarketTable[data-board-type="funding"] td:nth-child(4) {
  width: var(--funding-col-width);
}
#reversionTable th:nth-child(6),
#reversionTable td:nth-child(6),
#reversionTable th:nth-child(8),
#reversionTable td:nth-child(8),
#fundingTable th:nth-child(7),
#fundingTable td:nth-child(7),
#symbolMarketTable[data-board-type="reversion"] th:nth-child(6),
#symbolMarketTable[data-board-type="reversion"] td:nth-child(6),
#symbolMarketTable[data-board-type="reversion"] th:nth-child(8),
#symbolMarketTable[data-board-type="reversion"] td:nth-child(8),
#symbolMarketTable[data-board-type="funding"] th:nth-child(7),
#symbolMarketTable[data-board-type="funding"] td:nth-child(7) {
  width: 92px;
}
#reversionTable th:nth-child(7),
#reversionTable td:nth-child(7),
#fundingTable th:nth-child(6),
#fundingTable td:nth-child(6),
#symbolMarketTable[data-board-type="reversion"] th:nth-child(7),
#symbolMarketTable[data-board-type="reversion"] td:nth-child(7),
#symbolMarketTable[data-board-type="funding"] th:nth-child(6),
#symbolMarketTable[data-board-type="funding"] td:nth-child(6) {
  width: 110px;
}
#fundingTable th,
#fundingTable td,
#fundingAbsTable th,
#fundingAbsTable td {
  padding-left: 6px;
  padding-right: 6px;
}
#fundingTable th:nth-child(1),
#fundingTable td:nth-child(1),
#fundingAbsTable th:nth-child(1),
#fundingAbsTable td:nth-child(1) {
  width: 42px;
  text-align: center;
}
#fundingTable th:nth-child(2),
#fundingTable td:nth-child(2),
#fundingAbsTable th:nth-child(2),
#fundingAbsTable td:nth-child(2) {
  width: 150px;
}
#fundingTable th:nth-child(3),
#fundingTable td:nth-child(3) {
  width: 168px;
}
#fundingTable th:nth-child(4),
#fundingTable td:nth-child(4),
#fundingAbsTable th:nth-child(3),
#fundingAbsTable td:nth-child(3) {
  width: 240px;
}
#fundingTable th:nth-child(5),
#fundingTable td:nth-child(5),
#fundingAbsTable th:nth-child(4),
#fundingAbsTable td:nth-child(4) {
  width: 96px;
}
#fundingTable th:nth-child(6),
#fundingTable td:nth-child(6),
#fundingAbsTable th:nth-child(6),
#fundingAbsTable td:nth-child(6) {
  width: 92px;
}
#fundingAbsTable th:nth-child(5),
#fundingAbsTable td:nth-child(5) {
  width: 230px;
}
#fundingAbsTable th:nth-child(3),
#fundingAbsTable td:nth-child(3) {
  width: 128px;
}
#fundingAbsTable th:nth-child(4),
#fundingAbsTable td:nth-child(4) {
  width: auto;
}
.max-funding-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  line-height: 1.2;
  min-height: 32px;
}
.max-funding-venue {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-weight: 700;
  color: var(--ink);
}
.max-funding-venue .asset-icon {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
}
.max-funding-value {
  font-family: var(--mono);
  font-weight: 700;
}
.venue-coverage {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.coverage-count {
  font-size: 11px;
  color: var(--muted);
  margin-right: 2px;
}
.venue-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 6px;
  border: 1px solid rgb(191, 219, 254);
  border-radius: 999px;
  background: rgb(239, 246, 255);
  font-size: 11px;
  line-height: 1.2;
}
.venue-chip .asset-icon {
  width: 20px;
  height: 20px;
  flex-basis: 20px;
}
.route-correction-form {
  display: grid;
  grid-template-columns: auto minmax(140px, 220px) auto minmax(180px, 280px) repeat(4, auto) minmax(180px, 1fr);
  gap: 6px;
  align-items: center;
  margin: 8px 0 10px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(248, 250, 252);
}
.route-correction-form label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.route-correction-form input {
  min-width: 0;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 8px;
  font-size: 12px;
  background: white;
}
.route-correction-form button {
  height: 28px;
  border: 1px solid rgb(191, 219, 254);
  border-radius: 6px;
  background: rgb(239, 246, 255);
  color: rgb(29, 78, 216);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
}
.route-correction-form button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.route-correction-form #blacklistRoute {
  border-color: rgb(254, 202, 202);
  background: rgb(254, 242, 242);
  color: rgb(185, 28, 28);
}
#reversionTable th:nth-child(9),
#reversionTable td:nth-child(9),
#symbolMarketTable[data-board-type="reversion"] th:nth-child(9),
#symbolMarketTable[data-board-type="reversion"] td:nth-child(9) {
  width: 110px;
}
#reversionTable th:nth-child(10),
#reversionTable td:nth-child(10),
#symbolMarketTable[data-board-type="reversion"] th:nth-child(10),
#symbolMarketTable[data-board-type="reversion"] td:nth-child(10) {
  width: 120px;
}
#reversionTable th:nth-child(11),
#reversionTable td:nth-child(11),
#symbolMarketTable[data-board-type="reversion"] th:nth-child(11),
#symbolMarketTable[data-board-type="reversion"] td:nth-child(11) {
  width: 90px;
}
#reversionTable th:nth-child(12),
#reversionTable td:nth-child(12),
#positiveCarryTable th:nth-child(6),
#positiveCarryTable td:nth-child(6),
#fundingTable th:nth-child(8),
#fundingTable td:nth-child(8),
#symbolMarketTable[data-board-type="reversion"] th:nth-child(12),
#symbolMarketTable[data-board-type="reversion"] td:nth-child(12),
#symbolMarketTable[data-board-type="funding"] th:nth-child(8),
#symbolMarketTable[data-board-type="funding"] td:nth-child(8) {
  width: 100px;
}
#reversionTable th:nth-child(1),
#reversionTable td:nth-child(1),
#reversionTable th:nth-child(4),
#reversionTable td:nth-child(4),
#reversionTable th:nth-child(6),
#reversionTable td:nth-child(6),
#positiveCarryTable th:nth-child(1),
#positiveCarryTable td:nth-child(1),
#positiveCarryTable th:nth-child(4),
#positiveCarryTable td:nth-child(4),
#positiveCarryTable th:nth-child(6),
#positiveCarryTable td:nth-child(6),
#reversionTable th:nth-child(7),
#reversionTable td:nth-child(7),
#reversionTable th:nth-child(8),
#reversionTable td:nth-child(8),
#reversionTable th:nth-child(9),
#reversionTable td:nth-child(9),
#reversionTable th:nth-child(10),
#reversionTable td:nth-child(10),
#reversionTable th:nth-child(11),
#reversionTable td:nth-child(11),
#reversionTable th:nth-child(12),
#reversionTable td:nth-child(12),
#fundingTable th:nth-child(1),
#fundingTable td:nth-child(1),
#fundingTable th:nth-child(5),
#fundingTable td:nth-child(5),
#fundingTable th:nth-child(6),
#fundingTable td:nth-child(6),
#fundingTable th:nth-child(7),
#fundingTable td:nth-child(7),
#fundingTable th:nth-child(8),
#fundingTable td:nth-child(8),
#symbolMarketTable th:nth-child(1),
#symbolMarketTable td:nth-child(1),
#symbolMarketTable[data-board-type="reversion"] th:nth-child(4),
#symbolMarketTable[data-board-type="reversion"] td:nth-child(4),
#symbolMarketTable[data-board-type="reversion"] th:nth-child(6),
#symbolMarketTable[data-board-type="reversion"] td:nth-child(6),
#symbolMarketTable[data-board-type="reversion"] th:nth-child(7),
#symbolMarketTable[data-board-type="reversion"] td:nth-child(7),
#symbolMarketTable[data-board-type="reversion"] th:nth-child(8),
#symbolMarketTable[data-board-type="reversion"] td:nth-child(8),
#symbolMarketTable[data-board-type="reversion"] th:nth-child(9),
#symbolMarketTable[data-board-type="reversion"] td:nth-child(9),
#symbolMarketTable[data-board-type="reversion"] th:nth-child(10),
#symbolMarketTable[data-board-type="reversion"] td:nth-child(10),
#symbolMarketTable[data-board-type="reversion"] th:nth-child(11),
#symbolMarketTable[data-board-type="reversion"] td:nth-child(11),
#symbolMarketTable[data-board-type="reversion"] th:nth-child(12),
#symbolMarketTable[data-board-type="reversion"] td:nth-child(12),
#symbolMarketTable[data-board-type="funding"] th:nth-child(5),
#symbolMarketTable[data-board-type="funding"] td:nth-child(5),
#symbolMarketTable[data-board-type="funding"] th:nth-child(6),
#symbolMarketTable[data-board-type="funding"] td:nth-child(6),
#symbolMarketTable[data-board-type="funding"] th:nth-child(7),
#symbolMarketTable[data-board-type="funding"] td:nth-child(7),
#symbolMarketTable[data-board-type="funding"] th:nth-child(8),
#symbolMarketTable[data-board-type="funding"] td:nth-child(8) {
  text-align: center;
}
#reversionTable th:nth-child(2),
#reversionTable td:nth-child(2),
#reversionTable th:nth-child(3),
#reversionTable td:nth-child(3),
#reversionTable th:nth-child(5),
#reversionTable td:nth-child(5),
#positiveCarryTable th:nth-child(2),
#positiveCarryTable td:nth-child(2),
#positiveCarryTable th:nth-child(3),
#positiveCarryTable td:nth-child(3),
#positiveCarryTable th:nth-child(5),
#positiveCarryTable td:nth-child(5),
#fundingTable th:nth-child(2),
#fundingTable td:nth-child(2),
#fundingTable th:nth-child(3),
#fundingTable td:nth-child(3),
#fundingTable th:nth-child(4),
#fundingTable td:nth-child(4),
#symbolMarketTable[data-board-type="reversion"] th:nth-child(2),
#symbolMarketTable[data-board-type="reversion"] td:nth-child(2),
#symbolMarketTable[data-board-type="reversion"] th:nth-child(3),
#symbolMarketTable[data-board-type="reversion"] td:nth-child(3),
#symbolMarketTable[data-board-type="reversion"] th:nth-child(5),
#symbolMarketTable[data-board-type="reversion"] td:nth-child(5),
#symbolMarketTable[data-board-type="funding"] th:nth-child(2),
#symbolMarketTable[data-board-type="funding"] td:nth-child(2),
#symbolMarketTable[data-board-type="funding"] th:nth-child(3),
#symbolMarketTable[data-board-type="funding"] td:nth-child(3),
#symbolMarketTable[data-board-type="funding"] th:nth-child(4),
#symbolMarketTable[data-board-type="funding"] td:nth-child(4) {
  text-align: left;
}
td.empty-state {
  padding: 24px 12px;
  text-align: center;
  white-space: normal;
  color: var(--muted);
  background: rgb(248, 250, 252);
}
.detail-section {
  min-height: 520px;
}
.tabbar {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}
.tab-button {
  height: 34px;
  padding: 0px 12px;
  border-top: 0px;
  border-bottom: 0px;
  border-left: 0px;
  border-image: initial;
  border-right: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
}
.tab-button:last-child {
  border-right: 0px;
}
.tab-button.active {
  color: rgb(255, 255, 255);
  background: var(--accent);
}
.tab-panel {
  display: none;
  padding: 14px;
}
.tab-panel.active {
  display: block;
}
.detail-card-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.detail-card {
  min-height: 82px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(251, 252, 253);
}
.detail-card-label,
.detail-card-hint {
  color: var(--muted);
  font-size: 12px;
}
.detail-card-value {
  margin-top: 6px;
  font-weight: 750;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.chart-range-controls {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin-bottom: 10px;
}
.chart-range-controls button {
  height: 32px;
  padding: 0px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-weight: 650;
}
.chart-range-controls button.active {
  color: rgb(255, 255, 255);
  background: var(--accent-2);
  border-color: var(--accent-2);
}
.chart-refresh-button {
  min-width: 86px;
}
.chart-view-controls {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  margin: 0px 0px 10px;
}
.chart-view-controls label {
  color: var(--muted);
  font-size: 12px;
}
.chart-view-controls select {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  font-size: 12px;
  padding: 6px 8px;
}
.chart-normalized-summary {
  background: rgb(248, 250, 252);
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  display: grid;
  gap: 6px;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin: 0px 0px 10px;
  padding: 8px 10px;
}
.chart-normalized-summary .summary-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.chart-normalized-summary .summary-label {
  color: var(--muted);
  font-size: 11px;
}
.chart-normalized-summary .summary-value {
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
}
.chart-normalized-summary .summary-note {
  color: rgb(146, 64, 14);
  font-size: 12px;
  grid-column: 1 / -1;
}
.notice {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(248, 250, 252);
  color: var(--muted);
}
#spreadChart {
  display: block;
  width: 100%;
  max-height: 360px;
  min-height: 360px;
  margin-top: 12px;
  height: 360px !important;
}
#fundingChart {
  display: block;
  width: 100%;
  max-height: 280px;
  min-height: 260px;
  margin-top: 12px;
  height: 280px !important;
}
#spreadChart.chart-rendered,
#fundingChart.chart-rendered {
  background: rgb(255, 255, 255);
}
.canvas-chart-tooltip {
  position: fixed;
  z-index: 10000;
  max-width: 360px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 6px;
  background: rgba(15, 23, 42, 0.94);
  color: rgb(248, 250, 252);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.24);
  font-size: 12px;
  line-height: 1.45;
  pointer-events: none;
}
.canvas-chart-tooltip.hidden {
  display: none;
}
.canvas-chart-tooltip-title {
  margin-bottom: 6px;
  font-weight: 750;
}
.canvas-chart-tooltip-line {
  display: grid;
  grid-template-columns: 10px minmax(0px, 1fr) auto;
  gap: 6px;
  align-items: center;
  white-space: nowrap;
}
.canvas-chart-tooltip-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}
.canvas-chart-tooltip-line span:nth-child(2) {
  overflow: hidden;
  color: rgb(226, 232, 240);
  text-overflow: ellipsis;
}
.canvas-chart-tooltip-line strong {
  font-variant-numeric: tabular-nums;
}
.canvas-chart-tooltip-audit {
  margin-top: 7px;
  padding-top: 7px;
  border-top: 1px solid rgba(226, 232, 240, 0.22);
  color: rgb(203, 213, 225);
}
.notice.chart-rendered {
  border-color: rgb(187, 247, 208);
  background: rgb(236, 253, 243);
  color: var(--good);
}
.feature-json {
  max-height: 220px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(15, 23, 42);
  color: rgb(219, 234, 254);
  font-size: 12px;
}
.debug-details {
  margin-top: 12px;
}
.debug-details summary {
  color: var(--muted);
  cursor: pointer;
  font-weight: 650;
}
@media (max-width: 1199px) {
  .topbar {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }
  .topbar-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
  }
  .compact-status-bar {
    flex: 1 1 420px;
  }
}
@media (max-width: 980px) {
  .topbar,
  .section-heading,
  .venue-filter-heading {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
  }
  .topbar-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
  }
  .venue-filter-bar.compact {
    grid-auto-flow: row;
    grid-template-rows: none;
    grid-template-columns: repeat(2, minmax(112px, 1fr));
    justify-content: stretch;
  }
  .summary-grid {
    grid-template-columns: repeat(2, minmax(0px, 1fr));
  }
  .detail-card-grid {
    grid-template-columns: repeat(2, minmax(0px, 1fr));
  }
  .reversion-split-grid,
  .funding-split-grid {
    grid-template-columns: 1fr;
  }
  .route-correction-form {
    grid-template-columns: 1fr 1fr;
  }
  .route-correction-form label,
  .route-correction-form #routeCorrectionStatus {
    grid-column: 1 / -1;
  }
  .reversion-panel + .reversion-panel,
  .funding-panel + .funding-panel {
    border-top: 1px solid var(--line);
    border-left: 0px;
  }
  .manual-intent-form {
    grid-template-columns: repeat(3, minmax(140px, 1fr));
  }
  .manual-intent-form button {
    grid-column: 1 / -1;
  }
  main {
    padding: 14px;
  }
}
@media (max-width: 767px) {
  :root {
    --dashboard-row-height: 38px;
    --rank-col-width: 40px;
    --symbol-col-width: 132px;
    --route-col-width: 132px;
    --funding-col-width: 220px;
  }
  .topbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
    padding: 10px;
  }
  .title-block {
    min-width: 0px;
    width: 100%;
  }
  h1 {
    font-size: 18px;
    line-height: 1.25;
  }
  h2 {
    font-size: 15px;
    line-height: 1.3;
  }
  .muted {
    font-size: 11px;
    overflow-wrap: anywhere;
  }
  main {
    gap: 10px;
    padding: 8px;
  }
  .topbar-actions {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    gap: 8px;
  }
  .compact-status-bar {
    width: 100%;
    flex: 1 1 auto;
    flex-wrap: wrap;
    align-self: stretch;
    padding: 6px 8px;
    font-size: 11px;
  }
  .compact-status-item {
    white-space: normal;
  }
  .compact-version {
    flex-basis: 100%;
    font-size: 10px;
  }
  .venue-filter-bar.compact {
    order: 2;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
    gap: 5px;
  }
  .venue-filter-bar.compact .venue-filter-button,
  .venue-filter-actions.compact button {
    height: 26px;
    padding: 0px 8px;
    font-size: 11px;
  }
  .venue-filter-actions.compact {
    order: 3;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
  }
  .status-pill {
    order: 4;
    align-self: flex-start;
    min-width: 84px;
    padding: 6px 10px;
    font-size: 12px;
  }
  .section-heading {
    align-items: flex-start;
    padding: 10px;
  }
  .heading-meta {
    gap: 6px;
  }
  .sort-label {
    padding: 3px 7px;
    font-size: 11px;
  }
  .board-section,
  .detail-section {
    border-radius: 8px;
  }
  .table-scroll {
    width: 100%;
    max-width: 100%;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }
  #reversionTable,
  #symbolMarketTable[data-board-type="reversion"] {
    min-width: 620px;
  }
  #positiveCarryTable {
    min-width: 620px;
  }
  #fundingTable,
  #symbolMarketTable[data-board-type="funding"] {
    min-width: 640px;
  }
  #fundingAbsTable {
    min-width: 520px;
  }
  th,
  td {
    padding: 6px;
    font-size: 12px;
  }
  .funding-text {
    min-width: var(--funding-col-width);
    line-height: 1.3;
  }
  .funding-cell {
    min-width: var(--funding-col-width);
    line-height: 1.3;
  }
  .funding-net {
    display: block;
    min-width: 0px;
    margin-right: 0px;
    margin-bottom: 2px;
  }
  .funding-detail,
  .funding-leg-detail {
    display: block;
  }
  .route-leg {
    gap: 4px;
  }
  .side-label {
    min-width: 26px;
    font-size: 10.5px;
  }
  #symbolMarketTitle {
    overflow-wrap: anywhere;
  }
  .tab-panel {
    padding: 10px;
  }
  .detail-card-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .manual-intent-form {
    grid-template-columns: 1fr;
  }
  .detail-card {
    width: 100%;
    min-height: auto;
    padding: 8px;
  }
  .chart-range-controls {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  #spreadChart {
    max-height: 280px;
    min-height: 240px;
    height: 280px !important;
  }
  #fundingChart {
    max-height: 240px;
    min-height: 220px;
    height: 240px !important;
  }
}
.dashboard-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(248, 250, 252);
}
.dashboard-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0px 10px;
  border-radius: 6px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 650;
  white-space: nowrap;
}
.dashboard-nav a.active {
  color: rgb(255, 255, 255);
  background: var(--accent);
}
.observation-page .hedge-ledger-section,
.observation-page .position-truth-section,
.observation-page .reconcile-section,
.observation-page .manual-intent-section {
  display: none;
}
.ghost-button {
  height: 36px;
  padding: 0px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 650;
  cursor: pointer;
}
.trading-page main.trading-workspace-shell {
  display: grid;
  grid-template-columns: minmax(0px, 1fr) minmax(340px, 380px);
  gap: 16px;
  align-items: start;
}
.trading-topbar .topbar-actions {
  align-items: center;
}
.trading-left-pane,
.trading-right-pane {
  min-width: 0px;
}
.trading-right-pane {
  display: grid;
  align-content: start;
  background: rgb(251, 252, 253);
}
.trading-table-wrap {
  max-height: calc(-170px + 100vh);
}
.trading-monitor-table {
  min-width: 1520px;
}
.trading-monitor-table th,
.trading-monitor-table td {
  vertical-align: top;
}
.trading-monitor-table td span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}
.monitor-symbol-cell {
  min-width: 180px;
}
.monitor-symbol-stack {
  display: grid;
  gap: 2px;
  line-height: 1.28;
}
.monitor-symbol-stack strong {
  display: block;
  margin-top: 0px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
  font-family: var(--mono);
  white-space: nowrap;
}
.monitor-symbol-stack span {
  display: block;
  margin-top: 2px;
  color: var(--ink);
  font-size: 12px;
  font-family: var(--mono);
  font-weight: 750;
  white-space: nowrap;
}
.monitor-value-cell {
  min-width: 122px;
}
.monitor-value-cell strong {
  display: block;
  white-space: nowrap;
  font-size: 14px;
}
.monitor-funding-cell {
  min-width: 198px;
  max-width: 230px;
  color: var(--ink);
  font-family: var(--mono);
  font-size: 11.5px;
  font-weight: 700;
  line-height: 1.25;
}
.monitor-funding-stack {
  display: grid;
  gap: 2px;
}
.monitor-funding-stack span {
  display: block;
  white-space: nowrap;
}
.monitor-funding-summary {
  color: rgb(17, 24, 39);
}
.monitor-funding-leg {
  color: rgb(51, 65, 85);
}
.monitor-ratio-input,
.monitor-limit-input {
  width: 86px;
  min-height: 30px;
  padding: 5px 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgb(255, 255, 255);
  color: var(--ink);
  font-style: inherit;
  font-variant: inherit;
  font-stretch: inherit;
  line-height: inherit;
  font-family: inherit;
  font-optical-sizing: inherit;
  font-size-adjust: inherit;
  font-kerning: inherit;
  font-feature-settings: inherit;
  font-variation-settings: inherit;
  font-language-override: inherit;
  font-size: 12px;
  font-weight: 750;
}
.monitor-ratio-input:focus,
.monitor-limit-input:focus {
  outline: rgba(37, 99, 235, 0.18) solid 2px;
  border-color: rgb(37, 99, 235);
}
.monitor-spread-cell {
  min-width: 94px;
}
.monitor-avg-line,
.monitor-position-qty {
  white-space: nowrap;
  font-weight: 750;
}
.monitor-status-cell {
  min-width: 148px;
}
.monitor-status-cell strong {
  display: block;
  margin-bottom: 2px;
}
.monitor-status-cell span {
  margin-top: 1px;
}
.monitor-risk-compact {
  align-items: baseline;
  gap: 5px;
  font-family: var(--mono);
  white-space: nowrap;
  display: flex !important;
  color: var(--ink) !important;
}
.monitor-risk-compact b {
  color: var(--muted);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 700;
}
.monitor-actions-cell {
  min-width: 126px;
}
.trading-monitor-row {
  cursor: pointer;
}
.trading-monitor-row.is-running td {
  background: rgb(236, 253, 243);
}
.trading-monitor-row.is-running:hover td,
.trading-monitor-row.is-running.selected td {
  background: rgb(220, 252, 231);
}
.trading-monitor-row.is-paused td,
.trading-monitor-row.is-idle td {
  background: rgb(255, 241, 242);
}
.trading-monitor-row.is-paused:hover td,
.trading-monitor-row.is-idle:hover td,
.trading-monitor-row.is-paused.selected td,
.trading-monitor-row.is-idle.selected td {
  background: rgb(255, 228, 230);
}
.trading-monitor-row.selected td {
  background: rgb(236, 253, 245);
}
.monitor-row-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(42px, 1fr));
  gap: 5px;
  margin-top: 0px;
}
.monitor-row-actions button {
  min-height: 24px;
  padding: 3px 5px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgb(255, 255, 255);
  color: var(--ink);
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
}
.monitor-row-actions button[data-monitor-action="start"] {
  color: var(--good);
  border-color: rgb(187, 247, 208);
  background: rgb(236, 253, 243);
}
.monitor-row-actions button[data-monitor-action="pause"] {
  color: rgb(146, 64, 14);
  border-color: rgb(253, 230, 138);
  background: rgb(255, 251, 235);
}
.monitor-row-actions button[data-monitor-action="grab"] {
  color: rgb(15, 118, 110);
  border-color: rgb(153, 246, 228);
  background: rgb(240, 253, 250);
}
.monitor-row-actions button[data-monitor-action="clear"] {
  color: rgb(29, 78, 216);
  border-color: rgb(191, 219, 254);
  background: rgb(239, 246, 255);
}
.monitor-row-actions button[data-monitor-action="delete"] {
  color: var(--bad);
}
.positive-cell {
  color: var(--good);
  font-weight: 700;
}
.negative-cell {
  color: var(--bad);
  font-weight: 700;
}
.muted-cell,
.empty-cell {
  color: var(--muted);
}
.empty-cell {
  text-align: center;
  padding: 28px 12px;
}
.trading-form {
  display: grid;
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
  background: rgb(248, 250, 252);
}
.trading-form-section {
  display: grid;
  gap: 10px;
  min-width: 0px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(255, 255, 255);
}
.form-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgb(237, 242, 247);
}
.form-section-heading strong {
  color: var(--ink);
  font-size: 14px;
}
.form-section-heading span {
  color: var(--muted);
  font-size: 12px;
  text-align: right;
}
.capital-section {
  background: rgb(251, 253, 255);
}
.risk-section {
  border-color: rgb(217, 232, 220);
  background: rgb(251, 254, 252);
}
.trading-form label {
  display: grid;
  gap: 5px;
  min-width: 0px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.trading-form input,
.trading-form select {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(255, 255, 255);
  color: var(--ink);
  font: inherit;
}
.manual-edge-ack {
  display: grid;
  grid-template-columns: auto minmax(0px, 1fr);
  align-items: start;
  gap: 4px 9px;
  padding: 10px;
  border: 1px solid rgb(246, 198, 91);
  border-radius: 8px;
  background: rgb(255, 248, 230);
  color: rgb(138, 91, 0);
}
.manual-edge-ack input {
  width: auto;
  min-height: auto;
  margin-top: 2px;
  accent-color: var(--accent);
}
.manual-edge-ack span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 750;
}
.manual-edge-ack small {
  grid-column: 2;
  color: rgb(138, 91, 0);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}
.trading-feedback-grid {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: rgb(248, 250, 252);
}
.form-row {
  display: grid;
  gap: 10px;
}
.form-row.two {
  grid-template-columns: repeat(2, minmax(0px, 1fr));
}
.form-row.three {
  grid-template-columns: repeat(3, minmax(0px, 1fr));
}
.margin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0px, 1fr));
  gap: 10px;
}
.margin-tile {
  display: grid;
  gap: 5px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(248, 250, 252);
}
.margin-tile span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.margin-tile strong {
  font-size: 16px;
}
.child-notional-hint {
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(255, 255, 255);
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.45;
}
.child-notional-hint.ok {
  border-color: rgb(187, 247, 208);
  background: rgb(240, 253, 244);
  color: rgb(22, 101, 52);
}
.child-notional-hint.fail {
  border-color: rgb(254, 202, 202);
  background: rgb(255, 241, 242);
  color: rgb(153, 27, 27);
}
.trading-button-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0px, 1fr));
  gap: 10px;
}
.trading-button-row button {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 750;
  cursor: pointer;
}
.trading-button-row button:nth-child(2) {
  color: rgb(255, 255, 255);
  border-color: var(--accent-2);
  background: var(--accent-2);
}
.trading-button-row button:nth-child(3) {
  color: rgb(255, 255, 255);
  border-color: var(--accent);
  background: var(--accent);
}
.trading-button-row button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
.review-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}
.trading-feedback-grid .review-panel {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(255, 255, 255);
}
.review-panel.compact {
  border-bottom: 0px;
}
.trading-feedback-grid .review-panel.compact {
  border: 1px solid var(--line);
}
.empty-panel {
  color: var(--muted);
  padding: 12px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  text-align: center;
}
.selected-detail-panel {
  border-top: 0px;
}
.trading-feedback-grid .selected-detail-panel {
  border-top: 1px solid var(--line);
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0px, 1fr));
  gap: 10px;
}
.detail-tile {
  display: grid;
  gap: 4px;
  min-width: 0px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(255, 255, 255);
}
.detail-tile span,
.detail-tile em {
  min-width: 0px;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.detail-tile strong {
  min-width: 0px;
  overflow-wrap: anywhere;
}
.review-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(248, 250, 252);
}
.review-summary.ok {
  color: var(--good);
  background: rgb(236, 253, 243);
  border-color: rgb(187, 247, 208);
}
.review-summary.warn {
  color: var(--warn);
  background: rgb(255, 251, 235);
  border-color: rgb(253, 230, 138);
}
.review-summary.fail {
  color: var(--bad);
  background: rgb(254, 242, 242);
  border-color: rgb(254, 202, 202);
}
.gate-list {
  display: grid;
  gap: 6px;
}
.slicing-check {
  display: grid;
  grid-template-columns: 96px minmax(0px, 1fr);
  gap: 6px 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(255, 255, 255);
}
.slicing-check strong {
  color: var(--ink);
}
.slicing-check span,
.slicing-check em,
.slicing-check small {
  min-width: 0px;
  overflow-wrap: anywhere;
}
.slicing-check em,
.slicing-check small {
  grid-column: 2;
  color: var(--muted);
  font-style: normal;
}
.slicing-check.ok {
  border-color: rgb(187, 247, 208);
}
.slicing-check.fail {
  border-color: rgb(254, 202, 202);
}
.slicing-check .slicing-action-hint {
  color: rgb(153, 27, 27);
  font-weight: 750;
}
.spread-review-hints {
  display: grid;
  gap: 8px;
}
.spread-review-card {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(255, 255, 255);
}
.spread-review-card strong,
.spread-review-card span,
.spread-review-card em {
  min-width: 0px;
  overflow-wrap: anywhere;
}
.spread-review-card em {
  color: var(--muted);
  font-style: normal;
}
.spread-review-card.ok {
  border-color: rgb(187, 247, 208);
}
.spread-review-card.fail {
  border-color: rgb(254, 202, 202);
}
.gate-row,
.status-row {
  display: grid;
  grid-template-columns: 120px minmax(0px, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(255, 255, 255);
}
.gate-row.ok strong {
  color: var(--good);
}
.gate-row.fail strong {
  color: var(--bad);
}
.blocked-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.blocked-list span {
  padding: 4px 7px;
  border-radius: 999px;
  color: var(--bad);
  background: rgb(254, 242, 242);
  border: 1px solid rgb(254, 202, 202);
  font-size: 12px;
}
.review-panel pre {
  max-height: 240px;
  overflow: auto;
  margin: 0px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(15, 23, 42);
  color: rgb(219, 234, 254);
  font-size: 12px;
  line-height: 1.45;
}
.status-row {
  grid-template-columns: 54px 112px minmax(0px, 1fr);
}
.status-row span {
  color: var(--muted);
}
.status-row em {
  min-width: 0px;
  color: var(--muted);
  font-style: normal;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.compact-heading {
  margin-bottom: 2px;
}
.compact-heading h3 {
  margin: 0px;
  font-size: 14px;
}
.adapter-contract-panel {
  border-top: 1px solid var(--line);
}
.adapter-contract-row {
  grid-template-columns: 76px 88px minmax(0px, 1fr);
}
.adapter-contract-row.ok strong {
  color: var(--good);
}
.adapter-contract-row.warn strong {
  color: var(--warn);
}
.adapter-contract-detail {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}
.adapter-contract-detail span {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(248, 250, 252);
}
.adapter-runtime-line {
  flex-basis: 100%;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.adapter-runtime-line.ready > span:first-child {
  color: var(--good);
}
.adapter-runtime-line.partial > span:first-child,
.adapter-runtime-line.stale > span:first-child {
  color: var(--warn);
}
.adapter-runtime-chip.present {
  color: var(--good);
}
.adapter-runtime-chip.stale,
.adapter-runtime-chip.missing_source,
.adapter-runtime-chip.missing_venue_row,
.adapter-runtime-chip.incomplete {
  color: var(--warn);
}
.profit-page main.profit-workspace-shell {
  display: grid;
  gap: 16px;
}
.profit-topbar .topbar-actions {
  align-items: center;
}
.profit-curve-section {
  padding: 16px;
  overflow: hidden;
  background:
    linear-gradient(
      90deg,
      rgba(37, 99, 235, 0.08),
      rgba(22, 163, 74, 0.06) 42%,
      transparent 72%
    ),
    rgb(255, 255, 255);
}
.profit-curve-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.24fr) minmax(0px, 1fr);
  gap: 16px;
  align-items: stretch;
}
.profit-daily-card,
.profit-chart-panel {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
}
.profit-daily-card {
  display: grid;
  align-content: space-between;
  gap: 20px;
  min-height: 294px;
  padding: 18px;
}
.profit-daily-card h2 {
  margin: 3px 0px 0px;
  font-size: 19px;
}
.profit-daily-card strong {
  font-size: 38px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.profit-daily-card strong.positive {
  color: rgb(27, 127, 27);
}
.profit-daily-card strong.negative {
  color: rgb(210, 15, 42);
}
.profit-chart-panel {
  min-width: 0px;
  padding: 14px;
}
.profit-curve-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}
.profit-curve-kicker {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}
.profit-curve-header h2 {
  margin: 3px 0px 4px;
  font-size: 20px;
}
.profit-curve-actions {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 10px;
}
.profit-date-control {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}
.profit-date-control input {
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(255, 255, 255);
  color: var(--ink);
  font-style: inherit;
  font-variant: inherit;
  font-weight: inherit;
  font-stretch: inherit;
  line-height: inherit;
  font-family: inherit;
  font-optical-sizing: inherit;
  font-size-adjust: inherit;
  font-kerning: inherit;
  font-feature-settings: inherit;
  font-variation-settings: inherit;
  font-language-override: inherit;
  font-size: 13px;
}
.profit-curve-controls {
  display: inline-flex;
  width: fit-content;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(239, 246, 255);
}
.profit-curve-controls button {
  min-height: 30px;
  padding: 5px 14px;
  border: 0px;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-style: inherit;
  font-variant: inherit;
  font-stretch: inherit;
  line-height: inherit;
  font-family: inherit;
  font-optical-sizing: inherit;
  font-size-adjust: inherit;
  font-kerning: inherit;
  font-feature-settings: inherit;
  font-variation-settings: inherit;
  font-language-override: inherit;
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}
.profit-curve-controls button.active {
  background: rgb(255, 255, 255);
  color: var(--ink);
  box-shadow: rgba(15, 23, 42, 0.1) 0px 1px 3px;
}
.profit-curve-body {
  display: grid;
  grid-template-columns: minmax(138px, 0.16fr) minmax(0px, 1fr);
  gap: 14px;
  align-items: stretch;
}
.profit-curve-total {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 230px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
}
.profit-curve-total span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}
.profit-curve-total strong {
  font-size: 28px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.profit-curve-total strong.positive {
  color: rgb(27, 127, 27);
}
.profit-curve-total strong.negative {
  color: rgb(210, 15, 42);
}
.profit-curve-canvas {
  position: relative;
  min-height: 230px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.84);
  overflow: hidden;
}
.profit-curve-canvas .empty-state {
  display: grid;
  min-height: 230px;
  place-items: center;
  color: var(--muted);
}
.profit-curve-svg {
  display: block;
  width: 100%;
  height: 230px;
}
.profit-curve-axis,
.profit-curve-zero {
  stroke: rgb(219, 227, 239);
  stroke-width: 1;
}
.profit-curve-zero {
  stroke-dasharray: 5, 7;
}
.profit-curve-area {
  fill: rgba(76, 175, 32, 0.12);
}
.profit-curve-line {
  fill: none;
  stroke: rgb(56, 161, 19);
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.profit-curve-dot {
  fill: rgb(37, 99, 235);
  stroke: rgb(255, 255, 255);
  stroke-width: 2;
}
.profit-curve-latest {
  position: absolute;
  top: 18px;
  right: 18px;
  display: grid;
  gap: 3px;
  min-width: 148px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: rgba(15, 23, 42, 0.08) 0px 10px 24px;
}
.profit-curve-latest span,
.profit-curve-latest em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
}
.profit-curve-latest strong {
  color: rgb(27, 127, 27);
  font-size: 18px;
  font-variant-numeric: tabular-nums;
}
.profit-filter-section {
  padding: 12px;
}
.profit-filter-row {
  display: grid;
  grid-template-columns: 1.3fr 0.72fr 0.72fr 0.72fr;
  gap: 12px;
}
.profit-filter-row label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.profit-filter-row input {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(255, 255, 255);
  color: var(--ink);
  font: inherit;
}
.profit-record-section {
  display: grid;
  gap: 12px;
}
.profit-record-tabs {
  display: inline-flex;
  width: fit-content;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(248, 250, 252);
}
.profit-record-tabs button {
  min-height: 32px;
  padding: 6px 12px;
  border: 0px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-style: inherit;
  font-variant: inherit;
  font-stretch: inherit;
  font-size: inherit;
  line-height: inherit;
  font-family: inherit;
  font-optical-sizing: inherit;
  font-size-adjust: inherit;
  font-kerning: inherit;
  font-feature-settings: inherit;
  font-variation-settings: inherit;
  font-language-override: inherit;
  font-weight: 750;
  cursor: pointer;
}
.profit-record-tabs button.active {
  background: rgb(255, 255, 255);
  color: var(--ink);
  box-shadow: rgba(15, 23, 42, 0.08) 0px 1px 3px;
}
.profit-smoke-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(255, 255, 255);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.profit-smoke-toggle input {
  width: 14px;
  height: 14px;
  margin: 0;
}
.profit-record-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(255, 255, 255);
}
.profit-record-list .empty-state {
  padding: 18px;
  color: var(--muted);
  font-size: 13px;
}
.profit-record-empty {
  display: grid;
  gap: 8px;
  align-content: start;
}
.profit-record-empty strong {
  color: var(--ink);
}
.profit-record-empty button {
  width: fit-content;
  min-height: 30px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgb(255, 255, 255);
  color: var(--ink);
  font-style: inherit;
  font-variant: inherit;
  font-stretch: inherit;
  font-size: inherit;
  line-height: inherit;
  font-family: inherit;
  font-optical-sizing: inherit;
  font-size-adjust: inherit;
  font-kerning: inherit;
  font-feature-settings: inherit;
  font-variation-settings: inherit;
  font-language-override: inherit;
  font-weight: 750;
  cursor: pointer;
}
.profit-smoke-hidden-hint {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: rgb(255, 251, 235);
  color: rgb(146, 64, 14);
  font-size: 12px;
  font-weight: 700;
}
.profit-event-hidden-hint td {
  background: rgb(255, 251, 235);
  color: rgb(146, 64, 14);
  font-size: 12px;
  font-weight: 700;
}
.profit-record-item + .profit-record-item {
  border-top: 1px solid var(--line);
}
.profit-record-row {
  display: grid;
  grid-template-columns: minmax(160px, 1.1fr) minmax(110px, 0.45fr) minmax(
      160px,
      0.65fr
    ) minmax(150px, 0.7fr) minmax(180px, 1fr) 56px;
  gap: 12px;
  width: 100%;
  min-height: 74px;
  padding: 13px 14px;
  border: 0px;
  background: rgb(255, 255, 255);
  color: var(--ink);
  font: inherit;
  text-align: left;
  align-items: center;
  cursor: pointer;
}
.profit-record-row:hover,
.profit-record-item.expanded .profit-record-row {
  background: rgb(248, 250, 252);
}
.profit-record-symbol,
.profit-record-venues,
.profit-record-note {
  min-width: 0px;
}
.profit-record-symbol strong {
  display: block;
  font-size: 18px;
  letter-spacing: 0px;
}
.profit-record-kind {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  min-height: 22px;
  margin-bottom: 5px;
  padding: 2px 7px;
  border-radius: 999px;
  color: rgb(31, 41, 55);
  background: rgb(243, 244, 246);
  font-size: 12px;
  font-weight: 750;
}
.profit-record-kind i {
  display: inline-grid;
  width: 15px;
  height: 15px;
  place-items: center;
  border-radius: 50%;
  color: rgb(255, 255, 255);
  font-style: normal;
  font-size: 10px;
  line-height: 1;
}
.profit-record-kind.trade {
  background: rgb(236, 253, 243);
  color: rgb(22, 101, 52);
}
.profit-record-kind.trade i {
  background: rgb(22, 163, 74);
}
.profit-record-kind.funding {
  background: rgb(239, 246, 255);
  color: rgb(29, 78, 216);
}
.profit-record-kind.funding i {
  background: rgb(37, 99, 235);
}
.profit-record-symbol em,
.profit-record-time,
.profit-record-note,
.profit-record-action {
  color: var(--muted);
  font-style: normal;
  font-size: 12px;
}
.profit-record-symbol em,
.profit-record-note {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profit-record-pnl {
  font-size: 18px;
  white-space: nowrap;
}
.profit-record-pnl.positive {
  color: rgb(27, 127, 27);
}
.profit-record-pnl.negative {
  color: rgb(210, 15, 42);
}
.profit-record-pnl.flat {
  color: var(--ink);
}
.profit-record-venues {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.profit-record-venues em {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border: 1px solid rgb(244, 192, 77);
  border-radius: 6px;
  background: rgb(255, 250, 240);
  color: rgb(183, 121, 31);
  font-style: normal;
  font-size: 12px;
  font-weight: 750;
}
.profit-record-action {
  justify-self: end;
  font-weight: 750;
}
.profit-record-detail {
  padding: 0px 14px 14px;
  background: rgb(248, 250, 252);
}
.profit-record-detail dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0px, 1fr));
  gap: 8px;
  margin: 0px;
}
.profit-record-detail div {
  min-width: 0px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgb(255, 255, 255);
}
.profit-record-detail dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}
.profit-record-detail dd {
  margin: 5px 0px 0px;
  color: var(--ink);
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.profit-route-wrap {
  max-height: calc(-290px + 100vh);
}
.profit-route-table {
  min-width: 1480px;
}
.profit-route-table th,
.profit-route-table td,
.profit-event-table th,
.profit-event-table td,
.profit-reconcile-table th,
.profit-reconcile-table td {
  vertical-align: top;
}
.profit-route-table td span,
.profit-event-table td span,
.profit-reconcile-table td span {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}
.profit-route-table .id-cell,
.profit-event-table .id-cell,
.profit-reconcile-table .id-cell {
  overflow-wrap: anywhere;
}
.profit-lower-grid {
  display: grid;
  grid-template-columns: minmax(0px, 1fr) minmax(0px, 0.9fr);
  gap: 16px;
  align-items: start;
}
.profit-event-table {
  min-width: 760px;
}
.profit-reconcile-table {
  min-width: 760px;
}
@media (max-width: 1180px) {
  .trading-page main.trading-workspace-shell {
    grid-template-columns: 1fr;
  }
  .trading-table-wrap {
    max-height: none;
  }
  .profit-lower-grid {
    grid-template-columns: 1fr;
  }
  .profit-curve-layout {
    grid-template-columns: 1fr;
  }
  .profit-daily-card {
    min-height: auto;
  }
  .profit-curve-body {
    grid-template-columns: 1fr;
  }
  .profit-curve-total {
    min-height: auto;
  }
  .profit-record-row {
    grid-template-columns: minmax(150px, 1.2fr) minmax(110px, 0.55fr) minmax(
        140px,
        0.8fr
      );
  }
  .profit-record-time,
  .profit-record-note,
  .profit-record-action {
    grid-column: span 1;
  }
  .profit-record-detail dl {
    grid-template-columns: repeat(2, minmax(0px, 1fr));
  }
  .profit-route-wrap {
    max-height: none;
  }
}
@media (max-width: 720px) {
  .form-row.two,
  .form-row.three,
  .margin-grid,
  .detail-grid,
  .trading-button-row {
    grid-template-columns: 1fr;
  }
  .dashboard-nav {
    width: 100%;
    justify-content: stretch;
  }
  .dashboard-nav a {
    flex: 1 1 0px;
    justify-content: center;
  }
  .profit-curve-header {
    flex-direction: column;
  }
  .profit-curve-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }
  .profit-date-control input {
    width: 100%;
  }
  .profit-curve-controls {
    width: 100%;
  }
  .profit-curve-controls button {
    flex: 1 1 0px;
  }
  .profit-record-tabs {
    width: 100%;
  }
  .profit-record-tabs button {
    flex: 1 1 0px;
  }
  .profit-record-row,
  .profit-record-detail dl {
    grid-template-columns: 1fr;
  }
  .profit-record-action {
    justify-self: start;
  }
}
.exchange-settings-page .exchange-settings-shell {
  display: grid;
  gap: 18px;
}
.exchange-settings-page .exchange-settings-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(220px, 1fr));
  gap: 14px;
  padding: 16px;
}
.exchange-settings-page .exchange-setting-card {
  display: grid;
  gap: 18px;
  min-height: 136px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.exchange-settings-page .exchange-card-main {
  display: grid;
  grid-template-columns: 34px minmax(0px, 1fr) auto;
  align-items: center;
  gap: 10px;
}
.exchange-settings-page .exchange-card-main strong {
  display: block;
  font-size: 16px;
}
.exchange-settings-page .exchange-card-main small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
}
.exchange-settings-page .exchange-logo {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgb(17, 24, 39);
  color: rgb(255, 255, 255);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 800;
}
.exchange-settings-page .exchange-logo.gold {
  background: rgb(243, 186, 47);
  color: rgb(17, 24, 39);
}
.exchange-settings-page .exchange-logo.blue {
  background: rgb(37, 99, 235);
}
.exchange-settings-page .exchange-logo.cyan {
  background: rgb(6, 182, 212);
  color: rgb(6, 33, 42);
}
.exchange-settings-page .exchange-logo.green {
  background: rgb(5, 150, 105);
}
.exchange-settings-page .exchange-logo.purple {
  background: rgb(124, 58, 237);
}
.exchange-settings-page .exchange-logo.bronze {
  background: rgb(183, 121, 59);
}
.exchange-settings-page .exchange-logo.black,
.exchange-settings-page .exchange-logo.dark {
  background: rgb(17, 24, 39);
}
.exchange-settings-page .status-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 26px;
  padding: 0px 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.exchange-settings-page .status-chip.good {
  color: var(--good);
  background: rgb(236, 253, 243);
}
.exchange-settings-page .status-chip.warn {
  color: var(--warn);
  background: rgb(255, 247, 237);
}
.exchange-settings-page .status-chip.bad {
  color: var(--bad);
  background: rgb(254, 242, 242);
}
.exchange-settings-page .exchange-balance-lines {
  display: grid;
  gap: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.exchange-settings-page .exchange-balance-lines div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0px;
}
.exchange-settings-page .exchange-balance-lines b {
  min-width: 0px;
  overflow-wrap: anywhere;
}
.exchange-settings-page .balance-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 26px;
  border-radius: 6px;
  background: rgb(232, 243, 255);
  color: rgb(11, 101, 216);
  font-weight: 800;
}
.exchange-settings-page .balance-tag.spot {
  background: rgb(237, 247, 239);
  color: rgb(21, 128, 61);
}
.exchange-settings-page .treasury-capability-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.exchange-settings-page .treasury-chip {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0px 7px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 750;
  line-height: 1;
  white-space: nowrap;
}
.exchange-settings-page .treasury-chip.good {
  color: var(--good);
  background: rgb(236, 253, 243);
}
.exchange-settings-page .treasury-chip.warn {
  color: rgb(180, 83, 9);
  background: rgb(255, 247, 237);
}
.exchange-settings-page .treasury-chip.bad {
  color: var(--bad);
  background: rgb(254, 242, 242);
}
.exchange-settings-page .exchange-custody-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 28px;
  padding: 0px 8px;
  border: 1px dashed rgb(203, 213, 225);
  border-radius: 7px;
  color: var(--muted);
  font-size: 12px;
}
.exchange-settings-page .exchange-custody-line b {
  color: var(--ink);
}
.exchange-settings-page .exchange-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.exchange-settings-page .exchange-card-actions button,
.exchange-settings-page .dialog-actions button,
.exchange-settings-page .dialog-close {
  min-height: 34px;
  padding: 0px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  color: var(--ink);
  font-weight: 700;
  cursor: pointer;
}
.exchange-settings-page .exchange-card-actions button:hover,
.exchange-settings-page .dialog-actions button:hover,
.exchange-settings-page .dialog-close:hover {
  border-color: rgb(158, 178, 192);
  background: rgb(248, 250, 252);
}
.exchange-settings-page .exchange-card-actions button:disabled {
  color: rgb(148, 163, 184);
  background: rgb(241, 245, 249);
  cursor: not-allowed;
}
.exchange-settings-page .exchange-security-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
  padding: 14px 16px;
}
.exchange-settings-page .exchange-security-grid div {
  display: grid;
  gap: 4px;
  min-height: 58px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}
.exchange-settings-page .exchange-security-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.exchange-settings-page .exchange-security-grid b {
  font-size: 13px;
}
.exchange-settings-page .exchange-operation-log {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
}
.exchange-settings-page .operation-log-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: rgb(248, 250, 252);
}
.exchange-settings-page .operation-log-row span {
  color: var(--muted);
  text-align: right;
}
.exchange-settings-page .operation-log-row.warn {
  border-color: rgb(254, 215, 170);
  background: rgb(255, 247, 237);
}
.exchange-settings-page .operation-log-row.ok {
  border-color: rgb(187, 247, 208);
  background: rgb(236, 253, 243);
}
.exchange-settings-page .exchange-dialog {
  width: min(560px, -32px + 100vw);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0px;
  color: var(--ink);
}
.exchange-settings-page .exchange-dialog::backdrop {
  background: rgba(15, 23, 42, 0.35);
}
.exchange-settings-page .exchange-dialog-form {
  display: grid;
  gap: 14px;
  padding: 18px;
}
.exchange-settings-page .dialog-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.exchange-settings-page .dialog-heading h3 {
  margin: 0px;
  font-size: 18px;
}
.exchange-settings-page .dialog-close {
  width: 34px;
  padding: 0px;
  font-size: 20px;
  line-height: 1;
}
.exchange-settings-page .exchange-dialog label,
.exchange-settings-page .exchange-dialog fieldset {
  display: grid;
  gap: 7px;
  margin: 0px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.exchange-settings-page .exchange-dialog fieldset {
  grid-template-columns: repeat(3, minmax(0px, 1fr));
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}
.exchange-settings-page .exchange-dialog legend {
  padding: 0px 4px;
}
.exchange-settings-page .exchange-dialog fieldset label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ink);
  font-size: 13px;
}
.exchange-settings-page .exchange-dialog input,
.exchange-settings-page .exchange-dialog select {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 0px 10px;
  color: var(--ink);
  font: inherit;
}
.exchange-settings-page .dialog-note,
.exchange-settings-page .dialog-status {
  margin: 0px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}
.exchange-settings-page .dialog-status {
  color: var(--warn);
}
.exchange-settings-page .dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.exchange-settings-page .dialog-actions button[type="submit"] {
  background: var(--ink);
  color: rgb(255, 255, 255);
  border-color: var(--ink);
}
@media (max-width: 1180px) {
  .exchange-settings-page .exchange-settings-grid {
    grid-template-columns: repeat(2, minmax(220px, 1fr));
  }
}
@media (max-width: 640px) {
  .exchange-settings-page .exchange-settings-grid {
    grid-template-columns: 1fr;
    padding: 12px;
  }
  .exchange-settings-page .exchange-card-main {
    grid-template-columns: 34px minmax(0px, 1fr);
  }
  .exchange-settings-page .exchange-card-main .status-chip {
    grid-column: 1 / -1;
  }
  .exchange-settings-page .exchange-security-grid {
    grid-template-columns: 1fr;
  }
  .exchange-settings-page .exchange-dialog fieldset {
    grid-template-columns: 1fr;
  }
  .exchange-settings-page .operation-log-row {
    display: grid;
  }
  .exchange-settings-page .operation-log-row span {
    text-align: left;
  }
}
