/* ── Premium Theme — Bruno Águas Fidelidade ── */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
  --gold: #f5c842;
  --gold-light: #fde68a;
  --gold-dark: #b8960c;
  --bg: #0d0f14;
  --bg-card: #13161e;
  --bg-card2: #1a1e2a;
  --border: rgba(255,255,255,0.07);
  --border-gold: rgba(245,200,66,0.3);
  --text: #f0f2f8;
  --text-muted: #6b7280;
  --text-sub: #9ca3af;
  --sky: #38bdf8;
  --emerald: #34d399;
  --red: #f87171;
}

* { box-sizing: border-box; }

.hidden { display: none !important; }
.mx-auto { margin-left: auto; margin-right: auto; }
.max-w-sm { max-width: 24rem; }

body {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Background mesh gradient ── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(245,200,66,0.08) 0%, transparent 60%),
    radial-gradient(ellipse 60% 40% at 80% 80%, rgba(56,189,248,0.05) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.max-w-sm { position: relative; z-index: 1; }

/* ── Cards com glassmorphism ── */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.5rem;
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);
  transition: box-shadow 0.2s, transform 0.2s;
}

.card:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), inset 0 1px 0 rgba(255,255,255,0.07);
}

.card-gold {
  background: linear-gradient(135deg, rgba(245,200,66,0.12) 0%, rgba(245,200,66,0.04) 100%);
  border: 1px solid var(--border-gold);
  border-radius: 20px;
  padding: 1.5rem;
  box-shadow: 0 4px 24px rgba(245,200,66,0.08);
}

/* ── Inputs ── */
input, select {
  background: rgba(255,255,255,0.04) !important;
  border: 1px solid var(--border) !important;
  color: var(--text) !important;
  border-radius: 14px !important;
  padding: 0.85rem 1rem !important;
  font-size: 1rem !important;
  font-family: inherit !important;
  width: 100%;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input::placeholder { color: var(--text-muted) !important; }

input:focus, select:focus {
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px rgba(245,200,66,0.15) !important;
}

select option { background: #1a1e2a; color: var(--text); }

/* ── Botões ── */
.btn-primary {
  width: 100%;
  background: linear-gradient(135deg, #f5c842 0%, #e6a800 100%);
  color: #0d0f14;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 14px;
  padding: 1rem;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 16px rgba(245,200,66,0.3);
  letter-spacing: 0.01em;
}

.btn-primary:hover { opacity: 0.92; box-shadow: 0 6px 24px rgba(245,200,66,0.4); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); opacity: 1; }

.btn-success {
  width: 100%;
  background: linear-gradient(135deg, #34d399 0%, #059669 100%);
  color: #0d0f14;
  font-weight: 700;
  font-size: 1rem;
  border-radius: 14px;
  padding: 1rem;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.15s, box-shadow 0.15s;
  box-shadow: 0 4px 16px rgba(52,211,153,0.25);
}

.btn-success:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-success:active { transform: translateY(0); }

.btn-ghost {
  background: rgba(255,255,255,0.05);
  border: 1px solid var(--border);
  color: var(--text-sub);
  border-radius: 12px;
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  font-family: inherit;
}

.btn-ghost:hover { background: rgba(255,255,255,0.09); color: var(--text); }

/* ── Stepper (+ / −) ── */
.btn-step {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 14px;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.btn-step:hover { background: rgba(245,200,66,0.12); border-color: var(--border-gold); }

/* ── Labels ── */
.label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
}

/* ── Avatar ── */
.avatar {
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(245,200,66,0.2), rgba(245,200,66,0.05));
  border: 1.5px solid var(--border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--gold);
  flex-shrink: 0;
}

/* ── Progress bar ── */
.progress-track {
  width: 100%;
  background: rgba(255,255,255,0.06);
  border-radius: 999px;
  height: 10px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold) 0%, #f97316 100%);
  transition: width 0.6s cubic-bezier(0.4,0,0.2,1);
  box-shadow: 0 0 10px rgba(245,200,66,0.4);
}

/* ── Spinner ── */
.spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid rgba(245,200,66,0.15);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Stat cards ── */
.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 1.1rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.3);
}

.stat-label {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.stat-value-gold { font-size: 2.5rem; font-weight: 800; color: var(--gold); line-height: 1; }
.stat-value-green { font-size: 2.5rem; font-weight: 800; color: var(--emerald); line-height: 1; }

/* ── Nav links ── */
.nav-link {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  min-height: 44px;
  transition: color 0.15s;
}

.nav-link:hover { color: var(--gold); }

/* ── Atalho card ── */
.shortcut-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem;
  text-align: center;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-sub);
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 56px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.shortcut-card:hover {
  background: rgba(245,200,66,0.07);
  border-color: var(--border-gold);
  color: var(--gold);
}

/* ── Activity item ── */
.activity-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  transition: border-color 0.15s;
}

.activity-item:hover { border-color: rgba(255,255,255,0.12); }

/* ── Cliente card (lista) ── */
.cliente-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, transform 0.15s;
}

.cliente-card:hover {
  background: var(--bg-card2);
  border-color: rgba(255,255,255,0.12);
  transform: translateY(-1px);
}

/* ── Erro ── */
.erro-box {
  background: rgba(248,113,113,0.08);
  border: 1px solid rgba(248,113,113,0.25);
  color: #fca5a5;
  border-radius: 14px;
  padding: 0.85rem 1rem;
  font-size: 0.875rem;
}

/* ── Paginação ── */
.btn-page {
  padding: 0.5rem 1rem;
  border-radius: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-sub);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  min-height: 44px;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  font-family: inherit;
}

.btn-page:hover:not(:disabled) { background: var(--bg-card2); border-color: rgba(255,255,255,0.12); color: var(--text); }
.btn-page:disabled { opacity: 0.35; cursor: not-allowed; }

/* ── Selo grid ── */
.selo-grid { font-size: 1.75rem; letter-spacing: 4px; line-height: 2.2rem; word-break: break-all; }

/* ── Título hero ── */
.hero-title { font-size: 2rem; font-weight: 800; color: var(--text); line-height: 1.1; }
.hero-sub { font-size: 0.85rem; color: var(--text-muted); margin-top: 0.25rem; }

/* ── Divider ── */
.divider { height: 1px; background: var(--border); margin: 1rem 0; }

/* ── Badge ── */
.badge-gold {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: rgba(245,200,66,0.12);
  border: 1px solid var(--border-gold);
  color: var(--gold);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── Animações de entrada ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-up { animation: fadeUp 0.4s ease both; }
.fade-up-2 { animation: fadeUp 0.4s 0.08s ease both; }
.fade-up-3 { animation: fadeUp 0.4s 0.16s ease both; }
.fade-up-4 { animation: fadeUp 0.4s 0.24s ease both; }

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 999px; }

/* ── Bottom Nav ── */
#bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: 4rem;
  background: rgba(13,15,20,0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 100;
  padding: 0 0.25rem;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.2rem;
  color: var(--text-muted);
  text-decoration: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0.4rem 0.75rem;
  border-radius: 12px;
  min-width: 3rem;
  min-height: 3rem;
  transition: color 0.15s, background 0.15s;
}

.nav-item svg { flex-shrink: 0; }

.nav-item:hover {
  color: var(--text-sub);
  background: rgba(255,255,255,0.05);
}

.nav-item.nav-ativo {
  color: var(--gold);
}

.nav-item.nav-ativo svg {
  filter: drop-shadow(0 0 6px rgba(245,200,66,0.5));
}

/* Botão central elevado */
.nav-central {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold) 0%, #e6a800 100%);
  box-shadow: 0 4px 20px rgba(245,200,66,0.4);
  margin-bottom: 1rem;
  flex-shrink: 0;
  transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
}

.nav-central:hover {
  transform: scale(1.07);
  box-shadow: 0 6px 28px rgba(245,200,66,0.55);
}

.nav-central:active { transform: scale(0.95); }
