/* ============================================
   CSS CUSTOM PROPERTIES (VARIABLES)
   ============================================ */
:root {
    --color-sidebar: linear-gradient(180deg, #0f172a 0%, #1e293b 100%);
    --color-primario: #0ea5e9;
    --color-primario-oscuro: #0284c7;
    --color-texto: #0f172a;
    --color-texto-suave: #64748b;
    --color-blanco: #ffffff;
    --color-borde: #dbe4f0;
    --sombra: 0 18px 40px rgba(15, 23, 42, 0.08);
    --sombra-card: 0 10px 30px rgba(15, 23, 42, 0.06);
    --transicion: 0.25s ease;
    --texto-oscuro: #0f172a;
    --color-primario-hover: #0284c7;
    --color-whatsapp: #25d366;
    --color-whatsapp-hover: #1ebe5d;
    --color-danger: #ef4444;
    --color-success: #10b981;
}

/* ============================================
   BASE / RESET
   ============================================ */
* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Segoe UI", Inter, Roboto, sans-serif;
    margin: 0;
    line-height: 1.6;
    background:
        linear-gradient(180deg, rgba(239, 247, 255, 0.94), rgba(233, 244, 255, 0.92)),
        url('/assets/FondoA.webp') no-repeat center center/cover scroll;
    color: var(--color-texto);
    min-height: 100vh;
}

html.logeado #seccionAutenticacion { display: none; }

/* ============================================
   LAYOUT & SIDEBAR
   ============================================ */
.layout-contenedor {
    display: flex;
    flex-direction: row;
    min-height: 100vh;
    position: relative;
}

.sidebar-lateral {
    flex: 0 0 240px;
    background: var(--color-sidebar);
    color: var(--color-blanco);
    padding: 1.4rem 0.8rem;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    z-index: 20;
}

.logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-bottom: 1.8rem;
    text-align: center;
}

.sidebar-logo-img {
    width: 78px;
    height: 78px;
    object-fit: contain;
}

.brand-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

.brand-sub {
    font-size: 0.62rem;
    letter-spacing: 0.45em;
    font-weight: 600;
    color: #94a3b8;
    text-transform: uppercase;
    margin-bottom: 0.18rem;
}

.brand-main {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-blanco);
}

.menu-navegacion {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 0.35rem;
}

.menu-navegacion a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #dbeafe;
    text-decoration: none;
    padding: 0.9rem 0.95rem;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: 12px;
    transition: background var(--transicion), transform var(--transicion), color var(--transicion);
}

.menu-navegacion a:hover {
    background: rgba(14, 165, 233, 0.12);
    color: var(--color-blanco);
    transform: translateX(3px);
}

.menu-navegacion a.activo {
    background: linear-gradient(90deg, var(--color-primario), var(--color-primario-oscuro));
    color: white;
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}

.nav-icon-wrapper {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.nav-icon {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.sidebar-footer {
    margin-top: auto;
    padding: 0.9rem 0 0.2rem;
    text-align: center;
}

.sidebar-footer a {
    display: inline-block;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    background: rgba(248, 113, 113, 0.08);
    transition: background var(--transicion), transform var(--transicion);
}

.sidebar-footer a:hover {
    background: rgba(248, 113, 113, 0.18);
    transform: translateY(-1px);
}

.contenido-principal {
    flex: 1;
    padding: 0;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    min-height: 100vh;
}

.encabezado-pagina {
    margin-bottom: 1.5rem;
    z-index: 2;
}

.encabezado-pagina h1 {
    margin: 0 0 0.45rem;
    font-size: clamp(1.8rem, 2vw, 2.4rem);
    color: var(--color-texto);
}

.encabezado-pagina p {
    margin: 0;
    color: var(--color-texto-suave);
}

/* ============================================
   FOOTER
   ============================================ */
.footer-clinica {
    text-align: center;
    padding: 1.4rem 0;
    font-size: 0.82rem;
    color: var(--color-texto-suave);
    background: rgba(255, 255, 255, 0.5);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    width: 100%;
    z-index: 10;
    margin-top: auto;
}

#seccionCitas,
#seccionCitasPendientes,
#seccionMiCuenta,
#seccionHistorialCompleto,
#seccionInfoDoctor,
#seccionAdminCitas,
#seccionCitasCulminadas,
#seccionAdminHistorial,
#seccionAutenticacion {
    position: relative;
    margin: 0;
    padding: 2.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    z-index: 1;
    transition: padding 0.3s ease;
}

#seccionAutenticacion {
    padding: 0.5rem 2.5rem;
    flex-direction: row;
}

#seccionCitas::before,
#seccionCitasPendientes::before,
#seccionMiCuenta::before,
#seccionHistorialCompleto::before,
#seccionInfoDoctor::before,
#seccionAdminCitas::before,
#seccionCitasCulminadas::before,
#seccionAdminHistorial::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.66), rgba(245, 250, 255, 0.78)),
        url('/assets/FondoRegistroUsuario.webp') no-repeat center center/cover;
    z-index: -1;
}

#seccionInfoDoctor::before {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(227, 242, 253, 0.72)),
        url('/assets/FondoRegistroUsuario.webp') no-repeat center center/cover;
}

/* ============================================
   TURNOS / TIME SLOTS GRID
   ============================================ */
.rejilla-turnos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.9rem;
    margin-top: 1rem;
}

.bloque-turno {
    padding: 1rem 0.5rem;
    text-align: center;
    border-radius: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: transform var(--transicion), box-shadow var(--transicion), background var(--transicion);
    border: 1px solid transparent;
    background: #f8fafc;
    color: var(--color-texto);
}

.bloque-turno:hover {
    transform: translateY(-2px);
    box-shadow: var(--sombra-card);
}

.estado-disponible {
    background: linear-gradient(180deg, #ecfdf3, #d1fae5);
    color: #166534;
}

.estado-reservado {
    background: linear-gradient(180deg, #fef2f2, #fee2e2);
    color: #b91c1c;
    cursor: not-allowed;
    opacity: 0.7;
}

.bloque-turno.deshabilitado {
    pointer-events: none;
    opacity: 0.5;
}

.contenedor-listado {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.seccion-formulario {
    margin-top: 3rem;
    animation: fadeIn 0.4s ease-out;
}

.acciones-formulario {
    display: flex;
    gap: 1rem;
}

.tarjeta-formulario {
    background: rgba(255, 255, 255, 0.92);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    padding: 1.5rem;
    border-radius: 18px;
    box-shadow: var(--sombra-card);
    max-width: 700px;
    border: 1px solid rgba(219, 228, 240, 0.9);
}

.tarjeta-formulario h3,
.tarjeta-formulario h4 {
    margin-top: 0;
}

.acciones-tabla {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 4px 0;
}

/* ============================================
   PASSWORD INPUT & VALIDATION
   ============================================ */
.wrapper-password {
    position: relative;
    display: flex;
    align-items: center;
}

.btn-toggle-pass {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 5px;
    color: var(--color-texto-suave);
}

.requisitos-password {
    margin-top: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.requisito {
    font-size: 0.75rem;
    color: #dc2626;
    transition: color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.requisito.valido {
    color: #16a34a;
}

.icono-req {
    font-size: 0.7rem;
    flex-shrink: 0;
    width: 12px;
    text-align: center;
}

/* ============================================
   AUTH / LOGIN PAGE
   ============================================ */
.seccion-centrada {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
    gap: clamp(1.5rem, 3vw, 3rem);
}

.brand-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin: 0;
    animation: fadeIn 0.8s ease-out;
}

.hero-logo {
    max-width: 280px;
    filter: drop-shadow(0 0 22px rgba(14, 165, 233, 0.4));
    margin-bottom: 1rem;
}

.brand-hero-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 0.9;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.45);
}

.brand-hero-text .brand-sub { font-size: 1rem; letter-spacing: 0.5em; }
.brand-hero-text .brand-main { font-size: 3.4rem; letter-spacing: 0.18em; }

.tarjeta-autenticacion {
    background: linear-gradient(180deg, #fff, #f9fbff);
    border: 1px solid var(--color-borde);
    padding: 2rem;
    border-radius: 22px;
    box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.24);
    width: min(100%, 430px);
    max-width: 430px;
    margin: 0;
    flex: 0 1 430px;
}

.tarjeta-autenticacion input,
.tarjeta-autenticacion select,
.tarjeta-autenticacion textarea {
    background: #fff;
    border: 1px solid var(--color-borde);
}

.tarjeta-autenticacion label {
    color: var(--color-texto);
}

.tarjeta-autenticacion header {
    text-align: center;
    margin-bottom: 1.4rem;
}

.tarjeta-autenticacion h2 {
    text-transform: uppercase;
    margin: 0;
    font-size: 1.35rem;
    letter-spacing: 0.08em;
    color: var(--color-texto);
}

.subtitulo-form {
    margin: 0.2rem 0 0;
    font-size: 0.8rem;
    color: var(--color-texto-suave);
}

/* Section groups inside registration form */
.seccion-form {
    background: #f8fafc;
    border: 1px solid var(--color-borde);
    border-radius: 16px;
    padding: 1rem 1.1rem;
    margin-bottom: 1rem;
    animation: fadeIn 0.3s ease-out;
}

.seccion-form .campo-entrada:last-child {
    margin-bottom: 0;
}

.titulo-seccion {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--color-primario-oscuro);
    margin: 0 0 0.7rem;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 6px;
}

.campo-entrada {
    margin-bottom: 1rem;
}

.campo-entrada:last-of-type {
    margin-bottom: 1.1rem;
}

.campo-entrada label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 0.45rem;
    font-size: 0.9rem;
    font-weight: 700;
}

.ayuda-cv {
    font-size: 0.72rem;
    color: var(--color-primario);
    cursor: pointer;
    text-decoration: underline;
    margin-left: auto;
}

/* Validation visual states */
.campo-valido {
    border-color: var(--color-success) !important;
    background: #f0fdf4 !important;
}

.campo-invalido {
    border-color: var(--color-danger) !important;
    background: #fef2f2 !important;
}

.val-msg {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.72rem;
    color: var(--color-texto-suave);
    min-height: 1em;
    transition: color 0.2s ease;
}

.campo-invalido + .val-msg,
.campo-invalido ~ .val-msg {
    color: var(--color-danger);
}

.campo-valido + .val-msg,
.campo-valido ~ .val-msg {
    color: var(--color-success);
}

.icono-login {
    width: 18px;
    height: 18px;
    fill: currentColor;
    flex-shrink: 0;
}

/* ============================================
   GLOBAL INPUTS, BUTTONS & SELECTS
   ============================================ */
input,
textarea,
select {
    width: 100%;
    padding: 0.82rem 0.9rem;
    border: 1px solid var(--color-borde);
    border-radius: 12px;
    box-sizing: border-box;
    outline: none;
    transition: border-color var(--transicion), box-shadow var(--transicion);
}

input:focus,
textarea:focus,
select:focus {
    border-color: var(--color-primario);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.btn-primario {
    background: linear-gradient(90deg, var(--color-primario), var(--color-primario-oscuro));
    color: white;
    border: none;
    padding: 0.82rem 1.2rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 700;
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform var(--transicion), box-shadow var(--transicion), opacity var(--transicion);
    box-shadow: 0 10px 18px rgba(14, 165, 233, 0.22);
}

.btn-primario:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 22px rgba(14, 165, 233, 0.3);
}

.btn-primario:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Button spinner */
.btn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    margin: 0 auto;
}

.btn-spinner.activo {
    display: inline-block;
}

.btn-text + .btn-spinner.activo {
    margin-left: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-secundario {
    background: #fff;
    border: 1px solid var(--color-borde);
    padding: 0.82rem 1.2rem;
    cursor: pointer;
    border-radius: 12px;
    font-weight: 600;
    color: var(--color-texto);
    transition: background var(--transicion), border-color var(--transicion);
}

.btn-secundario:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.oculto { display: none !important; }

.btn-lupa {
    background: linear-gradient(90deg, var(--color-primario), var(--color-primario-oscuro));
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0 14px;
    cursor: pointer;
    font-size: 1rem;
    transition: transform var(--transicion), box-shadow var(--transicion);
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-lupa:hover {
    transform: scale(1.04);
    box-shadow: 0 10px 16px rgba(14, 165, 233, 0.22);
}

.grupo-input-lupa {
    display: flex;
    gap: 8px;
}

.grupo-input-lupa input {
    flex: 1;
}

.grupo-telefono {
    display: flex;
    gap: 8px;
}

.grupo-telefono select {
    flex: 0 0 auto;
    width: auto;
    max-width: 130px;
    background: #fff;
    color: #1e293b;
    border: 1px solid var(--color-borde);
    border-radius: 12px;
    padding: 0.82rem 0.3rem 0.82rem 0.6rem;
    font-size: 0.75rem;
    font-family: inherit;
    cursor: pointer;
    outline: none;
    transition: border-color var(--transicion), box-shadow var(--transicion);
}

.grupo-telefono select:focus {
    border-color: var(--color-primario);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.prefijo-fijo {
    flex: 0 0 auto;
    width: auto;
    max-width: 130px;
    background: #e2e8f0;
    color: #1e293b;
    border: 1px solid var(--color-borde);
    border-radius: 12px;
    padding: 0.82rem 0.8rem;
    font-size: 0.75rem;
    font-family: inherit;
    display: flex;
    align-items: center;
    user-select: none;
}

input.prefijo-fijo[readonly] {
    cursor: default;
    outline: none;
    box-shadow: none;
}

.grupo-telefono input {
    flex: 1;
    min-width: 0;
}

.footer-login-acciones {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 0.3rem;
    margin-top: 0.8rem;
}

.texto-cambio {
    text-align: center;
    margin: 0;
    font-size: 0.82rem;
}

.texto-cambio span {
    color: var(--color-primario);
    cursor: pointer;
    font-weight: 700;
}

.info-atencion {
    font-size: 0.9rem;
    margin-top: -0.5rem;
    margin-bottom: 1rem;
}

.atencion-emergencia {
    color: #dc2626;
    font-weight: 700;
}

.atencion-regular {
    color: #15803d;
    font-weight: 700;
}

/* ============================================
   MODALS
   ============================================ */
.modal-ayuda {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.62);
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-ayuda:not(.oculto) {
    display: flex;
}

.contenido-modal {
    background: white;
    padding: 2rem;
    border-radius: 18px;
    max-width: 430px;
    width: 90%;
    text-align: center;
    box-shadow: 0 30px 60px rgba(15, 23, 42, 0.25);
}

.grupo-edicion-inline {
    display: inline-flex;
    gap: 5px;
    align-items: center;
}

#contenedorImagenesAyuda {
    margin: 1.5rem 0;
    min-height: 100px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

#contenedorImagenesAyuda img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

/* ============================================
   MOBILE MENU & OVERLAY
   ============================================ */
.btn-menu-movil {
    display: none;
    position: fixed;
    top: 15px;
    left: 15px;
    z-index: 1001;
    background: #1e293b;
    color: white;
    border: none;
    padding: 0.75rem 0.95rem;
    border-radius: 999px;
    cursor: pointer;
    font-weight: bold;
    box-shadow: var(--sombra);
}

.overlay-sidebar {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.42);
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
    z-index: 1050;
}

/* ============================================
   RESPONSIVE - TABLET (max-width: 768px)
   ============================================ */
@media (max-width: 768px) {
    .btn-menu-movil {
        display: block;
    }

    .overlay-sidebar:not(.oculto) {
        display: block;
    }

    .sidebar-lateral {
        position: fixed;
        top: 0;
        left: 0;
        width: 280px;
        height: 100dvh;
        z-index: 1100;
        box-shadow: 5px 0 15px rgba(0,0,0,0.32);
        transition: transform 0.3s ease;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .menu-navegacion a {
        padding: 0.75rem 0.8rem;
        font-size: 0.85rem;
    }

    #seccionCitas,
    #seccionCitasPendientes,
    #seccionMiCuenta,
    #seccionHistorialCompleto,
    #seccionAdminCitas,
    #seccionCitasCulminadas,
    #seccionAdminHistorial,
    #seccionInfoDoctor,
    #seccionAutenticacion {
        padding: 1.5rem 1rem;
    }

    #seccionAutenticacion {
        padding: 0.25rem 1rem;
        flex-direction: column;
    }

    .contenido-principal {
        padding: 0.5rem;
        padding-top: 2rem;
    }

    .encabezado-pagina h1 {
        font-size: 1.4rem;
    }

    .encabezado-pagina p {
        font-size: 0.85rem;
    }

    .rejilla-turnos { grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 0.6rem; }
    .bloque-turno { padding: 0.75rem 0.4rem; font-size: 0.82rem; }
    .tarjeta-autenticacion { padding: 1.5rem; margin: 1rem 0; }

    .seccion-centrada {
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 1.5rem;
    }

    .hero-logo { max-width: 180px; }
    .brand-hero-text .brand-main { font-size: 2.5rem; }
    .footer-login-acciones { flex-direction: column; }

    .tabla-admin thead {
        display: none;
    }

    .tabla-admin,
    .tabla-admin tbody,
    .tabla-admin tr,
    .tabla-admin td {
        display: block;
    }

    .tabla-admin tr {
        background: white;
        border-radius: 14px;
        box-shadow: var(--sombra-card);
        margin-bottom: 1rem;
        padding: 0.8rem 1rem;
        border: 1px solid #e2e8f0;
    }

    .tabla-admin td {
        padding: 0.5rem 0;
        border-bottom: 1px solid #f1f5f9;
        vertical-align: middle;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

    .tabla-admin td:last-child {
        border-bottom: none;
    }

    .tabla-admin td::before {
        content: attr(data-label);
        font-weight: 700;
        color: #64748b;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        min-width: 75px;
        flex-shrink: 0;
    }

    .tabla-admin td[data-label="Acción"] {
        display: block;
        padding-top: 0.7rem;
    }

    .tabla-admin td[data-label="Acción"]::before {
        display: none;
    }

    .acciones-tabla {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem;
        width: 100%;
    }

    .acciones-tabla .btn-tabla {
        flex: 1;
        justify-content: center;
        min-width: 0;
        font-size: 0.75rem;
        padding: 0.6rem 0.5rem;
    }

    .tabla-admin td[data-label="Estado"]::before {
        align-self: center;
    }

    #contenedorListaPendientes .tarjeta-formulario {
        padding: 1rem;
    }

    .grupo-telefono {
        flex-wrap: wrap;
    }

    .grupo-telefono select {
        max-width: 100%;
        flex: 1;
    }

    .grupo-telefono input {
        flex: 1;
        min-width: 120px;
    }

    .doctor-perfil-header {
        flex-direction: column;
        text-align: center;
    }

    .doctor-foto {
        width: 150px;
        height: 150px;
    }

    .doctor-bio h2 {
        font-size: 1.4rem;
    }

    .rejilla-certificados {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 0.7rem;
    }

    .item-certificado img {
        height: 100px;
    }

    #contenedorHistorialCompleto .tarjeta-formulario {
        padding: 1rem;
    }

    #contenedorFormulario .tarjeta-formulario {
        padding: 1.2rem;
    }

    .btn-pago {
        width: 100%;
    }
}

/* ============================================
   RESPONSIVE - MOBILE (max-width: 480px)
   ============================================ */
@media (max-width: 480px) {
    .contenido-principal {
        padding: 0.3rem;
        padding-top: 2rem;
    }

    #seccionCitas,
    #seccionCitasPendientes,
    #seccionMiCuenta,
    #seccionHistorialCompleto,
    #seccionAdminCitas,
    #seccionCitasCulminadas,
    #seccionAdminHistorial,
    #seccionInfoDoctor,
    #seccionAutenticacion {
        padding: 1rem 0.6rem;
    }

    .encabezado-pagina h1 {
        font-size: 1.2rem;
    }

    .rejilla-turnos {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .bloque-turno {
        padding: 0.65rem 0.3rem;
        font-size: 0.78rem;
    }

    .sidebar-lateral {
        width: 260px;
    }

    .tarjeta-autenticacion {
        padding: 1.2rem;
        border-radius: 16px;
    }

    .tarjeta-formulario {
        padding: 1rem;
    }

    .tabla-admin tr {
        padding: 0.6rem 0.8rem;
    }

    .tabla-admin td {
        padding: 0.4rem 0;
        font-size: 0.85rem;
    }

    .tabla-admin td::before {
        min-width: 65px;
        font-size: 0.7rem;
    }

    .acciones-tabla .btn-tabla {
        font-size: 0.7rem;
        padding: 0.5rem 0.4rem;
    }

    .doctor-foto {
        width: 120px;
        height: 120px;
    }

    .rejilla-certificados {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .item-certificado {
        padding: 8px;
    }

    .item-certificado img {
        height: 80px;
    }

    .perfil-body {
        padding: 1rem 1rem 0.5rem;
    }

    .perfil-field {
        padding: 0.7rem 0;
    }

    .perfil-footer {
        padding: 1rem;
    }

    .grupo-telefono select {
        font-size: 0.72rem;
        padding: 0.7rem 0.3rem 0.7rem 0.5rem;
    }

    .grupo-telefono input {
        font-size: 0.85rem;
    }

    .btn-editar-campo {
        font-size: 0.72rem;
        padding: 2px 10px;
    }
}

/* ============================================
   ADMIN TABLE & BADGES
   ============================================ */
.tabla-admin {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--sombra-card);
}

.tabla-admin th,
.tabla-admin td {
    padding: 0.9rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: top;
}

.tabla-admin th {
    background: #f8fafc;
    font-weight: 700;
    color: var(--color-texto-suave);
    text-transform: uppercase;
    font-size: 0.78rem;
    letter-spacing: 0.06em;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.7rem;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.status-pendiente { background: #fef3c7; color: #92400e; }
.status-aceptada { background: #dbeafe; color: #1e40af; }
.status-culminada { background: #dcfce7; color: #166534; }
.status-cancelada { background: #eef2ff; color: #4338ca; }

.btn-tabla {
    padding: 0.55rem 0.8rem;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-size: 0.76rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: transform var(--transicion), box-shadow var(--transicion), opacity var(--transicion);
    box-shadow: 0 2px 7px rgba(15, 23, 42, 0.08);
    white-space: nowrap;
}

.btn-tabla:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.1);
}

.btn-aceptar { background-color: #0ea5e9; color: white; }
.btn-concluir { background-color: #10b981; color: white; }
.btn-eliminar { background-color: #ef4444; color: white; }

/* ============================================
   DOCTOR INFO PAGE
   ============================================ */
.info-doctor-container {
    max-width: 980px;
    margin: 0 auto;
    animation: fadeIn 0.5s ease-in-out;
    background: rgba(255, 255, 255, 0.94);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(219, 228, 240, 0.9);
    border-top: 6px solid var(--color-primario);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
}

.doctor-perfil-header {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2rem;
}

.doctor-foto {
    width: 210px;
    height: 210px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--color-primario);
    box-shadow: 0 18px 30px rgba(14, 165, 233, 0.2);
    flex-shrink: 0;
    background: white;
    transition: transform 0.3s ease;
}

.doctor-foto:hover {
    transform: scale(1.03);
}

.doctor-bio h2 {
    color: #0f172a;
    margin: 0 0 0.45rem 0;
    font-size: clamp(1.8rem, 3vw, 2.4rem);
}

.doctor-especialidad {
    color: var(--color-primario);
    font-weight: 800;
    font-size: 1rem;
    margin-bottom: 0.75rem;
    letter-spacing: 0.08em;
    display: block;
    text-transform: uppercase;
}

.divisor-info {
    margin: 2rem 0;
    border: 0;
    border-top: 1px solid #e2e8f0;
}

.doctor-bio p {
    font-size: 1rem;
    color: #475569;
    line-height: 1.6;
}

.rejilla-certificados {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1.2rem;
}

.item-certificado {
    background: white;
    padding: 12px;
    border-radius: 14px;
    border: 1px solid #e2e8f0;
    text-align: center;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.item-certificado:hover {
    transform: translateY(-4px);
    box-shadow: var(--sombra-card);
}

.item-certificado img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    border-radius: 10px;
}

.doctor-cita-footer {
    margin-top: 2rem;
    text-align: center;
}

#modalCertificado {
    background-color: rgba(15, 23, 42, 0.88);
    padding: 2rem 1rem;
    overflow-y: auto;
    align-items: flex-start;
}

.contenedor-zoom-certificado {
    margin: auto;
    display: flex;
    justify-content: center;
    width: 100%;
    max-width: 1000px;
}

.modal-footer-botones {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.txt-area-admin {
    width: 100%;
    margin: 15px 0;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #dbe4f0;
    font-family: inherit;
    resize: none;
}

#imgModalCertificado {
    cursor: default;
}

.contenedor-zoom-certificado {
    position: relative;
}

.btn-cerrar-modal {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background 0.2s;
}

.btn-cerrar-modal:hover {
    background: rgba(0,0,0,0.8);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   PROFILE / PERFIL CARD
   ============================================ */
.perfil-card {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.08);
    overflow: hidden;
    animation: fadeIn 0.3s ease;
    margin: 0 auto;
    max-width: 680px;
    border: 1px solid #e2e8f0;
}

.perfil-body {
    padding: 1.75rem 2rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.perfil-field {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.9rem 0;
    border-bottom: 1px solid #e2e8f0;
    gap: 1rem;
}

.perfil-field:last-of-type {
    border-bottom: none;
}

.perfil-field-label {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-shrink: 0;
    min-width: 200px;
}

.perfil-field-label span {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.perfil-icon {
    width: 20px;
    height: 20px;
    fill: #0ea5e9;
    flex-shrink: 0;
}

.perfil-field-value {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    text-align: right;
    flex-wrap: wrap;
    justify-content: flex-end;
    min-width: 0;
    flex: 1;
}

.perfil-field-value > span:first-child {
    font-size: 0.95rem;
    color: #1e293b;
    font-weight: 500;
    word-break: break-word;
}

.perfil-badge {
    font-size: 0.7rem;
    color: #94a3b8;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 20px;
    white-space: nowrap;
    font-weight: 500;
    letter-spacing: 0.3px;
    border: 1px solid #e2e8f0;
}

.btn-editar-campo {
    background: transparent;
    color: #0ea5e9;
    border: 1px solid #bae6fd;
    padding: 3px 14px;
    border-radius: 20px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    font-family: inherit;
}

.btn-editar-campo:hover {
    background: #f0f9ff;
    border-color: #0ea5e9;
}

.perfil-footer {
    background: #f8fafc;
    padding: 1.75rem 2rem;
    text-align: center;
    border-top: 1px solid #e2e8f0;
}

.perfil-footer-icon {
    margin-bottom: 0.5rem;
}

.perfil-footer h3 {
    color: #1e293b;
    margin: 0 0 0.3rem;
    font-size: 1.05rem;
}

.perfil-footer p {
    color: #64748b;
    font-size: 0.85rem;
    margin: 0 0 1rem;
}

.perfil-footer .btn-primario {
    margin-top: 0;
}

.grupo-edicion-inline input.input-inline {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    padding: 6px 10px;
    color: #1e293b;
    font-size: 0.88rem;
    font-family: inherit;
    outline: none;
    width: 160px;
    transition: border-color 0.2s;
}

.grupo-edicion-inline input.input-inline:focus {
    border-color: #0ea5e9;
    box-shadow: 0 0 0 3px rgba(14,165,233,0.1);
}

.prefijo-telefono {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    border-right: none;
    border-radius: 6px 0 0 6px;
    padding: 6px 10px;
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.4;
    font-family: inherit;
    user-select: none;
}

.grupo-edicion-inline input.input-inline.input-telefono {
    border-radius: 0 6px 6px 0;
    width: 140px;
}

.btn-guardar-mini,
.btn-cancelar-mini {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    padding: 2px 4px;
    border-radius: 4px;
    transition: background 0.15s;
    line-height: 1;
}

.btn-guardar-mini:hover {
    background: #dcfce7;
}

.btn-cancelar-mini:hover {
    background: #fee2e2;
}

/* ============================================
   UTILITY / LOOSE CLASSES
   ============================================ */
.btn-cerrar-sesion {
    color: #f87171;
    text-decoration: none;
    font-weight: bold;
}
.texto-ayuda-cv {
    color: #94a3b8;
    font-weight: 400;
}
.msg-error {
    color: red;
}

/* Password strength meter */
.strength-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 0.45rem;
}

.strength-bar-bg {
    flex: 1;
    height: 6px;
    background: #e2e8f0;
    border-radius: 99px;
    overflow: hidden;
}

.strength-bar-fill {
    height: 100%;
    width: 0%;
    border-radius: 99px;
    transition: width 0.3s ease, background 0.3s ease;
}

.strength-bar-fill.weak  { background: #ef4444; }
.strength-bar-fill.fair  { background: #f59e0b; }
.strength-bar-fill.good  { background: #10b981; }
.strength-bar-fill.strong { background: #059669; }

.strength-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--color-texto-suave);
    min-width: 4em;
    text-align: right;
}
.tarjeta-fecha-cita {
    max-width: 300px;
}
.texto-placeholder {
    color: gray;
}
.encabezado-historial {
    display: flex;
    align-items: center;
    gap: 15px;
}
.btn-volver {
    padding: 5px 15px;
}
.lista-doctor {
    padding-left: 20px;
    line-height: 1.8;
}
.doctor-detalles {
    margin-bottom: 0;
}
.doctor-certificados {
    margin-top: 2rem;
}
.btn-agendar-doctor {
    max-width: 250px;
}
.img-modal-certificado {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 0 30px rgba(0,0,0,0.5);
}
.tarjeta-historial {
    margin-bottom: 1rem;
    border-left: 4px solid #94a3b8;
}
.tarjeta-cita-pendiente {
    margin-bottom: 1.5rem;
}
.flex-between {
    display: flex;
    justify-content: space-between;
}
.flex-between-center {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.detalle-cita {
    margin: 5px 0;
}
.texto-notas {
    font-size: 0.85rem;
}
.texto-fecha-registro {
    font-size: 0.75rem;
    color: gray;
}
.tabla-wrapper {
    overflow-x: auto;
}
@media (max-width: 600px) {
    .perfil-field {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.3rem;
    }
    .perfil-field-value {
        justify-content: flex-start;
        text-align: left;
    }
    .perfil-body {
        padding: 1.25rem 1.25rem 0.75rem;
    }
    .perfil-footer {
        padding: 1.25rem;
    }
    .perfil-field-label {
        min-width: 0;
    }
    .grupo-edicion-inline input.input-inline {
        width: 120px;
    }

    .yape-qr-img-lg {
        width: 260px;
        height: 260px;
    }
}

/* ============================================
   PAYMENT METHODS (YAPE, TARJETA, ETC.)
   ============================================ */
.btn-pago {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-pago:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-reportar {
    background: linear-gradient(135deg, #059669 0%, #10b981 100%);
    color: #fff;
    width: 100%;
    margin-top: 4px;
}
.btn-reportar:hover {
    background: linear-gradient(135deg, #047857 0%, #059669 100%);
}

.yape-qr-img {
    width: 110px;
    height: 110px;
    object-fit: contain;
    border-radius: 8px;
    display: block;
}

.seccion-pago-wrapper {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 20px;
    margin-top: 8px;
}

.sp-header {
    margin-bottom: 16px;
}
.sp-monto {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--color-primario);
}

.pm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}

.pm-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 14px 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
}
.pm-card:hover {
    border-color: var(--color-primario);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}
.pm-card.seleccionado {
    border-color: var(--color-primario);
    background: #eff6ff;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
}

.pm-logo-card {
    width: 44px;
    height: 44px;
    object-fit: contain;
    display: block;
    margin: 0 auto 6px;
}

.pm-logo-detalle {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.pm-icon {
    font-size: 2rem;
    margin-bottom: 4px;
}
.pm-name {
    font-weight: 700;
    font-size: 0.85rem;
    color: #1e293b;
}

.pm-detalle-container {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 14px;
    animation: fadeInDown 0.2s ease;
}
@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.pm-detalle-content {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}
.pm-detalle-icon {
    font-size: 2.2rem;
}
.pm-detalle-info {
    flex: 1;
    min-width: 150px;
}
.pm-detalle-nombre {
    font-weight: 700;
    font-size: 1rem;
    color: #1e293b;
    margin-bottom: 2px;
}
.pm-detalle-line {
    font-size: 0.88rem;
    color: #475569;
    word-break: break-all;
}
.pm-qr-detalle {
    margin-left: auto;
}

.pm-yp-header {
    text-align: center;
    margin-bottom: 12px;
}
.pm-yp-nombre {
    font-weight: 700;
    font-size: 1.3rem;
    color: #1e293b;
}
.pm-yp-numero {
    font-size: 1.1rem;
    color: #475569;
    font-weight: 600;
    letter-spacing: 1px;
}
.pm-yp-qr {
    display: flex;
    justify-content: center;
}
.yape-qr-img-lg {
    width: 360px;
    height: 360px;
    object-fit: contain;
    border-radius: 12px;
    display: block;
    max-width: 100%;
}

/* ============================================
   REPORTE DE PAGO
   ============================================ */
.sp-reporte {
    background: #fefce8;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 14px;
    margin-bottom: 14px;
    animation: fadeInDown 0.2s ease;
}
.sp-reporte-titulo {
    margin: 0 0 10px;
    font-size: 0.95rem;
    color: #92400e;
}
.sp-reporte-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.sp-input {
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 0.9rem;
    background: #fff;
    width: 100%;
    box-sizing: border-box;
}
.sp-input:focus {
    outline: none;
    border-color: #059669;
    box-shadow: 0 0 0 2px rgba(5, 150, 105, 0.15);
}

.pago-reportado {
    margin-top: 8px;
    padding: 10px 14px;
    background: #d1fae5;
    color: #065f46;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
}

/* ============================================
   RESPONSIVE - PAYMENT GRID (max-width: 640px)
   ============================================ */
@media (max-width: 640px) {
    .pm-grid {
        grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
        gap: 8px;
    }
    .pm-card {
        padding: 8px 6px;
    }
    .pm-logo-card {
        width: 34px;
        height: 34px;
    }
    .pm-icon {
        font-size: 1.4rem;
    }
    .yape-qr-img {
        width: 80px;
        height: 80px;
    }
}

/* ============================================
   PAYMENT CHECKBOX & TEXT HELP
   ============================================ */
.checkbox-pago-presencial {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    color: var(--color-texto);
    cursor: pointer;
    margin-top: 8px;
    padding: 8px 12px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
}
.checkbox-pago-presencial input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.texto-ayuda-alerta {
    font-size: 0.85rem;
    color: #dc2626;
    font-weight: 600;
    margin: 4px 0 8px;
}

/* ============================================
   ADMIN PATIENT GROUPING
   ============================================ */
.grupo-paciente {
    background: white;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: var(--sombra-card);
    margin-bottom: 0.8rem;
}

.encabezado-paciente {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 1.2rem;
    cursor: pointer;
    background: #f8fafc;
    transition: background 0.2s;
    user-select: none;
}
.encabezado-paciente:hover {
    background: #eef2ff;
}

.nombre-paciente {
    font-weight: 600;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dni-paciente {
    color: var(--color-texto-suave);
    font-size: 0.85rem;
    white-space: nowrap;
}

.contador-citas {
    background: var(--color-primario);
    color: white;
    padding: 0.2rem 0.7rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    white-space: nowrap;
}

.icono-expandir {
    transition: transform 0.3s;
    font-size: 0.75rem;
    color: var(--color-texto-suave);
}
.icono-expandir.abierto {
    transform: rotate(90deg);
}

.citas-paciente {
    border-top: 1px solid #e2e8f0;
}
.citas-paciente .tabla-wrapper {
    margin: 0;
}
.citas-paciente .tabla-admin {
    box-shadow: none;
    border-radius: 0;
}

.paginador-admin {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1rem;
    flex-wrap: wrap;
}
.paginador-admin span {
    font-size: 0.85rem;
    color: var(--color-texto-suave);
}
.btn-pagina {
    padding: 0.4rem 1rem;
    border: 1px solid var(--color-borde);
    border-radius: 8px;
    background: white;
    cursor: pointer;
    font-size: 0.85rem;
    font-family: inherit;
    transition: background 0.2s, border-color 0.2s;
}
.btn-pagina:hover:not(:disabled) {
    background: var(--color-primario);
    color: white;
    border-color: var(--color-primario);
}
.btn-pagina:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ============================================
   WHATSAPP & LOCATION BUTTONS
   ============================================ */
.btn-whatsapp-grande {
    display: block;
    width: 100%;
    padding: 14px;
    margin: 16px 0;
    background: #25d366;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
    box-sizing: border-box;
}
.btn-whatsapp-grande:hover {
    background: #1ebe5d;
}

.btn-whatsapp-pendiente {
    display: inline-block;
    margin-top: 8px;
    padding: 8px 14px;
    background: #25d366;
    color: white;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}
.btn-whatsapp-pendiente:hover {
    background: #1ebe5d;
}

.btn-ubicacion-pendiente {
    display: inline-block;
    margin-top: 8px;
    padding: 8px 14px;
    background: var(--color-primario);
    color: white;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.2s;
}
.btn-ubicacion-pendiente:hover {
    background: var(--color-primario-hover, #1d4ed8);
}

/* ============================================
   MODALS - INFO & WHATSAPP
   ============================================ */
.modal-info-virtual {
    max-width: 400px;
}
.modal-info-virtual h3 {
    margin-bottom: 10px;
}
.modal-info-virtual p {
    margin-bottom: 12px;
    line-height: 1.5;
}
.modal-info-virtual .btn-primario {
    margin-top: 4px;
}

.modal-whatsapp-post {
    max-width: 440px;
    text-align: center;
}
.modal-whatsapp-post h3 {
    margin-bottom: 10px;
}
.modal-whatsapp-post p {
    margin-bottom: 10px;
    line-height: 1.5;
}
.modal-whatsapp-post .btn-secundario {
    margin-top: 4px;
}

/* ============================================
   UBICACIÓN / DIRECCIÓN PRESENCIAL
   ============================================ */
.info-ubicacion-presencial {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #f0f7ff;
    border: 1px solid #b8d4f0;
    border-left: 4px solid var(--color-primario);
    border-radius: 10px;
    padding: 14px 16px;
    margin-top: 12px;
    animation: fadeInDown 0.3s ease-out;
}
.info-ubicacion-presencial .ubicacion-icono {
    font-size: 24px;
    line-height: 1;
    margin-top: 2px;
}
.info-ubicacion-presencial .ubicacion-texto {
    flex: 1;
}
.info-ubicacion-presencial .ubicacion-texto strong {
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    color: var(--texto-oscuro);
}
.info-ubicacion-presencial .ubicacion-texto p {
    margin: 0 0 8px 0;
    font-size: 14px;
    color: #555;
    line-height: 1.4;
}
.info-ubicacion-presencial .ubicacion-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 14px;
    background: var(--color-primario);
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s;
}
.info-ubicacion-presencial .ubicacion-link:hover {
    background: var(--color-primario-hover, #1d4ed8);
}

/* ============================================
   TOAST CONTAINER & TOASTS
   ============================================ */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 380px;
    width: calc(100% - 40px);
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #fff;
    padding: 14px 18px;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(0,0,0,0.18);
    transform: translateX(120%);
    transition: transform 0.3s ease;
    pointer-events: auto;
    word-break: break-word;
}

.toast.visible {
    transform: translateX(0);
}
