/* Studio Premium Care · página pública. Mobile first (320px+), coluna central de até 480px. */
:root {
  --bg: #1C1C1C;
  --fundo: #141414;
  --surface: #262626;
  --line: #3A3A3A;
  --text: #FFFFFF;
  --muted: #B8B8B8;
  --dim: #A0A0A0;
  --sel-sub: #3A3A3A;
  --erro: #FF9B9B;
  --ok: #1F9D55;
  --ok-claro: #5FD38D;
  --fonte: 'Outfit', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--fonte);
  background: var(--fundo);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
}

button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled, button[aria-disabled="true"] { cursor: not-allowed; }

.app {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  padding: 28px 20px 32px;
  display: flex;
  flex-direction: column;
}
@media (min-width: 520px) {
  .app { margin: 24px auto; min-height: auto; border: 1px solid var(--line); border-radius: 28px; padding: 32px 28px; }
}

.tela { display: flex; flex-direction: column; flex: 1; min-width: 0; }
#form-plano { display: flex; flex-direction: column; flex: 1; }

.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;
}

/* Marca */
.brand { display: flex; align-items: center; gap: 12px; margin-bottom: 28px; }
.mono {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--muted);
  display: grid; place-items: center; font-weight: 500; font-size: 15px; letter-spacing: -.02em;
}
.brand-nome { color: var(--muted); font-size: 13px; letter-spacing: .02em; }

h1 { font-size: 28px; font-weight: 300; line-height: 1.15; letter-spacing: -.01em; }
h1:focus { outline: none; }
h1:focus-visible { outline: 2px solid var(--text); outline-offset: 4px; }
.h1-conf { font-size: 26px; line-height: 1.3; }
h2 { font-size: 17px; font-weight: 500; }

fieldset { border: 0; padding: 0; min-width: 0; }
.sub { color: var(--muted); font-size: 15px; margin-top: 6px; margin-bottom: 12px; padding: 0; }
.sub-sm { color: var(--muted); font-size: 14px; }
.lbl { font-size: 13px; color: var(--muted); margin: 24px 0 12px; letter-spacing: .04em; }
.hint { color: var(--dim); font-size: 13px; margin-top: 8px; line-height: 1.4; }
.campo { margin-bottom: 12px; }

/* Frequência */
.freq { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.freq button {
  height: 64px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface);
  font-size: 22px; font-weight: 400;
}
.freq button small { font-size: 14px; color: var(--muted); }
.freq button[aria-pressed="true"] { background: var(--ok); color: #fff; border-color: var(--ok); font-weight: 600; }
.freq button[aria-pressed="true"] small { color: #fff; }

/* Campos */
input {
  width: 100%; height: 52px; border-radius: 14px; border: 1px solid var(--line);
  background: var(--surface); font-size: 17px; padding: 0 16px; min-width: 0;
}
input::placeholder { color: var(--dim); opacity: 1; }
input[readonly] { color: var(--muted); }
input[aria-invalid="true"] { border-color: var(--erro); }
.erro-campo { color: var(--erro); font-size: 14px; margin-top: 6px; line-height: 1.4; }

/* Pessoas */
.people { display: flex; flex-direction: column; gap: 12px; }
.person { display: flex; gap: 12px; align-items: center; }
.chip {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  display: grid; place-items: center; color: var(--muted); font-size: 14px;
}
.remover {
  flex: none; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: none; color: var(--muted); font-size: 20px; line-height: 1;
}
.add {
  margin-top: 12px; height: 48px; background: none; border: 1px dashed var(--dim); border-radius: 14px;
  font-size: 16px; width: 100%;
}

/* Botão principal */
.spacer { height: 24px; flex: 1 0 24px; }
.cta {
  height: 56px; border-radius: 28px; border: 0; background: var(--text); color: var(--bg);
  font-size: 17px; font-weight: 500; width: 100%; flex: none;
}
.cta:disabled { background: var(--line); color: var(--muted); }
#enviar { margin-top: 8px; }
#enviar-topo { margin: 4px 0 14px; height: 48px; }
.cta-ok { background: var(--ok); color: #fff; font-weight: 600; }
.cta-ok:disabled { background: var(--line); color: var(--muted); }

/* Tela 2 */
.back {
  align-self: flex-start; background: none; border: 0; color: var(--muted); font-size: 15px;
  min-height: 44px; padding: 0 8px 0 0; margin: -10px 0 4px;
}
.counter { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 20px; }
.counter b { font-weight: 500; font-size: 17px; }
.bar { display: flex; gap: 8px; margin: 12px 0 20px; }
.bar i { flex: 1; height: 3px; border-radius: 2px; background: var(--line); }
.bar i.f { background: var(--text); }

.days { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.day {
  min-height: 64px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface);
  font-size: 15px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 4px 2px; min-width: 0;
}
.day small { font-size: 12px; color: var(--muted); }
.day[aria-pressed="true"] { background: var(--text); color: var(--bg); border-color: var(--text); font-weight: 600; }
.day[aria-pressed="true"] small { color: var(--sel-sub); }
/* dia com horário escolhido: verde; se também estiver aberto, ganha um anel branco */
.day.feito, .day.feito[aria-pressed="true"] { background: var(--ok); color: #fff; border-color: var(--ok); font-weight: 600; }
.day.feito small, .day.feito[aria-pressed="true"] small { color: #fff; font-weight: 500; }
.day.feito[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px rgba(95, 211, 141, .45); }
.day.bloq { opacity: .7; }

.list-h { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; margin: 20px 0 12px; }
.same {
  background: none; border: 1px solid var(--muted); border-radius: 24px; min-height: 44px;
  padding: 0 14px; font-size: 14px; text-align: left;
}

.slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 24px; }
.periodo {
  grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; margin-top: 8px;
  font-size: 13px; color: var(--muted); letter-spacing: .02em;
}
.periodo:first-child { margin-top: 0; }
.periodo::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.slot {
  position: relative; border-radius: 12px; border: 1px solid var(--line); background: var(--surface);
  display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 8px; align-items: center;
  padding: 8px 12px 8px 16px; font-size: 16px; text-align: left; width: 100%; min-height: 56px;
}
.slot .t { grid-column: 1; font-weight: 500; font-size: 18px; line-height: 1.2; }
.slot .st {
  grid-column: 1; display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; line-height: 1.2; min-width: 0;
}
.slot .st::before { content: ''; flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--dim); }
button.slot .st::before { background: var(--ok-claro); }
.slot .check {
  grid-column: 2; grid-row: 1 / span 2; width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line);
  display: grid; place-items: center; font-size: 15px; line-height: 1; color: #fff;
}
.slot[aria-pressed="true"] { background: var(--ok); color: #fff; border-color: var(--ok); }
.slot[aria-pressed="true"] .st { color: #fff; font-weight: 500; }
.slot[aria-pressed="true"] .st::before { background: #fff; }
.slot[aria-pressed="true"] .check { background: #fff; color: var(--ok); border-color: #fff; font-weight: 700; }
.slot[aria-disabled="true"], .slot:disabled, .back:disabled, .same:disabled { opacity: .7; }
.slot.full, .slot.off {
  grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px;
  background: transparent; padding: 4px 4px 4px 16px; min-height: 56px;
}
.slot.off { border-style: dashed; }
/* horário esgotado ou indisponível: inativo (opaco); só o botão da lista de espera segue ativo */
.slot.full .t, .slot.off .t { opacity: .45; flex: none; width: 44px; }
.slot.full .st, .slot.off .st { opacity: .6; flex: 1 1 0; padding: 6px 0; }
.slot.full .st::before, .slot.off .st::before { background: var(--erro); opacity: .8; }
.slot.full .wl, .slot.off .wl { margin-left: auto; }
.slot.marcado { border-color: var(--erro); }
.wl {
  min-height: 44px; border-radius: 22px; border: 1px solid var(--muted); background: none;
  font-size: 14px; padding: 0 14px; flex: none; max-width: 100%;
}
.wl-ok { font-size: 14px; color: var(--text); padding: 0 10px; min-height: 44px; display: flex; align-items: center; }

.status, .aviso, .erro { font-size: 15px; line-height: 1.45; }
.status:empty, .aviso:empty, .erro:empty { display: none; }
.status { color: var(--muted); margin: 8px 0 16px; display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.msgs {
  position: fixed; inset: 0; z-index: 20; display: none; align-items: center; justify-content: center;
  padding: 24px 16px; background: rgba(0, 0, 0, .55); cursor: pointer;
}
.msgs.visivel { display: flex; animation: msg-entra .18s ease-out; }
@keyframes msg-entra { from { opacity: 0; } to { opacity: 1; } }
.msgs .aviso, .msgs .erro {
  width: 100%; max-width: 400px; margin: 0; padding: 20px 24px; border-radius: 16px; background: var(--surface);
  font-size: 16px; text-align: center; box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
}
.aviso { color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.erro { color: var(--erro); border: 1px solid var(--erro); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.verificacao { display: flex; justify-content: center; }
.verificacao:empty { display: none; }
.verificacao iframe { max-width: 100%; }

/* Tela 3 */
.ok {
  width: 52px; height: 52px; border-radius: 50%; border: 1px solid var(--text);
  display: grid; place-items: center; font-size: 24px; margin: 40px 0 24px;
}
.sum { margin-top: 32px; border-top: 1px solid var(--line); }
.sum div { display: flex; justify-content: space-between; padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 17px; }
.sum dt { color: var(--muted); }
.sum dd { margin: 0; }
.meta { margin-top: 28px; color: var(--muted); font-size: 15px; line-height: 1.5; }
.meta b { color: var(--text); font-weight: 500; }

/* Foco visível */
button:focus-visible, input:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.freq button[aria-pressed="true"]:focus-visible, .day[aria-pressed="true"]:focus-visible,
.slot[aria-pressed="true"]:focus-visible, .cta:focus-visible { outline-offset: 3px; }

@media (max-width: 359px) {
  .app { padding: 20px 14px 24px; }
  .freq { gap: 5px; }
  .freq button { font-size: 19px; }
  .days { gap: 4px; }
  .day { font-size: 14px; }
}

@media (prefers-reduced-motion: no-preference) {
  button { transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* dia concluído (verde): o foco também usa um verde suave, não o contorno branco */
.day.feito:focus-visible, .day.feito[aria-pressed="true"]:focus-visible { outline: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px rgba(95, 211, 141, .6); }

/* ---------------------------------------------------------------- acabamento premium
   Luz suave no topo, superfícies com leve degradê neutro, sombras macias.
   Verde sempre que algo está escolhido ou é o próximo passo. */
:root {
  --ok-topo: #34BD72;
  --ok-base: #178A48;
  --grad-ok: linear-gradient(180deg, var(--ok-topo) 0%, var(--ok-base) 100%);
  --grad-surface: linear-gradient(180deg, #2D2D2D 0%, #242424 100%);
  --realce: inset 0 1px 0 rgba(255, 255, 255, .07);
  --realce-ok: inset 0 1px 0 rgba(255, 255, 255, .28), inset 0 -1px 0 rgba(0, 0, 0, .18);
  --brilho-ok: 0 6px 18px -4px rgba(31, 157, 85, .55), 0 2px 4px rgba(0, 0, 0, .35);
}

body { background: radial-gradient(120% 60% at 50% -10%, #242424 0%, var(--fundo) 60%) fixed; }
.app {
  background: radial-gradient(90% 40% at 50% 0%, rgba(255, 255, 255, .055) 0%, rgba(255, 255, 255, 0) 70%), var(--bg);
}
@media (min-width: 520px) {
  .app { box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .06); }
}
.mono { background: var(--grad-surface); box-shadow: var(--realce), 0 4px 10px rgba(0, 0, 0, .35); }

/* superfícies */
.freq button, .day, .slot, input, .chip, .remover {
  background: var(--grad-surface); box-shadow: var(--realce), 0 1px 2px rgba(0, 0, 0, .3);
}
input:focus { border-color: rgba(95, 211, 141, .55); box-shadow: var(--realce), 0 0 0 3px rgba(95, 211, 141, .14); outline: none; }
input[readonly] { box-shadow: none; background: transparent; }
.add, .wl, .same { background: transparent; box-shadow: none; }
.slot.full, .slot.off { background: transparent; box-shadow: none; }

/* escolhido / próximo passo: verde com degradê, luz no topo e brilho suave */
.freq button[aria-pressed="true"], .day.feito, .day.feito[aria-pressed="true"],
.slot[aria-pressed="true"], .cta-ok {
  background: var(--grad-ok); border-color: rgba(255, 255, 255, .14); box-shadow: var(--realce-ok), var(--brilho-ok);
}
.day.feito[aria-pressed="true"] { box-shadow: var(--realce-ok), var(--brilho-ok), 0 0 0 2px var(--bg), 0 0 0 4px rgba(95, 211, 141, .45); }
.day.feito:focus-visible, .day.feito[aria-pressed="true"]:focus-visible { box-shadow: var(--realce-ok), var(--brilho-ok), 0 0 0 2px var(--bg), 0 0 0 4px rgba(95, 211, 141, .6); }
.day[aria-pressed="true"]:not(.feito) { background: linear-gradient(180deg, #FFFFFF 0%, #DADADA 100%); box-shadow: 0 4px 12px -2px rgba(255, 255, 255, .18); }

.cta { box-shadow: var(--realce); }
.cta-ok { height: 56px; text-shadow: 0 1px 1px rgba(0, 0, 0, .25); letter-spacing: .01em; }
.cta-ok:active:not(:disabled) { transform: translateY(1px); box-shadow: var(--realce-ok), 0 2px 8px -2px rgba(31, 157, 85, .5); }
.cta-ok:disabled { background: var(--grad-surface); border: 1px solid var(--line); color: var(--muted); box-shadow: var(--realce); text-shadow: none; }
#enviar-topo { height: 48px; }

.slot[aria-pressed="true"] .check { box-shadow: 0 1px 3px rgba(0, 0, 0, .3); }
.bar i { box-shadow: inset 0 1px 1px rgba(0, 0, 0, .35); }
.bar i.f { background: var(--grad-ok); box-shadow: 0 0 8px rgba(52, 189, 114, .45); }
.msgs .aviso, .msgs .erro { background: var(--grad-surface); box-shadow: var(--realce), 0 20px 50px rgba(0, 0, 0, .6); }
.ok { background: var(--grad-ok); border-color: rgba(255, 255, 255, .14); box-shadow: var(--realce-ok), var(--brilho-ok); }

@media (prefers-reduced-motion: no-preference) {
  button { transition: background-color .15s ease, color .15s ease, border-color .15s ease, box-shadow .2s ease, transform .1s ease; }
}

/* Logo horizontal: símbolo + nome (arquivos originais do estúdio, em branco) */
.brand { gap: 14px; }
.brand-simbolo { height: 32px; width: auto; display: block; }
.brand-nome { height: 17px; width: auto; display: block; opacity: .9; letter-spacing: normal; }

/* faixa da versão de demonstração */
.faixa-demo {
  margin: -8px 0 20px; padding: 8px 12px; border-radius: 10px; font-size: 13px; text-align: center;
  color: var(--muted); border: 1px dashed var(--line);
}
