/**
 * 任务列表样式模块
 * 包含：任务卡片、任务菜单、任务按钮、空状态、Tab切换、工具列表
 */

/* ===== 🆕 阶段4：Tab 切换样式 ===== */
.panel-tabs {
    display: flex;
    border-bottom: 2px solid #e4e7ed;
    padding: 0;
    background: #fff;
}

.tab-btn {
    flex: 1;
    padding: 14px 12px;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    color: #606266;
    transition: all 0.3s;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.tab-btn:hover {
    color: #409eff;
    background-color: #f5f7fa;
}

.tab-btn.active {
    color: #409eff;
    font-weight: 600;
}

.tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: #409eff;
}

.tools-count {
    background: #f56c6c;
    color: #fff;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    min-width: 18px;
    text-align: center;
}

/* ===== 🆕 阶段4：操作按钮区域 ===== */
.panel-actions {
    padding: 12px 16px;
    border-bottom: 1px solid #e4e7ed;
    background: #fff;
}

/* ===== 🆕 阶段4：Tab内容区域 ===== */
.tab-content {
    flex: 1;
    overflow-y: auto;
}

/* ===== 🆕 阶段4：工具列表样式 ===== */
.tools-list {
    padding: 16px;
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #909399;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-title {
    font-size: 16px;
    font-weight: 600;
    color: #606266;
    margin-bottom: 8px;
}

.empty-hint {
    font-size: 13px;
    color: #909399;
    line-height: 1.6;
    margin: 0;
}

/* ===== 🆕 阶段5：工具卡片样式 ===== */
.tool-card {
    background-color: #ffffff;
    border: 1px solid #e4e7ed;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.3s;
    position: relative;
}

.tool-card:hover {
    border-color: #409eff;
    box-shadow: 0 2px 12px rgba(64, 158, 255, 0.15);
    transform: translateY(-2px);
}

.tool-header {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.tool-icon {
    font-size: 24px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    flex-shrink: 0;
}

.tool-info {
    flex: 1;
    min-width: 0;
}

.tool-name {
    font-size: 15px;
    font-weight: 600;
    color: #303133;
    margin-bottom: 4px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tool-meta {
    font-size: 12px;
    color: #909399;
    display: flex;
    align-items: center;
    gap: 6px;
}

.tool-description {
    font-size: 13px;
    color: #606266;
    line-height: 1.6;
    margin-bottom: 12px;
    padding-left: 52px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.tool-actions {
    display: flex;
    justify-content: flex-end;
    padding-top: 8px;
    border-top: 1px solid #f0f0f0;
}

.btn-run-tool {
    padding: 8px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 4px;
}

.btn-run-tool:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.btn-run-tool:active {
    transform: translateY(0);
}

/* 工具菜单按钮 */
.tool-card .tool-menu-btn {
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: transparent;
    color: #909399;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tool-card .tool-menu-btn:hover {
    background-color: #f4f4f5;
    color: #606266;
}

/* 工具下拉菜单 */
.tool-card .tool-menu {
    position: absolute;
    right: 16px;
    top: 56px;
    background: #ffffff;
    border: 1px solid #e4e7ed;
    border-radius: 6px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    z-index: 100;
    min-width: 140px;
    padding: 6px 0;
}

.tool-card .tool-menu-item {
    padding: 10px 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    font-size: 14px;
    color: #606266;
    transition: background-color 0.2s;
}

.tool-card .tool-menu-item:hover {
    background-color: #f5f7fa;
}

.tool-card .tool-menu-item .menu-icon {
    font-size: 16px;
}

.tool-card .tool-menu-item-danger {
    color: #f56c6c;
}

.tool-card .tool-menu-item-danger:hover {
    background-color: #fef0f0;
}

/* 任务卡片样式 */
.task-card {
    background-color: #ffffff;
    border: 1px solid #e4e7ed;
    border-radius: 6px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;  /* 支持绝对定位的菜单 */
}

.task-card:hover {
    border-color: #409eff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.task-card.active {
    border-color: #409eff;
    background-color: #ecf5ff;
}

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

.task-title {
    font-size: 15px;
    font-weight: 600;
    color: #303133;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.task-status {
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: 500;
}

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

.task-status.status-uploaded {
    background-color: #e1f3d8;
    color: #67c23a;
}

.task-status.status-closed {
    background-color: #fef0f0;
    color: #f56c6c;
}

.task-info {
    font-size: 12px;
    color: #909399;
    margin-bottom: 8px;
    line-height: 1.6;
}

/* 任务菜单按钮 */
.task-menu-btn {
    width: 24px;
    height: 24px;
    padding: 0;
    border: none;
    background: transparent;
    color: #909399;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.task-menu-btn:hover {
    background-color: #f4f4f5;
    color: #606266;
}

.task-menu-btn:active {
    background-color: #e9e9eb;
}

/* 任务下拉菜单 */
.task-menu {
    position: absolute;
    right: 16px;
    top: 48px;
    background: #ffffff;
    border: 1px solid #e4e7ed;
    border-radius: 4px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
    z-index: 100;
    min-width: 120px;
    padding: 4px 0;
}

.task-menu-item {
    padding: 8px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #606266;
    transition: background-color 0.2s;
}

.task-menu-item:hover {
    background-color: #f5f7fa;
}

.task-menu-item .menu-icon {
    font-size: 16px;
}

.task-menu-item-danger {
    color: #f56c6c;
}

.task-menu-item-danger:hover {
    background-color: #fef0f0;
}

/* 任务标题输入框（内联编辑） */
.task-title-input {
    width: 100%;
    padding: 4px 8px;
    border: 1px solid #409eff;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    color: #303133;
    outline: none;
    box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.1);
}

/* 任务操作区 */
.task-actions {
    display: flex;
    gap: 8px;
}

/* 任务按钮（通用） */
.task-btn {
    flex: 1;
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.task-btn-primary {
    background-color: #409eff;
    color: #ffffff;
}

.task-btn-primary:hover {
    background-color: #66b1ff;
}

.task-btn-warning {
    background-color: #e6a23c;
    color: #ffffff;
}

.task-btn-warning:hover {
    background-color: #ebb563;
}

.task-btn-danger {
    background-color: #f56c6c;
    color: #ffffff;
}

.task-btn-danger:hover {
    background-color: #f78989;
}

.task-btn-success {
    background-color: #67c23a;
    color: #ffffff;
}

.task-btn-success:hover {
    background-color: #85ce61;
}

/* 空态样式（已移到文件顶部的Tab切换区域） */

