/* 登录页样式 —— 柔和教育风（与站点青绿主题一致）
 * 设计要点：左右分栏卡片（左：品牌与学段覆盖介绍；右：表单），
 * 软阴影双层叠加、24px 圆角、4.5:1 以上文字对比、可见焦点环、尊重系统减弱动效偏好。 */

:root {
  --teal-800: #093f38;
  --teal-700: #0b5348;
  --teal-600: #0f6e62;
  --teal-500: #178475;
  --teal-100: #dff3ef;
  --ink: #12332e;
  --text: #1f2c2a;
  --muted: #52645f;
  --amber: #f5a623;
  --error: #c5221f;
  --bg: #eef6f4;
  --card: #ffffff;
  --border: #d8e5e2;
  --ring: rgba(15, 110, 98, 0.4);
  --radius-lg: 28px;
  --radius-md: 16px;
  --radius-sm: 12px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: var(--bg);
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 背景装饰：柔和光斑 */
body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}
body::before {
  width: 480px; height: 480px;
  background: rgba(23, 132, 117, 0.35);
  top: -120px; left: -100px;
  animation: drift 14s ease-in-out infinite alternate;
}
body::after {
  width: 420px; height: 420px;
  background: rgba(245, 166, 35, 0.22);
  bottom: -140px; right: -80px;
  animation: drift 18s ease-in-out infinite alternate-reverse;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(40px, 30px, 0); }
}

/* 主体卡片 */
.login-shell {
  position: relative;
  z-index: 1;
  width: min(1040px, 100%);
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  background: var(--card);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow:
    0 2px 4px rgba(9, 63, 56, 0.05),
    0 24px 48px -12px rgba(9, 63, 56, 0.22),
    0 48px 96px -24px rgba(9, 63, 56, 0.18);
  animation: rise 0.5s ease-out both;
}

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

/* ---------- 左栏：品牌与学段介绍 ---------- */
.login-intro {
  background: linear-gradient(165deg, var(--teal-600) 0%, var(--teal-800) 82%);
  color: #fff;
  padding: 52px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 26px;
  position: relative;
}
.login-intro::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 88% 12%, rgba(255, 255, 255, 0.09) 0, transparent 42%),
    radial-gradient(circle at 10% 92%, rgba(245, 166, 35, 0.10) 0, transparent 46%);
  pointer-events: none;
}

.intro-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0.92;
}
.intro-brand svg { flex: none; width: 30px; height: 30px; color: #7ee0d2; }

.intro-eyebrow {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.42em;
  color: #9fe3d6;
  text-transform: uppercase;
}

.login-intro h1 {
  font-size: clamp(26px, 3.2vw, 36px);
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.intro-lede {
  font-size: 15px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.86);
  max-width: 40em;
}

/* 学段覆盖 */
.stage-list {
  list-style: none;
  display: grid;
  gap: 12px;
}
.stage-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  transition: background 0.2s ease-out, transform 0.2s ease-out;
}
.stage-item:hover { background: rgba(255, 255, 255, 0.13); }
.stage-item svg {
  flex: none;
  width: 22px; height: 22px;
  margin-top: 2px;
  color: #9fe3d6;
}
.stage-item strong { display: block; font-size: 15px; margin-bottom: 2px; }
.stage-item span { font-size: 13px; line-height: 1.6; color: rgba(255, 255, 255, 0.78); }

/* 数据统计 */
.intro-stats {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 8px 26px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 20px;
}
.intro-stats strong {
  display: block;
  font-size: 21px;
  font-weight: 700;
  color: #ffd486;
  font-variant-numeric: tabular-nums;
}
.intro-stats span { font-size: 12.5px; color: rgba(255, 255, 255, 0.75); }

.intro-note {
  font-size: 12.5px;
  color: rgba(255, 255, 255, 0.62);
  display: flex;
  align-items: center;
  gap: 8px;
}
.intro-note svg { width: 15px; height: 15px; flex: none; opacity: 0.85; }

/* ---------- 右栏：登录表单 ---------- */
.login-panel {
  padding: 52px 46px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.login-panel h2 { font-size: 26px; font-weight: 700; color: var(--ink); }
.login-sub { margin-top: 8px; font-size: 14px; color: var(--muted); }

#login-form { margin-top: 30px; display: grid; gap: 6px; }

#login-form label {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
  margin: 10px 0 2px;
}

#login-form input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: #fbfdfd;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.18s ease-out, box-shadow 0.18s ease-out, background 0.18s ease-out;
}
#login-form input::placeholder { color: #9db0ab; }
#login-form input:hover { border-color: #b9cfc9; }
#login-form input:focus {
  border-color: var(--teal-600);
  background: #fff;
  box-shadow: 0 0 0 4px var(--ring);
}
#login-form input.is-invalid { border-color: var(--error); }
#login-form input.is-invalid:focus { box-shadow: 0 0 0 4px rgba(197, 34, 31, 0.16); }

.login-error {
  margin-top: 12px;
  padding: 11px 14px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--error);
  background: #fdeeec;
  border: 1px solid #f3cfcb;
  border-radius: var(--radius-sm);
  animation: shake 0.32s ease-out;
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  55% { transform: translateX(4px); }
}

.login-btn {
  margin-top: 22px;
  height: 50px;
  border: none;
  border-radius: 14px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: #fff;
  background: linear-gradient(180deg, var(--teal-500), var(--teal-700));
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.16) inset,
    0 10px 20px -8px rgba(15, 110, 98, 0.55);
  cursor: pointer;
  transition: transform 0.16s ease-out, box-shadow 0.16s ease-out, filter 0.16s ease-out;
}
.login-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.login-btn:active { transform: translateY(1px); box-shadow: 0 4px 10px -6px rgba(15, 110, 98, 0.5); }

.login-foot {
  margin-top: 22px;
  font-size: 12.5px;
  color: #8ba19b;
  text-align: center;
}

/* 焦点环（键盘导航） */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--ring);
  outline-offset: 2px;
}

/* ---------- 响应式 ---------- */
@media (max-width: 880px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-intro { padding: 36px 30px 32px; gap: 20px; }
  .login-panel { padding: 34px 30px 40px; }
  .intro-stats { grid-template-columns: repeat(2, 1fr); gap: 14px 20px; }
  .login-intro h1 br { display: none; }
}

@media (max-width: 400px) {
  body { padding: 14px; }
  .login-shell { border-radius: 20px; }
  .login-intro, .login-panel { padding-left: 20px; padding-right: 20px; }
}

/* 尊重系统「减弱动态效果」偏好 */
@media (prefers-reduced-motion: reduce) {
  body::before, body::after { animation: none; }
  .login-shell { animation: none; }
  .login-error { animation: none; }
  .stage-item, .login-btn, #login-form input { transition: none; }
}
