/* 客户前台 · 浅色风格（参考 dmxsms.xyz） */
:root {
  --bg: #f3f5f9;
  --bg-soft: #eef2f7;
  --card: #ffffff;
  --text: #1e2a44;
  --muted: #6b7a90;
  --title: #1a2744;
  --accent: #3b82f6;
  --accent-soft: #eff6ff;
  --accent-border: #bfdbfe;
  --green: #16a34a;
  --green-bg: #ecfdf5;
  --green-border: #a7f3d0;
  --orange: #ea580c;
  --orange-bg: #fff7ed;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --border: #e5eaf2;
  --shadow: 0 10px 32px rgba(30, 42, 68, 0.07);
  --radius: 16px;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background:
    radial-gradient(900px 420px at 50% -8%, #dbeafe88, transparent 60%),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.9em;
  background: var(--bg-soft);
  padding: 2px 7px;
  border-radius: 6px;
}

.page {
  max-width: 980px;
  margin: 0 auto;
  padding: 36px 20px 80px;
}

.hero {
  text-align: center;
  margin-bottom: 28px;
}
.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(1.9rem, 4.2vw, 2.4rem);
  font-weight: 800;
  color: var(--title);
  letter-spacing: 0.02em;
}
.hero .sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.98rem;
}
.hero .sub + .sub { margin-top: 4px; }

.layout {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 20px;
  align-items: start;
}
@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; gap: 14px; }
  .page { padding: 24px 16px 64px; }
  .hero { margin-bottom: 20px; }
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px 26px;
}
.card h2 {
  margin: 0 0 16px;
  font-size: 1.06rem;
  color: var(--title);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.card-head .meta {
  color: var(--muted);
  font-size: 0.9rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  background: var(--bg-soft);
  color: var(--muted);
  border: 1px solid var(--border);
  white-space: nowrap;
}
.badge.active, .badge.waiting {
  background: var(--orange-bg);
  color: var(--orange);
  border-color: #fed7aa;
}
.badge.completed, .badge.ok {
  background: var(--green-bg);
  color: var(--green);
  border-color: var(--green-border);
}
.badge.expired, .badge.cancelled, .badge.err {
  background: var(--red-soft);
  color: var(--red);
  border-color: #fecaca;
}
.badge.pending {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent-border);
}

.status-title {
  margin: 0 0 18px;
  font-size: 1.28rem;
  font-weight: 800;
  color: var(--title);
}

.field-block {
  background: #f7f9fc;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 12px;
  transition: border-color .2s, background .2s;
}
.field-block.has-code {
  background: var(--green-bg);
  border-color: var(--green-border);
}
.field-block .label {
  display: block;
  font-size: 0.86rem;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 600;
}
.field-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.field-value {
  font-family: ui-monospace, "Cascadia Code", Consolas, monospace;
  font-size: clamp(1.35rem, 3.5vw, 1.8rem);
  font-weight: 800;
  color: var(--title);
  letter-spacing: 0.03em;
  word-break: break-all;
  line-height: 1.25;
  flex: 1;
  min-width: 0;
}
.field-value.code {
  letter-spacing: 0.14em;
  color: #0f766e;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 10px;
  padding: 11px 16px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  background: var(--accent);
  color: #fff;
  transition: filter .15s, transform .08s, background .15s, color .15s, border-color .15s;
  font-family: inherit;
  white-space: nowrap;
  min-height: 40px;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; filter: none; }
.btn.block { width: 100%; padding: 15px 18px; font-size: 1.05rem; border-radius: 12px; min-height: 48px; }
.btn.copy {
  background: #fff;
  color: var(--accent);
  border: 1px solid var(--accent-border);
  padding: 8px 14px;
  font-size: 0.88rem;
  flex-shrink: 0;
}
.btn.copy:hover { background: var(--accent-soft); }
.btn.copy.copied {
  background: var(--green-bg);
  color: var(--green);
  border-color: var(--green-border);
  filter: none;
}
.btn.ghost {
  background: transparent;
  color: var(--accent);
  padding: 0;
  font-weight: 600;
  min-height: auto;
}
.btn.ghost:hover { text-decoration: underline; filter: none; }

.price {
  font-size: clamp(2.1rem, 5vw, 2.7rem);
  font-weight: 800;
  color: var(--accent);
  margin: 10px 0 8px;
  letter-spacing: 0.01em;
}
.product-name {
  margin: 0;
  font-size: 1.22rem;
  font-weight: 800;
  color: var(--title);
}
.hint {
  color: var(--muted);
  font-size: 0.92rem;
  margin: 0 0 14px;
}
.foot-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  text-align: center;
  line-height: 1.5;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}
.steps li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 16px;
  color: var(--text);
  font-size: 0.94rem;
  line-height: 1.55;
}
.steps li:last-child { margin-bottom: 0; }
.steps li::before {
  counter-increment: step;
  content: counter(step);
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid var(--accent-border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 800;
  margin-top: 1px;
}
.steps .em-orange { color: var(--orange); font-weight: 700; }
.steps .em-red { color: var(--red); font-weight: 700; }

.support {
  margin-top: 20px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  border-radius: var(--radius);
  padding: 14px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}
.support .text { color: var(--title); font-size: 0.95rem; }
.support .text strong { color: var(--accent); font-size: 1.05rem; }
.support.hidden { display: none !important; }

.faq {
  margin-top: 20px;
}
.faq details {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--title);
  list-style: none;
  line-height: 1.45;
  padding-right: 28px;
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 0;
  color: var(--muted);
  font-weight: 400;
  font-size: 1.15rem;
  line-height: 1.2;
}
.faq details[open] summary::after { content: "−"; }
.faq details p {
  margin: 12px 0 2px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}

.alert {
  padding: 12px 14px;
  border-radius: 12px;
  margin-bottom: 14px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.5;
}
.alert.err {
  background: var(--red-soft);
  border-color: #fecaca;
  color: var(--red);
}
.alert.ok {
  background: var(--green-bg);
  border-color: var(--green-border);
  color: var(--green);
}
.hidden { display: none !important; }

.poll-hint {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}
.poll-hint .pulse { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.4; }
}

.code-history {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}
.code-history h3 {
  margin: 0 0 12px;
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 700;
}
.code-list { list-style: none; padding: 0; margin: 0; }
.code-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 8px;
  background: #fafbfd;
}
.code-list .code-val {
  font-family: ui-monospace, Consolas, monospace;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--title);
}
.code-list .meta { font-size: 0.8rem; color: var(--muted); }

.site-footer {
  margin-top: 32px;
  text-align: center;
  color: #9aa8bc;
  font-size: 0.82rem;
}

.buy-card .stock-line {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 0.92rem;
}
.buy-card .stock-line strong { color: var(--title); }

/* 复制成功浮层 */
.toast {
  position: fixed;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%) translateY(12px);
  background: #1a2744;
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(26, 39, 68, 0.28);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .2s;
  z-index: 1000;
  max-width: calc(100vw - 32px);
  text-align: center;
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (max-width: 520px) {
  .field-row { flex-wrap: wrap; }
  .btn.copy { width: 100%; }
  .code-list li { flex-direction: column; align-items: flex-start; }
  .card { padding: 20px 18px; }
}


/* ===== v2 polish (2026-10-25) ===== */
.page { max-width: 1080px; margin: 0 auto; padding: 40px 20px 96px; }
.hero-v2 { text-align: center; margin-bottom: 28px; }
.hero-eyebrow { display: inline-block; padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); color: #1d4ed8; border: 1px solid var(--accent-border); font-size: 13px; font-weight: 600; margin-bottom: 12px; }
.hero-v2 h1 { font-size: clamp(26px, 4.4vw, 38px); margin: 0 0 8px; letter-spacing: .5px; color: var(--title); }
.hero-v2 .sub { max-width: 620px; margin: 0 auto; color: var(--muted); font-size: 15px; }
.hero-sm h1 { font-size: clamp(24px, 3.6vw, 32px); }
.trust { list-style: none; padding: 0; margin: 18px auto 0; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.trust li { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; background: #fff; border: 1px solid var(--border); border-radius: 999px; font-size: 14px; font-weight: 600; color: var(--title); box-shadow: 0 2px 8px rgba(30,42,68,.05); }
.layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 20px; align-items: start; }
.card { border-radius: 18px; box-shadow: 0 12px 36px rgba(30,42,68,.08); border: 1px solid var(--border); padding: 26px; }
.card h2 { margin-top: 0; }

.buy-card { position: relative; border-top: 4px solid var(--accent); }
.buy-top { margin-bottom: 6px; }
.buy-tag { position: absolute; top: 18px; right: 18px; background: var(--orange-bg); color: var(--orange); border: 1px solid #fed7aa; font-size: 12px; font-weight: 700; padding: 2px 10px; border-radius: 999px; }
.buy-card .product-name { font-size: 20px; font-weight: 700; color: var(--title); margin: 0; }
.product-desc { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
.price-row { display: flex; align-items: baseline; gap: 6px; margin: 14px 0 10px; }
.buy-card .price { font-size: 46px; line-height: 1.1; font-weight: 800; color: #ef4444; margin: 0; letter-spacing: -.5px; }
.price-unit { color: var(--muted); font-size: 15px; }
.buy-points { list-style: none; padding: 14px 16px; margin: 0 0 18px; background: var(--bg-soft); border-radius: 12px; }
.buy-points li { position: relative; padding-left: 22px; font-size: 14px; color: var(--text); }
.buy-points li + li { margin-top: 6px; }
.buy-points li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 800; }
.btn-pay { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 17px; padding: 14px 18px; border-radius: 12px; background: #1677ff; box-shadow: 0 8px 20px rgba(22,119,255,.28); }
.btn-pay::before { content: "支"; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 6px; background: #fff; color: #1677ff; font-size: 13px; font-weight: 800; }
.btn-pay:hover:not(:disabled) { background: #0f62d6; }
.btn-pay:disabled::before { color: #9ca3af; }
.buy-card .foot-note { text-align: center; margin: 12px 0 0; font-size: 13px; color: var(--muted); }

.steps-v2 { list-style: none; counter-reset: s; padding: 0; margin: 0; }
.steps-v2 li { display: block !important; position: relative; counter-increment: s; padding: 0 0 0 40px; margin: 0 0 16px; min-height: 28px; }
.steps-v2 li::before { content: counter(s) !important; position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--accent-soft); color: #1d4ed8; border: 1px solid var(--accent-border); display: grid !important; place-items: center; font-weight: 700; font-size: 14px; }
.steps-v2 li:last-child { margin-bottom: 0; }
.steps-v2 li p { margin: 0; line-height: 1.75; font-size: 15px; display: block; }
.hl-orange { color: var(--orange); font-weight: 700; background: linear-gradient(transparent 62%, #ffedd5 62%); }
.hl-red { color: var(--red); font-weight: 700; background: linear-gradient(transparent 62%, #fee2e2 62%); }

.section-title { text-align: center; font-size: 22px; color: var(--title); margin: 40px 0 16px; }
.faq-v2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; margin: 0; }
.faq-v2 details { background: #fff; border: 1px solid var(--border); border-radius: 14px; box-shadow: 0 4px 14px rgba(30,42,68,.05); padding: 0; margin: 0; overflow: hidden; transition: box-shadow .2s, border-color .2s; }
.faq-v2 details[open] { border-color: var(--accent-border); box-shadow: 0 8px 22px rgba(59,130,246,.10); }
.faq-v2 summary { list-style: none; cursor: pointer; padding: 15px 44px 15px 18px; font-weight: 600; font-size: 15px; color: var(--title); position: relative; }
.faq-v2 summary::-webkit-details-marker { display: none; }
.faq-v2 summary::after { content: "+"; position: absolute; right: 16px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); color: #1d4ed8; display: grid; place-items: center; font-size: 16px; transition: transform .25s; }
.faq-v2 details[open] summary::after { content: "−"; background: #dbeafe; }
.faq-v2 details p { margin: 0; padding: 0 18px 16px; color: #4b5563; font-size: 14px; line-height: 1.75; animation: faqIn .25s ease; }
@keyframes faqIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

.footer-v2 { text-align: center; margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 14px; color: var(--text); }
.footer-v2 p { margin: 4px 0; }
.footer-v2 .muted { color: var(--muted); font-size: 13px; }

.order-card { border-top: 4px solid var(--accent); }
.order-card .field-block { border-radius: 14px; }

#mainLayout { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); }
#phone { white-space: nowrap; }
@media (max-width: 860px) {
  #mainLayout { grid-template-columns: 1fr; }
  .layout { grid-template-columns: 1fr; gap: 16px; }
  .faq-v2 { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .page { padding: 24px 14px 96px; }
  .card { padding: 20px 16px; border-radius: 16px; }
  .trust li { font-size: 13px; padding: 6px 11px; }
  .buy-card .price { font-size: 40px; }
  .section-title { margin-top: 30px; }
  .kf-btn { padding: 9px 14px !important; font-size: 14px !important; }
}


/* ===== v3 (2026-10-25) ===== */
.us-flag { display: inline-block; width: 20px; height: 14px; border-radius: 2px; vertical-align: -2px; margin-right: 6px; box-shadow: 0 0 0 1px rgba(0,0,0,.08);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 190 100'%3E%3Cpath fill='%23b22234' d='M0 0h190v100H0z'/%3E%3Cpath stroke='%23fff' stroke-width='7.7' d='M0 11.5h190M0 26.9h190M0 42.3h190M0 57.7h190M0 73.1h190M0 88.5h190'/%3E%3Cpath fill='%233c3b6e' d='M0 0h76v53.8H0z'/%3E%3C/svg%3E") center/cover no-repeat; }
.cc-pill .us-flag { width: 18px; height: 12px; margin-right: 5px; }
.hero-eyebrow { display: inline-flex; align-items: center; }
ul.trust { list-style: none !important; padding: 0 !important; display: flex !important; flex-direction: row; flex-wrap: wrap; justify-content: center; gap: 10px; }
ul.trust li { display: inline-flex !important; margin: 0 !important; }
.col-left { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.price-row { display: flex !important; flex-direction: row; align-items: baseline; gap: 6px; flex-wrap: nowrap; }
.price-row .price { display: inline-block; }
.price-unit { white-space: nowrap; }
.steps-v2 li { margin-bottom: 12px !important; }
.steps-v2 li p { line-height: 1.65 !important; }
.aftersale { padding: 18px 20px !important; border-top: 4px solid var(--green) !important; }
.aftersale h3 { margin: 0 0 10px; font-size: 16px; color: var(--title); }
.as-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; background: var(--bg-soft); border-radius: 12px; }
.as-row + .as-row { margin-top: 8px; }
.as-row small { display: block; font-size: 12px; color: var(--muted); }
.as-row b { font-size: 17px; letter-spacing: .5px; color: var(--title); font-family: ui-monospace, Consolas, monospace; }
.as-note { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }
.as-row > div { min-width: 0; }
.as-row .btn { width: auto !important; flex: 0 0 auto; padding: 6px 14px; }
