/* ── Design Tokens ─────────────────────────────────────────────────────────── */
:root {
  --bg:          #09090b;
  --bg-2:        #0c0c0f;
  --surface:     #18181b;
  --surface-2:   #1c1c1f;
  --surface-3:   #27272a;
  --border:      rgba(255,255,255,0.07);
  --border-2:    rgba(255,255,255,0.12);
  --accent:      #7c3aed;
  --accent-2:    #8b5cf6;
  --accent-3:    #a78bfa;
  --accent-glow: rgba(124,58,237,0.25);
  --text:        #fafafa;
  --text-2:      #d4d4d8;
  --text-muted:  #71717a;
  --text-subtle: #52525b;
  --green:       #22c55e;
  --green-dim:   rgba(34,197,94,0.15);
  --cyan:        #06b6d4;
  --cyan-dim:    rgba(6,182,212,0.12);
  --red:         #ef4444;
  --red-dim:     rgba(239,68,68,0.12);
  --amber:       #f59e0b;
  --amber-dim:   rgba(245,158,11,0.12);
  --radius:      12px;
  --radius-lg:   16px;
  --radius-xl:   20px;
  --shadow:      0 1px 3px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.04);
  --shadow-lg:   0 8px 32px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.06);
  --ease:        cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Reset & Base ──────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; -webkit-font-smoothing: antialiased; }

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

a { color: var(--accent-3); text-decoration: none; transition: color 0.2s var(--ease); }
a:hover { color: var(--text); }

/* ── Scrollbar ─────────────────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface-3); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-subtle); }

/* ── Navbar ────────────────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 32px;
  background: rgba(9,9,11,0.90);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 1px 0 rgba(255,255,255,0.03);
}

/* Logo */
.nav-brand {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 20%, var(--accent-3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nav-brand svg {
  filter: drop-shadow(0 0 8px rgba(124,58,237,0.4));
}

/* Credits badge — bigger and more visible */
.credit-badge {
  font-size: 0.8rem;
  font-weight: 700;
  padding: 6px 14px;
  border-radius: 99px;
  background: rgba(124,58,237,0.15);
  border: 1px solid rgba(124,58,237,0.35);
  color: #c4b5fd;
  letter-spacing: -0.01em;
  transition: all 0.2s var(--ease);
}
.credit-badge:hover { background:rgba(124,58,237,0.22); border-color:rgba(124,58,237,0.5); }

.nav-right {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Nav divider between groups */
.nav-divider {
  width: 1px;
  height: 20px;
  background: rgba(255,255,255,0.08);
  margin: 0 4px;
}

/* Responsive */
/* ── Hamburger menu ──────────────────────────────────────────────────────────── */
.nav-desktop { display:flex; }
.nav-mobile  { display:none; align-items:center; gap:8px; }

.hamburger {
  width: 38px; height: 38px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  cursor: pointer;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 5px;
  transition: background 0.2s;
  padding: 0;
}
.hamburger:hover { background: rgba(255,255,255,0.1); }
.hamburger span {
  display: block; width: 18px; height: 1.5px;
  background: #fff; border-radius: 99px;
  transition: all 0.25s var(--ease);
  transform-origin: center;
}
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile drawer */
.mobile-menu {
  display: none;
  position: fixed;
  top: 56px; left: 0; right: 0;
  background: rgba(12,12,14,0.98);
  border-bottom: 1px solid rgba(255,255,255,0.07);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 49;
  animation: slide-down 0.2s var(--ease);
}
.mobile-menu.open { display: block; }

.mobile-menu-inner { padding: 12px 16px 20px; }
.mobile-menu-section { display: flex; flex-direction: column; gap: 2px; }

.mobile-link {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px;
  border-radius: 10px;
  font-size: 0.9rem; font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  background: transparent;
  border: none; cursor: pointer; width: 100%; text-align: left;
  transition: background 0.15s var(--ease), color 0.15s;
}
.mobile-link:hover { background: rgba(255,255,255,0.06); color: #fff; }
.mobile-link svg { flex-shrink:0; opacity:0.6; }
.mobile-link.mobile-danger { color: #fca5a5; }
.mobile-link.mobile-danger:hover { background: rgba(239,68,68,0.08); }
.mobile-link.mobile-primary {
  background: linear-gradient(135deg, rgba(124,58,237,0.2), rgba(99,102,241,0.15));
  border: 1px solid rgba(124,58,237,0.3); color: #c4b5fd; font-weight:600;
  margin-top: 4px;
}
.mobile-link.mobile-primary:hover { background: rgba(124,58,237,0.3); }

@media(max-width:640px){
  .nav { padding: 0 14px; height: 56px; }
  .nav-brand { font-size:0.95rem; gap:6px; white-space:nowrap; }
  .nav-brand svg { width:22px; height:22px; }
  .nav-desktop { display:none !important; }
  .nav-mobile  { display:flex; }
  .credit-badge { font-size:0.72rem; padding:4px 10px; }
}
@media(min-width:641px){
  .mobile-menu { display:none !important; }
}

/* ── Buttons ───────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  width: 100%;
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius);
  font-size: 0.88rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  position: relative;
  white-space: nowrap;
  user-select: none;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #6d28d9);
  color: #fff;
  box-shadow: 0 0 0 1px rgba(124,58,237,0.3), 0 4px 12px rgba(124,58,237,0.25);
}
.btn-primary:hover:not(:disabled) {
  box-shadow: 0 0 0 1px rgba(124,58,237,0.5), 0 6px 20px rgba(124,58,237,0.4);
  transform: translateY(-1px);
}

.btn-outline {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-2);
  color: var(--text-2);
}
.btn-outline:hover:not(:disabled) {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.2);
  color: var(--text);
}

.btn-ghost {
  background: transparent;
  border: none;
  color: var(--text-muted);
}
.btn-ghost:hover { background: rgba(255,255,255,0.06); color: var(--text); }

.btn-sm { padding: 6px 14px; font-size: 0.8rem; border-radius: 8px; width: auto; }
.btn-xs { padding: 4px 10px; font-size: 0.74rem; border-radius: 6px; width: auto; }

.btn-pix  { background: linear-gradient(135deg, #0ea5e9, #0284c7); color: #fff; box-shadow: 0 4px 12px rgba(14,165,233,0.2); }
.btn-pix:hover  { box-shadow: 0 6px 20px rgba(14,165,233,0.35); transform: translateY(-1px); }
.btn-card { background: linear-gradient(135deg, var(--accent), #6d28d9); color: #fff; box-shadow: 0 4px 12px rgba(124,58,237,0.2); }
.btn-card:hover { box-shadow: 0 6px 20px rgba(124,58,237,0.35); transform: translateY(-1px); }
.btn-green-soft { background: var(--green-dim); border: 1px solid rgba(34,197,94,0.25); color: var(--green); }
.btn-green-soft:hover { background: rgba(34,197,94,0.2); }

.badge-popular {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 99px;
  background: linear-gradient(135deg, rgba(124,58,237,0.9), rgba(109,40,217,0.9));
  color: #fff;
  box-shadow: 0 0 12px rgba(124,58,237,0.4);
}

/* ── Cards ─────────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}

.card-heading {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.07em;
  margin-bottom: 16px;
}

.card-wide { max-width: none; }

/* ── Form inputs ───────────────────────────────────────────────────────────── */
.form-group { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.form-group label { font-size: 0.8rem; font-weight: 500; color: var(--text-muted); }

input[type=text], input[type=email], input[type=password], input[type=url],
input[type=number], select, textarea {
  width: 100%;
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), background 0.2s var(--ease);
}

input:focus, select:focus, textarea:focus {
  border-color: rgba(124,58,237,0.5);
  background: rgba(124,58,237,0.04);
  box-shadow: 0 0 0 3px rgba(124,58,237,0.12);
}

input::placeholder { color: var(--text-subtle); }
select { cursor: pointer; }

/* ── Alerts ────────────────────────────────────────────────────────────────── */
.alert {
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 0.83rem;
  line-height: 1.5;
  display: none;
  animation: fade-in 0.2s var(--ease);
}
.alert.visible { display: block; }
.alert.error   { background: var(--red-dim); border: 1px solid rgba(239,68,68,0.25); color: #fca5a5; }
.alert.success { background: var(--green-dim); border: 1px solid rgba(34,197,94,0.25); color: #86efac; }
.alert.info    { background: var(--cyan-dim); border: 1px solid rgba(6,182,212,0.25); color: #67e8f9; }
.alert.warn    { background: var(--amber-dim); border: 1px solid rgba(245,158,11,0.25); color: #fcd34d; }

/* ── Credit badge ──────────────────────────────────────────────────────────── */
.credit-badge {
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: 99px;
  background: rgba(124,58,237,0.12);
  border: 1px solid rgba(124,58,237,0.25);
  color: var(--accent-3);
  transition: all 0.2s var(--ease);
}

/* ── Plan tags ─────────────────────────────────────────────────────────────── */
.plan-tag { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 0.72rem; font-weight: 600; }
.plan-tag.free    { background: rgba(113,113,122,0.15); color: var(--text-muted); border: 1px solid rgba(113,113,122,0.2); }
.plan-tag.basic   { background: var(--cyan-dim); color: var(--cyan); border: 1px solid rgba(6,182,212,0.25); }
.plan-tag.premium { background: rgba(124,58,237,0.15); color: var(--accent-3); border: 1px solid rgba(124,58,237,0.3); }
.plan-tag.pro     { background: var(--amber-dim); color: var(--amber); border: 1px solid rgba(245,158,11,0.25); }

/* ── Spinner ───────────────────────────────────────────────────────────────── */
.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.2);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

/* ── Table ─────────────────────────────────────────────────────────────────── */
table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
th {
  text-align: left;
  padding: 10px 14px;
  color: var(--text-muted);
  font-weight: 600;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
}
td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr { transition: background 0.15s var(--ease); }
tr:hover td { background: rgba(255,255,255,0.02); }

/* ── Page center ───────────────────────────────────────────────────────────── */
.page-center {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.page-center .card {
  width: 100%;
  max-width: 420px;
  animation: slide-up 0.3s var(--ease);
}

/* ── Auth pages ────────────────────────────────────────────────────────────── */
h1.logo {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 20%, var(--accent-3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 4px;
  text-align: center;
}

.subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 28px;
}

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.divider span { font-size: 0.76rem; color: var(--text-subtle); white-space: nowrap; }

.text-center { text-align: center; }
.text-sm { font-size: 0.82rem; color: var(--text-muted); }
.mt-2 { margin-top: 8px; }
.mt-4 { margin-top: 16px; }

/* ── Info row ──────────────────────────────────────────────────────────────── */
.info-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
@media(max-width:480px){ .info-row { grid-template-columns: 1fr; } }

.info-item {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 14px;
}
.info-lbl { font-size: 0.7rem; font-weight: 500; color: var(--text-subtle); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 4px; }
.info-val { font-size: 0.9rem; font-weight: 500; color: var(--text-2); }

/* ── Animations ────────────────────────────────────────────────────────────── */
@keyframes spin     { to { transform: rotate(360deg); } }
@keyframes fade-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes slide-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slide-down { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 20px rgba(124,58,237,0.2), 0 0 0 1px rgba(124,58,237,0.3); }
  50%       { box-shadow: 0 0 40px rgba(124,58,237,0.35), 0 0 0 1px rgba(124,58,237,0.5); }
}
@keyframes shimmer {
  from { background-position: -200% center; }
  to   { background-position: 200% center; }
}
