/* ============================================================
   NemesisPay · Aurora UI — camada de tema 2026
   Carregada depois de app.css / admin.css / auth.css.
   Reskin global via variáveis + refinos de superfície.
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600;700;800&display=swap');

:root {
  /* base — deep space */
  --bg-0: #04060d;
  --bg-1: #080b16;
  --bg-2: #0c1120;
  --bg-3: #131a2e;
  --bg-glass: rgba(9, 13, 24, 0.82);
  --bg-card: rgba(13, 18, 33, 0.66);

  /* accents — crimson × amber × aurora */
  --red: #ff3d5e;
  --red-hot: #ff6b85;
  --red-dim: rgba(255, 61, 94, 0.16);
  --gold: #f5b942;
  --gold-bright: #ffd479;
  --gold-dim: rgba(245, 185, 66, 0.14);
  --violet: #7c6cff;
  --cyan: #38e0d0;
  --green: #3ddc97;
  --yellow: #ffc24b;
  --danger: #ff4d6d;

  --border: rgba(140, 152, 255, 0.14);
  --border-strong: rgba(245, 185, 66, 0.45);

  --text: #eef1fb;
  --text-muted: #9aa3bf;
  --text-dim: #646e8c;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow-glow: 0 0 60px rgba(255, 61, 94, 0.10);
  --font-display: 'Space Grotesk', 'Oxanium', sans-serif;
  --font-body: 'Inter', 'Rajdhani', sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);

  /* auth skin vars */
  --nx-black: #04060d;
  --nx-red: #ff3d5e;
  --nx-red-hot: #ff6b85;
  --nx-gold: #f5b942;
  --nx-gold-bright: #ffd479;
  --nx-text: #eef1fb;
  --nx-muted: #9aa3bf;
  --nx-line: rgba(245, 185, 66, 0.35);
  --nx-font: 'Space Grotesk', sans-serif;
  --nx-body: 'Inter', sans-serif;

  /* gradientes de marca */
  --grad-brand: linear-gradient(120deg, #ff3d5e 0%, #ff7a45 55%, #f5b942 100%);
  --grad-gold: linear-gradient(120deg, #f5b942, #ffd479);
  --grad-panel: linear-gradient(160deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.012));
  --grad-line: linear-gradient(90deg, transparent, rgba(255, 61, 94, .65), rgba(245, 185, 66, .65), transparent);
}

/* ---------- base ---------- */
html { scrollbar-color: var(--red) #05070f; }
body {
  font-size: 15px;
  letter-spacing: .005em;
}
body.app-shell {
  background: var(--bg-0);
  background-attachment: fixed;
}
/* ambient aurora — atrás de todo o app */
body.app-shell::before,
body.admin-shell::before,
body.nx-auth::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(52rem 34rem at 88% -12%, rgba(124, 108, 255, 0.16), transparent 62%),
    radial-gradient(46rem 30rem at -10% 22%, rgba(255, 61, 94, 0.13), transparent 60%),
    radial-gradient(40rem 26rem at 55% 115%, rgba(245, 185, 66, 0.08), transparent 60%),
    linear-gradient(180deg, #04060d 0%, #05070f 100%);
}
/* sutil textura em cima do fundo */
body.app-shell::after,
body.admin-shell::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: .5;
  background-image:
    linear-gradient(rgba(140, 152, 255, .035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(140, 152, 255, .035) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(80% 70% at 50% 0%, #000 30%, transparent 100%);
}

*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, var(--red-hot), #b3122f);
  box-shadow: 0 0 10px rgba(255, 61, 94, .5);
}
*::-webkit-scrollbar-track { background: #05070f; }

/* ---------- tipografia / cabeçalhos ---------- */
h1, h2, h3, .card-title, strong, b { letter-spacing: -.01em; }
.page-head h1, .admin-hero h1, .admin-page-head h1 {
  font-family: var(--font-display);
  font-weight: 700;
  background: linear-gradient(100deg, #fff 30%, #ffd479 90%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.page-head p, .admin-hero p, .admin-page-head p { color: var(--text-muted); }

/* ---------- superfícies ---------- */
.card,
.admin-panel,
.admin-kpi,
.admin-route-card,
.nx-telemetry__chart,
.nx-metrics,
.nx-radar,
.nx-vault,
.nx-flow,
.table-wrap,
.nx-fee-console,
.qr-preview {
  position: relative;
  background: var(--grad-panel), var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 18px 44px -22px rgba(0, 0, 0, 0.75);
  transition: transform .25s var(--ease), border-color .25s var(--ease), box-shadow .25s var(--ease);
}
.card:hover, .admin-panel:hover, .admin-kpi:hover, .admin-route-card:hover {
  border-color: rgba(140, 152, 255, .26);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.05) inset,
    0 22px 50px -22px rgba(0, 0, 0, 0.85),
    0 0 0 1px rgba(124, 108, 255, .06);
}

/* linha luminosa no topo dos cards principais */
.admin-kpi::before, .admin-panel::before, .card::before {
  content: '';
  position: absolute;
  inset: 0 14% auto 14%;
  height: 1px;
  background: var(--grad-line);
  opacity: .55;
  pointer-events: none;
}

/* ---------- KPIs ---------- */
.admin-kpi {
  overflow: hidden;
  padding-top: 20px;
}
.admin-kpi span { letter-spacing: .14em; color: var(--text-dim); }
.admin-kpi strong {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
  letter-spacing: -.02em;
}
.admin-kpi--profit strong, .admin-kpi strong.gold, b.gold {
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.admin-kpi--white { border-color: rgba(56, 224, 208, .28); }
.admin-kpi--white strong { color: var(--cyan); }
.admin-kpi i {
  position: absolute;
  inset: auto -30% -55% auto;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 61, 94, .14), transparent 70%);
  pointer-events: none;
}
.admin-note { display: block; color: var(--text-dim); font-size: .68rem; font-weight: 400; }

/* ---------- botões ---------- */
.btn, .nx-btn, button[type="submit"].admin-route-config__save,
.admin-action, .admin-filter__link {
  border-radius: var(--radius-sm);
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: .02em;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), filter .2s var(--ease);
}
.btn:hover, .nx-btn:hover, .admin-action:hover { transform: translateY(-1px); }
.btn:active, .nx-btn:active { transform: translateY(0); }

.btn-primary, .nx-btn {
  background: var(--grad-brand);
  border: none;
  color: #fff;
  box-shadow: 0 10px 26px -10px rgba(255, 61, 94, .55), 0 0 0 1px rgba(255, 255, 255, .06) inset;
}
.btn-primary:hover, .nx-btn:hover {
  filter: brightness(1.08);
  box-shadow: 0 14px 32px -10px rgba(255, 61, 94, .65);
}
.btn-gold, .nx-btn--gold {
  background: var(--grad-gold);
  border: none;
  color: #1b1305;
  font-weight: 700;
  box-shadow: 0 10px 26px -12px rgba(245, 185, 66, .5);
}
.btn-ghost {
  background: rgba(140, 152, 255, .07);
  border: 1px solid var(--border);
  color: var(--text);
}
.btn-ghost:hover { border-color: rgba(140, 152, 255, .3); background: rgba(140, 152, 255, .12); }
.btn-danger { border-radius: var(--radius-sm); }

/* ---------- inputs ---------- */
.field input, .field select, .field textarea,
.nx-input input, .admin-route-config input, .admin-route-config select,
.search-box input, .admin-filter select,
input[type="text"], input[type="email"], input[type="password"],
input[type="search"], input[type="number"], select, textarea {
  border-radius: var(--radius-sm);
}
.field input:focus, .field select:focus, .field textarea:focus,
.nx-input:focus-within, input:focus, select:focus, textarea:focus {
  border-color: rgba(124, 108, 255, .55) !important;
  box-shadow: 0 0 0 3px rgba(124, 108, 255, .16), 0 0 24px -8px rgba(124, 108, 255, .35);
  outline: none;
}

/* ---------- sidebar cliente ---------- */
.sidebar {
  background: rgba(6, 8, 15, .82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-right: 1px solid rgba(140, 152, 255, .1);
}
.sidebar-brand strong {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: .12em;
}
.nav-item {
  border-radius: var(--radius-sm);
  transition: background .2s var(--ease), color .2s var(--ease), padding .2s var(--ease);
}
.nav-item:hover { background: rgba(140, 152, 255, .07); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(255, 61, 94, .18), rgba(245, 185, 66, .08));
  color: #fff;
  box-shadow: inset 2px 0 0 var(--red);
}
.nav-sub a { border-radius: 10px; }
.nav-sub a.active, .nav-sub a:hover { color: #fff; background: rgba(140, 152, 255, .08); }

/* ---------- topbar ---------- */
.topbar, .admin-topbar {
  background: rgba(5, 7, 13, .72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(140, 152, 255, .1);
}
.progress-chip, .nx-account-chip, .nx-pill {
  border: 1px solid var(--border);
  background: rgba(140, 152, 255, .06);
  border-radius: 999px;
}
.progress-fill {
  background: var(--grad-brand);
  box-shadow: 0 0 14px rgba(255, 61, 94, .6);
  border-radius: 999px;
}
.avatar {
  background: var(--grad-brand);
  box-shadow: 0 6px 18px -6px rgba(255, 61, 94, .6);
}
.avatar__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: inherit;
  display: block;
}
.icon-btn:hover { background: rgba(140, 152, 255, .1); }
.nx-notify__panel {
  background: rgba(9, 13, 24, .96);
  backdrop-filter: blur(18px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .9);
}
.nx-notify__item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(140, 152, 255, .08);
  background: rgba(140, 152, 255, .04);
}
.nx-notify__item + .nx-notify__item { margin-top: 8px; }
.nx-notify__item > div { display: grid; gap: 2px; min-width: 0; }
.nx-notify__icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  color: var(--violet);
  background: rgba(124, 108, 255, .12);
  border: 1px solid rgba(124, 108, 255, .28);
}
.nx-notify__item--success .nx-notify__icon {
  color: var(--green);
  background: rgba(61, 220, 151, .12);
  border-color: rgba(61, 220, 151, .3);
}
.nx-notify__item--warning .nx-notify__icon {
  color: var(--yellow);
  background: rgba(255, 194, 75, .12);
  border-color: rgba(255, 194, 75, .3);
}
.nx-notify__item--error .nx-notify__icon {
  color: var(--danger);
  background: rgba(255, 77, 109, .12);
  border-color: rgba(255, 77, 109, .3);
}

/* ---------- badges / status ---------- */
.badge, .admin-status {
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: .08em;
}
.badge-green, .admin-status--active, .admin-status--completed, .admin-status--approved {
  background: rgba(61, 220, 151, .14) !important;
  color: var(--green) !important;
  border: 1px solid rgba(61, 220, 151, .3);
}
.badge-yellow, .admin-status--pending, .admin-status--pending_review, .admin-status--processing {
  background: rgba(255, 194, 75, .13) !important;
  color: var(--yellow) !important;
  border: 1px solid rgba(255, 194, 75, .3);
}
.admin-status--failed, .admin-status--rejected, .admin-status--inactive, .badge-red {
  background: rgba(255, 77, 109, .13) !important;
  color: var(--danger) !important;
  border: 1px solid rgba(255, 77, 109, .3);
}
.admin-status--maintenance {
  background: rgba(124, 108, 255, .14) !important;
  color: var(--violet) !important;
  border: 1px solid rgba(124, 108, 255, .32);
}

/* ---------- tabelas ---------- */
.table-wrap, .admin-table-wrap { overflow: hidden; }
table.data thead th, .admin-table thead th {
  font-family: var(--font-display);
  font-size: .62rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: rgba(140, 152, 255, .05);
}
table.data tbody tr, .admin-table tbody tr {
  transition: background .18s var(--ease);
}
table.data tbody tr:hover, .admin-table tbody tr:hover {
  background: rgba(140, 152, 255, .05);
}
table.data td, .admin-table td { border-color: rgba(140, 152, 255, .07); }

/* ---------- tx / listas ---------- */
.tx-item {
  border-radius: var(--radius-sm);
  transition: background .18s var(--ease), transform .18s var(--ease);
}
.tx-item:hover { background: rgba(140, 152, 255, .05); }
.tx-icon {
  background: rgba(124, 108, 255, .12);
  border: 1px solid rgba(124, 108, 255, .25);
  border-radius: 12px;
  color: var(--violet);
}

/* ---------- alerts ---------- */
.alert { border-radius: var(--radius-sm); backdrop-filter: blur(10px); }
.alert-warn { border: 1px solid rgba(255, 194, 75, .3); background: rgba(255, 194, 75, .08); }
.alert-info { border: 1px solid rgba(124, 108, 255, .3); background: rgba(124, 108, 255, .08); }
.alert-success, .alert-ok { border: 1px solid rgba(61, 220, 151, .3); background: rgba(61, 220, 151, .08); }

/* ---------- tabs ---------- */
.tabs { gap: 6px; }
.tab-btn {
  border-radius: 999px;
  border: 1px solid transparent;
  transition: all .2s var(--ease);
}
.tab-btn.active {
  background: rgba(255, 61, 94, .14);
  border-color: rgba(255, 61, 94, .4);
  color: #fff;
}
.tab-btn:not(.active):hover { background: rgba(140, 152, 255, .07); }

/* ---------- rota options (receber/enviar) ---------- */
.nx-route-option {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(140, 152, 255, .04);
  transition: border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease);
}
.nx-route-option:hover { border-color: rgba(140, 152, 255, .3); transform: translateX(2px); }
.nx-route-option:has(input:checked) {
  border-color: rgba(255, 61, 94, .5);
  background: linear-gradient(90deg, rgba(255, 61, 94, .1), rgba(245, 185, 66, .05));
  box-shadow: 0 0 24px -10px rgba(255, 61, 94, .4);
}
.nx-route-option__mark {
  border-radius: 50%;
  border: 2px solid var(--text-dim);
  transition: all .2s var(--ease);
}
.nx-route-option input:checked ~ .nx-route-option__mark {
  border-color: var(--red);
  background: var(--grad-brand);
  box-shadow: 0 0 12px rgba(255, 61, 94, .7);
}

/* ---------- vault / dashboard cliente ---------- */
.nx-vault {
  overflow: hidden;
  border: 1px solid rgba(255, 61, 94, .22);
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(255, 61, 94, .16), transparent 55%),
    radial-gradient(120% 140% at 0% 100%, rgba(124, 108, 255, .14), transparent 55%),
    var(--grad-panel), var(--bg-card);
}
.nx-vault__balance strong {
  font-family: var(--font-display);
  font-size: 2.6rem;
  font-weight: 700;
  letter-spacing: -.03em;
  background: linear-gradient(100deg, #fff 40%, #ffd479);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nx-vault__actions a {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(140, 152, 255, .05);
  transition: transform .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.nx-vault__actions a:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 61, 94, .45);
  background: rgba(255, 61, 94, .1);
}
.nx-vault__actions a span {
  background: var(--grad-brand);
  box-shadow: 0 6px 16px -6px rgba(255, 61, 94, .55);
}
.nx-orbit__ring { border-color: rgba(124, 108, 255, .35); }
.nx-orbit strong {
  font-family: var(--font-display);
  background: var(--grad-gold);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nx-metric i {
  background: var(--grad-brand);
  border-radius: 999px;
  box-shadow: 0 0 10px rgba(255, 61, 94, .5);
}
.nx-metrics__link:hover { color: var(--gold-bright); }
.nx-range button { border-radius: 999px; }
.nx-range button.active {
  background: rgba(255, 61, 94, .16);
  color: #fff;
  border-color: rgba(255, 61, 94, .4);
}
.nx-signal-bars i { background: var(--grad-brand); }

/* skeleton shimmer */
.skeleton {
  border-radius: 8px;
  background: linear-gradient(100deg, rgba(140,152,255,.08) 30%, rgba(140,152,255,.18) 50%, rgba(140,152,255,.08) 70%);
  background-size: 200% 100%;
  animation: nxShimmer 1.6s infinite linear;
}
@keyframes nxShimmer { to { background-position: -200% 0; } }

/* ---------- admin ---------- */
.admin-sidebar {
  background: rgba(6, 8, 15, .86);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-right: 1px solid rgba(140, 152, 255, .1);
}
.admin-brand { background: none; border-bottom-color: rgba(140, 152, 255, .1); }
.admin-brand b {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.admin-brand small { color: var(--violet); }
.admin-identity {
  border-radius: var(--radius-sm);
  border-color: var(--border);
  background: rgba(140, 152, 255, .05);
}
.admin-nav a { border-radius: var(--radius-sm); border-left: none; }
.admin-nav a:hover { background: rgba(140, 152, 255, .07); }
.admin-nav a.active {
  background: linear-gradient(90deg, rgba(255, 61, 94, .18), rgba(245, 185, 66, .07));
  box-shadow: inset 2px 0 0 var(--red);
}
.admin-nav a .icon { color: var(--violet); }
.admin-sidebar__foot { border-top-color: rgba(140, 152, 255, .1); }

.admin-hero {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background:
    radial-gradient(120% 160% at 100% 0%, rgba(124, 108, 255, .14), transparent 55%),
    radial-gradient(120% 160% at 0% 100%, rgba(255, 61, 94, .12), transparent 55%),
    var(--grad-panel), var(--bg-card);
  backdrop-filter: blur(14px);
}
.admin-hero > span, .admin-hero div > span,
.admin-panel__head span, .admin-page-head span {
  letter-spacing: .16em;
}
.admin-action {
  border: 1px solid rgba(255, 61, 94, .35);
  background: rgba(255, 61, 94, .1);
}
.admin-action:hover { background: rgba(255, 61, 94, .16); }
.admin-live i {
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}
.admin-routes article, .admin-watch a {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(140, 152, 255, .04);
  transition: border-color .2s var(--ease), background .2s var(--ease);
}
.admin-routes article:hover, .admin-watch a:hover {
  border-color: rgba(140, 152, 255, .28);
  background: rgba(140, 152, 255, .08);
}
.admin-routes i.on, .admin-route-card i.on {
  background: var(--green);
  box-shadow: 0 0 10px var(--green);
}
.admin-reserved { border-top-color: rgba(140, 152, 255, .1); }

.admin-route-config label {
  font-family: var(--font-display);
  font-size: .6rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.admin-route-config__sep {
  grid-column: 1 / -1;
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px dashed rgba(140, 152, 255, .18);
  font-family: var(--font-display);
  font-size: .58rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--violet);
}
.admin-route-config__save { cursor: pointer; }

.admin-modal__panel {
  background: rgba(9, 13, 24, .97);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  backdrop-filter: blur(20px);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .95), var(--shadow-glow);
}

/* ---------- auth gate ---------- */
body.nx-auth { background: #04060d; }
.nx-panel {
  background: rgba(9, 13, 24, .82);
  border: 1px solid var(--border);
  border-radius: 22px;
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  box-shadow: 0 40px 90px -30px rgba(0, 0, 0, .9);
}
.nx-glow-line { background: var(--grad-line); }
.nx-panel__head h1 {
  font-family: var(--nx-font);
  background: linear-gradient(100deg, #fff 40%, #ffd479);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nx-headline em {
  background: var(--grad-brand);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  font-style: normal;
}
.nx-input {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(140, 152, 255, .05);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.nx-feature {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: rgba(140, 152, 255, .05);
  backdrop-filter: blur(8px);
  transition: transform .2s var(--ease), border-color .2s var(--ease);
}
.nx-feature:hover { transform: translateY(-2px); border-color: rgba(140, 152, 255, .3); }
.nx-pill { letter-spacing: .12em; }
.nx-pill__dot { background: var(--green); box-shadow: 0 0 10px var(--green); }
.nx-secure {
  border: 1px solid rgba(61, 220, 151, .3);
  background: rgba(61, 220, 151, .08);
  color: var(--green);
  border-radius: 999px;
}

/* ---------- ranking ---------- */
.rank-avatar {
  display: inline-grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 4px auto 8px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--grad-brand);
  border: 2px solid rgba(255, 212, 121, .5);
  box-shadow: 0 8px 22px -8px rgba(255, 61, 94, .55);
  color: #fff;
}
.rank-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rank-avatar.is-empty {
  background: rgba(140, 152, 255, .08);
  border-color: var(--border);
  box-shadow: none;
  color: var(--text-dim);
}

/* ---------- avatar edit (configurações) ---------- */
.nx-avatar-edit {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
  padding: 14px;
  border: 1px dashed rgba(140, 152, 255, .22);
  border-radius: var(--radius);
  background: rgba(140, 152, 255, .04);
}
.nx-avatar-edit__preview {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  font-size: 1.4rem;
}
.nx-avatar-edit__body { display: grid; gap: 6px; }
.nx-avatar-edit__body form { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- bot admin ---------- */
.admin-bot-status {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.admin-bot-status i {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 12px var(--danger);
}
.admin-bot-status.is-on i {
  background: var(--green);
  box-shadow: 0 0 12px var(--green);
}
.admin-bot-log {
  margin: 0;
  padding: 16px;
  max-height: 480px;
  overflow: auto;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: #05070f;
  color: #a8e6b1;
  font-family: 'Consolas', 'Courier New', monospace;
  font-size: .78rem;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ---------- extrato ---------- */
.ex-filters {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(140, 152, 255, .05);
}
.ex-filters[hidden] { display: none; }
select option {
  background: #0d1426;
  color: #eef1fb;
}
.ex-filters label {
  display: grid;
  gap: 6px;
  font-family: var(--font-display);
  font-size: .62rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.ex-filters select {
  min-width: 160px;
  padding: 8px 12px;
  background: rgba(140, 152, 255, .06);
  border: 1px solid var(--border);
  color: var(--text);
}
.ex-in { color: var(--green); font-weight: 700; }
.ex-out { color: var(--danger); font-weight: 700; }
.ex-status--completed { color: var(--green); }
.ex-status--pending, .ex-status--processing { color: var(--yellow); }
.ex-status--failed, .ex-status--cancelled { color: var(--danger); }
.ex-status--refunded { color: var(--violet); }
.btn-sm { padding: 4px 8px; }
label.btn { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }

/* ---------- tickets / chat ---------- */
.nx-ticket-desk {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: rgba(140, 152, 255, .03);
  min-height: 600px;
}
.nx-ticket-list {
  border-right: 1px solid var(--border);
  border-radius: 0;
}
.nx-ticket-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(140, 152, 255, .04);
  transition: border-color .15s ease, background .15s ease;
}
.nx-ticket-item:hover { background: rgba(140, 152, 255, .08); }
.nx-ticket-item.is-active {
  border-color: var(--violet);
  background: rgba(124, 111, 255, .12);
  box-shadow: 0 0 0 1px rgba(124, 111, 255, .25), 0 6px 20px rgba(124, 111, 255, .12);
}
.nx-ticket-item b { font-size: .9rem; color: var(--text); }
.nx-ticket-item small { color: var(--text-muted); font-size: .78rem; }
.nx-ticket-item em { color: var(--text-dim); font-size: .68rem; }
.nx-ticket-thread__head {
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.nx-ticket-thread__head strong { font-size: 1rem; }
.nx-ticket-thread__head span { color: var(--violet); font-size: .62rem; }
.nx-ticket-log {
  gap: 10px;
  padding: 20px;
  background: linear-gradient(180deg, rgba(124,111,255,.03), transparent 30%);
}
.nx-bubble {
  max-width: 78%;
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: #131a2e;
}
.nx-bubble--user {
  justify-self: start;
  border-bottom-left-radius: 4px;
}
.nx-bubble--staff {
  justify-self: end;
  border-bottom-right-radius: 4px;
  border-color: rgba(124, 111, 255, .4);
  background: linear-gradient(145deg, rgba(124,111,255,.22), rgba(18,24,44,.95));
}
.nx-bubble header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 5px;
  font-size: .68rem;
  color: var(--text-dim);
}
.nx-bubble header b {
  color: var(--violet);
  font-family: var(--font-display);
  font-size: .66rem;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.nx-bubble--user header b { color: var(--cyan); }
.nx-bubble p {
  color: #e8ecfa;
  font-size: .92rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.nx-ticket-composer {
  border-top: 1px solid var(--border);
  padding: 14px;
}
.nx-ticket-composer textarea {
  min-height: 70px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(140, 152, 255, .05);
}
.nx-ticket-composer textarea:focus { border-color: var(--violet); }
.nx-emoji-bar button {
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(140, 152, 255, .05);
}
.nx-emoji-bar button:hover { background: rgba(124, 111, 255, .15); }

/* ---------- aviso popup ---------- */
.nx-announce {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 18px;
}
.nx-announce[hidden] { display: none; }
.nx-announce__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 4, 10, .72);
  backdrop-filter: blur(6px);
}
.nx-announce__card {
  position: relative;
  width: min(420px, 100%);
  padding: 28px 24px 22px;
  border-radius: 18px;
  border: 1px solid var(--border-strong);
  background: linear-gradient(160deg, #12182b, #0b0f1e);
  box-shadow: 0 30px 90px rgba(0,0,0,.6), 0 0 40px rgba(124, 111, 255, .15);
  text-align: center;
  animation: announceIn .28s cubic-bezier(.2,.9,.3,1.2);
}
@keyframes announceIn { from { transform: scale(.92) translateY(10px); opacity: 0; } }
.nx-announce__icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(145deg, var(--violet), var(--cyan));
  color: #fff;
  box-shadow: 0 8px 24px rgba(124, 111, 255, .4);
}
.nx-announce__icon .icon { width: 26px; height: 26px; }
.nx-announce__card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: 10px;
}
.nx-announce__card p {
  color: var(--text-muted);
  font-size: .92rem;
  line-height: 1.55;
  margin-bottom: 16px;
}
.nx-announce__x {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-dim);
  font-size: 1.4rem;
  cursor: pointer;
}
.nx-announce__x:hover { color: var(--text); }
.nx-announce__dismiss {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--text-dim);
  font-size: .82rem;
  cursor: pointer;
}
.nx-announce__dismiss input { accent-color: var(--violet); }
.nx-announce__ok {
  width: 100%;
  padding: 13px;
  border: 0;
  border-radius: 12px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: .95rem;
  color: #fff;
  background: linear-gradient(120deg, var(--violet), var(--violet-2));
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(124, 111, 255, .35);
}
.nx-announce__ok:hover { filter: brightness(1.12); }
.admin-announce {
  display: grid;
  gap: 8px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}
.admin-announce small {
  color: var(--text-dim);
  font-size: .62rem;
  letter-spacing: .12em;
}
.admin-announce textarea {
  width: 100%;
  padding: 10px;
  background: rgba(140,152,255,.06);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  resize: vertical;
  font-size: .85rem;
}

/* ---------- misc ---------- */
.empty-state { color: var(--text-dim); }
.empty-state .icon { opacity: .5; }
[data-copy]:hover { color: var(--gold-bright); }
.qr-preview img, .nx-qr-result img { border-radius: var(--radius-sm); }
.nx-copy-pix textarea {
  background: rgba(140, 152, 255, .05);
  border: 1px solid var(--border);
}
.admin-filter select { background: rgba(140, 152, 255, .06); border: 1px solid var(--border); }
a { transition: color .18s var(--ease); }
a:hover { color: var(--gold-bright); }
::selection { background: rgba(255, 61, 94, .35); color: #fff; }

/* page loader refinado */
.page-loader, .nx-loader { background: #04060d !important; }

/* ---------- MOBILE ---------- */
@media (max-width: 1024px) {
  .admin-kpis { grid-template-columns: repeat(2, 1fr); }
  .admin-grid--overview { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .content, .admin-content { padding: 14px 12px; }
  .page-head h1, .admin-hero h1, .admin-page-head h1 { font-size: 1.35rem; }
  .admin-hero { flex-direction: column; align-items: flex-start; gap: 12px; }
  .admin-kpis { grid-template-columns: 1fr; gap: 10px; }
  .admin-kpi strong { font-size: 1.3rem; }
  .grid-2, .grid-3 { grid-template-columns: 1fr !important; }
  .nx-cockpit, .nx-telemetry { grid-template-columns: 1fr !important; }
  .nx-vault__balance strong { font-size: 1.9rem; }
  .nx-vault__actions { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
  .nx-vault__actions a { padding: 10px 6px; }
  .rank-podium { flex-direction: column; align-items: stretch; }
  .rank-card { max-width: none; width: 100%; }
  .nx-gate { grid-template-columns: 1fr; }
  .nx-stage { display: none; }
  .nx-panel-wrap { padding: 18px 12px; }
  .ex-filters { flex-direction: column; }
  .ex-filters select { width: 100%; }
  .ex-customer-form input { min-width: 100% !important; }
  .nx-avatar-edit { flex-direction: column; align-items: flex-start; }
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .toolbar .btn, .toolbar a.btn, .search-box { width: 100%; justify-content: center; }
  .admin-route-grid { grid-template-columns: 1fr; }
  .admin-route-card__numbers { grid-template-columns: 1fr 1fr; }
  .admin-table { min-width: 640px; }
  .admin-bot-log { max-height: 300px; font-size: .7rem; }
  .topbar { padding: 0 10px; gap: 8px; }
  .progress-chip .meta { font-size: .68rem; }
  .nx-account-chip { display: none; }
  .nx-notify__panel { position: fixed; left: 10px; right: 10px; top: 60px; width: auto; max-height: 70vh; }
  .admin-topbar b { font-size: .85rem; }
  .admin-watch a { padding: 10px; }
  .nx-flow__list .tx-item { flex-wrap: wrap; }
  .nx-metrics { padding: 14px; }
  .nx-radar__body { flex-direction: column; }
}

@media (max-width: 480px) {
  .admin-kpis { grid-template-columns: 1fr; }
  .nx-vault__actions { grid-template-columns: 1fr; }
  .admin-route-config { grid-template-columns: 1fr !important; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
