/* Establece el modelo de caja para un diseño más intuitivo */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', Arial, sans-serif;
    color: #f3f4f6; /* Texto claro */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    transition: background-image 2s ease-in-out;
    position: relative;
    z-index: 0;
}

/* Pseudo-elemento para el overlay oscuro sobre la imagen de fondo */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3); 
    z-index: -1;
}

.login-box {
    background-color: rgba(31, 41, 55, 0.7);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.7);
    text-align: center;
    width: 90%;
    max-width: 400px;
    animation: fadeIn 1s ease-in-out;
    z-index: 1;
}

/* --- CAMBIO: Estilos para el contenedor del título y el ícono --- */
.system-title-container {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.5rem; /* Espacio debajo del contenedor */
}

/* Estilos para el ícono redondeado */
.system-icon {
    width: 35px; /* Tamaño del ícono */
    height: 35px;
    border-radius: 50%; /* Hace que la imagen sea redonda */
    margin-right: 10px; /* Espacio a la derecha del ícono */
}

/* Estilos para el título del sistema */
.system-title {
    margin: 0; /* Elimina los márgenes predeterminados del h1 */
    font-size: 1.5em; 
    font-weight: 600;
    letter-spacing: 2px;
    color: #3b82f6;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

h2 {
    margin: 0 0 1rem;
    color: #9ca3af;
    font-weight: 600;
}

/* El resto del CSS se mantiene igual */
@keyframes fadeIn {
    from {
        opacity: 1;
        transform: translateY(-20px);
    }
    to {
        opacity: 5;
        transform: translateY(0);
    }
}

.logo {
    width: 300px;
    height: auto;
    margin-bottom: 1.5rem;
    border-radius: 15%;
    border: 3px solid #6b7280;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.input-group {
    position: relative;
    margin-bottom: 2rem;
}

.input-group input {
    width: 100%;
    padding: 0.8rem 0;
    font-size: 1em;
    color: #f3f4f6;
    border: none;
    border-bottom: 2px solid #6b7280;
    outline: none;
    background: transparent;
    transition: border-bottom-color 0.3s ease;
}

.input-group input:focus,
.input-group input:valid {
    border-bottom-color: #3b82f6;
}

.input-group label {
    position: absolute;
    top: 0.8rem;
    left: 0;
    color: #9ca3af;
    font-size: 1em;
    pointer-events: none;
    transition: all 0.3s ease;
}

.input-group input:focus + label,
.input-group input:valid + label {
    top: -1.2rem;
    font-size: 0.8em;
    color: #3b82f6;
}

.toggle-password {
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2em;
    color: #9ca3af;
    transition: color 0.3s ease;
}

.toggle-password:hover {
    color: #3b82f6;
}

.login-button {
    width: 80%;
    padding: 0.8rem;
    background-color: #3b82f6;
    color: white;
    border: none;
    border-radius: 2rem;
    font-size: 1.0em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.login-button:hover {
    background-color: #2563eb;
    transform: translateY(-2px);
}

.login-button:active {
    transform: translateY(0);
}

.error-message {
    color: #ef4444;
    font-size: 0.9em;
    text-align: left;
    height: 1.5rem;
    margin-bottom: 1rem;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.error-message.show {
    opacity: 1;
    transform: translateY(0);
}

.options {
    margin-top: 1.0rem;
    font-size: 0.9em;
    color: #9ca3af;
}

.options a {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.3s ease;
}

.options a:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* Responsive design para pantallas pequeñas */
@media (max-width: 600px) {
    .login-box {
        padding: 2rem 1.5rem;
    }
}