/* ==============================================================
   EL CURUL BY FDV - PORTAL DE CLIENTES (mobile-first)
   Asistente de reserva: Cuándo y dónde → Tus datos → Pago → Listo
   Objetivos: botones táctiles grandes (≥48px), texto de 16px en
   campos (sin zoom en iOS), resumen y precio siempre visibles.
   ============================================================== */

:root {
  --touch: 52px;
  --bar-h: 92px;
  --radius: 14px;
  --radius-sm: 10px;
  --ok: var(--status-confirmed);
  --warn: var(--status-pending);
  --danger: var(--status-cancelled);
}

body.client-page {
  padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom, 0px) + 12px);
  -webkit-tap-highlight-color: transparent;
}

body.client-page.has-timer {
  --bar-h: 124px;
}

.client-page button,
.client-page select,
.client-page input {
  font-family: inherit;
}

.client-page [hidden] {
  display: none !important;
}

.client-page :focus-visible {
  outline: 3px solid var(--curul-gold);
  outline-offset: 2px;
}

/* ---------- CABECERA COMPACTA ---------- */
.client-page .app-header {
  position: static;
}

.client-page .header-inner {
  flex-direction: row;
  align-items: center;
  padding: 10px 16px;
  gap: 10px;
}

.client-page .brand-logo {
  height: 36px;
}

.client-page .brand-slogan {
  display: none;
}

.client-page .header-actions {
  gap: 8px;
}

.client-page .btn-theme {
  min-height: 40px;
  padding: 8px 12px;
}

.client-page .sync-live-badge {
  padding: 5px 10px;
  font-size: 0.72rem;
}

/* ---------- CONTENEDOR ---------- */
.client-main {
  max-width: 760px;
  padding: 16px 16px 24px;
}

.client-hero {
  margin-bottom: 14px;
}

.client-hero-title {
  font-size: 1.45rem;
  line-height: 1.2;
  font-weight: 800;
  color: var(--text-primary);
}

.client-hero-desc {
  margin-top: 6px;
  font-size: 0.92rem;
  color: var(--text-secondary);
}

.client-hero-desc strong {
  color: var(--text-primary);
}

/* ---------- CLIENTE QUE VUELVE ---------- */
.returning-banner {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--curul-gold-subtle);
  border: 1px solid var(--curul-gold);
  border-radius: var(--radius);
  padding: 14px;
  margin-bottom: 14px;
}

.rb-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.rb-text strong {
  font-size: 1rem;
  color: var(--text-primary);
}

.rb-forget {
  align-self: flex-start;
  margin-top: 4px;
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  text-decoration: underline;
  cursor: pointer;
  min-height: 32px;
}

.rb-action {
  min-height: var(--touch);
  border: none;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  color: var(--text-primary);
  border: 2px solid var(--curul-gold);
  font-weight: 700;
  font-size: 0.95rem;
  padding: 10px 16px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.rb-action:hover {
  background: var(--curul-gold);
  color: #ffffff;
}

.rb-action:active {
  transform: scale(0.98);
}

/* ---------- BARRA DE PROGRESO ---------- */
.wp-sentinel {
  height: 1px;
  margin-bottom: -1px;
  pointer-events: none;
}

/* La barra de progreso acompaña al cliente mientras baja.
   Su alto es SIEMPRE el mismo: al pegarse solo aparece la sombra y la línea inferior.
   (Si cambiara de alto, todo el contenido saltaría al hacer scroll.) */
.wizard-progress {
  position: sticky;
  top: 0;
  z-index: 80;
  margin: 0 -16px;
  padding: 10px 16px;
  background: var(--bg-body);
  border-bottom: 1px solid transparent;
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
}

.wizard-progress.is-stuck {
  border-bottom-color: var(--border-light);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.14);
}

.wizard-progress.is-stuck .wp-label {
  color: var(--text-primary);
}

.wp-steps-nav {
  margin-bottom: 14px;
}


.wp-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
}

.wp-label {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.wp-bar {
  height: 8px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-light);
  border-radius: 999px;
  overflow: hidden;
}

.wp-bar-fill {
  height: 100%;
  width: 17%;
  background: linear-gradient(90deg, var(--curul-gold), var(--curul-gold-hover));
  border-radius: 999px;
  transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.wp-steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 8px;
}

.wp-step button {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 4px;
  border-radius: var(--radius-sm);
}

.wp-step button:disabled {
  cursor: default;
}

.wp-dot {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  color: var(--text-secondary);
  font-weight: 800;
  font-size: 0.78rem;
  transition: all 0.25s ease;
}

.wp-step.active button {
  color: var(--text-primary);
}

.wp-step.active .wp-dot {
  background: var(--curul-gold);
  border-color: var(--curul-gold);
  color: #ffffff;
  box-shadow: 0 0 0 4px var(--curul-gold-subtle);
}

.wp-step.done .wp-dot {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}

.wp-step.done button {
  color: var(--text-secondary);
}

.wp-name {
  line-height: 1.15;
  text-align: left;
}

/* ---------- PANTALLAS ---------- */
.wizard-screen {
  animation: screenIn 0.3s ease both;
}

@keyframes screenIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

.screen-head {
  margin-bottom: 14px;
}

.screen-title {
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.2;
}

.screen-sub {
  margin-top: 4px;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.shortcut-chip {
  width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 10px 14px;
  background: var(--bg-surface);
  border: 1.5px dashed var(--curul-gold);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.shortcut-chip:hover {
  background: var(--curul-gold-subtle);
}

.shortcut-chip:active {
  transform: scale(0.98);
}

.block {
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--shadow-sm);
}

.block-title {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 1rem;
  font-weight: 800;
  margin-bottom: 12px;
}

.block-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--curul-gold);
  color: #ffffff;
  font-size: 0.78rem;
  font-weight: 800;
}

.block-sub {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

.block-count {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* ---------- CAMPOS ---------- */
.field {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 14px;
}

.field:first-child,
.block-title + .field {
  margin-top: 0;
}

.field-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
}

.field-input {
  width: 100%;
  min-height: var(--touch);
  padding: 12px 14px;
  font-size: 1rem; /* 16px: evita el zoom automático en iPhone */
  color: var(--text-primary);
  background: var(--bg-body);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius-sm);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-appearance: none;
  appearance: none;
}

select.field-input {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%23888f99' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}

.field-input:focus {
  outline: none;
  border-color: var(--curul-gold);
  box-shadow: 0 0 0 4px var(--curul-gold-subtle);
}

.field-input::placeholder {
  color: var(--text-muted);
}

.end-input {
  background: var(--bg-subtle);
  color: var(--text-secondary);
  cursor: default;
}

.field-hint {
  display: block;
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.field-msg {
  min-height: 1.1em;
  font-size: 0.8rem;
  line-height: 1.35;
  color: var(--text-muted);
}

.field-msg.is-error {
  color: var(--danger);
  font-weight: 600;
}

.field-msg.is-progress {
  color: var(--text-muted);
}

.field.is-invalid .field-input {
  border-color: var(--danger);
  background: var(--status-cancelled-bg);
}

.field.is-valid .field-input {
  border-color: var(--ok);
}

.field.is-valid .field-msg:not(.is-error) {
  color: var(--ok);
  font-weight: 600;
}

.time-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

.optional-tag {
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border-radius: 999px;
  padding: 2px 8px;
}

/* ---------- FECHAS, DURACIÓN ---------- */
.date-pills,
.duration-chips,
.alt-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill,
.chip,
.alt-chip {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 16px;
  background: var(--bg-body);
  border: 1.5px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text-primary);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.pill:hover,
.chip:hover,
.alt-chip:hover {
  border-color: var(--curul-gold);
}

.pill:active,
.chip:active,
.alt-chip:active {
  transform: scale(0.97);
}

.pill.active,
.chip.active {
  background: var(--curul-gold);
  border-color: var(--curul-gold);
  color: #ffffff;
  font-weight: 800;
}

.pill-date {
  position: relative;
  overflow: hidden;
}

.pill-date input[type="date"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  border: none;
}

.date-pills + .field-hint {
  margin-bottom: 4px;
}

.date-pills {
  margin-bottom: 14px;
}

.tip-btn {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.tip-btn:hover {
  border-color: var(--curul-gold);
  color: var(--text-primary);
}

.tip-text {
  display: block;
  margin: 4px 0 2px;
  padding: 10px 12px;
  background: var(--bg-subtle);
  border-left: 3px solid var(--curul-gold);
  border-radius: 6px;
  font-size: 0.8rem;
  line-height: 1.45;
  font-weight: 500;
  color: var(--text-secondary);
}

/* ---------- ESPACIOS ---------- */
.client-page .spaces-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
  grid-template-columns: none;
  margin: 0;
}

.space-option {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  gap: 12px;
  padding: 14px;
  min-height: 72px;
  background: var(--bg-body);
  border: 2px solid var(--border-light);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.space-option:hover {
  border-color: var(--border-strong);
}

.space-option.selected {
  border-color: var(--curul-gold);
  background: var(--curul-gold-subtle);
  box-shadow: 0 0 0 3px var(--curul-gold-subtle);
}

.so-icon {
  font-size: 1.7rem;
  line-height: 1;
  padding-top: 2px;
}

.so-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.so-name {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-weight: 800;
  font-size: 1rem;
  color: var(--text-primary);
}

.so-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
}

.so-best {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.so-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.so-price {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  white-space: nowrap;
}

.so-price strong {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-primary);
}

.so-price small {
  font-size: 0.72rem;
  color: var(--text-muted);
}

.so-check {
  position: absolute;
  top: -9px;
  right: -9px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: none;
  align-items: center;
  justify-content: center;
  background: var(--curul-gold);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.85rem;
  box-shadow: var(--shadow-md);
}

.space-option.selected .so-check {
  display: inline-flex;
}

.pop-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--curul-olive);
  color: #fff;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.urgency-chip {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--status-pending-bg);
  color: var(--warn);
  font-size: 0.74rem;
  font-weight: 700;
}

.urgency-note {
  margin-bottom: 12px;
  padding: 10px 12px;
  background: var(--status-pending-bg);
  border-left: 3px solid var(--warn);
  border-radius: 6px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--warn);
}

.tip-link {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  background: none;
  border: none;
  padding: 0 2px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.tip-link:hover {
  color: var(--text-primary);
}

.space-tip {
  display: block;
  margin-top: 6px;
  padding: 10px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: 8px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.tip-features {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.tip-features em {
  font-style: normal;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

.empty-state {
  padding: 18px 14px;
  text-align: center;
  font-size: 0.88rem;
  line-height: 1.45;
  color: var(--text-secondary);
  background: var(--bg-subtle);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
}

.select-note {
  margin-top: 10px;
  padding: 10px 12px;
  background: var(--bg-subtle);
  border-radius: 8px;
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.alt-box {
  margin-top: 12px;
  padding: 14px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
}

.alt-title {
  font-size: 0.9rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.alt-text {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.alt-chip {
  font-size: 0.84rem;
  background: var(--bg-surface);
}

/* ---------- PERSONAS ---------- */
.people-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.step-btn {
  width: var(--touch);
  height: var(--touch);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 2px solid var(--curul-gold);
  background: var(--bg-surface);
  color: var(--text-primary);
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  transition: all 0.15s ease;
}

.step-btn:hover:not(:disabled) {
  background: var(--curul-gold);
  color: #ffffff;
}

.step-btn:active:not(:disabled) {
  transform: scale(0.94);
}

.step-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
  border-color: var(--border-strong);
}

.people-count {
  min-width: 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.1;
}

.people-count strong {
  font-size: 2rem;
  font-weight: 800;
}

.people-count span {
  font-size: 0.8rem;
  color: var(--text-muted);
}

#people-hint {
  text-align: center;
}

/* ---------- MENSAJES EN LÍNEA ---------- */
.inline-msg {
  margin: 4px 0 14px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.86rem;
  font-weight: 600;
  line-height: 1.4;
}

.inline-error {
  background: var(--status-cancelled-bg);
  color: var(--danger);
  border: 1px solid var(--danger);
}

.inline-info {
  background: var(--bg-subtle);
  color: var(--text-secondary);
  border: 1px solid var(--border-strong);
}

/* ---------- PANTALLA 2 ---------- */
.recap-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  margin-bottom: 14px;
  background: var(--curul-gold-subtle);
  border: 1px solid var(--curul-gold);
  border-radius: var(--radius);
}

.recap-main {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.recap-main strong {
  font-size: 1rem;
  color: var(--text-primary);
}

.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  background: none;
  border: none;
  padding: 8px 12px;
  color: var(--text-secondary);
  font-size: 0.88rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.link-btn:hover {
  color: var(--text-primary);
}

.link-btn.inline {
  flex: 0 0 auto;
  border: 1.5px solid var(--border-strong);
  border-radius: 999px;
  text-decoration: none;
  background: var(--bg-surface);
  padding: 8px 16px;
}

.link-btn.danger {
  color: var(--danger);
}

.wizard-screen > .link-btn {
  display: flex;
  margin: 8px auto 0;
}

.hold-notice {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  margin-bottom: 14px;
  background: var(--bg-subtle);
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--text-secondary);
}

.hold-notice strong {
  color: var(--text-primary);
}

.hold-notice-icon {
  font-size: 1.2rem;
  line-height: 1.2;
}

/* campo trampa anti-bot (fuera de pantalla, no usar display:none) */
.hp-field {
  position: absolute !important;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}

#captcha-wrap {
  margin-bottom: 14px;
}

.client-page .captcha-box {
  width: 100%;
  max-width: 100%;
  min-height: var(--touch);
}

/* ---------- PANTALLA 3: PAGO ---------- */
.pay-live {
  display: flex;
  flex-direction: column;
}

.timer-card {
  padding: 14px;
  margin-bottom: 14px;
  background: var(--bg-surface);
  border: 1.5px solid var(--curul-gold);
  border-radius: var(--radius);
}

.timer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.timer-label {
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.timer-text {
  font-size: 1.7rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}

.timer-bar {
  height: 6px;
  margin: 10px 0 8px;
  background: var(--bg-subtle);
  border-radius: 999px;
  overflow: hidden;
}

.timer-bar-fill {
  height: 100%;
  width: 100%;
  background: var(--ok);
  border-radius: 999px;
  transition: width 1s linear, background 0.3s ease;
}

.timer-note {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.timer-card.timer-warn {
  border-color: var(--warn);
}

.timer-card.timer-warn .timer-text {
  color: var(--warn);
}

.timer-card.timer-warn .timer-bar-fill {
  background: var(--warn);
}

.timer-card.timer-danger {
  border-color: var(--danger);
  background: var(--status-cancelled-bg);
}

.timer-card.timer-danger .timer-text {
  color: var(--danger);
  animation: timerPulse 1s ease-in-out infinite;
}

.timer-card.timer-danger .timer-bar-fill {
  background: var(--danger);
}

@keyframes timerPulse {
  50% { opacity: 0.55; }
}

.pay-amount-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 18px 14px;
  margin-bottom: 14px;
  text-align: center;
  background: var(--curul-gold-subtle);
  border: 2px solid var(--curul-gold);
  border-radius: var(--radius);
}

.pay-amount-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
}

.pay-amount {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.15;
  color: var(--text-primary);
  font-variant-numeric: tabular-nums;
}

.pay-amount-eur {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.rate-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px 10px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--border-strong);
  width: 100%;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.rate-line .rate-when {
  font-weight: 700;
}

.rate-line.rate-fresh .rate-when {
  color: var(--ok);
}

.rate-line.rate-stale .rate-when {
  color: var(--warn);
}

.rate-line .tip-text {
  flex-basis: 100%;
  text-align: left;
}

.pay-data-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  margin-bottom: 14px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}

.pay-heading {
  font-size: 0.98rem;
  font-weight: 800;
  margin-bottom: 4px;
}

.pay-row {
  display: grid;
  grid-template-columns: 78px 1fr auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: var(--touch);
  padding: 8px 12px;
  text-align: left;
  background: var(--bg-body);
  border: 1.5px solid var(--border-light);
  border-radius: var(--radius-sm);
  color: var(--text-primary);
  cursor: pointer;
  transition: all 0.18s ease;
}

.pay-row:hover {
  border-color: var(--curul-gold);
}

.pay-row:active {
  transform: scale(0.99);
}

.pr-label {
  font-size: 0.74rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.pr-value {
  min-width: 0;
  font-size: 1rem;
  font-weight: 800;
  word-break: break-word;
  font-variant-numeric: tabular-nums;
}

.pr-copy {
  flex: 0 0 auto;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.pay-row-amount {
  background: var(--curul-gold-subtle);
  border-color: var(--curul-gold);
}

.pay-row.copied {
  background: var(--status-confirmed-bg);
  border-color: var(--ok);
}

.pay-row.copied .pr-copy {
  background: var(--ok);
  border-color: var(--ok);
  color: #fff;
}

.btn-copy-all {
  width: 100%;
  min-height: var(--touch);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 4px;
  padding: 12px 16px;
  background: var(--curul-olive);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.1s ease;
}

.btn-copy-all:hover {
  background: var(--curul-olive-light);
}

.btn-copy-all:active {
  transform: scale(0.98);
}

.btn-copy-all.copied {
  background: var(--ok);
}

.ref-input {
  font-family: ui-monospace, 'SFMono-Regular', Consolas, monospace;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.35em;
  text-align: center;
  min-height: 60px;
}

.ref-input::placeholder {
  letter-spacing: 0.35em;
}

/* ---------- COMPROBANTE ---------- */
.receipt-drop {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 12px 14px;
  background: var(--bg-body);
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.18s ease;
}

.receipt-drop:hover {
  border-color: var(--curul-gold);
  background: var(--curul-gold-subtle);
}

.receipt-icon {
  font-size: 1.6rem;
}

.receipt-text {
  display: flex;
  flex-direction: column;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text-primary);
}

.receipt-text small {
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--text-muted);
}

.receipt-preview {
  position: relative;
  display: inline-block;
  max-width: 100%;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.receipt-preview img {
  display: block;
  max-width: 100%;
  max-height: 240px;
  object-fit: contain;
  background: var(--bg-subtle);
}

.receipt-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.65);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- TIEMPO AGOTADO ---------- */
.expired-card {
  text-align: center;
  padding: 28px 18px;
  background: var(--bg-surface);
  border: 1.5px solid var(--danger);
  border-radius: var(--radius);
}

.expired-icon {
  font-size: 2.6rem;
}

.expired-title {
  margin: 6px 0;
  font-size: 1.2rem;
  font-weight: 800;
}

.expired-text {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--text-secondary);
}

/* ---------- PANTALLA 4: LISTO ---------- */
.done-head {
  text-align: center;
  margin-bottom: 16px;
}

.done-icon {
  font-size: 3rem;
  line-height: 1;
  margin-bottom: 8px;
  animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes popIn {
  from { transform: scale(0.3); opacity: 0; }
  to   { transform: scale(1); opacity: 1; }
}

.ticket-body-inline {
  margin-bottom: 14px;
}

.ticket-body-inline .ticket-box {
  background: var(--bg-surface);
}

.ticket-row.ticket-total {
  border-top: 1px dashed var(--border-strong);
  padding-top: 10px;
  margin-top: 4px;
  font-weight: 800;
}

.ticket-body-inline .btn {
  width: 100%;
  min-height: var(--touch);
  margin-top: 10px;
}

.next-steps {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 10px;
  padding: 16px;
  background: var(--bg-surface);
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.next-steps li {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ns-num {
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--curul-gold);
  color: #ffffff;
  font-size: 0.8rem;
  font-weight: 800;
}

/* ---------- RESUMEN FIJO ---------- */
.summary-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 90;
  background: var(--bg-surface);
  border-top: 1px solid var(--border-strong);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.12);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.sb-timer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 12px;
  background: var(--curul-gold-subtle);
  border-bottom: 1px solid var(--curul-gold);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.sb-timer strong {
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  color: var(--text-primary);
}

.sb-timer.timer-warn {
  background: var(--status-pending-bg);
  border-color: var(--warn);
}

.sb-timer.timer-warn strong {
  color: var(--warn);
}

.sb-timer.timer-danger {
  background: var(--status-cancelled-bg);
  border-color: var(--danger);
}

.sb-timer.timer-danger strong {
  color: var(--danger);
}

.summary-bar-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 760px;
  margin: 0 auto;
  padding: 10px 16px 12px;
}

.sb-info {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.sb-line {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sb-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 2px 8px;
}

.sb-price strong {
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--text-primary);
  line-height: 1.1;
}

.sb-price small {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
}

.btn-xl {
  flex: 0 0 auto;
  min-height: var(--touch);
  min-width: 132px;
  padding: 12px 22px;
  font-size: 1rem;
  font-weight: 800;
  border-radius: var(--radius-sm);
}

#btn-primary-action.is-disabled {
  background: var(--bg-subtle);
  color: var(--text-muted);
  box-shadow: none;
  border: 1px solid var(--border-strong);
  cursor: not-allowed;
  transform: none;
}

#btn-primary-action:not(.is-disabled):active {
  transform: scale(0.97);
}

/* ---------- PIE ---------- */
.client-footer {
  padding: 14px 16px;
}

/* ==============================================================
   ≥ 720px: tablet y escritorio
   ============================================================== */
@media (min-width: 720px) {
  .client-page .header-inner {
    padding: 12px 24px;
  }

  .client-page .brand-slogan {
    display: inline;
  }

  .client-main {
    padding: 28px 24px 32px;
  }

  .wizard-progress {
    margin: 0 -24px;
    padding-left: 24px;
    padding-right: 24px;
  }

  .client-hero-title {
    font-size: 1.8rem;
  }

  .screen-title {
    font-size: 1.5rem;
  }

  .block {
    padding: 20px;
  }

  .time-row {
    grid-template-columns: 1fr 1fr;
    gap: 14px;
  }

  .time-row .field {
    margin-top: 0;
  }

  .returning-banner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .rb-action {
    flex: 0 0 auto;
  }

  .wp-step button {
    font-size: 0.86rem;
  }

  .pay-row {
    grid-template-columns: 110px 1fr auto;
  }

  .pay-amount {
    font-size: 2.4rem;
  }

  .summary-bar-inner {
    padding: 12px 24px 14px;
  }

  .sb-line {
    font-size: 0.82rem;
  }

  .btn-xl {
    min-width: 180px;
  }
}

/* móviles muy angostos */
@media (max-width: 380px) {
  .client-page .sync-live-badge {
    display: none;
  }

  .wp-name {
    font-size: 0.7rem;
  }

  .space-option {
    grid-template-columns: auto 1fr;
  }

  .so-price {
    grid-column: 2;
    flex-direction: row;
    align-items: baseline;
    gap: 6px;
  }

  .btn-xl {
    min-width: 112px;
    padding: 12px 14px;
  }

  .pay-row {
    grid-template-columns: 1fr auto;
  }

  .pr-label {
    grid-column: 1 / -1;
  }
}

/* respeta a quien prefiere menos animación */
@media (prefers-reduced-motion: reduce) {
  .wizard-screen,
  .done-icon,
  .timer-card.timer-danger .timer-text {
    animation: none;
  }

  .wp-bar-fill,
  .timer-bar-fill {
    transition: none;
  }
}

/* ==============================================================
   MAS AIRE EN CELULAR (menos de 720px)
   Mas espacio entre bloques, campos y lineas para que nada se vea pegado.
   ============================================================== */
@media (max-width: 719px) {
  body.client-page {
    line-height: 1.6;
  }

  .client-main {
    padding: 22px 20px 32px;
  }

  .client-hero {
    margin-bottom: 22px;
  }

  .client-hero-title {
    font-size: 1.45rem;
    line-height: 1.3;
  }

  .wizard-progress {
    margin: 0 -20px;
    padding: 12px 20px;
  }

  .wp-head {
    margin-bottom: 10px;
  }

  .wp-steps-nav {
    margin: 6px 0 24px;
  }

  .screen-head {
    margin-bottom: 22px;
  }

  .screen-title {
    line-height: 1.3;
  }

  .shortcut-chip {
    margin-bottom: 22px;
    padding: 14px 16px;
    line-height: 1.4;
  }

  .block {
    padding: 22px 18px;
    margin-bottom: 22px;
  }

  .block-title {
    margin-bottom: 18px;
    line-height: 1.4;
  }

  .field {
    margin-top: 22px;
    gap: 10px;
  }

  .field-label {
    line-height: 1.4;
  }

  .field-msg,
  .field-hint {
    line-height: 1.5;
    margin-top: 2px;
  }

  .date-pills {
    gap: 12px;
    margin-bottom: 20px;
  }

  .duration-chips,
  .alt-chips {
    gap: 12px;
  }

  .tip-text {
    margin: 8px 0 4px;
    padding: 14px 16px;
    line-height: 1.6;
  }

  .client-page .spaces-grid {
    gap: 16px;
  }

  .space-option {
    padding: 18px 16px;
    gap: 14px;
  }

  .so-main {
    gap: 8px;
  }

  .so-name {
    line-height: 1.35;
  }

  .so-desc {
    line-height: 1.5;
  }

  .so-meta {
    margin-top: 6px;
    gap: 12px;
  }

  .space-tip {
    margin-top: 10px;
    padding: 14px 16px;
    line-height: 1.6;
  }

  .urgency-note,
  .select-note,
  .alt-box {
    margin-top: 16px;
    margin-bottom: 16px;
    padding: 16px;
    line-height: 1.55;
  }

  .alt-title {
    margin-bottom: 8px;
  }

  .alt-text {
    margin-bottom: 14px;
    line-height: 1.55;
  }

  .people-stepper {
    padding: 6px 0 10px;
    gap: 24px;
  }

  .inline-msg {
    margin: 8px 0 20px;
    padding: 16px;
    line-height: 1.55;
  }

  .recap-card {
    padding: 18px 16px;
    margin-bottom: 22px;
    gap: 16px;
  }

  .recap-main {
    gap: 6px;
    line-height: 1.5;
  }

  .hold-notice {
    padding: 18px 16px;
    margin-bottom: 22px;
    gap: 14px;
    line-height: 1.6;
  }

  #captcha-wrap {
    margin-bottom: 22px;
  }

  .timer-card {
    padding: 18px 16px;
    margin-bottom: 22px;
  }

  .timer-bar {
    margin: 14px 0 0;
  }

  .pay-amount-card {
    padding: 24px 16px;
    margin-bottom: 22px;
    gap: 6px;
  }

  .rate-line {
    margin-top: 16px;
    padding-top: 16px;
    gap: 8px 12px;
    line-height: 1.5;
  }

  .pay-data-card {
    padding: 22px 16px;
    gap: 12px;
    margin-bottom: 22px;
  }

  .pay-heading {
    margin-bottom: 8px;
    line-height: 1.4;
  }

  .pay-row {
    padding: 12px 14px;
  }

  .btn-copy-all {
    margin-top: 8px;
  }

  .receipt-drop {
    padding: 16px;
    gap: 14px;
  }

  .expired-card {
    padding: 32px 20px;
  }

  .expired-text {
    line-height: 1.6;
  }

  .done-head {
    margin-bottom: 24px;
  }

  .next-steps {
    padding: 20px 18px;
    gap: 16px;
    line-height: 1.5;
  }

  .link-btn {
    margin-top: 6px;
  }

  .returning-banner {
    padding: 18px 16px;
    gap: 14px;
    margin-bottom: 22px;
  }

  .rb-text {
    gap: 6px;
    line-height: 1.5;
  }

  .sb-line {
    margin-bottom: 2px;
  }

  .summary-bar-inner {
    padding: 12px 20px 14px;
  }

  .client-footer {
    padding: 22px 20px;
  }
}

/* ==============================================================
   POLÍTICA DE CANCELACIÓN (paso de pago)
   ============================================================== */
.policy-box {
  margin: 18px 0 6px;
  border: 1px solid var(--border-light);
  border-radius: var(--radius);
  background: var(--bg-subtle);
  padding: 4px 16px 6px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.policy-box.policy-missing {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(198, 40, 40, 0.14);
}
.policy-details summary {
  cursor: pointer;
  list-style: none;
  padding: 12px 0;
  min-height: 24px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--curul-gold);
}
.policy-details summary::-webkit-details-marker { display: none; }
.policy-details summary::before { content: "▸ "; }
.policy-details[open] summary::before { content: "▾ "; }
.policy-list {
  margin: 0 0 8px;
  padding-left: 18px;
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--text-secondary);
}
.policy-list li { margin-bottom: 6px; }
.policy-check {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: var(--touch);
  padding: 6px 0 10px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
}
.policy-check input {
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  accent-color: var(--curul-gold);
}