/* Teacher-only dashboard styles. */
.teacher-main { width: min(1480px,100%); }
.teacher-summary { display: grid; gap: 16px; }
.summary-overview { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.summary-stat { display:flex; flex-direction:column; justify-content:space-between; min-height:112px; gap:16px; padding:22px 24px; background:#fff; border:1px solid #dae4ed; border-radius:14px; box-shadow:0 4px 16px rgba(22,32,51,.035); }
.summary-stat span { color:#63758b; font-size:14px; font-weight:650; }
.summary-stat strong { color:#172b45; font-size:clamp(24px,2.1vw,32px); font-variant-numeric:tabular-nums; line-height:1.12; }
.exam-summary-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.exam-summary-card { min-width:0; overflow:hidden; padding:20px 22px 22px; background:#fff; border:1px solid #d9e4ec; border-radius:14px; box-shadow:0 4px 16px rgba(22,32,51,.04); }
.exam-summary-head { display:flex; justify-content:space-between; align-items:center; gap:10px; padding-bottom:15px; border-bottom:1px solid #eaf0f3; }
.exam-summary-head h2 { margin:0; color:#155e7b; font-size:19px; font-weight:800; }
.exam-summary-head h2 span { margin-left:5px; font-size:12px; font-weight:750; letter-spacing:.04em; color:#708194; }
.exam-legend { white-space:nowrap; padding:5px 9px; background:#edf6f9; border-radius:999px; color:#155e7b; font-size:11px; font-weight:750; }
.exam-summary-metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); row-gap:22px; column-gap:18px; padding-top:18px; }
.exam-summary-metrics > div { min-width:0; display:grid; gap:5px; }
.exam-summary-metrics > div span { color:#6b7b8c; font-size:13px; }
.exam-summary-metrics > div strong { color:#182b42; font-size:clamp(19px,1.7vw,26px); font-weight:800; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; line-height:1.3; }
.exam-summary-metrics > div:nth-child(n+3) strong { color:#166984; }
.teacher-controls { gap:14px; }
.teacher-controls.filter-card { border-radius:14px; padding:22px 24px; }
.teacher-controls .filter-card-head { padding-bottom:15px; }
.teacher-controls .filter-row-search { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.teacher-controls .filter-row-selects { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:14px; }
.teacher-controls .filter-row label { display:grid; gap:7px; min-width:0; color:#344255; font-size:13px; }
.teacher-controls .filter-row input, .teacher-controls .filter-row select { width:100%; min-width:0; min-height:43px; background:#fff; border:1px solid #d7e1ea; border-radius:9px; font-size:14px; padding:9px 11px; }
.teacher-controls .filter-row input:focus, .teacher-controls .filter-row select:focus { outline:2px solid rgba(23,107,135,.22); border-color:#78b1c3; }
.teacher-controls .filter-status { margin:0; color:#697b8d; font-size:12px; }
.teacher-table-panel { border-radius:14px; }
.teacher-table-heading { display:flex; justify-content:space-between; align-items:center; gap:14px; padding:18px 22px 15px; border-bottom:1px solid #e9eef2; }
.teacher-table-heading h2 { margin:0 0 3px; font-size:17px; color:#25354b; }
.teacher-table-heading p { margin:0; color:#748293; font-size:12px; }
.record-count { flex-shrink:0; color:#176b87; background:#eef6f9; border-radius:999px; padding:6px 10px; font-size:12px; font-weight:700; }
.teacher-table { width:100%; min-width:1060px; table-layout:auto; }
.teacher-table th { padding:13px 12px; color:#627287; background:#f8fafc; font-size:12px; font-weight:700; }
.teacher-table td { padding:14px 12px; color:#29384c; font-size:13px; vertical-align:middle; }
.teacher-table td.cell-student, .teacher-table td.cell-organization { white-space:normal; }
.cell-student strong, .cell-organization strong { display:block; font-weight:750; line-height:1.35; }
.cell-student small, .cell-organization small { display:block; padding-top:4px; color:#718196; font-size:12px; white-space:normal; }
.cell-student { min-width:114px; }
.cell-organization { min-width:174px; max-width:225px; }
.exam-type-chip { display:inline-flex; white-space:nowrap; align-items:center; justify-content:center; font-size:12px; font-weight:700; border-radius:7px; padding:5px 9px; color:#155d7c; background:#eaf4f8; }
.exam-type-chip.cet6 { color:#7a5531; background:#f8f1e8; }
.history-toggle-btn { border:1px solid #c7dce6; border-radius:8px; padding:7px 10px; min-height:32px; white-space:nowrap; color:#126887; background:#eff7fa; font-size:12px; font-weight:750; }
.history-toggle-btn:hover { background:#dff0f5; }
.teacher-table .history-row td { background:#fafcfd; white-space:normal; }
.teacher-table .inline-history { grid-template-columns:minmax(260px,1.7fr) repeat(4,minmax(100px,1fr)); gap:12px; }
.teacher-table .inline-history strong { font-size:13px; }
.teacher-table #studentTableBody tr:last-child td { border-bottom:0; }
@media (max-width:1090px) {
 .teacher-controls .filter-row-selects { grid-template-columns:repeat(3,minmax(0,1fr)); }
 .teacher-table .inline-history { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:740px) {
 .summary-overview { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
 .summary-stat { padding:15px 12px; min-height:95px; }
 .summary-stat span { font-size:11px; }
 .summary-stat strong { font-size:20px; }
 .exam-summary-grid { grid-template-columns:1fr; }
 .teacher-controls.filter-card { padding:16px; }
 .teacher-controls .filter-row-search { grid-template-columns:1fr; }
 .teacher-controls .filter-row-selects { grid-template-columns:repeat(2,minmax(0,1fr)); }
 .teacher-table-heading { padding:15px; }
 .teacher-table-heading p { font-size:11px; }
 .teacher-table { min-width:0; width:100%; border-collapse:separate; border-spacing:0; }
 .teacher-table thead { display:none; }
 .teacher-table tbody { display:block; padding:10px; }
 .teacher-table tr.student-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); border:1px solid #dce6ec; border-radius:12px; overflow:hidden; margin-bottom:10px; padding:6px 9px; background:#fff; }
 .teacher-table tr.student-row td { border:0; padding:9px 7px; min-width:0; white-space:normal; font-size:13px; }
 .teacher-table tr.student-row td::before { content:attr(data-label); display:block; margin-bottom:4px; color:#77869a; font-weight:650; font-size:11px; }
 .teacher-table tr.student-row td.cell-student, .teacher-table tr.student-row td.cell-organization { grid-column:span 2; }
 .teacher-table tr.history-row { display:block; margin:-5px 0 14px; }
 .teacher-table tr.history-row.hidden { display:none; }
 .teacher-table tr.history-row td { display:block; padding:10px 12px; border:1px solid #e4ebef; border-radius:10px; }
 .teacher-table .inline-history { grid-template-columns:1fr; gap:7px; padding:8px; }
}
@media (max-width:410px) {
 .summary-overview { grid-template-columns:1fr 1fr; }
 .summary-stat:last-child { grid-column:span 2; min-height:75px; }
 .teacher-controls .filter-row-selects { grid-template-columns:1fr; }
 .exam-summary-card { padding:16px; }
}

/* Compact statistics: one overview row, then one row per examination. */
.teacher-summary { gap:10px; }
.summary-overview { grid-template-columns:repeat(3,minmax(0,1fr)); }
.summary-stat { min-height:0; padding:14px 18px; gap:8px; }
.summary-stat:last-child { grid-column:auto; min-height:0; }
.summary-stat strong, .exam-summary-metrics > div strong { font-size:clamp(20px,2.1vw,32px); line-height:1.2; }
.exam-summary-grid { grid-template-columns:1fr; gap:8px; overflow-x:auto; }
.exam-summary-card { display:grid; grid-template-columns:120px minmax(440px,1fr); align-items:center; padding:12px 18px; min-width:600px; border-radius:10px; }
.exam-summary-head { padding:0; border:0; }
.exam-summary-head h2 { font-size:16px; }
.exam-summary-head h2 span { display:block; margin:4px 0 0; }
.exam-legend { display:none; }
.exam-summary-metrics { grid-template-columns:repeat(4,minmax(0,1fr)); padding:0; gap:12px; }
.exam-summary-metrics > div strong { white-space:nowrap; overflow-wrap:normal; }
/* Shared native table columns keep every header aligned with its data. */
.teacher-table { min-width:1324px; width:100%; table-layout:auto; border-collapse:collapse; }
.teacher-table thead { display:table-header-group; }
.teacher-table tbody { display:table-row-group; padding:0; }
.teacher-table tr.student-row { display:table-row; margin:0; padding:0; border:0; }
.teacher-table th, .teacher-table tr.student-row > td { text-align:left; vertical-align:middle; padding:12px 10px; white-space:nowrap; font-size:13px; line-height:1.4; }
.teacher-table th { color:#627287; font-weight:650; }
.teacher-table tr.student-row > td { display:table-cell; border-bottom:1px solid #e4ebef; }
.teacher-table tr.student-row > td::before { display:none; }
.teacher-table col.col-name { width:80px; }
.teacher-table col.col-id { width:100px; }
.teacher-table col.col-college, .teacher-table col.col-major { width:150px; }
.teacher-table col.col-class { width:130px; }
.teacher-table col.col-type { width:76px; }
.teacher-table col.col-score, .teacher-table col.col-vocab { width:94px; }
.teacher-table col.col-best-score { width:108px; }
.teacher-table col.col-best-vocab { width:120px; }
.teacher-table col.col-attempts { width:72px; }
.teacher-table col.col-history { width:100px; }
.teacher-table .exam-type-chip { box-sizing:border-box; font-size:11px; line-height:16px; padding:3px 8px; border-radius:5px; font-weight:600; color:#185d9b; background:#d7e9fc; }
.teacher-table .exam-type-chip.cet6 { color:#96501c; background:#ffe2bb; }
.teacher-table .history-toggle-btn { font-size:12px; padding:5px 9px; min-height:30px; }
.teacher-table-panel .table-wrap { overflow-x:auto; -webkit-overflow-scrolling:touch; }
.teacher-table tr.history-row { display:table-row; margin:0; }
.teacher-table tr.history-row.hidden { display:none; }
.teacher-table tr.history-row td { display:table-cell; border-radius:0; padding:8px 16px; }
.teacher-table .inline-history { border-left:3px solid #29a99d; border-radius:0; }
@media (max-width:740px) {
 .summary-stat { padding:12px 8px; }
}
