/* 登录页样式 — 随机文件名 x7k2m9.css
 * 移动 App 风格（启动页式品牌区 + 卡片 + 分段 Tab）。简洁白色、零渐变。
 * 依赖外置 Tailwind CSS（CDN），此处放自定义样式。
 */
* { -webkit-tap-highlight-color: transparent; box-sizing: border-box; }
html, body { -webkit-text-size-adjust: 100%; margin: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  overscroll-behavior: none;
  background: #f3f4f6;
  color: #111827;
}
html.dark body { background: #0f172a; color: #f9fafb; }
input, button { font-family: inherit; }
.material-icons { line-height: 1; vertical-align: middle; }

/* ===== 整体屏幕 ===== */
.auth-screen {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0 20px calc(28px + env(safe-area-inset-bottom));
  padding-top: env(safe-area-inset-top);
}

/* ===== 品牌区（启动页风格） ===== */
.auth-hero {
  width: 100%;
  max-width: 420px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 64px 0 32px;
}
.auth-logo {
  width: 76px;
  height: 76px;
  border-radius: 22px;
  background-color: #2563eb;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-shadow: 0 12px 28px rgba(37, 99, 235, .34);
  margin-bottom: 18px;
}
.auth-logo .material-icons { font-size: 40px; }
.auth-title {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: .5px;
  margin: 0;
}
.auth-subtitle {
  font-size: 13px;
  color: #9ca3af;
  margin: 8px 0 0;
}
html.dark .auth-subtitle { color: #6b7280; }

/* ===== 卡片 ===== */
.auth-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 24px;
  padding: 22px 22px 24px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, .07);
}
html.dark .auth-card { background: #1e293b; box-shadow: 0 10px 40px rgba(0, 0, 0, .35); }

/* ===== 分段控件 Tab ===== */
.auth-seg {
  position: relative;
  display: flex;
  background: #f3f4f6;
  border-radius: 14px;
  padding: 4px;
  margin-bottom: 22px;
}
html.dark .auth-seg { background: #0f172a; }
.auth-seg-btn {
  position: relative;
  flex: 1;
  z-index: 1;
  border: none;
  background: transparent;
  padding: 10px 0;
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  border-radius: 11px;
  cursor: pointer;
  transition: color .2s ease;
}
.auth-seg-btn.is-active { color: #2563eb; }
html.dark .auth-seg-btn { color: #94a3b8; }
html.dark .auth-seg-btn.is-active { color: #60a5fa; }
.auth-seg-thumb {
  position: absolute;
  top: 4px;
  left: 4px;
  width: calc(50% - 4px);
  height: calc(100% - 8px);
  background: #fff;
  border-radius: 11px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .10);
  transition: transform .25s cubic-bezier(.4, 0, .2, 1);
}
html.dark .auth-seg-thumb { background: #334155; box-shadow: none; }
.auth-seg[data-active="register"] .auth-seg-thumb { transform: translateX(100%); }

/* ===== 表单 ===== */
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form.hidden { display: none; }
.field { position: relative; display: flex; align-items: center; }
.field-icon {
  position: absolute;
  left: 14px;
  font-size: 20px;
  color: #9ca3af;
  pointer-events: none;
}
.field input {
  width: 100%;
  padding: 15px 46px 15px 44px;
  font-size: 15px;
  border: 1.5px solid #e5e7eb;
  border-radius: 14px;
  background: #f9fafb;
  color: #111827;
  outline: none;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.field input::placeholder { color: #9ca3af; }
.field input:focus {
  border-color: #2563eb;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
}
html.dark .field input {
  background: #0f172a;
  border-color: #334155;
  color: #f9fafb;
}
html.dark .field input:focus { background: #0f172a; border-color: #60a5fa; box-shadow: 0 0 0 4px rgba(96, 165, 250, .16); }

/* 密码显示按钮 */
.field-eye {
  position: absolute;
  right: 8px;
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  color: #9ca3af;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.field-eye .material-icons { font-size: 20px; }
.field-eye:active { background: #f3f4f6; }
html.dark .field-eye:active { background: #334155; }

/* 主按钮 */
.btn-primary {
  margin-top: 4px;
  width: 100%;
  padding: 15px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  background: #2563eb;
  border: none;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .28);
  transition: transform .1s ease, opacity .15s ease, box-shadow .2s ease;
}
.btn-primary:active { transform: scale(.985); opacity: .92; }
.btn-primary:disabled { opacity: .6; cursor: default; box-shadow: none; }

/* 注册模式提示 */
.auth-hint {
  font-size: 12px;
  color: #6b7280;
  background: #f3f4f6;
  padding: 10px 12px;
  border-radius: 10px;
  line-height: 1.5;
}
.auth-hint.hidden { display: none; }
html.dark .auth-hint { background: #0f172a; color: #94a3b8; }

/* 错误/提示信息 */
.auth-alert {
  margin-top: 14px;
  font-size: 13px;
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fee2e2;
  padding: 11px 13px;
  border-radius: 11px;
  line-height: 1.45;
}
.auth-alert.hidden { display: none; }
html.dark .auth-alert { background: rgba(220, 38, 38, .12); border-color: rgba(220, 38, 38, .3); color: #fca5a5; }

/* 底部说明 */
.auth-footer-note {
  text-align: center;
  font-size: 11px;
  color: #b0b6c0;
  margin: 20px 0 0;
}
html.dark .auth-footer-note { color: #64748b; }

/* ===== 主题切换 FAB ===== */
.theme-fab {
  position: fixed;
  bottom: calc(20px + env(safe-area-inset-bottom));
  right: 18px;
  z-index: 50;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid #e5e7eb;
  background: #fff;
  color: #4b5563;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .12);
  cursor: pointer;
  transition: transform .15s ease;
}
.theme-fab:active { transform: scale(.94); }
html.dark .theme-fab { background: #1e293b; border-color: #334155; color: #e5e7eb; }

/* 小屏紧凑 */
@media (max-height: 640px) {
  .auth-hero { padding: 34px 0 22px; }
  .auth-logo { width: 62px; height: 62px; border-radius: 18px; margin-bottom: 12px; }
  .auth-logo .material-icons { font-size: 32px; }
}
