/**
 * 登录页全新布局（hkcom163）
 * 左：墨蓝品牌叙事区（品牌 / 卖点 / 数据）；右：浅色表单区
 * 对齐官网首页 redesign 视觉；不依赖旧 login.css；全部使用 px
 */

body {
  --color-primary: #1a3a5c;
  --lg-ink: #12151c;
  --lg-ink-soft: #2a3140;
  --lg-muted: #667085;
  --lg-line: #e6e8ee;
  --lg-bg: #f3f4f7;
  --lg-accent: #1a3a5c;
  --lg-accent-dark: #102638;
  --lg-accent-soft: #e8eef5;
  --lg-accent-muted: #9eb6d0;
  --lg-copper: #9a6840;
  --lg-hero: #0c1017;
  --lg-font: "Figtree", "PingFang SC", "Microsoft YaHei", sans-serif;
  --lg-display: "Outfit", "Figtree", "PingFang SC", sans-serif;
  margin: 0;
}

[v-cloak] {
  display: none !important;
}

html,
body,
.template {
  height: 100%;
}

#login,
#regist,
#forget {
  height: 100vh;
  width: 100%;
  overflow: hidden;
  /* 覆盖 common.js 写入 html 的 rem 字号（约 100px），否则 inline-block 输入框行高会被撑开 */
  font-size: 14px;
  line-height: 1.5;
  font-family: var(--lg-font);
  color: var(--lg-ink);
  background: var(--lg-bg);
}

/* ============ 整体两栏骨架 ============ */
.lg-shell {
  display: flex;
  height: 100%;
  width: 100%;
}

/* ============ 左：品牌叙事区 ============ */
.lg-hero {
  flex: 0 0 46%;
  max-width: 680px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  padding: 40px 56px 48px;
  color: rgba(255, 255, 255, 0.88);
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(720px 420px at 100% 0%, rgba(154, 104, 64, 0.28), transparent 55%),
    radial-gradient(560px 560px at -10% 110%, rgba(158, 182, 208, 0.16), transparent 55%),
    linear-gradient(155deg, #16324f 0%, #122a44 45%, #0c1d31 100%);
}

/* 网格纹理 */
.lg-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(80% 70% at 40% 40%, #000 0%, transparent 100%);
  pointer-events: none;
}

.lg-hero > * {
  position: relative;
  z-index: 1;
}

.lg-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}
/* 官网 logo 底色偏深，垫白色圆角底以保证在墨蓝背景上可读 */
.lg-brand-logo {
  height: 32px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  display: block;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  padding: 6px 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}

.lg-hero-main {
  padding: 26px 0 32px;
}

.lg-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--lg-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--lg-accent-muted);
  text-transform: uppercase;
}
.lg-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #9a6840;
  box-shadow: 0 0 0 0 rgba(154, 104, 64, 0.55);
  animation: lg-pulse 2.2s infinite;
}
@keyframes lg-pulse {
  0% { box-shadow: 0 0 0 0 rgba(154, 104, 64, 0.55); }
  70% { box-shadow: 0 0 0 10px rgba(154, 104, 64, 0); }
  100% { box-shadow: 0 0 0 0 rgba(154, 104, 64, 0); }
}

.lg-hero-title {
  margin: 0;
  font-family: var(--lg-display);
  font-size: 34px;
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  max-width: 15em;
}

.lg-hero-sub {
  margin: 14px 0 0;
  font-size: 14px;
  line-height: 1.75;
  color: rgba(255, 255, 255, 0.6);
  max-width: 30em;
}

.lg-points {
  list-style: none;
  margin: 30px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.lg-points li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.82);
}
.lg-points li i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  flex-shrink: 0;
  background:
    linear-gradient(135deg, rgba(154, 104, 64, 0.9), rgba(192, 138, 91, 0.9));
  position: relative;
}
.lg-points li i::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 5px;
  width: 5px;
  height: 9px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  transform: rotate(42deg);
}

.lg-hero-stats {
  margin-top: auto;
  display: flex;
  gap: 12px;
}
.lg-hero-stats > div {
  flex: 1;
  padding: 16px 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(4px);
}
.lg-hero-stats strong {
  display: block;
  font-family: var(--lg-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
}
.lg-hero-stats span {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.55);
}

/* ============ 右：表单区 ============ */
.lg-panel {
  flex: 1 1 auto;
  min-width: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow-y: auto; /* 内容超高时面板内部滚动，页面本身不滚 */
  padding: 24px 48px 24px;
  background:
    radial-gradient(700px 360px at 100% 0%, rgba(154, 104, 64, 0.06), transparent 55%),
    radial-gradient(900px 420px at 0% 100%, rgba(26, 58, 92, 0.07), transparent 60%),
    linear-gradient(180deg, #f7f8fb 0%, #f3f4f7 100%);
}

.lg-panel-topbar {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.lang-box {
  display: flex;
  gap: 4px;
  background: #fff;
  border: 1px solid var(--lg-line);
  border-radius: 999px;
  padding: 4px;
  box-shadow: 0 1px 2px rgba(18, 21, 28, 0.05);
}
.lang-box span {
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--lg-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.lang-box span:hover { color: var(--lg-accent); }
.lang-box span.active {
  background: var(--lg-accent);
  color: #fff;
}

.lg-redirect-btn {
  background: transparent !important;
  border: 1px solid var(--lg-accent) !important;
  border-radius: 999px !important;
  padding: 9px 20px !important;
  font-weight: 650;
}
.lg-redirect-btn a { color: var(--lg-accent); text-decoration: none; }
.lg-redirect-btn:hover { background: var(--lg-accent-soft) !important; }

/* 表单卡片居中 */
.lg-form-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 16px 0 0;
}

.lg-card {
  position: relative;
  width: min(460px, 100%);
  box-sizing: border-box;
  background: #fff;
  border: 1px solid var(--lg-line);
  border-radius: 20px;
  padding: 36px 44px 32px;
  box-shadow: 0 1px 2px rgba(18, 21, 28, 0.04), 0 20px 56px rgba(18, 21, 28, 0.1);
}
/* 顶部铜色饰条 */
.lg-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 44px;
  right: 44px;
  height: 3px;
  border-radius: 0 0 3px 3px;
  background: linear-gradient(90deg, var(--lg-accent) 0%, var(--lg-copper) 100%);
}

/* 标题 */
.login-text-title {
  font-family: var(--lg-display);
  font-size: 26px;
  line-height: 1.25;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--lg-ink);
}
.login-text-regist {
  margin-top: 8px;
  font-size: 13.5px;
  color: var(--lg-muted);
}
.login-text-regist a {
  color: var(--lg-accent);
  font-weight: 650;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* 扫码切换角标（右上折角） */
.login .qr-code {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  transition: transform 0.15s;
}
.login .qr-code:hover { transform: scale(1.06); }
.login .qr-code svg { width: 100%; height: 100%; display: block; }

/* 登录方式 tab */
.login-form { margin-top: 20px; }
.login-top {
  display: flex;
  gap: 26px;
  border-bottom: 1px solid var(--lg-line);
}
.login-email,
.login-phone {
  padding: 0 2px 12px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--lg-muted);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color 0.15s, border-color 0.15s;
}
.login-email.active,
.login-phone.active {
  color: var(--lg-accent);
  border-bottom-color: var(--lg-accent);
}

/* 表单 */
.form-main { margin-top: 14px; }
.form-item { margin-top: 16px; }
.form-item:first-child { margin-top: 0; }

.form-label {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--lg-ink-soft);
  line-height: 1.2;
}

/* 阻断 rem 大字号对 inline-block 行盒的影响 */
.login .el-input {
  display: block;
  font-size: 14px;
  line-height: 1.5;
}
.login .el-input__inner {
  height: 44px;
  line-height: 44px;
  border-radius: 10px;
  border-color: var(--lg-line);
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.login .el-input__inner:hover { border-color: #c9d2dd; }
.login .el-input__inner:focus {
  border-color: var(--lg-accent);
  box-shadow: 0 0 0 3px rgba(26, 58, 92, 0.12);
}
.login .input-with-select .el-input-group__prepend {
  width: 64px;
  border-radius: 10px 0 0 10px;
  border-color: var(--lg-line);
  background: #f7f8fa;
}

/* 验证码行 */
.code-item {
  display: flex;
  gap: 10px;
}
.login .code-btn {
  background: var(--lg-accent) !important;
  border-color: var(--lg-accent) !important;
  border-radius: 10px !important;
  color: #fff !important;
  white-space: nowrap;
}
.login .code-btn:hover {
  background: var(--lg-accent-dark) !important;
  border-color: var(--lg-accent-dark) !important;
}

/* 协议 / 忘记密码 */
.rember-item {
  margin-top: 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  line-height: 1.55;
}
.read-text {
  flex: 1;
  min-width: 0;
  padding: 0;
  font-size: 12.5px;
  color: var(--lg-muted);
  cursor: pointer;
  white-space: normal;
  word-break: break-word;
}
.rember-item a,
.read-text a,
.read-item a,
.a-text {
  color: var(--lg-accent);
  font-weight: 600;
  cursor: pointer;
}
/* 登录页「忘记密码」链接：仅非协议正文的末尾 span 禁止换行 */
.rember-item > span:last-child:not(.read-text) {
  font-size: 12.5px;
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 1px;
}
.rember-item .el-checkbox {
  margin-top: 2px;
  flex-shrink: 0;
}

.login .el-checkbox__inner {
  border-radius: 4px;
}
.login .el-checkbox__input.is-checked .el-checkbox__inner {
  background-color: var(--lg-accent) !important;
  border-color: var(--lg-accent) !important;
}
.login .el-checkbox__inner:hover { border-color: var(--lg-accent); }

/* 错误提示 */
.read-item { margin-top: 14px; }
.read-item .el-alert { border-radius: 10px; }

/* 按钮 */
.login .login-btn,
.login .el-button--primary.login-btn {
  width: 100%;
  height: 48px;
  background: var(--lg-accent) !important;
  border-color: var(--lg-accent) !important;
  color: #fff !important;
  border-radius: 10px !important;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  transition: background 0.15s, box-shadow 0.15s;
}
.login .login-btn:hover {
  background: var(--lg-accent-dark) !important;
  border-color: var(--lg-accent-dark) !important;
  box-shadow: 0 8px 20px rgba(26, 58, 92, 0.28);
}
.login .pass-btn {
  width: 100%;
  height: 48px;
  margin: 12px 0 0 !important;
  border: 1px solid var(--lg-accent) !important;
  border-radius: 10px !important;
  color: var(--lg-accent) !important;
  background: #fff !important;
  font-weight: 650;
  transition: background 0.15s;
}
.login .pass-btn:hover { background: var(--lg-accent-soft) !important; }

/* 分隔线 + 三方登录 */
.line-item { margin-top: 26px; }
.login .el-divider { background-color: var(--lg-line); }
.login .el-divider__text { color: var(--lg-muted); font-size: 12px; }
.login-type {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.oauth-item {
  display: flex;
  align-items: center;
  padding: 9px;
  cursor: pointer;
  border: 1px solid var(--lg-line);
  border-radius: 12px;
  transition: border-color 0.15s, transform 0.15s;
}
.oauth-item:hover {
  border-color: var(--lg-accent);
  transform: translateY(-1px);
}
.oauth-img { width: 32px; height: 32px; display: block; }

/* 扫码面板 */
.qr-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 8px 0;
}
.qr-box .qr-box-img {
  width: 200px;
  height: 200px;
  position: relative;
  border: 1px solid var(--lg-line);
  border-radius: 14px;
  overflow: hidden;
}
.qr-box .qr-box-img img {
  cursor: pointer;
  width: 100%;
  height: 100%;
  display: block;
}
.qr-box .qr-box-img .qr-expire-time {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  background: rgba(12, 16, 23, 0.6);
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.qr-box .qr-box-img .qr-expire-time .el-icon-refresh-right { font-size: 30px; }
.qr-box .qr-box-tips {
  margin-top: 14px;
  font-size: 13.5px;
  color: var(--lg-muted);
}

.qr-box-select-account {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
  padding: 20px;
  border-radius: 14px;
  border: 1px solid var(--lg-line);
}
.qr-box-select-account .qr-box-back {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 15px;
  color: var(--lg-accent);
  cursor: pointer;
}
.qr-box-select-account .qr-box-select-account-title {
  font-size: 13.5px;
  color: var(--lg-muted);
}
.login .el-radio__input.is-checked .el-radio__inner {
  background: var(--lg-accent) !important;
  border-color: var(--lg-accent) !important;
}
.login .el-radio__input.is-checked + .el-radio__label { color: var(--lg-accent) !important; }

/* 页脚小字 */
.lg-footnote {
  margin: 18px 0 0;
  font-size: 12px;
  color: var(--lg-muted);
  letter-spacing: 0.02em;
}

/* ============ 注册页专属 ============ */
/* 反自动填充的隐藏输入框 */
.login .empty-input {
  position: absolute;
  width: 0;
  height: 0;
  padding: 0;
  border: none;
  opacity: 0;
  pointer-events: none;
}
/* 自定义字段表单（label 置顶），与 form-label 风格统一 */
.login .custom-form .el-form-item {
  margin: 16px 0 0;
}
.login .custom-form .el-form-item__label {
  padding: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--lg-ink-soft);
  line-height: 1.2;
}
.login .custom-form .el-select {
  width: 100%;
}
.login .el-textarea__inner {
  border-radius: 10px;
  border-color: var(--lg-line);
  font-family: inherit;
}
.login .el-textarea__inner:focus {
  border-color: var(--lg-accent);
  box-shadow: 0 0 0 3px rgba(26, 58, 92, 0.12);
}

/* 语言下拉选项（Element 弹层） */
.lang-option {
  display: flex;
  align-items: center;
  column-gap: 5px;
}
.lang-option .lang-img {
  width: 30px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
}

/* ============ 响应式 ============ */
@media screen and (max-width: 1180px) {
  .lg-hero { flex-basis: 42%; padding: 36px 40px 40px; }
  .lg-hero-title { font-size: 29px; }
  .lg-panel { padding: 24px 32px 28px; }
}

@media screen and (max-width: 960px) {
  /* 移动端上下堆叠，恢复整页滚动 */
  #login,
  #regist,
  #forget {
    height: auto;
    min-height: 100vh;
    overflow: visible;
  }
  .lg-shell {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
  }
  .lg-panel { overflow-y: visible; }
  .lg-hero {
    flex: none;
    max-width: none;
    min-height: 0;
    padding: 28px 24px 30px;
  }
  .lg-hero-main { padding: 22px 0; }
  .lg-hero-title { font-size: 24px; }
  .lg-points { display: none; }
  .lg-hero-stats { display: none; }
  .lg-panel { padding: 20px 16px 28px; }
  .lg-form-wrap { padding-top: 16px; }
  .lg-card { padding: 32px 22px 30px; border-radius: 16px; }
  .lg-card::before { left: 22px; right: 22px; }
  .login-text-title { font-size: 23px; }
  .lg-panel-topbar { justify-content: center; flex-wrap: wrap; }
}
