/* ============================================================
   登录 / 注册 统一设计语言
   现代简洁 · 品牌一致（顺风局绿） · 响应式
   ============================================================ */

.auth-body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(1100px 560px at 88% -8%, rgba(34, 197, 94, .12), transparent 60%),
    radial-gradient(900px 520px at -5% 112%, rgba(14, 116, 144, .10), transparent 55%),
    #f6f8fb;
}

.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px 16px;
}

/* 主卡片：左侧品牌区 + 右侧表单 */
.auth-shell {
  width: min(940px, 100%);
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, .9);
  box-shadow: 0 30px 80px -28px rgba(15, 23, 42, .35);
  animation: authRise .5s cubic-bezier(.2, .7, .2, 1) both;
}

@keyframes authRise {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- 左侧品牌区 ---------- */
.auth-aside {
  position: relative;
  padding: 46px 42px;
  color: #fff;
  background: linear-gradient(155deg, #16a34a 0%, #0e7490 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
}
.auth-aside::before,
.auth-aside::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, .10);
}
.auth-aside::before { left: -50px; top: -50px; width: 170px; height: 170px; }
.auth-aside::after  { right: -70px; bottom: -70px; width: 240px; height: 240px; background: rgba(255, 255, 255, .12); }

.auth-brand { display: flex; align-items: center; gap: 12px; position: relative; z-index: 1; }
.brand-mark {
  width: 44px; height: 44px;
  border-radius: 12px;
  object-fit: contain;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 22px; color: #fff;
  background: rgba(255, 255, 255, .18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3);
}
.auth-brand b { font-size: 20px; letter-spacing: .5px; }

.auth-hero { position: relative; z-index: 1; margin-top: 42px; }
.auth-hero h2 { font-size: 30px; line-height: 1.35; font-weight: 800; margin-bottom: 14px; }
.auth-hero p { color: rgba(255, 255, 255, .85); font-size: 15px; line-height: 1.75; max-width: 320px; }

.auth-feats { list-style: none; padding: 0; margin: 30px 0 0; position: relative; z-index: 1; }
.auth-feats li {
  display: flex; align-items: center; gap: 11px;
  color: rgba(255, 255, 255, .92); font-size: 14px; margin-bottom: 15px;
}
.auth-feats li svg { flex: none; color: #fff; }

.auth-foot-note { position: relative; z-index: 1; font-size: 12px; color: rgba(255, 255, 255, .7); margin-top: 24px; }

/* ---------- 右侧表单区 ---------- */
.auth-panel {
  padding: 46px 46px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 22px; }
.auth-mobile-brand b { font-size: 18px; color: #0f172a; }

.auth-head h1 { font-size: 26px; font-weight: 800; color: #0f172a; margin-bottom: 6px; letter-spacing: .3px; }
.auth-head p { color: #64748b; font-size: 14px; margin-bottom: 26px; }

.field { margin-bottom: 18px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; color: #334155; margin-bottom: 8px; }

.control { position: relative; }
.field input {
  width: 100%;
  padding: 13px 14px;
  font-size: 15px;
  color: #0f172a;
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 11px;
  outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.field input::placeholder { color: #94a3b8; }
.field input:focus {
  border-color: #16a34a;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, .14);
}

/* 验证状态 */
.field.is-invalid input { border-color: #ef4444; background: #fff5f5; }
.field.is-invalid input:focus { box-shadow: 0 0 0 4px rgba(239, 68, 68, .14); }
.field.is-valid input { border-color: #16a34a; }

.field-msg { min-height: 18px; margin: 7px 2px 0; font-size: 12.5px; line-height: 1.4; color: #94a3b8; }
.field.is-invalid .field-msg { color: #ef4444; }
.field.is-valid .field-msg { color: #16a34a; }

.toggle-pwd {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  background: none; border: none; cursor: pointer; padding: 6px;
  color: #94a3b8; display: flex;
}
.toggle-pwd:hover { color: #475569; }
.field input.has-toggle { padding-right: 42px; }

.auth-row { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 22px; }
.auth-check { display: inline-flex; align-items: center; gap: 7px; font-size: 13.5px; color: #64748b; cursor: pointer; user-select: none; }
.auth-check input { width: 16px; height: 16px; accent-color: #16a34a; cursor: pointer; }
.auth-row a { font-size: 13.5px; color: #16a34a; text-decoration: none; font-weight: 600; }
.auth-row a:hover { text-decoration: underline; }

.btn-auth {
  width: 100%;
  padding: 14px 16px;
  font-size: 15.5px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border: none;
  border-radius: 11px;
  cursor: pointer;
  box-shadow: 0 10px 24px -8px rgba(22, 163, 74, .55);
  transition: transform .12s ease, box-shadow .18s ease, opacity .18s;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
}
.btn-auth:hover { transform: translateY(-1px); box-shadow: 0 16px 30px -10px rgba(22, 163, 74, .6); }
.btn-auth:active { transform: translateY(0); }
.btn-auth:disabled { opacity: .65; cursor: not-allowed; transform: none; box-shadow: none; }

/* 次级按钮：用于“重新发送验证码”等辅助操作，与品牌绿色调一致（幽灵/描边风格） */
.btn-auth-ghost {
  width: 100%;
  margin-top: 10px;
  padding: 12px 16px;
  font-size: 14.5px;
  font-weight: 600;
  color: #16a34a;
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  border-radius: 11px;
  cursor: pointer;
  transition: background .18s, border-color .18s, transform .12s ease, opacity .18s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-auth-ghost:hover { background: #dcfce7; border-color: #86efac; transform: translateY(-1px); }
.btn-auth-ghost:active { transform: translateY(0); }
.btn-auth-ghost:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* 关键：.btn-auth-ghost 设置了 display: inline-flex，会覆盖 HTML 的 hidden 属性（UA 默认 display:none），
   导致“重新发送验证码”按钮在页面初始加载时就显示。显式让 [hidden] 重新生效。 */
.btn-auth-ghost[hidden] { display: none; }

.spinner {
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .45);
  border-top-color: #fff;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.form-tip { min-height: 20px; text-align: center; font-size: 13.5px; color: #ef4444; margin-top: 14px; }
.form-tip.ok { color: #16a34a; }
.form-tip.err { color: #ef4444; }
.form-tip.warn { color: #b45309; }

.reset-card { border: 1px solid #e3ece7; border-radius: 12px; padding: 18px 18px; background: #f7fbf9; margin-bottom: 16px; }
.reset-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; font-size: 14px; color: #334155; }
.reset-row span { color: #64748b; }
.reset-row b { font-weight: 700; color: #0f2a1c; }
.reset-pwd { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: #0f7a4f; color: #fff; padding: 6px 12px; border-radius: 8px; font-size: 15px; letter-spacing: .5px; }
.reset-tip { font-size: 13px; color: #b45309; background: #fff7ed; border: 1px solid #fed7aa; border-radius: 10px; padding: 12px 14px; margin: 4px 0 18px; line-height: 1.6; }

.auth-switch { text-align: center; margin-top: 20px; font-size: 14px; color: #64748b; }
.auth-switch a { color: #16a34a; font-weight: 700; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }

.demo-tip { text-align: center; margin-top: 14px; font-size: 12.5px; color: #94a3b8; }

/* ---------- 响应式 ---------- */
@media (max-width: 820px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-aside { display: none; }
  .auth-panel { padding: 36px 26px 30px; }
  .auth-mobile-brand { display: flex; }
}
@media (max-width: 420px) {
  .auth-main { padding: 22px 12px; }
  .auth-panel { padding: 28px 18px 24px; }
  .auth-head h1 { font-size: 23px; }
  .auth-head p { margin-bottom: 20px; }
}
