*{margin:0;padding:0;box-sizing:border-box}
body{font-family:'Segoe UI',Tahoma,sans-serif;background:#f0f2f5;color:#333;line-height:1.6}
.header{background:linear-gradient(135deg,#1a237e,#283593);color:#fff;padding:30px 40px;box-shadow:0 2px 10px rgba(0,0,0,.2)}
.header h1{font-size:28px;margin-bottom:5px}
.header p{opacity:.85;font-size:14px}
.container{max-width:1400px;margin:0 auto;padding:30px 20px}
.summary-cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:20px;margin-bottom:30px}
.card{background:#fff;border-radius:12px;padding:24px;box-shadow:0 2px 8px rgba(0,0,0,.08);transition:transform .2s}
.card:hover{transform:translateY(-2px)}
.card .label{font-size:13px;color:#666;text-transform:uppercase;letter-spacing:1px}
.card .value{font-size:36px;font-weight:700;color:#1a237e;margin-top:5px}
.card .sub{font-size:12px;color:#999;margin-top:4px}
.section-title{font-size:18px;font-weight:700;color:#1a237e;margin-bottom:14px;padding-bottom:8px;border-bottom:2px solid #e0e0e0}
.course-group{background:#fff;border-radius:12px;margin-bottom:24px;box-shadow:0 2px 8px rgba(0,0,0,.08);overflow:hidden;padding:24px 28px}
.course-group-header{margin-bottom:16px}
.course-group-header h3{font-size:20px;font-weight:700;color:#1a237e;margin:0}
.course-group-fullname{font-size:13px;color:#78909c;display:block;margin-top:2px}
.group-kpi-row{display:flex;gap:24px;margin-bottom:18px;flex-wrap:wrap}
.group-kpi{background:#f5f7fa;border-radius:10px;padding:16px 24px;flex:1;min-width:140px;text-align:center}
.group-kpi-val{font-size:28px;font-weight:700;color:#1a237e}
.group-kpi-rate{color:#2e7d32}
.group-kpi-label{font-size:12px;color:#78909c;text-transform:uppercase;letter-spacing:.5px;margin-top:4px}
.group-cats{display:flex;flex-direction:column;gap:8px}
.group-cat-item{display:grid;grid-template-columns:1fr 60px 65px 120px;gap:12px;align-items:center;padding:8px 12px;background:#fafafa;border-radius:8px}
.group-cat-name{font-size:13px;color:#37474f;font-weight:500;line-height:1.3}
.group-cat-count{font-size:13px;color:#78909c;text-align:center;font-weight:600}
.group-cat-rate{font-size:14px;font-weight:700;text-align:right}
.group-cat-bar{height:6px;background:#e0e0e0;border-radius:3px;overflow:hidden}
.group-cat-fill{height:100%;border-radius:3px}
#course-groups-container{display:grid;grid-template-columns:repeat(auto-fit,minmax(480px,1fr));gap:24px;margin-bottom:30px}
.course-section{background:#fff;border-radius:12px;margin-bottom:30px;box-shadow:0 2px 8px rgba(0,0,0,.08);overflow:hidden}
.course-header{background:linear-gradient(135deg,#1565c0,#1976d2);color:#fff;padding:20px 28px;cursor:pointer;display:flex;justify-content:space-between;align-items:center}
.course-header:hover{background:linear-gradient(135deg,#0d47a1,#1565c0)}
.course-header h2{font-size:20px}
.course-header .badge{background:rgba(255,255,255,.2);padding:6px 16px;border-radius:20px;font-size:14px;white-space:nowrap}
.course-body{padding:0}
.quiz-section{border-bottom:1px solid #e0e0e0}
.quiz-section:last-child{border-bottom:none}
.quiz-header{padding:16px 28px;background:#f5f7fa;font-weight:600;color:#37474f;font-size:16px;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #e0e0e0}
.category-section{border-bottom:1px solid #e8e8e8}
.category-section:last-child{border-bottom:none}
.category-header{padding:12px 28px;background:#e3f2fd;display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #bbdefb}
.cat-name{font-weight:600;color:#1565c0;font-size:15px}
.cat-stats{display:flex;gap:8px;align-items:center}
.badge-cat{background:rgba(21,101,192,.12);color:#1565c0;padding:4px 12px;border-radius:12px;font-size:12px;font-weight:600}
.badge-rate{padding:4px 12px;border-radius:12px;font-size:12px;font-weight:600}

.question-table{width:100%;border-collapse:collapse}
.question-table thead th{background:#eceff1;padding:12px 16px;text-align:left;font-size:12px;text-transform:uppercase;letter-spacing:.5px;color:#546e7a;position:sticky;top:0;z-index:1}
.question-table thead th.num{text-align:center;width:50px}
.question-table thead th.stat{text-align:center;width:100px}
.question-table thead th.pct{text-align:center;width:90px}
.question-table tbody tr{border-bottom:1px solid #f0f0f0}
.question-table tbody tr:hover{background:#f8f9ff}
.question-table tbody tr:last-child{border-bottom:none}
.question-table td{padding:12px 16px;font-size:14px;vertical-align:middle}
.question-table td.num{text-align:center;color:#78909c;font-size:13px}
.question-table td.stat{text-align:center;font-weight:600}
.question-table td.q-name{max-width:500px}
.stat-correct{color:#2e7d32}
.stat-wrong{color:#c62828}
.stat-total{color:#1565c0}
.progress-bar{width:100%;height:8px;background:#ffcdd2;border-radius:4px;overflow:hidden;margin-top:4px}
.progress-bar .fill{height:100%;background:#4caf50;border-radius:4px}
.pct-text{font-size:13px;font-weight:700;text-align:center}
.pct-high{color:#2e7d32}
.pct-mid{color:#f57f17}
.pct-low{color:#c62828}
.toggle-icon{font-size:20px;transition:transform .3s}
.course-section.collapsed .toggle-icon{transform:rotate(-90deg)}
.course-section.collapsed .course-body{display:none}
.filter-bar{background:#fff;border-radius:12px;padding:16px 24px;margin-bottom:20px;box-shadow:0 2px 8px rgba(0,0,0,.08);display:flex;gap:16px;align-items:center;flex-wrap:wrap}
.filter-bar label{font-size:13px;color:#666;font-weight:600}
.filter-bar select,.filter-bar input{padding:8px 12px;border:1px solid #ddd;border-radius:6px;font-size:14px;outline:none}
.filter-bar select:focus,.filter-bar input:focus{border-color:#1976d2;box-shadow:0 0 0 2px rgba(25,118,210,.15)}
.search-input{min-width:250px}
.export-btn{background:#2e7d32;color:#fff;border:none;padding:10px 20px;border-radius:6px;cursor:pointer;font-size:14px;font-weight:600;margin-left:auto}
.export-btn:hover{background:#1b5e20}
.timestamp{text-align:center;color:#999;font-size:12px;padding:20px}
@media(max-width:960px){
  #course-groups-container{grid-template-columns:1fr}
  .group-cat-item{grid-template-columns:1fr 50px 55px 80px;gap:8px}
}
@media(max-width:768px){
  .header{padding:20px}
  .header h1{font-size:22px}
  .container{padding:15px 10px}
  .course-header{flex-direction:column;gap:10px}
  .question-table{font-size:12px}
  .question-table td,.question-table th{padding:8px 10px}
  .filter-bar{flex-direction:column}
  .search-input{min-width:100%}
  .group-kpi-row{flex-direction:column;gap:10px}
  .course-group{padding:16px}
}