/* 教学沉淀模块：备课笔记与学生作品 */
.teaching-hero-panel {
  border-top: 3px solid var(--teal);
}

.works-hero-panel {
  border-top-color: var(--blue);
}

.module-kicker {
  margin: 0 0 4px;
  color: var(--teal);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.teaching-status-badge {
  align-self: flex-start;
  padding: 7px 10px;
  color: var(--teal);
  background: #edf8f5;
  border: 1px solid #cce9e1;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
}

.teaching-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.teaching-kpi {
  min-width: 0;
  padding: 12px 13px;
  background: #f7fbfa;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
}

.teaching-kpi-label {
  color: var(--muted);
  font-size: 12px;
}

.teaching-kpi-value {
  margin-top: 6px;
  color: var(--ink);
  font-size: 21px;
  font-weight: 850;
  line-height: 1.1;
}

.teaching-kpi-sub {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.teaching-layout {
  display: grid;
  grid-template-columns: minmax(340px, .84fr) minmax(0, 1.5fr);
  gap: 14px;
  align-items: start;
  margin-top: 14px;
}

.teaching-entry-panel,
.teaching-list-panel,
.teaching-ranking-panel {
  min-width: 0;
}

.teaching-entry-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  padding: 0 14px 14px;
}

.teaching-entry-form .full-row {
  grid-column: 1 / -1;
}

.date-with-weekday {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 7px;
  align-items: center;
}

.date-with-weekday output {
  min-width: 44px;
  padding: 8px 7px;
  color: var(--teal);
  background: #f2faf8;
  border: 1px solid #d3ebe5;
  border-radius: 6px;
  font-size: 11px;
  text-align: center;
  white-space: nowrap;
}

.field-hint {
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.teaching-account-locked {
  color: var(--ink);
  background: #eef4f5;
  border-color: #cbdfe0;
  cursor: not-allowed;
  opacity: 1;
}

.teaching-attachment-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.teaching-attachment-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  max-width: 100%;
  padding: 5px 7px;
  color: var(--ink);
  background: #f7faf9;
  border: 1px solid var(--soft-line);
  border-radius: 7px;
}

.teaching-attachment-thumb {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 5px;
  background: #e8f0ed;
}

.teaching-attachment-file {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  color: var(--blue);
  background: #edf4f8;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 800;
}

.teaching-attachment-name {
  min-width: 0;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

.teaching-attachment-remove {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  color: #a74d43;
  background: transparent;
  border: 0;
  border-radius: 5px;
  cursor: pointer;
}

.teaching-attachment-remove:hover {
  background: #fff0ed;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.ghost-btn {
  min-height: 36px;
  padding: 0 12px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
}

.ghost-btn:hover {
  color: var(--ink);
  background: #f4f7f6;
}

.teaching-filter-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 14px 12px;
}

.teaching-filter-row-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.teaching-record-list {
  display: grid;
  gap: 9px;
  max-height: 660px;
  padding: 0 14px 14px;
  overflow: auto;
}

.teaching-record-card,
.works-student-group {
  min-width: 0;
  background: #fbfdfc;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
}

.teaching-record-card {
  padding: 11px 12px;
}

.teaching-record-head,
.works-group-head {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.teaching-record-title,
.works-group-title {
  min-width: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.teaching-record-meta,
.works-group-meta {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.5;
}

.teaching-record-note {
  margin: 8px 0 0;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.teaching-record-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 5px;
}

.teaching-record-action {
  min-height: 28px;
  padding: 0 8px;
  color: var(--blue);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  cursor: pointer;
  font-size: 11px;
}

.teaching-record-action.danger {
  color: #a74d43;
}

.teaching-record-action:hover {
  background: #f2f7f5;
}

.teaching-card-attachments {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.teaching-card-attachment {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  max-width: 100%;
  padding: 4px 6px;
  color: var(--blue);
  background: #eef5f8;
  border: 1px solid #d8e7ed;
  border-radius: 5px;
  cursor: pointer;
  font-size: 10px;
}

.teaching-card-attachment img {
  width: 26px;
  height: 26px;
  object-fit: cover;
  border-radius: 4px;
}

.empty-teaching-state {
  padding: 30px 16px;
  color: var(--muted);
  text-align: center;
  font-size: 12px;
}

.works-student-group {
  padding: 11px 12px;
}

.works-group-head {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--soft-line);
}

.works-group-count {
  color: var(--blue);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.works-group-records {
  display: grid;
  gap: 8px;
  padding-top: 8px;
}

.works-record-line {
  min-width: 0;
  padding: 8px 9px;
  background: #fff;
  border: 1px solid var(--soft-line);
  border-radius: 6px;
}

.works-record-line .teaching-record-head {
  align-items: center;
}

.works-record-line .teaching-record-title {
  font-size: 12px;
}

.teaching-ranking-panel {
  margin-top: 14px;
}

.teaching-ranking-table {
  min-width: 620px;
}

.teaching-ranking-table th {
  background: var(--brand);
}

.teaching-readonly-note {
  margin: 0 14px 14px;
  padding: 9px 10px;
  color: #805b25;
  background: #fff8e8;
  border: 1px solid #f0dfb5;
  border-radius: 7px;
  font-size: 11px;
}

.teaching-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(14, 26, 24, .76);
}

.teaching-lightbox img {
  max-width: min(92vw, 1100px);
  max-height: 88vh;
  object-fit: contain;
  border-radius: 6px;
  box-shadow: 0 20px 70px rgba(0, 0, 0, .32);
}

.teaching-lightbox-close {
  position: fixed;
  top: 18px;
  right: 18px;
  width: 36px;
  height: 36px;
  color: #fff;
  background: rgba(0, 0, 0, .35);
  border: 1px solid rgba(255, 255, 255, .45);
  border-radius: 6px;
  cursor: pointer;
  font-size: 20px;
}

@media (max-width: 980px) {
  .teaching-layout { grid-template-columns: 1fr; }
  .teaching-record-list { max-height: none; }
}

@media (max-width: 720px) {
  .teaching-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .teaching-entry-form,
  .teaching-filter-row,
  .teaching-filter-row-three { grid-template-columns: 1fr; }
  .teaching-entry-form .full-row { grid-column: auto; }
  .teaching-status-badge { display: none; }
  .teaching-record-head,
  .works-group-head { flex-direction: column; }
  .teaching-record-actions { width: 100%; }
  .teaching-record-action { flex: 1; }
}

@media (max-width: 420px) {
  .teaching-kpi-grid { gap: 7px; }
  .teaching-kpi { padding: 10px; }
  .teaching-kpi-value { font-size: 18px; }
}
