:root {
  --bg: #0d1117; --panel: #161b22; --line: #30363d; --fg: #e6edf3; --muted: #8b949e;
  --green: #3fb950; --red: #f85149; --yellow: #d29922; --blue: #58a6ff; --purple: #bc8cff; --orange: #f0883e;
  font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--fg); }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); font-weight: normal; }
header { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 10px 16px; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 2; }
.brand { font-weight: bold; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.chain { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); }
.chain b { color: var(--fg); font-weight: normal; }
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red); display: inline-block; }
.dot.on { background: var(--green); box-shadow: 0 0 6px var(--green); }
.dot.sync { background: var(--yellow); }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; padding: 12px 16px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 8px 12px; }
.card .v { font-size: 20px; margin-top: 2px; }
.card .k { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .04em; }
main { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 12px; padding: 0 16px 16px; }
@media (max-width: 1100px) { main { grid-template-columns: 1fr; } }
.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
select, input[type=search], input[type=password], button { background: var(--panel); color: var(--fg); border: 1px solid var(--line);
  border-radius: 4px; padding: 4px 6px; font: inherit; }
input[type=search] { min-width: 220px; }
button { cursor: pointer; margin-top: 8px; }
body.login { display: grid; place-items: center; min-height: 100vh; }
.login-card { display: flex; flex-direction: column; gap: 10px; width: 280px; padding: 18px; }
.login-card input, .login-card button { padding: 7px 8px; margin: 0; }
.login-card .error { color: var(--red); margin: 0; min-height: 1.4em; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; color: var(--muted); font-weight: normal; border-bottom: 1px solid var(--line); padding: 4px 6px;
  position: sticky; top: 46px; background: var(--bg); }
td { padding: 3px 6px; border-bottom: 1px solid #21262d; white-space: nowrap; vertical-align: top; }
td.trade { white-space: normal; }
.num { text-align: right; }
tr.row { cursor: pointer; }
tr.row:hover { background: #1c2128; }
tr.ours td:first-child { box-shadow: inset 3px 0 var(--orange); }
tr.fresh { animation: fresh 1.5s ease-out; }
@keyframes fresh { from { background: #1f3a5f; } to { background: transparent; } }
tr.detail td { background: var(--panel); white-space: normal; padding: 8px 12px; }
.badge { padding: 0 6px; border-radius: 3px; font-size: 11px; border: 1px solid currentColor; }
.s-mempool { color: var(--yellow); } .s-block { color: var(--blue); } .s-confirmed { color: var(--green); }
.s-left { color: var(--muted); } .s-conflict { color: var(--red); } .s-expired, .s-vanished, .s-rolled_back { color: var(--purple); }
.k-swap { color: var(--fg); } .k-batch { color: var(--blue); } .k-arb { color: var(--orange); } .k-liquidity { color: var(--purple); }
.in { color: var(--red); } .out { color: var(--green); }
.actor.label { color: var(--orange); }
aside h2 { font-size: 13px; margin: 14px 0 6px; } aside h2:first-child { margin-top: 0; }
.dex { display: grid; grid-template-columns: 110px 1fr 70px; gap: 6px; align-items: center; padding: 2px 0; }
.dex svg { width: 100%; height: 22px; }
.dex svg rect { fill: var(--blue); }
.dex .stat { text-align: right; color: var(--muted); }
.queue td, .health td { padding: 2px 4px; }
.legs { border-collapse: collapse; margin: 4px 0; }
.legs td { border: none; padding: 1px 10px 1px 0; }
.kv { color: var(--muted); }
