/* ============ 戴杰逻辑图落地：功能角标 / 附件 / 仓位卡片 / 三色预警 / 工序网格 / 扫码报工 ============ */
.sub-item { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.sub-badge { background: #EF4444; color: #fff; border-radius: 9px; min-width: 18px; height: 18px; line-height: 18px; padding: 0 5px; font-size: 11px; text-align: center; font-weight: 600; }

.files-box { border: 1px dashed #CBD5E1; border-radius: 6px; padding: 8px 10px; background: #FAFBFC; }
.file-row { display: flex; align-items: center; gap: 6px; padding: 3px 0; font-size: 13px; }
.file-row .detail-del { margin-left: auto; }
.fsz11 { font-size: 11px; }
.mask-txt { color: #94A3B8; letter-spacing: 1px; }

.q-panel { background: #fff; border: 1px solid #E8EEF5; border-radius: 6px; padding: 12px 12px 10px; margin-bottom: 12px; }
.q-grid { display: grid; grid-template-columns: repeat(4, minmax(180px, 1fr)); gap: 10px 18px; }
.q-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
.q-cell > label { flex: 0 0 72px; text-align: right; color: #64748B; font-size: 13px; }
.q-combo { position: relative; flex: 1; min-width: 0; }
.q-combo input { width: 100%; height: 32px; border: 1px solid #DCDFE6; border-radius: 4px; padding: 0 22px 0 8px; font-size: 12px; color: #334155; background: #fff; }
.q-date input { padding-right: 6px; }
.q-date input::-webkit-calendar-picker-indicator { cursor: pointer; }
.list-tools { display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; margin: 0 0 8px; }
.list-tools .lt-count { margin-right: auto; font-size: 12px; color: #64748B; }
.data-table .col-check { width: 36px; text-align: center; }
.data-table .col-check input { width: 14px; height: 14px; cursor: pointer; }
.btn-danger { background: #fff; border-color: #FECACA; color: #DC2626; }
.btn-danger:hover { background: #FEF2F2; color: #B91C1C; }
.q-combo input:focus { border-color: #3B82F6; outline: none; }
.q-caret { position: absolute; right: 8px; top: 7px; color: #94A3B8; cursor: pointer; font-size: 12px; }
.q-drop { display: none; position: absolute; z-index: 40; left: 0; right: 0; top: 34px; background: #fff; border: 1px solid #E5E7EB; border-radius: 4px; max-height: 220px; overflow: auto; box-shadow: 0 8px 18px rgba(15, 23, 42, .12); }
.q-opt { padding: 6px 8px; font-size: 12px; cursor: pointer; }
.q-opt:hover { background: #EFF6FF; }
.q-muted { color: #94A3B8; cursor: default; }
.q-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 10px; }
@media (max-width: 1200px) { .q-grid { grid-template-columns: repeat(2, minmax(160px, 1fr)); } }
.dj-filter { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; margin-bottom: 12px; }
.dj-filter input, .dj-filter select { height: 32px; border: 1px solid #DCDFE6; border-radius: 4px; padding: 0 8px; font-size: 13px; }
.dj-filter input[type=text] { width: 150px; }
.dj-filter label { font-size: 12px; color: #64748B; }

.row-late td { background: #FEF2F2 !important; }
.row-warn td { background: #FFFBEB !important; }
.text-orange { color: #C2410C; }
.dj-wide { overflow-x: auto; }
.dj-wide td, .dj-wide th { white-space: nowrap; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.dot-green { background: #10B981; } .dot-yellow { background: #F59E0B; } .dot-red { background: #EF4444; }
.reason-tag { display: inline-block; font-size: 11px; padding: 1px 6px; border-radius: 3px; background: #FEE2E2; color: #B91C1C; margin-left: 4px; }

.dj-tabs { display: flex; gap: 4px; border-bottom: 1px solid #E5E7EB; margin-bottom: 14px; flex-wrap: wrap; }
.dj-tab { padding: 8px 16px; cursor: pointer; font-size: 13px; color: #475569; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.dj-tab.on { color: #1D4ED8; border-color: #1D4ED8; font-weight: 600; }
.dj-tab .sub-badge { margin-left: 6px; display: inline-block; }

.modal.modal-xl { width: min(1680px, 98vw); max-width: 98vw; }
.lookup-mask { z-index: 1400; }
.modal-xl .modal-body { overflow-x: hidden; }
.detail-scroll { overflow-x: auto; overflow-y: hidden; width: 100%; max-width: 100%; margin-top: 4px; padding-bottom: 6px; }
.detail-scroll > .detail-table { width: max-content; min-width: 100%; }
.lookup-btn { background: #fff; border: 1px solid #E4E7ED; color: #1E293B; }
.lookup-btn:hover { border-color: #2563EB; color: #1D4ED8; }
.modal-xl .detail-table input, .modal-xl .detail-table select { min-width: 0; }
.pe-tbl select, .modal-xl .pe-tbl select { width: auto; min-width: 132px; max-width: none; }
.pe-tbl td:nth-child(2) select, .modal-xl .pe-tbl td:nth-child(2) select { min-width: 168px; }
.data-table td .ops, .data-table td .ops .link-btn { display: inline-flex; flex-direction: row; white-space: nowrap; }
.data-table td { padding-top: 4px; padding-bottom: 4px; line-height: 1.35; }
.data-table td { padding-top: 4px; padding-bottom: 4px; line-height: 1.35; }
.pe-tbl td:nth-child(3) select, .pe-tbl td:nth-child(4) select,
.modal-xl .pe-tbl td:nth-child(3) select, .modal-xl .pe-tbl td:nth-child(4) select { min-width: 128px; }

/* 仓位展示图 */
.bin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.bin-card { border: 1.5px solid #CBD5E1; border-radius: 8px; background: #fff; overflow: hidden; cursor: pointer; transition: box-shadow .15s, transform .15s; }
.bin-card:hover { box-shadow: 0 6px 18px rgba(15, 23, 42, .12); transform: translateY(-1px); }
.bin-card.empty { opacity: .55; }
.bin-head { display: flex; justify-content: space-between; align-items: center; padding: 7px 10px; background: #1E3A8A; color: #fff; font-weight: 700; font-size: 14px; }
.bin-head small { font-weight: 400; opacity: .85; font-size: 11px; }
.bin-card.z-raw .bin-head { background: #0F766E; } .bin-card.z-aux .bin-head { background: #64748B; }
.bin-card.z-semi .bin-head { background: #7C3AED; } .bin-card.z-fg .bin-head { background: #1D4ED8; }
.bin-card.z-bad .bin-head { background: #B91C1C; } .bin-card.z-ret .bin-head { background: #C2410C; }
.bin-card table { width: 100%; border-collapse: collapse; font-size: 12px; }
.bin-card td { border-top: 1px solid #EEF2F7; padding: 5px 8px; }
.bin-card td:first-child { color: #64748B; width: 46px; }
.bin-card .bin-qty { font-weight: 700; color: #0F172A; text-align: right; }
.bin-hd { display: flex; justify-content: space-between; align-items: center; padding: 7px 10px; background: #1E3A8A; color: #fff; font-size: 14px; }
.bin-card.z-raw .bin-hd { background: #0F766E; } .bin-card.z-aux .bin-hd { background: #64748B; }
.bin-card.z-semi .bin-hd { background: #7C3AED; } .bin-card.z-fg .bin-hd { background: #1D4ED8; }
.bin-card.z-bad .bin-hd { background: #B91C1C; } .bin-card.z-ret .bin-hd { background: #C2410C; }
.bin-body { padding: 6px 10px; min-height: 64px; }
.bin-line { display: flex; justify-content: space-between; gap: 6px; font-size: 12px; padding: 3px 0; border-bottom: 1px dashed #EEF2F7; }
.bin-line span { color: #475569; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bin-line.on { background: #FEF9C3; }
.bin-line b { white-space: nowrap; }
.bin-ft { font-size: 11px; color: #64748B; padding: 5px 10px; background: #F8FAFC; border-top: 1px solid #EEF2F7; }

/* 工单清单进度：工序网格（如逻辑图右侧示意） */
.sg-wrap { overflow-x: auto; }
.sg-table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 900px; }
.sg-table th { background: #F1F5F9; font-size: 12px; color: #475569; padding: 8px 6px; text-align: center; position: sticky; top: 0; }
.sg-table td { border-bottom: 1px solid #EEF2F7; padding: 8px 6px; text-align: center; font-size: 12px; vertical-align: middle; }
.sg-table td.l { text-align: left; }
.sg-cell { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; min-width: 62px; }
.sg-cell .nm { font-size: 11px; color: #64748B; white-space: nowrap; }
.sg-cell .qty { font-size: 10.5px; color: #94A3B8; }
.sg-none { color: #CBD5E1; }
.sg-ring { position: relative; width: 40px; height: 40px; }
.sg-ring svg { width: 40px; height: 40px; transform: rotate(-90deg); }
.sg-ring b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 10.5px; color: #1E293B; }
.sg-ring .ok { color: #10B981; font-size: 18px; }
.sg-ring .dotn { position: absolute; top: -3px; right: -3px; background: #EF4444; color: #fff; border-radius: 8px; font-size: 9px; min-width: 14px; height: 14px; line-height: 14px; padding: 0 3px; }

/* 看板 */
.kb-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 14px; }
.kb-box { background: #fff; border-radius: 8px; box-shadow: var(--shadow); padding: 12px 14px; border-left: 4px solid #3B82F6; }
.kb-box .t { font-size: 12px; color: #64748B; }
.kb-box .v { font-size: 22px; font-weight: 800; color: #0F172A; margin-top: 4px; }
.kb-box .s { font-size: 11.5px; color: #64748B; margin-top: 2px; }
.kb-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 1100px) { .kb-grid2 { grid-template-columns: 1fr; } }
.line-chart svg { width: 100%; height: 190px; display: block; }
.mc-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; }
.mc { border-radius: 6px; padding: 6px 4px; text-align: center; font-size: 11px; color: #fff; }
.mc b { display: block; font-size: 12px; }
.mc.run { background: #10B981; } .mc.idle { background: #94A3B8; } .mc.fix { background: #EF4444; }

/* 手机扫码报工 */
body.m-mode .sidebar, body.m-mode .topbar { display: none; }
body.m-mode .page-container { padding: 0; background: #F1F5F9; }
.m-page { max-width: 520px; margin: 0 auto; min-height: 100vh; background: #F1F5F9; }
.m-head { background: linear-gradient(120deg, #1E3A8A, #2563EB); color: #fff; padding: 16px 18px 20px; }
.m-head h2 { font-size: 18px; margin: 0 0 4px; }
.m-head p { margin: 0; font-size: 12.5px; opacity: .9; }
.m-card { background: #fff; border-radius: 10px; margin: 12px; padding: 14px; box-shadow: 0 1px 4px rgba(0, 0, 0, .06); }
.m-card label { display: block; font-size: 13px; color: #475569; margin: 10px 0 4px; }
.m-card input, .m-card select { width: 100%; height: 42px; border: 1px solid #CBD5E1; border-radius: 8px; padding: 0 10px; font-size: 16px; box-sizing: border-box; }
.m-btn { display: block; width: calc(100% - 24px); margin: 14px 12px 30px; height: 48px; border: 0; border-radius: 10px; background: #2563EB; color: #fff; font-size: 17px; font-weight: 700; }
.m-kv { display: flex; justify-content: space-between; font-size: 13.5px; padding: 5px 0; border-bottom: 1px dashed #E2E8F0; }
.m-kv span:first-child { color: #64748B; }

/* 操作手册 */
.manual-frame { width: 100%; height: calc(100vh - 150px); border: 0; background: #fff; border-radius: 8px; box-shadow: var(--shadow); }

/* 页面权限标识 / 待办中心 */
.perm-chips{display:inline-flex;gap:4px;margin-left:12px;vertical-align:middle;flex-wrap:wrap}
.perm-chip{font-size:11px;padding:1px 7px;border-radius:10px;line-height:18px;white-space:nowrap}
.perm-chip.on{background:#ECFDF5;color:#047857;border:1px solid #A7F3D0}
.perm-chip.off{background:#F8FAFC;color:#94A3B8;border:1px solid #E2E8F0}
.todo-row{display:flex;align-items:center;gap:4px;padding:10px 12px;border:1px solid #EEF2F7;border-radius:8px;margin-bottom:8px;cursor:pointer;font-size:13px}
.todo-row:hover{background:#F8FAFF;border-color:#BFDBFE}
.todo-row .sub-badge{background:#EF4444;color:#fff}
.m-scan video{width:100%;border-radius:10px;background:#000;max-height:320px;object-fit:cover}
.m-steps{display:flex;flex-wrap:wrap;gap:6px;margin:6px 0}
.m-steps span{padding:6px 12px;border-radius:16px;background:#EFF6FF;color:#1D4ED8;font-size:14px;cursor:pointer;border:1px solid #BFDBFE}
.m-steps span.on{background:#2563EB;color:#fff}
.file-drop{display:block;border:1.5px dashed #93C5FD;border-radius:8px;padding:12px;text-align:center;color:#2563EB;font-size:12px;cursor:pointer;background:#F8FAFF}
.file-drop.on{background:#DBEAFE;border-color:#2563EB}
.form-item.combo-on { position: relative; z-index: 8; }
.form-item .q-combo input { padding-right: 26px; }
.form-item .q-caret { top: 8px; }
.cust-pick{position:relative}
.cust-drop{display:none;position:absolute;z-index:40;left:0;right:0;top:34px;min-width:100%;max-height:260px;overflow:auto;background:#fff;border:1px solid #E2E8F0;border-radius:6px;box-shadow:0 8px 24px rgba(15,23,42,.12)}
.cust-opt{padding:7px 10px;font-size:13px;cursor:pointer}
.cust-opt:hover{background:#EFF6FF}
.cust-head, .cust-row { display:grid; grid-template-columns:88px 1.4fr 1fr 88px; gap:8px; align-items:center; }
.cust-head { cursor:default; color:#64748B; font-size:12px; background:#F8FAFC; }
.cust-head:hover { background:#F8FAFC; }
