@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

body:has(.login-page) {
    margin: 0;
    overflow: hidden;
    background: #f4f7f1;
}

.login-page {
    font-family: "Inter", sans-serif;
    width: 100%;
    min-height: 100dvh;
    overflow: hidden;
}

.login__left {
    position: relative;
    align-self: stretch;
    min-height: 100dvh;
    background: #eef6ea;
    min-width: 0;
    overflow: hidden;
    padding: 0 !important;
}

.login__left-inner {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.login__illustration {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
}

.login__logo-wrap {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    margin-bottom: 1.75rem;
}

.login__form-logo {
    display: block;
    width: auto;
    max-width: min(100%, 340px);
    height: auto;
    max-height: 84px;
    object-fit: contain;
    object-position: left center;
}

.login__right {
    flex: 0 0 42%;
    width: 42%;
    max-width: 520px;
    min-width: 0;
    background: #fff;
    box-shadow: -6px 0 28px rgba(27, 94, 50, 0.08);
}

.login__form-wrap {
    max-width: 360px;
}

.login__title {
    font-size: 1.75rem;
    color: #1B5E32;
}

.login__subtitle {
    font-size: 0.875rem;
    line-height: 1.45;
}

.login__label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.35rem;
}

.login__control {
    height: 44px !important;
    font-size: 1rem !important;
    border: 1px solid #ced4da;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    text-transform: none;
}

.login__control:focus {
    border-color: #1B5E32;
    box-shadow: 0 0 0 0.2rem rgba(27, 94, 50, 0.2);
}

.login__control.input-validation-error {
    border-color: #dc3545;
}

.login__password-wrap {
    position: relative;
}

.login__control--password {
    padding-right: 2.75rem;
}

.login__password-toggle {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    width: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    border: none;
    background: transparent;
    color: #6b7280;
    cursor: pointer;
    border-radius: 0 8px 8px 0;
}

.login__password-toggle:hover {
    color: #1B5E32;
    background: rgba(27, 94, 50, 0.06);
}

.login__password-toggle:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(27, 94, 50, 0.25);
}

.login__eye-icon {
    display: block;
    flex-shrink: 0;
}

.login__submit {
    height: 46px;
    font-size: 0.9375rem;
    font-weight: 600;
    border-radius: 8px;
    color: #fff;
    background: #1B5E32;
    border-color: #1B5E32;
    margin-top: 0.25rem;
}

.login__submit:hover,
.login__submit:focus,
.login__submit:active,
.login__submit:focus-visible {
    color: #fff;
    background: #154C28;
    border-color: #154C28;
    box-shadow: none;
}

.login__submit:disabled,
.login__submit.disabled {
    color: #fff !important;
    background: #1B5E32 !important;
    border-color: #1B5E32 !important;
    opacity: 0.85;
}

.login__forgot-link {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #1B5E32;
    text-decoration: none;
}

.login__forgot-link:hover {
    color: #154C28;
    text-decoration: underline;
}

.login-page .form-check-input:checked {
    background-color: #1B5E32;
    border-color: #1B5E32;
}

.login-page .form-check-input:focus {
    border-color: #1B5E32;
    box-shadow: 0 0 0 0.2rem rgba(27, 94, 50, 0.2);
}

@media (max-width: 991.98px) {
    .login-page {
        flex-direction: column !important;
        overflow-y: auto;
        overflow-x: hidden;
        min-height: 100dvh;
        height: auto;
    }

    body:has(.login-page) {
        overflow: auto;
    }

    .login__left {
        flex: 0 0 auto;
        align-self: auto;
        height: 220px;
        min-height: 220px;
        padding: 0 !important;
    }

    .login__left-inner {
        position: absolute;
        inset: 0;
    }

    .login__illustration {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center 40%;
        border-radius: 0;
    }

    .login__logo-wrap {
        justify-content: center;
    }

    .login__form-logo {
        max-width: 100%;
        max-height: 110px;
        margin: 0 auto;
        object-position: center;
    }

    .login__right {
        flex: 1 1 auto;
        width: 100%;
        max-width: none;
        min-width: 0;
        box-shadow: none;
        border-top: 1px solid #e5e7eb;
        padding: 1.5rem 1.25rem calc(2rem + env(safe-area-inset-bottom, 0px)) !important;
    }

    .login__form-wrap {
        max-width: 400px;
        margin: 0 auto;
    }

    .login__title {
        font-size: 1.5rem;
        text-align: center;
    }

    .login__subtitle {
        text-align: center;
    }
}

@media (max-width: 575.98px) {
    .login__left {
        height: 160px;
        min-height: 160px;
        padding: 0 !important;
    }

    .login__form-logo {
        max-width: 100%;
        max-height: 96px;
    }

    .login__right {
        padding: 1.25rem 1rem calc(1.5rem + env(safe-area-inset-bottom, 0px)) !important;
    }

    .login__title {
        font-size: 1.35rem;
    }

    .login__control,
    .login__submit {
        min-height: 44px;
    }
}

@media (max-width: 399.98px) {
    .login__left {
        display: none !important;
    }

    .login__right {
        border-top: none;
        min-height: 100dvh;
    }
}
