:root {
  --brand: #0b5cad;
  --brand-dark: #08447f;
  --brand-soft: #e8f1fb;
  --accent: #ff6b35;
  --accent-dark: #e85820;
  --ink: #1d2433;
  --ink-2: #4a5468;
  --ink-3: #8a93a6;
  --line: #e3e7ee;
  --bg: #f5f7fa;
  --card: #fff;
  --ok: #1b9a59;
  --ok-soft: #e6f6ee;
  --warn: #c77700;
  --warn-soft: #fff4e0;
  --danger: #d23b3b;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 2px 8px rgba(16, 24, 40, .05);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); line-height: 1.6; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.3; margin: 0 0 .5em; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.app { flex: 1; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; }
.hidden { display: none !important; }

/* top bar */
.topbar { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.topbar-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.logo { font-weight: 800; font-size: 22px; color: var(--brand); display: flex; align-items: center; gap: 8px; letter-spacing: 1px; }
.logo:hover { text-decoration: none; }
.logo small { font-size: 12px; color: var(--ink-3); font-weight: 600; letter-spacing: 0; }
.logo-mark { width: 32px; height: 32px; border-radius: 9px; background: var(--brand); color: #fff; display: grid; place-items: center; font-size: 17px; }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a:not(.btn) { color: var(--ink-2); font-weight: 500; }
.nav a.active { color: var(--brand); }
.nav-user { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.nav-user a { color: var(--ink-2); font-weight: 500; }
.menu-btn { display: none; margin-left: auto; background: none; border: 0; font-size: 24px; cursor: pointer; color: var(--ink); }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-soft); color: var(--brand); display: inline-grid; place-items: center; font-weight: 700; flex-shrink: 0; }
.avatar.lg { width: 72px; height: 72px; font-size: 28px; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 1px solid transparent; border-radius: 999px; padding: 10px 22px; font-weight: 600; font-size: 15px; cursor: pointer; background: var(--brand); color: #fff; transition: background .15s; font-family: inherit; }
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn-accent { background: var(--accent); }
.btn-accent:hover { background: var(--accent-dark); }
.btn-ghost { background: #fff; color: var(--brand); border-color: var(--line); }
.btn-ghost:hover { background: var(--brand-soft); }
.btn-sm { padding: 6px 16px; font-size: 14px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* hero */
.hero { background: linear-gradient(135deg, #0b5cad 0%, #0a3f7a 100%); color: #fff; padding: 64px 0 72px; position: relative; overflow: hidden; }
.hero::after { content: "✈"; position: absolute; right: 6%; top: 18%; font-size: 220px; opacity: .07; transform: rotate(-18deg); }
.hero h1 { font-size: 44px; font-weight: 800; max-width: 680px; }
.hero p { font-size: 18px; opacity: .9; max-width: 600px; }
.hero-actions { display: flex; gap: 12px; margin-top: 28px; flex-wrap: wrap; }
.hero .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.hero .btn-ghost:hover { background: rgba(255,255,255,.1); }
.hero-search { margin-top: 32px; display: flex; max-width: 560px; background: #fff; border-radius: 999px; padding: 6px; }
.hero-search input { flex: 1; border: 0; outline: none; padding: 0 18px; font-size: 16px; border-radius: 999px; min-width: 0; font-family: inherit; }
.stats { display: flex; gap: 36px; margin-top: 36px; flex-wrap: wrap; }
.stats b { font-size: 28px; display: block; }
.stats span { opacity: .8; font-size: 14px; }

.section { padding: 56px 0; }
.section-head { display: flex; justify-content: space-between; align-items: end; margin-bottom: 24px; gap: 16px; }
.section-head h2 { font-size: 28px; margin: 0; }

.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; }
.cat-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; color: var(--ink); transition: .15s; }
.cat-card:hover { border-color: var(--brand); text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow); }
.cat-card .ico { font-size: 30px; }
.cat-card b { display: block; margin-top: 8px; }
.cat-card span { font-size: 13px; color: var(--ink-3); }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { background: #fff; border-radius: var(--radius); padding: 24px; border: 1px solid var(--line); }
.step-num { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-weight: 700; margin-bottom: 12px; }

.country-row { display: flex; flex-wrap: wrap; gap: 10px; }
.country-chip { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; color: var(--ink); font-weight: 500; }
.country-chip:hover { border-color: var(--brand); text-decoration: none; }

/* cards */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.task-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }

.task-card { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; color: var(--ink); transition: .12s; border-left: 4px solid var(--brand); }
.task-card.dir-from_cn { border-left-color: var(--accent); }
.task-card.dir-local { border-left-color: var(--ok); }
.task-card:hover { text-decoration: none; box-shadow: var(--shadow); border-color: #c8d3e3; }
.task-card.selected { border-color: var(--brand); box-shadow: 0 0 0 2px var(--brand-soft); }
.task-card-top { display: flex; justify-content: space-between; gap: 12px; }
.task-card h3 { font-size: 16px; margin: 0 0 6px; }
.price { font-size: 22px; font-weight: 800; white-space: nowrap; }
.price small { font-size: 12px; font-weight: 600; color: var(--ink-3); margin-right: 2px; }
.meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 13px; color: var(--ink-2); }
.task-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 10px; font-size: 13px; color: var(--ink-3); }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--brand-soft); color: var(--brand); white-space: nowrap; }
.badge.open { background: var(--ok-soft); color: var(--ok); }
.badge.assigned { background: var(--warn-soft); color: var(--warn); }
.badge.completed { background: #eef0f4; color: var(--ink-2); }
.badge.cancelled { background: #fbeaea; color: var(--danger); }
.badge.dir-to_cn { background: var(--brand-soft); color: var(--brand); }
.badge.dir-from_cn { background: #fff0e9; color: var(--accent-dark); }
.badge.dir-local { background: var(--ok-soft); color: var(--ok); }
.verified { color: var(--ok); font-size: 12px; font-weight: 600; white-space: nowrap; }
.route { font-weight: 600; }
.route .arrow { color: var(--ink-3); margin: 0 6px; }

/* browse layout */
.filters { background: #fff; border-bottom: 1px solid var(--line); padding: 12px 0; position: sticky; top: 64px; z-index: 10; }
.filters .wrap { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.filters input, .filters select { height: 38px; }
.filters input[type=search] { flex: 1; min-width: 180px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; overflow: hidden; }
.seg button { border: 0; background: #fff; padding: 7px 14px; cursor: pointer; font-size: 14px; color: var(--ink-2); font-family: inherit; }
.seg button.on { background: var(--brand); color: #fff; }
.browse { display: grid; grid-template-columns: 400px 1fr; gap: 20px; padding: 20px 16px; align-items: start; }
.browse-list { display: flex; flex-direction: column; gap: 10px; }
.browse-detail { position: sticky; top: 140px; max-height: calc(100vh - 160px); overflow: auto; }
.empty { text-align: center; padding: 48px 20px; color: var(--ink-3); }
.empty .ico { font-size: 40px; }

/* detail */
.detail h1 { font-size: 26px; }
.detail-grid { display: grid; grid-template-columns: 1fr 280px; gap: 24px; }
.detail-side .card { position: sticky; top: 90px; text-align: center; }
.detail-side .price { font-size: 36px; display: block; margin: 6px 0 14px; }
.info-list { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 16px 0; font-size: 14px; }
.info-list dt { color: var(--ink-3); }
.info-list dd { margin: 0; }
.desc { white-space: pre-wrap; }
.offer, .question { display: flex; gap: 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.offer:first-child, .question:first-child { border-top: 0; }
.offer-body { flex: 1; min-width: 0; }
.offer-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.notice { border-radius: 10px; padding: 12px 14px; font-size: 14px; background: var(--brand-soft); color: var(--brand-dark); margin: 12px 0; }
.notice.warn { background: var(--warn-soft); color: #8a5300; }
.notice.ok { background: var(--ok-soft); color: #0f6b3c; }
.notice.err { background: #fbeaea; color: #9b2222; }

/* forms */
.form-page { max-width: 680px; margin: 32px auto; }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; font-size: 14px; }
.field .hint { font-size: 12px; color: var(--ink-3); margin-top: 4px; }
input, select, textarea { width: 100%; border: 1px solid #cfd6e1; border-radius: 8px; padding: 9px 12px; font-size: 15px; font-family: inherit; background: #fff; color: var(--ink); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.filters select, .filters input { width: auto; }
textarea { min-height: 110px; resize: vertical; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 14px; font-weight: 400 !important; }
.check input { width: auto; margin-top: 4px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-opt { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; cursor: pointer; background: #fff; font-size: 14px; display: flex; align-items: center; gap: 6px; font-family: inherit; }
.chip-opt.on { border-color: var(--brand); background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.cat-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.cat-pick .chip-opt { flex-direction: column; padding: 14px; }
.cat-pick .chip-opt .ico { font-size: 24px; }
.upload-box { border: 2px dashed #cfd6e1; border-radius: 10px; padding: 16px; text-align: center; cursor: pointer; background: #fafbfd; }
.upload-box img { max-height: 160px; border-radius: 6px; display: block; margin: 8px auto 0; }
.auth-card { max-width: 420px; margin: 48px auto; }

/* tabs */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 16px; cursor: pointer; font-size: 15px; color: var(--ink-2); border-bottom: 2px solid transparent; font-family: inherit; white-space: nowrap; }
.tabs button.on { color: var(--brand); border-color: var(--brand); font-weight: 600; }
.list-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); align-items: center; }
.list-row:first-child { border-top: 0; }

.trip-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; display: flex; gap: 14px; }
.trip-date { text-align: center; min-width: 58px; background: var(--brand-soft); border-radius: 10px; padding: 6px; color: var(--brand); align-self: flex-start; }
.trip-date b { font-size: 22px; display: block; line-height: 1.1; }
.trip-date span { font-size: 12px; }

.profile-head { display: flex; gap: 20px; align-items: center; }
.stars { color: #f5a623; letter-spacing: 1px; }
.star-pick button { background: none; border: 0; font-size: 28px; cursor: pointer; color: #d5d9e0; padding: 0 2px; }
.star-pick button.on { color: #f5a623; }

.guide h2 { margin-top: 32px; }
.guide table { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; }
.guide th, .guide td { border: 1px solid var(--line); padding: 10px; text-align: left; vertical-align: top; }
.guide th { background: var(--brand-soft); }
.table-wrap { overflow-x: auto; }

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%) translateY(20px); background: var(--ink); color: #fff; padding: 10px 20px; border-radius: 999px; opacity: 0; pointer-events: none; transition: .2s; z-index: 100; font-size: 14px; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast.err { background: var(--danger); }

.footer { background: #111a2b; color: #aab3c5; margin-top: 64px; padding: 40px 0; font-size: 14px; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; }
.footer a { color: #d6dcea; }
.logo-foot { color: #fff; font-size: 20px; }
.foot-links { display: flex; flex-direction: column; gap: 6px; }
.foot-note { grid-column: 1 / -1; font-size: 12px; color: #7d879b; border-top: 1px solid #23304a; padding-top: 16px; margin: 0; }

.admin-item { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.admin-item img { width: 100%; border: 1px solid var(--line); border-radius: 8px; }

@media (max-width: 900px) {
  .browse { grid-template-columns: 1fr; }
  .browse-detail { display: none; }
  .detail-grid { grid-template-columns: 1fr; }
  .detail-side { order: -1; }
  .detail-side .card { position: static; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; background: #fff; flex-direction: column; align-items: stretch; padding: 12px 16px; border-bottom: 1px solid var(--line); gap: 12px; }
  .nav.open { display: flex; }
  .nav-user { margin-left: auto; }
  .menu-btn { display: block; margin-left: 0; }
  .hero { padding: 40px 0 48px; }
  .hero h1 { font-size: 30px; }
  .hero p { font-size: 16px; }
  .row, .row3, .admin-item { grid-template-columns: 1fr; }
  .task-grid { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .filters { position: static; }
  .section { padding: 36px 0; }
  .nav-user .hide-sm { display: none; }
}

/* 担保交易 */
.escrow-badge { background: #eef6ff; color: var(--brand-dark); }
.escrow-card { border-color: #b9d3ef; background: #fbfdff; margin: 16px 0 24px; }
.escrow-steps { display: flex; list-style: none; padding: 0; margin: 14px 0 6px; gap: 6px; counter-reset: st; flex-wrap: wrap; }
.escrow-steps li { flex: 1; min-width: 90px; font-size: 13px; color: var(--ink-3); border-top: 3px solid var(--line); padding-top: 6px; counter-increment: st; }
.escrow-steps li::before { content: counter(st) ". "; }
.escrow-steps li.done { color: var(--ok); border-color: var(--ok); }
.escrow-steps li.cur { color: var(--brand); border-color: var(--brand); font-weight: 600; }
.purchase-box { background: var(--brand-soft); border-radius: 10px; padding: 12px 14px; }
