.teacher-portal {
  max-width: 1120px;
  margin: 16px auto 32px;
}
.teacher-portal > header, .teacher-list li, .teacher-subject > summary {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}
.teacher-portal h1 { margin: 0; font-size: clamp(1.3rem, 3vw, 1.75rem); }
.teacher-grid {
  display: grid;
  grid-template-columns: minmax(180px, 245px) minmax(0, 1fr);
  align-items: start;
  gap: 16px;
}
.teacher-stack { display: grid; gap: 12px; min-width: 0; }
.teacher-card { margin: 0; padding: 16px; min-width: 0; overflow-wrap: anywhere; }
.teacher-card h2 { margin: 0 0 12px; font-size: 1.05rem; }
.teacher-picker { display: grid; gap: 7px; }
.teacher-picker select { width: 100%; min-width: 0; }
.teacher-list { padding: 0; margin: 0; list-style: none; }
.teacher-list li { padding: 9px 0; border-top: 1px solid #e4e8ed; }
.teacher-list li div:first-child, .teacher-verify > label { display: grid; gap: 3px; }
.teacher-list span, .teacher-list small, .teacher-verify small { color: #405367; font-size: .86rem; }
.teacher-subject { border-top: 1px solid #e4e8ed; padding: 7px 0; }
.teacher-subject > summary { list-style: none; align-items: center; flex-wrap: wrap; cursor: pointer; }
.teacher-subject > summary::-webkit-details-marker { display: none; }
.teacher-subject > summary strong::before { content: '▸ '; }
.teacher-subject[open] > summary strong::before { content: '▾ '; }
.teacher-lightbar { display: flex; border-radius: 8px; overflow: hidden; height: 7px; margin: 8px 0; }
.teacher-status-row, .teacher-actions { display: flex; gap: 7px; flex-wrap: wrap; align-items: center; }
.teacher-status { line-height: 1.4; border-radius: 12px; padding: 2px 7px; white-space: nowrap; font-size: .78rem; }
.teacher-status.green { background: #e2f2e8; color: #175d37; }
.teacher-status.yellow { background: #fff0c6; color: #704a00; }
.teacher-status.red { background: #ffe5e4; color: #951a21; }
.teacher-status.gray { background: #ebeff2; color: #42546a; }
.teacher-lightbar .green { background: #2b8b53; }
.teacher-lightbar .yellow { background: #d99917; }
.teacher-lightbar .red { background: #c84449; }
.teacher-lightbar .gray { background: #bac4ce; }
.teacher-verify { display: grid; gap: 6px; margin: 10px 0; }
.teacher-verify input { max-width: 110px; }
.teacher-verify button { justify-self: start; }
.teacher-portal [data-teacher-message]:empty { display: none; }
.teacher-portal [data-teacher-message] { padding: 6px 8px; margin: 8px 0; color: #174b64; }
@media (max-width: 720px) {
  .teacher-grid { grid-template-columns: 1fr; }
  .teacher-list li { flex-wrap: wrap; }
}
