/* Main Grid & Table Layout */
.table-wrapper {
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  overflow: auto;
  max-height: calc(100vh - 128px);
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 5;
  background: #f8fafc;
  color: #1e293b;
  font-weight: 600;
  font-size: 12px;
  border-bottom: 2px solid var(--border);
  border-right: 1px solid var(--border-light);
  padding: 5px 6px;
  text-align: center;
  user-select: none;
}

thead th:last-child {
  border-right: none;
}

thead th.sortable {
  cursor: pointer;
}

thead th.sortable:hover {
  background: #f1f5f9;
  color: var(--primary);
}

/* Day Header specific */
.day-col-header {
  line-height: 1.25;
}

.day-col-name {
  font-size: 11.5px;
  font-weight: 600;
  display: block;
}

.day-col-sub {
  font-size: 10.5px;
  font-weight: 400;
  color: var(--text-muted);
  display: block;
}

th.col-today {
  background: #eff6ff;
  border-top: 2px solid var(--accent);
}

th.col-today .day-col-sub {
  color: var(--accent);
  font-weight: 700;
}

th.col-selected {
  background: #f0fdf4;
}

/* Table Body */
tbody tr {
  background: #fff;
  transition: background 0.05s ease;
}

tbody tr:nth-child(even) {
  background: var(--row-alt);
}

tbody tr:hover {
  background: var(--row-hover) !important;
}

tbody td {
  padding: 3px 6px;
  border-bottom: 1px solid var(--border-light);
  border-right: 1px solid var(--border-light);
  vertical-align: middle;
  height: 32px;
  line-height: 1.2;
}

tbody td:last-child {
  border-right: none;
}

/* Generic Column widths */
.col-stt {
  width: 38px;
  text-align: center;
  color: var(--text-muted);
  font-size: 11.5px;
}

.col-phong {
  width: 62px;
  text-align: center;
  font-weight: 700;
  color: #0f172a;
}

.col-mssv {
  width: 86px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--info);
  white-space: nowrap;
}

.col-name {
  width: 165px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.col-day {
  width: 96px;
  text-align: center;
  padding: 1px 2px;
}
