/* Alertas dentro del login (no afectar el sistema global de mensajes) */
.login-container .alert {
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 500;
    padding: 0.7rem 1.2rem;
    border: 7.5px solid #e0e0e0;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 16px 0 rgba(0,0,0,0.10);
}
.login-container .alert-success {
    border-color: #e0e0e0;
    background: #256029;
    color: #fff;
}
.login-container .alert-error,
.login-container .alert-danger {
    border-color: #e0e0e0;
    background: #b90d0d !important;
    color: #fff !important;
}
.login-container .alert-warning {
    border-color: #e0e0e0;
    background: #fbc02d;
    color: #fff;
}
.login-container .alert-info {
    border-color: #e0e0e0;
    background: #1976d2;
    color: #fff;
}
/* NAVBAR IGUAL EN LOGIN Y DASHBOARD */
.navbar-agro {
    background: #388e3c;
    color: #fff;
    min-height: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    padding: 0 1rem;
    position: sticky;
    top: 0;
    z-index: 1050;
}
.navbar-content {
    display: flex;
    align-items: center;
    height: 44px;
    width: 100%;
}
.navbar-content > *:first-child {
    margin-left: 10px; /* Separación extra del borde izquierdo */
}
.navbar-logo {
    height: 40px;
    max-height: 40px;
    width: auto;
    margin-right: 8px;
    display: block;
    object-fit: contain;
}
.navbar-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #fff;
    line-height: 1;
    margin-bottom: 0;
}

/* ...resto del CSS igual... */
/*----------------------------------------------*/
/* Fondo general */
.login-page,
.login-page-compact {
    min-height: 60vh;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background-color: var(--verde-suave, #e3f6e8);
    padding-top: 3vh;
}

/* Contenedor principal */
.login-container {
    max-width: 380px;
    width: 100%;
    margin: clamp(0.75rem, 3vh, 2rem) auto 0;
    padding: 0 0.75rem;
}

/* Tarjeta del login */
/* Reducir la altura del card login card */
.card.login-card {
    background: #e3f2ec; /* un paso más oscuro */
    border: 2px solid #2d6a4f; /* borde verde más suave */
    border-radius: 8px;
    box-shadow: 0 6px 18px rgba(6, 156, 11, 0.06); /* sombra leve verdosa */
    margin-bottom: 2rem !important;
    width: 100%;
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
    padding: 0.75rem 1.1rem 0.65rem;
}

/* Header del login */
.login-header {
    padding: 0 !important;
    background: none;
    border-bottom: none;
    text-align: center;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.4rem;
}

.login-header .login-icon {
    width: 2.25rem;
    height: 2.25rem;
    margin-bottom: 0.2rem;
    color: var(--verde-medio, #2e8b57);
    display: inline-block;
}

.login-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    text-align: center;
    color: #1f4f36; /* verde más legible sobre fondo suave */
    margin-top: 0;
}

/* Área fija para mensajes */
.login-messages {
    min-height: 1rem;
    margin-bottom: 0.05rem;
}
.login-alert, .login-success {
    background: #ffeaea;
    color: #b90d0d;
    border: none;
    border-radius: 3px;
    padding: 0.05rem 0.05rem;
    margin-bottom: 0.03rem !important;
    margin-top: 0.03rem !important;
    font-size: 1rem;
    width: 99%;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
    box-sizing: border-box;
}
.login-success {
    background: #e8f5e9;
    color: #256029;
}

/* Formulario */
.login-form .form-label {
    margin-bottom: 0.15rem;
    font-size: 0.875rem;
}

/* Iconos dentro del input */
.input-group-inside-icon {
    position: relative;
}
.inside-icon {
    position: absolute;
    left: 0.85rem;
    top: 50%;
    transform: translateY(-50%);
    color: #757575;
    font-size: 1.15rem;
    z-index: 2;
    pointer-events: none;
}
.inside-input {
    padding-left: 2.3rem !important;
    border-radius: 6px !important;
}

/* Campos de formulario */
.login-form .form-control {
    min-height: 2.3rem;
    padding: 0.35rem 0.6rem;
    font-size: 0.95rem;
    background: #ffffff;
    border: 2px solid #bfe6d6; /* borde verde suave */
    border-radius: 6px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.password-input-wrap {
    display: flex;
    width: 100%;
    flex-wrap: nowrap;
    overflow: hidden;
    min-height: 2.3rem;
    background: #ffffff;
    border: 2px solid #bfe6d6;
    border-radius: 6px;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.password-input-wrap .form-control {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    padding-right: 0.65rem;
    min-height: calc(2.3rem - 4px);
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}
.login-form .password-input-wrap .login-password-toggle {
    position: static;
    flex: 0 0 2.6rem;
    width: 2.6rem;
    min-height: calc(2.3rem - 4px);
    margin: 0;
    padding: 0;
    border: 0 !important;
    border-radius: 0 !important;
    background: #ffffff;
    color: #1f7a4d !important;
    display: grid;
    place-items: center;
    cursor: pointer;
}
.login-form .password-input-wrap .login-password-toggle:hover {
    background: #e6f3ea;
    color: #155d38 !important;
}
.login-form .password-input-wrap .login-password-toggle .bi {
    color: currentColor !important;
    font-size: 1.05rem;
}
.password-input-wrap:focus-within {
    border-color: #2e8b57;
    box-shadow: 0 0 0 .15rem rgba(46, 139, 87, 0.18);
}
.login-form .password-input-wrap .login-password-toggle:focus-visible {
    outline: 2px solid #2e8b57;
    outline-offset: 1px;
}
.login-field-error {
    color: #b42318 !important;
    font-size: 0.8rem;
    margin-top: 0.2rem;
}
.login-field-error,
.login-field-error.text-danger,
.login-field-error .errorlist,
.login-field-error .errorlist li {
    color: #b42318 !important;
}
.login-field-error .errorlist {
    margin: 0;
    padding: 0;
    list-style: none;
}
.login-form .form-control:focus {
    border-color: #2e8b57; /* verde medio */
    background: #fff;
    outline: none;
    box-shadow: 0 0 0 .15rem rgba(46, 139, 87, 0.18);
}

/* Checkbox y botón */
.form-check-input {
    margin-top: 0.2rem;
}
.form-check-label {
    font-size: 0.875rem;
}
.login-options {
    margin: 0 0 0.55rem;
}
.login-submit {
    min-height: 2.3rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    padding: 0.35rem 1rem;
}

/* Enlaces */
.login-recovery {
    margin-top: 0.3rem;
}

.btn-link.text-success {
    color: #2e8b57 !important;
    text-decoration: none;
}
.btn-link.text-success:hover,
.btn-link.text-success:focus {
    color: #256e46 !important;
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 400px) {
    .login-container {
        max-width: 98vw;
        margin-top: 2rem; /* un poco más también en móviles */
    }
}

.login-icon .bi {
    font-size: 2rem;
    color: #2e8b57;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* Cambia el color del texto en el placeholder de los inputs */
.login-form .form-control::placeholder {
    color: rgba(0,0,0,0.38);
    opacity: 1;
}

/* Labels y textos de ayuda con mejor contraste sobre el fondo suave */
.login-form .form-label { color: #1f4f36; font-weight: 600; }