* { box-sizing: border-box; }
body { font-family: -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif; margin: 0; color: #1a2238; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px; background: #18234a; color: #fff; }
.topbar a, .topbar button { color: #cfe; background: none; border: 0; cursor: pointer; margin-right: 12px; text-decoration: none; }
.container { max-width: 760px; margin: 24px auto; padding: 0 16px; }
label { display: block; margin: 10px 0; }
input, select { display: block; width: 100%; padding: 8px; margin-top: 4px; }
button[type=submit] { background: #2563eb; color: #fff; border: 0; padding: 10px 16px; border-radius: 6px; cursor: pointer; }
.error { color: #b91c1c; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 8px; border-bottom: 1px solid #e5e7eb; }
.status-paid { color: #b45309; } .status-purchased { color: #15803d; } .status-failed { color: #b91c1c; }
.notice { color: #6b7280; font-size: 13px; }
textarea { width: 100%; padding: 8px; }

/* ── Wizard ── */
.wiz-progress { display: flex; gap: 8px; margin-bottom: 28px; }
.wiz-dot { height: 4px; border-radius: 2px; flex: 1; background: #e5e7eb; transition: background .2s; }
.wiz-dot.active { background: #2563eb; }

.wiz-step { display: none; }
.wiz-step.visible { display: block; }

.wiz-step h2 { font-size: 20px; font-weight: 700; margin: 0 0 20px; color: #1e3a8a; }

.wiz-section { margin-bottom: 20px; }
.wiz-section-title {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .6px; color: #9ca3af; margin-bottom: 8px;
}

.wiz-row { display: flex; gap: 10px; }
.wiz-row > * { flex: 1; }

.wiz-hint {
  background: #fff7ed; border-left: 3px solid #f59e0b;
  padding: 8px 12px; font-size: 13px; color: #92400e;
  border-radius: 0 6px 6px 0; margin-bottom: 10px;
}
.wiz-error {
  background: #fef2f2; border-left: 3px solid #ef4444;
  padding: 8px 12px; font-size: 13px; color: #b91c1c;
  border-radius: 0 6px 6px 0; margin-bottom: 10px;
  display: none;
}
.wiz-error.visible { display: block; }

.wiz-nav { display: flex; justify-content: space-between; align-items: center; margin-top: 24px; }
.btn-back {
  background: #f3f4f6; color: #374151; border: 0;
  padding: 10px 18px; border-radius: 6px; cursor: pointer; font-size: 14px;
}
.btn-next, .btn-pay {
  background: #2563eb; color: #fff; border: 0;
  padding: 10px 22px; border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 600;
}
.btn-pay { background: #16a34a; }
.btn-next:disabled { opacity: .6; cursor: not-allowed; }

/* Address picker */
.addr-pick-btn {
  display: block; width: 100%; text-align: left;
  background: #eff6ff; border: 1px dashed #93c5fd;
  border-radius: 6px; padding: 8px 12px; font-size: 13px;
  color: #1d4ed8; cursor: pointer; margin-bottom: 10px;
}
.addr-pick-wrap { position: relative; }
.addr-pick-select {
  display: none; position: absolute; top: 38px; left: 0; right: 0; z-index: 10;
  background: #fff; border: 1px solid #d1d5db; border-radius: 6px;
  box-shadow: 0 4px 12px rgba(0,0,0,.1); padding: 4px 0;
}
.addr-pick-select.open { display: block; }
.addr-pick-option {
  padding: 10px 14px; cursor: pointer; font-size: 13px;
}
.addr-pick-option:hover { background: #f3f4f6; }

/* Country badge (auto-filled) */
.country-badge {
  display: inline-block; background: #dcfce7; color: #166534;
  border-radius: 4px; font-size: 11px; padding: 2px 7px;
  margin-left: 6px; font-weight: 600;
}

/* Locked input */
input[readonly] { background: #f9fafb; color: #6b7280; cursor: not-allowed; }

/* CN/HK toggle */
.cn-hk-toggle { display: flex; gap: 0; margin-bottom: 10px; }
.cn-hk-toggle button {
  flex: 1; padding: 8px; border: 1px solid #d1d5db; background: #f9fafb;
  cursor: pointer; font-size: 13px; color: #374151;
}
.cn-hk-toggle button:first-child { border-radius: 6px 0 0 6px; }
.cn-hk-toggle button:last-child  { border-radius: 0 6px 6px 0; border-left: none; }
.cn-hk-toggle button.selected { background: #2563eb; color: #fff; border-color: #2563eb; }

/* Customs table */
.customs-table { width: 100%; border-collapse: collapse; margin-bottom: 6px; }
.customs-table th { font-size: 11px; color: #9ca3af; font-weight: 600; text-align: left; padding: 4px 4px 6px; }
.customs-table td { padding: 3px 4px; }
.customs-table input, .customs-table select { padding: 6px; font-size: 13px; }
.btn-remove-row { background: none; border: none; color: #9ca3af; cursor: pointer; font-size: 15px; padding: 4px; }
.btn-remove-row:hover { color: #ef4444; }
.btn-add-item { background: none; border: none; color: #2563eb; cursor: pointer; font-size: 13px; padding: 4px 0; }

/* Quote result (step 4) */
.quote-price {
  text-align: center; font-size: 36px; font-weight: 800;
  color: #1e3a8a; padding: 16px 0 4px;
}
.quote-meta { text-align: center; font-size: 13px; color: #6b7280; margin-bottom: 20px; }
.quote-countdown { font-weight: 600; color: #d97706; }
.summary-table { width: 100%; font-size: 14px; }
.summary-table td { padding: 6px 0; border-bottom: 1px solid #f3f4f6; }
.summary-table td:first-child { color: #6b7280; width: 90px; }
.summary-table tr:last-child td { border: none; }

/* Prohibited ack */
.prohibited-box {
  background: #fef2f2; border-radius: 6px; padding: 12px;
  font-size: 13px; color: #7f1d1d; display: flex; gap: 10px; align-items: flex-start;
  margin-top: 16px;
}
.prohibited-box input[type=checkbox] { margin-top: 2px; flex-shrink: 0; width: auto; display: inline; }

/* hidden utility */
.hidden { display: none !important; }
