/* ==================== 产品流转看板 - 样式表 ==================== */

:root {
    --bg: #eef4fb;
    --bg-deep: #e7eff9;
    --panel: rgba(255,255,255,.88);
    --panel-strong: #ffffff;
    --panel-soft: #f7faff;
    --primary: #123b68;
    --primary-2: #1f5d99;
    --primary-3: #4a8fd8;
    --primary-hover: #0d2e52;
    --primary-soft: #eaf4ff;
    --text: #17263c;
    --text-2: #58677d;
    --text-3: #8d9aae;
    --line: rgba(162,180,203,.34);
    --line-strong: #d7e2ee;
    --success: #16a34a;
    --success-soft: #edf9f1;
    --warning: #d97706;
    --warning-soft: #fff6e8;
    --danger: #dc2626;
    --danger-soft: #fff0f0;
    --info: #2563eb;
    --info-soft: #eaf1ff;
    --shadow-xs: 0 8px 20px rgba(15,23,42,.05);
    --shadow-sm: 0 14px 30px rgba(18,59,104,.08);
    --shadow-md: 0 18px 40px rgba(18,59,104,.10);
    --shadow-lg: 0 24px 54px rgba(10,37,64,.14);
    --radius-sm: 14px;
    --radius-md: 22px;
    --radius-lg: 28px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
    font-family: "PingFang SC","Microsoft YaHei","Segoe UI",sans-serif;
    background: radial-gradient(circle at top left, rgba(74,143,216,.12), transparent 24%),
                radial-gradient(circle at top right, rgba(18,59,104,.08), transparent 18%),
                linear-gradient(180deg, var(--bg) 0%, #f7fbff 100%);
    color: var(--text);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}

/* ==================== 容器 ==================== */
.container { max-width: 1720px; margin: 0 auto; padding: 30px 26px 42px; }

/* ==================== 头部 ==================== */
.header {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 24px;
    padding: 32px 34px;
    background: linear-gradient(135deg, #102f53 0%, #1b4979 52%, #3478be 100%);
    border: 1px solid rgba(255,255,255,.18);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 60px rgba(18,59,104,.22);
    overflow: hidden;
}
.header::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, rgba(255,255,255,.16) 0%, rgba(255,255,255,0) 32%, rgba(255,255,255,.08) 100%);
    pointer-events: none;
}
.header::after {
    content: "";
    position: absolute;
    right: -60px;
    top: -60px;
    width: 220px;
    height: 220px;
    background: radial-gradient(circle, rgba(255,255,255,.22), rgba(255,255,255,0));
    pointer-events: none;
}
.header h1 { position: relative; margin: 0; font-size: 32px; font-weight: 800; letter-spacing: .8px; color: #fff; }
.header-meta { position: relative; margin-top: 8px; font-size: 14px; color: rgba(255,255,255,.78); letter-spacing: .3px; }
.header-side { position: relative; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.header-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 0 16px;
    border-radius: 999px;
    background: rgba(255,255,255,.14);
    border: 1px solid rgba(255,255,255,.2);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .4px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.16);
}
.header-chip strong { font-size: 13px; font-weight: 800; }
.header-dot { width: 8px; height: 8px; border-radius: 50%; background: #7dd3fc; box-shadow: 0 0 0 6px rgba(125,211,252,.16); }

/* ==================== 筛选区 ==================== */
.filter-section, .ps, .ts {
    background: var(--panel);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,.65);
    box-shadow: var(--shadow-md);
}
.filter-section {
    position: relative;
    z-index: 20;
    overflow: visible;
    border-radius: var(--radius-lg);
    padding: 24px 24px 18px;
    margin-bottom: 24px;
}
.filter-section form, .filter-row, .filter-item, .ss { overflow: visible; }
.filter-row {
    display: grid;
    grid-template-columns: minmax(180px,.95fr) minmax(300px,1.45fr) minmax(180px,.95fr) minmax(180px,.95fr) minmax(390px,460px);
    gap: 18px;
    align-items: end;
}
.filter-item { display: flex; flex-direction: column; align-items: stretch; gap: 9px; min-width: 0; }
.filter-item.filter-actions {
    min-width: 390px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex-wrap: nowrap;
}
.filter-item label { font-size: 12px; font-weight: 700; color: var(--text-2); letter-spacing: .45px; }

/* ==================== 自定义下拉框 ==================== */
.ss { position: relative; min-width: 0; z-index: 30; }
.ss.open { z-index: 9999; }
.ssi {
    width: 100%;
    height: 48px;
    padding: 0 42px 0 16px;
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    background: rgba(255,255,255,.96);
    color: var(--text);
    font-size: 14px;
    cursor: pointer;
    transition: all .25s ease;
    box-shadow: inset 0 1px 2px rgba(15,23,42,.02), 0 4px 10px rgba(18,59,104,.03);
}
.ssi::placeholder { color: var(--text-3); }
.ssi:hover { border-color: #b2c6dc; box-shadow: 0 10px 24px rgba(18,59,104,.06); }
.ssi:focus { outline: none; border-color: var(--primary-3); box-shadow: 0 0 0 4px rgba(74,143,216,.13), 0 12px 26px rgba(18,59,104,.08); }
.ssa, .ssc {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 17px;
    height: 17px;
    fill: var(--text-3);
    cursor: pointer;
    transition: all .2s ease;
}
.ssa { right: 14px; }
.ssc { right: 38px; display: none; }
.ss.has-val .ssc { display: block; }
.ss.open .ssa { transform: translateY(-50%) rotate(180deg); }
.ssd {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    right: 0;
    background: #fff;
    border: 1px solid rgba(181,198,218,.75);
    border-radius: 18px;
    box-shadow: 0 24px 48px rgba(13,46,82,.16);
    overflow: hidden;
    z-index: 9999;
    display: none;
}
.ss.open .ssd { display: block; }
.sds { padding: 12px 14px 8px; border-bottom: 1px solid var(--line); }
.sds input {
    width: 100%;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--line-strong);
    border-radius: 10px;
    font-size: 13px;
    outline: none;
    background: var(--panel-soft);
}
.sds input:focus { border-color: var(--primary-3); }
.sdo { max-height: 220px; overflow-y: auto; padding: 8px 6px; }
.sdo .opt {
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    cursor: pointer;
    transition: background .15s;
}
.sdo .opt:hover { background: var(--primary-soft); }
.sdo .opt.sel { background: var(--primary-soft); color: var(--primary); font-weight: 700; }
.sde { display: none; padding: 18px; text-align: center; color: var(--text-3); font-size: 13px; }

/* ==================== 按钮 ==================== */
.btn {
    position: relative;
    height: 48px;
    padding: 0 22px;
    border-radius: 16px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    transition: all .22s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    text-decoration: none;
    white-space: nowrap;
    letter-spacing: .2px;
    overflow: hidden;
}
.btn::before {
    content: "";
    position: absolute;
    inset: 1px 1px auto 1px;
    height: 46%;
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,0));
    pointer-events: none;
}
.btn > * { position: relative; z-index: 1; }
.btn:hover { transform: translateY(-2px); }
.btn-p {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
    color: #fff;
    box-shadow: 0 14px 26px rgba(18,59,104,.20);
}
.btn-p:hover { background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary) 100%); box-shadow: 0 18px 30px rgba(18,59,104,.24); }
.btn-o {
    background: rgba(255,255,255,.94);
    color: var(--text-2);
    border-color: var(--line-strong);
    box-shadow: var(--shadow-xs);
}
.btn-o:hover { color: var(--primary); border-color: #b8cbe0; background: #fff; }

/* ==================== 同步按钮 ==================== */
.sync-btn {
    position: relative;
    min-width: 178px;
    overflow: hidden;
    border: none !important;
    background: linear-gradient(135deg, #73859b 0%, #5f738c 100%) !important;
    color: #fff !important;
    box-shadow: 0 16px 30px rgba(95,115,140,.26);
    transition: all .3s ease;
}
.sync-btn::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -40%;
    width: 36%;
    background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.24), rgba(255,255,255,0));
    transform: skewX(-20deg);
    transition: left .55s ease;
}
.sync-btn:hover:not(:disabled)::after { left: 118%; }
.sync-btn .sync-btn-fill {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: linear-gradient(90deg, rgba(255,255,255,.3), rgba(255,255,255,.5));
    transition: width 0.15s ease;
    border-right: 2px solid rgba(255,255,255,.6);
    box-shadow: 0 0 10px rgba(255,255,255,.3);
}
.sync-btn .sync-btn-label { position: relative; z-index: 1; font-size: 15px; font-weight: 700; }
.sync-btn:hover:not(:disabled) { background: linear-gradient(135deg, #607388 0%, #495b70 100%) !important; }
.sync-btn:disabled { opacity: .85; cursor: not-allowed; }
.sync-btn.sync-running { background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%) !important; box-shadow: 0 16px 30px rgba(37,99,235,.26); }
.sync-btn.sync-success { background: linear-gradient(135deg, #16a34a 0%, #15803d 100%) !important; box-shadow: 0 16px 30px rgba(22,163,74,.26); }

/* ==================== 工序标签栏 ==================== */
.pt-bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 24px; }
.pt { display: flex; flex-wrap: wrap; gap: 12px; flex: 1 1 auto; }
.pt a {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 42px;
    padding: 0 18px;
    background: rgba(255,255,255,.92);
    border: 1px solid rgba(184,203,224,.88);
    border-radius: 999px;
    color: var(--text-2);
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: all .2s ease;
    box-shadow: var(--shadow-xs);
    overflow: hidden;
}
.pt a::before {
    content: "";
    position: absolute;
    inset: 1px 1px auto 1px;
    height: 52%;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(255,255,255,.3), rgba(255,255,255,0));
    pointer-events: none;
}
.pt a:hover { border-color: #abc4df; color: var(--primary); transform: translateY(-2px); }
.pt a.act {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 14px 26px rgba(18,59,104,.22);
}
.pt .cnt {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    padding: 0 8px;
    border-radius: 999px;
    background: #eef4fb;
    color: var(--text);
    font-size: 12px;
    font-weight: 800;
}
.pt a.act .cnt { background: rgba(255,255,255,.16); color: #fff; }
.pt-extra { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }

/* ==================== 负责人进度卡片 ==================== */
.ps {
    position: relative;
    border-radius: var(--radius-lg);
    padding: 28px 28px 30px;
    margin-bottom: 24px;
    overflow: hidden;
}
.ps::after {
    content: "";
    position: absolute;
    right: -80px;
    top: -70px;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(74,143,216,.14), rgba(74,143,216,0) 68%);
    pointer-events: none;
}
.pst { position: relative; display: flex; align-items: center; gap: 8px; margin-bottom: 24px; font-size: 22px; font-weight: 800; color: var(--primary); letter-spacing: .3px; }
.psb { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 22px; }
.pi {
    position: relative;
    padding: 24px 24px 22px;
    border: 2px solid rgba(207,220,235,.84);
    border-radius: 26px;
    background: #fff;
    box-shadow: 0 4px 12px rgba(18,59,104,.04);
    cursor: pointer;
    transition: all .25s ease;
}
.pi:hover { border-color: var(--primary-3); box-shadow: var(--shadow-sm); transform: translateY(-3px); }
.pi.active { border-color: var(--primary-3); background: var(--primary-soft); }
.pi-name { font-size: 18px; font-weight: 800; color: var(--text); margin-bottom: 14px; }
.pi-nums { display: flex; gap: 16px; font-size: 13px; color: var(--text-2); margin-bottom: 14px; }
.pi-num { font-weight: 800; color: var(--primary); }
.pi-num.danger { color: var(--danger); }
.pi-num.clickable { cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.pi-num.clickable:hover { opacity: .7; }
.pi-num.clickable.active { background: var(--primary); color: #fff; padding: 2px 8px; border-radius: 6px; text-decoration: none; }
.pb { height: 8px; border-radius: 999px; background: #e8eef5; overflow: hidden; }
.pf { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--primary-3), var(--primary-2)); transition: width .8s cubic-bezier(.4,0,.2,1); width: 0; }
.pi-pct { margin-top: 8px; text-align: right; font-size: 12px; font-weight: 700; color: var(--text-3); }

/* ==================== 数据表格 ==================== */
.ts {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    max-width: 100%;
}
.ts::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    background: rgba(255,255,255,.75);
    z-index: 2;
    pointer-events: none;
}
.table-wrap { overflow-x: auto; overflow-y: hidden; max-width: 100%; width: 100%; }
.main-table-box { overflow: hidden; box-shadow: 0 18px 40px rgba(18,59,104,.08); max-width: 100%; width: 100%; }
.main-table-wrap { overflow-x: auto; overflow-y: hidden; max-width: 100%; width: 100%; }
.main-table-fixed-head { position: fixed; top: 0; left: 0; z-index: 1200; display: none; pointer-events: none; }
.main-table-fixed-head.show { display: block; }
.main-table-fixed-head .table-wrap { overflow: hidden; }
.main-table-fixed-head table { width: 100%; min-width: inherit; table-layout: fixed; }
.main-table-fixed-head thead th { box-shadow: none; white-space: nowrap; }

table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
thead th {
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 16px 14px;
    background: linear-gradient(180deg, #f0f5fb 0%, #e8eff8 100%);
    color: var(--text-2);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .5px;
    text-transform: uppercase;
    border-bottom: 2px solid var(--line-strong);
    white-space: nowrap;
}
tbody td {
    padding: 14px 14px;
    border-bottom: 1px solid rgba(215,226,238,.5);
    vertical-align: middle;
    transition: background .15s;
}
tbody tr:hover td { background: rgba(234,244,255,.5); }
.tl { text-align: left; }
.tr { text-align: right; }
.tc { text-align: center; }
.em { text-align: center; padding: 60px 20px !important; color: var(--text-3); font-size: 15px; }
.sh { color: var(--danger); font-weight: 700; }
.ok { color: var(--success); font-weight: 700; }

/* 状态标签 */
.bd { display: inline-flex; align-items: center; padding: 4px 12px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.bd-b { background: var(--info-soft); color: var(--info); }
.bd-g { background: var(--success-soft); color: var(--success); }
.bd-o { background: var(--warning-soft); color: var(--warning); }

/* 送货链接 */
.ship-link { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; font-weight: 700; cursor: pointer; }
.ship-link:hover { opacity: .7; }

/* ==================== 注塑模式表格 ==================== */
.inj-table .inj-merge { font-weight: 700; background: rgba(234,244,255,.3); }
.inj-table .inj-mold { color: var(--primary-2); font-weight: 700; }
.inj-group-start td { border-top: 2px solid var(--line-strong); }
.inj-group-odd td { background: rgba(255,255,255,.6); }
.inj-group-even td { background: rgba(240,248,255,.4); }

/* ==================== 弹窗 ==================== */
.dm-mask {
    position: fixed;
    inset: 0;
    background: radial-gradient(circle at top, rgba(58,119,184,.14), transparent 24%), rgba(12,26,44,.42);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 24px;
}
.dm-mask.show { display: flex; }
.dm-panel {
    position: relative;
    width: min(1280px, 98vw);
    height: 88vh;
    background: linear-gradient(180deg, rgba(255,255,255,.97) 0%, rgba(248,251,255,.95) 100%);
    border-radius: 30px;
    border: 1px solid rgba(255,255,255,.78);
    box-shadow: 0 28px 80px rgba(10,37,64,.24);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.dm-panel::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: linear-gradient(90deg, var(--primary) 0%, var(--primary-3) 100%); }
.dm-panel-wide { width: min(1400px, 98vw); }
.dm-head {
    position: relative;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 26px 28px 22px;
    background: linear-gradient(180deg, rgba(255,255,255,.99) 0%, rgba(243,248,255,.96) 100%);
    border-bottom: 1px solid #e3ebf5;
    flex-shrink: 0;
}
.dm-head-main { position: relative; z-index: 1; }
.dm-head-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 12px;
    border-radius: 999px;
    background: rgba(31,78,121,.08);
    color: var(--primary);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .9px;
    text-transform: uppercase;
}
.dm-head-kicker::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: linear-gradient(180deg, #6fb1ff 0%, #2f6fb6 100%);
    box-shadow: 0 0 0 4px rgba(80,145,216,.12);
}
.dm-title { font-size: 24px; font-weight: 800; color: var(--text); margin-top: 10px; }
.dm-sub { font-size: 13px; color: var(--text-3); margin-top: 6px; }
.dm-head-side { display: flex; align-items: center; gap: 10px; }
.dm-head-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.9);
    border: 1px solid var(--line-strong);
    color: var(--text-2);
    font-size: 11px;
    font-weight: 700;
}
.dm-close {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(0,0,0,.05);
    color: var(--text-2);
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
}
.dm-close:hover { background: rgba(0,0,0,.1); color: var(--danger); }
.dm-body { flex: 1; overflow-y: auto; padding: 24px 28px; }
.dm-summary { display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 24px; }
.dm-stat { padding: 14px 20px; background: var(--panel-soft); border: 1px solid var(--line); border-radius: 16px; }
.dm-stat-label { font-size: 11px; color: var(--text-3); font-weight: 700; margin-bottom: 4px; }
.dm-stat-value { font-size: 18px; font-weight: 800; color: var(--text); }
.dm-stat-value.danger { color: var(--danger); }
.dm-loading, .dm-empty { text-align: center; padding: 40px 20px; color: var(--text-3); font-size: 14px; }
.dm-body .table-wrap { overflow-x: auto; }
.dm-body table { width: 100%; min-width: 100%; table-layout: fixed; border-collapse: collapse; }
.dm-body thead th, .dm-body tbody td { padding: 12px 12px; vertical-align: middle; word-break: break-word; }
.dm-body thead th { text-align: left; }
.dm-body thead th.tr { text-align: right; }
.dm-body thead th.tc { text-align: center; }

/* 弹窗图片缩略图 */
.dm-inline-thumbs { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; }
.dm-thumb {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
    border: 1px solid #dbe5ef;
    background: #eef3f8;
    cursor: pointer;
    transition: all .2s ease;
}
.dm-thumb:hover { transform: scale(1.08); border-color: #9fb7d1; box-shadow: 0 10px 20px rgba(31,78,121,.16); }
.dm-no-img { color: var(--text-3); font-size: 12px; }

/* ==================== 全部送货弹窗筛选 ==================== */
.ad-filters-head { margin-bottom: 16px; }
.ad-filters-title { font-size: 16px; font-weight: 800; color: var(--text); }
.ad-filters-desc { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.ad-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    align-items: end;
    margin-bottom: 20px;
}
.ad-filter-item { display: flex; flex-direction: column; gap: 6px; }
.ad-filter-item label { font-size: 11px; font-weight: 700; color: var(--text-2); }
.ad-filter-actions { display: flex; align-items: center; gap: 10px; grid-column: 1 / -1; }
.ad-count { font-size: 13px; color: var(--text-3); font-weight: 600; }
.ad-table-container { overflow-x: auto; margin-bottom: 16px; }
.ad-load-more-section { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 16px 0; }
.ad-more-btn { height: 40px; padding: 0 24px; font-size: 13px; }
.ad-status-tip { font-size: 13px; color: var(--text-3); }
.dept-summary-row td { font-weight: 700; }

/* ==================== 图片预览 ==================== */
.img-preview-mask {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.88);
    backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 5000;
}
.img-preview-mask.show { display: flex; }
.img-preview-panel { position: relative; max-width: 92vw; max-height: 92vh; display: flex; align-items: center; justify-content: center; }
.img-preview-panel img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 12px;
    transition: transform .2s ease;
}
.img-preview-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all .2s;
}
.img-preview-nav:hover { background: rgba(255,255,255,.3); }
.img-preview-nav.prev { left: -60px; }
.img-preview-nav.next { right: -60px; }
.img-preview-close {
    position: absolute;
    top: -50px;
    right: 0;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.img-preview-close:hover { background: rgba(255,255,255,.3); }
.img-preview-rotate {
    position: absolute;
    top: -50px;
    right: 50px;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.img-preview-rotate:hover { background: rgba(255,255,255,.3); }
.img-preview-index { position: absolute; bottom: -40px; left: 50%; transform: translateX(-50%); color: rgba(255,255,255,.7); font-size: 13px; }

/* ==================== Toast ==================== */
.toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    padding: 14px 28px;
    background: rgba(17,24,39,.9);
    color: #fff;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    opacity: 0;
    transition: all .3s ease;
    z-index: 9999;
    pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ==================== 移动端筛选抽屉 ==================== */
.mobile-filter-overlay, .mobile-filter-toggle, .mobile-filter-drawer-head, .mobile-filter-close { display: none; }

/* ==================== 响应式 ==================== */
@media (max-width: 1200px) {
    .container { padding: 22px 18px 32px; }
    .header { padding: 24px 24px; }
    .filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .psb { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
    .ad-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ad-filter-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

@media (max-width: 768px) {
    /* ===== 整体布局 ===== */
    .container { padding: 10px 8px 20px; }

    /* ===== 头部 ===== */
    .header {
        flex-direction: column; align-items: flex-start;
        padding: 16px 14px; border-radius: 16px;
        margin-bottom: 14px; gap: 8px;
    }
    .header h1 { font-size: 20px; line-height: 1.3; }
    .header-meta { font-size: 12px; margin-top: 4px; }
    .header-side { width: 100%; justify-content: space-between; margin-top: 4px; }
    .header-chip { min-height: 30px; padding: 0 10px; }
    .header-chip strong { font-size: 10px; }
    .header-dot { width: 5px; height: 5px; }

    /* ===== 筛选抽屉 ===== */
    .mobile-filter-overlay {
        display: none; position: fixed; inset: 0;
        background: rgba(8,18,32,.42);
        backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
        z-index: 3600;
    }
    .mobile-filter-overlay.show { display: block; }
    .mobile-filter-toggle {
        display: flex !important;
        align-items: center; justify-content: center;
        width: 100%; height: 48px;
        border: none; border-radius: 14px;
        background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
        color: #fff; font-size: 15px; font-weight: 800;
        box-shadow: 0 12px 22px rgba(18,59,104,.18);
        margin-bottom: 12px;
    }
    .mobile-filter-toggle .mf-arrow { margin-left: 8px; transition: transform .2s ease; }
    .mobile-filter-toggle.open .mf-arrow { transform: rotate(90deg); }

    .filter-section { padding: 14px 12px 12px; margin-bottom: 14px; border-radius: 14px; overflow: hidden; }
    .filter-section form, .filter-row, .filter-item, .ss { width: 100%; max-width: 100%; min-width: 0; }
    .filter-section.mobile-filter-drawer {
        position: fixed; top: 0; right: 0; bottom: 0;
        width: min(88vw, 360px); height: 100vh;
        margin: 0; padding: 18px 16px 20px;
        border-radius: 24px 0 0 24px;
        overflow: auto; background: rgba(255,255,255,.98);
        box-shadow: -18px 0 40px rgba(10,37,64,.22);
        z-index: 3700;
        transform: translateX(100%); transition: transform .3s ease;
    }
    .filter-section.mobile-filter-drawer.show { transform: translateX(0); }
    .mobile-filter-drawer-head {
        display: flex !important;
        align-items: center; justify-content: space-between;
        margin-bottom: 18px; padding-bottom: 14px;
        border-bottom: 1px solid var(--line);
    }
    .mobile-filter-drawer-title { font-size: 17px; font-weight: 800; color: var(--text); }
    .mobile-filter-close {
        display: flex !important;
        width: 36px; height: 36px;
        border: none; border-radius: 50%;
        background: rgba(0,0,0,.06);
        color: var(--text-2); font-size: 20px;
        align-items: center; justify-content: center; cursor: pointer;
    }
    .filter-row { grid-template-columns: 1fr; gap: 14px; }
    .filter-item.filter-actions { min-width: 0; flex-wrap: wrap; justify-content: stretch; }
    .filter-item.filter-actions .btn { flex: 1; min-width: 80px; }

    /* ===== 输入框/按钮 — 加大触控区域 ===== */
    .ssi { height: 46px; font-size: 14px; border-radius: 12px; padding: 0 14px; }
    .btn { height: 46px; padding: 0 18px; font-size: 14px; border-radius: 12px; min-width: 70px; }

    /* ===== 负责人进度卡片 ===== */
    .ps { padding: 14px 12px 16px; border-radius: 16px; margin-bottom: 14px; max-height: 220px; overflow-y: auto; -webkit-overflow-scrolling: touch; position: relative; }
    .pst { font-size: 16px; margin-bottom: 14px; position: sticky; top: 0; background: var(--panel-strong); z-index: 2; padding-bottom: 8px; }
    .psb { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .pi { padding: 12px 10px; border-radius: 14px; }
    .pi-name { font-size: 13px; margin-bottom: 6px; }
    .pi-nums { gap: 4px; font-size: 11px; }
    .pi-num { font-size: 12px; }
    .pi-pct { font-size: 12px; }

    /* ===== 工艺标签栏 ===== */
    .pt-bar { flex-direction: column; align-items: stretch; gap: 10px; }
    .pt { gap: 6px; flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
    .pt::-webkit-scrollbar { display: none; }
    .pt a { min-height: 38px; padding: 0 14px; font-size: 13px; white-space: nowrap; flex-shrink: 0; }
    .pt-extra { display: none; }

    /* ===== 主表格 — 核心优化 ===== */
    .ts { border-radius: 14px; }

    /* 设置最小宽度让表格可横滑，内容不被压缩 */
    .table-wrap, .main-table-wrap {
        -webkit-overflow-scrolling: touch;
        overflow-x: auto;
    }
    table { font-size: 13px; min-width: 580px; }
    thead th { padding: 10px 8px; font-size: 11px; letter-spacing: 0; }
    tbody td { padding: 10px 8px; font-size: 13px; line-height: 1.4; }
    .em { padding: 40px 16px !important; font-size: 14px; }

    /* 普通模式：隐藏"配件编码"(第4列) + "状态"(第10列) → 10列减到8列 */
    table:not(.inj-table) thead th:nth-child(4),
    table:not(.inj-table) tbody td:nth-child(4),
    table:not(.inj-table) thead th:nth-child(10),
    table:not(.inj-table) tbody td:nth-child(10) { display: none; }

    /* 注塑模式：隐藏"产品名称"(第2列) → 8列减到7列 */
    .inj-table thead th:nth-child(2),
    .inj-table tbody td:nth-child(2),
    .inj-table .inj-merge:nth-child(2) { display: none; }
    .inj-table .inj-merge { font-size: 12px; }

    .bd { padding: 3px 10px; font-size: 11px; }
    .ship-link { font-size: 13px; }

    /* ===== 弹窗 ===== */
    .dm-mask { padding: 0; }
    .dm-panel { width: 100vw; height: 100vh; border-radius: 0; }
    .dm-head { padding: 14px 14px 12px; gap: 10px; }
    .dm-body { padding: 12px 10px; }
    .dm-title { font-size: 17px; }
    .dm-sub { font-size: 12px; margin-top: 4px; }
    .dm-head-kicker { font-size: 10px; padding: 5px 10px; }
    .dm-head-chip { font-size: 10px; padding: 5px 10px; }
    .dm-close { width: 38px; height: 38px; font-size: 22px; }
    .dm-stat-label { font-size: 11px; }
    .dm-stat-value { font-size: 15px; }

    /* 弹窗内表格 — 同样可滑 */
    .dm-body .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .dm-body table { font-size: 12px; min-width: 560px; }
    .dm-body thead th { padding: 8px 6px; font-size: 10px; }
    .dm-body tbody td { padding: 8px 6px; font-size: 12px; }

    /* 全部送货明细筛选 */
    .ad-filters { grid-template-columns: 1fr; gap: 12px; }
    .ad-filters-head { margin-bottom: 10px; }
    .ad-filters-title { font-size: 15px; }
    .ad-filters-desc { font-size: 12px; }
    .ad-filter-actions { flex-wrap: wrap; }
    .ad-filter-actions .btn { flex: 1; min-width: 70px; }

    /* 图片预览 */
    .img-preview-nav.prev { left: 8px; }
    .img-preview-nav.next { right: 8px; }
    .img-preview-nav { width: 40px; height: 40px; font-size: 20px; }

    /* 同步按钮 */
    .sync-btn { font-size: 13px; min-height: 42px; }
}

/* ==================== 打印样式 ==================== */
@media print {
    body { background: none !important; background-color: #fff !important; }
    .container { max-width: 100% !important; padding: 0 !important; }
    .header, .filter-section, .ps, .pt-bar, .main-table-fixed-head, #toast, .dm-mask, .img-preview-mask { display: none !important; }
    .main-table-box { box-shadow: none !important; border: none !important; border-radius: 0 !important; background: transparent !important; }
    .ts { background: transparent !important; border: none !important; box-shadow: none !important; border-radius: 0 !important; }
    .ts::before { display: none !important; }
    .table-wrap { overflow: visible !important; }
    .main-table-wrap { overflow: visible !important; }
    table { min-width: 0 !important; width: 100% !important; border-collapse: collapse !important; table-layout: fixed !important; }
    thead { display: table-header-group; }
    tbody { display: table-row-group; }
    tr { page-break-inside: avoid; }
    thead th { background: #f5f5f5 !important; color: #000 !important; border: 1px solid #000 !important; padding: 8px 6px !important; font-size: 11pt !important; }
    tbody td { background: #fff !important; color: #000 !important; border: 1px solid #000 !important; padding: 6px 6px !important; font-size: 10pt !important; }
}
