/* Página de agendamento do HFade — visual de app, preto e branco com brilho suave */
:root {
  --bg: #000;
  --card: #050505;
  --linha: rgba(var(--tinta-rgb), .16);
  --texto: var(--tinta);
  --muted: rgba(var(--tinta-rgb), .62);
  --brilho: 0 0 18px rgba(var(--tinta-rgb), .14);
  --brilho-forte: 0 0 22px rgba(var(--tinta-rgb), .28);
  --tinta: #fff;            /* cor dos destaques (pílulas, cartões claros) */
  --tinta-rgb: 255, 255, 255;
  --sobre-tinta: #000;      /* texto sobre os destaques = cor do fundo */
  --fundo-rgb: 0, 0, 0;
  --barra: #0b0b0b;
  --folha: #0a0a0a;
  --card-2: #151515;
  --extra-foto: #e9e9e9;
  --erro: #ff8b85;
  --cor: #ffffff;           /* cor da barbearia (botão de confirmar) */
  --texto-sobre-cor: #000;
  --raio: 22px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }
html { -webkit-tap-highlight-color: transparent; }
body { background: var(--bg); color: var(--texto); font-family: "Lexend", system-ui, sans-serif; line-height: 1.4; -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; text-decoration: none; }
svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex-shrink: 0; }

/* Barra do topo */
.barra {
  position: sticky; top: 0; z-index: 40; display: flex; align-items: center; justify-content: space-between;
  height: 60px; padding: 0 20px; background: linear-gradient(var(--barra), var(--sobre-tinta));
  box-shadow: 0 6px 24px rgba(var(--fundo-rgb), .8);
}
.barra__titulo { font-weight: 300; font-size: 1.05rem; letter-spacing: .28em; text-transform: uppercase; }
.barra__sair svg { width: 26px; height: 26px; }

/* Estrutura */
.app { max-width: 560px; margin: 0 auto; padding: 0 20px calc(120px + env(safe-area-inset-bottom)); overflow-x: clip; }
.view { animation: entrar .25s ease; }
@keyframes entrar { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.view--centro { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; }
.view--centro h1 { font-weight: 600; font-size: 1.6rem; }
.view--centro p { color: var(--muted); max-width: 340px; }
.girando { width: 38px; height: 38px; border-radius: 50%; border: 3px solid var(--linha); border-top-color: var(--tinta); animation: girar .8s linear infinite; }
@keyframes girar { to { transform: rotate(360deg); } }
.titulo-view { font-weight: 500; font-size: 1.4rem; margin: 28px 0 8px; }
.dica { color: var(--muted); font-size: .92rem; }

/* Pílulas (botões) */
.pilula {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  padding: 15px 22px; border-radius: 999px; border: 1.5px solid rgba(var(--tinta-rgb), .7);
  background: var(--sobre-tinta); color: var(--tinta); font-weight: 500; font-size: 1rem; box-shadow: var(--brilho);
}
.pilula--clara { background: var(--tinta); color: var(--sobre-tinta); border-color: var(--tinta); }
.pilula--cor { background: var(--cor); color: var(--texto-sobre-cor); border-color: var(--cor); }
.pilula:disabled { opacity: .55; cursor: wait; }
.view--centro .pilula { max-width: 320px; }

/* ===== 1. Vitrine (logo e serviços) ===== */
.vitrine { position: relative; text-align: center; padding: 36px 0 28px; }
.vitrine__capa {
  position: absolute; inset: 0 -20px; z-index: -1; background: center / cover no-repeat;
  mask-image: linear-gradient(#000 0%, rgba(0, 0, 0, .55) 45%, transparent 100%);
  -webkit-mask-image: linear-gradient(#000 0%, rgba(0, 0, 0, .55) 45%, transparent 100%);
  opacity: .55;
}
.vitrine__logo { width: min(64vw, 300px); aspect-ratio: 1; margin: 0 auto; display: grid; place-items: center; }
.vitrine__logo img { width: 100%; height: 100%; object-fit: contain; }
.vitrine__logo--inicial { width: 120px; border-radius: 34px; background: var(--tinta); color: var(--sobre-tinta); font-weight: 700; font-size: 3.4rem; box-shadow: var(--brilho-forte); }
.vitrine__nome { font-weight: 600; font-size: 1.5rem; margin-top: 14px; }
.vitrine__nome--oculto { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); margin: 0; }
.vitrine__desc { color: var(--muted); margin: 10px auto 0; max-width: 420px; font-size: .95rem; }
.vitrine__links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.vitrine__links a { font-size: .82rem; border: 1px solid var(--linha); border-radius: 999px; padding: 5px 14px; color: var(--muted); }
.aviso-fechado { text-align: center; color: var(--muted); border: 1px dashed var(--linha); border-radius: 16px; padding: 14px; margin-bottom: 18px; }

.servicos { display: flex; flex-direction: column; gap: 18px; }
.servico {
  display: flex; align-items: stretch; width: 100%; text-align: left; min-height: 150px;
  background: var(--card); border-radius: var(--raio); box-shadow: var(--brilho); transition: box-shadow .2s, transform .2s;
}
.servico:active { transform: scale(.99); }
.servico.selecionado { box-shadow: var(--brilho-forte), inset 0 0 0 1.5px rgba(var(--tinta-rgb), .8); }
.servico__foto { width: 38%; flex-shrink: 0; border-radius: var(--raio) 10px 10px var(--raio); background: var(--card-2) center / cover no-repeat; display: grid; place-items: center; color: rgba(var(--tinta-rgb), .25); }
.servico__foto svg { width: 40px; height: 40px; }
.servico__info { flex: 1; min-width: 0; padding: 18px 12px 18px 18px; display: flex; flex-direction: column; justify-content: center; gap: 4px; }
.servico__nome { font-weight: 700; font-size: 1.2rem; text-transform: uppercase; letter-spacing: .02em; line-height: 1.15; }
.servico__preco { font-size: 1.05rem; }
.servico__tempo { display: flex; align-items: center; gap: 6px; font-size: 1rem; }
.servico__tempo svg { width: 19px; height: 19px; }
.servico__desc { color: rgba(var(--tinta-rgb), .85); font-size: .86rem; margin-top: 6px; }
.servico__marca { align-self: center; margin-right: 16px; width: 30px; height: 30px; border-radius: 50%; border: 2.5px solid var(--tinta); display: grid; place-items: center; flex-shrink: 0; }
.servico__marca svg { width: 18px; height: 18px; stroke-width: 3; opacity: 0; }
.servico.selecionado .servico__marca { background: var(--tinta); color: var(--sobre-tinta); }
.servico.selecionado .servico__marca svg { opacity: 1; }

.avancar {
  position: fixed; z-index: 45; right: max(20px, calc(50% - 260px)); bottom: calc(108px + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: 12px; padding: 12px 26px; border-radius: 999px;
  background: rgba(var(--fundo-rgb), .85); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); border: 1.5px solid rgba(var(--tinta-rgb), .8);
  font-size: 1.25rem; box-shadow: var(--brilho); animation: entrar .2s ease;
}

/* ===== 2. Agendar ===== */
#view-agendar { padding-top: 18px; position: relative; }
.voltar {
  position: absolute; left: -20px; top: 18px; width: 86px; height: 56px; border-radius: 0 999px 999px 0;
  background: var(--tinta); color: var(--sobre-tinta); display: grid; place-items: center; box-shadow: var(--brilho); z-index: 2;
}
.voltar svg { width: 30px; height: 30px; }
.sel-foto { width: 150px; height: 150px; margin: 0 auto; border-radius: 16px; background: var(--card-2) center / cover no-repeat; box-shadow: var(--brilho); display: grid; place-items: center; color: rgba(var(--tinta-rgb), .25); }
.sel-foto svg { width: 48px; height: 48px; }
.sel-card {
  display: flex; align-items: center; justify-content: center; gap: 18px; margin: 24px 0 0 -20px; width: 72%;
  background: var(--tinta); color: var(--sobre-tinta); border-radius: 0 999px 999px 0; padding: 12px 20px; box-shadow: var(--brilho);
}
.sel-card__texto { text-align: center; min-width: 0; }
.sel-card__texto strong { display: block; font-weight: 400; font-size: 1.2rem; text-transform: uppercase; }
.sel-card__texto span { font-size: .9rem; }
.sel-card__lixo { color: var(--sobre-tinta); }
.sel-card__lixo svg { width: 22px; height: 22px; }
.sel-desc { margin: 18px -20px 0 auto; width: 76%; background: var(--tinta); color: var(--sobre-tinta); border-radius: 999px 0 0 999px; padding: 12px 22px; box-shadow: var(--brilho); font-size: .95rem; }

.datas { display: flex; align-items: center; gap: 6px; margin: 26px 0 8px; }
.datas__seta { width: 36px; height: 48px; display: grid; place-items: center; color: var(--tinta); }
.datas__seta:disabled { opacity: .25; cursor: default; }
.datas__seta svg { width: 30px; height: 30px; }
.datas__grade { flex: 1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.data {
  background: var(--card); border-radius: 12px; padding: 8px 4px; text-align: center; box-shadow: var(--brilho);
  font-size: 1.05rem; line-height: 1.35; border: 1px solid rgba(var(--tinta-rgb), .06);
}
.data small { display: block; font-size: 1rem; }
.data.selecionado { background: var(--tinta); color: var(--sobre-tinta); }
.sem-datas { grid-column: 1 / -1; text-align: center; color: var(--muted); padding: 12px 0; }

.prof-pilula {
  display: flex; align-items: center; width: calc(100% - 20px); margin: 20px auto 0; text-align: left;
  background: var(--tinta); color: var(--sobre-tinta); border-radius: 999px; padding: 0 22px 0 0; box-shadow: var(--brilho); min-height: 64px;
}
.prof-pilula .avatar { width: 76px; height: 76px; margin: -6px 14px -6px -10px; }
.prof-pilula__texto { flex: 1; min-width: 0; }
.prof-pilula__texto strong { display: block; font-weight: 400; font-size: 1.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prof-pilula__texto small { font-size: .82rem; }
.avatar { flex-shrink: 0; border-radius: 50%; background: var(--card-2) center / cover no-repeat; display: grid; place-items: center; color: var(--tinta); font-weight: 600; font-size: 1.4rem; box-shadow: 0 0 0 2px var(--sobre-tinta), var(--brilho); }

.extras { margin: 22px -20px 0; background: var(--tinta); color: var(--sobre-tinta); padding: 20px 20px 22px; box-shadow: var(--brilho); }
.extras h2 { font-weight: 400; font-size: 1.15rem; margin-bottom: 14px; }
.extras__lista { display: flex; gap: 12px; overflow-x: auto; scrollbar-width: none; padding: 8px 8px 0 0; }
.extras__lista::-webkit-scrollbar { display: none; }
.extra { position: relative; flex: 0 0 31%; min-width: 104px; text-align: left; color: var(--sobre-tinta); }
.extra__foto { aspect-ratio: 1; border-radius: 12px; background: var(--extra-foto) center / cover no-repeat; display: grid; place-items: center; color: rgba(var(--fundo-rgb), .25); }
.extra__foto svg { width: 34px; height: 34px; }
.extra__mais { position: absolute; top: -8px; right: -8px; width: 34px; height: 34px; border-radius: 50%; background: var(--sobre-tinta); color: var(--tinta); display: grid; place-items: center; transition: background .2s, transform .2s; }
.extra__mais svg { width: 22px; height: 22px; stroke-width: 2.5; }
.extra.selecionado .extra__mais { background: #1f9d55; }
.extra.selecionado .extra__foto { box-shadow: inset 0 0 0 3px var(--sobre-tinta); }
.extra__preco { display: block; font-size: 1.1rem; margin-top: 6px; }
.extra__nome { display: block; font-size: .9rem; text-transform: uppercase; line-height: 1.15; }

.horarios { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 22px; }
.horarios .dica { grid-column: 1 / -1; text-align: center; padding: 10px 0; }
.horario { background: var(--card); border-radius: 12px; padding: 9px 0; font-size: 1.05rem; box-shadow: var(--brilho); border: 1px solid rgba(var(--tinta-rgb), .06); }
.horario:active, .horario.selecionado { background: var(--tinta); color: var(--sobre-tinta); }
.total { text-align: center; color: var(--muted); margin-top: 16px; font-size: .92rem; }

/* ===== Camadas (profissional e confirmação) ===== */
.camada { position: fixed; inset: 0; z-index: 60; background: rgba(var(--fundo-rgb), .55); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; padding: 20px; animation: aparecer .2s ease; }
.camada--baixo { align-items: flex-end; padding: 0; }
@keyframes aparecer { from { opacity: 0; } }
.caixa { width: 100%; max-width: 500px; background: var(--sobre-tinta); border-radius: 24px; padding: 26px 22px 30px; box-shadow: var(--brilho-forte), inset 0 0 0 1px rgba(var(--tinta-rgb), .25); }
.caixa h2 { font-weight: 400; text-align: center; font-size: 1.15rem; margin-bottom: 22px; }
.prof-lista { display: flex; flex-direction: column; gap: 14px; padding: 0 10px; }
.prof-item { display: flex; align-items: center; text-align: left; border-radius: 999px; box-shadow: var(--brilho); background: var(--sobre-tinta); border: 1.5px solid rgba(var(--tinta-rgb), .5); min-height: 62px; padding-right: 18px; }
.prof-item .avatar { width: 74px; height: 74px; margin: -8px 16px -8px -8px; }
.prof-item span { font-size: 1.15rem; }
.prof-item.selecionado { background: var(--tinta); color: var(--sobre-tinta); }

.folha {
  width: 100%; max-width: 560px; background: var(--folha); border-radius: 26px 26px 0 0; padding: 26px 22px calc(26px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 14px; box-shadow: 0 -10px 40px rgba(var(--tinta-rgb), .08); animation: subir .25s ease;
  max-height: 92vh; overflow-y: auto;
}
@keyframes subir { from { transform: translateY(40px); opacity: 0; } }
.folha h2 { font-weight: 500; font-size: 1.25rem; }
.resumo { background: var(--card-2); border-radius: 16px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; font-size: .95rem; }
.resumo div { display: flex; justify-content: space-between; gap: 12px; }
.resumo span { color: var(--muted); }
.resumo strong { font-weight: 500; text-align: right; }
.resumo .resumo__total { border-top: 1px solid var(--linha); padding-top: 8px; margin-top: 4px; }
.resumo .resumo__total strong { font-size: 1.1rem; }
label { display: flex; flex-direction: column; gap: 6px; font-size: .85rem; color: var(--muted); }
input { background: var(--sobre-tinta); border: 1px solid var(--linha); border-radius: 14px; padding: 13px 14px; font-size: 1rem; color: var(--tinta); width: 100%; }
input:focus { outline: 2px solid var(--tinta); border-color: transparent; }
.erro { color: var(--erro); font-size: .9rem; }

/* ===== Sucesso ===== */
.sucesso__check { width: 84px; height: 84px; border-radius: 50%; background: var(--tinta); color: var(--sobre-tinta); display: grid; place-items: center; box-shadow: var(--brilho-forte); }
.sucesso__check svg { width: 46px; height: 46px; stroke-width: 2.6; }
.view--centro .sucesso__resumo { color: var(--tinta); font-size: 1.02rem; line-height: 1.6; }

/* ===== Histórico ===== */
.historico { display: flex; flex-direction: column; gap: 14px; margin-top: 16px; }
.reserva { display: flex; gap: 14px; background: var(--card); border-radius: 18px; padding: 14px; box-shadow: var(--brilho); }
.reserva__foto { width: 64px; height: 64px; border-radius: 12px; background: var(--card-2) center / cover no-repeat; flex-shrink: 0; }
.reserva__info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.reserva__titulo { font-weight: 600; text-transform: uppercase; font-size: .95rem; }
.reserva__quando { font-size: .95rem; }
.reserva__sub { color: var(--muted); font-size: .82rem; }
.reserva__status { align-self: flex-start; font-size: .7rem; letter-spacing: .06em; text-transform: uppercase; padding: 2px 10px; border-radius: 999px; border: 1px solid var(--linha); color: var(--muted); }
.reserva__status--agendado { background: var(--tinta); color: var(--sobre-tinta); border-color: var(--tinta); }
.reserva__cancelar { align-self: flex-start; margin-top: 6px; font-size: .82rem; color: var(--erro); text-decoration: underline; }
.reserva--passada { opacity: .6; }
.vazio { text-align: center; color: var(--muted); padding: 40px 10px; border: 1px dashed var(--linha); border-radius: 18px; }

/* ===== Perfil ===== */
.formulario { display: flex; flex-direction: column; gap: 14px; margin-top: 20px; }
.contato { margin-top: 32px; display: flex; flex-direction: column; gap: 10px; }
.contato h2 { font-weight: 500; font-size: 1.05rem; }
.contato p, .contato a { color: var(--muted); font-size: .95rem; }
.contato a { text-decoration: underline; }

/* ===== Barra inferior ===== */
.nav {
  position: fixed; z-index: 50; left: 50%; transform: translateX(-50%); bottom: calc(18px + env(safe-area-inset-bottom));
  width: min(calc(100% - 36px), 420px); height: 76px; border-radius: 999px; display: flex; align-items: center; justify-content: space-around;
  background: rgba(var(--fundo-rgb), .6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid rgba(var(--tinta-rgb), .55); box-shadow: var(--brilho);
}
.nav button { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; color: var(--tinta); transition: background .2s; }
.nav button svg { width: 30px; height: 30px; }
.nav button.ativo { background: var(--sobre-tinta); box-shadow: 0 0 0 2px rgba(var(--tinta-rgb), .9), var(--brilho-forte); }

.toast { position: fixed; z-index: 80; left: 50%; transform: translateX(-50%); bottom: calc(110px + env(safe-area-inset-bottom)); background: var(--tinta); color: var(--sobre-tinta); padding: 12px 20px; border-radius: 999px; font-size: .92rem; box-shadow: var(--brilho-forte); max-width: calc(100% - 40px); text-align: center; }

@media (min-width: 700px) {
  .app { padding-left: 28px; padding-right: 28px; }
  .voltar { left: -28px; }
  .sel-card { margin-left: -28px; }
  .sel-desc { margin-right: -28px; }
  .extras { margin-left: -28px; margin-right: -28px; border-radius: 0; }
}
.servico__preco small { font-size: .78rem; opacity: .75; font-weight: 400; }

/* Links legais */
.legal { font-size: .75rem; opacity: .65; text-align: center; margin: 4px 0; }
.legal a { color: inherit; text-decoration: underline; }

/* Opção de lembrete pelo WhatsApp */
.lembrete-opcao { flex-direction: row !important; display: flex; align-items: flex-start; gap: 10px; font-size: .9rem; line-height: 1.35; color: var(--muted); cursor: pointer; }
.lembrete-opcao input { width: 20px; height: 20px; flex-shrink: 0; margin-top: 1px; accent-color: var(--tinta); padding: 0; }
