:root {
  --bg: #f7f9fc;
  --bg-card: #ffffff;
  --bg-alt: #eef2f8;
  --bg-dark: #11151f;
  --fg: #0d0d10;
  --dim: #6b6f76;
  --dim2: #a8acb3;
  --border: #d6d8dc;
  --border-soft: #e2e6ec;
  --accent: #5b75ee;
  --accent-2: #4a63d8;
  --accent-soft: #eef1fc;
  --green: #2ea66b;
  --green-soft: #e6f5ee;
  --orange: #ff8a4c;
  --orange-soft: #fef0e6;
  --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;
  --shadow-sm: 0 1px 2px rgba(13, 17, 31, 0.04), 0 4px 16px rgba(13, 17, 31, 0.04);
  --shadow-md: 0 4px 12px rgba(13, 17, 31, 0.06), 0 12px 28px rgba(13, 17, 31, 0.06);
}
* { 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: 1180px; 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-card); color: var(--fg);
}

/* ============= Top nav ============= */
.topnav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(247, 249, 252, 0.85); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.nav-row { display: flex; justify-content: space-between; align-items: center; height: 60px; }
.brand-pill {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 18px 8px 14px;
  background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: 100px;
  text-decoration: none; color: var(--fg); font-weight: 700; font-size: 14px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}
.brand-pill:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-md); }
.brand-dot {
  width: 22px; height: 22px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #4cd57a, #1b8f4a 80%);
  box-shadow: 0 0 0 3px var(--green-soft);
}
.nav-links a { color: var(--fg); font-size: 14px; margin-left: 28px; opacity: 0.7; }
.nav-links a:hover { color: var(--accent); opacity: 1; text-decoration: none; }

/* ============= Hero ============= */
.hero { padding: 56px 0 32px; }
.hero-inner {
  max-width: 880px; margin: 0 auto;
  background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: 16px;
  padding: 56px 48px; text-align: center;
  box-shadow: var(--shadow-md);
}
.hero h1 { font-size: 44px; font-weight: 800; letter-spacing: -0.025em; margin: 0 0 14px; }
.hero .lead { font-size: 16px; color: var(--dim); max-width: 600px; margin: 0 auto 24px; line-height: 1.7; }
.hero-banner {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 18px; border-radius: 100px;
  background: var(--green-soft); color: var(--ok); border: 1px solid #c6e9d4;
  font-size: 13px; font-weight: 500;
}
.banner-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: 50%;
  background: var(--ok); color: #fff; font-size: 11px; font-weight: 700;
}

/* ============= Section titles ============= */
.section-title { font-size: 22px; font-weight: 700; letter-spacing: -0.01em; margin: 0 0 24px; text-align: center; }
section { padding: 40px 0; }

/* ============= Plans ============= */
.plans { padding: 24px 0 32px; }
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.plan-tile {
  position: relative; background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: 14px;
  padding: 24px 22px;
  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: var(--shadow-md); }
.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: 11px; color: var(--dim); letter-spacing: 0.6px; text-transform: uppercase; margin-bottom: 6px; }
.plan-name { font-size: 19px; font-weight: 700; margin-bottom: 4px; letter-spacing: -0.01em; }
.plan-tagline { margin: 0 0 14px; }
.plan-price { font-size: 32px; font-weight: 700; letter-spacing: -0.02em; margin-bottom: 14px; }
.plan-price .currency { font-size: 17px; vertical-align: top; line-height: 1.8; margin-right: 2px; color: var(--dim); }
.plan-price .period { font-size: 13px; font-weight: 500; color: var(--dim); margin-left: 4px; }
.plan-features { list-style: none; padding: 0; margin: 0; }
.plan-features li { padding: 5px 0 5px 22px; font-size: 13px; color: var(--fg); position: relative; line-height: 1.5; }
.plan-features li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }

/* ============= Order area (two-col) ============= */
.order { padding: 16px 0 48px; }
.two-col { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 24px; }
.card-panel {
  background: var(--bg-card); border: 1px solid var(--border-soft); border-radius: 14px;
  padding: 28px 28px; box-shadow: var(--shadow-sm);
}
.panel-title { margin: 0 0 22px; font-size: 18px; font-weight: 700; letter-spacing: -0.005em; }

/* Guide panel */
.guide-step {
  display: grid; grid-template-columns: 32px 1fr; gap: 14px;
  padding: 14px 0;
}
.guide-step + .guide-step { border-top: 1px solid var(--border-soft); }
.step-num-circle {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--fg); color: #fff; font-size: 13px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.step-content { display: flex; flex-direction: column; gap: 4px; }
.step-title { font-size: 14px; font-weight: 600; }
.step-desc { margin: 2px 0 4px; line-height: 1.65; }
.step-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 7px 14px; border-radius: 8px;
  background: var(--accent); color: #fff !important; font-size: 13px; font-weight: 500;
  text-decoration: none !important; align-self: flex-start;
  transition: background 0.12s ease;
}
.step-btn:hover { background: var(--accent-2); }
.step-btn.primary-soft { background: var(--accent); }

.guide-warning {
  margin-top: 16px; padding: 14px 16px;
  background: #fff5e3; border: 1px solid #f0dcae; border-radius: 8px;
}
.warning-title {
  font-size: 12px; font-weight: 700; color: var(--warn);
  border-left: 3px solid var(--warn); padding-left: 8px; margin-bottom: 8px;
}

/* Form panel */
.form-step { padding: 8px 0 18px; }
.form-step + .form-step { border-top: 1px solid var(--border-soft); padding-top: 18px; }
.form-label {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 600; margin-bottom: 10px;
}
.circle-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 24px; height: 24px; border-radius: 50%;
  color: #fff; font-size: 12px; font-weight: 700;
}
.circle-num.blue { background: var(--accent); }
.circle-num.green { background: var(--green); }
.circle-num.orange { background: var(--orange); }

.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: var(--bg-card); 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: var(--bg-alt); resize: vertical;
}
input:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91, 117, 238, 0.15); background: #fff; }

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.primary.big { height: 48px; font-size: 15px; }
button.compact { height: 44px; padding: 0 18px; }
button.block { width: 100%; }
button.secondary { background: var(--bg-card); color: var(--accent); border: 1px solid var(--accent); padding: 0 22px; }
button.secondary:hover { background: var(--accent-soft); }
button.ghost {
  background: transparent; color: var(--dim); border: 1px solid var(--border-soft); padding: 0 18px;
}
button.ghost:hover { background: var(--bg-alt); color: var(--fg); }
.ghost-pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 40px; padding: 0 20px; border-radius: 100px;
  background: var(--bg-card); color: var(--accent); border: 1px solid var(--border-soft);
  font-family: var(--sys); font-size: 13px; font-weight: 600; cursor: pointer;
  transition: border-color 0.12s, background 0.12s;
}
.ghost-pill:hover { border-color: var(--accent); background: var(--accent-soft); }

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

.plan-card.mini {
  margin-top: 12px; padding: 14px 16px; background: var(--accent-soft); border: 1px solid #c8d1f4; border-radius: 8px;
}
.preview-card {
  margin-top: 12px; padding: 14px 16px; background: var(--green-soft); border: 1px solid #c0e0cf; 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 #d8eadf;
}
.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.65;
  align-items: flex-start; margin: 18px 0 14px; cursor: pointer;
}
.agree input { width: 16px; height: 16px; margin-top: 2px; cursor: pointer; }
.form-actions { display: flex; gap: 10px; }
.form-actions .primary { flex: 1; }

/* ============= Query bar ============= */
.query-bar { padding: 8px 0 56px; }
.query-row {
  display: flex; align-items: center; gap: 16px; justify-content: center;
}

/* ============= Contact ============= */
.contact-v2 { background: var(--bg-card); border-top: 1px solid var(--border-soft); padding: 64px 0; }
.contact-single { max-width: 720px; margin: 0 auto; }
.contact-big-card {
  background: var(--bg-card); 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;
  box-shadow: var(--shadow-sm);
}
.contact-big-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.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: var(--green-soft); color: var(--green); }
.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); }

/* ============= Footer ============= */
.footer {
  background: var(--bg-card); color: var(--dim); padding: 24px 0;
  border-top: 1px solid var(--border-soft);
}
.footer a { color: var(--dim); }
.footer a:hover { color: var(--accent); }

/* ============= Announcement (banner + modal) ============= */
.announce-banner {
  background: var(--accent); color: #fff;
  border-bottom: 1px solid var(--accent-2);
}
.announce-banner-inner {
  display: flex; align-items: center; gap: 10px;
  padding-top: 10px; padding-bottom: 10px;
}
.announce-banner-icon { font-size: 14px; line-height: 1; flex: 0 0 auto; }
.announce-banner-title {
  flex: 1; min-width: 0; font-size: 13px; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.announce-banner-close {
  flex: 0 0 auto; height: 24px; width: 24px; padding: 0;
  background: transparent; color: #fff; border: 0; border-radius: 6px;
  font-size: 20px; line-height: 1; cursor: pointer; opacity: 0.85;
}
.announce-banner-close:hover { opacity: 1; background: rgba(255, 255, 255, 0.18); }
.announce-modal-content {
  margin: 0; font-size: 14px; line-height: 1.7; color: var(--fg);
  white-space: pre-wrap; word-break: break-word; max-height: 50vh; overflow: auto;
}

/* ============= Progress overlay ============= */
.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); }

/* ============= Responsive ============= */
@media (max-width: 960px) {
  .plan-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
  .hero h1 { font-size: 32px; }
  .hero-inner { padding: 40px 28px; }
  section { padding: 28px 0; }
}
@media (max-width: 540px) {
  .nav-links a { margin-left: 14px; font-size: 13px; }
  .hero h1 { font-size: 26px; }
  .hero .lead { font-size: 14px; }
  .container { padding: 0 16px; }
  .card-panel { padding: 20px; }
  .contact-big-card { grid-template-columns: 1fr; text-align: center; }
  .contact-icon-row { justify-content: center; }
  .big-qr { width: 200px; height: 200px; }
  .contact-meta { flex-direction: column; gap: 4px; }
  .contact-meta .sep { display: none; }
}

/* ===== Admin ===== */
.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  background: #f5f7fb;
}
.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px 16px;
  background: #101828;
  color: #d0d5dd;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 8px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.logo {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), #6d5dfc);
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
}
.logo::before { content: "G"; }
.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.brand-copy strong {
  color: #fff;
  font-size: 20px;
  letter-spacing: -0.03em;
}
.brand-copy span {
  color: #98a2b3;
  font-size: 12px;
}
.nav {
  display: grid;
  gap: 6px;
}
.nav-link {
  display: block;
  min-height: 42px;
  padding: 11px 12px;
  border-radius: 12px;
  color: #d0d5dd;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.nav-link:hover,
.nav-link.active {
  background: rgba(255,255,255,0.1);
  color: #fff;
  text-decoration: none;
}
.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 10px;
  padding: 16px 8px 0;
  border-top: 1px solid rgba(255,255,255,0.1);
}
.sidebar-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 999px;
  color: #d0d5dd;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.sidebar-secondary:hover {
  color: #fff;
  border-color: rgba(255,255,255,0.24);
  background: rgba(255,255,255,0.08);
  text-decoration: none;
}
.main {
  min-width: 0;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 74px;
  padding: 14px 28px;
  background: rgba(245,247,251,0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid #e4e7ec;
}
.topbar-heading {
  min-width: 0;
}
.topbar h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.topbar p {
  margin: 4px 0 0;
  color: #667085;
  font-size: 13px;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.topbar-search {
  width: min(360px, 32vw);
}
.search-input {
  width: 100%;
  height: 42px;
  padding: 0 14px;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  background: #fff;
  color: var(--fg);
  font-family: var(--sys);
  font-size: 13px;
  letter-spacing: 0;
}
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.content {
  padding: 28px;
}
.section-block {
  margin-top: 16px;
}
.grid-2,
.grid-4,
.detail-layout {
  display: grid;
  gap: 16px;
}
.grid-2,
.detail-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.card,
.panel-card {
  background: #fff;
  border: 1px solid #e4e7ec;
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(16,24,40,0.03);
}
.card {
  padding: 18px;
}
.panel-card {
  overflow: hidden;
}
.panel-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid #edf0f5;
}
.panel-head h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
}
.panel-head p {
  margin: 4px 0 0;
  color: #667085;
  font-size: 12px;
  line-height: 1.6;
}
.panel-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.panel-actions.stacked {
  padding: 16px 20px 20px;
  justify-content: flex-start;
}
.toolbar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 18px 20px 0;
}
.toolbar-row.wrap {
  padding-top: 12px;
}
.toolbar-spacer {
  flex: 1 1 auto;
  min-width: 12px;
}
.toolbar-meta {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}
.inline-field {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 12px;
  background: #f9fafb;
  border: 1px solid #e4e7ec;
  border-radius: 14px;
}
.inline-label {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
}
.inline-field select,
.inline-field input {
  min-width: 0;
  height: 34px;
  border: 0;
  background: transparent;
  padding: 0;
  font-family: var(--sys);
  font-size: 13px;
  letter-spacing: 0;
}
.toolbar-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  text-decoration: none;
}
.settings-card > *:not(:last-child) {
  margin-bottom: 12px;
}
.settings-card .row,
.settings-card .panel-actions,
.settings-card .toolbar-row {
  padding-left: 0;
  padding-right: 0;
}
.stat .label {
  color: #667085;
  font-size: 13px;
}
.stat .value {
  margin-top: 6px;
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.05em;
}
.stat .trend {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 800;
}
.stat.ok .trend { color: #12b76a; }
.stat.warn .trend { color: #f79009; }
.stat.bad .trend { color: #f04438; }
.stat.info .trend { color: var(--accent); }
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}
.table th,
.table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #f0f2f5;
  font-size: 13px;
}
.table th {
  background: #f9fafb;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}
.table tr:last-child td {
  border-bottom: 0;
}
.table tr.clickable:hover {
  background: #f8f9ff;
  cursor: pointer;
}
.table-empty {
  color: #667085;
  text-align: center !important;
}
.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 12px;
  font-weight: 800;
}
.badge.ok { background: #ecfdf3; color: #067647; }
.badge.warn { background: #fffaeb; color: #b54708; }
.badge.bad { background: #fef3f2; color: #b42318; }
.badge.info { background: #eef4ff; color: #3538cd; }
.list {
  display: grid;
  gap: 10px;
  padding: 18px 20px 20px;
}
.list-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #fff;
  border: 1px solid #e4e7ec;
  border-radius: 14px;
}
.empty-state {
  padding: 20px;
  color: #667085;
  font-size: 13px;
}
.detail-grid {
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 10px 16px;
  padding: 18px 20px 0;
  font-size: 13px;
}
.detail-grid dt {
  color: #667085;
}
.editor-card {
  padding: 18px 20px 20px;
}
.editor-card h4 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 800;
}
.editor-field {
  margin-bottom: 12px;
}
.editor-label {
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
}
.timeline {
  padding: 0 20px 20px;
}
.timeline ol {
  list-style: none;
  padding: 0;
  margin: 0;
}
.timeline li {
  display: grid;
  grid-template-columns: 96px 90px 1fr;
  gap: 12px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid #f0f2f5;
  font-size: 12px;
}
.timeline li:last-child {
  border-bottom: 0;
}
.timeline .ts {
  color: #667085;
  font-family: var(--mono);
}
.timeline .step {
  color: var(--accent);
  font-weight: 700;
}
.dialog-bg {
  position: fixed;
  inset: 0;
  background: rgba(16,24,40,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 200;
  padding: 24px;
}
.dialog {
  width: min(720px, 100%);
  max-height: 80vh;
  overflow: auto;
  background: #fff;
  border-radius: 18px;
  padding: 24px;
  box-shadow: 0 24px 48px rgba(0,0,0,0.2);
}
.dialog pre {
  background: #f5f7fb;
  padding: 12px;
  border-radius: 10px;
  font-size: 11px;
  overflow: auto;
}
.actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.actions button {
  width: auto;
  padding: 0 12px;
  margin: 0;
}
.row {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}
.row > * {
  flex: 0 0 auto;
}
.settings-card {
  padding: 0;
}
.settings-card h3 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 800;
}
.settings-field {
  display: block;
  margin-bottom: 12px;
}
.settings-label {
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 700;
}
.login-box {
  max-width: 420px;
  margin: 120px auto;
  background: #fff;
  padding: 36px 32px;
  border-radius: 18px;
  border: 1px solid #e4e7ec;
  box-shadow: 0 18px 42px rgba(16,24,40,0.08);
}
.login-box h1 {
  margin: 0 0 18px;
}
.login-box input {
  margin-bottom: 12px;
}
.bullets { list-style: disc; padding-left: 18px; margin: 0; font-size: 13px; color: var(--fg); line-height: 1.8; }
.bullets li { padding-left: 4px; }


/* ===== Site config admin editor ===== */
.site-config-editor {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1220px;
}
.site-config-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
  background: linear-gradient(135deg, #ffffff 0%, var(--accent-soft) 100%);
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.site-config-hero h3 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
.site-config-hero p {
  margin: 0;
  color: var(--dim);
  font-size: 13px;
  line-height: 1.6;
}
.site-config-kicker {
  margin: 0 0 4px !important;
  color: var(--accent) !important;
  font-family: var(--mono);
  font-size: 11px !important;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.site-config-save-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}
.site-config-save {
  width: auto;
  padding: 0 20px;
}
.site-config-save-status {
  color: var(--ok);
  font-size: 12px;
  font-weight: 600;
}
.site-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}
.site-config-card {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.site-config-card-head {
  padding: 18px 20px 14px;
  border-bottom: 1px solid #edf0f5;
  background: #fbfcff;
}
.site-config-card-head h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 700;
}
.site-config-card-head p {
  margin: 0;
  color: var(--dim);
  font-size: 12px;
  line-height: 1.6;
}
.site-config-card-body {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 18px 20px 20px;
}
.site-config-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.site-config-field > span,
.site-config-toggle > span {
  font-size: 12px;
  font-weight: 700;
  color: var(--fg);
}
.site-config-field small {
  color: var(--dim);
  font-size: 11px;
  line-height: 1.5;
}
.site-config-input {
  width: 100%;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--fg);
  font-family: var(--sys);
  font-size: 13px;
  letter-spacing: 0;
}
.site-config-textarea {
  min-height: 108px;
  height: 108px;
  padding: 10px 11px;
  font-family: var(--sys);
  font-size: 13px;
  line-height: 1.55;
  background: #fff;
  resize: vertical;
}
.site-config-textarea.compact {
  min-height: 76px;
  height: 76px;
}
.site-config-input:focus,
.site-config-textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(91, 117, 238, 0.14);
}
.site-config-toggle,
.site-config-toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.site-config-toggle {
  min-height: 34px;
  padding: 8px 10px;
  background: #f8fafd;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  cursor: pointer;
}
.site-config-checkbox {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  accent-color: var(--accent);
}
.site-config-two,
.site-config-three {
  display: grid;
  gap: 12px;
}
.site-config-two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.site-config-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.site-config-array-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.site-config-array-card {
  padding: 14px;
  background: #fbfcff;
  border: 1px solid var(--border-soft);
  border-radius: 10px;
}
.site-config-package-card {
  background: linear-gradient(180deg, #ffffff 0%, #f8faff 100%);
}
.site-config-array-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.site-config-array-head strong {
  font-size: 13px;
}
.site-config-remove {
  width: auto;
  height: 30px;
  padding: 0 10px;
  background: #fbeaec;
  color: var(--err);
  border: 1px solid #f2c0c6;
  border-radius: 7px;
  font-size: 12px;
}
.site-config-add {
  width: auto;
  height: 34px;
  padding: 0 14px;
  font-size: 12px;
}
.site-config-array-actions {
  display: flex;
  justify-content: flex-start;
}
.site-config-array-empty,
.site-config-empty {
  padding: 18px;
  color: var(--dim);
  background: #fff;
  border: 1px dashed var(--border);
  border-radius: 10px;
  font-size: 13px;
}
.site-config-empty.error {
  color: var(--err);
  background: #fbeaec;
  border-color: #f2c0c6;
}
@media (max-width: 1100px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: relative;
    height: auto;
  }
  .topbar {
    position: relative;
  }
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .detail-layout {
    grid-template-columns: 1fr;
  }
  .site-config-grid,
  .site-config-two,
  .site-config-three { grid-template-columns: 1fr; }
  .site-config-hero { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 720px) {
  .topbar {
    padding-left: 16px;
    padding-right: 16px;
    flex-direction: column;
    align-items: stretch;
  }
  .topbar-right,
  .topbar-actions {
    width: 100%;
  }
  .topbar-search {
    width: 100%;
  }
  .content {
    padding: 18px;
  }
  .grid-2,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  .timeline li {
    grid-template-columns: 1fr;
    gap: 4px;
  }
  .detail-grid {
    grid-template-columns: 1fr;
  }
  .site-config-card-head,
  .site-config-card-body,
  .site-config-hero { padding-left: 16px; padding-right: 16px; }
}

/* ===== 充值工作 tab: iframe 嵌入 /workbench ===== */
.workbench-iframe {
  width: 100%;
  height: calc(100vh - 130px);
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #fff;
  display: block;
  margin-top: 12px;
}
