/* =============================================
   Nicetheme Auth v2.2
   全局 CSS 重置：用高优先级选择器对抗主题污染
   ============================================= */

/* ---- 变量 ---- */
.nt-auth-wrap {
  --nt-primary:       #4361ee;
  --nt-primary-dark:  #3451d1;
  --nt-primary-rgb:   67,97,238;
  --nt-primary-light: #eef1fd;
  --nt-success:       #22c55e;
  --nt-error:         #ef4444;
  --nt-warning:       #f59e0b;
  --nt-text:          #111827;
  --nt-text-2:        #374151;
  --nt-text-muted:    #6b7280;
  --nt-border:        #e5e7eb;
  --nt-bg:            #f5f6fa;
  --nt-card-bg:       #ffffff;
  --nt-radius:        16px;
  --nt-radius-sm:     10px;
  --nt-shadow:        0 4px 6px -1px rgba(0,0,0,.05),0 20px 60px -10px rgba(67,97,238,.12);
  --nt-input-h:       48px;
  --nt-btn-h:         48px;
  --nt-font:          -apple-system,BlinkMacSystemFont,'PingFang SC','Hiragino Sans GB','Microsoft YaHei',sans-serif;
  --nt-ease:          cubic-bezier(.4,0,.2,1);
}

/* ---- body ---- */
.nt-auth-body {
  margin: 0 !important;
  padding: 0 !important;
  font-family: var(--nt-font) !important;
  background: var(--nt-bg) !important;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ---- 外层：撑满屏 ---- */
.nt-auth-wrap {
  min-height: 100vh;
  display: flex !important;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
  box-sizing: border-box;
}

/* ---- 重置：wrap 内所有元素盒模型 ---- */
.nt-auth-wrap *,
.nt-auth-wrap *::before,
.nt-auth-wrap *::after {
  box-sizing: border-box !important;
}

/* ---- 重置：消除主题对 input/button 的全局污染 ---- */
.nt-auth-wrap input,
.nt-auth-wrap input[type="text"],
.nt-auth-wrap input[type="email"],
.nt-auth-wrap input[type="password"],
.nt-auth-wrap input[type="tel"],
.nt-auth-wrap input[type="number"],
.nt-auth-wrap button,
.nt-auth-wrap select,
.nt-auth-wrap textarea {
  all: unset;              /* 清除所有继承样式 */
  box-sizing: border-box !important;
  font-family: var(--nt-font) !important;
  outline: none !important;
  -webkit-tap-highlight-color: transparent !important;
  border-radius: 0;
}

/* ---- 重置 checkbox ---- */
.nt-auth-wrap input[type="checkbox"] {
  all: revert;
  outline: none !important;
  accent-color: var(--nt-primary);
  width: 15px;
  height: 15px;
  cursor: pointer;
  flex-shrink: 0;
  margin: 0;
}

/* ---- 卡片 ---- */
.nt-auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--nt-card-bg);
  border-radius: var(--nt-radius);
  box-shadow: var(--nt-shadow);
  border: 1px solid rgba(0,0,0,.06);
  padding: 40px 36px 32px;
  animation: nt-rise .3s var(--nt-ease) both;
}
@keyframes nt-rise {
  from { opacity:0; transform:translateY(14px); }
  to   { opacity:1; transform:translateY(0); }
}

/* ---- Logo ---- */
.nt-auth-logo { text-align:center; margin-bottom:20px; }
.nt-auth-logo img { max-height:44px; width:auto; display:inline-block; }
.nt-site-name {
  display:inline-block;
  font-size:20px !important; font-weight:800 !important;
  color:var(--nt-primary) !important; letter-spacing:-.4px;
}

/* ---- 标题 ---- */
.nt-auth-title {
  font-size:22px !important; font-weight:700 !important;
  color:var(--nt-text) !important; text-align:center;
  margin:0 0 6px !important; padding:0 !important;
  letter-spacing:-.3px; line-height:1.3;
  border:none !important;
}
.nt-auth-desc {
  font-size:14px; color:var(--nt-text-muted);
  text-align:center; margin:0 0 24px; line-height:1.6;
}

/* ---- 提示框（不用 ::before 图标，改用纯文字前缀避免尺寸失控） ---- */
.nt-alert {
  border-radius:var(--nt-radius-sm);
  padding:11px 14px;
  font-size:13.5px;
  margin-bottom:18px;
  line-height:1.5;
  display:block;
  font-family: var(--nt-font);
  font-weight: 400;
}
.nt-alert-error   { background:#fef2f2; color:#b91c1c; border:1px solid #fecaca; }
.nt-alert-success { background:#f0fdf4; color:#15803d; border:1px solid #bbf7d0; }
.nt-alert-info    { background:var(--nt-primary-light); color:var(--nt-primary-dark); border:1px solid rgba(var(--nt-primary-rgb),.2); }

/* ---- 表单字段 ---- */
.nt-form .nt-field { margin-bottom:16px; }

.nt-form label,
.nt-auth-card .nt-form label {
  display:flex !important;
  justify-content:space-between;
  align-items:center;
  font-size:13px !important;
  font-weight:600 !important;
  color:var(--nt-text) !important;
  margin-bottom:6px !important;
  line-height:1.4;
  font-family: var(--nt-font) !important;
  cursor: default;
  background: none !important;
  padding: 0 !important;
  border: none !important;
}

.nt-link-right {
  font-size:12px !important; font-weight:500 !important;
  color:var(--nt-primary) !important; text-decoration:none !important;
  cursor: pointer;
}
.nt-link-right:hover { text-decoration:underline !important; }

/* ---- 输入框容器 ---- */
.nt-input-wrap {
  position:relative !important;
  display:flex !important;
  align-items:center;
  height:var(--nt-input-h) !important;
  background:#f9fafb !important;
  border:1.5px solid var(--nt-border) !important;
  border-radius:var(--nt-radius-sm) !important;
  transition:border-color .18s, box-shadow .18s, background .18s;
  overflow:hidden;
  padding:0 !important;
  margin:0 !important;
}
.nt-input-wrap:focus-within {
  border-color:var(--nt-primary) !important;
  background:#fff !important;
  box-shadow:0 0 0 3px rgba(var(--nt-primary-rgb),.1) !important;
}
.nt-input-wrap.nt-error {
  border-color:var(--nt-error) !important;
  box-shadow:0 0 0 3px rgba(239,68,68,.1) !important;
}

/* ---- 图标：严格固定 16×16，防止继承主题字体尺寸 ---- */
.nt-auth-wrap .nt-icon {
  width:40px !important;
  min-width:40px !important;
  flex-shrink:0 !important;
  display:flex !important;
  align-items:center;
  justify-content:center;
  color:#9ca3af !important;
  pointer-events:none;
  font-size:0 !important;      /* 防止 emoji/文字图标被字体大小影响 */
}
.nt-auth-wrap .nt-icon svg {
  width:16px !important;
  height:16px !important;
  display:block !important;
  flex-shrink:0 !important;
  max-width:16px !important;
  max-height:16px !important;
}
.nt-input-wrap:focus-within .nt-icon { color:var(--nt-primary) !important; }

/* ---- input 本体 ---- */
.nt-auth-wrap .nt-input-wrap input {
  flex:1 !important;
  min-width:0 !important;
  height:100% !important;
  border:none !important;
  outline:none !important;
  background:transparent !important;
  font-size:14.5px !important;
  color:var(--nt-text) !important;
  font-family:var(--nt-font) !important;
  padding:0 8px 0 0 !important;
  margin:0 !important;
  box-shadow:none !important;
  border-radius:0 !important;
  width:auto !important;
  display:block !important;
  line-height:normal !important;
}
.nt-auth-wrap .nt-input-wrap input::placeholder {
  color:#c4c9d4 !important;
  font-size:13.5px !important;
  opacity:1;
}
/* 消除主题常见的 input 伪元素 */
.nt-auth-wrap .nt-input-wrap input:focus {
  outline:none !important;
  box-shadow:none !important;
  border:none !important;
}

/* ---- 密码眼睛按钮 ---- */
.nt-auth-wrap .nt-eye {
  width:38px !important;
  height:100% !important;
  flex-shrink:0 !important;
  background:none !important;
  border:none !important;
  cursor:pointer !important;
  display:flex !important;
  align-items:center;
  justify-content:center;
  color:#9ca3af !important;
  padding:0 !important;
  margin:0 !important;
  outline:none !important;
  box-shadow:none !important;
}
.nt-auth-wrap .nt-eye:hover { color:var(--nt-primary) !important; }
.nt-auth-wrap .nt-eye svg {
  width:16px !important; height:16px !important;
  display:block; pointer-events:none;
}

/* ---- 验证码发送按钮 ---- */
.nt-auth-wrap .nt-code-wrap .nt-send-code,
.nt-auth-wrap #nt-resend {
  flex-shrink:0 !important;
  height:calc(var(--nt-input-h) - 12px) !important;
  padding:0 12px !important;
  margin-right:6px !important;
  background:transparent !important;
  border:1.5px solid rgba(var(--nt-primary-rgb),.45) !important;
  border-radius:7px !important;
  color:var(--nt-primary) !important;
  font-size:12.5px !important;
  font-weight:600 !important;
  cursor:pointer !important;
  white-space:nowrap !important;
  font-family:var(--nt-font) !important;
  outline:none !important;
  box-shadow:none !important;
  display:flex !important;
  align-items:center;
  line-height:1 !important;
  text-decoration:none !important;
  transition:background .15s, color .15s, border-color .15s;
}
.nt-auth-wrap .nt-code-wrap .nt-send-code:hover:not(:disabled),
.nt-auth-wrap #nt-resend:hover:not(:disabled) {
  background:var(--nt-primary) !important;
  border-color:var(--nt-primary) !important;
  color:#fff !important;
}
.nt-auth-wrap .nt-code-wrap .nt-send-code:disabled,
.nt-auth-wrap #nt-resend:disabled {
  border-color:var(--nt-border) !important;
  color:var(--nt-text-muted) !important;
  cursor:not-allowed !important;
  background:transparent !important;
}

/* ---- 记住我 ---- */
.nt-remember label,
.nt-auth-card .nt-remember label {
  font-size:13px !important; font-weight:400 !important;
  color:var(--nt-text-muted) !important; cursor:pointer !important;
  display:flex !important; align-items:center; gap:7px;
  justify-content:flex-start; margin-bottom:0 !important;
}

/* ---- 同意协议 ---- */
.nt-agree { margin-bottom:20px; }
.nt-agree label,
.nt-auth-card .nt-agree label {
  display:flex !important; align-items:flex-start; gap:8px;
  font-size:13px !important; font-weight:400 !important;
  color:var(--nt-text-muted) !important; cursor:pointer !important;
  line-height:1.5; margin-bottom:0 !important;
  background:none !important; padding:0 !important; border:none !important;
}
.nt-agree a { color:var(--nt-primary) !important; text-decoration:none !important; }
.nt-agree a:hover { text-decoration:underline !important; }

/* ---- 主按钮 ---- */
.nt-auth-wrap .nt-btn {
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
  gap:8px;
  width:100% !important;
  height:var(--nt-btn-h) !important;
  background:var(--nt-primary) !important;
  color:#fff !important;
  border:none !important;
  border-radius:var(--nt-radius-sm) !important;
  font-size:15px !important;
  font-weight:600 !important;
  cursor:pointer !important;
  font-family:var(--nt-font) !important;
  outline:none !important;
  box-shadow:none !important;
  text-decoration:none !important;
  letter-spacing:.2px;
  padding:0 !important;
  margin-top:4px !important;
  transition:background .18s, transform .15s, box-shadow .18s;
  line-height:1 !important;
  -webkit-appearance:none !important;
  appearance:none !important;
}
.nt-auth-wrap .nt-btn:hover:not(:disabled) {
  background:var(--nt-primary-dark) !important;
  box-shadow:0 4px 20px rgba(var(--nt-primary-rgb),.4) !important;
  transform:translateY(-1px);
  color:#fff !important;
}
.nt-auth-wrap .nt-btn:active:not(:disabled) { transform:translateY(0); }
.nt-auth-wrap .nt-btn:disabled {
  opacity:.6 !important; cursor:not-allowed !important; transform:none;
}

/* ---- Loading spinner ---- */
.nt-spinner {
  width:15px !important; height:15px !important; flex-shrink:0;
  border:2px solid rgba(255,255,255,.35) !important;
  border-top-color:#fff !important; border-radius:50%;
  animation:nt-spin .55s linear infinite;
  display:inline-block;
}
@keyframes nt-spin { to { transform:rotate(360deg); } }

/* ---- 字段错误提示（纯文字，不用图标） ---- */
.nt-field-error {
  font-size:12px !important;
  color:var(--nt-error) !important;
  margin-top:5px !important;
  margin-bottom:0 !important;
  padding:0 !important;
  display:block !important;
  line-height:1.4;
  animation:nt-shake .25s ease;
  font-family:var(--nt-font) !important;
  background:none !important;
  border:none !important;
}
@keyframes nt-shake {
  0%,100% { transform:translateX(0); }
  25%      { transform:translateX(-4px); }
  75%      { transform:translateX(4px); }
}

/* ---- 密码强度条 ---- */
.nt-pwd-strength {
  height:3px; margin-top:6px;
  border-radius:2px; background:var(--nt-border); overflow:hidden;
}
.nt-pwd-strength-bar {
  height:100%; border-radius:2px; width:0;
  transition:width .3s var(--nt-ease), background .3s;
}
.nt-pwd-strength[data-level="1"] .nt-pwd-strength-bar { width:33%; background:var(--nt-error); }
.nt-pwd-strength[data-level="2"] .nt-pwd-strength-bar { width:66%; background:var(--nt-warning); }
.nt-pwd-strength[data-level="3"] .nt-pwd-strength-bar { width:100%; background:var(--nt-success); }

/* ---- 分隔线 ---- */
.nt-divider {
  display:flex; align-items:center; gap:12px;
  margin:22px 0; color:var(--nt-text-muted); font-size:12px;
}
.nt-divider::before, .nt-divider::after {
  content:''; flex:1; height:1px; background:var(--nt-border);
}

/* ---- OAuth 按钮 ---- */
.nt-oauth-btns { display:flex; gap:10px; justify-content:center; flex-wrap:wrap; }
.nt-auth-wrap .nt-oauth-btn {
  flex:1 !important; min-width:0;
  display:inline-flex !important; align-items:center; justify-content:center; gap:7px;
  padding:0 14px !important; height:42px !important;
  border-radius:var(--nt-radius-sm) !important;
  border:1.5px solid var(--nt-border) !important;
  font-size:13.5px !important; font-weight:600 !important;
  text-decoration:none !important; cursor:pointer !important;
  transition:border-color .15s, background .15s, transform .15s;
  white-space:nowrap; font-family:var(--nt-font) !important;
  background:#fff !important; line-height:1 !important;
  outline:none !important; box-shadow:none !important;
}
.nt-auth-wrap .nt-oauth-btn svg {
  width:18px !important; height:18px !important; flex-shrink:0;
}
.nt-auth-wrap .nt-oauth-btn:hover { transform:translateY(-1px); }
.nt-auth-wrap .nt-wechat { color:#07c160 !important; }
.nt-auth-wrap .nt-wechat:hover { background:#f0fdf4 !important; border-color:#86efac !important; }
.nt-auth-wrap .nt-qq    { color:#1677ff !important; }
.nt-auth-wrap .nt-qq:hover { background:var(--nt-primary-light) !important; border-color:rgba(var(--nt-primary-rgb),.3) !important; }

/* ---- 页脚链接 ---- */
.nt-auth-footer {
  text-align:center; margin-top:22px;
  font-size:13px; color:var(--nt-text-muted); line-height:1.8;
}
.nt-auth-footer a {
  color:var(--nt-primary) !important; text-decoration:none !important; font-weight:500;
}
.nt-auth-footer a:hover { text-decoration:underline !important; }

/* ---- 找回密码：步骤条 ---- */
.nt-steps-bar {
  display:flex; align-items:flex-start;
  margin:0 0 28px; gap:0;
}
.nt-step-item { display:flex; flex-direction:column; align-items:center; gap:5px; flex:none; }
.nt-step-item span { font-size:11px; color:#9ca3af; white-space:nowrap; font-weight:500; }
.nt-step-circle {
  width:28px; height:28px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-size:12px; font-weight:700;
  background:var(--nt-border); color:#9ca3af;
  transition:background .2s, color .2s;
}
.nt-step-item.active .nt-step-circle { background:var(--nt-primary); color:#fff; }
.nt-step-item.active span            { color:var(--nt-primary); }
.nt-step-item.done   .nt-step-circle { background:var(--nt-success); color:#fff; }
.nt-step-item.done   span            { color:var(--nt-success); }
.nt-step-line { flex:1; height:1.5px; background:var(--nt-border); margin:14px 4px 0; }
.nt-step-line.done { background:var(--nt-success); }

.nt-step-desc { font-size:13.5px; color:var(--nt-text-muted); margin-bottom:20px; line-height:1.6; }
.nt-step-hint {
  font-size:13px; color:#374151;
  background:var(--nt-primary-light);
  border:1px solid rgba(var(--nt-primary-rgb),.15);
  border-radius:var(--nt-radius-sm);
  padding:11px 14px; margin-bottom:18px; line-height:1.6;
}

/* ---- 响应式 ---- */
@media (max-width:480px) {
  .nt-auth-card { padding:28px 20px 24px; border-radius:14px; }
  .nt-auth-title { font-size:20px !important; }
  .nt-oauth-btns { flex-direction:column; }
  .nt-auth-wrap .nt-oauth-btn { flex:none !important; width:100% !important; }
  .nt-steps-bar .nt-step-item span { display:none; }
}
