/* 登录页补充样式（阶段 2-A / S4）
 *
 * `login.css` 是从旧系统只读复制的原文（字节一致，不修改），它只覆盖 `body.login` 下的
 * 结构、卡片、字段与错误提示。旧系统里还有几个类来自 ST 全局样式表，不在 login.css 内：
 *   .menu_button（按钮基样式）、.neutral_warning（提示容器）、.flexGap10（间距）
 * 这里只补齐这些最小空位，避免为了一个按钮去引入旧系统的全局 CSS / CDN / jQuery。
 */
body.login .menu_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 132px;
  padding: 10px 20px;
  border: 1px solid var(--login-accent, #007c72);
  border-radius: 999px;
  background: var(--login-accent, #007c72);
  color: #fff;
  font-size: 15px;
  line-height: 1.2;
  cursor: pointer;
  transition: background .15s ease, transform .15s ease;
}

body.login .menu_button:hover:not(:disabled) {
  background: var(--login-accent-strong, #005f58);
}

body.login .menu_button:disabled {
  opacity: .6;
  cursor: default;
}

body.login .menu_button:focus-visible {
  outline: 2px solid var(--login-accent-strong, #005f58);
  outline-offset: 2px;
}

/* 旧页面把错误提示放在 .neutral_warning 容器里；#errorMessage 的样式在 login.css 中定义。 */
body.login .neutral_warning {
  width: 100%;
  min-height: 20px;
}

body.login .flexGap10 {
  gap: 10px;
}

/* 登录页品牌 mark：2026-10-16 起改用形象图（圆角方块 + 铺满）。
 * 注意：这些覆盖写在 login-extra.css 里，`login.css` 保持"旧系统原文字节一致"。 */
body.login .login-brand-mark {
  object-fit: cover;
  object-position: 50% 50%;
  border-radius: 34%;
  background: #0f1519;
}

/* ══════════════════════════════════════════════════════════════════════════
   水墨青绿皮肤（2026-10-21）
   login.css 里用的是 `body.login` 作用域（0,1,1），这里必须同权重同名才压得住。
   ══════════════════════════════════════════════════════════════════════════ */
body.login {
  background-color: #f4f7f5;
  background-image:
    radial-gradient(120% 80% at 8% 0%, rgba(226, 238, 233, .95), rgba(244, 247, 245, 0) 62%);
  background-size: auto;
}
body.login::before {
  content: ""; position: fixed; right: -60px; top: -30px; width: 460px; height: 280px;
  pointer-events: none; z-index: 0; opacity: .2;
  background: url("/img/ink/mountains.webp") top right / contain no-repeat;
}
body.login::after {
  content: ""; position: fixed; left: -50px; bottom: -40px; width: 280px; height: 340px;
  pointer-events: none; z-index: 0; opacity: .16;
  background: url("/img/ink/bamboo.webp") bottom left / contain no-repeat;
}
body.login .login-shell { position: relative; z-index: 1; }

body.login h1,
body.login h2,
body.login h3,
body.login .login-brand-copy h1,
body.login .login-storyline-quote {
  font-family: "Songti SC", "Noto Serif SC", "STSong", serif;
  letter-spacing: .03em;
  color: #1d423d;
}
body.login .login-brand-eyebrow { color: #7d918c; letter-spacing: .2em; }
body.login .login-storyline-kicker { color: #205850; letter-spacing: .16em; }

/* 卡面 */
body.login form,
body.login .login-card {
  background: #fff; border: 1px solid #dfe8e4; border-radius: 20px;
  box-shadow: 0 18px 44px rgba(32, 88, 80, .1);
}
body.login input {
  height: 46px; border-radius: 999px; border: 1px solid #dfe8e4; background: #fdfefc;
  color: #1c2a28; padding: 0 18px; font-size: 14px;
}
body.login input:focus {
  outline: none; border-color: #205850; background: #fff;
  box-shadow: 0 0 0 3px rgba(32, 88, 80, .1);
}
body.login button[type="submit"],
body.login #loginButton {
  width: 100%; height: 46px; border-radius: 999px; border: 0;
  background: #205850; color: #fff; font-size: 14px; letter-spacing: .04em;
  display: flex; align-items: center; justify-content: center; gap: 8px;
}
body.login button[type="submit"]:hover,
body.login #loginButton:hover { background: #1a4a44; }
body.login a { color: #205850; }

/* 手机端收口：提交按钮拉满、字段标签左对齐 */
body.login .flex-container:has(#loginButton) { width: 100%; }
body.login #loginButton { width: 100%; }
body.login .flex-container:has(.login-field-label) { align-items: stretch; }
body.login .login-field-label { text-align: left; align-self: flex-start; }
body.login input { width: 100%; }

/* ══════════════════════════════════════════════════════════════════════════
   登录 / 注册页签 + 注册表单（2026-10-25）
   login.css 仍是旧系统原文字节一致，新的交互样式一律写在这里。
   ══════════════════════════════════════════════════════════════════════════ */
body.login .login-tabs {
  display: flex; gap: 4px; width: 100%; margin: 2px 0 14px;
  padding: 4px; border-radius: 999px; background: rgba(32, 88, 80, .06);
}
body.login .login-tab {
  flex: 1; border: 0; background: transparent; color: #5d6f69;
  font-size: 13px; padding: 9px 0; border-radius: 999px; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
body.login .login-tab:hover { color: #1d423d; }
body.login .login-tab.is-active {
  background: #fff; color: #1d423d; font-weight: 600;
  box-shadow: 0 1px 3px rgba(32, 88, 80, .14);
}
body.login .login-tab:focus-visible { outline: 2px solid #205850; outline-offset: 1px; }

body.login #paneLogin,
body.login #paneRegister { display: flex; flex-direction: column; gap: 10px; align-items: stretch; }
body.login #paneRegister[hidden],
body.login #paneLogin[hidden] { display: none; }

body.login .login-code-row { display: flex; gap: 8px; width: 100%; }
body.login .login-code-row input { flex: 1; min-width: 0; letter-spacing: .12em; }
body.login .login-code-btn {
  flex: 0 0 auto; height: 46px; padding: 0 14px; border-radius: 999px;
  border: 1px solid #205850; background: #fff; color: #205850;
  font-size: 13px; white-space: nowrap; cursor: pointer;
}
body.login .login-code-btn:hover:not(:disabled) { background: rgba(32, 88, 80, .07); }
body.login .login-code-btn:disabled { opacity: .55; cursor: default; }

body.login .login-field-optional { color: #94a29b; font-weight: 400; }
body.login .login-register-hint {
  font-size: 12px; line-height: 1.7; color: #7d8b84; text-align: left; margin: 2px 0 4px;
}
body.login #registerButton { width: 100%; }
body.login .login-dev-hint {
  font-size: 12px; color: #b07b1e; text-align: left; margin-top: 6px; word-break: break-all;
}

/* 注册页协议同意（2026-10-25）—— 默认不勾选，未勾选时提交按钮禁用 */
body.login .login-consent {
  display: flex; gap: 9px; align-items: flex-start; width: 100%;
  font-size: 12.5px; line-height: 1.75; color: #5d6f69; text-align: left;
  padding: 10px 12px; border-radius: 12px; background: rgba(32, 88, 80, .045);
  border: 1px solid rgba(32, 88, 80, .1); cursor: pointer;
}
body.login .login-consent input { flex: 0 0 auto; width: 16px; height: 16px; margin: 3px 0 0; accent-color: #205850; }
body.login .login-consent a { color: #205850; text-decoration: underline; text-underline-offset: 2px; }
body.login .login-consent.is-invalid { border-color: #c4736a; background: rgba(196, 115, 106, .08); }
