.data-table-wrap {
  overflow: auto;
  border: 1px solid var(--cr4-line);
  border-radius: var(--cr4-radius);
  background: var(--cr4-surface);
}

.data-table {
  width: 100%;
  margin: 0;
  border-collapse: separate;
  border-spacing: 0;
}

.data-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #eef4fc;
  color: #1e40af;
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  border-bottom: 1px solid #dbeafe;
  padding: 0.52rem 0.75rem;
}

.data-table th,
.data-table td {
  padding: 0.42rem 0.75rem;
  border-bottom: 1px solid #f1f5f9;
  vertical-align: middle;
}

/* แถวตารางสีเดียวทั้งหมด (สีขาว) */
.data-table tbody tr > td,
.data-table tbody tr {
  background-color: #ffffff;
}

/* Rollover hover effect (สีเทาอ่อนนุ่มตา ลดความเข้มลงครึ่งหนึ่ง) */
.data-table tbody tr {
  transition: background-color 0.12s ease;
}

.data-table tbody tr:hover > td,
.data-table tbody tr:hover {
  background-color: #f4f6f8 !important;
}

.data-table tbody tr:hover .student-name-cell strong {
  color: inherit;
}

.student-name-cell {
  transition: color 0.12s ease;
}

.student-name-cell strong {
  transition: color 0.12s ease;
}

.student-name-cell:hover strong {
  color: inherit;
  cursor: pointer;
}

.table-actions {
  width: 1%;
  white-space: nowrap;
}

.sortable-th {
  cursor: pointer;
  user-select: none;
  transition: background-color 0.15s ease;
}

.sortable-th:hover {
  background: #dbeafe !important;
}

.btn-sort {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  font: inherit;
  color: inherit;
  font-weight: inherit;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: 100%;
  cursor: pointer;
}

.btn-sort.justify-content-center {
  justify-content: center;
}

.sort-icon {
  font-size: 0.85em;
  opacity: 0.45;
  transition: opacity 0.15s ease, color 0.15s ease;
}

.sortable-th.is-sorted .sort-icon {
  opacity: 1;
  color: #1877f2;
  font-weight: 800;
}

/* School and Network report summary tables compact styling (บีบพื้นที่เข้ามาให้กระชับ) */
#report-schools-table,
#report-networks-table {
  width: 100% !important;
  table-layout: fixed !important;
  border-collapse: separate !important;
}

#report-schools-table th,
#report-schools-table td,
#report-networks-table th,
#report-networks-table td {
  padding: 0.35rem 0.25rem !important;
  font-size: 0.78rem !important;
  vertical-align: middle !important;
}

#report-schools-table thead th,
#report-networks-table thead th {
  padding: 0.45rem 0.2rem !important;
  font-size: 0.74rem !important;
  line-height: 1.2 !important;
  white-space: nowrap !important;
  background: #eef4fc !important;
  color: #1e40af !important;
}

#report-schools-table thead th .table-sort-button,
#report-networks-table thead th .table-sort-button {
  gap: 0.15rem !important;
  font-size: 0.74rem !important;
  font-weight: 700 !important;
}

#report-schools-table thead th .sort-icon,
#report-networks-table thead th .sort-icon {
  font-size: 0.75em !important;
}

#report-schools-table tbody tr,
#report-networks-table tbody tr {
  transition: background-color 0.15s ease;
  cursor: pointer;
}

#report-schools-table tbody tr:hover,
#report-networks-table tbody tr:hover {
  background-color: #f4f6f8 !important;
}

#report-schools-table tbody tr.is-selected,
#report-networks-table tbody tr.is-selected {
  background-color: #e0edff !important;
}

/* Compact badges in report tables */
#report-schools-table .badge-quality-excellent,
#report-schools-table .badge-quality-good,
#report-schools-table .badge-quality-fair,
#report-schools-table .badge-quality-improve,
#report-schools-table .badge-quality-none,
#report-schools-table .badge-status-completed,
#report-schools-table .badge-status-progress,
#report-schools-table .badge-status-notstarted,
#report-schools-table .badge-status-unregistered,
#report-networks-table .badge-quality-excellent,
#report-networks-table .badge-quality-good,
#report-networks-table .badge-quality-fair,
#report-networks-table .badge-quality-improve,
#report-networks-table .badge-quality-none,
#report-networks-table .badge-status-completed,
#report-networks-table .badge-status-progress,
#report-networks-table .badge-status-notstarted,
#report-networks-table .badge-status-unregistered {
  padding: 2px 6px !important;
  font-size: 0.72rem !important;
  gap: 2px !important;
  font-weight: 600 !important;
}

#report-schools-table .badge-quality-excellent .lucide,
#report-schools-table .badge-quality-good .lucide,
#report-schools-table .badge-quality-fair .lucide,
#report-schools-table .badge-quality-improve .lucide,
#report-schools-table .badge-status-completed .lucide,
#report-schools-table .badge-status-progress .lucide,
#report-schools-table .badge-status-notstarted .lucide,
#report-schools-table .badge-status-unregistered .lucide,
#report-networks-table .badge-quality-excellent .lucide,
#report-networks-table .badge-quality-good .lucide,
#report-networks-table .badge-quality-fair .lucide,
#report-networks-table .badge-quality-improve .lucide,
#report-networks-table .badge-status-completed .lucide,
#report-networks-table .badge-status-progress .lucide,
#report-networks-table .badge-status-notstarted .lucide,
#report-networks-table .badge-status-unregistered .lucide {
  width: 11px !important;
  height: 11px !important;
}

#report-schools-table .btn-view-school-report,
#report-networks-table .btn-view-network-report {
  white-space: nowrap;
  font-size: 0.74rem !important;
  font-weight: 500;
  padding: 0.2rem 0.55rem !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 6px;
  line-height: 1.25 !important;
}

#report-schools-table .btn-view-school-report .lucide,
#report-networks-table .btn-view-network-report .lucide {
  width: 12px !important;
  height: 12px !important;
  stroke-width: 2.2px;
}

.report-circle-wrap {
  width: 34px;
  height: 34px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.report-circle-svg {
  width: 34px;
  height: 34px;
  display: block;
}

.report-circle-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  text-align: center;
}

.report-circle-sub {
  font-size: 0.65rem;
  color: #64748b;
  line-height: 1;
  margin-top: 2px;
  white-space: nowrap;
  text-align: center;
  font-weight: 500;
}


