/* =============================================
   AUTH PAGES V2 — Liquid Glass Edition
   统一认证页面视觉系统，采用 user 侧 liquid glass 风格
   ============================================= */

/* ────────────────────────────────────────────
   CSS 变量定义
   ──────────────────────────────────────────── */
:root {
  /* Liquid Glass 核心变量 */
  --auth-lg-bg: #edf3f8;
  --auth-lg-bg-2: #fbfdff;
  --auth-lg-ink: #101828;
  --auth-lg-muted: #667085;
  --auth-lg-line: rgba(255,255,255,.78);
  --auth-lg-line-dark: rgba(16,24,40,.11);
  --auth-lg-surface: rgba(255,255,255,.64);
  --auth-lg-surface-strong: rgba(255,255,255,.82);
  --auth-lg-highlight: rgba(255,255,255,.95);
  
  /* 阴影系统 */
  --auth-lg-shadow: 0 28px 80px rgba(16,24,40,.13), 0 7px 22px rgba(16,24,40,.07);
  --auth-lg-shadow-soft: 0 16px 46px rgba(16,24,40,.1), inset 0 1px 0 rgba(255,255,255,.86);
  --auth-lg-shadow-card: 0 32px 96px rgba(16,24,40,.14), 0 12px 32px rgba(16,24,40,.08);
  
  /* 模糊效果 */
  --auth-lg-blur: blur(42px) saturate(1.9);
  --auth-lg-blur-soft: blur(26px) saturate(1.65);
  --auth-lg-blur-light: blur(18px) saturate(1.4);
  
  /* 内嵌边缘光效 */
  --auth-lg-inset-edge:
    inset 2px -2px 1px -1px rgba(255,255,255,.92),
    inset -2px 2px 1px -1px rgba(255,255,255,.78),
    inset 0 0 0 1px rgba(255,255,255,.22),
    inset 0 -12px 22px rgba(255,255,255,.22),
    inset 0 10px 20px rgba(119,137,153,.1);
  
  /* 分栏专用 */
  --auth-brand-bg: #fbfaf8;
  --auth-stat-color: #78716c;
}

[data-theme="dark"] {
  --auth-lg-bg: #0f172a;
  --auth-lg-bg-2: #1e293b;
  --auth-lg-ink: #f1f5f9;
  --auth-lg-muted: #94a3b8;
  --auth-lg-line: rgba(255,255,255,.12);
  --auth-lg-line-dark: rgba(255,255,255,.08);
  --auth-lg-surface: rgba(30,41,59,.7);
  --auth-lg-surface-strong: rgba(30,41,59,.85);
  --auth-lg-highlight: rgba(51,65,85,.92);
  
  --auth-lg-shadow: 0 28px 80px rgba(0,0,0,.4), 0 7px 22px rgba(0,0,0,.25);
  --auth-lg-shadow-soft: 0 16px 46px rgba(0,0,0,.3), inset 0 1px 0 rgba(255,255,255,.05);
  --auth-lg-shadow-card: 0 32px 96px rgba(0,0,0,.45), 0 12px 32px rgba(0,0,0,.3);
  
  --auth-brand-bg: #18181b;
  --auth-stat-color: #a1a1aa;
}

/* ────────────────────────────────────────────
   全局重置和基础布局
   ──────────────────────────────────────────── */
.auth-wrap {
  min-height: 100vh;
  display: flex;
  position: relative;
  
  /* Liquid Glass 渐变背景 */
  background:
    radial-gradient(900px 560px at 12% -10%, rgba(255,255,255,.95), transparent 60%),
    radial-gradient(780px 560px at 92% 4%, rgba(var(--c-primary-rgb,107,170,184),.22), transparent 62%),
    radial-gradient(640px 540px at 82% 88%, rgba(147,197,253,.16), transparent 64%),
    linear-gradient(145deg, var(--auth-lg-bg-2), var(--auth-lg-bg) 52%, #f8fbff);
}

/* 背景装饰层 */
.auth-wrap::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    linear-gradient(115deg, rgba(255,255,255,.72), transparent 34%),
    linear-gradient(295deg, rgba(var(--c-primary-rgb,107,170,184),.1), transparent 48%),
    repeating-linear-gradient(90deg, rgba(255,255,255,.06) 0 1px, transparent 1px 80px);
}

/* 背景层（admin_bg_* 设置） */
.auth-bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ────────────────────────────────────────────
   居中布局（forgot/social_bind/admin/helper）
   ──────────────────────────────────────────── */
.auth-wrap.is-centered {
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.auth-wrap.is-centered .auth-right {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
}

/* ────────────────────────────────────────────
   分栏布局（user/login.php）
   ──────────────────────────────────────────── */
.auth-wrap.is-split {
  flex-direction: row;
}

.auth-brand {
  flex: 0 0 45%;
  background:
    radial-gradient(760px 520px at 8% 0%, rgba(255,255,255,.92), transparent 62%),
    radial-gradient(720px 520px at 96% 12%, rgba(var(--c-primary-rgb,107,170,184),.22), transparent 60%),
    radial-gradient(620px 520px at 72% 94%, rgba(196,181,253,.14), transparent 62%),
    linear-gradient(145deg, #fbfdff 0%, #edf4f9 48%, #f8fbff 100%);
  padding: 60px 50px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  position: relative;
  z-index: 1;
}

.auth-brand-logo img {
  max-height: 48px;
  display: block;
}

.auth-brand-title {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--auth-lg-ink);
}

.auth-brand-subtitle {
  font-size: 16px;
  line-height: 1.6;
  color: var(--auth-lg-muted);
}

.auth-stats {
  display: flex;
  gap: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(var(--c-primary-rgb,107,170,184),.2);
}

.auth-stat-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.auth-stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--auth-lg-ink);
  line-height: 1;
}

.auth-stat-value small {
  font-size: 16px;
  font-weight: 600;
  margin-left: 2px;
}

.auth-stat-label {
  font-size: 12px;
  color: var(--auth-stat-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-wrap.is-split .auth-right {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  position: relative;
  z-index: 1;
}

/* ────────────────────────────────────────────
   响应式：<900px 折叠分栏为单列
   ──────────────────────────────────────────── */
@media (max-width: 899px) {
  .auth-wrap.is-split {
    flex-direction: column;
  }

  .auth-brand {
    flex: 0 0 auto;
    padding: 20px;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    min-height: 80px;
  }

  .auth-brand-logo img {
    max-height: 32px;
  }

  .auth-brand-title {
    font-size: 20px;
  }

  .auth-brand-subtitle,
  .auth-stats {
    display: none;
  }

  .auth-wrap.is-split .auth-right {
    flex: 1;
    padding: 20px;
  }
}

/* ────────────────────────────────────────────
   表单卡片 — Liquid Glass 核心
   ──────────────────────────────────────────── */
.auth-card {
  position: relative;
  background:
    linear-gradient(145deg, rgba(255,255,255,.7), rgba(255,255,255,.26)),
    var(--auth-lg-surface);
  border: 1px solid var(--auth-lg-line);
  outline: 1px solid rgba(255,255,255,.34);
  outline-offset: -2px;
  border-radius: 22px;
  padding: 40px 36px;
  box-shadow: var(--auth-lg-shadow-card), var(--auth-lg-inset-edge);
  backdrop-filter: var(--auth-lg-blur);
  -webkit-backdrop-filter: var(--auth-lg-blur);
  width: 100%;
  max-width: 440px;
}

/* 顶部光晕 */
.auth-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,.68), transparent 34%);
  opacity: .82;
}

/* 内部光效 */
.auth-card::after {
  content: "";
  position: absolute;
  inset: 1px;
  pointer-events: none;
  border-radius: inherit;
  background:
    linear-gradient(150deg, rgba(255,255,255,.28), transparent 28%),
    radial-gradient(circle at 20% 0%, rgba(255,255,255,.36), transparent 24%),
    radial-gradient(circle at 100% 100%, rgba(var(--c-primary-rgb,107,170,184),.08), transparent 30%);
  mix-blend-mode: screen;
  opacity: .62;
}

.auth-card > * {
  position: relative;
  z-index: 1;
}

/* ────────────────────────────────────────────
   Logo 区域
   ──────────────────────────────────────────── */
.auth-logo {
  text-align: center;
  font-size: 24px;
  font-weight: 800;
  color: var(--auth-lg-ink);
  margin-bottom: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.auth-logo img {
  max-height: 36px;
  display: block;
}

.auth-logo span {
  color: var(--c-primary);
}

/* 管理员登录标题 */
.admin-login-title {
  font-size: 22px;
  font-weight: 800;
  text-align: center;
  color: var(--auth-lg-ink);
  margin-bottom: 6px;
}

.admin-login-subtitle {
  font-size: 13px;
  text-align: center;
  color: var(--auth-lg-muted);
  margin-bottom: 24px;
}

/* ────────────────────────────────────────────
   Tab 切换（登录/注册）— Liquid Glass 风格
   ──────────────────────────────────────────── */
.auth-tabs {
  position: relative;
  display: flex;
  background: rgba(255,255,255,.34);
  border: 1px solid rgba(255,255,255,.6);
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 24px;
}

.auth-tabs-slider {
  position: absolute;
  background:
    linear-gradient(145deg, rgba(255,255,255,.82), rgba(var(--c-primary-rgb,107,170,184),.12));
  border-radius: 11px;
  box-shadow: 
    0 8px 22px rgba(var(--c-primary-rgb,107,170,184),.14),
    inset 0 1px 0 rgba(255,255,255,.9);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              width 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  height: calc(100% - 8px);
  top: 4px;
  z-index: 0;
}

.auth-tab {
  flex: 1;
  padding: 10px 16px;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--auth-lg-muted);
  background: transparent;
  border: none;
  cursor: pointer;
  position: relative;
  z-index: 1;
  transition: color 0.2s;
  border-radius: 11px;
}

.auth-tab.active {
  color: var(--c-primary-h);
}

.auth-tab:hover:not(.active) {
  color: var(--auth-lg-ink);
}

/* ────────────────────────────────────────────
   表单字段 — Liquid Glass 风格
   ──────────────────────────────────────────── */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.auth-form-hidden {
  display: none;
}

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

.field label {
  font-size: 13px;
  font-weight: 600;
  color: var(--auth-lg-ink);
}

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 12px 14px;
  font-size: 14px;
  color: var(--auth-lg-ink);
  background: rgba(255,255,255,.58);
  border: 1px solid rgba(255,255,255,.76);
  border-radius: 10px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78), 0 6px 18px rgba(16,24,40,.045);
  backdrop-filter: var(--auth-lg-blur-soft);
  -webkit-backdrop-filter: var(--auth-lg-blur-soft);
  transition: border-color 0.15s, box-shadow 0.2s;
  outline: none;
  font-family: inherit;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(var(--c-primary-rgb,107,170,184),.46);
  box-shadow: 
    0 0 0 3px rgba(var(--c-primary-rgb,107,170,184),.16), 
    inset 0 1px 0 rgba(255,255,255,.82);
}

.field input::placeholder {
  color: var(--auth-lg-muted);
  opacity: 0.7;
}

/* ────────────────────────────────────────────
   按钮 — Liquid Glass 风格
   ──────────────────────────────────────────── */
.btn {
  width: 100%;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 700;
  color: var(--c-primary-h);
  background:
    linear-gradient(145deg, rgba(255,255,255,.72), rgba(var(--c-primary-rgb,107,170,184),.14));
  border: 1px solid rgba(255,255,255,.58);
  border-radius: 10px;
  cursor: pointer;
  box-shadow: 
    0 8px 26px rgba(var(--c-primary-rgb,107,170,184),.13), 
    var(--auth-lg-inset-edge);
  backdrop-filter: var(--auth-lg-blur-soft);
  -webkit-backdrop-filter: var(--auth-lg-blur-soft);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  text-decoration: none;
  display: inline-block;
  position: relative;
}

.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,.4), transparent 50%);
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.btn:hover:not(:disabled) {
  background:
    linear-gradient(145deg, rgba(255,255,255,.82), rgba(var(--c-primary-rgb,107,170,184),.24));
  border-color: rgba(var(--c-primary-rgb,107,170,184),.28);
  transform: translateY(-1px);
  box-shadow: 
    0 12px 32px rgba(var(--c-primary-rgb,107,170,184),.18), 
    var(--auth-lg-inset-edge);
}

.btn:hover:not(:disabled)::after {
  opacity: 1;
}

.btn:active:not(:disabled) {
  transform: translateY(0);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-ghost {
  background: rgba(255,255,255,.44);
  color: var(--auth-lg-ink);
  border: 1px solid rgba(255,255,255,.68);
}

.btn-ghost:hover:not(:disabled) {
  background: rgba(255,255,255,.62);
  border-color: rgba(var(--c-primary-rgb,107,170,184),.22);
}

.btn-accent {
  background: linear-gradient(135deg, 
    rgba(var(--c-primary-rgb,107,170,184),.92), 
    rgba(var(--c-primary-rgb,107,170,184),.78));
  color: #fff;
  border-color: rgba(var(--c-primary-rgb,107,170,184),.28);
}

.btn-accent:hover:not(:disabled) {
  background: linear-gradient(135deg, 
    rgba(var(--c-primary-rgb,107,170,184),1), 
    rgba(var(--c-primary-rgb,107,170,184),.88));
  transform: translateY(-1px);
}

/* ────────────────────────────────────────────
   底部链接
   ──────────────────────────────────────────── */
.auth-links {
  margin-top: 20px;
  text-align: center;
  font-size: 13px;
  color: var(--auth-lg-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}

.auth-links a {
  color: var(--c-primary);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.auth-links a:hover {
  color: var(--c-primary-h);
  text-decoration: underline;
}

.auth-links-sep {
  color: rgba(var(--c-primary-rgb,107,170,184),.3);
}

.auth-links-muted {
  color: var(--auth-lg-muted) !important;
  font-weight: 500 !important;
}

.auth-links-muted:hover {
  color: var(--auth-lg-ink) !important;
}

/* ────────────────────────────────────────────
   记住我复选框
   ──────────────────────────────────────────── */
.remember-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--auth-lg-muted);
  margin-top: -4px;
  margin-bottom: 4px;
}

.remember-wrap input[type="checkbox"] {
  appearance: auto;
  width: 16px;
  height: 16px;
  min-width: 16px;
  margin: 0;
  cursor: pointer;
}

/* ────────────────────────────────────────────
   注册流程 - 三步进度条
   ──────────────────────────────────────────── */
.auth-form-register {
  /* 注册表单特殊样式 */
}

.auth-steps {
  margin-bottom: 24px;
  position: relative;
}

.auth-step-rail {
  display: flex;
  justify-content: space-between;
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
  position: relative;
  z-index: 2;
}

.auth-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  flex: 1;
}

.auth-step-dot {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.44);
  border: 2px solid rgba(255,255,255,.68);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78), 0 4px 12px rgba(16,24,40,.06);
  backdrop-filter: var(--auth-lg-blur-soft);
  -webkit-backdrop-filter: var(--auth-lg-blur-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--auth-lg-muted);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-step.is-active .auth-step-dot {
  background: linear-gradient(135deg, 
    rgba(var(--c-primary-rgb,107,170,184),.92), 
    rgba(var(--c-primary-rgb,107,170,184),.78));
  border-color: rgba(var(--c-primary-rgb,107,170,184),.28);
  box-shadow: 
    0 8px 22px rgba(var(--c-primary-rgb,107,170,184),.28),
    inset 0 1px 0 rgba(255,255,255,.4);
  color: #fff;
}

.auth-step.is-done .auth-step-dot {
  background: rgba(var(--c-primary-rgb,107,170,184),.16);
  border-color: rgba(var(--c-primary-rgb,107,170,184),.36);
  color: var(--c-primary);
}

.auth-step-label {
  font-size: 12px;
  color: var(--auth-lg-muted);
  font-weight: 500;
}

.auth-step.is-active .auth-step-label {
  color: var(--auth-lg-ink);
  font-weight: 600;
}

.auth-step-track {
  position: absolute;
  top: 16px;
  left: 10%;
  right: 10%;
  height: 2px;
  background: rgba(var(--c-primary-rgb,107,170,184),.12);
  z-index: 1;
  border-radius: 1px;
}

.auth-step-track-fill {
  height: 100%;
  background: linear-gradient(90deg, 
    rgba(var(--c-primary-rgb,107,170,184),.92), 
    rgba(var(--c-primary-rgb,107,170,184),.78));
  transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  width: 0%;
  border-radius: 1px;
  box-shadow: 0 0 8px rgba(var(--c-primary-rgb,107,170,184),.3);
}

.auth-step-panel {
  display: none;
}

.auth-step-panel.is-active {
  display: block;
}

.auth-step-lead {
  font-size: 13px;
  color: var(--auth-lg-muted);
  margin-bottom: 16px;
  line-height: 1.6;
}

.auth-step-nav {
  display: flex;
  gap: 12px;
  margin-top: 20px;
}

.auth-step-nav .btn {
  width: auto;
  flex: 1;
}

/* ────────────────────────────────────────────
   Banner 提示条（邀请福利、注册赠送）
   ──────────────────────────────────────────── */
.auth-banner {
  padding: 14px 16px;
  border-radius: 12px;
  margin-bottom: 20px;
  font-size: 13px;
  line-height: 1.6;
  display: none;
  background: rgba(255,255,255,.48);
  border: 1px solid rgba(255,255,255,.72);
  backdrop-filter: var(--auth-lg-blur-light);
  -webkit-backdrop-filter: var(--auth-lg-blur-light);
  box-shadow: 0 8px 22px rgba(16,24,40,.06), inset 0 1px 0 rgba(255,255,255,.82);
}

.auth-banner[style*="display: block"],
.auth-banner[style*="display:block"] {
  display: block !important;
}

.auth-banner-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.auth-banner-success {
  background: linear-gradient(135deg, rgba(16,185,129,.14), rgba(16,185,129,.08));
  color: #065f46;
  border-color: rgba(16,185,129,.28);
}

[data-theme="dark"] .auth-banner-success {
  background: rgba(5, 150, 105, 0.15);
  color: #86efac;
  border-color: rgba(5, 150, 105, 0.3);
}

.auth-banner-info {
  background: linear-gradient(135deg, rgba(2,132,199,.14), rgba(2,132,199,.08));
  color: #075985;
  border-color: rgba(2,132,199,.28);
}

[data-theme="dark"] .auth-banner-info {
  background: rgba(2, 132, 199, 0.15);
  color: #7dd3fc;
  border-color: rgba(2, 132, 199, 0.3);
}

/* ────────────────────────────────────────────
   模态框（报错弹窗、服务协议）
   ──────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(225,235,244,.38);
  backdrop-filter: blur(28px) saturate(1.5);
  -webkit-backdrop-filter: blur(28px) saturate(1.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.modal-overlay.open {
  display: flex;
}

.modal-card {
  background:
    linear-gradient(145deg, rgba(255,255,255,.82), rgba(255,255,255,.68));
  border: 1px solid var(--auth-lg-line);
  outline: 1px solid rgba(255,255,255,.42);
  outline-offset: -2px;
  border-radius: 20px;
  box-shadow: var(--auth-lg-shadow-card), var(--auth-lg-inset-edge);
  backdrop-filter: var(--auth-lg-blur);
  -webkit-backdrop-filter: var(--auth-lg-blur);
  max-width: 500px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.modal-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255,255,255,.68), transparent 34%);
  opacity: .82;
}

.modal-card > * {
  position: relative;
  z-index: 1;
}

.modal-head {
  padding: 20px 24px;
  border-bottom: 1px solid rgba(var(--c-primary-rgb,107,170,184),.12);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 18px;
  font-weight: 700;
  color: var(--auth-lg-ink);
}

.modal-close {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: var(--auth-lg-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}

.modal-close:hover {
  background: rgba(var(--c-primary-rgb,107,170,184),.1);
  color: var(--auth-lg-ink);
}

.modal-body {
  padding: 24px;
  flex: 1;
  overflow-y: auto;
  color: var(--auth-lg-ink);
}

.modal-foot {
  padding: 16px 24px;
  border-top: 1px solid rgba(var(--c-primary-rgb,107,170,184),.12);
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.modal-foot .btn {
  width: auto;
  min-width: 100px;
}

/* 错误提示弹窗 */
.auth-alert-card {
  max-width: 420px;
}

.auth-alert-body {
  text-align: center;
  padding: 32px 24px;
}

.auth-alert-head-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.auth-alert-msg {
  font-size: 15px;
  line-height: 1.6;
  color: var(--auth-lg-ink);
}

/* 服务协议弹窗 */
.auth-tos-modal {
  max-width: 720px;
  max-height: 80vh;
}

.auth-tos-modal-body {
  padding: 0;
  overflow: hidden;
}

.auth-tos-modal-body iframe {
  width: 100%;
  height: 500px;
  border: none;
  display: block;
}

/* ────────────────────────────────────────────
   图标系统
   ──────────────────────────────────────────── */
.auth-icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  vertical-align: middle;
}

.auth-icon-back::before { content: "←"; font-size: 16px; }
.auth-icon-close::before { content: "✕"; font-size: 16px; }
.auth-icon-alert::before { content: "⚠"; font-size: 42px; }
.auth-icon-check::before { content: "✓"; font-size: 16px; }
.auth-icon-gift::before { content: "🎁"; font-size: 20px; }
.auth-icon-wallet::before { content: "💰"; font-size: 20px; }

/* ────────────────────────────────────────────
   服务协议字段
   ──────────────────────────────────────────── */
.auth-tos-field {
  margin: 16px 0;
}

.auth-tos-label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--auth-lg-muted);
  cursor: pointer;
}

.auth-tos-label input[type="checkbox"] {
  appearance: auto;
  width: 16px;
  height: 16px;
  min-width: 16px;
  margin-top: 2px;
  cursor: pointer;
}

.auth-tos-link {
  color: var(--c-primary);
  text-decoration: underline;
  cursor: pointer;
  transition: color 0.15s;
}

.auth-tos-link:hover {
  color: var(--c-primary-h);
}

/* ────────────────────────────────────────────
   内联表单组（验证码 + 发送按钮）
   ──────────────────────────────────────────── */
.auth-inline-group {
  display: flex;
  gap: 8px;
  align-items: center;
}

.auth-code-input {
  flex: 1;
  min-width: 0;
  letter-spacing: 0.12em;
  font-size: 15px;
  text-align: center;
}

.auth-code-btn {
  padding: 0 18px;
  height: 42px;
  border-radius: 8px;
  border: 1px solid rgba(255,255,255,.68);
  background: rgba(255,255,255,.54);
  color: var(--auth-lg-ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  backdrop-filter: var(--auth-lg-blur-soft);
  -webkit-backdrop-filter: var(--auth-lg-blur-soft);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78), 0 4px 12px rgba(16,24,40,.05);
}

.auth-code-btn:hover:not(:disabled) {
  background: rgba(255,255,255,.68);
  border-color: rgba(var(--c-primary-rgb,107,170,184),.22);
  transform: translateY(-1px);
}

.auth-code-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.auth-field-tip {
  font-size: 12px;
  color: var(--auth-lg-muted);
  margin-top: 6px;
  line-height: 1.5;
}

/* ────────────────────────────────────────────
   图形验证码
   ──────────────────────────────────────────── */
.auth-field-captcha {
  /* 特殊字段标记 */
}

.auth-captcha-input {
  width: 110px;
  text-align: center;
  letter-spacing: 0.1em;
  font-weight: 600;
}

.auth-captcha-img {
  height: 42px;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid rgba(255,255,255,.68);
  transition: opacity 0.15s, transform 0.15s;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 4px 12px rgba(16,24,40,.06);
}

.auth-captcha-img:hover {
  opacity: 0.8;
  transform: scale(1.02);
}

.auth-captcha-refresh {
  padding: 0 14px;
  height: 42px;
  border-radius: 6px;
  border: 1px solid rgba(255,255,255,.68);
  background: rgba(255,255,255,.54);
  color: var(--auth-lg-ink);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  backdrop-filter: var(--auth-lg-blur-soft);
  -webkit-backdrop-filter: var(--auth-lg-blur-soft);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.78), 0 4px 12px rgba(16,24,40,.05);
}

.auth-captcha-refresh:hover {
  background: rgba(255,255,255,.68);
  border-color: rgba(var(--c-primary-rgb,107,170,184),.22);
}

/* ────────────────────────────────────────────
   条件字段（邀请码 / 图形验证码 / 服务协议）
   默认隐藏，由 auth.js 按后台开关加 .is-visible 显示
   ──────────────────────────────────────────── */
.auth-field-invite:not(.is-visible),
.auth-field-captcha:not(.is-visible),
.auth-tos-field:not(.is-visible) {
  display: none;
}

.auth-field-hint {
  font-size: 12px;
  color: var(--auth-lg-muted);
  line-height: 1.5;
  margin-top: 4px;
}

/* ────────────────────────────────────────────
   帮助文本（forgot_password.php 用）
   ──────────────────────────────────────────── */
.auth-help-text {
  font-size: 13px;
  color: var(--auth-lg-muted);
  margin-bottom: 18px;
  line-height: 1.6;
}

/* ────────────────────────────────────────────
   进入工作台转场层
   ──────────────────────────────────────────── */
.auth-enter-shell {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(225,235,244,.38);
  backdrop-filter: blur(28px) saturate(1.5);
  -webkit-backdrop-filter: blur(28px) saturate(1.5);
}

.auth-enter-shell.active {
  display: flex;
}

.auth-enter-shell-inner {
  text-align: center;
  position: relative;
}

.auth-enter-orbit {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(var(--c-primary-rgb,107,170,184),.2);
  border-top-color: var(--c-primary);
  border-radius: 50%;
  animation: auth-enter-spin 0.8s linear infinite;
  margin: 0 auto 20px;
}

@keyframes auth-enter-spin {
  to { transform: rotate(360deg); }
}

.auth-enter-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--auth-lg-ink);
  margin-bottom: 8px;
}

.auth-enter-sub {
  font-size: 13px;
  color: var(--auth-lg-muted);
}

/* ────────────────────────────────────────────
   移动端优化（<600px）
   ──────────────────────────────────────────── */
@media (max-width: 599px) {
  .auth-card {
    padding: 28px 24px;
    border-radius: 18px;
  }

  /* 手机端隐藏顶部 logo */
  .auth-logo {
    display: none;
  }

  /* 管理员登录标题上移 */
  .admin-login-title {
    margin-top: 0;
  }

  .auth-tabs {
    font-size: 13px;
    border-radius: 12px;
  }

  .auth-tab {
    padding: 8px 12px;
    border-radius: 9px;
  }

  .field label {
    font-size: 12px;
  }

  .field input,
  .field select {
    padding: 10px 12px;
    font-size: 14px;
  }

  .btn {
    padding: 11px 16px;
    font-size: 14px;
  }

  .auth-step-rail {
    margin-bottom: 12px;
  }

  .auth-step-label {
    font-size: 11px;
  }

  .auth-step-dot {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }

  .auth-inline-group {
    flex-direction: column;
    align-items: stretch;
  }

  .auth-code-input,
  .auth-captcha-input {
    width: 100%;
  }

  .auth-code-btn,
  .auth-captcha-refresh {
    width: 100%;
  }

  .modal-card {
    max-width: 100%;
    border-radius: 16px 16px 0 0;
    max-height: 85vh;
  }

  .modal-head {
    padding: 16px 20px;
  }

  .modal-body {
    padding: 20px;
  }

  .modal-foot {
    padding: 12px 20px;
    flex-direction: column-reverse;
  }

  .modal-foot .btn {
    width: 100%;
  }
}

/* ────────────────────────────────────────────
   打印样式（隐藏背景和装饰）
   ──────────────────────────────────────────── */
@media print {
  .auth-bg-layer,
  .auth-brand,
  .auth-enter-shell {
    display: none !important;
  }

  .auth-wrap.is-split .auth-right {
    padding: 0;
  }

  .auth-card {
    box-shadow: none;
    border: 1px solid #ddd;
  }
}

/* ────────────────────────────────────────────
   减少动画（prefers-reduced-motion）
   ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .auth-enter-orbit {
    animation: none;
    border-top-color: rgba(var(--c-primary-rgb,107,170,184),.5);
  }
}
