/* NetCat Client 样式文件 */

/* 基础样式 */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: #f8f9fa;
}

/* 导航栏样式 */
.navbar-brand {
    font-weight: 600;
}

/* 卡片样式 */
.card {
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 1.5rem;
}

.card-header {
    border-bottom: 1px solid rgba(0,0,0,.125);
    font-weight: 600;
}

/* 表格样式 */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
}

.table th {
    font-weight: 600;
    border-top: none;
}

/* 按钮样式 */
.btn-group-sm > .btn {
    border-radius: 4px;
}

/* 状态徽章 */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* 进度条样式 */
.progress {
    border-radius: 10px;
}

.progress-bar {
    border-radius: 10px;
}

/* 模态框样式 */
.modal-content {
    border-radius: 10px;
    border: none;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* 任务树样式 */
.task-tree {
    padding: 0;
}

.task-tree li {
    margin-bottom: 0.5rem;
}

.task-tree .toggle-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.task-tree .node-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.task-tree .node-checkbox:indeterminate {
    /* 支持中间状态的样式 */
    background-color: #e9ecef;
}

/* 树状节点悬停效果 */
.task-tree div:hover {
    background-color: rgba(0, 123, 255, 0.05);
    border-radius: 4px;
}

/* 平滑过渡 */
.task-tree ul {
    transition: all 0.2s ease-in-out;
}

.task-tree ul.collapsing {
    overflow: hidden;
}

/* Vue + Element UI 首页样式 */
.dashboard-container {
    padding: 0;
}

.dashboard-container .stat-card {
    margin-bottom: 20px;
}

.dashboard-container .card-header {
    display: flex;
    align-items: center;
    padding: 15px 20px;
}

.dashboard-container .card-title {
    font-size: 16px;
    font-weight: 600;
    color: #303133;
}

.dashboard-container .card-title i {
    margin-right: 8px;
}

.dashboard-container .stat-content {
    padding: 10px 0;
}

.dashboard-container .stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.dashboard-container .stat-label {
    color: #909399;
    font-size: 14px;
}

.dashboard-container .stat-value {
    font-size: 24px;
    font-weight: 600;
    color: #303133;
}

.dashboard-container .stat-warning {
    color: #e6a23c;
}

.dashboard-container .stat-info {
    color: #409eff;
}

.dashboard-container .stat-desc {
    color: #909399;
    font-size: 12px;
}

.dashboard-container .log-item {
    padding: 10px 0;
    border-bottom: 1px solid #ebeef5;
}

.dashboard-container .log-item:last-child {
    border-bottom: none;
}

.dashboard-container .log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.dashboard-container .log-time {
    color: #909399;
    font-size: 12px;
}

.dashboard-container .log-message {
    margin: 5px 0;
    color: #606266;
    font-size: 14px;
}

.dashboard-container .log-link {
    color: #409eff;
    font-size: 12px;
    text-decoration: none;
}

.dashboard-container .empty-state {
    text-align: center;
    padding: 40px 0;
    color: #909399;
}

.dashboard-container .empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    display: block;
}

.dashboard-container .text-muted {
    color: #909399;
}

/* ============================================
   任务详情页 - 紧凑型信息网格样式
   ============================================ */

/* 任务信息等高左右布局 */
.task-info-same-height-row {
    display: flex;
    gap: 20px;
    margin-bottom: 1.5rem;
    align-items: stretch;
}

.task-info-left-card-same-height {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

.task-info-left-card-same-height .el-card__body {
    flex: 1;
    overflow-y: auto;
}

.task-info-right-card-same-height {
    flex: 1;
    min-width: 0;
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
}

.task-info-right-card-same-height .el-card__body {
    flex: 1;
    overflow-y: auto;
}

.task-def-tree-container {
    height: 100%;
    min-height: 400px;
    overflow-y: auto;
}

/* 任务定义树节点样式 */
.def-tree-node {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 2px 0;
}

.def-tree-label {
    flex: 0 1 auto;
}

.def-tree-desc-icon {
    flex: 0 0 auto;
    color: #909399;
    cursor: help;
    font-size: 14px;
}

.def-tree-desc-icon:hover {
    color: #409eff;
}

/* 响应式：小屏幕下垂直排列 */
@media (max-width: 1200px) {
    .task-info-same-height-row {
        flex-direction: column;
        align-items: stretch;
    }

    .task-info-left-card-same-height,
    .task-info-right-card-same-height {
        flex: none;
        margin-bottom: 1.5rem;
    }

    .task-def-tree-container {
        min-height: 300px;
    }
}

/* 信息区域容器 */
.info-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

/* 核心信息网格 - 自适应多列布局 */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 4px 12px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #fafbfc 0%, #f5f7fa 100%);
    border-radius: 6px;
    border: 1px solid #ebeef5;
}

/* 信息项 - 行内布局 */
.info-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 0;
    min-height: 22px;
}

/* 标签样式 */
.info-label {
    font-size: 11px;
    font-weight: 500;
    color: #909399;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 50px;
}

.info-label::after {
    content: ':';
    margin-left: 1px;
    color: #c0c4cc;
}

/* 值样式 */
.info-value {
    font-size: 12px;
    color: #303133;
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.info-value--primary {
    font-weight: 600;
    color: #409eff;
}

.info-value--muted {
    color: #606266;
    font-size: 12px;
}

.info-value--error {
    color: #f56c6c;
    font-size: 12px;
}

/* 进度条区域 */
.info-progress {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: #fafbfc;
    border-radius: 6px;
    border: 1px solid #ebeef5;
}

.info-progress-bar {
    flex: 1;
    max-width: 300px;
}

/* 描述区域 */
.info-description {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 16px;
    background: #fafbfc;
    border-radius: 6px;
    border: 1px solid #ebeef5;
}

.info-description .info-value {
    white-space: normal;
    line-height: 1.5;
}

/* 错误信息区域 */
.info-error {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 16px;
    background: linear-gradient(135deg, #fef0f0 0%, #fde2e2 100%);
    border-radius: 6px;
    border: 1px solid #fbc4c4;
}

.info-error .info-label {
    color: #f56c6c;
}

.info-error .info-value {
    white-space: normal;
    line-height: 1.5;
    word-break: break-all;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: 1fr;
        gap: 4px 0;
    }
    
    .info-item {
        padding: 8px 0;
        border-bottom: 1px dashed #ebeef5;
    }
    
    .info-item:last-child {
        border-bottom: none;
    }
    
    .info-progress,
    .info-description,
    .info-error {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .info-progress-bar {
        max-width: 100%;
        width: 100%;
    }
}
