/* ==========================================================================
   跨境物流追踪系统 —— 官网样式
   浅色专业风格，品牌色通过 CSS 变量由 JS 动态注入
   ========================================================================== */

:root {
  --brand: #0B4F9E;
  --brand-dark: #083a75;
  --brand-light: #E8F0FA;
  --accent: #F5A623;

  --bg: #F5F7FA;
  --surface: #FFFFFF;
  --surface-2: #FAFBFD;
  --text: #1A2332;
  --text-2: #5A6675;
  --text-3: #8A94A6;
  --border: #E4E9F0;
  --border-strong: #CFD8E3;

  --ok: #0E7C5A;
  --warn: #B26A00;
  --danger: #C0392B;

  --radius: 12px;
  --radius-lg: 18px;
  --shadow-sm: 0 1px 2px rgba(20, 40, 80, .06), 0 1px 3px rgba(20, 40, 80, .04);
  --shadow: 0 4px 16px rgba(20, 40, 80, .08);
  --shadow-lg: 0 12px 40px rgba(20, 40, 80, .12);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap { max-width: 1140px; margin: 0 auto; padding: 0 24px; }

/* ------------------------------------------------------------------ 顶部导航 */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav-inner { display: flex; align-items: center; gap: 20px; height: 68px; }

.logo { display: flex; align-items: center; gap: 11px; cursor: pointer; user-select: none; }
.logo-mark {
  width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: 15px; letter-spacing: .5px;
  box-shadow: 0 4px 12px rgba(11, 79, 158, .28);
}
.logo-text { line-height: 1.2; }
.logo-text b { display: block; font-size: 15.5px; font-weight: 700; letter-spacing: .2px; }
.logo-text span { font-size: 11px; color: var(--text-3); letter-spacing: .6px; text-transform: uppercase; }

.nav-links { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.nav-links a {
  color: var(--text-2); font-size: 14px; padding: 8px 13px;
  border-radius: 8px; transition: .15s; text-decoration: none;
}
.nav-links a:hover { background: var(--brand-light); color: var(--brand); text-decoration: none; }

.brand-switch {
  appearance: none; border: 1px solid var(--border-strong); background: #fff;
  border-radius: 9px; padding: 8px 11px; font-size: 13.5px; color: var(--text);
  cursor: pointer; font-family: inherit; max-width: 190px;
}

/* ------------------------------------------------------------------ Hero */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 460px at 12% -12%, rgba(11, 79, 158, .10), transparent 62%),
    radial-gradient(760px 400px at 92% 8%, rgba(245, 166, 35, .12), transparent 60%),
    linear-gradient(180deg, #FFFFFF 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}
.hero-inner { padding: 66px 0 78px; text-align: center; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--brand-light); color: var(--brand);
  border: 1px solid rgba(11, 79, 158, .16);
  padding: 6px 14px; border-radius: 999px;
  font-size: 13px; font-weight: 600; margin-bottom: 20px;
}
.hero-badge .dot {
  width: 7px; height: 7px; border-radius: 50%; background: var(--ok);
  box-shadow: 0 0 0 3px rgba(14, 124, 90, .16);
}

.hero h1 {
  font-size: 40px; line-height: 1.24; margin: 0 0 16px;
  font-weight: 800; letter-spacing: -.6px; color: #101A28;
}
.hero h1 em { font-style: normal; color: var(--brand); }
.hero p.sub {
  font-size: 16.5px; color: var(--text-2);
  max-width: 660px; margin: 0 auto 34px;
}

/* 查单框 */
.search-box {
  max-width: 680px; margin: 0 auto;
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg); border: 1px solid var(--border);
  padding: 10px; display: flex; gap: 10px;
}
.search-box input {
  flex: 1; border: none; outline: none; background: transparent;
  font-size: 16px; padding: 14px 16px; font-family: inherit;
  letter-spacing: .6px; text-transform: uppercase; color: var(--text);
  min-width: 0;
}
.search-box input::placeholder { color: var(--text-3); letter-spacing: .2px; text-transform: none; }
.search-box button {
  border: none; border-radius: 12px; padding: 0 32px;
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff; font-size: 15.5px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: .18s; white-space: nowrap;
  box-shadow: 0 4px 14px rgba(11, 79, 158, .26);
}
.search-box button:hover { transform: translateY(-1px); box-shadow: 0 7px 20px rgba(11, 79, 158, .32); }
.search-box button:active { transform: translateY(0); }

.search-hint {
  margin-top: 14px; font-size: 13px; color: var(--text-3);
}
.search-hint code {
  background: #fff; border: 1px solid var(--border); border-radius: 6px;
  padding: 2px 7px; font-size: 12.5px; color: var(--brand); font-weight: 600;
  cursor: pointer; letter-spacing: .3px;
}

/* 指标条 */
.metrics {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--border);
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; margin-top: 44px;
}
.metric { background: #fff; padding: 20px 12px; }
.metric b { display: block; font-size: 24px; font-weight: 800; color: var(--brand); letter-spacing: -.4px; }
.metric span { font-size: 13px; color: var(--text-3); }

/* ------------------------------------------------------------------ 通用区块 */
.section { padding: 62px 0; }
.section-head { text-align: center; margin-bottom: 38px; }
.section-head h2 {
  font-size: 27px; margin: 0 0 10px; font-weight: 750; letter-spacing: -.3px;
}
.section-head p { color: var(--text-2); margin: 0; font-size: 15px; }

/* ------------------------------------------------------------------ 查询结果 */
#result { padding: 0 0 10px; }
#result.has-result { padding-top: 46px; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-lg); box-shadow: var(--shadow);
  overflow: hidden;
}

.result-head {
  padding: 26px 30px 24px; border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
}
.result-head-row { display: flex; align-items: flex-start; gap: 20px; flex-wrap: wrap; }
.result-no {
  font-size: 25px; font-weight: 800; letter-spacing: 1.2px;
  color: #101A28; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  word-break: break-all;
}
.result-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 11px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; padding: 4px 11px;
  border-radius: 999px; background: var(--brand-light); color: var(--brand);
  border: 1px solid rgba(11, 79, 158, .12);
}
.chip.gray { background: #F1F4F8; color: var(--text-2); border-color: var(--border); }

.status-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 18px; border-radius: 999px;
  font-size: 15px; font-weight: 700; color: #fff; margin-left: auto;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .14);
}
.status-pill .pulse {
  width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 255, 255, .9);
  animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.82); } }

/* 进度条 */
.progress-wrap { padding: 22px 30px 4px; }
.progress-top { display: flex; justify-content: space-between; font-size: 13px; color: var(--text-2); margin-bottom: 9px; }
.progress-top b { color: var(--brand); font-size: 15px; }
.progress-bar { height: 8px; background: #EDF1F6; border-radius: 999px; overflow: hidden; }
.progress-fill {
  height: 100%; border-radius: 999px; width: 0;
  background: linear-gradient(90deg, var(--brand), var(--accent));
  transition: width .8s cubic-bezier(.22, 1, .36, 1);
}
.route-strip {
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
  padding: 16px 30px 22px; font-size: 12.5px; color: var(--text-3);
}
.route-strip .seg { display: flex; align-items: center; gap: 6px; }
.route-strip .seg i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--brand);
  display: inline-block;
}
.route-strip .seg.done i { background: var(--ok); }
.route-strip .seg.pending i { background: var(--border-strong); }
.route-strip .arrow { color: var(--border-strong); }

/* 信息网格 */
.info-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px; background: var(--border); border-top: 1px solid var(--border);
}
.info-cell { background: #fff; padding: 17px 24px; }
.info-cell span { display: block; font-size: 12.5px; color: var(--text-3); margin-bottom: 4px; }
.info-cell b { font-size: 15px; font-weight: 650; color: var(--text); }

/* 时间轴 */
.timeline { padding: 28px 30px 34px; }
.timeline h3 {
  font-size: 16px; margin: 0 0 24px; font-weight: 700;
  display: flex; align-items: center; gap: 9px;
}
.timeline h3::before {
  content: ''; width: 4px; height: 16px; border-radius: 2px;
  background: linear-gradient(180deg, var(--brand), var(--accent));
}

.tl-item { position: relative; padding: 0 0 26px 34px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ''; position: absolute; left: 6px; top: 16px; bottom: -4px;
  width: 2px; background: var(--border);
}
.tl-item:last-child::before { display: none; }
.tl-item.reached::before { background: linear-gradient(180deg, var(--ok), rgba(14, 124, 90, .25)); }

.tl-dot {
  position: absolute; left: 0; top: 5px;
  width: 14px; height: 14px; border-radius: 50%;
  background: #fff; border: 2px solid var(--border-strong); z-index: 1;
}
.tl-item.reached .tl-dot { border-color: var(--ok); background: var(--ok); }
.tl-item.current .tl-dot {
  border-color: var(--brand); background: var(--brand);
  box-shadow: 0 0 0 5px rgba(11, 79, 158, .14);
}
.tl-item.current .tl-dot::after {
  content: ''; position: absolute; inset: -3px; border-radius: 50%;
  border: 2px solid var(--brand); opacity: .5;
  animation: ring 1.8s ease-out infinite;
}
@keyframes ring { 0% { transform: scale(1); opacity: .5; } 100% { transform: scale(2.1); opacity: 0; } }
.tl-item.planned .tl-dot { border-style: dashed; }

.tl-body { display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; }
.tl-time {
  font-size: 13px; color: var(--text-3); white-space: nowrap;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
.tl-item.current .tl-time { color: var(--brand); font-weight: 700; }
.tl-text { font-size: 15px; font-weight: 600; color: var(--text); flex: 1; min-width: 200px; }
.tl-item.planned .tl-text { color: var(--text-3); font-weight: 500; }
.tl-item.exception .tl-text { color: var(--danger); }
.tl-sub { font-size: 12.5px; color: var(--text-3); margin-top: 3px; }
.tl-tag {
  font-size: 11px; padding: 2px 8px; border-radius: 999px;
  background: #F1F4F8; color: var(--text-3); font-weight: 600;
}
.tl-item.current .tl-tag { background: var(--brand); color: #fff; }

/* 空/错误状态 */
.notice {
  max-width: 680px; margin: 0 auto; background: #fff;
  border: 1px solid var(--border); border-left: 4px solid var(--warn);
  border-radius: var(--radius); padding: 20px 24px; box-shadow: var(--shadow-sm);
}
.notice.error { border-left-color: var(--danger); }
.notice b { display: block; margin-bottom: 6px; font-size: 15px; }
.notice p { margin: 0; color: var(--text-2); font-size: 14px; }

/* 骨架屏 */
.skeleton { max-width: 680px; margin: 0 auto; }
.sk-line { height: 14px; border-radius: 7px; margin-bottom: 12px;
  background: linear-gradient(90deg, #EDF1F6 25%, #F7F9FC 50%, #EDF1F6 75%);
  background-size: 400% 100%; animation: sk 1.4s ease infinite; }
@keyframes sk { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

/* ------------------------------------------------------------------ 服务范围 */
.region-block { margin-bottom: 30px; }
.region-block h4 {
  font-size: 14px; font-weight: 700; color: var(--text-2);
  margin: 0 0 12px; display: flex; align-items: center; gap: 10px;
}
.region-block h4::after { content: ''; flex: 1; height: 1px; background: var(--border); }

.country-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); gap: 11px; }
.country-card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; transition: .18s; cursor: default;
}
.country-card:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); }
.country-card .cc-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.country-card b { font-size: 14.5px; font-weight: 650; }
.country-card .iso {
  font-size: 11px; font-weight: 700; color: var(--brand);
  background: var(--brand-light); border-radius: 5px; padding: 2px 6px;
  letter-spacing: .5px;
}
.country-card .days {
  margin-top: 7px; font-size: 12.5px; color: var(--text-2);
  display: flex; align-items: center; gap: 6px;
}
.country-card .days b { font-size: 17px; color: var(--accent); font-weight: 800; }

/* ------------------------------------------------------------------ 线路图 */
.route-map {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 38px 30px 30px; box-shadow: var(--shadow-sm);
}
.route-track { display: flex; align-items: flex-start; position: relative; }
.route-node { flex: 1; text-align: center; position: relative; }
.route-node .knob {
  width: 42px; height: 42px; margin: 0 auto 12px; border-radius: 50%;
  display: grid; place-items: center; font-size: 17px;
  background: var(--brand-light); color: var(--brand);
  border: 2px solid rgba(11, 79, 158, .2); position: relative; z-index: 2;
}
.route-node.key .knob {
  background: linear-gradient(135deg, var(--brand), var(--brand-dark));
  color: #fff; border-color: transparent;
  box-shadow: 0 6px 18px rgba(11, 79, 158, .3);
}
.route-node::after {
  content: ''; position: absolute; top: 21px; left: 50%; width: 100%;
  height: 2px; background: repeating-linear-gradient(90deg, var(--border-strong) 0 6px, transparent 6px 12px);
  z-index: 1;
}
.route-node:last-child::after { display: none; }
.route-node b { display: block; font-size: 13.5px; font-weight: 650; margin-bottom: 3px; }
.route-node span { font-size: 11.5px; color: var(--text-3); line-height: 1.45; display: block; }
.route-node .d { font-size: 11px; color: var(--accent); font-weight: 700; margin-top: 5px; }

/* ------------------------------------------------------------------ 页脚 */
.footer {
  background: #101A28; color: #A6B2C4; padding: 46px 0 26px; margin-top: 60px;
  font-size: 13.5px;
}
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 34px; }
.footer h5 { color: #fff; font-size: 14px; margin: 0 0 14px; font-weight: 650; }
.footer p { margin: 0 0 8px; line-height: 1.7; }
.footer a { color: #A6B2C4; }
.footer a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .1); margin-top: 32px; padding-top: 20px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 12.5px; color: #78859A;
}
.footer-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.footer-logo .logo-mark { box-shadow: none; }

/* ------------------------------------------------------------------ 响应式 */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .metrics { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .wrap { padding: 0 16px; }
  .hero-inner { padding: 42px 0 52px; }
  .hero h1 { font-size: 27px; }
  .hero p.sub { font-size: 15px; }
  .search-box { flex-direction: column; padding: 12px; }
  .search-box input { padding: 12px 8px; text-align: center; }
  .search-box button { padding: 14px 20px; }
  .nav-links a:not(.keep) { display: none; }
  .result-no { font-size: 19px; }
  .result-head, .progress-wrap, .timeline { padding-left: 18px; padding-right: 18px; }
  .info-cell { padding: 14px 18px; }
  .status-pill { margin-left: 0; }
  .route-track { flex-wrap: wrap; gap: 18px 0; }
  .route-node { flex: 0 0 50%; }
  .route-node::after { display: none; }
  .section { padding: 44px 0; }
  .country-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 420px) {
  .country-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media print {
  .nav, .hero, .footer, #service, #route, #contact, .search-box { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}
