.matrix-shell {
  overflow: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: rgba(255,255,255,.96);
}

.matrix-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 940px;
}

.matrix-table th,
.matrix-table td {
  border: 1px solid var(--color-border);
  padding: 12px;
  vertical-align: top;
}

.matrix-table th {
  background: #FBFCFF;
}

.matrix-table .criterion-header {
  width: 280px;
  min-width: 280px;
}

.matrix-table .matrix-label-input,
.matrix-table .matrix-score-input,
.matrix-table .criterion-input {
  margin-top: 0;
  border-radius: 12px;
}

.matrix-cell {
  min-height: 132px;
  border-radius: 14px;
  padding: 10px;
  background: #FBFCFF;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
  cursor: pointer;
  display: grid;
  gap: 8px;
  align-content: start;
}

.matrix-cell:hover {
  background: #FFF7F8;
  box-shadow: inset 0 0 0 1px rgba(192,57,43,.28), 0 8px 24px rgba(192,57,43,.08);
  transform: translateY(-1px);
}

.matrix-cell-preview {
  font-size: 0.84rem;
  color: #2F3542;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 5;
  -webkit-box-orient: vertical;
  line-height: 1.4;
}

.matrix-cell-empty {
  color: var(--color-muted);
  font-style: italic;
  font-size: 0.83rem;
}

.matrix-mini {
  overflow: auto;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  margin-top: 12px;
}

.matrix-mini table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 640px;
}

.matrix-mini th,
.matrix-mini td {
  border: 1px solid var(--color-border);
  padding: 8px;
  vertical-align: top;
  font-size: 0.78rem;
}

.matrix-mini th { background: #FBFCFF; }

.pagination {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.pagination button {
  min-width: 38px;
  height: 38px;
  padding: 0 10px;
}


.table-shell table,
.classlist-table-shell table {
  width: 100%;
  border-collapse: collapse;
}

.classlist-table-shell thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: linear-gradient(180deg, #fff 0%, #fbfcff 100%);
}

.classlist-table-shell th,
.classlist-table-shell td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
}

.classlist-table-shell tbody tr:hover {
  background: rgba(178, 51, 36, 0.04);
}

.classlist-table-shell td strong {
  display: block;
  font-size: 0.96rem;
  color: var(--color-text);
}

.classlist-table-shell td .meta {
  margin-top: 2px;
}


.assignment-editor-table tbody tr:hover {
  background: rgba(178,51,36,.03);
}


/* v27 targeted fixes */
.pagination button {
  border: 1px solid var(--color-border);
  border-radius: 14px;
  background: rgba(255,255,255,.96);
  color: var(--color-text);
}

.pagination button.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
