:root {
  --bg: #050711;
  --surface: #0b0d19;
  --surface-2: #101421;
  --line: #22283a;
  --text: #f2f6ff;
  --muted: #8b96ad;
  --cyan: #00e0ad;
  --green: #19d38a;
  --warn: #f5b84b;
  --red: #ff5c7a;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}
button, input { font: inherit; }
.shell { width: min(1760px, calc(100vw - 32px)); margin: 0 auto; padding: 24px 0 32px; }
.topbar { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 14px; }
.eyebrow, h1, h2, p { margin: 0; }
.eyebrow { color: var(--cyan); font-size: 13px; font-weight: 800; }
h1 { margin-top: 5px; font-size: 28px; line-height: 1.2; }
h2 { font-size: 18px; }
.tools { display: flex; align-items: end; gap: 10px; }
.search { display: grid; gap: 5px; color: var(--muted); font-size: 12px; }
.search input {
  width: 260px; height: 38px; border: 1px solid var(--line); border-radius: 8px;
  background: var(--surface-2); color: var(--text); padding: 0 12px; outline: none;
}
.search input:focus { border-color: var(--cyan); }
#refreshBtn, .chip, .select-exchange, .count-box {
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface-2); color: var(--text); cursor: pointer;
}
#refreshBtn { min-width: 80px; height: 38px; color: var(--cyan); }
.exchange-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.exchange-card, .filters, .panel {
  border: 1px solid var(--line); border-radius: 8px; background: var(--surface);
}
.exchange-card { padding: 14px; min-height: 130px; }
.exchange-title { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.exchange-title strong { display: block; font-size: 18px; }
.exchange-title small { display: block; margin-top: 4px; color: var(--muted); }
.select-exchange { min-width: 58px; height: 32px; }
.select-exchange.active, .chip.active, .count-box.active {
  border-color: rgba(0, 224, 173, 0.55); background: rgba(0, 224, 173, 0.08); color: var(--cyan);
}
.counts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.count-box { min-height: 58px; padding: 8px; text-align: left; }
.count-box span { display: block; color: var(--muted); font-size: 12px; }
.count-box strong { display: block; margin-top: 4px; font-size: 20px; font-variant-numeric: tabular-nums; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px; margin-bottom: 12px; }
.chip { min-width: 88px; min-height: 36px; padding: 0 12px; }
.panel { overflow: hidden; }
.panel-head { display: flex; justify-content: space-between; gap: 16px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.panel-head p { margin-top: 4px; color: var(--muted); font-size: 13px; }
.api-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.api-links a {
  min-height: 30px; border: 1px solid var(--line); border-radius: 8px; padding: 5px 9px;
  color: var(--cyan); text-decoration: none; font-size: 12px; font-weight: 800;
}
.table-wrap { overflow: auto; max-height: calc(100dvh - 330px); }
table { width: 100%; min-width: 1280px; border-collapse: collapse; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; font-size: 13px; vertical-align: middle; }
th { position: sticky; top: 0; z-index: 1; background: var(--surface-2); color: var(--muted); font-weight: 800; }
td { color: #dce5f7; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.symbol { font-weight: 900; color: var(--text); }
.muted { color: var(--muted); font-size: 12px; }
.pool-badge, .perm, .kline-chip {
  display: inline-flex; align-items: center; min-height: 24px; border-radius: 8px; padding: 3px 8px;
  font-size: 12px; font-weight: 800; white-space: nowrap;
}
.pool-core, .perm.on, .kline-chip.ok { background: rgba(25, 211, 138, 0.12); color: var(--green); }
.pool-flow { background: rgba(245, 184, 75, 0.14); color: var(--warn); }
.pool-watch { background: rgba(139, 150, 173, 0.14); color: #c8d2e4; }
.pool-blocked, .perm.off { background: rgba(255, 92, 122, 0.12); color: var(--red); }
.pool-liquidity { background: rgba(0, 224, 173, 0.12); color: var(--cyan); }
.kline-chip.warn { background: rgba(245, 184, 75, 0.12); color: var(--warn); }
.kline-list { display: flex; flex-wrap: wrap; gap: 4px; }
.perm + .perm { margin-left: 4px; }
.reason { min-width: 260px; color: #c8d2e4; }
.empty { height: 92px; text-align: center; color: var(--muted); }
@media (max-width: 1100px) {
  .exchange-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar, .panel-head { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 720px) {
  .shell { width: min(100vw - 20px, 1760px); padding-top: 16px; }
  .exchange-grid, .counts { grid-template-columns: 1fr; }
  .tools, .search, .search input { width: 100%; }
  .table-wrap { max-height: none; }
}
