/* =========================
   auth.css（整文件替换版）
   ========================= */

/* 1) 全局变量 */
:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --text-main: #111827;
  --text-sub: #6b7280;
  --bg: #f6f7fb;
  --card: #ffffff;
  --border: #e5e7eb;
  --shadow: 0 18px 50px rgba(15, 23, 42, 0.10);
  --radius-lg: 18px;
  --radius-md: 12px;
}

/* 2) 重置 */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", sans-serif;
  background: radial-gradient(circle at 15% 0%, #eef2ff 0%, var(--bg) 40%, #ffffff 100%);
  color: var(--text-main);
}

/* 3) 页面布局 */
.auth-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
}

/* 左侧品牌区 */
.auth-aside {
  position: relative;
  padding: 44px 36px;
  color: #eef2ff;
  background:
    radial-gradient(circle at 20% 0%, rgba(99, 102, 241, 0.55) 0%, rgba(37, 99, 235, 0.35) 30%, rgba(2, 6, 23, 0.95) 78%),
    linear-gradient(135deg, #0b1220 0%, #111827 55%, #0b1220 100%);
  overflow: hidden;
}

.auth-aside::before {
  content: "";
  position: absolute;
  inset: -40%;
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.12), transparent 55%),
    radial-gradient(circle at 70% 70%, rgba(37,99,235,0.20), transparent 60%);
  transform: rotate(12deg);
  pointer-events: none;
}

.auth-aside-inner {
  position: relative;
  max-width: 520px;
  margin: 0 auto;
  padding-top: 26px;
}

.logo-circle {
  width: 54px;
  height: 54px;
  border-radius: 999px;
  background: radial-gradient(circle at 25% 0%, #bfdbfe 0%, #2563eb 45%, #1d4ed8 100%);
  box-shadow: 0 20px 60px rgba(37, 99, 235, 0.35);
  margin-bottom: 18px;
}

.brand-name {
  font-size: 22px;
  letter-spacing: 0.02em;
  font-weight: 800;
  margin-bottom: 8px;
  color: #f8fafc;
}

.brand-slogan {
  font-size: 13px;
  line-height: 1.8;
  color: rgba(226, 232, 240, 0.85);
  max-width: 420px;
  margin-bottom: 18px;
}

.brand-highlights {
  list-style: none;
  display: grid;
  gap: 10px;
  font-size: 13px;
  color: rgba(226, 232, 240, 0.90);
}

.aside-footer {
  position: absolute;
  left: 36px;
  right: 36px;
  bottom: 18px;
  font-size: 12px;
  color: rgba(226, 232, 240, 0.65);
}

/* 右侧表单区 */
.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 36px 18px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--card);
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 18px 18px 14px;
}

/* 4) Tabs */
.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  background: #f3f4f6;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 999px;
  padding: 6px;
  margin-bottom: 14px;
}

.auth-tab {
  border: none;
  background: transparent;
  padding: 10px 12px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 13px;
  color: #6b7280;
  transition: 0.18s ease;
}

.auth-tab.active {
  background: #ffffff;
  color: var(--text-main);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.10);
}

/* 5) 表单显示/隐藏 */
.auth-form { display: none; }
.auth-form.active { display: block; }

.auth-title {
  font-size: 18px;
  font-weight: 700;
  margin: 8px 2px 4px;
}

.auth-subtitle {
  font-size: 12px;
  color: var(--text-sub);
  margin: 0 2px 14px;
}

/* 6) 输入区 */
.auth-field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.auth-label {
  font-size: 12px;
  color: #374151;
}

.auth-field input {
  width: 100%;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(229, 231, 235, 0.95);
  background: #ffffff;
  outline: none;
  font-size: 13px;
  transition: 0.18s ease;
}

.auth-field input:focus {
  border-color: rgba(37, 99, 235, 0.65);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.password-wrapper {
  position: relative;
}

.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  background: #ffffff;
  cursor: pointer;
  font-size: 14px;
  color: #6b7280;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: 0.18s ease;
}

.toggle-password:hover {
  border-color: rgba(37, 99, 235, 0.35);
  color: var(--primary-dark);
}

/* 7) 额外行 */
.auth-extra-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 6px 2px 12px;
}

.checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #374151;
}

.checkbox input { accent-color: var(--primary); }

.checkbox-agree {
  margin: 10px 2px 12px;
  line-height: 1.6;
}

.link-muted {
  font-size: 12px;
  color: #6b7280;
  text-decoration: none;
}

.link-muted:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

.link-switch {
  color: var(--primary-dark);
  text-decoration: none;
}

.link-switch:hover { text-decoration: underline; }

/* 8) 提交按钮 */
.auth-submit {
  width: 100%;
  border: none;
  border-radius: 999px;
  padding: 11px 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  box-shadow: 0 16px 40px rgba(37, 99, 235, 0.30);
  transition: 0.18s ease;
}

.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 52px rgba(37, 99, 235, 0.38);
}

.auth-tip {
  margin: 12px 2px 0;
  font-size: 12px;
  color: var(--text-sub);
}

/* 9) 返回首页 */
.back-home-box {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(229, 231, 235, 0.75);
  display: flex;
  justify-content: center;
}

.back-home-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 14px;
  border-radius: 999px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  background: #ffffff;
  font-size: 12px;
  color: #374151;
  text-decoration: none;
  transition: 0.18s ease;
}

.back-home-btn:hover {
  border-color: rgba(37, 99, 235, 0.35);
  color: var(--primary-dark);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

/* 10) 响应式 */
@media (max-width: 980px) {
  .auth-page {
    grid-template-columns: 1fr;
  }

  .auth-aside {
    padding: 28px 18px 44px;
  }

  .aside-footer {
    position: static;
    margin-top: 18px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.12);
  }

  .auth-main {
    padding: 18px 14px 32px;
  }
}

@media (max-width: 420px) {
  .auth-card {
    padding: 16px 14px 12px;
  }

  .brand-name { font-size: 18px; }
}
