:root,
html.dark {
  --bg: #0a0f1e;
  --bg2: #0b0f14;
  --card: rgba(15, 23, 42, 0.6);
  --border: rgba(51, 65, 85, 0.55);
  --border-soft: rgba(255, 255, 255, 0.06);
  --text: #e2e8f0;
  --muted: #94a3b8;
  --dim: #64748b;
  --blue: #3b82f6;
  --blue-glow: rgba(59, 130, 246, 0.35);
  --cyan: #22d3ee;
  --emerald: #34d399;
  --danger: #f87171;
  --amber: #fbbf24;
  --mesh-a: rgba(59, 130, 246, 0.14);
  --mesh-b: rgba(34, 211, 238, 0.08);
}

html.light {
  --bg: #f8fafc;
  --bg2: #f1f5f9;
  --card: rgba(255, 255, 255, 0.92);
  --border: rgba(148, 163, 184, 0.45);
  --border-soft: rgba(15, 23, 42, 0.08);
  --text: #0f172a;
  --muted: #475569;
  --dim: #64748b;
  --blue-glow: rgba(59, 130, 246, 0.2);
  --mesh-a: rgba(59, 130, 246, 0.08);
  --mesh-b: rgba(34, 211, 238, 0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
}

.bg-mesh {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 70% 45% at 15% -5%, var(--mesh-a), transparent 55%),
    radial-gradient(ellipse 55% 40% at 85% 0%, var(--mesh-b), transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%);
  z-index: 0;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 1.25rem 2.5rem;
}

/* Nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0 1.25rem;
  border-bottom: 1px solid var(--border-soft);
  margin-bottom: 1.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand-mark {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: #e2e8f0;
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.35), rgba(34, 211, 238, 0.2));
  border: 1px solid rgba(59, 130, 246, 0.35);
}

.brand-text strong {
  display: block;
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-text span {
  font-size: 0.72rem;
  color: var(--dim);
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.7);
  white-space: nowrap;
}

.badge.ok {
  border-color: rgba(52, 211, 153, 0.35);
  color: var(--emerald);
  background: rgba(16, 185, 129, 0.08);
}

.badge.bad {
  border-color: rgba(248, 113, 113, 0.35);
  color: var(--danger);
  background: rgba(248, 113, 113, 0.08);
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.error-banner {
  margin-bottom: 1rem;
  padding: 0.65rem 0.9rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(248, 113, 113, 0.35);
  background: rgba(248, 113, 113, 0.1);
  color: #fecaca;
  font-size: 0.82rem;
}

.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

/* Hero */
.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999px;
  border: 1px solid rgba(59, 130, 246, 0.25);
  background: rgba(59, 130, 246, 0.1);
  color: #93c5fd;
  padding: 0.3rem 0.75rem;
  font-size: 0.72rem;
  margin-bottom: 0.85rem;
}

.hero-pill .dot { background: var(--emerald); color: var(--emerald); box-shadow: 0 0 8px var(--emerald); }

.hero h1 {
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 700;
  line-height: 1.15;
  max-width: 28rem;
  letter-spacing: -0.03em;
}

.hero h1 em {
  font-style: normal;
  background: linear-gradient(90deg, #60a5fa, #22d3ee);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  margin-top: 0.65rem;
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 36rem;
}

.hero-meta {
  margin-top: 0.35rem;
  font-size: 0.75rem;
  color: var(--dim);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Enrichment progress (public) */
.enrich-banner {
  margin: 0 0 1rem;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(59, 130, 246, 0.25);
  background: rgba(59, 130, 246, 0.06);
}

.enrich-banner-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.enrich-label {
  display: block;
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dim);
}

.enrich-pct {
  font-size: 1.25rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--cyan);
  margin-right: 0.35rem;
}

.enrich-badge {
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  white-space: nowrap;
}

.enrich-badge.ok {
  color: var(--emerald);
  border-color: rgba(52, 211, 153, 0.35);
  background: rgba(16, 185, 129, 0.08);
}

.enrich-bar {
  height: 6px;
}

.enrich-note {
  margin-top: 0.45rem;
  font-size: 0.72rem;
  line-height: 1.35;
}

/* Stats */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 0.65rem;
  margin: 1.25rem 0 1rem;
}

.stats-public {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.stat-highlight {
  border-color: rgba(52, 211, 153, 0.3);
  background: rgba(16, 185, 129, 0.06);
}

.stat-card {
  border-radius: 0.65rem;
  border: 1px solid #1e293b;
  background: rgba(15, 23, 42, 0.4);
  padding: 0.65rem 0.75rem;
}

.stat-card .label {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dim);
}

.stat-card .value {
  margin-top: 0.2rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: #cbd5e1;
  line-height: 1.3;
}

.stat-card .big {
  font-size: 1.35rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

.stat-card .big small {
  font-size: 0.72rem;
  color: var(--dim);
  font-weight: 400;
}

/* Panels */
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
}

.panel {
  border-radius: 0.85rem;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 1.1rem 1.2rem;
  backdrop-filter: blur(8px);
}

.panel h2 {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--dim);
  margin-bottom: 0.85rem;
  font-weight: 600;
}

.gates { list-style: none; }

.gates li {
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 0.84rem;
}

.gates li:last-child { border-bottom: none; }

.gate-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

.gate-blockers {
  margin-top: 0.3rem;
  font-size: 0.72rem;
  color: var(--muted);
  line-height: 1.45;
}

.pass { color: var(--emerald); font-weight: 600; font-size: 0.75rem; }
.fail { color: var(--danger); font-weight: 600; font-size: 0.75rem; }
.warn { color: var(--amber); font-weight: 600; font-size: 0.75rem; }

.panel-full { margin-bottom: 1rem; }

.panel-count {
  color: var(--dim);
  font-weight: 400;
  margin-left: 0.35rem;
}

.table-scroll {
  overflow-x: auto;
  max-height: 320px;
  overflow-y: auto;
}

.table-scroll table { min-width: 640px; }

.link {
  color: #93c5fd;
  text-decoration: none;
  font-weight: 600;
}

.link:hover { color: var(--cyan); text-decoration: underline; }

.link-dim {
  color: var(--muted);
  text-decoration: none;
}

.link-dim:hover { color: #cbd5e1; }

.tag {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
  border: 1px solid rgba(59, 130, 246, 0.2);
}

.sm-cell {
  min-width: 9rem;
  max-width: 14rem;
}

.sm-wallet-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  align-items: center;
}

.sm-wallet-chip {
  display: inline-block;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.68rem;
  font-weight: 600;
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.22);
  text-decoration: none;
  white-space: nowrap;
}

.sm-wallet-chip:hover {
  color: #a7f3d0;
  border-color: rgba(52, 211, 153, 0.45);
}

.sm-wallet-more {
  font-size: 0.68rem;
  font-weight: 600;
}

.sm-wallet-meta {
  font-size: 0.62rem;
  margin-top: 0.15rem;
  line-height: 1.2;
}

.sm-modal-row {
  margin-bottom: 0.25rem;
}

.sm-count-label {
  font-size: 0.65rem;
  white-space: nowrap;
}

.date-cell {
  font-size: 0.72rem;
  white-space: nowrap;
  min-width: 9rem;
}

.panel-desc {
  margin: -0.35rem 0 0.85rem;
  font-size: 0.78rem;
  color: var(--dim);
}

.ticker-bar {
  display: flex;
  align-items: stretch;
  gap: 0.65rem;
  margin-bottom: 1rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(59, 130, 246, 0.25);
  background: rgba(59, 130, 246, 0.06);
  overflow: hidden;
}

.ticker-label {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 0.45rem 0.75rem;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.12);
  border-right: 1px solid rgba(59, 130, 246, 0.2);
}

.ticker-viewport {
  flex: 1;
  overflow: hidden;
  min-width: 0;
}

.ticker-track {
  display: flex;
  gap: 2rem;
  padding: 0.5rem 0;
  white-space: nowrap;
  animation: ticker-scroll 40s linear infinite;
}

.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.ticker-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan);
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.radar-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.65rem;
}

.radar-card {
  border-radius: 0.65rem;
  border: 1px solid var(--border-soft);
  background: rgba(15, 23, 42, 0.45);
  padding: 0.75rem 0.85rem;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.radar-card:hover {
  border-color: rgba(52, 211, 153, 0.35);
  transform: translateY(-1px);
}

.radar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.radar-title {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.radar-sm-count {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--emerald);
  white-space: nowrap;
}

.radar-meta {
  font-size: 0.74rem;
  color: var(--muted);
  margin-bottom: 0.45rem;
  line-height: 1.4;
}

.empty-state {
  color: var(--dim);
  font-size: 0.82rem;
  padding: 1rem 0;
}

.token-badges {
  display: inline-flex;
  gap: 0.25rem;
  margin-left: 0.25rem;
  vertical-align: middle;
}

.token-badge {
  display: inline-block;
  padding: 0.05rem 0.35rem;
  border-radius: 999px;
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1.4;
}

.badge-new {
  color: #fde68a;
  background: rgba(251, 191, 36, 0.15);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.badge-sm {
  color: #6ee7b7;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.25);
}

.badge-peak {
  color: #c4b5fd;
  background: rgba(139, 92, 246, 0.12);
  border: 1px solid rgba(139, 92, 246, 0.28);
}

.symbol-cell {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.15rem;
}

.mcap-delta {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.75rem;
  font-weight: 700;
}

.delta-up { color: var(--emerald); }
.delta-down { color: var(--danger); }

tr.row-new,
.token-card.row-new {
  animation: row-flash 2.5s ease-out;
}

@keyframes row-flash {
  0% { background: rgba(52, 211, 153, 0.18); }
  100% { background: transparent; }
}

.tokens-cards {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

.token-card {
  border: 1px solid var(--border-soft);
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.45);
  padding: 0.85rem 0.95rem;
}

.token-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.token-card-mcap {
  font-size: 0.88rem;
  margin-bottom: 0.6rem;
  line-height: 1.45;
}

.token-card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem 0.75rem;
  font-size: 0.8rem;
  margin-bottom: 0.55rem;
}

.token-card-sm {
  font-size: 0.78rem;
  margin-bottom: 0.45rem;
  line-height: 1.5;
}

.token-card-addr {
  font-size: 0.7rem;
  color: var(--dim);
  word-break: break-all;
}

.load-more-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-top: 0.85rem;
  padding-top: 0.65rem;
  border-top: 1px solid var(--border-soft);
}

.load-more-btn {
  border: 1px solid rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.1);
  color: #93c5fd;
  border-radius: 999px;
  padding: 0.45rem 1.1rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.load-more-btn:hover {
  background: rgba(59, 130, 246, 0.18);
  border-color: rgba(59, 130, 246, 0.5);
}

.load-more-btn[hidden],
.load-more-row .dim:empty { display: none; }

.ops-panel {
  margin-bottom: 1rem;
  border-radius: 0.85rem;
  border: 1px solid var(--border-soft);
  background: rgba(15, 23, 42, 0.35);
}

.ops-panel summary {
  cursor: pointer;
  padding: 0.85rem 1.1rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dim);
  list-style: none;
}

.ops-panel summary::-webkit-details-marker { display: none; }

.ops-panel summary::before {
  content: "▸ ";
  color: var(--muted);
}

.ops-panel[open] summary::before { content: "▾ "; }

.ops-body {
  padding: 0 1.1rem 1.1rem;
  border-top: 1px solid var(--border-soft);
}

.stats-ops { margin-top: 1rem; }

.empty {
  color: var(--dim);
  text-align: center;
  padding: 1rem !important;
}

.dim { color: var(--dim); }

.progress-list { display: flex; flex-direction: column; gap: 0.75rem; }

.progress-item { font-size: 0.8rem; }

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
  color: var(--muted);
}

.progress-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.8);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #3b82f6, #22d3ee);
  transition: width 0.4s ease;
}

.insight { font-size: 0.82rem; line-height: 1.55; }

.insight-row { padding: 0.2rem 0; color: var(--muted); }

.insight-section {
  margin-top: 0.65rem;
  margin-bottom: 0.25rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--dim);
  font-weight: 600;
}

.filters { margin-top: 0.5rem; padding-top: 0.5rem; border-top: 1px solid var(--border-soft); }

.table-short { max-height: 220px; }

.panel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.panel-head h2 { margin-bottom: 0; }

.filter-bar { display: flex; gap: 0.4rem; flex-wrap: wrap; }

.filter-btn {
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.5);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.25rem 0.65rem;
  font-size: 0.72rem;
  cursor: pointer;
}

.filter-btn:hover { color: var(--text); border-color: rgba(59, 130, 246, 0.35); }

.filter-btn.active {
  color: #93c5fd;
  border-color: rgba(59, 130, 246, 0.45);
  background: rgba(59, 130, 246, 0.12);
}

.copy-btn {
  border: none;
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  font-size: 0.72rem;
  padding: 0 0.15rem;
  vertical-align: middle;
}

.copy-btn:hover { color: var(--cyan); }

.theme-btn,
.refresh-btn,
.notify-btn {
  border: 1px solid rgba(59, 130, 246, 0.35);
  background: rgba(59, 130, 246, 0.12);
  color: #93c5fd;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}

.notify-btn.active {
  border-color: rgba(52, 211, 153, 0.45);
  background: rgba(16, 185, 129, 0.14);
  color: #6ee7b7;
}

.theme-btn:hover,
.refresh-btn:hover,
.notify-btn:hover {
  background: rgba(59, 130, 246, 0.2);
}

.share-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-soft);
}

.share-btn {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.35);
  color: var(--muted);
  border-radius: 999px;
  padding: 0.28rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}

html.light .share-btn {
  background: rgba(241, 245, 249, 0.9);
}

.share-btn:hover {
  color: var(--text);
  border-color: rgba(59, 130, 246, 0.4);
}

.share-btn-x {
  border-color: rgba(148, 163, 184, 0.45);
}

.share-btn-x:hover {
  border-color: rgba(226, 232, 240, 0.55);
}

.share-btn-icon {
  min-width: 2rem;
  justify-content: center;
  padding: 0.28rem 0.5rem;
  font-size: 0.95rem;
  line-height: 1;
}

.chart-wrap {
  margin: 0.35rem 0 0.75rem;
  padding: 0.65rem 0.5rem 0.35rem;
  border-radius: 0.65rem;
  border: 1px solid var(--border-soft);
  background: rgba(15, 23, 42, 0.25);
}

html.light .chart-wrap {
  background: rgba(241, 245, 249, 0.7);
}

.chart-meta {
  font-size: 0.72rem;
  margin-bottom: 0.35rem;
  padding: 0 0.25rem;
}

.chart-large {
  width: 100%;
  height: auto;
  display: block;
}

.chart-label {
  fill: var(--dim);
  font-size: 9px;
  font-family: ui-sans-serif, system-ui, sans-serif;
}

.chart-point circle {
  transition: r 0.15s ease;
}

.chart-point:hover circle {
  r: 7;
}

.chart-empty {
  font-size: 0.8rem;
  padding: 0.5rem 0;
}

.movers-carousel {
  display: flex;
  gap: 0.65rem;
  overflow-x: auto;
  padding-bottom: 0.35rem;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}

.mover-card {
  flex: 0 0 min(200px, 78vw);
  scroll-snap-align: start;
  border: 1px solid var(--border-soft);
  border-radius: 0.75rem;
  background: rgba(15, 23, 42, 0.4);
  padding: 0.8rem 0.9rem;
}

html.light .mover-card {
  background: rgba(255, 255, 255, 0.85);
}

.mover-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-bottom: 0.45rem;
}

.mover-peak {
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.2;
}

.mover-sub {
  font-size: 0.74rem;
  margin-bottom: 0.35rem;
}

.mover-status.live {
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--emerald);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.mover-gmgn {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.72rem;
}

.spark-cell { width: 4.5rem; }

.sparkline {
  display: block;
  vertical-align: middle;
}

.toast {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid rgba(52, 211, 153, 0.4);
  color: #a7f3d0;
  font-size: 0.8rem;
  font-weight: 600;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.35);
  pointer-events: none;
}

body.is-loading .stats-public .value,
body.is-loading #sm-radar,
body.is-loading #tokens,
body.is-loading #tokens-cards {
  opacity: 0.45;
}

body.is-loading .stats-public .value {
  background: linear-gradient(90deg, rgba(30,41,59,0.5) 25%, rgba(51,65,85,0.6) 50%, rgba(30,41,59,0.5) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s ease-in-out infinite;
  border-radius: 0.35rem;
  color: transparent;
  min-height: 1.5rem;
}

@keyframes shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

.refresh-btn:hover { background: rgba(59, 130, 246, 0.22); color: #bfdbfe; }

.toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}

.sort-select {
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.7);
  color: var(--muted);
  border-radius: 0.5rem;
  padding: 0.3rem 0.5rem;
  font-size: 0.72rem;
}

.bar-chart { margin-top: 0.35rem; display: flex; flex-direction: column; gap: 0.35rem; }

.bar-row {
  display: grid;
  grid-template-columns: 4.5rem 1fr 2.5rem;
  gap: 0.45rem;
  align-items: center;
  font-size: 0.72rem;
}

.bar-label { color: var(--dim); font-family: ui-monospace, monospace; font-size: 0.68rem; }

.bar-track {
  height: 7px;
  border-radius: 999px;
  background: rgba(30, 41, 59, 0.8);
  overflow: hidden;
}

.bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #6366f1, #22d3ee);
}

.bar-val { color: var(--muted); text-align: right; font-size: 0.68rem; }

.alert-banner {
  margin-bottom: 1rem;
  padding: 0.65rem 0.9rem;
  border-radius: 0.65rem;
  border: 1px solid rgba(52, 211, 153, 0.35);
  background: rgba(16, 185, 129, 0.08);
  font-size: 0.82rem;
}

.alert-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
  padding: 0.25rem 0;
}

.alert-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 10px var(--emerald);
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}

.search-input {
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.7);
  color: var(--text);
  border-radius: 0.5rem;
  padding: 0.3rem 0.55rem;
  font-size: 0.72rem;
  min-width: 120px;
}

.link-btn {
  border: none;
  background: none;
  color: #93c5fd;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  font-size: inherit;
  font-family: inherit;
}

.link-btn:hover { color: var(--cyan); text-decoration: underline; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal[hidden] { display: none; }

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.75);
  backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  width: min(480px, 100%);
  max-height: 85vh;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  padding: 1.25rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
}

.modal-close {
  position: absolute;
  top: 0.65rem;
  right: 0.75rem;
  border: none;
  background: transparent;
  color: var(--dim);
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
}

.modal-close:hover { color: var(--text); }

.modal-title { font-size: 1.25rem; margin-bottom: 0.35rem; }

.modal-addr { font-size: 0.72rem; color: var(--muted); margin-bottom: 1rem; word-break: break-all; }

.modal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}

.modal-body { font-size: 0.84rem; }

table { width: 100%; border-collapse: collapse; font-size: 0.8rem; }

th, td {
  text-align: left;
  padding: 0.5rem 0.35rem;
  border-bottom: 1px solid var(--border-soft);
}

th {
  color: var(--dim);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.74rem;
}

.cron {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.72rem;
  color: #7dd3fc;
}

.cron div {
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--border-soft);
  word-break: break-all;
}

.cron div:last-child { border-bottom: none; }

.log {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.68rem;
  line-height: 1.55;
  color: var(--muted);
  max-height: 240px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-break: break-all;
}

footer {
  margin-top: 2rem;
  text-align: center;
  font-size: 0.72rem;
  color: var(--dim);
  padding-top: 1rem;
  border-top: 1px solid var(--border-soft);
}

@media (max-width: 768px) {
  .panel-head .toolbar {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
  }

  .filter-bar { justify-content: flex-start; }

  .search-input,
  .sort-select { width: 100%; }

  .tokens-table-wrap { display: none; }

  .tokens-cards:not([hidden]) { display: flex; }
}

@media (max-width: 640px) {
  .nav { flex-wrap: wrap; }
  .stats { grid-template-columns: repeat(2, 1fr); }
}