/* Estilos generales */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Inter', sans-serif;
    /* Degradado de tonos de azul con mayor contraste y animación más rápida */
    background: linear-gradient(-45deg, #1d4ed8, #3b82f6, #60a5fa, #93c5fd);
    background-size: 400% 400%;
    animation: gradient-animation 10s ease infinite;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    color: white; /* Color de texto blanco para el contraste del Glassmorphism */
}

/* Animación del fondo */
@keyframes gradient-animation {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Contenedor del login */
.login-container {
    width: 100%;
    max-width: 400px;
    padding: 1rem;
    box-sizing: border-box;
}

/* Tarjeta con efecto de Glassmorphism */
.login-card {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border-radius: 1.5rem;
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    animation: fadeIn 0.8s ease-in-out;
    padding: 2.5rem;
    text-align: center;
    width: 100%;
}

/* Animación de entrada */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Contenedor circular del logo */
.logo-wrapper {
    width: 150px; 
    height: 150px; 
    margin: 0 auto 2.5rem auto; 
    background: transparent; /* Fondo transparente para el Glassmorphism */
    border-radius: 50%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden; 
    padding: 0; 
    position: relative;
}

/* Imagen del logo centrada y más grande */
.logo-wrapper .logo {
    width: 120%; 
    height: 120%; 
    object-fit: contain; 
    border-radius: 15px; 
    transition: transform 0.3s ease;
    transform: translateY(12%);
}

.logo-wrapper .logo:hover {
    transform: scale(1.03) translateY(12%);
}

/* Campos del formulario */
form input {
    width: 100%;
    padding: 0.85rem;
    margin-bottom: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.3); /* Borde claro para el Glassmorphism */
    border-radius: 8px;
    font-size: 1.05rem;
    background: rgba(255, 255, 255, 0.1); /* Fondo semi-transparente */
    color: white;
    box-shadow: none;
    transition: all 0.3s ease;
}

form input:focus {
    background: rgba(255, 255, 255, 0.2);
    box-shadow: 0 0 0 2px white;
    outline: none;
}

/* Botón de Ingresar */
form button[type="submit"] {
    width: 100%;
    padding: 0.9rem;
    background-color: #2563eb; /* Color de fondo sólido para el botón */
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: bold;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    background: linear-gradient(90deg, #1d4ed8, #3b82f6); /* Degradado moderno */
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

form button[type="submit"]:hover {
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
    box-shadow: 0 6px 8px rgba(0, 0, 0, 0.2);
}

/* Mensaje de error */
.error-msg {
    background-color: rgba(255, 99, 71, 0.2); /* Rojo semi-transparente */
    color: #ffcccb;
    padding: 0.85rem;
    border-radius: 8px;
    margin-bottom: 1.2rem;
    font-weight: 500;
}

/* OJO DENTRO DEL INPUT (corregido)  */
.input-with-eye {
    position: relative;
}

/* deja espacio al icono dentro del input */
.input-with-eye > input {
    padding-right: 44px;
}

/* botón-ícono superpuesto (ojo) */
.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    border: none;
    background: transparent;
    padding: 0;
    margin: 0;
    cursor: pointer;
    opacity: 0.75;
    transition: opacity 0.2s;
    color: white; /* Icono en blanco para el contraste */
}

.toggle-password:hover {
    opacity: 1;
}

.toggle-password:focus {
    outline: 2px solid white;
    outline-offset: 2px;
    border-radius: 6px;
}

/* Accesibilidad oculto visualmente */
.sr-only {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

