/* extracted from views/Login.vue */
.auth-page {
  --auth-ink: var(--ink);
  --auth-soft: var(--ink-soft);
  --auth-faint: var(--ink-faint);
  --auth-line: var(--border-soft);
  --auth-line-strong: var(--border-strong);
  --auth-card: var(--surface);
  --auth-field: var(--surface-veil);
  --auth-aside-ink: #f3f6ef;

  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(360px, 0.95fr) minmax(420px, 1.05fr);
  overflow: hidden;
  color: var(--auth-ink);
  background: var(--theme-bg);
}

/* ---------- 左侧品牌区 ---------- */
.auth-aside {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  gap: 28px;
  overflow: hidden;
  padding: clamp(34px, 4vw, 62px);
  color: var(--auth-aside-ink);
  background:
    radial-gradient(58% 42% at 84% 8%, color-mix(in srgb, var(--theme-primary) 52%, transparent), transparent 72%),
    radial-gradient(46% 40% at 4% 96%, color-mix(in srgb, var(--gold) 26%, transparent), transparent 74%),
    color-mix(in srgb, var(--theme-secondary) 92%, black 8%);
}

.auth-aside::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: -30% -20% auto -20%;
  height: 82%;
  background:
    linear-gradient(166deg, color-mix(in srgb, var(--theme-primary) 26%, transparent) 0%, transparent 64%),
    linear-gradient(14deg, color-mix(in srgb, var(--gold) 14%, transparent) 0%, transparent 56%);
  background-size: 140% 140%;
  animation:
    auth-drift 12s ease-in-out infinite alternate,
    auth-scan 8s linear infinite;
}

.auth-aside::after {
  content: '';
  position: absolute;
  z-index: -1;
  right: -14%;
  bottom: -22%;
  width: 62%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 46% 54% 61% 39%;
  box-shadow:
    0 0 0 40px rgba(255, 255, 255, 0.024),
    0 0 0 84px rgba(255, 255, 255, 0.016);
  animation: auth-morph 11s ease-in-out infinite alternate;
}

.auth-scene {
  position: absolute;
  z-index: -1;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.scene-sun {
  position: absolute;
  top: 9%;
  right: 9%;
  width: 118px;
  height: 118px;
  border-radius: 50%;
  background: rgba(233, 209, 139, 0.1);
  box-shadow:
    0 0 0 22px rgba(233, 209, 139, 0.035),
    0 0 54px rgba(233, 209, 139, 0.12);
  animation: scene-sun-breathe 8s ease-in-out infinite;
}

.scene-field {
  position: absolute;
  bottom: -10%;
  width: 72%;
  height: 31%;
  border: 1px solid rgba(223, 210, 151, 0.1);
  border-radius: 50%;
  background: repeating-linear-gradient(108deg, transparent 0 20px, rgba(223, 210, 151, 0.045) 21px 22px);
  transform: rotate(-7deg);
  animation: scene-field-drift 14s ease-in-out infinite alternate;
}

.field-one {
  left: -16%;
}

.field-two {
  right: -28%;
  bottom: -15%;
  transform: rotate(9deg) scale(0.9);
  animation-delay: -6s;
}

.scene-seed,
.scene-leaf {
  position: absolute;
  display: grid;
  place-items: center;
  color: rgba(239, 226, 174, 0.28);
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.12));
}

.scene-seed {
  font-size: 22px;
  animation: scene-seed-float 7s ease-in-out infinite;
}

.seed-one {
  top: 22%;
  right: 14%;
}

.seed-two {
  right: 6%;
  bottom: 31%;
  font-size: 17px;
  animation-delay: -2.4s;
}

.seed-three {
  left: 8%;
  bottom: 13%;
  font-size: 19px;
  animation-delay: -4.6s;
}

.scene-leaf {
  font-size: 18px;
  animation: scene-leaf-sway 9s ease-in-out infinite;
}

.leaf-one {
  top: 34%;
  left: 7%;
}

.leaf-two {
  top: 61%;
  right: 10%;
  font-size: 14px;
  animation-delay: -4s;
}

.aside-top {
  display: flex;
  align-items: center;
  gap: 13px;
  animation: auth-rise 0.6s var(--motion-ease) both;
}

.brand-mark {
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.1);
  font-size: 24px;
  animation: brand-pulse 3.6s ease-in-out infinite;
}

.brand-word {
  display: grid;
  gap: 3px;
}

.brand-word strong {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
}

.brand-word small {
  color: rgba(243, 246, 239, 0.58);
  font-size: 11px;
}

.aside-copy {
  margin-top: auto;
  animation: auth-rise 0.65s 0.08s var(--motion-ease) both;
}

.aside-copy h1 {
  margin: 0;
  max-width: 15em;
  font-family: var(--font-display);
  font-size: clamp(30px, 3.1vw, 46px);
  font-weight: 500;
  line-height: 1.24;
  letter-spacing: 0;
}

.aside-copy p {
  max-width: 34em;
  margin: 18px 0 0;
  color: rgba(243, 246, 239, 0.66);
  font-size: 14px;
  line-height: 1.85;
}

.aside-points {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.aside-points li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.055);
  animation: auth-rise 0.6s var(--motion-ease) both;
  transition:
    border-color var(--motion-base) ease,
    background var(--motion-base) ease;
}

.aside-points li:nth-child(1) {
  animation-delay: 0.14s;
}
.aside-points li:nth-child(2) {
  animation-delay: 0.2s;
}
.aside-points li:nth-child(3) {
  animation-delay: 0.26s;
}

.aside-points li:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.085);
}

.aside-points li > i {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.1);
  font-size: 18px;
  animation: icon-breathe 3.2s ease-in-out infinite;
}

.aside-points li:nth-child(2) > i {
  animation-delay: 0.8s;
}

.aside-points li:nth-child(3) > i {
  animation-delay: 1.6s;
}

.aside-points span {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.aside-points strong {
  font-size: 13px;
  font-weight: 700;
}

.aside-points small {
  color: rgba(243, 246, 239, 0.52);
  font-size: 11px;
  line-height: 1.5;
}

.aside-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: rgba(243, 246, 239, 0.4);
  font-size: 11px;
  letter-spacing: 0.06em;
}

/* ---------- 右侧表单区 ---------- */
.auth-main {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: clamp(26px, 4vw, 56px);
  background:
    radial-gradient(42% 34% at 92% 4%, color-mix(in srgb, var(--theme-primary) 12%, transparent), transparent 70%),
    var(--theme-bg);
  scrollbar-gutter: stable;
}

.auth-main::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: 10% 7%;
  border: 1px solid color-mix(in srgb, var(--theme-primary) 8%, transparent);
  border-radius: 32px;
  background: repeating-linear-gradient(
    135deg,
    transparent 0,
    transparent 28px,
    color-mix(in srgb, var(--theme-primary) 4%, transparent) 29px,
    transparent 30px
  );
  opacity: 0.72;
  animation: auth-grid-drift 16s linear infinite;
}

.auth-card {
  position: relative;
  overflow: hidden;
  width: min(100%, 428px);
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid var(--auth-line);
  border-radius: var(--radius-lg);
  background: var(--auth-card);
  box-shadow: var(--shadow-soft);
  animation: auth-card-in 0.62s var(--motion-ease) both;
}

.auth-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12%;
  width: 76%;
  height: 1px;
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--theme-primary) 58%, white), transparent);
  opacity: 0.72;
  animation: auth-card-glint 4.8s ease-in-out infinite;
}

.auth-card > * {
  position: relative;
  z-index: 1;
}

.mobile-brand {
  display: none;
  align-items: center;
  gap: 11px;
  margin-bottom: 22px;
  color: var(--auth-ink);
  font-size: 16px;
}

.mobile-brand .brand-mark {
  width: 40px;
  height: 40px;
  border-color: var(--auth-line-strong);
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 21px;
}

.mobile-brand-copy {
  display: grid;
  gap: 3px;
}

.mobile-brand-copy strong {
  font-size: 16px;
  line-height: 1.1;
}

.mobile-brand-copy small {
  color: var(--auth-soft);
  font-size: 10px;
  font-weight: 500;
}

.card-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 500;
  letter-spacing: 0;
}

.card-head p {
  margin: 9px 0 0;
  color: var(--auth-soft);
  font-size: 13px;
  line-height: 1.65;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin: 22px 0 20px;
  padding: 4px;
  border: 1px solid var(--auth-line);
  border-radius: var(--radius-md);
  background: var(--surface-muted);
}

.segmented button {
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: calc(var(--radius-md) - 5px);
  color: var(--auth-soft);
  background: transparent;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  transition:
    color var(--motion-fast) ease,
    background var(--motion-fast) ease;
}

.segmented button:hover:not(.active) {
  color: var(--auth-ink);
  background: var(--surface-veil);
}

.segmented button.active {
  color: #fff;
  background: var(--theme-gradient);
  background-size: 180% 180%;
  box-shadow: var(--shadow-glow);
  animation: auth-gradient-flow 6s ease-in-out infinite;
}

.auth-form {
  display: grid;
  gap: 16px;
}

.auth-form .form-row,
.auth-form > .remember,
.auth-form > .notice,
.auth-form > .submit {
  animation: auth-field-in 0.48s var(--motion-ease) both;
}

.auth-form .form-row:nth-child(2) {
  animation-delay: 0.06s;
}

.auth-form .form-row:nth-child(3) {
  animation-delay: 0.12s;
}

.form-row {
  display: grid;
  gap: 7px;
}

.form-row > label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--auth-ink);
  font-size: 12px;
  font-weight: 650;
}

.form-row > label b {
  padding: 2px 7px;
  border-radius: 99px;
  color: color-mix(in srgb, var(--gold) 72%, #3a2705);
  background: color-mix(in srgb, var(--gold) 22%, transparent);
  font-size: 10px;
  font-weight: 700;
}

.field {
  height: 50px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  border: 1px solid var(--auth-line);
  border-radius: var(--radius-md);
  background: transparent;
  transition:
    border-color var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease;
}

.field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  animation: field-focus 0.42s var(--motion-ease) both;
}

.field.invalid {
  border-color: #c2544a;
  box-shadow: 0 0 0 3px rgba(194, 84, 74, 0.14);
}

.field > i {
  flex: 0 0 auto;
  color: var(--auth-faint);
  font-size: 17px;
}

.field-ok {
  color: var(--accent) !important;
}

.field input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  color: var(--auth-ink);
  background: transparent !important;
  -webkit-appearance: none;
  appearance: none;
  font-size: 14px;
}

.field input::placeholder {
  color: var(--auth-faint);
}

.card-field {
  border-color: color-mix(in srgb, var(--gold) 38%, var(--auth-line));
  background: transparent;
  font-family: var(--font-mono);
  letter-spacing: 0.04em;
}

.ghost-icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  color: var(--auth-faint);
  background: transparent;
  cursor: pointer;
  transition:
    color var(--motion-fast) ease,
    background var(--motion-fast) ease;
}

.ghost-icon:hover {
  color: var(--auth-ink);
  background: var(--surface-muted);
}

.hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--auth-faint);
  font-size: 11px;
  line-height: 1.5;
}

.hint.warn {
  color: #b4713a;
}

.trial-claim {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 7px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 28%, var(--border-soft));
  border-radius: var(--radius-md);
  color: var(--auth-ink);
  text-align: left;
  background: color-mix(in srgb, var(--accent) 7%, var(--surface-veil));
  transition:
    background var(--motion-fast) ease,
    border-color var(--motion-fast) ease,
    transform var(--motion-fast) ease;
}

.trial-claim:hover:not(:disabled) {
  border-color: color-mix(in srgb, var(--accent) 52%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-veil));
  transform: translateY(-1px);
}

.trial-claim:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.trial-claim-icon {
  display: grid;
  width: 34px;
  height: 34px;
  flex: none;
  place-items: center;
  border-radius: var(--radius-sm);
  color: #fff;
  background: var(--accent);
  font-size: 17px;
}

.trial-claim-copy {
  min-width: 0;
  display: grid;
  flex: 1;
  gap: 2px;
}

.trial-claim-copy strong {
  font-size: 12px;
  font-weight: 650;
}

.trial-claim-copy small {
  color: var(--auth-soft);
  font-size: 10px;
  line-height: 1.35;
}

.trial-claim-arrow {
  flex: none;
  color: var(--accent);
  font-size: 15px;
}

.strength {
  display: flex;
  align-items: center;
  gap: 10px;
}

.strength .bars {
  display: grid;
  flex: 1;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
}

.strength .bars span {
  height: 3px;
  border-radius: 99px;
  background: var(--auth-line-strong);
  transition: background var(--motion-fast) ease;
}

.strength .bars span.on {
  background: var(--accent);
}

.strength small {
  color: var(--auth-soft);
  font-size: 11px;
}

.rules {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rules li {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--auth-faint);
  font-size: 11px;
  transition: color var(--motion-fast) ease;
}

.rules li.pass {
  color: var(--accent);
}

.remember {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--auth-soft);
  font-size: 12px;
  cursor: pointer;
  user-select: none;
}

.remember input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.remember .checkbox {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 1px solid var(--auth-line-strong);
  border-radius: 6px;
  color: transparent;
  background: var(--auth-field);
  font-size: 12px;
  transition: all var(--motion-fast) ease;
}

.remember input:checked + .checkbox {
  border-color: var(--accent);
  color: #fff;
  background: var(--accent);
}

.remember input:focus-visible + .checkbox {
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.form-aux {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.terms-consent{display:flex;align-items:center;flex-wrap:wrap;gap:6px;padding:2px 1px;line-height:18px}.terms-consent .remember{flex:none;line-height:18px}.terms-consent .remember>span:last-child{display:block;line-height:18px}.terms-link{display:inline-flex;align-items:center;min-height:18px;padding:0;border:0;color:var(--accent);background:transparent;font-size:12px;font-weight:700;line-height:18px;cursor:pointer}.terms-link:hover{text-decoration:underline;text-underline-offset:3px}
.terms-backdrop{position:fixed;inset:0;z-index:3000;display:grid;place-items:center;padding:24px;background:rgba(4,20,15,.62);backdrop-filter:blur(8px)}
.terms-dialog{width:min(720px,calc(100vw - 32px));max-height:min(760px,calc(100dvh - 32px));display:grid;grid-template-rows:auto minmax(0,1fr) auto;overflow:hidden;border:1px solid rgba(215,230,220,.9);border-radius:18px;color:#173b31;background:#fbfcfa;box-shadow:0 28px 80px rgba(2,20,15,.34)}
.terms-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding:22px 24px 18px;border-bottom:1px solid #e2ebe5;background:linear-gradient(135deg,#f4f8f4,#fbfcfa)}.terms-head span{color:#2d745d;font-size:9px;font-weight:800;letter-spacing:2px}.terms-head h2{margin:5px 0 3px;font-size:22px;letter-spacing:0}.terms-head p{margin:0;color:#7a8e86;font-size:10px}.terms-head button{width:34px;height:34px;display:grid;place-items:center;flex:none;border:1px solid #dce8e0;border-radius:9px;color:#61756d;background:#fff;font-size:18px;cursor:pointer}
.terms-body{overflow-y:auto;padding:20px 24px;scrollbar-width:thin}.terms-summary{margin:0 0 12px;padding:12px 14px;border-left:3px solid #2d745d;border-radius:0 9px 9px 0;color:#49655b;background:#eef5f0;font-size:12px;line-height:1.7}.terms-scroll-requirement{display:flex;align-items:center;gap:8px;margin:0 0 16px;padding:9px 12px;border:1px solid #e9d49b;border-radius:9px;color:#795716;background:#fff9e7;font-size:12px;line-height:1.55}.terms-scroll-requirement>i{flex:none;color:#aa7415;font-size:17px}.terms-risk-alert{display:flex;align-items:flex-start;gap:12px;margin:0 0 18px;padding:14px;border:1px solid #f1b9b4;border-radius:10px;color:#852d28;background:#fff2f0;box-shadow:inset 3px 0 #d94841}.terms-risk-alert>i{flex:none;margin-top:2px;color:#c83c35;font-size:21px}.terms-risk-alert strong{display:block;margin-bottom:5px;color:#a12823;font-size:14px}.terms-risk-alert p{margin:0;color:#7d3a35;font-size:12px;line-height:1.75}.terms-risk-alert b{color:#b4231c;font-weight:850}.terms-body article+article{margin-top:15px}.terms-body h3{margin:0 0 5px;font-size:14px}.terms-body article p,.terms-note{margin:0;color:#61756d;font-size:12px;line-height:1.75}.terms-risk-strong{color:#b12f28;font-weight:800}.terms-note{margin-top:18px!important;padding-top:14px;border-top:1px dashed #dbe6df;font-weight:650;color:#38594e}.terms-scroll-end-marker{display:flex;align-items:center;justify-content:center;gap:7px;margin-top:16px;padding:10px;border-radius:9px;color:#24654f;background:#edf6f1;font-size:12px;font-weight:750}
.terms-actions{display:grid;grid-template-columns:minmax(180px,1fr) minmax(210px,1.15fr) auto auto;align-items:end;gap:10px;padding:15px 24px;border-top:1px solid #e2ebe5;background:#f8faf8}.terms-gate-status{min-width:0;display:flex;align-items:center;gap:7px;color:#9a5a20;font-size:11px;font-weight:700;line-height:1.45}.terms-gate-status>i{flex:none;font-size:16px}.terms-gate-status.is-ready{color:#24654f}.terms-confirm-field{display:grid;gap:5px;color:#61756d;font-size:10px;font-weight:650}.terms-confirm-field b{color:#8b312b}.terms-confirm-field input{width:100%;height:40px;border:1px solid #cfddd4;border-radius:10px;outline:none;padding:0 11px;color:#173b31;background:#fff;font-size:12px;transition:border-color .18s ease,box-shadow .18s ease}.terms-confirm-field input:focus{border-color:#397b65;box-shadow:0 0 0 3px rgba(45,116,93,.12)}.terms-actions button{min-height:40px;padding:0 16px;border-radius:10px;font-size:12px;font-weight:700;cursor:pointer}.terms-cancel{border:1px solid #d7e2db;color:#61756d;background:#fff}.terms-confirm{min-width:138px;display:inline-flex;align-items:center;justify-content:center;gap:6px;border:1px solid #24654f;color:#fff;background:#24654f}.terms-confirm:disabled{border-color:#b8c3be;color:#f8faf9;background:#9eaaa4;box-shadow:none;cursor:not-allowed;opacity:.72}

.link-button,
.recovery-back,
.code-resend {
  border: 0;
  color: var(--accent);
  background: transparent;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.link-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 0;
}

.link-button:hover,
.recovery-back:hover,
.code-resend:hover:not(:disabled) {
  color: color-mix(in srgb, var(--accent) 78%, var(--auth-ink));
}

.recovery-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 22px;
  padding: 0;
}

.recovery-head {
  display: flex;
  align-items: center;
  gap: 14px;
}

.recovery-mark {
  width: 44px;
  height: 44px;
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent) 24%, var(--auth-line));
  border-radius: var(--radius-md);
  color: var(--accent);
  background: var(--accent-soft);
  font-size: 21px;
}

.recovery-head h2 {
  font-size: 27px;
}

.recovery-form {
  margin-top: 22px;
}

.recovery-note {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  margin: 0;
  padding: 12px 13px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, var(--auth-line));
  border-radius: var(--radius-sm);
  color: var(--auth-soft);
  background: color-mix(in srgb, var(--accent) 6%, var(--auth-field));
  font-size: 11px;
  line-height: 1.6;
}

.recovery-note i {
  margin-top: 1px;
  color: var(--accent);
  font-size: 16px;
}

.code-field input {
  font-family: var(--font-mono);
  font-size: 17px;
  letter-spacing: 0.12em;
}

.code-resend {
  flex: 0 0 auto;
  padding: 7px 0 7px 8px;
  white-space: nowrap;
}

.code-resend:disabled {
  color: var(--auth-faint);
  cursor: not-allowed;
}

.notice {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  font-size: 12px;
  line-height: 1.5;
  animation: auth-notice 0.28s var(--motion-ease) both;
}

.notice.error {
  color: #8f3730;
  background: rgba(194, 84, 74, 0.14);
}

.notice.success {
  color: color-mix(in srgb, var(--theme-primary) 82%, black);
  background: var(--accent-soft);
}

.notice.lock {
  color: #996a1f;
  background: color-mix(in srgb, var(--gold) 16%, transparent);
}

.submit {
  position: relative;
  overflow: hidden;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: var(--radius-md);
  color: #fff;
  background: var(--theme-gradient);
  background-size: 180% 180%;
  box-shadow: var(--shadow-glow);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform var(--motion-fast) ease,
    box-shadow var(--motion-fast) ease,
    opacity var(--motion-fast) ease;
  animation: auth-gradient-flow 7s ease-in-out infinite;
}

.submit::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 -42%;
  width: 32%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  transform: skewX(-18deg);
  transition: left 0.58s var(--motion-ease);
}

.submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lift);
}

.submit:hover:not(:disabled)::after {
  left: 116%;
}

.submit:disabled {
  cursor: not-allowed;
  opacity: 0.55;
  box-shadow: none;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 18px 0 0;
  color: var(--auth-faint);
  font-size: 11px;
}

.is-register .auth-aside::before {
  opacity: 0.86;
}

/* 深色主题下提升提示文字对比度 */
.dark .auth-page {
  --auth-card: color-mix(in srgb, white 8%, var(--theme-bg));
  --auth-field: color-mix(in srgb, white 4%, var(--theme-bg));
}

.dark .notice.error {
  color: #f0a9a1;
}

.dark .notice.success {
  color: color-mix(in srgb, var(--theme-primary) 40%, white);
}

.dark .notice.lock,
.dark .hint.warn {
  color: color-mix(in srgb, var(--gold) 62%, white);
}

.dark .form-row > label b {
  color: color-mix(in srgb, var(--gold) 58%, white);
}

@keyframes auth-rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes auth-card-in {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.99);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes auth-scan {
  from {
    background-position:
      0 0,
      0 0;
  }
  to {
    background-position:
      120px 60px,
      -80px 40px;
  }
}

@keyframes auth-grid-drift {
  from {
    background-position: 0 0;
    transform: translate3d(0, 0, 0);
  }
  to {
    background-position: 60px 60px;
    transform: translate3d(8px, -6px, 0);
  }
}

@keyframes brand-pulse {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
    box-shadow: 0 0 0 0 rgba(124, 224, 178, 0);
  }
  45% {
    transform: translateY(-2px) rotate(-3deg);
    box-shadow: 0 0 0 7px rgba(124, 224, 178, 0.06);
  }
  70% {
    transform: translateY(0) rotate(2deg);
  }
}

@keyframes icon-breathe {
  0%,
  100% {
    transform: scale(1);
    filter: brightness(1);
  }
  50% {
    transform: scale(1.08);
    filter: brightness(1.22);
  }
}

@keyframes auth-card-glint {
  0%,
  100% {
    transform: translateX(-18%);
    opacity: 0.25;
  }
  50% {
    transform: translateX(18%);
    opacity: 0.92;
  }
}

@keyframes auth-field-in {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes auth-gradient-flow {
  0%,
  100% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
}

@keyframes auth-notice {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes auth-drift {
  from {
    transform: translate3d(0, 0, 0) scale(1);
  }
  to {
    transform: translate3d(-14px, 20px, 0) scale(1.07);
  }
}

@keyframes auth-morph {
  from {
    border-radius: 46% 54% 61% 39%;
    transform: rotate(0deg);
  }
  to {
    border-radius: 58% 42% 43% 57%;
    transform: rotate(12deg);
  }
}

@keyframes scene-seed-float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-5deg);
    opacity: 0.42;
  }
  45% {
    transform: translate3d(5px, -13px, 0) rotate(8deg);
    opacity: 0.9;
  }
  72% {
    transform: translate3d(-3px, -6px, 0) rotate(2deg);
  }
}

@keyframes scene-leaf-sway {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-14deg);
    opacity: 0.35;
  }
  50% {
    transform: translate3d(10px, -8px, 0) rotate(15deg);
    opacity: 0.74;
  }
}

@keyframes scene-sun-breathe {
  0%,
  100% {
    transform: scale(0.94);
    opacity: 0.48;
  }
  50% {
    transform: scale(1.06);
    opacity: 0.88;
  }
}

@keyframes scene-field-drift {
  from {
    translate: -6px 0;
  }
  to {
    translate: 10px -7px;
  }
}

@keyframes field-focus {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 0%, transparent);
  }
  60% {
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--accent) 13%, transparent);
  }
  100% {
    box-shadow: 0 0 0 3px var(--accent-soft);
  }
}

@media (max-width: 1080px) {
  .auth-page {
    grid-template-columns: minmax(300px, 0.88fr) minmax(390px, 1.12fr);
  }

  .aside-points li {
    padding: 11px 13px;
  }
}

@media (max-width: 900px) {
  .auth-page {
    grid-template-columns: 1fr;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  .auth-aside {
    display: none;
  }

  .auth-main {
    align-items: flex-start;
    min-height: 100%;
    padding: max(22px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right))
      max(26px, env(safe-area-inset-bottom)) max(18px, env(safe-area-inset-left));
  }

  .auth-card {
    width: 100%;
    margin-block: auto;
    border-radius: var(--radius-lg);
  }

  .mobile-brand {
    display: flex;
  }

  .card-head h2 {
    font-size: 26px;
  }
}

@media (min-width: 901px) and (max-height: 760px) {
  .auth-main {
    align-items: flex-start;
  }

  .auth-card {
    margin-block: auto;
  }

  .card-head h2 {
    font-size: 26px;
  }

  .segmented {
    margin: 16px 0 14px;
  }

  .auth-form {
    gap: 13px;
  }

  .field,
  .submit {
    height: 46px;
  }

  .card-foot {
    margin-top: 12px;
  }
}

@media (max-width: 420px) {
  .auth-card {
    padding: 20px 18px;
  }

  .segmented button {
    font-size: 12px;
  }
}

@keyframes mobile-brand-sway {
  0%,
  100% {
    transform: translateY(0) rotate(0deg);
  }
  46% {
    transform: translateY(-3px) rotate(-4deg);
  }
  72% {
    transform: translateY(-1px) rotate(2deg);
  }
}

@keyframes auth-mobile-form-in {
  from {
    opacity: 0;
    transform: translateY(9px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reference centered authentication panel */
.auth-page,
.dark .auth-page {
  --auth-ink: var(--ink);
  --auth-soft: var(--ink-soft);
  --auth-faint: var(--ink-faint);
  --auth-line: var(--border-soft);
  --auth-line-strong: var(--border-strong);
  --auth-card: var(--surface);
  --auth-field: var(--surface-veil);

  width: min(900px, calc(100vw - 48px));
  height: min(640px, calc(100% - 48px));
  min-height: min(600px, calc(100% - 48px));
  margin: auto;
  position: relative;
  top: 50%;
  transform: translateY(-50%);
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.92fr);
  border-radius: 16px;
  background: #103b31;
  box-shadow:
    0 20px 54px rgba(2, 20, 15, 0.38),
    0 0 0 100vmax #103b31;
  clip-path: inset(-100vmax);
}

.auth-aside {
  gap: 26px;
  padding: 46px 48px 40px;
  border-radius: 16px 0 0 16px;
  background:
    radial-gradient(70% 58% at 28% 8%, rgba(219, 192, 116, 0.14), transparent 72%),
    radial-gradient(62% 48% at 2% 96%, color-mix(in srgb, var(--gold) 18%, transparent), transparent 74%),
    color-mix(in srgb, var(--theme-secondary) 92%, black 8%);
}

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 11px;
  font-size: 24px;
}

.aside-copy {
  margin-bottom: 4px;
}

.aside-copy h1 {
  font-size: 34px;
  line-height: 1.36;
}

.aside-copy p {
  margin-top: 18px;
  font-size: 13px;
  line-height: 1.8;
}

.aside-points {
  gap: 16px;
}

.aside-points li {
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 13px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.aside-points li:hover {
  border-color: transparent;
  background: transparent;
}

.aside-points li > i {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: color-mix(in srgb, var(--gold) 78%, white);
  background: rgba(255, 255, 255, 0.07);
  font-size: 16px;
}

.aside-points span {
  gap: 3px;
}

.aside-points strong {
  font-size: 13px;
}

.aside-points small {
  font-size: 11px;
  line-height: 1.5;
}

.aside-meta {
  gap: 16px;
  margin-top: 4px;
  font-size: 10px;
}

.auth-main {
  min-width: 0;
  align-items: flex-start;
  padding: 38px 34px 32px;
  border-radius: 0 16px 16px 0;
  background: #fbfaf7;
  scrollbar-gutter: auto;
}

.auth-main::before {
  display: none;
}

.auth-card {
  width: 100%;
  margin-block: auto;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: rgba(251, 250, 247, 0.82);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: none;
}

.auth-card::before {
  display: none;
}

.card-head h2 {
  font-size: 24px;
}

.card-head p {
  margin-top: 6px;
  font-size: 11px;
}

.segmented {
  margin: 16px 0 15px;
}

.segmented button {
  height: 34px;
  font-size: 12px;
}

.auth-form {
  gap: 13px;
}

.form-row {
  gap: 6px;
}

.field,
.submit {
  height: 44px;
}

/* Keep browser credential autofill consistent with the auth form palette. */
.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus,
.field input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--auth-ink) !important;
  caret-color: var(--auth-ink);
  -webkit-box-shadow: 0 0 0 1000px transparent inset !important;
  box-shadow: 0 0 0 1000px transparent inset !important;
  background-color: transparent !important;
  transition: background-color 9999s ease-out 0s;
}

.field input:autofill {
  color: var(--auth-ink);
  background: transparent !important;
}

.field {
  padding-inline: 12px;
}

.card-foot {
  margin-top: 12px;
  font-size: 9px;
}

@media (max-width: 760px) {
  .auth-page,
  .dark .auth-page {
    width: min(100%, 430px);
    height: auto;
    max-height: calc(100% - 20px);
    min-height: 0;
    grid-template-columns: 1fr;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--theme-primary) 18%, transparent);
    border-radius: 20px;
    box-shadow:
      0 22px 52px color-mix(in srgb, var(--theme-secondary) 30%, transparent),
      0 3px 12px color-mix(in srgb, var(--theme-secondary) 14%, transparent),
      0 0 0 100vmax var(--theme-bg);
    animation: mobile-auth-shell-in 0.48s var(--motion-ease) both;
  }

  .auth-aside {
    display: none;
  }

  .auth-main {
    min-height: 0;
    align-items: flex-start;
    padding: 0;
    border-radius: 18px;
    background: var(--theme-bg);
    overscroll-behavior: contain;
    scrollbar-width: none;
  }

  .auth-main::-webkit-scrollbar {
    display: none;
  }

  .auth-card {
    width: 100%;
    min-height: 0;
    margin-block: 0;
    padding: 0 24px 22px;
    overflow: visible;
    border-radius: 20px;
    background:
      linear-gradient(180deg, rgba(238, 246, 239, 0.5), transparent 112px),
      var(--surface);
  }

  .mobile-brand {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    display: flex;
    min-height: 88px;
    margin: 0 -24px 20px;
    padding: max(15px, env(safe-area-inset-top)) 24px 14px;
    border-bottom: 1px solid color-mix(in srgb, var(--gold) 20%, transparent);
    color: #f4f8f3;
    background:
      linear-gradient(118deg, color-mix(in srgb, var(--gold) 8%, transparent), transparent 42%),
      linear-gradient(135deg, color-mix(in srgb, var(--theme-secondary) 96%, black 4%), color-mix(in srgb, var(--theme-primary) 82%, var(--theme-secondary)) 66%, color-mix(in srgb, var(--theme-primary) 58%, var(--theme-secondary)));
    animation: auth-rise 0.5s var(--motion-ease) both;
  }

  .mobile-brand::before {
    content: '';
    position: absolute;
    z-index: -1;
    inset: 0 auto 0 -42%;
    width: 32%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.09), transparent);
    transform: skewX(-18deg);
    animation: mobile-brand-shimmer 6.5s ease-in-out infinite;
  }

  .mobile-brand::after {
    content: '';
    position: absolute;
    z-index: -1;
    right: -26px;
    bottom: -52px;
    width: 148px;
    height: 100px;
    border: 1px solid rgba(226, 215, 154, 0.12);
    border-radius: 50%;
    transform: rotate(-10deg);
  }

  .mobile-brand-glow {
    position: absolute;
    z-index: -1;
    top: 50%;
    left: 4px;
    width: 118px;
    height: 72px;
    border-radius: 50%;
    background: rgba(187, 223, 151, 0.12);
    filter: blur(18px);
    transform: translateY(-50%);
    animation: mobile-glow-drift 6s ease-in-out infinite alternate;
  }

  .mobile-brand .brand-mark {
    border-color: color-mix(in srgb, white 20%, transparent);
    color: color-mix(in srgb, var(--gold) 78%, white);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 20px color-mix(in srgb, var(--theme-secondary) 18%, transparent);
    animation: mobile-brand-sway 4.8s ease-in-out infinite;
  }

  .mobile-brand .brand-mark i {
    animation: mobile-sprout-breathe 3.2s ease-in-out infinite;
  }

  .mobile-brand-copy {
    position: relative;
    z-index: 2;
  }

  .mobile-brand-copy strong {
    font-size: 17px;
  }

  .mobile-brand-copy small {
    color: color-mix(in srgb, white 62%, var(--theme-primary));
    font-size: 10px;
  }

  .mobile-brand-scene {
    position: absolute;
    z-index: 1;
    right: 19px;
    bottom: 10px;
    width: 92px;
    height: 58px;
    color: rgba(226, 215, 154, 0.72);
    pointer-events: none;
  }

  .mobile-brand-scene::after {
    content: '';
    position: absolute;
    right: -4px;
    bottom: -13px;
    width: 100px;
    height: 28px;
    border-top: 1px solid rgba(209, 231, 190, 0.2);
    border-radius: 50%;
    background: rgba(203, 225, 180, 0.04);
  }

  .mobile-brand-scene i {
    position: absolute;
    display: block;
  }

  .mobile-scene-sun {
    top: 2px;
    right: 4px;
    color: rgba(238, 211, 127, 0.72);
    font-size: 15px;
    animation: mobile-sun-turn 12s linear infinite;
  }

  .mobile-scene-wheat {
    right: 28px;
    bottom: 3px;
    font-size: 35px;
    transform-origin: 50% 100%;
    animation: mobile-crop-sway 3.8s ease-in-out infinite alternate;
  }

  .mobile-scene-sprout {
    right: 3px;
    bottom: 1px;
    color: rgba(191, 229, 157, 0.72);
    font-size: 26px;
    transform-origin: 50% 100%;
    animation: mobile-crop-sway 3.2s 0.5s ease-in-out infinite alternate-reverse;
  }

  .card-head h2 {
    position: relative;
    width: fit-content;
  }

  .card-head h2::after {
    content: '';
    position: absolute;
    right: -17px;
    bottom: 3px;
    width: 10px;
    height: 3px;
    border-radius: 99px;
    background: var(--gold);
    animation: mobile-title-accent 2.8s ease-in-out infinite;
  }

  .auth-form {
    animation: auth-mobile-form-in 0.36s var(--motion-ease) both;
  }

  .segmented {
    overflow: hidden;
    border-color: color-mix(in srgb, var(--theme-primary) 22%, var(--border-soft));
    background: color-mix(in srgb, var(--theme-primary) 8%, var(--surface-muted));
    box-shadow: inset 0 1px 2px color-mix(in srgb, var(--theme-secondary) 8%, transparent);
  }

  .segmented button {
    transition:
      color var(--motion-fast) ease,
      background var(--motion-fast) ease,
      transform var(--motion-fast) ease,
      box-shadow var(--motion-fast) ease;
  }

  .segmented button.active {
    transform: scale(1.015);
    box-shadow:
      0 5px 13px rgba(20, 75, 58, 0.18),
      inset 0 1px rgba(255, 255, 255, 0.16);
  }

  .segmented button.active i {
    animation: icon-breathe 2.4s ease-in-out infinite;
  }

  .field {
    transition:
      border-color var(--motion-fast) ease,
      box-shadow var(--motion-fast) ease,
      transform var(--motion-fast) ease;
  }

  .field > i:first-child {
    transition:
      color var(--motion-fast) ease,
      transform var(--motion-fast) ease;
  }

  .field:focus-within {
    transform: translateY(-1px);
  }

  .field:focus-within > i:first-child {
    color: var(--accent);
    transform: scale(1.12);
  }

  .auth-form .form-row {
    animation: mobile-field-arrive 0.38s var(--motion-ease) both;
  }

  .auth-form .form-row:nth-child(2) {
    animation-delay: 0.045s;
  }

  .auth-form .form-row:nth-child(3) {
    animation-delay: 0.09s;
  }

  .auth-form .form-row:nth-child(4) {
    animation-delay: 0.135s;
  }

  .auth-form .form-row:nth-child(5) {
    animation-delay: 0.18s;
  }

  .remember input:checked + .checkbox i {
    animation: mobile-check-pop 0.28s var(--motion-ease) both;
  }

  .submit {
    box-shadow:
      0 9px 20px color-mix(in srgb, var(--theme-secondary) 20%, transparent),
      inset 0 1px rgba(255, 255, 255, 0.2);
  }

  .submit > i:last-child {
    transition: transform var(--motion-fast) ease;
  }

  .submit:hover:not(:disabled) > i:last-child,
  .submit:focus-visible:not(:disabled) > i:last-child {
    transform: translateX(3px);
  }

  .submit:active:not(:disabled) {
    transform: scale(0.985);
  }

  /* 注册项较多，保持正常控件尺寸并在表单区域自然滚动。 */
  .is-register.auth-page,
  .dark .is-register.auth-page {
    height: calc(100dvh - 16px);
    max-height: calc(100dvh - 16px);
  }

  .is-register .auth-main {
    overflow-y: auto;
    overscroll-behavior-y: contain;
  }

  .is-register .auth-card {
    padding-bottom: max(28px, env(safe-area-inset-bottom));
  }

  .is-register .card-head h2 {
    font-size: 26px;
  }

  .is-register .card-head p {
    margin-top: 8px;
    font-size: 12px;
    line-height: 1.6;
  }

  .is-register .segmented {
    margin: 20px 0 18px;
  }

  .is-register .segmented button {
    height: 38px;
    font-size: 13px;
  }

  .is-register .auth-form {
    gap: 18px;
  }

  .is-register .form-row {
    gap: 8px;
  }

  .is-register .field,
  .is-register .submit {
    height: 50px;
  }

  .is-register .field {
    padding-inline: 14px;
  }

  .is-register .terms-consent {
    line-height: 1.5;
  }

  .is-register .card-foot {
    margin-top: 18px;
    font-size: 10px;
  }

  .terms-backdrop{padding:8px}.terms-dialog{width:100%;max-height:calc(100dvh - 16px);border-radius:15px}.terms-head{padding:18px 17px 14px}.terms-head h2{font-size:19px}.terms-body{padding:16px 17px}.terms-risk-alert{gap:10px;padding:12px}.terms-actions{grid-template-columns:1fr 1fr;padding:12px 17px;gap:8px}.terms-gate-status,.terms-confirm-field{grid-column:1/-1}.terms-gate-status{min-height:26px}.terms-actions button{width:100%;padding-inline:10px}.terms-consent{align-items:center;flex-wrap:nowrap}
}

@keyframes mobile-glow-drift {
  from {
    transform: translate3d(-10px, -50%, 0) scale(0.9);
    opacity: 0.55;
  }
  to {
    transform: translate3d(58px, -50%, 0) scale(1.15);
    opacity: 1;
  }
}

@media (max-width: 420px) {
  .auth-page,
  .dark .auth-page {
    width: calc(100% - 16px);
    height: auto;
    max-height: calc(100% - 16px);
    min-height: 0;
  }

  .auth-main {
    padding: 0;
  }

  .auth-card {
    padding: 0 18px 18px;
  }

  .mobile-brand {
    margin-inline: -18px;
    padding-inline: 18px;
  }
}

@keyframes mobile-auth-shell-in {
  from {
    opacity: 0;
    transform: translateY(calc(-50% + 10px)) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(-50%) scale(1);
  }
}

@keyframes mobile-brand-shimmer {
  0%,
  52% {
    left: -42%;
    opacity: 0;
  }
  62% {
    opacity: 1;
  }
  78%,
  100% {
    left: 118%;
    opacity: 0;
  }
}

@keyframes mobile-sprout-breathe {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

@keyframes mobile-sun-turn {
  to {
    transform: rotate(360deg);
  }
}

@keyframes mobile-crop-sway {
  from {
    transform: rotate(-4deg);
  }
  to {
    transform: rotate(5deg);
  }
}

@keyframes mobile-title-accent {
  0%,
  100% {
    opacity: 0.5;
    transform: scaleX(0.75);
  }
  50% {
    opacity: 1;
    transform: scaleX(1);
  }
}

@keyframes mobile-field-arrive {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes mobile-check-pop {
  0% {
    opacity: 0;
    transform: scale(0.4);
  }
  70% {
    transform: scale(1.18);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-page *,
  .auth-page *::before,
  .auth-page *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
