*, *::before, *::after {
    box-sizing: border-box;
}

/* ======== Auth pages: login / signup / forgot-password ======== */

.loginContainer {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: clamp(16px, 3vw, 40px);
    min-height: 100vh;
    max-width: 100%;
    width: 100%;
    overflow-x: hidden;
    column-gap: 20px;
    text-align: left;
    align-items: center;
}

.loginDetails {
    width: 100%;
}

.loginDetails h1 {
    font-size: clamp(28px, 5vw, 42px);
    margin: 0;
    font-weight: 700;
    color: #D6482C;
    line-height: 1.2;
    overflow-wrap: break-word;
}

.boldText {
    font-weight: bold;
    color: black;
}

.loginCoverImage {
    border-radius: 15px;
    width: 100%;
    height: 100%;
    min-height: 320px;
    background-color: #7C7C7C;
    overflow: hidden;
    object-fit: cover;
}

.signUp, .login, .forgotPassword {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    width: 100%;
}

.signUp form, .login form, .forgotPassword form {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    width: 100%;
}

.loginContent {
    border-bottom: 1px solid #ddd;
    margin-bottom: 25px;
    padding-bottom: 10px;
}

.loginContent h2 {
    font-weight: 400;
    font-size: clamp(22px, 4vw, 32px);
    margin: 0;
    overflow-wrap: break-word;
}

.loginContent p {
    color: #7C7C7C;
    font-size: clamp(14px, 2vw, 18px);
    margin: 0;
    margin-top: 8px;
    margin-bottom: 20px;
}

.switchViewBtn {
    display: block;
    border: none;
    background: none;
    cursor: pointer;
    text-align: center;
    width: 100%;
    font-size: clamp(14px, 2vw, 16px);
    color: #7C7C7C;
    text-decoration: none;
    padding: 8px 0;
}

.switchViewBtn:hover {
    color: #D6482C;
}

button[type="submit"], .button {
    border-radius: 15px;
    color: white;
    border: none;
    background-color: #D6482C;
    width: 100%;
    font-size: clamp(15px, 2.5vw, 20px);
    padding-block: clamp(10px, 1.5vw, 14px);
    cursor: pointer;
    margin-block: 20px;
    transition: background-color 0.2s ease;
}

button[type="submit"]:hover, .button:hover {
    background-color: #b93b22;
}

.login input, .signUp input, .forgotPassword input {
    padding: clamp(10px, 1.5vw, 14px);
    border-radius: 10px;
    border: 1px solid #7C7C7C;
    font-size: clamp(14px, 2vw, 16px);
    width: 100%;
    background-color: #fff;
}

.login input:focus, .signUp input:focus, .forgotPassword input:focus {
    border-color: #D6482C;
    outline: none;
}

/* .login label, .signUp label, .forgotPassword label {
    width: 100%;
    margin-block: 8px;
    font-size: clamp(14px, 2vw, 16px);
    display: flex;
    flex-direction: column;
    gap: 6px;
} */

.login label, .forgotPassword label {
    width: 100%;
    height: 35px;
    font-size: clamp(14px, 2vw, 16px);
    display: flex;
    justify-content: space-between;
    gap: 6px;
}


.passwordLabel {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    width: 100%;
}

.passwordLabel button {
    cursor: pointer;
    background: none;
    border: none;
    color: #7C7C7C;
    font-size: 14px;
}

.passwordLabel button:hover {
    color: #D6482C;
}

.forgotPasswordContainer {
    text-align: right;
    margin-top: 5px;
}

.forgotPasswordContainer a {
    color: #7C7C7C;
    font-size: 14px;
    text-decoration: none;
}

.forgotPasswordContainer a:hover {
    color: #D6482C;
    text-decoration: underline;
}

.termsCheckBox {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #7C7C7C;
    cursor: pointer;
    width: 100%;
    margin-block: 12px;
}

.termsCheckBox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #D6482C;
    flex-shrink: 0;
    margin: 0;
    padding: 0;
}

.termsCheckBox a {
    color: #D6482C;
    text-decoration: underline;
    font-weight: 500;
}

.termsCheckBox a:hover {
    text-decoration: none;
}


/* ================= RESPONSIVE MEDIA QUERIES ================= */

/* ---- Tablet (≤900px) ---- */
@media screen and (max-width: 900px) {
    .loginContainer {
        padding: clamp(12px, 2.5vw, 24px);
        column-gap: 16px;
    }
    .signUp, .login, .forgotPassword {
        margin: clamp(15px, 3vw, 25px);
    }
    .loginContent {
        margin-bottom: 18px;
    }
    .loginContent p {
        margin-bottom: 15px;
    }
}

/* ---- Small tablet / large phone (≤768px) ---- */
@media screen and (max-width: 768px) {
    .loginContainer {
        gap: 16px;
    }
    .loginCoverImage {
        min-height: 240px;
        border-radius: 12px;
    }
    .loginDetails h1 {
        font-size: clamp(24px, 6vw, 36px);
    }
}

/* ---- Mobile screens (≤600px) ---- */
@media screen and (max-width: 600px) {
    .loginContainer {
        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 100%;
        padding: 0;
        min-height: auto;
    }

    .loginDetails {
        padding: 0;
        width: 100%;
    }

    .loginDetails h1 {
        padding-inline: 20px;
        margin-top: 20px;
    }

    .loginCoverImage {
        display: none;
        visibility: hidden;
        min-height: 0;
        height: 0;
    }

    .signUp, .login, .forgotPassword {
        margin: 0 0 30px;
        width: 100%;
        padding: 10px 20px;
    }

    .loginContent h2 {
        font-size: 24px;
    }

    button[type="submit"], .button {
        font-size: 18px;
        padding-block: 12px;
        margin-block: 15px;
    }
}


/* =====================================================================
   RESPONSIVE — LARGE / MEDIUM / SMALL (login, signup, forgot-password)
   ---------------------------------------------------------------------
   lg  >= 992px  : two balanced columns (form + cover panel). Both tracks
                   are capped so a wide monitor gets a centred pair instead
                   of a 900px wide e-mail field.
   md  768-991px : one centred column (max-width 520px), cover hidden.
   sm  576-767px : one centred column, comfortable spacing.
   xs  <= 575px  : full width fields, thumb friendly buttons.

   The site header renders above these screens, so the full-height
   containers subtract its height (--bca-header-h, defined in
   responsiveStyle.css) to keep the form visible without scrolling.
   ===================================================================== */

/* ---------------- lg and up ---------------- */
@media screen and (min-width: 992px) {
    .loginContainer {
        grid-template-columns: minmax(0, 560px) minmax(0, 720px);
        justify-content: center;
        align-items: stretch;
        column-gap: clamp(24px, 4vw, 60px);
        min-height: calc(100vh - var(--bca-header-h, 75px));
        min-height: calc(100dvh - var(--bca-header-h, 75px));
    }

    /* Let the stretched grid row decide the cover height so the panel
       always matches the height of the form next to it. */
    .loginCoverImage {
        height: auto;
    }
}

/* ---------------- md / sm : one centred column ---------------- */
@media screen and (max-width: 991.98px) {
    .loginContainer {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: stretch;
        column-gap: 0;
        padding: clamp(20px, 4vw, 40px) clamp(16px, 4vw, 32px);
        min-height: calc(100vh - var(--bca-header-h, 75px));
        min-height: calc(100dvh - var(--bca-header-h, 75px));
    }

    .loginDetails {
        width: 100%;
        max-width: 520px;
        margin-inline: auto;
    }

    /* Half a viewport of grey adds nothing once the form is full width. */
    .loginCoverImage {
        display: none;
        visibility: hidden;
        height: 0;
        min-height: 0;
    }

    .signUp, .login, .forgotPassword {
        margin: clamp(16px, 3.5vw, 30px) 0 32px;
    }
}

/* ---------------- sm / xs : tighter rhythm ---------------- */
@media screen and (max-width: 575.98px) {
    .loginContainer {
        padding-block: 18px 8px;
        padding-inline: 14px;
    }

    .loginDetails {
        max-width: 100%;
    }

    .loginDetails h1 {
        padding-inline: 0;
        margin-top: 8px;
    }

    .loginContent p {
        font-size: 14px;
    }

    .signUp, .login, .forgotPassword {
        padding-inline: 0;
        margin-bottom: 26px;
    }

    .termsCheckBox {
        font-size: 13px;
        line-height: 1.5;
    }

    .forgotPasswordContainer a,
    .switchViewBtn {
        font-size: 13.5px;
    }
}

/* ---------------- xs : let the page scroll naturally ---------------- */
@media screen and (max-width: 480px) {
    .loginContainer {
        min-height: auto;
    }
}

/* Recovery-specific controls; shared layout stays identical to forgot password. */
.resetPassword .password-wrapper {
    position: relative;
    margin-bottom: 16px;
}

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

.resetPassword .toggle-password {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    right: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 36px;
    padding: 8px;
    border: 0;
    border-radius: 8px;
    background: none;
    color: #7C7C7C;
    cursor: pointer;
}

.resetPassword .toggle-password svg {
    width: 20px;
    height: 20px;
    pointer-events: none;
}

.resetPassword .toggle-password:hover,
.resetPassword .toggle-password.is-visible {
    color: #D6482C;
}

.resetPassword .toggle-password:focus-visible,
.otpVerification .switchViewBtn:focus-visible {
    outline: 2px solid #D6482C;
    outline-offset: 2px;
}

.resetPassword label.error,
.otpVerification label.error {
    display: block;
    height: auto;
}

.otpVerification .otp-container {
    display: flex;
    gap: clamp(8px, 2.5vw, 12px);
    margin-bottom: 16px;
}

.otpVerification .otp-input {
    width: clamp(44px, 13vw, 56px);
    height: clamp(50px, 15vw, 60px);
    min-width: 0;
    padding: 0;
    text-align: center;
    font-size: clamp(20px, 5vw, 24px);
    font-weight: 600;
}

.otpVerification .otp-input.filled {
    border-color: #D6482C;
    background-color: rgba(214, 72, 44, 0.05);
}

.otpVerification .resend-wrapper {
    color: #7C7C7C;
    font-size: clamp(14px, 2vw, 16px);
    text-align: center;
    min-height: 40px;
}

.resetPassword button:disabled,
.otpVerification button:disabled {
    opacity: 0.65;
    cursor: wait;
}
