/* 自定义登录页：左侧表单，右侧紫色渐变 + 毛玻璃卡片 */
:root {
  --ink: #111827;
  --muted: #6b7280;
  --line: #d1d5db;
  --primary: #4f46e5;
  --primary-hover: #4338ca;
  --link: #1d4ed8;
  --danger-bg: #fef2f2;
  --danger-line: #fecaca;
  --danger-ink: #b91c1c;
}

*, *::before, *::after { box-sizing: border-box; }

html, body { margin: 0; height: 100%; }

body {
  background: #ffffff;
  color: var(--ink);
  font-family: "Inter", ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[hidden] { display: none !important; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  min-height: 100vh;
  min-height: 100dvh;
}

/* ---------- 左侧 ---------- */
.left {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
  background: #ffffff;
}

.form-wrap { width: 100%; max-width: 460px; }

.brand { display: flex; justify-content: center; margin-bottom: 28px; }
.logo { width: 64px; height: 64px; border-radius: 16px; box-shadow: 0 10px 24px -8px rgba(67, 56, 202, .55); }

.heading { text-align: center; margin-bottom: 38px; }
h1 { margin: 0 0 12px; font-size: 26px; font-weight: 600; letter-spacing: -0.01em; }
.sub { margin: 0; font-size: 15px; color: var(--muted); }
.sub strong { color: var(--ink); font-weight: 600; }

.field { margin-bottom: 24px; }
.field > label { display: block; margin-bottom: 10px; font-size: 16px; font-weight: 500; }

.input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--ink);
  font: inherit;
  font-size: 16px;
  transition: border-color .15s, box-shadow .15s;
}
.input:hover { border-color: #b8bec8; }
.input:focus { outline: none; border-color: #6366f1; box-shadow: 0 0 0 4px rgba(99, 102, 241, .16); }
.input.has-btn { padding-right: 50px; }

.input-wrap { position: relative; }
.eye {
  position: absolute; top: 0; right: 0;
  width: 50px; height: 50px;
  display: grid; place-items: center;
  border: 0; background: none; color: #9ca3af; cursor: pointer;
  border-radius: 0 6px 6px 0;
}
.eye:hover { color: var(--ink); }
.eye:focus-visible { outline: 2px solid #6366f1; outline-offset: -4px; }
.eye svg { width: 20px; height: 20px; }
.eye .eye-closed { display: none; }
.eye[aria-pressed="true"] .eye-open { display: none; }
.eye[aria-pressed="true"] .eye-closed { display: block; }

.caps { margin: 8px 0 0; font-size: 13px; color: #b45309; }

.row {
  display: flex; align-items: center; justify-content: space-between;
  margin: 4px 0 32px;
}
.check { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; color: #374151; cursor: pointer; user-select: none; }
.check input { width: 16px; height: 16px; margin: 0; accent-color: var(--primary); cursor: pointer; }

.link-muted, .link {
  padding: 0; border: 0; background: none; font: inherit; cursor: pointer;
}
.link-muted { font-size: 15px; color: #4b5563; }
.link-muted:hover { color: var(--ink); }
.link { color: var(--link); font-size: 15px; }
.link:hover { text-decoration: underline; }

.tip {
  margin: -18px 0 24px; padding: 10px 12px;
  border-radius: 6px; background: #f3f4f6; color: #4b5563; font-size: 14px; line-height: 1.5;
}

.alert {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 0 0 22px; padding: 12px 14px;
  border: 1px solid var(--danger-line); border-radius: 6px;
  background: var(--danger-bg); color: var(--danger-ink);
  font-size: 14px; line-height: 1.5;
}
.alert svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }

.btn {
  position: relative;
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%; height: 56px;
  border: 1px solid var(--primary); border-radius: 6px;
  background: var(--primary); color: #ffffff;
  font: inherit; font-size: 17px; font-weight: 500;
  text-decoration: none; cursor: pointer;
  box-shadow: 0 1px 2px rgba(17, 24, 39, .06), 0 6px 16px -6px rgba(79, 70, 229, .55);
  transition: background-color .15s, box-shadow .15s, transform .05s;
}
.btn:hover { background: var(--primary-hover); border-color: var(--primary-hover); }
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: 3px solid rgba(99, 102, 241, .45); outline-offset: 2px; }
.btn .arrow { width: 20px; height: 20px; transition: transform .2s; }
.btn:hover .arrow { transform: translateX(3px); }
.btn .spinner { display: none; }
.btn.busy { cursor: progress; }
.btn.busy .arrow { display: none; }
.btn.busy .spinner { display: inline-block; }

.btn-outline { background: #ffffff; color: var(--primary); box-shadow: none; }
.btn-outline:hover { background: #eef2ff; border-color: var(--primary); }

.stack { display: grid; gap: 14px; }

.spinner {
  width: 18px; height: 18px;
  border: 2px solid rgba(255, 255, 255, .45); border-top-color: #ffffff; border-radius: 50%;
  animation: spin .7s linear infinite;
}
.spinner-dark { width: 26px; height: 26px; border-color: #e5e7eb; border-top-color: var(--primary); }

.view-loading { display: flex; justify-content: center; padding: 72px 0; }

.note { margin: 34px 0 0; font-size: 15px; line-height: 1.65; color: #374151; }
.note.center { text-align: center; }
.note a, .foot a { color: var(--link); text-decoration: none; }
.note a:hover, .foot a:hover { text-decoration: underline; }

.foot { margin: 40px 0 0; text-align: center; font-size: 14px; color: var(--muted); }

/* ---------- 右侧 ---------- */
.right {
  position: relative;
  display: flex;
  padding: clamp(32px, 7.5vh, 80px) clamp(32px, 5.2vw, 84px);
  background:
    radial-gradient(120% 80% at 85% 0%, rgba(255, 255, 255, .14), rgba(255, 255, 255, 0) 60%),
    radial-gradient(90% 70% at 0% 100%, rgba(67, 40, 220, .55), rgba(67, 40, 220, 0) 70%),
    linear-gradient(165deg, #8a7cf7 0%, #7563f3 45%, #5f45ea 100%);
  overflow: hidden;
}

.card {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 560px;
  border: 1.5px solid rgba(255, 255, 255, .5);
  border-radius: 44px;
  background: linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, .06));
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35);
  overflow: hidden;
}

.scene { flex: 1; min-height: 0; display: flex; align-items: flex-end; padding: 0 8px; }
.scene svg { display: block; width: 100%; height: 100%; max-height: 560px; overflow: visible; }

.caption { display: grid; padding: 4px 46px 0; }
.slide {
  grid-area: 1 / 1;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s ease, transform .3s ease;
}
/* 旧的一条先淡出，新的一条稍后再淡入，避免两行文字重叠 */
.slide.active { opacity: 1; transform: none; transition-duration: .45s; transition-delay: .3s; }
.slide h2 {
  margin: 0 0 12px; color: #ffffff;
  font-size: clamp(24px, 2.1vw, 32px); font-weight: 700; letter-spacing: -0.02em;
}
.slide p { margin: 0; color: rgba(255, 255, 255, .9); font-size: clamp(15px, 1.2vw, 19px); line-height: 1.5; }

.dots { display: flex; justify-content: center; gap: 10px; padding: 34px 0 40px; }
.dot {
  width: 15px; height: 15px; padding: 0;
  border: 0; border-radius: 999px;
  background: rgba(255, 255, 255, .5);
  cursor: pointer;
  transition: width .35s ease, background-color .35s ease;
}
.dot.active { width: 48px; background: #ffffff; }

/* 插画动画 */
.float-a, .float-b, .float-c { transform-box: fill-box; transform-origin: center; }
.float-a { animation: float 7s ease-in-out infinite; }
.float-b { animation: float 8s ease-in-out -3s infinite; }
.float-c { animation: float 6s ease-in-out -1.5s infinite; }
.cursor { animation: blink 1.1s steps(1) infinite; }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .float-a, .float-b, .float-c, .cursor { animation: none; }
  .slide, .dot { transition: none; }
}

/* ---------- 窄屏：只留表单 ---------- */
@media (max-width: 960px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .right { display: none; }
  .left { padding: 40px 16px; }
}

@media (max-height: 760px) and (min-width: 961px) {
  .heading { margin-bottom: 26px; }
  .note { margin-top: 24px; }
  .foot { margin-top: 24px; }
}
