/* Account forms share the existing black-gold and blue-gold theme palettes. */
.xg-auth-shell .xg-auth-layout {
    align-items: start;
    grid-template-columns: minmax(0, 1fr) minmax(0, 460px);
    gap: clamp(30px, 6vw, 76px);
}
.xg-auth-shell .xg-auth-story { align-self: center; }
.xg-auth-shell .xg-store-back {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 36px;
    padding: 0 10px;
    border: 1px solid var(--xg-line);
    border-radius: 9px;
    background: var(--xg-soft);
    color: var(--xg-accent);
    font-weight: 700;
    white-space: nowrap;
}
.xg-auth-shell .xg-store-back:hover { border-color: var(--xg-accent); }
.xg-auth-shell .xg-store-back > span { font-size: 1.25em; line-height: 1; }
.xg-auth-shell .xg-auth-tabs {
    gap: 4px;
    padding: 4px;
    margin: 0 0 20px;
    background: var(--xg-soft);
    border: 1px solid var(--xg-line);
    border-radius: 12px;
}
.xg-auth-shell .xg-auth-tabs a {
    flex: 1;
    display: grid;
    place-items: center;
    min-height: 36px;
    padding: 5px 8px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: 14px;
}
.xg-auth-shell .xg-auth-tabs a[aria-current="page"] {
    background: var(--xg-panel);
    border-color: var(--xg-line);
    color: var(--xg-accent);
}
.xg-auth-shell .xg-auth-tabs a[aria-current="page"]::after { content: none; }
.xg-auth-shell .xg-auth-heading p { margin-bottom: 18px; }
.xg-auth-shell .xg-captcha-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) clamp(104px, 32%, 140px);
    gap: 10px;
    margin-inline: 0;
    align-items: end;
}
.xg-auth-shell .xg-captcha-row > [class*="col-"] { width: auto; min-width: 0; padding-inline: 0; }
.xg-auth-shell .xg-captcha-row:has(.image-code) > .d-flex { padding-top: 0; }
.xg-auth-shell .xg-captcha-row .image-code {
    display: block;
    width: 100% !important;
    max-width: 100%;
    height: 48px !important;
    margin: 0 !important;
    object-fit: contain;
    object-position: center;
    background: #f5f7fc;
    border-radius: 9px;
}
.xg-auth-shell .xg-captcha-row .image-code:focus-visible,
.xg-auth-shell :is(.xg-auth-tabs a, .xg-store-back):focus-visible {
    outline: 2px solid var(--xg-accent);
    outline-offset: 2px;
}

@media (max-width: 760px) {
    .xg-auth-shell { padding: 10px max(12px, env(safe-area-inset-right)) 14px max(12px, env(safe-area-inset-left)); }
    .xg-auth-shell .xg-auth-top { gap: 6px; margin-bottom: 9px; }
    .xg-auth-shell .xg-site-brand { min-width: 0; }
    .xg-auth-shell .xg-site-brand img { flex: none; }
    .xg-auth-shell .xg-site-brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .xg-auth-shell .xg-auth-tools { flex-shrink: 0; gap: 6px; }
    .xg-auth-shell .xg-store-back { padding-inline: 8px; font-size: 11px; }
    .xg-auth-shell .xg-auth-layout { align-items: stretch; gap: 9px; }
    .xg-auth-shell .xg-auth-card { order: 0; padding: 12px 14px; border-radius: 15px; }
    .xg-auth-shell .xg-auth-meta { order: 1; padding: 9px 12px; }
    .xg-auth-shell .xg-meta-clock time { font-size: 20px; }
    .xg-auth-shell .xg-auth-heading h1 { margin-bottom: 4px; font-size: 20px; }
    .xg-auth-shell .xg-auth-heading p { margin-bottom: 10px; }
    .xg-auth-shell .xg-auth-tabs { margin-bottom: 10px; padding: 3px; }
    .xg-auth-shell .xg-auth-tabs a { min-height: 34px; }
    .xg-auth-shell .xg-auth-field { gap: 4px; }
    .xg-auth-shell .xg-auth-gap { margin-bottom: 10px; }
    .xg-auth-shell .form-control { min-height: 44px; height: 44px; padding-block: 7px; font-size: 16px; }
    .xg-auth-shell .xg-captcha-row .image-code { height: 44px !important; }
    .xg-auth-shell .xg-quick-area { margin-top: 14px; }
    .xg-auth-shell .xg-quick-title { margin-bottom: 8px; }
    .xg-auth-shell .xg-auth-footer { margin-top: 10px; padding-top: 8px; }
    .xg-auth-shell .xg-provider-row > .xg-provider {
        height: 44px;
        min-height: 44px;
        padding: 5px 4px;
        flex-direction: row;
        gap: 5px;
    }
    .xg-auth-shell .xg-provider-row :is(.btn-passkey__badge, .oauth-login-icon, svg, .btn-passkey__icon) {
        width: 17px !important;
        height: 17px !important;
    }
}
