/* ============ WMS 自定义样式 ============ */
:root {
    --sidebar-width: 240px;
    --primary: #2c6ecb;
    --sidebar-bg: #1e293b;
    --sidebar-hover: #334155;
}
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    font-size: 14px;
    color: #334155;
    background: #f1f5f9;
}
.app-wrapper { display: flex; min-height: 100vh; }

/* 侧边栏 */
.sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: #cbd5e1;
    flex-shrink: 0;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    overflow-y: auto;
    z-index: 1000;
    transition: transform .25s;
}
.sidebar-brand {
    height: 60px;
    display: flex;
    align-items: center;
    padding: 0 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.sidebar-brand a { display: flex; align-items: center; text-decoration: none; color: #fff; }
.brand-icon {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 8px;
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    font-weight: 700; font-size: 18px; margin-right: 10px;
}
.brand-text { font-size: 16px; font-weight: 600; letter-spacing: .5px; }
.sidebar-nav { padding: 12px 0; }
.nav-group {
    padding: 14px 20px 6px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #64748b;
    font-weight: 600;
}
.nav-link {
    display: block;
    padding: 9px 20px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 13.5px;
    border-left: 3px solid transparent;
    transition: all .15s;
}
.nav-link:hover { background: var(--sidebar-hover); color: #fff; }
.nav-link.active {
    background: var(--sidebar-hover);
    color: #fff;
    border-left-color: #3b82f6;
    font-weight: 500;
}
.nav-link i { margin-right: 10px; font-size: 15px; width: 18px; }

/* 主内容区 */
.main-wrap {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.topbar {
    height: 60px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 16px;
    position: sticky;
    top: 0;
    z-index: 999;
}
.topbar-title { font-size: 16px; font-weight: 600; color: #0f172a; flex: 1; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.content { flex: 1; padding: 24px; }
.footer { border-top: 1px solid #e2e8f0; background: #fff; }

/* 卡片 */
.card { border: 1px solid #e2e8f0; border-radius: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.04); margin-bottom: 20px; }
.card-header { background: #fff; border-bottom: 1px solid #e2e8f0; font-weight: 600; padding: 14px 20px; }
.card-body { padding: 20px; }

/* 统计卡片 */
.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.stat-icon {
    width: 52px; height: 52px; border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; flex-shrink: 0;
}
.stat-icon.blue { background: #dbeafe; color: #2563eb; }
.stat-icon.green { background: #dcfce7; color: #16a34a; }
.stat-icon.orange { background: #ffedd5; color: #ea580c; }
.stat-icon.red { background: #fee2e2; color: #dc2626; }
.stat-icon.purple { background: #ede9fe; color: #7c3aed; }
.stat-value { font-size: 26px; font-weight: 700; color: #0f172a; line-height: 1.1; }
.stat-label { font-size: 13px; color: #64748b; margin-top: 4px; }

/* 表格 */
.table { background: #fff; }
.table thead th { background: #f8fafc; font-weight: 600; font-size: 13px; color: #475569; border-bottom: 1px solid #e2e8f0; white-space: nowrap; }
.table tbody td { vertical-align: middle; font-size: 13.5px; }
.table-hover tbody tr:hover { background: #f8fafc; }
.table-sm td, .table-sm th { padding: .5rem .6rem; }

/* 表单 */
.form-label { font-weight: 500; font-size: 13px; color: #475569; }
.form-control, .form-select { font-size: 14px; border-radius: 6px; border-color: #cbd5e1; }
.form-control:focus, .form-select:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,.1); }

/* 按钮 */
.btn { border-radius: 6px; font-size: 13.5px; }
.btn-primary { background: var(--primary); border-color: var(--primary); }
.btn-primary:hover { background: #245bb0; border-color: #245bb0; }

/* 徽章 */
.badge { font-size: 11px; font-weight: 500; padding: 4px 8px; }

/* 筛选栏 */
.filter-bar { background: #fff; padding: 16px 20px; border-radius: 10px; border: 1px solid #e2e8f0; margin-bottom: 20px; }
.filter-bar .form-label { margin-bottom: 4px; }

/* 登录页 */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #1e3a5f 0%, #2c6ecb 100%);
}
.login-box {
    width: 100%; max-width: 420px;
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
}
.login-box .brand-icon { width: 48px; height: 48px; font-size: 24px; margin: 0 auto 16px; }
.login-title { text-align: center; font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.login-subtitle { text-align: center; color: #64748b; margin-bottom: 28px; }

/* 时间线 */
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 0 0 20px 28px; position: relative; border-left: 2px solid #e2e8f0; }
.timeline li:last-child { border-left-color: transparent; }
.timeline li::before {
    content: ''; position: absolute; left: -7px; top: 2px;
    width: 12px; height: 12px; border-radius: 50%;
    background: #3b82f6; border: 2px solid #fff;
}
.timeline .tl-time { font-size: 12px; color: #94a3b8; }

/* 响应式 */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.show { transform: translateX(0); }
    .main-wrap { margin-left: 0; }
    .content { padding: 16px; }
}
