@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;450;500;550;600;650;700&family=Space+Grotesk:wght@400;500;600;700&display=swap');

:root {
  color-scheme: dark;
  --bg: #0b0b0b;
  --panel: #111112;
  --panel-raised: #171619;
  --line: rgba(209, 194, 237, .1);
  --line-strong: rgba(178, 138, 255, .26);
  --text: #f1edf7;
  --muted: #8c8995;
  --violet: #b28aff;
  --green: #79dcb1;
  --red: #ef8c9b;
  --amber: #e3c385;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body.terminal-body { margin: 0; color: var(--text); background: var(--bg); font: 13px/1.5 'DM Sans', sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button, input, select, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
button:disabled { cursor: wait; opacity: .5; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--violet); outline-offset: 4px; }
::selection { color: #fff; background: #674899; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #101012; }
::-webkit-scrollbar-thumb { background: #343039; border-radius: 20px; }
.terminal-shell { display: grid; grid-template-columns: 202px minmax(0, 1fr); min-height: 100vh; }
.terminal-nav { display: flex; flex-direction: column; align-items: stretch; position: sticky; top: 0; height: 100vh; padding: 30px 18px 22px; border-right: 1px solid var(--line); background: #0d0d0e; }
.terminal-nav > a:first-child, .terminal-nav .brand { display: flex; align-items: center; gap: 9px; margin: 0 12px 44px; font-family: 'Space Grotesk', sans-serif; font-size: 23px; font-weight: 700; letter-spacing: -.9px; }
.terminal-nav > a:first-child img, .terminal-nav .brand img { width: 30px; height: 30px; object-fit: contain; }
.nav-label { margin: 0 13px 13px; color: #65616e; font-size: 9px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; }
.nav-item { display: flex; align-items: center; gap: 10px; width: 100%; min-height: 43px; padding: 10px 13px; margin-bottom: 5px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #929099; font-size: 12px; font-weight: 500; text-align: left; transition: background .18s, color .18s, border-color .18s; }
.nav-item svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav-item:hover { background: #19161e; color: var(--text); }
.nav-item.active { background: rgba(178, 138, 255, .09); border-color: rgba(178, 138, 255, .14); color: #c5a5ff; }
.nav-item + .nav-label { margin-top: 31px; }
.nav-note { margin-top: auto; padding: 16px 13px 0; border-top: 1px solid var(--line); color: #73707d; font-size: 10px; line-height: 1.8; }
.nav-note strong { display: block; margin-bottom: 5px; color: #a7a0b3; font-size: 10px; font-weight: 500; }
.terminal-main { width: 100%; min-width: 0; max-width: 1700px; margin: 0 auto; padding: 29px 32px 20px; }
.terminal-top { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 27px; }
.eyebrow { display: block; margin: 0 0 6px; color: var(--violet); font-size: 9px; font-weight: 650; letter-spacing: 1.9px; text-transform: uppercase; }
.terminal-top h1 { margin: 0 0 4px; font-family: 'Space Grotesk', sans-serif; font-size: 28px; line-height: 1.3; font-weight: 500; letter-spacing: -1.1px; }
.terminal-top p { margin: 0; color: var(--muted); font-size: 11px; }
.connection { display: grid; grid-template-columns: auto auto; align-items: center; column-gap: 17px; row-gap: 3px; flex-shrink: 0; text-align: right; }
#connection-state { align-self: end; color: var(--green); font-size: 10px; font-weight: 500; }
#connection-state::before { display: inline-block; content: ''; width: 5px; height: 5px; margin: 0 6px 1px 0; border-radius: 50%; background: currentColor; box-shadow: 0 0 9px rgba(121, 220, 177, .2); }
#checked-at { grid-row: 2; color: #6e6a76; font-size: 9px; }
#refresh { grid-column: 2; grid-row: 1 / 3; min-height: 34px; padding: 7px 12px; border: 1px solid var(--line-strong); border-radius: 5px; background: #17131e; color: #bca3e6; font-size: 10px; transition: background .18s; }
#refresh:hover { background: #241a32; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.stat { position: relative; min-height: 111px; overflow: hidden; padding: 17px 20px 15px; border: 1px solid var(--line); border-radius: 8px; background: linear-gradient(120deg, #141216, #111112 65%); }
.stat:first-child { border-color: rgba(178, 138, 255, .22); background: radial-gradient(ellipse at 100% 0, rgba(178, 138, 255, .09), transparent 72%), #141216; }
.stat > span { display: block; margin-bottom: 8px; color: #908898; font-size: 9px; font-weight: 500; letter-spacing: 1.2px; text-transform: uppercase; }
.stat > strong { display: block; color: #f2edf8; font-family: 'Space Grotesk', sans-serif; font-size: 27px; line-height: 1.1; font-weight: 500; letter-spacing: -.8px; font-variant-numeric: tabular-nums; }
.stat > small { display: block; margin-top: 7px; color: #726c7d; font-size: 9px; }
.terminal-grid { display: grid; grid-template-columns: minmax(0, 1fr) 310px; align-items: start; gap: 20px; }
.terminal-grid > div, .terminal-grid > aside { display: grid; min-width: 0; gap: 20px; }
.panel { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 19px 20px 16px; }
.panel-head h2 { margin: 0; font-family: 'Space Grotesk', sans-serif; font-size: 15px; line-height: 1.4; font-weight: 500; letter-spacing: -.25px; }
.panel-head p { margin: 4px 0 0; color: #797481; font-size: 10px; }
.chip, .pill { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; padding: 4px 7px; border: 1px solid rgba(178, 138, 255, .14); border-radius: 4px; background: rgba(178, 138, 255, .055); color: #a695bf; font-size: 8px; font-weight: 500; line-height: 1.25; letter-spacing: .6px; text-transform: uppercase; }
.market-tools { display: flex; align-items: center; gap: 9px; padding: 0 20px 16px; }
input, select { min-width: 0; width: 100%; height: 36px; padding: 8px 10px; border: 1px solid #2b2632; border-radius: 5px; background: #0d0c0f; color: #ccc5d7; font-size: 11px; transition: border-color .18s, background .18s; }
input::placeholder { color: #625c6b; }
input:hover, select:hover { border-color: #443750; }
input:focus, select:focus { border-color: #9f76de; background: #151119; }
select { padding-right: 26px; }
#pool-search { flex: 1; }
#network-filter { width: 128px; flex-shrink: 0; }
.tabs { display: flex; align-items: center; gap: 4px; padding: 3px; border: 1px solid var(--line); border-radius: 5px; background: #0b0a0d; }
.tabs button { padding: 5px 8px; border: 0; border-radius: 3px; background: transparent; color: #797180; font-size: 9px; }
.tabs button.active { background: #272030; color: #ccb2f5; }
.tabs button:hover { color: #eee4fc; }
.table-scroll { width: 100%; overflow: auto; }
.market-table { width: 100%; border-collapse: collapse; font-size: 11px; white-space: nowrap; }
.market-table thead { background: #151217; }
.market-table th { height: 32px; padding: 7px 13px; border-block: 1px solid #221d28; color: #77707f; font-size: 8px; font-weight: 500; letter-spacing: .8px; text-align: right; text-transform: uppercase; }
.market-table th:first-child { padding-left: 20px; text-align: left; }
.market-table th:last-child { padding-right: 20px; }
.market-table td { height: 63px; padding: 10px 13px; border-bottom: 1px solid rgba(209, 194, 237, .06); color: #d2cbdc; text-align: right; font-variant-numeric: tabular-nums; }
.market-table td:first-child { padding-left: 20px; text-align: left; }
.market-table td:last-child { padding-right: 20px; }
.market-table tr:last-child td { border-bottom: 0; }
.market-table tbody tr { transition: background .16s; }
.market-table tbody tr:hover { background: rgba(178, 138, 255, .035); }
.market-table tbody tr.selected, .market-table tbody tr[aria-selected='true'] { background: rgba(178, 138, 255, .065); }
.market-table tbody tr.selected td:first-child, .market-table tbody tr[aria-selected='true'] td:first-child { box-shadow: inset 2px 0 var(--violet); }
.market-table td > strong { display: block; font-weight: 500; }
.market-table td > small { display: block; margin-top: 2px; color: #766e80; font-size: 9px; }
.select-pool { display: inline-flex; align-items: center; gap: 9px; min-width: 0; padding: 0; border: 0; background: transparent; text-align: left; }
.select-pool img { width: 29px; height: 29px; flex-shrink: 0; border: 1px solid #37313e; border-radius: 50%; object-fit: cover; background: #292332; }
.token-name { display: flex; flex-direction: column; min-width: 0; }
.token-name strong { color: #e4ddeb; font-size: 11px; font-weight: 600; }
.token-name small { display: block; max-width: 155px; overflow: hidden; color: #746c7c; font-size: 9px; text-overflow: ellipsis; }
.star { width: 26px; height: 27px; padding: 0; border: 1px solid transparent; border-radius: 4px; background: transparent; color: #61566d; font-size: 18px; line-height: 1; }
.star:hover { border-color: #3d2e50; background: #21182d; color: #c2a0f9; }
.star[aria-pressed='true'] { color: #bf9cf7; }
.empty { margin: 0; padding: 26px 20px; color: #81768c; font-size: 11px; line-height: 1.8; text-align: center; }
#inspector .panel-head { padding-bottom: 12px; }
#selected-pool-info { color: #80748e; font-size: 10px; }
#selected-pool-info strong { color: #cabed8; font-weight: 500; }
.quote-summary { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 0 20px; }
.big-price, #selected-price { font-family: 'Space Grotesk', sans-serif; font-size: 31px; font-weight: 500; line-height: 1.3; letter-spacing: -1px; font-variant-numeric: tabular-nums; }
.change { font-size: 10px; font-weight: 500; font-variant-numeric: tabular-nums; }
.quote-summary .pill { margin-left: auto; }
#session-chart { display: block; width: calc(100% - 40px); height: 150px; margin: 17px 20px 0; overflow: visible; }
#session-chart text { fill: #62596d; font-family: 'DM Sans', sans-serif; font-size: 9px; }
.chart-note { margin: 7px 20px 17px; color: #6e637a; font-size: 9px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0 20px; padding: 17px 0; border-top: 1px solid var(--line); }
.metric-grid > div, .metric-grid > article { min-width: 0; }
.metric-grid span { display: block; color: #786c86; font-size: 8px; font-weight: 500; letter-spacing: .65px; text-transform: uppercase; }
.metric-grid strong { display: block; margin-top: 6px; color: #d9cfe4; font-family: 'Space Grotesk', sans-serif; font-size: 14px; line-height: 1.25; font-weight: 500; font-variant-numeric: tabular-nums; }
.flow-bar { height: 4px; margin: 1px 20px 0; overflow: hidden; border-radius: 4px; background: rgba(239, 140, 155, .5); }
.buy-fill { width: 50%; height: 100%; border-radius: inherit; background: var(--green); transition: width .3s ease; }
.buy-fill { display: block; }
.compare-metrics { padding: 0 20px 18px; }
.compare-metrics table { width: 100%; border-collapse: collapse; }
.chart-note { display: flex; justify-content: space-between; gap: 12px; }
#alert-selected { padding: 7px 10px; border: 1px solid var(--line-strong); border-radius: 5px; background: #201729; color: #c5a5ff; font-size: 10px; }
.mini-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--violet); }
#alert-form .primary { display: flex; justify-content: space-between; margin-top: 12px; }
html { scroll-behavior: smooth; scroll-padding-top: 20px; }
.terminal-body { min-width: 1100px; }
.flow-labels { display: flex; justify-content: space-between; gap: 12px; margin: 7px 20px 17px; color: #908298; font-size: 9px; font-variant-numeric: tabular-nums; }
.pool-source { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 9px; padding: 12px 20px; border-top: 1px solid var(--line); background: #100e13; }
.pool-source a { color: #b394da; font-size: 9px; }
.pool-source a:hover { color: #d2b8f5; text-decoration: underline; }
.pool-source code { max-width: 70%; overflow: hidden; color: #695d77; font-size: 8px; text-overflow: ellipsis; }
.comparison { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; padding: 0 20px 18px; }
.comparison label { display: grid; gap: 7px; color: #8e819c; font-size: 9px; }
.compare-metrics { width: 100%; grid-column: 1 / -1; margin-top: 3px; border-collapse: collapse; font-size: 10px; font-variant-numeric: tabular-nums; }
.compare-metrics th, .compare-metrics td { padding: 10px 0; border-bottom: 1px solid var(--line); text-align: right; }
.compare-metrics th { color: #8b7d99; font-size: 8px; font-weight: 500; letter-spacing: .7px; text-transform: uppercase; }
.compare-metrics th:first-child, .compare-metrics td:first-child { color: #897d95; text-align: left; }
.compare-metrics tr:last-child td { border-bottom: 0; }
#alert-form { padding: 0 20px 16px; }
.form-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 11px; margin-bottom: 12px; }
.form-row:has(> label + label) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-row label, #alert-form > label { display: grid; gap: 7px; color: #93839f; font-size: 9px; font-weight: 500; letter-spacing: .3px; }
#alert-form select, #alert-form input { font-size: 10px; }
.primary { width: 100%; min-height: 36px; padding: 8px 13px; border: 1px solid #bc96fb; border-radius: 5px; background: #b28aff; color: #201329; font-size: 10px; font-weight: 700; transition: background .18s, box-shadow .18s; }
.primary:hover { background: #c2a0ff; box-shadow: 0 0 18px rgba(178, 138, 255, .12); }
#form-status { min-height: 14px; margin: 9px 0 0; color: #9585a3; font-size: 9px; line-height: 1.6; }
.alerts-heading { display: flex; justify-content: space-between; align-items: center; margin: 0; padding: 13px 20px; border-top: 1px solid var(--line); color: #7f6f8e; font-size: 8px; font-weight: 500; letter-spacing: 1px; text-transform: uppercase; }
#alert-list { padding: 0 20px 14px; }
#alert-list .empty { padding: 9px 10px 14px; font-size: 10px; text-align: left; }
.alert-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.alert-item > div { min-width: 0; }
.alert-item strong { display: block; overflow: hidden; color: #cebddf; font-size: 10px; font-weight: 500; text-overflow: ellipsis; }
.alert-item small { display: block; margin-top: 3px; color: #7d6c8a; font-size: 9px; }
.alert-item > small { grid-column: 1; }
.alert-item button { align-self: center; grid-column: 2; grid-row: 1 / 3; min-width: 26px; min-height: 26px; padding: 3px 5px; border: 1px solid #34283f; border-radius: 4px; background: transparent; color: #9d81b1; font-size: 10px; }
.alert-item button:hover { border-color: #7d4861; background: #2a1721; color: var(--red); }
.alert-item.triggered { padding-inline: 10px; border: 1px solid rgba(121, 220, 177, .17); border-radius: 5px; background: rgba(121, 220, 177, .035); }
.activity .panel-head { padding-bottom: 8px; }
#activity-list { padding: 0 20px 10px; }
.activity-item { position: relative; padding: 15px 0 14px 15px; border-bottom: 1px solid var(--line); }
.activity-item::before { position: absolute; top: 22px; left: 0; width: 4px; height: 4px; border-radius: 50%; background: #755496; content: ''; }
.activity-item:last-child { border-bottom: 0; }
.activity-item > small { display: block; margin-bottom: 5px; color: #685575; font-size: 8px; font-variant-numeric: tabular-nums; }
.activity-item strong { display: block; color: #bcadcd; font-size: 10px; font-weight: 500; }
.activity-item p { margin: 4px 0 0; color: #7e6c8c; font-size: 9px; line-height: 1.65; }
.activity .empty { padding: 15px 0; text-align: left; font-size: 10px; }
.terminal-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 24px; padding-top: 14px; border-top: 1px solid var(--line); color: #5e5369; font-size: 8px; line-height: 1.7; }
.terminal-foot a { color: #8d739f; }
.terminal-foot a:hover { color: #b99acb; }
.positive { color: var(--green) !important; }
.negative { color: var(--red) !important; }
.muted { color: var(--muted) !important; }
.warning { color: var(--amber) !important; }
[hidden] { display: none !important; }
@media (min-width: 1550px) {
  .terminal-main { padding: 34px 42px 22px; }
  .terminal-grid { grid-template-columns: minmax(0, 1fr) 330px; gap: 24px; }
  .market-table td { height: 66px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
