/* ============================================================
   auth.css —— 登录 / 注册页专有样式（全屏品牌背景 + 悬浮卡）
   自包含，仅依赖 layout.css 提供的基础重置与字体。
   ============================================================ */

/* 单一背景：仅由 .auth-wrap 的渐变负责，body 透明避免叠加第二层 */
body { background: transparent; overflow-x: hidden; }

/* ---------- 全屏品牌背景（唯一背景层，铺满整个网页） ---------- */
/* 突破 layout.css 中 .container 的 max-width 与 .app-main 的 padding 约束 */
.auth-wrap {
  position: relative;
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  margin-top: -1.5rem;   /* 抵消 .app-main 的 padding-top */
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  overflow: hidden;
  background: radial-gradient(120% 120% at 0% 0%, #6366f1 0%, #4f46e5 45%, #7c3aed 100%);
}
.auth-wrap::before, .auth-wrap::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(80px); opacity: .4; pointer-events: none;
}
.auth-wrap::before { width: 360px; height: 360px; background: #c4b5fd; top: -120px; right: 30%; }
.auth-wrap::after  { width: 280px; height: 280px; background: #22d3ee; bottom: -120px; left: -60px; opacity: .28; }

/* 左侧宣传文案（融入背景，无卡片感） */
.auth-bg-copy {
  position: relative; z-index: 1;
  padding: 3rem 4rem; color: #fff;
}
.auth-bg-copy h2 {
  color: #fff; font-size: clamp(2rem, 4vw, 3.4rem); line-height: 1.2; letter-spacing: -.5px;
  margin: 0 0 1rem; text-shadow: 0 2px 20px rgba(0,0,0,.28);
}
.auth-bg-copy p { opacity: .92; font-size: 1.05rem; max-width: 440px; margin: 0; text-shadow: 0 1px 10px rgba(0,0,0,.22); }
.auth-bg-copy .bg-points { list-style: none; margin: 1.6rem 0 0; padding: 0; display: grid; gap: .9rem; }
.auth-bg-copy .bg-points li { display: flex; align-items: center; gap: .7rem; font-size: 1rem; opacity: .95; }
.auth-bg-copy .bg-points .chk {
  flex: none; width: 28px; height: 28px; border-radius: 9px; background: rgba(255,255,255,.16);
  display: inline-flex; align-items: center; justify-content: center; font-size: .9rem;
  border: 1px solid rgba(255,255,255,.28);
}

/* ---------- 悬浮卡（右栏） ---------- */
.auth-main { position: relative; z-index: 1; display: flex; justify-content: center; padding: 2rem 3rem; }
.auth-card {
  position: relative;
  width: 100%;
  max-width: 460px;
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 24px;
  box-shadow: 0 24px 50px -24px rgba(30,27,75,.4);
  padding: 2.6rem 2.6rem;
}
/* 卡片内返回首页（右上角圆形浮标） */
.auth-card .back-home {
  position: absolute; top: 1.1rem; right: 1.1rem;
  width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #f3f4ff; color: #4f46e5; font-size: 1.1rem; text-decoration: none;
  transition: background .15s, transform .15s;
}
.auth-card .back-home:hover { background: #e0e7ff; text-decoration: none; transform: translateY(-1px); }

.auth-head { margin-bottom: 1.6rem; }
.auth-head h1 { font-size: 1.7rem; letter-spacing: -.4px; margin: 0 0 .4rem; }
.auth-head p { color: #6b7280; font-size: .95rem; margin: 0; }

/* ---------- 表单控件 ---------- */
.mb-3 { margin-bottom: 1.1rem; }
.py-2 { padding-top: .5rem; padding-bottom: .5rem; }
.mt-3 { margin-top: 1rem; }
.mb-0 { margin-bottom: 0; }

.form-label { display: block; font-weight: 600; margin-bottom: .4rem; font-size: .88rem; color: #374151; }
.form-control {
  display: block; width: 100%; padding: .7rem .9rem; font-size: .95rem; line-height: 1.5; color: #111827;
  background: #fafbfc; border: 1.5px solid #e5e7eb; border-radius: 12px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.form-control::placeholder { color: #9ca3af; }
.form-control:focus {
  outline: none; background: #fff; border-color: #6366f1;
  box-shadow: 0 0 0 4px rgba(99,102,241,.15);
}
.form-text { font-size: .8rem; color: #6b7280; margin-top: .35rem; }
.form-check { display: flex; align-items: center; gap: .55rem; }
.form-check-input { width: 1.05rem; height: 1.05rem; accent-color: #6366f1; }
.form-check-label { font-size: .9rem; color: #4b5563; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .35rem; padding: .55rem 1.1rem;
  font-size: .92rem; font-weight: 600; border: 1px solid transparent; border-radius: 999px; cursor: pointer;
  line-height: 1.4; transition: transform .15s, box-shadow .2s, background .2s; text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-primary {
  background: linear-gradient(135deg, #6366f1, #7c3aed); color: #fff;
  box-shadow: 0 10px 24px -10px rgba(99,102,241,.7);
}
.btn-primary:hover { background: linear-gradient(135deg, #5457e6, #6d28d9); color: #fff; }
.btn-outline-secondary { background: #fff; color: #374151; border-color: #d1d5db; }
.btn-outline-secondary:hover { background: #f3f4f6; }
.btn-lg { padding: .8rem 1.5rem; font-size: 1rem; }
.btn-sm { padding: .38rem .8rem; font-size: .82rem; }
.w-100 { width: 100%; }

/* ---------- 提示 ---------- */
.alert { padding: .8rem 1rem; border-radius: 10px; margin-bottom: 1rem; border: 1px solid transparent; font-size: .9rem; }
.alert-danger { background: #fee2e2; color: #991b1b; border-color: #fecaca; }
.alert-warning { background: #fef3c7; color: #92400e; border-color: #fde68a; }
.text-center { text-align: center; }
.text-muted { color: #6b7280; }
.text-danger { color: #dc2626; }
.small { font-size: .875rem; }

/* ---------- 密码强度条 ---------- */
.pwd-meter { height: 6px; border-radius: 4px; background: #f3f4f6; margin-top: .5rem; overflow: hidden; }
.pwd-meter-bar { display: block; height: 100%; width: 0; background: #dc2626; transition: width .25s, background .25s; }
.pwd-meter.weak .pwd-meter-bar { width: 33%; background: #dc2626; }
.pwd-meter.medium .pwd-meter-bar { width: 66%; background: #d97706; }
.pwd-meter.strong .pwd-meter-bar { width: 100%; background: #16a34a; }
#pwdMeter-label { font-weight: 600; }
#pwdMeter-label.weak { color: #dc2626; }
#pwdMeter-label.medium { color: #d97706; }
#pwdMeter-label.strong { color: #16a34a; }

/* ---------- 移动端：隐藏左侧文案，仅留右侧悬浮卡 ---------- */
@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-bg-copy { display: none; }
  .auth-main { padding: 1.5rem 1.2rem; }
  .auth-card { padding: 2rem 1.5rem; border-radius: 20px; max-width: 440px; width: 100%; }
}
