/* Step colors */
:root {
    --step-1-color: #3b82f6;
    --step-2-color: #8b5cf6;
    --step-3-color: #14b8a6;
    --step-4-color: #64748b;
}

/* Filter bar */
.filter-bar {
    border-left: 4px solid #6c757d;
    background: #f8f9fa;
}

/* Timeline layout */
.pipeline-timeline {
    position: relative;
    padding-left: 30px;
}

.pipeline-card {
    position: relative;
    margin-bottom: 1rem;
}

.pipeline-card::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 0;
    bottom: -1rem;
    width: 2px;
    background: #dee2e6;
}

.pipeline-card:last-child::before {
    display: none;
}

.pipeline-card::after {
    content: '';
    position: absolute;
    left: -25px;
    top: 20px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--card-color, #6c757d);
    border: 2px solid white;
    box-shadow: 0 0 0 2px var(--card-color, #6c757d);
}

/* Step header cards */
.step-header-card {
    background: linear-gradient(135deg, var(--card-color) 0%, color-mix(in srgb, var(--card-color) 80%, black) 100%);
    color: white;
}

.step-header-card .card-body {
    padding: 0.75rem 1rem;
}

/* Extraction cards */
.extraction-card {
    border-left: 4px solid var(--card-color, #6c757d);
}

.extraction-card.empty {
    opacity: 0.5;
}

.extraction-card .card-header {
    background: color-mix(in srgb, var(--card-color) 10%, white);
    border-bottom: 1px solid color-mix(in srgb, var(--card-color) 20%, white);
    padding: 0.5rem 1rem;
}

/* Prompt/Response sections */
.prompt-section, .response-section {
    background: #f8f9fa;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

/* Synthesis trace section (Phase 3) */
.synthesis-trace-section {
    background: #f0f4f8;
    border: 1px solid #d1d9e6;
    border-radius: 0.375rem;
    padding: 0.75rem 1rem;
}
.synthesis-trace-section h6 {
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}
.synthesis-trace-section .card {
    border-color: #d1d9e6;
    font-size: 0.8rem;
}

.prompt-section .section-header,
.response-section .section-header {
    padding: 0.5rem 1rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.prompt-section .section-header:hover,
.response-section .section-header:hover {
    background: #e9ecef;
}

.prompt-text, .response-text {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.8rem;
    max-height: 400px;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    background: white;
    padding: 1rem;
    border-radius: 0.25rem;
    margin: 0 1rem 1rem 1rem;
    border: 1px solid #dee2e6;
}

/* Entity list */
.entity-list {
    max-height: 300px;
    overflow-y: auto;
}

.entity-item {
    background: white;
    border-left: 3px solid var(--entity-color, #6c757d);
    padding: 0.5rem 0.75rem;
    margin-bottom: 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.875rem;
}

.entity-item .entity-label {
    font-weight: 600;
    color: var(--entity-color, #2e59d9);
}

.entity-item .entity-definition {
    color: #6c757d;
    font-size: 0.8rem;
}

/* Metadata bar */
.metadata-bar {
    font-size: 0.75rem;
    color: #6c757d;
    padding: 0.5rem 1rem;
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

/* Provenance bar */
.provenance-bar {
    font-size: 0.8rem;
    padding: 0.5rem 1rem;
    background: #f0f4ff;
    border-bottom: 1px solid #dee2e6;
    cursor: pointer;
}

.provenance-bar:hover {
    background: #e4ebff;
}

.provenance-detail {
    font-size: 0.75rem;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    padding: 0.5rem 1rem;
}

/* Origin badges */
.origin-badge {
    display: inline-block;
    font-size: 0.7rem;
    padding: 0.15rem 0.5rem;
    border-radius: 1rem;
    font-weight: 500;
}

.origin-automated_pipeline { background: #dbeafe; color: #1e40af; }
.origin-user_initiated { background: #dcfce7; color: #166534; }
.origin-individual_extraction { background: #ffedd5; color: #9a3412; }
.origin-algorithmic { background: #e5e7eb; color: #374151; }

/* Activity Log styles */
.activity-timeline {
    position: relative;
    padding-left: 30px;
}

.activity-card {
    position: relative;
    margin-bottom: 1rem;
}

.activity-card::before {
    content: '';
    position: absolute;
    left: -20px;
    top: 0;
    bottom: -1rem;
    width: 2px;
    background: #dee2e6;
}

.activity-card:last-child::before {
    display: none;
}

.activity-card::after {
    content: '';
    position: absolute;
    left: -25px;
    top: 20px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--activity-color, #6c757d);
    border: 2px solid white;
    box-shadow: 0 0 0 2px var(--activity-color, #6c757d);
}

.activity-extraction { --activity-color: #3b82f6; }
.activity-llm_query { --activity-color: #8b5cf6; }
.activity-composition { --activity-color: #14b8a6; }
.activity-alignment { --activity-color: #06b6d4; }
.activity-enrichment { --activity-color: #22c55e; }
.activity-synthesis { --activity-color: #f59e0b; }
.activity-storage { --activity-color: #64748b; }
.activity-analysis { --activity-color: #ec4899; }

.activity-card .card {
    border-left: 4px solid var(--activity-color, #6c757d);
}

.activity-card .card-header {
    background: linear-gradient(90deg, color-mix(in srgb, var(--activity-color) 10%, white), white);
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #e3e6f0;
}

.activity-card .card-body {
    padding: 0.75rem;
}

.status-completed { background: #198754; }
.status-failed { background: #dc3545; }
.status-running { background: #0d6efd; }
