/* ── reset e variáveis ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #F5F2EE;
  --card: #FFFFFF;
  --accent: #2C5F8A;
  --accent-light: #E8F0F7;
  --accent-mid: #4A82B0;
  --success: #1D7A5F;
  --success-light: #E4F5F0;
  --text: #1A1A1A;
  --text-2: #5C5C5C;
  --text-3: #9A9A9A;
  --border: #E2DDD7;
  --danger: #C0392B;
  --danger-light: #FBEAEA;
  --radius: 12px;
  --radius-sm: 8px;
}

/* ── body e fundo ── */
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  color: var(--text);
}

/* círculos decorativos de fundo */
body::before, body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
}
body::before {
  width: 500px; height: 500px;
  background: radial-gradient(circle, #D6E8F5 0%, transparent 70%);
  top: -100px; right: -100px;
}
body::after {
  width: 400px; height: 400px;
  background: radial-gradient(circle, #E8E4DE 0%, transparent 70%);
  bottom: -80px; left: -80px;
}

/* ── container ── */
.container {
  width: 100%;
  max-width: 460px;
  position: relative;
  z-index: 1;
}

/* ── brand / cabeçalho ── */
.brand {
  text-align: center;
  margin-bottom: 1.75rem;
}
.brand-icon {
  width: 52px; height: 52px;
  background: var(--accent);
  border-radius: 16px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
}
.brand-icon svg {
  width: 26px; height: 26px;
  stroke: #fff; fill: none;
  stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.brand h1 {
  font-family: 'DM Serif Display', serif;
  font-size: 26px;
  font-weight: 400;
  color: var(--text);
  letter-spacing: -0.3px;
}
.brand p {
  font-size: 14px;
  color: var(--text-2);
  margin-top: 4px;
}

/* ── barra de progresso ── */
.progress {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  padding: 0 4px;
}
.p-dot {
  width: 32px; height: 32px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 500;
  flex-shrink: 0;
  transition: all 0.3s ease;
}
.p-dot.idle   { background: var(--card); border: 1.5px solid var(--border); color: var(--text-3); }
.p-dot.active { background: var(--accent); color: #fff; border: 1.5px solid var(--accent); }
.p-dot.done   { background: var(--success); color: #fff; border: 1.5px solid var(--success); }

.p-line { flex: 1; height: 1.5px; background: var(--border); transition: background 0.3s; }
.p-line.done { background: var(--success); }

.p-labels {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding: 0 4px;
}
.p-label {
  font-size: 11px;
  color: var(--text-3);
  text-align: center;
  width: 32px;
  transition: color 0.3s;
}
.p-label.active { color: var(--accent); font-weight: 500; }
.p-label.done   { color: var(--success); }

/* ── card principal ── */
.card {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--border);
  padding: 1.75rem;
  animation: fadeUp 0.3s ease;
}
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.card-title {
  font-family: 'DM Serif Display', serif;
  font-size: 22px;
  font-weight: 400;
  color: var(--text);
  margin-bottom: 4px;
}
.card-sub {
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 1.5rem;
  line-height: 1.5;
}

/* ── campos de formulário ── */
.row2  { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.field { margin-bottom: 14px; }

.field label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 6px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.field input,
.field select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: 'DM Sans', sans-serif;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
}
.field input:focus,
.field select:focus { border-color: var(--accent); }
.field input::placeholder { color: var(--text-3); }

/* estado de erro */
.field.has-err input,
.field.has-err select { border-color: var(--danger); background: var(--danger-light); }
.err-msg { font-size: 12px; color: var(--danger); margin-top: 5px; display: none; }
.field.has-err .err-msg { display: block; }

/* ── botões ── */
.btn-row { display: flex; gap: 10px; margin-top: 1.5rem; }

.btn-primary {
  flex: 1;
  height: 46px;
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  transition: background 0.2s, transform 0.1s;
}
.btn-primary:hover  { background: var(--accent-mid); }
.btn-primary:active { transform: scale(0.98); }

.btn-back {
  height: 46px;
  padding: 0 18px;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: 'DM Sans', sans-serif;
  color: var(--text-2);
  cursor: pointer;
  display: flex; align-items: center; gap: 6px;
  transition: background 0.15s;
}
.btn-back:hover { background: var(--bg); }

/* ── calendário ── */
.cal-nav {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px;
}
.cal-nav-btn {
  width: 34px; height: 34px;
  background: transparent;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2);
  transition: background 0.15s;
}
.cal-nav-btn:hover { background: var(--bg); }
.cal-month { font-size: 15px; font-weight: 500; color: var(--text); }

.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-dname {
  text-align: center;
  font-size: 11px;
  color: var(--text-3);
  padding: 5px 0;
  font-weight: 500;
}
.cal-day {
  text-align: center;
  font-size: 13px;
  padding: 7px 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  color: var(--text);
  transition: background 0.15s;
}
.cal-day:hover:not(.empty):not(.past) { background: var(--accent-light); }
.cal-day.past     { color: var(--text-3); cursor: default; }
.cal-day.empty    { cursor: default; }
.cal-day.today    { color: var(--accent); font-weight: 500; }
.cal-day.selected { background: var(--accent) !important; color: #fff !important; font-weight: 500; }

/* ── slots de horário ── */
.slot-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 6px; }
.slot {
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 9px 0;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  transition: all 0.15s;
}
.slot:hover:not(.unavail) { border-color: var(--accent); color: var(--accent); background: var(--accent-light); }
.slot.selected  { background: var(--accent); border-color: var(--accent); color: #fff; }
.slot.unavail   { background: var(--bg); color: var(--text-3); text-decoration: line-through; cursor: default; font-weight: 400; }

/* ── resumo de confirmação ── */
.summary {
  background: var(--bg);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  margin-bottom: 6px;
}
.sum-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.sum-row:last-child { border-bottom: none; }
.sum-label { color: var(--text-2); }
.sum-val   { font-weight: 500; color: var(--text); }

/* ── tela de sucesso ── */
.success-wrap { text-align: center; padding: 1rem 0; }
.success-icon {
  width: 64px; height: 64px;
  background: var(--success-light);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 1.25rem;
}
.success-icon svg {
  width: 30px; height: 30px;
  stroke: var(--success); fill: none;
  stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}
.success-wrap h2 {
  font-family: 'DM Serif Display', serif;
  font-size: 24px; font-weight: 400;
  margin-bottom: 8px;
}
.success-wrap p {
  font-size: 14px;
  color: var(--text-2);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}
.success-detail {
  background: var(--success-light);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 13px;
  color: var(--success);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* ── visibilidade de páginas ── */
.page        { display: none; }
.page.active { display: block; }

/* ── ícone de check no dot ── */
.check-svg {
  width: 14px; height: 14px;
  stroke: #fff; fill: none;
  stroke-width: 2.5;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ── divisor ── */
.divider { border: none; border-top: 1px solid var(--border); margin: 1.25rem 0; }

/* ── serviços ── */
.servicos-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 1rem;
}

.servico-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.2s;
  background: #fff;
}

.servico-card:hover {
  border-color: var(--accent);
  background: var(--accent-light);
}

.servico-card.selecionado {
  border-color: var(--accent);
  background: var(--accent-light);
}

.servico-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.servico-nome {
  font-size: 15px;
  font-weight: 500;
  color: var(--text);
}

.servico-preco {
  font-size: 13px;
  color: var(--text-2);
}

.servico-radio {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  border: 2px solid var(--border);
  flex-shrink: 0;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.servico-card.selecionado .servico-radio {
  border-color: var(--accent);
  background: var(--accent);
}

.servico-card.selecionado .servico-radio::after {
  content: '✓';
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.servico-card.selecionado .servico-radio {
  border-color: var(--accent);
  background: var(--accent);
}

.servico-card.selecionado .servico-radio::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
}
