:root {
  --red: #c8102e;
  --red-dark: #9b0d24;
  --navy: #141b2d;
  --ink: #1c2434;
  --muted: #667085;
  --line: #e7ebf3;
  --bg: #f3f5fa;
  --card: #ffffff;
  --ok: #0f9d58;
  --warn: #e67e22;
  --info: #1a73e8;
  --bad: #d93025;
  --shadow: 0 18px 50px rgba(20, 27, 45, 0.08);
  --accent: var(--red);
}
html[data-theme="intl"] {
  --red: #0b5cab;
  --red-dark: #084a8a;
  --info: #0b5cab;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { min-height: 100%; }
body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background:
    radial-gradient(1200px 420px at 80% -10%, rgba(200, 16, 46, 0.16), transparent 55%),
    linear-gradient(180deg, #171e31 0%, #1d2740 220px, var(--bg) 220px);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}
html[data-theme="intl"] body {
  background:
    radial-gradient(1200px 420px at 18% -8%, rgba(11, 92, 171, 0.28), transparent 50%),
    linear-gradient(180deg, #0d1828 0%, #13253d 220px, #eef3f8 220px);
}
button, input, select { font-family: inherit; }
a { color: inherit; }

.top {
  width: min(920px, calc(100% - 32px));
  margin: 0 auto;
  padding: 22px 0 18px;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.logo {
  height: 42px; padding: 0 12px; border-radius: 12px;
  background: linear-gradient(180deg, var(--red), var(--red-dark));
  display: grid; place-items: center;
  color: #fff; font-size: 14px; font-weight: 800; letter-spacing: 0.08em;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}
.brand h1 { font-size: 20px; font-weight: 700; letter-spacing: 0.04em; }
.brand p { font-size: 12px; opacity: 0.72; margin-top: 2px; }
.wrap { width: min(920px, calc(100% - 32px)); margin: 0 auto 48px; }
.hero { color: #fff; margin-bottom: 18px; }
.hero h2 { font-size: 28px; font-weight: 720; letter-spacing: 0.02em; }
.hero p { margin-top: 8px; color: #c9d2e5; font-size: 14px; line-height: 1.6; }

.card {
  background: var(--card);
  border-radius: 22px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.7);
}
.search { padding: 22px; }
.row { display: grid; grid-template-columns: 1fr 200px auto; gap: 10px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field span { font-size: 12px; color: var(--muted); }
input, select {
  height: 48px; border-radius: 12px; border: 1px solid var(--line);
  padding: 0 14px; font-size: 15px; background: #fbfcff; color: var(--ink); outline: none;
}
input:focus, select:focus { border-color: color-mix(in srgb, var(--red) 55%, white); box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 12%, transparent); background: #fff; }
.go {
  height: 48px; margin-top: 20px; min-width: 108px; border: 0; border-radius: 12px;
  background: linear-gradient(180deg, var(--red), var(--red-dark)); color: #fff; font-size: 15px; font-weight: 700;
  cursor: pointer; box-shadow: 0 10px 20px color-mix(in srgb, var(--red) 30%, transparent);
}
.go:hover { filter: brightness(1.05); }
.go:disabled { opacity: 0.6; cursor: wait; }
.hint { margin-top: 12px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
  border: 1px solid var(--line); background: #fff; color: #334155;
  border-radius: 999px; padding: 6px 10px; font-size: 12px; cursor: pointer;
  text-decoration: none; display: inline-flex; align-items: center;
}
.chip:hover, .chip.active { border-color: var(--red); color: var(--red); }

.result { margin-top: 16px; overflow: hidden; }
.status {
  padding: 22px 24px 18px;
  display: flex; justify-content: space-between; gap: 16px; align-items: flex-start;
  background: linear-gradient(180deg, #fff, #f8fafc);
  border-bottom: 1px solid var(--line);
}
.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
}
.k-signed { background: #e8f7ee; color: var(--ok); }
.k-delivering { background: #fff4e5; color: var(--warn); }
.k-transit, .k-pickup, .k-customs, .k-forward { background: #e8f1fe; color: var(--info); }
.k-problem, .k-reject, .k-return { background: #fdecea; color: var(--bad); }
.k-empty { background: #eef2f7; color: #64748b; }
.meta { color: var(--muted); font-size: 13px; margin-top: 8px; line-height: 1.6; }
.copy {
  border: 1px solid var(--line); background: #fff; border-radius: 10px;
  height: 36px; padding: 0 12px; cursor: pointer; color: #334155;
}

.timeline { padding: 8px 8px 20px; }
.item {
  display: grid; grid-template-columns: 22px 1fr; gap: 12px;
  padding: 12px 16px; position: relative;
}
.item + .item .rail::before {
  content: ""; position: absolute; left: 26px; top: -12px; width: 2px; height: 12px; background: #e6ebf3;
}
.rail { width: 22px; display: flex; justify-content: center; padding-top: 6px; position: relative; }
.node { width: 12px; height: 12px; border-radius: 50%; background: #c5d0e0; border: 3px solid #eef2f7; }
.item:first-child .node { background: var(--red); border-color: #e8eef8; }
.when { font-size: 12px; color: var(--muted); }
.what { margin-top: 4px; font-size: 14px; line-height: 1.65; }
.where { margin-top: 4px; font-size: 12px; color: #8091a8; }
.item:first-child .what { font-weight: 700; }

.empty, .error, .loading { padding: 36px 24px; text-align: center; color: var(--muted); }
.error { color: var(--bad); }
.spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 3px solid #eadfe3; border-top-color: var(--red);
  margin: 0 auto 12px; animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.history { margin-top: 16px; padding: 16px 18px 18px; }
.history h3 { font-size: 14px; margin-bottom: 10px; }
.his { display: flex; flex-wrap: wrap; gap: 8px; }
.his button {
  border: 1px solid var(--line); background: #fff; border-radius: 10px;
  padding: 8px 10px; cursor: pointer; font-size: 12px; color: #334155;
}
.intl {
  border-bottom: 1px solid var(--line);
  padding: 18px 20px 22px;
  background: #f8fafc;
}
.intl h3 { font-size: 14px; margin-bottom: 6px; }
.intl p { font-size: 12px; color: var(--muted); margin-bottom: 12px; }
#YQContainer { min-height: 240px; background: #fff; border-radius: 12px; overflow: hidden; }
.foot { margin-top: 22px; color: #8b95a8; font-size: 12px; text-align: center; line-height: 1.7; }

.pick { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.pick a {
  display: block; text-decoration: none; color: inherit;
  padding: 28px 24px; border-radius: 22px; min-height: 220px;
  background: #fff; box-shadow: var(--shadow);
}
.pick h3 { font-size: 22px; margin: 10px 0 8px; }
.pick p { color: var(--muted); font-size: 14px; line-height: 1.7; }
.pick .tag { font-size: 12px; font-weight: 700; color: var(--red); }
.pick a:hover { transform: translateY(-2px); transition: transform .15s ease; }
.methods { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 16px; }
.methods button, .methods a {
  border: 1px solid var(--line); background: #fff; border-radius: 14px;
  padding: 14px 12px; cursor: pointer; text-align: left; text-decoration: none; color: inherit;
}
.methods strong { display: block; font-size: 15px; }
.methods span { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.methods button.active, .methods a:hover, .methods button:hover { border-color: var(--red); }

@media (max-width: 760px) {
  .row { grid-template-columns: 1fr 1fr; }
  .go { grid-column: 1 / -1; margin-top: 0; width: 100%; }
  .top, .wrap { width: min(100% - 24px, 920px); }
  .hero h2 { font-size: 22px; }
  .status { flex-direction: column; }
  .pick, .methods { grid-template-columns: 1fr; }
}
