/* ==================== 任务概况页面样式 ==================== */

/* 任务概况页面容器 - 确保样式不会影响其他页面 */
.task-overview-container {
    height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    padding: 24px;
}

/* 主要内容区域 */
.task-overview-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 24px;
    overflow: auto;
}

/* 页面标题区域 */
.task-overview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.task-overview-title {
    font-size: 24px;
    font-weight: 600;
    color: #1d2129;
}



/* 数据统计卡片区域 */
.task-stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.task-overview-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    transition: transform 0.3s, box-shadow 0.3s;
}

.task-overview-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.task-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.task-card-title {
    font-size: 14px;
    color: #86909c;
    font-weight: 500;
}

.task-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.task-card-value {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
    color: #1d2129;
}

.task-card-footer {
    font-size: 13px;
    color: #86909c;
}

/* 图表区域 */
.task-charts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.task-chart-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    height: 300px;
    border: 1px solid #e5e7eb;
}

.task-chart-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1d2129;
}

.task-chart-wrapper {
    height: 240px;
    position: relative;
}

/* 右侧网格布局 */
.task-right-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 20px;
    margin-top: 20px;
}

.task-overview-section {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid #e5e7eb;
    height: 490px;
    overflow: hidden;
}

.task-section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #1d2129;
}

/* 子任务概况样式 */
.task-subtask-overview {
    display: flex;
    flex-direction: column;
    padding: 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    height: 267px;
    overflow: hidden;
}

.task-subtask-chart-container {
    position: relative;
    width: 100%;
    height: 200px;
    margin: 0 auto;
    flex-shrink: 0;
}

.task-subtask-chart-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}

.task-subtask-chart-value {
    font-size: 28px;
    font-weight: 700;
    color: #1d2129;
    line-height: 1.2;
}

.task-subtask-chart-label {
    font-size: 14px;
    color: #4e5969;
    margin-top: 4px;
}

.task-subtask-legend {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 8px;
    padding-bottom: 5px;
    flex-shrink: 0;
    max-height: 60px;
    overflow: hidden;
}

.task-subtask-legend-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.task-subtask-legend-color {
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.task-subtask-legend-label {
    font-size: 12px;
    color: #4e5969;
    white-space: nowrap;
}

.task-subtask-progress-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: #f8f9fa;
    border-radius: 6px;
    transition: all 0.3s;
}

.task-subtask-progress-item:hover {
    background: #e5e7eb;
}

.task-subtask-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.task-subtask-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.task-subtask-total .task-subtask-icon {
    background-color: #e6f7ff;
    color: #1890ff;
}

.task-subtask-completed .task-subtask-icon {
    background-color: #f6ffed;
    color: #52c41a;
}

.task-subtask-in-progress .task-subtask-icon {
    background-color: #fff7e6;
    color: #fa8c16;
}

.task-subtask-pending .task-subtask-icon {
    background-color: #fff2f0;
    color: #ff4d4f;
}

.task-subtask-label {
    font-size: 14px;
    color: #1d2129;
    font-weight: 500;
}

.task-subtask-value {
    font-size: 16px;
    font-weight: 700;
    color: #1d2129;
}

.task-subtask-percentage {
    font-size: 12px;
    color: #86909c;
    margin-left: 10px;
}

/* 员工任务排行样式 */
.task-employee-ranking {
    margin-top: 15px;
    height: 390px;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 5px;
}

/* 隐形滚动条样式 */
.task-employee-ranking {
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

/* Webkit内核浏览器的隐形滚动条 */
.task-employee-ranking::-webkit-scrollbar {
    width: 6px;
    background: transparent;
}

.task-employee-ranking::-webkit-scrollbar-track {
    background: transparent;
}

.task-employee-ranking::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.task-employee-ranking:hover::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
}

/* 当鼠标悬停在滚动区域时显示滚动条 */
.task-employee-ranking::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.4);
}

.task-employee-ranking-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    transition: all 0.3s;
}

.task-employee-ranking-item:hover {
    background: #e5e7eb;
    transform: translateX(5px);
}

.task-employee-ranking-info {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
}

.task-employee-ranking-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #1890ff;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 500;
    font-size: 14px;
}

.task-employee-ranking-name {
    font-weight: 500;
    flex: 1;
}

.task-employee-ranking-stats {
    display: flex;
    gap: 15px;
    font-size: 12px;
}

.task-employee-ranking-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.task-employee-ranking-count {
    font-weight: 700;
    color: #1890ff;
}

.task-employee-ranking-completed {
    color: #52c41a;
}

.task-employee-ranking-inprogress {
    color: #fa8c16;
}

.task-employee-ranking-percentage {
    font-size: 10px;
    color: #86909c;
}

/* 任务预警样式 */
.task-alerts-container {
    margin-top: 20px;
    height: 330px;
    overflow-y: auto;
    overflow-x: auto;
    padding-right: 5px;
}

/* 隐形滚动条样式 */
.task-alerts-container {
    scrollbar-width: thin;
    scrollbar-color: transparent transparent;
}

/* Webkit内核浏览器的隐形滚动条 */
.task-alerts-container::-webkit-scrollbar {
    width: 6px;
    background: transparent;
}

.task-alerts-container::-webkit-scrollbar-track {
    background: transparent;
}

.task-alerts-container::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.task-alerts-container:hover::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.3);
}

.task-alerts-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

.task-alert-filters {
    display: flex;
    gap: 10px;
}

.task-alert-filter-btn {
    padding: 4px 12px;
    border: none;
    border-radius: 16px;
    background: #f5f5f5;
    font-size: 12px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.task-alert-filter-btn:hover {
    background: #e8e8e8;
}

.task-alert-filter-btn.active {
    background: #1890ff;
    color: white;
}

.task-alerts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.task-alerts-table th {
    background: #f5f5f5;
    padding: 10px 12px;
    text-align: left;
    font-weight: 500;
    color: #333;
    border-bottom: 1px solid #ddd;
    font-size: 12px;
}

/* 任务类型、任务状态、操作列居中 */
.task-alerts-table th:nth-child(3),
.task-alerts-table th:nth-child(4),
.task-alerts-table th:nth-child(8) {
    text-align: center;
}

.task-alerts-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f0f0f0;
    color: #666;
    font-size: 12px;
}

/* 任务类型、任务状态、操作单元格居中 */
.task-alerts-table td:nth-child(3),
.task-alerts-table td:nth-child(4),
.task-alerts-table td:nth-child(8) {
    text-align: center;
}

.task-alerts-table tbody tr:hover {
    background-color: #f8f9fa;
}

/* 任务预警专用样式 - 避免与任务列表样式冲突 */

/* 任务类型标签 - 任务预警专用 */
.task-overview-type {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    min-width: 60px;
    background-color: #f5f5f5;
    color: #666;
}

.task-overview-type-goods-in {
    background-color: #e6f7ff;
    color: #1890ff;
}

.task-overview-type-consumables-in {
    background-color: #f0f5ff;
    color: #0052d9;
}

.task-overview-type-sales-out {
    background-color: #f6ffed;
    color: #52c41a;
}

.task-overview-type-stock-move {
    background-color: #fff7e6;
    color: #fa8c16;
}

.task-overview-type-stock-replenish {
    background-color: #fff1f0;
    color: #ff4d4f;
}

.task-overview-type-return-in {
    background-color: #f9f0ff;
    color: #722ed1;
}

/* 优先级标签 - 任务预警专用 */
.task-overview-priority {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    background-color: #f5f5f5;
    color: #666;
}

.task-overview-priority-normal {
    background-color: #f6ffed;
    color: #52c41a;
}

.task-overview-priority-high {
    background-color: #fff2f0;
    color: #ff4d4f;
}

/* 状态标签 - 任务预警专用 */
.task-overview-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    min-width: 60px;
    background-color: #f5f5f5;
    color: #666;
}

.task-overview-status-pending {
    background-color: #fff7e6;
    color: #fa8c16;
}

.task-overview-status-processing {
    background-color: #e6f7ff;
    color: #1890ff;
}

.task-overview-status-completed {
    background-color: #e8f5e8;
    color: #52c41a;
}

.task-overview-status-cancelled {
    background-color: #fff2f0;
    color: #ff4d4f;
}

.task-overview-status-exception {
    background-color: #fff2f0;
    color: #ff4d4f;
}

/* 操作按钮 - 任务预警专用 */
.task-overview-action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    background-color: #1890ff;
    color: white;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.3s;
    min-width: 60px;
    text-align: center;
}

.task-overview-action-btn:hover {
    background-color: #1677ff;
}

.task-overview-action-btn.secondary {
    background-color: white;
    color: #1890ff;
    border: 1px solid #1890ff;
}

.task-overview-action-btn.secondary:hover {
    background-color: #f0f5ff;
}

/* 详情按钮特定样式 */
.primary-actions .task-overview-action-btn {
    background-color: #1890ff;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 60px;
}

.primary-actions .task-overview-action-btn:hover {
    background-color: #1677ff;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(24, 144, 255, 0.3);
}

/* 分页控件 */
.task-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-top: 1px solid #e5e7eb;
}

.task-pagination-info {
    font-size: 14px;
    color: #86909c;
}

.task-pagination-controls {
    display: flex;
    gap: 8px;
}

.task-pagination-controls button {
    padding: 6px 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    background: white;
    font-size: 12px;
    color: #4b5563;
    cursor: pointer;
    transition: all 0.2s;
}

.task-pagination-controls button:hover:not(:disabled) {
    background-color: #f3f4f6;
}

.task-pagination-controls button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .task-charts-grid, .task-overview-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .task-overview-container {
        flex-direction: column;
    }

    .task-stats-cards {
        grid-template-columns: 1fr 1fr;
    }

    .task-alerts-table {
        display: block;
        overflow-x: auto;
    }
}

@media (max-width: 576px) {
    .task-stats-cards {
        grid-template-columns: 1fr;
    }
}