.auth-page {
    /* min-height: 100vh; */
    display: flex;
    justify-content: center;
    align-items: center;
    margin-inline: 16px;
    border-radius: 12px;
    background-color: #e8e8e8;
}

.auth-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 50px 0;
}

.auth-logo {
    margin-bottom: 30px;
}

.auth-logo img {
    width: 240px;
    object-fit: contain;
}

.auth-card {
    width: 100%;
    max-width: 480px;
    background: #fff;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 20px 45px rgba(0, 0, 0, .25);
    box-sizing: border-box;
}

.auth-header {
    text-align: center;
    margin-bottom: 24px;
}

.auth-header h1 {
    font-size: 30px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #000;
}

.auth-header p {
    color: #6E6E6E;
    margin: 0;
    font-size: 16px;
}

.auth-form .form-group {
    margin-bottom: 18px;
}

.auth-input {
    position: relative;
}

.auth-input-icon {
    position: absolute;
    left: 15px;
    top: 23px;
    transform: translateY(-50%);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.auth-input-icon img {
    width: 18px;
    height: 18px;
}

.auth-input .form-control {
    height: 46px;
    padding-left: 45px;
}

.auth-password .form-control {
    padding-right: 50px;
}

.was-validated .form-control:invalid,
.form-control.is-invalid {
    background-image: none;
}

.was-validated .input-group .form-control:invalid,
.was-validated .input-group .form-control:invalid:focus,
.input-group .form-control.is-invalid,
.input-group .form-control.is-invalid:focus {
    z-index: unset;
}

.password-toggle {
    position: absolute;
    right: 14px;
    top: 23px;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #777;
    cursor: pointer;
    padding: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
}

.password-toggle:focus {
    outline: none;
}

.auth-links {
    display: flex;
    justify-content: space-between;
    margin: 10px 0 24px;
}

.auth-links a {
    font-weight: 600;
    color: #28998b;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

.btn-auth {
    height: 46px;
    background: #28998b;
    color: #fff;
    border-radius: 10px;
    text-transform: uppercase;
}

.btn-auth:hover {
    color: #fff;
}

.auth-footer {
    margin-top: 18px;
    text-align: center;
}

.auth-footer a {
    color: #28998b;
    font-weight: 600;
}

.invalid-feedback {
    display: block;
}

.invalid-feedback:empty {
    display: none;
}

.input-group:not(.has-validation)> :not(:last-child):not(.dropdown-toggle):not(.dropdown-menu),
.input-group:not(.has-validation)>.dropdown-toggle:nth-last-child(n+3) {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.input-group-merge .form-control:not(:last-child) {
    border-right: 1px solid;
}

.auth-container:has(.register-card) {
    margin-top: 2%;
}

.register-card {
    width: 100%;
    max-width: 1100px;
    padding: 25px 40px;
    box-sizing: border-box;

    & .auth-header {
        margin-bottom: 12px;
    }

    & .auth-input .form-control {
        padding-left: 12px;
    }

    #ideal-postcode-wrapper div {
        margin-bottom: 8px !important;
    }
}

/* ================= Responsive Adjustments ================= */
@media (max-width: 991.98px) {
    .register-card {
        padding: 25px 28px;
    }
}

@media (max-width: 767.98px) {
    .auth-page {
        margin-inline: 8px;
        border-radius: 10px;
    }

    .auth-container {
        margin: 24px 0;
    }

    .auth-card {
        padding: 28px 20px;
        border-radius: 18px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, .14);
    }

    .register-card {
        padding: 22px 18px;
        border-radius: 18px;
    }

    .auth-header h1 {
        font-size: 24px;
    }

    .auth-header p {
        font-size: 14px;
    }

    .register-card #rf_submit_btn {
        width: 100% !important;
        max-width: 320px;
    }

    .checkbox-option {
        align-items: flex-start;
        display: flex;
        margin-bottom: 10px;
    }

    .custom-checkbox {
        margin-top: 3px;
        flex-shrink: 0;
    }

    .agreement_and_offer_label {
        font-size: 13.5px;
        line-height: 1.4;
    }

    #ideal-postcode-wrapper {
        flex-direction: column !important;
    }

    #ideal-postcode-wrapper > div {
        width: 100%;
        flex-direction: column !important;
    }

    #ideal-postcode-wrapper .form-group,
    #ideal-postcode-wrapper .ipsf_submit {
        width: 100% !important;
    }
}

@media (max-width: 480px) {
    .auth-page {
        margin-inline: 4px;
        border-radius: 8px;
    }

    .auth-card {
        padding: 22px 14px;
        border-radius: 14px;
    }

    .register-card {
        padding: 18px 12px;
        border-radius: 14px;
    }

    .auth-header h1 {
        font-size: 22px;
    }

    .auth-input .form-control {
        height: 44px;
        font-size: 14px;
    }

    .auth-input-icon,
    .password-toggle {
        top: 22px;
    }

    .register-card #rf_submit_btn {
        width: 100% !important;
        max-width: 100%;
        height: 44px;
    }
}