.shell.student-browser-mode {
  grid-template-columns: 280px minmax(250px, 310px) minmax(0, 1fr) !important;
}

.student-browser-panel {
  align-self: start;
  min-width: 0;
  padding: 16px;
  background: linear-gradient(180deg, #fffdfd, #f6fbfb 72%, #fff9e9);
  border: 1px solid #f0d9df;
  border-radius: 18px;
  box-shadow: 0 12px 32px rgba(92, 111, 137, 0.1);
}

@media (min-width: 761px) {
  .shell.student-browser-mode {
    min-height: calc(100vh - 36px);
    align-items: start;
  }

  .shell.student-browser-mode > .sidebar,
  .shell.student-browser-mode > .student-browser-panel,
  .shell.student-browser-mode > .main {
    height: calc(100vh - 36px);
    box-sizing: border-box;
    align-self: start;
  }

  .shell.student-browser-mode > .sidebar {
    top: 18px;
  }

  .student-browser-panel {
    position: sticky;
    top: 18px;
    overflow: hidden;
  }

  .shell.student-browser-mode > .main {
    position: sticky;
    top: 18px;
    max-width: none;
    margin: 0;
    padding: 0 18px 18px;
    overflow-y: auto;
  }
}

.student-browser-heading {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-left: 4px solid #ee8cac;
  border-radius: 0 12px 12px 0;
  background: linear-gradient(90deg, #fde9ef, #eef8f8 76%, #fff7dc);
}

.student-browser-heading h2 {
  margin: 0;
  color: #063b62;
  font-size: 17px;
}

.student-browser-heading p {
  margin: 5px 0 0;
  color: #607486;
  font-size: 12px;
}

.student-browser-panel .search {
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 12px;
  border-color: #d8cbd2;
  border-radius: 10px;
  background: #fff;
}

.student-browser-panel .add-student {
  width: 100%;
  min-height: 42px;
  margin: 0 0 12px;
  border-radius: 11px;
  background: linear-gradient(135deg, #f58663, #f36e8d);
  box-shadow: 0 6px 14px rgba(243, 110, 141, 0.2);
  font-size: 16px;
}

.student-browser-panel .student-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 9px;
  max-height: calc(100vh - 255px);
  overflow-y: auto;
  padding: 2px 3px 8px;
}

.student-browser-panel .student-item {
  min-height: 64px;
  padding: 11px 12px;
  text-align: left;
  border: 1px solid #eadde1;
  border-left: 4px solid #ee8cac;
  border-radius: 12px;
  background: #fffafa;
  box-shadow: 0 4px 11px rgba(92, 111, 137, 0.06);
}

.student-browser-panel .student-item:hover,
.student-browser-panel .student-item.active {
  background: linear-gradient(90deg, #fde9ef, #eef8f8 76%, #fff7dc);
}

/* 全部预览：横向浏览时固定学生、课程和日期，避免关键核对信息被遮住。 */
.modal-backdrop .modal.lesson-preview-modal {
  width: fit-content !important;
  max-width: calc(100vw - 24px) !important;
  max-height: calc(100vh - 24px);
  overflow: hidden auto;
}

.lesson-preview-modal .table-wrap {
  width: fit-content;
  max-width: 100%;
  max-height: min(72vh, 760px);
  overflow: auto;
  border: 1px solid #eadde1;
  border-radius: 10px;
}

.lesson-preview-modal table {
  width: max-content;
  min-width: 0;
  table-layout: auto;
  border-collapse: separate;
  border-spacing: 0;
}

.lesson-preview-modal th {
  position: sticky;
  top: 0;
  z-index: 4;
}

.lesson-preview-modal .lesson-preview-fixed {
  position: sticky;
  z-index: 2;
  background: #fffdfd;
  box-shadow: 2px 0 0 #eadde1;
}

.lesson-preview-modal th.lesson-preview-fixed {
  z-index: 5;
  background: linear-gradient(90deg, #fde9ef, #eef8f8 76%, #fff7dc);
}

.lesson-preview-modal td {
  white-space: nowrap;
  padding: 10px 13px;
}

.lesson-preview-modal .lesson-preview-note {
  white-space: normal;
  min-width: 150px;
  max-width: 260px;
  line-height: 1.45;
}

.lesson-preview-modal .lesson-preview-actions {
  min-width: 92px;
  width: 92px;
  padding-left: 8px;
  padding-right: 8px;
}

.lesson-preview-modal .lesson-preview-actions .lesson-row-actions {
  gap: 6px;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .shell.student-browser-mode {
    grid-template-columns: 240px minmax(220px, 280px) minmax(0, 1fr) !important;
  }
}

@media (max-width: 760px) {
  .shell.student-browser-mode {
    grid-template-columns: 1fr !important;
  }
  .student-browser-panel .student-list {
    max-height: 360px;
  }
}
