:root {
  --bg: #ffffff;
  --bg-alt: #f7f9fc;
  --bg-dark: #11151f;
  --fg: #0d0d10;
  --dim: #6b6f76;
  --dim2: #a8acb3;
  --border: #d6d8dc;
  --border-soft: #e2e6ec;
  --accent: #2a5ec4;
  --accent-2: #1f4ba0;
  --accent-soft: #e8eef9;
  --ok: #1b8f4a;
  --err: #c92a3b;
  --warn: #b9690e;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --sys: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; background: var(--bg); color: var(--fg); font-family: var(--sys); -webkit-font-smoothing: antialiased; }
body { line-height: 1.55; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.row-between { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.mono { font-family: var(--mono); }
.dim { color: var(--dim); }
.small { font-size: 12px; }
.accent { color: var(--accent); }
.center { text-align: center; }
.mb-24 { margin-bottom: 24px; }
.link-text { color: var(--accent); }

kbd {
  display: inline-block; padding: 1px 6px; border: 1px solid var(--border); border-bottom-width: 2px;
  border-radius: 4px; font-family: var(--mono); font-size: 11px; background: var(--bg-alt); color: var(--fg);
}

.topnav {
  position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border-soft);
}
.topnav .container { height: 56px; }
.brand { font-size: 16px; font-weight: 700; letter-spacing: -0.01em; }
.topnav-links a { color: var(--fg); font-size: 14px; margin-left: 24px; }
.topnav-links a:hover { color: var(--accent); text-decoration: none; }

.hero { background: linear-gradient(180deg, var(--accent-soft) 0%, transparent 100%); padding: 72px 0 56px; text-align: center; }
.hero h1 { font-size: 38px; font-weight: 700; letter-spacing: -0.02em; margin: 0 0 12px; }
.hero .lead { font-size: 16px; color: var(--dim); max-width: 720px; margin: 0 auto 28px; }
.hero-pills { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; background: #fff; border: 1px solid var(--border-soft);
  border-radius: 100px; font-size: 13px; color: var(--fg);
}
.pill .dot { font-size: 9px; line-height: 1; }
.dot-ok { color: var(--ok); }

.section-title { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 24px; text-align: center; }
section { padding: 56px 0; }

.plans { background: var(--bg); }
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.plan-tile {
  position: relative; background: #fff; border: 1px solid var(--border-soft); border-radius: 12px; padding: 28px 24px;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}
.plan-tile:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 8px 24px rgba(42, 94, 196, 0.08); }
.plan-tile.featured { border-color: var(--accent); background: linear-gradient(180deg, #fff 0%, var(--accent-soft) 100%); }
.badge-corner {
  position: absolute; top: 12px; right: 12px; background: var(--accent); color: #fff; padding: 3px 10px;
  border-radius: 100px; font-size: 11px; font-weight: 600;
}
.plan-region { font-size: 12px; color: var(--dim); letter-spacing: 0.5px; text-transform: uppercase; margin-bottom: 6px; }
.plan-name { font-size: 20px; font-weight: 700; margin-bottom: 12px; letter-spacing: -0.01em; }
.plan-price { font-size: 36px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 16px; }
.plan-price .currency { font-size: 18px; vertical-align: top; line-height: 1.8; margin-right: 2px; color: var(--dim); }
.plan-price .period { font-size: 14px; font-weight: 500; color: var(--dim); margin-left: 4px; }
.plan-features { list-style: none; padding: 0; margin: 0; }
.plan-features li {
  padding: 6px 0 6px 22px; font-size: 13px; color: var(--fg); position: relative;
}
.plan-features li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }

.order { background: var(--bg-alt); }
.order-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 24px; }
.card-panel { background: #fff; border: 1px solid var(--border-soft); border-radius: 12px; padding: 28px; }
.card-panel h3 { margin: 0 0 14px; font-size: 16px; font-weight: 700; }
.order-form { display: flex; flex-direction: column; gap: 24px; }
.order-side { display: flex; flex-direction: column; gap: 16px; }

.step { display: flex; flex-direction: column; gap: 8px; }
.step + .step { padding-top: 20px; border-top: 1px solid var(--border-soft); }
.step-head { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 12px; font-weight: 700;
}

.input-row { display: flex; gap: 8px; }
.input-row input { flex: 1; }
input, textarea {
  width: 100%; padding: 0 14px; border: 1px solid var(--border); border-radius: 8px;
  background: #fff; color: var(--fg); outline: none; font-family: var(--mono); font-size: 14px;
  transition: border-color 0.12s ease, box-shadow 0.12s ease;
}
input { height: 44px; letter-spacing: 0.5px; }
textarea { padding: 12px 14px; height: 140px; font-size: 11px; line-height: 1.6; background: #fafbfc; resize: vertical; }
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(42, 94, 196, 0.12); }

button {
  height: 44px; border-radius: 8px; border: 0; font-family: var(--sys); font-size: 14px; font-weight: 600;
  cursor: pointer; transition: background 0.12s ease, transform 0.06s ease;
}
button.primary { background: var(--accent); color: #fff; padding: 0 22px; }
button.primary:hover:not(:disabled) { background: var(--accent-2); }
button.primary:active:not(:disabled) { transform: translateY(1px); }
button.primary:disabled { background: var(--dim2); cursor: not-allowed; }
button.compact { height: 44px; padding: 0 18px; }
button.block { width: 100%; margin-top: 6px; }
button.secondary { background: #fff; color: var(--accent); border: 1px solid var(--accent); padding: 0 22px; }
button.secondary:hover { background: var(--accent-soft); }

.error { color: var(--err); font-size: 13px; margin: 4px 0 0; }
.hint { margin: 4px 0 0; }

.plan-card.mini {
  margin-top: 12px; padding: 14px 16px; background: var(--accent-soft); border: 1px solid #c8d6ef; border-radius: 8px;
}
.preview-card {
  margin-top: 12px; padding: 14px 16px; background: #f0f7e8; border: 1px solid #bde0a0; border-radius: 8px;
}
.preview-card .ok-small { color: var(--ok); margin-bottom: 8px; }
.preview-row {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 5px 0; font-size: 13px; border-top: 1px dashed #d6e8c0;
}
.preview-row:first-of-type { border-top: 0; }
.preview-row .mono { font-size: 13px; }
.ok-small { font-size: 11px; letter-spacing: 1px; color: var(--ok); font-weight: 700; margin-bottom: 2px; }
.plan-title { font-size: 16px; font-weight: 700; margin-bottom: 2px; }

.agree { display: flex; gap: 10px; font-size: 12px; color: var(--dim); line-height: 1.6; align-items: flex-start; margin-bottom: 4px; cursor: pointer; }
.agree input { width: 16px; height: 16px; margin-top: 2px; cursor: pointer; }

.howto { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.howto li {
  position: relative; padding: 8px 0 8px 32px; font-size: 13px; color: var(--fg); line-height: 1.65;
  border-bottom: 1px dashed var(--border-soft);
}
.howto li:last-child { border-bottom: 0; }
.howto li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 0; top: 10px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); color: #fff; font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}

.bullets { list-style: disc inside; padding: 0; margin: 0; font-size: 13px; color: var(--fg); line-height: 1.9; }
.bullets b { color: var(--fg); }

details { border-bottom: 1px solid var(--border-soft); padding: 10px 0; }
details:last-child { border-bottom: 0; }
details summary { cursor: pointer; font-size: 13px; font-weight: 600; list-style: none; position: relative; padding-right: 24px; }
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; position: absolute; right: 0; top: 0; font-size: 18px; color: var(--dim); font-weight: 400; transition: transform 0.15s; }
details[open] summary::after { content: "−"; }
details p { margin: 8px 0 0; font-size: 13px; color: var(--dim); line-height: 1.65; }

.contact-v2 { background: var(--bg-alt); padding: 64px 0; }
.contact-single { max-width: 700px; margin: 0 auto; }
.contact-grid-v2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.plan-tagline { margin: 0 0 12px; }
.contact-big-card {
  background: #fff; border: 1px solid var(--border-soft); border-radius: 14px; padding: 32px;
  display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 28px; align-items: center;
  transition: box-shadow 0.15s ease, transform 0.15s ease;
}
.contact-big-card:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(13,13,16,0.08); }
.contact-icon-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.contact-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 10px; font-size: 18px;
}
.contact-icon.wx { background: #e8f7e8; color: #1aad19; }
.contact-icon.tg { background: #e3f2fb; color: #229ed9; }
.contact-info h3 { font-size: 20px; font-weight: 700; margin: 0; letter-spacing: -0.01em; }
.contact-desc { font-size: 13px; margin: 0 0 16px; line-height: 1.7; }
.copyable {
  display: flex; align-items: center; gap: 12px; padding: 10px 14px;
  background: var(--bg-alt); border: 1px solid var(--border-soft); border-radius: 8px;
}
.copyable .mono { font-size: 14px; font-weight: 600; flex: 1; }
.copy-btn {
  height: 32px; padding: 0 14px; background: var(--accent); color: #fff; border: 0;
  border-radius: 6px; font-family: var(--sys); font-size: 12px; font-weight: 600; cursor: pointer;
  transition: background 0.12s ease;
}
.copy-btn:hover { background: var(--accent-2); }
.copy-btn.copied { background: var(--ok); }
.contact-qr-wrap { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.big-qr {
  width: 220px; height: 220px; object-fit: contain; background: #fff;
  border-radius: 10px; border: 1px solid var(--border-soft); padding: 8px;
}
.contact-meta {
  margin-top: 24px; text-align: center; font-size: 13px; color: var(--dim);
  display: flex; justify-content: center; gap: 14px; flex-wrap: wrap;
}
.contact-meta b { color: var(--fg); font-weight: 600; margin-right: 6px; }
.contact-meta .sep { color: var(--dim2); }

@media (max-width: 900px) {
  .contact-grid-v2 { grid-template-columns: 1fr; }
  .contact-big-card { grid-template-columns: 1fr; text-align: center; padding: 24px; }
  .contact-icon-row { justify-content: center; }
  .contact-qr-wrap { order: -1; }
  .copyable .mono { text-align: left; }
}
@media (max-width: 540px) {
  .big-qr { width: 180px; height: 180px; }
  .contact-meta { flex-direction: column; gap: 4px; }
  .contact-meta .sep { display: none; }
}

/* footer + topnav stay light too now */
.footer { background: var(--bg-dark); color: #6b7184; padding: 20px 0; }

.footer { background: var(--bg-dark); color: #6b7184; padding: 20px 0; border-top: 1px solid #1d2334; }
.footer a { color: #8a90a0; }
.footer a:hover { color: #fff; }

.progress-overlay {
  position: fixed; inset: 0; background: rgba(13, 13, 16, 0.5); backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 100;
}
.progress-panel {
  background: #fff; border-radius: 12px; padding: 36px 32px; width: 100%; max-width: 480px;
  box-shadow: 0 24px 48px rgba(0,0,0,0.16);
}
.progress-panel h1 { font-size: 22px; margin: 0 0 4px; letter-spacing: -0.01em; }
.progress-panel .lead { font-size: 14px; margin: 0 0 24px; }
.steps { list-style: none; padding: 0; margin: 0 0 24px; font-size: 14px; line-height: 2; }
.steps li { display: flex; align-items: center; gap: 12px; }
.dot { display: inline-block; width: 18px; text-align: center; font-weight: 700; line-height: 1; }
.dot.pending { color: var(--dim2); }
.dot.active { color: var(--accent); }
.dot.done { color: var(--ok); }
.dot.fail { color: var(--err); }
.steps li.active span:last-child { color: var(--accent); font-weight: 500; }
.meta { display: flex; justify-content: space-between; color: var(--dim); font-size: 12px; padding-top: 18px; border-top: 1px solid var(--border-soft); }
.result { margin-top: 22px; padding: 14px 16px; border-radius: 8px; font-size: 14px; }
.result.ok { background: #e6f6ec; color: var(--ok); }
.result.err { background: #fbeaec; color: var(--err); }

@media (max-width: 900px) {
  .plan-grid { grid-template-columns: 1fr; }
  .order-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { font-size: 28px; }
  section { padding: 36px 0; }
  .hero { padding: 48px 0 32px; }
}
@media (max-width: 540px) {
  .contact-grid { grid-template-columns: 1fr; }
  .topnav-links a { margin-left: 14px; font-size: 13px; }
  .hero h1 { font-size: 24px; }
  .hero .lead { font-size: 14px; }
  .container { padding: 0 16px; }
  .card-panel { padding: 20px; }
}

/* ===== Admin (unchanged) ===== */
.admin-shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; max-width: none; margin: 0; padding: 0; background: #f5f6f8; }
.sidebar { background: #11151f; color: #c0c5cf; padding: 28px 16px; }
.sidebar h1 { font-size: 16px; color: #fff; margin: 0 0 28px; }
.sidebar a { display: block; padding: 8px 12px; color: #c0c5cf; text-decoration: none; border-radius: 6px; font-size: 13px; }
.sidebar a:hover { background: #1c2030; color: #fff; }
.sidebar a.active { background: var(--accent); color: #fff; }
.main { padding: 28px 36px; }
.topbar { display: flex; gap: 12px; align-items: center; margin-bottom: 24px; }
.topbar h2 { margin: 0; font-size: 20px; font-weight: 600; }
.topbar .grow { flex: 1; }
.topbar input { height: 36px; padding: 0 12px; max-width: 320px; font-family: var(--sys); font-size: 13px; letter-spacing: 0; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 32px; }
.card { background: #fff; border: 1px solid #e2e6ec; border-radius: 8px; padding: 18px; }
.card .label { color: var(--dim); font-size: 12px; }
.card .value { font-size: 28px; font-weight: 600; margin-top: 4px; }
.table { width: 100%; background: #fff; border: 1px solid #e2e6ec; border-radius: 8px; overflow: hidden; border-collapse: collapse; }
.table th, .table td { padding: 10px 14px; text-align: left; font-size: 13px; border-bottom: 1px solid #f0f2f5; }
.table th { background: #f9fafc; color: var(--dim); font-weight: 600; font-size: 11px; letter-spacing: 0.5px; text-transform: uppercase; }
.table tr:last-child td { border-bottom: 0; }
.table tr.clickable:hover { background: #f9fafc; cursor: pointer; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 100px; font-size: 11px; font-weight: 500; }
.badge.done { background: #e6f6ec; color: var(--ok); }
.badge.failed { background: #fbeaec; color: var(--err); }
.badge.queued { background: #eef2f9; color: var(--accent); }
.badge.paying { background: #fff5e3; color: #b9690e; }
.badge.paid { background: #eef2f9; color: var(--accent); }
.badge.needs_review { background: #fbeaec; color: var(--err); }
.detail-grid { display: grid; grid-template-columns: 180px 1fr; gap: 6px 16px; background: #fff; padding: 20px; border-radius: 8px; border: 1px solid #e2e6ec; font-size: 13px; }
.detail-grid dt { color: var(--dim); }
.timeline { background: #fff; border: 1px solid #e2e6ec; border-radius: 8px; padding: 16px; margin-top: 16px; }
.timeline ol { list-style: none; padding: 0; margin: 0; }
.timeline li { display: grid; grid-template-columns: 140px 80px 1fr; gap: 12px; padding: 6px 0; font-size: 12px; align-items: baseline; }
.timeline .ts { color: var(--dim); font-family: var(--mono); }
.timeline .step { color: var(--accent); font-weight: 500; }
.dialog-bg { position: fixed; inset: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 200; }
.dialog { background: #fff; border-radius: 8px; padding: 24px; max-width: 720px; width: 90%; max-height: 80vh; overflow: auto; }
.dialog pre { background: #f5f6f8; padding: 12px; border-radius: 6px; font-size: 11px; overflow: auto; }
.actions button { width: auto; padding: 0 16px; margin: 0; }
.row { display: flex; gap: 12px; align-items: center; }
.row > * { flex: 0 0 auto; }
.login-box { max-width: 360px; margin: 120px auto; background: #fff; padding: 36px 32px; border-radius: 8px; border: 1px solid #e2e6ec; }
