/* 登录 / 注册 / 找回密码 / 我的账号 页面共用样式，配色和间距与首页一致。
 * 改了之后，把各页面里 account.css?v= 的版本号加 1（EO 会把 css 在节点上缓存 30 天）。 */
:root {
  color-scheme: light;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  color: #18202f;
  background: #fff;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  --blue: #2b59ec;
  --blue-dark: #2046c6;
  --blue-soft: #f1f5ff;
  --muted: #606a7a;
  --line: #e9edf4;
  --card: #f7f9fc;
  --input-line: #d5dae2;
  --danger: #b4371c;
  --danger-soft: #fff3ef;
  --success: #17703f;
  --success-soft: #edf9f1;
}

* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; background: #fff; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 6px; }
.container { width: min(1040px, calc(100% - 96px)); margin-inline: auto; }

/* 页头（与首页相同） */
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 37px; }
.brand { font-size: 24px; font-weight: 750; letter-spacing: -1px; }
.brand > span:first-child { font-size: 19px; font-weight: 600; margin-left: 5px; letter-spacing: 0; }
.brand-dot { color: var(--blue); margin-left: 2px; }
.header-nav { display: flex; align-items: center; gap: 20px; }
.site-domain { font-size: 13px; color: #717987; letter-spacing: .04em; }
.account-link { max-width: 12em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 7px 14px; border: 1px solid #d6e0fb; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--blue); }
.account-link:hover { background: var(--blue-soft); }

/* 表单卡片 */
.auth-main { flex: 1; display: flex; justify-content: center; padding: 48px 0 110px; }
.auth-card { width: min(440px, 100%); }
.auth-card h1 { margin: 0; font-size: 34px; line-height: 1.3; font-weight: 650; letter-spacing: -.04em; }
.auth-sub { margin: 10px 0 34px; color: var(--muted); font-size: 15px; line-height: 1.7; }

.field { display: grid; gap: 8px; margin-bottom: 18px; }
.field label { font-size: 14px; font-weight: 500; color: #2b3445; }
.field .hint { font-size: 12px; color: #8a92a0; }
.input { width: 100%; min-width: 0; height: 48px; padding: 0 14px; font: inherit; font-size: 15px; color: inherit; background: #fff; border: 1px solid var(--input-line); border-radius: 10px; transition: border-color .15s ease, box-shadow .15s ease; }
.input::placeholder { color: #a3aab6; }
.input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(43, 89, 236, .15); }
.input-row { display: flex; gap: 10px; }
.input-row .input { flex: 1; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 64px; }
.pw-toggle { position: absolute; top: 50%; right: 6px; transform: translateY(-50%); padding: 6px 10px; border: 0; background: none; font: inherit; font-size: 13px; color: var(--muted); cursor: pointer; border-radius: 8px; }
.pw-toggle:hover { color: var(--blue); background: var(--blue-soft); }

.btn { display: inline-flex; flex-shrink: 0; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 12px 20px; font: inherit; font-size: 14px; line-height: 1.4; font-weight: 500; border: 0; border-radius: 10px; cursor: pointer; transition: background-color .15s ease, border-color .15s ease; white-space: nowrap; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover:not(:disabled) { background: var(--blue-dark); }
.btn-outline { background: #fff; color: var(--blue); border: 1px solid #c9d5f8; }
.btn-outline:hover:not(:disabled) { background: var(--blue-soft); }
.btn-ghost { background: #fff; color: #4b5566; border: 1px solid var(--line); }
.btn-ghost:hover:not(:disabled) { border-color: #c5ccd8; }
.btn:disabled { opacity: .6; cursor: not-allowed; }
.btn-block { width: 100%; margin-top: 8px; }
.input-row .btn { min-width: 116px; }

.form-msg { margin: 0 0 18px; padding: 12px 14px; border-radius: 10px; font-size: 14px; line-height: 1.6; }
.form-msg:empty { display: none; }
.form-msg.is-error { background: var(--danger-soft); color: var(--danger); }
.form-msg.is-success { background: var(--success-soft); color: var(--success); }
.form-msg a { margin-left: 2px; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }

.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; margin-top: 26px; font-size: 14px; color: var(--muted); }
.auth-links a { color: var(--blue); font-weight: 500; }
.auth-links a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* 我的账号 */
.profile { margin: 0 0 40px; padding: 8px 24px; background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.profile div { display: flex; justify-content: space-between; gap: 16px; padding-block: 14px; border-bottom: 1px solid var(--line); font-size: 15px; }
.profile div:last-child { border-bottom: 0; }
.profile dt { color: var(--muted); }
.profile dd { margin: 0; font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.section-title { margin: 0 0 18px; font-size: 18px; font-weight: 600; }
.account-footer { margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--line); }
.loading { color: var(--muted); font-size: 15px; }

/* 页脚（与首页相同） */
.site-footer { border-top: 1px solid var(--line); padding-block: 26px 30px; display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: 12px; color: #737b89; }
.footer-brand { font-weight: 500; font-size: 13px; }
.footer-links { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 24px; }
.site-footer a { padding-block: 5px; }
.site-footer a:hover { color: var(--blue); }

@media (max-width: 760px) {
  .container { width: calc(100% - 48px); }
  .site-header { padding-block: 26px; }
  .auth-main { padding: 24px 0 80px; }
}
@media (max-width: 430px) {
  .container { width: calc(100% - 32px); }
  .site-domain { display: none; }
  .auth-card h1 { font-size: 30px; }
  .site-footer { flex-wrap: wrap; gap: 8px 20px; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
