/* 恒金商城 V5.1 — brand + space login + TOTP 2FA */
:root {
  --hj-navy: #07152d;
  --hj-blue: #377fe9;
  --hj-blue-dark: #235fc5;
  --hj-text: #15233a;
  --hj-muted: #6d7c91;
}

body.hj-space-auth-page,
body.hj-space-auth-page #container,
body.hj-space-auth-page #main,
body.hj-space-auth-page #content,
body.hj-space-auth-page #content-start {
  min-height: 100vh;
  width: 100%;
  max-width: none;
  margin: 0;
  padding: 0;
  background: transparent;
}
body.hj-space-auth-page #header,
body.hj-space-auth-page .breadcrumbs { display: none !important; }

.hj-auth-shell {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(360px, 1.15fr) minmax(420px, .85fr);
  overflow: hidden;
  background:
    linear-gradient(90deg, rgba(2,12,31,.52) 0%, rgba(4,18,43,.20) 47%, rgba(5,17,38,.38) 100%),
    url("../img/login-space-bg.f9753e079691.png") center center / cover no-repeat fixed;
}
.hj-auth-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(0,0,0,.04), rgba(0,8,24,.26));
}
.hj-auth-brand,
.hj-auth-panel { position: relative; z-index: 1; }
.hj-auth-brand {
  display: flex;
  align-items: flex-end;
  padding: clamp(48px, 7vw, 110px);
  padding-bottom: clamp(70px, 10vh, 130px);
  color: white;
}
.hj-auth-brand-inner { max-width: 560px; text-shadow: 0 2px 18px rgba(0,0,0,.28); }
.hj-auth-mark {
  width: 68px; height: 68px; border-radius: 20px;
  display: grid; place-items: center;
  margin-bottom: 24px;
  border: 1px solid rgba(255,255,255,.34);
  background: rgba(255,255,255,.12);
  backdrop-filter: blur(16px);
  font-size: 30px; font-weight: 900;
  box-shadow: 0 16px 40px rgba(0,0,0,.14);
}
.hj-auth-kicker {
  margin: 0 0 8px;
  color: #d7e8ff;
  font-size: 11px;
  letter-spacing: .18em;
  font-weight: 800;
}
.hj-auth-kicker.dark { color: #6281a9; text-shadow: none; }
.hj-auth-brand h1 {
  color: #fff !important;
  margin: 0 !important;
  font-size: clamp(42px, 5vw, 70px) !important;
  line-height: 1.05 !important;
  letter-spacing: -.035em;
}
.hj-auth-brand p:not(.hj-auth-kicker) { margin: 15px 0 0; color: #e7f0ff; font-size: 18px; }
.hj-auth-brand small { color: #c6d6eb; font-size: 12px; }
.hj-auth-line { width: 46px; height: 2px; background: #a9d0ff; margin: 28px 0 16px; }

.hj-auth-panel {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 44px clamp(28px, 5vw, 78px);
}
.hj-auth-card {
  width: min(460px, 100%);
  border: 1px solid rgba(255,255,255,.64);
  border-radius: 24px;
  padding: 36px;
  background: rgba(250,252,255,.92);
  backdrop-filter: blur(22px) saturate(120%);
  box-shadow: 0 30px 80px rgba(1,12,31,.28);
  color: var(--hj-text);
}
.hj-auth-card-head { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 27px; }
.hj-auth-step {
  flex: 0 0 auto;
  width: 36px; height: 36px; border-radius: 11px;
  display: grid; place-items: center;
  background: #eaf3ff; color: #2f6fc9;
  font-weight: 900; font-size: 11px;
}
.hj-auth-card-head h2 { margin: 0 0 7px; color: var(--hj-text); font-size: 27px; line-height: 1.1; }
.hj-auth-card-head p:last-child { color: var(--hj-muted); margin: 0; font-size: 12px; line-height: 1.6; }
.hj-auth-form { display: grid; gap: 17px; }
.hj-field label { display: block; margin: 0 0 8px; font-size: 11px; color: #3b4d65; font-weight: 800; }
.hj-auth-form input[type=text],
.hj-auth-form input[type=password],
.hj-otp-input {
  box-sizing: border-box;
  width: 100% !important;
  min-height: 48px;
  padding: 10px 13px !important;
  border: 1px solid #c8d5e6 !important;
  border-radius: 11px !important;
  background: rgba(255,255,255,.96) !important;
  color: #17263b !important;
  font-size: 14px !important;
}
.hj-primary-button {
  width: 100%; min-height: 49px; margin-top: 3px;
  border: 0; border-radius: 11px;
  background: linear-gradient(135deg, var(--hj-blue), #2e6fd7);
  color: white; font-size: 13px; font-weight: 900;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(55,127,233,.22);
}
.hj-primary-button:hover { background: linear-gradient(135deg, #2e73da, var(--hj-blue-dark)); }
.hj-primary-button:disabled { opacity: .5; cursor: not-allowed; }
.hj-auth-security-note {
  display: flex; gap: 10px; align-items: center;
  margin-top: 22px; padding: 12px 13px;
  border-radius: 11px;
  background: #f2f7fd; border: 1px solid #deebf9;
}
.hj-shield {
  width: 28px; height: 28px; border-radius: 9px;
  display: grid; place-items: center; background: #e0efff; color: #2569be; font-weight: 900;
}
.hj-auth-security-note strong { display: block; color: #31465f; font-size: 10px; }
.hj-auth-security-note small { display: block; margin-top: 2px; color: #7b8999; font-size: 9px; }
.hj-auth-foot { margin-top: 19px; text-align: center; color: #95a3b5; font-size: 9px; }
.hj-field-error { margin-top: 6px; color: #b4233f; font-size: 10px; font-weight: 700; }

/* 2FA */
.hj-2fa-card { width: min(500px, 100%); }
.hj-qr-wrap {
  width: 176px; height: 176px;
  margin: 0 auto 18px; padding: 10px;
  border-radius: 16px; background: #fff;
  border: 1px solid #dce6f1; box-shadow: 0 9px 24px rgba(21,35,58,.08);
}
.hj-qr-wrap img { width: 100%; height: 100%; display: block; }
.hj-setup-copy { margin-bottom: 14px; }
.hj-setup-copy strong { display: block; font-size: 11px; color: #31465f; }
.hj-setup-copy span { display: block; margin-top: 4px; color: #7b8999; font-size: 10px; line-height: 1.5; }
.hj-manual-key { margin-bottom: 18px; border: 1px solid #e0e8f2; border-radius: 10px; background: #f8fbff; padding: 10px 12px; }
.hj-manual-key summary { cursor: pointer; color: #54708f; font-size: 10px; font-weight: 800; }
.hj-manual-key code { display: block; overflow-wrap: anywhere; margin-top: 10px; padding: 9px; border-radius: 8px; background: #edf4fb; color: #24486f; font-size: 11px; letter-spacing: .08em; }
.hj-otp-input { text-align: center; font-size: 25px !important; font-weight: 900 !important; letter-spacing: .34em; padding-left: calc(13px + .34em) !important; }

/* visible product name */
.tg-brand-copy strong { letter-spacing: -.01em; }

@media (max-width: 860px) {
  .hj-auth-shell { grid-template-columns: 1fr; }
  .hj-auth-brand { display: none; }
  .hj-auth-panel { min-height: 100vh; padding: 24px; }
  .hj-auth-card { padding: 28px 22px; }
}


/* 恒金商城 V5.1.3 — 登录页精简
   - 移除 Django 原生 content title 白色顶条
   - 移除左侧品牌图标方块
   - 移除登录卡片重复标题区
   - 移除第一阶段 2FA 提示卡（实际 2FA 流程保留）
*/
body.hj-space-auth-page #content > h1,
body.hj-space-auth-page #content h1:first-child:not(.hj-auth-brand h1),
body.hj-space-auth-page .content-title,
body.hj-space-auth-page .module > caption {
  display: none !important;
}

body.hj-space-auth-page #main,
body.hj-space-auth-page #content-start,
body.hj-space-auth-page #content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

.hj-auth-brand-inner {
  padding-top: 0;
}

.hj-auth-card {
  padding-top: 38px;
}

.hj-auth-form {
  margin-top: 0;
}

/* V5.1.3 removed components — defensive hide in case stale template is cached */
.hj-auth-mark,
.hj-auth-card-head,
.hj-auth-security-note {
  display: none !important;
}
