/* ——— Modales ingreso / cierre de sesión (estilo distribuidora385) ——— */
.fondo-auth {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
    z-index: 1000;
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
}

.fondo-auth.active {
    opacity: 1;
    visibility: visible;
}

.ventana-auth {
    position: fixed;
    top: 50%;
    left: 50%;
    width: min(22rem, calc(100vw - 2rem));
    max-height: calc(100vh - 2rem);
    overflow-y: auto;
    transform: translate(-50%, -50%) scale(0.96);
    padding: 1.35rem 1.25rem 1.15rem;
    background: #fff;
    color: #1a1a2e;
    border-radius: 14px;
    box-shadow: 0 18px 48px rgba(0, 0, 0, 0.45);
    text-align: center;
    box-sizing: border-box;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
    z-index: 1001;
    line-height: 1.45;
}

.ventana-auth.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.ventana-auth__cerrar {
    position: absolute;
    top: 0.45rem;
    right: 0.55rem;
    width: 2rem;
    height: 2rem;
    padding: 0;
    border: none;
    background: transparent;
    color: #666;
    font-size: 1.65rem;
    line-height: 1;
    cursor: pointer;
    border-radius: 6px;
}

.ventana-auth__cerrar:hover {
    color: #111;
    background: rgba(0, 0, 0, 0.06);
}

.ventana-auth__titulo {
    margin: 0.25rem 0 0.65rem;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #091444;
    line-height: 1.25;
}

.ventana-auth__emoji {
    margin: 0.15rem 0 0;
    font-size: 2rem;
    line-height: 1;
}

.ventana-auth__texto {
    margin: 0 0 1rem;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.92rem;
    color: #444;
    line-height: 1.5;
}

.ventana-auth__campos {
    text-align: left;
    margin-bottom: 1.1rem;
}

.ventana-auth__label {
    display: block;
    margin: 0.55rem 0 0.3rem;
    padding: 0;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    color: #333;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.ventana-auth__label:hover,
.ventana-auth__label:focus,
.ventana-auth__label:focus-within {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.ventana-auth__label:first-child {
    margin-top: 0;
}

#ventanaLogin .ventana-auth__input,
#ventanaLogin input.ventana-auth__input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.55rem 0.65rem;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 1rem;
    line-height: 1.35;
    text-align: left;
    border: 1px solid #c5c9d8 !important;
    border-radius: 8px;
    background: #fafafa;
    color: #111;
    outline: none !important;
    box-shadow: none !important;
    transition: background 0.15s ease;
}

#ventanaLogin .ventana-auth__input:hover,
#ventanaLogin input.ventana-auth__input:hover {
    border: 1px solid #c5c9d8 !important;
    outline: none !important;
    box-shadow: none !important;
    background: #f5f6f8;
}

#ventanaLogin .ventana-auth__input:focus,
#ventanaLogin .ventana-auth__input:focus-visible,
#ventanaLogin input.ventana-auth__input:focus,
#ventanaLogin input.ventana-auth__input:focus-visible {
    border: 1px solid #c5c9d8 !important;
    outline: none !important;
    box-shadow: none !important;
    background: #fff;
}

.ventana-auth__pass-wrap {
    position: relative;
}

.ventana-auth__pass-wrap .ventana-auth__input {
    padding-right: 2.75rem;
}

.ventana-auth__toggle-pass {
    position: absolute;
    right: 0.25rem;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: #5a6278;
    cursor: pointer;
}

.ventana-auth__toggle-pass:hover {
    color: #091444;
    background: rgba(0, 0, 0, 0.05);
    outline: none;
    box-shadow: none;
}

.ventana-auth__toggle-pass:focus {
    outline: none;
    box-shadow: none;
}

.ventana-auth__eye {
    display: block;
}

.ventana-auth__eye--hide {
    display: none;
}

.ventana-auth__toggle-pass.is-visible .ventana-auth__eye--show {
    display: none;
}

.ventana-auth__toggle-pass.is-visible .ventana-auth__eye--hide {
    display: block;
}

.ventana-auth__acciones {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: center;
    margin-top: 0.25rem;
}

.btn-auth {
    min-width: 7.5rem;
    padding: 0.5rem 1rem;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-auth--ghost {
    background: #f0f1f5;
    color: #333;
    border-color: #d0d4e0;
}

.btn-auth--ghost:hover {
    background: #e4e6ee;
}

.btn-auth--primary {
    background: linear-gradient(180deg, #ffcc66 0%, #fdba55 100%);
    color: #091444;
    border-color: #e8a830;
}

.btn-auth--primary:hover {
    background: linear-gradient(180deg, #ffd880 0%, #ffc76a 100%);
}

.btn-auth--danger {
    background: #c0392b;
    color: #fff;
    border-color: #962d22;
}

.btn-auth--danger:hover {
    background: #a93226;
}

/* Icono / acceso usuario en cabecera y portada */
.imgusuario {
    display: inline-block;
    border: 0;
    width: 40px;
    height: 40px;
    text-align: right;
    cursor: pointer;
    padding: 15px;
}

.imgusuario5 {
    display: inline-block;
    border: 0;
    width: 300px;
    height: 20px;
    text-align: center;
    cursor: pointer;
    padding: 15px;
    border: 3px solid #86a2f0;
}

#lblusuarioreg {
    cursor: pointer;
}

@media only screen and (max-width: 1220px) {
    .ventana-auth {
        width: min(20rem, calc(100vw - 1.5rem));
        padding: 1.15rem 1rem 1rem;
    }

    .ventana-auth__titulo {
        font-size: 1.1rem;
    }

    .ventana-auth__acciones {
        flex-direction: column;
    }

    .btn-auth {
        width: 100%;
        min-width: 0;
    }

    .imgusuario {
        width: 40px;
        height: 40px;
        padding: 5px;
    }

    .imgusuario5 {
        width: auto;
        max-width: 100%;
        height: auto;
        min-height: 12px;
        padding: 10px;
        box-sizing: border-box;
    }
}
