/* Extracted from index.html head for browser caching. */
*{box-sizing:border-box;margin:0;padding:0}
body{padding:30px;font-family:"Microsoft Yahei";background:#f5f7fa}
.box{background:#fff;padding:24px;border-radius:8px;box-shadow:0 2px 12px #eee;max-width:1900px;margin:0 auto;margin-bottom:20px}
h1{color:#333;margin-bottom:20px;font-size:22px}
.login-bar{display:flex;align-items:center;gap:12px;margin-bottom:20px;padding:16px;background:#f8fafc;border-radius:8px;border:1px solid #e2e8f0;flex-wrap:wrap}
.login-bar input{padding:8px 12px;border:1px solid #ccc;border-radius:4px;font-size:14px;outline:none;width:160px}
.login-bar input:focus{border-color:#2563eb}
.login-bar button{padding:8px 20px;border:none;border-radius:4px;cursor:pointer;font-size:14px;color:#fff}
.btn-login{background:#2563eb}.btn-logout{background:#64748b}.btn-user-mgmt{background:#7c3aed}.btn-change-pwd{background:#0d9488}
.user-info{font-size:14px;color:#333;font-weight:600}
.perm-tags{display:flex;gap:4px;margin-left:8px}
.perm-tag{font-size:11px;padding:2px 8px;border-radius:10px;color:#fff;font-weight:normal}
.perm-tag.edit{background:#2563eb}.perm-tag.delete{background:#ef4444}.perm-tag.adjust{background:#f59e0b}.perm-tag.input{background:#10b981}
.search-wrap{position:relative;display:inline-block;z-index:10020}
.search-input{width:320px;padding:10px 14px;font-size:15px;border:1px solid #ccc;border-radius:4px;outline:none}
.search-input:focus{border-color:#2563eb}
.search-dropdown{position:absolute;top:calc(100% + 5px);left:0;right:0;background:#fff;border:1px solid #94a3b8;border-radius:6px;max-height:280px;overflow-y:auto;z-index:10021;display:none;box-shadow:0 10px 24px rgba(15,23,42,.22);isolation:isolate}
.search-dropdown::before{content:"";position:absolute;inset:0;background:#fff;border-radius:inherit;z-index:-1}
.search-item{padding:10px 14px;cursor:pointer;border-bottom:1px solid #f3f4f6;font-size:14px;color:#333}
.search-item:hover{background:#eff6ff;color:#2563eb}
.search-item:last-child{border-bottom:0}
.search-empty{padding:12px 14px;color:#9ca3af;font-size:14px;text-align:center}
.form-row{margin:16px 0;display:flex;gap:20px;align-items:center;flex-wrap:wrap}
.form-item{display:flex;align-items:center;gap:8px}
.form-item label{color:#333;min-width:80px}
.form-item input{padding:10px 14px;font-size:15px;border:1px solid #ccc;border-radius:4px;width:180px;outline:none}
.form-item input:focus{border-color:#2563eb}
.form-item input:disabled{background:#f3f4f6;color:#666;cursor:not-allowed}
.process-table{width:100%;border-collapse:collapse;margin-top:16px;font-size:14px}
.process-table th,.process-table td{border:1px solid #e5e7eb;padding:10px 12px;text-align:center}
.process-table th{background:#f3f4f6;font-weight:600}
.process-table input{width:100%;padding:6px 8px;border:1px solid #e5e7eb;border-radius:4px;text-align:center}
.process-table input:disabled{background:#f9fafb;color:#666;cursor:not-allowed}
.process-table .seq-col{width:60px}.process-table .dev-col{width:160px}.process-table .time-col{width:180px}.process-table .qty-col{width:140px}.process-table .devcount-col{width:90px}.process-table .oper-col{width:80px}
.process-table .proc-oper-col{display:none}
button{background:#2563eb;color:#fff;border:0;cursor:pointer;padding:10px 20px;border-radius:4px;font-size:15px}
button:disabled{background:#93c5fd;cursor:not-allowed}
button.primary-btn{background:#2563eb}button.primary-btn:disabled{background:#93c5fd}
button.danger-btn{background:#ef4444;padding:6px 12px;font-size:13px}button.danger-btn:disabled{background:#fca5a5}
button.load-btn{background:#0ea5e9;padding:6px 12px;font-size:13px}
button.export-btn{background:#16a34a;padding:6px 12px;font-size:13px}button.export-btn:disabled{background:#86efac}
button.import-btn{background:#f59e0b;padding:6px 12px;font-size:13px}button.import-btn:disabled{background:#fcd34d}
button.del-small-btn{background:#ef4444;color:#fff;border:none;padding:4px 10px;border-radius:4px;cursor:pointer;font-size:12px}
button.del-small-btn:disabled{background:#fca5a5;cursor:not-allowed}
button.adjust-btn{background:#f59e0b;color:#fff;border:none;padding:4px 10px;border-radius:4px;cursor:pointer;font-size:12px}
button.adjust-btn:disabled{background:#fcd34d;cursor:not-allowed}
#result{margin-top:20px;white-space:pre-wrap;background:#f8f9fa;padding:16px;border-radius:6px;min-height:200px;line-height:1.8;font-size:14px}
table{width:100%;border-collapse:collapse;margin-top:16px;font-size:14px}
th,td{border:1px solid #e5e7eb;padding:10px 12px;text-align:center}
th{
    background:#f3f4f6;
    font-weight:600;
    position: sticky;
    top: 44px;
    z-index: 99;
    border-top: none;
}
table{
    width:100%;
    border-collapse: collapse;
    border-spacing: 0;
    margin-top: 12px;
}
h2{
    font-size:18px;
    margin: 24px 0 0 0;
    color:#333;
    display:flex;
    align-items:center;
    gap:12px;
    flex-wrap:wrap;
    position: sticky;
    top: 0;
    background: #ffffff;
    z-index: 100;
    padding: 10px 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.06);
}
h3{font-size:16px;margin:20px 0 10px;color:#333}
.order-title td{background:#eff6ff;font-weight:600;text-align:left;padding-left:20px}
.order-head{display:flex;align-items:center;gap:14px;flex-wrap:wrap}
.order-head-main{display:flex;align-items:center;gap:12px;flex:1;min-width:520px}
.order-head-info{display:flex;align-items:center;gap:6px;flex-wrap:wrap;line-height:1.8}
.order-head-actions{display:flex;align-items:center;gap:6px;padding-left:12px;border-left:1px solid #cbd5e1}
.order-head-secondary-actions{display:flex;justify-content:center;flex-basis:100%;padding:2px 0 0;border-top:1px solid #e2e8f0}
.manual-complete-home-btn{background:#dc2626;color:#fff;border:0;border-radius:5px;padding:6px 18px;cursor:pointer;font-size:12px;font-weight:600;white-space:nowrap}
.manual-complete-home-btn:hover{background:#b91c1c}
.order-tool-btn{min-height:28px;padding:4px 10px!important;margin:0!important;border-radius:5px!important;font-size:12px!important;font-weight:500;white-space:nowrap}
.task-action-cell{min-width:168px;width:168px;padding:8px!important;vertical-align:middle}
.task-actions{display:grid;grid-template-columns:1fr 1fr;gap:6px;align-items:center}
.task-actions>button,.task-more>summary{display:flex;align-items:center;justify-content:center;min-height:30px;margin:0!important;padding:5px 8px!important;border-radius:5px!important;font-size:12px!important;line-height:1.2;white-space:nowrap}
.task-actions>button{width:100%}
.task-more{position:relative;grid-column:1/-1}
.task-more>summary{list-style:none;background:#475569;color:#fff;cursor:pointer;user-select:none}
.task-more>summary::-webkit-details-marker{display:none}
.task-more>summary::after{content:"▾";margin-left:7px;font-size:10px}
.task-more[open]>summary::after{content:"▴"}
.task-more-menu{position:absolute;right:0;top:calc(100% + 5px);z-index:120;display:grid;grid-template-columns:1fr 1fr;gap:6px;width:190px;padding:8px;background:#fff;border:1px solid #cbd5e1;border-radius:6px;box-shadow:0 8px 22px rgba(15,23,42,.2)}
.task-more-menu button{min-height:30px;margin:0!important;padding:5px 8px!important;border-radius:4px!important;font-size:12px!important;white-space:nowrap}
.task-more-menu button:disabled{opacity:.55}
.task-log-btn{background:#7c3aed!important}
.empty-tip{color:#9ca3af}.tip-text{color:#6b7280;font-size:13px;margin-top:8px}.oper-col{width:90px}
.log-table{width:100%;border-collapse:collapse;font-size:13px}
.log-table th,.log-table td{border-bottom:1px solid #e5e7eb;padding:8px 10px;text-align:left;vertical-align:top}
.log-table th{background:#f8fafc;color:#374151;font-weight:600}
.log-old{color:#dc2626;text-decoration:line-through;opacity:0.7}
.log-new{color:#059669;font-weight:600}
.log-empty{text-align:center;color:#9ca3af;padding:40px 0}
.file-upload-wrap{display:flex;gap:3px;align-items:center;flex-wrap:wrap}
.file-btn{padding:3px 6px;background:#e0f2fe;border:1px solid #0ea5e9;color:#0369a1;border-radius:3px;cursor:pointer;font-size:14px;line-height:1;transition:.2s}
.file-btn:hover{background:#0ea5e9;color:#fff}
.file-preview-btn{padding:3px 6px;background:#fef3c7;border:1px solid #f59e0b;color:#b45309;border-radius:3px;cursor:pointer;font-size:14px;line-height:1;transition:.2s}
.file-preview-btn:hover{background:#f59e0b;color:#fff}
.file-status{display:inline-block;min-width:18px;font-size:14px;color:#d1d5db;cursor:default}
.file-status.has{color:#0ea5e9}
.master-file-cell{min-width:210px}
.master-file-actions{display:grid;grid-template-columns:1fr 1fr;gap:5px;min-width:200px}
.master-file-action{height:28px;padding:0 7px;border-radius:4px;border:1px solid #cbd5e1;background:#fff;color:#334155;cursor:pointer;font-size:12px;white-space:nowrap}
.master-file-action.upload{border-color:#0ea5e9;background:#e0f2fe;color:#0369a1}
.master-file-action.view{border-color:#f59e0b;background:#fef3c7;color:#92400e}
.master-file-action:hover:not(:disabled){filter:brightness(.96)}
.master-file-action:disabled{opacity:.48;cursor:not-allowed}
.master-file-action.has-file::after{content:'\2713';margin-left:4px;color:#059669;font-weight:700}
.master-file-hint{grid-column:1/-1;color:#94a3b8;font-size:11px;text-align:center}
.preview-area{min-height:240px;display:flex;align-items:center;justify-content:center;background:#f9fafb;border-radius:4px}
.preview-area img{cursor:zoom-in;transition:.3s}
.preview-area img:hover{transform:scale(1.02)}
.process-preview-grid{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:start}.process-preview-card{min-width:0;overflow:hidden;border:1px solid #dbe3ee;border-radius:8px;background:#fff;box-shadow:0 2px 8px rgba(15,23,42,.06)}.process-preview-head{height:44px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:0 12px;border-bottom:1px solid #e5e7eb;background:#f8fafc}.process-preview-head h4{margin:0!important;color:#334155!important;font-size:14px}.process-preview-actions{display:flex;align-items:center;margin-left:auto}.process-preview-hd{display:inline-flex;align-items:center;justify-content:center;padding:7px 11px;border-radius:5px;background:#2563eb;color:#fff!important;text-decoration:none;font-size:12px;font-weight:700;white-space:nowrap}.process-preview-card .preview-area{min-height:540px;padding:10px;border-radius:0;background:#f8fafc}.process-preview-card .preview-area img{display:block;max-width:100%!important;max-height:540px!important;margin:auto;object-fit:contain;transform:none!important}.process-preview-card .preview-area canvas{max-width:100%;margin-left:auto!important;margin-right:auto!important}.process-preview-card .log-empty{min-height:500px;display:flex;align-items:center;justify-content:center}@media(max-width:760px){.process-preview-grid{grid-template-columns:1fr}.process-preview-card .preview-area{min-height:360px}.process-preview-card .preview-area img{max-height:520px!important}.process-preview-card .log-empty{min-height:320px}}
.process-preview-grid{align-items:stretch}.process-preview-card{display:flex;flex-direction:column}.process-preview-card .preview-area{flex:1}.process-preview-card:first-child .preview-area{display:flex!important;overflow:hidden}.process-preview-card:first-child .preview-area img{width:100%;height:100%;min-height:540px;max-height:none!important;object-fit:cover}
.process-preview-card .preview-area{height:570px;min-height:570px;max-height:570px;flex:none;overflow:auto}.process-preview-card:first-child .preview-area{overflow:hidden}.process-preview-card:first-child .preview-area img{height:100%;min-height:0;max-height:100%!important}
@media(max-width:760px){.process-preview-card .preview-area{height:auto;min-height:360px;max-height:none}.process-preview-card:first-child .preview-area img{height:auto;min-height:360px;max-height:520px!important}}
.process-preview-fullscreen{display:inline-flex;align-items:center;justify-content:center;padding:7px 11px;border:0;border-radius:5px;background:#0f766e;color:#fff;font-size:12px;font-weight:700;white-space:nowrap;cursor:pointer}.process-preview-card .preview-area img:fullscreen{width:100vw!important;height:100vh!important;min-height:0!important;max-width:none!important;max-height:none!important;object-fit:contain!important;background:#05080d;transform:none!important}
#previewModal:fullscreen{display:flex!important;padding:0;background:#eef2f7}#previewModal:fullscreen .modal-box{width:100vw!important;max-width:none!important;height:100vh;max-height:none!important;border-radius:0;margin:0}#previewModal:fullscreen #previewModalBody{max-height:calc(100vh - 132px)!important}#previewModal:fullscreen .process-preview-card .preview-area{height:calc(100vh - 210px);min-height:420px;max-height:none}
.modal-overlay{position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,0.5);display:flex;align-items:center;justify-content:center;z-index:99999}
#previewModal{z-index:100120!important}
#reportPhotoPreviewModal{position:fixed;inset:0;z-index:100240;background:rgba(0,0,0,.94);display:none;align-items:center;justify-content:center;overflow:hidden}
.report-photo-preview-stage{position:relative;width:100%;height:100%;display:flex;align-items:center;justify-content:center;padding:62px 105px 72px;box-sizing:border-box}
.report-photo-preview-image{display:block;max-width:100%;max-height:100%;object-fit:contain;box-shadow:0 4px 28px rgba(0,0,0,.35)}
.report-photo-preview-nav{position:absolute;top:50%;transform:translateY(-50%);width:58px;height:78px;border:0;border-radius:10px;background:rgba(255,255,255,.18);color:#fff;font-size:48px;line-height:1;cursor:pointer;display:flex;align-items:center;justify-content:center;transition:.15s}
.report-photo-preview-nav:hover:not(:disabled){background:rgba(37,99,235,.9)}
.report-photo-preview-nav:disabled{opacity:.2;cursor:default}.report-photo-preview-prev{left:24px}.report-photo-preview-next{right:24px}
.report-photo-preview-close{position:absolute;right:24px;top:18px;width:44px;height:44px;border:0;border-radius:50%;background:rgba(255,255,255,.18);color:#fff;font-size:30px;line-height:1;cursor:pointer;z-index:2}
.report-photo-preview-close:hover{background:#dc2626}.report-photo-preview-caption{position:absolute;left:50%;bottom:22px;transform:translateX(-50%);color:#fff;background:rgba(0,0,0,.55);border-radius:18px;padding:7px 16px;font-size:14px;white-space:nowrap}
.report-photo-preview-actions{position:absolute;right:auto;bottom:auto;display:none;flex-direction:column;align-items:stretch;gap:8px}.report-photo-preview-actions button{width:176px;border:0;border-radius:5px;padding:9px 12px;color:#fff;font-size:13px;font-weight:700;white-space:nowrap;cursor:pointer}.report-photo-preview-actions button:disabled{opacity:.48;cursor:not-allowed}.report-photo-preview-sync{background:#16a34a}.report-photo-preview-process{background:#2563eb}
@media(max-width:760px){.report-photo-preview-stage{padding:58px 55px 68px}.report-photo-preview-nav{width:42px;height:62px;font-size:38px}.report-photo-preview-prev{left:7px}.report-photo-preview-next{right:7px}.report-photo-preview-close{right:10px;top:10px}}
#adjustAuthModal,#adjustConflictModal{z-index:100080!important}
#idleFillModal,#taskSwapModal,#productProcessSwapModal,#overdueModal{z-index:100080!important}
#regAuditPermModal{z-index:100010!important}
.modal-box{background:#fff;border-radius:8px;width:520px;padding:24px;box-shadow:0 8px 24px rgba(0,0,0,0.2);max-height:90vh;overflow-y:auto}
.modal-box::-webkit-scrollbar{width:12px;background:#f1f5f9}
.modal-box::-webkit-scrollbar-thumb{background:#94a3b8;border-radius:6px}
.modal-box::-webkit-scrollbar-thumb:hover{background:#64748b}
#warehouseLogModal .modal-box{overflow:hidden;display:flex;flex-direction:column}
#warehouseLogModalBody{max-height:62vh;overflow-y:auto;scrollbar-width:auto;scrollbar-color:#64748b #e2e8f0;scrollbar-gutter:stable;background:#fff}
#warehouseLogModalBody .warehouse-log-table{margin-top:12px!important;border-collapse:separate!important;border-spacing:0!important}
#warehouseLogModalBody .warehouse-log-table thead{position:relative;z-index:10}
#warehouseLogModalBody .warehouse-log-table thead th{position:sticky!important;top:0!important;z-index:10!important;background:#f1f5f9!important;opacity:1!important;box-shadow:inset 0 -1px 0 #cbd5e1}
#warehouseLogModalBody .warehouse-log-table tbody{position:relative;z-index:1}
#warehouseLogModalBody .warehouse-log-table tbody td{position:relative;z-index:1;background:#fff!important;opacity:1!important}
#warehouseLogModalBody::-webkit-scrollbar{width:13px;background:#e2e8f0}
#warehouseLogModalBody::-webkit-scrollbar-track{background:#e2e8f0;border-left:1px solid #cbd5e1}
#warehouseLogModalBody::-webkit-scrollbar-thumb{background:#64748b;border:2px solid #e2e8f0;border-radius:6px}
#warehouseLogModalBody::-webkit-scrollbar-thumb:hover{background:#475569}
.warehouse-log-scroll-controls{position:fixed;top:50%;transform:translateY(-50%);z-index:100001;display:flex;flex-direction:column;gap:8px}
.warehouse-log-scroll-controls.left{left:8px}
.warehouse-log-scroll-controls.right{right:8px}
.warehouse-log-scroll-btn{width:40px;height:40px;border:1px solid #94a3b8;background:#fff;color:#334155;border-radius:6px;cursor:pointer;font-size:20px;line-height:1;box-shadow:0 2px 8px rgba(15,23,42,.22)}
.warehouse-log-scroll-btn:hover{background:#e2e8f0;border-color:#64748b}
.warehouse-log-scroll-btn:active{background:#cbd5e1}
#reportOperationLogModal .modal-box{overflow:hidden;display:flex;flex-direction:column;padding:18px}
.report-log-filters{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:8px;margin:12px 0;padding:10px;background:#f8fafc;border:1px solid #e2e8f0;border-radius:6px}
.report-log-filter{width:100%;box-sizing:border-box;padding:7px 9px;border:1px solid #cbd5e1;border-radius:4px;background:#fff;font-size:12px;outline:none}
.report-log-filter:focus{border-color:#0ea5e9;box-shadow:0 0 0 2px rgba(14,165,233,.12)}
#reportOperationLogBody{height:min(58vh,560px);overflow:auto;scrollbar-width:auto;scrollbar-color:#64748b #e2e8f0;scrollbar-gutter:stable both-edges;background:#fff;border:1px solid #dbe3ec}
#reportOperationLogBody::-webkit-scrollbar{width:13px;height:13px;background:#e2e8f0}
#reportOperationLogBody::-webkit-scrollbar-track{background:#e2e8f0;border:1px solid #cbd5e1}
#reportOperationLogBody::-webkit-scrollbar-thumb{background:#64748b;border:2px solid #e2e8f0;border-radius:6px}
#reportOperationLogBody::-webkit-scrollbar-thumb:hover{background:#475569}
.report-log-table{width:100%;min-width:1180px;border-collapse:separate;border-spacing:0;font-size:12px}
.report-log-table th{position:sticky!important;top:0!important;z-index:3!important;background:#f1f5f9!important;opacity:1!important;padding:9px 8px;border-right:1px solid #dbe3ec;border-bottom:1px solid #cbd5e1;white-space:nowrap}
.report-log-table td{padding:8px;border-right:1px solid #e5e7eb;border-bottom:1px solid #e5e7eb;background:#fff;white-space:nowrap}
.report-log-table tbody tr:hover td{background:#f8fafc}
.report-log-scroll-controls{position:fixed;top:50%;transform:translateY(-50%);z-index:100002;display:flex;flex-direction:column;gap:8px}
.report-log-scroll-controls.left{left:8px}.report-log-scroll-controls.right{right:8px}
@media(max-width:760px){.report-log-filters{grid-template-columns:repeat(2,minmax(120px,1fr))}}
.modal-title{font-size:16px;font-weight:600;color:#333;margin-bottom:16px}
.modal-form-row{margin-bottom:14px;display:flex;align-items:center;gap:10px}
.modal-form-row label{min-width:100px;color:#555;font-size:14px;text-align:right}
.modal-input{flex:1;padding:8px 12px;border:1px solid #d1d5db;border-radius:4px;font-size:14px;outline:none;box-sizing:border-box}
.modal-input:disabled{background:#f3f4f6;color:#666}
.modal-footer{margin-top:20px;display:flex;justify-content:flex-end;gap:12px}
.btn-cancel{padding:8px 16px;background:#f3f4f6;color:#333;border:1px solid #e5e7eb;border-radius:4px;cursor:pointer;font-size:14px}
.btn-warning{padding:8px 16px;background:#f59e0b;color:#fff;border:none;border-radius:4px;cursor:pointer;font-size:14px}
.btn-primary-sm{padding:6px 14px;background:#2563eb;color:#fff;border:none;border-radius:4px;cursor:pointer;font-size:13px}
.btn-danger-sm{padding:6px 14px;background:#ef4444;color:#fff;border:none;border-radius:4px;cursor:pointer;font-size:13px}
.task-container{display:grid;grid-template-columns:minmax(0,1fr) minmax(320px,400px);gap:20px;align-items:start}
.task-left{flex:1;min-width:0}
.idle-panel{
    width:auto;
    min-width:0;
    box-sizing:border-box;
    background:#fff;
    border:1px solid #e5e7eb;
    border-radius:8px;
    padding:16px;
    position:sticky;
    /* 避开顶部冻结的标题栏 */
    top: var(--task-toolbar-height, 44px);
    /* 任务表头位于工具栏下方，统计栏与表头顶部保持对齐。 */
    margin-top: calc(var(--task-toolbar-height, 44px) + 12px);
    max-height:calc(100vh - 24px);
    overflow-y:auto;
    align-self:start;
}
.idle-title{font-size:16px;font-weight:600;color:#333;margin-bottom:12px;display:flex;align-items:center;justify-content:space-between;padding-bottom:10px;border-bottom:1px solid #f3f4f6}
.idle-item{padding:10px 0;border-bottom:1px solid #f3f4f6;font-size:14px;line-height:1.6}
.idle-item:last-child{border-bottom:none}
.idle-device-name{font-weight:600;color:#2563eb;margin-right:8px}
.idle-dates{color:#6b7280;font-size:13px;margin-top:4px;word-break:break-all}
.idle-empty{color:#9ca3af;text-align:center;padding:30px 0;font-size:14px}
.range-btn{padding:3px 10px;font-size:12px;border:1px solid #d1d5db;background:#fff;border-radius:4px;cursor:pointer;color:#6b7280;transition:all 0.2s}
.range-btn.active{background:#2563eb;color:#fff;border-color:#2563eb}
.user-table{width:100%;border-collapse:collapse;margin-top:12px;font-size:13px}
.user-table th,.user-table td{border:1px solid #e5e7eb;padding:8px 10px;text-align:center}
.user-table th{background:#f3f4f6}
#userMgmtTable{margin-top:0;border-collapse:collapse}
#userMgmtTable thead{position:sticky;top:0;z-index:10;background:#e2e8f0}
#userMgmtTable thead th{position:static;background:#e2e8f0;box-shadow:inset 0 -2px 0 #94a3b8}
#userMgmtTable tbody{position:relative;z-index:1}
#userMgmtTable tbody td{background:#fff}
.scroll-arrow-up::before,.scroll-arrow-down::before{content:"";display:block;width:0;height:0;margin:auto;border-left:8px solid transparent;border-right:8px solid transparent}
.scroll-arrow-up::before{border-bottom:11px solid #334155}
.scroll-arrow-down::before{border-top:11px solid #334155}
.user-scroll-btn,.reg-audit-scroll-btn{font-size:0!important}
.user-scroll-btn::before,.reg-audit-scroll-btn::before{content:"";display:block;width:0;height:0;margin:auto;border-left:8px solid transparent;border-right:8px solid transparent}
.user-scroll-btn[data-target="top"]::before,.reg-audit-scroll-btn[data-target="top"]::before{border-bottom:11px solid #334155}
.user-scroll-btn[data-target="bottom"]::before,.reg-audit-scroll-btn[data-target="bottom"]::before{border-top:11px solid #334155}
#regAuditTable{margin-top:0;border-collapse:collapse}
#regAuditTable thead{position:sticky;top:0;z-index:10;background:#e2e8f0}
#regAuditTable thead th{position:static;background:#e2e8f0;box-shadow:inset 0 -2px 0 #94a3b8}
#regAuditTable tbody{position:relative;z-index:1}
#regAuditTable tbody td{background:#fff}
#userTableScroll,#regAuditTableScroll{padding-top:0!important}
#userMgmtTable thead tr,#regAuditTable thead tr{background:#e2e8f0}
.warehouse-tab.active{color:#0d9488;border-bottom-color:#0d9488 !important;background:#f0fdfa}
.warehouse-table{width:100%;border-collapse:collapse;margin-top:8px;font-size:13px}
.warehouse-table th,.warehouse-table td{border:1px solid #e5e7eb;padding:6px 8px;text-align:center}
.warehouse-table th{background:#f3f4f6;position:sticky;top:0}
#warehouseToolbar{position:sticky;top:0;z-index:100003}
#warehouseFilterBar{position:sticky;top:var(--warehouse-toolbar-height,64px);z-index:100002;margin:0 -24px!important;padding:12px 24px!important;border-radius:0!important;border-bottom:1px solid #e2e8f0;background:#fff!important;box-shadow:0 3px 7px rgba(15,23,42,.1)!important}
#warehouseTableBodyPage .warehouse-table th{top:calc(var(--warehouse-toolbar-height,64px) + var(--warehouse-filter-height,62px));z-index:99999;box-shadow:inset 0 -2px 0 #cbd5e1}
#semiStageSummary{position:relative;z-index:100001}
#semiProductSuggest{z-index:100002!important}
#warehouseTableBodyPage{margin-top:12px}
#semiStageSummary{margin-top:12px}
#multiWarehousePanel{display:none;background:#fff;border:1px solid #e2e8f0;border-radius:8px;overflow:hidden;box-shadow:0 1px 3px rgba(15,23,42,.08)}
#multiWarehouseScroll{height:calc(100vh - 205px);min-height:320px;overflow:auto;background:#fff;scrollbar-width:auto;scrollbar-color:#64748b #e2e8f0;scrollbar-gutter:stable both-edges}
#multiWarehouseScroll::-webkit-scrollbar{width:13px;height:13px;background:#e2e8f0}
#multiWarehouseScroll::-webkit-scrollbar-track{background:#e2e8f0;border:1px solid #cbd5e1}
#multiWarehouseScroll::-webkit-scrollbar-thumb{background:#64748b;border:2px solid #e2e8f0;border-radius:6px}
#multiWarehouseScroll::-webkit-scrollbar-thumb:hover{background:#475569}
.multi-negative-summary{display:flex;align-items:center;gap:8px;min-width:260px;max-width:min(62vw,1050px);height:36px;padding:0 8px;background:#fff7ed;border:1px solid #fed7aa;border-radius:5px;overflow:hidden}
.multi-negative-title{flex:0 0 auto;color:#9a3412;font-size:12px;font-weight:700;white-space:nowrap}
.multi-negative-list{display:flex;align-items:center;gap:6px;min-width:0;overflow-x:auto;scrollbar-width:thin;scrollbar-color:#fb923c #ffedd5;padding:3px 0}
.multi-negative-item{flex:0 0 auto;padding:4px 8px;background:#fff;border:1px solid #fca5a5;border-radius:4px;color:#b91c1c;font-size:12px;cursor:pointer;white-space:nowrap}
.multi-negative-item:hover{background:#fee2e2}.multi-negative-ok{color:#047857;background:#ecfdf5;border-color:#a7f3d0}.multi-negative-ok .multi-negative-title{color:#047857}
.multi-warehouse-table{width:100%;min-width:1280px;border-collapse:separate;border-spacing:0;table-layout:fixed;font-size:13px}
.multi-warehouse-table th{position:sticky;top:0;z-index:5;padding:11px 9px;background:#eaf0f6;color:#1f2937;border-right:1px solid #cbd5e1;border-bottom:2px solid #94a3b8;white-space:nowrap;text-align:center}
.multi-warehouse-table td{padding:10px 9px;background:#fff;border-right:1px solid #e2e8f0;border-bottom:1px solid #e2e8f0;text-align:center;font-weight:600}
.multi-warehouse-table tbody tr:nth-child(even) td{background:#f8fafc}
.multi-warehouse-table tbody tr:hover td{background:#ecfdf5}
.multi-warehouse-table th:first-child,.multi-warehouse-table td:first-child{position:sticky;left:0;z-index:4;width:170px;min-width:170px;text-align:left;padding-left:14px;box-shadow:2px 0 0 #cbd5e1}
.multi-warehouse-table th:first-child{z-index:8;background:#dbeafe}
.multi-warehouse-table td:first-child{color:#0f766e;font-weight:800;background:#f0fdfa}
.multi-warehouse-table tbody tr:nth-child(even) td:first-child{background:#e6fffb}
.multi-warehouse-table tbody tr:hover td:first-child{background:#ccfbf1}
.multi-warehouse-table .multi-total{background:#ecfdf5!important;color:#065f46;font-weight:800}
.warehouse-table tbody tr.warehouse-record-row{cursor:pointer;transition:background-color 0.15s ease,box-shadow 0.15s ease}
.warehouse-table tbody tr.warehouse-record-row:hover{background:#f0fdfa}
.warehouse-table tbody tr.warehouse-record-row.selected{background:#ccfbf1;box-shadow:inset 4px 0 0 #0d9488}
.warehouse-table tbody tr.warehouse-record-row.selected td{border-top-color:#5eead4;border-bottom-color:#5eead4}
.semi-summary-row{cursor:pointer;transition:background-color 0.15s ease,box-shadow 0.15s ease}
.semi-summary-row:hover{background:#f0fdfa}
.semi-summary-row.selected{background:#ccfbf1;box-shadow:inset 4px 0 0 #0d9488}
.semi-summary-row.selected td{border-top-color:#5eead4 !important;border-bottom-color:#5eead4 !important}
.warehouse-table .badge-auto{background:#dbeafe;color:#1e40af;padding:2px 6px;border-radius:3px;font-size:11px}
.warehouse-table .badge-manual{background:#fef3c7;color:#92400e;padding:2px 6px;border-radius:3px;font-size:11px}
.warehouse-table .qty-cell{font-weight:600;color:#0d9488}
/* ★ v17.36: 新建入库 - 产品编号模糊输入下拉 */
.wam-suggest-item{padding:7px 10px;font-size:13px;cursor:pointer;border-bottom:1px solid #f1f5f9;color:#1f2937;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.wam-suggest-item:last-child{border-bottom:none;}
.wam-suggest-item:hover{background:#f0fdfa;}
.wam-suggest-item.active{background:#0d9488;color:#fff;}
.wam-suggest-item:active{background:#0f766e;color:#fff;}
.wam-suggest-empty{padding:8px 10px;font-size:12px;color:#9ca3af;}
.multi-dev-dropdown{z-index:100050!important;box-shadow:0 8px 20px rgba(15,23,42,.22)!important}
#devDropdown{z-index:100010!important;box-shadow:0 8px 20px rgba(15,23,42,.22)!important}
/* ★ v17.41: 排产界面产品库存标签 */
.stock-tag{display:inline-block;margin:0 10px 0 0;padding:4px 10px;background:#fff;border:1px solid #ccfbf1;border-radius:6px;white-space:nowrap;}
.stock-tag b{color:#0d9488;font-weight:600;margin-left:3px;}
.checkbox-label{display:flex;align-items:center;gap:4px;font-size:13px;cursor:pointer;white-space:nowrap}
.today-input{width:80px;padding:4px 6px;border:1px solid #d1d5db;border-radius:4px;text-align:center;font-size:13px}
.today-input:focus{border-color:#2563eb;outline:none}
.today-input:disabled{background:#f3f4f6;color:#9ca3af;cursor:not-allowed}
.cum-editable{cursor:pointer;border-bottom:1px dashed #2563eb;color:#2563eb;font-weight:700}
.cum-editable:hover{background:#eff6ff}
.diff-cell{font-weight:600;color:#dc2626}
.diff-cell.zero{color:#16a34a}
.diff-cell.negative{color:#ef4444}

/* ===== 工单完成趋势图 ===== */
.chart-modal{width:1040px;max-width:96vw;padding:20px 22px}
.chart-container{width:100%;margin-top:14px;position:relative;max-height:70vh;overflow-y:auto;padding:0 5px 4px 0}
.proc-chart-section{margin-bottom:14px;background:#fff;border-radius:7px;border:1px solid #dbe3ee;overflow:hidden;box-shadow:0 1px 3px rgba(15,23,42,.05)}
.proc-chart-title{min-height:48px;padding:9px 14px;box-sizing:border-box;font-size:15px;font-weight:700;display:flex;align-items:center;gap:9px;background:#f8fafc;border-bottom:1px solid #e6ebf2}
.proc-color-dot{width:4px;height:25px;border-radius:2px;display:inline-block;flex-shrink:0}
.proc-stats{font-size:12px;color:#526174;font-weight:normal;margin-left:auto;display:flex;gap:15px;align-items:center;white-space:nowrap}
.proc-progress{width:86px;height:6px;background:#e2e8f0;border-radius:3px;overflow:hidden;display:inline-block;vertical-align:middle;margin-right:5px}
.proc-progress>i{display:block;height:100%;border-radius:3px}
.chart-scroll{overflow-x:auto;overflow-y:hidden;padding:12px 14px 8px}
.chart-bar{position:relative;display:flex;align-items:flex-end;gap:10px;height:205px;min-width:max-content;padding:0 10px 0 44px;border-bottom:1px solid #cbd5e1;background:repeating-linear-gradient(to bottom,#fff 0,#fff 50px,#edf1f5 51px)}
.chart-scale{position:absolute;left:0;color:#94a3b8;font-size:10px;line-height:1;transform:translateY(-50%)}
.chart-scale.max{top:2px;transform:none}.chart-scale.mid{top:50%}.chart-scale.zero{bottom:-1px;transform:none}
.bar-item{width:56px;flex:0 0 56px;height:100%;display:flex;flex-direction:column;align-items:center;justify-content:flex-end;min-width:0}
.bar-group{display:flex;align-items:flex-end;justify-content:center;gap:4px;height:168px;width:100%;flex-shrink:0}
.bar-fill{width:19px;border-radius:3px 3px 0 0;transition:height .25s ease;min-height:0;max-height:168px;box-sizing:border-box}
.bar-fill.has-value{min-height:2px}
.bar-label{height:25px;padding-top:6px;box-sizing:border-box;font-size:10px;color:#64748b;white-space:nowrap;line-height:1}
.bar-values{height:12px;font-size:10px;font-weight:600;color:#334155;white-space:nowrap;line-height:12px}
.chart-legend{display:flex;gap:20px;justify-content:center;margin-top:10px;font-size:12px;color:#555;flex-wrap:wrap}
.legend-dot{width:12px;height:12px;border-radius:2px;display:inline-block;margin-right:4px;vertical-align:middle}
.no-data-tip{text-align:center;color:#9ca3af;padding:30px 0;font-size:14px}
.idle-fill-table{width:100%;border-collapse:collapse;font-size:12px;white-space:nowrap}
.idle-fill-table th{position:sticky;top:0;background:#f1f5f9;color:#475569;padding:9px 8px;border:1px solid #dbe3ee;text-align:left}
.idle-fill-table td{padding:9px 8px;border:1px solid #e2e8f0;color:#334155}
.idle-fill-table tbody tr:hover{background:#f8fafc}
.idle-fill-rank{font-weight:700;color:#2563eb;text-align:center}
.idle-fill-select{border:0;border-radius:4px;background:#2563eb;color:#fff;padding:6px 11px;cursor:pointer;font-size:12px}
.idle-fill-select:disabled{background:#94a3b8;cursor:not-allowed}
.lock-btn{
    background: #64748b;
    color: #fff;
    border: none;
    padding: 4px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-left: 4px;
}
.lock-btn.locked{
    background: #ef4444;
}
.lock-btn:disabled{
    background: #cbd5e1;
    cursor: not-allowed;
}
/* 全屏登录页 */
.auth-mask{position:fixed;inset:0;z-index:99999;display:grid;place-items:center;padding:0;background:#03111c;overflow:hidden;isolation:isolate}
.auth-mask::before{content:'';position:absolute;inset:0;z-index:-2;background:url('login-background.png') center/cover no-repeat}
.auth-mask::after{content:'';position:absolute;inset:0;z-index:-1;background:rgba(1,12,23,.42)}
.auth-shell{width:100vw;height:100vh;min-height:620px;display:grid;grid-template-columns:minmax(0,1.48fr) minmax(430px,.82fr);background:transparent;overflow:hidden}
.auth-visual{position:relative;display:flex;flex-direction:column;justify-content:space-between;padding:48px clamp(42px,6vw,100px);overflow:hidden}
.auth-visual::before{display:none}
.auth-brand,.auth-hero,.auth-feature-list{position:relative;z-index:1}.auth-brand{display:flex;align-items:center;gap:12px;color:#effcff;font-size:15px;font-weight:800;text-shadow:0 2px 8px rgba(0,0,0,.45)}.auth-brand-mark{display:grid;place-items:center;width:38px;height:38px;border:1px solid #22d3ee;background:rgba(5,78,98,.82);color:#fff;font-size:19px;box-shadow:0 0 24px rgba(34,211,238,.35)}
.auth-brand small{display:block;margin-top:3px;color:#8bd2e0;font-size:10px;font-weight:500;letter-spacing:1.5px}.auth-kicker{color:#67e8f9;font-size:12px;font-weight:800;letter-spacing:3px}.auth-hero{margin-bottom:22vh}.auth-hero h1{max-width:650px;margin:16px 0 14px;color:#fff;font-size:42px;line-height:1.22;letter-spacing:0;text-shadow:0 3px 18px rgba(0,0,0,.65)}.auth-hero p{max-width:620px;margin:0;color:#c0dce3;font-size:15px;line-height:1.8;text-shadow:0 2px 8px rgba(0,0,0,.6)}.auth-live-line{display:flex;align-items:center;gap:8px;margin-top:24px;color:#b6d7de;font-size:12px}.auth-live-dot{width:8px;height:8px;border-radius:50%;background:#34d399;box-shadow:0 0 12px #34d399;animation:authPulse 1.8s ease-in-out infinite}@keyframes authPulse{50%{opacity:.35;transform:scale(.78)}}
.auth-feature-list{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}.auth-feature{padding-top:14px;border-top:1px solid rgba(148,231,255,.35)}.auth-feature b{display:block;color:#f0fcff;font-size:13px;text-shadow:0 2px 8px rgba(0,0,0,.55)}.auth-feature span{display:block;margin-top:6px;color:#a6c9d1;font-size:11px;line-height:1.6;text-shadow:0 2px 7px rgba(0,0,0,.55)}
.auth-login-panel{position:relative;display:flex;align-items:center;padding:clamp(32px,4vw,72px);background:rgba(3,16,29,.72);box-shadow:-32px 0 70px rgba(0,0,0,.28);backdrop-filter:blur(10px)}.auth-login-panel::before{content:'';position:absolute;left:-34px;top:0;bottom:0;width:35px;background:linear-gradient(90deg,rgba(3,16,29,0),rgba(3,16,29,.72));pointer-events:none}.auth-card{width:100%;max-width:410px;margin:auto auto auto 0;zoom:1!important;transform:translateX(-8px)!important}.auth-card-head{margin-bottom:30px}.auth-card-head .auth-number{color:#67e8f9;font-size:11px;font-weight:800;letter-spacing:2px}.auth-card h2{margin:9px 0 8px!important;padding:0!important;background:transparent!important;color:#fff!important;font-size:27px!important;letter-spacing:0;text-shadow:0 2px 10px rgba(0,0,0,.5)}.auth-card .sub{color:#a8c7d1;font-size:13px}.auth-field{margin-bottom:18px}.auth-field label{display:block;margin-bottom:8px;color:#d2e7ed;font-size:12px;font-weight:700}.auth-input-wrap{display:flex;align-items:center;height:48px;border:1px solid rgba(125,211,226,.48);background:rgba(2,17,29,.72);transition:.18s}.auth-input-icon{width:46px;text-align:center;color:#67e8f9;font-size:16px}.auth-field input{flex:1;min-width:0;height:100%;box-sizing:border-box;padding:0 14px 0 0;border:0;outline:none;background:transparent;color:#fff;font-size:15px;letter-spacing:0}.auth-field input::placeholder{color:#7fa2ae}.auth-input-wrap:focus-within{border-color:#67e8f9;box-shadow:0 0 0 3px rgba(103,232,249,.1),0 0 22px rgba(34,211,238,.1)}
.auth-remember{display:flex;align-items:center;gap:8px;margin:1px 0 17px;color:#b3ced6;font-size:12px;cursor:pointer;user-select:none}.auth-remember input{width:16px;height:16px;accent-color:#0f9488;cursor:pointer}.auth-btn{width:100%;height:48px;border:1px solid #35d5df;border-radius:3px;background:#0f9488;color:#fff;font-size:15px;font-weight:700;cursor:pointer;box-shadow:0 8px 24px rgba(15,148,136,.28);transition:.18s}.auth-btn:hover{background:#13aa9b;transform:translateY(-1px)}.auth-btn:active{transform:translateY(0)}
.auth-btn-ghost{width:100%;height:44px;margin-top:12px;border:1px solid rgba(126,204,218,.48);border-radius:3px;background:rgba(4,28,43,.66);color:#d5eef3;font-size:13px;font-weight:600;cursor:pointer}.auth-btn-ghost:hover{border-color:#67e8f9;color:#fff;background:rgba(7,49,65,.8)}.auth-err{min-height:20px;margin-top:12px;color:#fda4af;font-size:12px;text-align:center}.auth-security{display:flex;align-items:center;justify-content:center;gap:7px;margin-top:20px;color:#8cabb5;font-size:11px}.auth-security::before{content:'●';color:#34d399;font-size:8px}
@media(max-width:820px){.auth-mask{padding:0;overflow:auto}.auth-shell{width:100%;height:auto;min-height:100vh;grid-template-columns:1fr}.auth-visual{min-height:190px;padding:25px 24px;border-right:0;border-bottom:1px solid rgba(15,118,110,.15)}.auth-visual::before{display:none}.auth-brand{margin-bottom:42px}.auth-hero{margin:0}.auth-hero h1{font-size:27px;margin:10px 0}.auth-hero p,.auth-live-line,.auth-feature-list{display:none}.auth-login-panel{padding:28px 24px;box-shadow:none}.auth-login-panel::before{display:none}.auth-card{margin:auto;transform:none!important}.auth-card-head{margin-bottom:22px}.auth-card h2{font-size:23px!important}}
@media(max-height:720px) and (min-width:821px){.auth-mask{padding:18px}.auth-shell{min-height:590px}.auth-visual{padding:34px 40px}.auth-login-panel{padding:34px}}

/* 手机端以横屏操作为主，桌面端布局不受影响 */
#mobileLandscapeHint{display:none}
@media (max-width:1000px){
    body{padding:12px;background:#eef2f7;-webkit-text-size-adjust:100%}
    .box{max-width:none;padding:14px;margin-bottom:12px;border-radius:6px;box-shadow:0 1px 5px rgba(15,23,42,.12)}
    h1{font-size:20px;margin-bottom:12px}
    .login-bar{padding:10px;margin-bottom:12px;gap:8px}
    #userInfoArea{gap:7px!important}
    .login-bar button{padding:8px 12px;font-size:13px}
    .form-row{margin:10px 0;gap:10px;align-items:flex-end}
    .form-item{gap:5px;flex:1 1 220px}
    .form-item label{min-width:76px;font-size:13px}
    .form-item input,.search-input{width:100%;min-width:0;padding:9px 10px;font-size:16px}
    .search-wrap{display:block;flex:1;min-width:0}
    #calcBtn,#reportAuditBtn2,#warehouseMgmtBtn2{margin-left:0!important;min-height:40px;padding:8px 13px;font-size:13px}
    #productStockBar{overflow-x:auto;white-space:nowrap;padding:9px 10px}
    #semiStageBox{white-space:normal;min-width:680px}
    #processDetailTitle{margin-top:14px}
    #processDetailBox{overflow-x:auto;overscroll-behavior-x:contain;border:1px solid #cbd5e1;border-radius:6px;background:#fff;padding:0 0 8px;box-shadow:inset -12px 0 12px -16px #334155}
    #processDetailBox>.tip-text{position:sticky;left:0;width:calc(100vw - 54px);padding:9px 10px;background:#eff6ff;color:#1e40af;z-index:5}
    .process-table{min-width:1560px;margin-top:0;font-size:13px}
    .process-table th,.process-table td{padding:8px 7px;height:54px;background:#fff}
    .process-table th{top:0;background:#eaf0f7;z-index:3}
    .process-table th:first-child,.process-table td:first-child{position:sticky;left:0;min-width:56px;width:56px;z-index:4;background:#f8fafc;box-shadow:1px 0 #cbd5e1}
    .process-table th:nth-child(2),.process-table td:nth-child(2){position:sticky;left:56px;min-width:150px;width:150px;z-index:4;background:#fff;box-shadow:2px 0 4px rgba(15,23,42,.12)}
    .process-table thead th:first-child,.process-table thead th:nth-child(2){background:#eaf0f7;z-index:6}
    .process-table th:nth-child(3),.process-table td:nth-child(3){min-width:135px}
    .process-table th:nth-child(4),.process-table td:nth-child(4){min-width:100px}
    .process-table input{min-height:38px;padding:7px;font-size:16px}
    .process-table .multi-dev-input{min-width:145px!important}
    #processDetailBox>.proc-oper-col{position:sticky;left:0;width:calc(100vw - 54px);padding:8px 10px 0;background:#fff;z-index:5;flex-wrap:wrap}
    #addProcBtn,#saveProcessBtn{min-height:40px;font-size:13px;padding:8px 12px}
    #result{min-height:120px;margin-top:10px;padding:12px}
    .task-container{grid-template-columns:minmax(740px,1fr) 320px;gap:12px}
    .idle-panel{position:sticky;top:var(--task-toolbar-height, 44px);width:auto;max-height:calc(100vh - 24px);margin-top:calc(var(--task-toolbar-height, 44px) + 12px)}
    h2{top:0;font-size:16px}
    .order-head-main{min-width:420px;align-items:flex-start;flex-direction:column;gap:6px}
    .order-head-actions{padding-left:0;border-left:0}
}
@media (max-width:600px){
    /* 手机端顶部排产表单使用整行布局，避免固定输入宽度只占左侧。 */
    #mainBox{width:100%;max-width:none;overflow:hidden}
    #planSection>.form-row{display:grid;grid-template-columns:minmax(0,1fr);gap:10px;margin:10px 0}
    #planSection>.form-row>.form-item{width:100%;min-width:0;display:flex;align-items:center;gap:8px}
    #planSection>.form-row>.form-item>label{flex:0 0 76px;min-width:76px;white-space:nowrap}
    #planSection>.form-row>.form-item>input,
    #planSection>.form-row>.form-item>.search-wrap,
    #planSection>.form-row>.form-item .search-input{width:auto;min-width:0;flex:1 1 auto}
    #planSection>.form-row>button{width:100%;margin-left:0!important}
}
#taskToolbar{isolation:isolate;border-bottom:1px solid #e2e8f0;display:grid;grid-template-columns:max-content minmax(0,1fr);grid-template-rows:auto auto;column-gap:16px;row-gap:8px;align-items:center;padding:10px 0}
.task-toolbar-title{grid-column:1;grid-row:1;font-weight:700;white-space:nowrap}
.task-toolbar-primary{grid-column:2;grid-row:1;display:flex;align-items:center;gap:8px;min-width:0;width:100%}
.task-toolbar-primary>button{flex:1 1 0;min-width:92px;margin-left:0!important;min-height:32px;padding:6px 12px!important;font-size:12px!important;line-height:18px;white-space:nowrap;border-radius:5px!important}
.task-toolbar-search{grid-column:2;grid-row:2;justify-self:end;display:flex;align-items:center;gap:8px}
.task-order-count{height:30px;display:inline-flex;align-items:center;padding:0 10px;background:#f1f5f9;color:#475569;border:1px solid #e2e8f0;border-radius:5px;font-size:12px;font-weight:600;white-space:nowrap}
#taskSearchInput{height:30px;margin-left:0!important}
#taskSearchClear{height:30px;margin:0!important}
.gantt-page{position:fixed;inset:0;z-index:100020;display:none;flex-direction:column;background:#f4f7fb;color:#1f2937}
.gantt-page.show{display:flex}
.gantt-toolbar{height:62px;flex:0 0 62px;display:flex;align-items:center;gap:10px;padding:10px 16px;background:#fff;border-bottom:1px solid #cbd5e1;box-shadow:0 2px 8px rgba(15,23,42,.08)}
.gantt-toolbar h2{position:static;margin:0;padding:0;box-shadow:none;font-size:18px;white-space:nowrap}
.gantt-toolbar button{height:36px;padding:7px 13px;font-size:13px;white-space:nowrap}
.gantt-toolbar input{height:36px;width:230px;padding:7px 10px;border:1px solid #cbd5e1;border-radius:5px;font-size:13px}
.gantt-history-toggle{height:36px;display:flex;align-items:center;gap:6px;padding:0 10px;border:1px solid #cbd5e1;border-radius:5px;background:#f8fafc;font-size:12px;font-weight:700;white-space:nowrap;cursor:pointer}.gantt-history-toggle input{width:15px!important;height:15px;margin:0;padding:0}.gantt-history-days{height:36px;padding:0 8px;border:1px solid #cbd5e1;border-radius:5px;background:#fff;color:#334155;font-size:12px}
.gantt-legend{display:flex;align-items:center;gap:10px;margin-left:auto;font-size:12px;color:#64748b;white-space:nowrap}
.gantt-legend i{width:11px;height:11px;border-radius:3px;display:inline-block;margin-right:3px;vertical-align:-1px}
.gantt-status{padding:7px 16px;background:#eef2ff;border-bottom:1px solid #c7d2fe;color:#4338ca;font-size:12px}
.gantt-scroll{position:relative;flex:1;min-height:0;overflow:auto;background:#fff}
.gantt-grid{position:relative;min-height:100%;min-width:100%;--gantt-label-width:150px;--gantt-day-width:54px}
.gantt-head{position:sticky;top:0;z-index:20;display:flex;width:100%;height:58px;background:#fff;border-bottom:2px solid #94a3b8}
.gantt-corner{position:sticky;left:0;z-index:23;box-sizing:border-box;flex:0 0 var(--gantt-label-width);display:flex;align-items:center;padding:0 14px;background:#eaf0f7;border-right:2px solid #94a3b8;font-weight:700}
.gantt-dates{position:relative;height:58px;flex:0 0 auto;background-image:linear-gradient(to right,#dbe2ea 1px,transparent 1px);background-size:var(--gantt-day-width) 100%}
.gantt-date{position:absolute;top:0;height:58px;width:var(--gantt-day-width);display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:11px;color:#475569}
.gantt-date b{font-size:13px;color:#1f2937}.gantt-date.weekend{background:#f8fafc}.gantt-date.today{background:#fff7ed;color:#c2410c}.gantt-date.today b{color:#c2410c}
.gantt-row{display:flex;width:100%;min-height:62px;border-bottom:1px solid #e2e8f0;background:#fff}
.gantt-row.drop-target .gantt-device{background:#ede9fe;color:#5b21b6;box-shadow:inset -3px 0 #8b5cf6}
.gantt-row.drop-target .gantt-track{background-color:#f5f3ff;outline:2px solid #a78bfa;outline-offset:-2px}
.gantt-device{position:sticky;left:0;z-index:12;box-sizing:border-box;flex:0 0 var(--gantt-label-width);display:flex;align-items:center;padding:0 14px;background:#f8fafc;border-right:2px solid #94a3b8;font-weight:700;color:#334155;box-shadow:3px 0 6px rgba(15,23,42,.06)}
.gantt-device.admin-editable{cursor:text}.gantt-device.admin-editable:hover{background:#eef2ff;color:#4338ca;box-shadow:inset 4px 0 #6366f1,3px 0 6px rgba(15,23,42,.06)}
.gantt-track{position:relative;flex:0 0 auto;min-height:62px;background-color:#fff;background-image:linear-gradient(to right,#e5e7eb 1px,transparent 1px);background-size:var(--gantt-day-width) 100%;box-shadow:inset 0 -1px 0 #cbd5e1}
.gantt-lane-line{position:absolute;left:0;right:0;height:1px;background:#e2e8f0;pointer-events:none;z-index:1}
.gantt-today-line{position:absolute;top:0;bottom:0;width:2px;background:#f97316;z-index:3;pointer-events:none}
.gantt-bar{position:absolute;top:9px;height:44px;min-width:24px;border:0;border-radius:5px;padding:5px 9px;text-align:left;color:#fff;overflow:hidden;cursor:grab;box-shadow:0 3px 8px rgba(15,23,42,.22);touch-action:none;user-select:none}
.gantt-bar:active{cursor:grabbing}.gantt-bar.readonly{cursor:pointer}.gantt-bar.dragging{z-index:99;opacity:.88;box-shadow:0 8px 22px rgba(15,23,42,.35);pointer-events:none}
.gantt-bar.pending{background:#2563eb}.gantt-bar.running{background:#f59e0b}.gantt-bar.completed{background:#059669}.gantt-bar.locked{background:#64748b}.gantt-bar.auxiliary{background:#7c3aed}
.gantt-bar.history{cursor:pointer}
.gantt-lock-mark{position:absolute;right:4px;top:3px;display:grid;place-items:center;width:18px;height:18px;border-radius:4px;background:rgba(15,23,42,.48);font-size:11px;line-height:1;box-shadow:0 1px 3px rgba(15,23,42,.25)}
.gantt-bar.locked strong{padding-right:18px}
.gantt-bar strong,.gantt-bar span{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gantt-bar strong{font-size:12px}.gantt-bar span{font-size:10px;opacity:.92;margin-top:2px}
.gantt-empty{padding:80px 20px;text-align:center;color:#94a3b8}
.gantt-tooltip{position:fixed;z-index:100030;display:none;width:440px;max-width:calc(100vw - 20px);max-height:calc(100vh - 24px);overflow:hidden;padding:12px;background:#0f172a;color:#fff;border-radius:6px;box-shadow:0 10px 28px rgba(15,23,42,.35);font-size:12px;line-height:1.55;pointer-events:none}
.gantt-tooltip b{color:#bfdbfe}.gantt-tip-title{font-size:13px;font-weight:800;color:#fff;margin-bottom:8px}.gantt-tip-section{font-size:11px;color:#94a3b8;margin:9px 0 4px}.gantt-tip-task{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 12px;padding:7px 8px;border-top:1px solid #334155}.gantt-tip-task.current{background:#1e3a5f;border:1px solid #60a5fa;border-radius:5px}.gantt-tip-task strong{color:#fff;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gantt-tip-task.current strong{grid-column:1/-1;color:#bfdbfe;overflow:visible;text-overflow:clip;white-space:normal}.gantt-tip-task .qty{text-align:right;color:#e2e8f0}.gantt-tip-task.current .qty{grid-column:1/-1}.gantt-tip-task .dates{grid-column:1/-1;color:#94a3b8;font-size:11px}.gantt-tip-actions{margin-top:8px;padding-top:7px;border-top:1px solid #334155;color:#cbd5e1}.gantt-tip-actions b{color:#bfdbfe}
.gantt-track.create-enabled{cursor:crosshair}.gantt-create-grid{display:grid;grid-template-columns:1fr 1fr;gap:14px}.gantt-create-field{display:flex;flex-direction:column;gap:6px}.gantt-create-field.full{grid-column:1/-1}.gantt-create-field label{font-size:13px;font-weight:700;color:#334155}.gantt-create-field input,.gantt-create-field select{height:38px;padding:7px 10px;border:1px solid #cbd5e1;border-radius:5px;background:#fff;font-size:14px}.gantt-create-anchor{grid-column:1/-1;padding:10px 12px;border:1px solid #bfdbfe;border-radius:6px;background:#eff6ff;color:#1e40af;font-size:13px}.gantt-create-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:18px}.gantt-create-hint{margin-top:12px;color:#64748b;font-size:12px;line-height:1.6}@media(max-width:700px){.gantt-create-grid{grid-template-columns:1fr}.gantt-create-field.full,.gantt-create-anchor{grid-column:1}}
.gantt-product-search{position:relative;flex:1}.gantt-product-search input{width:100%;box-sizing:border-box}.gantt-product-dropdown{position:absolute;left:0;right:0;top:calc(100% + 4px);display:none;max-height:240px;overflow:auto;background:#fff;border:1px solid #94a3b8;border-radius:6px;box-shadow:0 10px 24px rgba(15,23,42,.22);z-index:100050}.gantt-product-option{padding:10px 13px;border-bottom:1px solid #edf0f4;cursor:pointer;color:#1f2937;font-size:14px}.gantt-product-option:last-child{border-bottom:0}.gantt-product-option:hover,.gantt-product-option.active{background:#eff6ff;color:#1d4ed8;font-weight:700}.gantt-product-empty{padding:12px;color:#94a3b8;text-align:center;font-size:13px}
@media(max-width:800px){.gantt-toolbar{overflow-x:auto}.gantt-legend{display:none}.gantt-toolbar input{width:160px}.gantt-grid{--gantt-label-width:105px;--gantt-day-width:46px}.gantt-device{padding:0 8px;font-size:12px}}
@media (max-width:1000px){
    #taskToolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
    .task-toolbar-title{width:100%}
    .task-toolbar-primary{width:100%;overflow-x:auto;justify-content:flex-start;padding-bottom:3px}
    .task-toolbar-search{margin-left:auto;max-width:100%}
}
#taskTable thead th{top:var(--task-toolbar-height,44px);z-index:99;box-shadow:inset 0 -2px 0 #cbd5e1}
#reportAuditToolbar{position:sticky;top:0;z-index:100005;flex-wrap:wrap}
#reportAuditBodyPage table thead th{top:var(--report-audit-toolbar-height,62px)!important;z-index:100004!important;box-shadow:inset 0 -2px 0 #cbd5e1}
#reportAuditBodyPage table tfoot{display:none}
#reportAuditBodyPage table tfoot td.report-audit-total-label{text-align:right;color:#475569}
#reportAuditBodyPage table tfoot td.report-audit-total-value{text-align:center;background:#ede9fe!important;color:#7c3aed!important;font-size:15px}
#reportAuditBodyPage table tfoot td.report-audit-total-qty{text-align:center;background:#ede9fe!important;color:#7c3aed!important;font-size:15px}
.report-audit-row{cursor:pointer;transition:background-color .12s ease}
.report-audit-row.report-audit-selected td{background:#ede9fe!important;color:#4c1d95!important;border-color:#c4b5fd!important}
.report-audit-row.report-audit-selected td span,.report-audit-row.report-audit-selected td strong{color:#4c1d95!important}
.report-audit-row.report-audit-selected td:first-child{box-shadow:inset 5px 0 0 #8b5cf6}
.report-audit-row.report-audit-selected button{color:#fff!important}
.report-audit-row .audit-status-pending{background:#fef3c7!important;color:#92400e!important;border:1px solid #fcd34d}
.report-audit-row.report-audit-selected td span.audit-status-pending{background:#fef3c7!important;color:#92400e!important}
.report-audit-draggable thead th{cursor:grab;user-select:none;transition:background-color .15s,box-shadow .15s}
.report-audit-draggable thead th:active{cursor:grabbing}
.report-audit-draggable thead th.report-col-dragging{opacity:.55;background:#dbeafe!important}
.report-audit-draggable thead th.report-col-drop-before{box-shadow:inset 4px 0 0 #2563eb,inset 0 -2px 0 #cbd5e1!important}
.report-audit-draggable thead th.report-col-drop-after{box-shadow:inset -4px 0 0 #2563eb,inset 0 -2px 0 #cbd5e1!important}
.report-audit-draggable thead th{position:sticky}.report-col-resizer{position:absolute;top:0;right:-4px;width:9px;height:100%;cursor:col-resize;z-index:8}.report-col-resizer:hover,.report-col-resizer.active{background:rgba(37,99,235,.3)}
.desktop-mobile-scale-controls{display:none}
@media (max-width:600px) and (orientation:portrait){
    /* 手机可直接缩放查看完整表格，不再用横屏提示遮挡内容。 */
    #mobileLandscapeHint{display:none!important}
}
@media (max-width:900px){
    /* 部分手机内置浏览器不支持 CSS zoom，改用 transform 保证缩放按钮真实生效。 */
    body{overflow-x:hidden}
    #mainBox{zoom:1;transform:scale(var(--desktop-mobile-scale,1));transform-origin:top left;width:calc(100% / var(--desktop-mobile-scale,1))}
    .auth-card{zoom:1;transform:none;transform-origin:top center}
    .desktop-mobile-scale-controls{position:fixed;right:10px;bottom:max(12px,env(safe-area-inset-bottom));z-index:100020;display:grid;grid-template-columns:40px 58px 40px;height:40px;background:#fff;border:1px solid #cbd5e1;border-radius:7px;overflow:hidden;box-shadow:0 4px 14px rgba(15,23,42,.26)}
    .desktop-mobile-scale-controls button{height:40px;padding:0;border:0;border-right:1px solid #e2e8f0;background:#fff;color:#1e3a5f;font-family:inherit;font-size:22px;font-weight:600;cursor:pointer;line-height:40px;text-align:center;touch-action:manipulation}
    .desktop-mobile-scale-controls button:last-child{border-right:0}
    .desktop-mobile-scale-controls button:active{background:#dbeafe}
    .desktop-mobile-scale-controls .scale-value{font-size:12px;color:#475569;font-weight:700}
    .desktop-mobile-scale-controls button:disabled{color:#cbd5e1;background:#f8fafc}
    .floating-scroll-drag-handle{display:flex!important}
}
.floating-scroll-drag-handle{display:none;width:48px;height:24px;align-items:center;justify-content:center;border:1px solid #94a3b8;border-radius:6px;background:#fff;color:#475569;font-size:18px;line-height:1;cursor:grab;touch-action:none;user-select:none;-webkit-user-select:none;box-shadow:0 2px 7px rgba(15,23,42,.18)}
.floating-scroll-drag-handle:active{cursor:grabbing;background:#e2e8f0}
#wageStatsTable th,#wageStatsTable td{padding:10px 12px;border-right:1px solid #e5e7eb;border-bottom:1px solid #e5e7eb;text-align:center;white-space:nowrap}
#wageStatsTable th{position:static;background:#f8fafc;color:#334155;font-weight:700;border-top:1px solid #cbd5e1;background-clip:padding-box}
#wageStatsTable th:first-child,#wageStatsTable td:first-child{border-left:1px solid #e5e7eb}
#wageStatsTable td:nth-child(8),#wageStatsTable td:nth-child(9){background:#ecfdf5;color:#047857;font-weight:700}
#wageStatsTable td:last-child{white-space:normal;text-align:left;min-width:160px}
#wageStatsPage{isolation:isolate}
#wageStatsToolbar{position:relative;z-index:30;background:#fff!important}
#wageStatsScroll{position:relative;z-index:1;background:#f5f7fa;scrollbar-width:auto;scrollbar-color:#64748b #e2e8f0;scrollbar-gutter:stable both-edges;overscroll-behavior:none;overflow-anchor:none}
#wageStatsScroll::-webkit-scrollbar{width:14px;height:14px;background:#e2e8f0}
#wageStatsScroll::-webkit-scrollbar-track{background:#e2e8f0;border:1px solid #cbd5e1}
#wageStatsScroll::-webkit-scrollbar-thumb{background:#64748b;border:2px solid #e2e8f0;border-radius:6px}
#wageStatsScroll::-webkit-scrollbar-thumb:hover{background:#475569}
#wageStatsScroll::-webkit-scrollbar-corner{background:#e2e8f0}
#wageStatsPager{position:absolute;left:0;right:0;bottom:0;z-index:45;height:52px;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:8px 24px;background:#fff;border-top:1px solid #cbd5e1;box-shadow:0 -2px 8px rgba(15,23,42,.08);color:#475569;font-size:13px}
.wage-pager-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-left:auto;white-space:nowrap}
.wage-pager-actions button{height:32px;padding:0 12px;border:1px solid #94a3b8;border-radius:4px;background:#fff;color:#334155;cursor:pointer}
.wage-pager-actions button:disabled{cursor:not-allowed;background:#f1f5f9;color:#94a3b8;border-color:#cbd5e1}
.wage-pager-actions input{width:72px;height:32px;box-sizing:border-box;border:1px solid #94a3b8;border-radius:4px;padding:0 7px;text-align:center;color:#1f2937}
.wage-pager-divider{width:1px;height:24px;background:#dbe2ea;margin:0 3px}
.locked-list-pager{position:fixed;left:0;right:0;bottom:0;z-index:50;min-height:52px;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:8px 24px;background:#fff;border-top:1px solid #cbd5e1;box-shadow:0 -2px 8px rgba(15,23,42,.1);color:#475569;font-size:13px}
.locked-list-pager .locked-pager-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;margin-left:auto;white-space:nowrap}
.locked-list-pager button{height:32px;padding:0 12px;border:1px solid #94a3b8;border-radius:4px;background:#fff;color:#334155;cursor:pointer}
.locked-list-pager button:disabled{cursor:not-allowed;background:#f1f5f9;color:#94a3b8;border-color:#cbd5e1}
.locked-list-pager input{width:72px;height:32px;box-sizing:border-box;border:1px solid #94a3b8;border-radius:4px;padding:0 7px;text-align:center;color:#1f2937}
.locked-pager-hidden{display:none!important}
#workOrderMgmtPage.locked-pager-host #workOrderMgmtScroll,#userMgmtModal.locked-pager-host #userTableScroll{height:calc(100vh - 116px)!important}
#deviceManageModal.locked-pager-host .device-manage-box{padding-bottom:62px!important}
#warehousePage.locked-pager-host{padding-bottom:62px!important;box-sizing:border-box}
#reportAuditPage.locked-pager-host{padding-bottom:108px!important;box-sizing:border-box}
#reportAuditFixedTotals{position:fixed;left:0;right:0;bottom:52px;z-index:49;height:44px;box-sizing:border-box;display:flex;align-items:center;justify-content:flex-end;gap:22px;padding:7px 24px;overflow-x:auto;background:#f8fafc;border-top:1px solid #cbd5e1;box-shadow:0 -2px 7px rgba(15,23,42,.07);color:#475569;font-size:13px}
#reportAuditFixedTotals .report-total-title{margin-right:auto;color:#334155;font-weight:800}
#reportAuditFixedTotals .report-total-item{display:flex;align-items:center;gap:7px;white-space:nowrap}
#reportAuditFixedTotals .report-total-item strong{min-width:74px;text-align:right;color:#7c3aed;font-size:15px}
#setupAuditPage{overflow:hidden!important;flex-direction:column}#setupAuditToolbar{position:relative;flex:0 0 auto;z-index:100005;flex-wrap:wrap;box-shadow:0 2px 8px rgba(0,0,0,.05)}#setupAuditScroll{flex:1 1 auto;min-height:0;overflow:auto!important;padding-top:0!important}#setupAuditScroll>div{overflow:visible!important}#setupAuditTable{margin-top:0!important}#setupAuditTable th,#setupAuditTable td{padding:10px 9px;border:1px solid #dbe3ec;text-align:center;height:40px;box-sizing:border-box}#setupAuditTable thead th{position:sticky;top:0!important;z-index:100004;background-color:#f1f5f9!important;background-image:linear-gradient(#f1f5f9,#f1f5f9)!important;background-clip:border-box!important;opacity:1!important;font-weight:700;box-shadow:inset 0 -2px 0 #cbd5e1}
#setupAuditTable tbody tr{cursor:pointer;transition:background-color .12s ease}#setupAuditTable tbody tr:hover td{background:#f5f3ff}#setupAuditTable tbody tr.setup-audit-row-selected td{background:#ede9fe!important;border-top-color:#c4b5fd;border-bottom-color:#c4b5fd}
#setupAuditTable tbody td:not(:last-child){overflow:hidden;text-overflow:ellipsis}#setupAuditTable th:nth-last-child(-n+4),#setupAuditTable td:nth-last-child(-n+4){position:sticky;background:#fff;z-index:3}#setupAuditTable thead th:nth-last-child(-n+4){z-index:5;background:#f1f5f9}#setupAuditTable th:last-child,#setupAuditTable td:last-child{right:0;width:170px;min-width:170px;max-width:170px}#setupAuditTable th:nth-last-child(2),#setupAuditTable td:nth-last-child(2){right:170px;width:68px;min-width:68px;max-width:68px}#setupAuditTable th:nth-last-child(3),#setupAuditTable td:nth-last-child(3){right:238px;width:64px;min-width:64px;max-width:64px}#setupAuditTable th:nth-last-child(4),#setupAuditTable td:nth-last-child(4){right:302px;width:48px;min-width:48px;max-width:48px;box-shadow:-8px 0 10px rgba(15,23,42,.12)}#setupAuditTable tbody td:last-child{padding:0;overflow:hidden}#setupAuditTable .setup-audit-actions{width:170px;min-height:40px;padding:6px 4px;box-sizing:border-box;display:flex;align-items:center;justify-content:center;gap:4px;background:#fff}#setupAuditTable tbody tr:hover td:nth-last-child(-n+4),#setupAuditTable tbody tr:hover .setup-audit-actions{background:#f5f3ff}#setupAuditTable tbody tr.setup-audit-row-selected td:nth-last-child(-n+4),#setupAuditTable tbody tr.setup-audit-row-selected .setup-audit-actions{background:#ede9fe!important}
#setupAuditPage.locked-pager-host #setupAuditScroll{padding-bottom:62px!important}.setup-audit-draggable thead th{cursor:grab;user-select:none}.setup-audit-draggable thead th.setup-col-dragging{opacity:.55;background:#dbeafe!important}.setup-audit-draggable thead th.setup-col-drop-before{box-shadow:inset 4px 0 0 #2563eb,inset 0 -2px 0 #cbd5e1!important}.setup-audit-draggable thead th.setup-col-drop-after{box-shadow:inset -4px 0 0 #2563eb,inset 0 -2px 0 #cbd5e1!important}.setup-audit-col-row{display:flex;align-items:center;justify-content:space-between;padding:8px 10px;border:1px solid #cbd5e1;background:#fff;color:#334155}
#wageStatsTable{position:relative;background:#fff;overflow-anchor:none}
#wageStatsTable thead{position:sticky;top:0;z-index:22;background:#f8fafc;transform:translateZ(0);will-change:transform}
#wageStatsTable thead,#wageStatsTable thead tr{background:#f8fafc}
#workOrderMgmtTable{margin-top:0!important;border-collapse:separate!important;border-spacing:0!important}
#workOrderMgmtScroll{background:#f5f7fa;isolation:isolate}
#workOrderMgmtTable>thead{position:static!important;background:#e7edf4!important;opacity:1!important}
#workOrderMgmtTable>thead>tr{background:#e7edf4!important;opacity:1!important}
#workOrderMgmtTable>thead>tr>th{position:sticky!important;top:0!important;z-index:20!important;background-color:#e7edf4!important;background-image:linear-gradient(#e7edf4,#e7edf4)!important;background-clip:border-box!important;opacity:1!important;isolation:isolate!important;transform:translateZ(0)!important;backface-visibility:hidden!important;box-shadow:inset 0 -1px 0 #94a3b8,0 2px 4px rgba(15,23,42,.12)!important}
#workOrderMgmtTable>tbody>tr>td{background:#fff;opacity:1}
#workOrderMgmtBody table{margin-top:0!important}
#workOrderMgmtBody table thead,#workOrderMgmtBody table thead th{position:static!important;top:auto!important;z-index:auto!important}
#wageStatsTable th{box-shadow:inset 0 -1px 0 #cbd5e1,0 2px 4px rgba(15,23,42,.08)}
#wageStatsTable th[data-sort-key]{cursor:pointer;user-select:none;transition:background .15s,color .15s}
#wageStatsTable th[data-sort-key]:hover{background:#e2e8f0;color:#0f172a}
#wageStatsTable th[data-sort-key]::after{content:' ↕';color:#94a3b8;font-size:11px}
#wageStatsTable th[data-sort-dir="asc"]::after{content:' ↑';color:#047857}
#wageStatsTable th[data-sort-dir="desc"]::after{content:' ↓';color:#047857}
.wage-filter-wrap{position:relative;display:inline-flex}
.wage-filter-suggest{display:none;position:absolute;left:0;right:0;top:calc(100% + 4px);z-index:80;max-height:240px;overflow:auto;background:#fff;border:1px solid #cbd5e1;border-radius:5px;box-shadow:0 8px 18px rgba(15,23,42,.18)}
.wage-filter-option{padding:8px 10px;border-bottom:1px solid #f1f5f9;cursor:pointer;color:#1f2937;white-space:nowrap}
.wage-filter-option:last-child{border-bottom:0}.wage-filter-option:hover,.wage-filter-option.active{background:#ecfdf5;color:#047857}
.wage-filter-initials{float:right;margin-left:12px;color:#64748b;font-size:11px;font-weight:600}
.wage-scroll-controls{position:fixed;top:50%;transform:translateY(-50%);z-index:100000;display:flex;flex-direction:column;gap:8px}.wage-scroll-controls.left{left:8px}.wage-scroll-controls.right{right:8px}
.wage-scroll-controls button{width:40px;height:40px;border:1px solid #94a3b8;background:#fff;color:#334155;border-radius:6px;cursor:pointer;font-size:20px;box-shadow:0 2px 8px rgba(15,23,42,.18)}
@media(max-width:700px){#wageStatsToolbar{padding:9px 10px!important}.wage-scroll-controls.right{display:none}#wageStatsScroll{padding:0 12px 10px 52px!important}#wageStatsPager,.locked-list-pager{height:auto;min-height:52px;padding:7px 10px;gap:6px;flex-wrap:wrap}.wage-pager-actions,.locked-list-pager .locked-pager-actions{gap:5px}.wage-pager-actions button,.locked-list-pager button{padding:0 8px}.wage-pager-actions input,.locked-list-pager input{width:60px}}
#refreshPreviewPage{display:none;position:fixed;inset:0;z-index:200000;background:#f4f6f8;color:#172033;flex-direction:column}
#refreshPreviewPage.open{display:flex}
.refresh-preview-toolbar{flex:0 0 auto;background:#fff;border-bottom:1px solid #cbd5e1;padding:10px 14px;display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.refresh-preview-title{font-size:18px;font-weight:700;margin-right:8px}.refresh-preview-summary{font-size:13px;color:#475569;margin-right:auto}
.refresh-preview-search{width:min(360px,45vw);height:36px;border:1px solid #94a3b8;border-radius:4px;padding:0 10px;font-size:14px}
.refresh-preview-scroll{min-height:0;flex:1;overflow:auto;scrollbar-gutter:stable;background:#fff}
#refreshPreviewTable{width:100%;min-width:1600px;border-collapse:separate;border-spacing:0;font-size:13px}
#refreshPreviewTable th,#refreshPreviewTable td{padding:8px 9px;border-right:1px solid #d9e0e8;border-bottom:1px solid #d9e0e8;white-space:nowrap;text-align:left}
#refreshPreviewTable thead th{position:sticky;z-index:5;background:#e7edf4;box-shadow:inset 0 -1px 0 #94a3b8}
#refreshPreviewTable thead tr:first-child th{top:0;height:34px;text-align:center;font-weight:700;z-index:7}
#refreshPreviewTable thead tr:nth-child(2) th{top:34px;z-index:6}
#refreshPreviewTable th[data-preview-sort]{cursor:pointer;user-select:none}#refreshPreviewTable th[data-preview-sort]:hover{background:#dbe4ef}
#refreshPreviewTable th[data-preview-sort]::after{content:' ↕';color:#64748b;font-size:11px}#refreshPreviewTable th[data-preview-sort][data-sort-dir="asc"]::after{content:' ↑';color:#6d28d9}#refreshPreviewTable th[data-preview-sort][data-sort-dir="desc"]::after{content:' ↓';color:#6d28d9}
#refreshPreviewTable .preview-new{background:#f0fdf4}#refreshPreviewTable tr.changed td{background:#fffceb}#refreshPreviewTable tr.added td{background:#ecfdf5}#refreshPreviewTable tr.removed td{background:#fef2f2}
#refreshPreviewTable tbody tr{cursor:pointer}#refreshPreviewTable tbody tr:hover td{box-shadow:inset 0 0 0 9999px rgba(124,58,237,.05)}
#refreshPreviewTable tbody tr.selected td{background:#ede9fe!important;box-shadow:inset 0 1px 0 #c4b5fd,inset 0 -1px 0 #c4b5fd!important}
.refresh-preview-footer{flex:0 0 auto;background:#fff;border-top:1px solid #cbd5e1;padding:10px 14px;display:flex;justify-content:flex-end;gap:10px}
.refresh-preview-btn{height:36px;padding:0 16px;border:0;border-radius:4px;cursor:pointer;font-weight:600}.refresh-preview-btn.secondary{background:#e5e7eb;color:#1f2937}.refresh-preview-btn.primary{background:#0f766e;color:#fff}.refresh-preview-btn:disabled{opacity:.55;cursor:not-allowed}
.refresh-preview-scroll-buttons{display:flex;gap:5px}.refresh-preview-scroll-buttons button{width:36px;height:36px;border:1px solid #94a3b8;background:#fff;border-radius:4px;cursor:pointer;font-size:18px}
@media(max-width:700px){.refresh-preview-search{width:100%;order:5}.refresh-preview-summary{width:100%;order:4}.refresh-preview-toolbar{padding:8px}.refresh-preview-footer{padding:8px}}
/* 新版工作台布局 */
:root{--app-sidebar-width:224px}
.app-sidebar{display:none;position:fixed;inset:0 auto 0 0;width:var(--app-sidebar-width);z-index:10010;background:#111827;color:#dbe4ef;box-shadow:4px 0 16px rgba(15,23,42,.16);overflow-y:auto}
.app-sidebar-brand{height:70px;display:flex;align-items:center;justify-content:center;padding:4px 6px 3px;margin:0;background:#111827;border-bottom:2px solid #263244;overflow:hidden}.app-sidebar-brand img{display:block;width:100%;max-width:210px;height:58px;padding:5px 8px;box-sizing:border-box;object-fit:contain;background:#fff;border-radius:11px;box-shadow:0 2px 5px rgba(0,0,0,.28)}
.app-sidebar.open{display:block}
.app-sidebar-brand-mark{display:grid;place-items:center;width:32px;height:32px;border-radius:6px;background:#0f9f7f;color:#fff;font-size:17px}.app-sidebar-user{padding:13px 18px;border-bottom:1px solid #263244;color:#94a3b8;font-size:12px}.app-sidebar-user b{display:block;margin-top:3px;color:#fff;font-size:14px}
.app-nav{padding:10px}.app-nav-item,.app-nav-parent{width:100%;height:42px;display:flex;align-items:center;gap:11px;padding:0 12px;border:0;border-radius:5px;background:transparent;color:#cbd5e1;font-size:14px;text-align:left;cursor:pointer;margin:2px 0}.app-nav-item:hover,.app-nav-parent:hover,.app-nav-item.active,.app-nav-parent.active{background:#243044;color:#fff}.app-nav-icon{width:20px;text-align:center;color:#5eead4;font-weight:800}.app-nav-parent::after{content:'›';margin-left:auto;transition:transform .18s}.app-nav-group.expanded>.app-nav-parent::after{transform:rotate(90deg)}
.app-nav-children{display:none;margin:0 0 5px 32px;border-left:1px solid #334155;padding-left:8px}.app-nav-group.expanded>.app-nav-children{display:block}.app-nav-children button{display:flex;align-items:center;width:100%;height:34px;border:0;border-radius:4px;background:transparent;color:#94a3b8;text-align:left;padding:0 10px;cursor:pointer;font-size:12px}.app-nav-children button:hover,.app-nav-children button.active{background:#1f2937;color:#fff}.report-sub-badge{display:none;margin-left:auto;min-width:18px;height:18px;padding:0 5px;box-sizing:border-box;border-radius:9px;background:#ef4444;color:#fff;font-size:11px;font-weight:800;line-height:18px;text-align:center}
.app-workshop-group{margin-top:2px}.app-workshop-group>.app-nav-parent{height:46px;background:#1b2738;color:#fff;font-size:15px;font-weight:800;border:1px solid #314158}.app-workshop-group>.app-nav-parent:hover{background:#26364b}.app-workshop-children{display:none;margin:4px 0 6px 10px;padding:2px 0 3px 8px;border-left:2px solid #2dd4bf}.app-workshop-group.expanded>.app-workshop-children{display:block}.app-workshop-children>.app-nav-item,.app-workshop-children>.app-nav-group>.app-nav-parent{font-size:13px}.app-workshop-children>.app-nav-group>.app-nav-children{margin-left:30px}
.app-sidebar-toggle{display:none;position:fixed;left:10px;top:10px;z-index:10030;width:40px;height:40px;padding:0;border-radius:5px;background:#111827;color:#fff;font-size:20px;box-shadow:0 3px 10px rgba(15,23,42,.25)}
body.app-authenticated{background:#f3f6f9}.app-authenticated #mainBox{box-sizing:border-box;margin-left:var(--app-sidebar-width);width:calc(100% - var(--app-sidebar-width));max-width:none;border:0;border-radius:0;box-shadow:none;background:#f3f6f9;padding:18px 20px}.app-authenticated #pendingBanner{margin-left:calc(var(--app-sidebar-width) + 20px);margin-right:20px}.app-authenticated #mainBox>h1{margin:0 0 12px;font-size:21px;color:#172033}.app-authenticated #loginBar{background:#fff;border:1px solid #e2e8f0;border-radius:6px;padding:9px 12px;margin-bottom:14px}
.app-authenticated #userMgmtBtn,.app-authenticated #reportAuditBtn2,.app-authenticated #warehouseMgmtBtn2,.app-authenticated #wageStatsBtn,.app-authenticated #workOrderMgmtBtn,.app-authenticated #deviceQrBtn{display:none!important}
.home-dashboard{display:none;margin-bottom:16px}.home-dashboard.open{display:block}.home-dashboard-heading{display:flex;align-items:end;justify-content:space-between;gap:12px;margin-bottom:10px}.home-dashboard-heading h2{margin:0;font-size:18px;color:#172033}.home-dashboard-heading span{font-size:12px;color:#64748b}.home-stock-grid{display:grid;grid-template-columns:repeat(8,minmax(135px,1fr));gap:8px;overflow-x:auto;padding-bottom:2px}.home-stock-card{position:relative;min-height:86px;padding:13px 12px;background:#fff;border:1px solid #e2e8f0;border-radius:6px;overflow:hidden}.home-stock-card::before{content:'';position:absolute;inset:0 auto 0 0;width:4px;background:var(--stock-color)}.home-stock-label{font-size:12px;color:#64748b;white-space:nowrap}.home-stock-value{margin-top:7px;color:#172033;font-size:23px;font-weight:800}.home-stock-unit{font-size:12px;color:#94a3b8;margin-left:4px}.home-order-strip{display:flex;align-items:center;gap:22px;margin-top:12px;padding:13px 16px;background:#fff;border:1px solid #e2e8f0;border-radius:6px;color:#475569;font-size:13px}.home-order-strip b{font-size:19px;color:#2563eb}.home-order-strip .home-order-title{margin-right:auto;color:#172033;font-weight:700;font-size:15px}
.device-manage-table{width:100%;border-collapse:collapse}.device-manage-table th,.device-manage-table td{padding:9px;border:1px solid #dbe2ea;text-align:left}.device-manage-table th{background:#eef2f7}.device-manage-table input{width:100%;box-sizing:border-box;padding:7px;border:1px solid #cbd5e1;border-radius:4px}
.device-manage-box{display:flex;flex-direction:column;width:100vw!important;max-width:none!important;height:100vh!important;max-height:none!important;margin:0;border-radius:0!important;padding:20px 24px!important;overflow:hidden!important;box-shadow:none!important}.device-manage-head{flex:0 0 auto;background:#fff;position:relative;z-index:4;border-bottom:1px solid #dbe2ea;padding-bottom:10px}.device-manage-toolbar{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:9px}.device-manage-scroll{flex:1 1 auto;min-height:0;overflow:auto;scrollbar-gutter:stable}.device-manage-table{margin:0}.device-manage-table thead th{position:sticky;top:0;z-index:3;background:#e7edf4;box-shadow:inset 0 -1px 0 #94a3b8}.device-manage-actions{display:flex;align-items:center;gap:6px;flex-wrap:wrap}.device-manage-actions button{margin:0!important}#deviceManageModal{align-items:stretch!important;justify-content:stretch!important;padding:0!important;background:#f5f7fa!important}#deviceQrModal{z-index:100120!important}@media(max-width:760px){.device-manage-box{padding:12px!important}.device-manage-toolbar{align-items:stretch;flex-direction:column}.device-manage-toolbar>div{flex-wrap:wrap}.device-manage-toolbar input{width:100%!important;min-width:0}.device-manage-scroll{overflow:auto}.device-manage-table{min-width:900px}}
/* 车间生产监控大屏 */
.workshop-board{display:none;position:fixed;inset:0;z-index:210000;background:#030b25;color:#dbeafe;font-family:"Microsoft Yahei";overflow:auto}.workshop-board.open{display:block}.workshop-board-header{position:sticky;top:0;z-index:10;height:62px;display:grid;grid-template-columns:1fr 1.5fr 1fr;align-items:center;padding:0 18px;background:linear-gradient(180deg,#071b45,#04102c);border-bottom:1px solid #1558a6;box-shadow:0 4px 18px rgba(0,94,255,.2)}.workshop-board-header h1{margin:0;text-align:center;color:#8fc7ff;font-size:22px;letter-spacing:2px}.workshop-board-brand{font-size:15px;font-weight:800;color:#6ee7d8}.workshop-board-tools{display:flex;justify-content:flex-end;align-items:center;gap:8px;color:#79a7d8;font-size:12px}.workshop-board-tools button{height:32px;padding:0 12px;background:#12396f;border:1px solid #2c67ac;color:#dbeafe;border-radius:3px;cursor:pointer}
.workshop-board-content{box-sizing:border-box;min-height:calc(100vh - 62px);padding:14px 16px;display:flex;flex-direction:column}.workshop-metrics{flex:0 0 auto;display:grid;grid-template-columns:repeat(8,minmax(115px,1fr));gap:8px;margin-bottom:10px}.workshop-metric{padding:10px 12px;min-height:69px;background:linear-gradient(145deg,#07163b,#092758);border:1px solid #164f92;box-shadow:inset 0 0 18px rgba(0,94,255,.12),0 0 10px rgba(0,94,255,.08)}.workshop-metric-label{font-size:11px;color:#78a4d4}.workshop-metric-value{margin-top:7px;color:#fff;font-size:22px;font-weight:800}.workshop-metric-value.alert{color:#fb7185}.workshop-metric-value.good{color:#34d399}
.workshop-board-grid{flex:0 0 auto;display:grid;grid-template-columns:1.05fr 1.1fr 1.05fr;gap:10px}.workshop-panel{min-height:195px;background:linear-gradient(180deg,#061238,#030b26);border:1px solid #14529c;box-shadow:inset 0 0 22px rgba(0,76,187,.14),0 0 10px rgba(0,83,199,.08);overflow:hidden}.workshop-panel-title{height:34px;display:flex;align-items:center;justify-content:center;background:linear-gradient(90deg,#092c70,#0a2370,#092c70);border-bottom:1px solid #1d64b4;color:#d7edff;font-size:14px;font-weight:800;letter-spacing:1px}.workshop-chart{height:160px;padding:10px 12px}.workshop-chart svg{width:100%;height:100%;overflow:visible}.workshop-chart-grid{stroke:#19365e;stroke-width:1}.workshop-chart-line{fill:none;stroke:#1fb6ff;stroke-width:3}.workshop-chart-area{fill:rgba(30,144,255,.14)}.workshop-chart-point{fill:#38bdf8}.workshop-chart-label{fill:#6f9ac8;font-size:10px}.workshop-bars{padding:12px 16px}.workshop-bar-row{display:grid;grid-template-columns:86px 1fr 70px;align-items:center;gap:8px;margin:9px 0;color:#b9d6f3;font-size:12px}.workshop-bar-track{height:12px;background:#0a1a43;border:1px solid #143d75}.workshop-bar-fill{height:100%;background:linear-gradient(90deg,#0ea5e9,#22d3ee);box-shadow:0 0 8px #0891b2}.workshop-bar-value{text-align:right;color:#fff;font-weight:700}.workshop-employee-split{display:grid;grid-template-columns:1fr 1fr;height:160px}.workshop-employee-group{min-width:0}.workshop-employee-group+.workshop-employee-group{border-left:1px solid #143d75}.workshop-employee-subtitle{height:25px;display:flex;align-items:center;justify-content:center;color:#70b8f2;background:#071a45;font-size:11px}.workshop-employee-split .workshop-bars{padding:5px 8px}.workshop-employee-split .workshop-bar-row{grid-template-columns:58px minmax(35px,1fr) 64px;gap:5px;margin:6px 0;font-size:10px}.workshop-employee-split .workshop-bar-row>span:first-child{font-size:12px}.workshop-employee-split .workshop-bar-value{white-space:nowrap}.workshop-machine-tasks{height:160px;overflow:hidden;background:#04102d}.workshop-machine-task-row{display:grid;grid-template-columns:65px 1fr 78px 58px 68px;align-items:center;min-height:27px;padding:0 9px;border-bottom:1px solid #102c57;color:#b9d6f3;font-size:11px;box-sizing:border-box}.workshop-machine-task-row:not(.head):nth-child(odd){background:#06183a}.workshop-machine-task-row span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.workshop-machine-task-row.head{position:sticky;top:0;z-index:2;min-height:27px;color:#8cc9ff;background:#092251;border-bottom-color:#1d64b4;font-weight:700}.workshop-machine-task-row .machine-code{color:#e0f2fe;font-weight:800}.workshop-machine-task-row .quota{text-align:right;color:#7dd3fc;font-variant-numeric:tabular-nums}.workshop-machine-task-row .task-status{justify-self:center;display:inline-flex;align-items:center;justify-content:center;min-width:48px;padding:2px 5px;border-radius:3px;font-weight:800;line-height:16px;overflow:visible}.workshop-machine-task-row .setup{color:#fde68a;background:#78350f;border:1px solid #b45309}.workshop-machine-task-row .running{color:#a7f3d0;background:#064e3b;border:1px solid #047857}.workshop-machine-task-row .unplanned{color:#cbd5e1;background:#273449;border:1px solid #475569}.workshop-recent{height:160px;overflow:hidden}.workshop-recent-row{display:grid;grid-template-columns:1.1fr .8fr .7fr .6fr;padding:7px 10px;border-bottom:1px solid #102c57;color:#b9d6f3;font-size:11px}.workshop-recent-row.head{position:sticky;top:0;z-index:2;color:#6fa9e4;background:#081d4c}.workshop-status-summary{height:160px;display:grid;grid-template-columns:repeat(2,1fr);gap:10px;padding:14px}.workshop-status-item{display:flex;flex-direction:column;align-items:center;justify-content:center;border:1px solid #174f8e;background:#07183d}.workshop-status-item b{color:#38bdf8;font-size:25px}.workshop-status-item span{margin-top:4px;color:#7ca7d2;font-size:11px}
.workshop-recent-row{grid-template-columns:1fr .7fr .62fr .72fr .55fr}
.workshop-scrap-board{height:160px;display:grid;grid-template-columns:minmax(170px,.82fr) minmax(270px,1.18fr);gap:10px;padding:10px 12px;box-sizing:border-box}.workshop-scrap-column{min-width:0;border:1px solid #143d75;background:#061536;overflow:hidden}.workshop-scrap-caption{height:27px;display:grid;grid-template-columns:1fr 72px;align-items:center;padding:0 10px;color:#6fa9e4;background:#081d4c;font-size:11px}.workshop-scrap-list{height:112px;overflow:hidden}.workshop-scrap-row{display:grid;grid-template-columns:1fr 72px;align-items:center;min-height:28px;padding:0 10px;border-bottom:1px solid #102c57;color:#b9d6f3;font-size:11px;box-sizing:border-box}.workshop-scrap-caption.summary,.workshop-scrap-row.summary{grid-template-columns:minmax(70px,1fr) 58px 58px 48px;padding:0 7px}.workshop-scrap-caption.summary span:not(:first-child),.workshop-scrap-row.summary b{text-align:right}.workshop-scrap-row b{text-align:right;color:#fff}.workshop-scrap-row.top-name span{color:#fb7185;font-weight:800}.workshop-scrap-row.summary .rough{color:#fbbf24}.workshop-scrap-row.summary .process{color:#fb7185}.workshop-scrap-row.summary .total{color:#67e8f9}.workshop-scrap-empty{display:grid;place-items:center;height:100%;color:#527da8;font-size:11px}
.workshop-orders-panel{flex:1 1 260px;min-height:260px;margin-top:10px;display:flex;flex-direction:column}.workshop-orders-panel>.workshop-panel-title{flex:0 0 34px}.workshop-orders-scroll{flex:1 1 auto;min-height:0;max-height:none;overflow:auto}.workshop-orders-table{width:100%;border-collapse:collapse;font-size:12px}.workshop-orders-table th{position:sticky;top:0;background:#0b2c6d;color:#9dcbfa;padding:8px;text-align:center;vertical-align:middle}.workshop-orders-table td{padding:8px;border-bottom:1px solid #14315b;color:#d7e9fb;text-align:center;vertical-align:middle}.workshop-order-status{display:inline-block;padding:2px 8px;border:1px solid #10b981;border-radius:10px;color:#34d399}.workshop-progress{display:flex;align-items:center;justify-content:center;gap:7px}.workshop-progress-track{width:150px;height:7px;background:#0c224c;border-radius:5px;overflow:hidden}.workshop-progress-fill{height:100%;background:#1d9bf0}.workshop-empty{display:grid;place-items:center;height:100%;color:#527da8;font-size:12px}
@media(max-width:1300px){.workshop-metrics{grid-template-columns:repeat(4,1fr)}.workshop-board-grid{grid-template-columns:1fr 1fr}.workshop-center-panel{grid-column:span 2}}
@media(max-width:800px){.workshop-board-header{grid-template-columns:1fr auto;height:auto;padding:10px}.workshop-board-header h1{grid-column:1/-1;grid-row:1;font-size:17px}.workshop-board-brand{display:none}.workshop-board-tools{grid-column:1/-1;justify-content:center;margin-top:8px}.workshop-metrics{grid-template-columns:repeat(2,1fr)}.workshop-board-grid{grid-template-columns:1fr}.workshop-center-panel{grid-column:auto}.workshop-board-content{padding:8px}.workshop-panel{min-height:180px}.workshop-employee-split{grid-template-columns:1fr;height:auto}.workshop-employee-group+.workshop-employee-group{border-left:0;border-top:1px solid #143d75}.workshop-employee-split .workshop-bar-row{grid-template-columns:72px minmax(60px,1fr) 72px}}
@media(max-width:1050px){.home-stock-grid{grid-template-columns:repeat(8,minmax(135px,1fr))}}
@media(max-width:900px){.app-sidebar{transform:translateX(-100%);transition:transform .2s}.app-sidebar.open{display:block;transform:translateX(0)}.app-sidebar-toggle{display:block}.app-authenticated #mainBox{margin-left:0;width:100%;padding:62px 10px 12px}.app-authenticated #pendingBanner{margin-left:10px;margin-right:10px}.home-stock-grid{grid-template-columns:repeat(8,minmax(135px,1fr));gap:8px}.home-stock-card{min-height:78px;padding:12px}.home-stock-value{font-size:22px}.home-order-strip{flex-wrap:wrap;gap:10px}.home-order-strip .home-order-title{width:100%}}
@media(max-width:900px){.app-authenticated #mainBox{width:calc(100% / var(--desktop-mobile-scale,1));max-width:none}.app-authenticated .task-container{min-width:1072px}}
.master-data-page{display:none;position:fixed;inset:0;z-index:100050;background:#f3f6f9;color:#172033}.master-data-page.open{display:flex;flex-direction:column}.master-data-head{flex:0 0 auto;min-height:68px;box-sizing:border-box;padding:12px 20px;background:#fff;border-bottom:1px solid #dbe3ec;display:flex;align-items:center;gap:10px;flex-wrap:wrap}.master-data-head h2{margin:0;font-size:19px}.master-data-head .master-subtitle{font-size:12px;color:#64748b;margin-right:auto}.master-data-btn{height:36px;border:0;border-radius:5px;padding:0 13px;cursor:pointer;font-weight:700}.master-data-btn.primary{background:#0f766e;color:#fff}.master-data-btn.secondary{background:#e7edf4;color:#334155;border:1px solid #cbd5e1}.master-data-btn.danger{background:#dc2626;color:#fff}.master-data-btn:disabled{opacity:.5;cursor:not-allowed}.master-data-shell{flex:1 1 auto;min-height:0;display:grid;grid-template-columns:310px minmax(0,1fr);gap:14px;padding:14px}.master-product-panel,.master-process-panel{min-height:0;background:#fff;border:1px solid #dfe6ee;border-radius:6px;box-shadow:0 2px 8px rgba(15,23,42,.05);overflow:hidden}.master-product-panel{display:flex;flex-direction:column}.master-product-tools{padding:13px;border-bottom:1px solid #e2e8f0}.master-product-search{box-sizing:border-box;width:100%;height:38px;padding:0 11px;border:1px solid #cbd5e1;border-radius:5px;outline:none}.master-product-search:focus{border-color:#0f9f7f;box-shadow:0 0 0 3px rgba(15,159,127,.12)}.master-product-count{display:flex;justify-content:space-between;margin-top:9px;color:#64748b;font-size:12px}.master-product-list{flex:1;overflow:auto}.master-product-item{width:100%;padding:12px 14px;border:0;border-bottom:1px solid #edf1f5;background:#fff;text-align:left;cursor:pointer}.master-product-item:hover{background:#f0fdfa}.master-product-item.active{background:#e8f7f3;box-shadow:inset 4px 0 0 #0f9f7f}.master-product-code{display:block;color:#0f172a;font-size:14px;font-weight:800;word-break:break-all}.master-product-meta{display:flex;gap:12px;margin-top:5px;color:#64748b;font-size:11px}.master-process-panel{display:flex;flex-direction:column}.master-process-head{padding:14px 16px;border-bottom:1px solid #e2e8f0;display:flex;align-items:center;gap:10px;flex-wrap:wrap}.master-process-title{margin-right:auto}.master-process-title strong{display:block;font-size:18px;color:#0f172a}.master-process-title span{display:block;margin-top:3px;color:#64748b;font-size:12px}.master-route-select{height:36px;min-width:160px;border:1px solid #cbd5e1;border-radius:5px;padding:0 9px;background:#fff}.master-process-scroll{flex:1;min-height:0;overflow:auto}.master-process-table{width:100%;min-width:1460px;border-collapse:separate;border-spacing:0;font-size:12px}.master-process-table th{position:sticky;top:0;z-index:3;padding:9px 7px;background:#e8eef5;border-right:1px solid #d5dee8;border-bottom:1px solid #aebdcd;text-align:center;white-space:nowrap}.master-process-table td{padding:7px;border-right:1px solid #e2e8f0;border-bottom:1px solid #e2e8f0;text-align:center}.master-process-table tbody tr:nth-child(even){background:#f8fafc}.master-process-table input{box-sizing:border-box;width:100%;height:32px;padding:0 7px;border:1px solid #cbd5e1;border-radius:4px;background:#fff}.master-process-table input:disabled{border-color:transparent;background:transparent;color:#334155}.master-process-table .sort-input{width:58px;text-align:center}.master-process-table .quota-input,.master-process-table .stage-input,.master-process-table .count-input{width:76px;text-align:center}.master-process-table .price-cell{color:#047857;font-weight:800;white-space:nowrap}.master-process-empty{display:grid;place-items:center;height:100%;min-height:280px;color:#94a3b8}.master-data-footer{flex:0 0 auto;min-height:52px;padding:8px 15px;border-top:1px solid #dbe3ec;background:#fff;display:flex;align-items:center;gap:9px}.master-data-note{margin-right:auto;color:#64748b;font-size:12px}.master-edit-only{display:none}.master-process-table tbody tr.master-dragging{opacity:.42;background:#ccfbf1}.master-process-table tbody tr.master-drag-over td{border-top:3px solid #0f9f7f}.master-drag-handle{display:inline-grid;place-items:center;width:28px;height:28px;border:1px solid #b7c4d2;border-radius:4px;background:#fff;color:#64748b;font-size:17px;line-height:1;cursor:grab;user-select:none}.master-drag-handle:hover{border-color:#0f9f7f;color:#0f766e;background:#f0fdfa}.master-drag-handle:active{cursor:grabbing}@media(max-width:900px){.master-data-shell{grid-template-columns:240px minmax(760px,1fr);overflow:auto;padding:8px}.master-data-head{padding:9px 10px}.master-product-panel,.master-process-panel{min-height:calc(100vh - 86px)}}
.order-plan-head input[type=month],.order-plan-search{height:36px;box-sizing:border-box;padding:0 10px;border:1px solid #cbd5e1;border-radius:5px;background:#fff;color:#172033}.order-plan-search{width:230px;outline:none}.order-plan-search:focus{border-color:#0f766e;box-shadow:0 0 0 3px rgba(15,118,110,.12)}.order-plan-body{flex:1;min-height:0;padding:14px;display:flex;flex-direction:column;gap:12px}.order-plan-summary{display:grid;grid-template-columns:repeat(3,minmax(180px,1fr));gap:12px}.order-plan-card{padding:13px 16px;background:#fff;border:1px solid #dbe3ec;border-radius:7px;box-shadow:0 1px 4px rgba(15,23,42,.04)}.order-plan-card span{display:block;color:#64748b;font-size:12px}.order-plan-card strong{display:block;margin-top:5px;font-size:21px;color:#0f766e}.order-status-filter-btn{display:inline-flex;align-items:center;justify-content:center;min-width:27px;height:25px;margin:0 3px;padding:0 7px;border:1px solid #94a3b8;border-radius:6px;background:#fff;color:#0f766e;font-weight:800;cursor:pointer;box-shadow:0 1px 2px rgba(15,23,42,.08)}.order-status-filter-btn:hover{border-color:#0f766e;background:#f0fdfa}.order-status-filter-btn.active{border-color:#0f766e;background:#0f766e;color:#fff}.order-plan-table-wrap{flex:1;min-height:0;overflow:auto;background:#fff;border:1px solid #dbe3ec;border-radius:7px}.order-plan-table{width:100%;min-width:1650px;border-collapse:separate;border-spacing:0;font-size:12px}.order-plan-table th{position:sticky;top:0;z-index:2;padding:10px 8px;background:#e8eef5;border-right:1px solid #d5dee8;border-bottom:1px solid #aebdcd;white-space:nowrap}.order-plan-table td{padding:9px 8px;border-right:1px solid #e2e8f0;border-bottom:1px solid #e2e8f0;text-align:center;white-space:nowrap}.order-plan-table tbody tr:nth-child(even){background:#f8fafc}.order-plan-table tbody tr:not(:has(.order-plan-empty)){cursor:pointer}.order-plan-table .order-plan-status{min-width:420px;max-width:620px;color:#475569;text-align:left;white-space:normal;line-height:1.65}.order-plan-table tbody tr.order-plan-machining-completed,.order-plan-table tbody tr.order-plan-machining-completed:nth-child(even){background:#dcfce7}.order-plan-table tbody tr.order-plan-machining-completed td{border-bottom-color:#bbf7d0}.order-plan-table tbody tr.order-plan-machining-completed .order-plan-status{color:#15803d}.order-plan-table tbody tr.order-plan-completed,.order-plan-table tbody tr.order-plan-completed:nth-child(even){background:#86efac}.order-plan-table tbody tr.order-plan-completed td{border-bottom-color:#bbf7d0}.order-plan-table tbody tr.order-plan-completed .order-plan-status{color:#15803d;font-weight:800}.order-plan-table tbody tr.order-plan-pending,.order-plan-table tbody tr.order-plan-pending:nth-child(even){background:#fee2e2}.order-plan-table tbody tr.order-plan-pending td{border-bottom-color:#fecaca}.order-plan-table tbody tr.order-plan-pending .order-plan-status{color:#b91c1c;font-weight:800}.order-plan-table tbody tr.order-plan-waiting,.order-plan-table tbody tr.order-plan-waiting:nth-child(even){background:#fef3c7}.order-plan-table tbody tr.order-plan-waiting td{border-bottom-color:#fde68a}.order-plan-table tbody tr.order-plan-producing,.order-plan-table tbody tr.order-plan-producing:nth-child(even){background:#dbeafe}.order-plan-table tbody tr.order-plan-producing td{border-bottom-color:#bfdbfe}.order-plan-table tbody tr.order-plan-selected,.order-plan-table tbody tr.order-plan-selected:nth-child(even),.order-plan-table tbody tr.order-plan-machining-completed.order-plan-selected,.order-plan-table tbody tr.order-plan-completed.order-plan-selected,.order-plan-table tbody tr.order-plan-pending.order-plan-selected,.order-plan-table tbody tr.order-plan-waiting.order-plan-selected,.order-plan-table tbody tr.order-plan-producing.order-plan-selected{background:#ede9fe}.order-plan-table tbody tr.order-plan-selected td{border-bottom-color:#ddd6fe}.order-plan-note{font-size:12px;color:#64748b}.order-plan-empty{padding:60px 10px!important;color:#94a3b8;text-align:center!important}@media(max-width:760px){.order-plan-summary{grid-template-columns:1fr}.order-plan-body{padding:8px}.order-plan-search{width:180px}}
.production-order-body,.wax-workshop-body{flex:1;min-height:0;padding:14px;display:flex;flex-direction:column;gap:12px}.production-order-summary{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:10px}.production-order-card{padding:13px 15px;background:#fff;border:1px solid #dfe6ee;border-left:4px solid #0f766e;border-radius:6px}.production-order-card span{display:block;color:#64748b;font-size:12px}.production-order-card strong{display:block;margin-top:5px;color:#172033;font-size:22px}.production-order-table-wrap,.wax-table-wrap{flex:1;min-height:0;overflow:auto;background:#fff;border:1px solid #dbe3ec;border-radius:7px}.production-order-table,.wax-table{width:100%;min-width:1450px;border-collapse:separate;border-spacing:0;font-size:12px}.production-order-table th,.wax-table th{position:sticky;top:0;z-index:2;padding:10px 8px;background:#e8eef5;border-right:1px solid #d5dee8;border-bottom:1px solid #aebdcd;white-space:nowrap}.production-order-table td,.wax-table td{padding:9px 8px;border-right:1px solid #e2e8f0;border-bottom:1px solid #e2e8f0;text-align:center}.production-order-table tbody tr:nth-child(even),.wax-table tbody tr:nth-child(even){background:#f8fafc}.production-order-status,.wax-status{display:inline-block;padding:3px 8px;border-radius:12px;font-weight:800;white-space:nowrap}.production-order-status.draft,.wax-status.pending{background:#e2e8f0;color:#475569}.production-order-status.in_production,.wax-status.in_progress{background:#dbeafe;color:#1d4ed8}.production-order-status.wax_completed,.wax-status.completed{background:#d1fae5;color:#047857}.production-order-status.cancelled{background:#fee2e2;color:#b91c1c}.production-order-actions{display:flex;justify-content:center;gap:5px;flex-wrap:wrap}.production-order-actions button,.wax-table button{height:29px;border:0;border-radius:4px;padding:0 9px;color:#fff;font-size:12px;font-weight:700;cursor:pointer}.production-order-start{background:#f59e0b}.production-order-preview{background:#2563eb}.wax-workshop-note{display:flex;align-items:center;gap:14px;flex-wrap:wrap;padding:10px 13px;background:#ecfeff;border:1px solid #a5f3fc;border-radius:6px;color:#155e75;font-size:12px}.wax-machine-tags{display:flex;gap:5px;flex-wrap:wrap}.wax-machine-tag{padding:3px 7px;border-radius:4px;background:#0f766e;color:#fff;font-weight:800}.wax-machine-tag.off{background:#94a3b8}.wax-quota-edit{background:#2563eb}.wax-quota-delete{background:#dc2626}@media(max-width:760px){.production-order-summary{grid-template-columns:repeat(2,1fr)}.production-order-body,.wax-workshop-body{padding:8px}}
.quota-page-body{flex:1;min-height:0;display:flex;flex-direction:column;padding:14px 18px 0;gap:12px}.quota-summary{display:grid;grid-template-columns:repeat(4,minmax(150px,1fr));gap:10px}.quota-summary-item{padding:13px 15px;background:#fff;border:1px solid #dfe6ee;border-left:4px solid #f59e0b;border-radius:5px}.quota-summary-item span{display:block;color:#64748b;font-size:12px}.quota-summary-item strong{display:block;margin-top:5px;color:#172033;font-size:23px}.quota-filters{display:flex;align-items:center;gap:9px;flex-wrap:wrap;padding:10px 12px;background:#fff;border:1px solid #dfe6ee;border-radius:5px}.quota-filters input,.quota-filters select{box-sizing:border-box;height:34px;padding:0 9px;border:1px solid #cbd5e1;border-radius:4px;background:#fff}.quota-table-scroll{flex:1;min-height:0;overflow:auto;background:#fff;border:1px solid #dfe6ee}.quota-table{width:100%;min-width:1280px;border-collapse:separate;border-spacing:0;font-size:12px}.quota-table th{position:sticky;top:0;z-index:2;padding:10px 8px;background:#e8eef5;border-right:1px solid #d5dee8;border-bottom:1px solid #aebdcd;text-align:center;white-space:nowrap}.quota-table td{padding:9px 8px;border-right:1px solid #e2e8f0;border-bottom:1px solid #e2e8f0;text-align:center}.quota-table tbody tr:nth-child(even){background:#f8fafc}.quota-rate{font-weight:800;color:#dc2626}.quota-status{display:inline-block;padding:3px 8px;border-radius:4px;font-weight:700}.quota-status.pending{background:#fef3c7;color:#92400e}.quota-status.approved{background:#d1fae5;color:#047857}.quota-status.rejected,.quota-status.abandoned,.quota-status.withdrawn{background:#fee2e2;color:#b91c1c}.quota-page-footer{flex:0 0 48px;display:flex;align-items:center;gap:8px;padding:0 16px;background:#fff;border-top:1px solid #dbe3ec}.quota-page-footer .quota-footer-info{margin-right:auto;color:#64748b}.quota-page-footer input{width:58px;height:30px;text-align:center;border:1px solid #cbd5e1;border-radius:4px}@media(max-width:800px){.quota-summary{grid-template-columns:repeat(2,1fr)}.quota-page-body{padding:8px 8px 0}}
.setup-col-resizer{position:absolute;top:0;right:-4px;width:9px;height:100%;cursor:col-resize;z-index:12}.setup-col-resizer::after{content:'';position:absolute;top:20%;bottom:20%;left:4px;width:1px;background:#94a3b8;opacity:.55}.setup-col-resizer:hover::after,.setup-col-resizer.active::after{width:3px;left:3px;background:#2563eb;opacity:1}body.setup-column-resizing{cursor:col-resize!important;user-select:none!important}
.master-device-type-picker{display:flex;flex-wrap:wrap;gap:4px;min-width:170px;max-height:72px;overflow:auto;text-align:left}.master-device-type-picker label{display:inline-flex;align-items:center;gap:3px;padding:3px 5px;border:1px solid #dbe3ec;border-radius:4px;background:#f8fafc;color:#334155;font-size:12px;white-space:nowrap}.master-device-type-picker input{width:auto!important;height:auto!important;padding:0!important}.master-device-type-picker input:disabled{opacity:.75}.master-device-type-empty{color:#94a3b8;font-size:12px}
.order-plan-spec{display:flex;align-items:center;justify-content:center;gap:6px}.order-plan-preview-btn,.order-plan-spec-edit{display:inline-grid;place-items:center;width:27px;height:21px;padding:0;border:1px solid #f59e0b;border-radius:3px;background:#fff;color:#111827;font-size:14px;line-height:1;cursor:pointer}.order-plan-preview-btn:hover{background:#fff7ed;border-color:#ea580c}.order-plan-preview-btn:focus-visible{outline:2px solid #f59e0b;outline-offset:2px}.order-plan-spec-edit{border-color:#3b82f6;color:#1d4ed8;font-size:12px}.order-plan-spec-edit:hover{background:#eff6ff;border-color:#1d4ed8}#orderStatusPage .order-plan-body{padding-left:8px;padding-right:8px}#orderStatusTable{min-width:100%}
.order-col-resizer{position:absolute;top:0;right:-4px;width:9px;height:100%;cursor:col-resize;z-index:12}.order-col-resizer::after{content:'';position:absolute;top:20%;bottom:20%;left:4px;width:1px;background:#94a3b8;opacity:.55}.order-col-resizer:hover::after,.order-col-resizer.active::after{width:3px;left:3px;background:#2563eb;opacity:1}.order-plan-table thead th{position:sticky}.order-plan-table th.order-col-dragging{opacity:.45}.order-plan-table th.order-col-drop-before{box-shadow:inset 3px 0 #2563eb}.order-plan-table th.order-col-drop-after{box-shadow:inset -3px 0 #2563eb}#wbsTable{margin-top:0!important;border-collapse:collapse!important}#wbsTable thead,#wbsTable thead tr,#wbsTable thead th{position:static!important;top:auto!important;z-index:auto!important}#wbsTable thead th{background:#e8eef5!important;border-top:1px solid #cbd5e1!important;padding:11px 8px!important}#wbsTable tbody td{height:48px;box-sizing:border-box}
.production-order-status.shell_completed{background:#d1fae5;color:#047857}.shell-report-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px 16px;margin-top:14px}.shell-report-grid label{color:#475569;font-size:13px}@media(max-width:760px){.shell-report-grid{grid-template-columns:1fr}}
.smelting-detail-page-body{flex:1;min-height:0;padding:14px;display:flex;flex-direction:column;gap:12px}.smelting-detail-page-table{flex:1;min-height:0;overflow:auto;background:#fff;border:1px solid #dbe3ec;border-radius:7px}.workshop-selectable tr.workshop-row-selected,.workshop-selectable .wax-table tbody tr.workshop-row-selected:nth-child(even){background:#ede9fe!important}.workshop-selectable tr.workshop-row-selected>td{background:#ede9fe!important;box-shadow:inset 0 1px #c4b5fd,inset 0 -1px #c4b5fd}.workshop-selectable tr.workshop-row-selected>td:first-child{box-shadow:inset 3px 0 #8b5cf6,inset 0 1px #c4b5fd,inset 0 -1px #c4b5fd}

.report-photo-preview-rotate{position:absolute;top:18px;left:50%;transform:translateX(-50%);z-index:3;border:1px solid rgba(255,255,255,.25);border-radius:8px;background:#2563eb;color:#fff;font-size:14px;font-weight:700;padding:9px 16px;cursor:pointer;white-space:nowrap}
.report-photo-preview-rotate:hover{background:#1d4ed8}.report-photo-preview-rotate:focus-visible{outline:3px solid #fff;outline-offset:3px}
@media(max-width:760px){.report-photo-preview-rotate{top:10px;font-size:13px;padding:9px 12px}}

.report-photo-preview-toolbar{position:absolute;top:14px;left:50%;transform:translateX(-50%);max-width:calc(100% - 110px);display:flex;align-items:center;justify-content:center;gap:8px;flex-wrap:wrap;z-index:4;padding:4px 8px;border-radius:10px;background:rgba(15,23,42,.8)}
.report-photo-preview-toolbar button,.report-photo-preview-toolbar .report-photo-preview-rotate{position:static;transform:none;border:1px solid rgba(255,255,255,.2);border-radius:7px;background:#2563eb;color:#fff;padding:8px 12px;font-size:13px;font-weight:700;white-space:nowrap;cursor:pointer}
.report-photo-preview-toolbar button:disabled{opacity:.45;cursor:default}.report-photo-preview-toolbar button:focus-visible{outline:3px solid white;outline-offset:2px}#reportPhotoPreviewZoomLabel{color:white;font-size:12px;min-width:36px;text-align:center}
.report-photo-preview-image{touch-action:none;user-select:none}.report-photo-preview-image.is-dragging{cursor:grabbing!important}.report-photo-preview-nav,.report-photo-preview-close,.report-photo-preview-actions,.report-photo-preview-caption{z-index:3}
@media(max-width:760px){.report-photo-preview-toolbar{top:8px;left:8px;right:64px;transform:none;max-width:none;gap:5px;padding:4px}.report-photo-preview-toolbar button,.report-photo-preview-toolbar .report-photo-preview-rotate{padding:7px 8px;font-size:12px}.report-photo-preview-stage{padding-top:96px}}

/* User management: readable roster with expandable permission summaries. */
#userMgmtModal{background:#f3f6fb!important;display:none;}
#userMgmtModal>div:first-child{height:auto!important;min-height:76px;padding:16px 24px!important;border-bottom:1px solid #dde5ef!important;box-shadow:0 2px 12px #0f172a08;}
#userMgmtModal h2{font-size:20px!important;color:#183451;}
#userMgmtModal button{border-radius:7px;padding:8px 12px;transition:background .15s;}
#userMgmtReload{margin-left:auto;background:#eaf2ff;color:#2563eb;}
#userMgmtModal #jobRoleSettingsBtn{margin-left:0!important;}
#userTableScroll{height:calc(100vh - 76px)!important;padding:18px 32px!important;}
#userMgmtFilterBar{border-radius:10px!important;padding:14px 16px!important;margin-bottom:16px!important;}
#userMgmtFilterBar input:focus{border-color:#3b82f6!important;box-shadow:0 0 0 3px #3b82f61a;}
#userMgmtTable{width:100%;min-width:1250px;table-layout:fixed;border-collapse:separate;border-spacing:0;background:#fff;border:1px solid #e2e8f0;border-radius:10px;}
#userMgmtTable th{position:sticky;top:0;background:#edf3fa;color:#3b506b;font-size:13px;font-weight:600;padding:14px 10px;white-space:nowrap;z-index:2;border-bottom:1px solid #d4deeb;}
#userMgmtTable td{padding:13px 10px;font-size:13px;color:#334155;line-height:1.6;border-bottom:1px solid #edf1f6;overflow-wrap:anywhere;vertical-align:top;}
#userMgmtTable tbody tr:hover{background:#f7faff;}
#userMgmtTable th:nth-child(1){width:44px;}#userMgmtTable th:nth-child(2){width:100px;}#userMgmtTable th:nth-child(3){width:105px;}#userMgmtTable th:nth-child(4){width:92px;}#userMgmtTable th:nth-child(5){width:72px;}#userMgmtTable th:nth-child(6){width:130px;}#userMgmtTable th:nth-child(7){width:110px;}#userMgmtTable th:nth-child(8),#userMgmtTable th:nth-child(9){width:150px;}#userMgmtTable th:nth-child(10){width:145px;}#userMgmtTable th:nth-child(11){width:210px;}
#userMgmtTable td:nth-child(2){font-weight:600;color:#173a63;}#userMgmtTable td:last-child button{padding:6px 9px;font-size:12px;}
#userMgmtTable .user-access{text-align:left;}#userMgmtTable .user-access summary{cursor:pointer;color:#2563eb;background:#edf5ff;border-radius:6px;padding:5px 8px;white-space:nowrap;}
#userMgmtTable .user-workshop-access summary{color:#087d72;background:#e5f7f3;}
#userMgmtTable .user-access div{display:flex;flex-wrap:wrap;gap:5px;margin-top:10px;}
#userMgmtTable .user-access span{background:#edf5ff;border-radius:4px;padding:2px 6px;font-size:12px;color:#305984;}
#userMgmtTable .user-workshop-access span{background:#e5f7f3;color:#087d72;}
#userMgmtTable .user-empty-access{color:#94a3b8;}
#userMgmtModal .user-scroll-btn{width:28px!important;height:30px!important;font-size:15px!important;}
@media(max-width:760px){#userMgmtModal>div:first-child{min-height:122px;padding:12px!important;gap:7px!important;}#userMgmtModal h2{font-size:18px!important;}#userMgmtModal button{padding:7px 9px;}#userMgmtReload{margin-left:0;}#userTableScroll{height:calc(100vh - 122px)!important;padding:12px 16px!important;}#userMgmtFilterBar{gap:8px!important;}#userMgmtFilterBar input{width:150px!important;}#userFilterCount{width:100%;margin-left:0!important;}#userMgmtModal .user-scroll-btn{display:none;}}

/* Keep user search outside the scrollable roster; size rows to the viewport. */
#userMgmtModal{flex-direction:column;box-sizing:border-box;}
#userMgmtModal>div:first-child{flex-shrink:0;min-height:60px;padding:10px 12px!important;}
#userMgmtModal #userMgmtFilterBar{flex-shrink:0;margin:2px 8px!important;padding:10px 12px!important;}
#userMgmtModal.locked-pager-host #userTableScroll{flex:1;min-height:0;height:auto!important;padding:0 8px 8px!important;}
#userMgmtModal>.locked-list-pager{position:static;flex-shrink:0;padding:8px 12px;}
#userMgmtTable th{padding:10px 8px;}
#userMgmtTable td{padding:8px;font-size:13px;}
#userMgmtModal .user-scroll-btn{padding:0!important;}
@media(max-width:760px){#userMgmtModal>div:first-child{min-height:0;}#userMgmtModal #userMgmtFilterBar{margin:2px 6px!important;gap:6px!important;padding:8px!important;}#userMgmtModal #userMgmtFilterBar input{width:128px!important;}#userMgmtModal>.locked-list-pager{flex-wrap:wrap;gap:5px;padding:6px 8px;}#userMgmtModal .locked-pager-actions{gap:4px;}#userMgmtModal .locked-list-pager input{width:45px;}#userMgmtModal .locked-list-pager button{padding:0 6px;font-size:12px;}}

/* Audit and warehouse viewport layout: keep business controls and saved columns. */
#reportAuditToolbar,#setupAuditToolbar,#warehouseToolbar{padding:10px 8px!important;gap:8px!important;border-bottom:1px solid #e2e8f0!important;box-sizing:border-box;left:0;}
#reportAuditPage>div:nth-child(2),#warehousePage>div:nth-child(2){padding:2px 8px!important;box-sizing:border-box;}
#reportAuditBodyPage,#warehouseTableBodyPage{padding:0!important;border-radius:4px!important;}
#reportAuditBodyPage table,#setupAuditTable{width:100%!important;margin-top:0!important;}
#reportAuditPage.locked-pager-host{padding-bottom:96px!important;}
#reportAuditPage .locked-list-pager,#setupAuditPage .locked-list-pager,#warehousePage .locked-list-pager{padding:8px 12px;}
#reportAuditFixedTotals{padding:7px 12px;}
#setupAuditPage.locked-pager-host #setupAuditScroll{padding:2px 8px 52px!important;}
#warehouseFilterBar{left:0;margin:0 0 2px!important;padding:8px!important;border-radius:4px!important;gap:8px!important;}
#warehouseTableBodyPage{margin-top:0!important;}
#warehouseTableBodyPage .warehouse-table{margin-top:0!important;}
#warehousePage.locked-pager-host{padding-bottom:52px!important;}
#reportAuditToolbar input,#setupAuditToolbar input,#warehouseFilterBar input{max-width:100%;box-sizing:border-box;}
#reportAuditToolbar button,#setupAuditToolbar button,#warehouseToolbar button{white-space:nowrap;}
#warehousePage .warehouse-scroll-btn{width:28px!important;height:30px!important;padding:0!important;font-size:15px!important;}
@media(max-width:760px){#reportAuditToolbar,#setupAuditToolbar,#warehouseToolbar{padding:8px 6px!important;gap:6px!important;}#reportAuditPage>div:nth-child(2),#warehousePage>div:nth-child(2){padding:2px 6px!important;}#reportAuditToolbar input[type=text],#setupAuditToolbar input[type=text]{width:128px!important;}#warehouseFilterBar{padding:6px!important;gap:6px!important;}#reportAuditPage .locked-list-pager,#setupAuditPage .locked-list-pager,#warehousePage .locked-list-pager{gap:5px;padding:6px;font-size:12px;}#reportAuditPage .locked-pager-actions,#setupAuditPage .locked-pager-actions,#warehousePage .locked-pager-actions{gap:4px;}#reportAuditPage .locked-list-pager input,#setupAuditPage .locked-list-pager input,#warehousePage .locked-list-pager input{width:42px;}#reportAuditPage .locked-list-pager button,#setupAuditPage .locked-list-pager button,#warehousePage .locked-list-pager button{padding:0 5px;font-size:12px;}#warehousePage .warehouse-scroll-btn{display:none;}}

#multiWarehousePanel:not([style*="display: none"]){display:flex!important;flex-direction:column;height:calc(100vh - var(--warehouse-toolbar-height,64px) - 56px);min-height:0;margin:0!important;}
#multiWarehousePanel>div:first-child{flex-shrink:0;padding:8px!important;}
#multiWarehousePanel #multiWarehouseScroll{flex:1;min-height:0;height:auto;}


/* Order status: compact legend beside the page title. */
#orderStatusPage .order-plan-head .master-subtitle{margin-right:0}
#orderStatusPage .order-status-legend{display:flex;align-items:center;flex-wrap:wrap;gap:6px 11px;margin:0 auto 0 8px;padding:7px 10px;max-width:100%;box-sizing:border-box;border:1px solid #e2e8f0;border-radius:8px;background:#f8fafc;color:#475569;font-size:11px;line-height:16px}
.order-status-legend-label{color:#64748b;font-weight:600;white-space:nowrap}
.order-status-legend-item{display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.order-status-legend-dot{display:inline-block;flex:0 0 11px;width:11px;height:11px;box-sizing:border-box;border:1px solid rgba(15,23,42,.16);border-radius:3px;background:var(--legend-color)}
@media(max-width:760px){#orderStatusPage .order-status-legend{flex-basis:100%;margin-left:0}}

#orderStatusTable .order-status-date-sort{display:inline-flex;align-items:center;gap:4px;padding:3px 5px;border:0;border-radius:4px;background:transparent;color:inherit;font:inherit;font-weight:inherit;white-space:nowrap;cursor:pointer}
#orderStatusTable .order-status-date-sort:hover{background:#dbe7f3}
#orderStatusTable .order-status-date-sort:focus-visible{outline:2px solid #0d9488;outline-offset:1px}
#orderStatusDeliverySortArrow{color:#64748b;font-size:12px}
#orderStatusTable th[aria-sort="ascending"] #orderStatusDeliverySortArrow,#orderStatusTable th[aria-sort="descending"] #orderStatusDeliverySortArrow{color:#0f766e}

#orderStatusTable .order-status-schedule-btn{display:inline-block;margin-right:5px;padding:3px 7px;border:1px solid #0d9488;border-radius:4px;background:#fff;color:#0f766e;font-size:11px;font-weight:600;line-height:16px;white-space:nowrap;cursor:pointer;vertical-align:middle}
#orderStatusTable .order-status-schedule-btn:hover{background:#ccfbf1}
#orderStatusTable .order-status-schedule-btn:focus-visible{outline:2px solid #0d9488;outline-offset:2px}
.schedule-order-source{margin:0 0 12px;padding:9px 12px;border:1px solid #99d9c4;border-radius:6px;background:#ecfdf5;color:#065f46;font-size:13px;line-height:1.6}

.schedule-order-return-bar{align-items:center;flex-wrap:wrap;gap:8px 12px;margin:0 0 10px;font-size:12px;color:#64748b}
#scheduleOrderReturnBtn{border-color:#99d9c4;color:#0f766e;background:#f0fdfa}
#scheduleOrderReturnBtn:hover{background:#ccfbf1}

.similar-process-box{width:1050px;max-width:calc(100vw - 30px);max-height:90vh;overflow:auto}
.similar-note{padding:10px 12px;background:#f0fdfa;border:1px solid #99f6e4;border-radius:6px;color:#0f766e;font-size:13px;line-height:1.6}
.similar-layout{grid-template-columns:220px minmax(0,1fr);gap:18px}.similar-groups{display:flex;flex-direction:column;gap:10px}
.similar-groups select{width:100%;min-height:260px;padding:6px;border:1px solid #cbd5e1;border-radius:5px}.similar-groups option{padding:8px 5px}
.similar-fields{display:flex;flex-wrap:wrap;align-items:end;gap:10px;margin-bottom:14px}.similar-fields label{display:flex;flex-direction:column;gap:6px;font-size:13px;color:#475569}
.similar-fields input:not([type=checkbox]){box-sizing:border-box;max-width:100%;width:220px;padding:8px;border:1px solid #cbd5e1;border-radius:5px}.similar-fields .similar-enabled{flex-direction:row;align-items:center;padding-bottom:10px}
.similar-member-add{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:10px}.similar-member-add input,.similar-member-add select{min-width:0;flex:1 1 230px;padding:8px;border:1px solid #cbd5e1;border-radius:5px}
.similar-member-table{width:100%;border-collapse:collapse;font-size:13px}.similar-member-table th,.similar-member-table td{border:1px solid #e2e8f0;padding:8px;text-align:left;overflow-wrap:anywhere}.similar-member-table th{background:#f1f5f9}
.similar-remove{padding:5px 8px;background:#fff;border:1px solid #fecaca;color:#b91c1c;border-radius:4px;cursor:pointer}#similarDeleteGroup{margin-top:12px}
.similar-empty{padding:24px 12px;color:#64748b;text-align:center}#similarSaveMessage{margin-right:auto;color:#0f766e;font-size:13px}
@media(max-width:760px){.similar-layout{grid-template-columns:1fr}.similar-groups select{min-height:100px}.similar-fields input:not([type=checkbox]){width:190px}}
