/* V3.7 — CSS riêng nhóm gv. Chỉ selector gắn với trang của nhóm (tiền tố .pg-<trang>), dùng biến --at-* của atlas.css. */

/* ==========================================================================
   QUY TẮC CHUNG CHO CẢ 3 MÀN (.pg-13, .pg-14, .pg-16)
   ========================================================================== */

/* Accent pill trên tiêu đề panel */
.pg-13 .at-panel > .at-panel-header,
.pg-16 .at-panel > .at-panel-header {
  background: var(--at-brand-soft, #EAF4FF);
  border-bottom: 1px solid var(--at-line, #DDE4EF);
  padding: 0 12px;
  border-radius: var(--at-radius-md) var(--at-radius-md) 0 0;
  display: flex;
  align-items: center;
}
.pg-13 .at-panel > .at-panel-header {
  min-height: 38px;
  height: 38px;
  margin: -16px -16px 12px;
}
.pg-16 .at-panel > .at-panel-header {
  min-height: 36px;
  height: 36px;
  margin: -16px -16px 10px;
}
.pg-13 .at-panel--flush > .at-panel-header,
.pg-16 .at-panel--flush > .at-panel-header {
  margin: 0;
}
.pg-13 .at-panel-header h2,
.pg-14 .at-panel-header h2,
.pg-16 .at-panel-header h2 {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: var(--at-ink, #172649);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.pg-13 .at-panel-header h2::before,
.pg-14 .at-panel-header h2::before,
.pg-16 .at-panel-header h2::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 20px;
  background: #176BFF;
  border-radius: 2px;
  flex: none;
}

/* Thẻ nguyện vọng NV1, NV2, NV3 */
.pg-13 .at-chip-nv,
.pg-14 .at-chip-nv,
.pg-16 .at-chip-nv {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 22px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}
.pg-13 .at-chip-nv1,
.pg-14 .at-chip-nv1,
.pg-16 .at-chip-nv1 {
  background-color: var(--at-brand-soft, #E4F0FF);
  color: var(--at-brand, #2454B8);
}
.pg-13 .at-chip-nv2,
.pg-14 .at-chip-nv2,
.pg-16 .at-chip-nv2 {
  background-color: var(--at-success-soft, #E5F5EC);
  color: var(--at-ai, #176B60);
}
.pg-13 .at-chip-nv3,
.pg-14 .at-chip-nv3,
.pg-16 .at-chip-nv3 {
  background-color: var(--at-surface-2, #F0F3F8);
  color: var(--at-ink-muted, #596579);
}

/* Badges trạng thái duyệt */
.pg-13 .at-badge--warning,
.pg-14 .at-badge--warning,
.pg-16 .at-badge--warning {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 2px 8px;
  border-radius: 4px;
  background-color: var(--at-warning-soft, #FFF1D8);
  color: var(--at-warning, #975600);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}
.pg-13 .at-badge--success,
.pg-14 .at-badge--success,
.pg-16 .at-badge--success {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 2px 8px;
  border-radius: 4px;
  background-color: var(--at-success-soft, #E5F5EC);
  color: var(--at-ai, #176B60);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}
.pg-13 .at-badge--danger,
.pg-14 .at-badge--danger,
.pg-16 .at-badge--danger {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 2px 8px;
  border-radius: 4px;
  background-color: var(--at-warning-soft, #FCE8EB);
  color: var(--at-danger, #B42335);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}
.pg-13 .at-badge--neutral,
.pg-14 .at-badge--neutral,
.pg-16 .at-badge--neutral {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 2px 8px;
  border-radius: 4px;
  background-color: var(--at-surface-2, #F0F3F8);
  color: var(--at-ink-muted, #596579);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
}

/* Nút phụ trong bảng */
.pg-13 .at-td-actions .btn,
.pg-14 .at-td-actions .btn,
.pg-16 .at-td-actions .btn {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  font-weight: 600;
  line-height: 26px;
  border-color: var(--at-brand, #2454B8);
  color: var(--at-brand, #2454B8);
  border-radius: 4px;
  background-color: var(--at-surface, #FFFFFF);
  white-space: nowrap;
}
.pg-13 .at-td-actions .btn:hover,
.pg-14 .at-td-actions .btn:hover,
.pg-16 .at-td-actions .btn:hover {
  background-color: var(--at-brand-soft, #EAF4FF);
  color: var(--at-brand-hover, #1D4496);
}

/* ==========================================================================
   MÀN 13: TỔNG QUAN GIẢNG VIÊN (.pg-13)
   ========================================================================== */

.pg-13 .at-page-header {
  min-height: 64px;
  margin-bottom: 12px;
}
.pg-13 .at-breadcrumb {
  font-size: 12px;
  line-height: 18px;
  margin-bottom: 2px;
}
.pg-13 .at-page-header h1 {
  font-size: 24px;
  line-height: 30px;
  font-weight: 700;
  margin: 0;
}
.pg-13 .at-page-desc {
  font-size: 12px;
  line-height: 18px;
  color: var(--at-ink-muted, #596579);
  margin-top: 2px;
  margin-bottom: 0;
}
.pg-13 .at-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pg-13 .at-panel {
  border-radius: 6px;
  border: 1px solid var(--at-line, #DDE4EF);
  background: var(--at-surface, #FFFFFF);
}

/* Period */
.pg-13 .at-period {
  display: grid;
  grid-template-columns: minmax(0, 55%) minmax(0, 45%);
  align-items: center;
  min-height: 72px;
  padding: 10px 14px;
  gap: 12px;
  border-radius: 6px;
  border: 1px solid var(--at-line, #DDE4EF);
  background: var(--at-surface, #FFFFFF);
}
.pg-13 .at-period-main {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pg-13 .at-period-tile {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--at-brand-soft, #EAF2FF);
  color: var(--at-brand, #2454B8);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.pg-13 .at-period-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}
.pg-13 .at-period-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--at-ink);
}
.pg-13 .at-period-time {
  font-size: 12px;
  line-height: 18px;
  color: var(--at-ink-muted, #596579);
}
.pg-13 .at-period-aside {
  font-size: 12px;
  line-height: 19px;
  color: var(--at-ink-muted, #344563);
  padding: 0 16px;
  border-left: 1px solid var(--at-line, #DDE4EF);
  margin: 0;
}

@media (max-width: 767.98px) {
  .pg-13 .at-period {
    grid-template-columns: 1fr;
    padding: 12px 16px;
  }
  .pg-13 .at-period-aside {
    padding: 10px 0 0 0;
    border-left: 0;
    border-top: 1px solid var(--at-line, #DDE4EF);
  }
}

/* Metric Ledger phẳng */
.pg-13 .at-ledger {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: none;
  border-radius: 0;
  background: var(--at-surface, #FFFFFF);
}
.pg-13 .at-ledger-item {
  text-align: center;
  padding: 10px 8px;
  height: 96px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 4px;
  border-right: 1px solid var(--at-line, #DDE4EF);
  border-bottom: none;
  margin: 0;
}
.pg-13 .at-ledger-item:last-child {
  border-right: none;
}
.pg-13 .at-ledger-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--at-ink-muted, #596579);
}
.pg-13 .at-ledger-value {
  font-size: 30px;
  line-height: 34px;
  font-weight: 700;
}
.pg-13 .at-ledger-note {
  font-size: 12px;
  line-height: 16px;
  color: var(--at-ink-muted, #596579);
}
.pg-13 .at-ledger-item:nth-child(1) .at-ledger-value { color: var(--at-brand, #2454B8); }
.pg-13 .at-ledger-item:nth-child(2) .at-ledger-value { color: var(--at-ai, #176B60); }
.pg-13 .at-ledger-item:nth-child(3) .at-ledger-value { color: var(--at-warning, #C47B11); }
.pg-13 .at-ledger-item:nth-child(4) .at-ledger-value { color: var(--at-ai, #176B60); }

/* Grid 8/12 & 4/12 */
.pg-13 .at-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 12px;
}
.pg-13 .at-panel--flush > .at-panel-body {
  padding: 0;
}

/* Toolbar bảng SV chờ duyệt */
.pg-13 .at-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--at-line, #DDE4EF);
  margin-bottom: 0;
}
.pg-13 .at-toolbar .at-search {
  flex: 0 0 65%;
  width: 65%;
}
.pg-13 .at-toolbar .at-search .form-control {
  width: 100%;
  height: 34px;
  font-size: 12px;
  border-color: var(--at-line-strong, #B7C5D8);
  border-radius: 4px;
}
.pg-13 .at-filter-wrap {
  flex: 0 0 calc(35% - 12px);
  width: calc(35% - 12px);
  display: flex;
  align-items: center;
  gap: 8px;
}
.pg-13 .at-filter-label {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--at-ink-muted, #596579);
  margin: 0;
}
.pg-13 .at-filter-wrap select {
  flex: 1;
  width: 100%;
  height: 34px;
  font-size: 12px;
  border-color: var(--at-line-strong, #B7C5D8);
  border-radius: 4px;
}

/* Bảng SV chờ duyệt */
.pg-13 .at-table {
  table-layout: fixed;
  width: 100%;
}
.pg-13 .at-table th {
  background-color: var(--at-brand-soft, #EDF5FE);
  border-bottom: 1px solid var(--at-line, #DDE4EF);
  font-size: 12px;
  font-weight: 600;
  height: 32px;
  padding: 4px 8px;
  color: var(--at-ink);
  line-height: 1.2;
}
.pg-13 .at-table td {
  padding: 5px 8px;
  font-size: 12px;
  line-height: 18px;
  border-bottom: 1px solid var(--at-line, #DDE4EF);
  height: 40px;
  vertical-align: middle;
}
.pg-13 .at-table th:nth-child(1), .pg-13 .at-table td:nth-child(1) { width: 26%; }
.pg-13 .at-table th:nth-child(2), .pg-13 .at-table td:nth-child(2) { width: 18%; }
.pg-13 .at-table th:nth-child(3), .pg-13 .at-table td:nth-child(3) { width: 12%; }
.pg-13 .at-table th:nth-child(4), .pg-13 .at-table td:nth-child(4) { width: 9%; }
.pg-13 .at-table th:nth-child(5), .pg-13 .at-table td:nth-child(5) { width: 7%; }
.pg-13 .at-table th:nth-child(6), .pg-13 .at-table td:nth-child(6) { width: 14%; }
.pg-13 .at-table th:nth-child(7), .pg-13 .at-table td:nth-child(7) { width: 14%; }

.pg-13 .at-topic-title {
  font-size: 12px;
  line-height: 17px;
  font-weight: 600;
  color: var(--at-ink, #172649);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.pg-13 .at-student-name {
  font-size: 12px;
  font-weight: 600;
  color: var(--at-ink, #172649);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pg-13 .at-student-code {
  font-size: 12px;
  font-weight: 500;
  color: var(--at-ink-muted, #596579);
}
.pg-13 .at-ai-score {
  font-size: 12px;
  font-weight: 600;
  color: var(--at-ai, #176B60);
}
.pg-13 #homeReviewMobileList {
  padding: 0 12px 12px;
}

/* Aside: Trạng thái đợt */
.pg-13 .at-period-status-list {
  display: flex;
  flex-direction: column;
}
.pg-13 .at-period-status-wrap {
  padding: 12px;
  border-bottom: 1px solid var(--at-line, #DDE4EF);
}
.pg-13 .at-period-status-box {
  background: var(--at-success-soft, #EAF7F0);
  border-radius: 4px;
  padding: 10px 12px;
  margin: 0;
}
.pg-13 .at-period-status-box strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--at-ai, #176B60);
}
.pg-13 .at-period-status-box p {
  font-size: 12px;
  line-height: 19px;
  color: var(--at-ink-muted, #344563);
  margin-top: 4px;
}
.pg-13 .at-period-status-item {
  padding: 12px;
  border-bottom: 1px solid var(--at-line, #DDE4EF);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pg-13 .at-period-status-item:last-child {
  border-bottom: none;
}
.pg-13 .at-period-status-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--at-ink, #172649);
}
.pg-13 .at-period-status-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--at-ink, #172649);
  margin-top: 2px;
}
.pg-13 .at-period-status-item p {
  font-size: 12px;
  line-height: 19px;
  color: var(--at-ink-muted, #596579);
  margin-top: 2px;
}

/* ==========================================================================
   MÀN 14: ĐỀ TÀI CỦA TÔI (.pg-14)
   ========================================================================== */

.pg-14 .at-breadcrumb {
  display: none !important;
}
.pg-14 .at-page-header {
  min-height: auto;
  margin-top: 0;
  margin-bottom: 0;
  padding: 20px 0 0;
}
.pg-14 .at-page-header h1 {
  font-size: 24px;
  line-height: 32px;
  font-weight: 700;
  color: var(--at-ink, #172649);
  margin: 0;
}
.pg-14 .at-page-desc {
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
  color: var(--at-ink-muted, #596579);
  margin-top: 4px;
  margin-bottom: 16px;
}
.pg-14 .at-meta-sep {
  margin: 0 12px;
  color: #D9E2EF;
}
.pg-14 .at-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Card đợt đăng ký */
.pg-14 .at-period {
  display: grid;
  grid-template-columns: 5.5fr 6.5fr;
  align-items: center;
  min-height: 72px;
  padding: 14px 16px;
  gap: 0;
  border-radius: 6px;
  border: 1px solid var(--at-line, #DDE4EF);
  background: var(--at-surface, #FFFFFF);
  margin-bottom: 0;
}
.pg-14 .at-period-main {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-right: 16px;
}
.pg-14 .at-period-tile {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--at-brand-soft, #EAF2FF);
  color: var(--at-brand, #176BFF);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.pg-14 .at-period-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.pg-14 .at-period-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--at-ink, #172649);
}
.pg-14 .at-period-time {
  font-size: 12px;
  line-height: 18px;
  color: var(--at-ink-muted, #596579);
}
.pg-14 .at-period-aside {
  font-size: 12px;
  line-height: 18px;
  color: var(--at-ink-muted, #475467);
  padding: 0 0 0 20px;
  border-left: 1px solid var(--at-line, #E6ECF5);
  margin: 0;
}

@media (max-width: 767.98px) {
  .pg-14 .at-period {
    grid-template-columns: 1fr;
    padding: 12px 16px;
  }
  .pg-14 .at-period-aside {
    padding: 10px 0 0 0;
    border-left: 0;
    border-top: 1px solid var(--at-line, #DDE4EF);
  }
}

/* Panel Danh sách đề tài hướng dẫn */
.pg-14 .at-panel {
  border-radius: 6px;
  border: 1px solid var(--at-line, #DDE4EF);
  background: var(--at-surface, #FFFFFF);
  padding: 12px 16px 14px;
  min-height: 400px;
  display: flex;
  flex-direction: column;
}
.pg-14 .at-panel > .at-panel-header {
  background: transparent;
  border-bottom: none;
  padding: 0;
  margin: 0 0 12px 0;
  min-height: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  border-radius: 0;
}
.pg-14 .at-panel-header h2 {
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: var(--at-ink, #172649);
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}
.pg-14 .at-panel-header h2::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 18px;
  background: #176BFF;
  border-radius: 2px;
  flex: none;
}

/* Toolbar */
.pg-14 .at-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 44px;
  min-height: 44px;
  margin-bottom: 12px;
  padding: 0;
  border-bottom: none;
}
.pg-14 .at-toolbar .at-search {
  flex: 0 0 340px;
  width: 340px;
  position: relative;
}
.pg-14 .at-toolbar .at-search .form-control {
  width: 340px;
  height: 40px;
  padding-left: 36px;
  padding-right: 12px;
  font-size: 12px;
  line-height: 16px;
  border: 1px solid var(--at-line, #D9E2EF);
  border-radius: 6px;
  color: var(--at-ink, #172649);
  box-sizing: border-box;
  background-color: var(--at-surface, #FFFFFF);
}
.pg-14 .at-toolbar .at-search .form-control::placeholder {
  color: #98A2B3;
}
.pg-14 .at-toolbar .at-search .at-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: #98A2B3;
  pointer-events: none;
}
.pg-14 .at-toolbar .at-filter-select {
  flex: 0 0 180px;
  width: 180px;
}
.pg-14 .at-toolbar .at-filter-select select {
  width: 180px;
  height: 40px;
  padding-left: 12px;
  padding-right: 32px;
  font-size: 12px;
  font-weight: 500;
  border: 1px solid var(--at-line, #D9E2EF);
  border-radius: 6px;
  color: var(--at-ink, #172649);
  box-sizing: border-box;
  background-color: var(--at-surface, #FFFFFF);
}
.pg-14 .at-toolbar .at-toolbar-action {
  margin-left: auto;
}
.pg-14 .at-toolbar .btn-primary {
  width: 140px;
  height: 40px;
  background-color: #176BFF;
  border: 1px solid #176BFF;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 600;
  padding: 0 14px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  white-space: nowrap;
}
.pg-14 .at-toolbar .btn-primary:hover {
  background-color: #1257cc;
  border-color: #1257cc;
}

@media (max-width: 767.98px) {
  .pg-14 .at-toolbar {
    height: auto;
    min-height: auto;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .pg-14 .at-toolbar .at-search,
  .pg-14 .at-toolbar .at-search .form-control,
  .pg-14 .at-toolbar .at-filter-select,
  .pg-14 .at-toolbar .at-filter-select select,
  .pg-14 .at-toolbar .at-toolbar-action,
  .pg-14 .at-toolbar .btn-primary {
    width: 100%;
    flex: 1 1 100%;
  }
}

/* Bảng */
.pg-14 .at-table-wrap {
  border: 1px solid var(--at-line, #E6ECF5);
  border-radius: 6px;
  overflow: hidden;
  background: var(--at-surface, #FFFFFF);
}
.pg-14 .at-table {
  table-layout: fixed;
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 0;
}
.pg-14 .at-table th {
  height: 40px;
  background-color: var(--at-brand-soft, #F3F7FC);
  color: var(--at-ink-muted, #344054);
  font-size: 12px;
  font-weight: 600;
  padding: 0 12px;
  border-bottom: 1px solid var(--at-line, #E6ECF5);
  border-top: none;
  vertical-align: middle;
}
.pg-14 .at-table td {
  height: 40px;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 18px;
  border-bottom: 1px solid var(--at-line, #EEF2F7);
  vertical-align: middle;
  color: var(--at-ink-muted, #344054);
}
.pg-14 .at-table tbody tr:last-child td {
  border-bottom: none;
}
.pg-14 .at-table tbody tr:hover {
  background-color: var(--at-surface-2, #F8FBFF);
}

.pg-14 .at-table th:nth-child(1), .pg-14 .at-table td:nth-child(1) { width: 4%; text-align: center; }
.pg-14 .at-table th:nth-child(2), .pg-14 .at-table td:nth-child(2) { width: 30%; text-align: left; }
.pg-14 .at-table th:nth-child(3), .pg-14 .at-table td:nth-child(3) { width: 17%; text-align: left; }
.pg-14 .at-table th:nth-child(4), .pg-14 .at-table td:nth-child(4) { width: 7%; text-align: center; }
.pg-14 .at-table th:nth-child(5), .pg-14 .at-table td:nth-child(5) { width: 9%; text-align: center; }
.pg-14 .at-table th:nth-child(6), .pg-14 .at-table td:nth-child(6) { width: 13%; text-align: center; }
.pg-14 .at-table th:nth-child(7), .pg-14 .at-table td:nth-child(7) { width: 20%; text-align: center; }

.pg-14 .at-topic-title {
  display: block;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  color: var(--at-ink, #172649);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pg-14 .at-field-text {
  display: block;
  font-size: 12px;
  font-weight: 400;
  line-height: 18px;
  color: var(--at-ink-muted, #344054);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pg-14 .at-table td.at-num {
  font-weight: 500;
  color: var(--at-ink-muted, #344054);
}

/* Badges */
.pg-14 .at-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 24px;
  min-width: 78px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}
.pg-14 .at-badge--success {
  background-color: var(--at-success-soft, #EAF8EF);
  color: var(--at-success, #157347);
}
.pg-14 .at-badge--danger {
  background-color: var(--at-danger-soft, #FEECEB);
  color: var(--at-danger, #B42318);
}
.pg-14 .at-badge--neutral {
  background-color: var(--at-surface-2, #F2F4F7);
  color: var(--at-ink-muted, #344054);
}

/* Action buttons */
.pg-14 .at-td-actions { /* Claude: <td> giữ table-cell (display:flex trên td làm nút trượt sang cột Trạng thái) */
  text-align: center;
  white-space: nowrap;
  padding: 4px 0;
}
.pg-14 .at-td-actions > * + * { margin-left: 8px; }
.pg-14 .at-td-actions .btn {
  height: 32px;
  width: 44px;
  min-width: 44px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--at-brand, #2454B8);
  border-radius: 6px;
  color: var(--at-brand, #2454B8);
  background-color: var(--at-surface, #FFFFFF);
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  box-sizing: border-box;
}
.pg-14 .at-td-actions .btn:hover {
  background-color: var(--at-brand-soft, #EAF4FF);
  color: var(--at-brand-hover, #1D4496);
}
.pg-14 #topicsMobileList {
  padding: 0;
}

/* Pagination footer */
.pg-14 .at-pagination-footer {
  height: 36px;
  min-height: 36px;
  margin-top: 10px;
  padding: 0;
  border-top: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pg-14 .at-pagination-footer .at-count {
  font-size: 12px;
  font-weight: 400;
  color: var(--at-ink-muted, #596579);
}
.pg-14 .at-pagination-nav {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pg-14 .at-pagination-nav .btn {
  width: 28px;
  height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid var(--at-line, #D9E2EF);
  color: var(--at-ink-muted, #344054);
  background: var(--at-surface, #FFFFFF);
}
.pg-14 .at-pagination-nav .btn.active {
  background-color: #176BFF;
  border-color: #176BFF;
  color: #FFFFFF;
  font-weight: 600;
}
.pg-14 .at-pagination-nav .btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: var(--at-line, #E6ECF5);
  color: #98A2B3;
}

/* ==========================================================================
   MÀN 16: DUYỆT SINH VIÊN (.pg-16)
   ========================================================================== */

.pg-16 .at-page-header {
  min-height: 64px;
  margin-bottom: 10px;
}
.pg-16 .at-breadcrumb {
  font-size: 12px;
  line-height: 18px;
  margin-bottom: 2px;
}
.pg-16 .at-page-header h1 {
  font-size: 24px;
  line-height: 30px;
  font-weight: 700;
  margin: 0;
}
.pg-16 .at-page-desc {
  font-size: 12px;
  line-height: 18px;
  color: var(--at-ink-muted, #596579);
  margin-top: 2px;
  margin-bottom: 0;
}
.pg-16 .at-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.pg-16 .at-panel {
  border-radius: 6px;
  border: 1px solid var(--at-line, #DDE4EF);
  background: var(--at-surface, #FFFFFF);
}

/* Thu hẹp main khi mở drawer trên desktop ≥1200px */
@media (min-width: 1200px) {
  .pg-16.has-drawer-open {
    margin-right: 440px;
    transition: margin-right var(--at-normal) var(--at-ease);
  }
}

/* Period màn 16: cao 68px */
.pg-16 .at-period {
  display: grid;
  grid-template-columns: minmax(0, 55%) minmax(0, 45%);
  align-items: center;
  min-height: 68px;
  height: 68px;
  padding: 6px 14px;
  gap: 12px;
  border-radius: 6px;
  border: 1px solid var(--at-line, #DDE4EF);
  background: var(--at-surface, #FFFFFF);
}
.pg-16 .at-period-main {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pg-16 .at-period-tile {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--at-brand-soft, #EAF2FF);
  color: var(--at-brand, #2454B8);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
}
.pg-16 .at-period-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}
.pg-16 .at-period-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--at-ink);
}
.pg-16 .at-period-time {
  font-size: 12px;
  line-height: 18px;
  color: var(--at-ink-muted, #596579);
}
.pg-16 .at-period-aside {
  font-size: 12px;
  line-height: 18px;
  color: var(--at-ink-muted, #344563);
  padding: 0 16px;
  border-left: 1px solid var(--at-line, #DDE4EF);
  margin: 0;
}

@media (max-width: 767.98px) {
  .pg-16 .at-period {
    grid-template-columns: 1fr;
    padding: 10px 14px;
    height: auto;
  }
  .pg-16 .at-period-aside {
    padding: 8px 0 0 0;
    border-left: 0;
    border-top: 1px solid var(--at-line, #DDE4EF);
  }
}

/* Dải nhãn đề tài đang duyệt */
.pg-16 .at-topic-bar {
  min-height: 34px;
  height: 34px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--at-ink);
  border-bottom: 1px solid var(--at-line, #DDE4EF);
  background-color: var(--at-surface-2, #FAFCFE);
}
.pg-16 .at-topic-bar-accent {
  width: 4px;
  height: 18px;
  background-color: #176BFF;
  border-radius: 2px;
  flex: none;
}

/* Toolbar màn 16 */
.pg-16 .at-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--at-line, #DDE4EF);
  margin-bottom: 0;
}
.pg-16 .at-toolbar .at-search {
  flex: 0 0 65%;
  width: 65%;
}
.pg-16 .at-toolbar .at-search .form-control {
  width: 100%;
  height: 34px;
  font-size: 12px;
  border-color: var(--at-line-strong, #B7C5D8);
  border-radius: 4px;
}
.pg-16 .at-filter-wrap {
  flex: 0 0 calc(35% - 12px);
  width: calc(35% - 12px);
  display: flex;
  align-items: center;
  gap: 8px;
}
.pg-16 .at-filter-label {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--at-ink-muted, #596579);
  margin: 0;
}
.pg-16 .at-filter-wrap select {
  flex: 1;
  width: 100%;
  height: 34px;
  font-size: 12px;
  border-color: var(--at-line-strong, #B7C5D8);
  border-radius: 4px;
}

/* Bảng SV duyệt */
.pg-16 .at-table {
  table-layout: fixed;
  width: 100%;
}
.pg-16 .at-table th {
  background-color: var(--at-brand-soft, #EDF5FE);
  border-bottom: 1px solid var(--at-line, #DDE4EF);
  font-size: 12px;
  font-weight: 600;
  height: 32px;
  padding: 4px 8px;
  color: var(--at-ink);
  line-height: 1.2;
}
.pg-16 .at-table td {
  padding: 4px 8px;
  font-size: 12px;
  line-height: 18px;
  border-bottom: 1px solid var(--at-line, #DDE4EF);
  height: 40px;
  vertical-align: middle;
}
.pg-16 .at-ai-score {
  font-weight: 600;
  color: var(--at-ai, #176B60);
  font-size: 12px;
}
.pg-16 [data-reg-row].is-selected {
  background-color: var(--at-brand-soft, #EAF2FF) !important;
}
.pg-16 [data-reg-row].is-selected td:first-child {
  box-shadow: inset 3px 0 0 #176BFF;
}

.pg-16 .at-table th:nth-child(1), .pg-16 .at-table td:nth-child(1) { width: 14%; }
.pg-16 .at-table th:nth-child(2), .pg-16 .at-table td:nth-child(2) { width: 19%; }
.pg-16 .at-table th:nth-child(3), .pg-16 .at-table td:nth-child(3) { width: 9%; }
.pg-16 .at-table th:nth-child(4), .pg-16 .at-table td:nth-child(4) { width: 9%; }
.pg-16 .at-table th:nth-child(5), .pg-16 .at-table td:nth-child(5) { width: 12%; }
.pg-16 .at-table th:nth-child(6), .pg-16 .at-table td:nth-child(6) { width: 19%; }
.pg-16 .at-table th:nth-child(7), .pg-16 .at-table td:nth-child(7) { width: 18%; }
.pg-16 #regsMobileList { padding: 0 12px 12px; }

/* Drawer phân tích 440px */
.pg-16 .at-student-drawer {
  width: 440px;
  max-width: 440px;
  background-color: var(--at-surface, #FFFFFF);
  border-left: 1px solid var(--at-line, #DDE4EF);
  top: 56px;
  height: calc(100vh - 56px);
  z-index: 1040;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.08);
  display: flex;
  flex-direction: column;
}
.pg-16 .at-student-drawer .offcanvas-header {
  height: 48px;
  min-height: 48px;
  padding: 0 14px;
  border-bottom: 1px solid var(--at-line, #DDE4EF);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 0 0 auto;
}
.pg-16 .at-student-drawer .offcanvas-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--at-ink, #172649);
  margin: 0;
}
.pg-16 .at-student-drawer .btn-close {
  width: 28px;
  height: 28px;
  padding: 0;
  font-size: 12px;
}
.pg-16 .at-student-drawer .offcanvas-body {
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  flex: 1 1 auto;
}
.pg-16 .at-student-drawer .offcanvas-body > * { flex: none; }
.pg-16 .at-drawer-student-head {
  padding-bottom: 4px;
}
.pg-16 .at-drawer-student-name {
  font-size: 18px;
  line-height: 24px;
  font-weight: 700;
  color: var(--at-ink, #172649);
  margin: 0 0 2px;
}
.pg-16 .at-drawer-student-meta {
  font-size: 12px;
  line-height: 18px;
  color: var(--at-ink-muted, #596579);
}

/* Thẻ đề tài đăng ký trong drawer */
.pg-16 .at-drawer-topic-card {
  min-height: 52px;
  padding: 6px 10px;
  border: 1px solid var(--at-line, #DDE4EF);
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background-color: var(--at-surface, #FFFFFF);
}
.pg-16 .at-drawer-topic-label {
  font-size: 12px;
  line-height: 16px;
  color: var(--at-ink-muted, #596579);
}
.pg-16 .at-drawer-topic-title {
  font-size: 13px;
  line-height: 18px;
  font-weight: 600;
  color: var(--at-ink, #172649);
  margin-top: 2px;
}
.pg-16 .at-drawer-topic-rank {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: none;
}
.pg-16 .at-drawer-rank-label {
  font-size: 12px;
  line-height: 16px;
  color: var(--at-ink-muted, #596579);
}
.pg-16 .at-drawer-rank-badge {
  width: 48px;
  height: 26px;
  background-color: var(--at-brand-soft, #E4F0FF);
  color: var(--at-brand, #2454B8);
  font-size: 12px;
  font-weight: 700;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Drawer panels */
.pg-16 .at-drawer-panel {
  border: 1px solid var(--at-line, #DDE4EF);
  border-radius: 5px;
  padding: 0;
  overflow: hidden;
  margin-bottom: 0;
  background: var(--at-surface, #FFFFFF);
}
.pg-16 .at-drawer-panel .at-panel-header {
  min-height: 34px;
  height: 34px;
  padding: 0 10px;
  background-color: var(--at-brand-soft, #EAF4FF);
  border-bottom: 1px solid var(--at-line, #DDE4EF);
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pg-16 .at-drawer-panel-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--at-ink, #172649);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}
.pg-16 .at-drawer-panel-title::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 16px;
  background-color: #176BFF;
  border-radius: 2px;
}
.pg-16 .at-drawer-ahp {
  font-size: 12px;
  color: var(--at-ink-muted, #596579);
}

/* AI body in drawer */
.pg-16 .at-drawer-ai-body {
  padding: 8px 10px;
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 10px;
  min-height: 130px;
  align-items: center;
}
.pg-16 .at-drawer-score-box {
  border: 1px solid var(--at-line, #DDE4EF);
  border-radius: 5px;
  padding: 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 100%;
}
.pg-16 .at-drawer-score-val {
  font-size: 36px;
  font-weight: 700;
  color: var(--at-ai, #176B60);
  line-height: 1;
}
.pg-16 .at-drawer-score-max {
  font-size: 13px;
  color: var(--at-ink-muted, #596579);
  font-weight: 500;
}
.pg-16 .at-drawer-score-desc {
  font-size: 12px;
  line-height: 16px;
  color: var(--at-ink-muted, #596579);
  margin-top: 4px;
}

/* AI M1-M5 bars */
.pg-16 .at-drawer-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.pg-16 .at-bar-row {
  display: grid;
  grid-template-columns: 20px 80px minmax(28px, 1fr) minmax(24px, max-content);
  align-items: center;
  gap: 6px;
  height: 24px;
  font-size: 12px;
}
.pg-16 .at-bar-code {
  font-weight: 600;
  color: var(--at-brand, #2454B8);
  font-size: 12px;
}
.pg-16 .at-bar-name {
  color: var(--at-ink);
  white-space: nowrap;
  font-size: 12px;
}
.pg-16 .at-bar-track {
  height: 8px;
  background-color: var(--at-line, #E5EAF1);
  border-radius: 4px;
  overflow: hidden;
}
.pg-16 .at-bar-fill {
  height: 100%;
  background-color: #176B60;
  border-radius: 4px;
}
.pg-16 .at-bar-val {
  white-space: nowrap;
  font-weight: 600;
  text-align: right;
  font-size: 12px;
  color: var(--at-ink);
}
.pg-16 .at-bar-val.at-muted {
  font-weight: 400;
  color: var(--at-ink-muted, #596579);
  font-size: 12px;
}

/* Checklist in drawer */
.pg-16 .at-drawer-checklist {
  padding: 2px 10px;
}
.pg-16 .at-check-item {
  min-height: 30px;
  padding: 3px 0;
  border-bottom: 1px solid var(--at-line, #DDE4EF);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}
.pg-16 .at-check-item:last-child {
  border-bottom: none;
}
.pg-16 .at-check-left {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--at-ink);
}
.pg-16 .at-check-left .at-icon {
  width: 14px;
  height: 14px;
  flex: none;
}
.pg-16 .at-check-label {
  font-size: 12px;
  line-height: 18px;
}
.pg-16 .at-check-val {
  font-weight: 600;
  white-space: nowrap;
  font-size: 12px;
}

/* Section body (About, Note) in drawer */
.pg-16 .at-drawer-section-body {
  padding: 6px 10px;
}
.pg-16 .at-drawer-section-body p {
  font-size: 12px;
  line-height: 18px;
}
.pg-16 .at-drawer-section-body textarea {
  min-height: 72px;
  height: 72px;
  font-size: 12px;
  line-height: 18px;
  padding: 6px 10px;
  border-radius: 4px;
  border-color: var(--at-line-strong, #B7C5D8);
  resize: vertical;
}
.pg-16 .at-drawer-section-body .form-text {
  font-size: 12px;
  line-height: 16px;
  margin-top: 3px;
  color: var(--at-ink-muted, #596579);
}

/* Drawer footer */
.pg-16 .at-drawer-footer {
  min-height: 64px;
  height: 64px;
  padding: 10px 14px;
  border-top: 1px solid var(--at-line, #DDE4EF);
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: var(--at-surface, #FFFFFF);
  flex: 0 0 64px;
}
.pg-16 .at-drawer-footer--centered {
  justify-content: center;
}
.pg-16 .at-badge-action-status {
  height: 32px;
  font-size: 13px;
  padding: 4px 14px;
}
.pg-16 .at-btn-reject,
.pg-16 .at-btn-accept {
  flex: 1;
  height: 42px;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.pg-16 .at-btn-reject {
  border: 1px solid #DC3545;
  color: var(--at-danger, #DC3545);
  background-color: var(--at-surface, #FFFFFF);
}
.pg-16 .at-btn-reject:hover {
  background-color: var(--at-warning-soft, #FCE8EB);
  color: var(--at-danger, #DC3545);
  border-color: #DC3545;
}
.pg-16 .at-btn-accept {
  background-color: var(--at-brand, #2454B8);
  color: var(--at-on-brand, #FFFFFF);
  border: 1px solid var(--at-brand, #2454B8);
}
.pg-16 .at-btn-accept:hover {
  background-color: var(--at-brand-hover, #1D4496);
  border-color: #1d4496;
}

/* Mobile responsive rules */
@media (max-width: 767.98px) {
  .pg-13 .at-ledger {
    grid-template-columns: 1fr 1fr;
  }
  .pg-13 .at-ledger-item {
    border-bottom: 1px solid var(--at-line, #DDE4EF);
  }
  .pg-13 .at-toolbar,
  .pg-16 .at-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .pg-13 .at-toolbar .at-search,
  .pg-13 .at-filter-wrap,
  .pg-16 .at-toolbar .at-search,
  .pg-16 .at-filter-wrap {
    flex: 1 1 100%;
    width: 100%;
  }
  .pg-14 .at-toolbar {
    flex-wrap: wrap;
  }
  .pg-14 .at-toolbar .at-search {
    flex: 1 1 100%;
    width: 100%;
  }
  .pg-14 .at-toolbar .at-filter-select {
    flex: 1 1 auto;
    width: auto;
  }
  .pg-16 .at-student-drawer {
    width: 100vw;
    max-width: 100vw;
    top: 0;
    height: 100dvh;
    z-index: 1055;
  }
  .pg-16 .at-drawer-ai-body {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ==========================================================================
   BIẾN THỂ TỐI (DARK MODE) CHO NHÓM GV
   ========================================================================== */
:root[data-theme="dark"] .pg-13 .at-panel > .at-panel-header,
:root[data-theme="dark"] .pg-16 .at-panel > .at-panel-header,
[data-bs-theme="dark"] .pg-13 .at-panel > .at-panel-header,
[data-bs-theme="dark"] .pg-16 .at-panel > .at-panel-header {
  background: var(--at-surface-2);
  border-bottom-color: var(--at-line);
}

:root[data-theme="dark"] .pg-13 .at-panel,
:root[data-theme="dark"] .pg-14 .at-panel,
:root[data-theme="dark"] .pg-16 .at-panel,
[data-bs-theme="dark"] .pg-13 .at-panel,
[data-bs-theme="dark"] .pg-14 .at-panel,
[data-bs-theme="dark"] .pg-16 .at-panel {
  background: var(--at-surface);
  border-color: var(--at-line);
}

:root[data-theme="dark"] .pg-13 .at-ledger,
[data-bs-theme="dark"] .pg-13 .at-ledger {
  background: var(--at-surface);
  border-color: var(--at-line);
}
:root[data-theme="dark"] .pg-13 .at-ledger-item,
[data-bs-theme="dark"] .pg-13 .at-ledger-item {
  border-color: var(--at-line);
}
:root[data-theme="dark"] .pg-13 .at-ledger-item:nth-child(1) .at-ledger-value,
[data-bs-theme="dark"] .pg-13 .at-ledger-item:nth-child(1) .at-ledger-value { color: var(--at-brand); }
:root[data-theme="dark"] .pg-13 .at-ledger-item:nth-child(2) .at-ledger-value,
[data-bs-theme="dark"] .pg-13 .at-ledger-item:nth-child(2) .at-ledger-value { color: var(--at-ai); }
:root[data-theme="dark"] .pg-13 .at-ledger-item:nth-child(3) .at-ledger-value,
[data-bs-theme="dark"] .pg-13 .at-ledger-item:nth-child(3) .at-ledger-value { color: var(--at-warning); }
:root[data-theme="dark"] .pg-13 .at-ledger-item:nth-child(4) .at-ledger-value,
[data-bs-theme="dark"] .pg-13 .at-ledger-item:nth-child(4) .at-ledger-value { color: var(--at-ai); }

:root[data-theme="dark"] .pg-13 .at-table th,
:root[data-theme="dark"] .pg-14 .at-table th,
:root[data-theme="dark"] .pg-16 .at-table th,
[data-bs-theme="dark"] .pg-13 .at-table th,
[data-bs-theme="dark"] .pg-14 .at-table th,
[data-bs-theme="dark"] .pg-16 .at-table th {
  background-color: var(--at-surface-2);
  border-color: var(--at-line);
}
:root[data-theme="dark"] .pg-13 .at-table td,
:root[data-theme="dark"] .pg-14 .at-table td,
:root[data-theme="dark"] .pg-16 .at-table td,
[data-bs-theme="dark"] .pg-13 .at-table td,
[data-bs-theme="dark"] .pg-14 .at-table td,
[data-bs-theme="dark"] .pg-16 .at-table td {
  border-color: var(--at-line);
}

:root[data-theme="dark"] .pg-13 .at-period,
:root[data-theme="dark"] .pg-14 .at-period,
:root[data-theme="dark"] .pg-16 .at-period,
[data-bs-theme="dark"] .pg-13 .at-period,
[data-bs-theme="dark"] .pg-14 .at-period,
[data-bs-theme="dark"] .pg-16 .at-period {
  background-color: var(--at-surface);
  border-color: var(--at-line);
}

:root[data-theme="dark"] .pg-13 .at-period-tile,
:root[data-theme="dark"] .pg-14 .at-period-tile,
:root[data-theme="dark"] .pg-16 .at-period-tile,
[data-bs-theme="dark"] .pg-13 .at-period-tile,
[data-bs-theme="dark"] .pg-14 .at-period-tile,
[data-bs-theme="dark"] .pg-16 .at-period-tile {
  background-color: var(--at-brand-soft);
  color: var(--at-brand);
}

:root[data-theme="dark"] .pg-13 .at-period-aside,
:root[data-theme="dark"] .pg-14 .at-period-aside,
:root[data-theme="dark"] .pg-16 .at-period-aside,
[data-bs-theme="dark"] .pg-13 .at-period-aside,
[data-bs-theme="dark"] .pg-14 .at-period-aside,
[data-bs-theme="dark"] .pg-16 .at-period-aside {
  border-left-color: var(--at-line);
  border-top-color: var(--at-line);
  color: var(--at-ink-muted);
}

:root[data-theme="dark"] .pg-13 .at-period-status-wrap,
:root[data-theme="dark"] .pg-13 .at-period-status-item,
[data-bs-theme="dark"] .pg-13 .at-period-status-wrap,
[data-bs-theme="dark"] .pg-13 .at-period-status-item {
  border-bottom-color: var(--at-line);
}
:root[data-theme="dark"] .pg-13 .at-period-status-box,
[data-bs-theme="dark"] .pg-13 .at-period-status-box {
  background-color: var(--at-success-soft);
}
:root[data-theme="dark"] .pg-13 .at-period-status-box strong,
[data-bs-theme="dark"] .pg-13 .at-period-status-box strong {
  color: var(--at-success);
}
:root[data-theme="dark"] .pg-13 .at-period-status-box p,
[data-bs-theme="dark"] .pg-13 .at-period-status-box p {
  color: var(--at-ink-muted);
}

:root[data-theme="dark"] .pg-16 .at-student-drawer,
[data-bs-theme="dark"] .pg-16 .at-student-drawer {
  background-color: var(--at-surface);
  border-left-color: var(--at-line);
}
:root[data-theme="dark"] .pg-16 .at-student-drawer .offcanvas-header,
[data-bs-theme="dark"] .pg-16 .at-student-drawer .offcanvas-header,
:root[data-theme="dark"] .pg-16 .at-drawer-panel .at-panel-header,
[data-bs-theme="dark"] .pg-16 .at-drawer-panel .at-panel-header,
:root[data-theme="dark"] .pg-16 .at-topic-bar,
[data-bs-theme="dark"] .pg-16 .at-topic-bar,
:root[data-theme="dark"] .pg-16 .at-drawer-footer,
[data-bs-theme="dark"] .pg-16 .at-drawer-footer {
  background-color: var(--at-surface-2);
  border-color: var(--at-line);
}
:root[data-theme="dark"] .pg-16 .at-drawer-topic-card,
:root[data-theme="dark"] .pg-16 .at-drawer-panel,
:root[data-theme="dark"] .pg-16 .at-drawer-score-box,
[data-bs-theme="dark"] .pg-16 .at-drawer-topic-card,
[data-bs-theme="dark"] .pg-16 .at-drawer-panel,
[data-bs-theme="dark"] .pg-16 .at-drawer-score-box {
  background-color: var(--at-surface);
  border-color: var(--at-line);
}
:root[data-theme="dark"] .pg-16 .at-check-item,
[data-bs-theme="dark"] .pg-16 .at-check-item {
  border-bottom-color: var(--at-line);
}
:root[data-theme="dark"] .pg-16 .at-btn-reject,
[data-bs-theme="dark"] .pg-16 .at-btn-reject {
  background-color: transparent;
}

:root[data-theme="dark"] .pg-14 .at-table-wrap,
[data-bs-theme="dark"] .pg-14 .at-table-wrap {
  border-color: var(--at-line);
  background: var(--at-surface);
}
:root[data-theme="dark"] .pg-14 .at-toolbar .at-search .form-control,
:root[data-theme="dark"] .pg-14 .at-toolbar .at-filter-select select,
[data-bs-theme="dark"] .pg-14 .at-toolbar .at-search .form-control,
[data-bs-theme="dark"] .pg-14 .at-toolbar .at-filter-select select {
  background-color: var(--at-surface);
  border-color: var(--at-line);
  color: var(--at-ink);
}
:root[data-theme="dark"] .pg-14 .at-td-actions .btn,
[data-bs-theme="dark"] .pg-14 .at-td-actions .btn {
  background-color: var(--at-surface);
  border-color: var(--at-brand);
  color: var(--at-brand);
}
:root[data-theme="dark"] .pg-14 .at-pagination-nav .btn,
[data-bs-theme="dark"] .pg-14 .at-pagination-nav .btn {
  background-color: var(--at-surface);
  border-color: var(--at-line);
  color: var(--at-ink);
}
:root[data-theme="dark"] .pg-14 .at-pagination-nav .btn.active,
[data-bs-theme="dark"] .pg-14 .at-pagination-nav .btn.active {
  background-color: var(--at-brand);
  border-color: var(--at-brand);
  color: #FFFFFF;
}
:root[data-theme="dark"] .pg-14 .dropdown-menu,
[data-bs-theme="dark"] .pg-14 .dropdown-menu {
  background-color: var(--at-surface);
  border-color: var(--at-line);
}
:root[data-theme="dark"] .pg-14 .dropdown-item,
[data-bs-theme="dark"] .pg-14 .dropdown-item {
  color: var(--at-ink);
}
:root[data-theme="dark"] .pg-14 .dropdown-item:hover,
[data-bs-theme="dark"] .pg-14 .dropdown-item:hover {
  background-color: var(--at-surface-2);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .pg-13 .at-panel > .at-panel-header,
  :root:not([data-theme="light"]) .pg-16 .at-panel > .at-panel-header {
    background: var(--at-surface-2);
    border-bottom-color: var(--at-line);
  }
  :root:not([data-theme="light"]) .pg-13 .at-panel,
  :root:not([data-theme="light"]) .pg-14 .at-panel,
  :root:not([data-theme="light"]) .pg-16 .at-panel {
    background: var(--at-surface);
    border-color: var(--at-line);
  }
  :root:not([data-theme="light"]) .pg-13 .at-ledger {
    background: var(--at-surface);
    border-color: var(--at-line);
  }
  :root:not([data-theme="light"]) .pg-13 .at-ledger-item {
    border-color: var(--at-line);
  }
  :root:not([data-theme="light"]) .pg-13 .at-ledger-item:nth-child(1) .at-ledger-value { color: var(--at-brand); }
  :root:not([data-theme="light"]) .pg-13 .at-ledger-item:nth-child(2) .at-ledger-value { color: var(--at-ai); }
  :root:not([data-theme="light"]) .pg-13 .at-ledger-item:nth-child(3) .at-ledger-value { color: var(--at-warning); }
  :root:not([data-theme="light"]) .pg-13 .at-ledger-item:nth-child(4) .at-ledger-value { color: var(--at-ai); }
  :root:not([data-theme="light"]) .pg-13 .at-table th,
  :root:not([data-theme="light"]) .pg-14 .at-table th,
  :root:not([data-theme="light"]) .pg-16 .at-table th {
    background-color: var(--at-surface-2);
    border-color: var(--at-line);
  }
  :root:not([data-theme="light"]) .pg-13 .at-table td,
  :root:not([data-theme="light"]) .pg-14 .at-table td,
  :root:not([data-theme="light"]) .pg-16 .at-table td {
    border-color: var(--at-line);
  }
  :root:not([data-theme="light"]) .pg-13 .at-period,
  :root:not([data-theme="light"]) .pg-14 .at-period,
  :root:not([data-theme="light"]) .pg-16 .at-period {
    background-color: var(--at-surface);
    border-color: var(--at-line);
  }
  :root:not([data-theme="light"]) .pg-13 .at-period-tile,
  :root:not([data-theme="light"]) .pg-14 .at-period-tile,
  :root:not([data-theme="light"]) .pg-16 .at-period-tile {
    background-color: var(--at-brand-soft);
    color: var(--at-brand);
  }
  :root:not([data-theme="light"]) .pg-13 .at-period-aside,
  :root:not([data-theme="light"]) .pg-14 .at-period-aside,
  :root:not([data-theme="light"]) .pg-16 .at-period-aside {
    border-left-color: var(--at-line);
    border-top-color: var(--at-line);
    color: var(--at-ink-muted);
  }
  :root:not([data-theme="light"]) .pg-13 .at-period-status-wrap,
  :root:not([data-theme="light"]) .pg-13 .at-period-status-item {
    border-bottom-color: var(--at-line);
  }
  :root:not([data-theme="light"]) .pg-13 .at-period-status-box {
    background-color: var(--at-success-soft);
  }
  :root:not([data-theme="light"]) .pg-13 .at-period-status-box strong {
    color: var(--at-success);
  }
  :root:not([data-theme="light"]) .pg-13 .at-period-status-box p {
    color: var(--at-ink-muted);
  }
  :root:not([data-theme="light"]) .pg-16 .at-student-drawer {
    background-color: var(--at-surface);
    border-left-color: var(--at-line);
  }
  :root:not([data-theme="light"]) .pg-16 .at-student-drawer .offcanvas-header,
  :root:not([data-theme="light"]) .pg-16 .at-drawer-panel .at-panel-header,
  :root:not([data-theme="light"]) .pg-16 .at-topic-bar,
  :root:not([data-theme="light"]) .pg-16 .at-drawer-footer {
    background-color: var(--at-surface-2);
    border-color: var(--at-line);
  }
  :root:not([data-theme="light"]) .pg-16 .at-drawer-topic-card,
  :root:not([data-theme="light"]) .pg-16 .at-drawer-panel,
  :root:not([data-theme="light"]) .pg-16 .at-drawer-score-box {
    background-color: var(--at-surface);
    border-color: var(--at-line);
  }
  :root:not([data-theme="light"]) .pg-16 .at-check-item {
    border-bottom-color: var(--at-line);
  }
  :root:not([data-theme="light"]) .pg-16 .at-btn-reject {
    background-color: transparent;
  }
  :root:not([data-theme="light"]) .pg-14 .at-table-wrap {
    border-color: var(--at-line);
    background: var(--at-surface);
  }
  :root:not([data-theme="light"]) .pg-14 .at-toolbar .at-search .form-control,
  :root:not([data-theme="light"]) .pg-14 .at-toolbar .at-filter-select select {
    background-color: var(--at-surface);
    border-color: var(--at-line);
    color: var(--at-ink);
  }
  :root:not([data-theme="light"]) .pg-14 .at-td-actions .btn {
    background-color: var(--at-surface);
    border-color: var(--at-brand);
    color: var(--at-brand);
  }
  :root:not([data-theme="light"]) .pg-14 .at-pagination-nav .btn {
    background-color: var(--at-surface);
    border-color: var(--at-line);
    color: var(--at-ink);
  }
  :root:not([data-theme="light"]) .pg-14 .at-pagination-nav .btn.active {
    background-color: var(--at-brand);
    border-color: var(--at-brand);
    color: #FFFFFF;
  }
  :root:not([data-theme="light"]) .pg-14 .dropdown-menu {
    background-color: var(--at-surface);
    border-color: var(--at-line);
  }
  :root:not([data-theme="light"]) .pg-14 .dropdown-item {
    color: var(--at-ink);
  }
  :root:not([data-theme="light"]) .pg-14 .dropdown-item:hover {
    background-color: var(--at-surface-2);
  }
}

/* Claude: cột Thao tác đủ 3 nút (Xem · Sửa · ⋮), chip trạng thái không xuống dòng/không bị đè */
.pg-14 .at-table td:nth-child(6) .at-status, .pg-14 .at-table td:nth-child(6) .at-badge { white-space: nowrap; }
