:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --panel-soft: #eef7f3;
  --ink: #16202a;
  --muted: #66717f;
  --line: #dbe3ea;
  --line-strong: #c3ced8;
  --brand: #0f7b68;
  --brand-dark: #095d50;
  --brand-soft: #e1f3ee;
  --accent: #e56b45;
  --accent-soft: #fff0ea;
  --focus: #2f80ed;
  --danger: #c2413d;
  --shadow: 0 18px 45px rgba(22, 32, 42, 0.10);
  --radius: 8px;
  --nav-height: 68px;
  color-scheme: light;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 248, 251, 0.96) 34%),
    radial-gradient(circle at 18% 0%, rgba(15, 123, 104, 0.14), transparent 28%),
    radial-gradient(circle at 88% 8%, rgba(229, 107, 69, 0.12), transparent 24%),
    var(--bg);
  line-height: 1.55;
}

button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
code { color: var(--brand-dark); background: var(--brand-soft); padding: 0.12rem 0.35rem; border-radius: 5px; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: var(--nav-height);
  border-bottom: 1px solid rgba(219, 227, 234, 0.82);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(14px);
}
.topbar-inner {
  width: min(1180px, calc(100% - 32px));
  height: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: max-content;
  font-weight: 760;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(135deg, var(--brand), #193f69);
  box-shadow: 0 8px 22px rgba(15, 123, 104, 0.20);
  font-weight: 800;
}
.brand-mark svg { width: 21px; height: 21px; }
.brand small { display: block; color: var(--muted); font-size: 12px; font-weight: 560; margin-top: -2px; }
.nav { display: flex; align-items: center; gap: 26px; color: #43505d; font-size: 14px; }
.nav a { line-height: 1; white-space: nowrap; }
.nav a:hover { color: var(--brand); }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.ghost-link {
  border: 0;
  background: transparent;
  color: #384756;
  padding: 9px 10px;
  border-radius: 6px;
}
.ghost-link:hover { color: var(--brand); background: var(--brand-soft); }

.page { width: min(1180px, calc(100% - 32px)); margin: 34px auto 54px; }
.intro {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 358px;
  gap: 28px;
  align-items: stretch;
  margin-bottom: 24px;
}
.intro-copy { padding: 28px 0 14px; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 680;
  margin: 0;
}
.eyebrow::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
h1, h2, h3 { line-height: 1.15; letter-spacing: 0; }
h1 { max-width: 760px; margin: 18px 0 14px; font-size: clamp(34px, 5vw, 58px); line-height: 1.02; }
h2, h3 { margin: 0; }
.lead { max-width: 680px; margin: 0; color: var(--muted); font-size: 17px; line-height: 1.72; }
.quick-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.quick-stats span, .hint {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 10px;
  color: #425162;
  background: #fff;
  font-size: 13px;
}
.quick-stats strong { color: var(--brand-dark); margin-right: 5px; }
.coverage-panel {
  min-height: 280px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: #102033;
  box-shadow: var(--shadow);
  position: relative;
}
.coverage-panel svg { display: block; width: 100%; height: 100%; min-height: 280px; }
.coverage-note {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
}
.coverage-note strong { display: block; color: #fff; font-size: 18px; line-height: 1.1; margin-bottom: 3px; }

.progress { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 16px; }
.progress-item {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.80);
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 68px;
}
.progress-item.is-active { border-color: rgba(15, 123, 104, 0.45); background: var(--brand-soft); }
.progress-index {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #e8edf2;
  color: #4d5965;
  font-weight: 760;
  flex: 0 0 auto;
}
.progress-item.is-active .progress-index { background: var(--brand); color: #fff; }
.progress-title { display: block; font-weight: 740; line-height: 1.2; }
.progress-meta { display: block; margin-top: 4px; color: var(--muted); font-size: 13px; line-height: 1.2; }

.purchase-grid { display: grid; grid-template-columns: minmax(0, 1fr) 358px; gap: 28px; align-items: start; }
.flow { display: grid; gap: 16px; }
.section, .summary, .panel, .product-card, .result-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  overflow: hidden;
}
.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 19px 20px 16px;
  border-bottom: 1px solid var(--line);
}
.section-title { margin: 0; font-size: 18px; line-height: 1.25; }
.section-subtitle { margin: 6px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.section-body { padding: 20px; }
.region-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.choice-card {
  position: relative;
  min-height: 174px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  padding: 15px;
  text-align: left;
  color: var(--ink);
  transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
}
.choice-card:hover { border-color: var(--line-strong); transform: translateY(-1px); }
.choice-card.is-selected { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15, 123, 104, 0.14); }
.choice-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.country { display: flex; flex-direction: column; gap: 4px; }
.country strong { font-size: 17px; line-height: 1.15; }
.country span { color: var(--muted); font-size: 13px; line-height: 1.2; }
.pin {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--panel-soft);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: var(--brand);
  font-weight: 780;
}
.resource-desc { display: block; color: #4e5b68; font-size: 14px; line-height: 1.55; margin-top: 14px; }
.stock-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 18px; color: var(--muted); font-size: 13px; }
.price { display: block; margin-top: 8px; font-size: 21px; font-weight: 780; }
.price small { color: var(--muted); font-size: 13px; font-weight: 560; }

.config-form { display: grid; gap: 16px; }
.config-grid, .checkout-form, .test-form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 8px; }
.field label, label { color: #344253; font-size: 14px; font-weight: 690; }
.select-wrap select, .field input, input, select, textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 0 13px;
  outline: none;
}
textarea { min-height: 160px; padding: 12px 13px; resize: vertical; }
.select-wrap { position: relative; }
.select-wrap select { appearance: none; padding-right: 40px; }
.select-wrap::after {
  content: "";
  position: absolute;
  right: 15px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-right: 2px solid #53606f;
  border-bottom: 2px solid #53606f;
  transform: translateY(-64%) rotate(45deg);
  pointer-events: none;
}
.quantity { height: 46px; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; display: grid; grid-template-columns: 46px 1fr 46px; overflow: hidden; }
.qty-btn { border: 0; background: #f2f5f8; color: #2c3845; display: grid; place-items: center; min-width: 46px; font-size: 20px; }
.qty-btn:hover { background: var(--brand-soft); color: var(--brand-dark); }
.quantity input { border: 0; border-left: 1px solid var(--line); border-right: 1px solid var(--line); height: 44px; text-align: center; padding: 0; font-weight: 760; }
.cycle-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.cycle-btn {
  min-height: 68px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  padding: 11px;
  text-align: left;
}
.cycle-btn strong, .pay-mode strong { display: block; line-height: 1.2; }
.cycle-btn span, .pay-mode span { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.3; }
.cycle-btn.is-selected, .pay-mode.is-selected { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px rgba(15, 123, 104, 0.12); }
.span-2, .wide { grid-column: 1 / -1; }
.inline-submit { justify-self: start; width: auto; padding-inline: 18px; }

.summary { position: sticky; top: calc(var(--nav-height) + 18px); background: var(--panel); box-shadow: var(--shadow); }
.summary-head { padding: 20px; border-bottom: 1px solid var(--line); background: #fbfcfd; }
.summary-title { margin: 0; font-size: 18px; }
.summary-body { padding: 18px 20px 20px; }
.summary-list { display: grid; gap: 13px; padding: 0 0 16px; margin: 0; border-bottom: 1px solid var(--line); list-style: none; }
.summary-list li, .total-row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; color: var(--muted); font-size: 14px; }
.summary-list strong, .total-row strong { color: var(--ink); text-align: right; }
.total-row { margin-top: 18px; color: #2d3a47; }
.total-row strong { color: var(--brand-dark); font-size: 30px; }
.summary-warning { margin-top: 14px; border: 1px solid rgba(194, 65, 61, 0.22); background: #fff3f1; color: var(--danger); border-radius: var(--radius); padding: 10px 12px; font-size: 13px; }
.action-stack { display: grid; gap: 10px; margin-top: 20px; }
.primary-btn, .secondary-btn, .button {
  width: 100%;
  min-height: 48px;
  border-radius: var(--radius);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-weight: 760;
  border: 1px solid transparent;
}
.primary-btn, .button.primary { color: #fff; background: var(--brand); }
.primary-btn:hover, .button.primary:hover { background: var(--brand-dark); }
.secondary-btn, .button.secondary { color: var(--brand-dark); background: #fff; border-color: rgba(15, 123, 104, 0.32); }
.secondary-btn:hover, .button.secondary:hover { background: var(--brand-soft); }
.button.ghost { background: #fff; color: var(--brand-dark); border-color: var(--line); }
.button:disabled, .primary-btn:disabled, .secondary-btn:disabled { opacity: 0.6; cursor: wait; }
.microcopy { margin: 14px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; text-align: center; }
.result-card { margin-top: 18px; padding: 16px; background: #fff; }
.result-card h3 { margin-bottom: 8px; }
.result-card p { margin: 8px 0; color: #40505f; }
.hidden { display: none !important; }
.quote-result { display: block; color: #314050; background: #fbfcfd; border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 12px; white-space: pre-wrap; }
.notice { margin: 14px auto; width: min(1180px, calc(100% - 32px)); padding: 12px 14px; border: 1px solid rgba(229, 107, 69, 0.24); background: var(--accent-soft); border-radius: var(--radius); color: #8b3d25; }

.support-band { margin-top: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255, 255, 255, 0.86); padding: 16px 20px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.support-item { min-height: 54px; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.support-item strong { font-size: 14px; }
.support-item span { color: var(--muted); font-size: 12px; line-height: 1.35; }
.support-item a { color: var(--brand-dark); font-weight: 700; }
.toast { position: fixed; right: 18px; bottom: 18px; z-index: 30; width: min(360px, calc(100vw - 36px)); border: 1px solid rgba(15, 123, 104, 0.28); border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); padding: 14px 16px; color: #1d2a36; transform: translateY(18px); opacity: 0; pointer-events: none; transition: transform 180ms ease, opacity 180ms ease; }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.toast strong { display: block; margin-bottom: 4px; }
.toast span { display: block; color: var(--muted); font-size: 13px; line-height: 1.45; }

/* Tables and admin shared styles */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
table { width: 100%; border-collapse: collapse; min-width: 900px; }
th, td { text-align: left; padding: 0.85rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: #344253; background: #f4f7fa; font-size: 0.9rem; }
td { color: #24313e; }
tr:last-child td { border-bottom: none; }
.status { display: inline-flex; border-radius: 999px; padding: 0.22rem 0.55rem; font-size: 0.8rem; font-weight: 800; }
.status.available { background: var(--brand-soft); color: var(--brand-dark); }
.status.reserved { background: var(--accent-soft); color: #9b4729; }
.status.sold { background: #fff0f0; color: var(--danger); }
.small-action { border-radius: 6px; padding: 0.45rem 0.65rem; min-height: 0; width: auto; }
.footer { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0; color: var(--muted); }

.choice-card:focus-visible, .cycle-btn:focus-visible, .qty-btn:focus-visible, .pay-mode:focus-visible, .primary-btn:focus-visible, .secondary-btn:focus-visible, .button:focus-visible, .ghost-link:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(47, 128, 237, 0.30);
  outline-offset: 2px;
}

@media (max-width: 960px) {
  .intro, .purchase-grid { grid-template-columns: 1fr; }
  .intro-copy { padding-top: 10px; }
  .coverage-panel, .coverage-panel svg { min-height: 230px; }
  .summary { position: static; }
  .support-band { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .topbar-inner, .page { width: min(100% - 24px, 1180px); }
  .topbar { height: auto; }
  .topbar-inner { min-height: var(--nav-height); flex-wrap: wrap; gap: 12px; padding: 10px 0; }
  .nav { order: 3; width: 100%; overflow-x: auto; gap: 18px; padding-bottom: 4px; }
  .nav-actions { margin-left: auto; }
  .page { margin-top: 24px; }
  h1 { font-size: 34px; }
  .progress, .region-grid, .config-grid, .checkout-form, .test-form, .cycle-row { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; }
  .support-band { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  .brand > span:last-child { max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .ghost-link { padding-inline: 6px; }
  .section-body, .section-head, .summary-body, .summary-head { padding-inline: 14px; }
}
