body.ap-workspace .ap-auth-shell[data-auth-page] {
    display: grid;
    place-items: center;
    min-height: 100vh;
    min-height: 100dvh;
    padding: 48px 24px;
    background: var(--ap-workspace-canvas);
}

.ap-auth-panel {
    width: 100%;
    max-width: 400px;
    min-width: 0;
}

.ap-auth-brand {
    margin-bottom: 32px;
    text-align: center;
}

.ap-auth-brand > a {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    color: var(--ap-workspace-ink);
    text-decoration: none;
}

.ap-auth-logo {
    max-width: 180px;
    max-height: 48px;
    width: auto;
    height: auto;
}

.ap-auth-product {
    font-size: 13px;
    font-weight: 500;
}

.ap-auth-product > span {
    color: var(--ap-workspace-muted);
    font-weight: 400;
}

.ap-workspace [data-auth-page] .ap-auth-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    padding: 0;
    overflow-wrap: anywhere;
}

.ap-workspace [data-auth-page] h1 {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ap-auth-notice {
    margin: 0;
    color: var(--ap-workspace-muted);
    font-size: 14px;
    line-height: 1.6;
    text-align: center;
}

.ap-workspace [data-auth-page] :is(.ap-auth-fields, form) {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin: 0;
}

.ap-workspace [data-auth-page] :is(.hidden, [hidden]) {
    display: none;
}

.ap-workspace [data-auth-page] :is(form > p, .form-control) {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 0;
}

.ap-workspace [data-auth-page] :is(label, .label-text, .text-gray-700, .text-gray-600) {
    color: var(--ap-workspace-ink);
    font-size: 13px;
    font-weight: 500;
}

.ap-workspace [data-auth-page] :is(input:not([type="hidden"], [type="checkbox"], [type="radio"], [type="submit"]), select, textarea) {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    padding: 10px 12px;
    border-color: var(--ap-workspace-control-line);
    background-color: var(--ap-workspace-surface);
    color: var(--ap-workspace-ink);
}

.ap-workspace [data-auth-page] :is(small, .helptext) {
    color: var(--ap-workspace-muted);
    font-size: 12px;
    line-height: 1.5;
}

.ap-workspace [data-auth-page] :is(input, textarea)::placeholder {
    color: var(--ap-workspace-muted);
}

.ap-workspace [data-auth-page] input:-webkit-autofill,
.ap-workspace [data-auth-page] input:-webkit-autofill:hover,
.ap-workspace [data-auth-page] input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--ap-workspace-ink);
    box-shadow: 0 0 0 1000px var(--ap-workspace-surface) inset;
    caret-color: var(--ap-workspace-ink);
}

/* Authentication actions retain the neutral workspace treatment with company accents. */
html body.ap-workspace .ap-auth-shell[data-auth-page] :is(.btn, button, input[type="submit"]) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 44px;
    padding: 10px 16px;
    border: 1px solid var(--ap-workspace-ink);
    border-radius: var(--ap-workspace-radius);
    background-color: var(--ap-workspace-ink) !important;
    border-color: var(--ap-workspace-ink) !important;
    color: var(--ap-workspace-canvas) !important;
    font-size: 14px;
    font-weight: 500;
    line-height: 22px;
    text-decoration: none;
    box-shadow: none;
}

html body.ap-workspace .ap-auth-shell[data-auth-page] :is(.btn, button):hover:not(:disabled, [aria-disabled="true"]) {
    background-color: color-mix(in srgb, var(--ap-workspace-ink) 88%, var(--ap-workspace-canvas)) !important;
}

html body.ap-workspace .ap-auth-shell[data-auth-page] .btn-ghost {
    background-color: transparent !important;
    border-color: transparent !important;
    color: var(--ap-workspace-muted) !important;
}

.ap-auth-provider-icon {
    flex: none;
    width: 20px;
    height: 20px;
}

.ap-auth-back {
    align-self: center;
    color: var(--ap-workspace-muted);
    font-size: 13px;
    text-align: center;
    text-underline-offset: 3px;
}

.ap-auth-back:hover {
    color: var(--ap-workspace-ink);
    text-decoration: underline;
}

.ap-auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--ap-workspace-muted);
    font-size: 12px;
}

.ap-auth-divider::before,
.ap-auth-divider::after {
    content: "";
    flex: 1;
    border-top: 1px solid var(--ap-workspace-line);
}

.ap-workspace .ap-account-form :is(small, .helptext, .text-gray-500, .text-gray-600) {
    color: var(--ap-workspace-muted) !important;
}

.ap-workspace .ap-account-form :is(label, .label-text, .text-gray-700) {
    color: var(--ap-workspace-ink) !important;
}

@media (max-width: 480px) {
    body.ap-workspace .ap-auth-shell[data-auth-page] {
        padding: 32px 24px;
    }

    .ap-auth-brand {
        margin-bottom: 24px;
    }
}
