:root {
  --brand: #0d6efd;
  --brand-dark: #0b5ed7;
  --brand-soft: #e7f0ff;
  --brand-2: #111827;
  --brand-2-dark: #0b0f19;
  --ink: #1a1d24;
  --muted: #6b7280;
  --bg: #f6f7fb;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(16, 24, 40, 0.06), 0 8px 24px rgba(16, 24, 40, 0.06);
}

* {
  box-sizing: border-box;
}

body {
  background-color: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  margin: 0;
}

a {
  color: var(--brand);
}

/* Navbar */
.navbar {
  background: var(--card);
  border-bottom: 1px solid #eceef2;
}

.navbar-brand {
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink) !important;
}

.navbar-brand .dot {
  color: var(--brand);
}

/* Buttons using brand var */
.btn-primary {
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand-dark);
  --bs-btn-hover-border-color: var(--brand-dark);
  --bs-btn-active-bg: var(--brand-dark);
  --bs-btn-active-border-color: var(--brand-dark);
  --bs-btn-disabled-bg: var(--brand);
  --bs-btn-disabled-border-color: var(--brand);
}

.btn-outline-primary {
  --bs-btn-color: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand);
  --bs-btn-hover-border-color: var(--brand);
  --bs-btn-active-bg: var(--brand);
  --bs-btn-active-border-color: var(--brand);
}

.text-brand {
  color: var(--brand) !important;
}

.bg-brand {
  background-color: var(--brand) !important;
}

.badge.bg-primary {
  background-color: var(--brand) !important;
}

/* Hero */
.hero {
  padding: 5.5rem 0 4rem;
  text-align: center;
  background: radial-gradient(
    120% 100% at 50% 0%,
    var(--brand-soft) 0%,
    var(--bg) 60%
  );
}

.hero h1 {
  font-weight: 800;
  letter-spacing: -0.03em;
  max-width: 14ch;
  margin: 0 auto 1rem;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
}

/* Cards */
.card {
  border: 1px solid #eceef2;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.auth-card {
  max-width: 440px;
  margin: 3rem auto;
}

.auth-card .card-body {
  padding: 2rem;
}

/* Booking wizard */
.step {
  display: none;
}

.step.active {
  display: block;
  animation: fade 0.2s ease;
}

/* Stepper */
.stepper {
  display: flex;
  gap: 0.5rem;
}

.stepper-item {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  padding-bottom: 0.5rem;
  border-bottom: 3px solid #e9ecef;
  white-space: nowrap;
}

.stepper-item.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.stepper-item.done {
  color: var(--ink);
  border-bottom-color: var(--brand);
}

.stepper-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #e9ecef;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.stepper-item.active .stepper-dot,
.stepper-item.done .stepper-dot {
  background: var(--brand);
  color: #fff;
}

/* Resumen selección */
.resumen-sel .card-body {
  gap: 0.4rem;
}

.chip-resumen {
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 99px;
  padding: 0.25rem 0.7rem;
  font-size: 0.82rem;
  font-weight: 600;
}

/* Service cards */
.servicio-card {
  border: 1px solid #e9ecef;
  background: var(--card);
  border-radius: 12px;
  padding: 1rem;
  margin-bottom: 0.75rem;
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.05s;
}

.servicio-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow);
}

.servicio-card:active {
  transform: scale(0.995);
}

.precio-badge {
  background: var(--brand);
  color: #fff;
  border-radius: 99px;
  padding: 0.25rem 0.75rem;
  font-weight: 700;
  font-size: 0.95rem;
  display: inline-block;
}

/* Profesional cards (reserva pública) */
.prof-card {
  width: 108px;
  border: 1px solid #e9ecef;
  background: var(--card);
  border-radius: 14px;
  padding: 0.85rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.prof-card:hover {
  border-color: var(--brand);
  box-shadow: var(--shadow);
}

.prof-card.selected {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand) inset;
}

.prof-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-soft);
  margin-bottom: 0.35rem;
}

.prof-avatar-fallback {
  color: var(--brand);
  font-weight: 800;
  font-size: 1.4rem;
}

.prof-avatar-any {
  font-size: 1.6rem;
}

.prof-nombre {
  font-weight: 600;
  font-size: 0.9rem;
  line-height: 1.1;
  text-align: center;
}

.prof-especialidad {
  font-size: 0.72rem;
  color: var(--muted);
  text-align: center;
  line-height: 1.1;
}

/* Avatares en el panel admin */
.empleado-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--brand-soft);
}

.empleado-avatar-fallback {
  color: var(--brand);
  font-weight: 700;
}

.empleado-avatar-lg {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e9ecef;
}

/* Día chips */
.dias-scroll {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
  scrollbar-width: thin;
}

.dia-chip {
  flex: 0 0 auto;
  width: 66px;
  border: 1px solid #e9ecef;
  background: var(--card);
  border-radius: 12px;
  padding: 0.5rem 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.dia-chip:hover {
  border-color: var(--brand);
}

.dia-chip.selected {
  border-color: var(--brand);
  background: var(--brand);
  color: #fff;
}

.dia-chip .dia-semana {
  font-size: 0.72rem;
  text-transform: uppercase;
  opacity: 0.8;
}

.dia-chip .dia-num {
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.1;
}

.dia-chip .dia-mes {
  font-size: 0.72rem;
  opacity: 0.8;
}

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

.servicio-item {
  cursor: pointer;
  border: 1px solid #eceef2 !important;
  border-radius: 12px !important;
  margin-bottom: 0.6rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.servicio-item:hover {
  border-color: var(--brand) !important;
  box-shadow: var(--shadow);
}

.slot-btn {
  min-width: 84px;
}

.progress {
  height: 6px;
  border-radius: 99px;
}

.progress-bar {
  background-color: var(--brand);
}

/* Estado badges */
.badge-estado-pendiente {
  background-color: #f59e0b;
  color: #fff;
}
.badge-estado-confirmado {
  background-color: #16a34a;
  color: #fff;
}
.badge-estado-cancelado {
  background-color: #dc2626;
  color: #fff;
}
.badge-estado-completado {
  background-color: #64748b;
  color: #fff;
}

/* Business header on public page */
.negocio-header {
  background: var(--brand);
  color: #fff;
}

.negocio-logo-header {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  background: #fff;
  padding: 4px;
  flex-shrink: 0;
}

.negocio-logo-preview {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid #e9ecef;
  background: #fff;
}

.negocio-header .tipo-pill {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 99px;
  padding: 0.15rem 0.7rem;
  font-size: 0.8rem;
  text-transform: capitalize;
}

/* Admin */
.stat-card .stat-value {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* KPI cards del dashboard */
.kpi-card .card-body {
  padding: 1rem 1.15rem;
}

.kpi-icon {
  font-size: 1.3rem;
  margin-bottom: 0.25rem;
}

.kpi-label {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 500;
}

.kpi-value {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink);
}

/* Lista de clientes frecuentes */
.lista-clientes {
  list-style: none;
  padding: 0;
  counter-reset: cli;
}

.lista-clientes li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 0;
  border-bottom: 1px solid #f0f1f4;
}

.lista-clientes li:last-child {
  border-bottom: none;
}

.lista-clientes li::before {
  counter-increment: cli;
  content: counter(cli);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 0.5rem;
  flex-shrink: 0;
}

.lista-clientes li span:first-of-type {
  flex: 1;
}

.lista-clientes .badge-count {
  font-size: 0.75rem;
  color: var(--muted);
  background: #f6f7fb;
  border-radius: 99px;
  padding: 0.1rem 0.6rem;
}

.nav-tabs .nav-link {
  color: var(--muted);
  border: none;
  border-bottom: 2px solid transparent;
  font-weight: 500;
}

.nav-tabs .nav-link.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
  background: none;
}

footer.site-footer {
  background: var(--card);
  border-top: 1px solid #eceef2;
}

/* ===== Catálogo del negocio ===== */
.btn-brand {
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: var(--brand);
  --bs-btn-color: #fff;
  --bs-btn-hover-bg: var(--brand-dark);
  --bs-btn-hover-border-color: var(--brand-dark);
  --bs-btn-hover-color: #fff;
  --bs-btn-active-bg: var(--brand-dark);
  --bs-btn-active-border-color: var(--brand-dark);
  --bs-btn-active-color: #fff;
  font-weight: 600;
}

.cat-hero {
  position: relative;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  background-size: cover;
  background-position: center;
  color: #fff;
  padding: 3.5rem 0 3rem;
  text-align: center;
}
.cat-hero.con-portada .cat-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0.6));
}
.cat-hero-inner {
  position: relative;
  z-index: 1;
}
.cat-logo {
  width: 84px;
  height: 84px;
  border-radius: 18px;
  object-fit: cover;
  background: #fff;
  padding: 5px;
  margin-bottom: 0.75rem;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}
.cat-nombre {
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}
.cat-eslogan {
  opacity: 0.9;
  max-width: 34ch;
  margin: 0 auto 0.5rem;
}

/* Cards de servicio en catálogo */
.servicio-cat-card {
  background: var(--card);
  border: 1px solid #eceef2;
  border-radius: var(--radius);
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
}
.servicio-cat-img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}
.servicio-cat-img-ph {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  background: var(--brand-soft);
}
.servicio-cat-body {
  padding: 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.servicio-cat-body .btn-brand {
  margin-top: auto;
}

/* Profesionales en catálogo */
.prof-cat-avatar {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  object-fit: cover;
  background: var(--brand-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.prof-cat-avatar-fb {
  color: var(--brand);
  font-weight: 800;
  font-size: 2rem;
}

/* Galería */
.galeria-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.5rem;
}
.galeria-img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.15s;
}
.galeria-img:hover {
  transform: scale(1.03);
}

/* Redes / contacto */
.social-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.9rem;
  border-radius: 99px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}
.social-btn:hover {
  background: var(--brand);
  color: #fff;
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 1rem;
}
.lightbox img {
  max-width: 95vw;
  max-height: 90vh;
  border-radius: 8px;
}
.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  color: #fff;
  font-size: 2.5rem;
  cursor: pointer;
  line-height: 1;
}

/* Preview portada en panel */
.negocio-portada-preview {
  width: 100%;
  max-width: 320px;
  height: 100px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid #e9ecef;
  background: #f6f7fb;
}

.servicio-imagen-preview {
  width: 100%;
  max-width: 260px;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid #e9ecef;
}
