/* 登录、注册和找回密码共用玻璃层次，保留现有左右分栏与移动端布局。 */
body:has(.auth) {
  --auth-panel: #ffffff8f;
  --auth-form: #ffffff45;
  --auth-field: #ffffffa3;
  --auth-edge: #ffffffed;
  --auth-rule: #73a5b62b;
  --auth-highlight: #ffffffc7;
  --auth-shadow: #356d8514;
  --auth-glow: #a4dfe768;
  --auth-primary-end: #076e7c;
  min-height: 100vh;
  background-color: #edf5f9;
  background-image:
    radial-gradient(ellipse at 16% 26%, #b5ede47d, transparent 42%),
    radial-gradient(ellipse at 90% 62%, #b7dceb94, transparent 45%),
    radial-gradient(ellipse at 52% 0%, #ffffff, transparent 62%);
  background-attachment: fixed;
}
[data-theme=dark] body:has(.auth), body[data-theme=dark]:has(.auth) {
  --auth-panel: #18313cc2;
  --auth-form: #1b35414d;
  --auth-field: #132a369e;
  --auth-edge: #addde02e;
  --auth-rule: #8db5c32e;
  --auth-highlight: #b8e6ed1a;
  --auth-shadow: #03131c33;
  --auth-glow: #28747d45;
  --auth-primary-end: #99e3df;
  background-color: #10232d;
  background-image:
    radial-gradient(ellipse at 14% 28%, #2262646b, transparent 44%),
    radial-gradient(ellipse at 92% 65%, #2c536973, transparent 45%);
}
body:has(.auth) .public-header {
  background: var(--auth-form);
  border-bottom-color: var(--auth-edge);
  box-shadow: 0 1px 0 var(--auth-rule);
  -webkit-backdrop-filter: blur(22px) saturate(125%);
  backdrop-filter: blur(22px) saturate(125%);
}
body:has(.auth) .public-main { padding-top: 40px; }
.auth {
  position: relative;
  isolation: isolate;
  min-height: 616px;
  background: var(--auth-panel);
  border-color: var(--auth-edge);
  box-shadow: inset 0 1px 0 var(--auth-highlight), 0 24px 72px var(--auth-shadow), 0 2px 8px #3e839608;
  -webkit-backdrop-filter: blur(24px) saturate(125%);
  backdrop-filter: blur(24px) saturate(125%);
}
.auth-visual {
  position: relative;
  padding: 42px;
  border-right: 1px solid var(--auth-edge);
  background:
    radial-gradient(ellipse at 25% 10%, var(--auth-highlight), transparent 66%),
    radial-gradient(ellipse at 65% 65%, var(--auth-glow), transparent 68%);
}
.auth-visual .eyebrow { margin-bottom: 18px; }
.auth-visual .eyebrow::before { box-shadow: 0 0 0 5px var(--auth-glow); }
.auth-visual h2 { font-size: 32px; line-height: 1.6; letter-spacing: 1px; }
.auth-visual img {
  width: 100%;
  margin: 16px 0 22px;
  filter: drop-shadow(0 16px 24px var(--auth-shadow));
  animation: auth-float 9s ease-in-out infinite;
}
.auth-visual > p { font-size: 13px; line-height: 1.9; }
.auth-form {
  padding: 42px;
  background: var(--auth-form);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-form h1 { font-size: 30px; letter-spacing: .5px; margin-bottom: 10px; }
.auth-form > p { font-size: 13px; }
.auth-form form { gap: 20px; margin-top: 30px; }
.auth-form form > label { font-size: 13px; font-weight: 500; }
.auth-form input:not([type=checkbox]) {
  height: 50px;
  border-radius: 12px;
  border-color: var(--auth-rule);
  background: var(--auth-field);
  box-shadow: inset 0 1px 0 var(--auth-highlight), 0 2px 4px #30586b03;
  padding: 12px 15px;
  font-size: 14px;
  font-weight: 400;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.auth-form input::placeholder { color: var(--color-muted); opacity: .8; }
.auth-form input:not([type=checkbox]):hover { border-color: #80b9c2; }
.auth-form input:not([type=checkbox]):focus-visible {
  outline: none;
  border-color: var(--color-primary);
  background: var(--auth-panel);
  box-shadow: 0 0 0 3px var(--auth-glow), inset 0 1px 0 var(--auth-highlight);
}
.auth-password { position: relative; margin-top: 7px; }
.auth-password input { padding-right: 68px !important; }
.auth-password .btn {
  position: absolute;
  right: 7px;
  top: 7px;
  min-height: 36px;
  padding: 7px 12px;
  background: transparent;
  border: 0;
  color: var(--color-primary);
  box-shadow: none;
}
.auth-password .btn:hover { background: var(--auth-glow); }
.auth-form .check { font-size: 12px; font-weight: 400; color: var(--color-muted); }
.auth-form .check input { margin: 0; width: 16px; height: 16px; flex-shrink: 0; }
.auth-form .field-error:empty { display: none; }
.auth-form .btn { border-radius: 12px; }
.auth-form .btn.primary {
  min-height: 50px;
  margin-top: 4px;
  border: 1px solid #4a9ba733;
  background: linear-gradient(115deg, var(--color-primary), var(--auth-primary-end));
  box-shadow: inset 0 1px 0 #ffffff26, 0 7px 18px #087d8821;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease;
}
.auth-form .btn.primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.06);
  box-shadow: inset 0 1px 0 #ffffff40, 0 10px 24px #087d882c;
}
.auth-form .btn.primary:active { transform: translateY(1px); }
.auth-links { margin-top: -8px; }
.auth-links .btn {
  background: transparent;
  border: 0;
  padding: 4px 0;
  min-height: 34px;
  color: var(--color-muted);
}
.auth-links .btn:hover { color: var(--color-primary); }
@keyframes auth-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-7px); }
}
@media(max-width:1000px) {
  .auth-form, .auth-visual { padding: 30px; }
  .auth-visual h2 { font-size: 28px; }
}
@media(max-width:600px) {
  body:has(.auth) .public-main { padding-top: 24px; }
  .auth { min-height: 0; border-radius: 24px; }
  .auth-visual { display: none; }
  .auth-form { padding: 32px 24px; }
  .auth-form h1 { font-size: 28px; }
  .auth-form form { gap: 20px; }
  .auth-form .check { line-height: 1.8; }
}
@supports not ((backdrop-filter:blur(1px)) or (-webkit-backdrop-filter:blur(1px))) {
  .auth { background: var(--color-surface); }
}
