/* NMB PIF 登入頁 — 冰藍絲綢楓葉 + 右側登入卡 */

:root {
  --lh-royal: #163a62;
  --lh-night: #102c43;
  --lh-elegant: #3d6b99;
  --lh-ink: #163a62;
  --lh-muted: #6b7c90;
  --lh-border: #d7e4f2;
  --lh-sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --lh-en: "Montserrat", "Noto Sans TC", sans-serif;
}

* { box-sizing: border-box; }

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

.lh-page {
  min-height: 100vh;
  font-family: var(--lh-sans);
  color: var(--lh-ink);
  background: #eaf4fb;
  overflow: auto;
  position: relative;
}

.lh-silk {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.lh-silk-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.lh-shell {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  align-items: stretch;
  gap: clamp(24px, 4vw, 64px);
  padding: clamp(28px, 4.5vh, 56px) clamp(28px, 5vw, 72px);
}

.lh-brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  padding: 8px 0 12px;
}

.lh-logo-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: clamp(28px, 5vh, 48px);
}

.lh-mark {
  width: 54px;
  height: 62px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}
.lh-mark svg,
.lh-mark img {
  width: 54px;
  height: 62px;
  display: block;
  object-fit: contain;
}

.lh-logo-en strong {
  display: block;
  font-family: var(--lh-en);
  font-size: 22px;
  font-weight: 800;
  letter-spacing: .04em;
  line-height: 1.1;
  color: var(--lh-royal);
}
.lh-logo-en small {
  display: block;
  margin-top: 4px;
  font-family: var(--lh-en);
  font-size: 10px;
  line-height: 1.35;
  letter-spacing: .02em;
  color: #5b7390;
  font-weight: 500;
}

.lh-logo-rule {
  width: 1px;
  height: 42px;
  background: #9bb4cc;
  margin: 0 4px;
}

.lh-logo-zh strong {
  display: block;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: .12em;
  color: var(--lh-royal);
  line-height: 1.15;
}
.lh-logo-zh small {
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: #5b7390;
  letter-spacing: .04em;
}

.lh-kicker {
  margin: 0 0 14px;
  font-family: var(--lh-en);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: #7b93ab;
}

.lh-brand h1 {
  margin: 0 0 18px;
  font-family: var(--lh-en);
  font-size: clamp(40px, 5.4vw, 64px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.02em;
  color: var(--lh-royal);
}

.lh-lead {
  margin: 0;
  font-size: 16px;
  line-height: 1.8;
  color: #4d647c;
}

.lh-lead-line {
  display: block;
  width: 42px;
  height: 2px;
  margin: 18px 0 28px;
  background: #9bb4cc;
}

.lh-feats {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(108px, 1fr));
  gap: 18px;
  max-width: 680px;
}

.lh-feats li {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  min-width: 0;
}

.lh-feats i {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid #c5d6e6;
  background: rgba(255,255,255,.55);
  color: var(--lh-royal);
  display: grid;
  place-items: center;
}
.lh-feats i svg { width: 22px; height: 22px; }

.lh-feats strong {
  font-size: 14px;
  font-weight: 800;
  color: var(--lh-royal);
  white-space: nowrap;
}
.lh-feats span {
  font-size: 12px;
  color: #6b7c90;
  white-space: nowrap;
}

.lh-brand-foot {
  margin-top: auto;
  padding-top: 36px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-family: var(--lh-en);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: #7b93ab;
  border-top: 1px solid #c5d6e6;
  width: max-content;
  min-width: 140px;
}

.lh-form-area {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 0;
}

.lh-card {
  width: min(100%, 440px);
  background: #fff;
  border: 1px solid rgba(22,58,98,.08);
  border-radius: 24px;
  padding: clamp(28px, 4vh, 40px) clamp(24px, 3vw, 36px) 28px;
  box-shadow: 0 24px 60px rgba(22,58,98,.12);
}

.lh-card-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--lh-royal);
  background: #f7fafc;
  border: 1.5px solid #e2edf6;
}
.lh-card-icon svg { width: 22px; height: 22px; }

.lh-card-head {
  text-align: center;
  margin-bottom: 22px;
}
.lh-card-head h2 {
  margin: 0 0 8px;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: .18em;
  color: var(--lh-royal);
}
.lh-card-head p {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--lh-muted);
}

.lh-alert {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.45;
}
.lh-alert-error {
  background: #FBF0F0;
  color: #8B2E3A;
  border: 1px solid #E8C8CC;
}
.lh-alert-ok {
  background: #F3F8F1;
  color: #3D6B45;
  border: 1px solid #C9DCCB;
}

.lh-field { display: block; margin-bottom: 14px; }

.lh-label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--lh-ink);
}

.lh-input {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 14px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid var(--lh-border);
  transition: border-color .2s, box-shadow .2s;
}
.lh-input > svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  color: #8aa0b5;
}
.lh-input input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: var(--lh-ink);
}
.lh-input input::placeholder { color: #a8b6c4; }
.lh-input:focus-within {
  border-color: var(--lh-royal);
  box-shadow: 0 0 0 3px rgba(22,58,98,.12);
}
.lh-input:focus-within > svg { color: var(--lh-royal); }

.lh-eye {
  border: 0;
  background: transparent;
  color: #8aa0b5;
  cursor: pointer;
  padding: 4px;
  display: grid;
  place-items: center;
}
.lh-eye svg { width: 18px; height: 18px; }
.lh-eye:hover { color: var(--lh-royal); }

.lh-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 2px 0 18px;
}

.lh-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--lh-muted);
  cursor: pointer;
  user-select: none;
}
.lh-remember input {
  appearance: none;
  width: 16px;
  height: 16px;
  border: 1.5px solid #9bb4cc;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}
.lh-remember input:checked {
  background: var(--lh-royal);
  border-color: var(--lh-royal);
  box-shadow: inset 0 0 0 2px #fff;
}

.lh-forgot {
  font-size: 13px;
  color: var(--lh-royal);
  text-decoration: none;
  font-weight: 600;
}
.lh-forgot:hover { text-decoration: underline; }

.lh-submit {
  width: 100%;
  height: 50px;
  border-radius: 999px;
  border: 0;
  background: #163a62;
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .06em;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(22,58,98,.22);
  transition: transform .18s, box-shadow .18s, filter .18s;
}
.lh-submit span { margin-left: 6px; font-weight: 500; }
.lh-submit:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}
.lh-submit:active { transform: translateY(0); filter: brightness(.96); }

.lh-help {
  margin: 18px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--lh-muted);
}
.lh-help-diamond {
  display: block;
  width: 8px;
  height: 8px;
  margin: 0 auto 8px;
  background: #c5d6e6;
  transform: rotate(45deg);
}
.lh-help a {
  color: var(--lh-royal);
  text-decoration: none;
  font-weight: 800;
  margin-left: 4px;
}
.lh-help a:hover { text-decoration: underline; }

.lh-footer {
  margin-top: 14px;
  text-align: center;
}
.lh-footer-links {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--lh-muted);
}
.lh-footer-links a {
  color: #6b7c90;
  text-decoration: none;
}
.lh-footer-links a:hover { color: var(--lh-royal); }
.lh-footer-links span { color: #d7e4f2; }

.lh-footer-credit {
  margin: 8px 0 0;
  font-size: 12px;
  color: #8aa0b5;
}

@media (max-width: 980px) {
  .lh-shell {
    grid-template-columns: 1fr;
    padding: 24px 20px 32px;
  }
  .lh-brand {
    padding-top: 8px;
  }
  .lh-brand h1 { font-size: 40px; }
  .lh-feats { max-width: none; }
  .lh-brand-foot { margin-top: 28px; }
  .lh-card { width: min(100%, 460px); }
}

@media (max-width: 560px) {
  .lh-feats { grid-template-columns: 1fr 1fr; }
  .lh-logo-zh strong { font-size: 22px; }
}

/* 註冊頁：左側文字整段上移，上緣對齊右側表格，間距比例不變 */
.lh-page:has(.lh-form-register) .lh-brand {
  justify-content: flex-start;
  padding-top: 4px;
}

/* 企業／邀請註冊卡 */
.lh-form-register {
  align-items: flex-start;
  padding-top: 4px;
  padding-bottom: 24px;
}
.lh-card-register {
  width: min(100%, 480px);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
}
.lh-section {
  margin: 0 0 6px;
}
.lh-section-title {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 800;
  color: var(--lh-royal);
  letter-spacing: .04em;
}
.lh-hint {
  margin: 0 0 10px;
  font-size: 12px;
  line-height: 1.55;
  color: var(--lh-muted);
}
.lh-input select {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 14px;
  color: var(--lh-ink);
  height: 46px;
}
.lh-back {
  display: block;
  margin-top: 14px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: var(--lh-royal);
  text-decoration: none;
}
.lh-back:hover { text-decoration: underline; }

.lh-version-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
}
.lh-version-chip {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  background: #e8f1fc;
  color: #163a73;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .04em;
}
.lh-back-intro {
  color: #3a5a86;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
}
.lh-back-intro:hover { text-decoration: underline; }
.lh-alert a { color: inherit; font-weight: 800; }

.lh-login-mode {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px;
  margin: 2px 0 16px;
  padding: 4px;
  border: 1px solid #d5e3f2;
  border-radius: 14px;
  background: #f4f8fc;
}
.lh-login-mode-btn {
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #3d5d82;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
}
.lh-login-mode-btn:hover { color: var(--lh-night); background: rgba(255,255,255,.7); }
.lh-login-mode-btn.is-active {
  background: #163a62;
  color: #fff;
  box-shadow: 0 6px 14px rgba(22, 58, 98, .18);
}
.lh-login-mode-btn.is-active:hover { color: #fff; background: #163a62; }

#editionPicker[hidden] { display: none !important; }
.lh-edition-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin: 0 0 14px;
}
.lh-edition-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin: 0;
  padding: 12px 12px 14px;
  border: 1px solid rgba(22, 58, 98, .16);
  border-radius: 14px;
  background: rgba(255,255,255,.72);
  cursor: pointer;
}
.lh-edition-card input {
  margin: 0 0 2px;
  align-self: flex-start;
}
.lh-edition-card strong {
  font-size: 14px;
  font-weight: 800;
  color: var(--lh-royal);
}
.lh-edition-card span {
  font-size: 12px;
  line-height: 1.5;
  color: var(--lh-muted);
}
.lh-edition-card:has(input:checked) {
  border-color: var(--lh-royal);
  box-shadow: 0 0 0 2px rgba(22, 58, 98, .12);
  background: #fff;
}
@media (max-width: 640px) {
  .lh-edition-grid { grid-template-columns: 1fr; }
}

/* 登入頁：圖二全幅絲綢背景 + 圖三左側去背 + 右側對齊圖一的登入卡 */
.lh-page-login {
  background: #d8eef8;
  overflow: hidden;
  min-height: 100vh;
}
.lh-page-login .lh-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}
.lh-page-login .lh-stage {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(360px, .85fr);
  gap: clamp(24px, 4vw, 64px);
  align-items: start;
  padding: clamp(28px, 4.5vh, 56px) clamp(28px, 5vw, 72px);
}
.lh-page-login .lh-brand-col {
  position: relative;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  padding: 4px 0 0;
}
.lh-page-login .lh-brand {
  padding: 0;
  max-width: none;
  justify-content: flex-start;
}
.lh-page-login .lh-logo-row {
  margin-bottom: clamp(28px, 5vh, 48px);
  flex-wrap: nowrap;
  gap: 12px;
}
.lh-page-login .lh-kicker {
  margin: 0 0 14px;
  font-size: 12px;
  letter-spacing: .28em;
  color: #7b93ab;
}
.lh-page-login .lh-brand h1 {
  margin: 0 0 18px;
  font-size: clamp(40px, 5.4vw, 64px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -.02em;
  color: #163a62;
}
.lh-page-login .lh-lead {
  font-size: 16px;
  line-height: 1.8;
  color: #4d647c;
}
.lh-page-login .lh-lead-line {
  width: 42px;
  height: 2px;
  margin: 18px 0 28px;
  background: #9bb4cc;
  border-radius: 1px;
}
.lh-page-login .lh-feats {
  align-self: stretch;
  max-width: 680px;
  width: 100%;
  gap: 18px;
  grid-template-columns: repeat(4, minmax(108px, 1fr));
  padding: 0;
}
.lh-page-login .lh-feats i {
  width: 52px;
  height: 52px;
  border: 1px solid #c5d6e6;
  background: rgba(255,255,255,.55);
  box-shadow: none;
}
.lh-page-login .lh-feats i svg {
  width: 22px;
  height: 22px;
}
.lh-page-login .lh-feats strong {
  font-size: 14px;
}
.lh-page-login .lh-feats span {
  font-size: 12px;
  color: #6b7c90;
}
.lh-page-login .lh-login-foot {
  position: static;
  align-self: start;
  width: max-content;
  margin: 36px 0 0;
  padding-top: 14px;
  border-top: 1px solid rgba(154, 176, 196, .55);
  font-family: var(--lh-en);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .18em;
  line-height: 1.45;
  text-transform: uppercase;
  color: #8aa3b8;
  pointer-events: none;
}
.lh-page-login .lh-card {
  width: min(100%, 480px);
  max-width: none;
  height: auto;
  margin: 4px 0 0;
  padding: clamp(28px, 4vh, 40px) clamp(24px, 3vw, 36px) 28px;
  border-radius: 24px;
  border: 1px solid rgba(22,58,98,.08);
  background: #fff;
  box-shadow: 0 24px 60px rgba(22,58,98,.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-self: center;
  align-self: start;
}
.lh-page-login .lh-card-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 10px;
  border: 1.5px solid #e3edf5;
  background: #f7fafc;
}
.lh-page-login .lh-card-icon svg {
  width: 20px;
  height: 20px;
}
.lh-page-login .lh-card-head {
  margin-bottom: 16px;
}
.lh-page-login .lh-card-head h2 {
  font-size: 28px;
  letter-spacing: .18em;
  margin: 0 0 8px;
}
.lh-page-login .lh-card-head p {
  font-size: 13px;
  line-height: 1.55;
}
.lh-page-login .lh-login-mode {
  margin: 0 0 14px;
  padding: 4px;
  gap: 4px;
  background: #f4f8fc;
  border: 1px solid #d5e3f2;
  border-radius: 14px;
}
.lh-page-login .lh-login-mode-btn {
  height: 40px;
  border-radius: 10px;
  background: transparent;
  color: #3d5d82;
  font-size: 14px;
  font-weight: 700;
  box-shadow: none;
  border: 0;
}
.lh-page-login .lh-login-mode-btn:hover {
  color: #102c43;
  background: rgba(255,255,255,.85);
}
.lh-page-login .lh-login-mode-btn.is-active,
.lh-page-login .lh-login-mode-btn.is-active:hover {
  background: #163a62;
  color: #fff;
  border-color: transparent;
  box-shadow: none;
}
.lh-page-login .lh-alert {
  margin-bottom: 12px;
  padding: 9px 12px;
  font-size: 13px;
  border-radius: 10px;
}
.lh-page-login .lh-field {
  margin-bottom: 14px;
}
.lh-page-login .lh-label {
  font-size: 13px;
  margin-bottom: 6px;
}
.lh-page-login .lh-input {
  height: 46px;
  padding: 0 12px;
  border-radius: 10px;
}
.lh-page-login .lh-input > svg,
.lh-page-login .lh-eye svg {
  width: 16px;
  height: 16px;
}
.lh-page-login .lh-input input {
  font-size: 14px;
}
.lh-page-login .lh-options {
  margin: 0 0 16px;
}
.lh-page-login .lh-remember,
.lh-page-login .lh-forgot {
  font-size: 13px;
}
.lh-page-login .lh-remember input {
  width: 16px;
  height: 16px;
}
.lh-page-login .lh-submit {
  height: 48px;
  font-size: 16px;
  letter-spacing: .04em;
  box-shadow: none;
}
.lh-page-login .lh-help {
  margin: 18px 0 0;
  padding-top: 0;
  font-size: 13px;
}
.lh-page-login .lh-help-diamond {
  width: 7px;
  height: 7px;
  margin: 0 auto 8px;
}
.lh-page-login .lh-footer {
  margin-top: 10px;
}
.lh-page-login .lh-footer-links,
.lh-page-login .lh-footer-credit {
  font-size: 12px;
}

@media (max-width: 900px) {
  .lh-page-login {
    overflow: auto;
  }
  .lh-page-login .lh-stage {
    grid-template-columns: 1fr;
    padding: 24px 20px 36px;
    gap: 12px;
  }
  .lh-page-login .lh-brand-col {
    display: flex;
    flex-direction: column;
    height: auto;
    padding: 0 0 8px;
  }
  .lh-page-login .lh-brand h1 {
    font-size: 36px;
  }
  .lh-page-login .lh-feats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }
  .lh-page-login .lh-login-foot {
    position: static;
    margin: 20px 0 8px;
  }
  .lh-page-login .lh-card {
    width: min(100%, 420px);
    max-width: none;
    height: auto;
    justify-self: center;
    padding: 28px 24px 22px;
  }
}

