:root {
    --ts-orange: var(--pc-orange, #ff7310);
    --ts-orange-dark: var(--pc-status-warning, #c95700);
    --ts-navy: #102a43;
    --ts-navy-light: var(--pc-navy-soft, #173f5f);
    --ts-ink: var(--pc-text, #172b3a);
    --ts-muted: var(--pc-muted, #6b7c8c);
    --ts-line: var(--pc-line, #e6edf3);
    --ts-surface: var(--pc-surface, #ffffff);
    --ts-page: var(--pc-canvas, #f4f7fa);
}

* {
    box-sizing: border-box;
}

.auth-page {
    min-height: 100dvh;
    display: grid;
    grid-template-columns: minmax(360px, 46%) minmax(420px, 54%);
    background: var(--ts-page);
    color: var(--ts-ink);
}

.auth-brand {
    position: relative;
    min-height: 100dvh;
    padding: clamp(28px, 4vw, 64px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    color: #fff;
    background:
        radial-gradient(circle at 85% 18%, rgba(255, 114, 0, .32), transparent 26%),
        radial-gradient(circle at 15% 82%, rgba(45, 132, 174, .38), transparent 30%),
        linear-gradient(145deg, #082f47 0%, var(--ts-navy) 48%, #071f31 100%);
}

.auth-brand::before,
.auth-brand::after {
    content: "";
    position: absolute;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 50%;
}

.auth-brand::before {
    width: 440px;
    height: 440px;
    right: -210px;
    top: 24%;
}

.auth-brand::after {
    width: 280px;
    height: 280px;
    right: -110px;
    top: calc(24% + 80px);
}

.auth-brand__logo {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-self: flex-start;
    width: min(290px, 72%);
    padding: 13px 18px;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 16px 40px rgba(0, 0, 0, .16);
}

.auth-brand__logo img {
    display: block;
    width: 100%;
    height: auto;
}

.auth-brand__content {
    position: relative;
    z-index: 1;
    max-width: 640px;
    margin: auto 0;
    padding: 56px 0;
}

.auth-brand__eyebrow,
.auth-eyebrow {
    display: inline-block;
    margin-bottom: 14px;
    color: var(--ts-orange);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.auth-brand h2 {
    max-width: 620px;
    margin: 0 0 22px;
    font-size: clamp(44px, 5vw, 76px);
    line-height: .98;
    letter-spacing: -.035em;
    font-weight: 700;
}

.auth-brand__content > p {
    max-width: 560px;
    margin: 0;
    color: rgba(255, 255, 255, .78);
    font-size: clamp(17px, 1.45vw, 21px);
    line-height: 1.55;
}

.auth-benefits {
    display: grid;
    gap: 14px;
    margin: 32px 0 0;
    padding: 0;
    list-style: none;
}

.auth-benefits li {
    display: flex;
    gap: 12px;
    align-items: center;
    color: rgba(255, 255, 255, .92);
    font-size: 16px;
}

.auth-benefits li::before {
    content: "✓";
    display: grid;
    place-items: center;
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(255, 114, 0, .18);
    color: #ff9b4a;
    font-weight: 800;
}

.auth-brand__meta {
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: space-between;
    gap: 24px;
    color: rgba(255, 255, 255, .58);
    font-size: 14px;
}

.auth-brand__meta a {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
}

.auth-content {
    min-width: 0;
    padding: clamp(28px, 6vw, 96px);
    display: grid;
    place-items: center;
    background:
        linear-gradient(rgba(255, 255, 255, .76), rgba(255, 255, 255, .76)),
        radial-gradient(circle at 100% 0, rgba(255, 114, 0, .12), transparent 35%);
}

.auth-card {
    --ts-muted: #576b7d;
    width: min(100%, 480px);
    padding: clamp(28px, 4vw, 48px);
    border: 1px solid rgba(13, 59, 86, .09);
    border-radius: 24px;
    background: var(--ts-surface);
    box-shadow: 0 24px 64px rgba(13, 59, 86, .13);
}

html:not([data-pc-theme="dark"]) .auth-card .auth-eyebrow {
    color: #b34900;
}

.auth-card__header {
    margin-bottom: 30px;
}

.auth-card__header h1 {
    margin: 0 0 12px;
    color: var(--ts-ink);
    font-size: clamp(32px, 3.5vw, 44px);
    line-height: 1.08;
    letter-spacing: -.025em;
}

.auth-card__header p {
    margin: 0;
    color: var(--ts-muted);
    font-size: 16px;
    line-height: 1.55;
}

.auth-form {
    display: grid;
    gap: 21px;
}

.auth-field {
    display: grid;
    gap: 8px;
}

.auth-field label,
.auth-checkbox {
    color: var(--ts-ink);
    font-size: 14px;
    font-weight: 650;
}

.auth-field__label-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: baseline;
}

.auth-field__label-row a,
.auth-card a:not(.auth-submit) {
    color: var(--ts-navy-light);
    text-underline-offset: 3px;
}

.auth-input {
    width: 100%;
    height: 50px;
    padding: 0 15px;
    border: 1px solid var(--ts-line);
    border-radius: 11px;
    outline: none;
    background: #fbfcfd;
    color: var(--ts-ink);
    font: inherit;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.auth-input:hover {
    border-color: #b8c6d0;
    background: #fff;
}

.auth-input:focus {
    border-color: var(--ts-orange);
    background: #fff;
    box-shadow: 0 0 0 4px var(--pc-focus-shadow);
}

.auth-password {
    position: relative;
}

.auth-password .auth-input {
    padding-right: 56px;
}

.auth-password__toggle {
    position: absolute;
    top: 50%;
    right: 7px;
    display: inline-grid;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 9px;
    color: var(--ts-navy-light);
    background: transparent;
    cursor: pointer;
    place-items: center;
    transform: translateY(-50%);
    transition: color .18s ease, background .18s ease, box-shadow .18s ease;
}

.auth-password__toggle:hover {
    color: var(--ts-orange);
    background: rgba(255, 114, 0, .09);
}

.auth-password__toggle:focus-visible {
    outline: none;
    color: var(--ts-orange);
    box-shadow: 0 0 0 3px var(--pc-focus-shadow);
}

.auth-password__toggle svg {
    width: 21px;
    height: 21px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.auth-field .validation-message {
    color: var(--pc-error-text, #b42318);
    font-size: 13px;
}

.auth-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-weight: 500;
}

.auth-checkbox input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--ts-orange);
}

.auth-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 52px;
    padding: 12px 20px;
    border: 0;
    border-radius: 11px;
    cursor: pointer;
    color: #132536;
    text-align: center;
    text-decoration: none;
    background: linear-gradient(135deg, var(--ts-orange), #ff8c31);
    box-shadow: 0 12px 24px rgba(255, 114, 0, .24);
    font: inherit;
    font-weight: 750;
    transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.auth-submit:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 15px 30px rgba(255, 114, 0, .3);
}

.auth-submit:focus-visible {
    outline: 3px solid var(--pc-focus-ring);
    outline-offset: 3px;
}

.auth-submit:disabled {
    cursor: wait;
    opacity: .65;
}

.auth-card__footer {
    display: grid;
    gap: 13px;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--ts-line);
}

.auth-card__footer p,
.auth-card__footer small {
    margin: 0;
    color: var(--ts-muted);
    line-height: 1.5;
}

.auth-secondary-link:not(.auth-submit) {
    font-weight: 650;
}

.auth-back-link {
    display: inline-flex;
    margin-bottom: 28px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 650;
}

.auth-info {
    display: grid;
    gap: 4px;
    margin-top: 26px;
    padding: 16px 18px;
    border-radius: 12px;
    background: #f0f5f8;
    /* These are instructions and delivery outcomes, not secondary captions. */
    color: var(--ts-ink);
    font-size: 14px;
    line-height: 1.45;
}

.auth-info strong {
    color: var(--ts-ink);
}

@media (max-width: 980px) {
    .auth-page {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        min-height: auto;
        padding: 24px;
    }

    .auth-brand__logo {
        width: 220px;
    }

    .auth-brand__content {
        margin: 0;
        padding: 48px 0 26px;
    }

    .auth-brand h2 {
        font-size: clamp(38px, 9vw, 58px);
    }

    .auth-benefits,
    .auth-brand__meta {
        display: none;
    }

    .auth-content {
        padding: 34px 20px 52px;
        align-items: start;
    }
}

@media (max-width: 560px) {
    .auth-brand {
        padding: 18px;
    }

    .auth-brand__logo {
        width: 184px;
        padding: 9px 12px;
        border-radius: 10px;
    }

    .auth-brand__content {
        padding: 32px 0 16px;
    }

    .auth-brand__eyebrow {
        font-size: 11px;
    }

    .auth-brand__content > p {
        font-size: 15px;
    }

    .auth-content {
        padding: 20px 12px 36px;
    }

    .auth-card {
        padding: 25px 20px;
        border-radius: 18px;
    }

    .auth-field__label-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-input,
    .auth-submit,
    .auth-password__toggle {
        transition: none;
    }
}


/* AUTH_SCROLL_CONTRACT_V2 */
body:has(.auth-card) {
    overflow-x: hidden;
    overflow-y: auto;
}

body:has(.auth-card) #app {
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
}

body:has(.auth-card) .auth-shell,
body:has(.auth-card) .auth-layout,
body:has(.auth-card) main {
    min-height: 100vh;
    min-height: 100dvh;
    height: auto;
    overflow: visible;
}

/* The sandbox notice occupies 34px above #app. Full-screen auth surfaces must
   consume the remaining viewport instead of creating a second, empty scroll.
   A stand can hide the notice (environment.css: display none, #app padding 0,
   --pc-sandbox-banner-height: 0) while #app keeps its inline padding-top, so
   the height comes from the variable: a fixed 34px left a gap at the bottom. */
#app[style*="padding-top"] .auth-page,
body:has(.auth-card) #app[style*="padding-top"] main {
    min-height: calc(100dvh - var(--pc-sandbox-banner-height, 34px));
}

@media (min-width: 981px) {
    #app[style*="padding-top"] .auth-brand {
        min-height: calc(100dvh - var(--pc-sandbox-banner-height, 34px));
    }
}

@media (min-width: 981px) and (max-height: 920px) {
    .auth-brand {
        padding: 28px clamp(32px, 3.4vw, 52px);
    }

    .auth-brand__logo {
        width: min(248px, 68%);
        padding: 10px 15px;
    }

    .auth-brand__content {
        padding: 28px 0;
    }

    .auth-brand h2 {
        margin-bottom: 16px;
        font-size: clamp(40px, 4.3vw, 62px);
    }

    .auth-brand__content > p {
        font-size: 17px;
        line-height: 1.45;
    }

    .auth-benefits {
        gap: 10px;
        margin-top: 22px;
    }

    .auth-content {
        padding: 26px clamp(34px, 4vw, 64px);
    }

    .auth-card {
        padding: 32px 38px;
    }

    .auth-card__header {
        margin-bottom: 22px;
    }

    .auth-card__header h1 {
        font-size: 36px;
    }

    .auth-form {
        gap: 16px;
    }

    .auth-card__footer {
        gap: 10px;
        margin-top: 21px;
        padding-top: 18px;
    }
}

@media (max-height: 760px), (max-width: 680px) {
    body:has(.auth-card) .auth-card {
        margin-block: 18px;
    }
}
