:root {
  --tenant-primary: #4f46e5;
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  overflow-x: hidden;
}

.booking-navbar {
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(17,24,39,.06);
  padding-top: .4rem;
  padding-bottom: .4rem;
}
.booking-navbar .container {
  flex-wrap: nowrap;
  gap: .5rem;
}
.booking-navbar .navbar-brand { color: var(--text); font-size: 1.05rem; }
.booking-navbar .navbar-brand {
  min-width: 0;
  overflow-wrap: anywhere;
}
.booking-navbar .navbar-brand img {
  width: 40px;
  height: 40px;
  object-fit: cover;
}
.brand-dot {
  width: 34px; height: 34px;
  display: inline-block;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--tenant-primary), #8b5cf6);
}
.progress-pill {
  font-size: .8rem;
  font-weight: 600;
  color: var(--tenant-primary);
  background: rgba(79,70,229,.08);
  padding: .35rem .9rem;
  border-radius: 999px;
}

.booking-hero h1 { font-size: clamp(1.4rem, 3vw, 2rem); }

.booking-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 1px 3px rgba(17,24,39,.05);
}
.step-title {
  font-size: 1.05rem;
  font-weight: 700;
  margin-bottom: .9rem;
}

.btn-accent {
  background: var(--tenant-primary);
  border-color: var(--tenant-primary);
  color: #fff;
  font-weight: 600;
  border-radius: 999px;
  padding: .6rem 1.2rem;
}
.btn-accent:hover, .btn-accent:focus {
  background: var(--tenant-primary);
  filter: brightness(.92);
  color: #fff;
}
.btn-accent:disabled { opacity: .55; }
.btn-outline-accent {
  color: var(--tenant-primary);
  border-color: var(--tenant-primary);
  border-radius: 999px;
}
.btn-outline-accent:hover {
  background: var(--tenant-primary);
  color: #fff;
}

/* Servicios */
.service-item {
  display: flex;
  align-items: center;
  gap: .8rem;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: .65rem .9rem;
  cursor: pointer;
  transition: all .15s ease;
  background: #fff;
}
.service-item:hover { border-color: var(--tenant-primary); }
.service-item.disabled,
.service-item.disabled:hover {
  opacity: .5;
  filter: grayscale(1);
  cursor: not-allowed;
  border-color: #d1d5db;
  background: #f3f4f6;
}
.service-item.disabled .service-price { color: #9ca3af; }
.service-category-subtitle {
  margin: 1rem 0 .25rem;
  padding-bottom: .35rem;
  border-bottom: 1px solid #e5e7eb;
  color: #374151;
  font-size: .9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.service-item.selected {
  border-color: var(--tenant-primary);
  background: rgba(79,70,229,.04);
}
.service-item .form-check-input { margin-top: 0; }
.service-thumb {
  width: 46px; height: 46px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #f1f2f6;
  font-size: 1.2rem;
}
.service-price { font-weight: 700; white-space: nowrap; }
.service-file-note { font-size: .72rem; }

/* Beneficios: cards */
.benefit-card {
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  padding: .75rem .9rem;
  height: 100%;
  transition: all .15s ease;
  user-select: none;
}
.benefit-card:hover { border-color: var(--tenant-primary); }
.benefit-card.selected {
  border-color: var(--tenant-primary);
  background: rgba(79,70,229,.06);
  box-shadow: inset 0 0 0 1px var(--tenant-primary);
}
.benefit-card .benefit-discount {
  background: rgba(79,70,229,.1);
  color: var(--tenant-primary);
  font-weight: 700;
}
.benefit-card.benefit-locked {
  opacity: .5;
  cursor: not-allowed;
  filter: grayscale(.5);
}
.benefit-card.benefit-not-applicable {
  opacity: .45;
  cursor: not-allowed;
}
.benefit-apply-tag {
  background: var(--tenant-primary);
  color: #fff;
  font-weight: 600;
}

/* Stepper horizontal (solo visual, no clickeable) */
.booking-stepper { list-style: none; padding: 0; }
.stepper-item {
  display: flex;
  align-items: center;
  gap: .4rem;
  padding: .3rem .65rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: #fff;
  font-size: .8rem;
  font-weight: 600;
  color: var(--muted);
  opacity: .55;
  transition: all .15s ease;
  cursor: default;
  user-select: none;
  flex: 0 0 auto;
}
.stepper-item .stepper-label { display: none; }
.stepper-item .stepper-num {
  width: 20px; height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--border);
  color: var(--muted);
  font-size: .72rem;
  flex-shrink: 0;
}
.stepper-item.active .stepper-label {
  display: inline;
  overflow-wrap: anywhere;
}
.stepper-item.active {
  opacity: 1;
  border-color: var(--tenant-primary);
  color: var(--tenant-primary);
}
.stepper-item.active .stepper-num { background: var(--tenant-primary); color: #fff; }
.stepper-item.done {
  opacity: .8;
  border-color: #10b981;
  color: #10b981;
}
.stepper-item.done .stepper-num { background: #10b981; color: #fff; }

/* Wizard slider horizontal */
.wizard-track {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow: clip;
  border-radius: 18px;
}
.wizard-slider {
  display: flex;
  width: 100%;
  min-width: 0;
  will-change: transform;
  transition: transform .35s cubic-bezier(.4, 0, .2, 1);
}
.wizard-slide {
  width: 100%;
  min-width: 100%;
  max-width: 100%;
  min-height: 0;
  flex-shrink: 0;
  padding: 0;
}
.wizard-slide .booking-card {
  min-width: 0;
  border: none;
  box-shadow: none;
}
.wizard-slide.hidden-slide {
  visibility: hidden;
  pointer-events: none;
  position: absolute;
  left: -9999px;
}

/* Altura del wizard sigue al paso activo (evita vacío entre pasos) */
.wizard-slider {
  transition: transform .35s cubic-bezier(.4, 0, .2, 1), height .35s ease;
}

/* Botones de navegación: siempre visibles, lado a lado */
.step-actions {
  position: sticky;
  bottom: 10px;
  z-index: 5;
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: .6rem;
  background: var(--surface);
  border-radius: 14px;
  padding: .65rem .5rem 0;
}
.step-actions .btn {
  flex: 1 1 auto;
  max-width: 220px;
  min-width: 0;
}

/* Feedback de validación */
#stepFeedback {
  margin-bottom: 1rem;
  border-radius: 12px;
}

/* Resumen de revisión (paso 5) */
.review-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: .55rem 0;
  border-bottom: 1px dashed var(--border);
  font-size: .92rem;
}
.review-item:last-child { border-bottom: none; }
.review-price { font-weight: 600; white-space: nowrap; text-align: right; }
.review-discount { color: #10b981; font-weight: 600; }
.review-total {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-top: .4rem;
  padding: .65rem 0;
  border-top: 2px solid var(--border);
  font-weight: 800;
  font-size: 1.15rem;
}

/* Slots */
.time-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  gap: .5rem;
}
.time-slot {
  cursor: pointer;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: .55rem .5rem;
  font-size: .9rem;
  font-weight: 600;
  background: #fff;
  transition: all .15s ease;
  text-align: center;
  min-width: 0;
}
.time-slot:hover { border-color: var(--tenant-primary); }
.time-slot.selected {
  background: var(--tenant-primary);
  border-color: var(--tenant-primary);
  color: #fff;
}
.time-slot small { opacity: .7; }

/* Resumen lateral */
.summary-sidebar { border-top: 3px solid var(--tenant-primary); }
.summary-list li {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: .5rem 0;
  border-bottom: 1px dashed var(--border);
  font-size: .92rem;
}
.summary-list li:last-child { border-bottom: none; }
.summary-list span { color: var(--muted); }
.summary-list strong { min-width: 0; overflow-wrap: anywhere; text-align: right; }

/* Cards de empleado */
.employee-card {
  border: 1px solid var(--border);
  border-radius: 14px;
  background: #fff;
  padding: 1rem;
  transition: all .15s ease;
}
.employee-card:hover {
  border-color: var(--tenant-primary);
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.employee-avatar {
  flex-shrink: 0;
}
.employee-card .badge {
  background: rgba(79,70,229,.1);
  color: var(--tenant-primary);
  font-weight: 600;
}
.stars { display: flex; gap: 2px; }
.star { color: #f3f4f6; font-size: 1rem; }
.star.filled { color: #fbbf24; }

.booking-footer { border-top: 1px solid var(--border); }

@media (max-width: 992px) {
  .summary-sidebar { position: static !important; }
}

@media (max-width: 991.98px) {
  /* "Tu reserva" lateral oculto en mobile */
  .booking-aside { display: none !important; }
}

@media (max-width: 575.98px) {
  .booking-navbar .container {
    padding-left: .75rem;
    padding-right: .75rem;
  }

  .booking-navbar .navbar-brand {
    flex: 0 1 auto;
    font-size: .95rem;
  }

  .booking-navbar .container > .d-flex .btn {
    white-space: normal;
  }

  .card.border-success .card-body {
    align-items: stretch !important;
    flex-wrap: wrap;
  }

  .card.border-success .card-body > div {
    max-width: 100%;
  }

  .card.border-success .dropdown-menu {
    min-width: min(340px, calc(100vw - 1.5rem)) !important;
    max-width: calc(100vw - 1.5rem);
  }

  .booking-hero .container {
    padding-top: 1.25rem !important;
    padding-bottom: 1.25rem !important;
  }

  .booking-card .card-body {
    padding: 1rem !important;
  }

  .wizard-slide,
  .wizard-slide .card-body,
  .wizard-slide .booking-card {
    min-width: 0;
  }

  .service-item {
    align-items: flex-start;
    gap: .55rem;
    padding: .6rem;
  }

  .service-item > span:nth-child(2) {
    min-width: 0;
  }

  .service-price {
    margin-left: auto;
  }

  .stepper-item {
    flex: 0 0 auto;
    justify-content: center;
    min-width: 0;
    padding-left: .5rem;
    padding-right: .5rem;
  }

  .summary-list li {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .summary-list li strong {
    max-width: 100%;
  }
}
