.header-right {
    display: flex;
    gap: 12px;
    align-items: center;
}

.insights-section {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.insight-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    box-shadow: var(--shadow);
}

.insight-title {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
    font-weight: 600;
}

.distribution-chart {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.distribution-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.distribution-label {
    font-size: 13px;
    color: var(--text-primary);
    min-width: 60px;
    font-weight: 600;
}

.distribution-bar {
    flex: 1;
    height: 24px;
    background: var(--bg-elevated);
    border-radius: 4px;
    overflow: hidden;
    position: relative;
}

.distribution-fill {
    height: 100%;
    transition: width 0.3s ease;
    display: flex;
    align-items: center;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 600;
    color: white;
}

.distribution-fill.group-a {
    background: var(--gradient-success);
}

.distribution-fill.group-b {
    background: var(--gradient-warning);
}

.distribution-fill.group-c {
    background: var(--gradient-primary);
}

.top-item {
    padding: 16px;
    background: var(--bg-elevated);
    border-radius: 8px;
    text-align: center;
}

.top-item-label {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 4px;
}

.top-item-count {
    font-size: 13px;
    color: var(--text-muted);
}

.table-section {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

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

.table-header h2 {
    font-size: 18px;
    color: var(--text-primary);
}

.table-wrapper {
    overflow-x: auto;
    overflow-y: auto;
    max-height: 600px;
    border: 1px solid var(--border);
    border-radius: 8px;
}

.quiz-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.quiz-table thead {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--bg-elevated);
}

.quiz-table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.quiz-table td {
    padding: 12px 16px;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

.quiz-table tbody tr {
    transition: background 0.2s;
}

.quiz-table tbody tr:hover {
    background: var(--bg-elevated);
}

.table-wrapper::-webkit-scrollbar {
    height: 8px;
    width: 8px;
}

.table-wrapper::-webkit-scrollbar-track {
    background: var(--bg-secondary);
    border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb {
    background: var(--border-hover);
    border-radius: 4px;
}

.table-wrapper::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

.badge-table {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
}

.badge-group-a {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success);
}

.badge-group-b {
    background: rgba(234, 179, 8, 0.15);
    color: var(--warning);
}

.badge-group-c {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent);
}

@media (max-width: 1400px) {
    .insights-section {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .insights-section {
        grid-template-columns: 1fr;
    }
    
    .stats-section {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .header-right {
        flex-direction: column;
        width: 100%;
    }
    
    .header-right button,
    .header-right a {
        width: 100%;
    }
}