/* ══ COMET design system ═══════════════════════════════════════════
   void night sky · glass surfaces · ice→violet accent
   ember is reserved for detections only. */
:root {
  --void: #05070d;
  --night: #0d1220cc;          /* glass surface */
  --night-solid: #0d1220;
  --haze: #151c30;
  --line: #ffffff12;
  --line-strong: #ffffff22;
  --ink: #edf1ff;
  --dust: #8b94b8;
  --ice: #6ee7f0;
  --violet: #a78bfa;
  --ember: #ffc24b;
  --mint: #4ade80;
  --rose: #fb7185;
  --grad: linear-gradient(120deg, var(--ice), var(--violet));
  --display: 'Unbounded', sans-serif;
  --body: 'Sora', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --r: 18px;
  --r-s: 10px;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
html, body { margin: 0; padding: 0; }

body {
  background: var(--void);
  color: var(--ink);
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.6;
  min-height: 100dvh;
  overflow-x: hidden;
}

#sky {
  position: fixed; inset: 0; z-index: -1;
  width: 100%; height: 100%;
}

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.dim { color: var(--dust); }

::selection { background: #6ee7f033; }
* { scrollbar-width: thin; scrollbar-color: #2a3350 transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #2a3350; border-radius: 99px; }
::-webkit-scrollbar-track { background: transparent; }

/* ── entrance choreography ──────────────────────────────────────── */
.rise {
  animation: rise .7s var(--ease) both;
  animation-delay: calc(var(--i, 0) * 90ms);
}
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ── topbar ─────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 12px; z-index: 100;
  max-width: 1380px; margin: 12px auto 0;
  width: calc(100% - 32px);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 10px 18px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: #0a0f1cd9;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 12px 40px #00000059;
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand-logo {
  width: 38px; height: 38px;
  transition: transform .5s var(--ease);
}
.brand:hover .brand-logo { transform: rotate(-12deg) scale(1.08); }
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name {
  font-family: var(--display); font-weight: 700; font-size: 19px;
  letter-spacing: .5px;
  background: var(--grad);
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}
.brand-sub { font-size: 10.5px; letter-spacing: 2.5px; text-transform: uppercase; color: var(--dust); }

.topbar-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 13px; border: 1px solid var(--line); border-radius: 999px;
  font-size: 12px; color: var(--dust); background: #ffffff06;
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.chip.live { color: var(--mint); border-color: #4ade8040; }
.chip.demo { color: var(--ember); border-color: #ffc24b40; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--rose); transition: background .3s; }
.dot.on { background: var(--mint); animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 0 #4ade8055; }
  50% { box-shadow: 0 0 0 5px #4ade8000; }
}

.ic { width: 14px; height: 14px; fill: currentColor; flex: none; }
.ic [stroke-width], .ic[stroke-width] { fill: none; stroke: currentColor; }
svg.ic path[stroke-width], svg.ic rect[stroke-width] { fill: none; stroke: currentColor; }

/* ── layout ─────────────────────────────────────────────────────── */
.wrap {
  max-width: 1380px; margin: 0 auto; padding: 22px 16px 32px;
  display: flex; flex-direction: column; gap: 18px;
}

/* ── stat band ──────────────────────────────────────────────────── */
.band {
  display: grid; grid-template-columns: repeat(5, 1fr);
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--night);
  backdrop-filter: blur(10px);
  overflow: hidden;
}
.cell {
  display: flex; flex-direction: column; gap: 2px;
  padding: 20px 22px;
  border-right: 1px solid var(--line);
  transition: background .3s var(--ease);
}
.cell:last-child { border-right: none; }
.cell:hover { background: #ffffff05; }
.cell-label { font-size: 11px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--dust); font-weight: 600; }
.cell-value {
  font-family: var(--display); font-weight: 700; font-size: 27px;
  font-variant-numeric: tabular-nums; line-height: 1.25;
}
.cell-value.bump { animation: bump .5s var(--ease); }
@keyframes bump {
  0% { transform: scale(1); }
  35% { transform: scale(1.09); }
  100% { transform: scale(1); }
}
.tint-ice { color: var(--ice); }
.tint-dim { color: var(--dust); }
.tint-ember { color: var(--ember); }
.cell-ember { background: linear-gradient(160deg, #ffc24b0e, transparent 60%); }
.cell-hint { font-size: 11.5px; color: var(--dust); }

/* ── grid + panels ──────────────────────────────────────────────── */
.grid { display: grid; grid-template-columns: minmax(320px, 2fr) minmax(0, 3fr); gap: 18px; align-items: start; }
@media (max-width: 1020px) { .grid { grid-template-columns: 1fr; } }

.panel {
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--night);
  backdrop-filter: blur(10px);
  overflow: hidden;
  transition: border-color .35s var(--ease);
}
.panel:hover { border-color: var(--line-strong); }
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; flex-wrap: wrap;
}
.panel-head h2 {
  margin: 0; font-family: var(--body); font-size: 15px; font-weight: 700;
  letter-spacing: .2px;
}
.panel-note { font-size: 12px; color: var(--dust); }
.panel-note b { color: var(--ink); font-weight: 600; }
.panel-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.field {
  background: #ffffff08; border: 1px solid var(--line); border-radius: var(--r-s);
  color: var(--ink); font-family: var(--body); font-size: 13px;
  padding: 9px 13px; min-height: 40px;
  transition: border-color .25s var(--ease), background .25s var(--ease), box-shadow .25s var(--ease);
}
.field::placeholder { color: #626b8f; }
.field:hover { border-color: var(--line-strong); }
.field:focus { outline: none; border-color: #6ee7f077; box-shadow: 0 0 0 3px #6ee7f01f; background: #ffffff0b; }
input.field[type="search"] { width: 220px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--grad); color: #071018;
  border: none; border-radius: var(--r-s);
  font-family: var(--body); font-weight: 700; font-size: 13px;
  padding: 9px 16px; min-height: 40px; cursor: pointer; text-decoration: none;
  transition: transform .18s var(--ease), box-shadow .25s var(--ease), filter .18s;
  box-shadow: 0 4px 18px #6ee7f022;
}
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 26px #6ee7f038; filter: saturate(1.15); }
.btn:active { transform: translateY(0) scale(.97); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn .ic path { stroke: currentColor; fill: none; }
.btn-ghost {
  background: #ffffff08; color: var(--ink); box-shadow: none;
  border: 1px solid var(--line);
}
.btn-ghost:hover { box-shadow: none; background: #ffffff0f; border-color: var(--line-strong); }

:is(.btn, .tab, .seg, .field, .logs-toggle, .addr, .axiom):focus-visible {
  outline: 3px solid #6ee7f055; outline-offset: 2px;
}

/* ── tabs with glider ───────────────────────────────────────────── */
.tabs {
  position: relative;
  display: flex; gap: 4px; padding: 0 14px 12px; flex-wrap: wrap;
}
.tab {
  position: relative; z-index: 1;
  background: transparent; color: var(--dust); border: none;
  border-radius: 999px; font-family: var(--body); font-weight: 600; font-size: 12.5px;
  padding: 8px 15px; min-height: 36px; cursor: pointer;
  transition: color .25s var(--ease);
}
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); }
.tab-glider {
  position: absolute; z-index: 0;
  width: 100px; height: 36px; border-radius: 18px;
  background: #ffffff10;
  transform-origin: left center;
  transition: transform .35s var(--ease), opacity .2s;
  opacity: 0;
  left: 0; top: 0;
  will-change: transform;
}
.tab-glider.ready { opacity: 1; }

.seg {
  background: transparent; color: var(--dust); border: 1px solid var(--line);
  border-radius: 999px; font-family: var(--body); font-weight: 600; font-size: 12px;
  padding: 6px 13px; min-height: 34px; cursor: pointer;
  transition: color .2s, background .2s, border-color .2s;
}
.seg:hover { color: var(--ink); }
.seg.on { color: var(--ink); background: #ffffff0d; border-color: var(--line-strong); }

/* ── table ──────────────────────────────────────────────────────── */
.table-scroll { overflow: auto; max-height: 560px; }
table.tokens { width: 100%; border-collapse: collapse; font-size: 13px; }
.tokens thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--night-solid);
  text-align: left; font-size: 10.5px; letter-spacing: 1.6px; text-transform: uppercase;
  color: var(--dust); font-weight: 600;
  padding: 10px 16px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tokens td {
  padding: 10px 16px; border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.tokens tbody tr {
  transition: background .2s var(--ease);
}
.tokens tbody tr:hover { background: #ffffff05; }
.tokens tbody tr:last-child td { border-bottom: none; }
.tokens .num { text-align: right; font-variant-numeric: tabular-nums; }
.tok-name { font-weight: 600; max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.tok-sym { color: var(--ice); font-weight: 700; margin-right: 6px; }

.addr {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--dust); cursor: pointer; background: none; border: none;
  font-family: var(--mono); font-size: 12.5px; padding: 4px 7px;
  border-radius: 7px; min-height: 30px;
  transition: color .2s, background .2s;
}
.addr:hover { color: var(--ink); background: #ffffff0a; }
.addr .ic { width: 12px; height: 12px; opacity: .65; }
.addr .ic rect, .addr .ic path { stroke: currentColor; fill: none; }

.badge {
  display: inline-block; padding: 3px 11px; border-radius: 999px;
  font-size: 11px; font-weight: 700; letter-spacing: .4px;
  border: 1px solid var(--line-strong); color: var(--dust);
}
.badge.active   { color: var(--mint); border-color: #4ade8040; background: #4ade8012; }
.badge.archive_1, .badge.archive_2 { color: #aab3d6; }
.badge.archive_3, .badge.archive_4 { color: var(--dust); }
.badge.alerted  { color: var(--ember); border-color: #ffc24b55; background: #ffc24b14; }
.badge.cut { color: var(--rose); border-color: #fb718544; background: #fb718510; }
.badge.err { color: var(--dust); }

.axiom {
  display: inline-flex; align-items: center; gap: 5px;
  color: var(--violet); text-decoration: none; font-size: 12.5px; font-weight: 600;
  padding: 5px 11px; border: 1px solid #a78bfa3d; border-radius: 8px; min-height: 30px;
  transition: background .2s, transform .18s var(--ease);
}
.axiom:hover { background: #a78bfa1a; transform: translateY(-1px); }

/* ── progress to $500k ──────────────────────────────────────────── */
.col-prog { min-width: 190px; }
th.col-prog { text-align: left; }
.prog { display: flex; align-items: center; gap: 10px; }
.prog-track {
  flex: 1; height: 7px; border-radius: 999px;
  background: #ffffff10; overflow: hidden; min-width: 90px;
}
.prog-fill {
  height: 100%; width: 100%; border-radius: 999px;
  transform-origin: left center; transform: scaleX(0);
  background: linear-gradient(90deg, #6ee7f0, #7cc5f5);
  transition: transform .6s var(--ease);
}
.prog-fill.hot { background: linear-gradient(90deg, #ffd36b, var(--ember)); }
.prog-pct {
  font-family: var(--mono); font-size: 12px; color: var(--dust);
  min-width: 38px; text-align: right; font-variant-numeric: tabular-nums;
}
.prog-done { justify-content: flex-start; }
.prog-badge {
  font-size: 11px; font-weight: 700; letter-spacing: .3px;
  color: var(--ember); border: 1px solid #ffc24b55; background: #ffc24b14;
  padding: 3px 11px; border-radius: 999px;
}
.row-cooling { opacity: .5; }
.row-cooling:hover { opacity: .8; }
.cool-dot { color: var(--ice); margin-right: 6px; opacity: .7; font-size: 11px; }

/* ── detections feed ────────────────────────────────────────────── */
.alerts-feed {
  max-height: 640px; overflow-y: auto;
  padding: 4px 14px 14px; display: flex; flex-direction: column; gap: 10px;
}
.alert-card {
  flex: none;                 /* never let the flex column squish rows (was clipping content) */
  border: 1px solid #ffc24b30; border-radius: 14px; padding: 14px 16px;
  background: linear-gradient(150deg, #ffc24b12, #0d122000 60%);
  animation: land .5s var(--ease) both;
}
@keyframes land {
  from { opacity: 0; transform: translateY(-10px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
.alert-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.alert-title { font-weight: 700; }
.alert-mc {
  font-family: var(--display); font-weight: 700; font-size: 16px;
  color: var(--ember); font-variant-numeric: tabular-nums;
}
.alert-meta { margin-top: 8px; display: flex; flex-direction: column; gap: 3px; font-size: 12.5px; }
.alert-meta .row { display: flex; align-items: center; gap: 6px; }
.alert-meta .k { color: var(--dust); width: 36px; flex: none; font-size: 11px; letter-spacing: 1px; }
.alert-actions { margin-top: 10px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.alert-time { font-size: 11px; color: var(--dust); margin-left: auto; }
.alert-mode {
  font-size: 10px; letter-spacing: 1px; padding: 3px 9px; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--dust); font-weight: 700;
}
.alert-mode.live { color: var(--mint); border-color: #4ade8044; }

.empty { padding: 44px 20px; text-align: center; color: var(--dust); font-size: 13px; }
.empty p { margin: 4px 0; }
.empty p:first-of-type { color: var(--ink); font-weight: 600; font-size: 14px; }
.empty-comet {
  width: 54px; height: 54px; margin-bottom: 10px;
  animation: hover-drift 5s ease-in-out infinite;
}
@keyframes hover-drift {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-7px) rotate(-6deg); }
}

/* ── fee filter ─────────────────────────────────────────────────── */
.ff-body {
  display: grid; grid-template-columns: minmax(280px, 2fr) minmax(0, 3fr);
  gap: 16px; padding: 0 20px 20px;
}
@media (max-width: 1020px) { .ff-body { grid-template-columns: 1fr; } }
.ff-input-col { display: flex; flex-direction: column; gap: 12px; }
.ff-textarea {
  min-height: 170px; resize: vertical; width: 100%;
  font-family: var(--mono); font-size: 12px; line-height: 1.7;
}
.ff-controls { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.ff-min { display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; color: var(--dust); }
.ff-min-input { width: 76px; text-align: right; font-variant-numeric: tabular-nums; }
.ff-detect { font-size: 12px; }
.ff-results-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.ff-summary { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ff-summary-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.ff-scroll { max-height: 420px; border: 1px solid var(--line); border-radius: var(--r-s); }
.ff-row-cut { opacity: .45; }
.ff-fees.pass { color: var(--mint); font-weight: 600; }
.ff-fees.cut { color: var(--rose); }
.ff-dev {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 5px;
  font-size: 9.5px; font-weight: 700; letter-spacing: .5px; vertical-align: middle;
  color: var(--violet); background: #a78bfa1a; border: 1px solid #a78bfa44;
}

/* ── Fee filter: stop button + live activity feed ───────────────── */
.ff-stop {
  background: #fb71851f; color: var(--rose); border: 1px solid #fb718566;
  box-shadow: none;
}
.ff-stop:hover { background: #fb718533; box-shadow: none; transform: translateY(-1px); }
.ff-stop:disabled { opacity: .6; }

#ff-live { margin-top: 12px; border: 1px solid var(--line); border-radius: var(--r-s); overflow: hidden; }
.ff-live-head {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  font-size: 12px; color: var(--dust); border-bottom: 1px solid var(--line); background: #ffffff05;
}
.ff-live-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); animation: ff-pulse 1.15s ease-in-out infinite; flex: none; }
@keyframes ff-pulse { 0%,100% { opacity: .3; transform: scale(.75); } 50% { opacity: 1; transform: scale(1.15); } }
.ff-live-now { color: var(--ice); font-size: 11.5px; }
.ff-live-feed { max-height: 260px; overflow: hidden; display: flex; flex-direction: column; }
.ff-live-row {
  display: grid; grid-template-columns: 92px minmax(0,1fr) auto 78px; gap: 10px; align-items: center;
  padding: 6px 12px; font-size: 12.5px; border-bottom: 1px solid var(--line);
  animation: ff-slide .3s ease;
}
@keyframes ff-slide { from { opacity: 0; transform: translateY(-9px); } to { opacity: 1; transform: none; } }
.ff-live-addr { color: var(--dust); }
.ff-live-sym { color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ff-live-fee { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--ink); }
.ff-live-verdict { text-align: right; font-size: 10px; text-transform: uppercase; letter-spacing: .6px; color: var(--dust); }
.ff-live-row.pass .ff-live-fee, .ff-live-row.pass .ff-live-verdict { color: var(--mint); }
.ff-live-row.cut  .ff-live-fee { color: var(--rose); }
.ff-live-row.cut  .ff-live-verdict { color: var(--rose); }
@media (prefers-reduced-motion: reduce) {
  .ff-live-dot { animation: none; }
  .ff-live-row { animation: none; }
}

/* ── alert channels ─────────────────────────────────────────────── */
.as-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 14px; padding: 0 20px 14px;
}
@media (max-width: 900px) { .as-grid { grid-template-columns: 1fr; } }
.as-wide { grid-column: 1 / -1; }
.as-lab {
  display: flex; flex-direction: column; gap: 6px;
  font-size: 12.5px; font-weight: 600; color: var(--ink);
}
.as-lab .dim { font-weight: 400; }
.as-lab .field { width: 100%; }
.as-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; padding: 0 20px 18px; font-size: 12px;
}
.as-actions { display: flex; gap: 10px; margin-left: auto; flex-wrap: wrap; }

/* ── log drawer ─────────────────────────────────────────────────── */
.logs-toggle {
  width: 100%; background: none; border: none; color: inherit; cursor: pointer;
  font: inherit; text-align: left;
}
.logs-toggle:hover h2 { color: var(--ice); }
.logs-toggle h2 { transition: color .2s; }
.chev { transition: transform .3s var(--ease); color: var(--dust); }
.chev path { stroke: currentColor; fill: none; }
.chev.open { transform: rotate(180deg); }
.logs-clip {
  display: grid; grid-template-rows: 0fr;
  transition: grid-template-rows .45s var(--ease);
}
.logs-clip.open { grid-template-rows: 1fr; }
.logs {
  margin: 0; padding: 0 20px; max-height: 300px; overflow: auto;
  min-height: 0;
  font-size: 12px; line-height: 1.75; color: #9aa4c8; white-space: pre-wrap;
}
.logs-clip.open .logs { padding: 4px 20px 16px; }

/* ── footer / toast ─────────────────────────────────────────────── */
.foot {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap; padding: 2px 8px 12px; font-size: 12px;
}
.foot-brand {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--display); font-weight: 500; font-size: 13px; color: var(--dust);
}
.foot-logo { width: 18px; height: 18px; opacity: .8; }

.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translate(-50%, 16px) scale(.97);
  background: #131a2ef2; border: 1px solid #6ee7f055; color: var(--ink);
  border-radius: 12px; padding: 11px 20px; font-size: 13px; font-weight: 600;
  box-shadow: 0 12px 40px #00000080;
  opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
  z-index: 200;
  backdrop-filter: blur(10px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* ── responsive ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .band { grid-template-columns: repeat(2, 1fr); }
  .cell { border-bottom: 1px solid var(--line); }
  .cell:nth-child(2n) { border-right: none; }
  .cell:nth-child(5) { border-bottom: none; grid-column: 1 / -1; border-right: none; }
}
@media (max-width: 640px) {
  .wrap { padding: 14px 10px 24px; }
  .topbar { width: calc(100% - 20px); top: 8px; }
  input.field[type="search"] { width: 100%; }
  .panel-tools { width: 100%; }
  .cell-value { font-size: 22px; }
  .brand-sub { display: none; }
}

/* ── reduced motion ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .rise, .alert-card, .empty-comet, .dot.on { animation: none; }
  .cell-value.bump { animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; }
  #sky { display: none; }
}

/* ── Wallet Launch Tracker ─────────────────────────────────────────── */
.wt-head-tools { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.wt-status { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .35rem 0 .8rem; }
.badge.plat { background: color-mix(in srgb, var(--violet) 16%, transparent); color: var(--ice); text-transform: none; }
.btn.on { border-color: color-mix(in srgb, var(--mint) 55%, transparent); color: var(--mint); }

.wt-cfg { border: 1px solid var(--line); border-radius: var(--r-s); padding: .9rem; margin-bottom: .9rem;
  background: color-mix(in srgb, var(--night-solid) 40%, transparent); display: grid; gap: .7rem; }
.wt-cfg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; }
.wt-lab { display: grid; gap: .3rem; font-size: .74rem; color: var(--dust); }
.wt-area { min-height: 4.4rem; font-family: var(--mono); font-size: .72rem; resize: vertical; }
.wt-cfg-foot { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.wt-cfg-foot .dim { font-size: .72rem; max-width: 44ch; }

.wt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.wt-col { display: flex; flex-direction: column; gap: .6rem; min-width: 0; }
.wt-add { display: flex; gap: .5rem; }
.wt-add .field { flex: 1; min-width: 0; }
.wt-label-in { max-width: 9rem; flex: 0 0 auto; }
.wt-tools { display: flex; gap: .5rem; align-items: center; margin: .55rem 0 .1rem; }
.wt-tools .field { flex: 1; min-width: 0; }
.wt-tools .btn { flex: none; white-space: nowrap; }
.wt-scroll { max-height: 22rem; }
.wt-col-head { display: flex; align-items: baseline; justify-content: space-between; }
.wt-col-title { font-family: var(--display); font-size: .8rem; letter-spacing: .01em; color: var(--haze); }
.wt-lbl { display: block; font-size: .66rem; margin-top: .1rem; }
.wt-links { display: flex; gap: .45rem; white-space: nowrap; }
.wt-state { cursor: pointer; }
.wt-del { padding: .15rem .45rem; line-height: 1; }

@media (max-width: 780px) {
  .wt-grid, .wt-cfg-grid { grid-template-columns: 1fr; }
}

/* ══════════════════════════════════════════════════════════════════
   App shell — minimal left sidebar + content column (2026 redesign)
   ══════════════════════════════════════════════════════════════════ */
:root { --side-w: 232px; }

.app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); min-height: 100dvh; }

/* ── sidebar ──────────────────────────────────────────────────── */
.sidebar {
  position: sticky; top: 0; align-self: start;
  height: 100dvh; display: flex; flex-direction: column; gap: 16px;
  padding: 18px 14px;
  background: #0a0f1ccc;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-right: 1px solid var(--line);
  z-index: 80;
}
.side-brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 0; }
.side-brand .brand-logo { width: 34px; height: 34px; transition: transform .5s var(--ease); }
.side-brand:hover .brand-logo { transform: rotate(-12deg) scale(1.06); }

.side-nav { display: flex; flex-direction: column; gap: 3px; margin-top: 2px; }
.side-link {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 10px 12px; border-radius: var(--r-s);
  border: 1px solid transparent; background: none;
  font-family: var(--body); font-size: 13.5px; font-weight: 500;
  color: var(--dust); cursor: pointer; text-align: left;
  transition: background .18s var(--ease), color .18s var(--ease), border-color .18s var(--ease);
}
.side-link .nav-ic { width: 17px; height: 17px; opacity: .82; flex: none; transition: color .18s var(--ease), opacity .18s var(--ease); }
.side-link:hover { background: #ffffff08; color: var(--ink); }
.side-link:hover .nav-ic { opacity: 1; }
.side-link.on { background: linear-gradient(100deg, #6ee7f016, #a78bfa12); color: var(--ink); border-color: #6ee7f030; }
.side-link.on .nav-ic { color: var(--ice); opacity: 1; }
.side-link:focus-visible { outline: 2px solid #6ee7f066; outline-offset: 1px; }

.side-foot {
  margin-top: auto; display: flex; align-items: center; gap: 8px;
  padding: 12px 10px 2px; font-size: 11.5px;
  border-top: 1px solid var(--line);
}

.side-scrim { display: none; }
.side-toggle { display: none; }

/* ── content column ──────────────────────────────────────────── */
.content { display: flex; flex-direction: column; min-width: 0; }

.app-topbar {
  position: sticky; top: 0; z-index: 70;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 24px;
  background: #070b14d9;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.view-title { margin: 0; font-family: var(--display); font-weight: 700; font-size: 16px; letter-spacing: .3px; color: var(--ink); }
.app-topbar .topbar-status { margin-left: auto; }

/* SOL price chip */
.chip-sol { color: var(--ice); border-color: #6ee7f033; font-weight: 500; }
.chip-sol .sol-mark { font-size: 13px; opacity: .9; }
.chip-sol.up { color: var(--mint); border-color: #4ade8044; }
.chip-sol.down { color: var(--rose); border-color: #fb718544; }
.chip-uptime { color: var(--dust); }

/* ── views ───────────────────────────────────────────────────── */
.content .wrap { max-width: 1220px; padding-top: 24px; }
.view { display: none; }
.view.on { display: flex; flex-direction: column; gap: 18px; animation: viewIn .18s var(--ease); }
@keyframes viewIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.view[data-view="logs"] .logs-clip.open { max-height: none; height: min(64vh, 640px); }

/* ── responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; top: 0; left: 0; width: 264px; max-width: 82vw;
    transform: translateX(-103%); transition: transform .24s var(--ease);
    box-shadow: 0 24px 70px #000000b3;
  }
  .sidebar.open { transform: none; }
  .side-scrim { display: block; position: fixed; inset: 0; z-index: 75; background: #04060cb0; backdrop-filter: blur(2px); }
  .side-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: var(--r-s);
    border: 1px solid var(--line); background: #ffffff08; color: var(--ink); cursor: pointer;
  }
  .app-topbar { padding: 10px 14px; }
}
@media (max-width: 720px) {
  .band { grid-template-columns: repeat(2, 1fr); }
  .cell { border-right: none; border-bottom: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  .view.on { animation: none; }
  .sidebar { transition: none; }
}

/* ══════════════════════════════════════════════════════════════════
   Orbit rebrand + mobile polish
   ══════════════════════════════════════════════════════════════════ */
/* topbar logo: brand stays visible on phone when the sidebar is closed */
.topbar-logo { display: none; }
@media (max-width: 900px) {
  .topbar-logo { display: block; width: 26px; height: 26px; flex: none; }
}

/* small orbit mark inside empty states */
.empty-mini { width: 42px; height: 42px; opacity: .75; margin-bottom: 8px; }

/* smoother touch scrolling for all tables and feeds */
.table-scroll, .alerts-feed, .logs { -webkit-overflow-scrolling: touch; }

@media (max-width: 640px) {
  /* fewer chips on phone: keep SOL price + live feed, drop the rest */
  .chip-uptime, #chip-tg { display: none; }
  .view-title { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .app-topbar { gap: 10px; }
  .topbar-status { gap: 6px; }
  .chip { padding: 5px 10px; font-size: 11px; }
  /* wallet tracker: inputs stack instead of squeezing */
  .wt-add { flex-wrap: wrap; }
  .wt-add .field { flex: 1 1 100%; }
  .wt-label-in { max-width: none; flex: 1 1 60%; }
  #wt-add-btn { flex: 1 1 30%; }
  /* panels breathe less, content more */
  .panel-head { padding: 14px 14px; }
  .alerts-feed { max-height: 480px; padding: 4px 10px 12px; }
  .table-scroll { max-height: 440px; }
  .empty { padding: 32px 14px; }
}

/* ── Dev token checker ─────────────────────────────────────────── */
.seg-group { display: inline-flex; gap: 4px; }
.dc-controls { gap: 10px 14px; }
.dc-tag { font-size: 11px; letter-spacing: .3px; text-transform: uppercase; color: var(--dust); }

/* ══════════════════════════════════════════════════════════════════
   Mobile haze fix
   Real cause: the sidebar scrim (.side-scrim) is forced `display:block`
   in the mobile media query, which overrides the `hidden` attribute the
   drawer JS uses to close it — so a full-screen blur(2px) + dark film sat
   over the whole page even with the menu closed, smearing all thin text.
   The scrim must only show while the drawer is actually open.
   (Opaque panels below are kept as a belt-and-braces iOS legibility win.)
   ══════════════════════════════════════════════════════════════════ */
@media (max-width: 900px) {
  /* scrim only when the drawer is open (JS sets/removes [hidden]) */
  .side-scrim[hidden] { display: none !important; }

  .topbar, .app-topbar, .sidebar, .band, .panel {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .band, .panel { background: #0d1526; }
  .app-topbar { background: #080d18; }
  .sidebar { background: #0a0f1c; }
  /* keep the starfield as a static backdrop instead of a fixed layer that
     iOS composites through the panels */
  #sky { position: absolute; }
}

/* ── Profile: sidebar entry + editor (multi-user) ──────────────────── */
.side-profile {
  margin-top: auto; display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px; border: 1px solid var(--line); border-radius: var(--r-s);
  background: #ffffff06; color: var(--ink); cursor: pointer; text-align: left;
  transition: background .18s var(--ease), border-color .18s var(--ease);
}
.side-profile:hover { background: #ffffff0e; border-color: var(--line-strong); }
.side-avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover;
  background: #0c1220; border: 1px solid var(--line-strong); flex: none; }
.side-profile-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; flex: 1; }
.side-profile-name { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-profile-sub { font-size: 10.5px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--dust); }
.side-profile:focus-visible { outline: 2px solid #6ee7f066; outline-offset: 1px; }

.pf-body { display: grid; grid-template-columns: 200px 1fr; gap: 22px; padding: 0 20px 20px; }
@media (max-width: 720px) { .pf-body { grid-template-columns: 1fr; } }
.pf-avatar-col { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.pf-avatar { width: 128px; height: 128px; border-radius: 50%; object-fit: cover;
  background: #0c1220; border: 1px solid var(--line-strong); }
.pf-upload { cursor: pointer; }
.pf-avatar-hint { font-size: 11px; }
.pf-fields { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.pf-fields .field { width: 100%; }
.pf-accents { display: flex; gap: 10px; margin-top: 6px; }
.pf-accent { width: 30px; height: 30px; border-radius: 50%; border: 2px solid transparent;
  cursor: pointer; transition: transform .15s var(--ease), border-color .15s; }
.pf-accent:hover { transform: scale(1.1); }
.pf-accent.on { border-color: var(--ink); box-shadow: 0 0 0 3px #ffffff1a; }
.pf-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 6px; flex-wrap: wrap; }

/* ── Admin dashboard ───────────────────────────────────────────────── */
.side-admin { margin-top: 6px; border-top: 1px solid var(--line); padding-top: 12px; }
.side-admin.on { background: linear-gradient(100deg, #ffc24b16, #a78bfa12); border-color: #ffc24b40; }
.side-admin.on .nav-ic { color: var(--ember); }
.ad-member { display: flex; align-items: center; gap: 9px; }
.ad-av { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line-strong); }
.ad-invite-out { margin: 0 20px 12px; padding: 11px 14px; border: 1px solid #6ee7f033;
  background: #6ee7f00e; border-radius: var(--r-s); font-size: 13px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ad-detail-body { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding: 0 20px 20px; }
@media (max-width: 860px) { .ad-detail-body { grid-template-columns: 1fr; } }
.ad-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
#ad-detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
