.auth-header {
    display: flex;
    justify-content: center;
    background: #172441;
    border-bottom: 1px solid #273653;
}

.auth-brand {
    display: block;
    border-radius: 0.375rem;
}

.auth-brand img {
    display: block;
    width: 12.75rem;
    height: 4.5rem;
    object-fit: cover;
}

.auth-page {
    --auth-text: #182641;
    --auth-muted: #4f5e73;
    --auth-link: #274bbf;
    --auth-action: #2f55d4;
    --auth-border: #8492a8;
    --auth-error: #a8242c;
    display: grid;
    justify-items: center;
    padding: clamp(1.5rem, 5vw, 3.25rem) 0 1rem;
    color: var(--auth-text);
    line-height: 1.5;
}

.auth-card {
    width: 100%;
    max-width: 27.5rem;
    padding: clamp(1.125rem, 5vw, 2rem);
    background: #fff;
    border: 1px solid #dce3ee;
    border-radius: 1.125rem;
    box-shadow: 0 12px 32px rgb(23 36 65 / 8%);
}

.auth-intro {
    margin-bottom: 1.375rem;
}

.auth-intro h1 {
    margin: 0;
    font-size: clamp(1.625rem, 5.3vw, 1.875rem);
    font-weight: 700;
    letter-spacing: -0.025em;
}

.auth-intro p {
    margin: 0.5rem 0 0;
    color: var(--auth-muted);
}

.auth-form {
    display: grid;
    gap: 1rem;
    margin: 0;
}

.auth-fields {
    display: grid;
    gap: 1rem;
}

.auth-names {
    display: grid;
    gap: 1rem;
}

@media (min-width: 28rem) {
    .auth-names {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.auth-label {
    display: block;
    margin: 0 0 0.375rem;
    font-size: 0.9375rem;
    font-weight: 600;
}

.auth-required {
    color: var(--auth-link);
}

.auth-recovery-row {
    text-align: end;
}

.auth-input {
    display: block;
    box-sizing: border-box;
    width: 100%;
    min-width: 0;
    min-height: 3rem;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--auth-border);
    border-radius: 0.625rem;
    background: #fff;
    color: var(--auth-text);
    font: inherit;
    font-size: 1rem;
}

.auth-input[aria-invalid="true"] {
    border-color: var(--auth-error);
}

.auth-password {
    position: relative;
}

.auth-password:has(.auth-toggle:not([hidden])) .auth-input {
    padding-inline-end: 4.75rem;
}

.auth-toggle {
    position: absolute;
    inset-block: 2px;
    inset-inline-end: 2px;
    min-width: 4.25rem;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: var(--auth-link);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}

.auth-toggle:hover {
    background: #edf2fd;
}

.auth-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    box-sizing: border-box;
    width: 100%;
    min-height: 3rem;
    padding: 0.625rem 0.875rem;
    border: 1px solid transparent;
    border-radius: 0.625rem;
    font: inherit;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
}

.auth-submit {
    background: var(--auth-action);
    color: #fff;
}

.auth-submit:hover {
    background: #2447bc;
}

.auth-google {
    border-color: var(--auth-border);
    background: #fff;
    color: var(--auth-text);
}

.auth-google:hover {
    background: #f2f5fc;
    color: var(--auth-text);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    color: var(--auth-muted);
    font-size: 0.875rem;
}

.auth-divider::before,
.auth-divider::after {
    flex: 1;
    height: 1px;
    background: #dce3ee;
    content: "";
}

.auth-card a:not(.auth-action) {
    color: var(--auth-link);
    font-weight: 600;
    text-underline-offset: 0.1875em;
}

.auth-card :is(a, button, input, select):focus-visible,
.auth-brand:focus-visible {
    outline: 3px solid #5278e8;
    outline-offset: 2px;
}

.auth-recovery,
.auth-switch a {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    font-size: 0.9375rem;
}

.auth-switch {
    margin: 1.25rem 0 0;
    padding-top: 0.375rem;
    border-top: 1px solid #e1e6ef;
    color: var(--auth-muted);
    text-align: center;
    font-size: 0.9375rem;
}

.auth-note,
.auth-error {
    margin: 0.375rem 0 0;
    font-size: 0.875rem;
}

.auth-note {
    color: var(--auth-muted);
}

.auth-password-requirements ul {
    margin: 0.25rem 0;
    padding-inline-start: 1.25rem;
}

.auth-password-requirements p {
    margin: 0;
}

.auth-required-key {
    margin-top: 0;
}

.auth-error {
    color: var(--auth-error);
}

.auth-live-error:empty {
    margin: 0;
}

.auth-form-error {
    margin: 0;
    padding: 0.625rem 0.75rem;
    border: 1px solid #eec9ce;
    border-radius: 0.625rem;
    background: #fff5f5;
}

.auth-terms {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 0.25rem;
    font-size: 0.9375rem;
}

.auth-terms label {
    display: inline-flex;
    align-items: center;
    gap: 0.625rem;
    min-height: 2.75rem;
    cursor: pointer;
}

.auth-terms input {
    width: 1.25rem;
    height: 1.25rem;
    margin: 0;
    accent-color: var(--auth-action);
}

.auth-terms a {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
}

.auth-turnstile {
    min-width: 0;
}
