/* * Archivo: css/login.css
 * Estilos mejorados con tema Naranja/Negro y fondo de imagen.
 */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* --- 1. FONDO DE PANTALLA --- */
/* Reemplazamos el degradado por tu imagen */
body {
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    
    /* La ruta '../' sube un nivel (de 'css' a la raíz) */
    background-image: url('../assets/img/fondo_login.png');
    background-size: cover; /* Cubre toda la pantalla */
    background-position: center center; /* Centra la imagen */
    background-repeat: no-repeat;
    background-attachment: fixed; /* El fondo no se mueve con el scroll */

    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
}

/* --- 3. ARREGLO DE AUTOCOMPLETAR --- */
/* Soluciona el cuadro blanco de autocompletar de Chrome/Safari */
input:-webkit-autofill,
input:-webkit-autofill:hover, 
input:-webkit-autofill:focus, 
input:-webkit-autofill:active  {
    /* Usamos un box-shadow "inset" para simular el fondo */
    /* Este color DEBE ser idéntico al 'background' del input de abajo */
    -webkit-box-shadow: 0 0 0 30px #2c2c2c inset !important; 
    
    /* Forzamos el color del texto a blanco */
    -webkit-text-fill-color: #fff !important;
    
    /* Evita que cambie el color del borde (si lo tuviera) */
    border: none !important;

    /* Hack para que la transición del color de fondo no ocurra */
    transition: background-color 5000s ease-in-out 0s;
}

/* --- 2. TEMA NARANJA/NEGRO --- */

.login-container {
    /* Usamos el negro del header (#1a1a1a) con transparencia */
    background: rgba(26, 26, 26, 0.6); /* Negro sutil */
    border-radius: 15px;
    padding: 40px;
    width: 100%;
    max-width: 380px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    text-align: center;
    backdrop-filter: blur(10px); /* Efecto cristal */
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.login-container h2 {
    color: #fff;
    margin-bottom: 30px;
    font-size: 2em;
    font-weight: 500;
}

/* Avatar/Icono superior (Ahora Naranja) */
.avatar-container {
    width: 80px;
    height: 80px;
    /* Gradiente naranja del header */
    background: linear-gradient(45deg, #f39c12, #e67e22); 
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: -80px auto 30px auto; /* Sobresale */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.avatar-container i {
    color: #fff;
    font-size: 2.5em;
}

/* Grupos de entrada (icono + input) */
.input-group {
    position: relative;
    margin-bottom: 30px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3); /* Borde más grueso */
    padding-bottom: 5px;
    transition: border-bottom-color 0.3s ease; /* Transición */
}

/* Mejora: Resalta la línea al enfocar CUALQUIER COSA dentro del grupo */
.input-group:focus-within {
    border-bottom-color: #f39c12; /* Naranja al enfocar */
}

.input-group i {
    position: absolute;
    left: 5px;
    top: 50%;
    transform: translateY(-50%);
    color: #ccc;
    font-size: 1.1em;
}

.input-group input {
    width: calc(100% - 45px); /* Ajuste de ancho por padding */
    padding: 10px 10px 10px 35px; /* Más padding para que se vea mejor */
    
    /* --- CAMBIO PRINCIPAL --- */
    /* Hacemos el fondo sólido para igualar el autofill */
    background: #2c2c2c; 
    /* ------------------------- */

    border: none;
    outline: none;
    color: #fff;
    font-size: 1.1em;
    border-radius: 5px; /* Pequeño redondeo para que se vea mejor */
}

.input-group input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

/* Esta regla ya no es necesaria gracias a :focus-within */
/* .input-group input:focus { ... } */


/* Opciones (links ahora en naranja) */
.options-group {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    font-size: 0.9em;
}

.options-group a {
    color: #fff;
    text-decoration: none;
    transition: color 0.3s ease;
}

.options-group a:hover {
    color: #f39c12; /* Naranja */
}

/* Checkbox (Ahora Naranja) */
.checkbox-container {
    display: block;
    position: relative;
    padding-left: 25px;
    cursor: pointer;
    font-size: 0.9em;
    user-select: none;
    color: #ccc;
    text-align: left;
}
.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}
.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    transition: background-color 0.3s ease;
}
.checkbox-container:hover input ~ .checkmark {
    background-color: rgba(255, 255, 255, 0.4);
}
.checkbox-container input:checked ~ .checkmark {
    background-color: #f39c12; /* Naranja */
}
.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}
.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}
.checkbox-container .checkmark:after {
    left: 6px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

/* Botón Principal (Ahora Naranja) */
.btn-primary {
    width: 100%;
    padding: 12px 0;
    background: linear-gradient(90deg, #f39c12, #e67e22); /* Naranja */
    border: none;
    border-radius: 25px;
    color: #1a1a1a; /* Texto oscuro para mejor contraste */
    font-size: 1.1em;
    font-weight: 700; /* Más grueso */
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
}

.btn-primary:hover {
    background: linear-gradient(90deg, #e67e22, #f39c12); /* Invertido */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
    color: #000;
}

/* Link para cambiar a Registro (Hover naranja) */
.form-switch-link {
    font-size: 0.9em;
    color: #ccc;
}

.form-switch-link a {
    text-decoration: none;
    color: #fff; 
    font-weight: 500;
    transition: color 0.3s ease;
}

.form-switch-link a:hover {
    color: #f39c12; /* Naranja */
}