
        * { margin: 0; padding: 0; box-sizing: border-box; }
        body { font-family: 'Microsoft YaHei', Arial, sans-serif; background: #ffffff; padding: 20px; min-height: 100vh; }
        .container { max-width: 2400px; margin: 0 auto; background: white; border-radius: 15px; box-shadow: 0 20px 60px rgba(0,0,0,0.3); overflow: hidden; }
        .header { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 30px; text-align: center; }
        .header h1 { font-size: 32px; margin-bottom: 10px; }
        .header p { font-size: 16px; opacity: 0.9; }
        .tabs { display: flex; background: #f5f5f5; border-bottom: 2px solid #ddd; overflow-x: auto; justify-content: flex-start; }
        .tab { padding: 15px 25px; text-align: center; cursor: pointer; font-size: 14px; font-weight: bold; transition: all 0.3s; border: none; background: none; white-space: nowrap; }
        .tab:hover { background: #e0e0e0; }
        .tab.active { background: white; color: #667eea; border-bottom: 3px solid #667eea; }
        .content { padding: 30px; }
        .tab-content { display: none; }
        .tab-content.active { display: block; }
        .btn { padding: 12px 24px; border: none; border-radius: 25px; cursor: pointer; font-size: 14px; font-weight: bold; transition: all 0.3s; display: inline-flex; align-items: center; gap: 8px; }
        .btn-primary { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; }
        .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4); }
        .btn-success { background: #28a745; color: white; }
        .btn-danger { background: #dc3545; color: white; }
        .btn-warning { background: #ffc107; color: #333; }
        .btn-secondary { background: #6c757d; color: white; }
        .btn-info { background: #17a2b8; color: white; }
        .btn-sm { padding: 6px 12px; font-size: 12px; }
        .toolbar { display: flex; gap: 10px; margin-bottom: 20px; flex-wrap: wrap; align-items: center; }
        .toolbar-left { flex: 1; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
        .search-box { flex: 1; max-width: 300px; position: relative; }
        .search-input { width: 100%; padding: 12px 45px 12px 20px; border: 2px solid #ddd; border-radius: 25px; font-size: 14px; transition: all 0.3s; }
        .search-input:focus { outline: none; border-color: #667eea; box-shadow: 0 0 10px rgba(102, 126, 234, 0.2); }
        .search-clear { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); background: #dc3545; color: white; border: none; border-radius: 50%; width: 24px; height: 24px; cursor: pointer; font-size: 14px; display: none; align-items: center; justify-content: center; transition: all 0.3s; }
        .search-clear:hover { background: #c82333; transform: translateY(-50%) scale(1.1); }
        .search-clear.active { display: flex; }
        
        /* 统一的按钮容器样式 */
        .filter-buttons, .sort-buttons { 
            display: flex; 
            gap: 5px; 
            background: #f0f0f0; 
            border-radius: 25px; 
            padding: 4px; 
        }
        
        /* 统一的按钮样式 */
        .filter-btn, .sort-btn { 
            padding: 8px 16px; 
            border: none; 
            background: transparent; 
            cursor: pointer; 
            font-size: 13px; 
            font-weight: bold; 
            color: #666; 
            border-radius: 20px; 
            transition: all 0.3s; 
            white-space: nowrap; 
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Microsoft YaHei', sans-serif;
        }
        
        /* 统一的激活状态样式 */
        .filter-btn.active, .sort-btn.active { 
            background: white; 
            color: #667eea; 
            box-shadow: 0 2px 5px rgba(0,0,0,0.1); 
        }
        
        /* 统一的悬停效果 */
        .filter-btn:hover:not(.active), .sort-btn:hover:not(.active) { 
            background: rgba(255,255,255,0.5); 
        }
        .workers-section { background: #f9f9f9; border-radius: 10px; margin-bottom: 20px; overflow: hidden; transition: all 0.3s; }
        .workers-section-header { display: flex; justify-content: space-between; align-items: center; padding: 20px; cursor: pointer; user-select: none; transition: background 0.3s; }
        .workers-section-header:hover { background: #f0f0f0; }
        .workers-section-header h3 { color: #333; display: flex; align-items: center; gap: 10px; }
        .collapse-icon { font-size: 20px; transition: transform 0.3s; color: #667eea; }
        .collapse-icon.collapsed { transform: rotate(-90deg); }
        .workers-section-actions { display: flex; gap: 10px; align-items: center; }
        .workers-content { max-height: 1000px; overflow: hidden; transition: max-height 0.3s ease-in-out, padding 0.3s; padding: 0 20px 20px 20px; }
        .workers-content.collapsed { max-height: 0; padding: 0 20px; }
        .workers-grid { display: grid; grid-template-columns: repeat(10, 1fr); gap: 10px; }
        @media (max-width: 1800px) { .workers-grid { grid-template-columns: repeat(8, 1fr); } }
        @media (max-width: 1400px) { .workers-grid { grid-template-columns: repeat(6, 1fr); } }
        @media (max-width: 1000px) { .workers-grid { grid-template-columns: repeat(4, 1fr); } }
        @media (max-width: 768px) { .workers-grid { grid-template-columns: repeat(3, 1fr); } }
        @media (max-width: 480px) { .workers-grid { grid-template-columns: repeat(2, 1fr); } }
        .worker-card { background: white; padding: 12px; border-radius: 8px; border-left: 4px solid #667eea; transition: all 0.3s; cursor: pointer; position: relative; }
        .worker-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.15); transform: translateY(-2px); border-left-color: #764ba2; }
        .worker-card.selected { border-left-color: #28a745; border-left-width: 6px; background: linear-gradient(135deg, #e8f5e9 0%, #ffffff 100%); box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3); }
        .worker-card.available { border-left-color: #28a745; }
        .worker-card.busy { border-left-color: #ffc107; }
        .worker-card.overloaded { border-left-color: #dc3545; background: #ffe6e6 !important; }
        .worker-info h4 { font-size: 14px; color: #333; margin-bottom: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .worker-info p { font-size: 11px; color: #666; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .worker-info .deadline-info { font-size: 10px; color: #28a745; font-weight: bold; margin-top: 2px; }
        .worker-info .deadline-info.warning { color: #ffc107; }
        .worker-info .deadline-info.danger { color: #dc3545; }
        .worker-delete-btn { position: absolute; top: 5px; right: 5px; width: 20px; height: 20px; border-radius: 50%; background: #dc3545; color: white; border: none; cursor: pointer; font-size: 12px; display: none; align-items: center; justify-content: center; transition: all 0.3s; z-index: 10; }
        .worker-card:hover .worker-delete-btn { display: flex; }
        .worker-delete-btn:hover { background: #c82333; transform: scale(1.2); }
        .table-container { background: white; border-radius: 10px; padding: 20px; box-shadow: 0 2px 10px rgba(0,0,0,0.1); margin-bottom: 20px; }
        .table-header { margin-bottom: 15px; }
        .table-header h3 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 15px; }
        .table-controls { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
        .table-controls-left { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; flex: 1; }
        .filter-badge { background: #28a745; color: white; padding: 5px 15px; border-radius: 15px; font-size: 13px; display: inline-flex; align-items: center; gap: 5px; }
        .status-badge { display: inline-block; padding: 4px 12px; border-radius: 12px; font-size: 12px; font-weight: bold; color: white; white-space: nowrap; }
        .data-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 13px; }
        .data-table th { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 12px 10px; text-align: left; font-weight: bold; position: sticky; top: 0; z-index: 10; font-size: 13px; }
        .data-table td { padding: 10px; border-bottom: 1px solid #ddd; }
        .data-table tr:hover { background: #f5f5f5; }
        .data-table tr.overdue { background: #ffe6e6; }
        .data-table tr.completed { background: #e8f5e9; }
        
        /* 工资表专用样式 - 优化列宽 */
        #salaryTable th:nth-child(1) { min-width: 80px; } /* 款号 */
        #salaryTable th:nth-child(2) { min-width: 100px; } /* 颜色 */
        #salaryTable th:nth-child(3) { min-width: 80px; } /* 新款/翻单 */
        #salaryTable th:nth-child(4) { min-width: 70px; max-width: 70px; white-space: nowrap; } /* 首单 - 确保有足够空间 */
        #salaryTable th:nth-child(5) { min-width: 130px; } /* 开款时间 */
        #salaryTable th:nth-child(6) { min-width: 130px; } /* 完成时间 */
        #salaryTable th:nth-child(7) { min-width: 110px; } /* 码数 - 增加宽度以容纳F码 */
        #salaryTable th:nth-child(8) { min-width: 70px; } /* 工价 */
        #salaryTable th:nth-child(9) { min-width: 70px; } /* 总件数 */
        /* 缩小补贴列宽度 */
        #salaryTable th:nth-child(10),
        #salaryTable th:nth-child(11),
        #salaryTable th:nth-child(12),
        #salaryTable th:nth-child(13),
        #salaryTable th:nth-child(14),
        #salaryTable th:nth-child(15),
        #salaryTable th:nth-child(16),
        #salaryTable th:nth-child(17),
        #salaryTable th:nth-child(18) { 
            min-width: 60px; 
            max-width: 80px;
            font-size: 11px;
            padding: 8px 5px;
            line-height: 1.3;
        }
        #salaryTable th:nth-child(19) { min-width: 90px; } /* 工资 */
        #salaryTable th:nth-child(20) { min-width: 90px; } /* 补偿后平均单价 */
        
        /* 确保首单列内容不换行 */
        #salaryTable td:nth-child(4) { white-space: nowrap; }
        
        /* 生产计划表专用样式 - 确保完成日期列和操作列不重叠 */
        #dataTable th:nth-child(17) { min-width: 160px; } /* 完成日期列 */
        #dataTable td:nth-child(17) { min-width: 160px; padding: 8px; } /* 完成日期列 */
        #dataTable th:nth-child(18) { min-width: 200px; white-space: nowrap; } /* 操作列 */
        #dataTable td:nth-child(18) { min-width: 200px; white-space: nowrap; padding: 8px; } /* 操作列 */
        
        .table-image { width: 50px; height: 50px; object-fit: cover; border-radius: 5px; cursor: pointer; }
        .countdown { display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px; border-radius: 10px; font-size: 11px; font-weight: bold; }
        .countdown.danger { background: #dc3545; color: white; }
        .countdown.warning { background: #ffc107; color: #333; }
        .countdown.safe { background: #28a745; color: white; }
        .countdown.neutral { background: #6c757d; color: white; }
        .order-type-badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 11px; font-weight: bold; margin-left: 5px; }
        .order-type-new { background: #28a745; color: white; }
        .order-type-repeat { background: #17a2b8; color: white; }
        .datetime-input { padding: 5px; border: 2px solid #ddd; border-radius: 5px; font-size: 12px; }
        .modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 1000; justify-content: center; align-items: center; overflow-y: auto; padding: 20px; }
        .modal.active { display: flex; }
        .modal-content { background: white; border-radius: 15px; padding: 30px; max-width: 700px; width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: 0 10px 40px rgba(0,0,0,0.3); }
        .modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; padding-bottom: 15px; border-bottom: 2px solid #ddd; }
        .modal-header h2 { color: #667eea; font-size: 24px; }
        .close-btn { font-size: 28px; cursor: pointer; color: #999; transition: color 0.3s; }
        .close-btn:hover { color: #333; }
        .modal-body { margin-bottom: 20px; }
        .modal-footer { display: flex; gap: 10px; justify-content: flex-end; padding-top: 15px; border-top: 2px solid #ddd; }
        .form-group { margin-bottom: 20px; }
        .form-group label { display: block; margin-bottom: 8px; font-weight: bold; color: #333; }
        .form-control { width: 100%; padding: 10px 15px; border: 2px solid #ddd; border-radius: 8px; font-size: 14px; transition: all 0.3s; }
        .form-control:focus { outline: none; border-color: #667eea; box-shadow: 0 0 10px rgba(102, 126, 234, 0.2); }
        .radio-group { display: flex; gap: 20px; margin-top: 10px; }
        .radio-label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
        .radio-label input[type="radio"] { width: 18px; height: 18px; cursor: pointer; }
        .image-upload-area { border: 2px dashed #ddd; border-radius: 10px; padding: 30px; text-align: center; cursor: pointer; transition: all 0.3s; background: #f9f9f9; }
        .image-upload-area:hover { border-color: #667eea; background: #f0f4ff; }
        .image-preview-container { margin-top: 15px; display: flex; gap: 10px; flex-wrap: wrap; }
        .image-preview-item { position: relative; width: 120px; height: 120px; }
        .image-preview-item img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; border: 2px solid #ddd; }
        .image-preview-remove { position: absolute; top: -8px; right: -8px; background: #dc3545; color: white; border-radius: 50%; width: 24px; height: 24px; display: flex; align-items: center; justify-content: center; cursor: pointer; font-size: 16px; font-weight: bold; }
        .image-viewer { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); z-index: 2000; justify-content: center; align-items: center; }
        .image-viewer.active { display: flex; }
        .image-viewer img { max-width: 90%; max-height: 90%; border-radius: 10px; }
        .image-viewer-close { position: absolute; top: 20px; right: 20px; color: white; font-size: 40px; cursor: pointer; }
        .alert { padding: 15px 20px; border-radius: 8px; margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
        .alert-success { background: #d4edda; border-left: 5px solid #28a745; color: #155724; }
        .alert-danger { background: #f8d7da; border-left: 5px solid #dc3545; color: #721c24; }
        .alert-info { background: #d1ecf1; border-left: 5px solid #17a2b8; color: #0c5460; }
        .alert-stats-container { display: flex; flex-wrap: wrap; gap: 15px; align-items: center; width: 100%; }
        .alert-main-message { flex: 1; min-width: 200px; }
        .alert-stats { display: flex; flex-wrap: wrap; gap: 10px; }
        .alert-stat-item { background: rgba(255,255,255,0.5); padding: 8px 15px; border-radius: 6px; font-size: 13px; font-weight: bold; white-space: nowrap; }
        .alert-stat-item .stat-label { color: #666; font-weight: normal; margin-right: 5px; }
        .alert-stat-item .stat-value { color: #333; font-size: 16px; }
        
        /* 订单变更弹窗专用样式 */
        .change-worker-select { width: 100%; padding: 12px; border: 2px solid #ddd; border-radius: 8px; font-size: 14px; margin-top: 10px; }
        .change-worker-select:focus { outline: none; border-color: #667eea; }
        .order-change-info { background: #f0f7ff; padding: 15px; border-radius: 8px; margin-bottom: 20px; border-left: 4px solid #667eea; }
        .order-change-info p { margin: 8px 0; color: #333; font-size: 14px; }
        .order-change-info strong { color: #667eea; }
        .order-change-warning { background: #fff3cd; padding: 12px; border-radius: 8px; margin-top: 15px; border-left: 4px solid #ffc107; color: #856404; font-size: 13px; }
        
        /* 工资表编辑模式样式 */
        .salary-editable-input { width: 50px; padding: 4px; border: 2px solid #667eea; border-radius: 4px; text-align: center; font-size: 13px; font-weight: bold; }
        .salary-editable-input:focus { outline: none; border-color: #764ba2; background: #f0f4ff; }
        .salary-row-edited { background: #fff3cd !important; }
        
        .stats-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; margin-bottom: 30px; }
        .stat-card { background: white; padding: 25px; border-radius: 10px; box-shadow: 0 4px 15px rgba(0,0,0,0.1); border-left: 5px solid #667eea; }
        .stat-card h3 { font-size: 16px; color: #666; margin-bottom: 10px; }
        .stat-card .value { font-size: 32px; font-weight: bold; color: #667eea; margin-bottom: 5px; }
        .month-selector { display: flex; gap: 10px; align-items: center; background: #f0f0f0; padding: 10px 20px; border-radius: 25px; flex-wrap: wrap; }
        .month-btn { background: white; border: none; padding: 8px 16px; border-radius: 20px; cursor: pointer; font-weight: bold; transition: all 0.3s; }
        .month-btn:hover { background: #667eea; color: white; }
        .month-btn.active { background: #667eea; color: white; }
        .productivity-card { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); color: white; padding: 20px; border-radius: 10px; margin-bottom: 20px; }
        .productivity-card h3 { font-size: 18px; margin-bottom: 15px; }
        .productivity-value { font-size: 36px; font-weight: bold; margin: 10px 0; }
        .productivity-label { font-size: 14px; opacity: 0.9; }
        .date-range-picker { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
        .date-range-picker label { font-weight: bold; white-space: nowrap; }
        .date-range-picker input { padding: 8px 15px; border: 2px solid #ddd; border-radius: 20px; font-size: 14px; }
    