/**
 * 文件名称：auth-login.css（样式｜登录与注册页）
 * 使用页面或调用方：pages/auth-login/auth-login.html
 * 页面归属与复用范围：复用范围：单页面私有；小程序归属：不涉及（桌面 Web）
 * 主要依赖：static/styles/common-base.css（设计令牌与按钮/表单样式）
 * 职责边界：只写登录页私有布局与品牌区，不改公共组件。
 */

.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eef2f9;
  overflow-x: hidden;
}

/* 背景：蓝图网格 + 柔光，纯 CSS，保证离线渲染一致 */
.auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.auth-bg__grid {
  position: absolute;
  inset: -20%;
  background-image:
    linear-gradient(rgba(43, 98, 246, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(43, 98, 246, 0.055) 1px, transparent 1px);
  background-size: 46px 46px;
  transform: perspective(900px) rotateX(0deg);
  mask-image: radial-gradient(ellipse 62% 58% at 50% 45%, #000 25%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 62% 58% at 50% 45%, #000 25%, transparent 78%);
}

.auth-bg__glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.55;
}

.auth-bg__glow--a {
  width: 620px;
  height: 620px;
  left: -160px;
  top: -180px;
  background: #c9d8ff;
}

.auth-bg__glow--b {
  width: 560px;
  height: 560px;
  right: -140px;
  bottom: -200px;
  background: #ffe4c2;
  opacity: 0.4;
}

.auth-shell {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 88px;
  padding: 48px 40px;
  width: 100%;
}

/* 登录卡片：宽 420，居中，桌面端唯一的表单容器 */
.auth-card {
  width: 400px;
  flex: none;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(228, 233, 242, 0.9);
  border-radius: 20px;
  padding: 32px 32px 24px;
  box-shadow: 0 30px 70px rgba(16, 26, 45, 0.16);
  backdrop-filter: blur(10px);
  animation: auth-card-in 0.45s cubic-bezier(0.2, 0.7, 0.3, 1);
}

@keyframes auth-card-in {
  from { opacity: 0; transform: translateY(14px) scale(0.99); }
  to { opacity: 1; transform: none; }
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.auth-brand__mark {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #2b62f6, #1b3fb8);
  color: #fff;
  box-shadow: 0 8px 20px rgba(43, 98, 246, 0.32);
}

.auth-brand__name {
  font-size: 20px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: 0.2px;
}

.auth-brand__sub {
  margin-top: 3px;
  font-size: 11px;
  line-height: 16px;
  color: var(--color-text-3);
  letter-spacing: 0.4px;
}

.auth-tabs {
  margin-bottom: 20px;
  gap: 26px;
}

.auth-tabs .tabs__item {
  height: 36px;
  font-size: 14px;
  font-weight: 600;
}

/* 登录方式：密码 / 验证码二选一 */
.auth-login-switch {
  display: flex;
  gap: 6px;
  margin: -4px 0 16px;
  padding: 4px;
  border-radius: 9px;
  background: var(--color-bg-soft);
  border: 1px solid var(--color-line);
}

.auth-login-switch__item {
  flex: 1;
  height: 30px;
  border-radius: 6px;
  font-size: 12px;
  color: var(--color-text-3);
  transition: background 0.16s var(--ease), color 0.16s var(--ease);
}

.auth-login-switch__item.is-active {
  background: var(--color-surface);
  color: var(--color-primary);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}

.auth-login-switch__item:hover:not(.is-active) {
  color: var(--color-text);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.auth-form .field__label {
  font-size: 12px;
}

.auth-form .input {
  height: 38px;
}

.auth-eye {
  position: absolute;
  right: 6px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: var(--color-text-3);
}

.auth-eye:hover {
  background: var(--color-bg-soft);
  color: var(--color-text);
}

/* 验证码输入：右侧「获取验证码」按钮，倒计时期间禁用 */
#auth-code {
  padding-right: 104px;
  letter-spacing: 2px;
}

.auth-code-btn {
  position: absolute;
  right: 4px;
  height: 30px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-primary);
  background: var(--color-primary-soft);
  white-space: nowrap;
}

.auth-code-btn:hover:not(:disabled) {
  background: rgba(43, 98, 246, 0.16);
}

.auth-code-btn:disabled {
  color: var(--color-text-4);
  background: var(--color-bg-soft);
  cursor: not-allowed;
}

.auth-code-hint {
  margin-top: 6px;
  font-size: 11px;
  line-height: 16px;
  color: var(--color-primary);
  word-break: break-all;
}

.auth-error {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  padding: 9px 11px;
  border-radius: var(--radius-md);
  background: var(--color-danger-soft);
  border: 1px solid var(--color-danger-line);
  color: var(--color-danger);
  font-size: 12px;
  line-height: 18px;
}

.auth-submit,
#auth-submit {
  margin-top: 4px;
  height: 42px;
  font-size: 14px;
  letter-spacing: 0.4px;
}

.auth-demo-btn {
  height: 38px;
  font-size: 13px;
  color: var(--color-text-2);
}

/* 演示账号提示：明确告诉验收者这是本地模拟数据 */
.auth-demo {
  margin-top: 22px;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  background: var(--color-bg-soft);
  border: 1px dashed var(--color-line-strong);
}

.auth-demo__title {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-2);
  margin-bottom: 7px;
}

.auth-demo__row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11px;
  color: var(--color-text-3);
}

.auth-demo__row code {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--color-text);
  background: var(--color-surface);
  border: 1px solid var(--color-line);
  border-radius: 5px;
  padding: 2px 6px;
}

.auth-demo__row span:not(:first-child) {
  margin-left: 6px;
}

.auth-demo__hint {
  margin-top: 8px;
  font-size: 10px;
  line-height: 16px;
  color: var(--color-text-3);
}

.auth-footer {
  margin-top: 18px;
  text-align: center;
  font-size: 10px;
  color: var(--color-text-4);
}

/* 右侧品牌说明：宽屏出现，窄屏隐藏，避免挤压 420px 表单卡 */
.auth-aside {
  width: 430px;
  padding-bottom: 8px;
  animation: auth-card-in 0.55s 0.08s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.auth-aside__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 26px;
  padding: 0 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(43, 98, 246, 0.18);
  color: var(--color-primary);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.6px;
}

.auth-aside__title {
  margin-top: 20px;
  font-size: 38px;
  line-height: 1.28;
  font-weight: 700;
  letter-spacing: -1px;
  color: #16233a;
}

.auth-aside__list {
  margin-top: 26px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-aside__list li {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: 13px;
  line-height: 20px;
  color: var(--color-text-2);
}

.auth-aside__dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-primary);
  margin-top: 7px;
  flex: none;
  box-shadow: 0 0 0 4px rgba(43, 98, 246, 0.12);
}

.auth-aside__stats {
  margin-top: 34px;
  display: flex;
  gap: 30px;
  padding-top: 22px;
  border-top: 1px solid rgba(27, 36, 51, 0.1);
}

.auth-aside__stats div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.auth-aside__stats strong {
  font-size: 24px;
  line-height: 1.1;
  font-weight: 700;
  color: #16233a;
  font-variant-numeric: tabular-nums;
}

.auth-aside__stats span {
  font-size: 11px;
  color: var(--color-text-3);
}

@media (max-width: 1180px) {
  .auth-aside { display: none; }
  .auth-shell { gap: 0; }
}

@media (max-width: 560px) {
  .auth-shell { padding: 20px; }
  .auth-card { width: 100%; padding: 26px 22px 20px; }
}
