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

/* Login page only — do NOT set font-family on * (breaks Font Awesome elsewhere) */
body:has(.login-page) {
    margin: 0;
    overflow: hidden;
}

.login-page {
    font-family: "Inter", sans-serif;
    width: 100%;
}

/* Left: illustration */
.login__left {
    background-color: #fff;
    min-width: 0;
    overflow: hidden;
}

.login__left-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: 640px;
    height: 100%;
    max-height: calc(100dvh - 3rem);
}

.login__illustration {
    display: block;
    width: 100%;
    max-width: 580px;
    height: auto;
    max-height: calc(100dvh - 4rem);
    object-fit: contain;
    object-position: center;
}

.login__logo-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    text-align: center;
}

.login__form-logo {
    display: block;
    width: auto;
    max-width: 252px;
    height: auto;
    max-height: 94px;
    margin-right: auto;
    object-fit: contain;
}

/* Right: form panel */
.login__right {
    flex: 0 0 42%;
    width: 42%;
    max-width: 520px;
    min-width: 360px;
    background: #fff;
    box-shadow: -6px 0 28px rgba(15, 23, 42, 0.08);
}

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

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

.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: 42px !important;
    font-size: 0.875rem !important;
    border: 1px solid #ced4da;
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    text-transform: none;
}

.login__control:focus {
    border-color: #e31f24;
    box-shadow: 0 0 0 0.2rem rgba(227, 31, 36, 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: #e31f24;
    background: rgba(227, 31, 36, 0.06);
}

.login__password-toggle:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(227, 31, 36, 0.25);
}

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

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

.login__submit:hover,
.login__submit:focus {
    background: #c41a1f;
    border-color: #c41a1f;
}

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

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

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

.login-page .form-check-input:focus {
    border-color: #e31f24;
    box-shadow: 0 0 0 0.2rem rgba(227, 31, 36, 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;
        min-height: auto;
        padding: 1.5rem 1.25rem !important;
        background-color: #f8f9fa;
    }

    .login__left-inner {
        max-width: 100%;
        max-height: none;
    }

    .login__illustration {
        max-width: 320px;
        max-height: 220px;
        margin: 0 auto;
    }

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

    .login__form-logo {
        max-width: min(252px, 82vw);
        max-height: 86px;
    }

    .login__right {
        flex: 1 1 auto;
        width: 100%;
        max-width: none;
        min-width: 0;
        box-shadow: none;
        border-top: 1px solid #e5e7eb;
        padding: 2rem 1.5rem 2.5rem !important;
    }

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