/* ============================================================
   MARÉ · app.css — reservar.html + admin.html
   Usa as vars de tokens.css. Não redefine cores.
   ============================================================ */

/* ---------- header (sólido — páginas internas) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 60;
  background: var(--lagoon-950);
  box-shadow: 0 2px 14px rgba(6, 43, 44, .22);
}
.header-inner {
  position: relative;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 14px 24px;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-logo { width: 40px; height: 40px; flex-shrink: 0; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--font-display); font-size: 1.05rem; color: var(--white); }
.brand-text small { font-size: .68rem; letter-spacing: .07em; text-transform: uppercase; color: var(--aqua-200); }
.main-nav { display: none; gap: 26px; }
.main-nav a { color: var(--sand-100); font-weight: 500; font-size: .92rem; }
.main-nav a:hover { color: var(--gold-300); }
.nav-toggle {
  display: inline-flex; background: none; border: none; color: var(--white);
  font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 6px 8px; border-radius: var(--radius-s);
}
.nav-toggle:hover { background: rgba(255,255,255,.1); }
.header-inner .btn-reservar { padding: 10px 20px; font-size: .88rem; white-space: nowrap; }

@media (max-width: 879px) {
  .main-nav.open {
    display: flex; flex-direction: column; gap: 4px;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--lagoon-950); padding: 14px 24px 20px; box-shadow: var(--shadow-2);
  }
  .main-nav.open a { padding: 10px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
}
@media (min-width: 880px) {
  .main-nav { display: flex; }
  .nav-toggle { display: none; }
}

/* ---------- footer (compartilhado) ---------- */
.site-footer { background: var(--lagoon-950); color: var(--sand-100); margin-top: 64px; }
.footer-inner {
  display: grid; grid-template-columns: 1fr; gap: 32px;
  padding: 56px 24px 40px; max-width: var(--container); margin: 0 auto;
}
.footer-brand { display: flex; gap: 12px; align-items: flex-start; }
.footer-logo { width: 44px; height: 44px; flex-shrink: 0; }
.footer-brand strong { font-family: var(--font-display); color: var(--white); font-size: 1.05rem; }
.footer-tagline { color: var(--aqua-200); font-size: .85rem; margin: .35em 0 0; max-width: 30ch; }
.footer-col h4 { color: var(--gold-300); font-size: .76rem; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 12px; }
.footer-link { display: block; color: var(--sand-100); margin-bottom: 8px; font-size: .92rem; }
.footer-link:hover { color: var(--gold-300); }
.footer-admin-link { color: var(--aqua-200); font-size: .85rem; border-bottom: 1px dashed rgba(159,221,214,.5); }
.footer-admin-link:hover { color: var(--gold-300); border-color: var(--gold-300); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.12); padding: 18px 24px;
  font-size: .8rem; color: var(--aqua-200); text-align: center;
}
@media (min-width: 720px) {
  .footer-inner { grid-template-columns: 1.5fr 1fr 1fr 1fr; }
}

/* ---------- toasts ---------- */
.toast-stack {
  position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 10px; z-index: 999;
  width: calc(100% - 32px); max-width: 380px; pointer-events: none;
}
.toast {
  background: var(--lagoon-950); color: var(--white); padding: 14px 18px;
  border-radius: var(--radius-m); box-shadow: var(--shadow-2); font-size: .88rem;
  display: flex; align-items: center; gap: 10px; animation: toast-in .25s ease;
  border-left: 4px solid var(--aqua-400);
}
.toast.toast-error { border-left-color: var(--coral-500); }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

/* ============================================================
   RESERVAR — wizard
   ============================================================ */
.reservar-page { padding: 36px 0 72px; }
.reservar-page .page-lead { margin-bottom: 28px; }

.wizard-progress {
  display: flex; justify-content: space-between; max-width: 480px;
  margin: 0 auto 36px; position: relative;
}
.wizard-progress::before {
  content: ""; position: absolute; top: 17px; left: 10%; right: 10%;
  height: 2px; background: var(--sand-200); z-index: 0;
}
.wizard-progress .step {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  position: relative; z-index: 1; flex: 1;
}
.wizard-progress .step-dot {
  width: 34px; height: 34px; border-radius: 50%; background: var(--white);
  border: 2px solid var(--sand-200); display: flex; align-items: center; justify-content: center;
  font-weight: 700; color: var(--ink-600); font-size: .88rem; transition: all .2s ease;
}
.wizard-progress .step-label { font-size: .74rem; color: var(--ink-600); font-weight: 600; text-align: center; }
.wizard-progress .step.active .step-dot { background: var(--teal-500); border-color: var(--teal-500); color: var(--white); }
.wizard-progress .step.active .step-label { color: var(--lagoon-900); }
.wizard-progress .step.done .step-dot { background: var(--aqua-400); border-color: var(--aqua-400); color: var(--white); }
.wizard-progress .step.done .step-dot::after { content: "✓"; }
.wizard-progress .step.done .step-dot span { display: none; }

.wizard-panel { display: none; }
.wizard-panel.active { display: block; animation: fade-in .3s ease; }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .wizard-panel.active { animation: none; } }

.wizard-actions { display: flex; justify-content: space-between; align-items: center; margin-top: 30px; gap: 12px; }
.btn-back { background: transparent; color: var(--ink-600); border: 1.5px solid var(--sand-200); }
.btn-back:hover { background: var(--sand-200); }

/* type toggle */
.type-toggle { display: inline-flex; background: var(--sand-200); border-radius: var(--radius-pill); padding: 4px; margin-bottom: 24px; }
.type-toggle button {
  border: none; background: transparent; padding: 10px 22px; border-radius: var(--radius-pill);
  font-weight: 600; font-size: .88rem; color: var(--ink-600); cursor: pointer; font-family: var(--font-body);
}
.type-toggle button.active { background: var(--white); color: var(--lagoon-900); box-shadow: var(--shadow-1); }

/* guests steppers */
.guests-row { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 24px; }
.stepper { display: flex; align-items: center; gap: 12px; background: var(--white); border-radius: var(--radius-pill); padding: 8px 8px 8px 18px; box-shadow: var(--shadow-1); }
.stepper span { font-size: .85rem; font-weight: 600; color: var(--ink-600); min-width: 64px; }
.stepper button {
  width: 30px; height: 30px; border-radius: 50%; border: none; background: var(--sand-200);
  font-size: 1.1rem; line-height: 1; cursor: pointer; color: var(--lagoon-900);
}
.stepper button:disabled { opacity: .35; cursor: not-allowed; }
.stepper output { min-width: 18px; text-align: center; font-weight: 700; color: var(--lagoon-900); }

/* calendars */
.calendars { display: grid; grid-template-columns: 1fr; gap: 20px; margin-bottom: 8px; }
@media (min-width: 760px) { .calendars { grid-template-columns: 1fr 1fr; } }
.calendar { background: var(--white); border-radius: var(--radius-l); box-shadow: var(--shadow-1); padding: 18px; }
.calendar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.calendar-head h3 { margin: 0; font-size: .98rem; text-transform: capitalize; color: var(--lagoon-900); }
.calendar-head button {
  background: var(--sand-200); border: none; width: 30px; height: 30px; border-radius: 50%;
  cursor: pointer; font-size: 1rem; color: var(--lagoon-900);
}
.calendar-head button:disabled { opacity: .3; cursor: not-allowed; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.calendar-grid .dow { font-size: .68rem; color: var(--ink-600); font-weight: 700; padding-bottom: 6px; }
.day-cell {
  aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; border-radius: 10px; font-size: .8rem; font-weight: 600; cursor: pointer;
  border: 1.5px solid transparent; background: var(--sand-100); color: var(--ink-900);
}
.day-cell.empty { background: transparent; cursor: default; }
.day-cell.past { opacity: .32; cursor: not-allowed; }
.day-cell.livre { background: #EAF7F1; }
.day-cell.poucas { background: #FFF3D9; }
.day-cell.lotado { background: #FBEAE6; color: var(--ink-600); cursor: not-allowed; }
.day-cell .dot { width: 5px; height: 5px; border-radius: 50%; background: transparent; }
.day-cell.livre .dot { background: var(--aqua-400); }
.day-cell.poucas .dot { background: var(--gold-300); }
.day-cell.lotado .dot { background: var(--coral-500); }
.day-cell.selected { border-color: var(--teal-500); background: var(--teal-500); color: var(--white); }
.day-cell.selected .dot { background: var(--white); }
.day-cell.in-range { background: var(--aqua-200); border-color: transparent; }
.day-cell:focus-visible { outline: 2px solid var(--teal-500); outline-offset: 2px; }

.calendar-legend { display: flex; flex-wrap: wrap; gap: 16px; margin: 18px 2px 0; font-size: .78rem; color: var(--ink-600); }
.calendar-legend .legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.legend-dot.livre { background: var(--aqua-400); }
.legend-dot.poucas { background: var(--gold-300); }
.legend-dot.lotado { background: var(--coral-500); }

/* step 2 — chalé cards */
.chale-results { display: grid; grid-template-columns: 1fr; gap: 20px; }
@media (min-width: 640px) { .chale-results { grid-template-columns: 1fr 1fr; } }
.chale-pick-card { display: flex; flex-direction: column; }
.chale-pick-card .chale-illustration { width: 100%; height: 110px; }
.chale-pick-card .chale-illustration svg { width: 100%; height: 100%; }
.chale-pick-card .chale-body { padding: 18px 18px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.chale-pick-card .chale-name-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.chale-pick-card .chale-name-row h3 { margin: 0; font-size: 1.1rem; }
.chale-pick-card .chale-tipo { font-size: .78rem; color: var(--ink-600); font-weight: 600; }
.chale-pick-card .chale-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chale-pick-card .chale-chips .chip { font-size: .72rem; padding: 4px 10px; }
.chale-pick-card .price-line {
  display: flex; justify-content: space-between; align-items: flex-end; margin-top: auto;
  padding-top: 12px; border-top: 1px solid var(--sand-200);
}
.chale-pick-card .price-detail { font-size: .78rem; color: var(--ink-600); }
.chale-pick-card .price-total { font-family: var(--font-display); font-size: 1.35rem; color: var(--lagoon-900); }

/* step 3 — resumo / form */
.step3-view { display: none; }
.step3-view.active { display: block; animation: fade-in .3s ease; }
@media (prefers-reduced-motion: reduce) { .step3-view.active { animation: none; } }

.summary-card { background: var(--white); border-radius: var(--radius-l); box-shadow: var(--shadow-1); padding: 22px 24px; margin-bottom: 24px; }
.summary-card h3 { font-size: 1rem; margin-bottom: 12px; }
.summary-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--sand-200); font-size: .92rem; }
.summary-row:last-of-type { border-bottom: none; }
.summary-row .label { color: var(--ink-600); }
.summary-row .value { font-weight: 600; color: var(--ink-900); text-align: right; }
.summary-sinal {
  background: var(--sand-200); border-radius: var(--radius-m); padding: 16px 18px;
  margin-top: 14px; display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.summary-sinal .label { font-size: .82rem; color: var(--ink-600); font-weight: 600; }
.summary-sinal strong { font-size: 1.4rem; color: var(--coral-600); font-family: var(--font-display); }

.form-grid { display: grid; gap: 16px; margin-bottom: 22px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } .form-grid .field-full { grid-column: 1 / -1; } }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field label { font-size: .8rem; font-weight: 600; color: var(--ink-600); }
.form-field label .req { color: var(--coral-500); }
.form-field input, .form-field textarea {
  padding: 12px 14px; border-radius: var(--radius-s); border: 1.5px solid var(--sand-200);
  font-family: var(--font-body); font-size: .95rem; background: var(--white); color: var(--ink-900);
}
.form-field textarea { resize: vertical; min-height: 76px; }
.form-field input:focus, .form-field textarea:focus { outline: 2px solid var(--teal-500); outline-offset: 1px; border-color: var(--teal-500); }
.form-hint { font-size: .74rem; color: var(--ink-600); }

/* estados de erro por campo — mensagem amigável sempre visível, nunca bloqueio silencioso */
.field-error { display: block; font-size: .78rem; color: var(--coral-600); font-weight: 600; }
.field-error:empty { display: none; }
.form-field.has-error input, .form-field.has-error textarea { border-color: var(--coral-500); }

/* checkbox de aceite (LGPD) */
.form-check-wrap { margin: 4px 0 20px; }
.form-check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.form-check input[type="checkbox"] { width: 20px; height: 20px; min-width: 20px; margin-top: 2px; accent-color: var(--teal-500); }
.form-check span { font-size: .86rem; color: var(--ink-600); line-height: 1.45; }
.form-check-wrap.has-error .form-check span { color: var(--coral-600); }

/* aviso de day use no passo 1 — informativo, não é fluxo de agendamento
   (texto corrido normal: nada de flex aqui, ou o texto+elementos inline
   viram itens separados e quebram em colunas estreitas) */
.dayuse-callout {
  background: #EAF7F1; color: var(--ink-900);
  font-size: .88rem; line-height: 1.6; padding: 14px 16px; border-radius: var(--radius-m);
  margin: 0 0 22px; border-left: 3px solid var(--aqua-400);
}
.dayuse-callout > span[aria-hidden] { margin-right: 6px; }
.dayuse-callout a { font-weight: 700; white-space: nowrap; }

.payment-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 4px 0 24px; }
.payment-choice label {
  border: 2px solid var(--sand-200); border-radius: var(--radius-m); padding: 14px 12px;
  cursor: pointer; text-align: center; font-size: .85rem; background: var(--white); transition: border-color .15s, background .15s;
}
.payment-choice input { position: absolute; opacity: 0; pointer-events: none; }
.payment-choice label strong { display: block; font-size: 1.05rem; font-family: var(--font-display); margin-top: 4px; color: var(--lagoon-900); }
.payment-choice label.selected { border-color: var(--teal-500); background: #EAF7F1; }

/* PIX */
.pix-panel { text-align: center; max-width: 420px; margin: 0 auto; }
.pix-qr { width: 190px; height: 190px; margin: 0 auto 22px; background: var(--white); border-radius: var(--radius-m); box-shadow: var(--shadow-1); padding: 10px; }
.pix-qr svg { width: 100%; height: 100%; }
.pix-amount { font-family: var(--font-display); font-size: 1.6rem; color: var(--lagoon-900); margin: 4px 0 18px; }
.pix-code { display: flex; gap: 8px; background: var(--sand-200); border-radius: var(--radius-m); padding: 10px 10px 10px 16px; align-items: center; text-align: left; }
.pix-code code { flex: 1; overflow-x: auto; font-size: .74rem; white-space: nowrap; color: var(--ink-900); }
.pix-copy-btn { border: none; background: var(--teal-500); color: var(--white); border-radius: var(--radius-pill); padding: 9px 16px; font-size: .78rem; font-weight: 700; cursor: pointer; flex-shrink: 0; }
.pix-copy-btn:hover { background: var(--lagoon-700); }
.pix-note { font-size: .8rem; color: #9A6A15; margin-top: 16px; background: #FFF3D9; padding: 12px 14px; border-radius: var(--radius-s); }

/* sucesso */
.success-panel { text-align: center; max-width: 480px; margin: 0 auto; }
.success-icon { width: 72px; height: 72px; margin: 0 auto 16px; }
.success-code {
  font-family: var(--font-display); font-size: 1.5rem; letter-spacing: .04em; color: var(--teal-500);
  background: var(--sand-200); display: inline-block; padding: 10px 24px; border-radius: var(--radius-m); margin: 4px 0 22px;
}
.success-actions { display: flex; flex-direction: column; gap: 12px; margin-top: 22px; }
.success-actions .btn { justify-content: center; width: 100%; }

/* ============================================================
   ADMIN
   ============================================================ */
.demo-banner {
  background: var(--coral-500); color: var(--white); text-align: center; font-weight: 700;
  font-size: .8rem; padding: 9px 12px; letter-spacing: .02em;
}
.admin-body { display: flex; align-items: stretch; min-height: calc(100vh - 200px); }
.admin-sidebar { display: none; }
@media (min-width: 900px) {
  .admin-sidebar {
    display: flex; flex-direction: column; width: 76px; background: var(--lagoon-950);
    padding: 24px 0; gap: 8px; align-items: center; flex-shrink: 0;
  }
  .admin-sidebar a {
    width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center;
    color: var(--aqua-200); font-size: 1.25rem; transition: background .15s, color .15s;
  }
  .admin-sidebar a:hover, .admin-sidebar a.active { background: rgba(255,255,255,.12); color: var(--white); }
}
.admin-wrap { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.admin-topbar-nav { display: flex; overflow-x: auto; gap: 8px; padding: 12px 20px; background: var(--white); border-bottom: 1px solid var(--sand-200); }
@media (min-width: 900px) { .admin-topbar-nav { display: none; } }
.admin-topbar-nav a { white-space: nowrap; padding: 8px 16px; border-radius: var(--radius-pill); background: var(--sand-200); font-size: .82rem; font-weight: 600; color: var(--ink-600); }
.admin-topbar-nav a.active { background: var(--teal-500); color: var(--white); }
.admin-main { flex: 1; padding: 28px 20px 72px; max-width: 1180px; margin: 0 auto; width: 100%; }
.admin-main .section-sub { margin-bottom: 8px; }
.admin-main section { padding: 0; margin: 40px 0; scroll-margin-top: 88px; }
.admin-main section:first-of-type { margin-top: 24px; }

.kpi-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (min-width: 700px) { .kpi-grid { grid-template-columns: repeat(4, 1fr); } }
.kpi-card { padding: 18px 20px; }
.kpi-label { font-size: .72rem; color: var(--ink-600); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.kpi-value { font-family: var(--font-display); font-size: 1.6rem; color: var(--lagoon-900); margin-top: 6px; }
.kpi-trend { font-size: .76rem; font-weight: 600; margin-top: 6px; }
.kpi-trend.up { color: var(--teal-500); }
.kpi-trend.warn { color: var(--coral-600); }

.occupancy-scroll { overflow-x: auto; background: var(--white); border-radius: var(--radius-l); box-shadow: var(--shadow-1); padding: 6px; margin-top: 16px; }
.occupancy-grid { display: grid; grid-template-columns: 148px repeat(14, 46px); min-width: max-content; }
.occ-head {
  padding: 10px 4px; text-align: center; font-size: .66rem; line-height: 1.35; font-weight: 700;
  color: var(--ink-600); border-bottom: 2px solid var(--sand-200); background: var(--white);
}
.occ-head.occ-corner { position: sticky; left: 0; z-index: 2; text-align: left; padding-left: 14px; }
.occ-head.occ-today { color: var(--coral-600); }
.occ-row-label {
  position: sticky; left: 0; background: var(--white); padding: 10px 14px; font-weight: 700;
  font-size: .8rem; color: var(--lagoon-900); display: flex; align-items: center;
  border-right: 2px solid var(--sand-200); border-bottom: 1px solid var(--sand-100); z-index: 1;
}
.occ-cell {
  margin: 3px; border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 700; min-height: 36px; border: 1.5px solid transparent;
}
.occ-cell.livre { background: var(--sand-100); color: var(--ink-600); }
.occ-cell.reservado { background: var(--aqua-200); color: var(--lagoon-900); }
.occ-cell.checkin { background: var(--gold-300); color: var(--lagoon-950); }
.occ-cell.pendente { background: #FADCCB; color: var(--coral-600); border-color: var(--coral-500); border-style: dashed; }

.occupancy-legend { display: flex; flex-wrap: wrap; gap: 18px; margin-top: 14px; font-size: .8rem; color: var(--ink-600); }
.occupancy-legend .legend-item { display: inline-flex; align-items: center; gap: 7px; }
.occupancy-legend .legend-dot { width: 12px; height: 12px; border-radius: 4px; }
.occupancy-legend .legend-dot.livre { background: var(--sand-100); border: 1px solid var(--ink-600); }
.occupancy-legend .legend-dot.reservado { background: var(--aqua-200); }
.occupancy-legend .legend-dot.checkin { background: var(--gold-300); }
.occupancy-legend .legend-dot.pendente { background: #FADCCB; border: 1.5px dashed var(--coral-500); }

.today-grid { display: grid; grid-template-columns: 1fr; gap: 20px; margin-top: 16px; }
@media (min-width: 800px) { .today-grid { grid-template-columns: 1fr 1fr; } }
.today-list { padding: 20px 22px; }
.today-list h3 { font-size: .98rem; margin-bottom: 6px; }
.today-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--sand-200); }
.today-item:last-child { border-bottom: none; }
.today-item .guest-info { display: flex; flex-direction: column; gap: 2px; }
.today-item .guest-name { font-weight: 700; color: var(--lagoon-900); font-size: .92rem; }
.today-item .chale-tag { font-size: .76rem; color: var(--ink-600); }
.badge { font-size: .68rem; font-weight: 700; padding: 4px 10px; border-radius: var(--radius-pill); white-space: nowrap; }
.badge-checkin { background: #EAF7F1; color: var(--teal-500); }
.badge-checkout { background: #FFF3D9; color: #9A6A15; }
.charge-row { display: flex; flex-direction: column; }
.charge-value { font-size: .82rem; color: var(--coral-600); font-weight: 700; }
.charge-btn {
  border: none; background: var(--coral-500); color: var(--white); padding: 9px 14px;
  border-radius: var(--radius-pill); font-size: .76rem; font-weight: 700; cursor: pointer; white-space: nowrap;
}
.charge-btn:hover { background: var(--coral-600); }
.charge-btn:disabled { background: var(--sand-200); color: var(--ink-600); cursor: not-allowed; }
.empty-note { font-size: .85rem; color: var(--ink-600); padding: 8px 0; }

@media (max-width: 720px) {
  .reservar-page { padding: 24px 0 56px; }
  .payment-choice { grid-template-columns: 1fr; }
}
