/* A separate, centered entrance to the platform. Form geometry and behavior
   remain in the original templates and aioness-auth.css. Never transform a
   form ancestor: the phone-country menu is positioned against the viewport. */
body.aioness-auth-centered {
    --auth-page: #fafbfd;
    --auth-brand-line: #e3e7ef;
    /* Match the marketing prototype's .shell, without importing its styling. */
    --auth-shell-width: min(calc(100% - 48px), 1360px);
    display: flex;
    flex-direction: column;
    gap: 0;
    min-height: 100svh;
    height: auto;
    padding: 0;
    overflow: auto;
    background: radial-gradient(ellipse 460px 280px at 50% 190px, rgba(25, 25, 112, .025), transparent), var(--auth-page);
}
html[data-auth-theme="dark"] body.aioness-auth-centered {
    --auth-page: #10121c;
    --auth-surface: #1a1e2b;
    background: radial-gradient(ellipse 440px 260px at 50% 190px, rgba(77, 86, 186, .09), transparent), var(--auth-page);
}
.aioness-auth-centered .auth-portal-tools {
    position: relative;
    inset: auto;
    flex-shrink: 0;
    width: var(--auth-shell-width);
    min-height: 40px;
    margin: 20px auto 0;
    gap: 16px;
}
.aioness-auth-centered .auth-portal-tools__back { font-size: 12px; }
.aioness-auth-centered :is(.aion-auth, .aion-register, .aion-user-register) {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: var(--auth-shell-width);
    min-height: 0;
    height: auto;
    max-height: none;
    margin: 0 auto;
    padding: 8px 0 30px;
    overflow: visible;
}
.aioness-auth-centered :is(.aion-auth__form-side, .aion-register__form-side, .aion-user-register__form-side) {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    width: 100%;
    min-height: 0;
    height: auto;
    max-height: none;
    padding: 0;
    overflow: visible;
}
.aioness-auth-centered .aion-auth__form-shell { width: 100%; max-width: 420px; }
.aioness-auth-centered .aion-register__form-shell { width: 100%; max-width: 520px; }
.aioness-auth-centered .aion-user-register__card { width: 100%; max-width: 480px; }
.aioness-auth-centered :is(.aion-auth__card, .aion-register__form-side .aion-register-card, .aion-user-register__card) {
    min-height: 0;
    height: auto;
    max-height: none;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
}
.aioness-auth-centered .aion-auth__card { display: grid; gap: 20px; }
.aioness-auth-centered .aion-auth__alternate-login { margin-top: 0; }
.aioness-auth-centered .aion-auth__divider { font-weight: 400; }
.aioness-auth-centered .aion-auth__card-header { gap: 12px; }
.aioness-auth-centered .aion-auth__card-header > .auth-orbit { width: min(400px, 100%); max-width: 400px; }
.aioness-auth-centered :is(.aion-register-card, .aion-user-register__card) > .auth-orbit { margin-bottom: 12px; }
.aioness-auth-centered :is(.auth-portal-kicker, .portal-kicker) {
    margin: 0 0 8px;
    color: var(--auth-brand-muted);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .14em;
}
.aioness-auth-centered .aion-auth__login-title { font-size: 23px; line-height: 1.3; font-weight: 500; }
.aioness-auth-centered .aion-auth__login-title strong { font-weight: 600; }
.aioness-auth-centered :is(.aion-register__form-side .aion-register-card h1, .aion-user-register__title) { font-size: 25px; font-weight: 500; line-height: 1.3; }
.aioness-auth-centered :is(.aion-register-card__subtitle, .aion-user-register__lead) { margin: 9px auto 26px; max-width: 440px; font-size: 13px; }
.aioness-auth-centered :is(.aion-register__form-shell, .aion-register-form, .aion-user-register__form, .aion-user-register__fields, .aion-register-step, .aion-register-grid) { min-height: 0; height: auto; max-height: none; overflow: visible; }
.aioness-auth-centered :is(.aion-register-actions, .aion-user-register__actions) { position: static; background: transparent; }
.aioness-auth-centered :is(.aion-register-login, .aion-user-register__login) { margin-top: 22px; padding-top: 20px; }
.aioness-auth-centered :is(.aion-auth__footer, .aion-auth-footer) { width: 100%; max-width: 540px; margin: 24px auto 0; text-align: center; }
.aioness-auth-centered :is(.aion-auth__legal-links, .aion-auth-footer__links, .aion-register-legal) { justify-content: center; flex-wrap: wrap; gap: 8px 16px; }
.aioness-auth-centered .aion-register-copyright { margin-top: 24px; text-align: center; }
.aioness-auth-centered .aion-register-legal { margin-top: 8px; }

/* Registration choice is a pair of compact destinations in the same column. */
.aioness-auth-centered .aion-register-choice {
    display: flex;
    flex: 1 0 auto;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    min-height: 0;
    width: var(--auth-shell-width);
    margin-inline: auto;
    padding: 8px 0 28px;
    background: none;
}
.aioness-auth-centered .aion-register-choice::before,
.aioness-auth-centered .aion-register-choice::after { display: none; }
.aioness-auth-centered .aion-register-choice__stage { display: grid; justify-items: center; width: 100%; max-width: 480px; gap: 12px; margin: 0; }
.aioness-auth-centered .aion-register-choice__panel { display: grid; width: 100%; gap: 24px; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; backdrop-filter: none; }
.aioness-auth-centered .aion-register-choice__intro { margin: 0; text-align: center; }
.aioness-auth-centered .aion-register-choice__intro h1 { font-size: 25px; line-height: 1.3; font-weight: 500; }
.aioness-auth-centered .aion-register-choice__cards { display: grid; grid-template-columns: 1fr; gap: 12px; width: 100%; }
.aioness-auth-centered .auth-account-option {
    display: flex;
    align-items: center;
    width: 100%;
    gap: 18px;
    padding: 20px 22px;
    border: 1px solid var(--auth-brand-line);
    border-radius: 16px;
    background: var(--auth-surface);
    color: var(--auth-brand-ink);
    text-align: left;
    text-decoration: none;
    transition: border-color .2s, box-shadow .2s;
}
.aioness-auth-centered .auth-account-option:hover { border-color: var(--auth-accent); box-shadow: 0 4px 18px rgba(0, 100, 16, .05); }
.aioness-auth-centered .auth-account-option--user:hover { border-color: var(--auth-link); }
.aioness-auth-centered .auth-account-option__icon { display: grid; flex: 0 0 48px; width: 48px; height: 48px; place-items: center; border-radius: 13px; background: var(--auth-accent-soft); color: var(--auth-accent); }
.aioness-auth-centered .auth-account-option--user .auth-account-option__icon { background: var(--auth-blue-soft); color: var(--auth-link); }
.aioness-auth-centered .auth-account-option__icon svg { width: 26px; height: 26px; }
.aioness-auth-centered .auth-account-option__copy { display: grid; flex: 1; gap: 4px; min-width: 0; }
.aioness-auth-centered .auth-account-option__copy strong { color: var(--auth-brand-ink); font-size: 16px; font-weight: 600; }
.aioness-auth-centered .auth-account-option__copy > span { color: var(--auth-brand-muted); font-size: 13px; line-height: 1.5; }
.aioness-auth-centered .auth-account-option__copy small { margin-top: 3px; color: var(--auth-accent); font-size: 11px; font-weight: 500; }
.aioness-auth-centered .auth-account-option--user .auth-account-option__copy small { color: var(--auth-link); }
.aioness-auth-centered .auth-account-option__arrow { flex: 0 0 20px; width: 20px; height: 20px; color: var(--auth-brand-muted); }
.aioness-auth-centered .aion-register-choice__signin { margin: 0; font-size: 13px; }
.aioness-auth-centered .aion-register-choice__footer { display: grid; justify-items: center; gap: 8px; width: 100%; max-width: 540px; margin: 0; padding: 0; text-align: center; }
.aioness-auth-centered .aion-register-choice__footer nav { justify-content: center; flex-wrap: wrap; }

/* Password reset, two-factor, admin and default login share the same entrance. */
body.aioness-auth-centered.aioness-auth-brand--utility,
body.aioness-auth-centered:has(> .auth-experience--utility) { gap: 0; padding-top: 0; }
.aioness-auth-centered .auth-experience--utility { flex: 1 0 auto; display: flex; align-items: center; width: var(--auth-shell-width); min-height: 0; margin: 0 auto; padding: 8px 0 24px; border: 0; border-radius: 0; background: none; box-shadow: none; }
.aioness-auth-centered .auth-experience--utility .auth-experience__form-area { max-width: 440px; margin-inline: auto; }
.aioness-auth-centered .auth-experience__card { padding: 0; }
.aioness-auth-centered .auth-experience__card > .auth-orbit { margin-bottom: 16px; }
.aioness-auth-centered .auth-experience__card h1 { font-size: 25px; font-weight: 500; }
.aioness-auth-centered .auth-experience-footer { justify-content: center; flex-direction: column; gap: 8px; width: var(--auth-shell-width); margin-inline: auto; padding: 16px 0 24px; text-align: center; }
.aioness-auth-centered .auth-experience-footer nav { justify-content: center; }

@media (max-width: 900px) {
    body.aioness-auth-centered { --auth-shell-width: min(calc(100% - 32px), 1360px); }
}
@media (max-width: 680px) {
    body.aioness-auth-centered { --auth-shell-width: min(calc(100% - 24px), 1360px); }
    .aioness-auth-centered .auth-portal-tools { margin-top: 14px; }
    .aioness-auth-centered :is(.aion-auth, .aion-register, .aion-user-register, .aion-register-choice) { padding: 4px 0 24px; }
    .aioness-auth-centered :is(.aion-auth__card, .aion-register__form-side .aion-register-card, .aion-user-register__card) { padding: 0; border-radius: 0; }
    .aioness-auth-centered .aion-auth__card { display: grid; gap: 20px; }
    .aioness-auth-centered .aion-auth__card-header { gap: 10px; }
    .aioness-auth-centered :is(.aion-auth__login-title, .aion-register__form-side .aion-register-card h1, .aion-user-register__title, .aion-register-choice__intro h1, .auth-experience__card h1) { font-size: 23px; }
    .aioness-auth-centered .auth-account-option { padding: 18px; gap: 14px; }
    .aioness-auth-centered .auth-account-option__icon { flex-basis: 42px; width: 42px; height: 42px; }
    .aioness-auth-centered .auth-account-option__copy > span { font-size: 12px; }
    .aioness-auth-centered .auth-experience__card { padding: 0; }
    .aioness-auth-centered .aion-register-choice__footer { font-size: 10px; }
}
@media (max-width: 380px) {
    .aioness-auth-centered .auth-account-option { gap: 12px; padding: 16px 14px; }
    .aioness-auth-centered .auth-account-option__copy strong { font-size: 15px; }
    .aioness-auth-centered .auth-account-option__arrow { flex-basis: 16px; width: 16px; }
}
