/* ========== 登录注册页面样式 ========== */

.auth-page {
  background: var(--bg);
  min-height: 100vh;
}

/* 顶部栏 */
.auth-topbar {
  background: var(--primary);
  padding: 12px 40px;
}
.back-home {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
}
.back-home .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--primary-dark);
}
.back-home span:last-child {
  font-size: 18px;
  font-weight: 600;
}

/* 主体 */
.auth-main {
  display: flex;
  min-height: calc(100vh - 60px);
}

/* 登录容器 */
.auth-container {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
}
.auth-card {
  width: 100%;
  max-width: 420px;
  padding: 40px;
}

/* 头部 */
.auth-header {
  text-align: center;
  margin-bottom: 32px;
}
.auth-header h2 {
  font-size: 26px;
  color: var(--primary-dark);
  margin-bottom: 8px;
}
.auth-header p {
  font-size: 14px;
  color: #888;
}

/* 表单 */
.auth-form .form-group {
  margin-bottom: 20px;
}
.auth-form label {
  display: block;
  font-size: 14px;
  color: var(--text);
  margin-bottom: 8px;
  font-weight: 500;
}
.auth-form .form-control {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  outline: none;
  transition: border .2s;
}
.auth-form .form-control:focus {
  border-color: var(--primary);
}
.required {
  font-size: 12px;
  color: #888;
  font-weight: normal;
}

/* 密码输入 */
.password-input {
  position: relative;
}
.password-input input {
  padding-right: 50px;
}
.toggle-password {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
}

/* 验证码输入 */
.verify-code-input {
  display: flex;
  gap: 10px;
}
.verify-code-input input {
  flex: 1;
}
.btn-code {
  padding: 0 16px;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  color: var(--primary);
  cursor: pointer;
  white-space: nowrap;
}
.btn-code:hover {
  background: var(--primary);
  color: #fff;
  border-color: var(--primary);
}
.btn-code:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 表单行 */
.form-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}
.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text2);
  cursor: pointer;
}
.checkbox-label input {
  width: 16px;
  height: 16px;
}
.forgot-link {
  font-size: 13px;
  color: var(--primary);
}

/* 协议 */
.agreement {
  margin-bottom: 24px;
}
.agreement a {
  color: var(--primary);
}

/* 按钮 */
.btn-block {
  width: 100%;
  padding: 14px;
  font-size: 16px;
  border-radius: 8px;
}

/* 分隔符 */
.auth-divider {
  text-align: center;
  margin: 24px 0;
  position: relative;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  position: absolute;
  top: 50%;
  width: 40%;
  height: 1px;
  background: var(--border);
}
.auth-divider::before { left: 0; }
.auth-divider::after { right: 0; }
.auth-divider span {
  font-size: 12px;
  color: #888;
  background: #fff;
  padding: 0 12px;
  position: relative;
}

/* 社交登录 */
.social-login {
  display: flex;
  gap: 12px;
}
.social-btn {
  flex: 1;
  padding: 10px;
  background: #fff;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
  transition: all .2s;
}
.social-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

/* 底部 */
.auth-footer {
  text-align: center;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.auth-footer p {
  font-size: 14px;
  color: #888;
}
.auth-footer a {
  color: var(--primary);
  font-weight: 600;
}

/* 右侧装饰 */
.auth-decoration {
  width: 45%;
  background: linear-gradient(135deg, #1a6b3c 0%, #0d3d22 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}
.decoration-content {
  color: #fff;
  text-align: center;
}
.decoration-content h3 {
  font-size: 32px;
  margin-bottom: 12px;
}
.decoration-content > p {
  font-size: 16px;
  color: #c8ecd4;
  margin-bottom: 40px;
}
.decoration-features {
  display: flex;
  justify-content: center;
  gap: 24px;
}
.feature-item {
  padding: 12px 20px;
  background: rgba(255,255,255,0.1);
  border-radius: 8px;
  font-size: 14px;
}
.decoration-benefits {
  text-align: left;
}
.benefit-item {
  padding: 14px 0;
  font-size: 16px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  gap: 12px;
}
.benefit-item:last-child {
  border-bottom: none;
}

/* 用户类型选择 */
.user-type-select {
  display: flex;
  gap: 12px;
}
.type-option {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 16px;
  border: 2px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all .2s;
}
.type-option input {
  display: none;
}
.type-option.active {
  border-color: var(--primary);
  background: var(--bg2);
}
.type-icon {
  font-size: 28px;
  margin-bottom: 8px;
}
.type-name {
  font-size: 14px;
  color: var(--text);
}

/* 响应式 */
@media(max-width: 900px) {
  .auth-decoration {
    display: none;
  }
  .auth-container {
    padding: 20px;
  }
}
@media(max-width: 480px) {
  .auth-card {
    padding: 24px 20px;
  }
  .social-login {
    flex-direction: column;
  }
  .user-type-select {
    flex-direction: column;
  }
}
