/* ============================================ */
/* ERP — 订单工作台设计系统 v3 (Premium SaaS) */
/* 只改视觉，不动类名 / 不动逻辑                */
/* 支持 data-theme="dark" 夜间模式              */
/* ============================================ */

/* ── 日间模式变量 ─────────────────────────── */
:root {
    --c-primary: #4f46e5;
    --c-primary-50: #eef2ff;
    --c-primary-100: #e0e7ff;
    --c-primary-200: #c7d2fe;
    --c-primary-300: #a5b4fc;
    --c-primary-400: #818cf8;
    --c-primary-500: #6366f1;
    --c-primary-600: #4f46e5;
    --c-primary-700: #4338ca;
    --c-primary-800: #3730a3;
    --c-primary-900: #312e81;

    --c-slate-50: #f8fafc;
    --c-slate-100: #f1f5f9;
    --c-slate-200: #e2e8f0;
    --c-slate-300: #cbd5e1;
    --c-slate-400: #94a3b8;
    --c-slate-500: #64748b;
    --c-slate-600: #475569;
    --c-slate-700: #334155;
    --c-slate-800: #1e293b;
    --c-slate-900: #0f172a;

    --c-green: #10b981;
    --c-green-50: #ecfdf5;
    --c-green-100: #d1fae5;
    --c-green-600: #059669;
    --c-orange: #f59e0b;
    --c-orange-50: #fffbeb;
    --c-orange-100: #fef3c7;
    --c-orange-600: #d97706;
    --c-red: #ef4444;
    --c-red-50: #fef2f2;
    --c-red-100: #fee2e2;
    --c-red-600: #dc2626;
    --c-blue: #3b82f6;
    --c-blue-50: #eff6ff;
    --c-blue-100: #dbeafe;
    --c-cyan: #06b6d4;
    --c-cyan-50: #ecfeff;
    --c-cyan-100: #cffafe;
    --c-purple: #8b5cf6;
    --c-purple-50: #f5f3ff;
    --c-purple-100: #ede9fe;
    --c-purple-600: #7c3aed;
    --c-purple-700: #6b21a8;

    /* 旧变量名兼容 */
    --c-bg: var(--c-slate-50);
    --c-white: #ffffff;
    --c-text: var(--c-slate-900);
    --c-text2: var(--c-slate-700);
    --c-text3: var(--c-slate-500);
    --c-border: var(--c-slate-200);
    --c-border2: var(--c-slate-100);
    --c-accent: var(--c-primary-600);
    --c-accent2: var(--c-primary-400);
    --r: 16px;
    --r-sm: 12px;
    --r-xs: 8px;
    --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-card: 0 10px 15px -3px rgba(15, 23, 42, 0.05), 0 4px 6px -4px rgba(15, 23, 42, 0.02);
    --shadow-card-hover: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);
    --shadow-drawer: -24px 0 60px rgba(15, 23, 42, 0.18);
    --shadow-pop: 0 24px 48px -12px rgba(15, 23, 42, 0.18);
    --shadow-float: 0 12px 24px -8px rgba(79, 70, 229, 0.25);
}

/* ── 夜间模式变量 ─────────────────────────── */
:root[data-theme="dark"] {
    --c-bg: #090c14;
    --c-slate-50: #151b2b;
    --c-slate-100: #1e2738;
    --c-slate-200: #2d3a51;
    --c-slate-300: #445369;
    --c-slate-400: #6b7c95;
    --c-slate-500: #94a3b8;
    --c-slate-600: #c8d2df;
    --c-slate-700: #e2e8f0;
    --c-slate-800: #f1f5f9;
    --c-slate-900: #f8fafc;
    --c-white: #1e2738;
    --c-text: #f8fafc;
    --c-text2: #e2e8f0;
    --c-text3: #94a3b8;
    --c-border: #2d3a51;
    --c-border2: #151b2b;
    --c-accent: #818cf8;
    --c-accent2: #a5b4fc;

    --c-primary-50: #1e1b4b;
    --c-primary-100: #312e81;
    --c-primary-600: #818cf8;
    --c-primary-700: #a5b4fc;
    --c-primary-800: #c7d2fe;

    --c-green-50: #064e3b;
    --c-green-100: #065f46;
    --c-green-600: #34d399;
    --c-orange-50: #78350f;
    --c-orange-100: #92400e;
    --c-orange-600: #fbbf24;
    --c-red-50: #7f1d1d;
    --c-red-100: #991b1b;
    --c-red-600: #f87171;
    --c-blue-50: #1e3a8a;
    --c-blue-100: #1e40af;
    --c-blue-600: #60a5fa;
    --c-cyan-50: #164e63;
    --c-cyan-100: #155e75;
    --c-cyan-600: #22d3ee;
    --c-purple-50: #4c1d95;
    --c-purple-100: #5b21b6;
    --c-purple-600: #a78bfa;
    --c-purple-700: #e9d5ff;

    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 1px 3px rgba(0, 0, 0, 0.35);
    --shadow-card: 0 10px 15px -3px rgba(0, 0, 0, 0.45), 0 4px 6px -4px rgba(0, 0, 0, 0.35);
    --shadow-card-hover: 0 20px 25px -5px rgba(0, 0, 0, 0.55), 0 8px 10px -6px rgba(0, 0, 0, 0.45);
    --shadow-drawer: -24px 0 60px rgba(0, 0, 0, 0.55);
    --shadow-pop: 0 24px 48px -12px rgba(0, 0, 0, 0.55);
    --shadow-float: 0 12px 24px -8px rgba(99, 102, 241, 0.35);
}

* { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Inter, 'SF Pro Display', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
    background: var(--c-bg);
    color: var(--c-text);
    font-size: 14px;
    line-height: 1.5;
}

/* ── 字体层级（严格）──────────────────────── */
/* 大标题：22px/800  |  分区标题：13px/800 uppercase  |  标签：12px/600  |  正文：14px/500  |  小正文：13px/500  |  指标：32px/800  |  badge：11px/700 */
.f-title { font-size: 22px; font-weight: 800; line-height: 1.2; color: var(--c-text); }
.f-section { font-size: 13px; font-weight: 800; line-height: 1.3; letter-spacing: 0.5px; text-transform: uppercase; color: var(--c-text2); }
.f-label { font-size: 12px; font-weight: 600; line-height: 1.4; color: var(--c-text3); }
.f-body { font-size: 14px; font-weight: 500; line-height: 1.5; color: var(--c-text); }
.f-body-sm { font-size: 13px; font-weight: 500; line-height: 1.5; color: var(--c-text2); }
.f-metric { font-size: 32px; font-weight: 800; line-height: 1.1; letter-spacing: -1px; color: var(--c-text); }
.f-badge { font-size: 11px; font-weight: 700; line-height: 1.2; letter-spacing: 0.4px; }

/* ── 顶部导航（玻璃拟态）──────────────────── */
.erp_nav {
    display: flex;
    align-items: center;
    height: 66px;
    padding: 0 24px;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--c-slate-600);
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid var(--c-border);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}
:root[data-theme="dark"] .erp_nav {
    background: rgba(21, 27, 43, 0.85);
    border-bottom-color: var(--c-border);
}
.erp_nav_item { position: relative; }
.erp_nav_home {
    color: var(--c-primary-700);
    font-weight: 900;
    font-size: 22px;
    letter-spacing: 2px;
    line-height: 1;
    padding: 8px 18px;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: var(--r-xs);
}
.erp_nav_home::before {
    content: '';
    width: 9px; height: 9px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--c-primary-500), var(--c-cyan));
    box-shadow: 0 0 10px rgba(79, 70, 229, 0.45);
}
.erp_nav_home:hover { background: var(--c-primary-50); color: var(--c-primary-800); text-decoration: none; }
.erp_nav_link {
    display: block;
    padding: 12px 22px;
    font-size: 15px;
    cursor: pointer;
    white-space: nowrap;
    color: var(--c-slate-600);
    font-weight: 700;
    letter-spacing: 0.5px;
    border-radius: var(--r-xs);
    margin: 0 2px;
    transition: all 0.15s ease;
}
.erp_nav_link:hover { background: var(--c-primary-50); color: var(--c-primary-700); }
.erp_nav_drop {
    position: relative;
    padding-bottom: 16px;
    margin-bottom: -16px;
}
.erp_nav_drop:hover .erp_nav_menu { display: block; }
.erp_nav_drop:hover .erp_nav_link { background: var(--c-primary-50); color: var(--c-primary-700); }
.erp_nav_menu {
    display: none;
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    min-width: 190px;
    background: var(--c-white);
    border-radius: var(--r-sm);
    box-shadow: var(--shadow-pop);
    border: 1px solid var(--c-border);
    z-index: 200;
    padding: 8px 0;
}
.erp_nav_sub {
    display: block;
    padding: 10px 20px;
    font-size: 13px;
    color: var(--c-slate-600);
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.12s ease;
    margin: 0 8px;
    border-radius: var(--r-xs);
}
.erp_nav_sub:hover { background: var(--c-primary-50); color: var(--c-primary-700); }
.erp_nav_section {
    display: block;
    padding: 8px 20px 4px;
    font-size: 10px;
    text-transform: uppercase;
    font-weight: 800;
    color: var(--c-text3);
    letter-spacing: 0.5px;
    border-top: 1px solid var(--c-border2);
    margin-top: 4px;
}
.erp_nav_section:first-child { border-top: none; margin-top: 0; }
.erp_nav_right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.erp_nav_back {
    color: var(--c-primary-600);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: var(--r-xs);
    transition: all 0.12s ease;
}
.erp_nav_back:hover { background: var(--c-primary-50); color: var(--c-primary-800); }

/* 主题切换按钮 */
.erp_nav_theme_btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border: 1px solid var(--c-border);
    border-radius: 999px;
    background: var(--c-slate-50);
    color: var(--c-slate-700);
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    box-shadow: var(--shadow);
}
.erp_nav_theme_btn:hover { border-color: var(--c-primary-400); color: var(--c-primary-700); background: var(--c-primary-50); transform: translateY(-1px); box-shadow: var(--shadow-float); }
.erp_nav_theme_icon { font-size: 14px; line-height: 1; }
.erp_nav_theme_text { white-space: nowrap; }

/* ── 主体 ── */
.erp_body { max-width: 100%; margin: 0 auto; padding: 12px 24px 24px; }

/* ── 占位 ── */
.erp_placeholder {
    text-align: center;
    padding: 110px 24px;
    color: var(--c-text3);
    background: var(--c-white);
    border-radius: var(--r);
    box-shadow: var(--shadow-card);
    margin-top: 24px;
    border: 1px solid var(--c-border);
}
.erp_placeholder_icon { font-size: 60px; color: var(--c-slate-300); margin-bottom: 24px; }
.erp_placeholder h2 { font-size: 24px; font-weight: 800; margin: 0 0 10px; color: var(--c-text2); }
.erp_placeholder a { color: var(--c-primary-600); font-weight: 600; text-decoration: none; }
.erp_placeholder a:hover { text-decoration: underline; }

/* ── 订单页 ── */
.erp_orders_layout { display: flex; gap: 12px; align-items: flex-start; }

/* ── 左侧流水线 ── */
.erp_sidebar {
    width: 160px;
    position: fixed;
    left: 24px;
    top: 70px;
    bottom: 24px;
    background: var(--c-white);
    border-radius: var(--r);
    padding: 12px 0 12px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--c-border);
    overflow: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.erp_sidebar::-webkit-scrollbar { display: none; }
.erp_sidebar_group { margin: 0 0 3px; }
.erp_sidebar_label {
    font-size: 13px;
    color: var(--c-text2);
    font-weight: 900;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 5px 12px 3px;
}
.erp_sidebar_item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 10px 5px 12px;
    font-size: 13px;
    color: var(--c-slate-600);
    cursor: pointer;
    border-left: 2px solid transparent;
    text-decoration: none;
    transition: all 0.15s ease;
    font-weight: 600;
    margin: 0 8px 0 0;
    border-radius: 0 8px 8px 0;
}
.erp_sidebar_item:hover {
    background: var(--c-primary-100);
    color: var(--c-primary-800);
    border-left-color: var(--c-primary-500);
}
.erp_sidebar_item.active {
    background: linear-gradient(90deg, var(--c-primary-100), rgba(79, 70, 229, 0.06));
    color: var(--c-primary-700);
    font-weight: 800;
    border-left-color: var(--c-primary-600);
}
.erp_sidebar_item.active:hover {
    background: linear-gradient(90deg, var(--c-primary-100), rgba(79, 70, 229, 0.06));
    color: var(--c-primary-700);
    border-left-color: var(--c-primary-600);
}
.erp_sidebar_sub { padding-left: 20px; font-size: 13px; }
.erp_sidebar_count {
    font-size: 12px;
    color: var(--c-slate-700);
    background: var(--c-slate-200);
    padding: 2px 7px;
    border-radius: 999px;
    min-width: 20px;
    text-align: center;
    font-weight: 900;
    transition: all 0.15s ease;
}
.erp_sidebar_item.active .erp_sidebar_count,
.erp_sidebar_item.active:hover .erp_sidebar_count { background: var(--c-primary-600); color: #fff; }
.erp_sidebar_item:hover .erp_sidebar_count { background: var(--c-primary-600); color: #fff; }

/* 主内容区为固定侧边栏让位 */
.erp_main { flex: 1; min-width: 0; margin-left: 172px; }

/* ── 筛选区 ── */
.erp_filter_tags {
    background: var(--c-white);
    border-radius: var(--r);
    padding: 18px 22px 14px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--c-border);
    margin-bottom: 18px;
}
.erp_ft_row {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    line-height: 1.5;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--c-border2);
}
.erp_ft_row:last-child,
.erp_ft_search_row {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}
.erp_ft_search_row { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--c-border2); }
.erp_ft_label {
    font-size: 12px;
    color: var(--c-text3);
    white-space: nowrap;
    font-weight: 700;
    min-width: 70px;
    flex-shrink: 0;
    align-self: center;
    padding-top: 2px;
}
.erp_ft_chip {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    margin: 2px 3px;
    font-size: 12px;
    color: var(--c-slate-600);
    background: var(--c-slate-50);
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-weight: 600;
    border: 1px solid transparent;
    line-height: 1.4;
    max-width: none;
    white-space: normal;
    word-break: break-all;
    flex-shrink: 0;
}
.erp_ft_row > span:not(.erp_ft_label):not(.erp_ft_chip) {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1;
    min-width: 0;
}
.erp_ft_chip:hover { background: var(--c-primary-50); color: var(--c-primary-700); border-color: var(--c-primary-100); }
.erp_ft_chip.active {
    background: var(--c-primary-600);
    color: #fff;
    font-weight: 700;
    box-shadow: 0 3px 6px rgba(79, 70, 229, 0.22);
}
.erp_search_group {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 200px;
    border-radius: 10px;
    border: 1px solid var(--c-border);
    background: var(--c-white);
    overflow: hidden;
    transition: all 0.15s ease;
}
.erp_search_group:focus-within { border-color: var(--c-primary-400); box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.08); }
.erp_search_type {
    padding: 10px 16px;
    border: none;
    border-right: 1px solid var(--c-border2);
    border-radius: 0;
    font-size: 13px;
    background: transparent;
    color: var(--c-slate-600);
    outline: none;
    transition: all 0.15s ease;
    font-weight: 500;
    flex-shrink: 0;
}
.erp_search_input {
    flex: 1;
    min-width: 120px;
    padding: 10px 18px;
    border: none;
    border-radius: 0;
    font-size: 13px;
    outline: none;
    transition: all 0.15s ease;
    background: transparent;
    color: var(--c-text);
    font-weight: 500;
}
.erp_search_input:focus, .erp_search_type:focus { box-shadow: none; }
.erp_search_type:focus { background: var(--c-primary-50); color: var(--c-primary-700); }

/* ── 跨境/本土标签 ── */
.erp_type_tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    margin-left: 6px;
    letter-spacing: 0.4px;
}
.erp_type_cb { background: var(--c-blue-100); color: var(--c-blue-600); }
.erp_type_local { background: var(--c-red-100); color: var(--c-red-600); }
.erp_type_shopee { background: var(--c-orange-100); color: var(--c-orange-600); }
.erp_mark_tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 9px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    margin-left: 5px;
}
.erp_mark_label { background: var(--c-green-100); color: var(--c-green-600); }
.erp_mark_picking { background: var(--c-orange-100); color: var(--c-orange-600); }
.erp_mark_jump { background: var(--c-red-100); color: var(--c-red-600); }

/* ── 取消子状态徽章（TikTok 取消状态机融合方案 §9.1）── */
.erp_cancel_badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 800;
    margin-left: 5px;
    letter-spacing: 0.3px;
    border: 1px solid transparent;
}
.erp_cancel_pending {
    background: var(--c-orange-100);
    color: var(--c-orange-600);
    border-color: var(--c-orange);
}
.erp_cancel_approved {
    background: var(--c-red-100);
    color: var(--c-red-600);
    border-color: var(--c-red);
}
.erp_cancel_complete {
    background: var(--c-slate-100);
    color: var(--c-slate-600);
    border-color: var(--c-slate-300);
}
.erp_cancel_countdown {
    font-weight: 700;
    font-size: 10px;
    padding: 1px 6px;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 4px;
}
.erp_cancel_pending .erp_cancel_countdown { color: var(--c-red-600); background: #fff7ed; }
.erp_cancel_reason {
    display: inline-block;
    margin-left: 6px;
    padding: 2px 8px;
    background: var(--c-slate-100);
    color: var(--c-slate-700);
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

/* ── 拒绝取消弹窗（模态框）── */
.ws_modal_overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.55);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: ws_fade_in 0.15s ease-out;
}
@keyframes ws_fade_in { from { opacity: 0; } to { opacity: 1; } }
.ws_modal_box {
    background: var(--c-white);
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
    width: 480px;
    max-width: 92vw;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: ws_slide_up 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}
@keyframes ws_slide_up { from { transform: translateY(20px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.ws_modal_title {
    padding: 16px 20px;
    font-size: 15px;
    font-weight: 800;
    color: var(--c-text);
    border-bottom: 1px solid var(--c-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--c-orange-50);
}
.ws_modal_title_close {
    cursor: pointer;
    color: var(--c-text3);
    font-size: 18px;
    line-height: 1;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.15s;
}
.ws_modal_title_close:hover { background: var(--c-slate-200); color: var(--c-text); }
.ws_modal_body { padding: 18px 20px; overflow-y: auto; flex: 1; }
.ws_modal_row { margin-bottom: 14px; }
.ws_modal_row label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    color: var(--c-text2);
    margin-bottom: 6px;
    letter-spacing: 0.3px;
}
.ws_modal_select, .ws_modal_textarea {
    width: 100%;
    border: 1px solid var(--c-border);
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 13px;
    font-family: inherit;
    background: var(--c-white);
    color: var(--c-text);
    box-sizing: border-box;
    transition: border-color 0.15s;
}
.ws_modal_select:focus, .ws_modal_textarea:focus {
    outline: none;
    border-color: var(--c-orange);
    box-shadow: 0 0 0 3px var(--c-orange-100);
}
.ws_modal_textarea { min-height: 80px; resize: vertical; }
.ws_modal_actions {
    padding: 14px 20px;
    border-top: 1px solid var(--c-border);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: var(--c-slate-50);
}
.ws_modal_btn {
    padding: 8px 18px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.15s;
}
.ws_modal_btn_cancel {
    background: var(--c-white);
    color: var(--c-text2);
    border-color: var(--c-border);
}
.ws_modal_btn_cancel:hover { background: var(--c-slate-100); }
.ws_modal_btn_submit {
    background: var(--c-orange);
    color: #fff;
}
.ws_modal_btn_submit:hover { background: var(--c-orange-600); }
.ws_modal_btn_submit:disabled { opacity: 0.5; cursor: not-allowed; }
.ws_modal_tip {
    margin-top: 8px;
    padding: 8px 10px;
    background: var(--c-orange-50);
    color: var(--c-orange-600);
    border-left: 3px solid var(--c-orange);
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.5;
}

/* ── 状态卡片（大胆版）────────────────────── */
.erp_status_cards { display: flex; gap: 16px; margin-bottom: 18px; }
.erp_scard {
    flex: 1;
    background: var(--c-white);
    border-radius: var(--r);
    padding: 22px 18px;
    box-shadow: var(--shadow-card);
    border: 1px solid var(--c-border);
    text-align: center;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.erp_scard::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: var(--c-slate-300);
}
.erp_scard_ok::before { background: linear-gradient(90deg, var(--c-green), #34d399); }
.erp_scard_warn::before { background: linear-gradient(90deg, var(--c-orange), #fbbf24); }
.erp_scard_err::before { background: linear-gradient(90deg, var(--c-red), #f87171); }
.erp_scard_label { font-size: 13px; color: var(--c-text3); margin-bottom: 6px; font-weight: 700; letter-spacing: 0.3px; }
.erp_scard_count { font-size: 34px; font-weight: 800; color: var(--c-text); letter-spacing: -1px; }
.erp_scard .shopee_ws_btn { margin-top: 14px; }
.erp_scard:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.erp_scard_active { box-shadow: 0 0 0 2px var(--c-primary-500), 0 16px 30px -6px rgba(79, 70, 229, 0.18); }
/* 无操作按钮的精简卡片 */
.erp_scard_slim { padding: 14px 18px !important; }
.erp_scard_slim .erp_scard_label { font-size: 14px !important; margin-bottom: 4px; font-weight: 700; }
.erp_scard_slim .erp_scard_count { font-size: 28px !important; }

/* ── 批量操作 ── */
.shopee_ws_batch_bar {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    background: linear-gradient(90deg, var(--c-primary-50), rgba(79, 70, 229, 0.04));
    padding: 16px 20px;
    border-radius: var(--r-sm);
    margin-bottom: 18px;
    border: 1px solid var(--c-primary-100);
}
.shopee_ws_batch_info { font-size: 13px; color: var(--c-primary-700); font-weight: 800; }

/* ── 表格式订单列表 ── */
.erp_table_wrap {
    background: var(--c-white);
    border-radius: var(--r);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--c-border);
    overflow-x: auto;
    overflow-y: visible;
}
.erp_table {
    width: 100%;
    /* 【2026-07-23 列宽改版】table-layout:fixed + 比例列宽：
       此前 auto 布局下商品列（width:auto）独吞全部剩余宽度（宽屏 700px+ 空白），
       而物流/时间等定宽列内容被迫换行挤压。fixed 布局按声明比例分配，
       余量按各列比例均摊，任何屏幕宽度下都不再有"一列 hoarding"现象。 */
    table-layout: fixed;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 13px;
    min-width: 1200px;
}
.erp_table thead { position: sticky; top: 0; z-index: 10; }
.erp_table th {
    background: var(--c-slate-100);
    padding: 15px 16px;
    text-align: left;
    font-weight: 800;
    font-size: 12px;
    color: var(--c-slate-500);
    border-bottom: 1px solid var(--c-border);
    white-space: nowrap;
    vertical-align: middle;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.erp_table th:first-child { border-radius: 16px 0 0 0; }
.erp_table th:last-child { border-radius: 0 16px 0 0; }
.erp_th_check { width: 44px; text-align: center; }
.erp_th_check input[type="checkbox"],
.erp_td_check input[type="checkbox"] {
    width: 16px;
    height: 16px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--c-primary-600);
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: 4px;
}
.erp_th_check input[type="checkbox"] {
    box-shadow: 0 0 0 2px var(--c-slate-100), 0 0 0 3px var(--c-slate-300);
}
.erp_th_check { padding-left: 0; padding-right: 0; }
/* 比例列宽（table-layout:fixed 生效）：商品 28% / 金额 8% / 地区 4% / 收件人 9%
   物流 13% / 时间 13% / 状态 7% / 操作取剩余（~18%）。
   min-width:1200px 兜底窄屏，宽屏余量按比例均摊。 */
.erp_th_product { width: 28%; text-align: left; }
/* 【优先级注意】text-align 必须用 .erp_table th.Xxx（0-2-1）才能压过
   .erp_table th { text-align:left }（0-1-1）——2026-07-23 实证单 class 会输 */
.erp_table th.erp_th_amt { text-align: right; }
.erp_th_amt { width: 8%; padding-right: 16px; }
.erp_th_region { width: 4%; text-align: left; padding-left: 12px; }
.erp_th_buyer { width: 9%; text-align: left; }
.erp_th_ship { width: 13%; text-align: left; }
.erp_th_time { width: 13%; text-align: left; }
.erp_table th.erp_th_status { text-align: center; }  /* 徽标列居中（提权压过 .erp_table th 的 left） */
.erp_th_status { width: 7%; }

/* ── 订单行 ── */
.erp_trow {
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid var(--c-border2);
    height: 72px;
}
.erp_trow:last-child td { border-bottom: none; }
.erp_trow:last-child td:first-child { border-radius: 0 0 0 16px; }
.erp_trow:last-child td:last-child { border-radius: 0 0 16px 0; }
.erp_trow:hover { background: var(--c-primary-50); }
.erp_trow:hover .erp_trow_sn { text-decoration: underline; }

.erp_td {
    padding: 13px 16px;
    vertical-align: middle;
    border-bottom: 1px solid var(--c-border2);
    text-align: left;
    height: 72px;
}
.erp_td_check { text-align: center; width: 44px; }
.erp_td_empty {
    text-align: center;
    color: var(--c-text3);
    padding: 80px 24px;
    font-size: 15px;
    font-weight: 500;
    height: auto;
}

/* ── 商品信息列 ── */
.erp_td_product { padding: 13px 16px; }
.erp_trow_sn {
    color: var(--c-primary-600);
    font-weight: 800;
    font-size: 13px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    transition: opacity 0.12s ease;
}
.erp_trow_sn:hover { opacity: 0.8; text-decoration: underline; text-decoration-style: dotted; }

.erp_td_amt { font-weight: 800; font-size: 13px; white-space: nowrap; text-align: right; padding-right: 16px; color: var(--c-text); }
.erp_td_region { font-size: 12px; color: var(--c-slate-600); text-align: left; font-weight: 700; padding-left: 12px; }
.erp_td_buyer { font-size: 13px; font-weight: 700; color: var(--c-text2); text-align: left; }
.erp_td_ship { font-size: 12px; color: var(--c-slate-600); text-align: left; }
.erp_td_time { font-size: 12px; line-height: 1.6; color: var(--c-text3); }
.erp_time_row { color: var(--c-slate-600); white-space: nowrap; }
.erp_time_warn { color: var(--c-red-600); font-weight: 800; }

.erp_td_status {
    vertical-align: middle !important;
    padding: 0 4px !important;
    text-align: center !important;
    height: 72px;
}
.erp_status_badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 26px;
    padding: 0 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.4px;
    background: var(--c-slate-200);
    color: var(--c-slate-700);
    white-space: nowrap;
    min-width: 56px;
    text-align: center;
    box-sizing: border-box;
    vertical-align: middle;
}
.erp_th_action { width: 100px; text-align: left; }
.erp_td_action { white-space: nowrap; text-align: left; width: 100px; min-width: 100px; height: 72px; }
.erp_btn_act {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 7px 13px;
    margin: 2px 3px;
    border: 1px solid var(--c-border);
    border-radius: var(--r-xs);
    background: var(--c-white);
    color: var(--c-slate-600);
    font-size: 12px;
    cursor: pointer;
    transition: all 0.15s ease;
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.03);
}
.erp_btn_act:hover { border-color: var(--c-primary-400); color: var(--c-primary-700); background: var(--c-primary-50); box-shadow: 0 2px 6px rgba(79, 70, 229, 0.1); }
.erp_btn_primary { background: var(--c-primary-600); color: #fff; border-color: var(--c-primary-600); box-shadow: 0 3px 8px rgba(79, 70, 229, 0.18); }
.erp_btn_primary:hover { background: var(--c-primary-700); border-color: var(--c-primary-700); color: #fff; box-shadow: 0 5px 12px rgba(79, 70, 229, 0.25); }
.erp_btn_warn { background: var(--c-orange-600); color: #fff; border-color: var(--c-orange-600); }
.erp_btn_warn:hover { background: var(--c-orange-600); border-color: var(--c-orange-600); color: #fff; }
/* 打回：次级逆向操作，幽灵按钮（透明底+警示色文字），hover 才显底色。
   设计决策：打回不是主流程动作，不能和主按钮（实心紫）抢视觉权重；
   旧版白底橙边在深色主题下是一块刺眼的亮斑，故改为幽灵样式。 */
.erp_btn_rollback {
    background: transparent;
    color: var(--c-orange-600);
    border-color: transparent;
    box-shadow: none;
    font-weight: 600;
}
.erp_btn_rollback:hover { background: var(--c-orange-100); color: var(--c-orange-600); border-color: transparent; }
.erp_btn_disabled { background: var(--c-slate-100); color: var(--c-slate-400); border-color: var(--c-border); cursor: not-allowed; }

/* ── 错误提示行 ── */
.erp_trow_error { background: rgba(239, 68, 68, 0.06); }
.erp_trow_error:hover { background: rgba(239, 68, 68, 0.08); }
.erp_td_error {
    padding: 8px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--c-red-600);
    border-bottom: 1px solid var(--c-border2);
    text-align: left;
}
.erp_error_msg { display: inline-flex; align-items: center; gap: 6px; margin-right: 16px; }
.erp_error_msg::before {
    content: '⚠';
    font-size: 13px;
    color: var(--c-red-600);
}
.erp_wms_msg {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--c-orange-600);
}
.erp_wms_msg::before {
    content: 'WMS';
    font-size: 10px;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 4px;
    background: var(--c-orange-100);
    color: var(--c-orange-600);
}
/* 运单号申请失败文案——与 WMS 横幅同款徽章设计（红色系） */
.erp_tn_msg {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 16px;
    color: var(--c-red-600);
}
.erp_tn_msg::before {
    content: '运单';
    font-size: 10px;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 4px;
    background: var(--c-red-100);
    color: var(--c-red-600);
}

/* ── 商品子行 ── */
.erp_tline { background: var(--c-slate-50); }
.erp_tline:hover { background: var(--c-slate-100); }
.erp_tline .erp_td { padding: 11px 16px; }
.erp_tline_item {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}
.erp_tline_img {
    width: 42px;
    height: 42px;
    object-fit: cover;
    border-radius: 10px;
    flex-shrink: 0;
    cursor: pointer;
    border: 1px solid var(--c-border);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.erp_tline_noimg {
    width: 42px;
    height: 42px;
    background: var(--c-slate-100);
    border-radius: 10px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-text3);
    font-size: 10px;
    border: 1px solid var(--c-border);
}
.erp_tline_info { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; }
.erp_tline_sku {
    font-size: 12px;
    color: var(--c-text2);
    font-weight: 800;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}
.erp_tline_qty { color: var(--c-text3); font-size: 12px; white-space: nowrap; flex-shrink: 0; }
.erp_tline_num { color: var(--c-text); font-weight: 900; font-size: 15px; margin-left: 2px; }
.erp_tline_warehouse {
    background: var(--c-slate-100);
    color: var(--c-slate-500);
    font-size: 11px;
    padding: 4px 11px;
    border-radius: 999px;
    margin-left: auto;
    white-space: nowrap;
    font-weight: 700;
}
.erp_tline_manual {
    background: var(--c-blue-100);
    color: var(--c-blue-600);
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 900;
    flex-shrink: 0;
    margin-left: 4px;
}

/* ── 缩略图悬停放大 ── */
.erp_tline_img_pop {
    position: fixed;
    z-index: 600;
    pointer-events: none;
    width: 230px;
    height: 230px;
    border-radius: 14px;
    box-shadow: var(--shadow-pop);
    background-color: var(--c-white);
    border: 1px solid var(--c-border);
    padding: 5px;
}
.erp_tline_img_pop img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }

/* ── 全选+批量 ── */
.shopee_ws_batch_bar input[type="checkbox"] { width: 16px; height: 16px; margin: 0 4px 0 0; cursor: pointer; accent-color: var(--c-primary-600); }
.shopee_ws_no_thumb {
    width: 50px;
    height: 50px;
    background: var(--c-slate-100);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--c-text3);
    font-size: 12px;
    flex-shrink: 0;
    border: 1px solid var(--c-border);
}
.shopee_ws_thumb { width: 58px; height: 58px; object-fit: cover; border-radius: 12px; flex-shrink: 0; border: 1px solid var(--c-border); }
.shopee_ws_btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 9px 18px;
    border: 1px solid var(--c-border);
    border-radius: 10px;
    background: var(--c-white);
    color: var(--c-slate-700);
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.shopee_ws_btn:hover { border-color: var(--c-primary-400); color: var(--c-primary-700); background: var(--c-primary-50); transform: translateY(-1px); box-shadow: 0 3px 8px rgba(79, 70, 229, 0.1); }
.shopee_ws_btn:active { transform: translateY(0); }

/* ── 状态 Badge ── */
.shopee_ws_badge { display: inline-flex; align-items: center; padding: 5px 12px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: 0.4px; }
.shopee_ws_status_pending { background: var(--c-orange-100); color: var(--c-orange-600); }
.shopee_ws_status_confirmed { background: var(--c-blue-100); color: var(--c-blue-600); }
.shopee_ws_status_confirmed_paired { background: var(--c-green-100); color: var(--c-green-600); }
.shopee_ws_status_confirmed_unpaired { background: var(--c-red-100); color: var(--c-red-600); }
.shopee_ws_status_tracking_applying { background: var(--c-orange-100); color: var(--c-orange-600); }
.shopee_ws_status_tracking_obtained { background: var(--c-blue-100); color: var(--c-blue-600); }
.shopee_ws_status_tracking_failed { background: var(--c-red-100); color: var(--c-red-600); }
.shopee_ws_status_ready_to_print { background: var(--c-green-100); color: var(--c-green-600); }
.shopee_ws_status_ready_to_print_shortage { background: var(--c-orange-100); color: var(--c-orange-600); }
.shopee_ws_status_handed_over { background: var(--c-cyan-100); color: var(--c-cyan-600); }
.shopee_ws_status_shipped { background: var(--c-blue-100); color: var(--c-blue-600); }
.shopee_ws_status_delivered { background: var(--c-green-100); color: var(--c-green-600); }
.shopee_ws_status_done { background: var(--c-purple-100); color: var(--c-purple-700); }
.shopee_ws_status_cancelled, .shopee_ws_status_cancelling { background: var(--c-slate-200); color: var(--c-slate-700); }
.shopee_ws_status_error, .shopee_ws_status_draft { background: var(--c-slate-200); color: var(--c-slate-600); }
/* WMS 推送流程状态 */
.shopee_ws_status_push_ready { background: var(--c-green-100); color: var(--c-green-600); }
.shopee_ws_status_push_shortage { background: var(--c-orange-100); color: var(--c-orange-600); }
.shopee_ws_status_wms_pushing { background: var(--c-cyan-100); color: var(--c-cyan-600); }
.shopee_ws_status_wms_pending { background: var(--c-blue-100); color: var(--c-blue-600); }
.shopee_ws_status_wms_error { background: var(--c-red-100); color: var(--c-red-600); }
.shopee_ws_status_wms_shipped { background: var(--c-green-100); color: var(--c-green-600); }
/* 其他状态 */
.shopee_ws_status_returning { background: var(--c-purple-100); color: var(--c-purple-600); }
.shopee_ws_status_partial_shipped { background: var(--c-blue-100); color: var(--c-blue-600); }

/* ── 流转记录 ── */
.ws_flow_empty {
    text-align: center;
    color: var(--c-text3);
    padding: 16px;
    font-size: 13px;
}
.ws_flow_item {
    display: flex;
    align-items: flex-start;
    padding: 8px 0;
    border-bottom: 1px solid var(--c-border);
    font-size: 13px;
    line-height: 1.5;
}
.ws_flow_item:last-child {
    border-bottom: none;
}
.ws_flow_icon {
    color: var(--c-accent);
    margin-right: 8px;
    flex-shrink: 0;
    font-size: 12px;
}
.ws_flow_content {
    flex: 1;
    color: var(--c-text);
    word-break: break-word;
}
.ws_flow_time {
    color: var(--c-text3);
    font-size: 12px;
    white-space: nowrap;
    margin-left: 8px;
    flex-shrink: 0;
}
.ws_flow_overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ws_flow_popup {
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: 12px;
    width: 90%;
    max-width: 640px;
    max-height: 80vh;
    overflow-y: auto;
    padding: 24px;
    box-shadow: var(--shadow-pop);
}
.ws_flow_popup_title {
    margin: 0 0 16px 0;
    font-size: 16px;
    font-weight: 700;
    color: var(--c-text);
}
.ws_flow_item_popup {
    padding: 10px 0;
    font-size: 14px;
}
.ws_flow_item_popup .ws_flow_content strong {
    color: var(--c-accent);
}
.ws_flow_close_btn {
    display: block;
    margin: 20px auto 0;
    padding: 10px 32px;
    border: 1px solid var(--c-border);
    background: var(--c-white);
    color: var(--c-text);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.15s ease;
}
.ws_flow_close_btn:hover {
    background: var(--c-slate-100);
    border-color: var(--c-accent);
}

/* ── 分页 ── */
.shopee_ws_pager { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; padding: 0 4px; }
.shopee_ws_pager_top { margin-top: 0; margin-bottom: 18px; }
.shopee_ws_pager_info { font-size: 13px; color: var(--c-text3); font-weight: 600; }
.shopee_ws_pager_btns { display: flex; align-items: center; gap: 10px; }
.shopee_ws_page_input {
    width: 72px;
    padding: 8px 6px;
    border: 1px solid var(--c-border);
    border-radius: 10px;
    font-size: 13px;
    text-align: center;
    outline: none;
    transition: all 0.15s ease;
    -moz-appearance: textfield;
    -webkit-appearance: none;
    appearance: none;
    background: var(--c-white);
    color: var(--c-text);
    font-weight: 600;
}
.shopee_ws_page_input::-webkit-inner-spin-button,
.shopee_ws_page_input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.shopee_ws_page_input:focus { border-color: var(--c-primary-400); box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.08); }
.shopee_ws_page_size {
    padding: 8px 12px;
    border: 1px solid var(--c-border);
    border-radius: 10px;
    font-size: 13px;
    background: var(--c-white);
    color: var(--c-text2);
    outline: none;
    font-weight: 600;
    cursor: pointer;
}

/* ── 抽屉 ── */
.shopee_ws_drawer_bg { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.55); z-index: 500; backdrop-filter: blur(3px); }
.shopee_ws_drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 700px;
    height: 100vh;
    background: var(--c-white);
    box-shadow: var(--shadow-drawer);
    z-index: 501;
    display: flex;
    flex-direction: column;
}
.shopee_ws_drawer_header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1px solid var(--c-border);
    background: var(--c-slate-100);
}
.shopee_ws_drawer_header h3 { margin: 0; font-size: 20px; font-weight: 800; color: var(--c-text); }
.shopee_ws_drawer_close {
    cursor: pointer;
    font-size: 18px;
    color: var(--c-text3);
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: all 0.12s ease;
    font-weight: 800;
}
.shopee_ws_drawer_close:hover { background: var(--c-slate-200); color: var(--c-text); }
.shopee_ws_drawer_body { flex: 1; overflow-y: auto; padding: 28px; }
.shopee_ws_drawer_info { margin-bottom: 24px; background: var(--c-slate-50); padding: 18px 22px; border-radius: var(--r-sm); border: 1px solid var(--c-border); }
.shopee_ws_drawer_row { display: flex; justify-content: space-between; padding: 9px 0; font-size: 14px; }
.shopee_ws_drawer_label { color: var(--c-text3); font-weight: 700; }
.shopee_ws_drawer_value { font-weight: 800; color: var(--c-text); }
.shopee_ws_drawer_section {
    font-size: 13px;
    font-weight: 800;
    margin: 22px 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--c-border);
    color: var(--c-text2);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.shopee_ws_drawer_items { width: 100%; border-collapse: collapse; font-size: 14px; }
.shopee_ws_drawer_items th { padding: 11px 8px; text-align: left; font-weight: 800; color: var(--c-text3); font-size: 12px; }
.shopee_ws_drawer_items td { padding: 11px 8px; border-bottom: 1px solid var(--c-border2); color: var(--c-text); }
.shopee_ws_drawer_actions { display: flex; gap: 12px; padding: 18px 0; border-top: 1px solid var(--c-border); margin-top: 18px; }
.shopee_ws_drawer_input { border: 1px solid var(--c-border); border-radius: 8px; padding: 7px 11px; font-size: 13px; text-align: center; transition: all 0.15s ease; background: var(--c-white); color: var(--c-text); font-weight: 600; }
.shopee_ws_drawer_input:focus { border-color: var(--c-primary-400); box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.08); outline: none; }
.ws_pair_row { display: flex; align-items: center; gap: 8px; }
.ws_pair_name { font-size: 13px; flex: 1; color: var(--c-text); }
.ws_pair_name.ws_pair_done { color: var(--c-green-600); font-weight: 800; }
.ws_pair_name.ws_pair_none { color: var(--c-orange-600); font-weight: 800; }
.ws_drawer_del { background: none; border: none; color: var(--c-red-600); cursor: pointer; font-size: 16px; padding: 0 4px; opacity: 0.6; transition: opacity 0.12s ease; }
.ws_drawer_del:hover { opacity: 1; }
.ws_drawer_tr:hover { background: var(--c-slate-50); }
.ws_drawer_td_sku { font-size: 12px; color: var(--c-text3); max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ws_drawer_td_name { min-width: 160px; font-weight: 600; color: var(--c-text); }
.ws_drawer_td_match { min-width: 70px; text-align: left; }
.ws_drawer_td_qty { text-align: center; font-weight: 800; color: var(--c-text); }
.ws_pair_btn { padding: 4px 10px !important; font-size: 11px !important; margin-right: 4px; font-weight: 800 !important; }
.ws_drawer_td_psku { font-size: 12px; color: var(--c-primary-600); max-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 700; }
.ws_drawer_td_pname { font-size: 12px; color: var(--c-text); font-weight: 700; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.shopee_ws_drawer_hint { font-size: 12px; color: var(--c-orange-600); font-weight: 800; }

.ws_product_overlay {
    position: fixed;
    z-index: 999;
    background: var(--c-white);
    border: 1px solid var(--c-border);
    border-radius: var(--r-sm);
    box-shadow: var(--shadow-pop);
    width: 360px;
    max-height: 400px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.ws_product_search_input {
    border: none;
    border-bottom: 1px solid var(--c-border);
    padding: 12px 14px;
    font-size: 13px;
    outline: none;
    border-radius: var(--r-sm) var(--r-sm) 0 0;
    background: var(--c-slate-50);
    font-weight: 600;
    color: var(--c-text);
}
.ws_product_results { overflow-y: auto; flex: 1; }
.ws_product_result {
    padding: 11px 14px;
    cursor: pointer;
    font-size: 13px;
    border-bottom: 1px solid var(--c-border2);
    display: flex;
    gap: 12px;
    align-items: center;
    transition: background 0.1s ease;
    color: var(--c-text);
}
.ws_product_result:hover { background: var(--c-primary-50); }
.ws_pr_thumb { width: 40px; height: 40px; border-radius: 8px; object-fit: contain; flex-shrink: 0; background: var(--c-slate-50); border: 1px solid var(--c-border); }
.ws_pr_no_thumb { width: 40px; height: 40px; border-radius: 8px; flex-shrink: 0; background: var(--c-slate-100); }
.ws_pr_info { flex: 1; min-width: 0; }
.ws_pr_sku { color: var(--c-text3); font-size: 11.5px; display: block; font-weight: 700; }
.ws_pr_name { color: var(--c-text); font-weight: 700; font-size: 12px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ws_pr_open { font-size: 13px; color: var(--c-text3); text-decoration: none; flex-shrink: 0; padding: 4px; transition: color 0.12s ease; }
.ws_pr_open:hover { color: var(--c-primary-600); }
.ws_product_empty { padding: 16px; color: var(--c-text3); font-size: 13px; text-align: center; }
.ws_product_loading { padding: 16px; color: var(--c-text3); font-size: 13px; text-align: center; }
.ws_product_clear { color: var(--c-red-600); font-size: 12px; justify-content: center; font-weight: 800; }

/* ============================================ */
/* 响应式适配（PC 优先，兼顾小屏）              */
/* ============================================ */
@media (max-width: 1280px) {
    .erp_sidebar { width: 190px; }
    .erp_table { min-width: 1100px; }
}

@media (max-width: 1024px) {
    .erp_orders_layout { flex-direction: column; }
    .erp_sidebar {
        position: relative;
        top: 0;
        width: 100%;
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        padding: 14px;
        margin-bottom: 18px;
    }
    .erp_sidebar_group { margin: 0; }
    .erp_sidebar_label { display: none; }
    .erp_sidebar_item {
        margin: 0;
        border-radius: 999px;
        padding: 8px 14px;
        border-left: none;
        background: var(--c-slate-50);
    }
    .erp_sidebar_item.active { background: var(--c-primary-600); color: #fff; border-left: none; }
    .erp_sidebar_sub { padding-left: 0; }
    .erp_sidebar_count { margin-left: 8px; }

    .erp_status_cards { flex-wrap: wrap; }
    .erp_scard { flex: 1 1 calc(33.333% - 10px); min-width: 140px; }

    .erp_filter_tags { padding: 16px 18px; }
}

@media (max-width: 768px) {
    .erp_body { padding: 18px 14px 36px; }
    .erp_nav { height: 52px; padding: 0 14px; }
    .erp_nav_link { padding: 8px 10px; font-size: 12px; }
    .erp_nav_theme_btn { padding: 7px 10px; }
    .erp_nav_theme_text { display: none; }

    .erp_status_cards { gap: 12px; }
    .erp_scard { flex: 1 1 calc(50% - 6px); min-width: 120px; padding: 18px 12px; }
    .erp_scard_count { font-size: 30px; }

    .erp_filter_tags { padding: 14px; }
    .erp_ft_row { line-height: 2; }
    .erp_search_type { width: 100px; border-radius: 10px 0 0 10px; }

    .shopee_ws_batch_bar { padding: 14px; gap: 8px; }
    .shopee_ws_btn { padding: 8px 12px; font-size: 12px; }

    .erp_table { min-width: 980px; }

    .shopee_ws_drawer { width: 100%; }
}

@media (max-width: 480px) {
    .erp_nav_home { font-size: 17px; letter-spacing: 1px; padding: 4px 8px; }
    .erp_nav_home::before { width: 7px; height: 7px; }
    .erp_nav_link { padding: 6px 8px; font-size: 11px; }

    .erp_sidebar { padding: 10px; }
    .erp_sidebar_item { padding: 7px 10px; font-size: 11px; }

    .erp_status_cards { gap: 10px; }
    .erp_scard { flex: 1 1 100%; }

    .shopee_ws_batch_bar { flex-direction: column; align-items: stretch; }
    .shopee_ws_batch_info { margin-bottom: 4px; }
    .shopee_ws_btn { justify-content: center; }

    .shopee_ws_pager { flex-direction: column; gap: 10px; align-items: flex-start; }
}

/* ============================================ */
/* 额外动效（不影响逻辑）                        */
/* ============================================ */
.erp_tline_img, .shopee_ws_thumb, .ws_pr_thumb { transition: transform 0.15s ease; }
.erp_tline_img:hover { transform: scale(1.05); }
.erp_scard, .shopee_ws_btn, .erp_btn_act { will-change: transform; }

/* ── 补充语义变量（2026-07-22 全站美化统一，供各页内联样式映射硬编码色值）── */
:root {
    --c-table-head: var(--c-slate-100);   /* 表头/弱背景 */
    --c-row-hover: var(--c-primary-50);   /* 行 hover */
    --c-img-ph: #f3f4f6;                  /* 图片占位底 */
    --c-img-ph-text: #94a3b8;             /* 图片占位文字 */
    --c-shopee: #ee4d2d;                  /* Shopee 品牌 */
    --c-shopee-50: #fff1ec;
    --c-shopee-600: #d63d1f;
    --c-tiktok: #111111;                  /* TikTok 品牌 */
    --c-tiktok-50: #f4f4f5;
    --c-tiktok-600: #111111;
}
:root[data-theme="dark"] {
    --c-table-head: var(--c-slate-100);
    --c-row-hover: var(--c-primary-50);
    --c-img-ph: #151b2b;
    --c-img-ph-text: #445369;
    --c-shopee: #ff8a6b;
    --c-shopee-50: #4a2118;
    --c-shopee-600: #ff8a6b;
    --c-tiktok: #f8fafc;
    --c-tiktok-50: #26272b;
    --c-tiktok-600: #f8fafc;
}

/* 补齐日间缺失的 600 档（夜间已有），供徽章深字使用 */
:root {
    --c-blue-600: #2563eb;
    --c-cyan-600: #0891b2;
}
