* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: #333;
    min-height: 100vh;
}

.container {
    width: 100%;
    max-width: none; /* 移除最大宽度限制 */
    margin: 0;
    padding: 20px;
    min-width: 1200px; /* 确保最小宽度以避免过度压缩 */
}

.header {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.header h1 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 2.2em;
}

.case-info h2 {
    color: #e74c3c;
    margin-bottom: 10px;
    font-size: 1.4em;
}

.case-info p {
    line-height: 1.6;
    color: #555;
}

.analysis-objectives {
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.analysis-objectives h3 {
    color: #27ae60;
    margin-bottom: 10px;
}

.analysis-objectives ul {
    list-style-position: inside;
    color: #555;
}

.analysis-objectives li {
    margin-bottom: 5px;
}

.workspace {
    display: flex;
    gap: 20px;
    height: 80vh;
    min-height: 700px;
}

/* 当工作流激活时，保持左右布局，但右侧改为上下分区 */
.workspace.workflow-active {
    height: 90vh; /* 增加总高度以容纳更多内容 */
    min-height: 800px;
}

/* 右侧内容区域容器 */
.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar {
    width: 250px;
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
}

.sidebar h3 {
    color: #2c3e50;
    margin-bottom: 15px;
    border-bottom: 2px solid #3498db;
    padding-bottom: 5px;
}

.data-sources {
    margin-bottom: 30px;
}

.source-btn {
    display: block;
    width: 100%;
    padding: 12px;
    margin-bottom: 8px;
    background: #ecf0f1;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.source-btn:hover {
    background: #d5dbdb;
    transform: translateY(-2px);
}

.source-btn.active {
    background: #3498db;
    color: white;
}

.analysis-tools button {
    display: block;
    width: 100%;
    padding: 10px;
    margin-bottom: 8px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 13px;
}

.analysis-tools button:hover {
    background: #229954;
    transform: translateY(-2px);
}

/* 右侧内容区域容器 */
.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* 数据查看区域 */
.data-section {
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

/* 在L型布局模式下，数据区域在右上方 */
.workspace.workflow-active .data-section {
    flex: 0 0 40%; /* 占右侧区域的40%高度 */
    padding: 15px;
    margin-bottom: 0; /* 移除下边距，由main-area的gap处理 */
}

.workspace.workflow-active .data-section .table-container {
    flex: 1;
    min-height: 200px;
    max-height: 280px; /* 适当限制高度 */
}

.workspace.workflow-active .data-section .analysis-panel {
    flex: 0 0 auto;
    max-height: 100px; /* 进一步压缩分析面板 */
    min-height: 60px;
}

/* 工作流设计器区域 */
.workflow-section {
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    margin-left: 20px;
    transition: all 0.3s ease;
}

/* 在L型布局模式下，工作流区域在右下方 */
.workspace.workflow-active .workflow-section {
    flex: 0 0 55%; /* 占右侧区域的55%高度，给工作流更多空间 */
    margin-left: 0; /* 移除左边距，由main-area管理 */
    margin-top: 0;
    margin-top: 0;
}

/* 兼容原有的main-content类 */
.main-content {
    flex: 1;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
}

.table-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 15px;
}

.search-box {
    display: flex;
    gap: 10px;
}

.search-box input {
    padding: 8px 12px;
    border: 2px solid #bdc3c7;
    border-radius: 6px;
    font-size: 14px;
    width: 200px;
}

.search-box button, .filter-controls button {
    padding: 8px 16px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-box button:hover, .filter-controls button:hover {
    background: #2980b9;
}

.filter-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.filter-controls select, .filter-controls input {
    padding: 8px;
    border: 2px solid #bdc3c7;
    border-radius: 6px;
    font-size: 14px;
}

.table-container {
    flex: 1;
    overflow: auto;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    margin-bottom: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th {
    background: #34495e;
    color: white;
    padding: 12px;
    text-align: left;
    position: sticky;
    top: 0;
    cursor: pointer;
    user-select: none;
}

th:hover {
    background: #2c3e50;
}

th.sortable::after {
    content: ' ↕';
    opacity: 0.5;
}

th.sort-asc::after {
    content: ' ↑';
    opacity: 1;
}

th.sort-desc::after {
    content: ' ↓';
    opacity: 1;
}

td {
    padding: 10px 12px;
    border-bottom: 1px solid #ecf0f1;
}

tr:hover {
    background: #f8f9fa;
}

tr.highlighted {
    background: #fff3cd !important;
    border-left: 4px solid #ffc107;
}

.analysis-panel {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    max-height: 300px; /* 增加最大高度 */
    overflow-y: auto;
    min-height: 150px; /* 确保最小高度 */
}

.analysis-panel h3 {
    color: #495057;
    margin-bottom: 10px;
}

.correlation-result {
    background: #d4edda;
    padding: 10px;
    margin: 5px 0;
    border-radius: 5px;
    border-left: 4px solid #28a745;
}

.timeline-item {
    background: #cce5ff;
    padding: 8px;
    margin: 5px 0;
    border-radius: 5px;
    border-left: 4px solid #007bff;
}

.network-node {
    background: #f8d7da;
    padding: 8px;
    margin: 5px 0;
    border-radius: 5px;
    border-left: 4px solid #dc3545;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.workflow-modal {
    width: 98%; /* 进一步增加宽度利用 */
    max-width: 1600px; /* 增加最大宽度以适应大屏幕 */
    height: 92vh; /* 增加高度利用 */
    min-width: 1200px; /* 确保最小宽度 */
}

.modal-content {
    background-color: white;
    margin: 3% auto;
    padding: 20px;
    border-radius: 10px;
    width: 90%; /* 增加宽度利用 */
    max-width: 1000px; /* 增加最大宽度 */
    max-height: 85vh; /* 增加最大高度 */
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    min-width: 600px; /* 确保最小宽度 */
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

.tool-section {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.tool-section h3 {
    margin-bottom: 15px;
    color: #495057;
}

.field-selection, .timeline-config, .network-config, .pivot-config {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 10px;
    align-items: center;
    margin-bottom: 15px;
}

.field-selection label, .timeline-config label, .network-config label, .pivot-config label {
    font-weight: bold;
    color: #495057;
}

.field-selection select, .timeline-config select, .network-config select, .pivot-config select,
.timeline-config input {
    padding: 8px;
    border: 2px solid #dee2e6;
    border-radius: 5px;
    font-size: 14px;
}

.tool-section button {
    background: #28a745;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    margin-top: 15px;
}

.tool-section button:hover {
    background: #218838;
}

.results-area {
    margin-top: 20px;
    padding: 15px;
    background: #ffffff;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    min-height: 200px;
}

.correlation-match {
    background: #d1ecf1;
    padding: 10px;
    margin: 8px 0;
    border-radius: 5px;
    border-left: 4px solid #17a2b8;
}

.timeline-event {
    background: #fff3cd;
    padding: 8px;
    margin: 5px 0;
    border-radius: 5px;
    border-left: 4px solid #ffc107;
    display: flex;
    justify-content: space-between;
}

.timeline-date {
    font-weight: bold;
    color: #856404;
}

.network-node-item {
    background: #f8d7da;
    padding: 8px;
    margin: 5px 0;
    border-radius: 5px;
    border-left: 4px solid #dc3545;
}

.pivot-table, .correlation-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 14px;
}

.pivot-table th, .pivot-table td, .correlation-table th, .correlation-table td {
    border: 1px solid #dee2e6;
    padding: 8px;
    text-align: center;
}

.pivot-table th, .correlation-table th {
    background: #e9ecef;
    font-weight: bold;
    position: sticky;
    top: 0;
}

.correlation-table {
    max-height: 400px;
    overflow-y: auto;
    display: block;
}

.correlation-table thead, .correlation-table tbody {
    display: table;
    width: 100%;
    table-layout: fixed;
}

.correlation-table td {
    text-align: left;
    padding: 6px 8px;
    word-wrap: break-word;
    max-width: 120px;
}

.correlation-stats {
    margin-top: 15px;
}

.correlation-stats h5 {
    margin-bottom: 10px;
    color: #495057;
}

.correlation-stats p {
    margin: 5px 0;
    font-size: 14px;
}

.chart-container {
    width: 100%;
    height: 300px;
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6c757d;
    margin: 10px 0;
}

.network-svg {
    width: 100%;
    height: 400px;
    border: 1px solid #dee2e6;
    background: #ffffff;
}

.network-node {
    fill: #007bff;
    stroke: #0056b3;
    stroke-width: 2;
    cursor: pointer;
}

.network-node:hover {
    fill: #0056b3;
}

.network-link {
    stroke: #6c757d;
    stroke-width: 2;
}

.network-text {
    font-size: 12px;
    fill: #495057;
    text-anchor: middle;
    pointer-events: none;
}

@media (max-width: 1200px) {
    .container {
        min-width: auto;
        padding: 15px;
    }
    
    .workflow-toolbar {
        width: 160px;
        min-width: 160px;
    }
    
    /* 在中等屏幕上，保持L型布局但调整比例 */
    .workspace.workflow-active .data-section {
        flex: 0 0 35%; /* 稍微减少数据区域高度 */
    }
    
    .workspace.workflow-active .workflow-section {
        flex: 0 0 60%; /* 增加工作流区域高度 */
    }
}

@media (max-width: 768px) {
    .workspace {
        flex-direction: column;
        height: auto;
    }
    
    .sidebar {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .data-section,
    .workflow-section {
        margin-left: 0 !important;
    }
    
    .main-area {
        gap: 15px; /* 减少间距 */
    }
    
    /* 在小屏幕上，改为全垂直布局 */
    .workspace.workflow-active {
        flex-direction: column;
        height: 95vh;
    }
    
    .workspace.workflow-active .main-area {
        flex-direction: column;
    }
    
    .workspace.workflow-active .data-section {
        flex: 0 0 220px; /* 在小屏幕上压缩数据区域 */
    }
    
    .workspace.workflow-active .workflow-section {
        flex: 1; /* 工作流区域占用剩余空间 */
    }
    
    .workspace.workflow-active .workflow-container {
        min-height: 280px;
    }
    
    .workspace.workflow-active .workflow-canvas {
        min-height: 220px;
    }
    
    .table-controls {
        flex-direction: column;
        align-items: stretch;
    }
    
    .modal-content {
        width: 95%;
        margin: 2% auto;
        min-width: auto;
    }
    
    .field-selection, .timeline-config, .network-config, .pivot-config {
        grid-template-columns: 1fr;
        gap: 5px;
    }
}
/* 工作流设计器样式 */
.workflow-designer {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.workflow-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #dee2e6;
}

.workflow-header h3 {
    color: #2c3e50;
    margin: 0;
}

#closeWorkflowBtn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s ease;
}

#closeWorkflowBtn:hover {
    background: #c82333;
}

.workflow-container {
    display: flex;
    flex: 1;
    gap: 20px;
    min-height: 400px;
}

/* 在L型布局模式下，工作流容器获得更大的空间 */
.workspace.workflow-active .workflow-container {
    min-height: 400px; /* 适当的最小高度 */
    height: 100%; /* 充分利用分配的空间 */
}

.workflow-toolbar {
    width: 200px;
    min-width: 200px;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    border: 2px solid #dee2e6;
    flex-shrink: 0;
}

.workflow-toolbar h3 {
    margin-bottom: 15px;
    color: #495057;
    font-size: 16px;
}

.node-palette {
    margin-bottom: 20px;
}

.palette-item {
    display: flex;
    align-items: center;
    padding: 10px;
    margin-bottom: 8px;
    background: white;
    border: 2px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
}

.palette-item:hover {
    border-color: #007bff;
    background-color: #e3f2fd;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.palette-item:active {
    transform: scale(0.95);
    background-color: #bbdefb;
}

.palette-item.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}

.node-icon {
    font-size: 20px;
    margin-right: 8px;
}

.palette-item span {
    font-size: 12px;
    font-weight: 500;
}

.workflow-controls {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.workflow-controls button {
    padding: 8px 12px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 12px;
    transition: background 0.3s ease;
}

#executeWorkflow {
    background: #28a745;
    color: white;
}

#executeWorkflow:hover {
    background: #218838;
}

#clearWorkflow {
    background: #dc3545;
    color: white;
}

#clearWorkflow:hover {
    background: #c82333;
}

#saveWorkflow {
    background: #007bff;
    color: white;
}

#saveWorkflow:hover {
    background: #0056b3;
}

.workflow-canvas {
    flex: 1;
    background: #ffffff;
    border: 2px dashed #dee2e6;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

/* 在L型布局模式下，工作流画布获得更大的展示空间 */
.workspace.workflow-active .workflow-canvas {
    min-height: 300px; /* 确保画布有足够的高度 */
    width: 100%; /* 充分利用宽度 */
}

.canvas-hint {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #6c757d;
    font-size: 16px;
    text-align: center;
    pointer-events: none;
}

.workflow-node {
    position: absolute;
    width: 120px;
    min-height: 80px;
    background: white;
    border: 2px solid #007bff;
    border-radius: 8px;
    padding: 10px;
    cursor: move;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    user-select: none;
    transition: box-shadow 0.2s ease;
}

.workflow-node:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.workflow-node.selected {
    border-color: #ffc107;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.3);
}

.workflow-node.error {
    border-color: #dc3545;
    background: #f8d7da;
}

.workflow-node.success {
    border-color: #28a745;
    background: #d4edda;
}

.node-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.node-header .node-icon {
    margin-right: 5px;
}

.node-title {
    font-size: 12px;
    font-weight: bold;
    color: #495057;
}

.node-status {
    font-size: 10px;
    color: #6c757d;
    margin-top: 5px;
}

.node-ports {
    position: absolute;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.node-port {
    position: absolute;
    width: 16px;
    height: 16px;
    background: #fff;
    border: 3px solid #007bff;
    border-radius: 50%;
    cursor: crosshair;
    pointer-events: all;
    z-index: 10;
}

.node-port.input {
    left: -10px;
    top: 50%;
    transform: translateY(-50%);
}

/* 关联节点的两个输入端口 */
.node-port.input-1 {
    left: -10px;
    top: 30%;
    transform: translateY(-50%);
}

.node-port.input-2 {
    left: -10px;
    top: 70%;
    transform: translateY(-50%);
}

.node-port.output {
    right: -10px;
    top: 50%;
    transform: translateY(-50%);
}

.node-port:hover {
    background: #ffc107;
    transform: translateY(-50%) scale(1.3);
    border-color: #ffc107;
}

.workflow-connection {
    position: absolute;
    pointer-events: none;
    z-index: 1;
}

.connection-line {
    stroke: #007bff;
    stroke-width: 2;
    fill: none;
    marker-end: url(#arrowhead);
    cursor: pointer;
    transition: stroke 0.2s ease, stroke-width 0.2s ease;
}

.connection-line:hover {
    stroke: #ffc107;
    stroke-width: 3;
}

.connection-line.selected {
    stroke: #ffc107 !important;
    stroke-width: 4 !important;
    filter: drop-shadow(0 0 3px rgba(255, 193, 7, 0.5));
}

.workflow-results {
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid #dee2e6;
    max-height: 200px;
    overflow-y: auto;
    min-height: 100px;
}

.workflow-results h3 {
    margin-bottom: 10px;
    color: #495057;
}

.node-config-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

.node-config-buttons button {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

#saveNodeConfig {
    background: #28a745;
    color: white;
}

#cancelNodeConfig {
    background: #6c757d;
    color: white;
}

.execution-log {
    background: #e9ecef;
    padding: 8px;
    margin: 5px 0;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
}

.execution-log.success {
    background: #d4edda;
    color: #155724;
}

.execution-log.error {
    background: #f8d7da;
    color: #721c24;
}

@media (max-width: 768px) {
    .workflow-container {
        flex-direction: column;
        height: auto;
    }
    
    .workflow-toolbar {
        width: 100%;
    }
    
    .workflow-canvas {
        height: 300px;
    }
}/
* 右键菜单样式 */
.node-context-menu {
    position: absolute;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    min-width: 150px;
    padding: 5px 0;
    font-size: 14px;
}

.context-menu-item {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.context-menu-item:hover {
    background-color: #f8f9fa;
}

.context-menu-item.danger:hover {
    background-color: #f8d7da;
    color: #721c24;
}

.menu-icon {
    margin-right: 8px;
    font-size: 16px;
}

.context-menu-separator {
    height: 1px;
    background-color: #dee2e6;
    margin: 5px 0;
}

/* 连线右键菜单样式 */
.connection-context-menu {
    position: absolute;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 2000;
    min-width: 150px;
    padding: 5px 0;
    font-size: 14px;
}

/* 选中状态增强 */
.workflow-node.selected {
    border-color: #ffc107;
    box-shadow: 0 0 0 3px rgba(255, 193, 7, 0.3);
    transform: scale(1.02);
}

/* 删除确认提示 */
.delete-confirmation {
    position: absolute;
    background: #fff3cd;
    border: 2px solid #ffc107;
    border-radius: 6px;
    padding: 10px;
    z-index: 1500;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.delete-confirmation .buttons {
    margin-top: 10px;
    display: flex;
    gap: 8px;
}

.delete-confirmation button {
    padding: 5px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.delete-confirmation .confirm-btn {
    background: #dc3545;
    color: white;
}

.delete-confirmation .cancel-btn {
    background: #6c757d;
    color: white;
}/* 关联节点配置样式
 */
.config-section {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.config-section h4 {
    margin: 0 0 15px 0;
    color: #495057;
    font-size: 16px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 5px;
}

.connection-status {
    margin-top: 15px;
}

.input-status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    margin: 5px 0;
    background: #f8f9fa;
    border-radius: 4px;
    border-left: 4px solid #6c757d;
}

.input-status .status-label {
    font-weight: bold;
    color: #495057;
}

.input-status .status-value.connected {
    color: #28a745;
    font-weight: bold;
}

.input-status .status-value.disconnected {
    color: #dc3545;
    font-weight: bold;
}/* 字段选择
节点样式 */
.field-selection-container {
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    background: #f8f9fa;
}

.field-selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.field-selection-header .btn {
    padding: 4px 8px;
    font-size: 12px;
    margin-right: 5px;
}

.selected-count {
    font-size: 14px;
    color: #6c757d;
    font-weight: bold;
}

.field-selection-list {
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background: white;
    padding: 10px;
}

.field-checkbox {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    margin: 2px 0;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.field-checkbox:hover {
    background-color: #f8f9fa;
}

.field-checkbox input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.field-checkbox .field-name {
    font-weight: bold;
    color: #495057;
    margin-right: 8px;
}

.field-checkbox .field-key {
    color: #6c757d;
    font-size: 12px;
    font-family: monospace;
}

.field-checkbox input[type="checkbox"]:checked + .field-name {
    color: #007bff;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 3px;
    border: 1px solid #dee2e6;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-sm:hover {
    background: #e9ecef;
    border-color: #adb5bd;
}/* 字段
重命名节点样式 */
.field-rename-container {
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    background: #f8f9fa;
}

.field-rename-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.field-rename-header .btn {
    padding: 4px 8px;
    font-size: 12px;
    margin-right: 5px;
}

.mapping-count {
    font-size: 14px;
    color: #6c757d;
    font-weight: bold;
}

.field-rename-list {
    max-height: 400px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.field-mapping-item {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-bottom: 10px;
    padding: 15px;
}

.mapping-row {
    display: grid;
    grid-template-columns: 1fr 1fr auto;
    gap: 15px;
    align-items: end;
}

.original-field,
.new-field {
    display: flex;
    flex-direction: column;
}

.original-field label,
.new-field label {
    font-size: 12px;
    font-weight: bold;
    color: #495057;
    margin-bottom: 5px;
}

.original-field-select,
.new-field-input {
    padding: 6px 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.original-field-select:focus,
.new-field-input:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.25);
}

.new-field-input.error {
    border-color: #dc3545;
    background-color: #f8d7da;
}

.mapping-actions {
    display: flex;
    align-items: center;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
    border: 1px solid #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.field-mapping-item.duplicate {
    border-color: #ffc107;
    background-color: #fff3cd;
}

.field-mapping-item.error {
    border-color: #dc3545;
    background-color: #f8d7da;
}

@media (max-width: 768px) {
    .mapping-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .mapping-actions {
        justify-content: center;
    }
}
/* 案
例集合相关样式 */
.case-collections-section {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: none; /* 默认隐藏，点击切换案例时显示 */
}

.case-collections-section.show {
    display: block;
}

.collections-header {
    text-align: center;
    margin-bottom: 20px;
}

.collections-header h2 {
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1.5em;
}

.collections-header p {
    color: #666;
    font-size: 0.95em;
}

.collections-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.collection-tab {
    padding: 10px 20px;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.collection-tab:hover {
    border-color: #007bff;
    background: #e3f2fd;
}

.collection-tab.active {
    background: #007bff;
    color: white;
    border-color: #007bff;
}

.collection-icon {
    font-size: 1.2em;
}

.cases-in-collection {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
    max-height: 400px;
    overflow-y: auto;
}

.case-card-mini {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.case-card-mini:hover {
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.15);
}

.case-card-mini.active {
    border-color: #28a745;
    background: linear-gradient(135deg, #f8fff9 0%, #e8f5e8 100%);
}

.case-card-mini.active::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 15px;
    color: #28a745;
    font-weight: bold;
    font-size: 1.2em;
}

.case-mini-title {
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 8px;
    font-size: 1em;
}

.case-mini-description {
    color: #666;
    font-size: 0.85em;
    line-height: 1.4;
    margin-bottom: 10px;
}

.case-mini-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.75em;
    color: #888;
}

.case-mini-stat {
    display: flex;
    align-items: center;
    gap: 3px;
}

.active-case-info {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.case-header-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.case-header-bar h2 {
    color: #e74c3c;
    font-size: 1.4em;
    margin: 0;
}

.change-case-btn {
    padding: 8px 16px;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.9em;
    font-weight: 500;
    transition: all 0.3s ease;
}

.change-case-btn:hover {
    background: #0056b3;
    transform: translateY(-1px);
}

#activeCaseDescription {
    line-height: 1.6;
    color: #555;
    margin: 0;
}

/* 分析目标样式调整 */
.analysis-objectives {
    background: rgba(255, 255, 255, 0.9);
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.analysis-objectives h3 {
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.analysis-objectives ul {
    list-style: none;
    padding-left: 0;
}

.analysis-objectives li {
    padding: 5px 0;
    color: #555;
    position: relative;
    padding-left: 25px;
}

.analysis-objectives li:before {
    content: '🎯';
    position: absolute;
    left: 0;
    top: 5px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .collections-tabs {
        flex-direction: column;
        align-items: center;
    }
    
    .cases-in-collection {
        grid-template-columns: 1fr;
    }
    
    .case-header-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .change-case-btn {
        align-self: flex-end;
    }
}/* 动
态数据源按钮样式 */
.source-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 8px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 14px;
    text-align: left;
}

.source-btn:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateX(2px);
}

.source-btn.active {
    background: #007bff;
    color: white;
    border-color: #0056b3;
    box-shadow: 0 2px 4px rgba(0,123,255,0.3);
}

.source-btn.active:hover {
    background: #0056b3;
}

.source-icon {
    font-size: 16px;
    min-width: 20px;
    text-align: center;
}

.source-label {
    font-weight: 500;
    flex: 1;
}

/* 数据源容器 */
#dataSources {
    margin-top: 10px;
}

/* 确保数据源区域有足够的空间 */
.data-sources {
    margin-bottom: 20px;
}

.data-sources h3 {
    margin-bottom: 15px;
    color: #495057;
    font-size: 16px;
    border-bottom: 2px solid #007bff;
    padding-bottom: 5px;
}