:root {
    --auth-ink: var(--ink-heading);
    --auth-muted: var(--ink-muted);
    --auth-line: var(--border);
    --auth-blue: var(--brand);
}

* {
    box-sizing: border-box;
}

.auth-page {
    min-height: 100vh;
    margin: 0;
    background: var(--brand-soft);
    color: var(--auth-ink);
}

.auth-shell {
    display: grid;
    min-height: 100vh;
    padding: 32px 20px;
    place-items: center;
}

.auth-card {
    width: min(430px, 100%);
    padding: 30px;
    border: 1px solid var(--auth-line);
    border-radius: 12px;
    background: var(--surface-card);
    box-shadow: 0 18px 50px rgb(15 23 42 / 9%);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 22px;
    border-bottom: 1px solid var(--border-soft);
}

.auth-brand img {
    display: block;
    width: 48px;
    height: 48px;
}

.auth-brand div {
    display: grid;
    gap: 1px;
}

.auth-brand strong {
    font-size: 21px;
    font-weight: 600;
    letter-spacing: -.02em;
}

.auth-firm,
.auth-eyebrow {
    color: var(--auth-muted);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.auth-heading {
    padding: 25px 0 18px;
}

.auth-heading h1 {
    margin: 3px 0 5px;
    font-size: 27px;
    font-weight: 600;
    letter-spacing: -.025em;
}

.auth-heading p {
    margin: 0;
    color: var(--auth-muted);
    font-size: 13px;
}

.auth-form,
.auth-field {
    display: grid;
}

.auth-form {
    gap: 15px;
}

.auth-field {
    gap: 5px;
}

.auth-field label {
    color: var(--ink-subtle);
    font-size: 12px;
    font-weight: 500;
}

.auth-field input {
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid var(--border-strong);
    border-radius: 6px;
    background: var(--surface-card);
    color: var(--ink);
    font: inherit;
}

.auth-field input:focus {
    border-color: var(--icon-muted);
    outline: 1px solid var(--icon-muted);
    outline-offset: 1px;
    box-shadow: 0 0 0 3px rgb(113 132 155 / 12%);
}

.auth-form>button {
    min-height: 42px;
    margin-top: 3px;
    border: 0;
    border-radius: 6px;
    background: var(--auth-blue);
    color: var(--surface-card);
    cursor: pointer;
    font: inherit;
    font-weight: 600;
}

.auth-form>button:hover,
.auth-form>button:focus-visible {
    background: var(--brand-strong);
}

.auth-error,
.auth-error .errorlist,
.auth-field .errorlist {
    margin: 0;
    padding: 0;
    color: var(--danger);
    font-size: 12px;
    list-style: none;
}

.auth-error {
    padding: 10px 12px;
    border: 1px solid var(--danger-soft-border);
    border-radius: 6px;
    background: var(--danger-soft);
}

.auth-field .helptext {
    color: var(--auth-muted);
    font-size: 11px;
    line-height: 1.45;
}

.auth-field .helptext ul {
    margin: 4px 0 0;
    padding-left: 18px;
}

.auth-return {
    display: inline-block;
    margin-top: 18px;
    color: var(--auth-blue);
    font-size: 13px;
}

@media(max-width:520px) {
    .auth-shell {
        padding: 16px;
    }

    .auth-card {
        padding: 24px 20px;
    }
}
