/* 方元官网查件页 —— 品牌风格、清爽专业、适配电脑与手机。
 * 品牌色通过 CSS 变量定制；公司名称/联系方式由 /api/v1/brand 配置注入。 */
:root {
  --brand: #0b6cf0;
  --brand-dark: #074db0;
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #1d2733;
  --text-2: #5a6474;
  --muted: #8a94a6;
  --line: #e3e9f2;
  --radius: 10px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-size: 14px;
}

.site-inner { width: 100%; max-width: 720px; margin: 0 auto; padding: 0 16px; }

/* ---------- 头部 ---------- */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.site-header .site-inner { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); }
.brand-mark {
  background: var(--brand);
  color: #fff;
  font-weight: 800;
  padding: 4px 9px;
  border-radius: 8px;
  letter-spacing: 1px;
  font-size: 15px;
}
.brand-name { font-weight: 700; font-size: 17px; }
.brand-tagline { color: var(--muted); font-size: 12px; }

/* ---------- 查询区 ---------- */
main { flex: 1; padding: 44px 0 56px; }
.search-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 3px 14px rgba(13, 38, 76, .05);
  padding: 30px 26px;
  text-align: center;
}
.search-card h1 { font-size: 22px; font-weight: 700; }
.hint { color: var(--muted); font-size: 13px; margin: 8px 0 22px; }

.search { display: flex; gap: 10px; }
.search input {
  flex: 1;
  min-width: 0;
  padding: 12px 14px;
  font-size: 16px;
  letter-spacing: 1px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  outline: none;
  background: #fff;
  color: var(--text);
  transition: border-color .15s;
}
.search input:focus { border-color: var(--brand); }
.search button {
  padding: 0 28px;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--brand);
  border: none;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background .15s, opacity .15s;
  white-space: nowrap;
}
.search button:hover:not(:disabled) { background: var(--brand-dark); }
.search button:disabled { opacity: .6; cursor: not-allowed; }

.status-box {
  margin-top: 16px;
  padding: 10px 14px;
  border-radius: var(--radius);
  font-size: 13px;
  line-height: 1.6;
  text-align: left;
}
.status-box.loading { background: #f2f7ff; border: 1px solid #d6e4fb; color: #33518a; }
.status-box.error { background: #fdecea; border: 1px solid #f5c6c2; color: #a94442; }

/* ---------- 结果 ---------- */
.result { margin-top: 22px; }
.result-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 3px 14px rgba(13, 38, 76, .05);
  padding: 24px 26px;
}

.result-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.status-badge {
  font-weight: 700;
  font-size: 15px;
  padding: 6px 14px;
  border-radius: 999px;
  color: #fff;
  white-space: nowrap;
}
.tracking-no { font-family: Consolas, "Courier New", monospace; font-size: 15px; letter-spacing: 1px; }
.result-meta { margin-left: auto; color: var(--muted); font-size: 12px; text-align: right; }
.result-meta .tz { display: block; }

.info-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin-top: 14px;
  padding: 12px 14px;
  background: #f8fafd;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-2);
}
.info-strip b { color: var(--text); font-weight: 600; }

.no-update {
  margin-top: 16px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--text-2);
  font-size: 13px;
  text-align: center;
  background: #fbfcfe;
}

.timeline { margin-top: 20px; }
.timeline-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 4px;
}
.tl-item { display: flex; gap: 13px; padding: 13px 2px; position: relative; }
.tl-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 30px;
  bottom: -2px;
  width: 2px;
  background: var(--line);
}
.tl-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; margin-top: 4px; background: var(--brand); }
.tl-body { flex: 1; min-width: 0; }
.tl-row1 { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tl-status { font-weight: 700; font-size: 13px; }
.tl-time { color: var(--muted); font-size: 12px; }
.tl-desc { margin-top: 3px; font-size: 13px; color: var(--text); word-break: break-word; }
.tl-location { margin-top: 2px; font-size: 12px; color: var(--text-2); }
.tl-location:empty { display: none; }

/* 状态色 */
.st-CREATED          { background: #8a94a6; }
.st-INFO_RECEIVED    { background: #4a90a4; }
.st-PICKED_UP        { background: #6f42c1; }
.st-IN_TRANSIT       { background: #0b6cf0; }
.st-OUT_FOR_DELIVERY { background: #e8860c; }
.st-DELIVERED        { background: #1f9d55; }
.st-EXCEPTION        { background: #d64545; }
.st-RETURNED         { background: #7a1f1f; }
.st-CANCELLED        { background: #6b7787; }

/* ---------- 页脚 ---------- */
.site-footer {
  background: var(--card);
  border-top: 1px solid var(--line);
  padding: 16px 0;
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.8;
}
.copyright { color: var(--muted); }

.hidden { display: none !important; }

@media (max-width: 520px) {
  .search { flex-direction: column; }
  .search button { padding: 12px 0; }
  .result-meta { margin-left: 0; text-align: left; width: 100%; }
}
