*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  color-scheme: dark;
  --bg: #090e0d;
  --bg-soft: #0d1412;
  --panel: #101917;
  --panel-strong: #141f1c;
  --line: #26332f;
  --line-strong: #35443e;
  --line-hot: rgba(82, 207, 177, 0.55);
  --text: #f1f5f2;
  --soft: #c6d0ca;
  --muted: #98a49e;
  --cyan: #5acdb4;
  --green: #56c9a8;
  --gold: #e8b960;
  --gold-soft: #f1cb7d;
  --amber: #f1cb7d;
  --danger: #f18178;
  --warn: #e8b960;
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.24);
  --radius: 8px;
  --fs-xs: 12px;
  --fs-sm: 13px;
  --fs-body: 15px;
  --fs-panel: 18px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

html {
  scroll-behavior: smooth;
  background: var(--bg);
}

body,
html,
html body {
  color: var(--text);
  background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: 0;
}

body::before,
body::after {
  display: none;
  content: none;
}

button,
input,
select,
textarea {
  color: var(--text);
  font: inherit;
  letter-spacing: 0;
}

button,
a,
input,
select,
textarea,
summary {
  -webkit-tap-highlight-color: transparent;
}

button,
a,
summary {
  transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease, opacity 140ms ease;
}

:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

[hidden] {
  display: none !important;
}

.brand-mark,
.brand-symbol,
.mobile-brand > span {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  padding: 0;
  border: 1px solid rgba(241, 203, 125, 0.3);
  border-radius: 8px;
  background: #20251f;
  color: var(--gold-soft);
  box-shadow: none;
}

.brand-mark img,
.mobile-brand img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.primary-action,
.primary-btn,
.sticky-submit button,
.ops-login-button {
  min-height: 44px;
  border: 1px solid #f0c66f;
  border-radius: 6px;
  background: var(--gold-soft);
  color: #17140c;
  font-size: 15px;
  font-weight: 700;
  box-shadow: none;
}

.primary-action:hover,
.primary-btn:hover,
.sticky-submit button:hover,
.ops-login-button:hover {
  border-color: #ffe0a0;
  background: #ffda8b;
}

.primary-action:disabled,
.primary-btn:disabled,
.sticky-submit button:disabled,
button[aria-busy="true"] {
  cursor: wait;
  opacity: 0.62;
}

.secondary-action,
.ghost-btn,
.method-button,
.method-pill,
.admin-link,
.topbar-actions a,
.ops-wecom-button {
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #151e1b;
  color: var(--soft);
}

.secondary-action:hover,
.ghost-btn:hover,
.method-button:hover,
.method-pill:hover,
.admin-link:hover,
.topbar-actions a:hover,
.ops-wecom-button:hover {
  border-color: var(--cyan);
  background: #192a25;
  color: var(--text);
}

input,
select,
textarea {
  min-height: 44px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #0b1210;
  color: var(--text);
}

input::placeholder,
textarea::placeholder {
  color: #748079;
  opacity: 1;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--cyan);
  outline: 2px solid rgba(90, 205, 180, 0.16);
  outline-offset: 0;
}

/* Desktop customer flow */
.app-shell:not(.admin-lite) {
  display: block;
  width: min(1320px, calc(100% - 64px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 0 48px;
}

.app-shell:not(.admin-lite) .topbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  position: relative;
  min-height: 72px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.app-shell:not(.admin-lite) .topbar::after {
  display: none;
}

.brand {
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.brand-mark {
  width: 36px;
  height: 36px;
}

.brand strong {
  font-size: 16px;
  font-weight: 700;
}

.brand small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 11px;
}

.nav-links {
  grid-column: 2;
  gap: 24px;
  color: var(--muted);
}

.nav-links a {
  font-size: 14px;
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--cyan);
}

.app-shell:not(.admin-lite) .topbar-actions a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 12px;
  text-decoration: none;
}

.app-shell:not(.admin-lite) .topbar-actions {
  grid-column: 3;
  justify-self: end;
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
  gap: 32px;
  align-items: center;
  margin: 30px 0 24px;
}

.hero-copy,
.quick-status {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.hero-copy {
  min-height: 0;
  padding: 12px 0;
}

.hero-kicker {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: 13px;
  font-weight: 650;
}

.hero-copy h1 {
  max-width: 680px;
  margin: 0;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.2;
}

.hero-copy p {
  max-width: 58ch;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
}

.quick-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  min-width: 0;
  padding: 8px 0;
  border-left: 1px solid var(--line);
  box-shadow: none;
}

.quick-status div {
  min-width: 0;
  padding: 8px 14px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.quick-status div + div {
  border-left: 1px solid var(--line);
}

.quick-status small,
.quick-status span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.quick-status strong {
  display: block;
  margin: 8px 0 3px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.3;
}

.quick-status .compact-value {
  color: var(--gold-soft);
  font-size: 15px;
}

.quick-status .status-value {
  color: var(--cyan);
  font-size: 15px;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(230px, 0.9fr) minmax(300px, 1.25fr) minmax(245px, 0.95fr);
  gap: 14px;
  align-items: start;
}

.panel,
.order-panel,
.pay-panel,
.result-panel {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: none;
  backdrop-filter: none;
}

.panel {
  padding: 20px;
}

.panel-head {
  min-height: 0;
  gap: 8px;
  margin-bottom: 18px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.panel-head > span {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #18231f;
  color: var(--cyan);
  font-size: 12px;
}

.panel-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.35;
}

.panel-head p,
.panel-head .panel-hint {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.software-list,
.duration-tabs {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.software-button,
.duration-button {
  min-width: 0;
  min-height: 56px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #121c19;
  box-shadow: none;
}

.software-button {
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 10px;
  padding: 8px 10px;
  text-align: left;
}

.software-button:hover,
.duration-button:hover {
  border-color: var(--line-strong);
  background: #18231f;
  transform: none;
}

.software-button.active,
.duration-button.active {
  border-color: var(--cyan);
  background: #172822;
  box-shadow: inset 3px 0 0 var(--cyan);
}

.product-icon {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  border-radius: 6px;
  box-shadow: none;
}

.software-copy strong {
  align-items: flex-start;
  color: var(--text);
  font-size: 14px;
  line-height: 1.4;
}

.software-copy em {
  flex: 0 0 auto;
  color: var(--gold-soft);
  font-size: 12px;
  font-style: normal;
}

.software-copy small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.duration-button {
  gap: 10px;
  min-height: 54px;
  padding: 9px 11px;
  text-align: left;
}

.duration-button strong {
  font-size: 14px;
  line-height: 1.35;
}

.duration-button small {
  font-size: 12px;
}

.duration-button b {
  color: var(--gold-soft);
  font-size: 16px;
}

.feature-box {
  margin-top: 14px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0d1512;
}

.feature-box > small {
  color: var(--muted);
  font-size: 12px;
}

.feature-box ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.65;
}

.selected-card,
.order-card,
.empty-code,
.code-output {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0d1512;
  box-shadow: none;
}

.selected-card {
  gap: 14px;
  padding: 14px;
}

.selected-card small,
.order-card small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.selected-card strong,
.order-card strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 15px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.checkout-flow {
  display: flex;
  gap: 8px;
  margin: 16px 0;
  padding: 12px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.checkout-flow span {
  flex: 1;
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.checkout-flow span:last-child {
  color: var(--cyan);
}

.checkout-note,
.pay-hero p,
.privacy-grid p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

.primary-action {
  width: 100%;
}

.info-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 24px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.info-strip article {
  min-width: 0;
  padding: 16px 18px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.info-strip article + article {
  border-left: 1px solid var(--line);
}

.info-strip span {
  color: var(--cyan);
  font-size: 12px;
}

.info-strip strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 14px;
}

.info-strip p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.privacy-detail {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0d1512;
  box-shadow: none;
}

.privacy-detail summary {
  min-height: 44px;
  padding: 12px 14px;
  color: var(--soft);
}

.privacy-grid {
  padding: 0 14px 12px;
}

.ops-entry {
  display: grid;
  grid-template-columns: minmax(180px, 0.8fr) minmax(320px, 1.2fr);
  gap: 18px 28px;
  align-items: start;
  margin-top: 26px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.ops-entry > div {
  color: var(--muted);
}

.ops-entry strong {
  display: block;
  margin-top: 5px;
  color: var(--text);
  font-size: 16px;
}

.ops-entry > div p {
  max-width: 48ch;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.ops-login-link {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-self: start;
  gap: 12px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #151e1b;
  color: var(--soft);
  font-size: 14px;
  text-decoration: none;
}

.ops-login-link:hover {
  border-color: var(--cyan);
  color: var(--text);
}

.ops-login-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ops-login-form label,
.login-form label,
.mini-form label,
.h5-form label {
  display: grid;
  gap: 7px;
  color: var(--soft);
  font-size: 13px;
  font-weight: 600;
}

.ops-login-form input,
.login-form input,
.mini-form input,
.h5-form input,
.h5-form textarea,
.h5-form select {
  width: 100%;
  padding: 10px 12px;
}

.ops-login-actions {
  display: flex;
  gap: 8px;
  grid-column: 1 / -1;
}

.ops-login-button,
.ops-wecom-button {
  min-height: 42px;
  padding: 0 14px;
}

.ops-login-error {
  grid-column: 2;
  color: var(--danger);
}

.ops-qr-panel {
  grid-column: 2;
  max-width: 430px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
}

.ops-qr-panel iframe,
.qr-login-panel iframe {
  width: 100%;
  min-height: 320px;
  border: 0;
  border-radius: 6px;
  background: #fff;
}

.wechat-float {
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #17231f;
  color: var(--soft);
  box-shadow: var(--shadow);
}

.wechat-float:hover,
.wechat-float:focus-visible {
  border-color: var(--cyan);
  background: #1b2d27;
  color: var(--text);
}

.wechat-window {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #101917;
  box-shadow: var(--shadow);
}

.wecom-direct-panel,
.wecom-backup-qr {
  border-color: var(--line);
  border-radius: 6px;
  background: #0d1512;
}

/* Payment and retrieval */
.pay-shell {
  max-width: 1120px;
}

.pay-hero {
  display: block;
  min-height: 0;
  margin: 24px 0;
  padding: 10px 0 18px;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.pay-hero > div {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.pay-hero h1 {
  margin: 0;
  font-size: 30px;
  line-height: 1.25;
}

.pay-hero p {
  max-width: 68ch;
  margin: 8px 0 0;
}

.back-link {
  color: var(--cyan);
}

.pay-page .pay-hero .back-link {
  display: inline-flex;
  min-height: 40px;
  padding: 0 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.payment-layout {
  display: grid;
  grid-template-columns: minmax(230px, 0.9fr) minmax(300px, 1.2fr) minmax(220px, 0.85fr);
  gap: 14px;
  align-items: start;
}

.payment-layout > .panel {
  padding: 20px;
}

.order-card {
  padding: 14px;
}

.order-card + .order-card {
  margin-top: 10px;
}

.order-card.highlight b,
.pay-price,
#payPrice {
  color: var(--gold-soft);
  font-size: 24px;
}

.pay-methods {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.method-button,
.method-pill {
  min-height: 42px;
  padding: 8px 12px;
  cursor: pointer;
}

.method-button.active,
.method-pill.active {
  border-color: var(--cyan);
  background: #173128;
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--cyan);
}

.qr-row,
.pay-code-grid {
  gap: 10px;
}

.payment-safety-note {
  margin: 10px 0 0;
  padding: 10px 12px;
  border: 1px solid rgba(241, 203, 125, 0.28);
  border-radius: 6px;
  background: #1b1710;
  color: #d9c59b;
  font-size: 12px;
  line-height: 1.55;
}

.qr-slot,
.qr-placeholder {
  min-height: 150px;
  border: 1px dashed var(--line-strong);
  border-radius: 6px;
  background: #0b1210;
  color: var(--muted);
  box-shadow: none;
}

.qr-slot.active {
  border-color: rgba(90, 205, 180, 0.5);
  background: #0d1713;
}

.qr-slot::before {
  content: none;
  display: none;
}

.mini-form {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.empty-code {
  padding: 18px;
}

.empty-code strong {
  display: block;
  color: var(--text);
}

.empty-code p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.retrieve-link {
  display: inline-flex;
  margin-top: 14px;
  color: var(--cyan);
}

/* H5 and WeCom screens */
.h5-page {
  min-height: 100vh;
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.h5-shell {
  width: min(100%, 560px);
  padding: 16px 16px 112px;
}

.mobile-hero {
  min-height: 0;
  gap: 18px;
  padding: 12px 4px 22px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.mobile-topbar {
  min-height: 44px;
  gap: 10px;
}

.mobile-brand {
  gap: 8px;
  font-size: 15px;
}

.mobile-brand > span {
  width: 32px;
  height: 32px;
}

.mobile-brand > span > .brand-symbol {
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: inherit;
  font-size: 17px;
}

.mobile-top-actions {
  gap: 6px;
}

.admin-link {
  min-height: 34px;
  padding: 0 9px;
  color: var(--soft);
  font-size: 12px;
  white-space: nowrap;
}

.hero-console {
  align-items: flex-start;
  gap: 14px;
}

.hero-console h1 {
  max-width: none;
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.25;
}

.hero-desc {
  max-width: 38ch;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.signal-stack {
  flex: 0 0 auto;
  min-width: 76px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #111a17;
  text-align: center;
}

.signal-stack span,
.signal-stack small {
  color: var(--muted);
  font-size: 11px;
}

.signal-stack strong {
  color: var(--cyan);
  font-size: 20px;
}

.trust-strip {
  flex-wrap: wrap;
  gap: 4px 14px;
  margin: 0;
}

.trust-strip span,
.trust-strip a {
  padding: 4px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--soft);
  font-size: 12px;
}

.mobile-panel {
  margin: 0;
  padding: 22px 4px;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.section-title {
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 14px;
}

.section-title > span {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #17211d;
  color: var(--cyan);
  font-size: 11px;
}

.section-title h2 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  line-height: 1.35;
}

.section-title p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.product-rail {
  gap: 8px;
  margin: 0 -4px;
  padding: 2px 4px 8px;
}

.product-chip {
  flex-basis: 176px;
  min-height: 68px;
  grid-template-columns: 34px minmax(0, 1fr);
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #111a17;
  box-shadow: none;
}

.product-chip.active,
.plan-card.active {
  border-color: var(--cyan);
  background: #15251f;
  box-shadow: inset 3px 0 0 var(--cyan);
}

.product-chip .product-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
}

.product-chip strong {
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
}

.product-chip small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.plan-list {
  display: grid;
  gap: 8px;
}

.plan-card {
  width: 100%;
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #111a17;
  box-shadow: none;
  text-align: left;
}

.plan-top strong {
  color: var(--text);
  font-size: 14px;
}

.plan-top em {
  color: var(--gold-soft);
  font-size: 17px;
  font-style: normal;
  font-weight: 700;
}

.plan-meta,
.feature-line {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.pay-methods {
  gap: 8px;
}

.pay-code-grid {
  margin: 12px 0;
}

.pay-code {
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
}

.qr-placeholder {
  min-height: 124px;
}

.qr-placeholder span {
  max-width: calc(100% - 20px);
  padding: 8px 10px;
  border: 1px dashed var(--line-strong);
  border-radius: 4px;
  color: var(--muted);
  text-align: center;
}

.h5-form {
  gap: 14px;
}

.h5-form label {
  color: var(--soft);
  font-size: 13px;
}

.h5-form input,
.h5-form textarea,
.h5-form select {
  min-height: 46px;
  border-radius: 6px;
  background: #0b1210;
  font-size: 15px;
}

.h5-form textarea {
  min-height: 88px;
}

.primary-action {
  min-height: 48px;
}

.sticky-submit {
  position: fixed;
  z-index: 20;
  right: auto;
  bottom: max(10px, env(safe-area-inset-bottom));
  left: 50%;
  display: flex;
  width: min(528px, calc(100% - 24px));
  min-height: 64px;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 9px 10px 9px 14px;
  transform: translateX(-50%);
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #111a17;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
}

.h5-page .sticky-submit {
  position: static;
  width: min(528px, 100%);
  min-height: 64px;
  margin: 12px auto 20px;
  transform: none;
}

.h5-page .h5-shell {
  padding-bottom: 24px;
}

.sticky-submit small {
  display: block;
  max-width: 220px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sticky-submit strong {
  display: block;
  color: var(--gold-soft);
  font-size: 16px;
}

.sticky-submit button {
  flex: 0 0 112px;
  min-height: 44px;
}

.sticky-submit > div {
  flex: 1 1 auto;
  width: auto;
}

.sticky-submit .wechat-trigger {
  flex: 0 0 48px;
  width: 48px;
  height: 44px;
  min-height: 44px;
  border: 1px solid var(--line-strong);
  background: #151e1b;
  color: var(--soft);
  font-size: 11px;
}

.form-message,
.message {
  min-height: 22px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.form-message.ok,
.message:not(.bad):not(.error) {
  color: var(--cyan);
}

.form-message.bad,
.message.bad,
.message.error,
.catalog-error {
  color: var(--danger);
}

.mobile-loading,
.mobile-error {
  min-height: 44px;
  padding: 12px 0;
  color: var(--muted);
  font-size: 13px;
}

.retrieve-order,
.retrieve-card-code,
.admin-order,
.xianyu-card,
.admin-alert,
.mobile-sales-plan,
.mobile-delivery-card,
.mobile-handoff-box,
.xianyu-quick-issue {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #111a17;
  box-shadow: none;
}

.retrieve-order,
.admin-order,
.xianyu-card,
.admin-alert {
  padding: 12px;
}

.retrieve-card-code strong,
.admin-order strong,
.xianyu-card strong,
.admin-alert strong {
  overflow-wrap: anywhere;
  color: var(--text);
}

.copy-unavailable {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.retrieve-card-code button,
.action-grid button,
.mobile-handoff-actions button {
  min-height: 40px;
  border-radius: 6px;
}

.wechat-card {
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #111a17;
  box-shadow: var(--shadow);
}

.wechat-trigger {
  width: 44px;
  height: 44px;
  min-height: 44px;
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #151e1b;
  color: var(--soft);
  font-size: 11px;
  box-shadow: var(--shadow);
}

/* Desktop operations and login */
.admin-lite.app-shell {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  width: 100%;
  max-width: none;
  min-height: 100vh;
  margin: 0;
  padding: 0;
}

.admin-lite .sidebar {
  position: sticky;
  top: 0;
  z-index: 2;
  height: 100vh;
  padding: 22px 16px;
  border-right: 1px solid var(--line);
  background: #0c1311;
  backdrop-filter: none;
}

.admin-lite .brand-mark {
  width: 36px;
  height: 36px;
}

.admin-lite .brand-name {
  color: var(--text);
  font-size: 15px;
}

.admin-lite .brand-sub {
  color: var(--muted);
}

.admin-lite .nav {
  gap: 4px;
}

.admin-lite .nav-item {
  min-height: 42px;
  padding: 10px 11px;
  border-radius: 6px;
  color: var(--muted);
}

.admin-lite .nav-item:hover,
.admin-lite .nav-item.active {
  border-color: var(--line);
  background: #17211d;
  color: var(--text);
}

.admin-shortcuts {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  gap: 7px;
  overflow-x: auto;
  margin: 0 -14px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 14, 13, 0.96);
  scrollbar-width: none;
}

.admin-shortcuts::-webkit-scrollbar {
  display: none;
}

.admin-shortcuts a {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 34px;
  align-items: center;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--soft);
  font-size: 12px;
  text-decoration: none;
}

.admin-shortcuts a:hover,
.admin-shortcuts a:focus-visible {
  border-color: var(--cyan);
  color: var(--text);
}

.admin-lite .side-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: transparent;
}

.admin-lite .main {
  width: min(1500px, 100%);
  min-width: 0;
  margin: 0 auto;
  padding: 28px clamp(20px, 3vw, 44px) 56px;
}

.admin-header {
  min-height: 0;
  margin: 0 0 18px;
  padding: 0 0 20px;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.admin-header h1 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 30px;
  font-weight: 700;
}

.admin-header p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.admin-lite .hero-kicker {
  color: var(--cyan);
}

.stats-grid,
.overview-grid {
  gap: 10px;
}

.metric-card,
.admin-lite .metric-card {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #111a17;
  box-shadow: none;
}

.metric-label {
  color: var(--muted);
  font-size: 12px;
}

.metric-value {
  color: var(--text);
  font-size: 24px;
  font-weight: 700;
}

.task-board {
  gap: 8px;
  margin: 16px 0 20px;
}

.task-card {
  min-height: 100px;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #111a17;
  box-shadow: none;
}

.task-card:hover {
  border-color: var(--cyan);
  background: #15221d;
  transform: none;
}

.task-card span {
  color: var(--cyan);
}

.task-card strong {
  color: var(--text);
  font-size: 15px;
}

.task-card small {
  color: var(--muted);
  line-height: 1.5;
}

.dashboard-grid {
  gap: 12px;
}

.admin-lite .panel {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: none;
}

.admin-lite .panel-head {
  margin-bottom: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.admin-lite .panel-head h2,
.admin-lite .panel h2 {
  color: var(--text);
  font-size: 18px;
}

.panel-hint,
.subhead,
.metric-label {
  color: var(--muted);
}

.admin-lite input,
.admin-lite select,
.admin-lite textarea,
.login-page input {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #0b1210;
  color: var(--text);
}

.admin-lite .inline-editor,
.admin-lite .table-wrap,
.admin-lite .trend-box,
.admin-lite .bar-list,
.admin-lite .delivery-toolbox,
.admin-lite .handoff-output {
  border-color: var(--line);
  border-radius: 6px;
  background: #0d1512;
  box-shadow: none;
}

.admin-lite table {
  color: var(--soft);
}

.admin-lite th {
  color: var(--muted);
}

.admin-lite td,
.admin-lite th {
  border-color: var(--line);
}

.login-shell {
  width: min(960px, calc(100% - 40px));
  min-height: 100vh;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.9fr);
  align-items: center;
  gap: 36px;
  padding: 48px 0;
}

.login-brand,
.login-card {
  border-radius: 8px;
  box-shadow: none;
}

.login-brand {
  border: 0;
  background: transparent;
}

.login-brand h1 {
  color: var(--text);
  font-size: 34px;
  line-height: 1.2;
}

.login-brand p,
.login-card p {
  color: var(--muted);
  line-height: 1.65;
}

.login-points {
  gap: 8px;
}

.login-points span {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #111a17;
  color: var(--soft);
}

.login-card {
  padding: 28px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.login-card .brand-mark {
  width: 42px;
  height: 42px;
}

.login-card h2 {
  margin: 16px 0 0;
  color: var(--text);
  font-size: 21px;
}

.login-form {
  gap: 14px;
}

.login-form .primary-btn,
.login-form .secondary-btn {
  min-height: 44px;
  border-radius: 6px;
  text-align: center;
}

.login-form .secondary-btn {
  border: 1px solid var(--line-strong);
  background: #151e1b;
  color: var(--soft);
}

.login-form .secondary-btn:hover {
  border-color: var(--cyan);
}

.qr-login-panel {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #0d1512;
}

.login-error {
  color: var(--danger);
}

/* WeCom mini program shares the same palette and state hierarchy. */
.wecom-page .mobile-hero,
.wecom-page .mobile-panel {
  background: transparent;
}

.wecom-page .trust-strip a {
  padding: 4px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--soft);
}

.identity-grid div {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #111a17;
}

.wecom-status {
  border: 1px solid rgba(90, 205, 180, 0.3);
  border-radius: 6px;
  background: #11221c;
  color: var(--cyan);
}

@media (max-width: 1080px) {
  .app-shell:not(.admin-lite) .workspace,
  .payment-layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  }

  .checkout-panel,
  .payment-layout > .result-panel {
    grid-column: 1 / -1;
  }

  .admin-lite.app-shell {
    grid-template-columns: 200px minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .app-shell:not(.admin-lite) {
    width: min(100% - 28px, 560px);
    padding-bottom: 28px;
  }

  .app-shell:not(.admin-lite) .topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    min-height: 60px;
    gap: 10px;
  }

  .app-shell:not(.admin-lite) .brand small,
  .nav-links {
    display: none;
  }

  .app-shell:not(.admin-lite) .topbar-actions {
    grid-column: 2;
  }

  .hero-panel {
    grid-template-columns: 1fr;
    gap: 8px;
    margin: 18px 0;
  }

  .hero-copy h1 {
    font-size: 30px;
  }

  .hero-copy p {
    font-size: 14px;
  }

  .quick-status {
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .quick-status div {
    padding: 10px 7px;
  }

  .quick-status strong {
    font-size: 15px;
  }

  .quick-status .compact-value,
  .quick-status .status-value {
    font-size: 13px;
  }

  .app-shell:not(.admin-lite) .workspace,
  .payment-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .checkout-panel,
  .payment-layout > .result-panel {
    grid-column: auto;
  }

  .info-strip {
    grid-template-columns: 1fr 1fr;
  }

  .info-strip article:nth-child(3) {
    border-left: 0;
  }

  .info-strip article:nth-child(n + 3) {
    border-top: 1px solid var(--line);
  }

  .ops-entry {
    grid-template-columns: 1fr;
  }

  .ops-qr-panel,
  .ops-login-error {
    grid-column: 1;
  }

  .ops-login-form {
    grid-template-columns: 1fr;
  }

  .ops-login-actions {
    grid-column: auto;
  }

  .admin-lite.app-shell {
    display: block;
  }

  .admin-lite .sidebar {
    position: static;
    width: 100%;
    height: auto;
    padding: 12px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .admin-lite .sidebar .side-card {
    display: none;
  }

  .admin-lite .nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-top: 12px;
  }

  .admin-lite .nav-item {
    min-width: 0;
    padding: 8px 4px;
    font-size: 12px;
    text-align: center;
  }

  .admin-lite .main {
    padding: 20px 14px 40px;
  }

  .login-shell {
    width: min(100% - 28px, 480px);
    min-height: 100svh;
    grid-template-columns: 1fr;
    gap: 16px;
    align-content: center;
    padding: 22px 0;
  }

  .login-brand {
    padding: 10px 4px;
  }

  .login-brand h1 {
    font-size: 26px;
  }

  .login-brand p {
    max-width: 40ch;
    font-size: 13px;
  }

  .login-points {
    margin-top: 14px;
  }

  .login-card {
    padding: 20px;
  }

  .h5-shell {
    padding: 12px 14px 104px;
  }

  .mobile-hero {
    padding-top: 6px;
  }

  .mobile-panel {
    padding: 20px 2px;
  }

  .wechat-float {
    right: 12px;
    bottom: 88px;
    width: 0;
    height: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  .sticky-submit {
    width: min(532px, calc(100% - 20px));
  }
}

@media (max-width: 390px) {
  .app-shell:not(.admin-lite) {
    width: calc(100% - 20px);
  }

  .panel {
    padding: 15px;
  }

  .app-shell:not(.admin-lite) .topbar-actions a {
    min-height: 34px;
    padding: 0 9px;
    font-size: 12px;
  }

  .h5-shell {
    padding-right: 10px;
    padding-left: 10px;
  }

  .mobile-top-actions {
    gap: 4px;
  }

  .admin-link {
    padding: 0 7px;
  }

  .product-chip {
    flex-basis: 162px;
  }

  .sticky-submit small {
    max-width: 156px;
  }

  .sticky-submit button {
    flex-basis: 104px;
  }

  .sticky-submit .wechat-trigger {
    flex-basis: 48px;
  }
}

@media (max-width: 760px) {
  .h5-page:not(.admin-h5-page) .hero-console {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
  }

  .h5-page:not(.admin-h5-page) .hero-console > div:first-child {
    min-width: 0;
  }

  .h5-page:not(.admin-h5-page) .signal-stack {
    display: flex;
    width: fit-content;
    min-width: 0;
    min-height: 0;
    align-items: center;
    gap: 7px;
    padding: 6px 9px;
    aspect-ratio: auto;
    text-align: left;
  }

  .h5-page:not(.admin-h5-page) .signal-stack strong {
    font-size: 13px;
    line-height: 1.2;
  }

  .h5-page:not(.admin-h5-page) .signal-stack span,
  .h5-page:not(.admin-h5-page) .signal-stack small {
    font-size: 11px;
  }

  .h5-page:not(.admin-h5-page) .product-rail {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 0;
    padding: 2px 0 6px;
    overflow: visible;
    scroll-snap-type: none;
  }

  .h5-page:not(.admin-h5-page) .product-chip {
    width: 100%;
    min-width: 0;
    min-height: 72px;
    flex: initial;
    grid-template-columns: 34px minmax(0, 1fr);
    gap: 7px;
    padding: 9px;
  }

  .h5-page:not(.admin-h5-page) .product-chip .product-copy {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .h5-page:not(.admin-h5-page) .catalog-retry {
    display: inline-flex;
    min-height: 34px;
    align-items: center;
    margin-top: 8px;
    padding: 0 11px;
    border: 1px solid var(--line);
    border-radius: 6px;
    color: var(--text);
    background: var(--panel);
  }
}

@media (max-width: 350px) {
  .h5-page:not(.admin-h5-page) .product-rail {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}

.login-provider-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.login-form .is-unavailable {
  opacity: 0.55;
  cursor: not-allowed;
}

.catalog-retry {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  margin-top: 10px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--text);
  cursor: pointer;
}

.catalog-retry[hidden] {
  display: none;
}

.admin-notice {
  margin: 0 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(90, 205, 180, 0.28);
  border-radius: 6px;
  background: #11221c;
  color: var(--cyan);
  font-size: 14px;
  line-height: 1.5;
}

.admin-notice[data-kind="error"] {
  border-color: rgba(241, 129, 120, 0.36);
  background: #261715;
  color: #f5a49d;
}

.admin-notice[hidden] {
  display: none;
}

.admin-h5-page .admin-shortcuts {
  width: 100%;
  max-width: 100%;
  margin-right: 0;
  margin-left: 0;
  box-sizing: border-box;
}

.admin-h5-page .mobile-delivery-grid > *,
.admin-h5-page .mobile-delivery-card {
  min-width: 0;
  box-sizing: border-box;
}

.admin-h5-page .mobile-delivery-card > * {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

@media (max-width: 560px) {
  .login-shell {
    display: grid;
    width: min(100% - 28px, 480px);
    min-height: 100vh;
    grid-template-columns: minmax(0, 1fr);
    align-content: center;
    gap: 20px;
    padding: 24px 0;
  }

  .login-brand {
    min-height: 0;
    padding: 0;
  }

  .login-brand h1 {
    font-size: 28px;
    line-height: 1.25;
  }

  .login-brand p {
    margin-top: 10px;
    font-size: 14px;
    line-height: 1.55;
  }

  .login-back {
    margin-bottom: 14px;
  }

  .login-points {
    margin-top: 14px;
  }

  .login-points span {
    min-height: 30px;
    padding: 0 9px;
    font-size: 12px;
  }

  .login-card {
    width: 100%;
    min-width: 0;
    padding: 18px;
  }

  .login-form input {
    min-width: 0;
    box-sizing: border-box;
  }
}
