/* ============================================================
   NEXUS SOLANA P2P — Style
   ============================================================ */

:root {
  --bg: #05070a;
  --panel: #0a0e14;
  --panel-2: #0d121b;
  --border: #16202c;
  --border-hi: #1f2e3d;
  --text: #c8d3dd;
  --text-dim: #5e7183;
  --text-mute: #3a4a5a;
  --green: #00ff9d;
  --red: #ff3860;
  --amber: #ffb020;
  --cyan: #00e5ff;
  --purple: #a06bff;
  --grid: #0e1620;
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: 'JetBrains Mono', 'SF Mono', 'Menlo', 'Consolas', monospace;
  font-size: 13px;
  min-height: 100%;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: '';
  position: fixed; inset: 0;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(153,69,255,0.10), transparent 45%),
    radial-gradient(ellipse at 80% 90%, rgba(0,229,255,0.05), transparent 45%),
    linear-gradient(180deg, #05070a, #04060a 100%);
  z-index: -2;
}

body::after {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 40px 40px;
  opacity: .25;
  z-index: -1;
  pointer-events: none;
}

/* ---------- Scanline ---------- */
.scanline {
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--purple), transparent);
  opacity: .18;
  animation: scan 6s linear infinite;
  z-index: 100;
  pointer-events: none;
}
@keyframes scan {
  0%   { transform: translateY(0); }
  100% { transform: translateY(100vh); }
}

/* ---------- Topbar ---------- */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(6, 9, 13, 0.85);
  backdrop-filter: blur(8px);
  position: sticky; top: 0;
  z-index: 50;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.brand .logo {
  color: var(--purple);
  font-size: 22px;
  text-shadow: 0 0 12px rgba(153,69,255,0.7);
  animation: pulse 3s ease-in-out infinite;
}
.brand .name {
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 3px;
  color: #eaf2f8;
}
.brand .sub {
  color: var(--text-mute);
  font-size: 11px;
  letter-spacing: 1px;
}
.status {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 1px;
}
.status .dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px var(--green);
}
.status .pulse { animation: pulse 1.8s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.status .sep   { color: var(--text-mute); }
.status .node  { color: var(--purple); }
.status .clock { color: var(--cyan); min-width: 70px; text-align: right; }

/* ---------- Grid ---------- */
.grid {
  display: grid;
  grid-template-columns: 280px 1fr 320px;
  grid-template-areas:
    "wallet    chart     market"
    "positions positions positions"
    "wallets   wallets   wallets"
    "celi      celi      celi"
    "history   history   history";
  gap: 14px;
  padding: 16px;
  max-width: 1800px;
  margin: 0 auto;
}
.panel {
  background: linear-gradient(180deg, var(--panel), var(--panel-2));
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 16px;
  position: relative;
}
.panel::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(153,69,255,0.4), transparent);
}
.panel h2 {
  font-size: 11px;
  letter-spacing: 2px;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 14px;
  text-transform: uppercase;
}
.panel h3 {
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--text-mute);
  margin: 18px 0 10px;
  text-transform: uppercase;
}
.wallet         { grid-area: wallet; }
.chart-panel    { grid-area: chart;  min-width: 0; }
.market         { grid-area: market; }
.positions      { grid-area: positions; }
.wallets-ledger { grid-area: wallets; grid-column: 1 / -1; width: 100%; }
.celi-ai        { grid-area: celi;    grid-column: 1 / -1; width: 100%; }
.history        { grid-area: history; }

/* ---------- WALLET ---------- */
.balance-block { margin-bottom: 16px; }
.balance-block .label {
  font-size: 10px;
  color: var(--text-mute);
  letter-spacing: 1px;
}
.balance {
  font-size: 26px;
  font-weight: 700;
  color: var(--green);
  text-shadow: 0 0 12px rgba(0,255,157,0.35);
  margin: 4px 0 2px;
  letter-spacing: 1px;
}
.sub-balance {
  font-size: 10px;
  color: var(--text-dim);
}
.equity-block {
  border-top: 1px dashed var(--border);
  border-bottom: 1px dashed var(--border);
  padding: 10px 0;
  margin-bottom: 6px;
}
.equity-block .row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  padding: 3px 0;
  color: var(--text-dim);
}
.equity-block .row b {
  color: var(--text);
  font-weight: 600;
}
.pos { color: var(--green) !important; }
.neg { color: var(--red) !important; }

.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.metric {
  background: rgba(153,69,255,0.05);
  border: 1px solid var(--border);
  padding: 8px 10px;
  border-radius: 3px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.metric span {
  font-size: 9px;
  color: var(--text-mute);
  letter-spacing: 1px;
}
.metric b {
  font-size: 14px;
  color: var(--text);
}
.session .kv {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  padding: 4px 0;
  color: var(--text-dim);
}
.session .kv b {
  color: var(--cyan);
  font-weight: 500;
}

/* ---------- CHART ---------- */
.chart-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
  gap: 12px;
}
.pair-info {
  display: flex;
  align-items: center;
  gap: 12px;
}
.pair-logo {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: #111;
  object-fit: cover;
  border: 1px solid var(--border-hi);
}
.pair-text {
  display: flex;
  flex-direction: column;
}
.pair-name {
  font-size: 15px;
  font-weight: 700;
  color: #eaf2f8;
  letter-spacing: 1px;
}
.pair-fullname {
  font-size: 10px;
  color: var(--text-mute);
  letter-spacing: .5px;
}
.pair-price {
  font-size: 22px;
  font-weight: 700;
  color: var(--cyan);
  margin-left: 12px;
}
.pair-change { font-size: 12px; }
.chart-tf { display: flex; gap: 4px; }
.tf {
  background: transparent;
  border: 1px solid var(--border-hi);
  color: var(--text-dim);
  padding: 4px 10px;
  font-size: 10px;
  border-radius: 3px;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 1px;
}
.tf:hover   { color: var(--text); border-color: var(--purple); }
.tf.active  { background: rgba(153,69,255,0.12); color: var(--purple); border-color: var(--purple); }
#chart {
  width: 100%;
  display: block;
  border-radius: 3px;
  background: rgba(0,0,0,0.25);
}
.chart-foot {
  display: flex;
  gap: 20px;
  margin-top: 10px;
  font-size: 10px;
  color: var(--text-mute);
  letter-spacing: 1px;
}
.chart-foot b { color: var(--text); }

/* ---------- MARKET ---------- */
.search { margin-bottom: 10px; }
.search input {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 8px 10px;
  font-family: inherit;
  font-size: 11px;
  border-radius: 3px;
  outline: none;
  letter-spacing: 1px;
}
.search input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 2px rgba(153,69,255,0.12);
}
.pairs {
  max-height: 480px;
  overflow-y: auto;
}
.pairs::-webkit-scrollbar { width: 4px; }
.pairs::-webkit-scrollbar-thumb {
  background: var(--border-hi);
  border-radius: 2px;
}
.pair-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 8px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background .15s;
}
.pair-row:hover  { background: rgba(153,69,255,0.06); }
.pair-row.active { background: rgba(153,69,255,0.10); border-left: 2px solid var(--purple); }
.pr-logo {
  width: 28px; height: 28px;
  flex-shrink: 0;
  position: relative;
}
.pr-logo img {
  width: 100%; height: 100%;
  border-radius: 50%;
  object-fit: cover;
  background: #111;
  border: 1px solid var(--border-hi);
}
.pr-logo-fb {
  width: 100%; height: 100%;
  border-radius: 50%;
  background: linear-gradient(135deg, #9945FF, #14F195);
  color: #05070a;
  font-weight: 700;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.pr-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.pr-sym {
  font-size: 12px;
  color: var(--text);
  font-weight: 600;
}
.pr-name {
  font-size: 9px;
  color: var(--text-mute);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pr-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.pr-price { font-size: 12px; color: var(--text); }
.pr-chg   { font-size: 10px; }

/* ---------- POSITIONS ---------- */
.badge {
  display: inline-block;
  background: rgba(153,69,255,0.20);
  color: var(--purple);
  padding: 1px 7px;
  border-radius: 10px;
  font-size: 10px;
  margin-left: 6px;
}
.pos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 10px;
}
.pos-card {
  background: linear-gradient(180deg, rgba(153,69,255,0.05), rgba(0,0,0,0.15));
  border: 1px solid var(--border-hi);
  border-radius: 4px;
  padding: 12px;
  position: relative;
  overflow: hidden;
}
.pos-card::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0;
  height: 2px;
  background: var(--purple);
  width: var(--progress, 0%);
  transition: width .4s;
  box-shadow: 0 0 8px var(--purple);
}
.pos-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.pos-head .p-logo {
  width: 26px; height: 26px;
  border-radius: 50%;
  object-fit: cover;
  background: #111;
  border: 1px solid var(--border-hi);
}
.pos-head .p-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.pos-head .p-pair {
  font-weight: 700;
  color: #eaf2f8;
  letter-spacing: 1px;
  font-size: 12px;
}
.pos-head .p-name {
  font-size: 9px;
  color: var(--text-mute);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pos-head .p-id {
  font-size: 9px;
  color: var(--text-mute);
}
.pos-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px 12px;
  font-size: 11px;
}
.pos-body div {
  display: flex;
  justify-content: space-between;
  color: var(--text-dim);
}
.pos-body div b { color: var(--text); }
.pos-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--border);
  font-size: 10px;
  color: var(--text-mute);
}
.pos-foot .timer  { color: var(--amber); font-weight: 600; }
.pos-foot .target { color: var(--green); }
.empty {
  color: var(--text-mute);
  font-size: 11px;
  padding: 12px;
  text-align: center;
  grid-column: 1 / -1;
}

/* ---------- TRACKED WALLETS (wal.wal) ---------- */
.wallets-ledger {
  grid-area: wallets;
  grid-column: 1 / -1;
  width: 100%;
}

.wallets-ledger .wl-totals {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}

.wallets-ledger .wl-tot {
  background: rgba(0,229,255,0.04);
  border: 1px solid var(--border);
  border-radius: 3px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.wallets-ledger .wl-tot span {
  font-size: 10px;
  color: var(--text-mute);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.wallets-ledger .wl-tot b {
  font-size: 16px;
  color: var(--text);
  font-weight: 700;
}

/* ====== 7 colunas: Carteira | Enviado | Faturado | Recebido | PnL | % | Status ====== */
.wallets-ledger .wl-head,
.wallets-ledger .wl-row {
  display: grid;
  grid-template-columns: 2.2fr 1fr 1fr 1fr 1fr .7fr 1.4fr;
  gap: 14px;
  align-items: center;
  font-size: 12px;
}

.wallets-ledger .wl-head {
  color: var(--text-mute);
  font-size: 10px;
  letter-spacing: 1.5px;
  padding: 0 12px 10px;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
}

.wallets-ledger .wl-head span {
  text-align: right;
}
.wallets-ledger .wl-head span:first-child {
  text-align: left;
}
.wallets-ledger .wl-head span:last-child {
  text-align: center;
}

.wallets-ledger .wl-list {
  max-height: 380px;
  overflow-y: auto;
}

.wallets-ledger .wl-list::-webkit-scrollbar { width: 5px; }
.wallets-ledger .wl-list::-webkit-scrollbar-thumb {
  background: var(--border-hi);
  border-radius: 3px;
}

.wallets-ledger .wl-row {
  padding: 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
  transition: background .15s;
}

.wallets-ledger .wl-row:hover {
  background: rgba(0,229,255,0.05);
}

.wallets-ledger .wl-addr {
  color: var(--cyan);
  font-weight: 600;
  letter-spacing: .5px;
  cursor: help;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: left;
  min-width: 0;
}

.wallets-ledger .wl-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.wallets-ledger .wl-status {
  text-align: center;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  padding: 4px 8px;
  border-radius: 3px;
  border: 1px solid transparent;
  white-space: nowrap;
  justify-self: center;
  min-width: 110px;
}
.wallets-ledger .wl-status.st-active {
  color: var(--amber);
  background: rgba(255,176,32,0.10);
  border-color: rgba(255,176,32,0.35);
}
.wallets-ledger .wl-status.st-done {
  color: var(--green);
  background: rgba(0,255,157,0.10);
  border-color: rgba(0,255,157,0.35);
  text-shadow: 0 0 8px rgba(0,255,157,0.35);
}

.wallets-ledger .wl-row .pos { color: var(--green); font-weight: 600; }
.wallets-ledger .wl-row .neg { color: var(--red);   font-weight: 600; }

/* ---------- HISTORY ---------- */
.hist-head,
.hist-list .hrow {
  display: grid;
  grid-template-columns: 1.1fr 1.2fr 1fr 1fr 1fr .7fr 1.2fr;
  gap: 8px;
  font-size: 11px;
}
.hist-head {
  color: var(--text-mute);
  font-size: 10px;
  letter-spacing: 1px;
  padding: 0 8px 8px;
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
}
.hist-list {
  max-height: 320px;
  overflow-y: auto;
}
.hist-list::-webkit-scrollbar { width: 4px; }
.hist-list::-webkit-scrollbar-thumb { background: var(--border-hi); }

.hrow {
  padding: 9px 8px;
  border-bottom: 1px solid var(--border);
  color: var(--text-dim);
  align-items: center;
  animation: slideIn .3s ease;
}
.hrow b { color: var(--text); font-weight: 500; }
.hrow .pos { color: var(--green); font-weight: 600; }
.hrow .neg { color: var(--red);   font-weight: 600; }
.hrow .h-pair {
  display: flex;
  align-items: center;
  gap: 6px;
}
.hrow .h-logo {
  width: 18px; height: 18px;
  border-radius: 50%;
  object-fit: cover;
  background: #111;
}
@keyframes slideIn {
  from { opacity: 0; transform: translateX(-8px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ---------- Footer ---------- */
.footer {
  display: flex;
  justify-content: space-between;
  padding: 14px 24px;
  border-top: 1px solid var(--border);
  font-size: 10px;
  color: var(--text-mute);
  letter-spacing: 1px;
}

/* ---------- Responsivo ---------- */
@media (max-width: 1100px) {
  .grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      "wallet"
      "chart"
      "market"
      "positions"
      "wallets"
      "celi"
      "history";
  }
  .topbar {
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
  }
  .hist-head,
  .hist-list .hrow {
    grid-template-columns: 1fr 1fr 1fr;
  }
  .hist-head span:nth-child(n+4):not(:nth-child(5)) { display: none; }

  .wallets-ledger .wl-totals { grid-template-columns: 1fr 1fr; }
  .wallets-ledger .wl-head,
  .wallets-ledger .wl-row {
    grid-template-columns: 1.8fr 1fr 1fr 1fr 1fr;
    gap: 10px;
  }
  /* esconde Recebido (4) e % (6) no mobile */
  .wallets-ledger .wl-head span:nth-child(4),
  .wallets-ledger .wl-row  span:nth-child(4),
  .wallets-ledger .wl-head span:nth-child(6),
  .wallets-ledger .wl-row  span:nth-child(6) {
    display: none;
  }
}

.wl-row.wl-error,
.wl-row.wl-error .wl-num,
.wl-row.wl-error .wl-addr { color: #777 !important; opacity: .55; }
.wl-status.st-error { background: #444; color: #aaa; }

/* ===== CONTRATOS (cont.cr) — mesmo padrão de .pair-row ===== */
.cont-list-wrap {
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.cont-list-wrap h3 {
  margin: 0 0 8px 0;
  font-size: 12px;
  letter-spacing: 1px;
  color: #9aa4b2;
  text-transform: uppercase;
}

.cont-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cont-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 6px;
  border-radius: 6px;
  background: transparent;
  font-size: 13px;
  overflow: hidden;
}

.cont-row:hover {
  background: rgba(255,255,255,0.03);
}

.cont-logo {
  width: 28px !important;
  height: 28px !important;
  min-width: 28px !important;
  min-height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,0.05);
}

.cont-logo img {
  width: 28px !important;
  height: 28px !important;
  max-width: 28px !important;
  max-height: 28px !important;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.cont-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cont-addr {
  color: #6ee7b7;
  font-family: monospace;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cont-pair {
  color: #e5e7eb;
  font-weight: 600;
  font-size: 13px;
}

.cont-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  flex-shrink: 0;
}

.cont-price {
  color: #e5e7eb;
  font-size: 13px;
  font-weight: 600;
}

.cont-chg {
  font-size: 12px;
  font-weight: 600;
}

.cont-chg.pos { color: #22c55e; }
.cont-chg.neg { color: #ef4444; }

/* ===== ALAVANCADAS PELO BOT DA CELI AI ===== */
.celi-ai {
  grid-area: celi;
  grid-column: 1 / -1;
  width: 100%;
}

.celi-ai .celi-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  width: 100%;
}

.celi-card {
  display: flex;
  align-items: stretch;
  gap: 18px;
  padding: 16px;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(153,69,255,0.05), rgba(0,0,0,0.15));
  border: 1px solid var(--border-hi);
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
  min-width: 0;
}

.celi-card:hover {
  background: linear-gradient(180deg, rgba(153,69,255,0.09), rgba(0,0,0,0.2));
  border-color: var(--purple);
  transform: translateY(-2px);
}

/* Imagem clicável — aumenta e ganha zoom no hover */
.celi-img {
  flex-shrink: 0;
  width: 220px;
  height: 220px;
  border-radius: 6px;
  overflow: hidden;
  background: #111;
  border: 1px solid var(--border-hi);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: zoom-in;
  position: relative;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.celi-img:hover {
  border-color: var(--purple);
  box-shadow: 0 0 0 1px rgba(153,69,255,0.45), 0 0 20px rgba(153,69,255,0.25);
}

.celi-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}

.celi-img:hover img {
  transform: scale(1.06);
}

/* Ícone de lupa no canto da imagem */
.celi-img::after {
  content: '⤢';
  position: absolute;
  top: 8px;
  right: 8px;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  background: rgba(5,7,10,0.75);
  border: 1px solid rgba(153,69,255,0.5);
  color: var(--purple);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}

.celi-img:hover::after {
  opacity: 1;
}

.celi-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: space-between;
}

.celi-sym {
  font-size: 16px;
  font-weight: 700;
  color: var(--purple);
  letter-spacing: 2px;
  text-transform: uppercase;
  text-shadow: 0 0 10px rgba(153,69,255,0.35);
}

.celi-desc {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text);
}

.celi-desc b {
  color: #eaf2f8;
  font-weight: 700;
}

.celi-desc b.pos {
  color: var(--green) !important;
  text-shadow: 0 0 8px rgba(0,255,157,0.35);
}

.celi-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-top: 6px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.celi-stats > div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.celi-stats span {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-mute);
}

.celi-stats b {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.celi-stats b.pos {
  color: var(--green) !important;
  text-shadow: 0 0 8px rgba(0,255,157,0.35);
}

/* ---------- Lightbox (caixa suspensa da imagem) ---------- */
.celi-lightbox {
  position: fixed;
  inset: 0;
  background: rgba(3, 5, 8, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 24px;
  animation: celiFade .2s ease;
}

.celi-lightbox.open {
  display: flex;
}

@keyframes celiFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.celi-lightbox-inner {
  position: relative;
  max-width: min(92vw, 1100px);
  max-height: 92vh;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--border-hi);
  background: #0a0e14;
  box-shadow:
    0 0 0 1px rgba(153,69,255,0.35),
    0 0 60px rgba(153,69,255,0.25),
    0 20px 60px rgba(0,0,0,0.7);
  animation: celiZoom .25s cubic-bezier(.2,.9,.3,1.1);
}

@keyframes celiZoom {
  from { transform: scale(.85); opacity: 0; }
  to   { transform: scale(1);   opacity: 1; }
}

.celi-lightbox-inner img {
  display: block;
  max-width: 100%;
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
}

.celi-lightbox-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 4px;
  border: 1px solid rgba(153,69,255,0.5);
  background: rgba(5,7,10,0.85);
  color: var(--purple);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, color .15s ease;
}

.celi-lightbox-close:hover {
  background: rgba(153,69,255,0.2);
  color: #fff;
}

/* ---------- Responsivo CELI AI ---------- */
@media (max-width: 1200px) {
  .celi-img { width: 180px; height: 180px; }
}

@media (max-width: 900px) {
  .celi-ai .celi-grid { grid-template-columns: 1fr; }
  .celi-img { width: 140px; height: 140px; }
  .celi-lightbox { padding: 12px; }
}

.cont-pair,
.cont-addr {
  text-decoration: none;
}
.cont-pair:hover,
.cont-addr:hover {
  text-decoration: underline;
}

.celi-contract-img {
  display: flex;
  justify-content: center;
  padding: 0 0 12px;
  cursor: pointer;
}
.celi-contract-img img {
  width: 29px;   /* 60% menor que 72px */
  height: 29px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid #00e0a4;
  box-shadow: 0 0 6px rgba(0, 224, 164, 0.3);
  transition: transform 0.2s ease;
}
.celi-contract-img img:hover {
  transform: scale(1.1);
}