/* =========================================================
   Booking Express — tema Dark/Gold, mobile-first
   Variáveis --gold e --bg são sobrescritas por barbearia
   ========================================================= */
:root {
  --gold: #D4A24C;
  --bg: #0E0E10;
  --surface: rgba(255, 255, 255, .04);
  --surface-2: rgba(255, 255, 255, .08);
  --border: rgba(255, 255, 255, .09);
  --text: #F3F1EC;
  --muted: #9A978F;
  --danger: #E5484D;
  --ok: #3DD68C;
  --radius: 16px;
  --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Playfair Display', Georgia, serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100dvh; font-family: var(--font); color: var(--text);
  background: radial-gradient(1200px 600px at 50% -200px, color-mix(in srgb, var(--gold) 18%, transparent), transparent 60%), var(--bg);
  -webkit-font-smoothing: antialiased; padding-bottom: calc(96px + env(safe-area-inset-bottom));
}
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.hp { position: absolute; left: -9999px; opacity: 0; }

/* Hero */
.hero { max-width: 640px; margin: 0 auto; padding: calc(20px + env(safe-area-inset-top)) 20px 8px; }
.hero__brand { display: flex; gap: 14px; align-items: center; }
.hero__logo { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; border: 2px solid var(--gold); flex: none; }
.hero__logo--ph { display: grid; place-items: center; font: 700 28px var(--display); color: var(--gold); background: var(--surface-2); }
.hero__title { margin: 0; font: 700 1.55rem/1.15 var(--display); letter-spacing: .2px; }
.hero__meta { margin: 4px 0 0; color: var(--muted); font-size: .85rem; }
.hero__actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; font-size: .8rem; font-weight: 600;
  color: var(--text); text-decoration: none; background: var(--surface); border: 1px solid var(--border); }
.chip--gold { color: var(--bg); background: var(--gold); border-color: var(--gold); }

/* Steps */
.steps { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px;
  max-width: 640px; margin: 12px auto 0; padding: 10px 20px; background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.steps__item { font-size: .7rem; text-align: center; color: var(--muted); padding-top: 8px; border-top: 3px solid var(--surface-2); transition: .25s; }
.steps__item.is-active, .steps__item.is-done { color: var(--text); border-color: var(--gold); }

/* Layout */
.app { max-width: 640px; margin: 0 auto; padding: 8px 20px 20px; }
.panel { animation: in .28s ease both; }
.panel__title { font-size: 1.15rem; font-weight: 700; margin: 12px 0 14px; }
@keyframes in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* Serviços */
.list { display: grid; gap: 10px; }
.card { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; text-align: left;
  padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); transition: .18s; }
.card:active { transform: scale(.985); }
.card.is-selected { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 10%, transparent); box-shadow: 0 0 0 1px var(--gold) inset; }
.card__name { font-weight: 600; }
.card__desc { color: var(--muted); font-size: .8rem; margin-top: 3px; }
.card__meta { text-align: right; flex: none; }
.card__price { color: var(--gold); font-weight: 700; }
.card__dur { color: var(--muted); font-size: .75rem; }
.card__tick { position: absolute; top: 10px; right: 10px; width: 20px; height: 20px; border-radius: 50%; display: none;
  place-items: center; font-size: 12px; background: var(--gold); color: var(--bg); font-weight: 800; }
.card.is-selected .card__tick { display: grid; }
.card.is-selected .card__meta { padding-right: 18px; }

/* Barbeiros */
.barbers { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.barber { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 18px 10px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border); text-align: center; transition: .18s; }
.barber.is-selected { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold) inset; background: color-mix(in srgb, var(--gold) 10%, transparent); }
.barber__img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; background: var(--surface-2); display: grid; place-items: center;
  font: 700 22px var(--display); color: var(--gold); }
.barber__name { font-weight: 600; font-size: .9rem; }
.barber__bio { color: var(--muted); font-size: .72rem; }

/* Datas e horários */
.days { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 12px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.days::-webkit-scrollbar { display: none; }
.day { flex: none; width: 62px; padding: 10px 0; border-radius: 14px; text-align: center; background: var(--surface); border: 1px solid var(--border); scroll-snap-align: start; }
.day__wd { font-size: .68rem; text-transform: uppercase; color: var(--muted); letter-spacing: .5px; }
.day__n { font-size: 1.25rem; font-weight: 700; margin-top: 2px; }
.day.is-selected { background: var(--gold); border-color: var(--gold); color: var(--bg); }
.day.is-selected .day__wd { color: inherit; }
.slots { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 6px; }
@media (min-width: 480px) { .slots { grid-template-columns: repeat(5, 1fr); } }
.slot { padding: 12px 0; border-radius: 12px; font-weight: 600; font-variant-numeric: tabular-nums; background: var(--surface); border: 1px solid var(--border); }
.slot.is-selected { background: var(--gold); color: var(--bg); border-color: var(--gold); }
.empty { grid-column: 1 / -1; padding: 28px 12px; text-align: center; color: var(--muted); border: 1px dashed var(--border); border-radius: var(--radius); }

/* Form */
.form { display: grid; gap: 14px; margin-top: 16px; }
.field { display: grid; gap: 6px; font-size: .82rem; color: var(--muted); }
.field input { width: 100%; padding: 15px 16px; font: 500 1rem var(--font); color: var(--text); background: var(--surface);
  border: 1px solid var(--border); border-radius: 14px; outline: none; transition: .18s; }
.field input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold) 25%, transparent); }
.hint { margin: 0; color: var(--muted); font-size: .78rem; }
.summary { display: grid; gap: 8px; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.summary__row { display: flex; justify-content: space-between; gap: 12px; font-size: .9rem; }
.summary__row span:first-child { color: var(--muted); }
.summary__row--total { padding-top: 8px; border-top: 1px solid var(--border); font-weight: 700; }
.summary__row--total span:last-child { color: var(--gold); }

/* CTA fixo */
.cta { position: fixed; inset: auto 0 0 0; z-index: 10; display: flex; align-items: center; gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--border); }
.cta__info { flex: 1; font-size: .8rem; color: var(--muted); line-height: 1.3; min-width: 0; }
.cta__info strong { display: block; color: var(--text); font-size: .95rem; }
.btn { border: 0; border-radius: 14px; padding: 15px 22px; font-weight: 700; transition: .18s; text-align: center; text-decoration: none; display: inline-block; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn--gold { background: var(--gold); color: var(--bg); min-width: 140px; box-shadow: 0 6px 20px color-mix(in srgb, var(--gold) 35%, transparent); }
.btn--gold:not(:disabled):active { transform: scale(.97); }
.btn--back { background: var(--surface-2); padding: 15px 18px; }
.btn--ghost { background: transparent; color: var(--muted); border: 1px solid var(--border); width: 100%; margin-top: 10px; }
.btn.is-loading { pointer-events: none; opacity: .7; }

/* Sucesso */
.panel--success { text-align: center; padding-top: 24px; }
.check { width: 76px; height: 76px; margin: 0 auto; border-radius: 50%; display: grid; place-items: center; font-size: 38px; font-weight: 800;
  background: var(--gold); color: var(--bg); animation: pop .45s cubic-bezier(.2, 1.6, .4, 1) both; }
.panel--success .summary { text-align: left; margin-top: 8px; }
@keyframes pop { from { transform: scale(0); } to { transform: scale(1); } }

/* Toast / skeleton */
.toast { position: fixed; left: 50%; bottom: calc(100px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20;
  max-width: 90vw; padding: 12px 18px; border-radius: 12px; background: var(--danger); color: #fff; font-size: .88rem; box-shadow: var(--shadow); }
.skeleton { height: 72px; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%);
  background-size: 200% 100%; animation: sk 1.2s infinite; }
@keyframes sk { to { background-position: -200% 0; } }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

