:root {
  --bg: #0f1412;
  --panel: #18201c;
  --text: #e7efe9;
  --muted: #8fa398;
  --line: #2a3830;
  --accent: #3dba7e;
  --pos: #3dba7e;
  --neg: #e26d5a;
  --font: "Segoe UI", "IBM Plex Sans", sans-serif;
  --sticky-bg: #151c18;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  background:
    radial-gradient(1200px 600px at 10% -10%, #1b3a2c 0%, transparent 55%),
    radial-gradient(900px 500px at 100% 0%, #243048 0%, transparent 50%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* —— Header —— */
.top {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--line);
  background: rgba(15, 20, 18, .92);
  backdrop-filter: blur(10px);
  padding: .75rem 1.2rem .65rem;
  padding-top: max(.75rem, env(safe-area-inset-top));
}
.top-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}
.brand {
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--text);
  font-size: 1.1rem;
}
.top-nav {
  display: flex;
  gap: .15rem 1.1rem;
  margin-top: .55rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.top-nav::-webkit-scrollbar { display: none; }
.top-nav a {
  color: var(--muted);
  font-weight: 600;
  font-size: .9rem;
  white-space: nowrap;
  padding: .4rem 0;
}
.top-nav a:hover { color: var(--text); text-decoration: none; }
.user {
  display: flex;
  align-items: center;
  gap: .55rem;
  color: var(--muted);
  font-size: .88rem;
  flex-shrink: 0;
}
.tunnel-url {
  color: var(--muted);
  font-size: .78rem;
  max-width: 18rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.tunnel-url:hover { color: var(--text); }
.user-name {
  max-width: 9rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wrap {
  width: min(1280px, 100%);
  margin: 0 auto;
  padding: 1.5rem 1.2rem 3rem;
  padding-bottom: max(3rem, env(safe-area-inset-bottom));
  padding-left: max(1.2rem, env(safe-area-inset-left));
  padding-right: max(1.2rem, env(safe-area-inset-right));
}

.flows-multi th.num,
.flows-multi td.num {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.flows-multi td.num { font-size: .88rem; }
.flows-multi td.toggle-cell[data-mode="range"] {
  white-space: nowrap;
}
.flows-multi .col-sym {
  width: 1%;
  white-space: nowrap;
  padding-right: .55rem;
  font-weight: 600;
}
.flows-multi .col-mc {
  width: 1%;
  white-space: nowrap;
  color: var(--muted);
  font-size: .85rem;
}
.filters .filter-search {
  flex: 1 1 220px;
  max-width: 320px;
  min-width: min(100%, 180px);
}
h1 { margin: 0 0 .4rem; font-size: 1.7rem; }
h2 { margin-top: 2rem; font-size: 1.15rem; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.mono { font-family: ui-monospace, Consolas, monospace; }
.addr-break, .token-addr { overflow-wrap: anywhere; word-break: break-all; }
.token-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: .35rem;
}
.token-top p { margin: 0; }
.head-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  align-items: end;
}
.snap-meta { margin: 0; white-space: nowrap; }
.stats { display: flex; gap: .8rem; color: var(--muted); font-size: .9rem; }
.stats span {
  border: 1px solid var(--line);
  padding: .35rem .6rem;
  border-radius: 8px;
  background: var(--panel);
}
.filters {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
  flex-wrap: wrap;
  align-items: end;
}
.filters label {
  min-width: min(100%, 220px);
  flex: 1 1 180px;
}
.filters-with-ex {
  align-items: end;
  gap: .75rem 1rem;
}
.filters-with-ex .filter-search {
  flex: 0 1 220px;
  max-width: 260px;
}
.filters-with-ex .ex-tabs {
  flex: 1 1 280px;
  margin: 0;
  align-self: end;
  padding-bottom: .15rem;
}

.ex-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
  margin: .85rem 0 .25rem;
}
.ex-tab {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: .35rem .75rem;
  font-size: .82rem;
  font-weight: 600;
  cursor: pointer;
  text-transform: lowercase;
}
.ex-tab[data-ex="__all__"] { text-transform: none; }
.ex-tab:hover {
  color: var(--text);
  border-color: #3a4a40;
}
.ex-tab.active {
  color: var(--pos);
  border-color: #2f5a42;
  background: #1a3328;
}

.flash { padding: .6rem .8rem; border-radius: 8px; margin: .8rem 0; }
.flash.ok { background: #1a3328; color: var(--pos); border: 1px solid #2f5a42; }
.flash.err { background: #3a221e; color: var(--neg); border: 1px solid #5a342c; }

.tg-box {
  margin: 1rem 0 1.25rem;
  padding: 1rem 1.15rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.tg-box h2 { margin: 0 0 .5rem; font-size: 1.05rem; }
a.btn-link {
  display: inline-block;
  padding: .45rem .85rem;
  border-radius: 8px;
  background: #1a3328;
  color: var(--pos);
  border: 1px solid #2f5a42;
  text-decoration: none;
  font-weight: 600;
}
a.btn-link:hover { filter: brightness(1.08); }

.wallet-form {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) minmax(120px, 1fr);
  gap: .85rem 1rem;
  margin: 1rem 0 1.5rem;
  padding: 1.1rem 1.2rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  align-items: end;
}
.wallet-form label { min-width: 0; }
.wallet-form input,
.wallet-form select { width: 100%; }
.wallet-form .wf-addr { grid-column: 1 / -1; }
.wallet-form .wf-name { grid-column: 1 / 3; }
.wallet-form .wf-actions {
  grid-column: 3 / 4;
  display: flex;
  align-items: end;
  justify-content: flex-end;
}
.wallet-form .wf-actions button { width: 100%; }
.token-form {
  grid-template-columns: minmax(100px, 1fr) minmax(120px, 1fr) minmax(90px, 0.7fr);
}
.token-form .wf-mc { grid-column: 3 / 4; }
.token-form .wf-actions { grid-column: 1 / -1; justify-content: flex-start; }
.token-form .wf-actions button { width: auto; min-width: 140px; }
.alert-form { grid-template-columns: repeat(3, minmax(120px, 1fr)); }
.alert-form .wf-actions { grid-column: 1 / -1; justify-content: flex-start; }
.alert-form .wf-actions button { width: auto; min-width: 140px; }

button.danger {
  background: transparent;
  color: var(--neg);
  border: 1px solid #5a342c;
  padding: .35rem .55rem;
  font-weight: 600;
  font-size: .8rem;
  border-radius: 6px;
}
button.danger:hover { background: #3a221e; }
button.ok-btn {
  background: transparent;
  color: var(--pos);
  border: 1px solid #2f5a42;
  padding: .35rem .55rem;
  font-weight: 600;
  font-size: .8rem;
  border-radius: 6px;
}
button.ok-btn:hover { background: #1a3328; }
button.ghost {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border, #2a3830);
  padding: .35rem .55rem;
  font-weight: 600;
  font-size: .8rem;
  border-radius: 6px;
  cursor: pointer;
}
button.ghost:hover { background: rgba(42, 56, 48, .35); }

.add-watchlist-panel {
  margin: 1rem 0 1.4rem;
  padding: 1rem 1.1rem;
  border: 1px solid #2a3830;
  border-radius: 10px;
  background: rgba(18, 28, 22, .55);
}
.add-watchlist-panel h2 { margin-top: 0; }
.add-wl-cands {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  margin: .6rem 0 1rem;
}
.add-wl-cand {
  display: flex;
  align-items: center;
  gap: .5rem;
  cursor: pointer;
}
.add-wl-cand input { margin: 0; }

/* Chain badges (Arkham-style multi-network markers) */
.chain-badges {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-left: 0.4rem;
  vertical-align: middle;
}
.token-deployments {
  margin: 0.15rem 0 0.35rem;
}
.token-meta {
  margin: 0.15rem 0 0.85rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}
.cmc-icon-link {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  opacity: 0.9;
}
.cmc-icon-link:hover { opacity: 1; }
.cmc-icon {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  display: block;
}
.token-deployments .token-addr {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0.15rem 0;
  flex-wrap: wrap;
}
.token-deployments .chain-badge {
  margin: 0;
  flex-shrink: 0;
}
.ex-row-name .chain-badges {
  margin-left: 0.35rem;
}
.chain-badge {
  display: inline-block;
  width: 12px;
  height: 12px;
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
  flex-shrink: 0;
  opacity: 0.95;
}
.chain-badge.dim { opacity: 0.28; }
.chain-badge.chain-ethereum { background: #627eea; }
.chain-badge.chain-bsc { background: #f0b90b; }
.chain-badge.chain-base { background: #0052ff; }

.oos-tag {
  display: inline-block;
  margin-left: 0.35rem;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--muted);
  border: 1px solid color-mix(in srgb, var(--muted) 45%, transparent);
  border-radius: 4px;
  padding: 0.05rem 0.35rem;
  vertical-align: middle;
  white-space: nowrap;
}
tr.row-oos {
  opacity: 0.55;
}
tr.row-oos:hover {
  opacity: 0.85;
}
.oos-banner {
  margin: 0.2rem 0 0.7rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.access-log-table .ua-cell {
  max-width: 28rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

td.actions-cell {
  width: 1%;
  vertical-align: middle;
  white-space: nowrap;
}
.wallet-actions {
  display: inline-flex;
  flex-wrap: nowrap;
  gap: .35rem .5rem;
  align-items: center;
  justify-content: flex-end;
  white-space: nowrap;
}
.wallet-actions form {
  display: inline-flex;
  margin: 0;
  padding: 0;
  border: 0;
}
.wallet-actions .btn-link.small {
  padding: .3rem .55rem;
  font-size: .85rem;
  font-weight: 600;
  flex-shrink: 0;
  line-height: 1.2;
}
.wallet-actions .danger {
  flex-shrink: 0;
  line-height: 1.2;
}
.wallet-edit-row td {
  background: #141a17;
  border-top: none;
  padding-top: .35rem;
  padding-bottom: 1rem;
}
.wallet-edit-form {
  margin: 0;
}
.wallet-edit-form .wf-actions {
  display: flex;
  gap: .75rem;
  align-items: center;
}
.wallet-edit-form .wf-actions button { width: auto; min-width: 120px; }
.wallet-edit-form input:disabled {
  opacity: .65;
  cursor: not-allowed;
}

.table-head-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin: 1.25rem 0 .55rem;
}
.filter-head th {
  vertical-align: bottom;
  font-weight: 600;
  background: var(--sticky-bg);
}
.filter-head .th-label {
  display: block;
  margin-bottom: .35rem;
  color: var(--muted);
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.filter-head .th-filter {
  width: 100%;
  min-width: 0;
  padding: .4rem .45rem;
  font-size: .85rem;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
}
.filter-head .th-filter-reset {
  width: 100%;
  padding: .4rem .45rem;
  font-size: .8rem;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
}
.filter-head .th-filter-reset:hover {
  color: var(--text);
  border-color: var(--muted);
}

label {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  font-size: .85rem;
  color: var(--muted);
}
select, input {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .55rem .7rem;
  font-size: 1rem; /* avoid iOS zoom on focus */
}
button {
  background: var(--accent);
  color: #062214;
  border: 0;
  border-radius: 8px;
  padding: .7rem 1rem;
  font-weight: 700;
  cursor: pointer;
}
.table-wrap {
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(24, 32, 28, .85);
}
table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: .92rem;
}
th, td {
  padding: .7rem .8rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}
th {
  color: var(--muted);
  font-weight: 600;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .04em;
}
/* Keep 1d / 10m / 1h style — do not force UPPERCASE on flow/OI tables */
.flows-multi th,
#oi-table th,
.oi-token-table th {
  text-transform: none;
  letter-spacing: 0;
}
th.sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}
th.sortable:hover { color: var(--text); }
th.sortable.sort-desc::after { content: " ↓"; color: var(--accent); }
th.sortable.sort-asc::after { content: " ↑"; color: var(--accent); }
.pos { color: var(--pos); }
.neg { color: var(--neg); }
.login { max-width: 380px; margin: 12vh auto; padding: 0 .8rem; }
.card-form { display: flex; flex-direction: column; gap: .8rem; margin-top: 1rem; }
.error { color: var(--neg); }
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: .8rem;
  margin: 1rem 0 2rem;
}
.tile {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .9rem;
}
.live-pill {
  border: 1px solid var(--line);
  padding: .35rem .6rem;
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
  font-size: .85rem;
}
.live-pill.ok { color: var(--pos); border-color: #2f5a42; }
.tabs { display: flex; gap: .4rem; margin: 1.2rem 0 1rem; flex-wrap: wrap; }
.tab {
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .45rem .9rem;
  font-weight: 600;
  cursor: pointer;
}
.tab:hover { color: var(--text); }
.tab.active {
  color: #062214;
  background: var(--accent);
  border-color: var(--accent);
}
.tab-panel { display: none; }
.tab-panel.active { display: block; }
td.toggle-cell.clickable {
  cursor: pointer;
  text-decoration: underline dotted;
  text-underline-offset: 3px;
}
td.toggle-cell.clickable:hover { filter: brightness(1.15); }
tr.hist-row.expandable { cursor: pointer; }
tr.hist-row.expandable:hover { background: rgba(61, 186, 126, .08); }
tr.hist-detail td {
  border-bottom-color: transparent;
  font-size: .88rem;
  padding-top: .35rem;
  padding-bottom: .35rem;
}
.hist-caret { width: 1.2rem; user-select: none; }
th.th-filter { text-transform: none; letter-spacing: 0; font-weight: 600; }
.th-select {
  width: 100%;
  max-width: 140px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .3rem .45rem;
  font-size: .85rem;
  font-weight: 600;
  text-transform: none;
  cursor: pointer;
}
.th-select:hover { border-color: var(--accent); }
.chart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}
.chart-head h2 { margin: 0; }
.balance-panel {
  margin: 1.5rem 0 1.8rem;
  padding: 1rem 1.1rem 1.1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.balance-panel-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: .85rem;
}
.balance-panel-head h2 { margin: 0; }
.balance-split {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 1rem;
  height: 400px;
}
.ex-list {
  flex: 0 0 168px;
  width: 168px;
  max-width: 168px;
  display: flex;
  flex-direction: column;
  gap: 1px;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  border-right: 1px solid var(--line);
  padding-right: .55rem;
}
button.ex-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .4rem;
  width: 100%;
  margin: 0;
  padding: .38rem .4rem;
  background: transparent;
  color: var(--text);
  border: 0;
  border-radius: 6px;
  border-left: 2px solid transparent;
  cursor: pointer;
  font-weight: 500;
  text-align: left;
  box-shadow: none;
}
button.ex-row:hover {
  background: rgba(255, 255, 255, .04);
  color: var(--text);
}
button.ex-row.active {
  background: rgba(255, 255, 255, .06);
  border-left-color: #a8b5ad;
  color: var(--text);
  box-shadow: none;
}
button.ex-row .ex-row-name {
  font-size: .75rem;
  color: var(--muted);
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
button.ex-row.active .ex-row-name { color: var(--text); }
button.ex-row .ex-row-bal {
  font-size: .78rem;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  font-weight: 600;
  opacity: .92;
  flex-shrink: 0;
}
.chart-wrap {
  margin: 0;
  padding: .35rem .25rem .25rem;
  background: transparent;
  border: 0;
  border-radius: 0;
  height: 100%;
  position: relative;
}
.chart-wrap #chart-empty {
  position: absolute;
  inset: 0;
  margin: 0;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.chart-wrap-inpanel {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  margin: 0;
  height: auto;
}
.chart-side {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .45rem;
  height: 100%;
  min-height: 0;
}
.chart-tfs {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  flex: 0 0 auto;
}
button.chart-tf {
  margin: 0;
  padding: .28rem .55rem;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 6px;
  font-weight: 500;
  font-size: .78rem;
  cursor: pointer;
  box-shadow: none;
}
button.chart-tf:hover {
  color: var(--text);
  background: rgba(255, 255, 255, .04);
}
button.chart-tf.active {
  color: var(--text);
  background: rgba(255, 255, 255, .06);
  border-color: #6f8278;
  box-shadow: none;
}

/* —— Desktop header row —— */
@media (min-width: 880px) {
  .top {
    display: flex;
    align-items: center;
    gap: 1.4rem;
    padding: .85rem 1.4rem;
  }
  .top-main {
    display: contents;
  }
  .brand { order: 0; }
  .top-nav {
    order: 1;
    flex: 1;
    margin-top: 0;
    overflow: visible;
  }
  .user { order: 2; margin-left: auto; }
}

/* —— Tablet / phone —— */
@media (max-width: 800px) {
  .wrap { padding: 1rem .85rem 2.5rem; }
  h1 { font-size: 1.35rem; }
  h2 { font-size: 1.05rem; margin-top: 1.5rem; }
  .head-row { align-items: start; gap: .5rem; }
  .snap-meta { white-space: normal; font-size: .78rem; }
  #view-hint { display: none; }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .55rem;
  }
  .tile { padding: .7rem .75rem; font-size: .9rem; }

  .wallet-form,
  .token-form,
  .alert-form {
    grid-template-columns: 1fr;
    padding: .9rem 1rem;
  }
  .wallet-form .wf-name,
  .wallet-form .wf-actions,
  .token-form .wf-mc,
  .token-form .wf-actions,
  .alert-form .wf-actions {
    grid-column: 1 / -1;
  }
  .token-form .wf-actions button,
  .alert-form .wf-actions button,
  .wallet-form .wf-actions button {
    width: 100%;
    min-width: 0;
  }

  .table-wrap {
    margin-left: -.15rem;
    margin-right: -.15rem;
    border-radius: 10px;
  }
  table { font-size: .84rem; }
  th, td { padding: .55rem .55rem; }
  .flows-multi td.num { font-size: .8rem; }

  /* Sticky symbol column while scrolling windows */
  .flows-multi th.col-sym,
  .flows-multi td.col-sym {
    position: sticky;
    left: 0;
    z-index: 2;
    background: var(--sticky-bg);
    box-shadow: 4px 0 8px rgba(0, 0, 0, .25);
    min-width: 0;
    max-width: none;
    width: 1%;
    padding-left: .5rem;
    padding-right: .45rem;
  }
  .flows-multi thead th.col-sym { z-index: 3; }
  .flows-multi .col-mc { font-size: .78rem; }

  .balance-panel { padding: .85rem .8rem; }
  .balance-panel-head h2 { font-size: 1.05rem; }
  .balance-split {
    flex-direction: column;
    height: auto;
    gap: .75rem;
  }
  .ex-list {
    flex: none;
    flex-direction: row;
    flex-wrap: nowrap;
    width: 100%;
    max-width: none;
    height: auto;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    padding-right: 0;
    padding-bottom: .65rem;
    gap: .35rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .ex-list::-webkit-scrollbar { display: none; }
  button.ex-row {
    flex: 0 0 auto;
    width: auto;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: .1rem;
    padding: .32rem .45rem;
    border: 1px solid var(--line);
    border-left: 1px solid var(--line);
    border-radius: 7px;
  }
  button.ex-row .ex-row-name { font-size: .72rem; }
  button.ex-row .ex-row-bal { font-size: .74rem; }
  button.ex-row.active {
    border-color: #8fa398;
    border-left-color: #8fa398;
    background: rgba(255, 255, 255, .05);
  }
  .chart-side { height: 300px; }
  .chart-wrap,
  .chart-wrap-inpanel { height: auto; flex: 1; }
  button.chart-tf {
    padding: .4rem .65rem;
    font-size: .8rem;
    min-height: 2.1rem;
  }

  .login { margin: 8vh auto; }
}

@media (max-width: 420px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .user-name { display: none; }
  .tunnel-url { max-width: 9rem; }
  h1 { font-size: 1.25rem; }
  .chart-side { height: 260px; }
}

/* —— Top holders (token page) —— */
.holders-panel { margin-top: 1.75rem; }
.holders-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
  margin-bottom: .35rem;
}
.holders-head h2 { margin: 0; }
.holders-actions {
  display: flex;
  gap: .45rem;
  flex-wrap: wrap;
}
.holders-footer {
  display: flex;
  justify-content: center;
  margin-top: .75rem;
}
.holders-table td { vertical-align: top; }
.holders-label { font-weight: 600; line-height: 1.25; display: flex; align-items: center; gap: 0.35rem; flex-wrap: wrap; }
.holders-label .chain-badges { margin-left: 0; gap: 3px; }
.holders-label .chain-badge { flex-shrink: 0; }
.holders-ex {
  display: inline-block;
  margin-top: .2rem;
  font-size: .78rem;
  color: var(--accent);
  text-transform: lowercase;
}
.holders-ex.muted { color: var(--muted); }
#holders-status { margin: .25rem 0 .5rem; }

.oi-token-panel { margin-top: 1.75rem; }
.oi-token-table .oi-total-row td {
  font-weight: 600;
  border-bottom: 1px solid var(--line);
}
.oi-chart-panel { margin-top: 1rem; }
.toggle-cell.clickable { cursor: pointer; }
