/* Authentication uses the same quiet surfaces as the studio. */
#login-modal { background: #17172280; backdrop-filter: blur(8px); overscroll-behavior: contain; }
#login-modal .auth-modal-card { width: min(440px, 100%); padding: 28px; max-height: calc(100dvh - 40px); border: 1px solid #e7e7ec; border-radius: 24px; background: #fff; box-shadow: 0 24px 70px #16162226; overscroll-behavior: contain; }
#login-modal .auth-modal-card::before { display: none; }
#login-modal .auth-close { width: 40px; height: 40px; position: sticky; top: -12px; float: right; margin: -8px -8px -32px 0; }
#login-modal .auth-close:hover { transform: none; }
#login-modal .auth-brand { display: flex; justify-content: flex-start; margin: 0 44px 16px 0; }
#login-modal .auth-tabs { box-shadow: none; background: #f3f3f6; border: 0; margin-bottom: 16px; padding: 4px; }
#login-modal .auth-tabs[hidden], #auth-back-login[hidden] { display: none; }
#login-modal .auth-tab-btn { min-height: 38px; font-size: 14px; }
#login-modal .auth-heading { text-align: left; margin-bottom: 16px; }
#login-modal .auth-heading h2 { font-size: 27px; letter-spacing: -.8px; line-height: 1.2; margin: 0 0 8px; }
#login-modal .auth-heading p { font-size: 14px; line-height: 1.6; color: #64666f; }
#login-modal .auth-social-btn { min-height: 46px; border: 1px solid #dedee6; background: white; box-shadow: none; font-size: 14px; border-radius: 12px; }
#login-modal .auth-divider { margin: 12px 0; font-size: 12px; color: #686873; }
#login-modal .auth-form { gap: 12px; }
#login-modal .auth-field label { font-size: 13px; color: #393944; margin-bottom: 7px; font-weight: 600; }
#login-modal .auth-input { min-height: 46px; padding: 11px 13px; font-size: 16px; border: 1px solid #dedee6; border-radius: 12px; background: #fafafb; box-shadow: none; }
#login-modal .auth-input:focus { border-color: #6357dc; background: white; box-shadow: 0 0 0 3px #6357dc18; }
#login-modal .auth-input:focus-visible { outline: none; }
#login-modal .auth-input[aria-invalid="true"] { border-color: #bd343b; }
#login-modal .auth-password-input { padding-right: 48px; }
#login-modal .auth-password-toggle { width: 44px; height: 44px; right: 1px; }
#login-modal .auth-password-toggle svg { width: 20px; height: 20px; }
#login-modal .auth-primary-btn { min-height: 46px; padding: 12px 16px; width: 100%; justify-content: center; border: 0; border-radius: 12px; box-shadow: none; background: #5145cd; font-size: 15px; font-weight: 650; margin-top: 2px; }
#login-modal .auth-primary-btn:hover { background: #4438b9; transform: none; box-shadow: none; }
#login-modal button:disabled { opacity: .6; cursor: default; }
#login-modal button[aria-busy="true"]::before { content: ''; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: auth-spin .8s linear infinite; margin-right: 10px; }
@keyframes auth-spin { to { transform: rotate(360deg); } }
#login-modal .auth-field-hint { font-size: 12px; line-height: 1.6; color: #64666f; margin: -8px 0 0; }
#login-modal .auth-field-error { font-size: 13px; line-height: 1.5; color: #ab2834; margin: 6px 0 0; }
#login-modal .auth-alert-banner { font-size: 13px; line-height: 1.6; padding: 12px; border-radius: 10px; margin-bottom: 16px; }
#login-modal .auth-forgot-link { align-self: flex-end; color: #5145cd; font-size: 13px; padding: 4px 0; margin-top: -8px; }
#login-modal .auth-terms { color: #696973; font-size: 12px; line-height: 1.7; text-align: left; margin-top: 14px; }
#login-modal .auth-text-btn, #login-modal .auth-back-btn { border: 0; box-shadow: none; background: none; color: #5145cd; padding: 10px 0; min-height: 40px; font-size: 13px; justify-content: center; }
#auth-back-login { width: 100%; margin: 16px 0 0; }
#login-modal .auth-recovery-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; color: #64666f; font-size: 12px; }
#login-modal .auth-recovery-links button { background: none; border: none; color: #5145cd; font: inherit; min-height: 40px; padding: 0; cursor: pointer; }
#reset-code { text-align: center; font-size: 24px !important; letter-spacing: 8px; }
@media (max-height: 760px) {
    #login-modal .auth-modal-card { padding: 22px 28px; }
    #login-modal .auth-brand { margin-bottom: 12px; }
    #login-modal .auth-tabs, #login-modal .auth-heading { margin-bottom: 12px; }
    #login-modal .auth-heading h2 { margin-bottom: 4px; }
    #login-modal .auth-divider { margin: 8px 0; }
    #login-modal .auth-form { gap: 10px; }
    #login-modal .auth-terms { margin-top: 10px; }
}
@media (max-width: 520px) {
    #login-modal { padding: 12px; align-items: center; }
    #login-modal .auth-modal-card { max-height: calc(100dvh - 24px); margin: 0; padding: 24px 20px max(20px, env(safe-area-inset-bottom)); border-radius: 20px; }
    #login-modal .auth-brand { margin-bottom: 20px; }
    #login-modal .auth-heading h2 { font-size: 25px; }
}
@media (prefers-reduced-motion: reduce) {
    #login-modal *, #login-modal *::before { animation: none !important; transition: none !important; }
}
