/* 登录页 —— 随主题(NetSuite/暖A/暖B)自适应,全部基于 design token。 */

.login-wrap { min-height: 100vh; display: flex; background: var(--bg); }
.login-theme { position: fixed; top: 16px; right: 18px; z-index: 10; }

/* ---------- 左:品牌 / 合规营销面板 ---------- */
.login-brand {
  flex: 0 0 46%; display: flex; flex-direction: column; justify-content: center;
  padding: 56px 64px; color: #eaf1f7;
  background: linear-gradient(160deg, #24405a, #16293a);
}
.login-brand .lb-logo { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 21px; }
.login-brand .lb-logo .mark {
  width: 40px; height: 40px; border-radius: 9px; display: inline-flex;
  align-items: center; justify-content: center; background: var(--accent); color: #fff; font-weight: 800; font-size: 20px;
}
.login-brand .lb-logo small { font-weight: 400; opacity: .75; font-size: 13px; }
.login-brand h2 { font-size: 29px; line-height: 1.3; margin: 34px 0 12px; font-weight: 600; }
.login-brand p.tag { font-size: 14px; opacity: .85; max-width: 430px; line-height: 1.6; }
.login-brand ul { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 13px; }
.login-brand li { display: flex; gap: 11px; align-items: flex-start; font-size: 13.5px; opacity: .94; }
.login-brand li .dot { color: var(--accent); font-weight: 800; line-height: 1.4; }
.login-brand .lb-foot { margin-top: auto; padding-top: 30px; font-size: 11.5px; opacity: .6; }

/* ---------- 右:登录表单 ---------- */
.login-main { flex: 1; display: flex; align-items: center; justify-content: center; padding: 40px; }
.login-card { width: 100%; max-width: 384px; }
.login-card .lc-head { margin-bottom: 22px; }
.login-card h1 { font-size: 23px; margin: 0 0 5px; color: var(--text); }
.login-card .sub { color: var(--text-soft); font-size: 13px; }

.login-form { display: flex; flex-direction: column; gap: 15px; }
.login-field label { display: block; font-size: 12px; color: var(--text-soft); font-weight: 600; margin-bottom: 5px; }
.login-field .ctrl { position: relative; }
.login-field input {
  width: 100%; font-size: 14px; padding: 10px 12px; border: 1px solid var(--border);
  border-radius: 6px; background: var(--card); color: var(--text);
}
.login-field input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}
.login-field .toggle-pw {
  position: absolute; right: 10px; top: 50%; transform: translateY(-50%);
  cursor: pointer; color: var(--text-mute); font-size: 12px; background: none; border: 0;
}

.login-row { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; margin-top: -2px; }
.login-row label { color: var(--text-soft); display: flex; gap: 6px; align-items: center; cursor: pointer; }
.login-row a { color: var(--link); }

.login-btn {
  width: 100%; padding: 11px; border: 0; border-radius: 6px; cursor: pointer;
  background: var(--accent); color: #fff; font-size: 14px; font-weight: 600;
  display: flex; align-items: center; justify-content: center; gap: 8px; margin-top: 2px;
}
.login-btn:hover { background: var(--accent-deep); }
.login-btn[disabled] { opacity: .75; cursor: progress; }
.login-btn .spin {
  width: 15px; height: 15px; border: 2px solid rgba(255,255,255,.5); border-top-color: #fff;
  border-radius: 50%; animation: login-spin .7s linear infinite; display: none;
}
.login-btn.is-loading .spin { display: inline-block; }
@keyframes login-spin { to { transform: rotate(360deg); } }

.login-error {
  display: none; background: var(--bad-bg); border: 1px solid #ecc3ba; color: var(--bad);
  font-size: 12.5px; padding: 9px 11px; border-radius: 6px; margin-bottom: 2px;
}
.login-error.show { display: block; }

.login-divider { display: flex; align-items: center; gap: 10px; color: var(--text-mute); font-size: 11.5px; margin: 18px 0; }
.login-divider::before, .login-divider::after { content: ""; height: 1px; background: var(--border); flex: 1; }

.sso { display: flex; flex-direction: column; gap: 8px; }
.sso button {
  display: flex; align-items: center; gap: 10px; justify-content: center;
  width: 100%; padding: 9px; border: 1px solid var(--border); border-radius: 6px;
  background: var(--card); color: var(--text); font-size: 13px; cursor: pointer;
}
.sso button:hover { background: var(--row-hover); }
.sso button .g { font-weight: 700; }

.login-hint { margin-top: 12px; text-align: center; font-size: 11.5px; color: var(--text-mute); }
.login-hint code {
  background: color-mix(in srgb, var(--text-soft) 13%, transparent);
  padding: 1px 5px; border-radius: 4px; font-size: 11px; color: var(--text-soft);
}
.login-2fa { margin-top: 13px; text-align: center; font-size: 11.5px; color: var(--text-mute); }
.login-foot { margin-top: 18px; display: flex; gap: 14px; justify-content: center; color: var(--text-mute); font-size: 11.5px; }
.login-foot a { color: var(--text-soft); }

/* ---------- 主题差异:品牌面板 ---------- */
html[data-theme="warm-a"] .login-brand { background: linear-gradient(160deg, #201e1a, #131211); color: #efe8da; }
html[data-theme="warm-b"] .login-brand { background: linear-gradient(160deg, #f3eee2, #ece3d1); color: var(--ink); }
html[data-theme="warm-b"] .login-brand p.tag,
html[data-theme="warm-b"] .login-brand li,
html[data-theme="warm-b"] .login-brand .lb-foot,
html[data-theme="warm-b"] .login-brand .lb-logo small { opacity: .82; }
html[data-theme="warm-b"] .login-brand li .dot { color: var(--sky); }

/* UI 用 Poppins(暖色) */
html[data-theme^="warm"] .login-brand .lb-logo,
html[data-theme^="warm"] .login-brand h2,
html[data-theme^="warm"] .login-card h1,
html[data-theme^="warm"] .login-btn,
html[data-theme^="warm"] .login-field label {
  font-family: "Poppins", "PingFang SC", "Microsoft YaHei", sans-serif;
}

@media (max-width: 860px) {
  .login-brand { display: none; }
  .login-main { padding: 28px 20px; }
}
