:root {
  --merchant-ink: #152238;
  --merchant-muted: #6b7789;
  --merchant-blue: #1d6fe8;
  --merchant-blue-soft: #eaf2ff;
  --merchant-red: #c23e4d;
  font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--merchant-ink); background: #f5f7fa; font-size: 14px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
button:focus-visible, input:focus-visible, a:focus-visible { outline: 3px solid rgba(29,111,232,.3); outline-offset: 2px; }

.merchant-auth .login-wordmark { display: flex; align-items: center; gap: 13px; }
.merchant-auth .brand-logo-image { display: block; width: 92px; height: 92px; object-fit: cover; border-radius: 14px; mix-blend-mode: screen; filter: drop-shadow(0 10px 22px rgba(0,0,0,.2)); }
.merchant-auth .login-wordmark > span:last-child,
.merchant-auth .login-wordmark strong,
.merchant-auth .login-wordmark small { display: block; }
.merchant-auth .login-wordmark strong { color: #fff; font-size: 19px; letter-spacing: .09em; }
.merchant-auth .login-wordmark small { margin-top: 4px; color: #7190aa; font-size: 8px; font-weight: 700; letter-spacing: .18em; }
.merchant-auth .login-logo-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  overflow: hidden;
  border: 1px solid rgba(155,247,242,.34);
  border-radius: 15px 6px 15px 6px;
  color: #baf9f4;
  background: linear-gradient(145deg, rgba(51,196,203,.28), rgba(39,102,183,.2));
  font-size: 13px;
  font-weight: 900;
  letter-spacing: -.08em;
  box-shadow: inset 0 0 22px rgba(101,235,229,.1), 0 12px 28px rgba(0,0,0,.16);
}
.merchant-auth .login-logo-mark::after { content: ""; position: absolute; width: 21px; height: 7px; border: 2px solid #67ded8; border-radius: 999px; transform: rotate(-38deg); opacity: .4; }
.merchant-auth .eyebrow { margin: 0 0 8px; color: #6edbd9; font-size: 11px; font-weight: 800; letter-spacing: .16em; }
.merchant-auth .status-dot { width: 8px; height: 8px; border-radius: 50%; background: #2dcc95; box-shadow: 0 0 0 4px rgba(45,204,149,.14); }
.merchant-auth .field { display: grid; gap: 9px; }
.merchant-auth .field > span:first-child { color: #35465b; font-size: 12px; font-weight: 700; }
.merchant-auth .input-shell { position: relative; display: block; }
.merchant-auth .input-shell > svg { position: absolute; z-index: 1; top: 50%; left: 15px; width: 18px; height: 18px; fill: none; stroke: #8696a9; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; transform: translateY(-50%); pointer-events: none; }
.merchant-auth .input-shell input { width: 100%; min-height: 52px; padding: 12px 54px 12px 44px; border: 1px solid #d8e0e9; border-radius: 13px; outline: none; color: var(--merchant-ink); background: #fbfcfd; transition: .16s ease; }
.merchant-auth .input-shell input:hover { border-color: #b8c6d6; }
.merchant-auth .input-shell input:focus { border-color: #2b7be8; background: #fff; box-shadow: 0 0 0 4px rgba(29,111,232,.09); }
.merchant-auth .password-toggle { position: absolute; z-index: 2; top: 50%; right: 10px; min-width: 42px; padding: 6px; border: 0; border-radius: 8px; color: #6d7d90; background: transparent; font-size: 11px; font-weight: 700; transform: translateY(-50%); }
.merchant-auth .password-toggle:hover { color: var(--merchant-blue); background: var(--merchant-blue-soft); }
.merchant-auth .login-options { display: flex; align-items: center; justify-content: space-between; gap: 14px; color: #6d7d90; font-size: 11px; }
.merchant-auth .remember-option { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; }
.merchant-auth .remember-option input { width: 15px; height: 15px; margin: 0; accent-color: var(--merchant-blue); }
.merchant-auth .secure-login { display: inline-flex; align-items: center; gap: 5px; }
.merchant-auth .secure-login i { display: grid; place-items: center; width: 15px; height: 15px; border-radius: 50%; color: #fff; background: #42ad8d; font-size: 9px; font-style: normal; }
.merchant-auth .button { min-height: 40px; padding: 0 16px; border: 1px solid transparent; border-radius: 10px; font-weight: 700; transition: .16s ease; }
.merchant-auth .button:hover { transform: translateY(-1px); }
.merchant-auth .button:disabled { cursor: not-allowed; opacity: .58; transform: none; }
.merchant-auth .button.primary { color: #fff; background: var(--merchant-blue); }
.merchant-auth .button.wide { width: 100%; }
.merchant-auth .form-error { min-height: 18px; color: var(--merchant-red); font-size: 12px; }
@keyframes login-spin { to { transform: rotate(360deg); } }

.merchant-auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(520px, 1.08fr) minmax(460px, .92fr);
  background: #f5f7fa;
}

.merchant-auth-brand {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: clamp(34px, 5vw, 72px);
  color: #fff;
  background-color: #071629;
  background-image: linear-gradient(90deg, rgba(3,16,31,.92), rgba(5,26,47,.66)), url("./lianmeng-login-bg.png");
  background-position: center;
  background-size: cover;
}

.merchant-auth-brand::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 0;
  background: linear-gradient(180deg, rgba(5,18,34,.14), rgba(4,20,38,.46));
}

.merchant-brand-bar,
.merchant-brand-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.merchant-edition {
  padding: 7px 11px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 999px;
  color: #bbccdb;
  background: rgba(5,22,40,.28);
  font-size: 10px;
  letter-spacing: .12em;
  backdrop-filter: blur(8px);
}

.merchant-brand-copy {
  max-width: 590px;
  margin: auto 0;
}

.merchant-brand-copy .eyebrow { margin-bottom: 18px; }
.merchant-brand-copy h1 {
  margin: 0;
  font-size: clamp(46px, 5vw, 68px);
  line-height: 1.14;
  letter-spacing: -.055em;
}

.merchant-brand-copy h1 span { color: #88e6e1; }
.merchant-brand-copy > p:not(.eyebrow) {
  max-width: 480px;
  margin: 26px 0 0;
  color: #b4c7d7;
  font-size: 15px;
  line-height: 1.85;
}

.commerce-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.commerce-tags span { padding: 8px 11px; border: 1px solid rgba(255,255,255,.13); border-radius: 8px; color: #c6d7e4; background: rgba(255,255,255,.045); font-size: 10px; }

.merchant-brand-bar,.merchant-brand-copy,.merchant-brand-footer { position: relative; z-index: 2; }
.merchant-brand-copy { max-width: calc(100% - 255px); }
.merchant-mascot-scene { position: absolute; z-index: 1; right: clamp(16px,3.5vw,58px); bottom: 42px; display: flex; align-items: flex-end; justify-content: center; width: clamp(205px,23vw,310px); pointer-events: none; }
.merchant-mascot-scene::before { content: ""; position: absolute; bottom: 5%; width: 76%; height: 13%; border-radius: 50%; background: rgba(33,189,201,.2); filter: blur(23px); }
.merchant-mascot-scene img { position: relative; z-index: 1; display: block; width: 100%; max-height: 57vh; object-fit: contain; filter: drop-shadow(0 22px 28px rgba(0,0,0,.25)); }
.merchant-mascot-note { position: absolute; z-index: 2; top: 11%; left: -38%; min-width: 172px; padding: 11px 14px; border: 1px solid rgba(255,255,255,.38); border-radius: 14px 14px 4px 14px; color: #17324e; background: rgba(255,255,255,.94); box-shadow: 0 14px 30px rgba(0,16,32,.2); transform: rotate(-2deg); }
.merchant-mascot-note::after { content: ""; position: absolute; right: -8px; bottom: -1px; width: 17px; height: 16px; background: inherit; clip-path: polygon(0 0,100% 100%,0 100%); }
.merchant-mascot-note strong,.merchant-mascot-note span { display: block; }
.merchant-mascot-note strong { margin-bottom: 4px; font-size: 12px; }
.merchant-mascot-note span { color: #6e8194; font-size: 9px; }

.merchant-brand-footer {
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,.1);
  color: #708ca5;
  font-size: 10px;
  letter-spacing: .12em;
}

.merchant-brand-footer a {
  color: #b7d2e4;
  font-weight: 700;
  letter-spacing: 0;
  text-decoration: none;
}

.merchant-brand-footer a:hover { color: #7ee1dd; }

.merchant-auth-panel {
  position: relative;
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 100vh;
  padding: 74px clamp(36px, 6vw, 88px);
  background: radial-gradient(circle at 100% 0, rgba(29,111,232,.055), transparent 26%), #f7f9fb;
}

.merchant-auth-box { width: min(440px, 100%); }
.auth-tabs {
  display: flex;
  gap: 28px;
  margin-bottom: 32px;
  border-bottom: 1px solid #dfe6ee;
}

.auth-tabs button {
  position: relative;
  padding: 0 2px 14px;
  border: 0;
  color: #8190a2;
  background: transparent;
  font-size: 13px;
  font-weight: 700;
}

.auth-tabs button::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  border-radius: 2px;
  background: transparent;
}

.auth-tabs button.active { color: #173b62; }
.auth-tabs button.active::after { background: linear-gradient(90deg, #1d6fe8, #21b6bc); }

.merchant-login {
  width: 100%;
  display: block;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.merchant-login:not([hidden]) { animation: merchant-form-in .2s ease; }
@keyframes merchant-form-in {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}

.merchant-form-kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 27px;
  color: #748397;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .15em;
}

.merchant-login h2 {
  margin: 0 0 10px;
  color: #14263d;
  font-size: 30px;
  letter-spacing: -.035em;
}

.merchant-form-copy {
  margin: 0 0 30px;
  color: #718095;
  line-height: 1.7;
}

.merchant-login .login-field { margin-bottom: 19px; }
.merchant-type-choice { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 0 18px; padding: 0; border: 0; }
.merchant-type-choice legend { grid-column: 1 / -1; margin-bottom: 2px; color: #35465b; font-size: 12px; font-weight: 700; }
.merchant-type-choice label { position: relative; cursor: pointer; }
.merchant-type-choice input { position: absolute; opacity: 0; pointer-events: none; }
.merchant-type-choice span { display: block; min-height: 64px; padding: 11px 12px; border: 1px solid #d8e0e9; border-radius: 12px; background: #fbfcfd; transition: .16s ease; }
.merchant-type-choice b,.merchant-type-choice small { display: block; }
.merchant-type-choice b { font-size: 12px; }
.merchant-type-choice small { margin-top: 5px; color: #8190a2; font-size: 9px; }
.merchant-type-choice input:checked + span { border-color: #2b7be8; background: #eef5ff; box-shadow: 0 0 0 3px rgba(29,111,232,.08); }
.merchant-login-options { margin: -2px 0 22px; }
.merchant-submit {
  min-height: 50px;
  margin-top: 4px;
  border-radius: 12px;
  background: linear-gradient(110deg, #1d68dc, #147f9e) !important;
  box-shadow: 0 13px 26px rgba(25,104,194,.2) !important;
}

.merchant-submit:disabled::before {
  content: "";
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 8px;
  border: 2px solid rgba(255,255,255,.38);
  border-top-color: #fff;
  border-radius: 50%;
  vertical-align: -2px;
  animation: login-spin .7s linear infinite;
}

.merchant-login .form-error {
  display: flex;
  align-items: center;
  min-height: 26px;
  margin: 8px 0 0;
}

.merchant-login .form-error:not(:empty)::before {
  content: "!";
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-right: 7px;
  border-radius: 50%;
  color: #fff;
  background: #c23e4d;
  font-size: 10px;
  font-weight: 900;
}

.merchant-demo {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 9px;
  margin-top: 12px;
  padding: 11px 12px;
  border: 1px solid #e0e6ed;
  border-radius: 10px;
  color: #8592a2;
  background: rgba(255,255,255,.58);
  font-size: 10px;
}

.merchant-demo code { color: #40566e; }
.merchant-demo button {
  padding: 5px 8px;
  border: 0;
  border-radius: 7px;
  color: #2e649f;
  background: #eaf2ff;
  font-size: 10px;
  font-weight: 700;
}

.merchant-copyright {
  position: absolute;
  bottom: 28px;
  margin: 0;
  color: #9aa6b3;
  font-size: 10px;
  letter-spacing: .04em;
}

.merchant-shell { min-height: 100vh; background: #f3f6f9; }
.merchant-header {
  position: sticky;
  z-index: 20;
  top: 0;
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px 4vw;
  color: #fff;
  background: #10213b;
  box-shadow: 0 8px 30px rgba(9,28,50,.18);
}

.merchant-header .sidebar-brand { padding: 0; }
.merchant-header nav { display: flex; gap: 5px; margin: auto; }
.merchant-header nav button {
  padding: 10px 15px;
  border: 0;
  border-radius: 9px;
  color: #9fb3c8;
  background: transparent;
}

.merchant-header nav button.active { color: #fff; background: #22708b; }
.merchant-header .button { color: #dbe5ef; border-color: #40536b; }
.merchant-main { max-width: 1500px; margin: auto; padding: 38px 28px 60px; }
.merchant-page { display: none; }
.merchant-page.active { display: block; }
.merchant-hero {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  overflow: hidden;
  margin-bottom: 20px;
  border-radius: 22px;
  color: #fff;
  background: linear-gradient(135deg,#173c6a,#16808b);
  box-shadow: 0 18px 50px rgba(20,55,85,.15);
}

.merchant-hero > div { padding: 38px; }
.merchant-hero span, .merchant-hero strong { display: block; }
.merchant-hero strong { margin: 10px 0 24px; font-size: 48px; }
.merchant-hero aside {
  display: grid;
  align-content: center;
  grid-template-columns: 110px 1fr;
  gap: 13px;
  padding: 30px;
  background: rgba(4,25,46,.24);
}

.merchant-hero aside span { color: #b9d2de; }
.merchant-metrics { grid-template-columns: repeat(4,1fr); }
.merchant-metrics strong { font-size: 24px; }
.portal-form { max-width: 560px; }
.merchant-page .two-column { grid-template-columns: 1.3fr .7fr; }
.merchant-header .sidebar-brand small { display: block; margin-top: 3px; color: #78cbd4; font-size: 10px; }
.portal-listing-panel { max-width: 900px; }
.history-fill-bar { display: grid; grid-template-columns: minmax(220px,1fr) minmax(220px,1fr) auto; gap: 14px; align-items: center; margin-bottom: 24px; padding: 16px; border: 1px solid #dbe6f1; border-radius: 14px; background: #f7fbff; }
.history-fill-bar strong,.history-fill-bar small { display: block; }
.history-fill-bar small { margin-top: 4px; color: #718095; }
.history-fill-bar select { min-height: 42px; }
.dispatch-choice { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin: 0; padding: 0; border: 0; }.dispatch-choice legend { grid-column: 1 / -1; margin-bottom: 2px; color: #35465b; font-size: 12px; font-weight: 800; }.dispatch-choice label { position: relative; cursor: pointer; }.dispatch-choice input { position: absolute; opacity: 0; pointer-events: none; }.dispatch-choice span { display: block; min-height: 68px; padding: 11px 12px; border: 1px solid #d5e0eb; border-radius: 12px; background: #fbfcfe; }.dispatch-choice b,.dispatch-choice small { display: block; }.dispatch-choice small { margin-top: 5px; color: #7a899a; font-size: 9px; line-height: 1.4; }.dispatch-choice input:checked + span { border-color: #1d6fe8; background: #eef5ff; box-shadow: 0 0 0 3px rgba(29,111,232,.08); }
.target-club-panel { padding: 14px; border: 1px dashed #a9c5e5; border-radius: 12px; background: #f5faff; }.target-club-panel > strong { display: block; margin-bottom: 10px; font-size: 11px; }.target-club-options { display: grid; grid-template-columns: repeat(2,1fr); gap: 8px; }.target-club-options label { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border: 1px solid #dce6ef; border-radius: 9px; background: #fff; font-size: 10px; cursor: pointer; }.target-club-options input { accent-color: #1d6fe8; }
.quick-option-list { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.quick-option-list > small { color: #8794a4; font-weight: 400; }
.quick-option { display: inline-flex; overflow: hidden; border: 1px solid #cad9e9; border-radius: 999px; background: #eef6ff; }
.quick-option button { min-height: 28px; padding: 4px 10px; border: 0; color: #285b8d; background: transparent; font-size: 11px; }
.quick-option button:last-child { padding-left: 5px; color: #a24751; }
.support-layout { align-items: start; grid-template-columns: .65fr 1.35fr !important; }
.wide-detail-card { width: min(760px,92vw); }
.evidence-strip,.evidence-grid { display: flex; flex-wrap: wrap; gap: 12px; }
.evidence-thumb { display: grid; gap: 5px; width: 88px; padding: 6px; border: 1px solid #d9e2ec; border-radius: 11px; color: #53677c; background: #fff; font-size: 10px; }
.evidence-thumb.large { width: 130px; }
.evidence-thumb img { width: 100%; height: 68px; object-fit: cover; border-radius: 7px; }
.evidence-thumb.large img { height: 100px; }
.evidence-file { display: inline-flex; max-width: 220px; padding: 9px 11px; border-radius: 8px; overflow-wrap: anywhere; color: #4d637a; background: #eef3f8; font-size: 11px; }
.evidence-grid figure { width: min(320px,100%); margin: 0; }
.evidence-grid figure img { display: block; width: 100%; max-height: 360px; object-fit: contain; border-radius: 12px; background: #e9eef4; }
.evidence-grid figcaption { margin-top: 6px; overflow-wrap: anywhere; color: #718095; font-size: 10px; }
.image-preview-dialog .dialog-card { width: min(1000px,92vw); }
.muted { color: #8794a4; }

@media (max-width: 1100px) {
  .merchant-auth { grid-template-columns: minmax(430px,1fr) minmax(420px,.9fr); }
  .merchant-auth-brand, .merchant-auth-panel { padding-right: 40px; padding-left: 40px; }
  .merchant-brand-copy h1 { font-size: 48px; }
  .merchant-mascot-scene { right: 20px; width: 215px; }
  .merchant-mascot-note { display: none; }
}

@media (max-width: 1000px) {
  .merchant-metrics { grid-template-columns: repeat(2,1fr); }
}

@media (max-width: 900px) {
  .merchant-auth { grid-template-columns: 1fr; }
  .merchant-auth-brand { min-height: 390px; padding: 23px 32px 23px; }
  .merchant-auth .brand-logo-image { width: 78px; height: 78px; }
  .merchant-brand-copy { max-width: calc(100% - 185px); margin: 35px 0; }
  .merchant-brand-copy h1 { font-size: 37px; }
  .merchant-brand-copy > p:not(.eyebrow) { margin-top: 16px; font-size: 13px; }
  .merchant-mascot-scene { right: 24px; bottom: 34px; width: 170px; }
  .merchant-auth-panel { min-height: 650px; padding: 70px 32px; }
}

@media (max-width: 800px) {
  .merchant-header { align-items: flex-start; flex-wrap: wrap; }
  .merchant-header nav { order: 3; width: 100%; overflow: auto; }
  .merchant-main { padding: 25px 16px; }
  .merchant-hero, .merchant-page .two-column { grid-template-columns: 1fr; }
  .history-fill-bar { grid-template-columns: 1fr; }
  .dispatch-choice,.target-club-options { grid-template-columns: 1fr; }
  .merchant-metrics { grid-template-columns: 1fr; }
  .merchant-hero aside { grid-template-columns: 90px 1fr; }
}

@media (max-width: 560px) {
  .merchant-auth-brand { min-height: 330px; padding: 18px 22px; }
  .merchant-auth .brand-logo-image { width: 66px; height: 66px; }
  .merchant-edition { font-size: 9px; }
  .merchant-brand-copy { max-width: calc(100% - 104px); margin: 27px 0; }
  .merchant-brand-copy .eyebrow { margin-bottom: 12px; }
  .merchant-brand-copy h1 { font-size: 29px; }
  .merchant-brand-copy > p:not(.eyebrow) { display: none; }
  .commerce-tags { margin-top: 14px; }
  .commerce-tags span { padding: 6px 8px; font-size: 9px; }
  .commerce-tags span:last-child { display: none; }
  .merchant-mascot-scene { right: 8px; bottom: 32px; width: 112px; }
  .merchant-brand-footer span:first-child { display: none; }
  .merchant-auth-panel { min-height: 620px; padding: 60px 22px 70px; }
  .auth-tabs { margin-bottom: 28px; }
  .merchant-copyright { bottom: 21px; }
}
