@charset "UTF-8";
html,
body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #eff6ff;
}

/* 外层容器：flex 纵向布局，内容区自动撑开，页脚固定在屏幕最下方 */
#bpp {
    display: flex;
    flex-direction: column;
    flex: 1 0 auto;
    min-height: 100vh;
}

/* 内容块：最小高度撑满可视区域（减去固定导航 76px），flex 自动吸收剩余空间，
   从而把页脚顶到屏幕最下方 */
.trace-page,
#trace-app {
    flex: 1 0 auto;
    padding-top: 76px;
    min-height: calc(100vh - 76px);
}

/* 页脚固定到底部 */
.footer-alt {
    flex-shrink: 0;
}

/* ---------- 头部横幅 ---------- */
.trace-hero {
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
    padding: 48px 0 96px;
    color: #fff;
}
.trace-hero-inner {
    max-width: 720px;
    margin: 0 auto;
    text-align: center;
}
.trace-hero-title {
    font-size: 30px;
    font-weight: 700;
    margin: 0 0 8px;
    letter-spacing: 1px;
}
.trace-hero-sub {
    font-size: 15px;
    opacity: 0.9;
    margin: 0 0 28px;
}

/* ---------- 搜索框 ---------- */
.trace-search {
    text-align: left;
}
.trace-search-box {
    display: flex;
    align-items: center;
    background: #fff;
    border-radius: 12px;
    padding: 6px 6px 6px 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18);
}
.trace-search-icon {
    width: 22px;
    height: 22px;
    color: #94a3b8;
    flex-shrink: 0;
}
.trace-search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    padding: 12px 14px;
    color: #1f2937;
    background: transparent;
}
.trace-search-input::placeholder {
    color: #9ca3af;
}
.trace-search-btn {
    border: none;
    background: #2563eb;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    padding: 12px 28px;
    border-radius: 9px;
    cursor: pointer;
    transition: background 0.2s;
    white-space: nowrap;
}
.trace-search-btn:hover {
    background: #1d4ed8;
}
.trace-search-btn:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
}
.trace-search-tips {
    color: #fde68a;
    font-size: 13px;
    margin-top: 10px;
    padding-left: 4px;
}

/* ---------- 主体容器 ---------- */
.trace-body {
    margin-top: -64px;
    padding-bottom: 48px;
}

/* ---------- 通用卡片 ---------- */
.trace-card {
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 4px 20px rgba(15, 23, 42, 0.06);
    padding: 24px;
    margin-bottom: 20px;
}

/* ---------- 基本信息摘要 ---------- */
.trace-summary-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 16px;
}
.trace-summary-title {
    font-size: 19px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px;
}
.trace-summary-no {
    display: flex;
    align-items: baseline;
    gap: 8px;
}
.trace-label {
    color: #6b7280;
    font-size: 13px;
}
.trace-value {
    color: #111827;
    font-size: 14px;
    font-weight: 500;
}
.trace-badge {
    flex-shrink: 0;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
}
.badge-primary { background: #2563eb; }
.badge-success { background: #16a34a; }
.badge-warning { background: #d97706; }
.badge-danger { background: #dc2626; }

.trace-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.trace-summary-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.trace-ico {
    font-size: 18px;
    line-height: 1.4;
}

/* ---------- 物流轨迹时间线 ---------- */
.trace-timeline-title {
    font-size: 17px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 22px;
}
.trace-timeline {
    position: relative;
}
.trace-step {
    position: relative;
    display: flex;
    gap: 18px;
    padding-bottom: 26px;
}
/* 连接线：从当前节点中心向下延伸到下一个节点中心 */
.trace-step:not(.is-last)::before {
    content: '';
    position: absolute;
    left: 11px;            /* 22px 节点宽度的水平中心 */
    top: 13px;             /* 节点垂直中心(2px margin + 11px) */
    bottom: -26px;         /* 延伸至下一个节点的中心，消除间隙 */
    width: 2px;
    background: #e5e7eb;
    transform: translateX(-50%);
}
.trace-node {
    position: relative;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    margin-top: 2px;
}
.trace-node-dot {
    display: block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #cbd5e1;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #cbd5e1;
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
}
.node-active .trace-node-dot {
    background: #2563eb;
    box-shadow: 0 0 0 2px #2563eb;
}
.node-danger .trace-node-dot {
    background: #dc2626;
    box-shadow: 0 0 0 2px #dc2626;
}
.trace-step.is-first:not(.is-last)::before {
    background: #93c5fd;
}

.trace-step-content {
    flex: 1;
    min-width: 0;
}
.trace-step-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.trace-step-status {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
}
.trace-step:not(.is-first) .trace-step-status {
    font-weight: 500;
    color: #4b5563;
}
.trace-step-time {
    display: flex;
    align-items: baseline;
    gap: 8px;
    color: #9ca3af;
    font-size: 13px;
    white-space: nowrap;
}
.trace-step-date { color: #6b7280; }
.trace-step-clock { font-size: 12px; }

.trace-step-desc {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.6;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 8px;
    padding: 10px 12px;
}
.trace-step:not(.is-first) .trace-step-desc {
    background: transparent;
    padding: 6px 0 0;
}

.trace-timeline-empty {
    color: #9ca3af;
    font-size: 14px;
    text-align: center;
    padding: 20px 0;
}

/* ---------- 客服条 ---------- */
.trace-contact {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    background: #eef2ff;
    border-radius: 12px;
    padding: 14px;
    color: #4b5563;
    font-size: 14px;
}
.trace-contact-phone {
    color: #2563eb;
    font-weight: 600;
}

/* ---------- 空态 / 加载 ---------- */
.trace-empty {
    text-align: center;
    color: #9ca3af;
    padding: 60px 0;
}
.trace-empty-icon {
    width: 48px;
    height: 48px;
    color: #cbd5e1;
    margin-bottom: 12px;
}
.trace-loading {
    text-align: center;
    color: #6b7280;
    padding: 40px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.trace-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #cbd5e1;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: trace-spin 0.7s linear infinite;
}
@keyframes trace-spin {
    to { transform: rotate(360deg); }
}

/* ---------- 支持的物流公司 ---------- */
.trace-companies-title {
    font-size: 17px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 18px;
}
.trace-companies-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 14px;
}
.trace-company {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 14px 8px;
    background: #f9fafb;
    border-radius: 10px;
}
.trace-company-logo {
    height: 28px;
    width: auto;
    object-fit: contain;
}
.trace-company-name {
    font-size: 12px;
    color: #4b5563;
    text-align: center;
}

/* ---------- 服务介绍模块 ---------- */
.trace-services {
    padding: 48px 0;
    background: #eff6ff;
}
.trace-services-head {
    text-align: center;
    margin-bottom: 28px;
}
.trace-services-title {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px;
}
.trace-services-sub {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}
.trace-services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.trace-service-card {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px 20px;
    text-align: center;
    transition: box-shadow 0.2s, transform 0.2s;
}
.trace-service-card:hover {
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.1);
    transform: translateY(-3px);
}
.trace-service-ico {
    font-size: 32px;
    display: block;
    margin-bottom: 12px;
}
.trace-service-name {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 8px;
}
.trace-service-desc {
    font-size: 13px;
    line-height: 1.6;
    color: #6b7280;
    margin: 0;
}

/* ---------- 为什么选择我们 ---------- */
.trace-features {
    padding: 48px 0;
    background: #ffffff;
}
.trace-features-head {
    text-align: center;
    margin-bottom: 28px;
}
.trace-features-title {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 8px;
}
.trace-features-sub {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}
.trace-features-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.trace-feature-item {
    background: #eff6ff;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    padding: 24px 20px;
    text-align: center;
    transition: box-shadow 0.2s, transform 0.2s;
}
.trace-feature-item:hover {
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.12);
    transform: translateY(-3px);
}
.trace-feature-ico {
    font-size: 32px;
    display: block;
    margin-bottom: 12px;
}
.trace-feature-name {
    font-size: 16px;
    font-weight: 600;
    color: #111827;
    margin: 0 0 8px;
}
.trace-feature-desc {
    font-size: 13px;
    line-height: 1.6;
    color: #6b7280;
    margin: 0;
}

/* ---------- 数据统计横幅 ---------- */
.trace-stats {
    padding: 40px 0;
    background: linear-gradient(135deg, #2563eb 0%, #4f46e5 100%);
}
.trace-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.trace-stat-item {
    text-align: center;
    color: #ffffff;
}
.trace-stat-num {
    display: block;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.2;
}
.trace-stat-label {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    opacity: 0.9;
}

/* ---------- 响应式 ---------- */
@media (max-width: 991px) {
    .trace-companies-grid { grid-template-columns: repeat(4, 1fr); }
    .trace-services-grid { grid-template-columns: repeat(2, 1fr); }
    .trace-features-grid { grid-template-columns: repeat(2, 1fr); }
    .trace-stats-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .trace-hero { padding: 36px 0 84px; }
    .trace-hero-title { font-size: 24px; }
    .trace-search-box { flex-wrap: wrap; padding: 10px; }
    .trace-search-input { padding: 10px; }
    .trace-search-btn { width: 100%; margin-top: 8px; }
    .trace-summary-grid { grid-template-columns: 1fr; }
    .trace-companies-grid { grid-template-columns: repeat(3, 1fr); }
    .trace-services-grid { grid-template-columns: repeat(2, 1fr); }
    .trace-features-grid { grid-template-columns: repeat(2, 1fr); }
    .trace-step-time { width: 100%; }
}
@media (max-width: 480px) {
    .trace-companies-grid { grid-template-columns: repeat(2, 1fr); }
    .trace-services-grid { grid-template-columns: 1fr; }
    .trace-features-grid { grid-template-columns: 1fr; }
    .trace-stats-grid { grid-template-columns: repeat(2, 1fr); }
    .trace-services { padding: 36px 0; }
    .trace-features { padding: 36px 0; }
    .trace-card { padding: 18px; }
}
