﻿/* Login / OTP layout — loaded last on the auth page so it wins over shared CSS */

html:has(.login-page),
.login-page {
    height: 100%;
    margin: 0;
    min-width: 1024px;
    overflow-x: auto;
    background: #fff;
}

.login-page {
    min-height: 100vh;
    min-height: 100dvh;
}

.login_main_section {
    width: 100%;
    min-width: 1024px;
    min-height: 100vh;
    min-height: 100dvh;
    background-color: #fff;
}

.login_main_section .login_shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    width: 100%;
    min-height: 100vh;
    min-height: 100dvh;
}

.login_main_section .login_left_box {
    position: relative;
    width: 100%;
    min-width: 0;
    min-height: 100%;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    background-image: url("../../assets/images/login-image.jpg");
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;
}

.login_main_section .login_mark,
.login_main_section .login_left_box img {
    position: relative;
    z-index: 2;
    width: min(168px, 38%);
    max-width: 180px;
    height: auto !important;
    object-fit: contain;
    border-radius: 16px;
    display: block;
}

.login_main_section .login_img_overflow {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.45);
    z-index: 1;
}

.login_main_section .login_right_box {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 100%;
    height: auto;
    padding: 40px 48px;
    padding-top: max(40px, env(safe-area-inset-top));
    padding-right: max(48px, env(safe-area-inset-right));
    padding-bottom: max(40px, env(safe-area-inset-bottom));
    padding-left: max(48px, env(safe-area-inset-left));
    background: #fff;
    box-sizing: border-box;
    margin: 0;
}

.login_main_section .login_form_box {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.login_main_section .login_logo_img {
    width: 100%;
    text-align: center;
    margin: 0 0 22px;
}

.login_main_section .login_right_box .logo {
    width: min(240px, 82%);
    max-width: 260px;
    height: auto !important;
    display: block;
    margin: 0 auto;
}

.login_main_section .login_step,
.login_main_section .login_form_box form {
    width: 100%;
}

.login_main_section .login_form_box h3 {
    width: 100%;
    color: #202b47;
    font-family: "Lato", sans-serif;
    font-weight: 700;
    font-size: 30px;
    line-height: 1.25;
    margin: 0 0 8px;
    text-align: center;
}

.login_main_section .login_form_box p {
    width: 100%;
    color: #202b47b2;
    font-family: "Lato", sans-serif;
    font-weight: 400;
    font-size: 15px;
    line-height: 1.45;
    text-align: center;
}

.login_main_section #loginForm > p {
    margin: 0 0 22px;
}

.login_main_section #loginThrottleError {
    margin: 0 0 14px 0 !important;
}

.login_main_section .login_form_box .arror_text,
.login_main_section .otp_form .otp_error {
    display: block;
    width: 100%;
    margin: 8px 0 0 0 !important;
    padding: 0 !important;
    text-align: left !important;
    font-family: "Lato", sans-serif !important;
    font-size: 13px !important;
    font-weight: 500;
    line-height: 18px;
    color: #c62828 !important;
}

.login_main_section .otp_form .otp_error {
    min-height: 18px;
    margin: 10px 0 14px 0 !important;
}

.login_main_section .login_input_box {
    width: 100%;
    margin-bottom: 16px;
    position: relative;
    text-align: left;
}

.login_main_section .password_show {
    position: relative;
}

.login_main_section .password_eye_icon {
    position: absolute;
    top: 50%;
    right: 14px;
    bottom: auto;
    transform: translateY(-50%);
    height: auto;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    color: #8f9098;
}

.login_main_section .login_input_box input {
    width: 100%;
    height: 50px;
    border: 1.5px solid #9e9e9e;
    border-radius: 8px;
    padding: 0 44px 0 16px;
    color: #202b47;
    font-family: "Lato", sans-serif;
    font-size: 16px;
    background: #fff;
    box-sizing: border-box;
    box-shadow: none;
    outline: none;
}

.login_main_section .login_input_box input::placeholder {
    color: #8a8a8a;
}

.login_main_section .login_input_box input:focus {
    border-color: #52008e;
    box-shadow: none;
}

.login_main_section .login_input_box input.is-invalid,
.login_main_section .otp_boxes .otp-digit.is-invalid {
    border-color: #c62828;
}

.login_main_section .Sign_in_btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 50px;
    height: 50px;
    padding: 0 16px;
    border: none;
    border-radius: 8px;
    background-color: #52008e;
    color: #fff;
    font-family: "Lato", sans-serif !important;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.25;
    letter-spacing: 0.2px;
    text-align: center;
    cursor: pointer;
    box-sizing: border-box;
    -webkit-appearance: none;
    appearance: none;
}

.login_main_section .Sign_in_btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.login_main_section .otp_form {
    --otp-gap: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.login_main_section .otp_form h3,
.login_main_section .otp_form .otp_hint {
    width: 100%;
    text-align: center;
}

.login_main_section .otp_form .otp_hint {
    margin: 0 0 20px;
}

.login_main_section .otp_form .otp_field {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.login_main_section .otp_boxes {
    display: flex;
    justify-content: space-between;
    align-items: stretch;
    flex-wrap: nowrap;
    gap: var(--otp-gap);
    width: 100%;
    margin: 0;
}

.login_main_section .otp_boxes .otp-digit {
    flex: 1 1 0;
    width: auto !important;
    min-width: 0;
    max-width: none;
    height: 54px;
    padding: 0 !important;
    margin: 0;
    text-align: center;
    font-family: "Lato", sans-serif;
    font-size: 22px;
    font-weight: 600;
    color: #202b47;
    background: #fff;
    border: 1.5px solid #9e9e9e;
    border-radius: 8px;
    box-sizing: border-box;
    box-shadow: none;
    outline: none;
}

.login_main_section .otp_boxes .otp-digit:focus {
    outline: none;
    border-color: #52008e;
    box-shadow: none;
}

.login_main_section .otp_form .Sign_in_btn,
.login_main_section .otp_form .login_back_link {
    width: 100%;
    max-width: 100%;
}

.login_main_section .login_back_link {
    display: block;
    margin-top: 14px;
    padding: 8px 0;
    border: none;
    background: none;
    color: #52008e;
    font-family: "Lato", sans-serif !important;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    cursor: pointer;
}

@media (min-width: 1400px) {
    .login_main_section .login_form_box {
        max-width: 440px;
    }

    .login_main_section .login_right_box .logo {
        width: min(260px, 80%);
        max-width: 280px;
    }

    .login_main_section .login_form_box h3 {
        font-size: 32px;
    }
}

@media (max-width: 1199.98px) {
    .login_main_section .login_right_box {
        padding: 36px 36px;
    }

    .login_main_section .login_form_box {
        max-width: 400px;
    }
}
