/* ==========================================================================
   CONFIGURACIÓN MONOCROMÁTICA GLOBAL
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
}

body {
    /* Tu ruta de imagen asignada */
    background: url('../IMG/fondologin.jpg') no-repeat center center fixed;
    background-size: cover;
    height: 100vh;
    width: 100vw;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 20px;
    overflow: hidden;
}

/* Filtro de escala de grises y contraste profundo para la imagen de fondo trasera */
body::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0.45) 0%, rgba(0, 0, 0, 0.85) 100%);
    backdrop-filter: grayscale(100%); /* Forza a que todo el fondo sea escala de grises */
    -webkit-backdrop-filter: grayscale(100%);
    z-index: 1;
}

/* ==========================================================================
   TARJETA DE ACCESO (DARK GLASSMORPHISM)
   ========================================================================== */
.login-container {
    position: relative;
    z-index: 2;
    background: rgba(18, 18, 18, 0.65); /* Negro carbón translúcido */
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    
    /* Borde fino estilo corte de diamante */
    border: 1px solid rgba(255, 255, 255, 0.08); 
    width: 100%;
    max-width: 460px; 
    padding: 95px 45px 50px 45px;
    border-radius: 24px;
    
    /* Sombras puras sin color para un efecto flotante sobrio */
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.7),
                inset 0 1px 1px rgba(255, 255, 255, 0.1);
                
    animation: entradaSuave 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ==========================================================================
   AVATAR MONOCROMÁTICO CON RELIEVE
   ========================================================================== */
.avatar-box {
    position: absolute;
    top: -60px; 
    left: 50%;
    transform: translateX(-50%);
    background: #0a0a0a;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    z-index: 3;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Resplandor blanco sutil detrás del avatar al pasar el cursor */
.avatar-border-glow {
    position: absolute;
    top: -1px; left: -1px; right: -1px; bottom: -1px;
    border-radius: 50%;
    background: linear-gradient(135deg, rgba(255,255,255,0.4), rgba(255,255,255,0));
    z-index: -1;
    opacity: 0.5;
    transition: opacity 0.4s ease;
}

.avatar-icon {
    width: 65px;
    height: 65px;
    color: #e5e5e5;
}

/* Interacciones refinadas del Avatar */
.login-container:hover .avatar-box {
    transform: translateX(-50%) translateY(-4px);
    border-color: rgba(255, 255, 255, 0.3);
    box-shadow: 0 30px 50px rgba(0, 0, 0, 0.8);
}
.login-container:hover .avatar-border-glow {
    opacity: 1;
}

/* ==========================================================================
   TEXTOS Y ENCABEZADOS
   ========================================================================== */
.login-header {
    text-align: center;
    margin-bottom: 40px;
}

.login-header h2 {
    color: #ffffff;
    font-size: 22px;
    font-weight: 700;
    letter-spacing: 4px;
    margin-bottom: 6px;
}

.login-header p {
    color: #8a8a8a; /* Gris medio */
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.3px;
}

/* ==========================================================================
   INPUTS FLOTANTES MATE
   ========================================================================== */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 26px; 
    width: 100%;
}

.input-group {
    width: 100%;
    position: relative;
}

.input-group input {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 18px 16px 12px 16px;
    font-size: 14px;
    font-weight: 400;
    color: #ffffff;
    outline: none;
    transition: all 0.3s ease;
}

/* Label flotante en escala de grises */
.input-group label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #666666;
    font-size: 14px;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Línea de enfoque color blanco puro */
.input-bar {
    position: absolute;
    bottom: 0; left: 50%;
    width: 0; height: 1.5px;
    background: #ffffff;
    transition: all 0.3s ease;
}

/* Animación de Inputs */
.input-group input:focus ~ label,
.input-group input:not(:placeholder-shown) ~ label {
    top: 10px;
    font-size: 11px;
    font-weight: 600;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.input-group input:focus {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.2);
}

.input-group input:focus ~ .input-bar {
    width: 100%;
    left: 0;
}

/* ==========================================================================
   BOTÓN NEGRO ABSOLUTO (HIGH LUXURY)
   ========================================================================== */
.btn-submit {
    width: 100%;
    background: #ffffff; /* Contraste inverso: botón blanco texto negro */
    color: #000000;
    border: none;
    border-radius: 12px; 
    padding: 16px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 2px;
    cursor: pointer;
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-submit:hover {
    background: #e5e5e5;
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(255, 255, 255, 0.15);
}

.btn-submit:active {
    transform: translateY(0);
}

/* ==========================================================================
   ENLACE DE RECUPERACIÓN MINIMALISTA
   ========================================================================== */
.forgot-container {
    width: 100%;
    text-align: center;
    margin-top: 4px;
}

.forgot-password {
    color: #666666;
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.2s ease;
}

.forgot-password:hover {
    color: #ffffff;
}



/* ==========================================================================
   ANIMACIONES Y RESPONSIVIDAD MÓVIL
   ========================================================================== */
@keyframes entradaSuave {
    from {
        opacity: 0;
        transform: scale(0.97) translateY(15px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@media (max-width: 480px) {
    body {
        padding: 16px;
    }

    .login-container {
        padding: 85px 24px 40px 24px;
        border-radius: 16px;
    }

    .avatar-box {
        width: 105px;
        height: 105px;
        top: -50px;
    }

    .avatar-icon {
        width: 55px;
        height: 55px;
    }

    .login-header h2 {
        font-size: 20px;
    }
}
