/* =========================================================================
   前台 / 用户中心 登录页样式 (user/login.css)
   主题：浅色现代 SaaS  ·  品牌色 靛紫 #4f46e5  ·  左品牌 / 右表单 分栏
   复用既有 .login-* 类名（无需改动 login.php 结构）
   ========================================================================= */
@import url('user-base.css');

html { height: 100%; }
body.login-page-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  margin: 0;
  background: #f6f8fc;
  color: var(--text);
  font-family: var(--font);
}
.login-page-wrap {
  position: relative; display: flex; flex-direction: row; flex-wrap: wrap;
  align-items: stretch; flex: 1 0 auto; width: 100%; z-index: 1;
}
.login-bg-decor { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.login-bg-circle { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .35; }
.login-bg-circle-1 { width: 420px; height: 420px; background: #c7d2fe; top: -120px; left: -120px; }
.login-bg-circle-2 { width: 320px; height: 320px; background: #ddd6fe; bottom: -100px; right: -80px; }

/* ---------- 左侧品牌区 ---------- */
.login-hero {
  position: relative; flex: 0 0 58%; min-width: 0;
  display: flex; flex-direction: column; padding: 48px 56px; color: #fff;
  background: linear-gradient(140deg, #4338ca 0%, #4f46e5 45%, #6366f1 100%);
  overflow: hidden;
}
.login-hero-overlay {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(640px 420px at 85% 8%, rgba(129,140,248,.30), transparent 65%),
    radial-gradient(520px 400px at 8% 92%, rgba(79,70,229,.40), transparent 60%);
}
.login-hero-brand { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; margin-bottom: 36px; margin-left: -2%; }
.login-logo-img { height: 38px; width: auto; display: block; }
.login-logo-icon { width: 38px; height: 38px; flex: none; }
.login-site-title { font-size: 17px; font-weight: 700; letter-spacing: .5px; }
.login-site-subtitle { margin: 4px 0 0; font-size: 13px; color: var(--text-3); }
.forgot-site-subtitle { color: var(--text); font-weight: 500; }
.login-hero .login-site-subtitle { color: rgba(255,255,255,.85); margin-left: 48px; }

.login-hero-intro { position: relative; z-index: 1; margin-bottom: 26px; }
.login-hero-content { position: relative; z-index: 1; flex: 1; display: flex; flex-direction: column; justify-content: center; max-width: none; }
.register-hero .login-hero-content { justify-content: flex-start; }
.login-hero-title { margin: 0 0 12px; font-size: 34px; font-weight: 800; line-height: 1.25; color: #fff; background: linear-gradient(90deg, #ffffff 0%, #fef08a 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }

/* 注册页左侧装饰素材 */
.register-hero-visual { position: relative; flex: 1; width: 100%; margin-top: 28px; min-height: 240px; pointer-events: none; }

/* 忘记密码页：与注册页一致的左侧美化 */
.forgot-hero .login-hero-content { justify-content: flex-start; }
.forgot-hero-visual { position: relative; flex: 1; width: 100%; margin-top: 28px; min-height: 240px; pointer-events: none; }
.forgot-card-1 { left: 6%; top: 6%; animation-delay: 0s; }
.forgot-card-2 { right: 8%; top: 28%; animation-delay: 1.5s; }
.forgot-card-3 { left: 16%; bottom: 14%; animation-delay: 3s; }
@media (max-width: 1180px) {
  .forgot-card-1 { left: 2%; top: 4%; }
  .forgot-card-2 { right: 4%; top: 26%; }
  .forgot-card-3 { left: 8%; bottom: 10%; }
}
@media (max-width: 960px) { .forgot-hero-visual { display: none; } }

/* 忘记密码页：左侧说明与步骤层级 */
.login-hero-tips { position: relative; z-index: 1; margin-top: 18px; padding: 18px 20px; border-radius: 16px; background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(8px); }
.login-hero-tips h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 15px; font-weight: 700; color: #fff; }
.login-hero-tips h4 svg { flex: none; }
.login-hero-tips ul { margin: 0; padding-left: 18px; }
.login-hero-tips li { font-size: 13px; line-height: 1.75; color: rgba(255,255,255,.88); }
.login-hero-tips li + li { margin-top: 5px; }
.login-hero-steps { position: relative; z-index: 1; display: flex; align-items: center; gap: 10px; margin-top: 22px; }
.login-step { display: flex; align-items: center; gap: 8px; color: #fff; font-size: 14px; font-weight: 600; }
.login-step-num { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.25); font-size: 13px; font-weight: 700; }
.login-step-line { flex: 1; height: 2px; background: rgba(255,255,255,.18); border-radius: 2px; }
@media (max-width: 1180px) {
  .login-hero-tips { padding: 14px 16px; }
  .login-hero-tips h4 { font-size: 14px; }
  .login-hero-tips li { font-size: 12px; }
  .login-step { font-size: 13px; }
  .login-step-num { width: 24px; height: 24px; font-size: 12px; }
  .login-step-line { min-width: 16px; }
}
@media (max-width: 960px) { .login-hero-tips, .login-hero-steps { display: none; } }
.hero-deco-ring { position: absolute; right: -60px; bottom: 10%; width: 320px; height: 320px; border: 1px solid rgba(255,255,255,.18); border-radius: 50%; animation: heroFloat 8s ease-in-out infinite; }
.hero-deco-ring::before { content: ''; position: absolute; inset: 36px; border: 1px solid rgba(255,255,255,.10); border-radius: 50%; }
.hero-deco-dots { position: absolute; left: 0; top: 10%; right: 0; bottom: 0; opacity: .35;
  background-image: radial-gradient(circle, rgba(255,255,255,.55) 1.2px, transparent 1.2px);
  background-size: 22px 22px; }
.hero-feature-card { position: absolute; display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); backdrop-filter: blur(10px);
  box-shadow: 0 18px 40px rgba(15,23,42,.18); color: #fff; animation: heroFloat 6s ease-in-out infinite; }
.hero-card-icon { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,255,255,.22), rgba(255,255,255,.06)); }
.hero-card-icon svg { width: 22px; height: 22px; }
.hero-card-text { display: flex; flex-direction: column; }
.hero-card-text strong { font-size: 15px; font-weight: 700; }
.hero-card-text span { font-size: 12px; color: rgba(255,255,255,.78); margin-top: 2px; }
.hero-card-1 { left: 1%; top: 8%; animation-delay: 0s; }
.hero-card-2 { right: 5%; top: 28%; animation-delay: 1.2s; }
.hero-card-3 { left: 7%; bottom: 18%; animation-delay: 2.4s; }
.hero-card-4 { right: 7%; bottom: 9%; animation-delay: 3.6s; }
.hero-card-5 { left: 30%; top: 40%; animation-delay: 1.8s; }
.hero-card-6 { right: 26%; top: 5%; animation-delay: 0.6s; }
.hero-card-7 { left: 44%; bottom: 12%; animation-delay: 3s; }
@keyframes heroFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}
@media (max-width: 1180px) {
  .hero-deco-ring { width: 240px; height: 240px; right: -40px; }
  .hero-card-1 { left: 0; top: 8%; }
  .hero-card-2 { right: 3%; top: 26%; }
  .hero-card-3 { left: 4%; bottom: 16%; }
  .hero-card-4 { right: 4%; bottom: 8%; }
  .hero-card-5 { left: 24%; top: 38%; }
  .hero-card-6 { right: 20%; top: 4%; }
  .hero-card-7 { left: 38%; bottom: 10%; }
}
@media (max-width: 960px) { .register-hero-visual { display: none; } }
.login-hero-sub { margin: 0; font-size: 14px; line-height: 1.6; color: rgba(255,255,255,.9); white-space: nowrap; text-align: right; }

/* 产品特性卡片 */
.login-hero-chart {
  position: relative; flex: 1; min-height: 280px; width: 100%; aspect-ratio: auto; background: rgba(255,255,255,.96);
  border-radius: 18px; overflow: hidden; box-shadow: 0 22px 50px rgba(20,16,60,.30); margin-bottom: 26px;
}
.login-hero-slides { position: absolute; inset: 0; }
.login-hero-slide { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .7s ease; }
.login-hero-slide.active { opacity: 1; }
.login-hero-dots { position: absolute; left: 0; right: 0; bottom: 12px; display: flex; justify-content: center; gap: 8px; z-index: 2; }
.login-hero-dots .dot { width: 8px; height: 8px; border-radius: 999px; background: rgba(15,23,42,.22); cursor: pointer; transition: all .25s ease; }
.login-hero-dots .dot.active { width: 22px; background: var(--brand); }

.login-hero-trust { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px 40px; }
.trust-item { display: inline-flex; align-items: center; gap: 9px; font-size: 30px; color: rgba(255,255,255,.92); }
.trust-item svg { flex: none; width: 36px; height: 36px; }

/* ---------- 右侧面板 ---------- */
.login-panel {
  position: relative; flex: 0 0 42%; min-width: 360px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 44px 32px; background: #fff; overflow: hidden;
}
.login-panel-deco { position: absolute; inset: 0; pointer-events: none;
  background-color: #f8fafc;
  background-image: url('../img/login-panel-bg.svg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat; }
.login-panel-inner { position: relative; z-index: 1; width: 100%; max-width: 404px; }
.login-logo-area { text-align: center; margin-bottom: 18px; }
.login-logo-title { margin: 0 0 6px; }
.login-logo-subtitle { margin: 0; }

.login-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.login-card-head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); margin-bottom: 18px; }
.login-card-head-icon { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 10px; background: linear-gradient(135deg, var(--brand), #6366f1); color: #fff; flex: none; }
.login-card-head-text { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; flex: 1; min-width: 0; }
.login-card-title { margin: 0; font-size: 18px; font-weight: 700; color: var(--text); }
.login-card-desc { margin: 0; font-size: 13px; color: var(--text-2); }

/* 忘记密码：三步进度指示器 */
.reset-steps { display: flex; align-items: center; gap: 6px; margin-bottom: 22px; }
.reset-step { display: flex; align-items: center; gap: 8px; }
.reset-step-dot { width: 26px; height: 26px; flex: none; display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--surface-2); border: 1.5px solid var(--line); color: var(--text-3); font-size: 13px; font-weight: 700; transition: all var(--t-base); }
.reset-step-label { font-size: 13px; font-weight: 600; color: var(--text-3); white-space: nowrap; }
.reset-step.is-active .reset-step-dot { background: linear-gradient(135deg, #6366f1, var(--brand)); border-color: transparent; color: #fff; box-shadow: 0 4px 12px rgba(79,70,229,.32); }
.reset-step.is-active .reset-step-label { color: var(--brand); }
.reset-step-line { flex: 1; min-width: 16px; height: 2px; border-radius: 2px; background: var(--line); }
.login-title { margin: 0 0 6px; font-size: 24px; font-weight: 800; }
.login-sub { margin: 0 0 22px; font-size: 14px; color: var(--text-3); }

/* 选项卡 */
.login-tabs { display: flex; gap: 4px; background: var(--surface-2); padding: 4px; border-radius: 12px; margin-bottom: 20px; }
.login-tab {
  flex: 1; text-align: center; padding: 9px 12px; border-radius: 9px; cursor: pointer;
  font-size: 14px; font-weight: 600; color: var(--text-2); transition: all var(--t-base);
}
.login-tab.active { background: #fff; color: var(--brand); box-shadow: var(--shadow-sm); }

/* 表单 */
.login-field { margin-bottom: 16px; }
.login-input {
  width: 100%; padding: 12px 14px; font-size: 14px; font-family: inherit; color: var(--text);
  background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  outline: none; transition: border-color var(--t-base), box-shadow var(--t-base);
}
.login-input:focus { border-color: var(--brand); box-shadow: var(--ring); }
.login-input::placeholder { color: var(--text-3); }
.login-pwd-wrap { position: relative; display: flex; align-items: center; }
.login-pwd-wrap .login-input { padding-right: 44px; }
.login-pwd-eye {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  width: 32px; height: 32px; border: none; background: transparent; border-radius: 9px;
  color: var(--text-3); cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: color var(--t-base), background var(--t-base);
}
.login-pwd-eye:hover { color: var(--brand); background: rgba(79,70,229,.08); }
.login-pwd-eye svg { display: block; width: 18px; height: 18px; }

.login-code-btn {
  flex: none; height: 40px; padding: 0 14px; border: 1px solid var(--line); background: var(--surface-2);
  border-radius: var(--radius-sm); color: var(--brand-700); font-weight: 600; font-size: 13px; cursor: pointer; white-space: nowrap;
}
.login-code-btn:disabled { opacity: .6; cursor: not-allowed; }
.login-code-btn:hover:not(:disabled) { background: var(--brand); color: #fff; border-color: var(--brand); }

.login-submit-btn {
  width: 100%; height: 46px; margin-top: 6px; border: none; border-radius: var(--radius-sm);
  font-size: 15px; font-weight: 700; cursor: pointer; color: #fff; display: flex; align-items: center; justify-content: center; gap: 8px;
  background: linear-gradient(135deg, #6366f1, var(--brand)); box-shadow: 0 6px 18px rgba(79,70,229,.32);
  transition: all var(--t-base);
}
.login-submit-btn:hover { transform: translateY(-1px); filter: brightness(1.06); }
.login-submit-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.login-submit-btn svg { width: 18px; height: 18px; }

.login-remember-row { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 4px; font-size: 13px; color: var(--text-2); }
.login-forgot-link { color: var(--brand); font-weight: 600; }
.login-forgot-link:hover { text-decoration: underline; }

.login-extra-links { margin-top: 14px; text-align: right; font-size: 13px; }
.login-extra-links a { color: var(--brand); font-weight: 600; }
.login-extra-links a:hover { text-decoration: underline; }

/* 注册页加宽容器 */
.register-panel-inner { max-width: 520px; }
/* 忘记密码页加宽容器 */
.forgot-panel-inner { max-width: 460px; }

/* 短信验证码：输入框与按钮同行 */
.login-input-flex { display: flex; gap: 10px; align-items: stretch; }
.login-input-flex .login-input { flex: 1; min-width: 0; }
.login-input-flex .login-code-btn { flex: none; align-self: stretch; height: auto; }

/* 注册协议勾选 */
.login-agreement { margin: 12px 0 6px; }
.login-agreement-label { display: flex; align-items: flex-start; gap: 8px; cursor: pointer; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.login-agreement-label input[type="checkbox"] { margin-top: 2px; flex: none; width: 16px; height: 16px; accent-color: var(--brand); cursor: pointer; }
.login-agreement-text a { color: var(--brand); font-weight: 600; }
.login-agreement-text a:hover { text-decoration: underline; }

/* 错误 / 成功提示 */
.login-error, .error-bar {
  display: flex; gap: 8px; align-items: flex-start; background: var(--red-bg); border: 1px solid #fecaca;
  color: var(--red-700); border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 16px; font-size: 13px; line-height: 1.6;
}
.login-success { background: var(--green-bg); border: 1px solid #bbf7d0; color: var(--green-700); border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 16px; font-size: 13px; }

/* 注册弹窗 */
.register-modal-foot { text-align: center; margin-top: 16px; font-size: 13px; color: var(--text-2); }
#regModalError { display: none; }
#regModalSuccess { display: none; }

/* 协议弹窗（页面内展示，不新开窗口） */
.agreement-modal { position: fixed; inset: 0; z-index: 1000; display: none; }
.agreement-modal.open { display: block; }
.agreement-modal-mask { position: absolute; inset: 0; background: rgba(15,23,42,.45); }
.agreement-modal-box { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(720px, 92vw); height: min(78vh, 640px); background: #fff; border-radius: 16px; overflow: hidden; box-shadow: 0 30px 80px rgba(15,23,42,.35); display: flex; flex-direction: column; }
.agreement-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 18px; border-bottom: 1px solid var(--line); font-weight: 700; color: var(--text); }
.agreement-modal-close { border: none; background: transparent; font-size: 24px; line-height: 1; cursor: pointer; color: var(--text-2); padding: 0 4px; }
.agreement-modal-close:hover { color: var(--text); }
.agreement-modal-frame { flex: 1; width: 100%; border: 0; background: #fff; }

/* 密码强度与确认 */
.pwd-strength { margin-top: 10px; }
.pwd-strength-bar { height: 6px; border-radius: 999px; background: var(--line-2); overflow: hidden; }
.pwd-strength-bar span { display: block; height: 100%; width: 0; border-radius: 999px; transition: width .25s ease, background .25s ease; }
.pwd-strength-text { font-size: 12px; margin-top: 5px; color: var(--text-3); }
.pwd-rules { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 16px; }
.pwd-rules li { position: relative; padding-left: 18px; font-size: 12px; color: var(--text-3); }
.pwd-rules li::before { content: '○'; position: absolute; left: 0; top: 0; }
.pwd-rules li.ok { color: var(--green-700); }
.pwd-rules li.ok::before { content: '✓'; }
.pwd-mismatch { margin-top: 8px; }



/* ---------- 响应式 ---------- */
@media (max-width: 1180px) { .login-hero { padding: 36px 40px; } .login-hero-title { font-size: 28px; } .login-hero-sub { font-size: 13px; } }
@media (max-width: 960px) {
  .login-hero { display: none; }
  .login-panel { flex: 0 0 100%; min-width: 0; padding: 36px 20px; }
}
