/* Pipeline Module Styles */

.pipeline-container {
    padding: 20px;
    width: 100%;
    height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.pipeline-step-content {
    flex: 1;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

/* Steps Indicator */
.pipeline-steps {
    display: flex;
    align-items: center;
    margin-bottom: 40px;
    padding: 15px 25px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    position: relative;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    position: relative;
    z-index: 1;
    color: #95a5a6;
    transition: all 0.3s ease;
    min-width: 100px;
}

.step.active {
    color: #3498db;
}

.step-num {
    width: 36px;
    height: 36px;
    background: #ecf0f1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    border: 2px solid #bdc3c7;
}

.step.active .step-num {
    background: #3498db;
    color: white;
    border-color: #2980b9;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.4);
}

.step-line {
    flex: 0 0 150px;
    height: 2px;
    background: #ecf0f1;
    margin: 0 -20px;
    transform: translateY(-14px);
}

/* View Containers */
.pipeline-view {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Upload Card */
.upload-card {
    background: white;
    padding: 60px;
    border-radius: 16px;
    text-align: center;
    border: 2px dashed #dcdde1;
    transition: border-color 0.3s;
}

.upload-card:hover {
    border-color: #3498db;
}

.upload-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

/* Toolbar & Grid */
.toolbar-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.config-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.config-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.card-header {
    background: #f8f9fa;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.card-body {
    padding: 20px;
}

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

.form-item label {
    font-size: 14px;
    color: #34495e;
}

/* Buttons Unification */
.btn-pipeline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 20px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
    gap: 6px;
}

.btn-pipeline.primary {
    background: #3498db;
    color: white;
    border-color: #2980b9;
}
.btn-pipeline.primary:hover { background: #2980b9; }

.btn-pipeline.secondary {
    background: #f8f9fa;
    color: #2c3e50;
    border-color: #dcdde1;
}
.btn-pipeline.secondary:hover { background: #ecf0f1; border-color: #bdc3c7; }

.btn-pipeline.danger {
    background: #e74c3c;
    color: white;
    border-color: #c0392b;
}
.btn-pipeline.danger:hover { background: #c0392b; }

.btn-pipeline.success {
    background: #2ecc71;
    color: white;
    border-color: #27ae60;
}
.btn-pipeline.success:hover { background: #27ae60; }

.btn-pipeline:active { transform: translateY(1px); }

.pipeline-header-actions {
    display: flex;
    gap: 12px;
    margin-left: auto;
}

.btn-execute {
    background: linear-gradient(135deg, #2ecc71, #27ae60);
    color: white;
    padding: 16px 40px;
    border: none;
    border-radius: 30px;
    font-size: 18px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

.execute-section {
    text-align: center;
    margin-top: 40px;
}

/* Progress Box */
.progress-box {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    color: #2c3e50;
}

.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Checkbox Styling */
.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 30px;
    cursor: pointer;
    user-select: none;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    height: 20px;
    width: 20px;
    background-color: #eee;
    border-radius: 4px;
}

.checkbox-container:hover input ~ .checkmark {
    background-color: #ccc;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: #3498db;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 7px;
    top: 3px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Utility */
.hidden { display: none !important; }

/* ✅ 精致输入框样式 (去掉框套框，实现零边框编辑体验) */
.table-input {
    width: 100%;
    height: 100%;
    border: none !important;
    outline: none !important;
    background: transparent !important;
    padding: 6px 4px !important;
    font-size: 12px;
    color: #333;
    text-align: center;
    transition: background-color 0.2s;
    box-sizing: border-box;
}

.table-input:focus {
    background-color: rgba(52, 152, 219, 0.08) !important;
    box-shadow: inset 0 -2px 0 #3498db !important;
}

.table-input:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

.table-input::placeholder {
    color: #bbb !important;
    font-style: italic;
    opacity: 0.6;
}

/* 针对数字输入框去掉默认箭头 */
.table-input::-webkit-inner-spin-button,
.table-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
/* ✅ 步骤 3 紧凑卡片样式 */
.compact-card {
    border-radius: 8px !important;
    border: 1px solid #ebeef5 !important;
    box-shadow: 0 2px 12px 0 rgba(0,0,0,.05) !important;
    transition: all 0.3s;
}

.compact-card:hover {
    box-shadow: 0 4px 16px 0 rgba(0,0,0,.1) !important;
    transform: translateY(-2px);
}

.compact-card .card-header {
    background-color: #fcfcfc !important;
    padding: 10px 15px !important;
    border-bottom: 1px solid #f2f6fc !important;
}

.cfg-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 12px;
    color: #606266;
}

/* 小型开关样式 */
.switch-small {
    position: relative;
    display: inline-block;
    width: 32px;
    height: 18px;
}

.switch-small input { 
    opacity: 0;
    width: 0;
    height: 0;
}

.slider-small {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
}

.slider-small:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider-small {
    background-color: #2ecc71;
}

input:checked + .slider-small:before {
    transform: translateX(14px);
}

.slider-small.round {
    border-radius: 18px;
}

.slider-small.round:before {
    border-radius: 50%;
}

/* Delete Row Button (方块+文字) */
.btn-delete-row {
    height: 24px;
    padding: 0 8px;
    border-radius: 4px;
    border: 1px solid #f1f2f6;
    background: #fff;
    color: #a4b0be;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    margin: 0 auto;
    font-size: 11px;
    font-weight: 500;
}

.btn-delete-row:hover {
    background: #ff4757;
    color: #fff;
    border-color: #ff4757;
    box-shadow: 0 2px 5px rgba(255, 71, 87, 0.2);
}

.btn-delete-row:active {
    transform: scale(0.95);
}

.btn-delete-row svg {
    width: 12px;
    height: 12px;
    margin-right: 4px;
    stroke-width: 2.5;
}

/* Pagination Bar */
.pagination-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 12px 15px;
    background: #fdfdfd;
    border-top: 1px solid #eee;
    gap: 15px;
    font-size: 13px;
    color: #606266;
}

.pager-btns {
    display: flex;
    gap: 8px;
}

.btn-pager {
    padding: 4px 12px;
    border: 1px solid #dcdfe6;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    color: #606266;
    font-size: 12px;
}

.btn-pager:hover:not(:disabled) {
    color: #3498db;
    border-color: #3498db;
    background: #f4f9ff;
}

.btn-pager:disabled {
    background: #f5f7fa;
    color: #c0c4cc;
    cursor: not-allowed;
    border-color: #e4e7ed;
}

.pager-info {
    font-weight: 500;
}
