.auth-page {
    --support-page-gap: 24px;
    display: flex;
    justify-content: center;
    padding-top: 0;
}

.auth-card {
    --standard-container-padding-block: 24px;
    --standard-container-padding-inline: 24px;
    width: min(100%, 820px);
    box-shadow: 0 12px 32px rgba(19, 26, 34, .12);
}

.auth-page > .auth-card {
    margin-top: 0;
}

.auth-card--wide {
    width: min(100%, 860px);
}

.auth-card__header {
    max-width: 68ch;
    margin-bottom: 24px;
}

.auth-card__body {
    display: grid;
    gap: 12px;
}

.auth-card__body > :last-child {
    margin-bottom: 0;
}

.auth-card__title {
    margin: 0;
    color: var(--sim-text);
    font-size: 28px;
    font-weight: var(--font-weight-bold, 500);
    line-height: 1.25;
}

.auth-card__lead,
.auth-card__hint {
    margin: 6px 0 0;
    color: var(--sim-muted);
    font-size: var(--font-size-md, 0.875rem);
    line-height: 1.5;
}

.auth-card__lead {
    max-width: 64ch;
}

.auth-card__actions,
.auth-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.auth-form-actions {
    justify-content: flex-end;
}

.auth-login-options {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 36px minmax(0, 1fr);
    align-items: stretch;
}

.auth-login-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    gap: 14px 12px;
    align-items: start;
    min-height: 224px;
    padding: 18px;
    background: var(--sim-surface-subtle);
    border: 1px solid var(--sim-border-strong);
    border-radius: 6px;
}

.auth-login-form {
    display: grid;
    align-content: start;
    min-width: 0;
}

.auth-login-option__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    color: var(--sim-accent-strong);
    background: var(--sim-accent-soft);
    border: 1px solid transparent;
    border-radius: 6px;
}

.auth-login-option__icon .material-symbols-outlined {
    width: 22px;
    height: 22px;
    font-size: 22px;
    line-height: 1;
}

.auth-login-option__brand {
    display: flex;
    align-items: center;
    grid-column: 1 / -1;
    height: 38px;
}

.auth-login-option__logo {
    display: block;
    width: 126px;
    height: auto;
    filter: brightness(0);
}

.auth-login-option--employee .auth-login-option__body,
.auth-login-option--external .auth-login-option__icon,
.auth-login-option--external .auth-login-option__body {
    grid-column: 1 / -1;
}

.auth-login-option__body {
    min-width: 0;
}

.auth-login-option__body h2 {
    margin: 0;
    color: var(--sim-text);
    font-size: 16px;
    font-weight: var(--font-weight-bold, 500);
    line-height: 1.25;
}

.auth-login-option__body p {
    margin: 5px 0 0;
    color: var(--sim-muted);
    font-size: var(--font-size-sm, 13px);
    line-height: 1.4;
}

.auth-page .btn.auth-sso-button,
.auth-page .btn.auth-external-toggle,
.auth-page .auth-unavailable-note {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    grid-column: 1 / -1;
    align-self: end;
    width: 100%;
    height: 44px;
    min-height: 44px;
}

.auth-unavailable-note {
    margin: 0;
    padding: 0.45rem 0.75rem;
    color: var(--sim-muted);
    background-color: var(--sim-surface);
    border: 1px solid var(--sim-border);
    border-radius: 6px;
    font-size: var(--font-size-sm, 13px);
    line-height: 1.2;
}

.auth-external-toggle .material-symbols-outlined,
.auth-local-back .material-symbols-outlined {
    width: 18px;
    height: 18px;
    font-size: 18px;
    line-height: 1;
}

.auth-sso-button .material-symbols-outlined,
.auth-unavailable-note .material-symbols-outlined {
    width: 18px;
    height: 18px;
    font-size: 18px;
    line-height: 1;
}

.auth-local-alert {
    margin: 0;
}

.auth-divider {
    display: grid;
    grid-template-rows: 1fr auto 1fr;
    gap: 10px;
    align-items: center;
    justify-items: center;
    color: var(--sim-muted);
    font-size: var(--font-size-sm, 13px);
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    width: 1px;
    height: 100%;
    background: var(--sim-border);
}

.auth-local-form {
    padding: 18px;
    background: var(--sim-surface-subtle);
    border: 1px solid var(--sim-border);
    border-radius: 6px;
}

.auth-local-form__header {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
}

.auth-local-form__header h2 {
    margin: 0;
    color: var(--sim-text);
    font-size: 16px;
    font-weight: var(--font-weight-bold, 500);
    line-height: 1.25;
}

.auth-local-form__header p {
    margin: 0;
    color: var(--sim-muted);
    font-size: var(--font-size-sm, 13px);
    line-height: 1.4;
}

.auth-local-back {
    display: inline-flex;
    flex: none;
    gap: 6px;
    align-items: center;
    min-height: 36px;
}

.auth-login-options.is-local-login .auth-login-form {
    grid-column: 1 / -1;
    width: min(100%, 540px);
    justify-self: center;
}

.auth-card form {
    display: grid;
    gap: 14px;
}

.auth-card fieldset {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    border: 0;
}

.auth-email-list {
    display: grid;
    gap: 10px;
}

.auth-email-item {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    padding: 10px;
    background: var(--sim-surface-subtle);
    border: 1px solid var(--sim-border);
    border-radius: 6px;
}

html[data-theme="dark"] .auth-card {
    box-shadow: 0 16px 38px rgba(0, 0, 0, .3);
}

html[data-theme="dark"] .auth-login-option {
    background: var(--surface-raised);
    border-color: var(--sim-border-strong);
}

html[data-theme="dark"] .auth-login-option__icon {
    color: var(--sim-accent-strong);
    background: var(--sim-hover-bg);
    border-color: var(--sim-border);
}

html[data-theme="dark"] .auth-login-option__logo {
    filter: none;
}

@media (max-width: 768px) {
    .auth-login-options {
        grid-template-columns: minmax(0, 1fr);
    }

    .auth-login-option {
        grid-template-columns: minmax(0, 1fr);
        min-height: auto;
    }

    .auth-page {
        padding-top: 12px;
    }

    .auth-form-actions,
    .auth-form-actions .btn,
    .auth-form-actions button,
    .auth-form-actions input[type="submit"] {
        width: 100%;
    }

    .auth-form-actions {
        justify-content: stretch;
    }

    .auth-page .btn.auth-sso-button,
    .auth-page .btn.auth-external-toggle,
    .auth-page .auth-unavailable-note {
        width: 100%;
        height: auto;
        min-height: 44px;
        white-space: normal;
    }

    .auth-divider {
        grid-template-rows: auto;
        grid-template-columns: 1fr auto 1fr;
        padding: 2px 0;
    }

    .auth-divider::before,
    .auth-divider::after {
        width: 100%;
        height: 1px;
    }

    .auth-local-form__header {
        display: grid;
    }
}