/* 登录 / 注册页（templates/login.html，2026-11-01）。
   宽屏（> 860px）：左品牌面板 + 右表单，一张卡片居中；860 以下只剩表单卡片，满宽留 16px 边。
   body 是 `h-screen overflow-hidden`（base.html），所以这页自己滚：.auth-page 高 100dvh + overflow-y:auto，
   手机横屏 / 键盘弹出时表单还能滚到。没有图片资源，品牌面板是渐变。 */

.auth-page {
  height: 100vh;
  height: 100dvh;
  overflow-y: auto;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  box-sizing: border-box;
  background:
    radial-gradient(1200px 600px at 10% -10%, #eef3fb 0%, transparent 60%),
    radial-gradient(900px 500px at 110% 110%, #f6eef7 0%, transparent 55%),
    var(--bg-color, #fafafa);
}

.auth-shell {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 420px);
  background: #fff;
  border: 1px solid var(--border-color, #f0f0f0);
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(28, 28, 30, .04), 0 30px 60px -36px rgba(28, 28, 30, .35);
}

/* ---------- 品牌面板 ---------- */
.auth-brand {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 40px 40px 36px;
  color: #2a2f3a;
  background: linear-gradient(155deg, #e9f0fa 0%, #f3eefa 55%, #fbeff3 100%);
  min-width: 0;
}
.auth-brand-word { width: 132px; height: auto; user-select: none; }
.auth-brand-copy { margin-top: auto; }
.auth-brand-title {
  font-family: "Cabinet Grotesk", Satoshi, -apple-system, "PingFang SC", sans-serif;
  font-size: 30px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -.01em;
  margin: 0 0 12px;
}
.auth-brand-sub { font-size: 14px; line-height: 1.7; color: #5b6170; margin: 0; max-width: 34em; }
.auth-brand-points {
  list-style: none;
  margin: 0;
  padding: 18px 0 0;
  border-top: 1px solid rgba(42, 47, 58, .1);
  display: grid;
  gap: 8px;
  font-size: 13px;
  color: #4a5060;
}
.auth-brand-points li { display: flex; align-items: center; gap: 8px; }
.auth-brand-points li::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: #8aa4cf;
  flex-shrink: 0;
}

/* ---------- 表单卡片 ---------- */
.auth-card { padding: 40px 40px 32px; min-width: 0; }
.auth-card-head { margin-bottom: 22px; }
.auth-logo { width: 44px; height: 44px; border-radius: 14px; display: block; margin-bottom: 18px; }
.auth-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 4px;
  font-family: "Cabinet Grotesk", Satoshi, -apple-system, "PingFang SC", sans-serif;
}
.auth-sub { font-size: 13.5px; color: var(--text-muted, #8e8e93); margin: 0; }

.auth-error {
  margin: 0 0 16px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #fdf0f0;
  color: #b42318;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.auth-form { display: grid; gap: 14px; }
.auth-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.auth-field { display: grid; gap: 6px; min-width: 0; }
.auth-field > span { font-size: 12.5px; color: #3a3a3c; font-weight: 500; }
.auth-field > span em { font-style: normal; color: var(--text-muted, #8e8e93); font-weight: 400; margin-left: 4px; }
.auth-field small { font-size: 11.5px; color: var(--text-muted, #8e8e93); }
.auth-field input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 12px 14px;
  border: 1px solid #e6e6ea;
  border-radius: 12px;
  font-size: 16px;            /* < 16px 时 iOS Safari 聚焦会自动放大页面 */
  background: #fff;
  color: var(--text-main, #1c1c1e);
  transition: border-color .15s, box-shadow .15s;
}
.auth-field input::placeholder { color: #b8b8bf; }
.auth-field input:focus { outline: none; border-color: #a9b8d6; box-shadow: 0 0 0 3px #eaf0fa; }

.auth-submit {
  margin-top: 6px;
  width: 100%;
  padding: 13px 16px;
  border: 0;
  border-radius: 12px;
  background: #1c1c1e;
  color: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, transform .05s;
}
.auth-submit:hover { background: #3a3a3c; }
.auth-submit:active { transform: translateY(1px); }

.auth-switch { margin: 20px 0 0; font-size: 13px; color: var(--text-muted, #8e8e93); text-align: center; }
.auth-switch a { color: #3d5f9a; font-weight: 500; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

/* ---------- 窄屏：只留表单卡片（沿用 860 断点） ---------- */
@media (max-width: 860px) {
  .auth-shell { grid-template-columns: minmax(0, 1fr); width: min(460px, 100%); }
  .auth-brand { display: none; }
}
@media (max-width: 479px) {
  .auth-page { padding: 16px; place-items: start center; }
  .auth-shell { border-radius: 24px; }
  .auth-card { padding: 28px 20px 24px; }
  .auth-row { grid-template-columns: minmax(0, 1fr); }
}
