/* Auth pages: login / forgot / reset / confirm password */

/* clip, not hidden: hidden still scrolls in RTL and shifts the card */
html,
body.login {
    overflow-x: hidden; /* fallback where `clip` is unsupported */
    overflow-x: clip;
}

body.login {
    min-height: 100vh;
    margin: 0;
    padding: 30px 15px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    background-color: #F1F5FA;
}
body.login::before {
    content: "";
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: url(/img/auth/back-sign-in-texture.svg) center / cover no-repeat;
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}
/* marks anchor to this, so they follow the card and not the mobile logo above it */
.reset-card-wrap {
    position: relative;
    width: 100%;
}

/* Mirrored pair, one per corner — keep sides physical or RTL flips the diagonal */
.auth-bg-logo,
.auth-bg-logo2 {
    position: absolute;
    z-index: -1;
    pointer-events: none;
    user-select: none;
    width: 186px;
    height: auto;
}
.auth-bg-logo {
    top: -63px;
    left: -93px;
}
.auth-bg-logo2 {
    bottom: -63px;
    right: -93px;
}
@media (max-width: 768px) {
    .auth-bg-logo,
    .auth-bg-logo2 {
        width: 145px;
    }
    .auth-bg-logo {
        top: -72px;
        left: -72px;
    }
    .auth-bg-logo2 {
        bottom: -72px;
        right: -72px;
    }
}

/* Enerpize: tall bolt, opposite diagonal. Both files are the same shape, so no flip */
.brand-enerpize .auth-bg-logo,
.brand-enerpize .auth-bg-logo2 {
    width: 199px;
}
/* top/bottom: auto needed — the base rules set the other edge */
.brand-enerpize .auth-bg-logo {
    top: auto;
    bottom: -115px;
    left: -65px;
}
.brand-enerpize .auth-bg-logo2 {
    bottom: auto;
    top: -115px;
    right: -65px;
}
@media (max-width: 768px) {
    .brand-enerpize .auth-bg-logo,
    .brand-enerpize .auth-bg-logo2 {
        width: 123px;
    }
    .brand-enerpize .auth-bg-logo {
        bottom: -66px;
        left: -39px;
    }
    .brand-enerpize .auth-bg-logo2 {
        top: -66px;
        right: -39px;
    }
}

body.login .container.w-xxl {
    width: 100%;
    max-width: 580px;
    /* app.css pads .container by 5px, which would make the card 570 not 580 */
    padding: 0;
    position: relative;
    z-index: 1;
    /* auto margins, not justify-content: keeps a tall card scrollable */
    margin-block: auto;
}

.reset-card {
    width: 100%;
    box-sizing: border-box;
    background: #fff;
    border: 0;
    border-radius: 8px;
    box-shadow: 0 4px 13px rgba(33, 50, 66, 0.16);
    padding: 50px 61px;
    position: relative;
    z-index: 1;
}

.reset-card__topbar {
    margin-bottom: 32px;
}

.reset-logo {
    text-align: start;
}
.reset-logo img {
    max-width: 180px;
    max-height: 48px;
    object-fit: contain;
    display: block;
}
.reset-logo__name {
    display: inline-block;
    color: #0C2532;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.reset-card__head {
    margin-bottom: 28px;
}
.reset-card__title {
    margin: 0;
    color: #0C2532 !important;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    text-align: start;
}
.reset-card__subtitle {
    margin: 12px 0 0;
    color: #415565 !important;
    font-size: 16px;
    font-weight: 400;
    line-height: 26px;
    text-align: start;
}

.reset-note {
    box-sizing: border-box;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    background: rgba(2, 107, 255, 0.05);
    border: 1px solid rgba(2, 107, 255, 0.12);
    color: #415565;
    font-size: 14px;
    border-radius: 2px;
    padding: 15px;
    margin-bottom: 18px;
    text-align: start;
}
.reset-note__icon {
    color: #026BFF;
    font-size: 15px;
    margin-top: 2px;
    flex-shrink: 0;
}
.reset-note strong {
    color: #0C2532;
    font-weight: 600;
    unicode-bidi: isolate;
    word-break: normal;
    overflow-wrap: break-word;
}

.reset-field {
    margin-bottom: 18px;
}
.reset-input-wrap {
    position: relative;
}
/* margin/box-sizing needed: forms_v4.css pads every bare input */
.reset-input {
    width: 100%;
    height: 45px;
    box-sizing: border-box;
    margin: 0;
    border: 1px solid #98A2B3;
    border-radius: 2px;
    padding: 0 12px;
    font-size: 16px;
    color: #0C2532;
    background: #fff;
    outline: none;
    box-shadow: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    -webkit-appearance: none;
    appearance: none;
}
.reset-input::placeholder {
    color: #98A2B3;
}
.reset-input:focus {
    border-color: #026BFF;
    box-shadow: 0 0 0 2px rgba(1, 83, 189, 0.24);
}
.reset-input:disabled,
.reset-input-wrap.is-disabled .reset-input {
    background: rgba(229, 232, 238, 0.32);
    color: #878996;
    cursor: not-allowed;
    border-color: #E6EBF2;
}
.reset-input-wrap--toggle .reset-input {
    padding-inline-end: 42px;
}
.reset-input-toggle {
    position: absolute;
    top: 0;
    bottom: 0;
    inset-inline-end: 12px;
    display: flex;
    align-items: center;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
    color: #98A2B3;
    font-size: 16px;
    transition: color 0.2s;
}
.reset-input-toggle:hover {
    color: #026BFF;
}
.reset-error {
    margin-top: 5px;
    color: #EB2121;
    font-size: 12px;
    text-align: start;
}

.reset-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 24px;
}
.reset-check {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #344054;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin: 0;
}
.reset-check input[type=checkbox] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: #026BFF;
    cursor: pointer;
    flex-shrink: 0;
}
.reset-link {
    color: #026BFF;
    font-size: 16px;
    font-weight: 600;
    text-decoration: none;
}
.reset-link:hover,
.reset-link:focus {
    text-decoration: underline;
    color: #007bff;
}

.reset-btn {
    width: 100%;
    min-height: 60px;
    box-sizing: border-box;
    margin: 0;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 2px;
    cursor: pointer;
    background: linear-gradient(90deg, #1073FE 0%, #026BFF 50%, #005AD9 100%);
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    transition: opacity 0.2s;
}
.reset-btn:hover {
    opacity: 0.9;
}
.reset-btn:focus {
    outline: 2px solid #026BFF;
    outline-offset: 2px;
}

.reset-signup-row {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    flex-wrap: wrap;
    margin: 32px 0 0;
    color: #415565;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
}
.reset-signup-row a {
    color: #026BFF;
    font-weight: 500;
    text-decoration: none;
}
.reset-signup-row a:hover,
.reset-signup-row a:focus {
    text-decoration: underline;
    color: #007bff;
}

/* line the flash bar up with the card (messages.css gives it a 20px gutter) */
.Notemessage, .Errormessage, .Sucmessage {
    margin-inline: 0 !important;
    border-radius: 2px;
}
[dir=rtl] .Sucmessage,
[dir=rtl] .Errormessage,
[dir=rtl] .Notemessage {
    padding: 15px 50px 15px 15px;
    background-position: right 15px top 10px;
}

/* keep the powered-by footer above the background layers */
body.login .footer-bottom {
    position: relative;
    z-index: 1;
}

.auth-logo-mobile {
    display: none;
}

@media (max-width: 768px) {
    body.login {
        padding: 0 0 32px;
    }
    body.login .container.w-xxl {
        max-width: 100%;
    }
    /* match the card's gutters */
    .Notemessage, .Errormessage, .Sucmessage {
        margin-inline: 16px !important;
    }
    .auth-logo-mobile {
        display: block;
        margin-top: 30px;
        margin-bottom: 32px;
    }
    .auth-logo-mobile .reset-logo {
        text-align: center;
    }
    .auth-logo-mobile .reset-logo img {
        max-width: 200px;
        max-height: 54px;
        margin-inline: auto;
    }
    .auth-logo-mobile .reset-logo__name {
        font-size: 24px;
    }
    /* replaced by .auth-logo-mobile */
    .reset-card__topbar {
        display: none;
    }
    /* gutters go on the wrapper so the marks still hug the card */
    .reset-card-wrap {
        width: calc(100% - 32px);
        margin-inline: auto;
    }
    .reset-card {
        padding: 30px 24px 44px;
    }
    .reset-card__title {
        font-size: 28px;
        line-height: 36px;
    }
    .reset-card__subtitle {
        font-size: 14px;
    }
    .reset-check,
    .reset-link {
        font-size: 14px;
    }
    .reset-signup-row {
        font-size: 14px;
    }
    .reset-input {
        font-size: 16px; /* keep >=16px to avoid iOS zoom */
    }
}
