
/* ==========================================================================
   ÁREA DEL SOCIO
   Todos los colores salen de la configuración de la plantilla basebootstrap
   (ConfPlantilla_basebootstrap), expuestos como variables CSS.
   ========================================================================== */

:root {
    --socioPrincipal: #428bca;
    --socioPrincipalRgb: 66, 139, 202;
    --socioPrincipalTexto: #fff;
    --socioPrincipalHover: #3379b5;
    --socioPrincipalHoverTexto: #fff;
    --socioEnlaces: #0196c7;
    --socioRadioBoton: 3px;

    --socioCabecera: #aaaaaa;
    --socioMenuEnlace: #ffffff;
    --socioMenuEnlaceRgb: 255, 255, 255;
    --socioMenuEnlaceHover: #ffffff;
    --socioSubmenuFondo: #01a9e0;
    --socioSubmenuFondoHover: #0183ad;
    --socioSubmenuEnlace: #ffffff;
    --socioMenuMovilFondo: #3bae9a;
    --socioMenuMovilActivo: #329685;
    --socioMenuMovilEnlace: #ffffff;
    --socioMenuMovilEnlaceRgb: 255, 255, 255;
    --socioBotonMenu: #FFFFFF;

    /* Vistas de entrada/salida: mismos colores que el antiguo "jumbotron" del login */
    --socioAccesoFondo: #eaedf2;
    --socioAccesoTitulo: #434955;
    --socioAccesoSubtitulo: #676f7a;
    --socioAccesoTexto: #676f7a;
    --socioAccesoRecordar: #676f7a;

    /* Neutros del sistema: no son colores corporativos, solo estructura */
    --socioTexto: #1f2933;
    --socioTextoSuave: #66717e;
    --socioBorde: #e4e8ee;
    --socioFondoSuave: #f5f7fa;
    --socioPeligro: #d64545;
    --socioPeligroRgb: 214, 69, 69;
    --socioRadio: 16px;
    --socioRadioPeq: 12px;
    --socioSombra: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 12px rgba(16, 24, 40, .06);
}

/* ==========================================================================
   CABECERA Y MENÚ SUPERIOR
   ========================================================================== */

#header .navbar.navbar-expand-lg.navbarAreaSocio {
    min-height: 64px;
    padding-top: 0;
    padding-bottom: 0;
    box-shadow: 0 1px 0 rgba(0, 0, 0, .06), 0 2px 10px rgba(0, 0, 0, .06);
}

#header .navbar.navbarAreaSocio > .container {
    min-height: 64px;
}


#header .navbar.navbarAreaSocio .navbar-brand {
    padding: 0;
    margin-right: 16px;
    font-weight: 600;
    font-size: 1.25rem;
}

#header .navbar.navbarAreaSocio .navbar-brand > img {
    max-height: 44px;
    width: auto;
}

#header .navbar.navbarAreaSocio .accionesCabeceraSocio {
    display: flex;
    align-items: center;
    gap: 6px;
}

#header .navbar.navbarAreaSocio .accionesCabeceraSocio .navbar-toggler,
#header .navbar.navbarAreaSocio .accionesCabeceraSocio a.checkout {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    font-size: 20px;
    color: var(--socioBotonMenu);
    background-color: rgba(var(--socioMenuEnlaceRgb), .14);
    transition: background-color .15s ease;
}

#header .navbar.navbarAreaSocio .navbar-toggler:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--socioMenuEnlaceRgb), .35);
}

#header .navbar.navbarAreaSocio .iconoMenu {
    display: none;
}

/* --- Escritorio ------------------------------------------------------- */
@media (min-width: 992px) {
    /* Si no caben todas las opciones, pasan a otra fila enteras: partir el texto dentro de la píldora la deja con huecos */
    #header .navbar.navbar-expand-lg.navbarAreaSocio .navbar-collapse > .navbar-nav {
        flex-wrap: wrap;
        justify-content: flex-end;
        align-items: center;
        gap: 2px;
    }

    #header .navbar.navbar-expand-lg.navbarAreaSocio .navbar-collapse > .navbar-nav > li > a.nav-link {
        white-space: nowrap;
        padding: 8px 12px;
        border-radius: 999px;
        transition: background-color .15s ease;
    }

    #header .navbar.navbar-expand-lg.navbarAreaSocio .navbar-collapse > .navbar-nav > li > a.nav-link span {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        height: auto;
        border-bottom: 0;
        font-weight: 500;
        color: var(--socioMenuEnlace);
    }

    #header .navbar.navbar-expand-lg.navbarAreaSocio .navbar-collapse > .navbar-nav > li > a.nav-link:hover,
    #header .navbar.navbar-expand-lg.navbarAreaSocio .navbar-collapse > .navbar-nav > li > a.nav-link:focus {
        background-color: rgba(var(--socioMenuEnlaceRgb), .12);
    }

    #header .navbar.navbar-expand-lg.navbarAreaSocio .navbar-collapse > .navbar-nav > li > a.nav-link:hover span,
    #header .navbar.navbar-expand-lg.navbarAreaSocio .navbar-collapse > .navbar-nav > li > a.nav-link:focus span {
        color: var(--socioMenuEnlaceHover);
        border-bottom: 0;
    }

    #header .navbar.navbar-expand-lg.navbarAreaSocio .navbar-collapse > .navbar-nav > li.active > a.nav-link {
        background-color: rgba(var(--socioMenuEnlaceRgb), .2);
    }

    #header .navbar.navbar-expand-lg.navbarAreaSocio .navbar-collapse > .navbar-nav > li.active > a.nav-link span {
        font-weight: 700;
        border-bottom: 0;
    }

    #header .navbar.navbar-expand-lg.navbarAreaSocio .navbar-collapse > .navbar-nav > li:hover:before {
        display: none;
    }

    /* Carrito del menú: la regla de las píldoras ("a.nav-link span") alcanza también al contador y lo descoloca */
    #header .navbar.navbar-expand-lg.navbarAreaSocio .navbar-collapse > .navbar-nav > li > a.nav-link.checkout {
        position: relative;
        font-size: 20px;
    }

    #header .navbar.navbar-expand-lg.navbarAreaSocio .navbar-collapse > .navbar-nav > li > a.nav-link.checkout span.product-number {
        position: absolute;
        top: 0;
        right: 2px;
        left: auto;
        justify-content: center;
        min-width: 20px;
        height: 20px;
        padding: 0 5px;
        border: 2px solid var(--socioCabecera);
        border-radius: 999px;
        font-size: 11px;
        font-weight: 800;
        line-height: 16px;
        color: #fff;
        background-color: #F44336;
        transform: none;
    }

    #header .navbar.navbar-expand-lg.navbarAreaSocio .navbar-nav > li .dropdown-menu {
        margin-top: 8px;
        padding: 6px;
        min-width: 200px;
        width: auto;
        border: 0;
        border-radius: var(--socioRadioPeq);
        background-color: var(--socioSubmenuFondo);
        box-shadow: 0 10px 30px rgba(16, 24, 40, .18);
    }

    #header .navbar.navbar-expand-lg.navbarAreaSocio .navbar-nav > li .dropdown-menu > li > a.nav-link {
        padding: 10px 14px;
        border-radius: 8px;
        border: 0;
    }

    #header .navbar.navbar-expand-lg.navbarAreaSocio .navbar-nav > li .dropdown-menu > li > a.nav-link span {
        color: var(--socioSubmenuEnlace);
    }

    #header .navbar.navbar-expand-lg.navbarAreaSocio .navbar-nav > li .dropdown-menu > li > a.nav-link:hover {
        background-color: var(--socioSubmenuFondoHover);
    }

    .fondoMenuAreaSocio,
    .cabeceraMenuAreaSocio,
    #header .navbar.navbarAreaSocio .accionesCabeceraSocio .navbar-toggler {
        display: none !important;
    }
}

/* --- Móvil: el menú se abre como panel lateral ---------------------- */
@media (max-width: 991px) {
    #header .navbar.navbarAreaSocio > .container {
        flex-wrap: nowrap;
    }

    #header .navbar.navbarAreaSocio .navbar-brand > img {
        max-height: 38px;
    }

    #header .navbar.navbar-expand-lg.navbarAreaSocio .navbar-collapse {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 2;
        width: min(86vw, 360px);
        height: 100vh;
        height: 100dvh;
        max-height: none;
        padding: 0 12px 24px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        background-color: var(--socioMenuMovilFondo);
        box-shadow: -12px 0 40px rgba(0, 0, 0, .25);
        border-radius: 20px 0 0 20px;
        /* El panel se abre/cierra con la clase del body, no con el collapse de Bootstrap (que anima la altura) */
        display: block;
        visibility: hidden;
        transform: translateX(105%);
        transition: transform .28s cubic-bezier(.4, 0, .2, 1), visibility 0s linear .28s;
    }

    body.menuAreaSocioAbierto #header .navbar.navbar-expand-lg.navbarAreaSocio .navbar-collapse {
        visibility: visible;
        transform: translateX(0);
        transition: transform .28s cubic-bezier(.4, 0, .2, 1), visibility 0s;
    }

    .cabeceraMenuAreaSocio {
        position: sticky;
        top: 0;
        z-index: 1;
        display: flex;
        align-items: center;
        gap: 12px;
        margin: 0 -12px 8px;
        padding: 18px 16px 14px;
        color: var(--socioMenuMovilEnlace);
        background-color: var(--socioMenuMovilFondo);
        border-bottom: 1px solid rgba(var(--socioMenuMovilEnlaceRgb), .15);
    }

    .cabeceraMenuAreaSocio .avatarSocio {
        width: 44px;
        height: 44px;
        font-size: 1rem;
        color: var(--socioMenuMovilFondo);
        background-color: var(--socioMenuMovilEnlace);
    }

    .cabeceraMenuAreaSocio .datosMenuSocio {
        flex: 1;
        min-width: 0;
        line-height: 1.25;
    }

    .cabeceraMenuAreaSocio .nombreMenuSocio {
        display: block;
        font-weight: 700;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .cabeceraMenuAreaSocio .detalleMenuSocio {
        display: block;
        font-size: .85rem;
        opacity: .8;
    }

    .cabeceraMenuAreaSocio .cerrarMenuSocio {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
        width: 40px;
        height: 40px;
        padding: 0;
        border: 0;
        border-radius: 50%;
        font-size: 18px;
        color: var(--socioMenuMovilEnlace);
        background-color: rgba(var(--socioMenuMovilEnlaceRgb), .14);
    }

    #header .navbar.navbar-expand-lg.navbarAreaSocio .navbar-nav {
        gap: 2px;
    }

    #header .navbar.navbar-expand-lg.navbarAreaSocio .navbar-nav > li > a.nav-link {
        display: flex;
        align-items: center;
        gap: 14px;
        min-height: 50px;
        padding: 12px 14px;
        border: 0;
        border-radius: var(--socioRadioPeq);
        background-color: transparent;
        font-size: 1.05rem;
    }

    #header .navbar.navbar-expand-lg.navbarAreaSocio .navbar-nav > li > a.nav-link .iconoMenu {
        display: inline-block;
        float: none;
        width: 22px;
        margin: 0;
        text-align: center;
        font-size: 18px;
        color: var(--socioMenuMovilEnlace);
        opacity: .9;
    }

    #header .navbar.navbar-expand-lg.navbarAreaSocio .navbar-nav > li > a.nav-link span {
        flex: 1;
        color: var(--socioMenuMovilEnlace);
        font-weight: 500;
    }

    #header .navbar.navbar-expand-lg.navbarAreaSocio .navbar-nav > li > a.nav-link span .fa-angle-down {
        display: none;
    }

    #header .navbar.navbar-expand-lg.navbarAreaSocio .navbar-nav > li > a.nav-link:active {
        background-color: rgba(var(--socioMenuMovilEnlaceRgb), .1);
    }

    #header .navbar.navbar-expand-lg.navbarAreaSocio .navbar-nav > li.active > a.nav-link,
    #header .navbar.navbar-expand-lg.navbarAreaSocio .navbar-nav > li.active > a.nav-link:hover,
    #header .navbar.navbar-expand-lg.navbarAreaSocio .navbar-nav > li.active > a.nav-link:focus {
        background-color: var(--socioMenuMovilActivo);
    }

    #header .navbar.navbar-expand-lg.navbarAreaSocio .navbar-nav > li.active > a.nav-link span {
        font-weight: 700;
    }

    /* Submenús (p.ej. idioma): siempre visibles, como opciones en píldora */
    #header .navbar.navbar-expand-lg.navbarAreaSocio .navbar-nav > li > .dropdown-menu {
        position: static;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        float: none;
        width: auto;
        min-width: 0;
        margin: 0;
        padding: 0 0 8px 50px;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    #header .navbar.navbar-expand-lg.navbarAreaSocio .navbar-nav > li > .dropdown-menu > li {
        width: auto;
    }

    #header .navbar.navbar-expand-lg.navbarAreaSocio .navbar-nav > li > .dropdown-menu > li > a.nav-link {
        min-height: 0;
        padding: 6px 14px;
        border: 1px solid rgba(var(--socioMenuMovilEnlaceRgb), .45);
        border-radius: 999px;
        font-size: .9rem;
    }

    #header .navbar.navbar-expand-lg.navbarAreaSocio .navbar-nav > li > .dropdown-menu > li > a.nav-link span {
        color: var(--socioMenuMovilEnlace);
    }

    .fondoMenuAreaSocio {
        position: fixed;
        inset: 0;
        z-index: 1;
        display: block;
        opacity: 0;
        pointer-events: none;
        background-color: rgba(15, 23, 42, .45);
        -webkit-backdrop-filter: blur(2px);
        backdrop-filter: blur(2px);
        transition: opacity .28s ease;
    }

    body.menuAreaSocioAbierto {
        overflow: hidden;
    }

    body.menuAreaSocioAbierto .fondoMenuAreaSocio {
        opacity: 1;
        pointer-events: auto;
    }
}

/* ==========================================================================
   COMPONENTES COMUNES DEL ÁREA DE SOCIO
   ========================================================================== */

.areaSocio {
    color: var(--socioTexto);
    padding-bottom: 32px;
}

.areaSocio .areaSocio {
    padding-bottom: 0;
}

/* Especificidad baja a propósito: cualquier componente con clase propia (botones, pestañas...) manda sobre esto */
.areaSocio a {
    color: var(--socioEnlaces);
}

.areaSocio .seccionSocio {
    margin-top: 28px;
}

.areaSocio .tituloSeccionSocio {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--socioTexto);
}

.areaSocio .tituloSeccionSocio .iconoSeccion {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    font-size: 14px;
    color: var(--socioPrincipal);
    background-color: rgba(var(--socioPrincipalRgb), .12);
}

.avatarSocio {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 50%;
    font-weight: 700;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.areaSocio .tarjetaSocio {
    height: 100%;
    background-color: #fff;
    border: 1px solid var(--socioBorde);
    border-radius: var(--socioRadio);
    box-shadow: var(--socioSombra);
    overflow: hidden;
}

.areaSocio .tarjetaSocio .cuerpoTarjeta {
    padding: 18px 20px;
}

.areaSocio .tarjetaSocio .pieTarjeta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 20px;
    font-size: .9rem;
    color: var(--socioTextoSuave);
    background-color: var(--socioFondoSuave);
    border-top: 1px solid var(--socioBorde);
}

.areaSocio .tarjetaSocio .pieTarjeta strong {
    color: var(--socioTexto);
}

.areaSocio .etiquetaTarjeta {
    margin-bottom: 4px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--socioTextoSuave);
}

.areaSocio .rejillaTarjetas {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr));
    gap: 16px;
}

/* En escritorio, cuota, servicios y sesiones comparten fila para no dejar media pantalla vacía */
@media (min-width: 992px) {
    .areaSocio .resumenSocio {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-start;
        column-gap: 24px;
    }

    .areaSocio .resumenSocio > .seccionSocio {
        flex: 1 1 320px;
        min-width: 0;
    }

    .areaSocio .resumenSocio > .informacionSesiones {
        flex-grow: 2;
    }
}

/* --- Cabecera de bienvenida -------------------------------------------- */
.areaSocio .cabeceraSocio {
    position: relative;
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 8px;
    padding: 22px 20px;
    border-radius: var(--socioRadio);
    color: var(--socioPrincipalTexto);
    background-color: var(--socioPrincipal);
    background-image: linear-gradient(135deg, rgba(255, 255, 255, .14) 0%, rgba(255, 255, 255, 0) 55%);
    box-shadow: 0 10px 24px rgba(var(--socioPrincipalRgb), .28);
    overflow: hidden;
}

.areaSocio .cabeceraSocio:after {
    content: '';
    position: absolute;
    right: -40px;
    top: -60px;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, .08);
    pointer-events: none;
}

.areaSocio .cabeceraSocio .avatarSocio {
    width: 56px;
    height: 56px;
    font-size: 1.25rem;
    color: var(--socioPrincipal);
    background-color: var(--socioPrincipalTexto);
}

.areaSocio .cabeceraSocio .datosCabeceraSocio {
    position: relative;
    z-index: 1;
    min-width: 0;
}

.areaSocio .cabeceraSocio .saludoSocio {
    margin: 0 0 6px;
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.2;
    color: inherit;
    word-break: break-word;
}

.areaSocio .cabeceraSocio .datosIdentificacion {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.areaSocio .cabeceraSocio .datoIdentificacion {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .82rem;
    background-color: rgba(255, 255, 255, .18);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.areaSocio .cabeceraSocio .datoIdentificacion .etiquetaDato {
    opacity: .85;
}

.areaSocio .cabeceraSocio .datoIdentificacion strong {
    font-weight: 700;
}

.avatarSocio.conFoto {
    overflow: hidden;
    border: 3px solid var(--socioPrincipalTexto);
}

.avatarSocio.conFoto img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Aviso de recibos pendientes -------------------------------------- */
.areaSocio .avisoSocio {
    display: flex;
    gap: 14px;
    margin-top: 16px;
    padding: 16px;
    border-radius: var(--socioRadio);
    border: 1px solid rgba(var(--socioPeligroRgb), .25);
    background-color: rgba(var(--socioPeligroRgb), .07);
    color: var(--socioTexto);
}

.areaSocio .avisoSocio .iconoAviso {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 18px;
    color: #fff;
    background-color: var(--socioPeligro);
}

.areaSocio .avisoSocio .textoAviso {
    flex: 1;
    min-width: 0;
    font-size: .95rem;
    line-height: 1.4;
}

.areaSocio .avisoSocio .textoAviso a:not(.btnSocio) {
    font-weight: 700;
    text-decoration: underline;
}

.areaSocio .avisoSocio .accionAviso {
    margin-top: 10px;
}

.areaSocio .btnSocio {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 10px 18px;
    border: 0;
    border-radius: max(var(--socioRadioBoton), 10px);
    font-weight: 600;
    text-decoration: none;
    color: var(--socioPrincipalTexto);
    background-color: var(--socioPrincipal);
    transition: background-color .15s ease;
}

.areaSocio .btnSocio:hover,
.areaSocio .btnSocio:focus {
    color: var(--socioPrincipalHoverTexto);
    background-color: var(--socioPrincipalHover);
    text-decoration: none;
}

.areaSocio .btnSocio.btnSocioPeligro {
    color: #fff;
    background-color: var(--socioPeligro);
}

/* --- Cuota y servicios -------------------------------------------------- */
.areaSocio .tarjetaCuota .lineaCuota {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 4px 16px;
}

.areaSocio .tarjetaCuota .nombreCuota {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.25;
    word-break: break-word;
}

.areaSocio .tarjetaCuota .importeCuota {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--socioPrincipal);
    white-space: nowrap;
}

.areaSocio .tarjetaCuota .htmlAdicionalCuota {
    margin-top: 12px;
    font-size: .9rem;
    color: var(--socioTextoSuave);
}

/* --- Sesiones / bonos --------------------------------------------------- */
.areaSocio .tarjetaBono .cabeceraBono {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 14px;
}

.areaSocio .tarjetaBono .tituloTarjeta {
    margin: 0;
    font-size: .95rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: .02em;
    text-transform: uppercase;
    color: var(--socioTexto);
    word-break: break-word;
}

.areaSocio .tarjetaBono .cifraBono + .cifraBono {
    border-left: 1px solid var(--socioBorde);
}

.areaSocio .tarjetaBono .cifraBono .valor {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--socioTexto);
}

.areaSocio .tarjetaBono .cifraBono.consumidas .valor {
    color: var(--socioTextoSuave);
}

.areaSocio .tarjetaBono .cifraBono.pendientes .valor {
    color: var(--socioPrincipal);
}

.areaSocio .tarjetaBono .cifraBono .etiqueta,
.areaSocio .tarjetaBono .cifraBono .sufijo {
    margin-top: 4px;
    font-size: .78rem;
    line-height: 1.2;
    color: var(--socioTextoSuave);
}

.areaSocio .tarjetaBono .progresoBono {
    height: 8px;
    margin-top: 16px;
    border-radius: 999px;
    background-color: rgba(var(--socioPrincipalRgb), .14);
    overflow: hidden;
}

.areaSocio .tarjetaBono .progresoBono .barraProgresoBono {
    height: 100%;
    border-radius: 999px;
    background-color: var(--socioPrincipal);
}

.areaSocio .tarjetaBono.caducado {
    opacity: .7;
}

.areaSocio .tarjetaBono.caducado .pieTarjeta {
    color: var(--socioPeligro);
}

.areaSocio .etiquetaEstado {
    flex-shrink: 0;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--socioPeligro);
    background-color: rgba(var(--socioPeligroRgb), .1);
}

/* --- Accesos rápidos ---------------------------------------------------- */
.areaSocio .rejillaAccesos {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

@media (max-width: 340px) {
    .areaSocio .rejillaAccesos {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .areaSocio .rejillaAccesos {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 14px;
    }
}

@media (min-width: 1200px) {
    .areaSocio .rejillaAccesos {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

.areaSocio .accesoSocio {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    min-height: 108px;
    height: 100%;
    padding: 16px 8px 14px;
    text-align: center;
    text-decoration: none;
    color: var(--socioTexto);
    background-color: #fff;
    border: 1px solid var(--socioBorde);
    border-radius: var(--socioRadio);
    box-shadow: var(--socioSombra);
    transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
    -webkit-tap-highlight-color: transparent;
}

.areaSocio .accesoSocio:hover,
.areaSocio .accesoSocio:focus {
    color: var(--socioTexto);
    text-decoration: none;
    border-color: rgba(var(--socioPrincipalRgb), .45);
    box-shadow: 0 6px 18px rgba(var(--socioPrincipalRgb), .18);
}

.areaSocio .accesoSocio:active {
    transform: scale(.97);
}

.areaSocio .accesoSocio .iconoAcceso {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    font-size: 20px;
    color: var(--socioPrincipal);
    background-color: rgba(var(--socioPrincipalRgb), .1);
}

/* Icono a color de cada acceso: el color (grupo de configuración ColoresAccesosSocio) llega en --colorAcceso;
   si está vacío, se usa el color principal */
.areaSocio .accesoSocio .iconoAcceso.iconoAccesoColor {
    color: #fff;
    background-color: var(--colorAcceso, var(--socioPrincipal));
    background-image: linear-gradient(145deg, rgba(255, 255, 255, .28), rgba(255, 255, 255, 0) 60%);
    box-shadow: 0 4px 10px -2px var(--colorAcceso, var(--socioPrincipal));
    transition: transform .15s ease;
}

.areaSocio .accesoSocio:hover .iconoAcceso.iconoAccesoColor,
.areaSocio .accesoSocio:focus .iconoAcceso.iconoAccesoColor {
    transform: translateY(-2px);
}

.areaSocio .accesoSocio .iconoAcceso img {
    max-width: 30px;
    max-height: 30px;
}

.areaSocio .accesoSocio .textoAcceso {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: .85rem;
    font-weight: 600;
    line-height: 1.2;
    word-break: break-word;
    hyphens: auto;
}

.areaSocio .accesoSocio.sinIcono {
    justify-content: center;
    min-height: 72px;
}

.areaSocio .accesoSocio.deshabilitado {
    cursor: not-allowed;
    box-shadow: none;
    background-color: var(--socioFondoSuave);
    color: var(--socioTextoSuave);
}

.areaSocio .accesoSocio.deshabilitado .iconoAcceso {
    color: var(--socioPeligro);
    background-color: rgba(var(--socioPeligroRgb), .1);
}

.areaSocio .accesoSocio.deshabilitado .motivoAcceso {
    font-size: .72rem;
    line-height: 1.2;
    color: var(--socioPeligro);
}

/* --- Mi cuenta (lista de opciones) -------------------------------------- */
.areaSocio .listaCuentaSocio {
    padding: 4px;
}

.areaSocio .filaCuentaSocio {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 54px;
    padding: 10px 14px;
    border-radius: var(--socioRadioPeq);
    text-decoration: none;
    color: var(--socioTexto);
    font-weight: 600;
}

.areaSocio .filaCuentaSocio + .filaCuentaSocio {
    position: relative;
}

.areaSocio .filaCuentaSocio + .filaCuentaSocio:before {
    content: '';
    position: absolute;
    top: 0;
    left: 64px;
    right: 14px;
    border-top: 1px solid var(--socioBorde);
}

.areaSocio .filaCuentaSocio:hover,
.areaSocio .filaCuentaSocio:focus {
    color: var(--socioTexto);
    text-decoration: none;
    background-color: var(--socioFondoSuave);
}

.areaSocio .filaCuentaSocio .iconoFila,
.areaSocio .cabeceraInscripcionCampus .iconoFila {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 15px;
    color: var(--socioPrincipal);
    background-color: rgba(var(--socioPrincipalRgb), .1);
}

.areaSocio .filaCuentaSocio .textoFila {
    flex: 1;
    min-width: 0;
}

.areaSocio .filaCuentaSocio .flechaFila {
    font-size: 13px;
    color: var(--socioTextoSuave);
}

.areaSocio .filaCuentaSocio.filaCerrarSesion,
.areaSocio .filaCuentaSocio.filaCerrarSesion:hover {
    color: var(--socioPeligro);
}

.areaSocio .filaCuentaSocio.filaCerrarSesion .iconoFila {
    color: var(--socioPeligro);
    background-color: rgba(var(--socioPeligroRgb), .1);
}

/* --- Ajustes de escritorio ---------------------------------------------- */
@media (min-width: 768px) {
    .areaSocio .cabeceraSocio {
        padding: 28px 28px;
    }

    .areaSocio .cabeceraSocio .avatarSocio {
        width: 68px;
        height: 68px;
        font-size: 1.5rem;
    }

    .areaSocio .cabeceraSocio .saludoSocio {
        font-size: 1.6rem;
    }

    .areaSocio .seccionSocio {
        margin-top: 36px;
    }
}

/* --- Cabecera de las vistas interiores --------------------------------- */
.areaSocio .cabeceraVistaSocio {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 8px 0 20px;
}

.areaSocio .cabeceraVistaSocio .volverVistaSocio {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 16px;
    text-decoration: none;
    color: var(--socioTexto);
    background-color: #fff;
    border: 1px solid var(--socioBorde);
    box-shadow: var(--socioSombra);
    transition: background-color .15s ease, border-color .15s ease;
}

.areaSocio .cabeceraVistaSocio .volverVistaSocio:hover,
.areaSocio .cabeceraVistaSocio .volverVistaSocio:focus {
    color: var(--socioPrincipal);
    border-color: rgba(var(--socioPrincipalRgb), .45);
}

.areaSocio .cabeceraVistaSocio .tituloVistaSocio {
    margin: 0;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--socioTexto);
    word-break: break-word;
}

.areaSocio.vistaFormularioSocio {
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.areaSocio.vistaFormularioSocio .avisoSocio {
    margin: 0 0 16px;
}

/* --- Formularios ------------------------------------------------------- */
.areaSocio .formularioSocio .cuerpoTarjeta {
    padding: 20px;
}

.areaSocio .notaFormulario {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    padding: 14px;
    border-radius: var(--socioRadioPeq);
    background-color: rgba(var(--socioPrincipalRgb), .07);
}

.areaSocio .notaFormulario .iconoNota {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 9px;
    font-size: 14px;
    color: var(--socioPrincipal);
    background-color: rgba(var(--socioPrincipalRgb), .14);
}

.areaSocio .notaFormulario p {
    margin: 0;
    font-size: .9rem;
    line-height: 1.45;
    color: var(--socioTexto);
}

.areaSocio .campoFormulario {
    margin-bottom: 18px;
}

.areaSocio .campoFormulario > label {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 6px;
    font-size: .9rem;
    font-weight: 600;
    color: var(--socioTexto);
}

.areaSocio .campoFormulario > label .fa-question-circle {
    color: var(--socioTextoSuave);
}

/* 16px como mínimo: con menos, iOS hace zoom al enfocar el campo */
.areaSocio .campoFormulario .form-control {
    height: 48px;
    padding: 10px 14px;
    font-size: 16px;
    color: var(--socioTexto);
    background-color: #fff;
    border: 1px solid #cfd6df;
    border-radius: var(--socioRadioPeq);
    box-shadow: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.areaSocio .campoFormulario .form-control:focus {
    border-color: var(--socioPrincipal);
    box-shadow: 0 0 0 3px rgba(var(--socioPrincipalRgb), .18);
}

.areaSocio .campoFormulario .form-control.errorqtip,
.areaSocio .campoFormulario .form-control.error,
.areaSocio .campoFormulario .form-control.is-invalid {
    border-color: var(--socioPeligro);
    box-shadow: 0 0 0 3px rgba(var(--socioPeligroRgb), .15);
}

/* El "ojo" lo añade PWTextBoxPassword por JS con estilos en línea */
.areaSocio .campoFormulario .pw-wrapper .form-control {
    padding-right: 52px;
}

.areaSocio .campoFormulario .pw-wrapper span[id^="toggle-"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    right: 4px !important;
    border-radius: 10px;
    color: var(--socioTextoSuave);
}

.areaSocio .campoFormulario .pw-wrapper span[id^="toggle-"]:hover {
    color: var(--socioPrincipal);
}

.areaSocio .medidorContrasena {
    margin-top: 8px;
}

.areaSocio .medidorContrasena:empty {
    display: none;
}

.areaSocio .medidorContrasena .password-strength-meter-message {
    margin-bottom: 4px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--socioTextoSuave);
}

.areaSocio .medidorContrasena .password-strength-meter {
    height: 6px;
    border-radius: 999px;
    overflow: hidden;
}

.areaSocio .medidorContrasena .password-strength-meter-score {
    height: 100%;
    border-radius: 999px;
}

.areaSocio .btnSocio.btnSocioBloque {
    width: 100%;
    min-height: 50px;
    margin-top: 6px;
    font-size: 1rem;
}

/* ==========================================================================
   VISTAS DE ENTRADA Y SALIDA (login / logout)
   ========================================================================== */

.areaSocio.vistaAccesoSocio {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 8px -15px 0;
    padding: 28px 16px 40px;
    background-color: var(--socioAccesoFondo);
}

@media (min-width: 576px) {
    .areaSocio.vistaAccesoSocio {
        margin: 16px 0 0;
        padding: 48px 24px;
        border-radius: 24px;
    }
}

.areaSocio.vistaAccesoSocio > * {
    width: 100%;
    max-width: 440px;
}

.areaSocio .tarjetaAcceso .cuerpoTarjeta {
    padding: 28px 22px 24px;
}

@media (min-width: 576px) {
    .areaSocio .tarjetaAcceso .cuerpoTarjeta {
        padding: 36px 32px 30px;
    }
}

.areaSocio .cabeceraAcceso {
    margin-bottom: 24px;
    text-align: center;
}

.areaSocio .cabeceraAcceso .iconoAcceso {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin-bottom: 14px;
    border-radius: 18px;
    font-size: 24px;
    color: var(--socioPrincipal);
    background-color: rgba(var(--socioPrincipalRgb), .12);
}

.areaSocio .cabeceraAcceso .tituloAcceso {
    margin: 0 0 6px;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--socioAccesoTitulo);
}

.areaSocio .cabeceraAcceso .subtituloAcceso {
    margin: 0;
    font-size: .95rem;
    color: var(--socioAccesoSubtitulo);
}

.areaSocio.vistaAccesoSocio .avisoSocio {
    margin: 0 0 20px;
    padding: 12px;
    font-size: .9rem;
}

.areaSocio.vistaAccesoSocio .avisoSocio .iconoAviso {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    font-size: 14px;
}

.areaSocio .opcionesAcceso {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    margin: -4px 0 20px;
}

/* Checkbox "Mantener sesión" y selección de cursos (PWCheckBox pinta un label.container-checkbox + span.checkmark) */
.areaSocio .opcionRecordar {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
}

.areaSocio .opcionRecordar label {
    margin: 0;
    font-size: .9rem;
    color: var(--socioAccesoTexto);
    cursor: pointer;
}

.areaSocio .opcionRecordar label.container-checkbox,
.areaSocio .seleccionCursoSocio label.container-checkbox {
    position: relative;
    display: inline-block;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin: 0;
    padding: 0;
}

.areaSocio .opcionRecordar label.container-checkbox input,
.areaSocio .seleccionCursoSocio label.container-checkbox input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    cursor: pointer;
}

.areaSocio .opcionRecordar label.container-checkbox .checkmark,
.areaSocio .seleccionCursoSocio label.container-checkbox .checkmark {
    position: absolute;
    top: 0;
    left: 0;
    width: 22px;
    height: 22px;
    border: 1.5px solid #b8c1cc;
    border-radius: 6px;
    background-color: #fff;
    transition: background-color .15s ease, border-color .15s ease;
}

.areaSocio .opcionRecordar label.container-checkbox input:checked ~ .checkmark,
.areaSocio .seleccionCursoSocio label.container-checkbox input:checked ~ .checkmark {
    border-color: var(--socioPrincipal);
    background-color: var(--socioPrincipal);
}

.areaSocio .opcionRecordar label.container-checkbox .checkmark:after,
.areaSocio .seleccionCursoSocio label.container-checkbox .checkmark:after {
    content: '';
    position: absolute;
    display: none;
    left: 7px;
    top: 3px;
    width: 6px;
    height: 11px;
    border: solid var(--socioPrincipalTexto);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.areaSocio .opcionRecordar label.container-checkbox input:checked ~ .checkmark:after,
.areaSocio .seleccionCursoSocio label.container-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.areaSocio .opcionRecordar label.container-checkbox input:focus-visible ~ .checkmark,
.areaSocio .seleccionCursoSocio label.container-checkbox input:focus-visible ~ .checkmark {
    box-shadow: 0 0 0 3px rgba(var(--socioPrincipalRgb), .25);
}

.areaSocio.vistaAccesoSocio a.enlaceRecordar {
    font-size: .9rem;
    font-weight: 600;
    color: var(--socioAccesoRecordar);
}

.areaSocio .separadorAcceso {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 22px 0 16px;
    font-size: .8rem;
    color: var(--socioTextoSuave);
}

.areaSocio .separadorAcceso:before,
.areaSocio .separadorAcceso:after {
    content: '';
    flex: 1;
    border-top: 1px solid var(--socioBorde);
}

.areaSocio .btnSocio.btnSocioSecundario {
    color: var(--socioPrincipal);
    background-color: #fff;
    border: 1.5px solid rgba(var(--socioPrincipalRgb), .5);
}

.areaSocio .btnSocio.btnSocioSecundario:hover,
.areaSocio .btnSocio.btnSocioSecundario:focus {
    color: var(--socioPrincipal);
    background-color: rgba(var(--socioPrincipalRgb), .07);
}

.areaSocio .btnSocio.btnSocioBloque + .btnSocio.btnSocioBloque {
    margin-top: 10px;
}

.areaSocio .bloqueAltaAcceso {
    margin-top: 16px;
    padding: 20px 22px;
    text-align: center;
}

.areaSocio .bloqueAltaAcceso + .bloqueAltaAcceso {
    margin-top: 12px;
}

.areaSocio .bloqueAltaAcceso p {
    margin: 0 0 12px;
    font-size: .9rem;
    color: var(--socioAccesoTexto);
}

/* --- Salida -------------------------------------------------------------- */
.areaSocio .tarjetaAcceso.tarjetaSalida .cabeceraAcceso {
    margin-bottom: 22px;
}

.areaSocio .tarjetaAcceso.tarjetaSalida .iconoAcceso {
    border-radius: 50%;
}

.areaSocio .tarjetaAcceso.tarjetaSalida .subtituloAcceso {
    color: var(--socioAccesoTexto);
}

/* ==========================================================================
   MIS DATOS
   ========================================================================== */

/* Pestañas: en móvil se desplazan en horizontal en lugar de apilarse */
.areaSocio .listaPestanasSocio {
    display: flex;
    gap: 8px;
    margin: 0 -15px 16px;
    padding: 2px 15px 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.areaSocio .listaPestanasSocio::-webkit-scrollbar {
    display: none;
}

@media (min-width: 768px) {
    .areaSocio .listaPestanasSocio {
        flex-wrap: wrap;
        margin: 0 0 20px;
        padding: 0;
        overflow: visible;
    }
}

.areaSocio .pestanaSocio {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    min-height: 42px;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: .92rem;
    font-weight: 600;
    white-space: nowrap;
    text-decoration: none;
    color: var(--socioTexto);
    background-color: #fff;
    border: 1px solid var(--socioBorde);
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.areaSocio .pestanaSocio i {
    font-size: .85rem;
    color: var(--socioPrincipal);
}

.areaSocio .pestanaSocio:hover,
.areaSocio .pestanaSocio:focus {
    color: var(--socioTexto);
    text-decoration: none;
    border-color: rgba(var(--socioPrincipalRgb), .45);
}

.areaSocio .pestanaSocio.activa,
.areaSocio .pestanaSocio.activa:hover {
    color: var(--socioPrincipalTexto);
    background-color: var(--socioPrincipal);
    border-color: var(--socioPrincipal);
}

.areaSocio .pestanaSocio.activa i {
    color: var(--socioPrincipalTexto);
}

.areaSocio.vistaDatosSocio #pestanya {
    max-width: 820px;
}

.areaSocio .tarjetaDatosSocio {
    height: auto;
}

.areaSocio .listaDatosSocio {
    margin: 0;
}

@media (min-width: 768px) {
    .areaSocio .listaDatosSocio {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 32px;
    }
}

.areaSocio .datoSocio {
    padding: 12px 0;
    border-bottom: 1px solid var(--socioBorde);
}

.areaSocio .datoSocio dt {
    margin-bottom: 2px;
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--socioTextoSuave);
}

.areaSocio .datoSocio dd {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--socioTexto);
    word-break: break-word;
}

.areaSocio .datoSocio .sinValor {
    font-weight: 400;
    color: #b8c1cc;
}

.areaSocio .textoDefinibleSocio {
    margin-top: 16px;
    font-size: .9rem;
    color: var(--socioTextoSuave);
}

.areaSocio .accionesTarjeta {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(0, 1fr);
    gap: 10px;
    padding: 14px 20px;
    background-color: var(--socioFondoSuave);
    border-top: 1px solid var(--socioBorde);
}

@media (min-width: 768px) {
    .areaSocio .accionesTarjeta {
        display: flex;
        justify-content: flex-start;
    }

    .areaSocio .accionesTarjeta .btnSocio {
        min-width: 160px;
    }
}

.areaSocio .accionBajaSocio {
    margin-top: 24px;
}

.areaSocio .btnSocio.btnSocioPeligroSuave {
    color: var(--socioPeligro);
    background-color: transparent;
    border: 1.5px solid rgba(var(--socioPeligroRgb), .35);
}

.areaSocio .btnSocio.btnSocioPeligroSuave:hover,
.areaSocio .btnSocio.btnSocioPeligroSuave:focus {
    color: var(--socioPeligro);
    background-color: rgba(var(--socioPeligroRgb), .07);
}

/* --- Edición --------------------------------------------------------------- */
.areaSocio .formularioSocio fieldset {
    margin: 0;
    padding: 0;
    border: 0;
}

/* Algunas hojas antiguas dan display a .error: vacío no debe verse */
.areaSocio .errorFormularioSocio:empty,
.areaSocio .errorFormularioSocio[style*="display: none"] {
    display: none !important;
}

.areaSocio .errorFormularioSocio {
    margin-bottom: 16px;
    border-radius: var(--socioRadioPeq);
}

.areaSocio .campoFormulario select.form-control {
    padding-right: 32px;
}

.areaSocio .grupoDireccionSocio {
    display: grid;
    grid-template-columns: minmax(90px, 35%) minmax(0, 1fr);
    gap: 8px;
}

.areaSocio .filaCamposSocio {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 12px;
}

@media (min-width: 768px) {
    .areaSocio .filaCamposSocio {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.areaSocio .filaCamposSocio:empty {
    display: none;
}

/* Las hojas antiguas (base/poliwin/estil.php y estilo.php) dan estilos por id a #pestanyes_superior,
   #pestanya y #dadesSoci; hace falta la misma especificidad para anularlos */
.areaSocio #pestanyes_superior {
    font-size: inherit;
    border-bottom: 0;
}

.areaSocio #pestanyes_superior .pestanaSocio {
    display: inline-flex;
    margin: 0;
    padding: 8px 16px;
    background: #fff;
}

.areaSocio #pestanyes_superior .pestanaSocio.activa {
    background: var(--socioPrincipal);
}

#main-content .areaSocio #dadesSoci {
    margin-top: 0;
}

.areaSocio .datoSocio:last-child {
    border-bottom: 0;
}

@media (min-width: 768px) {
    .areaSocio .listaDatosSocio .datoSocio:nth-last-child(2):nth-child(odd) {
        border-bottom: 0;
    }
}

#main-content .areaSocio #pestanya .campoFormulario input[type="text"],
#main-content .areaSocio #pestanya .campoFormulario select,
#main-content .areaSocio #pestanya .campoFormulario .form-control {
    width: 100%;
    height: 48px;
    padding: 10px 14px;
    font-size: 16px;
    border: 1px solid #cfd6df;
    border-radius: var(--socioRadioPeq);
}

#main-content .areaSocio #pestanya .campoFormulario .form-control:focus {
    border-color: var(--socioPrincipal);
    box-shadow: 0 0 0 3px rgba(var(--socioPrincipalRgb), .18);
}

#main-content .areaSocio #pestanya .campoFormulario .form-control.errorqtip,
#main-content .areaSocio #pestanya .campoFormulario .form-control.error {
    border-color: var(--socioPeligro);
}

/* ==========================================================================
   MIS RESERVAS
   ========================================================================== */

.areaSocio .cabeceraSeccionSocio {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 6px 16px;
    margin-bottom: 12px;
}

.areaSocio .cabeceraSeccionSocio .tituloSeccionSocio {
    margin: 0;
}

.areaSocio a.enlaceSeccionSocio {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    font-size: .88rem;
    font-weight: 600;
    color: var(--socioPrincipal);
}

.areaSocio .saldoSocio {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--socioRadio);
    background-color: rgba(var(--socioPrincipalRgb), .08);
}

.areaSocio .saldoSocio .iconoSaldo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    color: var(--socioPrincipal);
    background-color: rgba(var(--socioPrincipalRgb), .14);
}

.areaSocio .saldoSocio .etiquetaSaldo {
    flex: 1;
    font-weight: 600;
    color: var(--socioTextoSuave);
}

.areaSocio .saldoSocio .importeSaldo {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--socioTexto);
}

.areaSocio .estadoVacioSocio {
    padding: 32px 20px;
    text-align: center;
}

.areaSocio .estadoVacioSocio .iconoVacio {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin-bottom: 12px;
    border-radius: 16px;
    font-size: 24px;
    color: var(--socioPrincipal);
    background-color: rgba(var(--socioPrincipalRgb), .1);
}

.areaSocio .estadoVacioSocio p {
    margin-bottom: 16px;
    color: var(--socioTextoSuave);
}

.areaSocio .diaReservasSocio + .diaReservasSocio {
    margin-top: 22px;
}

.areaSocio .cabeceraDiaReservas {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 10px;
    margin: 0 0 10px;
    font-size: 1rem;
}

.areaSocio .cabeceraDiaReservas .nombreDia {
    font-weight: 700;
    color: var(--socioTexto);
}

.areaSocio .cabeceraDiaReservas .fechaDia {
    font-weight: 500;
    color: var(--socioTextoSuave);
}

.areaSocio .cabeceraDiaReservas .etiquetaDiaCercano {
    align-self: center;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--socioPrincipalTexto);
    background-color: var(--socioPrincipal);
}

.areaSocio .tarjetaReserva {
    display: flex;
    flex-direction: column;
}

.areaSocio .tarjetaReserva .cuerpoTarjeta {
    flex: 1;
    padding: 16px 18px;
}

.areaSocio .cabeceraReserva {
    display: flex;
    align-items: stretch;
    gap: 14px;
}

.areaSocio .horaReserva {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-shrink: 0;
    min-width: 64px;
    padding: 8px 10px;
    border-radius: var(--socioRadioPeq);
    text-align: center;
    line-height: 1.2;
    background-color: rgba(var(--socioPrincipalRgb), .1);
}

.areaSocio .horaReserva strong {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--socioPrincipal);
}

.areaSocio .horaReserva span {
    font-size: .8rem;
    color: var(--socioTextoSuave);
}

.areaSocio .infoReserva {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-width: 0;
}

.areaSocio .actividadReserva {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--socioTexto);
    word-break: break-word;
}

.areaSocio .zonaReserva {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .85rem;
    color: var(--socioTextoSuave);
}

.areaSocio .zonaReserva i {
    width: 12px;
    color: var(--socioPrincipal);
}

.areaSocio .observacionesReserva,
.areaSocio .estadoReserva {
    display: flex;
    gap: 8px;
    margin: 12px 0 0;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: .85rem;
    line-height: 1.35;
    color: var(--socioTexto);
    background-color: var(--socioFondoSuave);
}

.areaSocio .observacionesReserva i,
.areaSocio .estadoReserva i {
    margin-top: 2px;
    color: var(--socioTextoSuave);
}

.areaSocio .estadoReserva {
    font-weight: 600;
    background-color: rgba(var(--socioPrincipalRgb), .08);
}

.areaSocio .estadoReserva i {
    color: var(--socioPrincipal);
}

.areaSocio .estadoReserva.claseCanceladaReserva {
    color: var(--socioPeligro);
    background-color: rgba(var(--socioPeligroRgb), .08);
}

.areaSocio .estadoReserva.claseCanceladaReserva i {
    color: var(--socioPeligro);
}

.areaSocio .accionesReserva {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 12px 18px 16px;
    border-top: 1px solid var(--socioBorde);
}

.areaSocio .accionesReserva .btnSocio {
    flex: 1 1 130px;
    min-height: 42px;
    padding: 8px 12px;
    font-size: .9rem;
}

/* ==========================================================================
   RECIBOS
   ========================================================================== */

.areaSocio .textoRecibosSocio {
    margin-top: 16px;
}

.areaSocio .indicacionSeccionSocio {
    margin: -4px 0 12px;
    font-size: .9rem;
    color: var(--socioTextoSuave);
}

.areaSocio .resumenRecibosSocio {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    padding: 14px 18px;
    border-radius: var(--socioRadio);
    font-weight: 600;
    background-color: rgba(var(--socioPeligroRgb), .07);
}

.areaSocio .resumenRecibosSocio strong {
    font-size: 1.2rem;
    color: var(--socioPeligro);
}

.areaSocio .listaRecibosSocio {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
    gap: 14px;
    align-items: start;
}

.areaSocio .separadorMesRecibos {
    grid-column: 1 / -1;
    margin: 10px 0 -2px;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--socioTextoSuave);
}

.areaSocio .tarjetaRecibo {
    display: block;
    height: auto;
    margin: 0;
    font-weight: normal;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.areaSocio .tarjetaRecibo.seleccionable {
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.areaSocio .tarjetaRecibo.seleccionable:has(.casillaRecibo:checked) {
    border-color: var(--socioPrincipal);
    box-shadow: 0 0 0 2px rgba(var(--socioPrincipalRgb), .35), var(--socioSombra);
}

.areaSocio .cabeceraRecibo {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px 12px;
}

.areaSocio .casillaRecibo {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.areaSocio .marcaRecibo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    margin-top: 1px;
    border-radius: 8px;
    font-size: 13px;
    color: transparent;
    border: 1.5px solid #b8c1cc;
    background-color: #fff;
    transition: background-color .15s ease, border-color .15s ease;
}

.areaSocio .casillaRecibo:checked + .marcaRecibo {
    color: var(--socioPrincipalTexto);
    border-color: var(--socioPrincipal);
    background-color: var(--socioPrincipal);
}

.areaSocio .casillaRecibo:focus-visible + .marcaRecibo {
    box-shadow: 0 0 0 3px rgba(var(--socioPrincipalRgb), .25);
}

.areaSocio .identificacionRecibo {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.areaSocio .numeroRecibo {
    font-weight: 700;
    color: var(--socioTexto);
    word-break: break-word;
}

.areaSocio .fechasRecibo {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 12px;
    font-size: .8rem;
    color: var(--socioTextoSuave);
}

.areaSocio .estadoRecibo {
    flex-shrink: 0;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-transform: uppercase;
}

.areaSocio .estadoRecibo.pendiente {
    color: var(--socioPeligro);
    background-color: rgba(var(--socioPeligroRgb), .1);
}

.areaSocio .estadoRecibo.pagado {
    color: #237a4b;
    background-color: rgba(47, 158, 100, .12);
}

.areaSocio .lineasRecibo {
    margin: 0;
    padding: 0 18px;
    list-style: none;
}

.areaSocio .lineasRecibo li {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 0;
    font-size: .92rem;
    border-top: 1px dashed var(--socioBorde);
}

.areaSocio .conceptoRecibo {
    min-width: 0;
    color: var(--socioTexto);
    word-break: break-word;
}

.areaSocio .importeLinea {
    flex-shrink: 0;
    color: var(--socioTextoSuave);
    white-space: nowrap;
}

.areaSocio .pieRecibo {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    margin-top: 4px;
    padding: 12px 18px;
    background-color: var(--socioFondoSuave);
    border-top: 1px solid var(--socioBorde);
}

.areaSocio .enlacesRecibo {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
}

.areaSocio a.enlaceFacturaRecibo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    font-size: .85rem;
    font-weight: 600;
    color: var(--socioPrincipal);
}

.areaSocio .totalRecibo {
    display: flex;
    align-items: baseline;
    gap: 8px;
    margin-left: auto;
}

.areaSocio .totalRecibo span {
    font-size: .8rem;
    font-weight: 600;
    color: var(--socioTextoSuave);
}

.areaSocio .totalRecibo strong {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--socioTexto);
}

/* Barra de pago: fija abajo en móvil para que el botón esté siempre a mano */
.areaSocio .barraPagoRecibos {
    grid-column: 1 / -1;
    position: sticky;
    bottom: 12px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px 12px 18px;
    border-radius: var(--socioRadio);
    background-color: #fff;
    border: 1px solid var(--socioBorde);
    box-shadow: 0 8px 28px rgba(16, 24, 40, .16);
}

.areaSocio .totalPagoRecibos {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.areaSocio .totalPagoRecibos span {
    font-size: .78rem;
    font-weight: 600;
    color: var(--socioTextoSuave);
}

.areaSocio .totalPagoRecibos strong {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--socioTexto);
}

.areaSocio .barraPagoRecibos .btnSocio {
    flex-shrink: 0;
}

/* ==========================================================================
   DOCUMENTOS
   ========================================================================== */

.areaSocio.vistaDocumentosSocio .avisoFirmaDocumentos {
    margin: 0 0 8px;
    border-color: rgba(var(--socioPrincipalRgb), .3);
    background-color: rgba(var(--socioPrincipalRgb), .07);
}

.areaSocio.vistaDocumentosSocio .avisoFirmaDocumentos .iconoAviso {
    background-color: var(--socioPrincipal);
    color: var(--socioPrincipalTexto);
}

.areaSocio .listaDocumentosSocio {
    height: auto;
    padding: 4px;
}

.areaSocio a.filaDocumentoSocio {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 60px;
    padding: 10px 14px;
    border-radius: var(--socioRadioPeq);
    text-decoration: none;
    color: var(--socioTexto);
}

.areaSocio .filaDocumentoSocio + .filaDocumentoSocio {
    position: relative;
}

.areaSocio .filaDocumentoSocio + .filaDocumentoSocio:before {
    content: '';
    position: absolute;
    top: 0;
    left: 66px;
    right: 14px;
    border-top: 1px solid var(--socioBorde);
}

.areaSocio a.filaDocumentoSocio:hover,
.areaSocio a.filaDocumentoSocio:focus {
    color: var(--socioTexto);
    text-decoration: none;
    background-color: var(--socioFondoSuave);
}

.areaSocio .iconoDocumento {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    font-size: 18px;
    color: var(--socioPrincipal);
    background-color: rgba(var(--socioPrincipalRgb), .1);
}

.areaSocio .datosDocumento {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.areaSocio .nombreDocumento {
    font-weight: 600;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.areaSocio .fechaDocumento {
    font-size: .8rem;
    color: var(--socioTextoSuave);
}

.areaSocio .descargaDocumento {
    flex-shrink: 0;
    font-size: 15px;
    color: var(--socioPrincipal);
}

@media (min-width: 992px) {
    .areaSocio.vistaDocumentosSocio {
        max-width: 820px;
    }
}

/* ==========================================================================
   CAMBIAR FOTOGRAFÍA
   ========================================================================== */

.areaSocio .fotoActualSocio .cuerpoTarjeta,
.areaSocio .capturaFotoSocio .cuerpoTarjeta {
    padding: 24px 20px;
    text-align: center;
}

.areaSocio .marcoFotoSocio {
    display: inline-flex;
    width: 160px;
    height: 160px;
    margin-bottom: 16px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid #fff;
    box-shadow: 0 0 0 2px rgba(var(--socioPrincipalRgb), .35), var(--socioSombra);
    background-color: var(--socioFondoSuave);
}

.areaSocio .marcoFotoSocio img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.areaSocio .fotoActualSocio p {
    margin-bottom: 18px;
    color: var(--socioTextoSuave);
}

/* El JS del componente fija el ancho del vídeo en píxeles: aquí se limita al ancho disponible */
.areaSocio .visorFotoSocio {
    position: relative;
    margin: 0 auto 16px;
    max-width: 480px;
    border-radius: var(--socioRadio);
    overflow: hidden;
    background-color: #111827;
}

.areaSocio .visorFotoSocio video,
.areaSocio .visorFotoSocio canvas {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
}

.areaSocio .visorVacioFotoSocio {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 200px;
    aspect-ratio: 1;
    border-radius: 50%;
    font-size: 64px;
    color: rgba(var(--socioPrincipalRgb), .5);
    background-color: rgba(var(--socioPrincipalRgb), .1);
}

.areaSocio .accionesFotoSocio {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.areaSocio .accionesFotoSocio .btnSocio {
    flex: 1 1 180px;
    max-width: 320px;
}

.areaSocio .capturaFotoSocio #camera_error {
    margin: 0 0 16px;
    text-align: left;
}

.areaSocio .recorteFotoSocio {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    gap: 16px;
    margin-bottom: 14px;
}

/* Sin max-width: el JS de recorte calcula las coordenadas sobre el ancho fijo de la imagen */
.areaSocio .recorteFotoSocio {
    overflow-x: auto;
}

.areaSocio .recorteFotoSocio #thumbnail {
    flex-shrink: 0;
    border-radius: var(--socioRadioPeq);
}

.areaSocio .previsualizacionFotoSocio {
    position: relative;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: var(--socioRadioPeq);
    border: 1px solid var(--socioBorde);
    box-shadow: var(--socioSombra);
}

.areaSocio .girarFotoSocio {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 16px;
}

.areaSocio .girarFotoSocio .btnSocio {
    width: 52px;
    padding: 0;
}

/* Capa de "cargando" mientras se sube o se guarda la foto (el componente la muestra con $('#loading').show()) */
.areaSocio .cargandoSocio {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: none;
    padding-top: 40vh;
    text-align: center;
    font-weight: 600;
    color: var(--socioTexto);
    background-color: rgba(255, 255, 255, .85);
}

.areaSocio .cargandoSocio .ruedaCargando {
    display: block;
    width: 44px;
    height: 44px;
    margin: 0 auto 12px;
    border-radius: 50%;
    border: 4px solid rgba(var(--socioPrincipalRgb), .2);
    border-top-color: var(--socioPrincipal);
    animation: giroCargandoSocio .8s linear infinite;
}

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

/* Botón de reservar mientras se procesa la reserva (ProcesandoReservaSocio) */
.areaSocio .procesandoReservaSocio,
.modal .procesandoReservaSocio {
    gap: 10px;
    pointer-events: none;
    cursor: progress;
}

.areaSocio .desactivadoReservaSocio,
.modal .desactivadoReservaSocio {
    pointer-events: none;
    opacity: .5;
}

.ruedaBotonSocio {
    display: inline-block;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid currentColor;
    border-right-color: transparent;
    vertical-align: -3px;
    animation: giroCargandoSocio .7s linear infinite;
}

/* estilo.php da a #loading un recuadro de 250px que, por ser un selector de id, se impone a .cargandoSocio.
   Las vistas antiguas del socio, además, traen su propio #loading con un gif: se muestran todos como el nuevo.
   .loader es el de las vistas de adminpoliwin embebidas, que tiene su propio diseño */
#loading:not(.loader) {
    position: fixed;
    inset: 0;
    z-index: 2000;
    width: auto;
    margin: 0;
    padding: 40vh 16px 0;
    border: 0;
    border-radius: 0;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    color: var(--socioTexto);
    background-color: rgba(255, 255, 255, .85);
}

#loading:not(.cargandoSocio):not(.loader)::before {
    content: "";
    display: block;
    width: 44px;
    height: 44px;
    margin: 0 auto 12px;
    border-radius: 50%;
    border: 4px solid rgba(var(--socioPrincipalRgb), .2);
    border-top-color: var(--socioPrincipal);
    animation: giroCargandoSocio .8s linear infinite;
}

#loading:not(.loader) img {
    display: none;
}

/* --- Datos bancarios (editardadesbancaries) -------------------------------- */
.areaSocio .grupoTitularSocio {
    display: flex;
    gap: 8px;
}

.areaSocio .grupoTitularSocio .form-control {
    flex: 1 1 auto;
    min-width: 0;
}

.areaSocio .grupoTitularSocio .btnSocio {
    flex-shrink: 0;
}

.areaSocio .entidadBancariaSocio {
    display: block;
    margin-top: 6px;
    font-size: .85rem;
    color: var(--socioTextoSuave);
}

.areaSocio.vistaDatosBancariosSocio .filaCamposSocio {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.areaSocio .camposObligatoriosSocio {
    margin: 12px 0 0;
    font-size: .8rem;
    color: var(--socioTextoSuave);
}

/* --- Encuestas (encuestas/votar) ------------------------------------------ */
.areaSocio.vistaFormularioSocio.vistaEncuestaSocio {
    max-width: 760px;
}

.areaSocio .textoEncuestaSocio {
    margin-bottom: 16px;
    color: var(--socioTextoSuave);
}

.areaSocio .textoEncuestaSocio > :last-child {
    margin-bottom: 0;
}

.areaSocio .preguntaEncuestaSocio {
    height: auto;
    margin-bottom: 12px;
    padding: 18px 20px;
}

.areaSocio .cabeceraPreguntaEncuesta {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.areaSocio .numeroPreguntaEncuesta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: .85rem;
    font-weight: 800;
    color: var(--socioPrincipal);
    background-color: rgba(var(--socioPrincipalRgb), .1);
}

.areaSocio .enunciadoPreguntaEncuesta {
    min-width: 0;
    padding-top: 3px;
}

.areaSocio .enunciadoPreguntaEncuesta label {
    margin: 0;
    font-weight: 700;
    color: var(--socioTexto);
}

.areaSocio .ayudaPreguntaEncuesta {
    margin-top: 4px;
    font-size: .85rem;
    color: var(--socioTextoSuave);
}

.areaSocio .respuestaPreguntaEncuesta textarea.form-control {
    min-height: 96px;
}

.areaSocio .botonEnviarEncuesta {
    min-height: 52px;
    margin-top: 8px;
}

/* --- Chatbot a pantalla completa (poliwin/chatbot) ------------------------ */
.areaSocio.vistaChatbotSocio {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

.areaSocio .chatSocio {
    position: relative;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 300px);
    height: calc(100dvh - 300px);
    min-height: 420px;
    overflow: hidden;
}

.areaSocio .cabeceraChatSocio {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
    padding: 14px 16px;
    border-bottom: 1px solid var(--socioBorde);
}

.areaSocio .avatarChatSocio {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.05rem;
    color: var(--socioPrincipal);
    background-color: rgba(var(--socioPrincipalRgb), .1);
}

.areaSocio .datosChatSocio {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.25;
}

.areaSocio .datosChatSocio strong {
    color: var(--socioTexto);
}

.areaSocio .estadoChatSocio {
    font-size: .8rem;
    color: var(--socioTextoSuave);
}

.areaSocio .nuevaConversacionChat {
    flex-shrink: 0;
    min-height: 38px;
    padding: 6px 14px;
    font-size: .88rem;
}

.areaSocio .mensajesChatSocio {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 10px;
    padding: 16px;
    overflow-y: auto;
    background-color: var(--socioFondoSuave);
}

.areaSocio .chatSocio .chatbot-msg {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 16px;
    font-size: .92rem;
    line-height: 1.5;
    word-break: break-word;
}

.areaSocio .chatSocio .chatbot-msg.bot,
.areaSocio .chatSocio .chatbot-msg.typing {
    align-self: flex-start;
    border: 1px solid var(--socioBorde);
    border-bottom-left-radius: 4px;
    color: var(--socioTexto);
    background-color: #fff;
}

.areaSocio .chatSocio .chatbot-msg.typing {
    font-style: italic;
    color: var(--socioTextoSuave);
}

.areaSocio .chatSocio .chatbot-msg.user {
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    white-space: pre-wrap;
    color: var(--socioPrincipalTexto);
    background-color: var(--socioPrincipal);
}

/* Las respuestas son HTML libre (Markdown convertido): se anulan los estilos globales de la plantilla */
.areaSocio .chatSocio .chatbot-msg.bot p,
.areaSocio .chatSocio .chatbot-msg.bot li,
.areaSocio .chatSocio .chatbot-msg.bot td {
    font-size: inherit;
    line-height: inherit;
    color: inherit;
}

/* #main: estilo.php fija otra tipografía con "div#main p strong" */
#main .areaSocio .chatSocio .chatbot-msg strong,
#main .areaSocio .chatSocio .chatbot-msg b {
    font-family: inherit;
    font-size: inherit;
    font-weight: 700;
    color: inherit;
}

.areaSocio .chatSocio .chatbot-msg.bot ul {
    list-style: disc;
}

.areaSocio .chatSocio .chatbot-msg.bot ol {
    list-style: decimal;
}

.areaSocio .chatSocio .chatbot-msg.bot p {
    margin: 0 0 8px;
}

.areaSocio .chatSocio .chatbot-msg.bot p:last-child {
    margin-bottom: 0;
}

.areaSocio .chatSocio .chatbot-msg.bot ul,
.areaSocio .chatSocio .chatbot-msg.bot ol {
    margin: 4px 0 8px;
    padding-left: 20px;
}

.areaSocio .chatSocio .chatbot-msg.bot a {
    font-weight: 600;
    color: var(--socioEnlaces);
}

.areaSocio .chatSocio .chatbot-msg.bot code {
    padding: 1px 5px;
    border-radius: 4px;
    font-size: .85em;
    background-color: var(--socioFondoSuave);
}

.areaSocio .chatSocio .chatbot-msg.bot pre {
    margin: 6px 0;
    padding: 10px;
    border-radius: 8px;
    overflow-x: auto;
    background-color: var(--socioFondoSuave);
}

.areaSocio .chatSocio .chatbot-msg.bot pre code {
    padding: 0;
    background: none;
}

.areaSocio .chatSocio .chatbot-msg.bot table {
    display: block;
    width: 100%;
    margin: 6px 0;
    overflow-x: auto;
    border-collapse: collapse;
    font-size: .85rem;
}

.areaSocio .chatSocio .chatbot-msg.bot th,
.areaSocio .chatSocio .chatbot-msg.bot td {
    padding: 5px 8px;
    border: 1px solid var(--socioBorde);
}

.areaSocio .chatSocio .chatbot-msg.bot th {
    font-weight: 700;
    background-color: var(--socioFondoSuave);
}

/* Acciones que el asistente propone y el socio tiene que confirmar */
.areaSocio .chatSocio .chatbot-confirmacion {
    border-color: rgba(var(--socioPrincipalRgb), .4);
    background-color: rgba(var(--socioPrincipalRgb), .05);
}

.areaSocio .chatSocio .chatbot-confirmacion-texto {
    font-weight: 600;
}

.areaSocio .chatSocio .chatbot-confirmacion-botones {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.areaSocio .chatSocio .chatbot-confirmacion-botones .btn {
    min-height: 36px;
    padding: 6px 16px;
    border: 1px solid var(--socioPrincipal);
    border-radius: 999px;
    font-size: .88rem;
    font-weight: 700;
    color: var(--socioPrincipal);
    background-color: #fff;
}

.areaSocio .chatSocio .chatbot-confirmacion-botones .btn-success {
    color: var(--socioPrincipalTexto);
    background-color: var(--socioPrincipal);
}

.areaSocio .chatSocio .chatbot-confirmacion-botones .btn:disabled {
    opacity: .6;
}

.areaSocio .escribirChatSocio {
    flex-shrink: 0;
    padding: 12px 16px;
    border-top: 1px solid var(--socioBorde);
    background-color: #fff;
}

.areaSocio .filaEscribirChat {
    display: flex;
    align-items: flex-end;
    gap: 8px;
}

.areaSocio .filaEscribirChat textarea.form-control {
    flex: 1 1 auto;
    min-height: 48px;
    max-height: 140px;
    padding: 12px 14px;
    border: 1px solid var(--socioBorde);
    border-radius: 14px;
    resize: none;
    overflow-y: auto;
}

.areaSocio .filaEscribirChat textarea.form-control:focus {
    border-color: var(--socioPrincipal);
    box-shadow: 0 0 0 3px rgba(var(--socioPrincipalRgb), .15);
}

.areaSocio .filaEscribirChat textarea.chatbot-bloqueado {
    cursor: not-allowed;
    background-color: var(--socioFondoSuave);
}

.areaSocio .enviarChatSocio {
    flex-shrink: 0;
    width: 48px;
    min-height: 48px;
    padding: 0;
    border-radius: 50%;
}

.areaSocio .enviarChatSocio:disabled {
    opacity: .6;
    cursor: default;
}

.areaSocio .ayudaEscribirChat {
    margin-top: 6px;
    font-size: .75rem;
    color: var(--socioTextoSuave);
}

/* Capa mientras el asistente piensa (la crea chatbotBloquear) */
.areaSocio .chatSocio .chatbot-cargando {
    position: absolute;
    inset: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, .55);
}

.areaSocio .chatSocio .chatbot-cargando-circulo {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 4px solid rgba(var(--socioPrincipalRgb), .2);
    border-top-color: var(--socioPrincipal);
    animation: giroCargandoSocio .8s linear infinite;
}

@media (max-width: 575px) {
    .areaSocio .chatSocio {
        height: calc(100vh - 190px);
        height: calc(100dvh - 190px);
        min-height: 360px;
    }

    .areaSocio .nuevaConversacionChat {
        width: 38px;
        padding: 0;
    }

    .areaSocio .nuevaConversacionChat span {
        display: none;
    }

    .areaSocio .chatSocio .chatbot-msg {
        max-width: 88%;
    }
}

/* Original (450px) y previsualización lado a lado en escritorio */
.areaSocio.vistaFotoSocio {
    max-width: 820px;
}

/* ==========================================================================
   ACCESO A LA INSTALACIÓN
   ========================================================================== */

.areaSocio.vistaAccesoInstalacion {
    max-width: 460px;
}

.areaSocio .consejoAccesoSocio {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: -4px 0 16px;
    font-size: .85rem;
    color: var(--socioTextoSuave);
    text-align: center;
}

.areaSocio .consejoAccesoSocio i {
    color: var(--socioPrincipal);
}

.areaSocio .listaPasesSocio {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.areaSocio .paseAccesoSocio {
    height: auto;
}

.areaSocio .cabeceraPase {
    padding: 18px 20px;
    color: var(--socioPrincipalTexto);
    background-color: var(--socioPrincipal);
    background-image: linear-gradient(135deg, rgba(255, 255, 255, .14) 0%, rgba(255, 255, 255, 0) 60%);
}

.areaSocio .tituloPase {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.25;
    word-break: break-word;
}

.areaSocio .titularPase {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 2px 12px;
    margin-top: 6px;
    font-size: .85rem;
    opacity: .92;
}

.areaSocio .datosPase {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 14px 20px 0;
}

.areaSocio .datoPase {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: .82rem;
    color: var(--socioTexto);
    background-color: var(--socioFondoSuave);
}

.areaSocio .datoPase i {
    color: var(--socioPrincipal);
}

.areaSocio .botonMostrarPase {
    display: flex;
    width: calc(100% - 40px);
    margin: 14px 20px 0;
}

.areaSocio .qrPase {
    padding: 20px;
    text-align: center;
}

.areaSocio .qrPase img {
    display: block;
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
    padding: 12px;
    border-radius: var(--socioRadioPeq);
    background-color: #fff;
    border: 1px solid var(--socioBorde);
    image-rendering: pixelated;
}

/* ==========================================================================
   SUBIR DOCUMENTOS
   ========================================================================== */

.areaSocio .zonaSubidaSocio {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    min-height: 180px;
    padding: 24px 16px;
    border-radius: var(--socioRadio);
    border: 2px dashed rgba(var(--socioPrincipalRgb), .45);
    background-color: rgba(var(--socioPrincipalRgb), .05);
    text-align: center;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease;
}

.areaSocio .zonaSubidaSocio:hover,
.areaSocio .zonaSubidaSocio.dz-drag-hover {
    border-color: var(--socioPrincipal);
    background-color: rgba(var(--socioPrincipalRgb), .1);
}

.areaSocio .zonaSubidaSocio .dz-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.areaSocio .zonaSubidaSocio .iconoSubida {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 18px;
    font-size: 26px;
    color: var(--socioPrincipalTexto);
    background-color: var(--socioPrincipal);
}

.areaSocio .zonaSubidaSocio .textoSubida {
    max-width: 280px;
    font-weight: 600;
    color: var(--socioTexto);
}

/* Previsualizaciones que añade Dropzone durante la subida */
.areaSocio .zonaSubidaSocio.dz-started .dz-message {
    display: none;
}

.areaSocio .zonaSubidaSocio .dz-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 10px 12px;
    border-radius: var(--socioRadioPeq);
    background-color: #fff;
    border: 1px solid var(--socioBorde);
    text-align: left;
}

.areaSocio .zonaSubidaSocio .dz-preview .dz-image {
    display: none;
}

.areaSocio .zonaSubidaSocio .dz-preview .dz-details {
    flex: 1;
    min-width: 0;
    font-size: .85rem;
    overflow-wrap: anywhere;
}

.areaSocio .zonaSubidaSocio .dz-preview .dz-progress {
    flex: 0 0 90px;
    height: 6px;
    border-radius: 999px;
    overflow: hidden;
    background-color: rgba(var(--socioPrincipalRgb), .15);
}

.areaSocio .zonaSubidaSocio .dz-preview .dz-upload {
    display: block;
    height: 100%;
    background-color: var(--socioPrincipal);
}

.areaSocio .zonaSubidaSocio .dz-preview .dz-error-message {
    font-size: .8rem;
    color: var(--socioPeligro);
}

.areaSocio .requisitosSubida {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
}

/* base/dropzone/basic.css pinta un fondo azul y desplaza el mensaje (margin-left: 18%) */
.areaSocio #fileuploader.zonaSubidaSocio.dz-clickable {
    background-color: rgba(var(--socioPrincipalRgb), .05);
}

.areaSocio #fileuploader.zonaSubidaSocio.dz-clickable:hover,
.areaSocio #fileuploader.zonaSubidaSocio.dz-drag-hover {
    background-color: rgba(var(--socioPrincipalRgb), .1);
}

.areaSocio #fileuploader.zonaSubidaSocio.dz-clickable .dz-message,
.areaSocio #fileuploader.zonaSubidaSocio.dz-clickable .dz-message span,
.areaSocio #fileuploader.zonaSubidaSocio.dz-clickable * {
    margin-left: 0;
    cursor: pointer;
}

.areaSocio #fileuploader.zonaSubidaSocio .dz-message .textoSubida {
    font-size: 1rem;
}

.areaSocio .requisitoSubida {
    display: inline-block;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: .82rem;
    line-height: 1.4;
    text-align: center;
    color: var(--socioTexto);
    background-color: var(--socioFondoSuave);
}

.areaSocio .requisitoSubida i {
    margin-right: 6px;
    color: var(--socioPrincipal);
}

/* Fila de fichero en subida: anula la miniatura de 100x100 y la posición absoluta de basic.css */
.areaSocio #fileuploader .dz-preview {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 6px 12px;
    width: 100%;
    margin: 0;
    padding: 12px 14px;
    border-radius: var(--socioRadioPeq);
    border: 1px solid var(--socioBorde);
    background-color: #fff;
    text-align: left;
}

.areaSocio #fileuploader .dz-preview .dz-details {
    display: contents;
}

.areaSocio #fileuploader .dz-preview .dz-details .dz-filename {
    height: auto;
    font-size: .9rem;
    font-weight: 600;
    color: var(--socioTexto);
    overflow-wrap: anywhere;
}

.areaSocio #fileuploader .dz-preview .dz-details .dz-size {
    position: static;
    height: auto;
    line-height: 1.3;
    font-size: .8rem;
    color: var(--socioTextoSuave);
}

.areaSocio #fileuploader .dz-preview .dz-details img {
    display: none;
}

.areaSocio #fileuploader .dz-preview .dz-progress {
    position: static;
    grid-column: 1 / -1;
    height: 6px;
    border-radius: 999px;
    overflow: hidden;
    background-color: rgba(var(--socioPrincipalRgb), .15);
}

.areaSocio #fileuploader .dz-preview .dz-progress .dz-upload {
    position: static;
    height: 100%;
    background-color: var(--socioPrincipal);
}

.areaSocio #fileuploader .dz-preview .dz-success-mark,
.areaSocio #fileuploader .dz-preview .dz-error-mark {
    position: absolute;
    top: 8px;
    right: 10px;
    width: auto;
    height: auto;
    font-size: 16px;
}

.areaSocio #fileuploader .dz-preview .dz-error-message {
    grid-column: 1 / -1;
}

/* ==========================================================================
   CARNET
   ========================================================================== */

.areaSocio .estadoCarnetSocio {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: fit-content;
    margin: 0 auto 20px;
    padding: 6px 16px;
    border-radius: 999px;
    font-size: .9rem;
    color: var(--socioTexto);
    background-color: rgba(var(--socioPrincipalRgb), .08);
}

.areaSocio .estadoCarnetSocio .puntoEstado {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--socioPrincipal);
}

/* Aspecto de tarjeta física: esquinas redondeadas y sombra */
.areaSocio .carnetSocio {
    margin: 0 auto;
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--socioBorde);
    box-shadow: 0 2px 4px rgba(16, 24, 40, .06), 0 12px 32px rgba(16, 24, 40, .14);
    background-color: #fff;
}

.areaSocio .carnetSocio img {
    display: block;
    width: 100%;
    height: auto;
}

/* ==========================================================================
   NOTIFICACIONES
   ========================================================================== */

.areaSocio .avisoSocio.avisoExitoSocio {
    align-items: center;
    margin: 0 0 16px;
    border-color: rgba(47, 158, 100, .3);
    background-color: rgba(47, 158, 100, .08);
}

.areaSocio .avisoSocio.avisoExitoSocio .iconoAviso {
    background-color: #2f9e64;
}

.areaSocio .textoNotificacionesSocio {
    margin-top: 16px;
}

.areaSocio .listaNotificacionesSocio {
    height: auto;
    margin-bottom: 16px;
    padding: 4px 0;
}

.areaSocio .grupoNotificacionSocio {
    padding-top: 14px;
    padding-bottom: 4px;
    padding-right: 14px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--socioTextoSuave);
}

.areaSocio .filaNotificacionSocio {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 54px;
    margin: 0;
    padding-top: 8px;
    padding-bottom: 8px;
    padding-right: 14px;
    font-weight: 600;
    color: var(--socioTexto);
    cursor: pointer;
}

.areaSocio .filaNotificacionSocio + .filaNotificacionSocio {
    border-top: 1px solid var(--socioBorde);
}

.areaSocio .filaNotificacionSocio .textoFila {
    flex: 1;
    min-width: 0;
}

/* Interruptor tipo "switch" sobre un checkbox normal (el formulario envía lo mismo que antes) */
.areaSocio .interruptorSocio {
    -webkit-appearance: none;
    appearance: none;
    position: relative;
    flex-shrink: 0;
    width: 46px;
    height: 28px;
    margin: 0;
    border-radius: 999px;
    background-color: #cfd6df;
    cursor: pointer;
    transition: background-color .2s ease;
}

.areaSocio .interruptorSocio:after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
    transition: transform .2s ease;
}

.areaSocio .interruptorSocio:checked {
    background-color: var(--socioPrincipal);
}

.areaSocio .interruptorSocio:checked:after {
    transform: translateX(18px);
}

.areaSocio .interruptorSocio:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--socioPrincipalRgb), .3);
}

/* --- Lista de opciones (radio) ---------------------------------------- */
.areaSocio .listaOpcionesSocio {
    height: auto;
    margin-bottom: 16px;
    padding: 4px 0;
}

.areaSocio .filaOpcionSocio {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 54px;
    margin: 0;
    padding: 8px 16px;
    font-weight: 600;
    color: var(--socioTexto);
    cursor: pointer;
}

.areaSocio .filaOpcionSocio + .filaOpcionSocio {
    border-top: 1px solid var(--socioBorde);
}

.areaSocio .filaOpcionSocio input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.areaSocio .filaOpcionSocio .marcaOpcion {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    border: 2px solid #b8c1cc;
    background-color: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}

.areaSocio .filaOpcionSocio input:checked + .marcaOpcion {
    border-color: var(--socioPrincipal);
    box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 12px var(--socioPrincipal);
}

.areaSocio .filaOpcionSocio input:focus-visible + .marcaOpcion {
    outline: 3px solid rgba(var(--socioPrincipalRgb), .3);
}

.areaSocio .filaOpcionSocio:has(input:checked) {
    background-color: rgba(var(--socioPrincipalRgb), .05);
}

/* ==========================================================================
   MONEDERO
   ========================================================================== */

.areaSocio .saldoMonederoSocio {
    height: auto;
    padding: 20px;
}

.areaSocio .cabeceraSaldoMonedero {
    display: flex;
    align-items: center;
    gap: 14px;
}

.areaSocio .cabeceraSaldoMonedero .iconoSaldo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    font-size: 22px;
    color: var(--socioPrincipalTexto);
    background-color: var(--socioPrincipal);
}

.areaSocio .cabeceraSaldoMonedero .etiquetaSaldo {
    display: block;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--socioTextoSuave);
}

.areaSocio .cabeceraSaldoMonedero .importeSaldo {
    display: block;
    font-size: 1.9rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--socioTexto);
}

.areaSocio .cargaMonederoSocio {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--socioBorde);
}

.areaSocio .cargaMonederoSocio .campoFormulario {
    margin-bottom: 0;
}

.areaSocio .filaCargaMonedero {
    display: flex;
    gap: 10px;
}

.areaSocio .filaCargaMonedero .form-control {
    flex: 1;
    min-width: 0;
}

.areaSocio .filaCargaMonedero .btnSocio {
    flex-shrink: 0;
    min-height: 48px;
}

.areaSocio .errorCargaMonedero:not(:empty) {
    margin-top: 8px;
    font-size: .85rem;
    color: var(--socioPeligro);
}

.areaSocio .listaMovimientosSocio {
    height: auto;
    padding: 4px 0;
}

.areaSocio .filaMovimientoSocio {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
}

.areaSocio .filaMovimientoSocio + .filaMovimientoSocio {
    border-top: 1px solid var(--socioBorde);
}

.areaSocio .iconoMovimiento {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 14px;
    color: var(--socioTextoSuave);
    background-color: var(--socioFondoSuave);
}

.areaSocio .filaMovimientoSocio.ingreso .iconoMovimiento {
    color: #237a4b;
    background-color: rgba(47, 158, 100, .12);
}

.areaSocio .filaMovimientoSocio.cargo .iconoMovimiento {
    color: var(--socioPeligro);
    background-color: rgba(var(--socioPeligroRgb), .1);
}

.areaSocio .datosMovimiento {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.areaSocio .conceptoMovimiento {
    font-weight: 600;
    color: var(--socioTexto);
    overflow-wrap: anywhere;
}

.areaSocio .detalleMovimiento,
.areaSocio .saldoMovimiento {
    font-size: .78rem;
    color: var(--socioTextoSuave);
}

.areaSocio .importesMovimiento {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    flex-shrink: 0;
    gap: 2px;
    text-align: right;
}

.areaSocio .importeMovimiento {
    font-size: 1rem;
    font-weight: 800;
    white-space: nowrap;
    color: var(--socioTexto);
}

.areaSocio .filaMovimientoSocio.ingreso .importeMovimiento {
    color: #237a4b;
}

.areaSocio .filaMovimientoSocio.cargo .importeMovimiento {
    color: var(--socioPeligro);
}

.areaSocio .pieListadoSocio {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    margin-top: 10px;
    font-size: .85rem;
    color: var(--socioTextoSuave);
}

/* ==========================================================================
   BAJA DEL SOCIO
   ========================================================================== */

.areaSocio .datosBajaSocio {
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
}

.areaSocio .datosBajaSocio li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    font-size: .95rem;
    line-height: 1.4;
    color: var(--socioTexto);
}

.areaSocio .datosBajaSocio li + li {
    border-top: 1px solid var(--socioBorde);
}

.areaSocio .datosBajaSocio .iconoFila {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    font-size: 15px;
    color: var(--socioPrincipal);
    background-color: rgba(var(--socioPrincipalRgb), .1);
}

.areaSocio.vistaBajaSocio .avisoSocio {
    margin: 0 0 18px;
}

.areaSocio .preguntaBajaSocio {
    margin: 4px 0 14px;
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    color: var(--socioTexto);
}

.areaSocio .accionesBajaSocio {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.areaSocio .resultadoBajaSocio .cuerpoTarjeta,
.areaSocio .resultadoTarjetaPagoSocio .cuerpoTarjeta {
    padding: 28px 22px;
    text-align: center;
}

.areaSocio .iconoResultado {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin-bottom: 14px;
    border-radius: 50%;
    font-size: 24px;
    color: var(--socioPrincipal);
    background-color: rgba(var(--socioPrincipalRgb), .12);
}

.areaSocio .iconoResultado.exito {
    color: #fff;
    background-color: #2f9e64;
}

.areaSocio .mensajeResultado {
    margin-bottom: 20px;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--socioTexto);
}

/* AnularBaixaOCanvi() inserta un enlace con estilo antiguo: se iguala al botón del área de socio */
.areaSocio.vistaBajaSocio #content_areapersonal > a.btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: auto !important;
    min-height: 48px;
    margin: 16px 0 0;
    border: 0;
    border-radius: max(var(--socioRadioBoton), 10px);
    font-weight: 600;
    color: var(--socioPrincipalTexto);
    background-color: var(--socioPrincipal);
}

/* El margen interior va en el contenedor: así se mantiene cuando Jaxon reemplaza su contenido */
.areaSocio.vistaBajaSocio #content_areapersonal {
    padding: 18px 20px;
}

.areaSocio.vistaBajaSocio #content_areapersonal > .cuerpoTarjeta {
    padding: 0;
}

/* Bootstrap fija la altura de "select.form-control-sm:not([size]):not([multiple])" con más especificidad */
.areaSocio .campoFormulario select.form-control:not([size]):not([multiple]) {
    height: 48px;
}

/* ==========================================================================
   CAMBIO DE CUOTA
   ========================================================================== */

.areaSocio.vistaCambioCuotaSocio .resumenCambioCuota {
    max-width: 600px;
}

.areaSocio .cuerpoResumenCambio {
    height: auto;
    padding: 6px 20px 18px;
}

.areaSocio .cuerpoResumenCambio .avisoSocio {
    margin: 4px 0 0;
}

.areaSocio .listaCuotasSocio {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
}

.areaSocio .tarjetaCuotaOpcion {
    display: flex;
    flex-direction: column;
}

.areaSocio .tarjetaCuotaOpcion .cuerpoTarjeta {
    flex: 1;
}

.areaSocio .nombreCuotaOpcion {
    margin: 0 0 8px;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--socioTexto);
    word-break: break-word;
}

.areaSocio .etiquetasCuotaOpcion {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}

.areaSocio .precioCuotaOpcion {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.areaSocio .precioCuotaOpcion strong {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--socioPrincipal);
}

.areaSocio .precioCuotaOpcion span {
    font-size: .78rem;
    color: var(--socioTextoSuave);
}

.areaSocio .detallesCuotaOpcion {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.areaSocio .detallesCuotaOpcion li {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 6px 0;
    font-size: .88rem;
    border-top: 1px dashed var(--socioBorde);
}

.areaSocio .detallesCuotaOpcion li span {
    color: var(--socioTextoSuave);
}

.areaSocio .descripcionCuotaOpcion {
    margin-top: 10px;
    font-size: .88rem;
}

.areaSocio .descripcionCuotaOpcion summary {
    font-weight: 600;
    color: var(--socioPrincipal);
    cursor: pointer;
}

.areaSocio .descripcionCuotaOpcion > div {
    margin-top: 8px;
    color: var(--socioTexto);
}

.areaSocio .tarjetaCuotaOpcion .accionesTarjeta {
    display: flex;
}

.areaSocio .tarjetaCuotaOpcion .accionesTarjeta .btnSocio {
    flex: 1;
}

.areaSocio .estadoCambioCuota {
    max-width: 600px;
    height: auto;
}

/* ==========================================================================
   CUESTIONARIO
   ========================================================================== */

.areaSocio .contenedorCuestionarioSocio {
    height: auto;
    padding: 20px;
}

.areaSocio .contenedorCuestionarioSocio .estadoVacioSocio {
    padding: 12px 0;
    text-align: center;
}

.areaSocio .contenedorCuestionarioSocio .avisoExitoSocio {
    margin-bottom: 16px;
}

.areaSocio .listaPreguntasSocio {
    margin: 0 0 16px;
    padding: 0;
    list-style: none;
    counter-reset: preguntaSocio;
}

.areaSocio .preguntaSocio {
    position: relative;
    padding: 14px 0 14px 40px;
    counter-increment: preguntaSocio;
}

.areaSocio .preguntaSocio + .preguntaSocio {
    border-top: 1px solid var(--socioBorde);
}

.areaSocio .preguntaSocio:before {
    content: counter(preguntaSocio);
    position: absolute;
    top: 14px;
    left: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    font-size: .8rem;
    font-weight: 700;
    color: var(--socioPrincipal);
    background-color: rgba(var(--socioPrincipalRgb), .12);
}

.areaSocio .preguntaSocio.respondida:before {
    content: '\2713';
    color: #237a4b;
    background-color: rgba(47, 158, 100, .12);
}

.areaSocio .preguntaSocio .campoFormulario {
    margin-bottom: 0;
}

.areaSocio .preguntaSocio .campoFormulario > label {
    line-height: 1.35;
}

.areaSocio .preguntaSocio .observacionesPreguntaSocio {
    margin-top: 10px;
}

.areaSocio .preguntaSocio textarea.form-control {
    height: auto;
    min-height: 90px;
}

/* Las respuestas ya enviadas son de solo lectura */
#main-content .areaSocio .preguntaSocio.respondida .form-control {
    color: var(--socioTextoSuave);
    background-color: var(--socioFondoSuave);
}

/* ==========================================================================
   MIS FACTURAS
   ========================================================================== */

.areaSocio.vistaFacturasSocio {
    max-width: 820px;
}

.areaSocio .avisoPagoPendienteSocio {
    margin: 0 0 16px;
    align-items: center;
}

.areaSocio .accionesFacturasSocio {
    height: auto;
}

.areaSocio .listaFacturasSocio {
    height: auto;
    padding: 4px 0;
}

.areaSocio .filaFacturaSocio {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
}

.areaSocio .filaFacturaSocio + .filaFacturaSocio {
    border-top: 1px solid var(--socioBorde);
}

.areaSocio .datosFactura {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.areaSocio .numeroFactura {
    font-weight: 700;
    color: var(--socioTexto);
    overflow-wrap: anywhere;
}

.areaSocio .descargasFactura {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 14px;
    margin-top: 4px;
}

.areaSocio .totalFactura {
    flex-shrink: 0;
    font-size: 1.05rem;
    font-weight: 800;
    white-space: nowrap;
    color: var(--socioTexto);
}

/* ==========================================================================
   CREAR FACTURA
   ========================================================================== */

.areaSocio.vistaCrearFacturaSocio {
    max-width: 820px;
}

.areaSocio .accionesSeleccionSocio {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
}

.areaSocio .listaRecibosFacturarSocio {
    height: auto;
    margin-bottom: 16px;
    padding: 4px 0;
}

.areaSocio .filaReciboFacturarSocio {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin: 0;
    padding: 14px 16px;
    font-weight: normal;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    transition: background-color .15s ease;
}

.areaSocio .filaReciboFacturarSocio + .filaReciboFacturarSocio {
    border-top: 1px solid var(--socioBorde);
}

.areaSocio .filaReciboFacturarSocio input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.areaSocio .filaReciboFacturarSocio .marcaSeleccionSocio {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    margin-top: 1px;
    border: 2px solid #b8c1cc;
    border-radius: 7px;
    font-size: .75rem;
    color: transparent;
    background-color: #fff;
    transition: background-color .15s ease, border-color .15s ease;
}

.areaSocio .filaReciboFacturarSocio input:checked + .marcaSeleccionSocio {
    border-color: var(--socioPrincipal);
    color: var(--socioPrincipalTexto);
    background-color: var(--socioPrincipal);
}

.areaSocio .filaReciboFacturarSocio input:focus-visible + .marcaSeleccionSocio {
    box-shadow: 0 0 0 3px rgba(var(--socioPrincipalRgb), .25);
}

.areaSocio .filaReciboFacturarSocio:has(input:checked) {
    background-color: rgba(var(--socioPrincipalRgb), .05);
}

.areaSocio .datosReciboFacturar {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
}

.areaSocio .conceptoReciboFacturar {
    font-weight: 700;
    color: var(--socioTexto);
    overflow-wrap: anywhere;
}

.areaSocio .etiquetaPendienteSocio {
    margin-top: 4px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    color: #8a5a00;
    background-color: #fff3d6;
}

.areaSocio .totalReciboFacturar {
    flex-shrink: 0;
    font-size: 1.05rem;
    font-weight: 800;
    white-space: nowrap;
    color: var(--socioTexto);
}

.areaSocio .totalReciboFacturar.negativo {
    color: #c0392b;
}

/* El control de documento identificativo pinta su tipo, la etiqueta "Número" y el texto en filas de Bootstrap propias */
.areaSocio .campoFormulario > .row.form-group {
    margin: 0 0 10px;
}

.areaSocio .campoFormulario > .row.form-group:last-child {
    margin-bottom: 0;
}

.areaSocio .campoFormulario > .row.form-group > [class*="col-"] {
    padding: 0;
}

.areaSocio .campoFormulario > .row.form-group label {
    margin: 4px 0 0;
    font-size: .85rem;
    font-weight: 600;
    color: var(--socioTexto);
}

/* ==========================================================================
   PERFIL PÚBLICO
   ========================================================================== */

.areaSocio.vistaPerfilPublicoSocio {
    max-width: 560px;
}

.areaSocio .avisoSocio.avisoErrorSocio {
    align-items: center;
    margin: 0 0 16px;
}

.areaSocio .avisoSocio.avisoErrorSocio + .btnSocio,
.areaSocio .avisoSocio.avisoExitoSocio + .btnSocio {
    margin-top: 4px;
}

.areaSocio .vistaPreviaPerfilSocio {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    height: auto;
    margin-bottom: 16px;
    padding: 24px 20px 20px;
    text-align: center;
}

.areaSocio .fotoPerfilPublico {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 112px;
    height: 112px;
    margin-bottom: 10px;
    overflow: hidden;
    border-radius: 50%;
    font-size: 44px;
    color: var(--socioPrincipal);
    background-color: rgba(var(--socioPrincipalRgb), .1);
    box-shadow: 0 0 0 4px #fff, 0 0 0 6px rgba(var(--socioPrincipalRgb), .25);
}

.areaSocio .fotoPerfilPublico img {
    position: absolute;
    inset: 0;
    display: none;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.areaSocio .fotoPerfilPublico.conFoto img {
    display: block;
}

.areaSocio .fotoPerfilPublico.conFoto i {
    display: none;
}

.areaSocio .nombrePerfilPublico {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--socioTexto);
    overflow-wrap: anywhere;
}

.areaSocio .nombrePerfilPublico.oculto {
    font-style: italic;
    font-weight: 600;
    color: var(--socioTextoSuave);
}

.areaSocio .accionesFotoPerfil {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 14px;
}

.areaSocio .accionesFotoPerfil label.btnSocio {
    margin: 0;
    cursor: pointer;
}

.areaSocio .archivoPerfilPublico {
    font-size: .85rem;
    color: var(--socioTextoSuave);
    overflow-wrap: anywhere;
}

.areaSocio .archivoPerfilPublico:empty {
    display: none;
}

/* Fuera de la vista pero no oculto: jQuery Validate ignora los campos :hidden y se perdería la validación de la extensión */
.areaSocio .entradaArchivoOculta {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
}

.areaSocio .accionesFotoPerfil:has(+ .archivoPerfilPublico) label.btnSocio:focus-within {
    box-shadow: 0 0 0 3px rgba(var(--socioPrincipalRgb), .25);
}

/* ==========================================================================
   HISTÓRICO DE PAGOS (PLACETOPAY)
   ========================================================================== */

.areaSocio.vistaPagosSocio {
    max-width: 820px;
}

.areaSocio.vistaPagosSocio .notaFormulario {
    margin-bottom: 16px;
}

.areaSocio .listaPagosSocio {
    height: auto;
    padding: 4px 0;
}

.areaSocio .filaPagoSocio {
    --colorEstadoPago: var(--socioTextoSuave);
    --fondoEstadoPago: rgba(0, 0, 0, .05);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
}

.areaSocio .filaPagoSocio + .filaPagoSocio {
    border-top: 1px solid var(--socioBorde);
}

.areaSocio .filaPagoSocio.estadoF {
    --colorEstadoPago: #2f9e64;
    --fondoEstadoPago: rgba(47, 158, 100, .12);
}

.areaSocio .filaPagoSocio.estadoN {
    --colorEstadoPago: #b7791f;
    --fondoEstadoPago: rgba(214, 158, 46, .15);
}

.areaSocio .filaPagoSocio.estadoA {
    --colorEstadoPago: var(--socioPeligro);
    --fondoEstadoPago: rgba(var(--socioPeligroRgb), .1);
}

.areaSocio .iconoEstadoPago {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: var(--colorEstadoPago);
    background-color: var(--fondoEstadoPago);
}

.areaSocio .datosPago {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.areaSocio .descripcionPago {
    font-weight: 700;
    color: var(--socioTexto);
    overflow-wrap: anywhere;
}

.areaSocio .importePago {
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    align-items: flex-end;
    gap: 6px;
}

.areaSocio .importePago strong {
    font-size: 1.05rem;
    font-weight: 800;
    white-space: nowrap;
    color: var(--socioTexto);
}

.areaSocio .etiquetaEstadoPago {
    padding: 2px 10px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    white-space: nowrap;
    color: var(--colorEstadoPago);
    background-color: var(--fondoEstadoPago);
}

/* ==========================================================================
   PUNTOS POR ACCIONES
   ========================================================================== */

.areaSocio.vistaPuntosSocio {
    max-width: 820px;
}

.areaSocio.vistaPuntosSocio .estadoVacioSocio .ruedaCargando {
    display: block;
    width: 36px;
    height: 36px;
    margin: 0 auto;
    border-radius: 50%;
    border: 4px solid rgba(var(--socioPrincipalRgb), .2);
    border-top-color: var(--socioPrincipal);
    animation: giroCargandoSocio .8s linear infinite;
}

.areaSocio .saldoPuntosSocio {
    display: flex;
    align-items: center;
    gap: 16px;
    height: auto;
    margin-bottom: 16px;
    padding: 20px;
}

.areaSocio .iconoSaldoPuntos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 56px;
    height: 56px;
    border-radius: 16px;
    font-size: 24px;
    color: var(--socioPrincipalTexto);
    background-color: var(--socioPrincipal);
}

.areaSocio .etiquetaSaldoPuntos {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--socioTextoSuave);
}

.areaSocio .valorSaldoPuntos {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--socioTexto);
}

.areaSocio .navegadorMesSocio {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.areaSocio .botonMesSocio {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid var(--socioBorde);
    color: var(--socioPrincipal);
    background-color: #fff;
    box-shadow: var(--socioSombra);
}

.areaSocio a.botonMesSocio:hover,
.areaSocio a.botonMesSocio:focus {
    text-decoration: none;
    background-color: rgba(var(--socioPrincipalRgb), .08);
}

.areaSocio .botonMesSocio.deshabilitado {
    opacity: .35;
    box-shadow: none;
}

.areaSocio .mesSocio {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
    text-align: center;
}

.areaSocio .mesSocio strong {
    font-size: 1.05rem;
    font-weight: 800;
    text-transform: capitalize;
    color: var(--socioTexto);
}

.areaSocio .mesSocio span {
    font-size: .8rem;
    color: var(--socioTextoSuave);
}

.areaSocio .listaMovimientosPuntos {
    height: auto;
    padding: 4px 0;
}

.areaSocio .filaMovimientoPuntos {
    --colorMovimientoPuntos: #2f9e64;
    --fondoMovimientoPuntos: rgba(47, 158, 100, .12);
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
}

.areaSocio .filaMovimientoPuntos.resta {
    --colorMovimientoPuntos: var(--socioPeligro);
    --fondoMovimientoPuntos: rgba(var(--socioPeligroRgb), .1);
}

.areaSocio .filaMovimientoPuntos + .filaMovimientoPuntos {
    border-top: 1px solid var(--socioBorde);
}

.areaSocio .iconoMovimientoPuntos {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: var(--colorMovimientoPuntos);
    background-color: var(--fondoMovimientoPuntos);
}

.areaSocio .datosMovimientoPuntos {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.areaSocio .razonMovimientoPuntos {
    font-weight: 700;
    color: var(--socioTexto);
    overflow-wrap: anywhere;
}

.areaSocio .puntosMovimiento {
    flex-shrink: 0;
    font-size: 1.1rem;
    font-weight: 800;
    white-space: nowrap;
    color: var(--colorMovimientoPuntos);
}

/* ==========================================================================
   MIS INSCRIPCIONES A CAMPUS
   ========================================================================== */

.areaSocio .accionesInscripcionesCampus {
    height: auto;
    margin-bottom: 16px;
}

.areaSocio.vistaInscripcionesCampusSocio .notaFormulario {
    margin-bottom: 16px;
}

.areaSocio .tarjetaInscripcionCampus {
    display: flex;
    flex-direction: column;
    height: auto;
    margin: 0;
}

.areaSocio .cabeceraInscripcionCampus {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 16px 12px;
}

.areaSocio .tituloInscripcionCampus {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.areaSocio .tipoInscripcionCampus {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--socioTextoSuave);
}

.areaSocio .tituloInscripcionCampus strong {
    font-weight: 800;
    line-height: 1.3;
    color: var(--socioTexto);
    overflow-wrap: anywhere;
}

.areaSocio .etiquetaInscripcionCampus {
    flex-shrink: 0;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    color: var(--socioPrincipal);
    background-color: rgba(var(--socioPrincipalRgb), .1);
}

.areaSocio .etiquetaInscripcionCampus.preinscripcion {
    color: #b7791f;
    background-color: rgba(214, 158, 46, .15);
}

.areaSocio .fechasInscripcionCampus {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 18px;
    padding: 0 16px 14px 64px;
    font-size: .85rem;
    color: var(--socioTextoSuave);
}

.areaSocio .fechasInscripcionCampus i {
    margin-right: 6px;
}

.areaSocio .fechasInscripcionCampus strong {
    color: var(--socioTexto);
}

.areaSocio .pieInscripcionCampus {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: auto;
    padding: 12px 16px;
    border-top: 1px solid var(--socioBorde);
    background-color: rgba(var(--socioPrincipalRgb), .03);
}

.areaSocio .importesInscripcionCampus {
    display: flex;
    flex-wrap: wrap;
    gap: 2px 14px;
    font-size: .85rem;
    color: var(--socioTextoSuave);
}

.areaSocio .importesInscripcionCampus strong {
    color: var(--socioTexto);
}

.areaSocio .importesInscripcionCampus .importeInscripcionCampus {
    font-size: 1.05rem;
    font-weight: 800;
}

.areaSocio .estadoPagoInscripcion {
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    white-space: nowrap;
    color: var(--socioTextoSuave);
    background-color: rgba(0, 0, 0, .05);
}

.areaSocio .estadoPagoInscripcion.estadoS {
    color: #2f9e64;
    background-color: rgba(47, 158, 100, .12);
}

.areaSocio .estadoPagoInscripcion.estadoN {
    color: var(--socioPeligro);
    background-color: rgba(var(--socioPeligroRgb), .1);
}

.areaSocio .estadoPagoInscripcion.estadoP {
    color: #b7791f;
    background-color: rgba(214, 158, 46, .15);
}

.areaSocio.vistaFormularioSocio.vistaInscripcionesCampusSocio {
    max-width: 1100px;
}

/* ==========================================================================
   TARJETA VIRTUAL (reutiliza el pase de "Acceso a la instalación")
   ========================================================================== */

.areaSocio .accionesPase {
    padding: 0 20px 20px;
}

.areaSocio .paseAccesoSocio .datosPase:last-child {
    padding-bottom: 20px;
}

.areaSocio .accionesPase .notaFormulario {
    margin: 0;
}

.areaSocio .datosPase + .accionesPase {
    padding-top: 14px;
}

/* ==========================================================================
   VÍDEOS STREAMING
   ========================================================================== */

.areaSocio.vistaFormularioSocio.vistaListaVideosSocio {
    max-width: 1100px;
}

.areaSocio.vistaFormularioSocio.vistaDetalleVideoSocio {
    max-width: 900px;
}

.areaSocio .contadorVideosSocio {
    flex-shrink: 0;
    min-width: 26px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    text-align: center;
    color: var(--socioPrincipal);
    background-color: rgba(var(--socioPrincipalRgb), .1);
}

.areaSocio .tarjetaVideoSocio {
    display: flex;
    flex-direction: column;
    height: auto;
    margin: 0;
    overflow: hidden;
}

.areaSocio .marcoVideoSocio {
    position: relative;
    aspect-ratio: 16 / 9;
    background-color: #111;
}

.areaSocio .marcoVideoSocio iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.areaSocio .cuerpoVideoSocio {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px 16px;
}

.areaSocio .tituloVideoSocio {
    font-weight: 800;
    line-height: 1.3;
    color: var(--socioTexto);
    overflow-wrap: anywhere;
}

.areaSocio .disponibleVideoSocio {
    align-self: flex-start;
    padding: 4px 10px;
    border-radius: 10px;
    font-size: .8rem;
    color: var(--socioTexto);
    background-color: var(--socioFondoSuave);
}

.areaSocio .disponibleVideoSocio i {
    margin-right: 4px;
    color: var(--socioPrincipal);
}

.areaSocio .cuerpoVideoSocio .btnSocio {
    margin-top: auto;
}

.areaSocio .cuerpoVideoSocio .disponibleVideoSocio + .btnSocio {
    margin-top: 8px;
}

/* ==========================================================================
   GESTIONAR FAMILIA
   ========================================================================== */

.areaSocio .accionesFamiliaSocio {
    height: auto;
}

.areaSocio .listaFamiliaSocio {
    height: auto;
    padding: 4px 0;
}

.areaSocio .filaFamiliarSocio {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
}

.areaSocio .filaFamiliarSocio + .filaFamiliarSocio {
    border-top: 1px solid var(--socioBorde);
}

.areaSocio .avatarFamiliarSocio {
    width: 48px;
    height: 48px;
    overflow: hidden;
    font-size: 1rem;
    color: var(--socioPrincipal);
    background-color: rgba(var(--socioPrincipalRgb), .12);
}

.areaSocio .avatarFamiliarSocio img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.areaSocio .datosFamiliarSocio {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.areaSocio .datosFamiliarSocio strong {
    font-weight: 700;
    color: var(--socioTexto);
    overflow-wrap: anywhere;
}

.areaSocio .etiquetaFamiliarSocio {
    flex-shrink: 0;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    color: var(--socioPrincipal);
    background-color: rgba(var(--socioPrincipalRgb), .1);
}

/* Selector de familiar de la cabecera (AuxiliarGestionFamilias::DameSelectorFamiliares) */
#header .navbar.navbarAreaSocio #selectorFamiliar {
    max-width: 170px;
    height: 40px;
    padding: 0 32px 0 14px;
    border: 0;
    border-radius: 999px;
    font-size: .9rem;
    font-weight: 600;
    text-overflow: ellipsis;
    color: var(--socioMenuEnlace);
    background-color: rgba(var(--socioMenuEnlaceRgb), .14);
    background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
    background-position: right 17px center, right 12px center;
    background-size: 5px 5px;
    background-repeat: no-repeat;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

#header .navbar.navbarAreaSocio #selectorFamiliar:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(var(--socioMenuEnlaceRgb), .35);
}

#header .navbar.navbarAreaSocio #selectorFamiliar option {
    color: #1f2933;
    background-color: #fff;
}

@media (max-width: 991.98px) {
    #header .navbar.navbarAreaSocio #selectorFamiliar {
        order: 1;
        max-width: 140px;
        margin: 0 8px 0 auto;
    }

    #header .navbar.navbarAreaSocio .accionesCabeceraSocio {
        order: 2;
    }
}

/* ==========================================================================
   AÑADIR MIEMBRO A LA FAMILIA
   ========================================================================== */

.areaSocio .subtituloFormularioSocio {
    margin: 0 0 16px;
    font-size: 1rem;
    font-weight: 700;
    color: var(--socioTexto);
}

.areaSocio .filaDosCamposSocio {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    column-gap: 12px;
}

@media (min-width: 576px) {
    .areaSocio .filaDosCamposSocio {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Si la configuración solo muestra uno de los dos campos, ocupa toda la fila */
.areaSocio .filaDosCamposSocio > :only-child {
    grid-column: 1 / -1;
}

/* Documento identificativo en horizontal: tipo y número en la misma fila */
.areaSocio .campoDocumentoSocio > .row {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
    gap: 10px;
    margin: 0;
}

.areaSocio .campoDocumentoSocio > .row > [class*="col-"] {
    max-width: none;
    padding: 0;
}

/* ==========================================================================
   CARNET CÓDIGO DE BARRAS (reutiliza el pase de "Acceso a la instalación")
   ========================================================================== */

.areaSocio .codigoBarrasPase img {
    max-width: 420px;
}

.areaSocio .textoInformacionCarnetSocio {
    margin: 16px 0;
    color: var(--socioTexto);
}

.areaSocio.vistaCarnetCodigoBarrasSocio .carnetSocio {
    margin-top: 20px;
}

/* ==========================================================================
   QUEJAS Y SUGERENCIAS
   ========================================================================== */

.areaSocio.vistaQuejasSugerenciasSocio {
    max-width: 820px;
}

.areaSocio .accionesQuejasSugerencias,
.areaSocio .filtrosListadoSocio {
    height: auto;
    margin-bottom: 16px;
}

.areaSocio .filtrosListadoSocio .tarjetaSocio {
    height: auto;
}

.areaSocio .listaQuejasSugerenciasSocio {
    height: auto;
    padding: 4px 0;
}

.areaSocio .filaQuejaSugerenciaSocio {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
}

.areaSocio .filaQuejaSugerenciaSocio + .filaQuejaSugerenciaSocio {
    border-top: 1px solid var(--socioBorde);
}

.areaSocio .datosQuejaSugerencia {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.areaSocio .cabeceraQuejaSugerencia {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
}

.areaSocio .cabeceraQuejaSugerencia strong {
    font-weight: 700;
    color: var(--socioTexto);
    overflow-wrap: anywhere;
}

.areaSocio .numeroQuejaSugerencia {
    flex-shrink: 0;
    font-size: .8rem;
    font-weight: 600;
    color: var(--socioTextoSuave);
}

.areaSocio .textoQuejaSugerencia {
    margin-top: 4px;
    font-size: .9rem;
    line-height: 1.45;
    color: var(--socioTexto);
    overflow-wrap: anywhere;
}

/* ==========================================================================
   NUEVA QUEJA / SUGERENCIA
   ========================================================================== */

.areaSocio.vistaNuevaQuejaSugerenciaSocio .notaFormulario {
    margin-bottom: 16px;
}

.areaSocio .formularioQS textarea.form-control {
    min-height: 160px;
    resize: vertical;
}

.areaSocio .condicionesQuejaSugerencia {
    margin-bottom: 12px;
}

.areaSocio .notaCamposObligatorios {
    margin: 0;
    font-size: .8rem;
    color: var(--socioTextoSuave);
}

/* ==========================================================================
   TARJETA DE PAGO RECURRENTE (REDSYS, HECTICUS, POLIWINPAY, WEBPAY PLUS, XPRESSPAGO, PLACETOPAY, FISERV)
   ========================================================================== */

.areaSocio.vistaTarjetaRecurrenteSocio {
    max-width: 460px;
}

.areaSocio .tarjetaPagoSocio {
    position: relative;
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto 1fr auto;
    aspect-ratio: 1.586;
    margin-bottom: 16px;
    padding: 22px 24px;
    border-radius: 18px;
    overflow: hidden;
    color: var(--socioPrincipalTexto);
    background-color: var(--socioPrincipal);
    background-image: linear-gradient(135deg, rgba(255, 255, 255, .22) 0%, rgba(255, 255, 255, 0) 55%), radial-gradient(circle at 110% 120%, rgba(0, 0, 0, .25) 0%, rgba(0, 0, 0, 0) 60%);
    box-shadow: 0 2px 4px rgba(16, 24, 40, .08), 0 14px 32px rgba(16, 24, 40, .18);
}

.areaSocio .tarjetaPagoSocio.caducada {
    filter: grayscale(.85);
    opacity: .75;
}

.areaSocio .chipTarjetaPago {
    width: 44px;
    height: 32px;
    border-radius: 7px;
    background: linear-gradient(135deg, #f6e27a 0%, #c9a43a 100%);
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .15);
}

.areaSocio .iconoTarjetaPago {
    justify-self: end;
    font-size: 28px;
    opacity: .85;
}

.areaSocio .aliasTarjetaPago,
.areaSocio .caducidadTarjetaPago {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.areaSocio .aliasTarjetaPago {
    grid-column: 1 / -1;
    align-self: end;
}

.areaSocio .caducidadTarjetaPago {
    grid-column: 1 / -1;
    margin-top: 10px;
}

.areaSocio .aliasTarjetaPago span,
.areaSocio .caducidadTarjetaPago span {
    font-size: .72rem;
    letter-spacing: .06em;
    text-transform: uppercase;
    opacity: .8;
}

.areaSocio .aliasTarjetaPago strong {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: .03em;
    overflow-wrap: anywhere;
}

.areaSocio .caducidadTarjetaPago strong {
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: .12em;
}

.areaSocio.vistaTarjetaRecurrenteSocio .estadoVacioSocio {
    margin-bottom: 16px;
}

.areaSocio #formcompra,
.areaSocio #firma_hecticus {
    display: none;
}

.areaSocio.vistaTarjetaRecurrenteSocio .tarjetaSocio:not(.estadoVacioSocio) {
    height: auto;
    margin-bottom: 16px;
}

.areaSocio.vistaTarjetaRecurrenteSocio .avisoSocio + .btnSocio {
    margin-bottom: 16px;
}

/* Los formularios de las pasarelas (iframe de Webpay Plus, formulario que inyecta XpressPago) no caben en 460px */
.areaSocio.vistaTarjetaRecurrenteSocio:has(.formularioPasarelaTarjetaSocio:not(:empty)) {
    max-width: 860px;
}

.areaSocio .formularioPasarelaTarjetaSocio:not(:empty) {
    margin-bottom: 16px;
}

.areaSocio .iframePagoTarjetaSocio {
    display: block;
    width: 100%;
    height: 850px;
    border: 0;
    border-radius: var(--socioRadio);
    background-color: #fff;
}

.areaSocio .logo3dSecureSocio {
    display: block;
    width: 120px;
    margin-top: 6px;
}

.areaSocio .iconoResultado.error {
    color: #fff;
    background-color: #d64545;
}

.areaSocio .accionesResultadoSocio {
    display: grid;
    gap: 10px;
}

/* ==========================================================================
   TIENDA ONLINE
   ========================================================================== */

.areaSocio.vistaTiendaSocio {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.areaSocio.vistaProductoTienda {
    max-width: 960px;
}

/* --- Acceso al carrito -------------------------------------------------- */
.areaSocio .barraCarritoTienda {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
    padding: 12px 16px;
    border: 1px solid rgba(var(--socioPrincipalRgb), .25);
    border-radius: var(--socioRadioPeq);
    color: var(--socioTexto);
    background-color: rgba(var(--socioPrincipalRgb), .06);
    text-decoration: none;
    transition: background-color .15s ease;
}

.areaSocio .barraCarritoTienda:hover,
.areaSocio .barraCarritoTienda:focus {
    color: var(--socioTexto);
    background-color: rgba(var(--socioPrincipalRgb), .12);
    text-decoration: none;
}

.areaSocio .iconoCarritoTienda {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--socioPrincipalTexto);
    background-color: var(--socioPrincipal);
}

.areaSocio .iconoCarritoTienda .product-number {
    position: absolute;
    top: -4px;
    right: -6px;
    min-width: 20px;
    height: 20px;
    padding: 0 5px;
    border: 2px solid #fff;
    border-radius: 999px;
    font-size: .7rem;
    font-weight: 800;
    line-height: 16px;
    text-align: center;
    color: #fff;
    background-color: var(--socioPeligro);
}

.areaSocio .textoCarritoTienda {
    flex: 1;
    font-weight: 700;
}

.areaSocio .barraCarritoTienda .shopping-cart-total {
    font-weight: 800;
    color: var(--socioPrincipal);
    white-space: nowrap;
}

.areaSocio .flechaCarritoTienda {
    color: var(--socioTextoSuave);
}

/* --- Rejilla de productos ----------------------------------------------- */
.areaSocio .rejillaProductosTienda {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

@media (min-width: 768px) {
    .areaSocio .rejillaProductosTienda {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 20px;
    }
}

.areaSocio .tarjetaProductoTienda {
    display: flex;
    flex-direction: column;
    color: var(--socioTexto);
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease;
}

.areaSocio .tarjetaProductoTienda:hover,
.areaSocio .tarjetaProductoTienda:focus {
    color: var(--socioTexto);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(16, 24, 40, .08), 0 10px 24px rgba(16, 24, 40, .1);
}

.areaSocio .imagenProductoTienda,
.areaSocio .imagenFichaTienda {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 1 / 1;
    font-size: 2.5rem;
    color: rgba(var(--socioPrincipalRgb), .45);
    background-color: rgba(var(--socioPrincipalRgb), .07);
}

.areaSocio .imagenProductoTienda img,
.areaSocio .imagenFichaTienda img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.areaSocio .etiquetaProductoTienda {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    color: var(--socioTexto);
    background-color: rgba(255, 255, 255, .92);
    box-shadow: 0 1px 3px rgba(16, 24, 40, .15);
}

.areaSocio .cuerpoProductoTienda {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 6px;
    padding: 12px 14px 14px;
}

.areaSocio .nombreProductoTienda {
    font-weight: 700;
    line-height: 1.3;
    overflow-wrap: anywhere;
}

.areaSocio .precioProductoTienda {
    margin-top: auto;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--socioPrincipal);
}

.areaSocio .precioProductoTienda small {
    font-size: .75rem;
    font-weight: 600;
    color: var(--socioTextoSuave);
}

/* --- Ficha de producto -------------------------------------------------- */
.areaSocio .fichaProductoTienda {
    display: grid;
    gap: 16px;
}

@media (min-width: 768px) {
    .areaSocio .fichaProductoTienda {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: start;
        gap: 24px;
    }
}

.areaSocio .imagenFichaTienda {
    height: auto;
    font-size: 4rem;
}

.areaSocio .imagenFichaTienda.sinImagenTienda {
    aspect-ratio: 16 / 9;
}

.areaSocio .datosFichaTienda {
    display: flex;
    flex-direction: column;
    gap: 16px;
    height: auto;
    padding: 20px;
}

.areaSocio .precioFichaTienda {
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.1;
    color: var(--socioPrincipal);
}

.areaSocio .precioFichaTienda del {
    margin-right: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--socioTextoSuave);
}

.areaSocio .descripcionFichaTienda {
    color: var(--socioTextoSuave);
    line-height: 1.55;
}

.areaSocio .descripcionFichaTienda > :last-child {
    margin-bottom: 0;
}

.areaSocio .datosFichaTienda .etiquetaTarjeta {
    margin-bottom: -8px;
}

.areaSocio .opcionesFichaTienda,
.areaSocio .elementosPackTienda {
    margin: 0;
    padding: 0;
    list-style: none;
}

.areaSocio .opcionesFichaTienda li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--socioBorde);
}

.areaSocio .opcionesFichaTienda li:last-child {
    border-bottom: 1px solid var(--socioBorde);
}

.areaSocio .nombreOpcionTienda {
    flex: 1;
    min-width: 0;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.areaSocio .precioOpcionTienda {
    font-weight: 800;
    white-space: nowrap;
}

.areaSocio .opcionesFichaTienda .btnSocio {
    flex-shrink: 0;
    padding: 8px 14px;
}

/* En móvil el botón de cada opción solo muestra el icono para no comprimir el nombre */
@media (max-width: 400px) {
    .areaSocio .opcionesFichaTienda .textoBotonOpcion {
        display: none;
    }
}

.areaSocio .elementosPackTienda li {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 4px 0;
}

.areaSocio .elementosPackTienda i {
    color: var(--socioPrincipal);
}

/* ==========================================================================
   CHECKOUT (FINALIZAR COMPRA)
   ========================================================================== */

.areaSocio.vistaCheckoutSocio {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.areaSocio.vistaCheckoutSocio.checkoutSinCompra {
    max-width: 600px;
}

.areaSocio .textoPaginaCheckout {
    margin-bottom: 16px;
    color: var(--socioTextoSuave);
}

.areaSocio .textoPaginaCheckout > :last-child {
    margin-bottom: 0;
}

/* En móvil, primero lo que se compra y después los datos y el pago */
.areaSocio .rejillaCheckout {
    display: grid;
    gap: 16px;
}

.areaSocio .columnaFormularioCheckout {
    display: flex;
    flex-direction: column;
    gap: 16px;
    min-width: 0;
}

@media (min-width: 992px) {
    .areaSocio .rejillaCheckout {
        grid-template-columns: minmax(0, 1fr) 380px;
        align-items: start;
        gap: 24px;
    }

    .areaSocio .columnaFormularioCheckout {
        grid-column: 1;
        grid-row: 1;
    }

    .areaSocio .columnaResumenCheckout {
        position: sticky;
        top: 88px;
        grid-column: 2;
        grid-row: 1;
    }

    .areaSocio.checkoutSinCompra .rejillaCheckout {
        grid-template-columns: minmax(0, 1fr);
    }

    .areaSocio.checkoutSinCompra .columnaResumenCheckout {
        position: static;
        grid-column: 1;
    }
}

.areaSocio .seccionCompraSocio,
.areaSocio .resumenCarritoCompra {
    height: auto;
    padding: 20px;
}

.areaSocio .tituloSeccionCompra {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 16px;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--socioTexto);
}

.areaSocio .tituloSeccionCompra i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: .85rem;
    color: var(--socioPrincipal);
    background-color: rgba(var(--socioPrincipalRgb), .1);
}

.areaSocio .tituloPersonalizadoCheckout {
    margin-bottom: 16px;
}

.areaSocio .subtituloSeccionCompra {
    margin: 20px 0 12px;
    font-size: .95rem;
    font-weight: 700;
    color: var(--socioTexto);
}

.areaSocio .seccionCompraSocio .avisoSocio,
.areaSocio .seccionCompraSocio .notaFormulario {
    margin: 0 0 16px;
}

.areaSocio .seccionCompraSocio .campoFormulario .form-control[readonly] {
    color: var(--socioTextoSuave);
    background-color: var(--socioFondoSuave);
}

/* Dirección: tipo de vía + calle, y número, escalera, piso y puerta en una fila */
.areaSocio .filaDireccionSocio,
.areaSocio .filaDetalleDireccionSocio {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    column-gap: 12px;
}

.areaSocio .filaDetalleDireccionSocio {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (min-width: 576px) {
    .areaSocio .filaDireccionSocio {
        grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
    }

    .areaSocio .filaDetalleDireccionSocio {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.areaSocio .iniciarSesionCheckout .btnSocio {
    margin-top: 8px;
}

/* --- Opciones (formas de pago, envío, derechos de imagen) ----------------
   PWOptionList pinta label.container-radio > input + label + span.checkmark */
.areaSocio .opcionesCompraSocio .row {
    margin: 0;
}

.areaSocio .opcionesCompraSocio [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0;
}

.areaSocio .opcionesCompraSocio label.container-radio {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 54px;
    margin: 0 0 8px;
    padding: 12px 16px 12px 50px;
    border: 1px solid var(--socioBorde);
    border-radius: var(--socioRadioPeq);
    font-size: 1rem;
    background-color: #fff;
    transition: border-color .15s ease, background-color .15s ease;
}

.areaSocio .opcionesCompraSocio label.container-radio:hover {
    border-color: rgba(var(--socioPrincipalRgb), .5);
}

.areaSocio .opcionesCompraSocio label.container-radio:has(input:checked) {
    border-color: var(--socioPrincipal);
    background-color: rgba(var(--socioPrincipalRgb), .05);
}

.areaSocio .opcionesCompraSocio label.container-radio:has(input:disabled) {
    cursor: not-allowed;
    opacity: .6;
}

.areaSocio .opcionesCompraSocio label.container-radio > label {
    flex: 1;
    margin: 0;
    font-weight: 600;
    line-height: 1.35;
    color: var(--socioTexto);
    cursor: inherit;
}

.areaSocio .opcionesCompraSocio label.container-radio .checkmark {
    top: 50%;
    left: 16px;
    width: 22px;
    height: 22px;
    border: 2px solid #b8c1cc;
    background-color: #fff;
    transform: translateY(-50%);
}

.areaSocio .opcionesCompraSocio label.container-radio:hover input ~ .checkmark {
    background-color: #fff;
}

.areaSocio .opcionesCompraSocio label.container-radio input:checked ~ .checkmark {
    border-color: var(--socioPrincipal);
    background-color: #fff;
    box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 12px var(--socioPrincipal);
}

.areaSocio .opcionesCompraSocio label.container-radio input:checked ~ .checkmark:after {
    display: none;
}

.areaSocio .opcionesCompraSocio label.container-radio input:focus-visible ~ .checkmark {
    outline: 3px solid rgba(var(--socioPrincipalRgb), .3);
}

.areaSocio .opcionesCompraSocio #directo_monedero .btn {
    margin-top: 6px;
}

.areaSocio .opcionesEnLinea > .row,
.areaSocio .opcionesEnLinea {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.areaSocio .opcionesEnLinea label.container-radio {
    margin: 0;
}

.areaSocio .txtSeleccionFormaPago {
    margin: 0 0 12px;
    font-size: .9rem;
    color: var(--socioTextoSuave);
}

.areaSocio .txtSeleccionFormaPago span {
    font-weight: 700;
    color: #2f9e64;
}

/* --- Código promocional ------------------------------------------------- */
.areaSocio .codigoPromocionalCheckout {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 8px 12px;
    margin-bottom: 16px;
}

.areaSocio .codigoPromocionalCheckout .campoFormulario {
    flex: 1 1 200px;
    margin: 0;
}

.areaSocio .codigoPromocionalCheckout .btnSocio {
    min-height: 48px;
}

/* --- Confirmación y total ----------------------------------------------- */
.areaSocio .casillaCompraSocio {
    align-items: flex-start;
    margin-bottom: 10px;
}

.areaSocio .casillaCompraSocio label:not(.container-checkbox) {
    padding-top: 1px;
    color: var(--socioTexto);
}

.areaSocio .casillaCompraSocio label a {
    font-weight: 600;
    color: var(--socioEnlaces);
}

.areaSocio .derechosImagenCheckout > label {
    margin-bottom: 10px;
}

.areaSocio .totalCompraSocio {
    margin: 16px 0;
    padding: 14px 16px;
    border-radius: var(--socioRadioPeq);
    background-color: var(--socioFondoSuave);
}

.areaSocio .filaTotalCompra {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 3px 0;
    color: var(--socioTextoSuave);
}

.areaSocio .filaTotalCompra.totalDestacadoCompra {
    font-weight: 700;
    color: var(--socioTexto);
}

.areaSocio .filaTotalCompra.totalDestacadoCompra strong {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--socioPrincipal);
    white-space: nowrap;
}

.areaSocio .botonFinalizarCompra {
    min-height: 52px;
    font-size: 1.05rem;
}

.areaSocio .filaTotalCompra small {
    font-size: .8rem;
}

.areaSocio .filaTotalCompra.importeAPagarCompra {
    margin-top: 6px;
    padding-top: 9px;
    border-top: 1px solid var(--socioBorde);
}

/* --- Inscripción a un curso (hacer_inscripcion) --------------------------- */
.areaSocio .respuestasInscripcionCurso {
    margin: 0 0 16px;
}

.areaSocio .respuestasInscripcionCurso dt {
    font-size: .85rem;
    font-weight: 600;
    color: var(--socioTextoSuave);
}

.areaSocio .respuestasInscripcionCurso dd {
    margin: 2px 0 12px;
    font-weight: 700;
    color: var(--socioTexto);
}

.areaSocio .respuestasInscripcionCurso dd small {
    display: block;
    font-weight: 400;
    color: var(--socioTextoSuave);
}

/* --- Encuestas pendientes ----------------------------------------------- */
.areaSocio .listaEncuestasCheckout {
    margin: 0;
    padding: 0;
    list-style: none;
}

.areaSocio .listaEncuestasCheckout li {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    padding: 12px 0;
    border-top: 1px solid var(--socioBorde);
}

.areaSocio .datosEncuestaCheckout {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.areaSocio .datosEncuestaCheckout span {
    font-size: .85rem;
    color: var(--socioTextoSuave);
}

/* --- Resumen del carrito ------------------------------------------------ */
.areaSocio .resumenCarritoCompra .tituloSeccionCompra {
    margin-bottom: 4px;
}

.areaSocio .lineaCompraSocio {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 0;
    border-bottom: 1px solid var(--socioBorde);
}

.areaSocio .lineaCompraSocio:last-of-type {
    padding-bottom: 0;
    border-bottom: 0;
}

.areaSocio .cabeceraLineaCompra {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.areaSocio .imagenLineaCompra {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 64px;
    height: 64px;
    border-radius: var(--socioRadioPeq);
    overflow: hidden;
    font-size: 1.4rem;
    color: rgba(var(--socioPrincipalRgb), .55);
    background-color: rgba(var(--socioPrincipalRgb), .08);
}

.areaSocio .imagenLineaCompra img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.areaSocio .datosLineaCompra {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.areaSocio .tipoLineaCompra {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--socioTextoSuave);
}

.areaSocio .nombreLineaCompra {
    font-weight: 700;
    line-height: 1.3;
    color: var(--socioTexto);
    overflow-wrap: anywhere;
}

.areaSocio .familiarLineaCompra {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 700;
    color: var(--socioPrincipal);
    background-color: rgba(var(--socioPrincipalRgb), .1);
}

.areaSocio .textoLineaCompra {
    margin: 0;
    font-size: .85rem;
    line-height: 1.45;
    color: var(--socioTextoSuave);
}

.areaSocio .textoLineaCompra > :last-child {
    margin-bottom: 0;
}

.areaSocio .bloqueLineaCompra .etiquetaTarjeta {
    display: block;
}

.areaSocio .listaDetalleCompra {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: .85rem;
    color: var(--socioTexto);
}

.areaSocio .listaDetalleCompra i {
    width: 16px;
    margin-right: 8px;
    text-align: center;
    color: var(--socioPrincipal);
}

.areaSocio .avisoLineaCompra {
    margin: 0;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: .85rem;
    font-weight: 600;
    color: var(--socioPeligro);
    background-color: rgba(var(--socioPeligroRgb), .08);
}

.areaSocio .pieLineaCompra {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.areaSocio .botonEliminarCompra {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 36px;
    padding: 0 12px;
    border: 1px solid var(--socioBorde);
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 600;
    color: var(--socioPeligro);
    background-color: #fff;
}

.areaSocio .botonEliminarCompra:hover,
.areaSocio .botonEliminarCompra:focus {
    border-color: rgba(var(--socioPeligroRgb), .4);
    background-color: rgba(var(--socioPeligroRgb), .06);
}

.areaSocio .cantidadLineaCompra {
    display: inline-flex;
    align-items: center;
    border: 1px solid var(--socioBorde);
    border-radius: 999px;
    background-color: #fff;
}

.areaSocio .cantidadLineaCompra > span {
    min-width: 28px;
    font-weight: 700;
    text-align: center;
}

.areaSocio .botonCantidadCompra {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    font-size: .8rem;
    color: var(--socioPrincipal);
    background-color: transparent;
}

.areaSocio .botonCantidadCompra:hover,
.areaSocio .botonCantidadCompra:focus {
    background-color: rgba(var(--socioPrincipalRgb), .1);
}

.areaSocio .cantidadFijaCompra {
    font-size: .85rem;
    color: var(--socioTextoSuave);
}

.areaSocio .precioLineaCompra {
    font-size: 1.1rem;
    font-weight: 800;
    text-align: right;
    color: var(--socioTexto);
}

.areaSocio .precioLineaCompra.tachado > div:first-child {
    font-weight: 600;
    text-decoration: line-through;
    color: var(--socioTextoSuave);
}

.areaSocio .precioLineaCompra .extraLineaCompra {
    font-size: .75rem;
    font-weight: 600;
    color: var(--socioTextoSuave);
}

.areaSocio .precioLineaCompra .preinscripcio {
    font-size: .75rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #b7791f;
}

.areaSocio .promocionLineaCompra {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: .85rem;
    color: var(--socioTextoSuave);
}

.areaSocio .promocionLineaCompra i {
    margin-right: 6px;
    color: #2f9e64;
}

.areaSocio .promocionLineaCompra .descuentoPromocion {
    font-weight: 700;
    color: #2f9e64;
}

.areaSocio .promocionLineaCompra.precioFinalPromocion {
    font-weight: 700;
    color: var(--socioTexto);
}

.areaSocio .promocionLineaCompra.precioFinalPromocion strong {
    font-size: 1.1rem;
}

.areaSocio .resumenCarritoCompra .estadoVacioSocio {
    padding: 24px 0 8px;
    box-shadow: none;
}

/* ==========================================================================
   MODAL DEL ÁREA DE SOCIO (confirmaciones dentro de la propia vista)
   El modal se mueve al body, fuera de .areaSocio: su contenido lleva su propio .areaSocio.
   Los modales que contienen el formulario de pago (.pagoSocio) toman el mismo diseño, los cree quien los cree
   ========================================================================== */

body .modal.modalSocio .modal-dialog .modal-content,
body .modal:has(.pagoSocio) .modal-dialog .modal-content {
    border: 0;
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(16, 24, 40, .25);
    overflow: hidden;
}

body .modal.modalSocio .modal-dialog .modal-content .modal-header,
body .modal:has(.pagoSocio) .modal-dialog .modal-content .modal-header {
    align-items: center;
    padding: 18px 20px 6px;
    border: 0;
    border-radius: 0;
    color: var(--socioTexto);
    background: #fff;
}

body .modal.modalSocio .modal-dialog .modal-content .modal-header .modal-title,
body .modal:has(.pagoSocio) .modal-dialog .modal-content .modal-header .modal-title {
    font-size: 1.15rem;
    font-weight: 800;
    text-transform: none;
    color: var(--socioTexto);
}

body .modal.modalSocio .cerrarModalSocio {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    font-size: 16px;
    color: var(--socioTextoSuave);
    background-color: var(--socioFondoSuave);
    cursor: pointer;
}

body .modal.modalSocio .cerrarModalSocio:hover {
    color: var(--socioTexto);
}

/* Modales creados con AuxiliarModalPolicloud ($Modal->Class = 'modalSocio'): su X es un <i class="close-window">
   y las acciones van en el contenido, así que el pie no se muestra */
body .modal.modalSocio .modal-dialog .modal-content .modal-header .close-window,
body .modal:has(.pagoSocio) .modal-dialog .modal-content .modal-header .close-window {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 16px;
    color: var(--socioTextoSuave);
    background-color: var(--socioFondoSuave);
    cursor: pointer;
}

body .modal.modalSocio .modal-dialog .modal-content .modal-header .close-window:hover,
body .modal:has(.pagoSocio) .modal-dialog .modal-content .modal-header .close-window:hover {
    color: var(--socioTexto);
}

body .modal.modalSocio .modal-dialog .modal-content .modal-footer,
body .modal:has(.pagoSocio) .modal-dialog .modal-content .modal-footer {
    display: none;
}

body .modal.modalSocio .modal-dialog .modal-content .modal-body,
body .modal:has(.pagoSocio) .modal-dialog .modal-content .modal-body {
    padding: 12px 20px 20px;
    font-size: 1rem;
    line-height: 1.45;
    text-align: left;
    color: var(--socioTexto);
}

.modalSocio .areaSocio,
.modal:has(.pagoSocio) .areaSocio {
    padding-bottom: 0;
}

.modalSocio .iconoModalSocio {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    margin: 4px auto 14px;
    border-radius: 50%;
    font-size: 22px;
    color: var(--socioPrincipal);
    background-color: rgba(var(--socioPrincipalRgb), .12);
}

.modalSocio .textoModalSocio {
    margin: 0 0 20px;
    text-align: center;
    overflow-wrap: anywhere;
}

.modalSocio .textoModalSocio strong {
    color: var(--socioTexto);
}

.modalSocio .botonesModalSocio {
    display: grid;
    gap: 10px;
}

.modalSocio .iconoModalSocio.peligro {
    color: var(--socioPeligro);
    background-color: rgba(var(--socioPeligroRgb), .12);
}

/* En móvil, el modal sale como hoja desde abajo */
@media (max-width: 575.98px) {
    /* Con la barra del navegador visible, el 100% de Bootstrap puede medir la pantalla como si estuviera oculta y la hoja,
       pegada abajo, queda en parte detrás de la barra hasta que se hace scroll. dvh es la altura visible en cada momento */
    body .modal.modalSocio,
    body .modal.modalReservaSocio,
    body .modal:has(.pagoSocio) {
        height: 100%;
        height: 100dvh;
    }

    .modalSocio .modal-dialog,
    .modal:has(.pagoSocio) .modal-dialog {
        display: flex;
        align-items: flex-end;
        min-height: 100%;
        margin: 0;
    }

    body .modal.modalSocio .modal-dialog .modal-content,
    body .modal:has(.pagoSocio) .modal-dialog .modal-content {
        border-radius: 22px 22px 0 0;
    }

    body .modal.modalSocio .modal-dialog .modal-content .modal-body,
    body .modal:has(.pagoSocio) .modal-dialog .modal-content .modal-body {
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
    }
}

/* ==========================================================================
   AVISOS FLOTANTES (jQuery Gritter, AuxiliarMissatgeGritter)
   Se añaden al body: la hoja solo se carga en el área de socio, así que el resto de la web no cambia.
   AuxiliarMissatgeGritter pone el tipo (success, danger, warning, info) en .gritter-item-wrapper
   según la imagen; la imagen se sustituye por un icono del mismo tipo. Con body delante para ganar a
   jquery.gritter.css (se carga después) y a customStyle.php (pone el texto en blanco).
   ========================================================================== */

body #gritter-notice-wrapper {
    top: 16px;
    right: 16px;
    width: 340px;
    max-width: calc(100vw - 32px);
}

body #gritter-notice-wrapper .gritter-item-wrapper {
    --colorAviso: var(--socioPrincipal);
    margin: 0 0 10px;
    background: none;
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(16, 24, 40, .18), 0 2px 6px rgba(16, 24, 40, .08);
}

body #gritter-notice-wrapper .gritter-item-wrapper.success {
    --colorAviso: #2f9e64;
}

body #gritter-notice-wrapper .gritter-item-wrapper.danger {
    --colorAviso: var(--socioPeligro);
}

body #gritter-notice-wrapper .gritter-item-wrapper.warning {
    --colorAviso: #d99a1e;
}

body #gritter-notice-wrapper .gritter-top,
body #gritter-notice-wrapper .gritter-bottom {
    display: none;
}

body #gritter-notice-wrapper .gritter-item {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 40px 14px 14px;
    border-left: 4px solid var(--colorAviso);
    border-radius: 16px;
    font-family: inherit;
    font-size: .9rem;
    color: var(--socioTextoSuave);
    background: #fff;
}

body #gritter-notice-wrapper .gritter-item:before {
    content: '\f05a';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    font-family: 'Font Awesome 5 Free';
    font-size: 16px;
    font-weight: 900;
    color: var(--colorAviso);
    background-color: color-mix(in srgb, var(--colorAviso) 14%, #fff);
}

body #gritter-notice-wrapper .success .gritter-item:before {
    content: '\f00c';
}

body #gritter-notice-wrapper .danger .gritter-item:before {
    content: '\f00d';
}

body #gritter-notice-wrapper .warning .gritter-item:before {
    content: '\f071';
}

/* Las imágenes de tipo (portada_ok, portada_ko...) se sustituyen por el icono; el resto también, para que todos sean iguales */
body #gritter-notice-wrapper .gritter-image,
body #gritter-notice-wrapper .inner-image {
    display: none;
}

body #gritter-notice-wrapper .gritter-with-image,
body #gritter-notice-wrapper .gritter-without-image {
    flex: 1;
    min-width: 0;
    width: auto;
    padding: 0;
    float: none;
}

body #gritter-notice-wrapper .gritter-item > div[style*="clear"] {
    display: none;
}

body #gritter-notice-wrapper .gritter-title {
    padding: 0 0 2px;
    font-size: .95rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--socioTexto);
    text-shadow: none;
}

body #gritter-notice-wrapper .gritter-item p {
    margin: 0;
    color: var(--socioTextoSuave);
    line-height: 1.4;
    overflow-wrap: anywhere;
}

body #gritter-notice-wrapper .gritter-close {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    top: 10px;
    right: 10px;
    left: auto;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: var(--socioTextoSuave);
    background: none;
}

body #gritter-notice-wrapper .gritter-close:before {
    content: '\f00d';
    font-family: 'Font Awesome 5 Free';
    font-size: 13px;
    font-weight: 900;
}

body #gritter-notice-wrapper .gritter-close:hover {
    color: var(--socioTexto);
    background-color: var(--socioFondoSuave);
}

@media (max-width: 575.98px) {
    body #gritter-notice-wrapper {
        top: 12px;
        right: 12px;
        left: 12px;
        width: auto;
        max-width: none;
    }
}

/* ==========================================================================
   PAGO DE RECIBOS (modal con formulari_pagament_socio.tpl.php)
   ========================================================================== */

.areaSocio.pagoSocio .resumenPagoSocio {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px 16px;
    border-radius: var(--socioRadio);
    text-align: center;
    background-color: rgba(var(--socioPrincipalRgb), .07);
}

.areaSocio.pagoSocio .importePagoSocio {
    margin: 2px 0 4px;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
    color: var(--socioTexto);
}

.areaSocio.pagoSocio .conceptoPagoSocio {
    font-size: .9rem;
    font-weight: 600;
    color: var(--socioTextoSuave);
    overflow-wrap: anywhere;
}

.areaSocio.pagoSocio .datosPagoSocio {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.areaSocio.pagoSocio .datosPagoSocio li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 2px;
    border-bottom: 1px solid var(--socioBorde);
    font-size: .92rem;
}

.areaSocio.pagoSocio .datosPagoSocio li > i {
    width: 18px;
    text-align: center;
    color: var(--socioTextoSuave);
}

.areaSocio.pagoSocio .datosPagoSocio .etiquetaDatoPago {
    flex: 1;
    min-width: 0;
    color: var(--socioTextoSuave);
}

.areaSocio.pagoSocio .datosPagoSocio li strong {
    text-align: right;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.areaSocio.pagoSocio .datosPagoSocio .descuentoPagoSocio,
.areaSocio.pagoSocio .datosPagoSocio .descuentoPagoSocio > i {
    color: #2f9e64;
}

.areaSocio.pagoSocio .codigoPromocionalPago {
    margin-top: 16px;
}

.areaSocio.pagoSocio .codigoPromocionalPago label {
    display: block;
    margin-bottom: 6px;
    font-size: .88rem;
    font-weight: 600;
    color: var(--socioTextoSuave);
}

.areaSocio.pagoSocio .filaCodigoPromocionalPago {
    display: flex;
    gap: 8px;
}

.areaSocio.pagoSocio .filaCodigoPromocionalPago .form-control {
    flex: 1;
    min-width: 0;
    height: 44px;
    border-radius: var(--socioRadioPeq);
    text-transform: uppercase;
}

.areaSocio.pagoSocio .filaCodigoPromocionalPago .btnSocio {
    flex-shrink: 0;
    min-height: 44px;
    padding: 8px 14px;
    font-size: .9rem;
}

.areaSocio.pagoSocio .tituloFormasPagoSocio {
    margin: 22px 0 10px;
    font-size: 1rem;
    font-weight: 800;
    color: var(--socioTexto);
}

.areaSocio.pagoSocio .botonsPagament .notaFormulario {
    margin-bottom: 10px;
}

.areaSocio.pagoSocio .formasPagoSocio {
    display: grid;
    gap: 10px;
}

/* Botón de cada forma de pago: sobrescribe los estilos de .submitBtn y de cada pasarela (.tarjeta, .placetopay...) */
.areaSocio.pagoSocio a.formaPagoSocio {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 64px;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid var(--socioBorde);
    border-radius: var(--socioRadio);
    font-size: 1rem;
    text-align: left;
    text-decoration: none;
    color: var(--socioTexto);
    background: #fff;
    box-shadow: var(--socioSombra);
    transition: border-color .15s ease, box-shadow .15s ease, transform .12s ease;
}

.areaSocio.pagoSocio a.formaPagoSocio:hover,
.areaSocio.pagoSocio a.formaPagoSocio:focus {
    color: var(--socioTexto);
    text-decoration: none;
    border-color: var(--socioPrincipal);
    box-shadow: 0 6px 18px rgba(var(--socioPrincipalRgb), .18);
}

.areaSocio.pagoSocio a.formaPagoSocio:active {
    transform: scale(.98);
}

.areaSocio.pagoSocio a.formaPagoSocio.disabled {
    cursor: not-allowed;
    opacity: .5;
    box-shadow: none;
}

.areaSocio.pagoSocio .iconoFormaPago {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    font-size: 18px;
    color: var(--socioPrincipal);
    background-color: rgba(var(--socioPrincipalRgb), .1);
}

.areaSocio.pagoSocio .textoFormaPago {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    gap: 2px;
    line-height: 1.25;
}

.areaSocio.pagoSocio .textoFormaPago strong {
    font-weight: 700;
}

.areaSocio.pagoSocio .textoFormaPago span {
    font-size: .82rem;
    color: var(--socioTextoSuave);
}

.areaSocio.pagoSocio .logoFormaPago {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 84px;
    height: 42px;
    padding: 6px 8px;
    border: 1px solid var(--socioBorde);
    border-radius: 12px;
    background-color: #fff;
}

.areaSocio.pagoSocio .logoFormaPago.fondoOscuro {
    border-color: #1f2933;
    background-color: #1f2933;
}

.areaSocio.pagoSocio .logoFormaPago img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.areaSocio.pagoSocio .flechaFormaPago {
    flex-shrink: 0;
    color: var(--socioTextoSuave);
}

.areaSocio.pagoSocio .extraFormaPagoSocio {
    margin-top: 6px;
    font-size: .85rem;
    color: var(--socioTextoSuave);
}

.areaSocio.pagoSocio .extraFormaPagoSocio:empty {
    display: none;
}

.areaSocio.pagoSocio .pagoSeguroSocio {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 18px 0 0;
    font-size: .8rem;
    text-align: center;
    color: var(--socioTextoSuave);
}

.areaSocio.pagoSocio .pagoSeguroSocio i {
    color: #2f9e64;
}

.areaSocio .avisoPagoSocio {
    margin-top: 0;
}

.areaSocio .avisoPagoSocio .textoAviso {
    min-width: 0;
    overflow-wrap: anywhere;
}

/* ==========================================================================
   INVITACIONES
   ========================================================================== */

.areaSocio .listaInvitacionesSocio {
    display: grid;
    gap: 12px;
}

.areaSocio .invitacionSocio.disponible {
    height: auto;
    padding: 16px;
}

.areaSocio .cabeceraInvitacionLista {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
}

.areaSocio .datosInvitacionSocio {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 2px;
}

.areaSocio .datosInvitacionSocio strong {
    font-weight: 800;
    overflow-wrap: anywhere;
}

.areaSocio .datosInvitacionSocio span {
    font-size: .85rem;
    color: var(--socioTextoSuave);
}

.areaSocio .invitacionSocio .btnSocio i {
    margin-right: 8px;
}

.areaSocio .copiarInvitacionSocio.copiado,
.areaSocio .copiarInvitacionSocio.copiado:hover {
    border-color: #2f9e64;
    color: #fff;
    background-color: #2f9e64;
}

.areaSocio .iconoEstadoInvitacion {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: var(--socioTextoSuave);
    background-color: var(--socioFondoSuave);
}

.areaSocio .invitacionSocio.usada .iconoEstadoInvitacion {
    color: #2f9e64;
    background-color: rgba(47, 158, 100, .12);
}

.areaSocio .invitacionSocio.caducada .datosFamiliarSocio strong,
.areaSocio .invitacionSocio.anulada .datosFamiliarSocio strong,
.areaSocio .invitacionSocio.noDisponible .datosFamiliarSocio strong {
    color: var(--socioTextoSuave);
}

/* ==========================================================================
   REFERIDOS (SOCIO ANFITRIÓN)
   ========================================================================== */

.areaSocio .tarjetaInvitacionSocio {
    height: auto;
    margin-bottom: 24px;
    padding: 20px;
}

.areaSocio .cabeceraInvitacionSocio {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.areaSocio .iconoInvitacionSocio {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    font-size: 1.3rem;
    color: var(--socioPrincipalTexto);
    background-color: var(--socioPrincipal);
}

.areaSocio .cabeceraInvitacionSocio h2 {
    margin: 0 0 2px;
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--socioTexto);
}

.areaSocio .cabeceraInvitacionSocio p {
    margin: 0;
    font-size: .85rem;
    color: var(--socioTextoSuave);
}

.areaSocio .cabeceraInvitacionSocio p i {
    margin-right: 6px;
    color: #2f9e64;
}

.areaSocio .instruccionesInvitacionSocio {
    margin-bottom: 16px;
    font-size: .9rem;
    line-height: 1.5;
    color: var(--socioTextoSuave);
}

.areaSocio .instruccionesInvitacionSocio > :last-child {
    margin-bottom: 0;
}

/* El enlace es largo y sin espacios: se parte por cualquier carácter para no desbordar en móvil */
.areaSocio .enlaceInvitacionSocio {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px dashed rgba(var(--socioPrincipalRgb), .45);
    border-radius: var(--socioRadioPeq);
    font-size: .85rem;
    font-weight: 600;
    line-height: 1.45;
    color: var(--socioTexto);
    background-color: rgba(var(--socioPrincipalRgb), .05);
}

.areaSocio .enlaceInvitacionSocio i {
    margin-top: 3px;
    color: var(--socioPrincipal);
}

.areaSocio .enlaceInvitacionSocio #enlaceGenerado {
    min-width: 0;
    word-break: break-all;
    user-select: all;
}

.areaSocio .accionesInvitacionSocio {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
}

@media (min-width: 576px) {
    .areaSocio .accionesInvitacionSocio {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    /* Sin envío por correo solo queda "Copiar": ocupa toda la fila */
    .areaSocio .accionesInvitacionSocio > :only-child {
        grid-column: 1 / -1;
    }
}

.areaSocio .contadorReferidosSocio {
    min-width: 24px;
    padding: 1px 8px;
    border-radius: 999px;
    font-size: .8rem;
    font-weight: 800;
    text-align: center;
    color: var(--socioPrincipal);
    background-color: rgba(var(--socioPrincipalRgb), .1);
}

.areaSocio .descuentoReferidoSocio {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #2f9e64;
    background-color: rgba(47, 158, 100, .12);
}

.areaSocio.vistaReferidosSocio .datosFamiliarSocio .detalleMovimiento i {
    margin-right: 2px;
}

/* ==========================================================================
   RESERVAS: SELECTOR DE TIPO DE ESPACIO
   ========================================================================== */

.areaSocio.vistaReservasSocio .barraReservasSocio {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    margin-bottom: 16px;
}

.areaSocio.vistaReservasSocio .barraReservasSocio .saldoSocio {
    flex: 1 1 220px;
    padding: 10px 14px;
}

.areaSocio.vistaReservasSocio .barraReservasSocio > .btnSocio {
    flex: 0 0 auto;
}

.areaSocio.vistaReservasSocio .notaFormulario > div {
    font-size: .9rem;
    line-height: 1.45;
}

.areaSocio.vistaReservasSocio .seccionSocio:first-of-type {
    margin-top: 8px;
}

.areaSocio .rejillaOpcionesReserva {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
    gap: 12px;
}

.areaSocio .tarjetaSocio.opcionReservaSocio {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    color: var(--socioTexto);
    text-decoration: none;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.areaSocio .tarjetaSocio.opcionReservaSocio:hover,
.areaSocio .tarjetaSocio.opcionReservaSocio:focus {
    color: var(--socioTexto);
    text-decoration: none;
    border-color: rgba(var(--socioPrincipalRgb), .45);
    box-shadow: 0 6px 18px rgba(var(--socioPrincipalRgb), .16);
}

.areaSocio .opcionReservaSocio .iconoOpcionReserva {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    font-size: 19px;
    color: var(--socioPrincipal);
    background-color: rgba(var(--socioPrincipalRgb), .12);
}

.areaSocio .opcionReservaSocio .datosOpcionReserva {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    gap: 2px;
}

.areaSocio .opcionReservaSocio .nombreOpcionReserva {
    font-weight: 700;
    line-height: 1.25;
    word-break: break-word;
}

.areaSocio .opcionReservaSocio .tipoOpcionReserva {
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--socioTextoSuave);
}

.areaSocio .opcionReservaSocio .descripcionOpcionReserva {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: .85rem;
    line-height: 1.35;
    color: var(--socioTextoSuave);
}

.areaSocio .opcionReservaSocio .flechaOpcionReserva {
    flex-shrink: 0;
    font-size: 13px;
    color: var(--socioTextoSuave);
}

.areaSocio.vistaReservasSocio > .saldoSocio {
    margin-bottom: 16px;
}

.areaSocio .servicioReservaSocio .detallesServicioReserva {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 14px;
    margin-top: 4px;
    font-size: .88rem;
    color: var(--socioTextoSuave);
}

.areaSocio .servicioReservaSocio .precioServicioReserva {
    font-weight: 700;
    color: var(--socioTexto);
}

.areaSocio .servicioReservaSocio .sesionesServicioReserva {
    align-self: flex-start;
    margin-top: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .8rem;
    color: var(--socioPrincipal);
    background-color: rgba(var(--socioPrincipalRgb), .1);
}

/* ==========================================================================
   RESERVAS: CALENDARIO (pistas, servicios y clases con el mismo diseño)
   ========================================================================== */

.areaSocio.vistaReservaEspacioSocio .subtituloReservaSocio {
    margin: -8px 0 16px;
    font-weight: 600;
    color: var(--socioTextoSuave);
}

.areaSocio.vistaReservaEspacioSocio > .saldoSocio {
    margin-bottom: 16px;
}

.areaSocio.vistaReservaEspacioSocio .notaFormulario > div {
    min-width: 0;
    font-size: .9rem;
    line-height: 1.45;
}

/* --- Selector de fecha ---------------------------------------------------- */
.areaSocio .selectorFechaReservaSocio {
    height: auto;
    padding: 16px 0 14px;
}

.areaSocio .selectorFechaReservaSocio .cabeceraFechaReserva {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 16px 12px;
}

.areaSocio .selectorFechaReservaSocio .fechaReservaSeleccionada {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.areaSocio .selectorFechaReservaSocio .fechaReservaSeleccionada .etiquetaTarjeta {
    margin-bottom: 2px;
}

.areaSocio .selectorFechaReservaSocio .fechaReservaSeleccionada strong {
    font-size: 1.05rem;
}

/* jQuery UI añade el botón del calendario (.ui-datepicker-trigger) junto al input oculto */
.areaSocio .selectorFechaReservaSocio .botonCalendarioReserva .ui-datepicker-trigger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 1px solid var(--socioBorde);
    border-radius: 12px;
    font-size: 0;
    color: var(--socioPrincipal);
    background: #fff;
    cursor: pointer;
}

.areaSocio .selectorFechaReservaSocio .botonCalendarioReserva .ui-datepicker-trigger:before {
    content: '\f073';
    font-family: 'Font Awesome 5 Free';
    font-size: 18px;
    font-weight: 400;
}

.areaSocio .selectorFechaReservaSocio .botonCalendarioReserva .ui-datepicker-trigger:hover {
    border-color: var(--socioPrincipal);
    background-color: rgba(var(--socioPrincipalRgb), .06);
}

/* Calendario desplegable de las reservas (jQuery UI lo añade al body: lleva la clase calendarioSocio) */
body .ui-datepicker.calendarioSocio.ui-widget-content {
    width: 308px;
    max-width: calc(100vw - 32px);
    padding: 14px 14px 10px;
    border: 1px solid var(--socioBorde);
    border-radius: 16px;
    font-family: inherit;
    color: var(--socioTexto);
    background: #fff;
    box-shadow: 0 18px 40px rgba(16, 24, 40, .18);
    z-index: 1060 !important;
}

/* En móvil, jQuery UI lo pega al borde de la pantalla: se centra */
@media (max-width: 575.98px) {
    body .ui-datepicker.calendarioSocio.ui-widget-content {
        left: 50% !important;
        transform: translateX(-50%);
    }
}

body .ui-datepicker.calendarioSocio .ui-datepicker-header {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 36px;
    margin-bottom: 8px;
    padding: 0;
    border: 0;
}

body .ui-datepicker.calendarioSocio.ui-widget-content .ui-datepicker-header .ui-datepicker-title {
    margin: 0 40px;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.3;
    text-transform: capitalize;
    color: var(--socioTexto);
}

body .ui-datepicker.calendarioSocio .ui-datepicker-header .ui-datepicker-prev,
body .ui-datepicker.calendarioSocio .ui-datepicker-header .ui-datepicker-next {
    top: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 50%;
    font-size: 13px;
    line-height: 1;
    color: var(--socioTexto) !important;
    background: var(--socioFondoSuave);
}

body .ui-datepicker.calendarioSocio .ui-datepicker-header .ui-datepicker-prev {
    left: 0;
}

body .ui-datepicker.calendarioSocio .ui-datepicker-header .ui-datepicker-next {
    right: 0;
}

body .ui-datepicker.calendarioSocio .ui-datepicker-header .ui-datepicker-prev.ui-state-hover,
body .ui-datepicker.calendarioSocio .ui-datepicker-header .ui-datepicker-next.ui-state-hover {
    color: var(--socioPrincipal) !important;
    background: rgba(var(--socioPrincipalRgb), .1);
}

body .ui-datepicker.calendarioSocio table.ui-datepicker-calendar {
    margin: 0;
    font-size: .95rem;
    border-collapse: separate;
    border-spacing: 2px;
}

body .ui-datepicker.calendarioSocio table.ui-datepicker-calendar tbody {
    background: none;
}

body .ui-datepicker.calendarioSocio table.ui-datepicker-calendar thead th {
    padding: 4px 0 6px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: var(--socioTextoSuave);
}

body .ui-datepicker.calendarioSocio table.ui-datepicker-calendar tbody td {
    padding: 0;
    border: 0;
    opacity: 1;
}

body .ui-datepicker.calendarioSocio.ui-widget-content table.ui-datepicker-calendar tbody td .ui-state-default {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 38px;
    padding: 0;
    border: 1px solid transparent;
    border-radius: 10px;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    color: var(--socioTexto);
    background: transparent;
    transition: background-color .15s ease, color .15s ease;
}

body .ui-datepicker.calendarioSocio.ui-widget-content table.ui-datepicker-calendar tbody td a.ui-state-default:hover {
    color: var(--socioPrincipal);
    background-color: rgba(var(--socioPrincipalRgb), .1);
}

/* Días de los meses de al lado: se ven más suaves para distinguir el mes que se está mirando */
body .ui-datepicker.calendarioSocio.ui-widget-content table.ui-datepicker-calendar tbody td.ui-datepicker-other-month .ui-state-default {
    font-weight: 500;
    color: var(--socioTextoSuave);
}

/* Días fuera de plazo (pasados o más allá de la antelación máxima) */
body .ui-datepicker.calendarioSocio.ui-widget-content table.ui-datepicker-calendar tbody td.ui-datepicker-unselectable .ui-state-default {
    font-weight: 400;
    color: var(--socioTextoSuave);
    background: transparent;
    opacity: .45;
    cursor: default;
}

body .ui-datepicker.calendarioSocio.ui-widget-content table.ui-datepicker-calendar tbody td.ui-datepicker-today .ui-state-default {
    border-color: rgba(var(--socioPrincipalRgb), .45);
    color: var(--socioPrincipal);
}

body .ui-datepicker.calendarioSocio.ui-widget-content table.ui-datepicker-calendar tbody td.ui-datepicker-current-day a.ui-state-default {
    border-color: var(--socioPrincipal);
    color: var(--socioPrincipalTexto);
    background-color: var(--socioPrincipal);
}

.areaSocio .diasReservaSocio {
    display: flex;
    gap: 8px;
    padding: 2px 16px 4px;
    overflow-x: auto;
    scroll-snap-type: x proximity;
    /* Sin esto, el encaje del desplazamiento pega el primer día al borde e ignora el padding */
    scroll-padding-inline: 16px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.areaSocio .diasReservaSocio::-webkit-scrollbar {
    display: none;
}

.areaSocio .diaReservaSocio {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 0 0 auto;
    min-width: 54px;
    padding: 8px 4px;
    border: 1px solid var(--socioBorde);
    border-radius: 14px;
    line-height: 1.15;
    text-decoration: none;
    color: var(--socioTexto);
    background-color: #fff;
    scroll-snap-align: start;
    transition: border-color .15s ease, background-color .15s ease;
}

.areaSocio a.diaReservaSocio:hover,
.areaSocio a.diaReservaSocio:focus {
    color: var(--socioTexto);
    text-decoration: none;
    border-color: var(--socioPrincipal);
}

.areaSocio .diaReservaSocio .semanaDiaReserva,
.areaSocio .diaReservaSocio .mesDiaReserva {
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--socioTextoSuave);
}

.areaSocio .diaReservaSocio .numeroDiaReserva {
    margin: 2px 0;
    font-size: 1.2rem;
    font-weight: 800;
}

.areaSocio .diaReservaSocio.seleccionado,
.areaSocio a.diaReservaSocio.seleccionado:hover,
.areaSocio a.diaReservaSocio.seleccionado:focus {
    border-color: var(--socioPrincipal);
    color: var(--socioPrincipalTexto);
    background-color: var(--socioPrincipal);
}

.areaSocio .diaReservaSocio.seleccionado .semanaDiaReserva,
.areaSocio .diaReservaSocio.seleccionado .mesDiaReserva {
    color: inherit;
    opacity: .85;
}


/* --- Duración ------------------------------------------------------------- */
.areaSocio .seccionDuracionReserva {
    margin-top: 20px;
}

.areaSocio .duracionesReservaSocio {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 6px;
}

.areaSocio .duracionReservaSocio {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 16px;
    border: 1px solid var(--socioBorde);
    border-radius: 999px;
    font-weight: 700;
    text-decoration: none;
    color: var(--socioTexto);
    background-color: #fff;
}

.areaSocio .duracionReservaSocio:hover,
.areaSocio .duracionReservaSocio:focus {
    color: var(--socioTexto);
    text-decoration: none;
    border-color: var(--socioPrincipal);
}

.areaSocio .duracionReservaSocio.seleccionado,
.areaSocio .duracionReservaSocio.seleccionado:hover,
.areaSocio .duracionReservaSocio.seleccionado:focus {
    border-color: var(--socioPrincipal);
    color: var(--socioPrincipal);
    background-color: rgba(var(--socioPrincipalRgb), .1);
    box-shadow: inset 0 0 0 1px var(--socioPrincipal);
}

/* --- Leyenda -------------------------------------------------------------- */
.areaSocio .cabeceraHorasReserva {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px 16px;
    margin-bottom: 12px;
}

.areaSocio .cabeceraHorasReserva .tituloSeccionSocio {
    margin: 0;
}

.areaSocio .leyendaReservaSocio {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 14px;
    margin: 0;
    padding: 0;
    list-style: none;
    font-size: .8rem;
    color: var(--socioTextoSuave);
}

.areaSocio .leyendaReservaSocio li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.areaSocio .leyendaReservaSocio .muestraLeyenda {
    width: 14px;
    height: 14px;
    border-radius: 5px;
    border: 1px solid var(--socioBorde);
    background-color: #fff;
}

.areaSocio .leyendaReservaSocio .muestraLeyenda.disponible {
    border-color: var(--socioPrincipal);
    background-color: rgba(var(--socioPrincipalRgb), .1);
}

.areaSocio .leyendaReservaSocio .muestraLeyenda.propia {
    border-color: #2f9e64;
    background-color: #2f9e64;
}

.areaSocio .leyendaReservaSocio .muestraLeyenda.ocupada {
    background-color: var(--socioBorde);
}

.areaSocio .leyendaReservaSocio .muestraLeyenda.noDisponible {
    background-image: repeating-linear-gradient(135deg, var(--socioBorde) 0 2px, transparent 2px 5px);
}

/* --- Horas por pista / profesional --------------------------------------- */
.areaSocio .zonasReservaSocio {
    display: grid;
    gap: 16px;
}

.areaSocio .zonaReservaSocio {
    height: auto;
    padding: 16px;
}

.areaSocio .cabeceraZonaReserva {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 4px 12px;
    margin-bottom: 12px;
}

.areaSocio .cabeceraZonaReserva .nombreZonaReserva {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--socioTexto);
}

.areaSocio .cabeceraZonaReserva .disponiblesZonaReserva {
    font-size: .82rem;
    font-weight: 600;
    color: #2f9e64;
}

.areaSocio .cabeceraZonaReserva .disponiblesZonaReserva.sinDisponibles {
    color: var(--socioTextoSuave);
}

.areaSocio .horasReservaSocio,
.areaSocio .plazasClaseReserva {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(76px, 1fr));
    gap: 8px;
}

.areaSocio .horaReservaSocio {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 42px;
    padding: 6px 8px;
    border: 1px solid var(--socioBorde);
    border-radius: 12px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    text-align: center;
    line-height: 1.2;
    text-decoration: none;
    color: var(--socioTextoSuave);
    background-color: var(--socioFondoSuave);
    word-break: break-word;
}

.areaSocio a.horaReservaSocio.disponible {
    border-color: var(--socioPrincipal);
    color: var(--socioPrincipal);
    background-color: #fff;
    transition: background-color .15s ease, color .15s ease;
}

.areaSocio a.horaReservaSocio.disponible:hover,
.areaSocio a.horaReservaSocio.disponible:focus {
    text-decoration: none;
    color: var(--socioPrincipalTexto);
    background-color: var(--socioPrincipal);
}

.areaSocio .horaReservaSocio.propia {
    border-color: #2f9e64;
    color: #fff;
    background-color: #2f9e64;
}

.areaSocio .horaReservaSocio.ocupada {
    text-decoration: line-through;
    opacity: .75;
}

.areaSocio .horaReservaSocio.noDisponible {
    font-weight: 600;
    background-color: #fff;
    background-image: repeating-linear-gradient(135deg, var(--socioFondoSuave) 0 4px, transparent 4px 9px);
    opacity: .75;
}

.areaSocio .calendarioColumnasReserva {
    height: auto;
    max-height: 70vh;
    padding: 0;
    overflow: auto;
}

/* Horas de varias zonas en columnas: cabecera de zonas y columna de horas fijas al desplazarse */
.areaSocio .tablaColumnasReserva {
    width: 100%;
    min-width: calc(64px + var(--columnasReserva) * 84px);
    border-collapse: separate;
    border-spacing: 0;
}

.areaSocio .tablaColumnasReserva th,
.areaSocio .tablaColumnasReserva td {
    padding: 4px;
    border: 0;
    text-align: center;
    vertical-align: middle;
}

.areaSocio .tablaColumnasReserva thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 12px 6px;
    border-bottom: 1px solid var(--socioBorde);
    font-size: .85rem;
    font-weight: 800;
    color: var(--socioTexto);
    background-color: #fff;
}

.areaSocio .tablaColumnasReserva .horaColumnasReserva {
    position: sticky;
    left: 0;
    z-index: 1;
    width: 64px;
    padding: 4px 8px;
    border-right: 1px solid var(--socioBorde);
    font-size: .85rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--socioTextoSuave);
    background-color: #fff;
}

.areaSocio .tablaColumnasReserva thead .horaColumnasReserva {
    z-index: 3;
}

.areaSocio .tablaColumnasReserva tbody tr:first-child > * {
    padding-top: 8px;
}

.areaSocio .tablaColumnasReserva tbody tr:last-child > * {
    padding-bottom: 8px;
}

.areaSocio .tablaColumnasReserva .horaReservaSocio {
    display: flex;
    width: 100%;
    min-height: 38px;
    font-size: .88rem;
}

.areaSocio .calendarioColumnasReserva .motivoZonaReserva {
    margin: 0;
    padding: 16px;
}

/* --- Clases --------------------------------------------------------------- */
.areaSocio .clasesReservaSocio {
    display: grid;
    gap: 12px;
}

.areaSocio .claseReservaSocio {
    height: auto;
    padding: 14px 16px;
}

.areaSocio .cabeceraClaseReserva {
    display: flex;
    align-items: center;
    gap: 14px;
}

.areaSocio .cabeceraClaseReserva .horarioClaseReserva {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 68px;
    padding: 8px 6px;
    border-radius: 12px;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
    color: var(--socioPrincipal);
    background-color: rgba(var(--socioPrincipalRgb), .1);
}

.areaSocio .cabeceraClaseReserva .horarioClaseReserva strong {
    font-size: 1.1rem;
    font-weight: 800;
}

.areaSocio .cabeceraClaseReserva .horarioClaseReserva span {
    font-size: .8rem;
    font-weight: 600;
    opacity: .8;
}

.areaSocio .cabeceraClaseReserva .datosClaseReserva {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    gap: 2px;
}

.areaSocio .cabeceraClaseReserva .plazasLibresClase {
    font-weight: 700;
    color: #2f9e64;
}

.areaSocio .claseReservaSocio .textoClaseReserva {
    font-size: .88rem;
    line-height: 1.35;
    color: var(--socioTextoSuave);
}

.areaSocio .cabeceraClaseReserva .reservarClaseSocio {
    flex-shrink: 0;
}

.areaSocio .claseReservaSocio .plazasClaseReserva,
.areaSocio .claseReservaSocio .mapaClaseReserva {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--socioBorde);
}

.areaSocio .claseReservaSocio.claseNoReservable .horarioClaseReserva {
    color: var(--socioTextoSuave);
    background-color: var(--socioFondoSuave);
}

.areaSocio .claseReservaSocio .mapaClaseReserva .textoClaseReserva {
    margin: 0 0 10px;
}

.areaSocio .claseReservaSocio .contenedorMapaReserva {
    margin: 0 auto 12px;
    /* El mapa sin escalar no debe ensanchar la página: el zoom se calcula sobre el ancho real disponible */
    overflow: hidden;
}

.areaSocio .claseReservaSocio .contenedorMapaReserva img {
    max-width: none;
}

.areaSocio .zonaReservaSocio .motivoZonaReserva {
    margin: 0;
    font-size: .9rem;
    color: var(--socioTextoSuave);
}

/* Sin esto, las tarjetas de la rejilla crecen hasta el ancho del mapa (que se genera con ancho fijo) */
.areaSocio .clasesReservaSocio > *,
.areaSocio .zonasReservaSocio > * {
    min-width: 0;
}

/* --- Marcas de disponibilidad de cada día (se cargan en segundo plano) --- */
.areaSocio .diaReservaSocio {
    position: relative;
    padding-bottom: 14px;
}

.areaSocio .marcaDiaReserva {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
}

.areaSocio .diaReservaSocio .marcaDiaReserva {
    position: absolute;
    bottom: 5px;
    left: 50%;
    margin-left: -3.5px;
}

.areaSocio .marcaDiaReserva.disponible,
.areaSocio .diaReservaSocio.disponible .marcaDiaReserva {
    background-color: #2f9e64;
}

.areaSocio .marcaDiaReserva.completo,
.areaSocio .diaReservaSocio.completo .marcaDiaReserva {
    background-color: #fff;
    box-shadow: inset 0 0 0 1.5px var(--socioTextoSuave);
}

.areaSocio .diaReservaSocio.seleccionado.disponible .marcaDiaReserva {
    background-color: var(--socioPrincipalTexto);
}

.areaSocio .diaReservaSocio.sinDisponibilidad:not(.seleccionado) .numeroDiaReserva {
    font-weight: 600;
    color: var(--socioTextoSuave);
}

.areaSocio .diaReservaSocio.fueraPlazo {
    opacity: .4;
    cursor: not-allowed;
}

.areaSocio .pieFechaReserva {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 16px;
    margin-top: 10px;
    padding: 10px 16px 0;
    border-top: 1px solid var(--socioBorde);
}

.areaSocio .pieFechaReserva[hidden],
.areaSocio .pieFechaReserva .irDiaDisponibleReserva[hidden] {
    display: none;
}

.areaSocio .pieFechaReserva .irDiaDisponibleReserva {
    min-height: 38px;
    padding: 6px 14px;
    font-size: .88rem;
}

.areaSocio .estadoVacioSocio .irDiaDisponibleReserva {
    margin-top: 16px;
}

/* ==========================================================================
   RESERVAS: PARRILLA DE CLASES (groupclasses)
   En móvil se ve un día, elegido en la tira de la semana; en escritorio, la semana entera en columnas
   ========================================================================== */

.areaSocio.vistaParrillaReservaSocio > .saldoSocio,
.areaSocio.vistaParrillaReservaSocio > .notaFormulario {
    margin-bottom: 16px;
}

.areaSocio.vistaParrillaReservaSocio .notaFormulario > div {
    min-width: 0;
    font-size: .9rem;
    line-height: 1.45;
}

/* --- Semana --------------------------------------------------------------- */
.areaSocio .selectorSemanaParrilla .cabeceraFechaReserva {
    gap: 8px;
}

.areaSocio .selectorSemanaParrilla .fechaReservaSeleccionada {
    flex: 1;
    align-items: center;
    text-align: center;
}

.areaSocio .navegarSemanaParrilla {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border: 1px solid var(--socioBorde);
    border-radius: 12px;
    color: var(--socioPrincipal);
    background-color: #fff;
}

.areaSocio a.navegarSemanaParrilla:hover,
.areaSocio a.navegarSemanaParrilla:focus {
    text-decoration: none;
    color: var(--socioPrincipal);
    border-color: var(--socioPrincipal);
    background-color: rgba(var(--socioPrincipalRgb), .06);
}

.areaSocio .navegarSemanaParrilla.desactivado {
    opacity: .35;
}

/* Los siete días caben sin desplazar en un móvil */
.areaSocio .diasParrillaReserva {
    gap: 6px;
}

.areaSocio button.diaReservaSocio {
    flex: 1 0 44px;
    min-width: 44px;
    font: inherit;
    cursor: pointer;
}

.areaSocio .diaReservaSocio.diaPasado:not(.seleccionado) {
    opacity: .45;
}

/* --- Filtros -------------------------------------------------------------- */
.areaSocio .filtroActividadesParrilla {
    display: flex;
    gap: 8px;
    margin-top: 16px;
    padding: 2px 0 4px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.areaSocio .filtroActividadesParrilla::-webkit-scrollbar {
    display: none;
}

.areaSocio .filtroActividadParrilla {
    flex-shrink: 0;
    min-height: 38px;
    padding: 7px 14px;
    border: 1px solid var(--socioBorde);
    border-radius: 999px;
    font: inherit;
    font-size: .88rem;
    font-weight: 700;
    white-space: nowrap;
    color: var(--socioTexto);
    background-color: #fff;
    cursor: pointer;
}

.areaSocio .filtroActividadParrilla:hover {
    border-color: var(--socioPrincipal);
}

.areaSocio .filtroActividadParrilla.seleccionado {
    border-color: var(--socioPrincipal);
    color: var(--socioPrincipalTexto);
    background-color: var(--socioPrincipal);
}

.areaSocio .otrosFiltrosParrilla {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
    margin-top: 12px;
}

/* --- Clases --------------------------------------------------------------- */
.areaSocio .parrillaReservaSocio {
    margin-top: 16px;
}

.areaSocio .diaParrillaReserva,
.areaSocio .cabeceraDiaParrilla {
    display: none;
}

.areaSocio .diaParrillaReserva.seleccionado {
    display: block;
}

.areaSocio .clasesParrillaReserva {
    display: grid;
    gap: 10px;
}

.areaSocio .claseParrillaReserva {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    height: auto;
    padding: 12px 14px 12px 18px;
    overflow: hidden;
}

.areaSocio .claseParrillaReserva[hidden] {
    display: none;
}

/* Color de la actividad (o de su categoría), como en la parrilla clásica */
.areaSocio .claseParrillaReserva:before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    width: 5px;
    background-color: var(--colorActividad, var(--socioPrincipal));
}

.areaSocio .horarioClaseParrilla {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    min-width: 60px;
    padding: 7px 6px;
    border-radius: 12px;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
    background-color: var(--socioFondoSuave);
}

.areaSocio .horarioClaseParrilla strong {
    font-size: 1.05rem;
    font-weight: 800;
}

.areaSocio .horarioClaseParrilla span {
    font-size: .78rem;
    font-weight: 600;
    color: var(--socioTextoSuave);
}

.areaSocio .datosClaseParrilla {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    gap: 2px;
}

.areaSocio .nombreClaseParrilla {
    font-weight: 800;
    line-height: 1.25;
    overflow-wrap: break-word;
}

.areaSocio .detalleClaseParrilla,
.areaSocio .mensajeClaseParrilla {
    font-size: .82rem;
    line-height: 1.3;
    color: var(--socioTextoSuave);
}

.areaSocio .plazasClaseParrilla {
    font-size: .82rem;
    font-weight: 700;
    color: #2f9e64;
}

.areaSocio .mensajeClaseParrilla {
    font-weight: 600;
}

.areaSocio .accionesClaseParrilla {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    gap: 8px;
}

.areaSocio .infoClaseParrilla {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid var(--socioBorde);
    border-radius: 50%;
    font-size: 13px;
    color: var(--socioTextoSuave);
    background-color: #fff;
    cursor: pointer;
}

.areaSocio .infoClaseParrilla:hover {
    color: var(--socioPrincipal);
    border-color: var(--socioPrincipal);
}

.areaSocio .reservarClaseParrilla {
    min-height: 40px;
    padding: 8px 14px;
    font-size: .9rem;
}

.areaSocio .claseParrillaReserva.pasada {
    opacity: .55;
}

.areaSocio .irDisponibleParrilla {
    margin-top: 12px;
}

.areaSocio .irDisponibleParrilla[hidden],
.areaSocio .sinClasesParrilla[hidden] {
    display: none;
}

/* --- Información de la clase (modal) ------------------------------------- */
.areaSocio.infoClaseParrillaSocio .imagenInfoClase {
    display: block;
    width: 100%;
    max-height: 220px;
    object-fit: cover;
    border-radius: var(--socioRadioPeq);
}

.areaSocio.infoClaseParrillaSocio .fotoProfesionalClase {
    width: 28px;
    height: 28px;
    margin: 0 -5px;
    border-radius: 50%;
    object-fit: cover;
}

.areaSocio.infoClaseParrillaSocio .barraIntensidadClase {
    display: block;
    flex-shrink: 0;
    width: 56px;
    height: 6px;
    border-radius: 3px;
    overflow: hidden;
    background-color: var(--socioFondoSuave);
}

.areaSocio.infoClaseParrillaSocio .barraIntensidadClase span {
    display: block;
    height: 100%;
    background-color: var(--socioPrincipal);
}

.areaSocio.infoClaseParrillaSocio .descripcionInfoClase {
    margin-top: 14px;
    font-size: .92rem;
    line-height: 1.5;
}

.areaSocio.infoClaseParrillaSocio .descripcionInfoClase img {
    max-width: 100%;
    height: auto;
}

.areaSocio.infoClaseParrillaSocio .botonesReservaSocio {
    margin-top: 16px;
}

/* --- Servicios de la confirmación de la clase ----------------------------- */
.areaSocio .serviciosClaseReserva {
    margin-top: 16px;
}

.areaSocio .servicioClaseReserva {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 12px;
    padding: 12px 14px;
    border: 1px solid var(--socioBorde);
    border-radius: var(--socioRadioPeq);
}

.areaSocio .servicioClaseReserva .nombreServicioClase {
    display: flex;
    flex-direction: column;
    flex: 1 1 160px;
    min-width: 0;
    gap: 2px;
}

.areaSocio .servicioClaseReserva .nombreServicioClase span {
    font-size: .85rem;
    color: var(--socioTextoSuave);
}

.areaSocio .servicioClaseReserva .botonesServicioClase {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.areaSocio .servicioClaseReserva .btnSocio {
    min-height: 40px;
    padding: 8px 16px;
    font-size: .9rem;
}

/* --- Escritorio: la semana en columnas ----------------------------------- */
@media (min-width: 992px) {
    .areaSocio .selectorSemanaParrilla {
        padding-bottom: 16px;
    }

    .areaSocio .selectorSemanaParrilla .cabeceraFechaReserva {
        padding-bottom: 0;
    }

    .areaSocio .diasParrillaReserva,
    .areaSocio .selectorSemanaParrilla .pieFechaReserva,
    .areaSocio .irDisponibleParrilla {
        display: none;
    }

    .areaSocio .filtroActividadesParrilla {
        flex-wrap: wrap;
        overflow: visible;
    }

    .areaSocio .parrillaReservaSocio {
        display: grid;
        grid-template-columns: repeat(var(--diasParrilla), minmax(0, 1fr));
        align-items: start;
        gap: 10px;
    }

    .areaSocio .diaParrillaReserva {
        display: block;
        min-width: 0;
    }

    .areaSocio .cabeceraDiaParrilla {
        display: flex;
        flex-direction: column;
        align-items: center;
        margin: 0 0 10px;
        padding: 8px 4px;
        border-radius: var(--socioRadioPeq);
        font-size: .75rem;
        font-weight: 700;
        line-height: 1.2;
        text-transform: uppercase;
        color: var(--socioTextoSuave);
        background-color: var(--socioFondoSuave);
    }

    .areaSocio .cabeceraDiaParrilla strong {
        font-size: 1.25rem;
        font-weight: 800;
        color: var(--socioTexto);
    }

    .areaSocio .diaParrillaReserva.hoy .cabeceraDiaParrilla,
    .areaSocio .diaParrillaReserva.hoy .cabeceraDiaParrilla strong {
        color: var(--socioPrincipalTexto);
        background-color: var(--socioPrincipal);
    }

    .areaSocio .diaParrillaReserva.diaPasado .cabeceraDiaParrilla {
        opacity: .55;
    }

    .areaSocio .claseParrillaReserva {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
        padding: 14px 10px 10px;
    }

    .areaSocio .claseParrillaReserva:before {
        right: 0;
        bottom: auto;
        width: auto;
        height: 4px;
    }

    .areaSocio .horarioClaseParrilla {
        flex-direction: row;
        align-items: baseline;
        gap: 4px;
        min-width: 0;
        padding: 0;
        background: none;
    }

    .areaSocio .horarioClaseParrilla strong {
        font-size: .95rem;
    }

    .areaSocio .horarioClaseParrilla span:before {
        content: '– ';
    }

    .areaSocio .nombreClaseParrilla {
        font-size: .9rem;
    }

    .areaSocio .accionesClaseParrilla {
        margin-top: 2px;
    }

    .areaSocio .infoClaseParrilla {
        width: 32px;
        height: 32px;
    }

    .areaSocio .reservarClaseParrilla {
        flex: 1;
        min-width: 0;
        min-height: 34px;
        padding: 6px 8px;
        font-size: .82rem;
    }

    .areaSocio .sinClasesParrilla {
        padding: 18px 10px;
        font-size: .82rem;
    }

    .areaSocio .sinClasesParrilla .iconoVacio {
        display: none;
    }
}

/* ==========================================================================
   RESERVAS: MODALES DE CONFIRMACIÓN Y RESULTADO
   (el modal se añade al body, fuera de .areaSocio: su contenido lleva su propio .areaSocio)
   ========================================================================== */

body .modal.modalReservaSocio .modal-dialog .modal-content {
    border: 0;
    border-radius: 20px;
    box-shadow: 0 24px 60px rgba(16, 24, 40, .25);
    overflow: hidden;
}

body .modal.modalReservaSocio .modal-dialog .modal-content .modal-header {
    align-items: center;
    padding: 18px 20px 6px;
    border: 0;
    border-radius: 0;
    color: var(--socioTexto);
    background: #fff;
}

body .modal.modalReservaSocio .modal-dialog .modal-content .modal-header .modal-title {
    font-size: 1.15rem;
    font-weight: 800;
    text-transform: none;
    color: var(--socioTexto);
}

body .modal.modalReservaSocio .modal-dialog .modal-content .modal-header .close-window:hover {
    color: var(--socioTexto);
}

body .modal.modalReservaSocio .modal-dialog .modal-content .modal-header .close-window {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 16px;
    color: var(--socioTextoSuave);
    background-color: var(--socioFondoSuave);
    cursor: pointer;
}

body .modal.modalReservaSocio .modal-dialog .modal-content .modal-body {
    padding: 12px 20px 20px;
    font-size: 1rem;
    line-height: 1.45;
    text-align: left;
    color: var(--socioTexto);
}

body .modal.modalReservaSocio .modal-dialog .modal-content .modal-footer {
    display: none;
}

/* En móvil, el modal sale como hoja desde abajo */
@media (max-width: 575.98px) {
    .modalReservaSocio .modal-dialog {
        display: flex;
        align-items: flex-end;
        min-height: 100%;
        margin: 0;
    }

    body .modal.modalReservaSocio .modal-dialog .modal-content {
        border-radius: 22px 22px 0 0;
    }

    body .modal.modalReservaSocio .modal-dialog .modal-content .modal-body {
        padding-bottom: calc(20px + env(safe-area-inset-bottom));
    }
}

.modalReservaSocio .areaSocio {
    padding-bottom: 0;
}

.areaSocio.confirmacionReservaSocio .resumenReservaSocio {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: var(--socioRadio);
    background-color: rgba(var(--socioPrincipalRgb), .07);
}

.areaSocio.confirmacionReservaSocio .iconoResumenReserva {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    font-size: 19px;
    color: var(--socioPrincipalTexto);
    background-color: var(--socioPrincipal);
}

.areaSocio.confirmacionReservaSocio .textoResumenReserva {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.3;
}

.areaSocio.confirmacionReservaSocio .textoResumenReserva strong {
    font-size: 1.05rem;
    word-break: break-word;
}

.areaSocio.confirmacionReservaSocio .textoResumenReserva span {
    font-size: .88rem;
    color: var(--socioTextoSuave);
}

.areaSocio .datosReservaSocio {
    margin: 12px 0 0;
    padding: 0;
    list-style: none;
}

.areaSocio .datosReservaSocio li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 2px;
    border-bottom: 1px solid var(--socioBorde);
}

.areaSocio .datosReservaSocio li > i {
    width: 18px;
    text-align: center;
    color: var(--socioTextoSuave);
}

.areaSocio .datosReservaSocio .etiquetaDatoReserva {
    flex: 1;
    color: var(--socioTextoSuave);
}

.areaSocio .datosReservaSocio li strong {
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.areaSocio .accionesExtraReserva {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.areaSocio .accionesExtraReserva .btnSocio {
    flex: 1 1 auto;
    min-height: 40px;
    padding: 8px 14px;
    font-size: .9rem;
}

.areaSocio .descuentoReservaSocio {
    display: flex;
    gap: 10px;
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: var(--socioRadioPeq);
    font-size: .88rem;
    color: #1f6f46;
    background-color: rgba(47, 158, 100, .1);
}

.areaSocio .descuentoReservaSocio i {
    margin-top: 3px;
}

.areaSocio .precioReservaSocio {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 14px;
    padding: 14px 16px;
    border-radius: var(--socioRadio);
    background-color: var(--socioFondoSuave);
}

.areaSocio .precioReservaSocio .etiquetaPrecioReserva {
    display: flex;
    flex-direction: column;
    font-weight: 600;
    color: var(--socioTextoSuave);
}

.areaSocio .precioReservaSocio .etiquetaPrecioReserva small {
    font-weight: 400;
}

.areaSocio .precioReservaSocio strong {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--socioTexto);
}

.areaSocio .codigoPromocionalReserva {
    margin-top: 16px;
}

.areaSocio .codigoPromocionalReserva label {
    margin-bottom: 6px;
    font-size: .85rem;
    font-weight: 700;
    color: var(--socioTextoSuave);
}

.areaSocio .codigoPromocionalReserva .filaCodigoPromocional {
    display: flex;
    gap: 8px;
}

.areaSocio .codigoPromocionalReserva .form-control {
    flex: 1;
    min-width: 0;
    height: 44px;
    border-radius: 12px;
}

.areaSocio .botonesReservaSocio {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.areaSocio .botonesReservaSocio .btnSocio.btnSocioBloque + .btnSocio.btnSocioBloque {
    margin-top: 0;
}

.areaSocio .botonesReservaSocio .notaFormulario {
    margin: 4px 0 0;
}

.areaSocio .botonesReservaSocio .notaFormulario > div {
    font-size: .85rem;
    line-height: 1.4;
}

.areaSocio .sesionesReservaSocio {
    margin: 0;
    font-size: .9rem;
    color: var(--socioPrincipal);
}

.areaSocio .bonosReservaSocio {
    display: grid;
    gap: 8px;
    margin-top: 6px;
}

.areaSocio .bonoReservaSocio {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--socioBorde);
    border-radius: var(--socioRadioPeq);
    text-decoration: none;
    color: var(--socioTexto);
}

.areaSocio .bonoReservaSocio:hover,
.areaSocio .bonoReservaSocio:focus {
    text-decoration: none;
    color: var(--socioTexto);
    border-color: var(--socioPrincipal);
}

.areaSocio .bonoReservaSocio strong {
    flex-shrink: 0;
    color: var(--socioPrincipal);
}

/* --- Resultado ---------------------------------------------------------- */
.areaSocio.resultadoReservaSocio {
    text-align: center;
}

.areaSocio.resultadoReservaSocio .iconoResultadoReserva {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 4px auto 12px;
    border-radius: 50%;
    font-size: 28px;
    color: #fff;
    background-color: #2f9e64;
    box-shadow: 0 0 0 8px rgba(47, 158, 100, .14);
}

.areaSocio.resultadoReservaSocio .iconoResultadoReserva.pendiente {
    background-color: #d99a1e;
    box-shadow: 0 0 0 8px rgba(217, 154, 30, .16);
}

.areaSocio.resultadoReservaSocio .tituloResultadoReserva {
    margin: 0 0 6px;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--socioTexto);
}

.areaSocio.resultadoReservaSocio .textoResultadoReserva {
    margin: 0;
    color: var(--socioTextoSuave);
}

.areaSocio.resultadoReservaSocio .avisoSocio {
    margin-top: 0;
    text-align: left;
}

/* ==========================================================================
   RESERVAS: ANULAR / LIBERAR RESERVA (modales de "Mis reservas" y páginas de la acción)
   ========================================================================== */

.areaSocio.confirmarAccionReservaSocio {
    text-align: center;
}

.areaSocio.confirmarAccionReservaSocio .iconoConfirmarAccion {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin: 0 auto 10px;
    border-radius: 50%;
    font-size: 26px;
    color: var(--socioPrincipal);
    background-color: rgba(var(--socioPrincipalRgb), .1);
}

.areaSocio.confirmarAccionReservaSocio.accionPeligrosa .iconoConfirmarAccion {
    color: var(--socioPeligro);
    background-color: rgba(var(--socioPeligroRgb), .1);
}

.areaSocio.confirmarAccionReservaSocio .preguntaConfirmarAccion {
    margin: 0 0 16px;
    color: var(--socioTexto);
}

.areaSocio.confirmarAccionReservaSocio .resumenReservaSocio {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: var(--socioRadio);
    text-align: left;
    background-color: var(--socioFondoSuave);
}

.areaSocio.confirmarAccionReservaSocio .resumenReservaSocio .horaReserva {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-shrink: 0;
    min-width: 64px;
    padding: 8px 6px;
    border-radius: 12px;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
    background-color: #fff;
}

.areaSocio.confirmarAccionReservaSocio .resumenReservaSocio .horaReserva strong {
    font-size: 1.05rem;
    font-weight: 800;
}

.areaSocio.confirmarAccionReservaSocio .resumenReservaSocio .horaReserva span {
    font-size: .8rem;
    color: var(--socioTextoSuave);
}

.areaSocio.confirmarAccionReservaSocio .textoResumenReserva {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.35;
}

.areaSocio.confirmarAccionReservaSocio .textoResumenReserva span {
    font-size: .88rem;
    color: var(--socioTextoSuave);
}

.areaSocio.vistaAccionReservaSocio .tarjetaAccionReserva {
    max-width: 520px;
    height: auto;
    margin: 0 auto;
}

.areaSocio.vistaAccionReservaSocio .procesoAccionReserva {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    color: var(--socioTextoSuave);
}

.areaSocio.vistaAccionReservaSocio .procesoAccionReserva .ruedaCargando {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 4px solid rgba(var(--socioPrincipalRgb), .2);
    border-top-color: var(--socioPrincipal);
    animation: giroCargandoSocio .8s linear infinite;
}

.areaSocio.vistaAccionReservaSocio .resultadoReservaSocio {
    text-align: center;
}

.areaSocio.vistaAccionReservaSocio .resultadoReservaSocio .iconoResultadoReserva {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    margin: 4px auto 12px;
    border-radius: 50%;
    font-size: 28px;
    color: #fff;
    background-color: #2f9e64;
    box-shadow: 0 0 0 8px rgba(47, 158, 100, .14);
}

.areaSocio.vistaAccionReservaSocio .resultadoReservaSocio .tituloResultadoReserva {
    margin: 0 0 6px;
    font-size: 1.25rem;
    font-weight: 800;
}

.areaSocio.vistaAccionReservaSocio .resultadoReservaSocio .textoResultadoReserva {
    margin: 0;
    color: var(--socioTextoSuave);
}

.areaSocio.vistaAccionReservaSocio .resultadoReservaSocio .avisoSocio {
    margin-top: 0;
    text-align: left;
}

/* ==========================================================================
   INSCRIPCIÓN A CURSOS
   ========================================================================== */

.areaSocio.vistaCursosSocio {
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
}

.areaSocio.vistaCursosSocio > .tarjetaSocio,
.areaSocio.vistaCursosSocio > .barraCarritoTienda,
.areaSocio.vistaCursosSocio > .notaFormulario {
    height: auto;
    margin-bottom: 16px;
}

/* --- Persona a la que se inscribe (gestión de familias) ----------------- */
.areaSocio .personaCursosSocio {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
}

.areaSocio .personaCursosSocio .avatarFamiliarSocio {
    width: 42px;
    height: 42px;
}

.areaSocio .personaCursosSocio .btnSocio {
    flex-shrink: 0;
    min-height: 38px;
    padding: 6px 16px;
}

/* --- Selector de familiar: cada fila es un botón ------------------------ */
.areaSocio .seleccionFamiliarCursos {
    width: 100%;
    margin: 0;
    border: 0;
    font: inherit;
    text-align: left;
    color: var(--socioTexto);
    background-color: transparent;
    cursor: pointer;
    transition: background-color .15s ease;
}

.areaSocio .seleccionFamiliarCursos:hover,
.areaSocio .seleccionFamiliarCursos:focus {
    background-color: rgba(var(--socioPrincipalRgb), .06);
    outline: none;
}

.areaSocio .seleccionFamiliarCursos .flechaFila {
    color: var(--socioTextoSuave);
}

.areaSocio.vistaFamiliaCursosSocio .notaFormulario {
    margin-top: 16px;
}

/* --- Pestañas de tipos de servicio: en móvil se desplazan en horizontal --- */
.areaSocio .pestanasCursosSocio {
    display: flex;
    gap: 8px;
    margin: 4px -16px 18px;
    padding: 2px 16px 6px;
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.areaSocio .pestanasCursosSocio::-webkit-scrollbar {
    display: none;
}

@media (min-width: 768px) {
    .areaSocio .pestanasCursosSocio {
        flex-wrap: wrap;
        margin: 4px 0 20px;
        padding: 0;
        overflow: visible;
    }
}

.areaSocio .pestanaCursosSocio {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    min-height: 42px;
    padding: 8px 16px;
    border: 1.5px solid var(--socioBorde);
    border-radius: 999px;
    font-size: .92rem;
    font-weight: 700;
    white-space: nowrap;
    color: var(--socioTexto);
    background-color: #fff;
    box-shadow: var(--socioSombra);
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}

.areaSocio .pestanaCursosSocio:hover,
.areaSocio .pestanaCursosSocio:focus {
    border-color: rgba(var(--socioPrincipalRgb), .45);
    outline: none;
}

.areaSocio .pestanaCursosSocio.activa {
    border-color: var(--socioPrincipal);
    color: var(--socioPrincipalTexto);
    background-color: var(--socioPrincipal);
}

.areaSocio .contadorPestanaCursos {
    min-width: 22px;
    padding: 1px 7px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 800;
    text-align: center;
    color: var(--socioPrincipal);
    background-color: rgba(var(--socioPrincipalRgb), .12);
}

.areaSocio .pestanaCursosSocio.activa .contadorPestanaCursos {
    color: var(--socioPrincipal);
    background-color: #fff;
}

.areaSocio .descripcionTipoCursos {
    margin: 0 0 16px;
    color: var(--socioTextoSuave);
}

.areaSocio .descripcionTipoCursos p:last-child {
    margin-bottom: 0;
}

/* --- Imágenes del tipo de servicio (pw_tipo_servicio_descripcion.Imatge) --- */
.areaSocio .miniaturaPestanaCursos {
    display: inline-flex;
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    margin-left: -8px;
    overflow: hidden;
    border-radius: 50%;
    box-shadow: 0 0 0 2px #fff;
}

.areaSocio .miniaturaPestanaCursos img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.areaSocio .portadaTipoCursos {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: 170px;
    margin-bottom: 18px;
    overflow: hidden;
    border-radius: var(--socioRadio);
    box-shadow: var(--socioSombra);
    background-color: rgba(var(--socioPrincipalRgb), .12);
}

@media (min-width: 768px) {
    .areaSocio .portadaTipoCursos {
        min-height: 0;
        aspect-ratio: 1200 / 340;
    }
}

.areaSocio .portadaTipoCursos img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Degradado oscuro abajo para que el texto se lea sobre cualquier imagen */
.areaSocio .textoPortadaTipoCursos {
    position: relative;
    width: 100%;
    padding: 48px 18px 16px;
    color: #fff;
    background: linear-gradient(to top, rgba(10, 20, 35, .78) 0%, rgba(10, 20, 35, .45) 55%, rgba(10, 20, 35, 0) 100%);
}

@media (min-width: 768px) {
    .areaSocio .textoPortadaTipoCursos {
        padding: 64px 28px 22px;
    }
}

.areaSocio .textoPortadaTipoCursos h2 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.2;
    color: #fff;
    text-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}

.areaSocio .textoPortadaTipoCursos div {
    margin-top: 4px;
    font-size: .95rem;
    line-height: 1.4;
    color: rgba(255, 255, 255, .92);
}

.areaSocio .textoPortadaTipoCursos p:last-child {
    margin-bottom: 0;
}

/* --- Tarjeta de curso --------------------------------------------------- */
.areaSocio .imagenCursoSocio {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    font-size: 2.6rem;
    color: rgba(var(--socioPrincipalRgb), .4);
    background-color: rgba(var(--socioPrincipalRgb), .07);
}

.areaSocio .imagenCursoSocio img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.areaSocio .tarjetaCursoSocio.completo .imagenCursoSocio img,
.areaSocio .tarjetaCursoSocio.inscrito .imagenCursoSocio img {
    filter: grayscale(.6);
    opacity: .75;
}

.areaSocio .tarjetaCursoSocio {
    display: flex;
    flex-direction: column;
}

.areaSocio .cabeceraCursoSocio {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 16px 16px 0;
}

.areaSocio .nombreCursoSocio {
    flex: 1;
    min-width: 0;
    margin: 0;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.3;
    color: var(--socioTexto);
    overflow-wrap: anywhere;
}

.areaSocio .etiquetaCursoSocio {
    flex-shrink: 0;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 700;
    color: var(--socioPrincipal);
    background-color: rgba(var(--socioPrincipalRgb), .1);
}

.areaSocio .etiquetaCursoSocio.preinscripcion {
    color: #b7791f;
    background-color: rgba(214, 158, 46, .15);
}

.areaSocio .seleccionCursoSocio {
    display: flex;
    flex-shrink: 0;
    padding-top: 1px;
}

.areaSocio .tarjetaCursoSocio:has(.seleccionCursoSocio input:checked) {
    border-color: var(--socioPrincipal);
    box-shadow: 0 0 0 1px var(--socioPrincipal), var(--socioSombra);
}

.areaSocio .descripcionCursoSocio {
    padding: 8px 16px 0;
    font-size: .92rem;
    line-height: 1.45;
    color: var(--socioTextoSuave);
}

.areaSocio .descripcionCursoSocio p:last-child {
    margin-bottom: 0;
}

.areaSocio .datosCursoSocio {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
    padding: 12px 16px 0;
    list-style: none;
    font-size: .88rem;
    color: var(--socioTextoSuave);
}

.areaSocio .datosCursoSocio i {
    width: 18px;
    margin-right: 6px;
    text-align: center;
    color: rgba(var(--socioPrincipalRgb), .75);
}

.areaSocio .datosCursoSocio strong {
    color: var(--socioTexto);
}

.areaSocio .datosCursoSocio .plazasCursoSocio,
.areaSocio .datosCursoSocio .plazasCursoSocio i,
.areaSocio .datosCursoSocio .plazasCursoSocio strong {
    color: #2f9e64;
}

.areaSocio .datosCursoSocio .sinPlazasCursoSocio,
.areaSocio .datosCursoSocio .sinPlazasCursoSocio i {
    color: var(--socioPeligro);
}

.areaSocio .pieCursoSocio {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: auto;
    padding: 14px 16px;
    border-top: 1px solid var(--socioBorde);
    background-color: var(--socioFondoSuave);
}

.areaSocio .datosCursoSocio + .pieCursoSocio,
.areaSocio .descripcionCursoSocio + .pieCursoSocio,
.areaSocio .cabeceraCursoSocio + .pieCursoSocio {
    margin-top: 16px;
}

.areaSocio .tarjetaCursoSocio > :nth-last-child(2) {
    margin-bottom: 16px;
}

.areaSocio .preciosCursoSocio {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
}

.areaSocio .preciosCursoSocio span {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.areaSocio .preciosCursoSocio small {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--socioTextoSuave);
}

.areaSocio .preciosCursoSocio strong {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--socioPrincipal);
}

.areaSocio .botonCursoSocio {
    position: relative;
    gap: 8px;
    margin-left: auto;
    min-height: 44px;
    padding: 8px 18px;
}

.areaSocio .botonCursoSocio.desactivado {
    color: var(--socioTextoSuave);
    background-color: var(--socioBorde);
    cursor: default;
}

.areaSocio .botonCursoSocio .checkout-floating-element {
    left: 6px;
}

.areaSocio .tarjetaCursoSocio.completo .nombreCursoSocio,
.areaSocio .tarjetaCursoSocio.inscrito .nombreCursoSocio {
    color: var(--socioTextoSuave);
}

/* --- Selección de varios cursos (ServeisSeleccionarMultiCursos) --------- */
.areaSocio .barraSeleccionCursosSocio {
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin-top: 20px;
    padding: 12px 0;
    background-color: rgba(255, 255, 255, .92);
}

@media (min-width: 768px) {
    .areaSocio .barraSeleccionCursosSocio .btnSocio {
        width: auto;
        min-width: 240px;
    }
}

/* Condiciones (de un curso, de una cuota...) en un modal de confirmación: pueden ser largas */
.modalSocio .condicionesModalSocio {
    max-height: 40vh;
    margin-bottom: 16px;
    padding: 12px 14px;
    overflow-y: auto;
    border: 1px solid var(--socioBorde);
    border-radius: var(--socioRadioPeq);
    font-size: .9rem;
    background-color: var(--socioFondoSuave);
}

.modalSocio .condicionesModalSocio p:last-child {
    margin-bottom: 0;
}

/* Datos (etiqueta y valor) en un modal de confirmación: importe, periodicidad, datos de la factura... */
.modalSocio .tituloDatosModalSocio {
    margin: 0 0 8px;
    font-size: .75rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--socioTextoSuave);
}

.modalSocio .datosModalSocio {
    margin: 0 0 20px;
    padding: 4px 14px;
    list-style: none;
    border: 1px solid var(--socioBorde);
    border-radius: var(--socioRadioPeq);
    background-color: var(--socioFondoSuave);
}

.modalSocio .datosModalSocio li {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    color: var(--socioTextoSuave);
}

.modalSocio .datosModalSocio li + li {
    border-top: 1px solid var(--socioBorde);
}

.modalSocio .datosModalSocio strong {
    text-align: right;
    color: var(--socioTexto);
}

.modalSocio .datosModalSocio .importeModalSocio {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--socioPrincipal);
}

/* --- Mis inscripciones a cursos (reutiliza las tarjetas de "Mis inscripciones a Campus") --- */
/* Con imagen no hay icono a la izquierda del título: las fechas no necesitan su sangría */
.areaSocio .tarjetaInscripcionCampus.conImagen .fechasInscripcionCampus {
    padding-left: 16px;
}

.areaSocio .bajaInscripcionCurso {
    padding: 0 16px 16px;
    background-color: rgba(var(--socioPrincipalRgb), .03);
}

.areaSocio .bajaInscripcionCurso .btnSocio {
    gap: 8px;
    min-height: 44px;
    margin-top: 0;
}
