/* =========================================================================
   account.css —— account-* 账户体系（account system）
   -------------------------------------------------------------------------
   【P2 抽取产物】
   来源：login.html / register.html 原内联 <style> 中【跨页一致】的 account-* 规则
         （含 :root 的 --account-* 主题变量与 @keyframes account-*）。
   依赖：请在 css/common.css 之后加载。
   说明：页面独属样式（如 login/register 的 .account-login-* 与 .account-register-*）
         保留在各自页面内联 <style>，不在此文件。
   ========================================================================= */

/* =================== 基础组件（顶层） =================== */

:root {
  --account-blue: #078fc8;
  --account-blue-dark: #007db5;
  --account-ink: #071526;
  --account-muted: #68798a;
  --account-line: #d8e4eb;
  --account-soft: #f3f8fb;
  --account-ease: cubic-bezier(.16, 1, .3, 1);
}

body.account-page {
  min-height: 100dvh;
  margin: 0;
  color: var(--account-ink);
  background: #eef2f6;
  font-family: "Geist", "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.account-page button, body.account-page input {
  font: inherit;
}

body.account-page a, body.account-page button, body.account-page input {
  -webkit-tap-highlight-color: transparent;
}

.account-main {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(480px, .92fr);
  width: min(100%, 1920px);
  min-height: 100dvh;
  margin: 0 auto;
  background: #fff;
}

.account-visual {
  position: relative;
  min-height: 100dvh;
  overflow: hidden;
  color: #fff;
  background: #153c56;
}

.account-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(4, 20, 34, .05) 18%, rgba(4, 20, 34, .78) 100%);
}

.account-visual-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 52% center;
  transform: scale(1.015);
  animation: account-image-in .8s var(--account-ease) both;
}

.account-visual-inner {
  position: absolute;
  z-index: 1;
  right: clamp(28px, 7vw, 120px);
  bottom: clamp(30px, 7vw, 112px);
  left: clamp(28px, 7vw, 120px);
  max-width: 520px;
  animation: account-rise .7s .12s var(--account-ease) both;
}

.account-visual h2 {
  max-width: 11ch;
  margin: 0;
  color: #fff;
  font-size: clamp(42px, 4.2vw, 68px);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.03em;
}

.account-visual p {
  max-width: 34ch;
  margin: 16px 0 0;
  color: rgba(255, 255, 255, .82);
  font-size: 14px;
  line-height: 1.55;
}

.account-panel {
  display: grid;
  place-items: center;
  padding: clamp(42px, 7vw, 112px) clamp(28px, 7vw, 120px);
  background: #fff;
}

.account-form-wrap {
  width: min(100%, 480px);
  animation: account-rise .7s var(--account-ease) both;
}

.account-kicker {
  margin: 0 0 12px;
  color: var(--account-blue);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.account-form-wrap h1 {
  margin: 0;
  color: var(--account-ink);
  font-size: clamp(36px, 4vw, 58px);
  line-height: 1;
  letter-spacing: -.035em;
}

.account-intro {
  max-width: 41ch;
  margin: 15px 0 0;
  color: var(--account-muted);
  font-size: 14px;
  line-height: 1.65;
}

.account-form {
  display: grid;
  gap: 19px;
  margin-top: 34px;
}

.account-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.account-field label {
  color: #2e4860;
  font-size: 12px;
  font-weight: 750;
}

.account-field-shell {
  position: relative;
}

.account-field-shell>svg, .account-password-toggle svg, .account-submit svg {
  width: 17px;
  height: 17px;
}

.account-field-shell>svg, .account-password-toggle {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
}

.account-field-shell>svg {
  left: 15px;
  color: #7890a1;
  pointer-events: none;
}

.account-input {
  width: 100%;
  min-height: 52px;
  padding: 0 44px;
  border: 1px solid var(--account-line);
  border-radius: 8px;
  outline: 0;
  color: var(--account-ink);
  background: #fff;
  font-size: 14px;
  transition: border-color .2s var(--account-ease), box-shadow .2s var(--account-ease), background .2s var(--account-ease);
}

.account-input::placeholder {
  color: #9aabb8;
}

.account-input:hover {
  border-color: #abd5e4;
}

.account-input:focus {
  border-color: var(--account-blue);
  box-shadow: 0 0 0 3px rgba(7, 143, 200, .14);
  background: #fcfeff;
}

.account-password-toggle {
  right: 9px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  color: #7890a1;
  background: transparent;
  cursor: pointer;
}

.account-password-toggle:hover {
  color: var(--account-blue);
  background: #eef8fc;
}

.account-inline-link {
  color: var(--account-blue-dark);
  font-weight: 700;
  text-decoration: none;
}

.account-inline-link:hover {
  text-decoration: underline;
}

.account-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 56px;
  margin-top: 2px;
  padding: 0 18px;
  border: 1px solid var(--account-blue);
  border-radius: 8px;
  color: #fff;
  background: var(--account-blue);
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
  transition: background .2s var(--account-ease), border-color .2s var(--account-ease), box-shadow .2s var(--account-ease), transform .2s var(--account-ease);
}

.account-submit:hover {
  border-color: var(--account-blue-dark);
  background: var(--account-blue-dark);
  box-shadow: 0 12px 28px rgba(7, 143, 200, .22);
  transform: translateY(-2px);
}

.account-submit:active {
  transform: scale(.985);
}

.account-submit:disabled {
  cursor: wait;
  opacity: .78;
  transform: none;
  box-shadow: none;
}

.account-submit .account-spinner {
  display: none;
  animation: account-spin .8s linear infinite;
}

.account-submit .account-submit-success {
  display: none;
}

.account-submit.is-loading .account-spinner {
  display: block;
}

.account-submit.is-loading .account-submit-icon, .account-submit.is-success .account-submit-icon {
  display: none;
}

.account-submit.is-success .account-submit-success {
  display: block;
}

.account-submit.is-success {
  border-color: #2b9a7a;
  background: #2b9a7a;
}

.account-status {
  min-height: 18px;
  margin: -3px 0 0;
  color: #b13a50;
  font-size: 12px;
  line-height: 1.5;
}

.account-status.success {
  color: #277d68;
}

.account-switch {
  margin: 24px 0 0;
  color: #718294;
  font-size: 13px;
  text-align: center;
}

.account-safe {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e4edf2;
  color: #8293a1;
  font-size: 11px;
  line-height: 1.45;
  text-align: center;
}

.account-safe svg {
  width: 16px;
  height: 16px;
  color: #4aa985;
  flex: 0 0 auto;
}

/* =============== 响应式 / 容器内（account-* 组件） =============== */

/* ---- @keyframes account-rise ---- */
@keyframes account-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
/* ---- @keyframes account-image-in ---- */
@keyframes account-image-in {
  from {
    opacity: 0;
    transform: scale(1.045);
  }
  to {
    opacity: 1;
    transform: scale(1.015);
  }
}
/* ---- @keyframes account-spin ---- */
@keyframes account-spin {
  to {
    transform: rotate(360deg);
  }
}
/* ---- @media (max-width: 1024px) ---- */
@media (max-width: 1024px) {
  .account-main {
    display: flex;
    flex-direction: column;
    min-height: 0;
  }
  .account-panel {
    order: 1;
    min-height: auto;
    padding: 46px clamp(24px, 7vw, 80px) 60px;
  }
  .account-visual {
    order: 2;
    min-height: 420px;
  }
  .account-visual-inner {
    right: clamp(24px, 7vw, 80px);
    left: clamp(24px, 7vw, 80px);
    bottom: 42px;
  }
}
/* ---- @media (max-width: 540px) ---- */
@media (max-width: 540px) {
  .account-panel {
    padding: 38px 20px 48px;
  }
  .account-form-wrap h1 {
    font-size: 40px;
  }
  .account-visual {
    min-height: 360px;
  }
  .account-visual-inner {
    right: 22px;
    bottom: 26px;
    left: 22px;
  }
  .account-visual h2 {
    font-size: 43px;
  }
  .account-visual p {
    margin-top: 12px;
    font-size: 13px;
  }
  .account-safe {
    align-items: flex-start;
    text-align: left;
  }
}
/* ---- @media (prefers-reduced-motion: reduce) ---- */
@media (prefers-reduced-motion: reduce) {
  .account-page *, .account-page *::before, .account-page *::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}