/* 登录入口与验证码面板 —— 沿用 theme-tokens.css 的品牌语义 token */
[hidden] { display: none !important; }
body.auth-locked { overflow: hidden; }

.nav-auth {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 170px;
  padding: 9px 15px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .04);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .22s, border-color .22s, transform .22s;
}
.nav-auth:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .55); transform: translateY(-2px); }
.nav-auth .auth-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-bright); flex: 0 0 auto; }
.nav-auth.is-signed-in { border-color: rgba(255, 255, 255, .5); background: rgba(225, 29, 42, .16); }
.nav-auth.is-signed-in .auth-dot { background: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, .18); }
.nav-auth span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.auth-panel { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 20px; }
.auth-backdrop { position: absolute; inset: 0; background: rgba(8, 7, 13, .68); backdrop-filter: blur(7px); animation: authFade .22s ease-out; }
@keyframes authFade { from { opacity: 0; } to { opacity: 1; } }
.auth-card {
  position: relative;
  width: min(390px, 100%);
  background: #fff;
  border-radius: 18px;
  padding: 30px 28px 26px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
  border: 1px solid var(--border);
  animation: authPop .28s cubic-bezier(.2, .8, .2, 1);
}
@keyframes authPop { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.auth-close { position: absolute; right: 16px; top: 16px; width: 30px; height: 30px; border: 0; border-radius: 8px; background: #f4f4f7; color: #6e6c79; font-size: 14px; cursor: pointer; }
.auth-close:hover { background: var(--brand-soft); color: var(--brand); }
.auth-kicker { font: 600 10px/1 var(--mono); letter-spacing: .18em; color: var(--brand); margin: 0 0 12px; }
.auth-card h2 { font-size: 23px; font-weight: 900; letter-spacing: -.03em; margin: 0 0 8px; color: var(--background-foreground); }
.auth-lead { font-size: 12.5px; line-height: 1.75; color: var(--muted-foreground); margin: 0 0 22px; }
.auth-field { margin-bottom: 14px; }
.auth-field label { display: block; font-size: 11.5px; font-weight: 700; color: #55535f; margin-bottom: 7px; }
.auth-input {
  width: 100%;
  height: 44px;
  border: 1px solid #e3e3ea;
  border-radius: 10px;
  padding: 0 13px;
  font-size: 14px;
  color: var(--background-foreground);
  background: #fbfbfc;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.auth-input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(225, 29, 42, .12); background: #fff; }
.auth-input:disabled { opacity: .6; }
.auth-code-row { display: flex; gap: 9px; }
.auth-code-row .auth-input { flex: 1; min-width: 0; }
.auth-send {
  flex: 0 0 auto;
  min-width: 108px;
  border: 1px solid var(--brand);
  background: #fff;
  color: var(--brand);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.auth-send:hover:not(:disabled) { background: var(--brand); color: #fff; }
.auth-send:disabled { opacity: .55; cursor: not-allowed; }
.auth-error { font-size: 11.5px; color: var(--brand); margin: 6px 0 0; font-weight: 600; }
.auth-message { font-size: 12px; line-height: 1.6; margin: 0 0 14px; padding: 9px 11px; border-radius: 8px; background: #f5f5f8; color: #55535f; }
.auth-message.error { background: var(--brand-soft); color: var(--brand-strong); }
.auth-message.ok { background: #f0fbf3; color: #1c7a3e; }
.auth-submit {
  width: 100%;
  height: 46px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--brand-bright), var(--brand-strong));
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(225, 29, 42, .28);
  transition: transform .2s, box-shadow .2s;
  margin-top: 4px;
}
.auth-submit:hover:not(:disabled) { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(225, 29, 42, .38); }
.auth-submit:disabled { opacity: .6; cursor: not-allowed; }
.auth-register { width: 100%; height: 40px; margin-top: 10px; border: 1px solid #e3e3ea; background: #fff; color: #777580; border-radius: 10px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.auth-register:hover { border-color: var(--brand); color: var(--brand); }
.auth-register:disabled { opacity: .6; cursor: not-allowed; }
.auth-note { font-size: 11px; line-height: 1.7; color: #9a98a4; margin: 16px 0 0; text-align: center; }
.auth-preview { margin-top: 12px; padding: 9px 11px; border: 1px dashed #e7c9cd; border-radius: 8px; background: #fffafa; font-size: 11px; line-height: 1.65; color: #9a5a60; }

.auth-user { text-align: center; padding: 8px 0 4px; }
.auth-avatar { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(145deg, var(--brand-bright), var(--brand-strong)); color: #fff; font-size: 22px; font-weight: 800; box-shadow: 0 10px 26px rgba(225, 29, 42, .28); }
.auth-user h3 { font-size: 17px; font-weight: 800; margin: 0 0 6px; color: var(--background-foreground); }
.auth-user p { font-size: 12px; color: var(--muted-foreground); line-height: 1.7; margin: 0 0 22px; }
.auth-logout { width: 100%; height: 42px; border: 1px solid #e3e3ea; background: #fff; color: #55535f; border-radius: 10px; font-size: 13px; font-weight: 700; cursor: pointer; }
.auth-logout:hover { border-color: var(--brand); color: var(--brand); }

@media (max-width: 700px) {
  .nav-auth { max-width: 108px; padding: 7px 11px; font-size: 11px; }
  .auth-card { padding: 26px 20px 22px; border-radius: 14px; }
  .auth-code-row { flex-direction: column; }
  .auth-send { min-width: 0; height: 40px; }
}
