@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 300;
  font-display: swap;
  src: url("../fonts/plex-sans-latin-300.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/plex-sans-latin-400.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/plex-sans-latin-500.woff2") format("woff2");
}

/* ==========================================================================
   Calibre — 认证页外壳（登录 / 注册 / 找回密码）
   仅覆盖外观，不改动 Halo 的认证结构与提交逻辑
   ========================================================================== */

:root {
  --auth-bg: #f4f4f4;
  --auth-surface: #ffffff;
  --auth-input: #f4f4f4;
  --auth-text: #161616;
  --auth-text-2: #525252;
  --auth-muted: #8d8d8d;
  --auth-border: #e0e0e0;
  --auth-border-strong: #161616;
  --auth-ease: cubic-bezier(0.2, 0, 0, 1);
  --auth-font: "IBM Plex Sans", "PingFang SC", "HarmonyOS Sans SC",
    "Source Han Sans SC", "Noto Sans SC", "Microsoft YaHei", sans-serif;
}

html,
body {
  min-height: 100%;
}

body.auth-page {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--auth-bg);
  color: var(--auth-text-2);
  font-family: var(--auth-font);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- 顶部 ---------- */
.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px clamp(20px, 4vw, 48px);
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--auth-text);
}

.auth-brand__mark {
  width: 30px;
  height: 30px;
  color: var(--auth-text);
}

.auth-brand__mark svg {
  width: 100%;
  height: 100%;
}

.auth-brand__mark .logo__accent {
  fill: var(--brand);
}

.auth-brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.auth-brand__name {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.auth-brand__tag {
  font-size: 10px;
  color: var(--auth-muted);
  letter-spacing: 0.04em;
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--auth-border);
  color: var(--auth-text-2);
  font-size: 12px;
  transition: border-color 0.18s var(--auth-ease), color 0.18s var(--auth-ease);
}

.auth-back svg {
  width: 14px;
  height: 14px;
}

.auth-back:hover {
  border-color: var(--auth-text);
  color: var(--auth-text);
}

/* ---------- 主体 ---------- */
.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 20px 48px;
}

.auth-page .gateway-wrapper {
  width: 100%;
  max-width: 440px;
  margin: 0;
  padding: 0;
  --color-primary: var(--brand);
  --color-secondary: var(--brand);
  --color-link: var(--brand);
  --color-text: var(--auth-text-2);
  --color-border: var(--auth-border);
  --rounded-sm: 0px;
  --rounded-base: 0px;
  --rounded-lg: 0px;
}

.auth-page .halo-logo {
  display: none;
}

.auth-page .halo-form-wrapper {
  background: var(--auth-surface);
  border: 1px solid var(--auth-border);
  border-top: 2px solid var(--auth-text);
  border-radius: 0;
  padding: clamp(26px, 4.2vw, 40px);
  box-shadow: none;
}

/* ---------- 表单 ---------- */
.auth-page .form-title {
  color: var(--auth-text);
  font-size: 26px;
  font-weight: 300;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

.auth-page .halo-form .form-item label {
  color: var(--auth-text-2);
  font-size: 12px;
  font-weight: 400;
  margin-bottom: 0.5rem;
}

.auth-page .halo-form .form-input {
  height: 2.9em;
  border: 1px solid var(--auth-border);
  border-radius: 0;
  background: var(--auth-input);
  box-shadow: none;
  transition: border-color 0.18s var(--auth-ease), background 0.18s var(--auth-ease);
}

.auth-page .halo-form .form-input:focus-within {
  border-color: var(--brand);
  background: var(--auth-surface);
  box-shadow: none;
}

.auth-page .halo-form .form-item input {
  color: var(--auth-text);
  font-size: 15px;
}

.auth-page .halo-form .form-item input::placeholder {
  color: var(--auth-muted);
}

.auth-page .halo-form .form-item-extra-link {
  color: var(--brand);
  font-size: 12px;
}

.auth-page .halo-form .form-item-extra-link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-page .halo-form button[type="submit"] {
  height: 3em;
  border-radius: 0;
  background: var(--brand);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  box-shadow: none;
  transition: background 0.18s var(--auth-ease);
}

.auth-page .halo-form button[type="submit"]:hover {
  opacity: 1;
  background-image: linear-gradient(rgba(10, 10, 10, 0.14), rgba(10, 10, 10, 0.14));
}

.auth-page .halo-form .form-item-compact {
  font-size: 13px;
}

.auth-page .halo-form .form-item-compact label {
  color: var(--auth-text-2);
}

.auth-page .halo-form input[type="checkbox"] {
  border-color: var(--auth-border);
  accent-color: var(--brand);
}

/* ---------- 第三方登录 / 提示 ---------- */
.auth-page .divider-wrapper {
  color: var(--auth-muted);
  font-size: 12px;
}

.auth-page .divider-wrapper hr {
  border-top-color: var(--auth-border);
}

.auth-page .pill-items li {
  border-color: var(--auth-border);
  background: var(--auth-surface);
  border-radius: 0;
}

.auth-page .pill-items li a,
.auth-page .pill-items li button {
  color: var(--auth-text-2);
}

.auth-page .pill-items li:hover {
  border-color: var(--auth-text);
  background: var(--auth-surface);
  color: var(--auth-text);
}

.auth-page .alert {
  border-color: var(--auth-border);
  background: var(--auth-input);
  color: var(--auth-text-2);
  border-radius: 0;
  font-size: 13px;
}

/* ---------- 系统片段自带类名 ---------- */
.auth-page .signup-notice-content,
.auth-page .login-notice-content,
.auth-page .returntosite-content {
  margin: 12px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--auth-muted);
}

.auth-page .signup-notice-content a,
.auth-page .login-notice-content a {
  margin-left: 4px;
  color: var(--brand);
}

.auth-page .signup-notice-content a:hover,
.auth-page .login-notice-content a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-page .returntosite-content a {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--auth-muted);
}

.auth-page .returntosite-content a:hover {
  color: var(--brand);
}

/* ---------- 页脚 ---------- */
.auth-foot {
  padding: 18px 20px 26px;
  text-align: center;
  font-size: 12px;
  color: var(--auth-muted);
}

.auth-foot p {
  margin: 0;
  display: inline-flex;
  gap: 5px;
}

@media (max-width: 560px) {
  .auth-top {
    padding: 18px 20px;
  }
  .auth-brand__tag {
    display: none;
  }
  .auth-main {
    padding-bottom: 32px;
  }
}
