/*! 登录页 · Apple 风（Bento + Aurora + Glass + Physics）
   严格对齐用户给定的 6 大设计法则：
   1) Bento Grid：圆角卡片 + 统一间距，大屏限宽 1120 居中，小屏堆叠
   2) Aurora & Glass：#F5F5F7 画布 + 固定光球(blur 80px 浮动) + 毛玻璃卡片(rgba(255,255,255,.72)+blur20)
   3) Button & Input：主按钮品牌蓝实心胶囊；次级用浅灰实心；输入框去边框浅灰底聚焦泛蓝光
   4) Big Type：-apple-system 字体栈；标题 700 / 注释 #86868b / 字距 -0.02em
   5) Physics：弹簧曲线 cubic-bezier(.25,1,.5,1)；hover scale(1.02)；卡片 fade-in-up 序列
   6) Hairlines：1px 半透明线
*/
:root {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
    "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --apple-blue: #0071e3;
  --apple-blue-hover: #0077ed;
  --apple-blue-press: #006edb;
  --text: #1d1d1f;
  --note: #86868b;
  --radius-squircle: 24px;
  --radius-pill: 999px;
  --spring: cubic-bezier(0.25, 1, 0.5, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: #f5f5f7;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* ===== Aurora · 固定光球，极大模糊 + 缓慢呼吸浮动 ===== */
body::before,
body::after {
  content: "";
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  z-index: 0;
  pointer-events: none;
  will-change: transform;
}
body::before {
  width: 56vw;
  height: 56vw;
  top: -14vw;
  left: -10vw;
  background: radial-gradient(circle at 50% 50%, rgba(162, 210, 255, 0.55), rgba(162, 210, 255, 0) 70%);
  animation: float-a 18s var(--spring) infinite alternate;
}
body::after {
  width: 50vw;
  height: 50vw;
  bottom: -16vw;
  right: -10vw;
  background: radial-gradient(circle at 50% 50%, rgba(200, 180, 255, 0.5), rgba(200, 180, 255, 0) 70%);
  animation: float-b 22s var(--spring) infinite alternate;
}
@keyframes float-a {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(4vw, 3vw, 0) scale(1.08); }
}
@keyframes float-b {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-3vw, -4vw, 0) scale(1.1); }
}

/* ===== 布局：限宽居中 + 统一间距 ===== */
.login-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  max-width: 1120px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: center;
  padding: 40px 32px;
}

@media (max-width: 960px) {
  .login-page {
    grid-template-columns: 1fr;
    gap: 20px;
    padding: 28px 20px;
    max-width: 480px;
  }
  .login-hero { min-height: auto !important; padding: 32px 28px !important; }
  .hero-copy h1 { font-size: 34px !important; }
}

/* ===== 毛玻璃卡片（Bento 模块化） ===== */
.login-hero,
.login-card {
  background: rgba(255, 255, 255, 0.72);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  backdrop-filter: blur(20px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: var(--radius-squircle);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06), 0 2px 8px rgba(0, 0, 0, 0.04);
}
.login-hero {
  position: relative;
  overflow: hidden;
  color: var(--text);
  padding: 44px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 520px;
  animation: fade-in-up 0.7s var(--spring) both;
}
.login-card {
  padding: 40px 36px;
  animation: fade-in-up 0.7s var(--spring) 0.12s both;
}
@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== Hero（品牌 + 文案，深色文字置于浅玻璃上） ===== */
.hero-brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 12px;
}
.hero-logo {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.5px;
  background: linear-gradient(135deg, #0a84ff 0%, #0060df 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 113, 227, 0.35);
}
.hero-name {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.hero-sub {
  font-size: 12px;
  color: var(--note);
  margin-top: 2px;
}
.hero-copy {
  position: relative;
  z-index: 2;
  margin-bottom: 0;
}
.hero-copy h1 {
  margin: 0 0 16px;
  font-size: 48px;
  line-height: 1.08;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.hero-copy p {
  margin: 0;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--note);
  max-width: 26em;
}
/* 旧 HTML 里的 .hero-glow 已由 aurora 接管，隐身避免叠层 */
.hero-glow { display: none; }

/* ===== 表单 ===== */
.login-panel {
  display: flex;
  align-items: center;
  justify-content: center;
}
.login-card h2 {
  margin: 0 0 6px;
  font-size: 38px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* 胶囊分段 Tab（次级：浅灰轨道 + 白卡选中） */
.login-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #e5e5ea;
  border-radius: var(--radius-pill);
  padding: 3px;
  margin-bottom: 28px;
  gap: 2px;
}
.login-tabs .tab {
  border: 0;
  background: transparent;
  height: 34px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  color: #1d1d1f;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.2s var(--spring), background 0.25s var(--spring), box-shadow 0.25s var(--spring);
}
.login-tabs .tab.active {
  background: #ffffff;
  color: var(--text);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
}

/* 输入框：去边框，浅灰底，聚焦泛蓝光 */
.field {
  display: block;
  margin-bottom: 18px;
}
.field > span {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}
.field input {
  width: 100%;
  height: 48px;
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 0 14px;
  font-size: 15px;
  font-family: inherit;
  outline: none;
  background: #f2f2f7;
  color: var(--text);
  transition: background 0.15s var(--spring), box-shadow 0.2s var(--spring), border-color 0.15s var(--spring);
}
.field input::placeholder {
  color: #a1a1a6;
}
.field input:hover {
  background: #ececf0;
}
.field input:focus {
  background: #ffffff;
  border-color: rgba(0, 113, 227, 0.4);
  box-shadow: 0 0 0 4px rgba(0, 113, 227, 0.14);
}

/* 密码框 + 眼睛 */
.pwd-wrap { position: relative; }
.pwd-wrap input { padding-right: 46px; }
.eye {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  cursor: pointer;
  width: 34px;
  height: 34px;
  border-radius: var(--radius-pill);
  display: grid;
  place-items: center;
  font-size: 14px;
  opacity: 0.55;
  transition: opacity 0.15s var(--spring), background 0.15s var(--spring);
}
.eye:hover { opacity: 1; background: #e5e5ea; }
.eye:focus-visible { outline: 2px solid var(--apple-blue); outline-offset: 2px; }

/* 错误提示 */
.error {
  color: #ff3b30;
  background: rgba(255, 59, 48, 0.08);
  border: 1px solid rgba(255, 59, 48, 0.18);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 13px;
  margin-bottom: 14px;
}
.hidden { display: none !important; }

/* 主按钮：品牌蓝实心胶囊 + hover 缩放 */
.submit {
  width: 100%;
  height: 50px;
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--apple-blue);
  color: #ffffff;
  font-size: 16px;
  font-weight: 500;
  font-family: inherit;
  letter-spacing: 0.01em;
  cursor: pointer;
  margin-top: 8px;
  transition: background 0.15s var(--spring), transform 0.12s var(--spring), box-shadow 0.25s var(--spring);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 6px 16px rgba(0, 113, 227, 0.25);
}
.submit:hover:not(:disabled) {
  background: var(--apple-blue-hover);
  transform: scale(1.02);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08), 0 10px 24px rgba(0, 113, 227, 0.32);
}
.submit:active:not(:disabled) {
  background: var(--apple-blue-press);
  transform: scale(0.985);
}
.submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 辅助链接 */
.login-extra {
  margin-top: 18px;
  text-align: center;
}
.muted {
  color: var(--note);
  font-size: 14px;
  cursor: default;
  transition: color 0.15s var(--spring);
}
.muted:hover { color: var(--apple-blue); }

/* 尊重「减少动态效果」偏好 */
@media (prefers-reduced-motion: reduce) {
  body::before, body::after { animation: none; }
  .login-hero, .login-card { animation: none; }
  .submit { transition: background 0.15s ease; }
}