/* 认证弹窗与工作台 Tailwind 完全隔离，移动端以底部面板呈现。 */
.login-modal { position: fixed; z-index: 100; inset: 0; display: none; place-items: center; padding: 20px; }
.login-modal.is-open { display: grid; }
.login-modal__backdrop { position: absolute; inset: 0; border: 0; background: rgba(2, 8, 21, .76); backdrop-filter: blur(8px); }
.login-panel { position: relative; width: min(100%, 470px); max-height: calc(100vh - 40px); overflow-y: auto; border: 1px solid rgba(255, 255, 255, .6); border-radius: 24px; background: #fff; padding: 32px 34px; box-shadow: 0 30px 100px rgba(2, 8, 21, .3); }
.login-panel__close { position: absolute; top: 18px; right: 18px; display: grid; width: 36px; height: 36px; place-items: center; border: 0; border-radius: 50%; background: transparent; color: #8a96a5; cursor: pointer; font-size: 26px; }
.login-panel__close:hover { background: var(--ice); }
.login-panel__icon { display: grid; width: 44px; height: 44px; margin-bottom: 18px; place-items: center; border-radius: 13px; background: var(--night); color: var(--mint); font-size: 18px; font-weight: 700; }
.login-panel h2 { margin: 0; font-size: 29px; letter-spacing: -.03em; }
.login-panel > p:not(.login-message, .login-legal, .auth-switch) { margin: 8px 0 22px; color: var(--muted); font-size: 13px; line-height: 1.7; }
.login-panel [hidden] { display: none !important; }

.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 20px; border-bottom: 1px solid var(--line); }
.auth-tabs button { border: 0; border-bottom: 2px solid transparent; background: transparent; padding: 11px; color: var(--muted); cursor: pointer; font-size: 14px; font-weight: 700; }
.auth-tabs button.is-active { border-color: var(--ink); color: var(--ink); }
.auth-form { display: grid; gap: 14px; }
.auth-form label > span:first-child { display: block; margin-bottom: 7px; font-size: 12px; font-weight: 700; }
.auth-form input { width: 100%; height: 48px; border: 1px solid var(--line); border-radius: 9px; padding: 0 14px; outline: 0; }
.auth-form input:focus { border-color: #7c92ea; box-shadow: 0 0 0 4px #eef1ff; }
.auth-form input[readonly] { background: var(--ice); color: var(--muted); }
.auth-submit { width: 100%; min-height: 50px; margin-top: 2px; border: 0; cursor: pointer; }
.auth-submit:disabled, .auth-code-row button:disabled { cursor: not-allowed; opacity: .5; }
.auth-link { justify-self: end; border: 0; background: none; padding: 0; color: #506bd5; cursor: pointer; font-size: 12px; }
.auth-code-row { display: grid !important; grid-template-columns: 1fr 108px; gap: 9px; margin: 0 !important; }
.auth-code-row button { border: 1px solid var(--line); border-radius: 9px; background: #fff; color: #445ccb; cursor: pointer; font-size: 12px; font-weight: 700; }
.login-message { min-height: 18px; margin: 11px 0 0; color: #546579; text-align: center; font-size: 12px; }
.login-message.is-error { color: #c2414b; }

.login-divider { display: flex; align-items: center; gap: 12px; margin: 14px 0; color: #9aa5b3; font-size: 11px; }
.login-divider::before, .login-divider::after { height: 1px; flex: 1; background: var(--line); content: ""; }
.google-login { display: flex; height: 46px; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--line); border-radius: 9px; font-size: 13px; font-weight: 700; }
.google-login:hover { background: var(--ice); }
.google-login__icon { width: 18px; height: 18px; flex: 0 0 auto; }
.auth-switch { margin: 15px 0 0; color: var(--muted); text-align: center; font-size: 12px; }
.auth-switch button { border: 0; background: none; padding: 0 0 0 5px; color: #445ccb; cursor: pointer; font-weight: 700; }
.login-legal { margin: 12px 0 0; color: #9aa5b3; text-align: center; font-size: 10px; line-height: 1.8; }
.login-legal a { margin: 0 4px; text-decoration: underline; }

@media (max-width: 520px) {
  .login-modal { align-items: end; padding: 0; }
  .login-panel { max-width: none; max-height: 92vh; border-radius: 22px 22px 0 0; padding: 26px 22px calc(24px + env(safe-area-inset-bottom)); }
  .login-panel__icon { width: 40px; height: 40px; margin-bottom: 14px; }
  .login-panel h2 { font-size: 26px; }
}
