/* Account entry shares one canvas, rhythm and set of controls on every route. */
body.auth-page-body {
    --auth-bg: #f2f4f7;
    --auth-surface: #fff;
    --auth-text: #0f172a;
    --auth-muted: #526174;
    --auth-border: #d4dce5;
    --auth-accent: #4f46e5;
    --auth-accent-hover: #4338ca;
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    background: var(--auth-bg);
    color: var(--auth-text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
}
[data-bs-theme=dark] body.auth-page-body {
    --auth-bg: #101416;
    --auth-surface: #171c1f;
    --auth-text: #f4f5f7;
    --auth-muted: #b7c1ca;
    --auth-border: #424c56;
    --auth-accent: #b6acff;
    --auth-accent-hover: #d2caff;
    color-scheme: dark;
}
.auth-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    width: 100%;
    max-width: 1200px;
    align-self: center;
    padding: calc(20px + env(safe-area-inset-top)) max(32px, env(safe-area-inset-right)) 20px max(32px, env(safe-area-inset-left));
}
.auth-brand { display: block; width: 113px; height: 32px; object-fit: contain; }
.auth-main {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 0;
    width: 100%;
    padding: 24px 24px calc(48px + env(safe-area-inset-bottom));
}
.auth-notices { width: 100%; max-width: 440px; }
.auth-notices:empty { display: none; }
.auth-notices .alert { margin: 0 0 20px; font-size: 14px; line-height: 1.5; }
.auth-wrapper { display: block; width: 100%; min-height: 0; padding: 0; background: none; animation: none; }
.auth-card {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    padding: 32px;
    background: var(--auth-surface);
    border: 0;
    border-radius: 16px;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.auth-header { margin: 0 0 28px; text-align: start; }
.auth-title { margin: 0 0 10px; color: var(--auth-text); font-size: 28px; line-height: 1.2; font-weight: 700; letter-spacing: -.025em; overflow-wrap: anywhere; }
.auth-subtitle { margin: 0; color: var(--auth-muted); font-size: 16px; line-height: 1.5; font-weight: 400; }
.auth-card .social-buttons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 0 0 24px; }
.auth-card .btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 0;
    height: 52px;
    padding: 12px;
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    box-shadow: none;
    background: var(--auth-surface);
    color: var(--auth-text);
    font-size: 16px;
    line-height: 1.25;
    font-weight: 600;
    text-decoration: none;
    transition: background-color .15s, border-color .15s;
}
.auth-card .btn-social svg { width: 24px; height: 24px; flex-shrink: 0; }
.auth-card .btn-social:hover { transform: none; box-shadow: none; background: var(--auth-bg); border-color: var(--auth-muted); color: var(--auth-text); }
.auth-card .auth-divider { gap: 16px; margin: 0 0 24px; color: var(--auth-muted); font-size: 14px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.auth-divider span { padding: 0; }
.auth-divider:before, .auth-divider:after { border-color: var(--auth-border); }
.auth-field { display: flex; flex-direction: column; position: relative; min-width: 0; margin: 0 0 20px; }
.auth-field > label { order: -1; display: block; margin: 0 0 8px; padding: 0; color: var(--auth-text); font-size: 14px; line-height: 1.4; font-weight: 500; }
.auth-card .form-control {
    display: block;
    width: 100%;
    height: 52px;
    min-height: 52px;
    padding: 12px 14px;
    border: 1px solid var(--auth-border);
    border-radius: 12px;
    background: var(--auth-surface);
    color: var(--auth-text);
    font-size: 16px;
    line-height: 1.5;
    font-weight: 400;
    box-shadow: none !important;
}
.auth-card .form-control::placeholder { color: var(--auth-muted); opacity: 1; }
.auth-card .form-control:focus { border-color: var(--auth-accent); outline: 2px solid var(--auth-accent); outline-offset: 2px; background: var(--auth-surface); color: var(--auth-text); box-shadow: none !important; }
.auth-password-control { position: relative; width: 100%; }
.auth-password-control .form-control { padding-right: 56px; }
.auth-password-toggle { position: absolute; right: 4px; top: 4px; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 8px; background: transparent; color: var(--auth-muted); }
.auth-password-toggle svg { width: 22px; height: 22px; }
.auth-eye-slash { display: none; }
.auth-password-toggle[aria-pressed=true] .auth-eye-slash { display: block; }
.auth-options { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 4px 12px; margin: 0 0 16px; }
.auth-options > .auth-link { display: inline-flex; align-items: center; min-height: 44px; font-size: 14px; }
.auth-card .custom-auth-check .form-check { min-height: 44px; gap: 10px; }
.auth-card .custom-auth-check > .mb-0 { display: flex; align-items: center; gap: 10px; min-height: 44px; }
.auth-card .custom-auth-check .form-check-input { width: 22px; height: 22px; min-width: 22px; margin: 0; border-color: var(--auth-border); background-color: var(--auth-surface); }
.auth-card .form-check-input:checked { background-color: #4f46e5; border-color: #4f46e5; }
.auth-card .custom-auth-check label { display: flex; align-items: center; min-height: 44px; margin: 0; padding: 0; color: var(--auth-text); font-size: 14px; line-height: 1.4; }
.auth-card .btn-auth-submit { display: flex; align-items: center; justify-content: center; min-height: 52px; height: auto; margin: 0; padding: 14px 16px; border: 0; border-radius: 12px; background: #4f46e5; color: #fff !important; font-size: 16px; line-height: 1.5; font-weight: 600; box-shadow: none; transition: background-color .15s; }
.auth-card .btn-auth-submit:hover { transform: none; background: #4338ca; box-shadow: none; }
.auth-card .btn-auth-submit:active { background: #3730a3; }
.auth-card .auth-link { color: var(--auth-accent); font-weight: 500; }
.auth-card .auth-link:hover { color: var(--auth-accent-hover); }
.auth-card .auth-footer { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 0 4px; margin: 24px 0 0; color: var(--auth-muted); font-size: 14px; line-height: 1.6; font-weight: 400; }
.auth-footer > a { display: inline-flex; align-items: center; min-height: 44px; }
.auth-card .auth-footer-secondary { margin-top: 0; font-size: 14px; }
.auth-card .form-text, .auth-card .text-muted { color: var(--auth-muted) !important; font-size: 14px; line-height: 1.5; }
.auth-card .invalid-feedback, .auth-card .text-danger { color: #b42335; font-size: 14px; line-height: 1.5; }
.auth-card .form-control.is-invalid { border-color: #b42335; }
.auth-card :is(a, button, input[type=checkbox]):focus-visible { outline: 2px solid var(--auth-accent); outline-offset: 3px; }
.auth-card .auth-consent { padding-left: 32px; }
.auth-card .auth-consent > .form-check-input { width: 22px; height: 22px; margin-left: -32px; margin-top: 2px; }
.auth-card .auth-consent > label { display: block; min-height: 44px; line-height: 1.5; }
[data-bs-theme=dark] .auth-card .invalid-feedback, [data-bs-theme=dark] .auth-card .text-danger { color: #ff9ca8; }
@media (max-width: 575px) {
    body.auth-page-body { background: var(--auth-surface); }
    .auth-toolbar { padding: calc(16px + env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) 12px max(20px, env(safe-area-inset-left)); }
    .auth-main { justify-content: flex-start; padding: 28px max(24px, env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left)); }
    .auth-card { padding: 0; border-radius: 0; max-width: 400px; }
    .auth-title { font-size: 30px; }
    .auth-notices { max-width: 400px; }
    .auth-header { margin-bottom: 28px; }
    .auth-card .social-buttons { margin-bottom: 24px; }
}
@media (max-width: 359px) {
    .auth-main { padding-left: 20px; padding-right: 20px; }
    .auth-card .social-buttons { gap: 10px; }
    .auth-card .btn-social { gap: 8px; }
    .auth-title { font-size: 28px; }
    .auth-options { column-gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    .auth-page-body * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* Shared account controls keep the verification challenge in the form flow. */
.auth-captcha-image { margin-bottom: 12px; }
.auth-captcha-image img { display: block; width: 160px; height: 52px; border-radius: 8px; cursor: pointer; }
.auth-captcha-image img:focus-visible { outline: 2px solid var(--auth-accent); outline-offset: 3px; }
