/* ===================================================
   LinkWay Tracking - 白底 + 科技蓝 + 橙色主题
   参考 Freightos / Flexport 风格
=================================================== */

:root {
    --tech-blue: #2563eb;
    --tech-blue-dark: #1d4ed8;
    --tech-blue-light: #eff6ff;
    --accent-orange: #f97316;
    --accent-orange-light: #fff7ed;
    --text-dark: #0f172a;
    --text-muted: #64748b;
    --border-light: #e2e8f0;
    --bg-page: #f8fafc;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
}

* { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; }

body {
    background: var(--bg-page);
    color: var(--text-dark);
}

/* ---------- 通用按钮 ---------- */
.btn-primary-tech {
    background: var(--tech-blue);
    border: none;
    color: white;
    font-weight: 600;
    border-radius: 10px;
    padding: 0.65rem 1.25rem;
    transition: all 0.2s;
}
.btn-primary-tech:hover {
    background: var(--tech-blue-dark);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}
.btn-primary-tech:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-accent-orange {
    background: var(--accent-orange);
    border: none;
    color: white;
    font-weight: 600;
    border-radius: 10px;
}
.btn-accent-orange:hover { background: #ea580c; color: white; }

/* ---------- 登录/公开页面布局 ---------- */
.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
}
.auth-container { width: 100%; max-width: 440px; padding: 1rem; }
.auth-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 2.5rem;
    box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
}
.auth-brand { text-align: center; margin-bottom: 2rem; }
.auth-brand-icon { font-size: 2.5rem; color: var(--tech-blue); }
.auth-brand-text { font-size: 1.4rem; font-weight: 700; color: var(--text-dark); margin-top: 0.5rem; }
.auth-brand-subtitle { color: var(--text-muted); font-size: 0.875rem; }
.auth-link { color: var(--text-muted); text-decoration: none; font-size: 0.875rem; }
.auth-link:hover { color: var(--tech-blue); }

/* ---------- 表单 ---------- */
.form-label { color: var(--text-dark); font-weight: 500; font-size: 0.875rem; }
.form-control, .form-select {
    border: 1px solid var(--border-light);
    border-radius: 10px;
    padding: 0.65rem 0.9rem;
    color: var(--text-dark);
}
.form-control:focus, .form-select:focus {
    border-color: var(--tech-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* ---------- 后台布局 ---------- */
.sidebar {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: 260px;
    background: white;
    border-right: 1px solid var(--border-light);
    padding: 1.5rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.sidebar-brand {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--tech-blue);
    margin-bottom: 1.5rem;
}
.sidebar-user {
    background: var(--bg-page);
    border-radius: 12px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
}
.sidebar-username { font-size: 0.85rem; color: var(--text-dark); margin-top: 0.4rem; font-weight: 500; }

.nav-section {
    color: var(--text-muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin: 1.25rem 0 0.5rem;
    font-weight: 600;
}
.nav-link {
    color: var(--text-muted);
    padding: 0.6rem 0.9rem;
    border-radius: 10px;
    margin-bottom: 0.2rem;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.875rem;
    font-weight: 500;
}
.nav-link:hover { background: var(--tech-blue-light); color: var(--tech-blue); }
.nav-link.active { background: var(--tech-blue-light); color: var(--tech-blue); font-weight: 600; }
.sidebar-footer { margin-top: auto; padding-top: 1rem; border-top: 1px solid var(--border-light); }

.main-content { margin-left: 260px; padding: 2rem; }

.page-title { font-size: 1.5rem; font-weight: 700; color: var(--text-dark); margin: 0; }
.page-subtitle { color: var(--text-muted); font-size: 0.9rem; margin: 0; }

@media (max-width: 992px) {
    .sidebar { display: none; }
    .main-content { margin-left: 0; }
}

/* ---------- 卡片 ---------- */
.card-custom {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
.card-title-sm { font-size: 0.95rem; font-weight: 700; color: var(--text-dark); margin-bottom: 1rem; }

.info-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--bg-page);
    font-size: 0.875rem;
}
.info-row span { color: var(--text-muted); }
.info-row strong { color: var(--text-dark); }

/* ---------- 统计卡片 ---------- */
.stat-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 1.5rem;
}
.stat-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}
.stat-icon.blue   { background: var(--tech-blue-light); color: var(--tech-blue); }
.stat-icon.orange { background: var(--accent-orange-light); color: var(--accent-orange); }
.stat-icon.green  { background: #ecfdf5; color: var(--success); }
.stat-icon.red    { background: #fef2f2; color: var(--danger); }
.stat-value { font-size: 2rem; font-weight: 700; color: var(--text-dark); }
.stat-label { color: var(--text-muted); font-size: 0.875rem; }

/* ---------- 表格 ---------- */
.table-custom th {
    background: var(--bg-page);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.85rem 1.25rem;
    border-bottom: none;
}
.table-custom td {
    padding: 0.9rem 1.25rem;
    border-bottom: 1px solid var(--bg-page);
    vertical-align: middle;
    font-size: 0.9rem;
}
.order-link { color: var(--tech-blue); text-decoration: none; font-weight: 600; }
.order-link:hover { color: var(--tech-blue-dark); text-decoration: underline; }

.badge-soft {
    display: inline-block;
    background: var(--bg-page);
    color: var(--text-muted);
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 6px;
}

/* ---------- 状态徽章 ---------- */
.status-pill {
    display: inline-flex;
    align-items: center;
    padding: 0.3rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: 600;
}
.role-pill {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* ---------- 进度条 ---------- */
.progress-bar-track {
    height: 8px;
    background: var(--bg-page);
    border-radius: 10px;
    overflow: hidden;
}
.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--tech-blue), var(--accent-orange));
    border-radius: 10px;
    transition: width 0.3s;
}

/* ---------- 节点打卡列表（后台） ---------- */
.milestone-list { display: flex; flex-direction: column; gap: 0.5rem; }
.milestone-row {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    border: 1px solid var(--border-light);
    background: var(--bg-page);
}
.milestone-row.milestone-completed { background: #ecfdf5; border-color: #d1fae5; }
.milestone-row.milestone-skipped { background: #f8fafc; border-color: var(--border-light); opacity: 0.65; }
.milestone-icon { font-size: 1.3rem; color: var(--text-muted); flex-shrink: 0; padding-top: 0.1rem; }
.milestone-completed .milestone-icon { color: var(--success); }
.milestone-skipped .milestone-icon { color: var(--text-muted); }
.milestone-body { flex: 1; }
.milestone-label { font-weight: 600; color: var(--text-dark); font-size: 0.9rem; }
.milestone-meta { color: var(--text-muted); font-size: 0.78rem; margin-top: 0.2rem; }
.milestone-remark {
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: #92400e;
    background: var(--accent-orange-light);
    padding: 0.4rem 0.6rem;
    border-radius: 8px;
    display: inline-block;
}

/* ---------- 公开首页 Hero ---------- */
.hero-section {
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 60%, #fff7ed 100%);
    padding: 4rem 0;
}
.hero-title { font-size: 2.75rem; font-weight: 800; color: var(--text-dark); line-height: 1.15; }
.hero-title .highlight { color: var(--tech-blue); }
.hero-subtitle { color: var(--text-muted); font-size: 1.05rem; margin-top: 1rem; max-width: 480px; }

.search-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
}
.search-input {
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1rem 1.25rem;
    font-size: 1rem;
}
.search-input:focus { border-color: var(--tech-blue); box-shadow: 0 0 0 3px rgba(37,99,235,0.12); }

.example-tag {
    display: inline-block;
    background: var(--bg-page);
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 0.25rem 0.6rem;
    border-radius: 6px;
    margin-right: 0.4rem;
}

.feature-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 1.5rem;
    height: 100%;
}
.feature-icon {
    width: 48px; height: 48px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

/* ---------- 客户端进度条（横向步骤条） ---------- */
.progress-track {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    position: relative;
    margin: 1.5rem 0;
    gap: 0.5rem 0;
}
.progress-track::before {
    content: '';
    position: absolute;
    top: 20px; left: 0; right: 0;
    height: 3px;
    background: var(--border-light);
    z-index: 0;
}
.progress-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 1;
    flex: 1;
    min-width: 70px;
}
.step-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: white;
    border: 3px solid var(--border-light);
    display: flex; align-items: center; justify-content: center;
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: all 0.3s;
}
.step-icon.completed { background: var(--success); border-color: var(--success); color: white; }
.step-icon.skipped { background: #f1f5f9; border-color: var(--border-light); color: var(--text-muted); }
.step-icon.active {
    background: var(--tech-blue);
    border-color: var(--tech-blue);
    color: white;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.15);
}
.step-label { margin-top: 0.5rem; font-size: 0.7rem; color: var(--text-muted); text-align: center; }
.step-label.active { color: var(--tech-blue); font-weight: 700; }
.step-label.completed { color: var(--success); font-weight: 600; }

/* ---------- 客户端时间线 ---------- */
.timeline-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    overflow: hidden;
}
.timeline-header { padding: 1rem 1.5rem; border-bottom: 1px solid var(--border-light); }
.timeline { padding: 1.5rem; }
.timeline-item {
    position: relative;
    padding-left: 1.75rem;
    padding-bottom: 1.5rem;
    border-left: 2px solid var(--border-light);
    margin-left: 0.5rem;
}
.timeline-item:last-child { border-left: none; padding-bottom: 0; }
.timeline-dot {
    position: absolute;
    left: -7px; top: 0;
    width: 12px; height: 12px;
    border-radius: 50%;
    background: var(--tech-blue);
    border: 2px solid white;
}
.timeline-item.skipped-event .timeline-dot { background: var(--text-muted); }
.timeline-title { font-weight: 600; color: var(--text-dark); font-size: 0.9rem; }
.timeline-meta { color: var(--text-muted); font-size: 0.78rem; margin-top: 0.2rem; }
