/* =========================================================
   鹧鸪天维修 · login.css
   登录/注册页（§5.9 蓝调渐变 + 760×440 白卡 + 滑动色块）
   移动端 slide 变为顶部 Tab 条（§5.9）
   依赖 base.css 的 tokens 与通用组件
   ========================================================= */

.login-page {
  min-height: 100vh;
  background: linear-gradient(145deg, #0b1c2c 0%, #163a5f 55%, #1a5f7a 100%);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
}

.login-wrap { width: 100%; max-width: 760px; }

/* 滑动容器 */
.box {
  position: relative;
  width: 760px; max-width: 100%; height: 440px;
  background: #fff; border-radius: 16px; overflow: hidden;
  box-shadow: var(--shadow-box);
  display: flex;
}

/* 登录表单（左半，默认显示） */
.login-form {
  width: 50%; padding: 48px 40px;
  display: flex; flex-direction: column; justify-content: center;
}
/* 注册表单（右半，绝对定位，默认被 slide 盖住） */
.register-form {
  position: absolute; top: 0; right: 0; height: 100%;
  width: 50%; padding: 48px 40px;
  display: flex; flex-direction: column; justify-content: center;
}

.form h3 { font-family: var(--font-display); margin-bottom: 8px; color: var(--neutral-900); }
.form-hint { font-size: 14px; color: var(--neutral-500); margin-bottom: 20px; }
.form-foot { margin-top: 16px; font-size: 13px; color: var(--neutral-400); text-align: center; }

/* 滑动色块 slide（默认盖住右侧注册） */
.slide {
  position: absolute; top: 0; left: 50%; width: 50%; height: 100%;
  background: var(--primary-700); color: #fff;
  display: flex; align-items: center; justify-content: center;
  transition: left .5s ease, background .5s ease; z-index: 3;
}
.box.to-register .slide { left: 0; background: var(--primary); }

.slide-inner { text-align: center; padding: 24px; display: flex; flex-direction: column; align-items: center; gap: 14px; }
.slide-inner img { width: 64px; height: 64px; }
.slide-brand { font-family: var(--font-display); font-size: 26px; color: #fff; font-weight: 700; }
.slide-tip { font-size: 15px; color: rgba(255,255,255,0.85); margin: 0; }
.btn-outline-light { background: transparent; border: 1.5px solid #fff; color: #fff; }
.btn-outline-light:hover { background: rgba(255,255,255,0.14); }
.btn-outline-light:focus-visible { outline-color: #fff; }

/* 顶部 Tab 条（仅移动端显示，桌面隐藏） */
.tabbar { display: none; }

.login-foot { text-align: center; color: rgba(255,255,255,0.7); font-size: 13px; margin-top: 16px; }
.login-foot a { color: #fff; text-decoration: underline; }
.login-foot a:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }

/* =========================================================
   响应式（§5.9 移动端：box 92vw 自适应高；slide 变顶部 Tab）
   ========================================================= */
@media (max-width: 639px) {
  .box { width: 92vw; height: auto; flex-direction: column; }

  /* slide 变顶部 Tab 条 */
  .slide {
    position: static; width: 100%; height: auto; left: auto;
    background: var(--primary-700) !important;
    flex-direction: column; padding: 0;
  }
  .box.to-register .slide { background: var(--primary) !important; }
  .slide-inner { display: none; }            /* 桌面品牌区在移动端隐藏 */
  .tabbar {
    display: flex; width: 100%;
  }
  .tab {
    flex: 1; min-height: 48px; background: transparent; border: none;
    color: rgba(255,255,255,0.7); font-weight: 600; font-size: 16px; cursor: pointer;
    border-bottom: 3px solid transparent; font-family: inherit;
  }
  .tab.active { color: #fff; border-bottom-color: var(--accent); }

  /* 表单竖向堆叠、满宽 */
  .login-form, .register-form {
    position: static; width: 100%; height: auto; padding: 24px 20px;
  }
  /* 默认显示登录，隐藏注册；to-register 时反之 */
  .register-form { display: none; }
  .box.to-register .login-form { display: none; }
  .box.to-register .register-form { display: flex; }
}
