/* Sign-in pages (_LayoutAuthModern): one card on the off-white page. Inputs, buttons and alerts come from the shared
   am-*.css through the card's .am-admin wrapper; this file holds the frame and the few auth-only pieces. */

body.am-auth {
    /* The app shrinks itself to 90% (body zoom, --ui-scale in style.css); the sign-in pages have one form on a
       wide page, so they stay at 100%. --ui-scale is re-declared so the vh maths below sees the real value. */
    zoom: 1;
    --ui-scale: 1;
    --app-vh: 100vh;
    --app-vw: 100vw;
    margin: 0;
    min-height: 100vh;
    background: var(--am-surface);
    font-family: var(--am-font);
    color: var(--am-ink);
    -webkit-font-smoothing: antialiased;
}

/* ---- Split: navy brand panel left, form right; one column under 900px ---- */
/* Fluid sizing: every size below is clamp(min, viewport-relative, max), so the page grows on large or zoomed-out
   screens instead of leaving small text at the edges, and never shrinks below its phone sizes. */
.am-auth-split {
    min-height: calc(100vh / var(--ui-scale, 1));
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
}

.am-auth-brandpanel {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: clamp(28px, 3vw, 56px);
    padding: clamp(32px, 3.2vw, 64px) clamp(32px, 5vw, 110px);
    background: var(--am-navy);
    background-image: radial-gradient(at 0% 100%, rgba(11, 107, 52, .35) 0, transparent 55%),
                      radial-gradient(at 100% 0%, rgba(21, 53, 103, .9) 0, transparent 60%);
    color: var(--am-paper);
}

.am-auth-brand {
    display: block;
    width: clamp(160px, 11vw, 230px);
}

.am-auth-brand img {
    display: block;
    width: 100%;
    height: auto;
}

.am-auth-pitch {
    max-width: clamp(400px, 34vw, 680px);
    align-self: center;
}

.am-auth-pitch-h {
    margin: 0 0 12px;
    font-family: var(--am-font);
    font-size: clamp(28px, 2.3vw, 46px);
    font-weight: 500;
    letter-spacing: -.5px;
    line-height: 1.2;
    color: var(--am-paper);
}

.am-auth-pitch-p {
    margin: 0 0 24px;
    font-size: 15px;
    line-height: 1.5;
    color: rgba(255, 255, 255, .78);
}

.am-auth-points {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.am-auth-points li {
    position: relative;
    padding-left: 24px;
    font-size: 14px;
    line-height: 1.45;
    color: rgba(255, 255, 255, .88);
}

.am-auth-points li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #6FBF4A;
    box-shadow: inset 0 0 0 3px var(--am-navy);
    outline: 1.5px solid #6FBF4A;
}

.am-auth-brandfoot {
    margin: 0;
    font-size: 12px;
    color: rgba(255, 255, 255, .5);
}

.am-auth-formside {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: clamp(16px, 1.4vw, 28px);
    padding: clamp(32px, 3vw, 64px) 24px;
}

.am-admin.am-auth-card {
    width: 100%;
    max-width: clamp(400px, 28vw, 580px);
    margin-top: 0;
}

/* The wide (onboarding) forms can run taller than the screen; the bottom margin keeps their last line clear of the
   absolutely positioned "Need help?" footer. */
.am-admin.am-auth-card.is-wide,
.am-admin.am-auth-card.is-xwide {
    max-width: clamp(480px, 33vw, 680px);
    margin-bottom: clamp(32px, 3vw, 64px);
}

/* Onboarding forms (CreateAccount, Seller Central /getfunded): wider, so the fields pair up and the copy wraps
   less - the page fits a laptop screen without scrolling. */
.am-admin.am-auth-card.is-xwide {
    max-width: clamp(560px, 48vw, 800px);
}

/* The small mark on the form side only shows when the brand panel is hidden (narrow screens). */
.am-auth-brand-sm {
    display: none;
    width: 140px;
    height: auto;
    margin: 0 auto 24px;
}

@media (max-width: 899.98px) {
    .am-auth-split {
        grid-template-columns: 1fr;
    }

    .am-auth-brandpanel {
        display: none;
    }

    .am-auth-brand-sm {
        display: block;
    }

    .am-auth-formside {
        padding: 36px 16px 64px;
    }

    .am-auth-foot {
        right: 0;
        left: 0;
        bottom: 24px;
        text-align: center;
    }
}

/* ---- Heading ---- */
.am-admin .am-auth-title {
    margin: 0 0 4px;
    font-family: inherit;
    font-size: clamp(22px, 1.6vw, 32px);
    font-weight: 500;
    letter-spacing: -.3px;
    line-height: 1.2;
    color: var(--am-navy);
}

.am-admin .am-auth-sub {
    margin: 0 0 clamp(20px, 1.6vw, 32px);
    font-size: clamp(13.5px, .95vw, 18px);
    color: var(--am-slate);
}

/* ---- Form ---- */
.am-admin .am-auth-field {
    margin-bottom: 14px;
}

.am-admin .am-auth-field label {
    display: block;
}

.am-admin .am-auth-field {
    margin-bottom: clamp(14px, 1vw, 20px);
}

.am-admin .am-auth-field label {
    font-size: clamp(11px, .75vw, 14px);
}

.am-admin .am-auth-field .form-control {
    height: clamp(42px, 2.8vw, 54px);
    padding-left: clamp(12px, .8vw, 16px);
    font-size: clamp(14px, .95vw, 18px);
}

/* Browser autofill paints the field pale blue; keep it white like the others. */
.am-admin .am-auth-field .form-control:-webkit-autofill,
.am-admin .am-auth-field .form-control:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 100px var(--am-paper) inset;
    -webkit-text-fill-color: var(--am-navy);
}

.am-admin .am-auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 2px 0 18px;
    font-size: var(--am-text-sm);
}

.am-admin label.am-auth-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-size: var(--am-text-sm);
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: var(--am-ink-2);
    cursor: pointer;
}

.am-admin .am-auth-check input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--am-accent);
}

.am-admin .am-auth-link {
    font-size: var(--am-text-sm);
    font-weight: 500;
    color: var(--am-blue);
    text-decoration: none;
}

.am-admin .am-auth-link:hover {
    color: var(--am-navy);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.am-admin .am-auth-btn {
    width: 100%;
    height: clamp(42px, 2.8vw, 54px);
    font-size: clamp(14px, .95vw, 18px);
}

.am-admin .am-auth-btn.is-busy {
    opacity: .85;
}

.am-admin .am-auth-btn.is-busy::after {
    width: 14px;
    height: 14px;
}

.am-admin .am-auth-after {
    margin: 16px 0 0;
    font-size: var(--am-text-sm);
    color: var(--am-slate);
    text-align: center;
}

/* "New to AccrueMe?" under the sign-in button: a hairline, then the line. */
.am-admin .am-auth-signup {
    margin-top: 22px;
}

.am-admin .am-auth-signup-rule {
    display: block;
    height: 1px;
    margin-bottom: 14px;
    background: var(--am-hair);
}

.am-admin .am-auth-signup p {
    margin: 0;
    font-size: var(--am-text-base);
    color: var(--am-slate);
}

.am-admin .am-auth-signup p + p {
    margin-top: 6px;
}

.am-admin .am-auth-signup .am-auth-signup-sub {
    font-size: var(--am-text-sm);
}

/* Both lines on one row when there is room, wrapping back to two when there isn't. */
.am-admin .am-auth-signup.is-inline {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 6px 16px;
}

.am-admin .am-auth-signup.is-inline .am-auth-signup-rule {
    flex-basis: 100%;
    margin-bottom: 8px;
}

.am-admin .am-auth-signup.is-inline p + p {
    margin-top: 0;
}

/* ---- Onboarding forms (CreateAccount, LoginSellerCentral) ---- */
/* First + last name side by side; stacked on phones. */
.am-admin .am-auth-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 14px;
}

.am-admin .am-auth-field .am-help .am-auth-link {
    font-size: inherit;
}

.am-admin .am-auth-btn-flag {
    width: 18px;
    height: 18px;
    border-radius: 50%;
}

/* The Amazon data-use notice under the Seller Central form. */
.am-admin .am-auth-fineprint {
    margin: 22px 0 0;
    font-size: 11.5px;
    line-height: 1.55;
    color: var(--am-gray);
}

.am-admin .am-auth-fineprint strong {
    font-weight: 500;
    color: var(--am-slate);
}

/* New-account credentials on SuccessSellerCentral. */
.am-admin .am-auth-creds {
    display: grid;
    gap: 6px;
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: var(--am-radius-md);
    background: var(--am-navy-soft);
}

.am-admin .am-auth-creds > div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: var(--am-text-sm);
}

.am-admin .am-auth-creds dt {
    font-weight: 400;
    color: var(--am-slate);
}

.am-admin .am-auth-creds dd {
    margin: 0;
    font-weight: 500;
    color: var(--am-navy);
    overflow-wrap: anywhere;
    text-align: right;
}

.am-admin .am-auth-user {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
    padding: 9px 12px;
    border-radius: var(--am-radius-md);
    background: var(--am-navy-soft);
    font-size: var(--am-text-sm);
    color: var(--am-slate);
}

.am-admin .am-auth-user b {
    font-weight: 500;
    color: var(--am-navy);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* The model-state summary renders as an alert; an empty summary is a bare <div> and must take no room. */
.am-admin .am-auth-errors {
    margin-bottom: 14px;
}

.am-admin .am-auth-errors:empty,
.am-admin .am-auth-errors.validation-summary-valid {
    display: none;
}

.am-admin .am-auth-errors ul {
    margin: 0;
    padding-left: 18px;
}

.am-admin .am-auth-errors ul:empty {
    display: none;
}

/* ---- Password rules (ResetPassword) ---- */
.am-admin .am-auth-rules {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: var(--am-radius-md);
    background: var(--am-navy-soft);
}

.am-admin .am-auth-rules-k {
    margin-bottom: 6px;
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: .4px;
    text-transform: uppercase;
    color: var(--am-slate);
}

.am-admin .am-auth-rules ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px 12px;
}

.am-admin .am-auth-rules li {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--am-text-sm);
    color: var(--am-slate);
}

.am-admin .am-auth-rules li::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--am-faint);
    flex-shrink: 0;
}

.am-admin .am-auth-rules li.is-ok {
    color: var(--am-accent);
}

.am-admin .am-auth-rules li.is-ok::before {
    background: var(--am-accent);
}

/* ---- "Need help?" pinned bottom-right, mirroring the copyright line bottom-left of the panel ---- */
.am-auth-foot {
    position: absolute;
    right: clamp(24px, 3vw, 64px);
    bottom: clamp(24px, 3vw, 64px);
    margin: 0;
    font-size: clamp(12px, .8vw, 15px);
    color: var(--am-gray);
}

.am-auth-foot a {
    color: var(--am-slate);
    text-decoration: none;
}

.am-auth-foot a:hover {
    color: var(--am-navy);
    text-decoration: underline;
}

@media (max-width: 480px) {
    .am-admin .am-auth-rules ul,
    .am-admin .am-auth-pair {
        grid-template-columns: 1fr;
    }
}
