/* =========================================================
   LOSEMYWEIGHT AUTH
   Login + Register
========================================================= */

:root {

    --primary: #16A34A;
    --primary-dark: #166534;
    --primary-light: #eaf2eb;

    --cream: #f8f8f3;
    --white: #ffffff;

    --dark: #17211b;
    --text: #344039;
    --muted: #7c867f;

    --border: #dfe5e0;

    --error: #c44a43;
    --error-bg: #fff3f2;

    --success: #39744c;
    --success-bg: #edf8ef;

    --shadow:
        0 25px 70px rgba(38, 59, 45, .10);

    --radius: 22px;

    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {

    min-height: 100vh;

    background:
        radial-gradient(
            circle at 10% 10%,
            #eef4ed 0,
            transparent 30%
        ),
        radial-gradient(
            circle at 90% 90%,
            #edf3eb 0,
            transparent 28%
        ),
        var(--cream);

    color: var(--dark);

}


a {
    color: inherit;
    text-decoration: none;
}


button,
input {
    font: inherit;
}



/* =========================================================
   AUTH PAGE
========================================================= */

.auth-page {

    min-height: 100vh;

    display: grid;

    grid-template-columns:
        minmax(400px, 45%)
        1fr;

}



/* =========================================================
   BRAND SIDE
========================================================= */

.auth-brand {

    position: relative;

    display: flex;
    align-items: center;

    min-height: 100vh;

    padding: 60px;

    background:
        linear-gradient(
            145deg,
            #16A34A 0%,
            #166534 55%,
            #16A34A 100%
        );
    background: url(../img/banner6.jpg) no-repeat center;
    background-size: cover;
    overflow: hidden;
    background-position: bottom;

    color: var(--white);

    overflow: hidden;

}


.auth-brand::before {

    content: "";

    position: absolute;

    width: 420px;
    height: 420px;

    border-radius: 50%;

    right: -180px;
    top: -150px;

    background: rgba(255,255,255,.06);

}


.auth-brand::after {

    content: "";

    position: absolute;

    width: 320px;
    height: 320px;

    border-radius: 50%;

    left: -170px;
    bottom: -130px;

    background: rgba(255,255,255,.05);

}


.brand-content {

    position: relative;

    z-index: 2;

    max-width: 520px;

    margin: auto;

    width: 100%;

}


.auth-logo {

    display: inline-block;

    font-size: 25px;

    font-weight: 800;

    letter-spacing: -.7px;

}


.auth-logo span,
.mobile-logo span {

    color: #dcecdf;

}


.brand-message {

    margin-top: 110px;

}


.brand-icon {

    width: 58px;
    height: 58px;

    display: grid;
    place-items: center;

    margin-bottom: 25px;

    border-radius: 18px;

    background: rgba(255,255,255,.13);

    font-size: 23px;

}


.brand-message h1 {

    font-size: clamp(
        38px,
        4vw,
        58px
    );

    line-height: 1.08;

    letter-spacing: -2px;

    margin-bottom: 22px;

}


.brand-message p {

    max-width: 450px;

    color: rgba(255,255,255,.78);

    font-size: 15px;

    line-height: 1.8;

}


.brand-stats {

    display: flex;

    gap: 45px;

    margin-top: 70px;

}


.brand-stats div {

    display: flex;

    flex-direction: column;

    gap: 4px;

}


.brand-stats strong {

    font-size: 22px;

}


.brand-stats span {

    color: rgba(255,255,255,.65);

    font-size: 11px;

}



/* =========================================================
   BENEFIT LIST
========================================================= */

.benefit-list {

    margin-top: 55px;

    display: flex;

    flex-direction: column;

    gap: 17px;

}


.benefit-list div {

    display: flex;

    align-items: center;

    gap: 13px;

    color: rgba(255,255,255,.84);

    font-size: 13px;

}


.benefit-list i {

    width: 25px;
    height: 25px;

    display: grid;
    place-items: center;

    border-radius: 50%;

    background: rgba(255,255,255,.13);

    color: #dcecdf;

    font-size: 10px;

}



/* =========================================================
   FORM SIDE
========================================================= */

.auth-form-section {

    display: flex;

    align-items: center;
    justify-content: center;

    padding: 50px 30px;

}


.auth-form-wrapper {

    width: 100%;
    max-width: 455px;

}


.mobile-logo {

    display: none;

}


.auth-header {

    margin-bottom: 30px;

}


.auth-step {

    display: inline-block;

    margin-bottom: 10px;

    color: var(--primary);

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 1.5px;

}


.auth-header h2 {

    margin-bottom: 9px;

    color: var(--dark);

    font-size: 31px;

    letter-spacing: -.8px;

}


.auth-header p {

    color: var(--muted);

    font-size: 13px;

    line-height: 1.6;

}



/* =========================================================
   FORM
========================================================= */

.auth-form {

    width: 100%;

}


.auth-field {

    margin-bottom: 18px;

}


.auth-field label {

    display: block;

    margin-bottom: 8px;

    color: var(--dark);

    font-size: 12px;

    font-weight: 700;

}


.field-label-row {

    display: flex;

    align-items: center;

    justify-content: space-between;

}


.field-label-row a {

    color: var(--primary);

    font-size: 11px;

    font-weight: 600;

}


.input-wrapper {

    position: relative;

}


.input-wrapper > i:first-child {

    position: absolute;

    left: 15px;
    top: 50%;

    transform: translateY(-50%);

    color: #9aa39d;

    font-size: 13px;

    pointer-events: none;

}


.input-wrapper input {

    width: 100%;

    height: 52px;

    padding:
        0 46px
        0 42px;

    border: 1px solid var(--border);

    border-radius: 12px;

    outline: none;

    background: var(--white);

    color: var(--dark);

    font-size: 13px;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;

}


.input-wrapper input::placeholder {

    color: #aab0ac;

}


.input-wrapper input:focus {

    border-color: var(--primary);

    box-shadow:
        0 0 0 4px
        rgba(82,127,96,.09);

}


.password-toggle {

    position: absolute;

    right: 10px;
    top: 50%;

    transform: translateY(-50%);

    width: 34px;
    height: 34px;

    border: 0;

    background: transparent;

    color: #929b95;

    cursor: pointer;

}


.password-toggle:hover {

    color: var(--primary);

}


.field-error {

    display: block;

    min-height: 0;

    margin-top: 5px;

    color: var(--error);

    font-size: 10px;

}



/* =========================================================
   CHECKBOX
========================================================= */

.remember-row {

    margin: 5px 0 20px;

}


.checkbox-label,
.terms-label {

    display: flex;

    align-items: flex-start;

    gap: 9px;

    color: var(--muted);

    font-size: 11px;

    line-height: 1.5;

    cursor: pointer;

}


.checkbox-label input,
.terms-label input {

    position: absolute;

    opacity: 0;

    pointer-events: none;

}


.custom-checkbox {

    flex: 0 0 auto;

    width: 16px;
    height: 16px;

    margin-top: 1px;

    border: 1px solid #ccd5ce;

    border-radius: 4px;

    background: var(--white);

    transition: .2s;

}


.checkbox-label input:checked + .custom-checkbox,
.terms-label input:checked + .custom-checkbox {

    border-color: var(--primary);

    background: var(--primary);

}


.checkbox-label input:checked + .custom-checkbox::after,
.terms-label input:checked + .custom-checkbox::after {

    content: "?";

    display: block;

    color: white;

    font-size: 10px;

    text-align: center;

    line-height: 15px;

    font-weight: 700;

}


.terms-label {

    margin-top: 5px;

}


.terms-label a {

    color: var(--primary);

    font-weight: 600;

}



/* =========================================================
   SUBMIT BUTTON
========================================================= */

.auth-submit {

    width: 100%;

    height: 53px;

    display: flex;

    align-items: center;
    justify-content: center;

    gap: 12px;

    margin-top: 20px;

    border: 0;

    border-radius: 30px;

    background: var(--primary);

    color: var(--white);

    cursor: pointer;

    font-size: 13px;

    font-weight: 700;

    box-shadow:
        0 12px 25px
        rgba(82,127,96,.18);

    transition:
        transform .2s ease,
        background .2s ease,
        box-shadow .2s ease;

}


.auth-submit:hover {

    background: var(--primary-dark);

    transform: translateY(-2px);

    box-shadow:
        0 15px 30px
        rgba(82,127,96,.23);

}


.auth-submit:active {

    transform: translateY(0);

}


.auth-submit i {

    transition: transform .2s ease;

}


.auth-submit:hover i {

    transform: translateX(4px);

}



/* =========================================================
   SWITCH
========================================================= */

.auth-switch {

    margin-top: 22px;

    color: var(--muted);

    text-align: center;

    font-size: 12px;

}


.auth-switch a {

    color: var(--primary);

    font-weight: 700;

}


.auth-switch a:hover {

    text-decoration: underline;

}



/* =========================================================
   BACK HOME
========================================================= */

.back-home {

    margin-top: 30px;

    padding-top: 20px;

    border-top: 1px solid #e8ece9;

    text-align: center;

}


.back-home a {

    display: inline-flex;

    align-items: center;

    gap: 7px;

    color: var(--muted);

    font-size: 11px;

    transition: color .2s ease;

}


.back-home a:hover {

    color: var(--primary);

}



/* =========================================================
   ERROR / SUCCESS
========================================================= */

.auth-message {

    display: none;

    margin-bottom: 18px;

    padding: 11px 13px;

    border-radius: 9px;

    font-size: 11px;

    line-height: 1.5;

}


.auth-message.show {

    display: block;

}


.error-message {

    background: var(--error-bg);

    border: 1px solid #f0d0ce;

    color: var(--error);

}


.success-message {

    background: var(--success-bg);

    border: 1px solid #cde5d2;

    color: var(--success);

}



/* =========================================================
   PASSWORD STRENGTH
========================================================= */

.password-strength {

    display: grid;

    grid-template-columns:
        repeat(4, 1fr);

    gap: 4px;

    margin-top: 8px;

}


.password-strength span {

    height: 3px;

    border-radius: 5px;

    background: #e2e7e3;

    transition: background .2s;

}


.password-strength.weak span:nth-child(1) {

    background: #d66b63;

}


.password-strength.medium span:nth-child(1),
.password-strength.medium span:nth-child(2) {

    background: #d6a64c;

}


.password-strength.strong span:nth-child(1),
.password-strength.strong span:nth-child(2),
.password-strength.strong span:nth-child(3) {

    background: #7eaa68;

}


.password-strength.very-strong span {

    background: var(--primary);

}


.password-hint {

    display: block;

    margin-top: 5px;

    color: #929b95;

    font-size: 9px;

}



/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 900px) {

    .auth-page {

        grid-template-columns: 1fr;

    }


    .auth-brand {

        display: none;

    }


    .auth-form-section {

        min-height: 100vh;

        padding: 35px 22px;

    }


    .mobile-logo {

        display: block;

        margin-bottom: 50px;

        color: var(--dark);

        font-size: 24px;

        font-weight: 800;

        letter-spacing: -.7px;

    }


    .mobile-logo span {

        color: var(--primary);

    }

}


@media (max-width: 500px) {

    .auth-form-section {

        padding:
            25px 18px;

    }


    .mobile-logo {

        margin-bottom: 35px;

    }


    .auth-header h2 {

        font-size: 27px;

    }


    .auth-header {

        margin-bottom: 25px;

    }


    .input-wrapper input {

        height: 50px;

    }

}
#signupresult {
    display: block;
    width: 100%;
    margin: 10px 0 15px;
}

.signup-error {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 12px 15px;
    background: #fff1f0;
    border: 1px solid #f5c2c0;
    border-radius: 8px;
    color: #b42318;
    font-size: 13px;
    text-align: center;
}


/* =========================================================
   LOGIN MESSAGE
========================================================= */

#loginresult {
    display: block;
    width: 100%;
    margin: 8px 0 16px;
}


#loginresult:empty {
    display: none;
}


#loginresult .alert,
#loginresult .login-error {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 11px 14px;
    margin: 0;
    border-radius: 9px;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}


.login-error {
    color: #b42318 !important;
    background: #fff1f0 !important;
    border: 1px solid #f3c5c2 !important;
}


#loginresult .alert-success {
    color: #28743c;
    background: #eef9f0;
    border: 1px solid #c9e8cf;
}


/* =========================================================
   LOGIN BUTTON
========================================================= */

#loginButton:disabled {
    opacity: .65;
    cursor: not-allowed;
    transform: none;
}


.logo-icon {
    width: 214px;
    height: 55px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    /* transform: rotate(-8deg); */
}

.alert-success {
    color: #3c763d !important;
    background-color: #dff0d8 !important;
    border-color: #d6e9c6 !important;
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 11px 14px;
    margin: 0;
    border-radius: 9px;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}

.alert-danger
{
    background: rgba(196, 71, 54, 0.09);
    color: #c10505;
    border: 1px solid rgb(221 13 13 / 22%);
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: 11px 14px;
    margin: 0;
    border-radius: 9px;
    font-size: 12px;
    line-height: 1.5;
    text-align: center;
}



/* new css */

/* CAPTCHA Section */
.auth-field {
    margin-bottom: 20px;
}

.auth-field .form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* CAPTCHA Code + Refresh Button */
.auth-field .d-flex {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* CAPTCHA Code */
#captchaCode {
    min-width: 145px;
    height: 48px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0 18px;

    background: linear-gradient(
        135deg,
        #f8f9fa,
        #e9ecef
    ) !important;

    border: 1px solid #d9dee3;
    border-radius: 8px;

    font-size: 22px !important;
    font-weight: 700 !important;
    letter-spacing: 6px !important;

    color: #202124;

    user-select: none;
    position: relative;
    overflow: hidden;

    box-shadow:
        0 2px 6px rgba(0, 0, 0, 0.06);

    /* CAPTCHA style */
    font-family: "Courier New", monospace;
    font-style: italic;
}

/* Slight CAPTCHA visual effect */
#captchaCode::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 1px;
    background: rgba(0, 0, 0, 0.12);
    transform: rotate(-8deg);
    top: 50%;
    left: 0;
}

/* Refresh Button */
.auth-field button {
    width: 48px;
    height: 48px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 0;

    border: 1px solid #d9dee3;
    border-radius: 8px;

    background: #ffffff;
    color: #555;

    font-size: 24px;
    line-height: 1;

    cursor: pointer;

    transition: all 0.2s ease;
}

/* Hover */
.auth-field button:hover {
    background: #f1f5f9;
    border-color: #9ca3af;
    color: #111827;

    transform: rotate(15deg);
}

/* Click */
.auth-field button:active {
    transform: scale(0.94);
}

/* Input */
#captchaInput {
    width: 100%;
    height: 48px;

    margin-top: 10px !important;

    padding: 0 14px;

    border: 1px solid #d9dee3;
    border-radius: 8px;

    background: #ffffff;

    color: #222;
    font-size: 15px;

    outline: none;

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        background 0.2s ease;
}

/* Placeholder */
#captchaInput::placeholder {
    color: #9ca3af;
}

/* Focus */
#captchaInput:focus {
    border-color: #2563eb;

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, 0.10);

    background: #fff;
}

/* Error state - optional */
#captchaInput.captcha-error {
    border-color: #dc2626;

    box-shadow:
        0 0 0 3px rgba(220, 38, 38, 0.08);
}

/* Success state - optional */
#captchaInput.captcha-success {
    border-color: #16a34a;

    box-shadow:
        0 0 0 3px rgba(22, 163, 74, 0.08);
}


/* Mobile Responsive */
@media (max-width: 480px) {

    #captchaCode {
        min-width: 125px;
        height: 46px;

        font-size: 20px !important;
        letter-spacing: 5px !important;
    }

    .auth-field button {
        width: 46px;
        height: 46px;
    }

    #captchaInput {
        height: 46px;
        font-size: 14px;
    }
}