@import url("https://fonts.googleapis.com/css2?family=Noto+Sans+Thai");
@import url("https://fonts.googleapis.com/css2?family=Trirong");

body {
  background: #ece9e6; /* fallback for old browsers */
  background: -webkit-linear-gradient(to bottom, #ffffff, #ece9e6); /* Chrome 10-25, Safari 5.1-6 */
  background: linear-gradient(to bottom, #ffffff, #ece9e6); /* W3C, IE 10+/ Edge, Firefox 16+, Chrome 26+, Opera 12+, Safari 7+ */
  background: fixed;
  font-family: "Sarabun", sans-serif;
  margin: 0;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  border: 1px solid #ddd;
  text-align: center;
}
th {
  background-color: #f2f2f2;
}
td {
  vertical-align: middle;
}
.timetable-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
  width: 100%;
  text-decoration: none;
  color: #333;
  transition: background-color 0.2s;
  padding: 8px;
}
.timetable-cell:hover {
  background-color: #f0f7ff;
}
.timetable-cell.current-day {
  background-color: #ffcccc; /* Light red for current day */
}

.timetable-cell.attendance-checked {
  background-color: #ccffcc; /* Light green for checked attendance */
}

/* If both conditions are true, attendance-checked takes precedence */
.timetable-cell.current-day.attendance-checked {
  background-color: #ccffcc; /* Light green takes priority */
}
.empty-cell {
  background-color: #f9f9f9;
}
.activity-badge {
  background-color: #ff9800;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.7em;
  margin-top: 4px;
  display: inline-block;
}
.no-timetable {
  text-align: center;
  padding: 30px;
  color: #666;
  font-style: italic;
}

---- attendance page ---- .student-row {
  transition: background-color 0.2s;
}
.status-cell {
  cursor: pointer;
}
.status-cell:hover {
  opacity: 0.8;
}
.note-input {
  width: 100%;
  border: 1px solid #ddd;
}
.success-message {
  background-color: #dff0d8;
  color: #3c763d;
  margin-bottom: 20px;
  border-radius: 4px;
  text-align: center;
}
.error-message {
  background-color: #f2dede;
  color: #a94442;
  margin-bottom: 20px;
  border-radius: 4px;
  text-align: center;
}
.stats-container {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-wrap: wrap;
}
.activity-badge {
  background-color: #ff9800;
  color: white;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.8em;
  margin-left: 5px;
}
.student-info {
  text-align: left;
}
.loading {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1000;
  display: none;
}
.loading-spinner {
  border: 5px solid #f3f3f3;
  border-top: 5px solid #3498db;
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
---------------------------------------------- .loading {
  display: none;
  margin-left: 10px;
}
.nav-pills .nav-link.active {
  background-color: #795548;
}
.dashboard-card {
  transition: transform 0.3s;
}
.dashboard-card:hover {
  transform: translateY(-5px);
}
.responsive-font {
  font-size: 0.7rem; /* Default for small screens */
}
------------------------------------------- 
\
@media (min-width: 768px) {
  .responsive-font {
    font-size: 1rem; /* Larger font on wider screens */
  }
}
:root {
  --bs-primary: #795548; /* Brown */
  --bs-primary-rgb: 121, 85, 72;
  --bs-primary-hover: #6d4c41;
  --bs-primary-text: #fff;
}

/* Solid primary buttons */
.btn-primary {
  background-color: var(--bs-primary);
  border-color: var(--bs-primary);
  color: var(--bs-primary-text);
}

.btn-primary:hover {
  background-color: var(--bs-primary-hover);
  border-color: var(--bs-primary-hover);
  color: var(--bs-primary-text);
}

/* Outline primary buttons */
.btn-outline-primary {
  color: var(--bs-primary);
  border-color: var(--bs-primary);
}

.btn-outline-primary:hover {
  background-color: var(--bs-primary);
  color: var(--bs-primary-text);
  border-color: var(--bs-primary);
}

/* Text and background */
.text-primary {
  color: var(--bs-primary) !important;
}

.bg-primary {
  background-color: var(--bs-primary) !important;
  color: var(--bs-primary-text);
}

.border-primary {
  border-color: var(--bs-primary) !important;
}

.link-primary {
  color: var(--bs-primary);
}

.link-primary:hover {
  color: var(--bs-primary-hover);
}

.nav-dropup:hover {
  color: black !important;
}

.form-control:focus,
.form-select:focus {
  border-color: #795548;
  box-shadow: 0 0 0 0.25rem rgba(121, 85, 72, 0.25);
}

.input-group-text {
  color: #795548;
  border: 1px solid #ced4da;
  background-color: #efebe9;
}

.btn-primary {
  background-color: #795548;
  border-color: #795548;
}

.btn-primary:hover {
  background-color: #5d4037;
  border-color: #5d4037;
}

.btn-primary:active {
}

.toggle-password {
  z-index: 10;
  background-color: #d7ccc8;
  border-color: #795548;
  color: #795548;
}

.toggle-password:hover {
  background-color: #795548;
  border-color: #795548;
  color: #fff;
}

.alert {
  border-radius: 6px;
  font-size: 14px;
}

.text-primary {
  color: #795548 !important;
}

.text-secondary {
  color: #6d4c41 !important;
}

.selected-count {
  font-weight: bold;
  margin-bottom: 10px;
}
.level-badge {
  font-size: 0.8rem;
  padding: 0.25rem 0.5rem;
  margin-right: 0.25rem;
  margin-bottom: 0.25rem;
  display: inline-block;
}
.student-list {
  max-height: 400px;
  overflow-y: auto;
}
.group-student-list {
  max-height: 400px;
  overflow-y: auto;
}
.group-list {
  max-height: 300px;
  overflow-y: auto;
}
.list-group-item.active {
  z-index: 2;
  color: #000;
  background-color: var(--bs-list-group-active-bg);
  border-color: #795548 !important;
}
.remove-btn {
  color: #dc3545;
  cursor: pointer;
}
.remove-btn:hover {
  color: #bd2130;
}
.sticky-top-custom {
  position: sticky;
  top: 0;
  z-index: 1020;
}
.nav-tabs .nav-link {
  color: #000;
}
.nav-tabs .nav-link.active {
  font-weight: bold;
  color: #795548;
}
.edit-btn {
  color: #28a745;
  cursor: pointer;
}
.edit-btn:hover {
  color: #218838;
}
.permission-alert {
  background-color: #f8d7da;
  color: #721c24;
  padding: 1rem;
  border-radius: 0.25rem;
  margin-bottom: 1rem;
}
