/* ===== 登录/注册 页样式 — 全平台兜底版 (2026-06-07 v2) ===== */

/* --- 容器 --- */
.auth-wrap {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 32px;
  max-width: 980px;
  margin: 50px auto 80px;
  padding: 0 20px;
  align-items: start;
}

/* --- 主卡片 --- */
.auth-card {
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e7eb;
  padding: 40px 44px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  min-width: 0;          /* 防止 grid 撑爆 */
}

.auth-card h1 {
  font-size: 28px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 6px;
}
.auth-sub {
  color: #6b7280;
  margin: 0 0 28px;
  font-size: 15px;
}

/* --- 表单行 --- */
.form-row { margin-bottom: 18px; min-width: 0; }
.form-row > label {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
}

/* --- 输入框全平台通用兜底 --- */
.form-row input,
.form-row select,
.form-row textarea {
  /* 关键 1:全类型覆盖(原 CSS 漏了 tel/number/checkbox) */
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;            /* grid/flex 撑爆防线 */
  height: 46px;
  padding: 0 14px;
  font-size: 15px;
  font-family: inherit;
  line-height: 1.4;
  color: #1f2937;
  background-color: #fff;
  border: 1.5px solid #d1d5db;
  border-radius: 8px;
  transition: border-color 0.12s, box-shadow 0.12s;
  /* 关键 2:干掉 iOS Safari 内阴影 */
  -webkit-box-shadow: none;
  box-shadow: none;
  outline: none;
}
.form-row input[type=checkbox] {
  width: auto;
  height: auto;
  min-width: 0;
  padding: 0;
  margin: 0 6px 0 0;
  border: none;
  vertical-align: middle;
}
.form-row input[type=password] {
  letter-spacing: 0.04em;
}
.form-row input:focus,
.form-row input:focus-visible {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
  outline: none;
}
/* 关键 3:Chrome/Edge/Safari 自动填色块 — 变白底白文字 */
.form-row input:-webkit-autofill,
.form-row input:-webkit-autofill:hover,
.form-row input:-webkit-autofill:focus {
  -webkit-text-fill-color: #1f2937;
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
  box-shadow: 0 0 0 1000px #fff inset;
  transition: background-color 5000s ease-in-out 0s;
}
/* 关键 4:防止 pattern 错误红框 */
.form-row input:invalid {
  box-shadow: none;
}
/* placeholder */
.form-row input::placeholder { color: #9ca3af; opacity: 1; }
.form-row input::-ms-clear,
.form-row input::-ms-reveal { display: none; }
/* 关键 5:disabled */
.form-row input:disabled {
  background: #f3f4f6;
  color: #9ca3af;
  cursor: not-allowed;
}

/* --- 额外行(记住我 + 忘记密码)--- */
.form-extra {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 14px;
  gap: 10px;
  flex-wrap: wrap;     /* 小屏自动换行,防错位 */
}
.remember {
  display: inline-flex;
  align-items: center;
  color: #4b5563;
  cursor: pointer;
  user-select: none;
  line-height: 1;
}
.remember input[type=checkbox] {
  margin-right: 6px;
  accent-color: #2563eb;
  cursor: pointer;
}
.forgot { color: #2563eb; text-decoration: none; }
.forgot:hover { text-decoration: underline; }

/* --- 提交按钮 --- */
.auth-submit {
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box;
  width: 100%;
  height: 50px;
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  font-family: inherit;
  margin-top: 12px;
  cursor: pointer;
  transition: background 0.12s, transform 0.05s;
}
.auth-submit:hover { background: #1d4ed8; }
.auth-submit:active { transform: scale(0.99); }
.auth-submit:disabled {
  background: #9ca3af;
  cursor: not-allowed;
  transform: none;
}

/* --- 错误条 --- */
.form-error {
  margin-top: 14px;
  padding: 10px 14px;
  background: #fee2e2;
  border: 1px solid #fecaca;
  color: #b91c1c;
  border-radius: 6px;
  font-size: 14px;
  word-break: break-word;     /* 错位长错信息不撑爆 */
}

/* --- 底部链接 --- */
.auth-foot {
  text-align: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px dashed #e5e7eb;
  font-size: 14px;
  color: #6b7280;
}
.auth-foot a { color: #2563eb; font-weight: 600; text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }

/* --- 右侧特色 --- */
.auth-side {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
  border-radius: 12px;
  padding: 36px 28px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
  position: sticky;     /* 滚动时跟住 */
  top: 24px;
}
.auth-side h3 { font-size: 22px; margin: 0 0 18px; font-weight: 700; }
.auth-side ul { list-style: none; padding: 0; margin: 0; }
.auth-side li {
  padding: 8px 0;
  font-size: 15px;
  opacity: 0.95;
  line-height: 1.5;
}

/* --- 响应式 --- */
@media (max-width: 860px) {
  .auth-wrap { grid-template-columns: 1fr; max-width: 560px; gap: 20px; margin: 30px auto 60px; }
  .auth-side { position: static; }
  .auth-card { padding: 32px 28px; }
}
@media (max-width: 480px) {
  .auth-wrap { padding: 0 14px; margin: 16px auto 40px; }
  .auth-card { padding: 26px 20px; border-radius: 10px; }
  .auth-card h1 { font-size: 24px; }
  .form-row input { height: 44px; font-size: 16px; }    /* iOS 不自动缩放 */
  .auth-submit { height: 48px; font-size: 16px; }
  .form-extra { font-size: 13px; }
}
