/* B layout: fixed course controls, independently scrolling table and detail. */
body.teaching-performance-open { overflow: hidden; }
.teaching-performance-view {
  position: fixed; inset: 0; z-index: 85; display: flex; flex-direction: column;
  padding: 12px; gap: 9px; overflow: hidden; background: #eef3f8; color: #152b46;
}
.teaching-performance-view[hidden] { display: none; }
.teaching-performance-header {
  display: flex; align-items: center; gap: 20px; flex: 0 0 auto;
  background: #1f4e79; color: white; border-radius: 11px; padding: 12px 16px;
}
.teaching-performance-header > div { min-width: 0; flex: 1; }
.teaching-performance-header > div > span { font-size: 12px; color: #cfe0f3; }
.teaching-performance-header h1 { margin: 3px 0 0; font-size: 23px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.teaching-performance-header p { font-size: 12px; color: #d7e5f3; }
.teaching-performance-header button { white-space: nowrap; background: #fff; color: #1f4e79; border-color: #fff; min-height: 36px; }
.teaching-performance-filters { display: flex; align-items: end; gap: 10px; flex: 0 0 auto; }
.teaching-performance-filters label { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 11px; color: #51637b; }
.teaching-performance-filters .teaching-course-filter { flex: 1; }
.teaching-performance-filters select, .teaching-performance-filters input {
  box-sizing: border-box; width: 100%; height: 35px; border: 1px solid #ccd8e6; border-radius: 6px;
  background: white; color: #173a68; font: inherit; font-size: 13px; padding: 4px 8px; min-width: 0;
}
.teaching-performance-filters select { max-width: 100%; }
.teaching-performance-filters > label:first-child { width: 180px; }
.teaching-performance-filters input { width: 145px; }
.teaching-performance-filters button { min-height: 35px; padding: 6px 13px; white-space: nowrap; }
.teaching-performance-overview { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 8px; flex: 0 0 auto; }
.teaching-performance-overview:empty { display: none; }
.teaching-performance-overview > div { background: white; border: 1px solid #dbe4ee; border-radius: 8px; padding: 8px 12px; display: flex; justify-content: space-between; align-items: center; min-width: 0; }
.teaching-performance-overview span { font-size: 12px; color: #586a80; }
.teaching-performance-overview strong { font-size: 20px; color: #1f4e79; font-variant-numeric: tabular-nums; }
.teaching-performance-overview small { font-size: 11px; font-weight: 400; margin-left: 3px; }
.teaching-performance-status { border-radius: 7px; padding: 10px 14px; background: #fff7e6; color: #875215; font-size: 13px; flex: 0 0 auto; }
.teaching-performance-status[hidden] { display: none; }
.teaching-performance-columns { flex: 1 1 0; display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 10px; min-height: 0; min-width: 0; }
.teaching-performance-table, .teaching-performance-detail { overflow: auto; min-width: 0; min-height: 0; background: white; border: 1px solid #dbe4ee; border-radius: 9px; overscroll-behavior: contain; }
.teaching-performance-table table { border-collapse: separate; border-spacing: 0; table-layout: fixed; width: 100%; font-size: 15px; }
.teaching-student-column { width: 27%; }
.teaching-performance-table thead th { position: sticky; top: 0; background: #e9f0f8; z-index: 1; color: #284f77; height: 46px; padding: 0; border-bottom: 1px solid #ccd9e7; }
.teaching-performance-table thead button { border: 0; background: transparent; color: inherit; font: inherit; font-size: 12px; font-weight: 700; width: 100%; padding: 9px 3px; white-space: nowrap; cursor: pointer; }
.teaching-performance-table thead button span { font-size: 10px; margin-left: 3px; }
.teaching-performance-table tbody td, .teaching-performance-table tbody th { height: 46px; padding: 0 8px; border-bottom: 1px solid #e9eef4; text-align: center; font-variant-numeric: tabular-nums; }
.teaching-performance-table tbody th { text-align: left; font-weight: 400; }
.teaching-performance-table tbody th button { border: 0; background: transparent; color: inherit; display: flex; align-items: center; gap: 8px; width: 100%; max-width: 100%; height: 44px; padding: 0; font: inherit; cursor: pointer; text-align: left; }
.teaching-performance-table tbody th button span { font-size: 12px; color: #6b7c92; flex: 0 0 auto; max-width: 56px; overflow: hidden; text-overflow: ellipsis; }
.teaching-performance-table tbody th strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.teaching-performance-table tbody tr:hover { background: #f2f7fc; }
.teaching-performance-table tbody tr.selected { background: #dfedfc; color: #1d4c7f; }
.teaching-total { font-weight: 800; color: #1f4e79; }
.teaching-submission-incomplete { color: #b42318; font-weight: 800; }
.teaching-submission-complete { color: #167044; font-weight: 800; }
.teaching-detail-progress { padding: 8px; border-radius: 5px; background: #fff7e6; color: #875215; font-size: 12px; line-height: 1.6; }
.teaching-detail-progress button { margin-top: 6px; border: 1px solid #a7bed8; border-radius: 5px; background: white; color: #1f4e79; padding: 5px 9px; cursor: pointer; }
.teaching-performance-detail { padding: 0 14px 12px; }
.teaching-performance-detail > header { position: sticky; top: 0; background: white; padding: 14px 0 12px; border-bottom: 1px solid #dbe4ee; z-index: 1; }
.teaching-performance-detail > header span { font-size: 12px; color: #687386; }
.teaching-performance-detail h2 { font-size: 23px; margin: 4px 0 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.teaching-performance-detail > header strong { font-size: 14px; color: #1f4e79; }
.teaching-performance-detail h3 { margin: 14px 0 8px; font-size: 15px; border-left: 3px solid #1f4e79; padding-left: 7px; }
.teaching-performance-detail dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin: 0 0 9px; }
.teaching-performance-detail dl > div { display: flex; align-items: center; justify-content: space-between; gap: 5px; background: #f3f6fa; border-radius: 5px; padding: 7px; }
.teaching-performance-detail dt { font-size: 11px; color: #687386; }
.teaching-performance-detail dd { font-size: 14px; margin: 0; font-weight: 700; }
.teaching-record { padding: 9px 0; border-bottom: 1px solid #edf0f4; overflow-wrap: anywhere; }
.teaching-record strong { display: block; font-size: 13px; }
.teaching-record p { font-size: 12px; color: #355778; margin: 5px 0; }
.teaching-record small { display: block; font-size: 11px; color: #687386; }
.teaching-empty { text-align: center; padding: 28px 10px; color: #687386; font-size: 14px; }
.teaching-empty button, .teaching-performance-status button { padding: 6px 12px; background: white; border: 1px solid #a7bed8; color: #1f4e79; border-radius: 5px; cursor: pointer; margin: 6px; }
.teaching-no-record, .teaching-formula-note { color: #687386; font-size: 11px; line-height: 1.7; }
.teaching-performance-view button:focus-visible, .teaching-performance-view select:focus-visible, .teaching-performance-view input:focus-visible { outline: 3px solid #7cb3ee; outline-offset: 2px; }
@media (max-width: 1100px) {
  .teaching-performance-columns { grid-template-columns: minmax(0, 1fr) 300px; }
  .teaching-performance-filters > label:first-child { width: 145px; }
  .teaching-performance-header p { display: none; }
  .teaching-performance-overview > div { padding: 8px; }
}
@media (max-width: 760px) {
  .teaching-performance-view { padding: 7px; }
  .teaching-performance-header h1 { font-size: 18px; }
  .teaching-performance-filters { flex-wrap: wrap; gap: 6px; }
  .teaching-performance-filters > label:first-child { width: 130px; }
  .teaching-performance-filters input { width: 135px; }
  .teaching-performance-overview { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 5px; }
  .teaching-performance-columns { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(0, 1fr); }
  .teaching-performance-table table { font-size: 13px; }
  .teaching-performance-table thead button { font-size: 10px; }
  .teaching-performance-table tbody td, .teaching-performance-table tbody th { padding: 0 4px; }
}
