/* 任务分类 */
.task-categories {
    padding: 10px;
    overflow-y: auto;
}

.category-card {
    background-color: #f9fafb;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.category-card:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.category-card.selected {
    border-color: #3b82f6;
    background-color: #eff6ff;
}

.category-name {
    font-weight: 500;
}

.category-count {
    background-color: #e5e7eb;
    color: #4b5563;
    padding: 2px 8px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.task-status {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 8px;
}

.task-status.running {
    background-color: #3b82f6;
}

.task-status.pending {
    background-color: #f59e0b;
}

.task-status.completed {
    background-color: #10b981;
}

.task-status.failed {
    background-color: #ef4444;
}

.task-status.killed {
    background-color: #9ca3af;
}

/* 创建任务表单 */
.create-task-form {
    padding: 15px;
    border-top: 1px solid #e5e7eb;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #4b5563;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 0.9rem;
}

.form-group textarea {
    height: 80px;
    resize: vertical;
}

.form-actions {
    text-align: right;
}

/* 主内容区 */
.content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.tasks-header {
    background-color: white;
}

.tasks-container {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

/* 任务列表 */
.tasks-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 15px;
}

.task-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.task-card:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.task-header {
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
}

.task-id {
    font-weight: 600;
    color: #1e3a8a;
}

.task-info {
    padding: 15px;
}

.task-command {
    background-color: #f9fafb;
    padding: 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
    margin: 10px 0;
    white-space: pre-wrap;
    word-break: break-all;
}

.task-actions {
    display: flex;
    justify-content: flex-end;
    padding: 10px 15px;
    border-top: 1px solid #e5e7eb;
}

.task-actions button {
    background-color: #2563eb;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-left: 8px;
}

.task-actions button:hover {
    background-color: #1d4ed8;
}

.task-actions button.kill {
    background-color: #dc2626;
}

.task-actions button.kill:hover {
    background-color: #b91c1c;
}

/* 任务详情面板 */
.task-detail-panel {
    position: fixed;
    top: 60px;
    right: 0;
    width: 40%;
    height: calc(100vh - 60px);
    background-color: white;
    box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
    z-index: 100;
    transform: translateX(100%);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.task-detail-panel.show {
    transform: translateX(0);
}

.task-detail-content {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

/* 任务详情样式 */
.detail-section {
    margin-bottom: 20px;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
}

.detail-section h3 {
    padding: 10px 15px;
    background-color: #f9fafb;
    font-size: 1rem;
    font-weight: 600;
    color: #1e3a8a;
    border-bottom: 1px solid #e5e7eb;
}

.detail-item {
    padding: 8px 15px;
    display: flex;
    border-bottom: 1px solid #f3f4f6;
}

.detail-item:last-child {
    border-bottom: none;
}

.detail-label {
    flex: 0 0 120px;
    font-weight: 500;
    color: #4b5563;
}

.detail-value {
    flex: 1;
}

.task-logs {
    padding: 15px;
}

.task-logs pre {
    background-color: #1e293b;
    color: #f8fafc;
    padding: 15px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 0.9rem;
    overflow-x: auto;
    white-space: pre-wrap;
    max-height: 300px;
    overflow-y: auto;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 30px;
    color: #6b7280;
    font-size: 1.1rem;
}

/* 状态标签样式 */
.detail-value.status-running {
    color: #1e40af;
    font-weight: 500;
}

.detail-value.status-pending {
    color: #9a3412;
    font-weight: 500;
}

.detail-value.status-completed {
    color: #065f46;
    font-weight: 500;
}

.detail-value.status-failed {
    color: #991b1b;
    font-weight: 500;
}

.detail-value.status-killed {
    color: #4b5563;
    font-weight: 500;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }
    
    .task-detail-panel {
        width: 100%;
    }
} 

