:root {
    --bs-primary: #552aec;
    --bs-primary-rgb: 85, 42, 236;
    --bs-link-color: #552aec;
    --bs-link-color-rgb: 85, 42, 236;
    --bs-link-hover-color: #4520d0;
    --sc-fondo: #f6f7fb;
}

body {
    background: var(--sc-fondo);
    color: #1f2937;
}

.btn-primary {
    --bs-btn-bg: #552aec;
    --bs-btn-border-color: #552aec;
    --bs-btn-hover-bg: #4520d0;
    --bs-btn-hover-border-color: #4520d0;
    --bs-btn-active-bg: #3a1bb0;
    --bs-btn-active-border-color: #3a1bb0;
    --bs-btn-disabled-bg: #552aec;
    --bs-btn-disabled-border-color: #552aec;
}

.btn-outline-primary {
    --bs-btn-color: #552aec;
    --bs-btn-border-color: #552aec;
    --bs-btn-hover-bg: #552aec;
    --bs-btn-hover-border-color: #552aec;
    --bs-btn-active-bg: #552aec;
    --bs-btn-active-border-color: #552aec;
}

.nav-pills {
    --bs-nav-pills-link-active-bg: #552aec;
}

.text-primary { color: #552aec !important; }
.bg-primary { background-color: #552aec !important; }

.card {
    border: 1px solid #e5e7eb;
    border-radius: .75rem;
}

/* ---- Marca (logo) ---- */
.marca {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
}

.marca-icono {
    width: 32px;
    height: 32px;
}

.marca-texto {
    font-weight: 800;
    font-size: 1.3rem;
    letter-spacing: -.02em;
    line-height: 1;
}

.marca-servi { color: #081a4c; }
.marca-citas { color: #552aec; }

.logo-completo {
    width: 100%;
    max-width: 320px;
    height: auto;
}

/* ---- Landing ---- */
.hero {
    background: radial-gradient(circle at 15% 20%, #ede9fe 0%, transparent 45%),
                linear-gradient(135deg, #f5f3ff 0%, #eef2ff 100%);
    color: #081a4c;
}

.hero .lead { color: #374151; }

/* Ilustración genérica del flujo de reserva */
.hero-telefono {
    max-width: 340px;
    background: #fff;
    border: 8px solid #081a4c;
    border-radius: 2rem;
    padding: 1.25rem 1rem;
    box-shadow: 0 1.5rem 3rem rgba(85, 42, 236, .18);
    color: #1f2937;
}

.avatar.avatar-sm {
    width: 40px;
    height: 40px;
    font-size: 1.1rem;
}

.hero-paso {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .6rem .75rem;
    margin-bottom: .5rem;
    border: 1px solid #e5e7eb;
    border-radius: .75rem;
}

.hero-paso-icono {
    width: 34px;
    height: 34px;
    border-radius: .6rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(85, 42, 236, .1);
    color: #552aec;
    flex-shrink: 0;
}

.hero-confirmada {
    display: flex;
    align-items: center;
    gap: .75rem;
    margin-top: .75rem;
    padding: .75rem 1rem;
    border-radius: .75rem;
    background: linear-gradient(135deg, #552aec 0%, #7c3aed 100%);
    color: #fff;
}

.hero-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .75rem;
    border-radius: 999px;
    background: #fff;
    border: 1px solid #e0e7ff;
    color: #081a4c;
    font-size: .85rem;
}

.hero-chip i { color: #552aec; }

.icono-funcion {
    width: 3rem;
    height: 3rem;
    border-radius: .75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(85, 42, 236, .1);
    color: #552aec;
    font-size: 1.4rem;
}

/* ---- Panel ---- */
.app .sidebar {
    width: 230px;
    min-height: calc(100vh - 57px);
}

.app .sidebar .nav-link {
    display: flex;
    align-items: center;
    gap: .7rem;
    color: #374151;
    border-radius: .6rem;
    padding: .55rem .75rem;
    margin-bottom: 2px;
    font-weight: 500;
    position: relative;
}

.app .sidebar .nav-link i { font-size: 1.05rem; color: #9ca3af; }

.app .sidebar .nav-link:hover { background: #f5f3ff; color: #081a4c; }

.app .sidebar .nav-link.active {
    background: #ede9fe;
    color: #552aec;
    font-weight: 600;
}

.app .sidebar .nav-link.active i { color: #552aec; }

.app .sidebar .nav-link.active::before {
    content: "";
    position: absolute;
    left: -1rem;
    top: .45rem;
    bottom: .45rem;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: #552aec;
}

.menu-seccion {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #9ca3af;
    padding: 0 .75rem .4rem;
}

.menu-plan {
    padding: .9rem;
    border-radius: .9rem;
    background: #faf9ff;
    border: 1px solid #ece9fb;
}

.progress-bar { background-color: #552aec; }

.app .contenido {
    min-width: 0;
    max-width: 1240px;
}

/* Barra superior: usuario */
.usuario-boton {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    border: 0;
    padding: .25rem .5rem;
    border-radius: 999px;
}

.usuario-boton:hover { background: #f5f3ff; }

.usuario-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #552aec, #7c3aed);
    color: #fff;
    font-size: .8rem;
    font-weight: 700;
}

/* Tarjetas y tablas del panel */
.app .card {
    border-color: #eceef3;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}

.app .card-header {
    background: #fff;
    border-bottom-color: #f0f1f5;
    padding: .85rem 1.1rem;
    font-weight: 600;
    color: #081a4c;
}

.app .table thead th {
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #6b7280;
    font-weight: 600;
    background: #fafbfc;
}

.pagina-encabezado {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: 1.5rem;
}

.pagina-encabezado h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #081a4c;
    margin: 0;
}

.pagina-encabezado p {
    margin: .2rem 0 0;
    color: #6b7280;
}

/* Insignias suaves */
.badge-suave-exito { background: #dcfce7; color: #15803d; }
.badge-suave-peligro { background: #fee2e2; color: #b91c1c; }
.badge-suave-aviso { background: #fef3c7; color: #b45309; }
.badge-suave-info { background: #e0f2fe; color: #0369a1; }
.badge-suave-primario { background: #ede9fe; color: #552aec; }
.badge-suave-neutro { background: #f3f4f6; color: #4b5563; }

/* Tarjetas de estadísticas */
.stat-card .card-body {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icono {
    width: 46px;
    height: 46px;
    border-radius: .8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.stat-icono.morado { background: #ede9fe; color: #552aec; }
.stat-icono.azul { background: #e0f2fe; color: #0369a1; }
.stat-icono.verde { background: #dcfce7; color: #15803d; }
.stat-icono.naranja { background: #ffedd5; color: #c2410c; }

/* Estado vacío */
.vacio {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #6b7280;
}

.vacio i {
    display: inline-flex;
    width: 64px;
    height: 64px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #f5f3ff;
    color: #552aec;
    font-size: 1.7rem;
    margin-bottom: .75rem;
}

/* Lista de citas (agenda / inicio) */
.cita-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .9rem 1.1rem;
    border-left: 4px solid #552aec;
}

.cita-item + .cita-item { border-top: 1px solid #f0f1f5; }
.cita-item.estado-Completada { border-left-color: #0369a1; }
.cita-item.estado-NoAsistio { border-left-color: #f59e0b; }
.cita-item.estado-Cancelada { border-left-color: #d1d5db; opacity: .6; }

.cita-hora {
    min-width: 92px;
    text-align: center;
    padding: .35rem .5rem;
    border-radius: .6rem;
    background: #f5f3ff;
    color: #081a4c;
    line-height: 1.2;
}

.cita-hora strong { display: block; font-size: 1rem; }

.iniciales {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #eef2ff;
    color: #552aec;
    font-weight: 700;
    font-size: .85rem;
    flex-shrink: 0;
}

/* Horario semanal (personal) */
.horario-fila {
    display: grid;
    grid-template-columns: 150px 1fr;
    align-items: center;
    gap: .75rem;
    padding: .6rem 0;
    border-bottom: 1px solid #f0f1f5;
}

.horario-fila:last-child { border-bottom: 0; }

@media (max-width: 575.98px) {
    .horario-fila { grid-template-columns: 1fr; }
}

@media (min-width: 992px) {
    /* offcanvas-lg fuerza width:auto en escritorio; fijamos el ancho del menú lateral */
    .app .sidebar {
        flex: 0 0 230px;
        width: 230px !important;
    }
}

@media (max-width: 991.98px) {
    .app .sidebar { min-height: auto; }
}

.stat {
    font-size: 1.8rem;
    font-weight: 700;
}

/* ---- Página pública ---- */
.perfil-cabecera {
    background: radial-gradient(circle at 90% 10%, rgba(255, 255, 255, .16) 0%, transparent 35%),
                radial-gradient(circle at 5% 100%, rgba(255, 255, 255, .10) 0%, transparent 30%),
                linear-gradient(135deg, #552aec 0%, #7c3aed 100%);
    color: #fff;
    padding: 2rem 0 2.25rem;
}

.perfil-chip {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .25rem .7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, .16);
    color: #fff;
    font-size: .85rem;
    text-decoration: none;
}

.perfil-chip-wa:hover { background: #25d366; color: #fff; }

/* Página pública con cabecera: la tarjeta de reserva se superpone un poco a la cabecera */
.perfil-cuerpo { margin-top: -1.25rem; position: relative; }

.perfil-cta {
    border: 0;
    box-shadow: 0 .75rem 2rem rgba(8, 26, 76, .10);
}

.perfil-titulo {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #081a4c;
}

.perfil-titulo i { color: #552aec; margin-right: .25rem; }

.perfil-servicio {
    transition: transform .15s, box-shadow .15s, border-color .15s;
}

.perfil-servicio:hover {
    transform: translateY(-2px);
    border-color: #c4b5fd;
    box-shadow: 0 .5rem 1.25rem rgba(85, 42, 236, .12);
}

.perfil-precio {
    white-space: nowrap;
    font-weight: 700;
    font-size: .9rem;
    color: #552aec;
    background: rgba(85, 42, 236, .08);
    border-radius: 999px;
    padding: .15rem .6rem;
}

.perfil-info { background: #faf9ff; border-color: #ece9fb; }

.perfil-barra-movil {
    position: sticky;
    bottom: 0;
    padding: .75rem 1rem;
    background: rgba(255, 255, 255, .95);
    border-top: 1px solid #e5e7eb;
    z-index: 10;
}

.logo-negocio {
    width: 88px;
    height: 88px;
    object-fit: cover;
    border-radius: 50%;
    border: 3px solid #fff;
    background: #fff;
}

.logo-placeholder {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: 3px solid #fff;
    background: rgba(255, 255, 255, .2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    font-weight: 700;
}

.avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    background: #eef2ff;
    color: #552aec;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.3rem;
    flex-shrink: 0;
}

.opcion {
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}

.opcion:hover { border-color: #a5b4fc; }

.opcion.seleccionada {
    border-color: #552aec;
    box-shadow: 0 0 0 .2rem rgba(85, 42, 236, .2);
}

.pasos .paso {
    flex: 1;
    text-align: center;
    font-size: .8rem;
    color: #9ca3af;
    border-bottom: 3px solid #e5e7eb;
    padding-bottom: .4rem;
}

.pasos .paso.activo {
    color: #552aec;
    border-color: #552aec;
    font-weight: 600;
}

.pasos .paso.hecho {
    color: #552aec;
    border-color: #a5b4fc;
}

.slot {
    min-width: 92px;
}

.dias-scroll {
    display: flex;
    gap: .5rem;
    overflow-x: auto;
    padding-bottom: .5rem;
    scrollbar-width: thin;
}

.dia-btn {
    min-width: 64px;
    line-height: 1.1;
}

.dia-btn small { display: block; font-size: .7rem; text-transform: uppercase; }
.dia-btn strong { font-size: 1.2rem; }

/* honeypot anti-bots */
.campo-trampa {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.qr-img {
    width: 180px;
    height: 180px;
    image-rendering: pixelated;
}

/* ---- Login / cuenta ---- */
.form-check-input:checked {
    background-color: #552aec;
    border-color: #552aec;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    border-color: #a78bfa;
    box-shadow: 0 0 0 .2rem rgba(85, 42, 236, .15);
}

.auth-caja {
    max-width: 960px;
    background: #fff;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 1.5rem 3rem rgba(8, 26, 76, .08);
    border: 1px solid #ece9fb;
}

.auth-marca {
    align-items: center;
    padding: 3rem 2.5rem;
    color: #fff;
    background: radial-gradient(circle at 85% 15%, rgba(255, 255, 255, .18) 0%, transparent 40%),
                linear-gradient(160deg, #552aec 0%, #3a1bb0 60%, #081a4c 100%);
}

.auth-marca-icono {
    background: #fff;
    border-radius: 1rem;
    padding: .4rem;
}

.auth-marca li i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    margin-right: .6rem;
    border-radius: .6rem;
    background: rgba(255, 255, 255, .15);
}

.auth-form {
    padding: 2.5rem 2rem;
}

@media (min-width: 992px) {
    .auth-form { padding: 3rem 3.5rem; }
}

.auth-input .input-group-text {
    background: #f8f7ff;
    color: #6b7280;
    border-right: 0;
}

.auth-input .form-control {
    border-left: 0;
    padding-top: .65rem;
    padding-bottom: .65rem;
}

.auth-input .auth-ver {
    border: 1px solid var(--bs-border-color);
    border-left: 0;
    color: #6b7280;
    background: #fff;
}

.auth-input:focus-within .input-group-text,
.auth-input:focus-within .form-control,
.auth-input:focus-within .auth-ver {
    border-color: #a78bfa;
}

.auth-input:focus-within {
    border-radius: var(--bs-border-radius);
    box-shadow: 0 0 0 .2rem rgba(85, 42, 236, .15);
}

.auth-input .form-control:focus { box-shadow: none; }

.auth-boton {
    font-size: 1rem;
    padding-top: .7rem;
    padding-bottom: .7rem;
}

.auth-separador {
    display: flex;
    align-items: center;
    gap: .75rem;
    color: #9ca3af;
    font-size: .85rem;
}

.auth-separador::before,
.auth-separador::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e5e7eb;
}

/* ---- Registro ---- */
.auth-caja-ancha { max-width: 1080px; }

.registro-seccion {
    display: flex;
    align-items: center;
    gap: .6rem;
    margin-bottom: 1rem;
    color: #081a4c;
}

.registro-numero {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #552aec;
    color: #fff;
    font-size: .85rem;
    font-weight: 700;
}

.registro-link {
    padding: .75rem 1rem;
    border-radius: .75rem;
    background: #faf9ff;
    border: 1px dashed #c4b5fd;
}

.auth-input .form-select {
    border-left: 0;
    padding-top: .65rem;
    padding-bottom: .65rem;
}

.auth-input .form-select:focus { box-shadow: none; }
.auth-input:focus-within .form-select { border-color: #a78bfa; }

.auth-marca li {
    display: flex;
    align-items: center;
}

.auth-marca li i { flex-shrink: 0; }

/* ---- Inicio del panel ---- */
.configuracion-pendiente {
    color: #fff;
    background: radial-gradient(circle at 90% 0%, rgba(255, 255, 255, .15) 0%, transparent 40%),
                linear-gradient(135deg, #552aec 0%, #7c3aed 100%);
}

.paso-config {
    display: flex;
    align-items: center;
    gap: .75rem;
    height: 100%;
    padding: .8rem 1rem;
    border-radius: .8rem;
    background: rgba(255, 255, 255, .12);
    color: #fff;
    text-decoration: none;
    transition: background .15s;
}

.paso-config:hover { background: rgba(255, 255, 255, .22); color: #fff; }
.paso-config i { font-size: 1.3rem; }
.paso-config strong { display: block; font-size: .9rem; }
.paso-config small { opacity: .8; }
.paso-config.hecho { opacity: .7; }
.paso-config.hecho strong { text-decoration: line-through; }

.compartir-card {
    background: linear-gradient(180deg, #faf9ff 0%, #fff 60%);
}

.tarjeta-elevable { transition: transform .15s, box-shadow .15s; }
.tarjeta-elevable:hover { transform: translateY(-2px); box-shadow: 0 .5rem 1.25rem rgba(16, 24, 40, .08); }

.barra-guardar {
    position: sticky;
    bottom: 0;
    padding: .75rem 0;
    background: linear-gradient(180deg, rgba(246, 247, 251, 0) 0%, var(--sc-fondo) 35%);
    z-index: 5;
}

/* ---- Mi plan ---- */
.plan-estado { background: linear-gradient(135deg, #faf9ff 0%, #fff 70%); }

.plan-tarjeta { position: relative; }

.plan-tarjeta.destacado {
    border: 2px solid #552aec;
    box-shadow: 0 .75rem 1.75rem rgba(85, 42, 236, .15);
}

.plan-cinta {
    position: absolute;
    top: -.7rem;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
}

.plan-precio {
    font-size: 1.6rem;
    font-weight: 800;
    color: #081a4c;
}

.datos-bancarios {
    white-space: pre-wrap;
    font-family: inherit;
    font-size: .95rem;
}

/* ---- Pantallas simples de cuenta (recuperar contraseña, mensajes) ---- */
.auth-simple {
    max-width: 480px;
    border: 1px solid #ece9fb;
    border-radius: 1.25rem;
    box-shadow: 0 1.5rem 3rem rgba(8, 26, 76, .08);
}

.auth-simple-icono {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 1rem;
    margin-bottom: 1rem;
    background: #ede9fe;
    color: #552aec;
    font-size: 1.5rem;
}

.auth-simple-icono.grande {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    font-size: 2rem;
}

.auth-simple-icono.exito { background: #dcfce7; color: #15803d; }

/* ---- Perfil público (versión 2) ---- */
.perfil-hero {
    color: #fff;
    padding: 2.75rem 0 4rem;
    background: radial-gradient(circle at 85% 0%, rgba(255, 255, 255, .18) 0%, transparent 40%),
                radial-gradient(circle at 0% 100%, rgba(255, 255, 255, .12) 0%, transparent 35%),
                linear-gradient(135deg, #552aec 0%, #7c3aed 55%, #3a1bb0 100%);
}

.logo-negocio.grande,
.logo-placeholder.grande {
    width: 104px;
    height: 104px;
    font-size: 2.6rem;
    box-shadow: 0 .5rem 1.5rem rgba(8, 26, 76, .25);
}

.opacity-90 { opacity: .9; }

.perfil-hero-cta {
    padding: 1.25rem;
    border-radius: 1rem;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2);
    backdrop-filter: blur(4px);
}

.perfil-hero + .perfil-cuerpo { margin-top: -2.5rem; }

.perfil-pasos {
    border: 0;
    box-shadow: 0 .75rem 2rem rgba(8, 26, 76, .10);
}

.perfil-paso-num,
.perfil-servicio-icono {
    width: 44px;
    height: 44px;
    border-radius: .8rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ede9fe;
    color: #552aec;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.perfil-horario li {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    padding: .45rem .6rem;
    border-radius: .5rem;
    font-size: .9rem;
}

.perfil-horario li.hoy {
    background: #ede9fe;
    color: #552aec;
    font-weight: 600;
}

/* ---- Anuncio "Muy pronto" ---- */
.proximamente {
    padding: 1.5rem;
    border-radius: 1.25rem;
    color: #fff;
    background: radial-gradient(circle at 100% 0%, rgba(124, 58, 237, .55) 0%, transparent 45%),
                linear-gradient(135deg, #081a4c 0%, #1e1b6b 60%, #3a1bb0 100%);
    box-shadow: 0 1rem 2rem rgba(8, 26, 76, .18);
}

.proximamente-etiqueta {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .2rem .7rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    background: #facc15;
    color: #081a4c;
}

.proximamente-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1rem;
    border-radius: .9rem;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .15);
}

.proximamente-item strong { display: block; font-size: .9rem; }
.proximamente-item small { opacity: .75; }

.proximamente-icono {
    width: 40px;
    height: 40px;
    border-radius: .75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, .15);
    font-size: 1.2rem;
    flex-shrink: 0;
}

.proximamente-icono.wa { background: #25d366; }
