/* Batch Processing Styles */

.navigation {
    background: #f8f9fa;
    padding: 10px 20px;
    margin-bottom: 20px;
    border-bottom: 1px solid #dee2e6;
}

.navigation a {
    display: inline-block;
    padding: 8px 16px;
    margin-right: 10px;
    text-decoration: none;
    color: #495057;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.navigation a:hover {
    background: #e9ecef;
    color: #007bff;
}

.navigation a.active {
    background: #007bff;
    color: white;
}

/* Progress Dashboard */
.batch-progress,
.batch-results {
    display: none;
}

.batch-progress--visible,
.batch-results--visible {
    display: block;
}

.progress-dashboard {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

.overall-progress {
    margin-bottom: 20px;
}

.progress-bar {
    width: 100%;
    height: 24px;
    background: #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #007bff, #28a745);
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
}

.progress-percentage {
    color: #007bff;
    font-size: 1.1em;
}

.status-counts {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.status-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #dee2e6;
    font-weight: 500;
}

.status-item.completed {
    border-color: #28a745;
    background: #f8fff9;
}

.status-item.failed {
    border-color: #dc3545;
    background: #fff8f8;
}

.status-item.processing {
    border-color: #ffc107;
    background: #fffdf7;
}

.status-item.remaining {
    border-color: #6c757d;
    background: #f8f9fa;
}

/* Student Progress List */
.student-progress-list {
    border: 1px solid #dee2e6;
    border-radius: 6px;
    background: white;
}

.student-progress-item {
    border-bottom: 1px solid #f1f3f4;
    transition: background-color 0.2s ease;
}

.student-progress-item:last-child {
    border-bottom: none;
}

.student-progress-item:hover {
    background: #f8f9fa;
}

.student-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    cursor: pointer;
}

.student-name {
    font-weight: 500;
    color: #495057;
}

.student-status {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
}

.student-status.pending {
    background: #f8f9fa;
    color: #6c757d;
}

.student-status.processing {
    background: #fff3cd;
    color: #856404;
}

.student-status.completed {
    background: #d4edda;
    color: #155724;
}

.student-status.failed {
    background: #f8d7da;
    color: #721c24;
}

.expand-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid #dee2e6;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85em;
    transition: all 0.2s ease;
}

.expand-btn:hover {
    background: #f8f9fa;
    border-color: #adb5bd;
}

.expand-icon {
    transition: transform 0.2s ease;
    font-size: 0.8em;
}

.expand-btn[data-expanded='true'] .expand-icon {
    transform: rotate(90deg);
}

.student-summary {
    padding: 0 16px 8px 16px;
    font-size: 0.9em;
    color: #6c757d;
}

.student-detailed-results {
    padding: 0 16px 16px 16px;
    border-top: 1px solid #e9ecef;
    margin-top: 8px;
    background: #fafbfc;
}

/* Detailed Results */
.detailed-results {
    background: white;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.results-header {
    margin: 0 0 12px 0;
    font-size: 1em;
    color: #495057;
    padding-bottom: 8px;
    border-bottom: 1px solid #e9ecef;
}

.question-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.question-result {
    background: #f8f9fa;
    border-radius: 4px;
    border: 1px solid #e9ecef;
}

.question-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    background: #e9ecef;
    border-bottom: 1px solid #dee2e6;
    border-radius: 4px 4px 0 0;
}

.question-name {
    font-weight: 600;
    color: #495057;
}

.question-score {
    font-size: 0.9em;
    padding: 2px 6px;
    border-radius: 3px;
    font-weight: 500;
}

.question-score.passed {
    background: #d4edda;
    color: #155724;
}

.question-score.partial {
    background: #fff3cd;
    color: #856404;
}

.question-score.failed {
    background: #f8d7da;
    color: #721c24;
}

.test-cases-summary {
    padding: 8px 12px;
    display: flex;
    gap: 12px;
    font-size: 0.85em;
}

.passed-tests {
    color: #28a745;
    font-weight: 500;
}

.failed-tests {
    color: #dc3545;
    font-weight: 500;
}

.question-error {
    padding: 8px 12px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 0 0 4px 4px;
    font-size: 0.9em;
    font-family: monospace;
}

.test-case-details {
    padding: 0 8px 8px 8px;
}

.test-case {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    margin-bottom: 8px;
}

.test-case:last-child {
    margin-bottom: 0;
}

.test-case-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 10px;
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    font-size: 0.85em;
}

.test-case-number {
    font-weight: 500;
    color: #495057;
}

.test-case-status {
    padding: 1px 6px;
    border-radius: 3px;
    font-size: 0.8em;
    font-weight: 500;
}

.test-case-status.passed {
    background: #d4edda;
    color: #155724;
}

.test-case-status.failed {
    background: #f8d7da;
    color: #721c24;
}

.test-case-data {
    padding: 8px 10px;
    font-size: 0.8em;
}

.test-input,
.test-expected,
.test-output {
    margin-bottom: 4px;
}

.test-case-data code {
    background: #f1f3f4;
    padding: 2px 4px;
    border-radius: 2px;
    font-family: 'Courier New', monospace;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.stat-item {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #dee2e6;
    text-align: center;
}

.stat-label {
    display: block;
    font-size: 0.9em;
    color: #6c757d;
    margin-bottom: 8px;
}

.stat-value {
    display: block;
    font-size: 1.8em;
    font-weight: bold;
    color: #495057;
}

.stat-value.success {
    color: #28a745;
}

.stat-value.failed {
    color: #dc3545;
}

.results-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover:not(:disabled) {
    background: #0056b3;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover:not(:disabled) {
    background: #545b62;
}

/* Detailed Results */
.detailed-results {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 8px;
}

.result-item {
    padding: 16px;
    border-bottom: 1px solid #f1f3f4;
}

.result-item:last-child {
    border-bottom: none;
}

.result-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.result-student {
    font-weight: 500;
    color: #495057;
}

.result-score {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9em;
    font-weight: 500;
}

.result-score.high {
    background: #d4edda;
    color: #155724;
}

.result-score.medium {
    background: #fff3cd;
    color: #856404;
}

.result-score.low {
    background: #f8d7da;
    color: #721c24;
}

.result-details {
    font-size: 0.9em;
    color: #6c757d;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navigation {
        padding: 8px 16px;
    }

    .navigation a {
        padding: 6px 12px;
        font-size: 0.9em;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .stat-item {
        padding: 15px;
    }

    .stat-value {
        font-size: 1.5em;
    }

    .status-counts {
        gap: 10px;
    }

    .results-actions {
        flex-direction: column;
    }
}
