:root {
    --primary-color: #2e7d32;
    --primary-hover: #1b5e20;
    --text-color: #334155; /* Gris grafito premium para textos comunes, evita el negro agresivo */
    --error-color: #e53935;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: url("../img/Fondo.jpg") no-repeat center center fixed;
    background-size: cover;
    padding: 20px;
}

/* Contenedor Principal de doble panel */
.login-master-container {
    display: flex;
    width: 100%;
    max-width: 850px;
    min-height: 500px;
    background: rgba(255, 255, 255, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

/* Panel Izquierdo */
.panel-logo {
    flex: 1;
    background: url("../GEOPLUMAS_MONTAJE.jpg") no-repeat center center;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 40px;
    text-align: center;
    position: relative;
}

.panel-logo::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.15);
    z-index: 1;
}

.panel-logo > * {
    position: relative;
    z-index: 2;
}

/* Logo Circular integrado */
.panel-logo .logo-placeholder {
    width: 110px;
    height: 110px;
    background: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    margin-bottom: 20px;
    overflow: hidden;
    border: 3px solid white;
}

.panel-logo .logo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    padding: 0 !important;
}

/* --- OPTIMIZACIÓN EN "BIENVENIDOS A GEOPLUMAS" --- */
.panel-logo h1 {
    font-size: 24px;             /* Bajado ligeramente de tamaño */
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 12px;
    color: #1b4332;              /* Verde bosque profundo muy elegante, cero tosco */
    letter-spacing: -0.3px;
}

.panel-logo p {
    font-size: 13.5px;
    opacity: 0.9;
    font-weight: 400;
    line-height: 1.6;
    max-width: 250px;
    color: #2d5a44;              /* Tono suave armónico con el verde superior */
}

/* Panel Derecho: Formulario */
.panel-form {
    flex: 1.2;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(255, 255, 255, 0.4);
}

/* --- MEJORA TERMINANTE EN "INICIAR SESIÓN" --- */
.panel-form h2 {
    font-size: 24px;             /* Menos gigante, más corporativo */
    color: #475569;              /* Gris pizarra suave y estilizado en lugar de negro */
    margin-bottom: 32px;
    font-weight: 600;
    letter-spacing: -0.3px;
    text-align: center;          /* ¡Centrado perfectamente! */
}

.form-group {
    margin-bottom: 22px;
    position: relative;
}

.form-group label {
    display: block;
    font-size: 12.5px;
    color: #64748b;              /* Gris intermedio para los labels */
    margin-bottom: 8px;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(0, 0, 0, 0.12);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    color: var(--text-color);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
}

.form-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.12);
    background: #fff;
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
}

.password-wrapper input {
    padding-right: 48px;
}

/* Botón del Ojo */
.toggle-password-btn {
    position: absolute;
    right: 6px;
    height: 36px;
    width: 36px;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    outline: none;
    transition: background-color 0.2s ease;
}

.toggle-password-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.toggle-password-btn svg {
    width: 20px;
    height: 20px;
    stroke: #94a3b8;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    transition: stroke 0.2s ease;
}

.toggle-password-btn:hover svg {
    stroke: var(--primary-color);
}

/* Mensajes de error */
.error-message {
    display: block;
    color: var(--error-color);
    font-size: 12px;
    margin-top: 5px;
    font-weight: 500;
}

.input-error {
    border-color: var(--error-color) !important;
}

/* Botón de envío */
button[type="submit"] {
    width: 100%;
    padding: 14px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14.5px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.15);
    margin-top: 10px;
    letter-spacing: 0.3px;
}

button[type="submit"]:hover {
    background: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(46, 125, 50, 0.25);
}

button[type="submit"]:active {
    transform: translateY(1px);
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes popIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.animate-fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-pop-in {
    animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@media (max-width: 768px) {
    .login-master-container {
        flex-direction: column;
        max-width: 450px;
    }
    .panel-logo { padding: 40px 20px; }
    .panel-logo .logo-placeholder { width: 80px; height: 80px; margin-bottom: 15px; }
    .panel-logo p { display: none; }
    .panel-form { padding: 40px 30px; }
}
/* --- RESPONSIVE DE ALTO RENDIMIENTO (TODO EN PANTALLA) --- */
@media (max-width: 768px) {
    .login-master-container {
        flex-direction: column;
        max-width: 380px; /* Más estrecho para pantallas pequeñas, evita que se estire hacia abajo */
        min-height: auto;
        margin: 10px auto;
    }

    /* Reducimos la presencia del panel superior de forma limpia */
    .panel-logo {
        flex: none;
        padding: 24px 15px 15px 15px; /* Relleno mínimo para ahorrar espacio vertical */
        background-position: center 30%; /* Reajusta el fondo para que luzca bien */
    }

    /* Mantiene el círculo perfecto sin deformarse nunca */
    .panel-logo .logo-placeholder {
        width: 75px;  /* Tamaño más discreto y equilibrado */
        height: 75px;
        min-width: 75px;
        min-height: 75px;
        margin-bottom: 10px;
        border: 2px solid white;
    }

    /* Texto ajustado para no ocupar líneas innecesarias */
    .panel-logo h1 {
        font-size: 19px;
        margin-bottom: 0;
    }

    /* Nos aseguramos de ocultar el párrafo sobrante */
    .panel-logo p {
        display: none !important;
    }

    /* Compactamos el formulario para que suba al máximo */
    .panel-form {
        flex: none;
        padding: 24px 20px; /* Reducimos paddings internos drásticamente */
        background: rgba(255, 255, 255, 0.6);
    }

    /* Título del formulario más compacto */
    .panel-form h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }

    /* Reducimos ligeramente la separación de los campos */
    .form-group {
        margin-bottom: 16px;
    }

    .form-group label {
        margin-bottom: 6px;
    }

    .form-group input {
        padding: 10px 14px; /* Inputs ligeramente más delgados para ahorrar valiosos píxeles */
    }

    button[type="submit"] {
        padding: 12px;
        margin-top: 5px;
    }
}