:root {
  --navy: #101d32;
  --navy-2: #172d4d;
  --orange: #ff8b0b;
  --orange-2: #f46a09;
  --ink: #18253b;
  --muted: #6f7d93;
  --line: #dce4ef;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: #f7f9fc;
}
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
.login-layout { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(420px, .92fr); }

.brand-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(28px, 4vw, 70px);
  color: #fff;
  background: radial-gradient(circle at 92% 76%, #23456e 0, transparent 40%), linear-gradient(145deg, #11213a 0%, #0d1a2e 100%);
}
.brand-panel::before, .brand-panel::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.07); border-radius: 50%; pointer-events: none; }
.brand-panel::before { width: 750px; height: 750px; right: -460px; top: -360px; }
.brand-panel::after { width: 600px; height: 600px; left: -360px; bottom: -420px; }
.brand, .intro, .brand-bottom { position: relative; z-index: 1; }
.brand { display: inline-flex; align-items: center; gap: 15px; width: fit-content; font-size: 25px; font-weight: 900; letter-spacing: .09em; }
.brand img { width: 54px; height: 54px; object-fit: contain; border-radius: 14px; background: #fff; }
.brand small { display: block; margin-top: 2px; font-size: 13px; font-weight: 500; letter-spacing: .18em; color: #c4d1e3; }
.intro { max-width: 690px; padding: 68px 0; }
.eyebrow { display: inline-block; padding: 8px 13px; border: 1px solid rgba(255,149,0,.4); border-radius: 999px; color: #ffc98d; font-size: 13px; font-weight: 700; }
.intro h1 { margin: 28px 0 17px; font-size: clamp(38px, 4vw, 64px); line-height: 1.15; letter-spacing: -.045em; }
.intro h1 em { color: #ff9830; font-style: normal; }
.intro p { max-width: 590px; margin: 0; color: #c5d3e5; font-size: clamp(16px, 1.3vw, 20px); line-height: 1.9; }
.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin-top: 58px; }
.feature { border-left: 1px solid rgba(255,255,255,.18); padding-left: 18px; }
.feature:first-child { border-left: 0; padding-left: 0; }
.feature-icon { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: 13px; border-radius: 12px; color: #ff9c34; background: rgba(255,149,0,.12); }
.feature-icon svg { width: 23px; height: 23px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feature strong { display: block; font-size: 15px; }
.feature span { display: block; margin-top: 5px; color: #aabbd0; font-size: 12px; line-height: 1.5; }
.brand-bottom { color: #8ea5c1; font-size: 12px; letter-spacing: .08em; }

.form-panel { display: flex; flex-direction: column; min-width: 0; padding: 30px clamp(22px, 3vw, 55px); background: linear-gradient(145deg, #fff, #f9fbff); }
.form-top { display: flex; justify-content: flex-end; align-items: center; gap: 14px; }
.site-link, .lang-link { color: #536780; font-size: 13px; font-weight: 700; }
.site-link:hover, .lang-link:hover { color: var(--orange-2); }
.lang-link { border: 1px solid var(--line); border-radius: 999px; padding: 8px 13px; background: #fff; }
.form-center { display: flex; flex: 1; min-width: 0; align-items: center; justify-content: center; padding: 38px 0; }
.login-card { width: 100%; max-width: 475px; min-width: 0; padding: clamp(26px, 3vw, 46px); background: #fff; border: 1px solid #edf1f6; border-radius: 25px; box-shadow: 0 24px 70px rgba(17, 33, 58, .08); }
.login-card h2 { margin: 0; font-size: 29px; letter-spacing: -.03em; }
.subhead { margin: 10px 0 25px; color: var(--muted); font-size: 14px; }
.preview-note { display: flex; align-items: flex-start; gap: 8px; padding: 11px 13px; margin-bottom: 25px; color: #9b510d; background: #fff7e9; border: 1px solid #ffdfac; border-radius: 10px; font-size: 12px; line-height: 1.6; }
.preview-note::before { content: "i"; display: inline-grid; flex: 0 0 18px; place-items: center; width: 18px; height: 18px; border: 1px solid currentColor; border-radius: 50%; font-size: 12px; font-weight: 800; }
.field { display: block; margin: 0 0 20px; }
.field-label { display: block; margin-bottom: 9px; font-size: 14px; font-weight: 750; }
.input-wrap { position: relative; }
.input-wrap input { width: 100%; height: 52px; padding: 0 45px 0 15px; color: var(--ink); outline: none; border: 1px solid var(--line); border-radius: 11px; background: #fbfcff; transition: border .2s, box-shadow .2s; }
.input-wrap input::placeholder { color: #a5b1c3; }
.input-wrap input:focus { border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255,149,0,.12); }
.show-password { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); border: 0; background: transparent; color: #697a92; padding: 9px; cursor: pointer; font-size: 12px; }
.show-password:hover { color: var(--orange-2); }
.form-options { display: flex; align-items: center; justify-content: flex-end; margin: -2px 0 22px; }
.help-link { padding: 0; border: 0; background: none; color: #2472c9; font-size: 13px; cursor: pointer; }
.help-link:hover { text-decoration: underline; }
.submit { display: block; width: 100%; height: 52px; border: 0; border-radius: 11px; background: linear-gradient(110deg, var(--orange), var(--orange-2)); color: #fff; font-weight: 800; font-size: 16px; cursor: pointer; box-shadow: 0 12px 25px rgba(255,130,17,.2); }
.submit:hover { filter: brightness(.97); }
.status { min-height: 22px; margin: 13px 0 0; color: #ad5707; font-size: 13px; line-height: 1.5; text-align: center; }
.account-hint { display: flex; align-items: center; gap: 12px; margin-top: 16px; color: #8390a3; font-size: 12px; white-space: nowrap; }
.account-hint::before, .account-hint::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.security-note { margin: 0 auto; color: #6d7e95; text-align: center; font-size: 12px; line-height: 1.7; }
.security-note strong { color: #2d4a6b; }

@media (max-width: 980px) {
  .login-layout { grid-template-columns: minmax(0, 1fr); }
  .brand-panel { min-height: auto; padding: 25px 30px; }
  .intro { padding: 28px 0 4px; }
  .intro h1 { margin: 14px 0 8px; font-size: 34px; }
  .intro p { font-size: 15px; line-height: 1.6; }
  .features, .brand-bottom { display: none; }
  .form-panel { min-height: 590px; }
}
@media (max-width: 540px) {
  .brand-panel { padding: 22px 20px; }
  .brand { font-size: 20px; }
  .brand img { width: 45px; height: 45px; }
  .intro h1 { font-size: 29px; }
  .eyebrow { font-size: 11px; }
  .form-panel { padding: 18px 16px 25px; }
  .form-center { align-items: flex-start; padding: 26px 0; }
  .login-card { padding: 25px 20px; border-radius: 20px; }
  .login-card h2 { font-size: 25px; }
  .account-hint { white-space: normal; text-align: center; }
}

/* Reference layout: the public preview keeps the form separate from the API. */
.login-layout { position: relative; display: block; overflow: hidden; min-height: 100vh; background: #fcfdff; }
.brand-panel {
  position: absolute;
  z-index: 1;
  inset: 0 auto 0 0;
  width: 58%;
  min-height: 100vh;
  padding: 72px clamp(48px, 5.5vw, 90px) 32px;
  display: block;
  clip-path: polygon(0 0, 100% 0, 88% 100%, 0 100%);
  background: linear-gradient(150deg, #19365c 0%, #101f37 49%, #10203a 100%);
}
.brand-panel::before { width: 880px; height: 880px; right: -420px; top: -450px; border: 0; background: rgba(64, 112, 173, .11); }
.brand-panel::after { display: none; }
.storefront {
  position: absolute;
  inset: auto 0 0 0;
  height: 42%;
  background-image: linear-gradient(180deg, #12233d 0%, rgba(16, 31, 54, .05) 38%, rgba(5, 17, 35, .2) 100%), url("merchant-storefront.jpg");
  background-position: center, center 65%;
  background-size: cover;
  opacity: .88;
}
.brand { gap: 15px; color: #fff; font-size: 42px; letter-spacing: .08em; white-space: nowrap; }
.brand-v { flex: none; width: 94px; height: 73px; }
.brand-name { display: block; line-height: .95; }
.brand-name small { margin-top: 15px; font-size: 9px; letter-spacing: .45em; color: #acb9cd; }
.brand-divider { height: 46px; width: 1px; margin: 0 8px 0 7px; background: rgba(231, 238, 250, .4); }
.brand-portal { color: #d8e1ee; font-size: 26px; font-weight: 600; letter-spacing: .08em; }
.intro { max-width: 760px; padding: 0; margin-top: clamp(70px, 9vh, 120px); }
.intro h1 { margin: 0 0 19px; color: #fff; font-size: clamp(48px, 4.7vw, 78px); line-height: 1.18; letter-spacing: -.06em; }
.login-zh .intro h1 { white-space: nowrap; }
.intro h1 em { color: #ff8125; }
.intro p { max-width: 700px; font-size: clamp(17px, 1.6vw, 24px); line-height: 1.6; color: #e2eaf5; white-space: nowrap; }
.features { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 65px; gap: 0; max-width: 690px; }
.feature { padding: 0 23px; border-left: 1px solid rgba(226, 234, 245, .24); }
.feature:first-child { padding-left: 0; }
.feature-icon { width: 47px; height: 47px; margin-bottom: 15px; border-radius: 0; color: #fff; background: none; }
.feature-icon svg { width: 43px; height: 43px; stroke-width: 1.4; }
.feature strong { font-size: 18px; letter-spacing: .03em; }
.feature span { font-size: 13px; margin-top: 5px; color: #bac9dd; }
.brand-bottom { position: absolute; left: clamp(48px, 5.5vw, 90px); bottom: 28px; color: #d2dbe8; font-size: 10px; letter-spacing: .3em; }

.form-panel { min-height: 100vh; padding: 35px 3.5vw 32px 60%; background: radial-gradient(circle at 100% 100%, #f4f8fe 0, transparent 30%), #fcfdff; }
.form-top { min-height: 42px; }
.form-top .site-link { display: none; }
.lang-link { display: inline-flex; align-items: center; gap: 13px; padding: 11px 17px; border-radius: 8px; font-size: 14px; color: #182438; }
.lang-link span:first-child { font-size: 23px; line-height: .6; }
.lang-link span:last-child { margin-left: 5px; }
.lang-menu { position: relative; }
.lang-menu summary { list-style: none; cursor: pointer; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-menu > a { position: absolute; z-index: 5; top: calc(100% + 5px); right: 0; min-width: 100%; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; box-shadow: 0 10px 25px rgba(27,48,76,.12); color: var(--ink); font-size: 13px; white-space: nowrap; }
.lang-menu > a:hover { color: var(--orange-2); }
.form-center { padding: 28px 0 32px; }
.login-card { max-width: 540px; padding: 40px 40px 39px; border: 1px solid #eff2f6; border-radius: 13px; box-shadow: 0 22px 55px rgba(27, 48, 76, .08); }
.login-card h2 { font-size: 29px; text-align: center; }
.subhead { margin: 9px 0 35px; text-align: center; font-size: 17px; }
.field { margin-bottom: 27px; }
.field-label { font-size: 16px; margin-bottom: 10px; }
.input-wrap input { height: 56px; padding-left: 61px; border-radius: 7px; background: #fff; font-size: 15px; }
.input-icon { position: absolute; display: grid; place-items: center; left: 16px; top: 50%; width: 26px; height: 26px; transform: translateY(-50%); color: #1b2b44; }
.input-icon svg { width: 23px; height: 23px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.show-password { right: 10px; }
.form-options { justify-content: space-between; margin: -2px 0 25px; }
.remember { display: inline-flex; align-items: center; gap: 11px; color: #45556c; font-size: 14px; cursor: pointer; }
.remember input { width: 20px; height: 20px; margin: 0; accent-color: var(--orange); }
.help-link { color: #146ad0; font-size: 14px; }
.submit { height: 54px; border-radius: 7px; background: linear-gradient(110deg, #ff761f, #ff7d26); box-shadow: none; }
.status { margin-top: 8px; }
.account-hint { margin-top: 17px; font-size: 13px; }
.preview-note { margin: 17px 0 0; padding: 8px 10px; font-size: 11px; }
.security-note { font-size: 13px; }
.security-note strong { font-size: 16px; color: #1a2b45; }

@media (max-width: 1300px) and (min-width: 981px) {
  .brand-panel { padding-top: 48px; }
  .brand { font-size: 33px; }
  .brand-v { width: 73px; height: 59px; }
  .brand-portal { font-size: 20px; }
  .brand-name small { font-size: 7px; }
  .intro { margin-top: 10vh; }
  .intro h1 { font-size: 4.5vw; }
  .intro p { font-size: 1.5vw; }
  .feature { padding: 0 11px; }
  .feature strong { font-size: 15px; }
  .feature span { font-size: 11px; }
  .login-card { padding: 32px 28px; }
}
@media (max-width: 980px) {
  .brand-panel { position: relative; inset: auto; width: 100%; min-height: 275px; clip-path: none; padding: 28px 28px 35px; }
  .storefront { height: 100%; opacity: .2; background-position: center; }
  .brand { font-size: 29px; }
  .brand-v { width: 65px; height: 51px; }
  .brand-portal { font-size: 19px; }
  .brand-name small { font-size: 7px; }
  .brand-divider { height: 34px; }
  .intro { margin-top: 28px; }
  .intro h1 { margin-bottom: 7px; font-size: 38px; }
  .intro p { font-size: 15px; white-space: normal; }
  .features, .brand-bottom { display: none; }
  .form-panel { min-height: 630px; padding: 18px 22px 27px; }
  .form-top .site-link { display: inline; }
  .form-top { justify-content: space-between; }
  .form-center { padding: 28px 0 35px; }
}
@media (max-width: 540px) {
  .brand-panel { min-height: 240px; padding: 21px 17px 28px; }
  .brand { gap: 8px; font-size: 22px; }
  .brand-v { width: 48px; height: 40px; }
  .brand-portal { font-size: 14px; }
  .brand-divider { height: 28px; margin: 0 4px; }
  .brand-name small { display: none; }
  .intro h1 { font-size: clamp(26px, 7vw, 35px); }
  .intro p { font-size: 13px; }
  .form-panel { padding: 15px 15px 25px; }
  .lang-link { padding: 8px 11px; font-size: 12px; }
  .form-center { padding: 22px 0 30px; }
  .login-card { padding: 26px 21px; }
  .login-card h2 { font-size: 24px; }
  .subhead { font-size: 14px; margin-bottom: 25px; }
  .field { margin-bottom: 20px; }
  .field-label { font-size: 14px; }
  .input-wrap input { height: 51px; }
  .security-note strong { font-size: 14px; }
}

/* Scale the desktop composition with the viewport, matching the 1536×1024 reference. */
@media (min-width: 981px) {
  .brand-panel { width: 57.3%; clip-path: polygon(0 0, 100% 0, 88.4% 100%, 0 100%); padding: 7.7vh 5.5vw 3vh; }
  .brand-panel::before { top: 0; right: 0; width: 100%; height: 43%; border: 0; border-radius: 0; background: rgba(55, 100, 164, .15); clip-path: polygon(75% 0, 100% 0, 100% 100%, 48% 100%); }
  .brand { gap: 1vw; font-size: 4.1vh; }
  .brand-v { width: 6.1vw; height: auto; }
  .brand-name { position: relative; width: 12vw; }
  .brand-name small { position: absolute; top: 100%; left: 0; white-space: nowrap; margin-top: 1.4vh; font-size: .85vh; }
  .brand-divider { height: 4.5vh; margin: 0 .5vw; }
  .brand-portal { font-size: 2.6vh; }
  .intro { margin-top: 6.8vh; }
  .intro h1 { font-size: 8.4vh; margin-bottom: 1vh; }
  .intro p { font-size: 2.35vh; }
  .features { max-width: none; margin-top: 6.7vh; }
  .feature { padding: 0 1.6vw; }
  .feature-icon { width: 4.6vh; height: 4.6vh; margin-bottom: 1.5vh; }
  .feature-icon svg { width: 4.3vh; height: 4.3vh; }
  .feature strong { font-size: 1.8vh; }
  .feature span { font-size: 1.3vh; }
  .brand-bottom { display: none; }
  .storefront { height: 42%; background-image: url("merchant-login-reference.jpg"); background-size: 100vw 100vh; background-position: left bottom; opacity: 1; mask-image: linear-gradient(to bottom, transparent, #000 18%, #000); }

  .form-panel { padding: 0; min-height: 100vh; }
  .form-panel::before { content: ""; position: absolute; right: 0; bottom: 0; width: 23vw; height: 22vh; background: #f4f7fc; clip-path: polygon(45% 0, 100% 83%, 100% 100%, 0 100%); pointer-events: none; }
  .form-top { position: absolute; z-index: 2; top: 4.3vh; right: 3.6vw; min-height: 0; }
  .lang-link { padding: 1vh 1.15vw; gap: .8vw; font-size: 1.4vh; }
  .lang-link span:first-child { font-size: 2.2vh; }
  .form-center { position: absolute; top: 16.6vh; right: 4.55vw; display: block; width: 35.1vw; min-width: 0; padding: 0; }
  .login-card { width: 100%; max-width: none; min-height: 58.7vh; padding: 4.05vh 2.65vw 3.6vh; border-radius: 1.3vh; }
  .login-card h2 { font-size: 2.9vh; }
  .subhead { margin: .8vh 0 4.2vh; font-size: 1.65vh; }
  .field { margin-bottom: 2.9vh; }
  .field-label { margin-bottom: .9vh; font-size: 1.6vh; }
  .input-wrap input { height: 5.45vh; padding-left: 4vw; font-size: 1.5vh; }
  .input-icon { left: 1.2vw; width: 2.6vh; height: 2.6vh; }
  .input-icon svg { width: 2.3vh; height: 2.3vh; }
  .form-options { margin: -.1vh 0 3.1vh; }
  .remember, .help-link { font-size: 1.4vh; }
  .remember input { width: 1.9vh; height: 1.9vh; }
  .submit { height: 5.3vh; font-size: 1.6vh; }
  .account-hint { margin-top: 2.9vh; font-size: 1.3vh; }
  .status:empty { display: none; }
  .security-note { position: absolute; right: 4.55vw; bottom: 13.4vh; width: 35.1vw; font-size: 1.35vh; }
  .security-note strong { font-size: 1.7vh; }
}
.show-password { display: grid; place-items: center; width: 34px; height: 34px; }
.demo-login-hint{display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:5px 10px;margin-top:12px;padding:9px 10px;border:1px solid #ffdfbd;border-radius:7px;background:#fff8f0;color:#8c5528;font-size:12px;text-align:center}
.demo-login-hint strong{color:#e66b13}.demo-login-hint span{word-break:break-word}
.demo-login-hint+.account-hint{margin-top:12px}
@media(min-width:981px){.demo-login-hint{font-size:1.18vh;padding:.8vh .6vw;margin-top:1vh}.demo-login-hint+.account-hint{margin-top:1.1vh}}
.show-password svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.show-password .eye-slash { display: block; }
.show-password[aria-pressed="true"] .eye-slash { display: none; }
@media (max-width: 980px) {
  .show-password { width: 34px; height: 34px; }
  .brand-bottom { display: none; }
}
