/* ============================================
   BarberPro — Design System
   Tema: Barbearia Premium (Carvão + Dourado)
   ============================================ */

:root {
  --bg: #0a0a0a;
  --bg-soft: #111111;
  --bg-secondary: #161616;
  --bg-card: #1a1a1a;
  --bg-card-hover: #1f1f1f;
  --border: #2a2a2a;
  --border-light: #333333;

  --gold: #d4af37;
  --gold-light: #f4c430;
  --amber: #ffb020;
  --amber-deep: #e8940f;

  --text: #f5f5f0;
  --text-muted: #a8a8a2;
  --text-dim: #6f6f6a;

  --success: #34d399;
  --danger: #f87171;
  --info: #60a5fa;

  --gradient-gold: linear-gradient(135deg, #f4c430 0%, #d4af37 50%, #b8860b 100%);
  --gradient-gold-soft: linear-gradient(135deg, rgba(244,196,48,0.15) 0%, rgba(212,175,55,0.05) 100%);
  --gradient-dark: linear-gradient(180deg, #0a0a0a 0%, #141414 100%);

  --shadow-soft: 0 4px 24px rgba(0,0,0,0.4);
  --shadow-gold: 0 8px 30px rgba(212,175,55,0.25);
  --radius: 16px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, .font-display {
  font-family: 'Sora', sans-serif;
}

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-soft); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold); }

/* ---------- Utilities ---------- */
.text-gradient-gold {
  background: var(--gradient-gold);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bg-noise {
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,0.035) 1px, transparent 0);
  background-size: 22px 22px;
}

.glass {
  background: rgba(26,26,26,0.6);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border: 1px solid rgba(255,255,255,0.06);
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}

.card:hover {
  border-color: rgba(212,175,55,0.35);
  box-shadow: var(--shadow-gold);
}

.card-flat {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.btn-gold {
  background: var(--gradient-gold);
  color: #0a0a0a;
  font-weight: 700;
  border-radius: 999px;
  transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
  box-shadow: 0 6px 20px rgba(212,175,55,0.3);
}
.btn-gold:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 10px 28px rgba(212,175,55,0.4); }
.btn-gold:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  border: 1px solid var(--border-light);
  color: var(--text);
  border-radius: 999px;
  transition: all .2s ease;
}
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-light); background: rgba(212,175,55,0.06); }

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
}
.badge-gold { background: rgba(212,175,55,0.12); color: var(--gold-light); border: 1px solid rgba(212,175,55,0.3); }
.badge-green { background: rgba(52,211,153,0.12); color: var(--success); border: 1px solid rgba(52,211,153,0.3); }
.badge-red { background: rgba(248,113,113,0.12); color: var(--danger); border: 1px solid rgba(248,113,113,0.3); }
.badge-blue { background: rgba(96,165,250,0.12); color: var(--info); border: 1px solid rgba(96,165,250,0.3); }
.badge-muted { background: var(--bg-secondary); color: var(--text-muted); border: 1px solid var(--border); }

/* ---------- Animations ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
.animate-fade-up { animation: fadeUp .7s cubic-bezier(.2,.8,.2,1) both; }

@keyframes floaty {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-14px); }
}
.animate-floaty { animation: floaty 5s ease-in-out infinite; }

@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(212,175,55,0.35); }
  50% { box-shadow: 0 0 0 12px rgba(212,175,55,0); }
}
.animate-pulse-glow { animation: pulseGlow 2.4s ease-in-out infinite; }

@keyframes shimmer {
  0% { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.shimmer {
  background: linear-gradient(90deg, transparent, rgba(212,175,55,0.15), transparent);
  background-size: 400px 100%;
  animation: shimmer 2.6s infinite;
}

/* Animação de entrada das seções.
   Só escondemos quando há JavaScript (classe .js no <html>) — se o script falhar
   ou demorar, o conteúdo aparece normalmente em vez de deixar a página preta. */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.js .reveal.in-view { opacity: 1; transform: translateY(0); }

/* Quem pede menos movimento no sistema vê tudo direto, sem animação. */
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .animate-fade-up, .animate-floaty, .animate-pulse-glow { animation: none !important; }
  html { scroll-behavior: auto !important; }
}

/* ---------- Landing hero blob ---------- */
.hero-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: .35;
  pointer-events: none;
}

/* ---------- Nav link underline ---------- */
.nav-link { position: relative; color: var(--text-muted); transition: color .2s ease; }
.nav-link:hover { color: var(--text); }
.nav-link::after {
  content: '';
  position: absolute; left: 0; bottom: -4px;
  width: 0; height: 2px;
  background: var(--gradient-gold);
  transition: width .25s ease;
}
.nav-link:hover::after { width: 100%; }

/* ---------- Pricing toggle ---------- */
.toggle-switch { width: 52px; height: 28px; background: var(--bg-secondary); border: 1px solid var(--border-light); border-radius: 999px; position: relative; cursor: pointer; transition: background .2s; }
.toggle-switch .dot { position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: var(--gradient-gold); transition: transform .25s ease; }
.toggle-switch.on { background: rgba(212,175,55,0.18); }
.toggle-switch.on .dot { transform: translateX(24px); }

/* ============================================
   PAINEL (App interno)
   ============================================ */

.sidebar {
  background: var(--bg-soft);
  border-right: 1px solid var(--border);
}

.side-link {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 16px; border-radius: 12px;
  color: var(--text-muted); font-weight: 500; font-size: 14px;
  transition: all .2s ease;
  border: 1px solid transparent;
}
.side-link:hover { background: var(--bg-card); color: var(--text); }
.side-link.active {
  background: var(--gradient-gold-soft);
  color: var(--gold-light);
  border-color: rgba(212,175,55,0.25);
  font-weight: 600;
}
.side-link.active i { color: var(--gold-light); }

.stat-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  position: relative;
  overflow: hidden;
}
.stat-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: var(--gradient-gold);
  opacity: 0; transition: opacity .2s ease;
}
.stat-card:hover::before { opacity: 1; }

/* ---- Calendar ---- */
.cal-day {
  aspect-ratio: 1/1;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px; font-size: 13px; font-weight: 500;
  cursor: pointer; position: relative;
  color: var(--text-muted);
  transition: all .15s ease;
  border: 1px solid transparent;
}
.cal-day:hover { background: var(--bg-card-hover); color: var(--text); }
.cal-day.today { border-color: var(--gold); color: var(--gold-light); font-weight: 700; }
.cal-day.selected { background: var(--gradient-gold); color: #0a0a0a; font-weight: 700; }
.cal-day.blocked { color: var(--text-dim); text-decoration: line-through; cursor: not-allowed; }
.cal-day.blocked:hover { background: transparent; }
.cal-day .dot-mark { position: absolute; bottom: 4px; width: 4px; height: 4px; border-radius: 50%; background: var(--gold); }
.cal-day.other-month { color: var(--text-dim); opacity: .35; }

/* ---- Time slots ---- */
.slot {
  padding: 10px 6px; border-radius: 10px; text-align: center;
  font-size: 13px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--border); color: var(--text-muted);
  transition: all .15s ease;
}
.slot:hover:not(.taken) { border-color: var(--gold); color: var(--gold-light); background: rgba(212,175,55,0.06); }
.slot.selected { background: var(--gradient-gold); color: #0a0a0a; border-color: transparent; }
.slot.taken { opacity: .3; text-decoration: line-through; cursor: not-allowed; }

/* ---- Step indicator ---- */
.step-dot {
  width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 13px;
  background: var(--bg-card); border: 1px solid var(--border-light); color: var(--text-muted);
  transition: all .25s ease;
}
.step-dot.active { background: var(--gradient-gold); color: #0a0a0a; border-color: transparent; }
.step-dot.done { background: rgba(52,211,153,0.15); color: var(--success); border-color: rgba(52,211,153,0.4); }
.step-line { flex: 1; height: 2px; background: var(--border-light); position: relative; overflow: hidden; }
.step-line::after { content:''; position:absolute; inset:0; background: var(--gradient-gold); transform: scaleX(0); transform-origin: left; transition: transform .3s ease; }
.step-line.filled::after { transform: scaleX(1); }

/* ---- Barber card select ---- */
.pick-card { cursor: pointer; border: 2px solid var(--border); transition: all .2s ease; }
.pick-card:hover { border-color: rgba(212,175,55,0.4); }
.pick-card.selected { border-color: var(--gold); background: var(--gradient-gold-soft); }

/* ---- Chat bubble (WhatsApp preview) ---- */
.wa-bg {
  background-color: #0b141a;
  background-image:
    radial-gradient(circle at 20% 20%, rgba(212,175,55,0.05) 0, transparent 40%),
    radial-gradient(circle at 80% 60%, rgba(212,175,55,0.04) 0, transparent 40%);
}
.wa-bubble {
  max-width: 84%;
  padding: 8px 10px 6px 10px;
  border-radius: 10px;
  font-size: 13.5px;
  line-height: 1.4;
  position: relative;
  box-shadow: 0 1px 1px rgba(0,0,0,.3);
}
.wa-bubble.out { background: #144d38; color: #e9edef; margin-left: auto; border-top-right-radius: 2px; }
.wa-bubble.in { background: #202c33; color: #e9edef; margin-right: auto; border-top-left-radius: 2px; }

/* ---- Toggle small (reminders) ---- */
.mini-toggle { width: 40px; height: 22px; border-radius: 999px; background: var(--bg-secondary); border: 1px solid var(--border-light); position: relative; cursor: pointer; transition: background .2s; flex-shrink:0; }
.mini-toggle .dot { position: absolute; top: 1px; left: 1px; width: 18px; height: 18px; border-radius: 50%; background: var(--text-dim); transition: all .2s ease; }
.mini-toggle.on { background: rgba(52,211,153,0.18); border-color: rgba(52,211,153,0.4); }
.mini-toggle.on .dot { transform: translateX(18px); background: var(--success); }

/* ---- Progress bar ---- */
.bar-track { background: var(--bg-secondary); border-radius: 999px; overflow: hidden; height: 8px; }
.bar-fill { height: 100%; background: var(--gradient-gold); border-radius: 999px; transition: width 1s ease; }

/* ---- Modal ---- */
.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.65);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; opacity: 0; pointer-events: none; transition: opacity .2s ease;
  padding: 16px;
}
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal-box {
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: 20px; max-width: 560px; width: 100%;
  transform: scale(.95) translateY(10px); transition: transform .25s ease;
  max-height: 90vh; overflow-y: auto;
}
.modal-overlay.open .modal-box { transform: scale(1) translateY(0); }

/* ---- Inputs ---- */
.field {
  width: 100%; background: var(--bg-secondary); border: 1px solid var(--border-light);
  border-radius: 10px; padding: 10px 14px; color: var(--text); font-size: 14px;
  transition: border-color .2s ease;
}
.field:focus { outline: none; border-color: var(--gold); }
.field::placeholder { color: var(--text-dim); }
label.field-label { font-size: 12px; font-weight: 600; color: var(--text-muted); margin-bottom: 6px; display: block; text-transform: uppercase; letter-spacing: .04em; }

/* ---------- Tabs (configurações) ---------- */
.tab-btn { color: var(--text-dim); transition: color .2s, background .2s; }
.tab-btn:hover { color: var(--text-muted); }
.tab-btn.active { background: var(--gradient-gold); color: #0a0a0a; }

/* mobile sidebar */
@media (max-width: 1023px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; z-index: 60; transform: translateX(-100%); transition: transform .25s ease; }
  .sidebar.open { transform: translateX(0); }
}

/* ---------- Campo de senha com botão "ver senha" ---------- */
.pass-wrap { position: relative; }
.pass-wrap .field { padding-right: 44px; }

.pass-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  background: transparent; border: none; border-radius: 8px; padding: 0;
  color: var(--text-dim); cursor: pointer;
  transition: color .2s ease, background .2s ease;
}
.pass-toggle:hover { color: var(--gold); background: rgba(212,175,55,0.08); }
.pass-toggle:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; color: var(--gold); }

/* esconde o olho nativo do Edge/IE para não duplicar o ícone */
.pass-wrap .field::-ms-reveal,
.pass-wrap .field::-ms-clear { display: none; }

/* ---------- Avisos na tela (toast) ---------- */
#bp-toasts {
  position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%);
  z-index: 200; display: flex; flex-direction: column; gap: 10px;
  width: min(420px, calc(100vw - 32px)); pointer-events: none;
}
.bp-toast {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--bg-card); border: 1px solid var(--border-light);
  border-radius: 14px; padding: 13px 16px; color: var(--text);
  font-size: 14px; line-height: 1.45; box-shadow: 0 10px 34px rgba(0,0,0,.55);
  opacity: 0; transform: translateY(14px); transition: opacity .3s ease, transform .3s ease;
}
.bp-toast-in { opacity: 1; transform: translateY(0); }
.bp-toast-ico {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; margin-top: 1px;
}
.bp-toast-ok    { border-color: rgba(52,211,153,.35); }
.bp-toast-ok    .bp-toast-ico { background: rgba(52,211,153,.15); color: var(--success); }
.bp-toast-erro  { border-color: rgba(248,113,113,.35); }
.bp-toast-erro  .bp-toast-ico { background: rgba(248,113,113,.15); color: var(--danger); }
.bp-toast-info  .bp-toast-ico { background: rgba(212,175,55,.15); color: var(--gold); }

/* ---------- Botão flutuante do WhatsApp ---------- */
.bp-wa {
  position: fixed; right: 18px; bottom: 18px; z-index: 150;
  display: inline-flex; align-items: center; gap: 0;
  background: #25d366; color: #06251a;
  border-radius: 999px; padding: 14px; text-decoration: none;
  box-shadow: 0 8px 26px rgba(37,211,102,.38);
  transition: transform .2s ease, box-shadow .2s ease, gap .25s ease, padding .25s ease;
}
.bp-wa:hover, .bp-wa:focus-visible {
  transform: translateY(-2px); box-shadow: 0 12px 32px rgba(37,211,102,.5);
  gap: 9px; padding: 14px 20px 14px 16px;
}
.bp-wa:focus-visible { outline: 3px solid rgba(255,255,255,.7); outline-offset: 2px; }
.bp-wa-txt {
  max-width: 0; overflow: hidden; white-space: nowrap;
  font-weight: 700; font-size: 14px; transition: max-width .25s ease;
}
.bp-wa:hover .bp-wa-txt, .bp-wa:focus-visible .bp-wa-txt { max-width: 160px; }
@media (max-width: 640px) { .bp-wa { right: 14px; bottom: 14px; padding: 13px; } }

/* ---------- Aviso de cookies (LGPD) ---------- */
.bp-cookies {
  position: fixed; left: 50%; bottom: 16px; transform: translate(-50%, 20px);
  z-index: 190; width: min(680px, calc(100vw - 24px));
  background: rgba(22,20,15,.97); backdrop-filter: blur(12px);
  border: 1px solid var(--border-light); border-radius: 16px;
  padding: 16px 20px; display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  box-shadow: 0 12px 40px rgba(0,0,0,.6);
  opacity: 0; transition: opacity .3s ease, transform .3s ease;
}
.bp-cookies-in { opacity: 1; transform: translate(-50%, 0); }
.bp-cookies-txt { font-size: 13.5px; color: var(--text-muted); line-height: 1.55; margin: 0; flex: 1 1 300px; }
.bp-cookies-txt a { color: var(--gold); text-decoration: underline; text-underline-offset: 2px; }
.bp-cookies-btns { display: flex; gap: 10px; flex: none; }
.bp-cookies-btns button {
  font-size: 13.5px; font-weight: 600; border-radius: 10px;
  padding: 10px 20px; cursor: pointer; border: 1px solid var(--border-light);
  background: transparent; color: var(--text); transition: background .2s ease, border-color .2s ease;
}
.bp-btn-recusar:hover { background: rgba(255,255,255,.06); }
.bp-btn-aceitar { background: var(--gradient-gold); color: #0a0a0a; border-color: transparent; }
.bp-btn-aceitar:hover { filter: brightness(1.08); }
.bp-cookies-btns button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (max-width: 560px) {
  .bp-cookies { padding: 14px 16px; gap: 12px; }
  .bp-cookies-btns { width: 100%; }
  .bp-cookies-btns button { flex: 1; }
}

/* ---------- Foco visível (acessibilidade) ---------- */
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--gold); outline-offset: 2px; border-radius: 6px;
}

/* Texto só para leitores de tela (invisível na página) */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ---------- Cabeçalho do painel: nunca empurrar conteúdo para fora ----------
   O cabeçalho tem altura fixa e é lado a lado. Sem estas regras, um título
   comprido empurra o botão da direita para fora e a tela passa a rolar na
   horizontal no celular. */
header.glass.sticky { gap: 12px; }
header.glass.sticky > *:first-child { min-width: 0; }   /* deixa o título encolher */
header.glass.sticky > *:last-child  { flex: none; }     /* botão/etiqueta não deforma */
header.glass.sticky h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 420px) {
  header.glass.sticky h1 + p { display: none; }          /* subtítulo sai em tela estreita */
}

/* ---- Glows amarelos "respirando" (pulsar lento p/ dar vida) ---- */
/* opacidade only nos glows grandes: sem mexer em transform (não quebra o -translate do glow central) */
.hero-glow {
  animation: glow-breathe 5s ease-in-out infinite;
}
.hero-glow:nth-of-type(1) { animation-duration: 5s;   animation-delay: 0s; }
.hero-glow:nth-of-type(2) { animation-duration: 6.5s; animation-delay: -2.2s; }

@keyframes glow-breathe {
  0%, 100% { opacity: .16; }
  50%      { opacity: .60; }
}

/* Glow do card de preços: respira em opacidade + leve escala (esse não tem transform próprio) */
.soft-pulse {
  animation: soft-breathe 5.5s ease-in-out infinite;
}
@keyframes soft-breathe {
  0%, 100% { opacity: .35; transform: scale(1); }
  50%      { opacity: 1;   transform: scale(1.15); }
}
