/* ======== ESTILOS GENERALES ======== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    overflow: hidden;
    /* Evita el scroll */
}

/* ======== CONTENEDOR PRINCIPAL (PANTALLA DIVIDIDA) ======== */
.login-wrapper {
    display: flex;
    width: 100vw;
    height: 100vh;
}

/* ======== PANEL IZQUIERDO (IMAGEN) ======== */
.image-panel {
    flex: 1.2;
    /* Ocupa un poco más de la mitad */
    background: linear-gradient(rgba(0, 109, 59, 0.6), rgba(0, 0, 0, 0.7)), url('https://images.unsplash.com/photo-1574071318508-1cdbab80d002?q=80&w=2069') no-repeat center center/cover;
}

/* ======== PANEL DERECHO (FORMULARIO) ======== */
.form-panel {
    flex: 1;
    /* Ocupa un poco menos de la mitad */
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background-color: #fff;
    overflow-y: auto;
    /* Permite scroll si el contenido es mucho */
}

.form-content {
    width: 100%;
    max-width: 400px;
    text-align: center;
    animation: fadeIn 1s ease-in-out;
}

.form-logo img {
    width: 90px;
    height: 90px;
    margin-bottom: 1rem;
    border-radius: 50%;
}

.form-content h1 {
    font-size: 2.2rem;
    color: #333;
    font-weight: 700;
}

.subtitle {
    font-size: 1rem;
    color: #666;
    margin-bottom: 2.5rem;
}

/* ======== GRUPOS DE INPUTS MODERNOS (CON ICONOS) ======== */
.input-group {
    position: relative;
    /* Clave para posicionar el icono */
    margin-bottom: 1.5rem;
}

.input-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    color: #aaa;
}

.input-group input {
    width: 100%;
    padding: 1rem 1rem 1rem 3rem;
    /* Padding izquierdo para dar espacio al icono */
    border: 2px solid #e0e0e0;
    background-color: #f8f9fa;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: #ffcc00;
    /* Borde amarillo al seleccionar */
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(255, 204, 0, 0.2);
}

.input-group input::placeholder {
    color: #999;
}

/* ======== BOTÓN Y ENLACES DE AYUDA ======== */
.submit-btn {
    width: 100%;
    padding: 1rem;
    background-color: #ffcc00;
    color: #000;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 204, 0, 0.3);
    margin-bottom: 1.5rem;
}

.submit-btn:hover {
    background-color: #ffb300;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 204, 0, 0.4);
}

.helper-links p {
    color: #666;
    margin: 0.5rem 0;
}

.helper-links a {
    color: #006d3b;
    font-weight: 600;
    text-decoration: none;
}

.helper-links a:hover {
    text-decoration: underline;
}

/* ======== ANIMACIÓN DE ENTRADA ======== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ======== RESPONSIVO (para móviles) ======== */
@media (max-width: 768px) {
    .login-wrapper {
        flex-direction: column;
    }

    .image-panel {
        display: none;
        /* Ocultamos la imagen en móviles para dar espacio al formulario */
    }
}

/* ===== Estilo para Mensaje de Error ===== */
.error-message {
    background-color: #ffebee;
    /* Light red background */
    color: #c62828;
    /* Dark red text */
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-weight: 600;
    margin-bottom: 1.5rem;
    /* Space below the message */
    text-align: center;
}