@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Syne:wght@600;700;800&display=swap');

:root {
  --void: #03050a;
  --abyss: #060b14;
  --panel: #0b1220;
  --panel-2: #0f1a2e;
  --stroke: rgba(90, 140, 255, 0.18);
  --stroke-strong: rgba(90, 160, 255, 0.35);
  --blue-deep: #0a2a6b;
  --blue: #1a5cff;
  --blue-bright: #4d8dff;
  --cyan: #6ec8ff;
  --text: #e8eefc;
  --muted: #8aa0c4;
  --danger: #ff5c7a;
  --ok: #3dffa8;
  --glow: 0 0 60px rgba(26, 92, 255, 0.25);
  --radius: 22px;
  --font: 'Outfit', system-ui, sans-serif;
  --display: 'Syne', 'Outfit', sans-serif;
}

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

html, body {
  min-height: 100%;
  font-family: var(--font);
  color: var(--text);
  background: var(--void);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--cyan); text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: rgba(26, 92, 255, 0.45); }

/* â€”â€” Atmosphere â€”â€” */
.cn-sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(26, 92, 255, 0.35), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 20%, rgba(10, 42, 107, 0.5), transparent 50%),
    radial-gradient(ellipse 50% 35% at 10% 70%, rgba(14, 60, 160, 0.2), transparent 50%),
    linear-gradient(180deg, #040812 0%, #03050a 45%, #02040a 100%);
}

.cn-sky::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 20% 30%, rgba(255,255,255,.35), transparent),
    radial-gradient(1px 1px at 70% 15%, rgba(255,255,255,.25), transparent),
    radial-gradient(1.5px 1.5px at 40% 80%, rgba(110,200,255,.4), transparent),
    radial-gradient(1px 1px at 85% 60%, rgba(255,255,255,.2), transparent),
    radial-gradient(1px 1px at 15% 55%, rgba(255,255,255,.2), transparent);
  opacity: 0.7;
}

.cloud {
  position: absolute;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.45;
  animation: drift 28s ease-in-out infinite;
}
.cloud.c1 { width: 420px; height: 180px; background: #123a8a; top: 12%; left: -5%; }
.cloud.c2 { width: 520px; height: 220px; background: #0d2f72; top: 55%; right: -8%; animation-delay: -8s; animation-duration: 34s; }
.cloud.c3 { width: 300px; height: 140px; background: #1a4db8; bottom: 10%; left: 30%; animation-delay: -14s; opacity: 0.3; }

@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(40px, -18px, 0) scale(1.05); }
}

/* â€”â€” Auth gate â€”â€” */
body.auth-page {
  overflow: hidden;
  height: 100vh;
}
.auth-wrap {
  position: relative;
  z-index: 1;
  height: 100vh;
  max-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow: hidden;
  box-sizing: border-box;
}

.auth-shell {
  width: min(1040px, 100%);
  height: min(620px, calc(100vh - 32px));
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 0;
  border-radius: 28px;
  overflow: hidden;
  border: 1px solid rgba(240, 198, 116, 0.22);
  background: linear-gradient(145deg, rgba(11, 18, 32, 0.92), rgba(6, 11, 20, 0.96));
  box-shadow:
    0 0 0 1px rgba(26, 92, 255, 0.12),
    0 0 50px rgba(26, 92, 255, 0.2),
    0 40px 100px rgba(0,0,0,0.55);
  backdrop-filter: blur(24px);
  animation: rise 0.9s cubic-bezier(.2,.8,.2,1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(28px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.auth-hero {
  position: relative;
  padding: 0;
  background:
    linear-gradient(160deg, rgba(26, 92, 255, 0.18), transparent 55%),
    linear-gradient(200deg, #0a1628, #060b14 70%);
  border-right: 1px solid var(--stroke);
  overflow: hidden;
  min-height: 0;
  height: 100%;
}

.auth-hero .orbit {
  display: none;
}
.auth-hero .orbit::before,
.auth-hero .orbit::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: var(--blue-bright);
  box-shadow: 0 0 16px var(--blue-bright);
}
.auth-hero .orbit::before { width: 10px; height: 10px; top: 12px; left: 50%; }
.auth-hero .orbit::after { width: 6px; height: 6px; bottom: 30px; left: 20%; background: var(--cyan); }

@keyframes spin { to { transform: rotate(360deg); } }

.brand-mark {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}

.brand-mark .logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: transparent;
  border: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
  box-shadow: none;
  flex-shrink: 0;
}
.brand-mark .logo--lg {
  width: 88px;
  height: 88px;
  border-radius: 20px;
}
.brand-mark .logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.brand-mark h1 {
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.brand-mark span {
  display: block;
  font-family: var(--font);
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-top: 4px;
}

/* Sidebar: logo acima do nome, maior */
.side .brand-mark--side {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 12px;
  margin-bottom: 8px;
}
.side .brand-mark--side .logo {
  width: 140px;
  height: 140px;
  border-radius: 26px;
}
.side .brand-mark--side h1 {
  font-size: 1.35rem;
  margin: 0;
}
.side .brand-mark--side .brand-text {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero-copy {
  position: relative;
  z-index: 1;
  max-width: 360px;
}
.hero-copy h2 {
  font-family: var(--display);
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
  margin-bottom: 14px;
}
.hero-copy p {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  position: relative;
  z-index: 1;
}
.hero-stats div {
  padding: 12px 10px;
  border-radius: 14px;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--stroke);
}
.hero-stats strong {
  display: block;
  font-family: var(--display);
  font-size: 1.05rem;
  color: var(--cyan);
}
.hero-stats small {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.auth-panel {
  --gold: #f0c674;
  --gold-dim: rgba(240, 198, 116, 0.35);
  position: relative;
  padding: 26px 30px 18px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background:
    linear-gradient(165deg, rgba(240, 198, 116, 0.06) 0%, transparent 28%),
    linear-gradient(200deg, rgba(12, 24, 48, 0.95), rgba(5, 10, 20, 0.98));
}
.auth-panel-glow {
  pointer-events: none;
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 45% at 90% 0%, rgba(26, 92, 255, 0.22), transparent 55%),
    radial-gradient(ellipse 50% 40% at 10% 100%, rgba(240, 198, 116, 0.08), transparent 50%);
  z-index: 0;
}
.auth-panel > * {
  position: relative;
  z-index: 1;
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(240, 198, 116, 0.18);
  border-radius: 14px;
  margin-bottom: 18px;
  width: 100%;
  flex-shrink: 0;
}
.tabs button {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 11px;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.88rem;
  letter-spacing: 0.02em;
  transition: color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}
.tabs button:hover {
  color: var(--text);
}
.tabs button.active {
  background: linear-gradient(135deg, rgba(240, 198, 116, 0.22), rgba(26, 92, 255, 0.35));
  color: #fff;
  box-shadow:
    inset 0 0 0 1px rgba(240, 198, 116, 0.35),
    0 8px 22px rgba(26, 92, 255, 0.22);
}

.auth-head {
  margin-bottom: 2px;
}
.auth-eyebrow {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
  text-shadow: 0 0 18px rgba(240, 198, 116, 0.35);
}
.auth-panel .panel-title {
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 6px;
  background: linear-gradient(105deg, #fff 20%, #f0c674 55%, #7ad4ff 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.auth-panel .panel-sub {
  color: var(--muted);
  margin-bottom: 0;
  font-size: 0.86rem;
  line-height: 1.4;
}

.auth-forms {
  position: relative;
  flex: 1;
  min-height: 0;
}
.form-stack {
  display: none;
  flex-direction: column;
  gap: 9px;
  position: absolute;
  inset: 0;
  overflow: auto;
  padding-bottom: 8px;
}
.form-stack.active {
  display: flex;
  animation: authFormIn 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes authFormIn {
  from { opacity: 0; transform: translateX(10px); }
  to { opacity: 1; transform: none; }
}
@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

.auth-panel .field { display: flex; flex-direction: column; gap: 5px; }
.auth-panel .field label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(240, 198, 116, 0.75);
  font-weight: 600;
}
.auth-panel .field-box {
  position: relative;
  display: flex;
  align-items: center;
}
.auth-panel .field-box svg {
  position: absolute;
  left: 13px;
  width: 16px;
  height: 16px;
  color: var(--gold);
  opacity: 0.7;
  pointer-events: none;
  transition: opacity 0.2s, color 0.2s;
}
.auth-panel .field-box input {
  width: 100%;
  background: rgba(2, 6, 14, 0.72);
  border: 1px solid rgba(90, 140, 255, 0.22);
  border-radius: 12px;
  padding: 11px 12px 11px 40px;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.auth-panel .field-box input::placeholder {
  color: rgba(138, 160, 196, 0.55);
}
.auth-panel .field-box input:hover {
  border-color: rgba(240, 198, 116, 0.28);
}
.auth-panel .field-box input:focus {
  border-color: rgba(240, 198, 116, 0.55);
  background: rgba(4, 10, 22, 0.9);
  box-shadow:
    0 0 0 3px rgba(240, 198, 116, 0.12),
    0 0 24px rgba(26, 92, 255, 0.12);
}
.auth-panel .field-box:focus-within svg {
  opacity: 1;
  color: #f5d78e;
}
.auth-panel .field-box--key input {
  font-family: ui-monospace, 'Cascadia Code', Consolas, monospace;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.btn-primary {
  margin-top: 4px;
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #2a6dff 0%, #1340c4 100%);
  color: #fff;
  box-shadow: none;
  transition: transform 0.2s, filter 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-shrink: 0;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: none;
  filter: brightness(1.05);
}
.btn-primary:disabled { opacity: 0.6; cursor: wait; transform: none; }

.auth-panel .btn-auth {
  margin-top: 6px;
  padding: 13px 18px;
  border-radius: 13px;
  font-weight: 700;
  letter-spacing: 0.03em;
  background:
    linear-gradient(135deg, #f0c674 0%, #d4a84b 18%, #1a5cff 55%, #0d3db8 100%);
  box-shadow:
    0 10px 28px rgba(26, 92, 255, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  position: relative;
  overflow: hidden;
}
.auth-panel .btn-auth::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.18) 48%, transparent 62%);
  transform: translateX(-120%);
  transition: transform 0.55s ease;
}
.auth-panel .btn-auth:hover {
  filter: brightness(1.08);
  transform: translateY(-2px);
  box-shadow:
    0 14px 36px rgba(26, 92, 255, 0.42),
    0 0 24px rgba(240, 198, 116, 0.2);
}
.auth-panel .btn-auth:hover::after {
  transform: translateX(120%);
}

.auth-remember {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  font-size: 0.84rem;
  color: var(--muted);
  margin: 2px 0 0;
  flex-shrink: 0;
}
.auth-remember input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.auth-remember-box {
  width: 18px;
  height: 18px;
  border-radius: 5px;
  border: 1px solid rgba(240, 198, 116, 0.4);
  background: rgba(2, 6, 14, 0.7);
  flex-shrink: 0;
  position: relative;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.auth-remember-box::after {
  content: '';
  position: absolute;
  left: 5px;
  top: 2px;
  width: 5px;
  height: 9px;
  border: solid #1a1208;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) scale(0);
  transition: transform 0.15s ease;
}
.auth-remember:hover .auth-remember-box {
  border-color: rgba(240, 198, 116, 0.7);
}
.auth-remember input:checked + .auth-remember-box {
  background: linear-gradient(135deg, #f0c674, #d4a84b);
  border-color: #f0c674;
  box-shadow: 0 0 12px rgba(240, 198, 116, 0.35);
}
.auth-remember input:checked + .auth-remember-box::after {
  transform: rotate(45deg) scale(1);
}
.auth-remember input:focus-visible + .auth-remember-box {
  box-shadow: 0 0 0 3px rgba(240, 198, 116, 0.2);
}
.auth-remember:hover {
  color: var(--text);
}

.form-msg {
  min-height: 18px;
  font-size: 0.82rem;
  color: var(--danger);
  flex-shrink: 0;
}
.form-msg.ok { color: var(--ok); }

.auth-foot {
  margin-top: 10px;
  padding-top: 12px;
  font-size: 0.76rem;
  color: var(--muted);
  border-top: 1px solid rgba(240, 198, 116, 0.15);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.04em;
}
.auth-foot-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 10px rgba(240, 198, 116, 0.7);
  animation: authPulse 2.4s ease-in-out infinite;
}
@keyframes authPulse {
  0%, 100% { opacity: 0.55; transform: scale(0.9); }
  50% { opacity: 1; transform: scale(1.15); }
}
.auth-panel .key-buy-hint {
  margin: 2px 0 0;
  font-size: 0.76rem;
}
.auth-panel .key-buy-hint a {
  color: var(--gold);
  font-weight: 600;
}
.auth-panel .key-buy-hint a:hover {
  text-decoration: underline;
  color: #f5d78e;
}

.cf-turnstile-wrap {
  width: 100%;
  margin-top: 2px;
  margin-bottom: 0;
  min-height: 65px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.cf-turnstile {
  width: 100%;
  max-width: 100%;
  display: flex;
  justify-content: center;
}
.cf-turnstile iframe {
  max-width: 100% !important;
}
.cf-turnstile-status {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.35;
  color: #f0a0a0;
  text-align: center;
  max-width: 100%;
}
.cf-turnstile-retry {
  appearance: none;
  border: 1px solid rgba(240, 198, 116, 0.45);
  background: rgba(12, 22, 40, 0.85);
  color: #f0c674;
  font: inherit;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
}
.cf-turnstile-retry:active {
  transform: scale(0.98);
}

/* â€”â€” Dashboard â€”â€” */
.dash {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  margin-left: 260px;
}

.side {
  border-right: 1px solid var(--stroke);
  background: linear-gradient(180deg, rgba(11,18,32,0.95), rgba(6,11,20,0.98));
  padding: 28px 18px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  z-index: 30;
  box-sizing: border-box;
  overflow-y: auto;
}

.side-nav { display: flex; flex-direction: column; gap: 6px; }
.side-nav button {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 12px 14px;
  border-radius: 12px;
  cursor: pointer;
  transition: 0.2s;
  font-weight: 500;
}
.side-nav button:hover { background: rgba(26,92,255,0.08); color: var(--text); }
.side-nav button.active {
  background: linear-gradient(90deg, rgba(26,92,255,0.25), rgba(26,92,255,0.05));
  color: #fff;
  border: 1px solid var(--stroke);
}
.side-nav svg { width: 18px; height: 18px; opacity: 0.85; }

.side-user {
  margin-top: auto;
  padding: 0;
  border: 0;
  background: transparent;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.side-user-meta {
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid rgba(240, 198, 116, 0.28);
  background: linear-gradient(180deg, rgba(14, 22, 40, 0.95), rgba(6, 10, 20, 0.95));
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.side-user-meta[hidden] {
  display: none !important;
}
.side-user-ico {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  opacity: 0.9;
}
.side-user-name {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: #f0c674;
  font-size: 0.92rem;
  letter-spacing: 0.02em;
  min-width: 0;
}
.side-user-name .side-user-ico {
  color: #f0c674;
}
.side-user-name-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.side-user-credits {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--muted);
  min-width: 0;
}
.side-user-credits .side-user-ico {
  color: #f0c674;
}
.side-user-credits b {
  color: var(--text);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.side-user .logout {
  width: 100%;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  padding: 10px 14px;
  border-radius: 12px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font: inherit;
}
.side-logout-ico {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.85;
}
.side-user .logout:hover {
  color: var(--danger);
  border-color: rgba(255,92,122,0.4);
}
.side-user .logout:hover .side-logout-ico {
  opacity: 1;
}

.main {
  padding: 28px 32px 48px;
  max-width: 1280px;
  position: relative;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.topbar h2 {
  font-family: var(--display);
  font-size: 1.85rem;
  letter-spacing: -0.03em;
}
.topbar p { color: var(--muted); margin-top: 4px; }

.credits {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.chip {
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(11,18,32,0.8);
  font-size: 0.78rem;
  color: var(--muted);
}
.chip b { color: var(--cyan); font-weight: 600; }

.grid-cards {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}
.stat-card {
  --i: 0;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: linear-gradient(160deg, rgba(15,26,46,0.92), rgba(8,14,26,0.96));
  position: relative;
  overflow: hidden;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  opacity: 0;
  transform: translateY(18px);
  animation: cnCardIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--i) * 0.08s);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.stat-card[data-go] { cursor: pointer; }
.stat-card::before {
  content: '';
  position: absolute;
  width: 140px;
  height: 100px;
  right: -28px;
  top: -28px;
  background: radial-gradient(circle, rgba(26,92,255,0.4), transparent 70%);
  transition: transform 0.35s ease, opacity 0.35s ease;
}
.stat-card::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(110,200,255,0.55), transparent);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.3s ease;
}
.stat-card:hover {
  transform: translateY(-4px);
  border-color: var(--stroke-strong);
  box-shadow: 0 16px 40px rgba(0,0,0,0.35), 0 0 0 1px rgba(90,140,255,0.12);
}
.stat-card:hover::before { transform: scale(1.25); opacity: 1; }
.stat-card:hover::after { transform: scaleX(1); }
.stat-card-ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  color: var(--cyan);
  background: rgba(26, 92, 255, 0.14);
  border: 1px solid rgba(90, 140, 255, 0.22);
  position: relative;
  z-index: 1;
}
.stat-card-ico svg { width: 20px; height: 20px; }
.stat-card-body { min-width: 0; flex: 1; position: relative; z-index: 1; }
.stat-card .label { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }
.stat-card .value {
  font-family: var(--display);
  font-size: 1.45rem;
  margin-top: 6px;
  letter-spacing: -0.02em;
  line-height: 1.2;
  word-break: break-word;
}
.stat-card--user .value { font-size: 1.15rem; }
.stat-card .hint { color: var(--muted); font-size: 0.8rem; margin-top: 4px; }
.stat-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.stat-card-top .label { margin: 0; }
.btn-recharge {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(26, 92, 255, 0.4);
  background: rgba(26, 92, 255, 0.16);
  color: #9ec1ff;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: 0.2s ease;
  position: relative;
  overflow: hidden;
  line-height: 1.2;
}
.btn-recharge::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.18) 50%, transparent 70%);
  transform: translateX(-120%);
  animation: cnShine 2.8s ease-in-out infinite;
}
.btn-recharge:hover {
  background: rgba(26, 92, 255, 0.38);
  color: #fff;
  border-color: rgba(26, 92, 255, 0.75);
}
button.btn-recharge {
  cursor: pointer;
  font: inherit;
}

.howto-panel { overflow: hidden; }
.howto-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.howto-sub {
  color: var(--muted);
  font-size: 0.88rem;
}
.howto-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.howto-card {
  --i: 0;
  position: relative;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 16px 16px;
  border-radius: 16px;
  border: 1px solid var(--stroke);
  background: linear-gradient(165deg, rgba(16,28,50,0.85), rgba(8,14,26,0.95));
  color: var(--text);
  cursor: pointer;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px);
  animation: cnCardIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(0.28s + var(--i) * 0.1s);
  transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.howto-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 0%, rgba(78,160,255,0.18), transparent 55%);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.howto-card:hover {
  transform: translateY(-5px);
  border-color: rgba(90, 160, 255, 0.45);
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
}
.howto-card:hover::before { opacity: 1; }
.howto-num {
  position: absolute;
  top: 12px;
  right: 14px;
  font-family: var(--display);
  font-size: 0.78rem;
  color: rgba(138, 160, 196, 0.45);
  letter-spacing: 0.08em;
}
.howto-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--cyan);
  background: rgba(26, 92, 255, 0.14);
  border: 1px solid rgba(90, 140, 255, 0.2);
  position: relative;
  z-index: 1;
  transition: transform 0.3s ease;
}
.howto-icon svg { width: 20px; height: 20px; }
.howto-card:hover .howto-icon { transform: scale(1.08) rotate(-4deg); }
.howto-title {
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  position: relative;
  z-index: 1;
}
.howto-text {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
  position: relative;
  z-index: 1;
  flex: 1;
}
.howto-cta {
  margin-top: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--cyan);
  position: relative;
  z-index: 1;
  transition: transform 0.2s ease, letter-spacing 0.2s ease;
}
.howto-card:hover .howto-cta {
  transform: translateX(4px);
  letter-spacing: 0.02em;
}

@keyframes cnCardIn {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes cnShine {
  0%, 55% { transform: translateX(-120%); }
  75%, 100% { transform: translateX(120%); }
}

@media (prefers-reduced-motion: reduce) {
  .stat-card, .howto-card {
    animation: none;
    opacity: 1;
    transform: none;
  }
  .btn-recharge::before { animation: none; }
}

.panel {
  border: 1px solid var(--stroke);
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(11,18,32,0.9), rgba(7,12,22,0.95));
  padding: 22px;
  margin-bottom: 18px;
}
.panel h3 {
  font-family: var(--display);
  font-size: 1.15rem;
  margin-bottom: 4px;
}
.panel .desc { color: var(--muted); font-size: 0.9rem; margin-bottom: 18px; }

.search-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 10px;
  align-items: end;
}
.search-row-main {
  grid-template-columns: 1fr auto auto;
}
#view-phonebook .search-row-main {
  grid-template-columns: 1fr auto auto auto;
}
.search-row input, .search-row select {
  appearance: none;
  -webkit-appearance: none;
  background: rgba(3, 8, 18, 0.85);
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 14px 16px;
  outline: none;
  color: var(--text);
}
.search-row input.search-qty {
  width: 100%;
  min-width: 0;
  flex: none;
  text-align: center;
  -moz-appearance: textfield;
}
.search-row input.search-qty::-webkit-outer-spin-button,
.search-row input.search-qty::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.qty-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 128px;
  min-width: 128px;
  flex: 0 0 128px;
  margin: 0;
}
.qty-field-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(240, 198, 116, 0.8);
  line-height: 1;
  padding-left: 2px;
}
.qty-field .search-qty {
  width: 100%;
}
.search-row select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238aa0c4' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}
.search-row input:focus, .search-row select:focus {
  border-color: var(--stroke-strong);
  box-shadow: 0 0 0 3px rgba(26,92,255,0.15);
}
.search-row select option {
  background: #0b1428;
  color: #e8eefc;
}

.filter-bar {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 14px;
  margin-top: 14px;
}
.filter-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}
.filter-block[hidden],
#db-especifica-filter-wrap[hidden] {
  display: none !important;
}
.filter-label {
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.filter-hint {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
  line-height: 1.35;
  max-width: 280px;
}
.filter-hint.is-auto {
  color: var(--cyan);
}
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pill {
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.03);
  color: var(--muted);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: 0.15s ease;
}
.pill:hover {
  color: var(--text);
  border-color: rgba(90,160,255,0.35);
  background: rgba(26,92,255,0.1);
}
.pill.on {
  color: #fff;
  border-color: rgba(77,141,255,0.55);
  background: linear-gradient(135deg, rgba(26,92,255,0.45), rgba(10,42,107,0.55));
  box-shadow: 0 0 0 1px rgba(77,141,255,0.15), 0 6px 18px rgba(10,40,120,0.25);
}
.pill-bank {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.pill-bank-ico {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.08);
  object-fit: contain;
  image-rendering: auto;
}
.pill-bank-ico[hidden],
.pill-bank-ico.is-broken {
  display: none !important;
}
.pill-bank-plus {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1;
  color: #f0c674;
  background: rgba(240, 198, 116, 0.12);
  border: 1px solid rgba(240, 198, 116, 0.28);
}

.country-picker {
  position: relative;
}
.country-trigger {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 14px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(3, 8, 18, 0.85);
  color: var(--text);
  cursor: pointer;
  transition: 0.15s ease;
  text-align: left;
}
.country-trigger:hover,
.country-trigger[aria-expanded="true"] {
  border-color: var(--stroke-strong);
  box-shadow: 0 0 0 3px rgba(26,92,255,0.12);
}
.country-trigger-flag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 16px;
  flex-shrink: 0;
  color: var(--cyan);
}
.flag-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 16px;
  flex-shrink: 0;
  color: var(--cyan);
}
.flag-img {
  display: block;
  width: 20px;
  height: 14px;
  object-fit: cover;
  border-radius: 2px;
  box-shadow: 0 0 0 1px rgba(255,255,255,0.12);
}
.flag-globe {
  color: var(--cyan);
}
.meta-country {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.country-trigger-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.9rem;
}
.country-chevron {
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 0.15s ease;
}
.country-trigger[aria-expanded="true"] .country-chevron {
  transform: rotate(180deg);
}
.country-menu {
  position: absolute;
  z-index: 40;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow: auto;
  padding: 8px;
  border-radius: 16px;
  border: 1px solid var(--stroke-strong);
  background: linear-gradient(180deg, rgba(10,18,36,0.98), rgba(6,12,26,0.98));
  box-shadow: 0 18px 50px rgba(0,0,0,0.55), 0 0 0 1px rgba(90,140,255,0.08);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
}
.country-menu[hidden] {
  display: none !important;
}
.country-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 0.82rem;
  text-align: left;
  transition: 0.12s ease;
}
.country-option:hover {
  color: var(--text);
  background: rgba(26,92,255,0.12);
  border-color: rgba(90,140,255,0.2);
}
.country-option.on {
  color: #fff;
  background: rgba(26,92,255,0.28);
  border-color: rgba(77,141,255,0.4);
}

.db-launch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 8px;
}
.db-launch-btn {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 14px;
  padding: 18px 16px;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: rgba(3, 8, 18, 0.7);
  color: var(--text);
  cursor: pointer;
  text-align: left;
  transition: 0.18s ease;
}
.db-launch-btn:hover {
  border-color: rgba(77, 141, 255, 0.45);
  background: rgba(26, 92, 255, 0.12);
  box-shadow: 0 0 0 3px rgba(26, 92, 255, 0.1);
}
.db-launch-btn:hover .db-launch-ico {
  color: #7ad4ff;
  border-color: rgba(122, 212, 255, 0.45);
  background: rgba(26, 92, 255, 0.22);
  box-shadow: 0 0 18px rgba(30, 160, 255, 0.22);
}
.db-launch-ico {
  flex-shrink: 0;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  color: var(--cyan);
  border: 1px solid rgba(77, 141, 255, 0.28);
  background:
    linear-gradient(160deg, rgba(26, 92, 255, 0.28), rgba(8, 18, 40, 0.55));
  transition: 0.18s ease;
}
.db-launch-ico svg {
  width: 22px;
  height: 22px;
}
.db-launch-copy {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}
.db-launch-title {
  font-size: 1.02rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.db-launch-sub {
  color: var(--muted);
  font-size: 0.84rem;
}
.db-launch-cost {
  margin-left: auto;
  flex-shrink: 0;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(94, 234, 212, 0.28);
  background: rgba(94, 234, 212, 0.08);
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}
.db-launch-cost b {
  color: var(--cyan, #5eead4);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.credit-hint {
  margin: 8px 0 0;
  font-size: 0.82rem;
  color: var(--muted);
}
.credit-hint b {
  color: var(--cyan, #5eead4);
  font-weight: 600;
}
.search-qty {
  width: 110px;
  min-width: 110px;
  flex: 0 0 auto;
  text-align: center;
}
.cn-modal-body + .cn-modal-body {
  margin-top: 14px;
}
.cn-modal[hidden] {
  display: none !important;
}
.cn-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 20px;
}
#cn-confirm-modal {
  z-index: 100;
}
#credits-empty-modal {
  z-index: 95;
}
#db-results-modal {
  z-index: 85;
}
.db-results-card {
  width: min(640px, 100%);
  max-height: min(90vh, 820px);
  display: flex;
  flex-direction: column;
}
.db-results-toolbar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 0 12px;
}
.db-progress {
  margin: 0 0 14px;
}
.db-progress[hidden] {
  display: none !important;
}
.db-progress-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 8px;
  font-size: 0.82rem;
  color: var(--muted);
  letter-spacing: 0.02em;
}
.db-progress-meta .db-progress-pct,
.db-progress-meta #db-results-progress-pct {
  font-variant-numeric: tabular-nums;
  color: var(--cyan);
  font-weight: 600;
}
.db-progress-track {
  position: relative;
  height: 7px;
  border-radius: 999px;
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(40, 70, 110, 0.35) 0%, rgba(20, 35, 60, 0.55) 100%);
  border: 1px solid rgba(80, 140, 200, 0.22);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.45);
}
.db-progress-fill {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0%;
  border-radius: inherit;
  background:
    linear-gradient(90deg,
      #0a6b8f 0%,
      #1ec8ff 42%,
      #7aefff 58%,
      #1890c8 100%);
  box-shadow:
    0 0 12px rgba(30, 200, 255, 0.45),
    0 0 2px rgba(122, 239, 255, 0.8);
  transition: width 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}
.db-progress-glow {
  position: absolute;
  top: -40%;
  bottom: -40%;
  width: 28%;
  left: -30%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(180, 240, 255, 0.55) 50%,
    transparent 100%
  );
  filter: blur(1px);
  opacity: 0;
  pointer-events: none;
}
.db-progress--indeterminate .db-progress-fill {
  width: 38% !important;
  animation: db-progress-pulse 1.6s ease-in-out infinite;
}
.db-progress--indeterminate .db-progress-glow {
  opacity: 1;
  animation: db-progress-scan 1.85s linear infinite;
}
.db-progress--done .db-progress-fill {
  background:
    linear-gradient(90deg, #0d7a5a 0%, #2ee6a8 45%, #8ffff0 100%);
  box-shadow: 0 0 14px rgba(46, 230, 168, 0.4);
}
@keyframes db-progress-scan {
  0% { left: -35%; }
  100% { left: 110%; }
}
@keyframes db-progress-pulse {
  0%, 100% { transform: translateX(0); opacity: 0.85; }
  50% { transform: translateX(155%); opacity: 1; }
}
.db-results-scroll {
  flex: 1;
  min-height: 160px;
  max-height: min(52vh, 480px);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 10px;
  background: rgba(0, 0, 0, 0.22);
}
.db-results-scroll .result {
  margin-bottom: 8px;
}
.db-results-scroll .result.db-line-in,
.results .result.db-line-in {
  animation: db-line-in 0.28s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.db-results-scroll .result:last-child {
  margin-bottom: 0;
}
@keyframes db-line-in {
  from {
    opacity: 0;
    transform: translateY(8px);
    filter: brightness(1.4);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: brightness(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .db-progress--indeterminate .db-progress-fill,
  .db-progress--indeterminate .db-progress-glow,
  .db-results-scroll .result.db-line-in,
  .results .result.db-line-in {
    animation: none;
  }
  .db-results-scroll .result,
  .results .result.db-line-in {
    opacity: 1;
    transform: none;
  }
}
.cn-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 14, 0.72);
  backdrop-filter: blur(6px);
}
.cn-modal-card {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: min(86vh, 720px);
  overflow: visible;
  border-radius: 20px;
  border: 1px solid var(--stroke-strong);
  background: linear-gradient(180deg, rgba(12, 20, 38, 0.98), rgba(7, 12, 24, 0.98));
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  padding: 20px;
}
.cn-modal-scroll {
  max-height: min(70vh, 580px);
  overflow: auto;
  margin: 0 -4px;
  padding: 0 4px;
}
.cn-modal .country-menu {
  z-index: 90;
}
.cn-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}
.cn-modal-head h3 {
  margin: 0;
  font-size: 1.15rem;
}
.cn-modal-x {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--stroke);
  background: transparent;
  color: var(--muted);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
}
.cn-modal-x:hover { color: #fff; border-color: var(--stroke-strong); }
.cn-modal-desc {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.9rem;
}
.cn-modal-input {
  width: 100%;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--stroke);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  box-sizing: border-box;
}
.cn-modal-input:focus {
  border-color: var(--cyan);
}
.cn-modal-body .pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cn-modal-foot {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--stroke);
}
.cn-modal-cancel {
  border: 1px solid var(--stroke);
  background: transparent;
  color: var(--muted);
  border-radius: 12px;
  padding: 11px 16px;
  cursor: pointer;
}
.cn-modal-cancel:hover { color: var(--text); }

.credits-empty-card {
  width: min(440px, 100%);
  text-align: center;
  padding: 28px 24px 22px;
  overflow: hidden;
}
.credits-empty-x {
  position: absolute;
  top: 14px;
  right: 14px;
}
.credits-empty-visual {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 8px auto 18px;
  display: grid;
  place-items: center;
}
.credits-empty-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 1.5px solid rgba(77, 141, 255, 0.4);
  animation: creditsPulse 2.2s ease-out infinite;
}
.credits-empty-ring--2 {
  animation-delay: 0.7s;
}
.credits-empty-ico {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #9fd0ff;
  background: radial-gradient(circle at 40% 35%, rgba(77, 141, 255, 0.42), rgba(26, 92, 255, 0.12) 70%);
  border: 1px solid rgba(110, 200, 255, 0.45);
  box-shadow: 0 0 32px rgba(26, 92, 255, 0.35);
  animation: creditsIcoFloat 3s ease-in-out infinite;
}
.credits-empty-ico svg {
  width: 30px;
  height: 30px;
}
.credits-empty-title {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.credits-empty-desc {
  margin: 0 auto 22px;
  max-width: 34ch;
  color: var(--muted);
  font-size: 0.95rem;
  line-height: 1.5;
}
.credits-empty-foot {
  justify-content: center;
  align-items: center;
  border-top: 0;
  padding-top: 0;
  margin-top: 4px;
  gap: 12px;
}
a.credits-empty-cta,
button.credits-empty-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-decoration: none;
  margin: 0;
  box-sizing: border-box;
  animation: creditsCtaGlow 2.4s ease-in-out infinite;
  cursor: pointer;
  border: 0;
  font: inherit;
}
a.credits-empty-cta svg,
button.credits-empty-cta svg { flex-shrink: 0; }

.recharge-card {
  width: min(440px, 100%);
  text-align: center;
  padding: 28px 24px 22px;
  position: relative;
}
.recharge-visual {
  width: 72px;
  height: 72px;
  margin: 4px auto 16px;
  display: grid;
  place-items: center;
}
.recharge-ico {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #9fd0ff;
  background: radial-gradient(circle at 40% 35%, rgba(77, 141, 255, 0.42), rgba(26, 92, 255, 0.12) 70%);
  border: 1px solid rgba(110, 200, 255, 0.45);
  box-shadow: 0 0 28px rgba(26, 92, 255, 0.28);
}
.recharge-ico svg { width: 28px; height: 28px; }
.recharge-title {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 1.28rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.recharge-desc {
  margin: 0 auto 18px;
  max-width: 36ch;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}
.recharge-options {
  display: grid;
  gap: 10px;
  text-align: left;
}
.recharge-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 14px;
  border-radius: 14px;
  border: 1px solid rgba(90, 140, 255, 0.22);
  background: rgba(15, 26, 46, 0.72);
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}
.recharge-option:hover {
  border-color: rgba(77, 141, 255, 0.55);
  background: rgba(26, 92, 255, 0.14);
  transform: translateY(-1px);
}
.recharge-option-ico {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #9ec1ff;
  background: rgba(26, 92, 255, 0.18);
  border: 1px solid rgba(90, 140, 255, 0.25);
}
.recharge-option-copy {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 2px;
}
.recharge-option-copy strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text);
}
.recharge-option-copy span {
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.35;
}
.recharge-option-chev {
  color: var(--muted);
  font-size: 1.05rem;
  flex-shrink: 0;
}
.recharge-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}
.recharge-back:hover { color: var(--text); }
.recharge-key-form {
  text-align: left;
  margin-top: 4px;
}
.recharge-key-label {
  display: block;
  margin-bottom: 6px;
  font-size: 0.8rem;
  color: var(--muted);
}
.recharge-key-input {
  width: 100%;
  box-sizing: border-box;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  letter-spacing: 0.03em;
  text-align: center;
}
#redeem-key-msg {
  margin: 10px 0 0;
  min-height: 1.25em;
  font-size: 0.88rem;
}
.recharge-key-foot {
  margin-top: 16px;
  justify-content: flex-end;
}

.cn-confirm-card {
  width: min(440px, 100%);
  text-align: center;
  padding: 26px 24px 20px;
  position: relative;
}
.cn-confirm-visual {
  margin: 4px auto 14px;
}
.cn-confirm-ico {
  width: 56px;
  height: 56px;
  margin: 0 auto;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #f0c674;
  background: rgba(240, 198, 116, 0.12);
  border: 1px solid rgba(240, 198, 116, 0.35);
  box-shadow: 0 0 28px rgba(240, 198, 116, 0.15);
  animation: creditsIcoFloat 3.2s ease-in-out infinite;
}
.cn-confirm-ico svg { width: 28px; height: 28px; }
.cn-confirm-title {
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 800;
}
.cn-confirm-desc {
  white-space: pre-wrap;
  line-height: 1.45;
  margin: 0 auto 18px;
  max-width: 36ch;
}
.cn-confirm-card .cn-modal-foot {
  justify-content: center;
  border-top: 0;
  padding-top: 0;
}
#cn-confirm-ok {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

/* entrada animada dos modais vivos */
.cn-modal--alive:not([hidden]) .cn-modal-backdrop {
  animation: cnBackdropIn 0.35s ease both;
}
.cn-modal--alive:not([hidden]) .cn-modal-card {
  animation: cnModalPop 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes cnBackdropIn {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes cnModalPop {
  from {
    opacity: 0;
    transform: translateY(18px) scale(0.92);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes creditsPulse {
  0% { transform: scale(0.72); opacity: 0.7; }
  100% { transform: scale(1.35); opacity: 0; }
}
@keyframes creditsIcoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
@keyframes creditsCtaGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(26, 92, 255, 0.35); }
  50% { box-shadow: 0 0 28px 2px rgba(77, 141, 255, 0.45); }
}

@media (prefers-reduced-motion: reduce) {
  .cn-modal--alive:not([hidden]) .cn-modal-backdrop,
  .cn-modal--alive:not([hidden]) .cn-modal-card,
  .credits-empty-ring,
  .credits-empty-ico,
  .cn-confirm-ico,
  a.credits-empty-cta,
  button.credits-empty-cta {
    animation: none !important;
  }
}

/* Nemesis Security menu */
.nemesis-sec-menu {
  position: fixed;
  z-index: 99999;
  min-width: 200px;
  padding: 8px;
  border-radius: 14px;
  border: 1px solid rgba(240, 198, 116, 0.35);
  background: linear-gradient(180deg, rgba(14, 22, 40, 0.98), rgba(6, 10, 20, 0.98));
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(10px);
}
.nemesis-sec-menu[hidden] {
  display: none !important;
}
.nemesis-sec-title {
  padding: 8px 10px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #f0c674;
  border-bottom: 1px solid rgba(240, 198, 116, 0.2);
  margin-bottom: 6px;
}
.nemesis-sec-item {
  display: block;
  width: 100%;
  text-align: left;
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
}
.nemesis-sec-item:hover {
  background: rgba(240, 198, 116, 0.12);
  color: #f0c674;
}

/* Scrollbars â€” mesma paleta do Nemesis Security */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(240, 198, 116, 0.65) rgba(6, 10, 20, 0.92);
}
*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
*::-webkit-scrollbar-track {
  background: rgba(6, 10, 20, 0.92);
  border-radius: 999px;
  border: 1px solid rgba(240, 198, 116, 0.12);
}
*::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(240, 198, 116, 0.85), rgba(170, 130, 55, 0.7));
  border-radius: 999px;
  border: 2px solid rgba(6, 10, 20, 0.92);
  box-shadow: 0 0 8px rgba(240, 198, 116, 0.25);
}
*::-webkit-scrollbar-thumb:hover {
  background: #f0c674;
}
*::-webkit-scrollbar-corner {
  background: rgba(6, 10, 20, 0.92);
}

@media (max-width: 900px) {
  .db-launch { grid-template-columns: 1fr; }
}

.bucket {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.02);
  cursor: pointer;
  font-size: 0.8rem;
  color: var(--muted);
  user-select: none;
  transition: 0.15s;
}
.bucket input { display: none; }
.bucket.on {
  color: #fff;
  border-color: rgba(77,141,255,0.5);
  background: rgba(26,92,255,0.2);
}

.results {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 560px;
  overflow: auto;
}
.result {
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(3,8,18,0.45);
  transition: border-color 0.15s;
}
.result:hover { border-color: var(--stroke-strong); }
.result .name {
  font-weight: 600;
  word-break: break-all;
  margin-bottom: 6px;
}
.result .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 0.8rem;
}
.result .meta span b { color: var(--cyan); font-weight: 500; }

.empty {
  text-align: center;
  padding: 40px 16px;
  color: var(--muted);
}
.empty svg { width: 72px; height: 72px; opacity: 0.45; margin-bottom: 12px; }

.view { display: none; }
.view.active { display: block; }
.view.view-leaving {
  display: block;
  position: absolute;
  left: 0;
  right: 0;
  width: 100%;
  max-width: 1280px;
  pointer-events: none;
  z-index: 1;
  animation: viewLeave 0.32s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
.view.view-enter {
  position: relative;
  z-index: 2;
  animation: viewEnter 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes viewLeave {
  0% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
  100% {
    opacity: 0;
    transform: translateY(-14px) scale(0.985);
    filter: blur(5px);
  }
}
@keyframes viewEnter {
  0% {
    opacity: 0;
    transform: translateY(22px) scale(0.97);
    filter: blur(8px);
  }
  55% {
    filter: blur(0);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}
.topbar.topbar-swap #page-title,
.topbar.topbar-swap #page-sub {
  animation: topbarIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.topbar.topbar-swap #page-sub {
  animation-delay: 0.06s;
}
@keyframes topbarIn {
  from {
    opacity: 0;
    transform: translateX(-12px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: none;
    filter: none;
  }
}
.side-nav button.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #7ad4ff, #1a5cff);
  box-shadow: 0 0 12px rgba(80, 180, 255, 0.55);
  animation: navBarIn 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes navBarIn {
  from {
    opacity: 0;
    transform: scaleY(0.4);
  }
  to {
    opacity: 1;
    transform: scaleY(1);
  }
}
@media (prefers-reduced-motion: reduce) {
  .view.view-leaving,
  .view.view-enter,
  .topbar.topbar-swap #page-title,
  .topbar.topbar-swap #page-sub,
  .side-nav button.active::before {
    animation: none !important;
  }
}

.history-cats {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.history-cat {
  border: 1px solid var(--stroke);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(11,18,32,0.92), rgba(7,12,22,0.96));
  overflow: hidden;
}
.history-cat.open {
  border-color: var(--stroke-strong);
  box-shadow: 0 12px 36px rgba(0,0,0,0.28);
}
.history-cat-btn {
  width: 100%;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 16px 18px;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
}
.history-cat-btn:hover { background: rgba(26, 92, 255, 0.06); }
.history-cat-ico {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(26, 92, 255, 0.12);
  border: 1px solid rgba(80, 150, 255, 0.22);
  color: var(--cyan, #7ad4ff);
  flex-shrink: 0;
}
.history-cat-ico svg {
  width: 18px;
  height: 18px;
  opacity: 0.95;
}
.history-cat.open .history-cat-ico {
  background: rgba(26, 92, 255, 0.22);
  border-color: rgba(80, 180, 255, 0.4);
  box-shadow: 0 0 14px rgba(80, 180, 255, 0.2);
}
.history-cat-title {
  font-family: var(--display);
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.history-cat-meta {
  color: var(--muted);
  font-size: 0.8rem;
}
.history-cat-chevron {
  color: var(--muted);
  transition: transform 0.2s ease;
}
.history-cat.open .history-cat-chevron { transform: rotate(180deg); color: var(--cyan); }
.history-cat-body {
  padding: 0 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  border-top: 1px solid var(--stroke);
}
.history-cat-body[hidden] { display: none !important; }
.history-session {
  border: 1px solid var(--stroke);
  border-radius: 12px;
  background: rgba(3, 8, 18, 0.45);
  padding: 12px;
}
.history-session-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}
.history-session-head b { display: block; font-size: 0.92rem; }
.history-session-head span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  margin-top: 2px;
}
.history-copy {
  border: 1px solid var(--stroke);
  background: rgba(26, 92, 255, 0.14);
  color: var(--cyan);
  border-radius: 8px;
  padding: 6px 10px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  flex-shrink: 0;
}
.history-copy:hover { background: rgba(26, 92, 255, 0.28); color: #fff; }
.history-lines {
  margin: 0;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(90, 140, 255, 0.12);
  color: var(--cyan);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-all;
  max-height: 280px;
  overflow: auto;
}
.history-empty-note {
  color: var(--muted);
  font-size: 0.86rem;
  padding: 8px 4px;
}
.history-list { display: flex; flex-direction: column; gap: 8px; }
.history-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--stroke);
  background: rgba(255,255,255,0.02);
  font-size: 0.9rem;
}
.history-item span { color: var(--muted); }

.buckets-panel {
  padding: 14px;
}
.bucket-list {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}
.bucket-row {
  --i: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 12px;
  border-radius: 14px;
  border: 1px solid var(--stroke);
  background: rgba(255, 255, 255, 0.02);
  min-height: 118px;
  opacity: 0;
  transform: translateY(10px);
  animation: cnCardIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: calc(var(--i) * 0.04s);
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.bucket-row:hover {
  background: rgba(26, 92, 255, 0.08);
  border-color: var(--stroke-strong);
  transform: translateY(-2px);
}
.bucket-ico {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #8eb6ff;
  background: rgba(26, 92, 255, 0.12);
  border: 1px solid rgba(90, 140, 255, 0.18);
}
.bucket-ico svg {
  width: 20px;
  height: 20px;
  display: block;
}
.bucket-row:hover .bucket-ico {
  color: #c9dbff;
  background: rgba(26, 92, 255, 0.18);
  border-color: rgba(120, 170, 255, 0.35);
}
.bucket-info {
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}
.bucket-info strong {
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.bucket-info code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.68rem;
  color: var(--muted);
  background: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bucket-status {
  margin-top: auto;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ok);
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(61, 255, 168, 0.25);
  background: rgba(61, 255, 168, 0.08);
}

@media (max-width: 1200px) {
  .bucket-list { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 900px) {
  .bucket-list { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .bucket-list { grid-template-columns: repeat(2, 1fr); }
}

.loader {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255,255,255,0.25);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
.loader-lg {
  width: 36px;
  height: 36px;
  border-width: 3px;
  margin-bottom: 14px;
}
.db-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 20px;
  min-height: 180px;
}
.db-loading-sub {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}
.db-launch-btn:disabled {
  opacity: 0.45;
  cursor: wait;
  pointer-events: none;
}

/* Admin panel */
.side-nav button.side-admin {
  margin-top: 8px;
  border-top: 1px solid var(--stroke);
  padding-top: 14px;
  color: #f0c674;
}
.side-nav button.side-admin.active {
  background: rgba(240, 198, 116, 0.12);
  color: #f0c674;
}
.admin-panel { padding: 18px 20px 24px; }
.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 18px;
  margin-bottom: 16px;
}
.admin-search-wrap {
  display: flex;
  gap: 10px;
  flex: 1;
  min-width: 240px;
}
.admin-search-wrap input {
  flex: 1;
  background: rgba(3, 8, 18, 0.85);
  border: 1px solid var(--stroke);
  border-radius: 12px;
  padding: 12px 14px;
  color: var(--text);
  font: inherit;
  outline: none;
}
.admin-search-wrap input:focus {
  border-color: var(--stroke-strong);
}
.admin-hint {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.admin-hint.ok { color: var(--cyan, #5eead4); }
.admin-hint.err { color: var(--danger, #ff5c7a); }
.admin-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--stroke);
  border-radius: 14px;
}
.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}
.admin-table th,
.admin-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--stroke);
  vertical-align: middle;
}
.admin-table th {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.25);
}
.admin-table tbody tr:last-child td { border-bottom: 0; }
.admin-table tbody tr:hover { background: rgba(26, 92, 255, 0.05); }
.admin-empty {
  text-align: center;
  color: var(--muted);
  padding: 28px 14px !important;
}
.admin-email { color: var(--muted); font-size: 0.86rem; }
.admin-muted { color: var(--muted); font-size: 0.82rem; white-space: nowrap; }
.admin-credits {
  font-variant-numeric: tabular-nums;
  font-weight: 650;
  color: var(--cyan, #5eead4);
}
.admin-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(240, 198, 116, 0.15);
  color: #f0c674;
  vertical-align: middle;
}
.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.admin-add-input {
  width: 110px;
  background: rgba(3, 8, 18, 0.85);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 8px 10px;
  color: var(--text);
  font: inherit;
  outline: none;
}
.btn-admin-add,
.btn-admin-set {
  appearance: none;
  border: 1px solid var(--stroke);
  background: rgba(26, 92, 255, 0.15);
  color: var(--text);
  border-radius: 10px;
  padding: 8px 12px;
  font: inherit;
  font-size: 0.82rem;
  cursor: pointer;
}
.btn-admin-add:hover { border-color: var(--cyan, #5eead4); color: var(--cyan, #5eead4); }
.btn-admin-set:hover { border-color: #f0c674; color: #f0c674; }
.btn-admin-add:disabled,
.btn-admin-set:disabled { opacity: 0.5; cursor: wait; }

.admin-section {
  margin-bottom: 28px;
}
.admin-section + .admin-section {
  padding-top: 22px;
  border-top: 1px solid var(--stroke);
}
.admin-section-title {
  margin: 0 0 4px;
  font-size: 1.1rem;
}
.admin-section-sub {
  margin: 0 0 14px;
  color: var(--muted);
  font-size: 0.88rem;
}
.key-pack-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 14px;
}
.key-pack {
  appearance: none;
  border: 1px solid var(--stroke);
  background: rgba(3, 8, 18, 0.7);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 14px;
  font: inherit;
  font-size: 0.88rem;
  cursor: pointer;
}
.key-pack.on,
.key-pack:hover {
  border-color: #f0c674;
  color: #f0c674;
  background: rgba(240, 198, 116, 0.1);
}
.admin-key-gen {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 10px;
}
.admin-keys-out {
  margin-top: 12px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  padding: 12px;
  background: rgba(0, 0, 0, 0.25);
}
.admin-keys-out-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.85rem;
}
.admin-keys-out textarea {
  width: 100%;
  box-sizing: border-box;
  resize: vertical;
  min-height: 140px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text);
  background: rgba(3, 8, 18, 0.85);
  border: 1px solid var(--stroke);
  border-radius: 10px;
  padding: 12px;
}
.admin-badge-lock {
  background: rgba(255, 92, 122, 0.15);
  color: #ff5c7a;
}
.key-buy-hint {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}
.key-buy-hint a {
  color: var(--cyan, #5eead4);
  text-decoration: none;
  font-weight: 600;
}
.key-buy-hint a:hover { text-decoration: underline; }
.brand-mark--auth {
  flex-direction: column;
  align-items: center;
  gap: 0;
}
.brand-mark--logo-only {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  display: block;
}
.brand-mark .logo--xl {
  width: 140px;
  height: 140px;
  border-radius: 26px;
}
.brand-mark .logo--hero {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  background: radial-gradient(ellipse at center, rgba(10, 28, 60, 0.9), #060b14 70%);
  display: grid;
  place-items: center;
}
.brand-mark .logo--hero img {
  width: 108%;
  height: 108%;
  max-width: none;
  object-fit: contain;
  object-position: center;
  display: block;
  padding: 0;
  box-sizing: border-box;
  transform-origin: center center;
  will-change: transform;
  animation: logoBreath 7s ease-in-out infinite;
}
@keyframes logoBreath {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.035); }
}
@media (prefers-reduced-motion: reduce) {
  .brand-mark .logo--hero img {
    animation: none;
    transform: none;
  }
}

.auth-mobile-brand { display: none; }
.mobile-bar { display: none; }
.side-overlay { display: none; }

/* —— Mobile / tablet —— */
@media (max-width: 960px) {
  html, body { overflow-x: hidden; max-width: 100%; }
  body.nav-open { overflow: hidden; }

  body.auth-page { overflow: auto; height: auto; min-height: 100dvh; }
  .auth-wrap {
    height: auto; min-height: 100dvh; max-height: none; overflow: auto;
    padding: 16px 14px; display: flex; align-items: center; justify-content: center;
  }
  .auth-shell {
    width: 100%; max-width: 440px; margin: 0 auto;
    grid-template-columns: 1fr; height: auto; max-height: none; border-radius: 22px;
  }
  .auth-hero { display: none !important; }
  .auth-mobile-brand {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 8px; margin: 4px 0 18px; text-align: center;
  }
  .auth-mobile-brand img {
    width: 120px; height: 120px; object-fit: contain; border-radius: 24px; display: block;
  }
  .auth-mobile-brand strong {
    font-family: var(--display); font-size: 1.25rem; font-weight: 800;
    letter-spacing: -0.02em; color: #fff;
  }
  .auth-mobile-brand span {
    font-size: 0.68rem; font-weight: 600; letter-spacing: 0.16em;
    text-transform: uppercase; color: var(--gold, #f0c674);
  }
  .auth-panel { height: auto; overflow: visible; padding: 20px 18px 18px; }
  .auth-forms { position: relative; min-height: 0; height: auto; flex: none; }
  .form-stack { position: static !important; inset: auto; overflow: visible; }
  .form-stack:not(.active) { display: none !important; }
  .form-stack.active { display: flex !important; }
  .cf-turnstile-wrap { min-height: 70px; margin-top: 12px; }
  .auth-panel .panel-title { font-size: 1.25rem; line-height: 1.2; }
  .tabs { gap: 6px; }
  .tabs button { padding: 11px 12px; font-size: 0.9rem; }
  .auth-panel .field-box input { font-size: 16px; }

  .mobile-bar {
    display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 60;
    padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top));
    border-bottom: 1px solid var(--stroke);
    background: rgba(6, 11, 20, 0.94); backdrop-filter: blur(16px);
  }
  .mobile-menu-btn {
    width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--stroke);
    background: rgba(255,255,255,0.04); display: grid; place-content: center; gap: 5px;
    padding: 0; cursor: pointer; flex-shrink: 0;
  }
  .mobile-menu-btn span { display: block; width: 18px; height: 2px; border-radius: 2px; background: #fff; }
  .mobile-bar-brand { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
  .mobile-bar-brand img { width: 36px; height: 36px; border-radius: 10px; object-fit: cover; flex-shrink: 0; }
  .mobile-bar-brand strong {
    font-family: var(--display); font-size: 0.98rem; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
  }
  .mobile-bar-credits { font-size: 0.78rem; color: var(--cyan); font-weight: 600; white-space: nowrap; }
  .side-overlay {
    display: block; position: fixed; inset: 0; z-index: 150;
    background: rgba(0, 0, 0, 0.45); border: 0; padding: 0; margin: 0;
  }
  .side-overlay[hidden] { display: none !important; }

  .dash { display: block; min-height: 100dvh; margin-left: 0; }
  .side {
    position: fixed; top: 0; left: 0; bottom: 0; width: min(300px, 88vw); z-index: 200;
    height: 100dvh; max-height: 100dvh; padding: 16px 12px 18px; gap: 10px;
    border-right: 1px solid rgba(120, 160, 255, 0.22); border-bottom: 0;
    transform: translateX(-105%);
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    overflow-y: auto; -webkit-overflow-scrolling: touch;
    background: #0b1424;
    box-shadow: 8px 0 40px rgba(0,0,0,0.45);
    pointer-events: auto;
  }
  .side.is-open { transform: translateX(0); }
  /* No mobile o topo já tem a marca — no drawer só o menu */
  .side .brand-mark--side { display: none !important; }
  .side-nav { flex-direction: column; flex-wrap: nowrap; overflow: visible; gap: 8px; margin-top: 8px; }
  .side-nav button {
    width: 100%; white-space: normal; padding: 14px 14px; font-size: 0.95rem;
    color: #e8eefc !important;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(140, 170, 255, 0.16);
    pointer-events: auto; touch-action: manipulation; position: relative; z-index: 1;
  }
  .side-nav button svg { opacity: 1; color: #9ec1ff; }
  .side-nav button:hover,
  .side-nav button.active {
    color: #fff !important;
    background: rgba(26, 92, 255, 0.35) !important;
    border-color: rgba(120, 170, 255, 0.45);
  }
  .side-nav button.side-admin {
    margin-top: 8px; border-top: 1px solid rgba(240, 198, 116, 0.25); padding-top: 14px;
    color: #f0c674 !important;
  }
  .side-user { margin-top: auto; flex-direction: column; gap: 10px; }
  .side-user-meta {
    padding: 12px 14px;
    color: #e8eefc;
    border-color: rgba(240, 198, 116, 0.35);
  }
  .side-user .logout {
    color: #e8eefc;
    border-color: rgba(255,255,255,0.18);
  }

  .main { padding: 14px 12px 40px; width: 100%; max-width: 100%; box-sizing: border-box; }
  .grid-cards { grid-template-columns: 1fr !important; gap: 12px; }
  .stat-card { min-width: 0; }
  .stat-card .value { font-size: 1.4rem; word-break: break-word; }
  .howto-grid { grid-template-columns: 1fr !important; }
  .howto-card { min-width: 0; }
  .search-row, .search-row-main { grid-template-columns: 1fr !important; }
  .search-row input, .search-row select, .search-row button, .search-row .btn-primary,
  .search-row-main input, .search-row-main select, .search-row-main button, .search-row-main .btn-primary {
    width: 100%; min-width: 0;
  }
  .search-row .qty-field, .search-row-main .qty-field {
    width: 100%; min-width: 0; flex: 1 1 auto;
  }
  .search-row input.search-qty, .search-row-main input.search-qty {
    width: 100%; min-width: 0; flex: 1 1 auto;
  }
  .filter-bar { grid-template-columns: 1fr !important; gap: 12px; }
  .pill-row { flex-wrap: wrap; }
  .country-menu { grid-template-columns: 1fr !important; left: 0; right: 0; width: 100%; }
  .topbar { flex-direction: column; align-items: flex-start; gap: 8px; margin-bottom: 16px; }
  .topbar h2 { font-size: 1.35rem; }
  .panel { padding: 14px; border-radius: 18px; overflow: hidden; }
  .db-launch { grid-template-columns: 1fr !important; }
  .db-launch-btn { min-width: 0; }
  .results { max-height: none; }
  .result .meta { gap: 6px 10px; }
  .cn-modal-card {
    width: calc(100vw - 20px); max-width: calc(100vw - 20px);
    max-height: min(92dvh, 920px); margin: 10px; border-radius: 18px;
  }
  .bucket-list { grid-template-columns: 1fr 1fr !important; gap: 10px; }
  .admin-search-wrap { min-width: 0; width: 100%; flex-direction: column; }
  .admin-toolbar { flex-direction: column; align-items: stretch; }
  .view.view-leaving, .view.view-enter { max-width: 100%; }
}

@media (max-width: 640px) {
  .auth-wrap { padding: 10px; }
  .auth-mobile-brand img { width: 112px; height: 112px; }
  .auth-panel { padding: 16px 14px 14px; }
  .bucket-list { grid-template-columns: 1fr !important; }
  .main { padding: 12px 10px 32px; }
}
