/* Mushroom Pipeline Dashboard Styles */

.pipeline-dashboard-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pipeline-dashboard-container {
    background: white;
    width: 95%;
    height: 90vh;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.pipeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 2px solid #e0e0e0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.pipeline-header h2 {
    margin: 0;
    font-size: 24px;
}

.pipeline-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.pipeline-controls .btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.pipeline-controls .btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.alert-badge {
    display: none;
    background: #ff4444;
    color: white;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 11px;
    margin-left: 5px;
}

/* Statistics Bar */
.pipeline-stats {
    display: flex;
    gap: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
}

.stat-card {
    flex: 1;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 5px;
}

.stat-value {
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

/* Pipeline Board */
.pipeline-board {
    flex: 1;
    display: flex;
    gap: 15px;
    padding: 20px;
    overflow-x: auto;
    background: #f5f5f5;
}

.pipeline-column {
    flex: 0 0 240px;
    display: flex;
    flex-direction: column;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.column-header {
    padding: 12px;
    color: white;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 8px 8px 0 0;
}

.stage-icon {
    font-size: 20px;
}

.stage-name {
    flex: 1;
}

.stage-count {
    background: rgba(255, 255, 255, 0.3);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
}

.column-content {
    flex: 1;
    padding: 10px;
    overflow-y: auto;
    min-height: 200px;
    max-height: calc(90vh - 350px);
}

.column-content.drag-over {
    background: #e8f5e9;
    border: 2px dashed #4caf50;
}

.column-footer {
    padding: 10px;
    border-top: 1px solid #e0e0e0;
}

.btn-add-culture {
    width: 100%;
    padding: 8px;
    background: #f0f0f0;
    border: 1px dashed #999;
    border-radius: 4px;
    color: #666;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-add-culture:hover {
    background: #e0e0e0;
    border-color: #666;
}

/* Culture Cards */
.culture-card {
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 10px;
    cursor: move;
    transition: all 0.3s;
}

.culture-card:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.culture-card.dragging {
    opacity: 0.5;
    transform: rotate(5deg);
}

.card-header {
    padding: 8px;
    background: #f8f9fa;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-radius: 6px 6px 0 0;
}

.card-header.alert-warning {
    background: #fff3cd;
    border-color: #ffc107;
}

.card-header.alert-danger {
    background: #f8d7da;
    border-color: #dc3545;
}

.culture-code {
    font-weight: bold;
    font-size: 12px;
    color: #333;
}

.days-badge {
    background: #007bff;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 11px;
}

.card-body {
    padding: 10px;
}

.strain-name {
    font-weight: 500;
    margin-bottom: 5px;
    color: #333;
}

.culture-details {
    display: flex;
    gap: 8px;
    margin-bottom: 5px;
}

.detail-item {
    font-size: 11px;
    background: #e9ecef;
    padding: 2px 6px;
    border-radius: 3px;
    color: #666;
}

.parent-info {
    font-size: 11px;
    color: #666;
    margin: 5px 0;
}

.contamination-alert {
    background: #dc3545;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    margin: 5px 0;
    text-align: center;
}

.card-actions {
    display: flex;
    gap: 5px;
    margin-top: 8px;
}

.btn-icon {
    background: none;
    border: 1px solid #ddd;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: #f0f0f0;
    border-color: #999;
}

.card-footer {
    padding: 0 10px 10px;
}

.progress-bar {
    height: 4px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4caf50, #8bc34a);
    transition: width 0.3s;
}

/* Alerts Container */
.pipeline-alerts {
    background: #fff3cd;
    padding: 15px;
    margin: 0 20px 20px;
    border-radius: 8px;
    border: 1px solid #ffc107;
}

.pipeline-alerts h3 {
    margin: 0 0 10px;
    color: #856404;
}

.alert-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: white;
    border-radius: 4px;
    margin-bottom: 8px;
}

.alert-item.high {
    border-left: 4px solid #dc3545;
}

.alert-item.medium {
    border-left: 4px solid #ffc107;
}

.alert-item.low {
    border-left: 4px solid #28a745;
}

.alert-icon {
    font-size: 20px;
}

.alert-message {
    flex: 1;
    color: #333;
}

/* Bottleneck Modal */
.bottleneck-modal {
    max-width: 600px;
}

.bottleneck-chart {
    margin-bottom: 20px;
}

.bottleneck-item {
    margin-bottom: 15px;
}

.bottleneck-stage {
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}

.bottleneck-bar {
    height: 30px;
    background: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 5px;
}

.bottleneck-fill {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 12px;
    transition: width 0.3s;
}

.bottleneck-info {
    font-size: 12px;
    color: #666;
}

.bottleneck-recommendations {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.bottleneck-recommendations h3 {
    margin: 0 0 10px;
    color: #333;
}

.bottleneck-recommendations ul {
    margin: 0;
    padding-left: 20px;
}

.bottleneck-recommendations li {
    margin-bottom: 8px;
    color: #666;
}

/* Responsive */
@media (max-width: 1200px) {
    .pipeline-board {
        padding: 10px;
    }
    
    .pipeline-column {
        flex: 0 0 200px;
    }
}

@media (max-width: 768px) {
    .pipeline-dashboard-container {
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }
    
    .pipeline-header {
        border-radius: 0;
    }
    
    .pipeline-stats {
        flex-direction: column;
        gap: 10px;
    }
    
    .pipeline-board {
        flex-direction: column;
    }
    
    .pipeline-column {
        flex: 1;
        max-width: 100%;
    }
}
