/*==================================================
LOGIN - ContactosW
Tema: negro + rojo (BestFans style)
==================================================*/

html,
body{
    margin:0;
    padding:0;

    font-family:'Segoe UI', 'Helvetica Neue', Arial, sans-serif;

    min-height:100vh;

    /* FONDO DE IMAGEN */
    background-image: url('../img/fondo.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    
    background-color: #000000;

    box-sizing:border-box;
}

/* Capa oscura para que resalte la tarjeta y el texto sea legible */
body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7); /* 0.7 es 70% de oscuridad. Ajusta a tu gusto */
    z-index: -1;
}

/*==================================================
WRAPPER
==================================================*/

.login-wrapper{
    min-height:100vh;

    display:flex;
    align-items:center;
    justify-content:center;

    padding:30px 16px;

    box-sizing:border-box;

    background: transparent;
}

/*==================================================
CARD
==================================================*/

.login-card{
    width:100%;
    max-width:420px;

    /* Hacemos la tarjeta un poco semitransparente para que se vea el fondo */
    background: rgba(10, 10, 10, 0.85); 
    
    /* Desenfoque de fondo (opcional pero se ve muy bien) */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    border:2px solid #dc2626;

    border-radius:20px;

    padding:40px 32px;

    box-shadow:
        0 0 0 1px rgba(220,38,38,.2),
        0 0 40px rgba(220,38,38,.25),
        0 20px 60px rgba(0,0,0,.8);

    animation:fadeInLogin .5s ease;

    box-sizing:border-box;

    position:relative;
}

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

/*==================================================
LOGO
==================================================*/

.login-logo{
    text-align:center;

    margin-bottom:22px;
}

.login-logo img{
    height:64px;
    width:auto;
    object-fit:contain;

    display:inline-block;
}

/*==================================================
TÍTULOS
==================================================*/

.login-titulo{
    text-align:center;

    font-size:26px;
    font-weight:800;

    color:#ffffff;

    margin:0 0 6px;

    letter-spacing:-.4px;
}

.login-subtitulo{
    text-align:center;

    font-size:14px;

    color:#a1a1aa;

    font-weight:500;

    margin:0 0 30px;
}

/*==================================================
CAMPOS
==================================================*/

.login-field{
    margin-bottom:18px;
}

.login-label{
    display:block;

    font-size:13.5px;
    font-weight:600;

    color:#e4e4e7;

    margin-bottom:8px;

    letter-spacing:.1px;
}

.login-input{
    width:100%;

    padding:13px 16px;

    background:#1a1a1a;

    border:1px solid #2a2a2a;
    border-radius:12px;

    font-size:15px;
    color:#ffffff;

    font-family:inherit;

    outline:none;

    transition:.2s;

    box-sizing:border-box;
}

.login-input::placeholder{
    color:#71717a;
}

.login-input:hover{
    background:#1f1f1f;
    border-color:#3a3a3a;
}

.login-input:focus{
    background:#1a1a1a;
    border-color:#dc2626;
    box-shadow:0 0 0 4px rgba(220,38,38,.15);
}

/*==================================================
CAMPO PASSWORD CON OJO
==================================================*/

.campo-password{
    position:relative;
}

.campo-password .login-input{
    padding-right:48px;
}

.btn-ojito{
    position:absolute;

    top:50%;
    right:8px;

    transform:translateY(-50%);

    width:36px;
    height:36px;

    border:none;
    border-radius:50%;

    background:transparent;
    color:#71717a;

    font-size:16px;

    display:flex;
    align-items:center;
    justify-content:center;

    cursor:pointer;

    transition:.2s;

    padding:0;
}

.btn-ojito:hover{
    background:rgba(255,255,255,.08);
    color:#ffffff;
}

.btn-ojito.activo{
    color:#dc2626;
    background:rgba(220,38,38,.1);
}

/*==================================================
OLVIDÉ CONTRASEÑA
==================================================*/

.login-olvide{
    text-align:right;

    margin:-4px 0 22px;
}

.login-olvide a{
    font-size:13px;
    color:#dc2626;

    font-weight:600;

    text-decoration:none;

    transition:.15s;
}

.login-olvide a:hover{
    color:#ef4444;
    text-decoration:underline;
}

/*==================================================
BOTÓN
==================================================*/

.login-btn{
    width:100%;

    padding:14px 20px;

    background:#dc2626;
    color:#ffffff;

    border:none;
    border-radius:12px;

    font-size:15.5px;
    font-weight:700;

    letter-spacing:.2px;

    cursor:pointer;

    box-shadow:0 8px 20px rgba(220,38,38,.35);

    transition:.25s;

    font-family:inherit;
}

.login-btn:hover:not(:disabled){
    background:#ef4444;
    transform:translateY(-2px);
    box-shadow:0 12px 28px rgba(220,38,38,.5);
}

.login-btn:active:not(:disabled){
    transform:translateY(0);
    box-shadow:0 6px 16px rgba(220,38,38,.35);
}

.login-btn:disabled{
    opacity:.7;
    cursor:not-allowed;
    transform:none;
}

/*==================================================
DIVISOR "o"
==================================================*/

.login-divisor{
    display:flex;
    align-items:center;

    margin:26px 0 20px;

    gap:12px;
}

.login-divisor::before,
.login-divisor::after{
    content:'';
    flex:1;
    height:1px;
    background:#27272a;
}

.login-divisor span{
    font-size:12.5px;
    color:#71717a;
    font-weight:500;
}

/*==================================================
REGISTRO
==================================================*/

.login-registro{
    text-align:center;

    font-size:14px;
    color:#a1a1aa;

    margin:0;
}

.login-registro a{
    color:#dc2626;

    font-weight:700;

    text-decoration:none;

    transition:.15s;
}

.login-registro a:hover{
    color:#ef4444;
    text-decoration:underline;
}

/*==================================================
MÓVIL: FORMULARIO FULL-SCREEN
==================================================*/

@media(max-width:600px){

    .login-wrapper{
        padding:0;
        min-height:100vh;
        align-items:stretch;
    }

    .login-card{
        max-width:100%;

        border-radius:0;
        border:none;

        min-height:100vh;

        padding:50px 26px 40px;

        display:flex;
        flex-direction:column;
        justify-content:center;

        box-shadow:none;

        background: rgba(10, 10, 10, 0.9);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;

        animation:none;
    }

    .login-logo img{
        height:58px;
    }

    .login-titulo{
        font-size:24px;
    }

    .login-subtitulo{
        font-size:13.5px;
        margin-bottom:26px;
    }

    .login-input{
        font-size:16px;
        padding:14px 16px;
    }

    .campo-password .login-input{
        padding-right:50px;
    }

    .login-btn{
        font-size:16px;
        padding:15px 20px;
    }

}

/*==================================================
MÓVIL PEQUEÑO (≤380px)
==================================================*/

@media(max-width:380px){

    .login-card{
        padding:40px 20px 30px;
    }

    .login-titulo{
        font-size:22px;
    }

    .login-logo img{
        height:50px;
    }

}

/*==================================================
SWAL BIENVENIDA PERSONALIZADO
==================================================*/

.swal-bienvenida-popup{
    border-radius:20px !important;
    padding:36px 28px 28px !important;
    max-width:420px !important;
    background:#0a0a0a !important;
    border:2px solid #dc2626 !important;
    box-shadow:
        0 0 0 1px rgba(220,38,38,.2),
        0 0 40px rgba(220,38,38,.3),
        0 20px 60px rgba(0,0,0,.8) !important;
}

.swal-bienvenida{
    display:flex;
    flex-direction:column;
    align-items:center;
    text-align:center;
    font-family:'Segoe UI', Arial, sans-serif;
}

.swal-bienvenida-foto{
    width:96px;
    height:96px;
    border-radius:50%;
    overflow:hidden;
    margin-bottom:20px;
    border:3px solid #ffffff;
    box-shadow:
        0 0 0 3px rgba(220,38,38,.3),
        0 8px 24px rgba(220,38,38,.35);
    animation:swalBienvenidaEntrada .6s ease;
}

.swal-bienvenida-foto img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

@keyframes swalBienvenidaEntrada{
    0%{ transform:scale(.6); opacity:0; }
    60%{ transform:scale(1.08); }
    100%{ transform:scale(1); opacity:1; }
}

.swal-bienvenida-titulo{
    font-size:22px;
    font-weight:800;
    color:#ffffff;
    margin:0 0 10px;
    letter-spacing:-.3px;
    line-height:1.3;
}

.swal-bienvenida-texto{
    font-size:14.5px;
    color:#a1a1aa;
    line-height:1.55;
    margin:0 0 22px;
    max-width:320px;
}

.swal-bienvenida-loader{
    width:100%;
    max-width:240px;
    height:4px;
    background:#1a1a1a;
    border-radius:4px;
    overflow:hidden;
    margin-bottom:12px;
}

.swal-bienvenida-barra{
    width:0%;
    height:100%;
    background:linear-gradient(90deg, #dc2626, #ef4444);
    border-radius:4px;
    transition:width 2s ease;
}

.swal-bienvenida-estado{
    font-size:12.5px;
    color:#71717a;
    font-weight:600;
    letter-spacing:.2px;
}

@media(max-width:480px){
    .swal-bienvenida-popup{
        padding:28px 20px 22px !important;
        border-radius:16px !important;
        max-width:calc(100vw - 32px) !important;
    }
    .swal-bienvenida-foto{
        width:84px;
        height:84px;
        margin-bottom:16px;
    }
    .swal-bienvenida-titulo{ font-size:19px; }
    .swal-bienvenida-texto{ font-size:13.5px; margin-bottom:18px; }
    .swal-bienvenida-barra{ transition:width 1.8s ease; }
}

/*==================================================
SWAL ERROR LOGIN
==================================================*/

.swal-error-popup{
    background:#0a0a0a !important;
    border:2px solid #dc2626 !important;
    border-radius:20px !important;
    box-shadow:
        0 0 0 1px rgba(220,38,38,.2),
        0 0 40px rgba(220,38,38,.3),
        0 20px 60px rgba(0,0,0,.8) !important;
}

.swal-error-popup .swal2-title{
    color:#ffffff !important;
    font-weight:800 !important;
    font-size:22px !important;
}

.swal-error-popup .swal2-html-container,
.swal-error-popup .swal2-content{
    color:#a1a1aa !important;
    font-size:14.5px !important;
    line-height:1.55 !important;
}

.swal-error-btn{
    background:#dc2626 !important;
    border-radius:12px !important;
    font-weight:700 !important;
    padding:12px 28px !important;
    transition:all .2s ease !important;
    color:#ffffff !important;
}

.swal-error-btn:hover{
    background:#ef4444 !important;
    transform:translateY(-2px);
    box-shadow:0 8px 20px rgba(220,38,38,.5) !important;
}

.swal-error-btn:focus{
    box-shadow:0 0 0 3px rgba(220,38,38,.3) !important;
    outline:none !important;
}

.swal-error-popup .swal2-icon.swal2-error{
    border-color:#dc2626 !important;
    color:#dc2626 !important;
}

.swal-error-popup .swal2-icon.swal2-error [class^='swal2-x-mark-line']{
    background-color:#dc2626 !important;
}

/*==================================================
MÓVIL: QUITAR IMAGEN DE FONDO
==================================================*/
@media (max-width: 600px) {
    html, body {
        background-image: none !important; /* Quita la imagen */
        background-color: #0a0a0a !important; /* Deja el fondo negro sólido */
    }
    
    /* Quitamos la capa oscura para que no interfiera */
    body::before {
        display: none;
    }
    
    /* La tarjeta en móvil ya tiene fondo sólido por el diseño original, 
       pero por si acaso lo forzamos */
    .login-card {
        background: #0a0a0a !important;
    }
}