/* ============================================================================
   DATA PREPROCESSING TAB - OCEAN BLUE THEME OVERRIDE
   Fix colors and layout issues + Real Data Display
   ============================================================================ */

/* Dataset Statistics Display (NEW - REAL DATA) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-left: 4px solid;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
}

.stat-card.total {
    border-left-color: #0093E9;
}

.stat-card.train {
    border-left-color: #2ecc71;
}

.stat-card.val {
    border-left-color: #f39c12;
}

.stat-card.test {
    border-left-color: #9b59b6;
}

.stat-card h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1rem;
    color: #666;
    font-weight: 600;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    background: linear-gradient(135deg, #0093E9 0%, #80D0C7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 0.5rem;
}

.stat-breakdown {
    font-size: 0.9rem;
    color: #666;
    margin: 0.5rem 0;
}

.stat-label {
    font-size: 0.85rem;
    color: #999;
    font-weight: 500;
}

/* Data Verification Badge */
.data-verification-badge {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    font-weight: 600;
    margin-top: 1.5rem;
    box-shadow: 0 4px 10px rgba(46, 204, 113, 0.3);
}

/* Improvement Badge */
.improvement-badge {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-align: center;
    margin: 0.75rem 0;
    font-size: 1.1rem;
}

/* Override purple colors with Ocean Blue */
.preprocessing-section h3,
.viz-subtab-btn.active {
    color: #0093E9 !important;
    border-color: #0093E9 !important;
}

.viz-subtab-btn.active {
    background: linear-gradient(135deg, #0093E9 0%, #80D0C7 100%) !important;
}

.viz-subtab-btn:hover {
    border-color: #80D0C7 !important;
    color: #0093E9 !important;
}

/* Fix chart containers */
.chart-container {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    margin-bottom: 2rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.chart-wrapper {
    max-width: 100%;
    height: 400px;
    margin-bottom: 2rem;
}

/* Info cards grid - prevent jumping */
.info-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.info-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.info-card.green {
    border-color: #00BFA5;
    background: linear-gradient(135deg, rgba(0, 191, 165, 0.05), transparent);
}

.info-card.blue {
    border-color: #0093E9;
    background: linear-gradient(135deg, rgba(0, 147, 233, 0.05), transparent);
}

.info-card.red {
    border-color: #F44336;
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.05), transparent);
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

/* Augmentation grid - fix layout */
.augmentation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.augmentation-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #0093E9;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.augmentation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 147, 233, 0.2);
}

/* Methods grid - fix layout */
.methods-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    align-items: start;
}

.method-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.method-card.featured {
    border-color: #0093E9 !important;
    background: linear-gradient(135deg, rgba(0, 147, 233, 0.08), transparent) !important;
}

.method-card h4 {
    color: #0093E9 !important;
}

/* Metrics grid - fix layout */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    align-items: stretch;
}

.metric-card {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 200px;
}

.metric-card:hover {
    border-color: #0093E9;
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 147, 233, 0.15);
}

.metric-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: #0093E9;
    margin: 1rem 0;
}

.metric-label {
    color: #495057;
    font-weight: 600;
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

/* Pipeline cards - ensure proper spacing */
.pipeline-steps {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
}

/* Stats container - fix layout */
.stats-container {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

/* Upload box - Ocean Blue theme */
.upload-box {
    background: white;
    border: 3px dashed #0093E9 !important;
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-box:hover {
    background: rgba(0, 147, 233, 0.05) !important;
    border-color: #80D0C7 !important;
    transform: translateY(-3px);
}

.upload-box i {
    color: #0093E9 !important;
}

.btn-primary {
    background: linear-gradient(135deg, #0093E9 0%, #80D0C7 100%) !important;
    border: none !important;
    padding: 0.8rem 2rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 147, 233, 0.3);
}

/* Fix visualization sub-tabs */
.viz-subtabs {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    background: white;
    padding: 1rem;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.viz-subtab-btn {
    flex: 1;
    min-width: 150px;
    padding: 1rem 1.5rem;
    border: 2px solid #e9ecef;
    background: white;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

/* Chart explanation box */
.chart-explanation {
    background: linear-gradient(135deg, rgba(0, 147, 233, 0.05), rgba(128, 208, 199, 0.05));
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid #0093E9;
    margin-top: 1.5rem;
}

.chart-explanation h4 {
    color: #0093E9;
    margin-bottom: 1rem;
}

/* Comparison cards - fix spacing */
.comparison-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 2rem;
}

/* Responsive fixes */
@media (max-width: 1200px) {
    .methods-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .pipeline-steps,
    .info-cards,
    .augmentation-grid,
    .methods-grid,
    .metrics-grid,
    .comparison-cards {
        grid-template-columns: 1fr;
    }
    
    .viz-subtabs {
        flex-direction: column;
    }
    
    .viz-subtab-btn {
        width: 100%;
    }
    
    .quality-test-results {
        grid-template-columns: 1fr;
    }
}

/* Fix section header in data preprocessing */
.data-preprocessing-container h2 {
    color: #fff !important;
}

.data-preprocessing-container .section-description {
    color: #fff !important;
}

/* Ensure preprocessing sections have proper background */
.preprocessing-section {
    background: rgba(255, 255, 255, 0.98);
    margin-bottom: 2rem;
}

/* Fix loading spinner */
.loading-spinner {
    color: #0093E9 !important;
    font-weight: 500;
}

/* ============================================================================
   MODERN TIMELINE DESIGN FOR DATASET STATISTICS
   ============================================================================ */

.stats-summary-modern {
    background: white;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.pipeline-timeline {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding: 2rem 1rem;
    background: linear-gradient(135deg, rgba(0, 147, 233, 0.03), rgba(128, 208, 199, 0.03));
    border-radius: 12px;
    overflow-x: auto;
}

.timeline-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 140px;
    position: relative;
}

.timeline-item.final-split {
    min-width: 300px;
}

.timeline-icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #e9ecef, #f8f9fa);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: #6c757d;
    margin-bottom: 0.75rem;
    border: 3px solid #e9ecef;
    transition: all 0.3s ease;
}

.timeline-icon.start {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border-color: #28a745;
}

.timeline-icon.end {
    background: linear-gradient(135deg, #0093E9, #80D0C7);
    color: white;
    border-color: #0093E9;
    width: 70px;
    height: 70px;
    font-size: 1.8rem;
}

.timeline-content h5 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.timeline-value {
    font-size: 1.3rem;
    font-weight: 700;
    color: #0093E9;
    margin-bottom: 0.25rem;
}

.timeline-label {
    font-size: 0.75rem;
    color: #6c757d;
    font-style: italic;
}

.timeline-connector {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #dee2e6, #adb5bd);
    position: relative;
    margin: 0 0.5rem;
    flex-shrink: 0;
}

.timeline-connector::after {
    content: '';
    position: absolute;
    right: 0;
    top: -4px;
    width: 0;
    height: 0;
    border-left: 8px solid #adb5bd;
    border-top: 5px solid transparent;
    border-bottom: 5px solid transparent;
}

.timeline-connector.final {
    background: linear-gradient(90deg, #adb5bd, #0093E9);
}

.timeline-connector.final::after {
    border-left-color: #0093E9;
}

.final-content h5 {
    font-size: 1.1rem;
    color: #0093E9;
    margin-bottom: 1rem;
}

.final-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.final-stat {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.final-stat:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.final-stat.train {
    border-color: #28a745;
}

.final-stat.train:hover {
    background: rgba(40, 167, 69, 0.05);
}

.final-stat.val {
    border-color: #ffc107;
}

.final-stat.val:hover {
    background: rgba(255, 193, 7, 0.05);
}

.final-stat.test {
    border-color: #17a2b8;
}

.final-stat.test:hover {
    background: rgba(23, 162, 184, 0.05);
}

.final-stat i {
    font-size: 1.5rem;
    color: inherit;
}

.final-stat.train i {
    color: #28a745;
}

.final-stat.val i {
    color: #ffc107;
}

.final-stat.test i {
    color: #17a2b8;
}

.final-stat-info {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.final-stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
}

.final-stat-value {
    font-size: 1rem;
    font-weight: 700;
    color: #212529;
}

.pipeline-summary {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e9ecef;
}

.summary-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(0, 147, 233, 0.03);
    border-radius: 8px;
    border-left: 4px solid #0093E9;
}

.summary-item i {
    font-size: 2rem;
    color: #0093E9;
}

.summary-item div {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.summary-item strong {
    font-size: 0.9rem;
    color: #495057;
    font-weight: 600;
}

.summary-item span {
    font-size: 1.1rem;
    color: #212529;
    font-weight: 700;
}

/* Responsive Timeline */
@media (max-width: 1200px) {
    .pipeline-timeline {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .timeline-connector {
        width: 3px;
        height: 40px;
        transform: rotate(90deg);
    }
    
    .timeline-connector::after {
        transform: rotate(-90deg);
        right: -3px;
        top: 37px;
    }
    
    .timeline-item.final-split {
        min-width: 100%;
    }
    
    .final-stats-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .pipeline-summary {
        grid-template-columns: 1fr;
    }
}

