/* Authentication shares the CRM palette without loading workspace styles or scripts. */
:is(.auth-modern-page, #registerModal) {
    --auth-ink: #1e3452;
    --auth-muted: #526987;
    --auth-line: #b8cceb;
    --auth-blue: #2563eb;
    color: var(--auth-ink);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}
body.auth-modern-page { display: flex; min-height: 100vh; min-height: 100dvh; margin: 0; padding: 32px 20px; background: #f8fbff; }
.auth-modern-page .auth-shell { width: 100%; max-width: 500px; min-width: 0; margin: auto; }
.auth-modern-page .auth-card,
#registerModal .modal-content { overflow: hidden; border: 1px solid var(--auth-line); border-radius: 14px; background: #fff; box-shadow: 0 8px 28px #23487d0f; }
#registerModal #registerModalBody { border: 0; border-radius: inherit; background: #fff; box-shadow: none; }
:is(.auth-modern-page, #registerModal) .auth-header { display: block; flex: none; padding: 22px 26px; border-bottom: 1px solid var(--auth-line); background: #dfebff; color: #214f9b; text-align: center; }
:is(.auth-modern-page, #registerModal) .auth-header :is(h1, h2) { margin: 0; color: #214f9b; font-size: 22px; line-height: 1.35; font-weight: 600; }
:is(.auth-modern-page, #registerModal) .auth-header p { margin: 7px 0 0; color: #526f98; font-size: 13px; line-height: 1.6; }
:is(.auth-modern-page, #registerModal) .auth-content { padding: 24px 26px; }
:is(.auth-modern-page, #registerModal) .auth-description { margin: 0 0 20px; color: var(--auth-muted); font-size: 14px; line-height: 1.65; }
:is(.auth-modern-page, #registerModal) :is(.auth-form, #registerForm, #loginForm) { display: flex; flex-direction: column; gap: 18px; width: 100%; max-width: none; margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
:is(.auth-modern-page, #registerModal) :is(#registerForm, #loginForm) { padding: 24px 26px; }
:is(.auth-modern-page, #registerModal) :is(.auth-form, #registerForm, #loginForm) label { display: block; margin: 0 0 7px; color: #315d9b; font-size: 14px; line-height: 1.4; font-weight: 500; }
:is(.auth-modern-page, #registerModal) :is(.auth-form, #registerForm, #loginForm) .form-control { width: 100%; min-width: 0; min-height: 46px; padding: 11px 13px; border: 1px solid #bdcff0; border-radius: 8px; background: #fff; color: var(--auth-ink); font: inherit; font-size: 15px; line-height: 1.45; box-shadow: none; }
:is(.auth-modern-page, #registerModal) .form-control::placeholder { color: #7b8eaa; opacity: 1; }
:is(.auth-modern-page, #registerModal) :is(.auth-form, #registerForm, #loginForm) .form-control:focus { border-color: #6492ee; outline: none; box-shadow: 0 0 0 3px #2563eb1f; }
:is(.auth-modern-page, #registerModal) :is(.auth-form, #registerForm, #loginForm) .input-validation-error { border-color: #dc6679; }
:is(.auth-modern-page, #registerModal) :is(.auth-form, #registerForm, #loginForm) .auth-code { min-height: 52px; font-family: "Segoe UI", Arial, sans-serif; font-size: 21px; font-weight: 500; letter-spacing: .16em; }
:is(.auth-modern-page, #registerModal) :is(.auth-form, #registerForm, #loginForm) .btn-primary { display: inline-flex; align-items: center; justify-content: center; width: 100%; min-height: 46px; padding: 11px 16px; border: 1px solid var(--auth-blue); border-radius: 8px; background: var(--auth-blue); color: #fff; font: inherit; font-size: 14px; line-height: 1.45; font-weight: 600; white-space: normal; box-shadow: none; }
:is(.auth-modern-page, #registerModal) :is(.auth-form, #registerForm, #loginForm) .btn-primary:hover { border-color: #1d4ed8; background: #1d4ed8; box-shadow: none; }
:is(.auth-modern-page, #registerModal) .btn:focus-visible,
:is(.auth-modern-page, #registerModal) summary:focus-visible,
:is(.auth-modern-page, #registerModal) .password-toggle:focus-visible { outline: 2px solid #6492ee; outline-offset: 3px; box-shadow: none; }
:is(.auth-modern-page, #registerModal) .auth-help { margin: 0; color: var(--auth-muted); font-size: 12px; line-height: 1.6; }
:is(.auth-modern-page, #registerModal) .auth-disclosure { margin-top: 20px; padding: 14px; border: 1px solid #d4e0f3; border-radius: 9px; background: #f5f8fe; font-size: 13px; line-height: 1.6; }
:is(.auth-modern-page, #registerModal) .auth-disclosure summary { color: #315d9b; font-size: 13px; font-weight: 500; cursor: pointer; }
:is(.auth-modern-page, #registerModal) .auth-disclosure p { margin: 12px 0; color: var(--auth-muted); }
:is(.auth-modern-page, #registerModal) .auth-disclosure .btn-outline-secondary { width: 100%; min-height: 40px; border: 1px solid #b8cceb; border-radius: 7px; background: #fff; color: #315d9b; font-size: 13px; white-space: normal; }
:is(.auth-modern-page, #registerModal) .auth-disclosure .btn-outline-secondary:hover { background: #edf4ff; border-color: #8eaddd; }
:is(.auth-modern-page, #registerModal) .auth-back { display: block; margin-top: 18px; padding: 4px; color: #526f98; font-size: 13px; text-align: center; text-decoration: none; }
:is(.auth-modern-page, #registerModal) .auth-back:hover { color: #245bc4; text-decoration: underline; }
:is(.auth-modern-page, #registerModal) .auth-qr { display: grid; place-items: center; margin: 20px 0; }
:is(.auth-modern-page, #registerModal) .auth-qr img { display: block; width: 200px; height: 200px; max-width: 100%; border: 1px solid #d4e0f3; border-radius: 10px; background: #fff; padding: 8px; }
:is(.auth-modern-page, #registerModal) .auth-manual { margin: 0 0 20px; }
:is(.auth-modern-page, #registerModal) .auth-secret { margin-top: 12px; padding: 10px; border: 1px solid #d4e0f3; border-radius: 6px; background: #fff; color: var(--auth-ink); font-family: Consolas, monospace; overflow-wrap: anywhere; user-select: all; }
:is(.auth-modern-page, #registerModal) .alert { margin: 0 0 18px; padding: 12px 14px; border-radius: 8px; font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; }
:is(.auth-modern-page, #registerModal) .alert ul { margin: 0; padding-left: 18px; }
:is(.auth-modern-page, #registerModal) .alert-danger { border-color: #efbdc6; background: #fff3f5; color: #b7354d; }
:is(.auth-modern-page, #registerModal) .alert-info { border-color: #bdd2f6; background: #edf4ff; color: #315d9b; }
:is(.auth-modern-page, #registerModal) .validation-summary-valid,
:is(.auth-modern-page, #registerModal) .field-validation-valid { display: none; }
:is(.auth-modern-page, #registerModal) .field-validation-error { display: block; margin-top: 6px; color: #b7354d; font-size: 12px; line-height: 1.5; }
:is(.auth-modern-page, #registerModal) :is(#registerForm, #loginForm) + .text-danger { padding: 0 26px 20px; font-size: 13px; }
:is(.auth-modern-page, #registerModal) .password-input-wrapper { position: relative; }
:is(.auth-modern-page, #registerModal) #loginForm .password-input { padding-right: 50px; }
:is(.auth-modern-page, #registerModal) #loginForm .password-toggle { position: absolute; top: 50%; right: 7px; display: grid; place-items: center; width: 32px; height: 32px; margin: 0; padding: 0; border: 0; border-radius: 6px; background: #edf4ff; color: #526f98; transform: translateY(-50%); cursor: pointer; }
:is(.auth-modern-page, #registerModal) #loginForm .password-toggle:hover { background: #dfebff; color: #245bc4; }
:is(.auth-modern-page, #registerModal) .password-toggle svg { width: 19px; height: 19px; }
:is(.auth-modern-page, #registerModal) .password-toggle.is-visible .password-toggle-slash { opacity: 0; }
:is(.auth-modern-page, #registerModal) #registerForm .show-password-wrapper { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
:is(.auth-modern-page, #registerModal) #registerForm .show-password-checkbox { flex: 0 0 16px; width: 16px; height: 16px; margin: 0; accent-color: var(--auth-blue); }
:is(.auth-modern-page, #registerModal) #registerForm .show-password-label { margin: 0; color: var(--auth-muted); font-size: 12px; font-weight: 400; cursor: pointer; }
@media (max-width: 540px) {
    body.auth-modern-page { padding: 24px 14px; }
    :is(.auth-modern-page, #registerModal) .auth-header { padding: 18px 20px; }
    :is(.auth-modern-page, #registerModal) .auth-header :is(h1, h2) { font-size: 20px; }
    :is(.auth-modern-page, #registerModal) :is(.auth-content, #registerForm, #loginForm) { padding: 20px; }
}
