/* New Stage Layout */
.stage-container {
    background: var(--background-card);
    margin-bottom: 16px;
    border-radius: var(--border-radius);
}


.stage-top-left .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.stage-top-center {
    text-align: left;
}

.stage-scenario-info h2 {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    line-height: 1.5;
}

.stage-scenario-meta {
    display: flex;
    gap: 1rem;
    margin-left: auto;
    font-size: 0.75rem;
    color: #999;
}

.stage-scenario-meta .scenario-badge {
    padding: 6px 12px;
}

.stage-meta-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.stage-top-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 250px;
}

.stage-progress-bar {
    flex: 1;
    height: 8px;
    background: #f0f0f0;
    border-radius: 4px;
    overflow: hidden;
}

.stage-progress-bar .progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
}

.progress-percentage {
    font-size: 0.875rem;
    font-weight: 600;
    color: #667eea;
    min-width: 40px;
    text-align: right;
}

/* Steps Bar */
.stage-steps-bar {
    display: flex;
    grid-template-columns: 1fr auto;
    align-items: center;
    padding: 0 1.5rem 0.5rem 1.5rem;
    gap: 2rem;
}

.stage-steps-left {
    display: flex;
    align-items: center;
}

/* Step Indicators */
.stage-steps-indicator {
    display: flex;
    align-items: center;
    gap:0;
}

.step-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
}

.step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    right: -8px;
    width: 16px;
    height: 2px;
    background: var(--background-badge);
}

.step-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--background-badge);
    transition: all 0.3s ease;
    position: relative;
}

.step-icon {
    display: none;
    width: 24px;
    height: 24px;
    color: var(--primary-color);
}

.step-label {
    font-size: 0.85rem;
    color: #999;
    font-weight: 500;
    text-transform: capitalize;
}

/* Idle Steps */
.step-item.idle .step-dot {
    background: var(--background-switch-off);
    width: 24px;
    height: 24px;
}

.step-item.idle .step-icon {
    display: none;
}

.step-item.idle .step-label {
    color: #999;
}

/* Completed Steps */
.step-item.completed .step-dot {
    background: transparent;
    width: 24px;
    height: 24px;
    border-radius: 0;
}

.step-item.completed .step-icon {
    display: block;
}

.step-item.completed .step-label {
    color: var(--text-primary);
}

/* Loading/Processing Steps */
.step-item.processing .step-dot {
    background: transparent;
    width: 24px;
    height: 24px;
    border-radius: 0;
}

.step-item.processing .step-icon {
    display: block;
    color: var(--text-primary);
    animation: spin 1s linear infinite;
}

.step-item.processing .step-label {
    color: var(--text-primary);
    font-weight: 600;
}

/* Error Steps */
.step-item.error .step-dot {
    background: transparent;
    width: 24px;
    height: 24px;
    border-radius: 0;
}

.step-item.error .step-icon {
    display: block;
    color: #dc3545;
    animation: none;
}

.step-item.error .step-label {
    color: #dc3545;
}

/* Cancelled State */
.step-item.cancelled .step-dot {
    background: transparent;
    width: 24px;
    height: 24px;
    border-radius: 0;
}

.step-item.cancelled .step-icon {
    display: block;
    color: #dc3545;
    animation: none;
}

.step-item.cancelled .step-label {
    color: #6c757d;
}

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

.stage-steps-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stage-nav-buttons {
    display: flex;
    gap: 0.5rem;
}

.stage-nav-buttons .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.stage-nav-buttons .btn i {
    width: 16px;
    height: 16px;
}

.step-item.idle.idle .step-dot {
    width: 16px;
    height: 16px;
}

h2#stageReelTitle {
    font-size: 1.25rem;
}

#previousStagesPanel .side-panel-content {
    padding: 1rem;
}