/* ==========================================================================
   Merchant Login — split screen layout
   Scoped to body.merchant-auth-page so it never leaks into other merchant
   pages that share merchant-style.css
   ========================================================================== */

body.merchant-auth-page {
    /* border-box on the body itself: the "*" rule below only covers its
       descendants, so 100vh + padding used to force a stray scrollbar */
    box-sizing: border-box;
    margin: 0;
    padding: 24px;
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #08142f;
    background-image:
        linear-gradient(rgba(7, 17, 43, .72), rgba(7, 17, 43, .72)),
        url(../images/signin_bg.jpg);
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    font-family: 'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
    color: #0f1f45;
    -webkit-font-smoothing: antialiased;
}

body.merchant-auth-page * {
    box-sizing: border-box;
}

.ml-card {
    width: 100%;
    max-width: 1010px;
    min-height: 620px;
    display: flex;
    align-items: stretch;
    background: #ffffff;
    border-radius: 16px;
    padding: 10px;
    box-shadow: 0 24px 70px rgba(15, 31, 69, .14);
    overflow: hidden;
}

/* ---------------------------------------------------------------- left pane */

.ml-pane-left {
    position: relative;
    flex: 0 0 44%;
    max-width: 44%;
    padding: 30px 28px;
    border-radius: 14px;
    overflow: hidden;
    background: #08142f;
    background-image:
        radial-gradient(120% 90% at 100% 0%, #123b83 0%, rgba(18, 59, 131, 0) 60%),
        linear-gradient(160deg, #071331 0%, #0a1e47 48%, #0b2555 100%);
    display: flex;
    flex-direction: column;
}

/* subtle dot grid, top-right */
.ml-pane-left::before {
    content: "";
    position: absolute;
    top: 18px;
    right: 18px;
    width: 190px;
    height: 130px;
    background-image: radial-gradient(rgba(255, 255, 255, .16) 1.1px, transparent 1.1px);
    background-size: 15px 15px;
    opacity: .55;
    pointer-events: none;
}

/* concentric arcs, bottom-left (password screens) */
.ml-pane-left.ml-arcs::after {
    content: "";
    position: absolute;
    left: -70px;
    bottom: -70px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .045);
    box-shadow:
        0 0 0 34px rgba(255, 255, 255, .035),
        0 0 0 68px rgba(255, 255, 255, .028);
    pointer-events: none;
}

.ml-pane-left > * {
    position: relative;
    z-index: 1;
}

/* brand */
.ml-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    margin-bottom: 26px;
}

.ml-brand img {
    width: 34px;
    height: auto;
    display: block;
}

.ml-brand span {
    font-size: 25px;
    font-weight: 700;
    letter-spacing: -.4px;
    color: #ffffff;
    line-height: 1;
}

.ml-brand:hover span {
    color: #ffffff;
}

/* portal badge */
.ml-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    align-self: flex-start;
    padding: 7px 14px;
    border-radius: 999px;
    background: #17356e;
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: .9px;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.ml-badge svg {
    width: 13px;
    height: 13px;
    flex: none;
}

/* headline */
.ml-title {
    margin: 0 0 12px;
    font-size: 31px;
    line-height: 1.22;
    font-weight: 700;
    letter-spacing: -.6px;
    color: #ffffff;
}

.ml-title .ml-title-accent {
    display: block;
    color: #3b82f6;
}

.ml-lead {
    margin: 0 0 24px;
    max-width: 300px;
    font-size: 13.5px;
    line-height: 1.65;
    color: #9db0d3;
}

/* feature list */
.ml-features {
    list-style: none;
    margin: 0 0 22px;
    padding: 0;
}

.ml-features li {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid rgba(255, 255, 255, .09);
}

.ml-features li:first-child {
    padding-top: 0;
}

.ml-features li:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.ml-feature-icon {
    flex: none;
    width: 42px;
    height: 42px;
    border-radius: 11px;
    background: #14315e;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #8fb7ff;
}

.ml-feature-icon svg {
    width: 19px;
    height: 19px;
}

.ml-feature-text h4 {
    margin: 0 0 3px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    letter-spacing: -.1px;
}

.ml-feature-text p {
    margin: 0;
    font-size: 12.5px;
    line-height: 1.45;
    color: #8fa3c6;
}

/* support card */
.ml-support {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 14px;
    border-radius: 13px;
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .1);
}

.ml-support-icon {
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2f74f5, #1a49c4);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
}

.ml-support-icon svg {
    width: 19px;
    height: 19px;
}

.ml-support-text {
    flex: 1 1 auto;
    min-width: 0;
}

.ml-support-text h4 {
    margin: 0 0 2px;
    font-size: 13.5px;
    font-weight: 600;
    color: #ffffff;
}

.ml-support-text p {
    margin: 0;
    font-size: 11px;
    line-height: 1.4;
    color: #8fa3c6;
}

.ml-support-link {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #5b9bff;
    text-decoration: none;
    white-space: nowrap;
}

.ml-support-link:hover {
    color: #8ab8ff;
    text-decoration: none;
}

.ml-support-link svg {
    width: 12px;
    height: 12px;
}

/* --------------------------------------------------------------- right pane */

.ml-pane-right {
    flex: 1 1 auto;
    min-width: 0;
    padding: 30px 42px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* back link above the form (password screens) */
.ml-topbar {
    margin-bottom: 22px;
}

.ml-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 600;
    color: #1d5be0;
    text-decoration: none;
}

.ml-back:hover {
    color: #1544b3;
    text-decoration: none;
}

.ml-back svg {
    width: 16px;
    height: 16px;
}

/* language switcher */
.ml-lang-row {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 26px;
}

.ml-lang {
    position: relative;
    margin: 0;
}

.ml-lang select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    height: 42px;
    padding: 0 36px 0 38px;
    border: 1px solid #e3e9f4;
    border-radius: 10px;
    background: #ffffff;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 500;
    color: #23375f;
    cursor: pointer;
    outline: none;
}

.ml-lang select:focus {
    border-color: #2f74f5;
    box-shadow: 0 0 0 3px rgba(47, 116, 245, .12);
}

.ml-lang .ml-lang-globe,
.ml-lang .ml-lang-caret {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #64789f;
    pointer-events: none;
    display: flex;
}

.ml-lang .ml-lang-globe {
    left: 13px;
}

.ml-lang .ml-lang-caret {
    right: 13px;
}

.ml-lang svg {
    width: 15px;
    height: 15px;
}

/* form shell */
.ml-form-wrap {
    width: 100%;
    max-width: 410px;
    margin: 0 auto;
}

.ml-heading {
    margin: 0 0 7px;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -.6px;
    color: #0f1f45;
}

.ml-subheading {
    margin: 0 0 24px;
    font-size: 13.5px;
    line-height: 1.5;
    color: #4b6ea8;
}

.ml-alert {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 18px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
    border: 1px solid #bfe3c9;
    background: #eefaf1;
    color: #1c6b35;
}

.ml-alert svg {
    flex: none;
    width: 15px;
    height: 15px;
    margin-top: 2px;
}

/* An alert that reports a problem rather than a success. Same shape, amber. */
.ml-alert-warn {
    border-color: #f0d49a;
    background: #fdf6e9;
    color: #7a5405;
}

/* ---------------------------------------------------------------- resend box
   Offered only after a sign-in attempt on an unverified account, so it has to
   read as a second, smaller task beside the login form — not as another way to
   sign in. Hence the tinted card and the outlined button. */
.ml-resend {
    margin-bottom: 18px;
    padding: 14px 16px;
    border: 1px solid #f0d49a;
    border-radius: 10px;
    background: #fdf6e9;
}

.ml-resend-title {
    margin: 0 0 4px;
    font-size: 14px;
    font-weight: 600;
    color: #7a5405;
}

.ml-resend-text {
    margin: 0 0 12px;
    font-size: 13px;
    line-height: 1.55;
    color: #7a5405;
}

.ml-resend-text strong {
    font-weight: 600;
    word-break: break-all;
}

.ml-resend-form {
    margin: 0;
}

.ml-btn-resend {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 11px 16px;
    border: 1px solid #d9a441;
    border-radius: 10px;
    background: #fff;
    font-family: inherit;
    font-size: 13.5px;
    font-weight: 600;
    color: #7a5405;
    cursor: pointer;
    transition: background .15s ease, border-color .15s ease;
}

.ml-btn-resend:hover {
    background: #fbefd8;
    border-color: #c08f2c;
}

.ml-btn-resend svg {
    flex: none;
    width: 16px;
    height: 16px;
}

/* fields */
.ml-field {
    margin-bottom: 16px;
}

.ml-field > label,
.ml-label {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 600;
    color: #14274e;
}

.ml-input-wrap {
    position: relative;
    display: block;
}

.ml-input-wrap .ml-input-icon {
    position: absolute;
    top: 50%;
    left: 15px;
    transform: translateY(-50%);
    display: flex;
    color: #a5b4cf;
    pointer-events: none;
}

.ml-input-wrap .ml-input-icon svg {
    width: 16px;
    height: 16px;
}

body.merchant-auth-page .ml-input-wrap input {
    width: 100%;
    height: 50px;
    padding: 0 46px 0 44px;
    border: 1px solid #e3e9f4;
    border-radius: 10px;
    background: #ffffff;
    font-family: inherit;
    font-size: 13.5px;
    color: #14274e;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}

body.merchant-auth-page .ml-input-wrap input::placeholder {
    color: #9fb0cc;
    opacity: 1;
}

body.merchant-auth-page .ml-input-wrap input[readonly] {
    background: #f4f7fc;
    color: #55688c;
    cursor: default;
}

body.merchant-auth-page .ml-input-wrap input[readonly]:focus {
    border-color: #e3e9f4;
    box-shadow: none;
}

body.merchant-auth-page .ml-input-wrap input:focus {
    border-color: #2f74f5;
    box-shadow: 0 0 0 3px rgba(47, 116, 245, .12);
}

.ml-input-wrap .btn-show-pass {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    display: flex;
    color: #a5b4cf;
    cursor: pointer;
}

.ml-input-wrap .btn-show-pass:hover {
    color: #5c7099;
}

.ml-input-wrap .btn-show-pass svg {
    width: 17px;
    height: 17px;
}

/* error text — matches the jquery-validate label output */
.ml-error-slot {
    display: block;
}

.ml-error-slot:not(:empty) {
    margin-top: 6px;
}

body.merchant-auth-page .ml-error-slot label,
body.merchant-auth-page .ml-error-slot label.error,
body.merchant-auth-page label.error {
    display: block;
    margin: 0;
    font-size: 12.5px;
    font-weight: 500;
    color: #e02b20;
}

/* row holding the inline error + forgot link */
.ml-field-foot {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-top: 6px;
}

.ml-field-foot .ml-error-slot {
    flex: 1 1 auto;
    min-width: 0;
    margin-top: 0;
}

.ml-field-foot .ml-error-slot:not(:empty) {
    margin-top: 0;
}

.ml-link {
    color: #1d5be0;
    font-size: 12.5px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    flex: none;
}

.ml-link:hover {
    color: #1544b3;
    text-decoration: none;
}

/* remember me */
.ml-remember {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 4px 0 20px;
    cursor: pointer;
    user-select: none;
}

.ml-remember input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.ml-remember .ml-box {
    flex: none;
    width: 18px;
    height: 18px;
    border: 1.5px solid #cfd9ea;
    border-radius: 5px;
    background: #ffffff;
    position: relative;
    transition: all .15s ease;
}

.ml-remember .ml-box::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 1.5px;
    width: 5px;
    height: 9px;
    border: solid #ffffff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    transition: transform .15s ease;
}

.ml-remember input:checked ~ .ml-box {
    background: #2f74f5;
    border-color: #2f74f5;
}

.ml-remember input:checked ~ .ml-box::after {
    transform: rotate(45deg) scale(1);
}

.ml-remember input:focus-visible ~ .ml-box {
    box-shadow: 0 0 0 3px rgba(47, 116, 245, .18);
}

.ml-remember .ml-remember-text {
    font-size: 13px;
    font-weight: 500;
    color: #2b3f66;
}

/* primary button */
body.merchant-auth-page .ml-btn-primary {
    width: 100%;
    height: 50px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(90deg, #2f74f5 0%, #1543bf 100%);
    color: #ffffff;
    font-family: inherit;
    font-size: 14.5px;
    font-weight: 600;
    letter-spacing: .1px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(29, 74, 200, .25);
    transition: filter .15s ease, box-shadow .15s ease;
}

body.merchant-auth-page .ml-btn-primary:hover {
    filter: brightness(1.06);
    color: #ffffff;
}

body.merchant-auth-page .ml-btn-primary:active {
    box-shadow: 0 4px 12px rgba(29, 74, 200, .22);
}

body.merchant-auth-page .ml-btn-primary svg {
    width: 17px;
    height: 17px;
}

/* OR divider */
.ml-or {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 20px 0;
    color: #93a2bd;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .5px;
}

.ml-or::before,
.ml-or::after {
    content: "";
    flex: 1 1 auto;
    height: 1px;
    background: #e7ecf5;
}

/* google button */
body.merchant-auth-page .ml-btn-google {
    width: 100%;
    height: 50px;
    border: 1px solid #e3e9f4;
    border-radius: 10px;
    background: #ffffff;
    color: #1f2d4d;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    text-decoration: none;
    transition: background .15s ease, border-color .15s ease;
}

body.merchant-auth-page .ml-btn-google:hover {
    background: #f7f9fd;
    border-color: #d3dcec;
    color: #1f2d4d;
    text-decoration: none;
}

body.merchant-auth-page .ml-btn-google svg {
    width: 18px;
    height: 18px;
}

/* footer */
.ml-foot {
    margin: 22px 0 0;
    text-align: center;
    font-size: 13px;
    color: #5b6e91;
}

.ml-foot a {
    color: #1d5be0;
    font-weight: 600;
    text-decoration: none;
}

.ml-foot a:hover {
    color: #1544b3;
    text-decoration: none;
}

/* recaptcha (kept invisible, same behaviour as before) */
body.merchant-auth-page #g-recaptcha-response {
    display: block !important;
    position: absolute;
    margin: -78px 0 0 0 !important;
    width: 302px !important;
    height: 76px !important;
    z-index: -999999;
    opacity: 0;
}

/* ------------------------------------------------------------- responsive */

/* short laptop screens — tighten the shell so the card still fits without
   the page having to scroll */
@media (min-width: 992px) and (max-height: 820px) {
    body.merchant-auth-page {
        padding: 12px;
    }

    .ml-pane-left {
        padding: 24px 26px;
    }

    .ml-brand {
        margin-bottom: 18px;
    }

    .ml-title {
        font-size: 28px;
    }

    .ml-lead {
        margin-bottom: 18px;
    }

    .ml-features li {
        padding: 11px 0;
    }

    .ml-pane-right {
        padding: 16px 38px 22px;
    }

    .ml-lang-row {
        margin-bottom: 14px;
    }

    .ml-subheading {
        margin-bottom: 18px;
    }
}

@media (max-width: 991px) {
    body.merchant-auth-page {
        padding: 16px;
        align-items: flex-start;
    }

    .ml-card {
        flex-direction: column;
        max-width: 560px;
        min-height: 0;
    }

    .ml-pane-left,
    .ml-pane-right {
        flex: 1 1 auto;
        max-width: 100%;
    }

    .ml-pane-right {
        padding: 20px 22px 26px;
    }

    .ml-form-wrap {
        max-width: 100%;
    }

    .ml-lead {
        max-width: 100%;
    }
}

@media (max-width: 575px) {
    body.merchant-auth-page {
        padding: 0;
    }

    .ml-card {
        border-radius: 0;
        padding: 8px;
        box-shadow: none;
        min-height: 100vh;
    }

    .ml-pane-left {
        padding: 24px 20px;
    }

    .ml-title {
        font-size: 26px;
    }

    .ml-features li {
        padding: 12px 0;
    }

    .ml-support {
        flex-wrap: wrap;
    }

    .ml-heading {
        font-size: 23px;
    }
}
