/* =========================================================================
 * 全球代购 & 转运平台 —— 样式表
 * ========================================================================= */
:root {
  --brand: #ff5a1f;
  --brand-2: #ff8a3d;
  --brand-dk: #e04510;
  --ink: #1b1f27;
  --ink-2: #4a5261;
  --ink-3: #8a93a3;
  --line: #e8ebf0;
  --bg: #f5f7fa;
  --card: #ffffff;
  --ok: #16a34a;
  --warn: #d97706;
  --info: #2563eb;
  --nav-h: 62px;
  --radius: 14px;
  --shadow: 0 4px 18px rgba(22, 30, 45, .06);
  --shadow-lg: 0 12px 38px rgba(22, 30, 45, .12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
               "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: 14px; }

/* ---------------- 顶部导航 ---------------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-in {
  max-width: 1180px; margin: 0 auto; height: 100%;
  padding: 0 20px; display: flex; align-items: center; gap: 26px;
}
.logo { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 17px; letter-spacing: .2px; }
.logo .mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: grid; place-items: center; color: #fff; font-size: 15px; font-weight: 800;
}
.nav-links { display: flex; gap: 4px; margin-left: 6px; }
.nav-links a {
  padding: 8px 13px; border-radius: 9px; color: var(--ink-2);
  font-weight: 500; transition: .16s; white-space: nowrap;
}
.nav-links a:hover { background: #f1f4f9; color: var(--ink); }
.nav-links a.on { background: #fff2ec; color: var(--brand-dk); font-weight: 600; }
.nav-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.balance-chip {
  display: flex; align-items: center; gap: 6px;
  background: #fff6f1; border: 1px solid #ffd9c6; color: var(--brand-dk);
  padding: 6px 12px; border-radius: 999px; font-weight: 700; font-size: 13px;
}
.balance-chip small { font-weight: 500; color: #b4623a; }
.btn-mini {
  padding: 7px 14px; border-radius: 9px; border: none; font-size: 13px; font-weight: 600;
  background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff;
}
.btn-mini.ghost { background: #fff; color: var(--ink-2); border: 1px solid var(--line); }
.nav-toggle { display: none; background: none; border: none; font-size: 20px; }

/* ---------------- 通用容器 ---------------- */
.wrap { max-width: 1180px; margin: 0 auto; padding: 26px 20px 70px; }
.page-title { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.page-sub { color: var(--ink-3); margin-bottom: 22px; font-size: 13px; }

/* ---------------- 按钮 ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 22px; border-radius: 11px; border: none;
  font-size: 14px; font-weight: 600; transition: .16s; white-space: nowrap;
}
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 6px 18px rgba(255,90,31,.28); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 9px 24px rgba(255,90,31,.34); }
.btn-outline { background: #fff; border: 1px solid var(--line); color: var(--ink); }
.btn-outline:hover { border-color: #cfd6e2; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 9px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

/* ---------------- 卡片 ---------------- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 20px 22px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; }
.card-head h3 { font-size: 15px; font-weight: 700; }
.card-head .dot { width: 4px; height: 15px; border-radius: 3px; background: var(--brand); }

/* ---------------- 首页 Hero ---------------- */
.hero {
  background:
    radial-gradient(1100px 420px at 82% -12%, rgba(255,138,61,.22), transparent 60%),
    radial-gradient(760px 380px at 8% 108%, rgba(255,90,31,.13), transparent 62%),
    linear-gradient(160deg, #1b1f27 0%, #2a2f3c 55%, #232833 100%);
  color: #fff; border-radius: 22px; padding: 54px 46px 50px; position: relative; overflow: hidden;
}
.hero::after {
  content: ""; position: absolute; right: -110px; top: -110px; width: 340px; height: 340px;
  border-radius: 50%; background: radial-gradient(circle, rgba(255,138,61,.30), transparent 68%);
}
.hero .tag {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600;
  background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.16);
  padding: 6px 13px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 { font-size: 37px; line-height: 1.24; font-weight: 800; letter-spacing: -.5px; }
.hero h1 em { font-style: normal; background: linear-gradient(100deg, #ff8a3d, #ffbe8a); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p.lead { margin-top: 15px; color: #c4cad6; font-size: 15px; max-width: 640px; }
.hero-actions { margin-top: 28px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-actions .btn-ghost { background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.22); color: #fff; }
.hero-actions .btn-ghost:hover { background: rgba(255,255,255,.18); }
.hero-metrics { margin-top: 34px; display: flex; gap: 40px; flex-wrap: wrap; }
.hero-metrics .m b { display: block; font-size: 25px; font-weight: 800; letter-spacing: -.4px; }
.hero-metrics .m span { color: #98a1b2; font-size: 12.5px; }

/* ---------------- 章节 ---------------- */
.section { margin-top: 44px; }
.section-title { display: flex; align-items: baseline; gap: 12px; margin-bottom: 18px; }
.section-title h2 { font-size: 19px; font-weight: 700; }
.section-title span { color: var(--ink-3); font-size: 13px; }

/* ---------------- 步骤 ---------------- */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.step { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px 20px; position: relative; }
.step .n {
  width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center;
  background: #fff2ec; color: var(--brand-dk); font-weight: 800; font-size: 14px; margin-bottom: 13px;
}
.step h4 { font-size: 14.5px; margin-bottom: 6px; }
.step p { color: var(--ink-3); font-size: 12.8px; line-height: 1.65; }

/* ---------------- 品类 ---------------- */
.cats { display: flex; flex-wrap: wrap; gap: 10px; }
.cat-chip {
  padding: 9px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line);
  font-size: 13.5px; color: var(--ink-2); transition: .16s;
}
.cat-chip:hover { border-color: var(--brand); color: var(--brand-dk); background: #fff8f5; }

/* ---------------- 仓库网格 ---------------- */
.wh-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.wh-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 19px; box-shadow: var(--shadow); transition: .18s; }
.wh-card:hover { box-shadow: var(--shadow-lg); transform: translateY(-2px); border-color: #dfe4ec; }
.wh-head { display: flex; align-items: center; gap: 11px; margin-bottom: 13px; }
.wh-flag { font-size: 27px; line-height: 1; }
.wh-head h4 { font-size: 15px; font-weight: 700; }
.wh-head .sub { color: var(--ink-3); font-size: 12px; }
.wh-tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.tag-pill { font-size: 11.5px; padding: 3px 9px; border-radius: 6px; background: #f1f4f9; color: var(--ink-2); }
.tag-pill.hot { background: #fff2ec; color: var(--brand-dk); }
.wh-row { font-size: 12.8px; color: var(--ink-2); display: flex; gap: 8px; margin-bottom: 6px; }
.wh-row .k { color: var(--ink-3); flex: 0 0 46px; }
.wh-row .v { flex: 1; word-break: break-word; }
.wh-addr {
  background: #f7f9fc; border: 1px dashed #dbe2ee; border-radius: 10px;
  padding: 10px 12px; font-size: 12.5px; color: var(--ink-2); margin: 10px 0 8px;
  line-height: 1.6; word-break: break-word; font-family: ui-monospace, Menlo, Consolas, monospace;
}
.wh-note { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
.wh-foot { display: flex; gap: 8px; margin-top: 12px; }

/* ---------------- 表单 ---------------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.full { grid-column: 1 / -1; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field label .req { color: var(--brand); margin-left: 2px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10.5px 13px; border: 1px solid var(--line); border-radius: 10px;
  background: #fff; color: var(--ink); transition: .15s; outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px rgba(255,90,31,.12);
}
.field textarea { resize: vertical; min-height: 78px; }
.field .hint { font-size: 11.5px; color: var(--ink-3); }
.radio-row { display: flex; gap: 10px; flex-wrap: wrap; }
.radio-card {
  flex: 1 1 120px; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  display: flex; align-items: center; gap: 9px; cursor: pointer; transition: .15s; background: #fff;
}
.radio-card:hover { border-color: #d3dae6; }
.radio-card input { width: auto; }
.radio-card.sel { border-color: var(--brand); background: #fff8f5; box-shadow: 0 0 0 3px rgba(255,90,31,.08); }

/* ---------------- 布局：主 + 侧栏 ---------------- */
.layout { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.side-sticky { position: sticky; top: calc(var(--nav-h) + 22px); }

/* ---------------- 费用明细 ---------------- */
.sum-row { display: flex; justify-content: space-between; padding: 9px 0; font-size: 13.5px; color: var(--ink-2); border-bottom: 1px dashed var(--line); }
.sum-row:last-of-type { border-bottom: none; }
.sum-row .v { font-weight: 600; color: var(--ink); }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; padding-top: 13px; border-top: 1px solid var(--line); }
.sum-total b { font-size: 24px; color: var(--brand-dk); font-weight: 800; }

/* ---------------- 表格 ---------------- */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th { text-align: left; font-weight: 600; color: var(--ink-3); padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; font-size: 12.5px; }
.table td { padding: 13px 12px; border-bottom: 1px solid #f1f4f9; vertical-align: middle; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: #fafbfd; }
.empty { text-align: center; color: var(--ink-3); padding: 46px 10px; font-size: 13.5px; }
.empty .big { font-size: 34px; margin-bottom: 10px; opacity: .5; }

/* ---------------- 徽标 ---------------- */
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge-warn { background: #fff7e6; color: var(--warn); }
.badge-info { background: #eef4ff; color: var(--info); }
.badge-ok { background: #eafaf1; color: var(--ok); }
.badge-primary { background: #fff2ec; color: var(--brand-dk); }
.badge-mute { background: #f1f4f9; color: var(--ink-3); }

/* ---------------- Tabs ---------------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tab { padding: 11px 17px; font-size: 13.5px; font-weight: 600; color: var(--ink-3); border-bottom: 2px solid transparent; cursor: pointer; white-space: nowrap; }
.tab.on { color: var(--brand-dk); border-bottom-color: var(--brand); }
.tab .cnt { font-size: 11px; background: #f1f4f9; border-radius: 999px; padding: 1px 7px; margin-left: 5px; }

/* ---------------- 余额大卡 ---------------- */
.balance-hero {
  background: linear-gradient(135deg, #1b1f27, #333a49); color: #fff;
  border-radius: 18px; padding: 26px 28px; display: flex; align-items: center; gap: 30px; flex-wrap: wrap;
}
.balance-hero .lbl { color: #98a1b2; font-size: 13px; margin-bottom: 6px; }
.balance-hero .amt { font-size: 38px; font-weight: 800; letter-spacing: -.6px; }
.balance-hero .amt small { font-size: 17px; font-weight: 600; margin-right: 3px; }
.balance-hero .metric { margin-left: auto; display: flex; gap: 34px; }
.balance-hero .metric .m b { display: block; font-size: 19px; font-weight: 700; }
.balance-hero .metric .m span { color: #98a1b2; font-size: 12px; }

/* ---------------- 弹窗 ---------------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(20, 25, 34, .55); backdrop-filter: blur(3px);
  display: none; align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal-mask.on { display: flex; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 520px; max-height: 88vh; overflow: auto; box-shadow: var(--shadow-lg); }
.modal-head { display: flex; align-items: center; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h3 { font-size: 16px; font-weight: 700; }
.modal-head .x { margin-left: auto; background: none; border: none; font-size: 21px; color: var(--ink-3); line-height: 1; }
.modal-body { padding: 22px; }
.modal-foot { padding: 16px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; justify-content: flex-end; }

/* ---------------- Toast ---------------- */
#toast {
  position: fixed; left: 50%; bottom: 42px; transform: translate(-50%, 26px);
  background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 11px;
  font-size: 13.5px; font-weight: 500; opacity: 0; pointer-events: none; transition: .26s; z-index: 200;
  box-shadow: 0 12px 30px rgba(0,0,0,.24); max-width: 86vw;
}
#toast.on { opacity: 1; transform: translate(-50%, 0); }
#toast.err { background: #c0392b; }

/* ---------------- 工具条 ---------------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.filter-chip { padding: 7px 15px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13px; color: var(--ink-2); }
.filter-chip.on { background: var(--brand); border-color: var(--brand); color: #fff; font-weight: 600; }
.search-box { margin-left: auto; position: relative; }
.search-box input { padding: 9px 14px 9px 34px; border: 1px solid var(--line); border-radius: 10px; width: 230px; outline: none; }
.search-box input:focus { border-color: var(--brand); }
.search-box::before { content: "🔍"; position: absolute; left: 11px; top: 50%; transform: translateY(-50%); font-size: 12px; opacity: .55; }

/* ---------------- 页脚 ---------------- */
.footer { border-top: 1px solid var(--line); background: #fff; margin-top: 20px; }
.footer-in { max-width: 1180px; margin: 0 auto; padding: 30px 20px; color: var(--ink-3); font-size: 12.5px; line-height: 1.9; }
.footer-in b { color: var(--ink-2); }

/* ---------------- 响应式 ---------------- */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr 1fr; }
  .hero { padding: 40px 26px; }
  .hero h1 { font-size: 28px; }
}
@media (max-width: 720px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; margin-left: auto; }
  .nav-in { gap: 12px; }
  .form-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .hero-metrics { gap: 26px; }
  .balance-hero .metric { margin-left: 0; }
  .wh-grid { grid-template-columns: 1fr; }
  .search-box { margin-left: 0; width: 100%; }
  .search-box input { width: 100%; }
}
