:root {
  --bg: #061214;
  --bg-2: #08191c;
  --panel: #0b2024;
  --panel-2: #0f2a2e;
  --panel-3: #101a2b;
  --line: #1b3b42;
  --line-strong: #2d5962;
  --text: #edfdfb;
  --text-soft: #b8d5d3;
  --muted: #6f8e92;
  --accent: #00e6c7;
  --accent-2: #5ca8ff;
  --accent-3: #b379ff;
  --positive: #48f2a1;
  --danger: #ff6b7c;
  --warn: #f7c95f;
  --shadow: rgba(0, 0, 0, 0.32);
  --radius: 8px;
  --mono: "JetBrains Mono", "SFMono-Regular", Consolas, monospace;
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 15% 10%, rgba(0, 230, 199, 0.16), transparent 26rem),
    radial-gradient(circle at 86% 6%, rgba(92, 168, 255, 0.12), transparent 23rem),
    linear-gradient(135deg, #061214 0%, #08191c 44%, #0a1018 100%);
  color: var(--text);
  font-family: var(--sans);
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.032) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.82), transparent 82%);
}

button,
input {
  font: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  color: var(--accent);
}

strong {
  font-weight: 700;
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--line-strong) var(--bg-2);
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: var(--bg-2);
}

*::-webkit-scrollbar-thumb {
  background: var(--line-strong);
  border: 2px solid var(--bg-2);
  border-radius: 999px;
}

.ambient {
  position: fixed;
  inset: auto 0 0;
  height: 42vh;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(0, 230, 199, 0), rgba(0, 230, 199, 0.18), rgba(92, 168, 255, 0)),
    linear-gradient(to top, rgba(0, 0, 0, 0.54), transparent);
  opacity: 0.65;
  pointer-events: none;
}

.app-shell {
  width: min(1480px, 100%);
  min-height: 100vh;
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 14px 22px;
  border-bottom: 1px solid rgba(45, 89, 98, 0.72);
  background: rgba(6, 18, 20, 0.88);
  backdrop-filter: blur(14px);
}

.brand {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 12px;
  justify-self: start;
}

.brand-logo {
  display: block;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  overflow: hidden;
  border: 1px solid rgba(0, 230, 199, 0.68);
  border-radius: var(--radius);
  background: #071a1d;
  box-shadow: 0 0 28px rgba(0, 230, 199, 0.14);
}

.brand-logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.brand-copy {
  display: grid;
  min-width: 0;
}

.brand-title {
  overflow: hidden;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.brand-subtitle {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.navbar-ca {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 8px;
  min-width: 0;
  max-width: min(760px, 52vw);
  min-height: 36px;
  padding: 0 8px 0 12px;
  border: 1px solid rgba(45, 89, 98, 0.78);
  border-radius: var(--radius);
  background: rgba(7, 26, 29, 0.84);
}

.navbar-ca span {
  flex: 0 0 auto;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.navbar-ca a {
  min-width: 0;
  overflow: hidden;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-balance {
  justify-self: end;
}

.copy-inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 26px;
  border: 1px solid rgba(0, 230, 199, 0.38);
  border-radius: 6px;
  background: rgba(0, 230, 199, 0.07);
  color: var(--accent);
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  line-height: 1;
  padding: 0 9px;
  transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}

.copy-inline:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(0, 230, 199, 0.12);
}

.copy-button,
.mini-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  background: rgba(11, 32, 36, 0.86);
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

.copy-button,
.mini-button {
  cursor: pointer;
  transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease;
}

.copy-button {
  padding: 0 14px;
  color: var(--accent);
  border-color: rgba(0, 230, 199, 0.5);
  background: rgba(0, 230, 199, 0.08);
}

.mini-button {
  min-height: 28px;
  padding: 0 10px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.02);
}

.copy-button:hover,
.mini-button:hover {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(0, 230, 199, 0.12);
}

.dashboard {
  display: grid;
  gap: 16px;
  padding: 20px 22px 36px;
}

.market-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px);
  gap: 16px;
  align-items: stretch;
}

.market-copy,
.cycle-board,
.panel,
.stat-card {
  border: 1px solid rgba(45, 89, 98, 0.78);
  border-radius: var(--radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.035), rgba(255, 255, 255, 0)),
    rgba(11, 32, 36, 0.82);
  box-shadow: 0 18px 44px var(--shadow);
}

.market-copy {
  position: relative;
  min-height: 126px;
  overflow: hidden;
  padding: 18px 22px;
}

.market-copy::after {
  content: "";
  position: absolute;
  right: -80px;
  bottom: -150px;
  width: 330px;
  height: 250px;
  border: 1px solid rgba(0, 230, 199, 0.28);
  background:
    linear-gradient(90deg, transparent 50%, rgba(0, 230, 199, 0.09) 50%) 0 0 / 20px 20px,
    linear-gradient(rgba(92, 168, 255, 0.1), transparent);
  transform: skewX(-20deg) rotate(-4deg);
}

.eyebrow,
.section-kicker,
.metric-label,
.stat-label {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.market-copy h1 {
  position: relative;
  z-index: 1;
  max-width: 860px;
  margin: 7px 0 8px;
  color: var(--text);
  font-size: clamp(28px, 3.6vw, 46px);
  line-height: 0.95;
  letter-spacing: 0;
}

.market-copy p {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0;
  color: var(--text-soft);
  font-size: 14px;
}

.cycle-board {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  min-height: 126px;
  overflow: hidden;
}

.cycle-board > div {
  display: grid;
  align-content: center;
  gap: 10px;
  min-width: 0;
  padding: 18px;
  border-right: 1px solid rgba(45, 89, 98, 0.62);
}

.cycle-board > div:last-child {
  border-right: 0;
}

.cycle-board strong {
  overflow: hidden;
  color: var(--accent);
  font-family: var(--mono);
  font-size: clamp(22px, 2.5vw, 34px);
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hidden {
  display: none !important;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(420px, 0.85fr);
  gap: 16px;
}

.panel {
  overflow: hidden;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 72px;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(45, 89, 98, 0.66);
  background: rgba(6, 18, 20, 0.36);
}

.panel-header.compact {
  min-height: 64px;
}

.panel-header h2 {
  margin: 3px 0 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.1;
}

.panel-caption {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  text-align: right;
}

.token-panel {
  position: relative;
  min-height: 360px;
}

.token-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  padding: 22px 18px 24px;
}

.asset-lockup {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.asset-logo {
  flex: 0 0 auto;
  width: 70px;
  height: 70px;
  border: 1px solid rgba(0, 230, 199, 0.36);
  border-radius: var(--radius);
  object-fit: cover;
  box-shadow: 0 0 28px rgba(0, 230, 199, 0.12);
}

.asset-symbol {
  color: var(--accent);
  font-family: var(--mono);
  font-size: clamp(38px, 8vw, 76px);
  font-weight: 800;
  line-height: 0.92;
  text-shadow: 0 0 30px rgba(0, 230, 199, 0.24);
}

.asset-name {
  color: var(--text-soft);
  font-size: 14px;
}

.address-link,
.address-row a {
  overflow: hidden;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.address-link {
  display: block;
  max-width: 100%;
  color: var(--text);
  font-size: 13px;
  white-space: normal;
  overflow-wrap: anywhere;
}

.contract-box {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(45, 89, 98, 0.66);
  border-radius: var(--radius);
  background: rgba(5, 14, 16, 0.42);
}

.token-note {
  max-width: 680px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.address-grid {
  display: grid;
  gap: 1px;
  padding: 0 18px 18px;
}

.address-row {
  display: grid;
  grid-template-columns: 122px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 7px 0;
  border-top: 1px solid rgba(45, 89, 98, 0.48);
}

.address-row > span:first-child,
.row-note {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.address-row strong {
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 12px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.stat-card {
  position: relative;
  display: grid;
  align-content: space-between;
  min-height: 252px;
  padding: 18px;
  overflow: hidden;
}

.stat-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2), transparent);
}

.stat-card strong {
  min-width: 0;
  color: var(--text);
  font-family: var(--mono);
  font-size: clamp(24px, 4vw, 42px);
  line-height: 1.02;
}

.stat-card strong span:first-child {
  overflow-wrap: anywhere;
}

.unit {
  margin-left: 8px;
  color: var(--muted);
  font-size: 12px;
}

.stat-note {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.placeholder {
  color: var(--muted) !important;
}

.placeholder .unit {
  display: none;
}

.log-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.table-wrap {
  overflow: auto;
  max-height: 430px;
}

.table-wrap.tall {
  max-height: 560px;
}

.data-table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
}

.data-table th,
.data-table td {
  padding: 11px 16px;
  border-bottom: 1px solid rgba(45, 89, 98, 0.42);
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 12px;
  text-align: left;
  vertical-align: middle;
}

.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #091a1d;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.data-table tbody tr:hover {
  background: rgba(0, 230, 199, 0.05);
}

.data-table .amount {
  color: var(--text);
}

.data-table .rank {
  color: var(--muted);
}

.tx-link {
  color: var(--accent);
  font-family: var(--mono);
}

.empty {
  padding: 24px 16px !important;
  color: var(--muted) !important;
  text-align: center !important;
}

.search-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(240px, 360px) auto;
}

.search-box {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.search-box span {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  text-transform: uppercase;
}

.search-box input {
  width: 100%;
  min-width: 0;
  height: 36px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  outline: none;
  background: rgba(5, 14, 16, 0.9);
  color: var(--text);
  font-family: var(--mono);
  font-size: 12px;
  padding: 0 12px;
}

.search-box input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(0, 230, 199, 0.12);
}

.distribution-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 14px;
  padding: 16px;
}

.distribution-card {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  min-height: 260px;
  max-height: 460px;
  overflow: hidden;
  border: 1px solid rgba(45, 89, 98, 0.72);
  border-radius: var(--radius);
  background: rgba(6, 18, 20, 0.54);
}

.distribution-card.match {
  border-color: rgba(0, 230, 199, 0.9);
  box-shadow: 0 0 0 1px rgba(0, 230, 199, 0.25);
}

.distribution-card.dim {
  opacity: 0.34;
}

.distribution-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(45, 89, 98, 0.48);
  background: rgba(16, 26, 43, 0.45);
}

.distribution-head time {
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.distribution-total {
  overflow: hidden;
  color: var(--accent);
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.distribution-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 9px 14px;
  border-bottom: 1px solid rgba(45, 89, 98, 0.42);
}

.chip {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border: 1px solid rgba(45, 89, 98, 0.7);
  border-radius: 999px;
  padding: 0 9px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  background: rgba(255, 255, 255, 0.02);
}

.chip-simulated {
  color: var(--warn);
  border-color: rgba(247, 201, 95, 0.42);
  background: rgba(247, 201, 95, 0.08);
}

.chip-running,
.chip-test {
  color: var(--accent);
  border-color: rgba(0, 230, 199, 0.42);
  background: rgba(0, 230, 199, 0.08);
}

.chip-partial {
  color: var(--warn);
  border-color: rgba(247, 201, 95, 0.42);
  background: rgba(247, 201, 95, 0.08);
}

.chip-failed {
  color: var(--danger);
  border-color: rgba(255, 97, 97, 0.42);
  background: rgba(255, 97, 97, 0.08);
}

.distribution-body {
  overflow: auto;
  padding: 12px 14px;
}

.batch {
  display: grid;
  gap: 6px;
  padding: 0 0 12px 12px;
  border-left: 2px solid rgba(45, 89, 98, 0.72);
}

.batch + .batch {
  margin-top: 10px;
}

.batch-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

.batch-header.failed {
  color: var(--danger);
}

.batch-header.pending,
.batch-header.running {
  color: var(--accent);
}

.batch-header.simulated {
  color: var(--warn);
}

.recipient {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 24px;
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 11px;
}

.recipient .wallet {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recipient .amt {
  color: var(--text);
}

.recipient.match {
  margin-left: -5px;
  padding: 0 5px;
  border-radius: 4px;
  background: rgba(0, 230, 199, 0.12);
}

mark.hl {
  border-radius: 3px;
  background: var(--accent);
  color: #041013;
  padding: 0 2px;
}

.empty-state {
  grid-column: 1 / -1;
  min-height: 180px;
  display: grid;
  place-items: center;
  border: 1px dashed rgba(45, 89, 98, 0.72);
  border-radius: var(--radius);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 2px 0;
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
}

@media (max-width: 1180px) {
  .market-strip,
  .overview-grid {
    grid-template-columns: 1fr;
  }

  .stat-card {
    min-height: 190px;
  }
}

@media (max-width: 820px) {
  .topbar {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .brand,
  .navbar-ca,
  .topbar-balance {
    justify-self: stretch;
  }

  .navbar-ca {
    max-width: none;
  }

  .dashboard {
    padding: 16px 14px 28px;
  }

  .stats-grid,
  .log-grid {
    grid-template-columns: 1fr;
  }

  .market-copy {
    min-height: 0;
    padding: 20px;
  }

  .search-header {
    grid-template-columns: 1fr;
  }

  .panel-caption {
    text-align: left;
  }
}

@media (max-width: 560px) {
  .brand-title {
    max-width: 230px;
  }

  .brand-logo {
    width: 38px;
    height: 38px;
  }

  .navbar-ca {
    padding-left: 10px;
  }

  .market-copy h1 {
    font-size: 32px;
  }

  .asset-lockup {
    align-items: flex-start;
    flex-direction: column;
  }

  .address-row {
    grid-template-columns: 1fr auto;
  }

  .address-row > span:first-child {
    grid-column: 1 / -1;
  }

  .row-note {
    display: none;
  }

  .distribution-grid {
    grid-template-columns: 1fr;
    padding: 12px;
  }

  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .copy-button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}
