/* Corte Fácil — estilos
   Tokens extraídos das telas do Figma (390 × 844).
   Celular primeiro; a partir de 960 px vira o layout de computador. */
:root {
  --navy: #123B5D;
  --navy-deep: #0A2740;
  --blue: #155EEF;
  --blue-dark: #0F4BC4;
  --blue-soft: #7FB2FF;
  --bg: #F5F8FC;
  --tint: #E7F1FA;
  --line: #C8D5E0;
  --line-soft: #E1E8EF;
  --ink: #17324D;
  --muted: #566B7F;
  --placeholder: #6F8193;
  --sky: #C8E0F5;
  --sky-muted: #A9C4DD;
  --green: #16834A;
  --green-dark: #106A3B;
  --green-tint: #E4F5EC;
  --green-ink: #17623D;
  --danger: #B42318;
  --disabled-text: #74848F;
  --disabled-bg: #EAEFF4;
  --field-border: #7F94A8;   /* 3:1 sobre branco (WCAG 1.4.11); o Figma usava #C8D5E0 (1,5:1) */
  --focus: #8DB4FF;
  font-family: Arial, "Helvetica Neue", Helvetica, sans-serif;
  color: var(--ink);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
ul, ol { padding: 0; list-style: none; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { min-height: 100vh; min-height: 100dvh; background: var(--bg); -webkit-font-smoothing: antialiased; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.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; }

/* =========================================================
   Estrutura — celular (padrão)
   ========================================================= */
.app { display: flex; flex-direction: column; height: 100vh; height: 100dvh; }

.app-header { position: relative; flex: none; background: var(--navy); color: #fff; }
.app-header__inner { max-width: 600px; margin: 0 auto; padding: 26px 24px 22px; }
.app-header__top { display: flex; justify-content: space-between; align-items: center; }
.app-header__brand { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700; letter-spacing: .1em; color: var(--sky); }
.app-header__logo { display: none; width: 20px; height: 20px; }
.app-header__counter { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.app-header__title { margin-top: 14px; font-size: 25px; line-height: 1.15; font-weight: 700; }
.app-header__title:focus { outline: none; }
.progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(255, 255, 255, .16); }
.progress__bar { display: block; height: 100%; width: 0; background: var(--blue-soft); transition: width .35s ease; }
.progress__bar.is-done { background: #4ADE80; }
.stepper { display: none; }

.layout { flex: 1; min-height: 0; display: flex; width: 100%; max-width: 600px; margin: 0 auto; }
.screens { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.side, .site-footer { display: none; }

.screen { flex: 1; min-height: 0; display: flex; flex-direction: column; animation: entrar .28s ease both; }
@keyframes entrar { from { opacity: 0; transform: translateX(14px); } }
.screen__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 24px 24px 12px; }
.screen__body--center { display: flex; flex-direction: column; align-items: center; text-align: center; }
.screen__footer {
  flex: none; padding: 12px 24px max(20px, env(safe-area-inset-bottom));
  background: linear-gradient(to top, var(--bg) 75%, rgba(245, 248, 252, 0));
}

/* =========================================================
   Componentes
   ========================================================= */
.lead { font-size: 17px; line-height: 1.4; color: var(--muted); margin-bottom: 26px; }
.section-title { font-size: 20px; font-weight: 700; color: var(--navy); margin: 30px 0 14px; }
.label-title { font-size: 14px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--navy); margin: 26px 0 12px; }
.hint { margin-top: 10px; font-size: 13px; line-height: 1.4; color: var(--muted); }
.note { margin-top: 16px; padding: 18px; background: #fff; border: 1px solid var(--line); border-radius: 12px; font-size: 14px; color: var(--muted); }
.link {
  padding: 0; border: 0; background: none; color: var(--blue); font-weight: 700; text-decoration: underline;
  text-underline-offset: 3px; border-radius: 4px;
}
.link:hover { color: var(--blue-dark); }

/* Botões */
.btn {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 60px; padding: 0 24px; border: 0; border-radius: 14px;
  background: var(--blue); color: #fff;
  font-size: 18px; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
  box-shadow: 0 6px 16px rgba(21, 94, 239, .25);
  transition: background .15s, transform .08s, box-shadow .15s;
}
.btn:hover { background: var(--blue-dark); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline-offset: 3px; }
.btn:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; transform: none; }
.btn:disabled:hover { background: var(--blue); }
.btn--green { background: var(--green); box-shadow: 0 6px 16px rgba(22, 131, 74, .25); }
.btn--green:hover { background: var(--green-dark); }
.btn--ghost { height: 44px; margin-top: 6px; background: transparent; color: var(--muted); font-size: 15px; letter-spacing: 0; box-shadow: none; }
.btn--ghost:hover { background: transparent; color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.btn--outline { margin-top: 20px; height: 52px; background: #fff; color: var(--blue); border: 1.5px solid var(--blue); font-size: 16px; letter-spacing: 0; box-shadow: none; }
.btn--outline:hover { background: var(--tint); }

/* 1. Início */
.hero { text-align: center; background: var(--tint); border-radius: 22px; padding: 38px 24px 34px; }
.hero__icon { width: 60px; height: 60px; color: var(--blue); }
.hero__title { margin-top: 14px; font-size: 26px; font-weight: 700; color: var(--navy); }
.hero__text { margin-top: 14px; font-size: 17px; line-height: 1.55; color: var(--muted); }
.steps-list { display: grid; gap: 8px; counter-reset: passo; }
.steps-list li {
  counter-increment: passo; padding: 9px 16px; background: #fff; border-radius: 9px;
  font-size: 16px; font-weight: 700; line-height: 1.25; color: var(--ink);
}
.steps-list li::before { content: counter(passo) ". "; }
.footer-note { margin-top: 14px; text-align: center; font-size: 13px; color: var(--muted); }
.footer-note--small { margin-top: 4px; font-size: 12px; }

/* 2. Formulário */
.field { margin-bottom: 20px; }
.field label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--navy); }
.field input, .field textarea {
  display: block; width: 100%; background: #fff; border: 1.5px solid var(--field-border); border-radius: 12px;
  font-size: 17px; color: var(--ink); transition: border-color .15s, box-shadow .15s;
}
.field input { height: 62px; padding: 0 18px; }
.field textarea { height: 178px; padding: 16px 18px; resize: none; font-size: 16px; line-height: 1.45; }
.field input::placeholder, .field textarea::placeholder { color: var(--placeholder); opacity: 1; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(21, 94, 239, .16); }
.field input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(180, 35, 24, .12); }
.field__error { min-height: 18px; margin-top: 6px; font-size: 13px; font-weight: 700; color: var(--danger); }
.field__error:empty { min-height: 0; margin-top: 0; }
.field input + .field__error:empty { min-height: 18px; margin-top: 6px; }
.counter { margin-top: 6px; text-align: right; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.info-box { display: grid; gap: 6px; padding: 16px 18px; background: var(--tint); border-radius: 12px; font-size: 14px; }
.info-box strong { color: var(--navy); font-weight: 700; }
.info-box span { font-size: 13px; color: var(--muted); }
.demo-row { margin-top: 12px; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; font-size: 12px; color: var(--muted); }
.demo-row .link { font-size: 12px; }

/* 3. Calendário */
.calendar { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 12px 12px 10px; }
.calendar__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.calendar__title { font-size: 17px; font-weight: 700; letter-spacing: .02em; color: var(--navy); }
.calendar__nav {
  display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 50%;
  background: transparent; color: var(--navy);
}
.calendar__nav svg { width: 22px; height: 22px; }
.calendar__nav:hover:not(:disabled) { background: var(--tint); }
.calendar__nav:disabled { color: #B5C2CE; cursor: not-allowed; }
.calendar__weekdays, .calendar__grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.calendar__weekdays span { padding: 6px 0 8px; font-size: 14px; font-weight: 700; color: var(--muted); }

/* Área de toque de 44 px de altura; o círculo visual (38 px) é desenhado no ::before. */
.day {
  position: relative; isolation: isolate; display: grid; place-items: center; width: 100%; height: 44px; border: 0;
  background: transparent; font-size: 15px; color: var(--ink); font-variant-numeric: tabular-nums;
}
.day::before {
  content: ""; position: absolute; z-index: -1; top: 50%; left: 50%; width: 38px; height: 38px;
  transform: translate(-50%, -50%); border-radius: 50%; background: transparent;
}
.day:hover:not(:disabled):not([aria-pressed="true"])::before { background: var(--tint); }
.day.is-today::before { box-shadow: inset 0 0 0 1.5px var(--blue); }
.day[aria-pressed="true"] { color: #fff; font-weight: 700; }
.day[aria-pressed="true"]::before { background: var(--blue); }
.day:focus-visible { outline: none; }
.day:focus-visible::before { outline: 3px solid var(--focus); outline-offset: 2px; }
.day:disabled { color: var(--disabled-text); cursor: not-allowed; }

.slots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.slot {
  height: 48px; border: 1.3px solid var(--line); border-radius: 11px; background: #fff;
  font-size: 16px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums;
  transition: background .15s, border-color .15s;
}
.slot:hover:not(:disabled):not([aria-pressed="true"]) { border-color: var(--blue); background: var(--tint); }
.slot[aria-pressed="true"] { background: var(--blue); border-color: var(--blue); color: #fff; }
.slot:disabled { background: var(--disabled-bg); border-color: transparent; color: var(--disabled-text); cursor: not-allowed; text-decoration: line-through; }

/* 4. Valor */
.price-card { text-align: center; padding: 24px 20px 26px; background: var(--tint); border-radius: 16px; }
.price-card__service { font-size: 17px; color: var(--muted); }
.price-card__value { margin-top: 10px; font-size: 32px; font-weight: 700; color: var(--navy); }

/* 5. Confirmação */
.banner { display: grid; justify-items: center; gap: 12px; padding: 22px 20px; background: var(--green-tint); border-radius: 18px; text-align: center; }
.banner p { font-size: 15px; font-weight: 700; color: var(--green-ink); }
.badge { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--green); color: #fff; }
.badge svg { width: 28px; height: 28px; }
.badge--big { flex: none; width: 84px; height: 84px; margin-top: 12px; animation: pop .45s cubic-bezier(.2, 1.4, .4, 1) both; }
.badge--big svg { width: 44px; height: 44px; }
@keyframes pop { from { transform: scale(.5); opacity: 0; } }

.summary { background: #fff; border: 1px solid var(--line); border-radius: 16px; padding: 2px 16px; width: 100%; }
.summary__row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.summary__row:last-child { border-bottom: 0; }
.summary dt { flex: none; font-size: 14px; color: var(--muted); }
.summary dd { min-width: 0; font-size: 14px; font-weight: 700; color: var(--ink); text-align: right; overflow-wrap: anywhere; white-space: pre-line; }
.summary--compact { margin-top: 22px; text-align: left; }
#erroConfirmar:not(:empty) { margin-top: 14px; }

/* 6. Sucesso */
.success__title { margin-top: 20px; font-size: 24px; color: var(--navy); }
.success__text { margin-top: 10px; max-width: 30ch; font-size: 15px; line-height: 1.5; color: var(--muted); }
.code {
  margin-top: 18px; padding: 10px 22px; border: 1.5px dashed var(--green); border-radius: 12px;
  background: var(--green-tint); color: var(--green-ink); font-size: 24px; font-weight: 700; letter-spacing: .12em;
}

/* Diálogo de ajuda */
dialog { width: min(360px, calc(100vw - 32px)); padding: 24px; border: 0; border-radius: 20px; background: #fff; color: var(--ink); box-shadow: 0 24px 60px rgba(0, 0, 0, .4); }
dialog::backdrop { background: rgba(10, 39, 64, .6); }
dialog h2 { font-size: 20px; color: var(--navy); }
dialog p { margin-top: 10px; font-size: 14px; color: var(--muted); }
dialog ul { margin: 12px 0 20px; display: grid; gap: 8px; font-size: 14px; line-height: 1.4; }

/* Celular baixo (ex.: 360 × 640) */
@media (max-height: 700px) and (max-width: 959px) {
  .app-header__inner { padding-top: 18px; padding-bottom: 16px; }
  .app-header__title { margin-top: 10px; }
  .btn { height: 54px; }
}

/* =========================================================
   Computador (≥ 960 px)
   ========================================================= */
@media (min-width: 960px) {
  body { background: var(--bg); }
  .app { display: block; height: auto; min-height: 100vh; }

  /* Cabeçalho largo com as etapas */
  .app-header { background: radial-gradient(800px 400px at 85% -20%, rgba(21, 94, 239, .35), transparent 70%), var(--navy); }
  .app-header__inner { max-width: 1120px; padding: 28px 40px 96px; }
  .app-header__logo { display: block; }
  .app-header__counter, .progress { display: none; }
  .app-header__title { margin-top: 18px; font-size: 34px; }

  .stepper { display: flex; gap: 12px; margin-top: 28px; }
  .stepper li { display: flex; align-items: center; gap: 10px; flex: 1; font-size: 14px; font-weight: 700; color: var(--sky-muted); white-space: nowrap; }
  .stepper li:last-child { flex: none; }
  .stepper li:not(:last-child)::after { content: ""; flex: 1; min-width: 16px; height: 2px; margin-left: 6px; border-radius: 2px; background: rgba(255, 255, 255, .2); }
  .stepper__dot {
    flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, .35); font-size: 13px; font-variant-numeric: tabular-nums;
  }
  .stepper li.is-current { color: #fff; }
  .stepper li.is-current .stepper__dot { background: #fff; border-color: #fff; color: var(--navy); }
  .stepper li.is-done { color: var(--sky); }
  .stepper li.is-done .stepper__dot { background: var(--blue-soft); border-color: var(--blue-soft); color: var(--navy); }
  .stepper li.is-done::after { background: var(--blue-soft); }

  /* Cartão principal + resumo lateral */
  .layout {
    position: relative; z-index: 1;   /* fica acima do cabeçalho, que é posicionado */
    display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start;
    max-width: 1120px; margin: -60px auto 0; padding: 0 40px;
  }
  .app[data-step="5"] .layout, .app[data-step="6"] .layout { grid-template-columns: minmax(0, 720px); justify-content: center; }
  .app[data-step="5"] .side, .app[data-step="6"] .side { display: none; }

  .screens { display: block; }
  .screen {
    display: block; background: #fff; border: 1px solid var(--line-soft); border-radius: 22px;
    box-shadow: 0 18px 50px rgba(18, 59, 93, .12);
  }
  .screen__body { overflow: visible; padding: 36px 40px 12px; }
  .screen__footer {
    display: flex; flex-direction: row-reverse; justify-content: space-between; align-items: center; gap: 16px;
    margin-top: 12px; padding: 20px 40px 28px; border-top: 1px solid var(--line-soft); background: none;
  }
  .screen__footer .btn { width: auto; min-width: 280px; height: 56px; padding: 0 32px; }
  .screen__footer .btn--ghost { min-width: 0; margin-top: 0; padding: 0 12px; }
  .footer-note { display: none; }
  .app[data-step="6"] .screen__footer { justify-content: center; }
  .summary--compact { max-width: 480px; }
  .btn--outline { width: auto; min-width: 280px; }

  /* Ajustes de conteúdo no cartão branco */
  .lead { margin-bottom: 28px; }
  .hero { display: flex; align-items: center; gap: 28px; text-align: left; padding: 36px 40px; }
  .hero__icon { flex: none; width: 76px; height: 76px; padding: 16px; border-radius: 22px; background: #fff; }
  .hero__title { margin-top: 0; font-size: 28px; }
  .hero__text { margin-top: 8px; }
  .hero__text br { display: none; }
  .steps-list { grid-template-columns: repeat(3, 1fr); gap: 14px; }
  .steps-list li { padding: 18px; background: var(--bg); border: 1px solid var(--line-soft); border-radius: 12px; }

  .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
  .field--full { grid-column: 1 / -1; }

  .banner { grid-template-columns: auto 1fr; justify-items: start; align-items: center; text-align: left; padding: 20px 24px; }

  .side {
    display: block; position: sticky; top: 24px; padding: 26px; background: #fff;
    border: 1px solid var(--line-soft); border-radius: 22px; box-shadow: 0 18px 50px rgba(18, 59, 93, .12);
  }
  .side__title { font-size: 14px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--navy); }
  .side__service {
    display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
    margin-top: 16px; padding: 18px; background: var(--tint); border-radius: 14px; font-size: 15px; color: var(--muted);
  }
  .side__service strong { font-size: 22px; color: var(--navy); }
  .side__list { margin-top: 8px; }
  .side__list div { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
  .side__list dt { flex: none; color: var(--muted); }
  .side__list dd { min-width: 0; font-weight: 700; text-align: right; overflow-wrap: anywhere; }
  .side__list dd.is-empty { font-weight: 400; color: var(--muted); font-style: italic; }
  .side__note { margin-top: 16px; font-size: 13px; color: var(--muted); }
  .side__help { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line-soft); font-size: 13px; color: var(--muted); }

  .site-footer {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px;
    max-width: 1120px; margin: 0 auto; padding: 36px 40px 40px; font-size: 13px; color: var(--muted);
  }
  .site-footer span:first-child { font-weight: 700; color: var(--navy); letter-spacing: .06em; text-transform: uppercase; }
}

/* Telas largas: calendário ao lado dos horários, observações ao lado do valor */
@media (min-width: 1180px) {
  .split { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 36px; align-items: start; }
  .split .label-title--first { margin-top: 0; }
  .split .field { margin-bottom: 0; }
  .split .slots { grid-template-columns: repeat(2, 1fr); }
}

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