/* ============ Overlay：亮色淡遮罩 ============ */
.auth-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px 12px;
  background: rgba(15, 23, 42, 0.15); /* 比较淡的灰色遮罩 */
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease-out;
  z-index: 999;
}

.auth-overlay.is-active {
  opacity: 1;
  pointer-events: auto;
}

body.auth-lock {
  overflow: hidden;
}

/* ============ 卡片主体 ============ */
.auth-card {
  width: 460px;
  max-width: 100%;
  background: #ffffff;
  border-radius: 24px;
  box-shadow:
    0 22px 55px rgba(15, 23, 42, 0.20),
    0 0 0 1px rgba(148, 163, 184, 0.35);
  padding: 24px 28px 26px;
  position: relative;
  color: #0f172a;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text",
    "Segoe UI", sans-serif;
}

/* 关闭按钮 */
.auth-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: none;
  background: rgba(148, 163, 184, 0.15);
  color: #475569;
  font-size: 18px;
  cursor: pointer;
}
.auth-close:hover {
  background: rgba(148, 163, 184, 0.3);
}

/* ============ 视图切换 ============ */
.auth-view {
  display: none;
}
.auth-view.is-active {
  display: block;
}

/* ============ 标题区 ============ */
.auth-header {
  margin-bottom: 18px;
}

.auth-title {
  font-size: 24px;
  font-weight: 800;
  color: #111827;
  margin: 4px 0 6px;
}

.auth-subtitle {
  font-size: 13px;
  color: #6b7280;
}

/* ============ 表单 ============ */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.auth-label {
  font-size: 13px;
  color: #4b5563;
}

/* 输入外壳 */
.auth-input-wrap {
  display: flex;
  align-items: center;
  background: #f9fafb;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  padding: 0 14px;
  height: 44px;
}

/* input 本体 */
.auth-input-wrap input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: #111827;
}
.auth-input-wrap input::placeholder {
  color: #9ca3af;
}

/* 带右侧小图标 */
.auth-input-with-icon {
  padding-right: 4px;
}
.auth-icon-btn {
  border: none;
  background: none;
  color: #9ca3af;
  cursor: pointer;
  padding: 3px 4px;
  font-size: 14px;
}

/* 验证码行内 */
.auth-input-inline {
  padding-right: 4px;
}
.auth-mini-btn {
  margin-left: 10px;
  border-radius: 999px;
  border: none;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 600;
  background: #fbbf24; /* 柔和黄色 */
  color: #111827;
  cursor: pointer;
  white-space: nowrap;
}
.auth-mini-btn:hover {
  filter: brightness(1.05);
}

/* 聚焦态 */
.auth-input-wrap:focus-within {
  border-color: #3b82f6;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.18);
  background: #ffffff;
}

/* ============ 按钮 ============ */
.auth-btn {
  border-radius: 999px;
  border: none;
  padding: 12px 0;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.auth-btn-primary-login {
  font-size: 13px;
  background: #fbbf24;
  color: #111827;
}

.auth-btn-primary {
    font-size: 12px;
    width: 100px;
    height: 40px;
  background: #fbbf24;
  color: #111827;
}
.auth-btn-primary:hover {
  filter: brightness(1.05);
}

.auth-btn-secondary {
    font-size: 12px;
    width: 100px;
    height: 40px;
  background: #e5e7eb;
  color: #111827;
}
.auth-btn-secondary:hover {
  background: #d1d5db;
}

/* 找回密码并排按钮 */
.auth-btn-row {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

/* ============ 小链接 ============ */
.auth-link-row {
  display: flex;
  justify-content: flex-end;
}

.auth-bottom-row {
  margin-top: 6px;
  display: flex;
  justify-content: center;
  gap: 4px;
  font-size: 13px;
  color: #6b7280;
}

/* 文本按钮：不使用默认 a 样式 */
.auth-link {
  border: none;
  background: none;
  padding: 0;
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: #111827;
  cursor: pointer;
}
.auth-link-highlight {
  color: #f97316;
}
.auth-link:hover {
  text-decoration: underline;
}

/* 协议提示 */
.auth-tip {
  margin-top: 4px;
  font-size: 12px;
  line-height: 1.6;
  color: #6b7280;
}

/* ============ 找回密码步骤条 ============ */
.auth-steps {
  margin-bottom: 14px;
}

.auth-step-bar {
  height: 4px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
  margin-bottom: 8px;
}
.auth-step-bar-active {
  width: 33.33%;
  height: 100%;
  background: #fbbf24;
  transition: width 0.2s ease-out;
}

.auth-step-labels {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #9ca3af;
}

/* 找回密码每一步视图 */
.auth-reset-views {
  margin-top: 4px;
}
.auth-reset-view {
  display: none;
}
.auth-reset-view.is-active {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* 小屏保护 */
@media (max-width: 480px) {
  .auth-card {
    width: 100%;
    border-radius: 18px;
    padding: 20px 18px 20px;
  }

  .auth-title {
    font-size: 22px;
  }
}


/* 顶部提示条（替代 alert） */
.auth-toast{
  display:none;
  margin: 26px 0 14px;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.35;
  border: 1px solid transparent;
}
.auth-toast.is-success{
  display:block;
  background: rgba(34,197,94,0.10);
  border-color: rgba(34,197,94,0.22);
  color:#065f46;
}
.auth-toast.is-error{
  display:block;
  background: rgba(239,68,68,0.10);
  border-color: rgba(239,68,68,0.22);
  color:#7f1d1d;
}
.auth-toast.is-info{
  display:block;
  background: rgba(59,130,246,0.10);
  border-color: rgba(59,130,246,0.22);
  color:#1e3a8a;
}

/* 卡片更大气一点（更松） */
.auth-card{
  padding: 28px 32px 30px; /* 比你原来更松 */
}
.auth-header{ margin-bottom: 20px; }
.auth-form{ gap: 18px; }
.auth-input-wrap{ height: 48px; border-radius: 16px; }
.auth-title{ font-size: 26px; }
.auth-subtitle{ font-size: 13px; }

/* 右侧眼睛按钮更大一点 */
.auth-icon-btn{
  font-size: 16px;
  padding: 6px 6px;
}

/* 字段错误态 */
.auth-input-wrap.is-error{
  border-color: rgba(239,68,68,0.55);
  background: rgba(239,68,68,0.06);
  box-shadow: 0 0 0 2px rgba(239,68,68,0.10);
}
.auth-help{
  font-size: 12px;
  margin-top: 6px;
}
.auth-help-error{
  color:#b91c1c;
}

/* 禁用按钮态更明确 */
.auth-btn:disabled,
.auth-mini-btn:disabled{
  opacity: .65;
  cursor: not-allowed;
}

/* 小屏再松一点 */
@media (max-width: 480px){
  .auth-card{ padding: 22px 18px 22px; }
}





/* =========================
   Gift modal（新用户赠券弹窗）
   关键：position: fixed + inset:0 + z-index > login
   ========================= */
.auth-gift-overlay{
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 12px;

  background: rgba(15, 23, 42, 0.22);
  backdrop-filter: blur(4px);

  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease-out;

  z-index: 1001; /* 必须大于 .auth-overlay 的 999 */
}

.auth-gift-overlay.is-active{
  opacity: 1;
  pointer-events: auto;
}

.auth-gift-card{
  width: 420px;
  max-width: 100%;
  background: #ffffff;
  border-radius: 24px;
  box-shadow:
    0 22px 55px rgba(15, 23, 42, 0.20),
    0 0 0 1px rgba(148, 163, 184, 0.35);
  padding: 22px 24px 20px;
  position: relative;
  color: #0f172a;
}

.auth-gift-badge{
  width: 56px;
  height: 56px;
  margin: 2px auto 10px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  background: rgba(251, 191, 36, 0.18);
}

.auth-gift-title{
  margin: 0 0 4px;
  text-align: center;
  font-size: 18px;
  font-weight: 800;
  color: #111827;
}

.auth-gift-sub{
  margin: 0 0 14px;
  text-align: center;
  font-size: 13px;
  color: #6b7280;
}

.auth-gift-box{
  background: #f9fafb;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 14px;
}

.auth-gift-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 0;
}

.auth-gift-row .k{
  font-size: 12px;
  color: #6b7280;
}

.auth-gift-row .v{
  font-size: 14px;
  font-weight: 800;
  color: #111827;
}

.auth-gift-row .code{
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-gift-row code{
  background: #ffffff;
  border: 1px solid #e5e7eb;
  padding: 6px 10px;
  border-radius: 12px;
  font-size: 12px;
}

/* Gift 弹窗里的按钮不要被你 reset 的 100px 宽度限制住 */
.auth-gift-actions{
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.auth-gift-actions .auth-btn{
  width: auto !important;
  height: auto !important;
  padding: 10px 16px !important;
}


/* =========================================================
   AUTH THEME PATCH — Deep Blue Nightglow (append at END)
   规则：
   - 主交互/按钮/选中：#1e3a8a / #2563eb / #60a5fa
   - 橙色 #ff5a1f 仅用于价格语义（登录无价格 => 不用）
========================================================= */
:root{
    --fm-primary: #2563eb;
    --fm-primary-deep: #1e3a8a;
    --fm-primary-glow: #60a5fa;
    --fm-primary-soft: rgba(37,99,235,.10);
}

/* Overlay 更“冷”一点 */
.auth-overlay{
    background: rgba(15, 23, 42, 0.18);
}

/* 卡片加一点蓝系光晕（很克制） */
.auth-card{
    box-shadow:
        0 22px 55px rgba(15, 23, 42, 0.18),
        0 0 0 1px rgba(148, 163, 184, 0.32);
}
.auth-card::before{
    content:"";
    position:absolute;
    inset:-40px -60px auto auto;
    width:260px;
    height:260px;
    background: radial-gradient(circle at 30% 30%, rgba(96,165,250,.18), transparent 62%);
    pointer-events:none;
}

/* 聚焦态统一夜光蓝 */
.auth-input-wrap:focus-within{
    border-color: rgba(37,99,235,.72);
    box-shadow: 0 0 0 4px rgba(96,165,250,.22);
    background:#fff;
}
.auth-icon-btn{ color: rgba(15,23,42,.45); }
.auth-input-wrap:focus-within .auth-icon-btn{ color: rgba(37,99,235,.85); }

/* ============ 主按钮（登录 / 注册 / 确认）=========== */
.auth-btn-primary-login,
.auth-btn-primary{
    background:
        linear-gradient(180deg, rgba(255,255,255,.18) 0%, rgba(255,255,255,0) 55%),
        linear-gradient(135deg, var(--fm-primary-deep) 0%, var(--fm-primary) 58%, #3b82f6 100%);
    color:#fff;
    border: 1px solid rgba(96,165,250,.30);
    box-shadow: 0 14px 28px rgba(37,99,235,.16), inset 0 1px 0 rgba(255,255,255,.16);
}
.auth-btn-primary-login:hover,
.auth-btn-primary:hover{
    filter: brightness(1.02);
}

/* 次按钮保持灰即可（你原来 OK） */
.auth-btn-secondary{
    background:#e5e7eb;
    color:#111827;
}

/* ============ 验证码按钮（原黄）=========== */
.auth-mini-btn{
    background: rgba(37,99,235,.10);
    color: var(--fm-primary-deep);
    border: 1px solid rgba(37,99,235,.18);
}
.auth-mini-btn:hover{
    background: rgba(37,99,235,.14);
    border-color: rgba(37,99,235,.28);
    filter: none;
}

/* 链接高亮：从橙改为主蓝（登录不涉及价格语义） */
.auth-link{ color:#111827; }
.auth-link-highlight{ color: var(--fm-primary); }

/* 步骤条：从黄改为蓝 */
.auth-step-bar-active{
    background: linear-gradient(90deg, var(--fm-primary) 0%, #3b82f6 100%);
}

/* Toast info 保持蓝系一致 */
.auth-toast.is-info{
    background: rgba(37,99,235,0.10);
    border-color: rgba(37,99,235,0.22);
    color: #1e3a8a;
}

/* ============ Gift modal 同步改色（原黄 badge）=========== */
.auth-gift-overlay{
    background: rgba(15, 23, 42, 0.26);
}
.auth-gift-badge{
    background: rgba(37,99,235,.14);
}
.auth-gift-title{ color:#0f172a; }

/* Gift 里的 code 小块：更贴蓝系 */
.auth-gift-row code{
    border-color: rgba(37,99,235,.18);
}

/* Gift 弹窗按钮沿用主按钮样式（但不受你 100px 限制） */
.auth-gift-actions .auth-btn-primary,
.auth-gift-actions .auth-btn-primary-login{
    background:
        linear-gradient(180deg, rgba(255,255,255,.18) 0%, rgba(255,255,255,0) 55%),
        linear-gradient(135deg, var(--fm-primary-deep) 0%, var(--fm-primary) 58%, #3b82f6 100%);
    color:#fff;
}
