/* 玩宠物 PC 端登录弹层样式 */

.login-mask {
  position: fixed; inset: 0; z-index: 9000;
  background: rgba(28, 38, 48, .5);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: loginFade .18s ease;
}
.login-mask[hidden] { display: none; }
@keyframes loginFade { from { opacity: 0; } to { opacity: 1; } }

.login-box {
  position: relative;
  width: 380px; max-width: 100%;
  max-height: 92vh; overflow-y: auto;
  background: #fff; border-radius: 16px;
  box-shadow: 0 18px 50px rgba(20, 30, 40, .22);
  padding: 30px 30px 26px;
  animation: loginUp .22s cubic-bezier(.2, .8, .3, 1);
}
@keyframes loginUp { from { transform: translateY(14px); opacity: 0; } to { transform: none; opacity: 1; } }

.login-close {
  position: absolute; top: 12px; right: 16px;
  font-size: 24px; line-height: 1; color: #94a3b8;
  cursor: pointer; user-select: none;
}
.login-close:hover { color: var(--primary, #2563eb); }

.login-head { text-align: center; margin-bottom: 18px; }
.login-logo { font-size: 20px; font-weight: 700; color: var(--primary, #2563eb); }
.login-slogan { font-size: 12.5px; color: #94a3b8; margin-top: 6px; }

.login-avatar {
  width: 64px; height: 64px; margin: 0 auto 10px;
  border-radius: 50%; overflow: hidden; background: #f1f5f9;
  display: flex; align-items: center; justify-content: center; font-size: 30px;
}
.login-avatar img { width: 100%; height: 100%; object-fit: cover; }
.login-name { font-size: 16px; font-weight: 600; color: #334155; }
.login-phone { font-size: 12.5px; color: #94a3b8; margin-top: 4px; }
.login-phone.warn { color: #b45309; }

.login-tabs {
  display: flex; gap: 4px; border-bottom: 1px solid #f1f5f9;
  margin-bottom: 20px;
}
.login-tab {
  flex: 1; text-align: center; padding: 10px 0 12px;
  font-size: 14px; color: #64748b; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.login-tab.on { color: var(--primary, #2563eb); border-bottom-color: var(--primary, #2563eb); font-weight: 600; }

.login-pane[hidden] { display: none; }

/* 微信二维码 */
.wx-qr-wrap {
  position: relative; width: 200px; height: 200px;
  margin: 4px auto 14px; border: 1px solid #f1f5f9;
  border-radius: 12px; overflow: hidden; background: #f8fafc;
  display: flex; align-items: center; justify-content: center;
}
.wx-qr-box { width: 200px; height: 200px; }
.wx-qr-box iframe { width: 200px !important; height: 200px !important; border: 0; }
.wx-qr-loading { font-size: 12.5px; color: #94a3b8; }

.login-tip { text-align: center; font-size: 13px; color: #64748b; }
.login-tip b { color: var(--primary, #2563eb); }
.login-tip-sub { text-align: center; font-size: 11.5px; color: #94a3b8; margin-top: 6px; }

/* 表单 */
.login-field { margin-bottom: 12px; }
.login-input {
  width: 100%; box-sizing: border-box;
  padding: 11px 14px; font-size: 14px;
  border: 1px solid #e2e8f0; border-radius: 9px;
  background: #f8fafc; color: #334155; outline: none;
  transition: border-color .15s, background .15s;
}
.login-input:focus { border-color: var(--primary, #2563eb); background: #fff; }
.login-field-code { display: flex; gap: 8px; }
.login-field-code .login-input { flex: 1; min-width: 0; }
.login-code-btn {
  flex: 0 0 104px; padding: 0 10px;
  font-size: 13px; white-space: nowrap;
  border: 1px solid var(--primary, #2563eb); background: #fff;
  color: var(--primary, #2563eb); border-radius: 9px; cursor: pointer;
  transition: background .15s, color .15s;
}
.login-code-btn:hover:not(:disabled) { background: #eff6ff; }
.login-code-btn:disabled { border-color: #cbd5e1; color: #94a3b8; cursor: not-allowed; background: #f8fafc; }

.login-submit {
  width: 100%; padding: 12px; margin-top: 4px;
  font-size: 15px; font-weight: 600; letter-spacing: 1px;
  color: #fff; border: 0; border-radius: 9px; cursor: pointer;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  box-shadow: 0 6px 16px rgba(37, 99, 235, .3);
  transition: transform .12s, box-shadow .12s;
}
.login-submit:hover { transform: translateY(-1px); box-shadow: 0 9px 20px rgba(37, 99, 235, .38); }
.login-submit:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.login-bind-box { border-top: 1px solid #f1f5f9; padding-top: 18px; }
.login-bind-title { font-size: 14px; font-weight: 600; color: #334155; margin-bottom: 12px; text-align: center; }

.login-links { text-align: center; font-size: 14px; margin-top: 16px; }
.login-links a { color: var(--primary, #2563eb); text-decoration: none; }
.login-links a:hover { text-decoration: underline; }
.login-sep { color: #cbd5e1; margin: 0 10px; }

/* 头部登录入口 */
.header-auth { display: flex; align-items: center; gap: 10px; }
.header-login-btn {
  padding: 7px 18px; font-size: 13.5px; cursor: pointer;
  border: 1px solid var(--primary, #2563eb); border-radius: 18px;
  background: #fff; color: var(--primary, #2563eb);
  transition: background .15s, color .15s;
}
.header-login-btn:hover { background: var(--primary, #2563eb); color: #fff; }

.header-user { position: relative; }
.header-user-btn {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 14px; font-size: 13.5px; cursor: pointer;
  border: 1px solid #e2e8f0; border-radius: 18px; background: #fff; color: #475569;
}
.header-user-btn:hover { border-color: var(--primary, #2563eb); color: var(--primary, #2563eb); }
.header-user-btn .u-avatar {
  width: 22px; height: 22px; border-radius: 50%; overflow: hidden;
  background: #f1f5f9; display: flex; align-items: center; justify-content: center; font-size: 13px;
}
.header-user-btn .u-avatar img { width: 100%; height: 100%; object-fit: cover; }

.header-user-menu {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 158px; background: #fff; border-radius: 10px;
  box-shadow: 0 8px 26px rgba(20, 30, 40, .14);
  border: 1px solid #f1f5f9; padding: 6px; z-index: 800;
}
.header-user-menu[hidden] { display: none; }
.header-user-menu a {
  display: block; padding: 9px 12px; font-size: 13.5px;
  color: #475569; text-decoration: none; border-radius: 7px;
}
.header-user-menu a:hover { background: var(--primary-lighter, #eff6ff); color: var(--primary, #2563eb); }
.header-user-menu .u-bind-tip { font-size: 11.5px; color: #b45309; padding: 6px 12px 2px; }

/* 提示气泡 */
.pc-toast {
  position: fixed; left: 50%; top: 76px; transform: translateX(-50%);
  z-index: 9500; padding: 11px 22px; border-radius: 22px;
  font-size: 13.5px; color: #fff; background: rgba(40, 52, 62, .92);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .18);
  animation: loginFade .16s ease;
}
.pc-toast.ok { background: rgba(16, 185, 129, .94); }
.pc-toast.err { background: rgba(204, 74, 74, .94); }

@media (max-width: 640px) {
  .login-box { padding: 24px 20px 20px; border-radius: 14px; }
  .wx-qr-wrap, .wx-qr-box, .wx-qr-box iframe { width: 178px !important; height: 178px !important; }
}
