* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f5f7fb;
  color: #172033;
}

.page {
  min-height: 100vh;
  padding: 28px 18px;
}

.hero {
  max-width: 900px;
  margin: 0 auto 24px;
  text-align: center;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #7a5a12;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: 36px;
}

.subtitle {
  margin: 10px auto 0;
  max-width: 540px;
  color: #667085;
  line-height: 1.5;
}

.subtitle-left {
  margin: 8px 0 0;
  color: #667085;
  line-height: 1.5;
}

.launcher {
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}

.app-card {
  border: 1px solid #e6e8ee;
  background: #ffffff;
  border-radius: 22px;
  padding: 26px;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.07);
  transition: 0.2s ease;
  text-decoration: none;
  color: inherit;
  display: block;
}

.app-card:hover {
  transform: translateY(-3px);
  border-color: #c9a227;
}

.icon {
  font-size: 34px;
}

.app-card h2 {
  margin: 16px 0 8px;
}

.app-card p {
  margin: 0;
  color: #667085;
}

.section-header {
  max-width: 1100px;
  margin: 0 auto 16px;
  background: #ffffff;
  border: 1px solid #e6e8ee;
  border-radius: 22px;
  padding: 18px;
  display: flex;
  align-items: center;
  gap: 16px;
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.06);
}

.back-btn {
  border: none;
  background: #f2f4f7;
  color: #1d2939;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
}

.module-actions {
  max-width: 1100px;
  margin: 0 auto 16px;
  display: flex;
  gap: 12px;
}

.primary-action,
.secondary-action {
  border: none;
  border-radius: 14px;
  padding: 13px 18px;
  font-weight: 700;
  cursor: pointer;
}

.primary-action {
  background: #1d2939;
  color: #ffffff;
}

.secondary-action {
  background: #c9a227;
  color: #111827;
}

.table-card {
  max-width: 1100px;
  margin: 0 auto;
  background: #ffffff;
  border: 1px solid #e6e8ee;
  border-radius: 22px;
  padding: 18px;
  box-shadow: 0 12px 30px rgba(16, 24, 40, 0.06);
}

.table-title {
  margin-bottom: 14px;
}

.table-title h2 {
  margin: 0;
}

.table-title p {
  margin: 5px 0 0;
  color: #667085;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  border-bottom: 1px solid #eaecf0;
  padding: 12px;
  text-align: left;
  font-size: 14px;
}

th {
  background: #f9fafb;
  color: #344054;
}

td {
  color: #475467;
}

.empty {
  text-align: center;
  color: #98a2b3;
  padding: 22px;
}

.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  padding: 18px;
  overflow-y: auto;
  z-index: 10;
}

.modal.show {
  display: block;
}

.modal-box {
  max-width: 850px;
  margin: 30px auto;
  background: #ffffff;
  border-radius: 22px;
  padding: 22px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.24);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #e6e8ee;
  padding-bottom: 14px;
  margin-bottom: 18px;
}

.modal-header h2 {
  margin: 0;
}

.close-btn {
  border: none;
  background: #f2f4f7;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 24px;
  cursor: pointer;
}

.grid {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 12px;
  align-items: center;
}

label {
  font-weight: 700;
  color: #344054;
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  padding: 12px;
  font-size: 15px;
  color: #172033;
  background: white;
}

input[readonly] {
  background: #f2f4f7;
  color: #475467;
  font-weight: 700;
  cursor: not-allowed;
}

textarea {
  min-height: 80px;
  resize: vertical;
}

.submit-btn {
  margin-top: 22px;
  width: 100%;
  border: none;
  border-radius: 14px;
  background: #1d2939;
  color: white;
  font-size: 16px;
  font-weight: 700;
  padding: 14px 18px;
  cursor: pointer;
}

.submit-btn:hover,
.primary-action:hover {
  background: #111827;
}

.secondary-action:hover {
  background: #b8921f;
}

.message {
  margin: 14px 0 0;
  font-weight: 700;
}

.message.success {
  color: #027a48;
}

.message.error {
  color: #b42318;
}

@media (max-width: 700px) {
  h1 {
    font-size: 30px;
  }

  .launcher {
    grid-template-columns: 1fr;
  }

  .section-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .module-actions {
    flex-direction: column;
  }

  .primary-action,
  .secondary-action {
    width: 100%;
  }

  .grid {
    grid-template-columns: 1fr;
  }

  label {
    margin-top: 6px;
  }

  .modal-box {
    margin: 10px auto;
    padding: 18px;
  }
}

.mini-action {
  border: none;
  border-radius: 10px;
  background: #1d2939;
  color: white;
  padding: 9px 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.mini-action:hover {
  background: #111827;
}

.disabled-action {
  background: #98a2b3 !important;
  cursor: not-allowed;
  color: white;
}

.admitted-row {
  background: #f9fafb;
  opacity: 0.72;
}

.small-muted {
  margin-top: 5px;
  font-size: 12px;
  color: #667085;
}

.filter-row {
  max-width: 1100px;
  margin: 0 auto 16px;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.filter-btn {
  border: 1px solid #d0d5dd;
  background: #ffffff;
  color: #344054;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
}

.filter-btn.active {
  background: #1d2939;
  color: #ffffff;
  border-color: #1d2939;
}

.status-pill {
  border: none;
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.status-in-class {
  background: #dcfae6;
  color: #027a48;
}

.status-left {
  background: #fee4e2;
  color: #b42318;
}

.row-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mini-danger-action {
  border: none;
  border-radius: 10px;
  background: #b42318;
  color: white;
  padding: 9px 12px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.mini-danger-action:hover {
  background: #7a271a;
}
.status-on-leave {
  background: #fef0c7;
  color: #b54708;
}


.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: #f5f7fb;
}

.login-card {
  width: 100%;
  max-width: 430px;
  background: #ffffff;
  border: 1px solid #e6e8ee;
  border-radius: 24px;
  padding: 28px;
  box-shadow: 0 20px 60px rgba(16, 24, 40, 0.12);
}

.login-card h1 {
  margin-bottom: 8px;
}

.login-form {
  margin-top: 22px;
  display: grid;
  gap: 12px;
}

.top-bar {
  max-width: 900px;
  margin: 0 auto 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logout-btn {
  border: none;
  background: #fee4e2;
  color: #b42318;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.logout-btn:hover {
  background: #fecdca;
}

.levels-card {
  margin-top: 18px;
}

.split-title {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

@media (max-width: 700px) {
  .split-title {
    flex-direction: column;
  }

  .split-title .secondary-action {
    width: 100%;
  }
}

.filter-inline {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-top: 16px;
}

.detail-box {
  border: 1px solid #e6e8ee;
  border-radius: 18px;
  padding: 16px;
  background: #ffffff;
}

.detail-box h3 {
  margin: 0;
}

.compact-title {
  margin-bottom: 12px;
}

.compact-title p {
  margin: 5px 0 0;
  color: #667085;
}

.student-manager {
  margin-top: 18px;
}

.modal-table-space {
  margin-top: 18px;
}

.large-modal {
  max-width: 1000px;
}

@media (max-width: 900px) {
  .detail-grid {
    grid-template-columns: 1fr;
  }
}


.batch-detail-layout {
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 18px;
  align-items: start;
}

.batch-main-panel {
  min-width: 0;
}

.batch-side-panel {
  position: sticky;
  top: 18px;
}

.simple-list {
  display: grid;
  gap: 10px;
}

.simple-list-item {
  border: 1px solid #eaecf0;
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 4px;
  background: #f9fafb;
}

.simple-list-item strong {
  font-size: 14px;
  color: #172033;
}

.simple-list-item span {
  font-size: 12px;
  color: #667085;
  font-weight: 700;
}

.tiny-danger {
  border: none;
  background: #fee4e2;
  color: #b42318;
  border-radius: 8px;
  padding: 6px 8px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  margin-top: 4px;
}

.top-submit-btn {
  margin-top: 16px;
}

@media (max-width: 900px) {
  .batch-detail-layout {
    grid-template-columns: 1fr;
  }

  .batch-side-panel {
    position: static;
  }
}

.eligibility-summary-card {
  background: #f9fafb;
  border: 1px solid #eaecf0;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 18px;
}

.eligibility-summary-card h3 {
  margin: 0;
}

.eligibility-list {
  display: grid;
  gap: 14px;
}

.eligibility-course-card {
  border: 1px solid #e6e8ee;
  border-radius: 18px;
  padding: 16px;
  background: #ffffff;
}

.eligibility-course-card h3 {
  margin: 0;
}

.eligibility-course-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: space-between;
  margin-bottom: 12px;
}

.eligibility-level-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.eligibility-check {
  border: 1px solid #eaecf0;
  border-radius: 12px;
  padding: 10px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  font-weight: 400;
  background: #f9fafb;
}

.eligibility-check input {
  width: auto;
  margin-top: 3px;
}

.eligibility-check span {
  display: grid;
  gap: 2px;
  font-size: 14px;
}

.eligibility-pill {
  display: inline-block;
  background: #eef4ff;
  color: #3538cd;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
  margin: 2px;
}

@media (max-width: 700px) {
  .eligibility-level-grid {
    grid-template-columns: 1fr;
  }
}

.assignment-card-note {
  background: #f9fafb;
  border: 1px solid #eaecf0;
  border-radius: 14px;
  padding: 12px;
  color: #667085;
}

#assignmentRoleLabel,
#assignmentEligibilityRole {
  display: none;
}

.link-button {
  border: none;
  background: transparent;
  color: #1d4ed8;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.details-panel {
  display: grid;
  gap: 14px;
}

.details-card {
  border: 1px solid #eaecf0;
  background: #f9fafb;
  border-radius: 16px;
  padding: 16px;
}

.details-card h3 {
  margin: 0 0 12px;
}

.details-card p {
  margin: 7px 0;
  color: #475467;
}

.link-action {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.assignment-card-note {
  background: #f9fafb;
  border: 1px solid #eaecf0;
  border-radius: 14px;
  padding: 12px;
  color: #667085;
  margin-top: 14px;
}

#assignmentRoleLabel,
#assignmentEligibilityRole {
  display: none;
}

/* ================================
   TEACHER TIMES - CLEAN RESPONSIVE UI
================================ */

.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px 18px 50px;
}




.available-day-panel,
.table-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}



/* ================================
   TEACHER TIMES - TOP DAY FILTER UI
================================ */

.teacher-time-dashboard-top {
  display: grid;
  gap: 16px;
  margin: 18px 0;
}

.day-top-panel,
.available-day-panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.06);
}

.day-top-panel {
  padding: 16px;
}

.day-top-head {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.day-top-head h3 {
  margin: 0;
  font-size: 18px;
  color: #172033;
}

.day-top-head p {
  margin: 5px 0 0;
  font-size: 13px;
  color: #667085;
}

.day-top-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.day-chip {
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  border-radius: 999px;
  padding: 10px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #344054;
  font-weight: 800;
  white-space: nowrap;
  transition: 0.18s ease;
  flex-shrink: 0;
}

.day-chip:hover {
  transform: translateY(-1px);
  background: #f1f5f9;
}

.day-chip strong {
  background: #eef4ff;
  color: #3538cd;
  border-radius: 999px;
  min-width: 28px;
  text-align: center;
  padding: 4px 8px;
  font-size: 12px;
}

.day-chip.active {
  background: #172033;
  color: #ffffff;
  border-color: #172033;
}

.day-chip.active strong {
  background: #ffffff;
  color: #172033;
}

.available-day-panel {
  padding: 18px;
}

.available-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 280px));
  gap: 14px;
  margin-top: 12px;
}

@media (max-width: 700px) {
  .day-top-head {
    display: grid;
    gap: 12px;
  }

  .day-top-head .secondary-action {
    width: 100%;
  }

  .day-top-panel,
  .available-day-panel {
    border-radius: 18px;
    padding: 14px;
  }

  .available-slots-grid {
    grid-template-columns: 1fr;
  }
}

.day-box:hover {
  transform: translateY(-1px);
  background: #f1f5f9;
}

.day-box strong {
  background: #eef4ff;
  color: #3538cd;
  border-radius: 999px;
  min-width: 32px;
  text-align: center;
  padding: 5px 8px;
  font-size: 13px;
}

.day-box.active {
  background: #172033;
  color: #ffffff;
  border-color: #172033;
}

.day-box.active strong {
  background: #ffffff;
  color: #172033;
}

.available-day-panel {
  padding: 18px;
  min-width: 0;
}

.available-day-panel .table-title {
  margin-bottom: 12px;
}

.available-slots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 280px));
  gap: 14px;
  margin-top: 12px;
}

.available-slot-card {
  border: 1px solid #e5e7eb;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 18px;
  padding: 14px;
  display: grid;
  gap: 12px;
  min-height: 160px;
}

.available-slot-card h3 {
  margin: 8px 0 2px;
  font-size: 24px;
  line-height: 1;
  color: #0f172a;
}

.available-slot-card p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

.available-slot-card strong {
  display: block;
  color: #172033;
  font-size: 15px;
}

.available-slot-card span {
  color: #667085;
  font-size: 13px;
}

.available-slot-card .mini-action {
  width: 100%;
  justify-content: center;
}

.slot-day-pill {
  display: inline-block;
  width: fit-content;
  background: #ecfdf3;
  color: #027a48 !important;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px !important;
  font-weight: 900;
}

.usage-pill {
  display: inline-block;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
}

.usage-available {
  background: #ecfdf3;
  color: #027a48;
}

.usage-individual {
  background: #eef4ff;
  color: #3538cd;
}

.usage-group {
  background: #fff7ed;
  color: #c2410c;
}

.usage-inactive {
  background: #f2f4f7;
  color: #667085;
}

.link-button {
  border: none;
  background: transparent;
  color: #1d4ed8;
  font-weight: 800;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.details-panel {
  display: grid;
  gap: 14px;
}

.details-card {
  border: 1px solid #eaecf0;
  background: #f9fafb;
  border-radius: 16px;
  padding: 16px;
}

.details-card h3 {
  margin: 0 0 12px;
}

.details-card p {
  margin: 7px 0;
  color: #475467;
}

/* Active teachers table spacing */
#teacherTypeFilters {
  margin: 12px 0;
}

#teacherTimesTeachersBody td,
#timeBlocksTableBody td {
  vertical-align: middle;
}

/* Tablet */
@media (max-width: 1000px) {
  .page {
    max-width: 100%;
    padding: 18px 14px 44px;
  }

  .teacher-time-dashboard {
    grid-template-columns: 1fr;
  }

  .day-sidebar {
    position: static;
  }

  .day-box-list {
    grid-template-columns: repeat(4, minmax(130px, 1fr));
  }

  .available-slots-grid {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  }
}

/* Mobile */
@media (max-width: 650px) {
  .page {
    padding: 14px 10px 36px;
  }

  .section-header {
    text-align: left;
    padding: 20px;
  }

  .section-header h1 {
    font-size: 28px;
  }

  .module-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .teacher-time-dashboard {
    gap: 14px;
  }

  .day-sidebar {
    padding: 14px;
    border-radius: 18px;
  }

  .day-box-list {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    padding-bottom: 4px;
    scrollbar-width: thin;
  }

  .day-box {
    min-width: 125px;
    flex-shrink: 0;
  }

  .available-day-panel {
    padding: 14px;
    border-radius: 18px;
  }

  .available-day-panel .split-title {
    display: grid;
    gap: 12px;
  }

  .available-day-panel .secondary-action {
    width: 100%;
  }

  .available-slots-grid {
    grid-template-columns: 1fr;
  }

  .available-slot-card {
    min-height: auto;
  }

  .table-card {
    border-radius: 18px;
    padding: 14px;
  }

  .filter-row {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
  }

  .filter-btn {
    white-space: nowrap;
  }
}

.extra-large-modal {
  max-width: 1120px;
  width: min(1120px, calc(100vw - 24px));
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.teacher-popup-top {
  display: flex;
  justify-content: flex-end;
  margin: 12px 0;
}

.popup-filter-row {
  margin-bottom: 12px;
}

.popup-table-wrap {
  overflow: auto;
  max-height: 58vh;
  border-radius: 16px;
}

@media (max-width: 700px) {
  .extra-large-modal {
    width: calc(100vw - 16px);
    max-height: 92vh;
    border-radius: 18px;
  }

  .teacher-popup-top {
    display: grid;
  }

  .teacher-popup-top .secondary-action {
    width: 100%;
  }

  .popup-table-wrap {
    max-height: 55vh;
  }

  .popup-filter-row {
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 6px;
  }

  .popup-filter-row .filter-btn {
    white-space: nowrap;
  }
}

/* ================================
   TEACHER TIMES - FINAL WIDTH ALIGNMENT
================================ */

body {
  overflow-x: hidden;
}

.page {
  width: min(1180px, calc(100% - 32px));
  max-width: 1180px;
  margin: 0 auto;
  padding-left: 0;
  padding-right: 0;
}

.section-header,
.teacher-time-dashboard-top,
.table-card,
.module-actions {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.teacher-time-dashboard-top {
  margin: 18px 0;
}

.day-top-panel,
.available-day-panel {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.available-slots-grid {
  grid-template-columns: repeat(auto-fit, minmax(220px, 280px));
}

@media (max-width: 700px) {
  .page {
    width: calc(100% - 20px);
    padding-left: 0;
    padding-right: 0;
  }

  .section-header,
  .day-top-panel,
  .available-day-panel,
  .table-card {
    width: 100%;
  }
}

/* ================================
   SCHEDULE CALENDAR
================================ */

.schedule-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}

.schedule-month-title {
  display: grid;
  text-align: center;
  gap: 4px;
}

.schedule-month-title strong {
  font-size: 20px;
  color: #172033;
}

.schedule-month-title span {
  font-size: 13px;
  color: #667085;
  font-weight: 700;
}

.compact-submit {
  margin-top: 0;
  margin-bottom: 12px;
}

.schedule-calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.schedule-weekday {
  text-align: center;
  font-size: 12px;
  font-weight: 900;
  color: #667085;
  text-transform: uppercase;
  padding: 8px 0;
}

.schedule-day {
  min-height: 115px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 8px;
  display: grid;
  align-content: start;
  gap: 8px;
}

.empty-day {
  background: transparent;
  border: none;
}

.schedule-day-number {
  font-weight: 900;
  color: #172033;
  font-size: 13px;
}

.schedule-day-sessions {
  display: grid;
  gap: 6px;
}

.schedule-bubble {
  border: none;
  border-radius: 12px;
  padding: 7px 8px;
  cursor: pointer;
  text-align: left;
  display: grid;
  gap: 2px;
  font-size: 12px;
  font-weight: 800;
}

.schedule-bubble strong {
  font-size: 12px;
}

.schedule-bubble span {
  font-size: 11px;
}

.schedule-bubble-green {
  background: #dcfae6;
  color: #027a48;
}

.schedule-bubble-yellow {
  background: #fef0c7;
  color: #b54708;
}

.schedule-bubble-red {
  background: #fee4e2;
  color: #b42318;
}

.schedule-bubble-moved {
  background: #e5e7eb;
  color: #475467;
  opacity: 0.75;
}

@media (max-width: 800px) {
  .schedule-calendar-grid {
    grid-template-columns: 1fr;
  }

  .schedule-weekday {
    display: none;
  }

  .empty-day {
    display: none;
  }

  .schedule-day {
    min-height: auto;
  }

  .schedule-toolbar {
    display: grid;
    grid-template-columns: 1fr;
  }

  .schedule-toolbar .mini-action {
    width: 100%;
  }
}



/* ================================
   SCHEDULE CALENDAR - COMPACT UPDATE
================================ */

.schedule-calendar-grid {
  gap: 6px;
}

.schedule-day {
  min-height: 92px;
  padding: 6px;
  border-radius: 12px;
}

.schedule-day-number {
  font-size: 12px;
}

.schedule-bubble {
  border-radius: 10px;
  padding: 5px 6px;
  font-size: 11px;
}

.schedule-bubble strong {
  font-size: 11px;
}

.schedule-bubble span {
  font-size: 10px;
}

.schedule-weekday {
  padding: 5px 0;
  font-size: 11px;
}

.schedule-month-title strong {
  font-size: 18px;
}

@media (max-width: 800px) {
  .schedule-day {
    min-height: auto;
    padding: 8px;
  }
}


/* ================================
   SCHEDULE DETAIL POPUP POLISH
================================ */

.schedule-bubble-original-rescheduled {
  background: #ffe4e6;
  color: #be123c;
  border: 1px solid #fecdd3;
}

.schedule-detail-card {
  border-radius: 18px;
  padding: 18px;
  border: 1px solid #e5e7eb;
}

.schedule-detail-green {
  background: linear-gradient(180deg, #ecfdf3 0%, #ffffff 60%);
  border-color: #bbf7d0;
}

.schedule-detail-yellow {
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 60%);
  border-color: #fde68a;
}

.schedule-detail-red {
  background: linear-gradient(180deg, #fef2f2 0%, #ffffff 60%);
  border-color: #fecaca;
  box-shadow: 0 18px 45px rgba(185, 28, 28, 0.16);
}

.schedule-detail-moved {
  background: linear-gradient(180deg, #fff1f2 0%, #ffffff 60%);
  border-color: #fecdd3;
  box-shadow: 0 18px 45px rgba(190, 18, 60, 0.14);
}

.schedule-detail-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.schedule-detail-status {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 7px 11px;
  background: #172033;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.schedule-detail-date {
  font-size: 13px;
  color: #667085;
  font-weight: 800;
}

.schedule-detail-card h3 {
  font-size: 28px;
  margin: 0 0 16px;
  color: #172033;
}

.schedule-detail-list {
  display: grid;
  gap: 9px;
}

.schedule-detail-list p {
  margin: 0;
  display: grid;
  grid-template-columns: 170px 1fr;
  gap: 12px;
  align-items: start;
  color: #475467;
}

.schedule-detail-list strong {
  color: #344054;
}

.schedule-detail-list span {
  color: #172033;
}

@media (max-width: 650px) {
  .schedule-detail-top {
    display: grid;
  }

  .schedule-detail-card h3 {
    font-size: 24px;
  }

  .schedule-detail-list p {
    grid-template-columns: 1fr;
    gap: 3px;
  }
}


/* ================================
   CLASSES APP
================================ */

.classes-layout {
  display: grid;
  gap: 18px;
}

.classes-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 280px));
  gap: 14px;
}

.class-select-card {
  border: 1px solid #e5e7eb;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 18px;
  padding: 16px;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 8px;
  transition: 0.18s ease;
}

.class-select-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.class-select-card strong {
  color: #172033;
  font-size: 16px;
}

.class-select-card small {
  color: #667085;
  font-weight: 800;
}

.class-card-eyebrow {
  color: #9a6700;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.classes-student-list {
  display: grid;
  gap: 10px;
}

.student-row-card {
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 16px;
  padding: 14px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  text-align: left;
}

.student-row-card strong {
  display: block;
  color: #172033;
}

.student-row-card span {
  display: block;
  margin-top: 4px;
  color: #667085;
  font-size: 13px;
}

.student-row-card small {
  background: #172033;
  color: #ffffff;
  padding: 7px 12px;
  border-radius: 999px;
  font-weight: 900;
}

.classes-detail-panel {
  overflow: hidden;
}

.compact-toolbar {
  margin: 0;
}

.entry-box-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.entry-session-box {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 12px;
  cursor: pointer;
  text-align: left;
  display: grid;
  gap: 4px;
  min-height: 105px;
}

.entry-session-box strong {
  font-size: 20px;
  color: #172033;
}

.entry-session-box span {
  font-size: 13px;
  font-weight: 900;
}

.entry-session-box small {
  color: #475467;
  font-weight: 800;
}

.entry-session-box em {
  margin-top: 4px;
  font-style: normal;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.entry-box-completed {
  background: #ecfdf3;
  border-color: #bbf7d0;
  color: #027a48;
}

.entry-box-pending {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #c2410c;
}

.entry-box-future {
  background: #f8fafc;
  border-color: #e5e7eb;
  color: #64748b;
}

.entry-box-rescheduled {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b54708;
}

.entry-box-late-rescheduled {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b42318;
}

.entry-box-moved {
  background: #fff1f2;
  border-color: #fecdd3;
  color: #be123c;
}

.entry-details-box {
  margin-top: 14px;
}

.entry-form-card {
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 20px;
  padding: 18px;
}

.entry-form-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid #e5e7eb;
}

.entry-form-head h3 {
  margin: 6px 0 4px;
  font-size: 24px;
  color: #172033;
}

.entry-form-head p {
  margin: 0;
  color: #667085;
  font-weight: 800;
}

.entry-status-pill {
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.entry-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #92400e;
  padding: 12px;
  border-radius: 14px;
  font-weight: 800;
  margin-bottom: 14px;
}

.entry-warning.danger {
  background: #fef2f2;
  border-color: #fecaca;
  color: #b42318;
}

.entry-warning.success {
  background: #ecfdf3;
  border-color: #bbf7d0;
  color: #027a48;
}

.entry-form-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.attendance-section {
  margin-top: 18px;
  border-top: 1px solid #e5e7eb;
  padding-top: 16px;
}

.attendance-section h3 {
  margin: 0 0 12px;
  color: #172033;
}

.attendance-list {
  display: grid;
  gap: 10px;
}

.attendance-row {
  display: grid;
  grid-template-columns: 1.2fr 160px 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  border-radius: 14px;
  padding: 10px;
}

.attendance-row strong {
  color: #172033;
}

.attendance-row select,
.attendance-row input,
.support-resource-grid input {
  width: 100%;
  border: 1px solid #cfd6e4;
  border-radius: 12px;
  padding: 10px;
  color: #172033;
}

.support-resource-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 10px;
}

@media (max-width: 800px) {
  .classes-card-grid {
    grid-template-columns: 1fr;
  }

  .entry-box-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .entry-form-head {
    display: grid;
  }

  .attendance-row {
    grid-template-columns: 1fr;
  }

  .support-resource-grid {
    grid-template-columns: 1fr;
  }

  .compact-toolbar {
    display: grid;
    grid-template-columns: 1fr;
  }
}


/* ================================
   QUICK ENTRY
================================ */

.classes-top-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.quick-entry-picker {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 16px;
}

.quick-entry-form-host {
  max-height: 62vh;
  overflow: auto;
  padding-right: 4px;
}

.quick-entry-inner {
  margin-top: 0;
}

@media (max-width: 700px) {
  .classes-top-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .quick-entry-form-host {
    max-height: 58vh;
  }
}


/* ================================
   CLASSES VIEW-ONLY OVERVIEW
================================ */

.class-overview-card {
  border: 1px solid #e5e7eb;
  border-radius: 22px;
  padding: 18px;
  background: #ffffff;
}

.class-overview-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 14px;
  margin-bottom: 14px;
}

.class-overview-head h3 {
  margin: 6px 0 4px;
  font-size: 24px;
  color: #172033;
}

.class-overview-head p {
  margin: 0;
  color: #667085;
  font-weight: 800;
}

.overview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.overview-box {
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  border-radius: 16px;
  padding: 12px;
  display: grid;
  gap: 5px;
}

.overview-box small {
  color: #667085;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.overview-box strong {
  color: #172033;
  font-size: 14px;
}

.overview-notes-grid {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.overview-note {
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 16px;
  padding: 12px;
}

.overview-note small {
  display: block;
  color: #667085;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.overview-note p {
  margin: 0;
  color: #172033;
  line-height: 1.5;
}

.overview-section {
  margin-top: 18px;
  border-top: 1px solid #e5e7eb;
  padding-top: 14px;
}

.overview-section h3 {
  margin: 0 0 12px;
  color: #172033;
}

.overview-attendance-list {
  display: grid;
  gap: 8px;
}

.overview-attendance-row {
  display: grid;
  grid-template-columns: 1.5fr 120px 1fr;
  gap: 10px;
  align-items: center;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  border-radius: 14px;
  padding: 10px;
}

.overview-attendance-row strong {
  color: #172033;
}

.overview-attendance-row span {
  font-weight: 900;
}

.overview-attendance-row small {
  color: #667085;
}

.overview-attendance-row.present {
  background: #ecfdf3;
  border-color: #bbf7d0;
}

.overview-attendance-row.absent {
  background: #fef2f2;
  border-color: #fecaca;
}

.overview-attendance-row.late {
  background: #fffbeb;
  border-color: #fde68a;
}

.overview-attendance-row.not_entered {
  background: #f8fafc;
  border-color: #e5e7eb;
}

.overview-resource-list {
  display: grid;
  gap: 8px;
}

.overview-resource-link {
  text-decoration: none;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  border-radius: 14px;
  padding: 12px;
  display: grid;
  gap: 4px;
}

.overview-resource-link strong {
  color: #172033;
}

.overview-resource-link span {
  color: #667085;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.overview-completed {
  background: linear-gradient(180deg, #ecfdf3 0%, #ffffff 48%);
  border-color: #bbf7d0;
}

.overview-pending {
  background: linear-gradient(180deg, #fff7ed 0%, #ffffff 48%);
  border-color: #fed7aa;
}

.overview-future {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 48%);
}

.overview-rescheduled {
  background: linear-gradient(180deg, #fffbeb 0%, #ffffff 48%);
  border-color: #fde68a;
}

.overview-late-rescheduled {
  background: linear-gradient(180deg, #fef2f2 0%, #ffffff 48%);
  border-color: #fecaca;
}

.overview-moved {
  background: linear-gradient(180deg, #fff1f2 0%, #ffffff 48%);
  border-color: #fecdd3;
}

@media (max-width: 700px) {
  .class-overview-head {
    display: grid;
  }

  .class-overview-head h3 {
    font-size: 22px;
  }

  .overview-grid {
    grid-template-columns: 1fr 1fr;
  }

  .overview-attendance-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 430px) {
  .overview-grid {
    grid-template-columns: 1fr;
  }
}


/* ================================
   BATCHES APP UPDATE
================================ */

.compact-search-card {
  padding: 16px;
  margin-bottom: 16px;
}

.global-batch-search {
  width: 100%;
  border: 1px solid #cfd6e4;
  border-radius: 14px;
  padding: 13px 14px;
  font-size: 15px;
  color: #172033;
  background: #ffffff;
}

.mini-merged-badge {
  display: inline-block;
  margin-top: 6px;
  border-radius: 999px;
  padding: 4px 8px;
  background: #fff7ed;
  color: #c2410c;
  font-size: 11px;
  font-weight: 900;
}

.merged-batch-info {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.merged-info-line {
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  border-radius: 14px;
  padding: 10px;
  display: grid;
  gap: 8px;
}

.merged-info-line.warning {
  background: #fff7ed;
  border-color: #fed7aa;
}

.merged-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.merged-chip,
.link-button,
.student-link-button {
  border: none;
  background: transparent;
  color: #1d4ed8;
  cursor: pointer;
  font-weight: 900;
  text-decoration: underline;
  padding: 0;
  text-align: left;
}

.merged-chip {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  color: #172033;
  border-radius: 999px;
  padding: 7px 10px;
  text-decoration: none;
}

.teacher-simple-item {
  align-items: center;
}

.leader-badge {
  display: inline-block;
  margin-top: 5px;
  width: fit-content;
  background: #172033;
  color: #ffffff !important;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 900;
}

.inline-checkbox-card {
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  border-radius: 14px;
  padding: 11px 12px;
  display: flex;
  gap: 10px;
  align-items: center;
}

.inline-checkbox-card input {
  width: auto;
}

.inline-checkbox-card span {
  color: #344054;
  font-weight: 800;
}

.teacher-time-block-picker {
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  border-radius: 16px;
  padding: 12px;
}

.teacher-time-picker-box {
  display: grid;
  gap: 10px;
}

.teacher-time-picker-box h3 {
  margin: 0;
  color: #172033;
}

.teacher-time-slot-row {
  display: grid;
  grid-template-columns: 1fr 1.2fr auto;
  gap: 10px;
  align-items: center;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 10px;
}

.teacher-time-slot-row strong {
  display: block;
  color: #172033;
}

.teacher-time-slot-row span {
  display: block;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
  margin-top: 3px;
}

.teacher-time-slot-row select {
  width: 100%;
  border: 1px solid #cfd6e4;
  border-radius: 12px;
  padding: 10px;
}

.student-info-card {
  border: 1px solid #e5e7eb;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 18px;
  padding: 18px;
}

.student-info-card h3 {
  margin: 6px 0 14px;
  color: #172033;
}

.student-info-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.student-info-grid p,
.student-info-note {
  margin: 0;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 14px;
  padding: 10px;
  display: grid;
  gap: 4px;
}

.student-info-grid strong,
.student-info-note strong {
  color: #667085;
  font-size: 12px;
  text-transform: uppercase;
}

.student-info-grid span,
.student-info-note p {
  color: #172033;
  margin: 0;
  font-weight: 800;
}

.student-info-note {
  margin-top: 10px;
}

@media (max-width: 800px) {
  .teacher-time-slot-row {
    grid-template-columns: 1fr;
  }

  .student-info-grid {
    grid-template-columns: 1fr;
  }
}


/* ================================
   GLOBAL SUCCESS POPUP
================================ */

.success-popup-box {
  max-width: 420px;
  text-align: center;
  padding: 34px 26px;
}

.success-popup-icon {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
  border-radius: 999px;
  background: #dcfae6;
  color: #027a48;
  display: grid;
  place-items: center;
  font-size: 38px;
  font-weight: 900;
  border: 1px solid #bbf7d0;
}

.success-popup-box h2 {
  margin: 0 0 8px;
  color: #172033;
  font-size: 26px;
}

.success-popup-box p {
  margin: 0 0 22px;
  color: #667085;
  font-weight: 700;
  line-height: 1.5;
}

.success-popup-box .submit-btn {
  margin-top: 0;
}


/* ================================
   STUDENTS APP UPGRADE
================================ */

.student-tools-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 16px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
}

.student-search-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.student-search-row input {
  flex: 1;
  min-width: 260px;
  border: 1px solid #cfd6e4;
  border-radius: 14px;
  padding: 12px 14px;
  color: #172033;
}

.compact-filter-row {
  margin-top: 12px;
}

.dynamic-filter-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.filter-chip-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-chip {
  border: 1px solid #d0d5dd;
  background: #f8fafc;
  border-radius: 999px;
  padding: 8px 11px;
  font-weight: 800;
  color: #172033;
  cursor: pointer;
}

.add-filter-panel {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  margin-top: 12px;
  border-top: 1px solid #e5e7eb;
  padding-top: 12px;
}

.add-filter-panel select {
  border: 1px solid #cfd6e4;
  border-radius: 12px;
  padding: 10px 12px;
  min-width: 200px;
}

.sortable-th {
  cursor: pointer;
  user-select: none;
}

.sortable-th:hover {
  color: #9a6700;
}

.link-button {
  border: none;
  background: transparent;
  color: #0f4c81;
  font-weight: 900;
  cursor: pointer;
  padding: 0;
  text-align: left;
  text-decoration: underline;
}

.pagination-row {
  display: flex;
  justify-content: center;
  gap: 12px;
  align-items: center;
  padding-top: 16px;
}

.family-warning-box {
  margin-top: 14px;
  border: 1px solid #fed7aa;
  background: #fff7ed;
  color: #9a3412;
  border-radius: 16px;
  padding: 14px;
  font-weight: 700;
}

.family-warning-box p {
  margin: 7px 0;
}

.family-mini-list {
  display: grid;
  gap: 8px;
  margin: 10px 0;
}

.family-mini-item {
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #172033;
  border-radius: 12px;
  padding: 10px;
  text-align: left;
  font-weight: 800;
  cursor: pointer;
}

.danger-submit {
  background: #b42318 !important;
}

.student-card-content {
  display: grid;
  gap: 16px;
}

.student-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.next-action-grid {
  display: grid;
  gap: 10px;
}

.next-action-grid .secondary-action,
.next-action-grid .mini-action {
  width: 100%;
  justify-content: center;
  text-align: center;
}

@media (max-width: 700px) {
  .student-search-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .student-search-row input {
    min-width: 0;
  }

  .add-filter-panel {
    display: grid;
    grid-template-columns: 1fr;
  }

  .add-filter-panel select,
  .add-filter-panel button {
    width: 100%;
  }
}



/* ================================
   INDIVIDUAL APP UPGRADES
================================ */

.compact-search-card {
  margin-top: 14px;
}

.link-button {
  border: none;
  background: transparent;
  color: #1d4ed8;
  font-weight: 900;
  cursor: pointer;
  padding: 0;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.inline-field-action {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.inline-field-action select,
.inline-field-action input {
  min-width: 0;
}

.soft-card {
  background: linear-gradient(180deg, #f8fafc 0%, #ffffff 70%);
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 16px;
}

.eligibility-wrap {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.danger-submit {
  background: #b42318 !important;
}

@media (max-width: 700px) {
  .inline-field-action {
    grid-template-columns: 1fr;
  }

  .inline-field-action .mini-action {
    width: 100%;
  }
}



/* ================================
   TEACHER TIMES UPGRADE
================================ */

.teacher-time-actions-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.teacher-time-row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.teacher-time-row-actions .mini-action,
.teacher-time-row-actions .mini-danger-action {
  padding: 7px 10px;
  font-size: 12px;
}

#timeBlockModal .assignment-card-note {
  margin: 0;
}

@media (max-width: 700px) {
  .teacher-time-actions-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .teacher-time-row-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}


/* ================================
   TEACHER TIMES V2 FILTERS + BULK DELETE
================================ */

.available-slot-filter-panel {
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  border-radius: 18px;
  padding: 14px;
  margin: 14px 0;
  display: grid;
  gap: 10px;
}

.available-filter-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 10px;
}

.available-filter-grid label {
  display: grid;
  gap: 6px;
  font-size: 12px;
  color: #667085;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.available-filter-grid label span {
  font-weight: 900;
}

.available-filter-grid select {
  text-transform: none;
  letter-spacing: normal;
  font-size: 14px;
  font-weight: 700;
  background: #ffffff;
}

.clear-filter-link {
  width: fit-content;
  justify-self: end;
}

.slot-eligibility-row {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.slot-eligibility-row em {
  font-style: normal;
  border-radius: 999px;
  padding: 4px 7px;
  background: #eef4ff;
  color: #3538cd !important;
  font-size: 11px !important;
  font-weight: 900;
}

.time-block-bulk-bar {
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  border-radius: 16px;
  padding: 12px;
  margin: 0 0 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.time-block-bulk-bar strong {
  display: block;
  color: #172033;
}

.time-block-bulk-bar span {
  display: block;
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  margin-top: 3px;
}

.time-block-bulk-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.time-block-select-checkbox {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

@media (max-width: 900px) {
  .available-filter-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .time-block-bulk-bar {
    display: grid;
  }

  .time-block-bulk-actions {
    justify-content: stretch;
  }

  .time-block-bulk-actions .mini-action,
  .time-block-bulk-actions .mini-danger-action {
    flex: 1;
  }
}

@media (max-width: 600px) {
  .available-filter-grid {
    grid-template-columns: 1fr;
  }

  .clear-filter-link {
    justify-self: start;
  }

  .time-block-bulk-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}


/* ================================
   TEACHER TIMES - COMPACT AVAILABLE SLOT CARDS
================================ */

.available-slots-grid {
  grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)) !important;
  gap: 10px !important;
}

.compact-available-slot-card {
  min-height: auto !important;
  padding: 10px 11px !important;
  gap: 5px !important;
  cursor: pointer;
  border-radius: 15px !important;
  transition: 0.16s ease;
}

.compact-available-slot-card:hover {
  transform: translateY(-2px);
  border-color: #c9a227;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.compact-day-pill {
  font-size: 11px !important;
  padding: 4px 8px !important;
}

.compact-slot-time {
  display: block;
  color: #0f172a;
  font-size: 18px;
  line-height: 1.15;
  margin-top: 3px;
}

.compact-slot-teacher {
  display: block;
  color: #172033 !important;
  font-size: 13px !important;
  font-weight: 900;
}

.compact-slot-tid {
  display: block;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.compact-available-slot-card .mini-action,
.compact-available-slot-card .slot-eligibility-row {
  display: none !important;
}

@media (max-width: 700px) {
  .available-slots-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .compact-slot-time {
    font-size: 16px;
  }
}


/* ================================
   TEACHERS / STAFF DB UPGRADE
================================ */

.teacher-tools-card {
  max-width: 1100px;
  margin: 0 auto 14px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 14px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
}

.teacher-search-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.teacher-search-row input {
  flex: 1;
  border: 1px solid #cfd6e4;
  border-radius: 14px;
  padding: 12px 14px;
}

.head-teacher-pill {
  display: inline-block;
  background: #fff7ed;
  color: #c2410c;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 900;
  margin: 2px;
}

.teacher-card-content {
  display: grid;
  gap: 14px;
}

.teacher-profile-card {
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  padding: 18px;
}

.teacher-profile-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 14px;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 14px;
  margin-bottom: 14px;
}

.teacher-profile-head h3 {
  margin: 6px 0 4px;
  color: #172033;
}

.teacher-profile-head p {
  margin: 0;
  color: #667085;
  font-weight: 800;
}

#teacherHeadCourses {
  min-height: 120px;
}

@media (max-width: 700px) {
  .teacher-search-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .teacher-profile-head {
    display: grid;
  }
}


/* ================================
   TEACHERS / COURSES CLEANUP
================================ */

.teacher-tools-card {
  max-width: 1100px;
  margin: 0 auto 16px;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 20px;
  padding: 16px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.04);
}

.teacher-search-row {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.teacher-search-row input {
  flex: 1;
  min-width: 260px;
}

.compact-teacher-table th,
.compact-teacher-table td {
  vertical-align: middle;
}

.teacher-name-link {
  max-width: 150px;
  white-space: normal;
  line-height: 1.3;
}

.course-code-row,
.head-course-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.course-code-pill,
.head-course-pill,
.head-missing-pill {
  border: none;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.course-code-pill {
  background: #eef4ff;
  color: #3538cd;
  cursor: pointer;
}

.course-code-pill:hover {
  background: #dbe4ff;
}

.head-course-pill {
  display: inline-block;
  background: #ecfdf3;
  color: #027a48;
}

.head-missing-pill {
  display: inline-block;
  background: #fff7ed;
  color: #c2410c;
}

.compact-row-actions {
  display: grid;
  gap: 8px;
}

.eligibility-mini-group {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #ffffff;
  padding: 12px;
  display: grid;
  gap: 10px;
  margin-bottom: 10px;
}

.eligibility-mini-group strong {
  color: #172033;
}

@media (max-width: 800px) {
  .teacher-search-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .teacher-search-row input,
  .teacher-search-row button {
    width: 100%;
    min-width: 0;
  }
}


/* ================================
   USER MANAGEMENT APP
================================ */

.user-management-actions {
  flex-wrap: wrap;
}

.um-summary-grid {
  max-width: 1100px;
  margin: 0 auto 16px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.um-summary-card {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 16px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.um-summary-card small {
  display: block;
  color: #667085;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 12px;
  margin-bottom: 6px;
}

.um-summary-card strong {
  color: #172033;
  font-size: 28px;
}

.um-tools-card {
  margin-bottom: 14px;
}

.um-person-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}

.um-person-card {
  border: 1px solid #e5e7eb;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 18px;
  padding: 14px;
  display: grid;
  gap: 8px;
}

.um-person-card strong {
  color: #172033;
  font-size: 15px;
}

.um-person-card small {
  color: #667085;
  font-weight: 800;
}

.um-password-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.um-credential-box {
  max-width: 520px;
}

.um-credential-card {
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  border-radius: 16px;
  padding: 14px;
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
  text-align: left;
}

.um-credential-card p {
  margin: 0;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 10px;
}

.um-credential-card strong {
  color: #667085;
  text-transform: uppercase;
  font-size: 12px;
}

.um-credential-card span {
  color: #172033;
  font-weight: 900;
}

#credentialShareText {
  min-height: 145px;
  font-family: monospace;
  font-size: 13px;
  margin-bottom: 12px;
}

@media (max-width: 700px) {
  .um-password-row {
    grid-template-columns: 1fr;
  }

  .um-credential-card p {
    grid-template-columns: 1fr;
    gap: 3px;
  }

  .um-person-grid {
    grid-template-columns: 1fr;
  }
}


/* ================================
   CLASSES APP V2 REPORTS / EXAMS / COMMENTS
================================ */

.qaj-class-search-row {
  margin: 12px 0 16px;
}

.qaj-month-summary-panel {
  border: 1px solid #e5e7eb;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 20px;
  padding: 16px;
  margin-bottom: 16px;
}

.qaj-summary-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 12px;
}

.qaj-summary-head h3 {
  margin: 0;
  color: #172033;
}

.qaj-summary-head p {
  margin: 5px 0 0;
  color: #667085;
  font-weight: 700;
}

.qaj-summary-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.qaj-status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.qaj-legend {
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 900;
}

.qaj-summary-counts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.qaj-count-box strong {
  font-size: 24px;
}

.qaj-teacher-month-grid,
.qaj-report-table {
  display: grid;
  gap: 9px;
}

.qaj-month-row {
  display: grid;
  grid-template-columns: minmax(210px, 1.2fr) 2.4fr 80px;
  gap: 10px;
  align-items: center;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 16px;
  padding: 10px;
}

.qaj-month-row-name {
  border: none;
  background: transparent;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 4px;
}

.qaj-month-row-name strong {
  color: #172033;
  font-size: 14px;
}

.qaj-month-row-name small {
  color: #667085;
  font-weight: 800;
}

.qaj-month-row-boxes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.qaj-mini-class-box {
  width: 54px;
  min-height: 50px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  cursor: pointer;
  display: grid;
  place-items: center;
  gap: 1px;
  padding: 5px;
}

.qaj-mini-class-box strong {
  font-size: 13px;
}

.qaj-mini-class-box small {
  font-size: 9px;
  color: inherit;
  font-weight: 900;
}

.qaj-month-row-score {
  text-align: center;
  display: grid;
  gap: 2px;
}

.qaj-month-row-score strong {
  font-size: 18px;
  color: #172033;
}

.qaj-month-row-score small {
  color: #667085;
  font-weight: 800;
}

.qaj-status-done,
.qaj-status-border-done {
  background: #dcfae6;
  color: #027a48;
  border-color: #bbf7d0;
}

.qaj-status-pending,
.qaj-status-border-pending {
  background: #fff7ed;
  color: #c2410c;
  border-color: #fed7aa;
}

.qaj-status-future,
.qaj-status-border-future {
  background: #f8fafc;
  color: #64748b;
  border-color: #e5e7eb;
}

.qaj-status-moved,
.qaj-status-border-moved {
  background: #fff1f2;
  color: #be123c;
  border-color: #fecdd3;
}

.qaj-status-rescheduled,
.qaj-status-border-rescheduled,
.qaj-status-rescheduled_teacher,
.qaj-status-border-rescheduled_teacher,
.qaj-status-rescheduled_student,
.qaj-status-border-rescheduled_student {
  background: #fffbeb;
  color: #b54708;
  border-color: #fde68a;
}

.qaj-status-teacher_absent,
.qaj-status-border-teacher_absent {
  background: #fee4e2;
  color: #b42318;
  border-color: #fecaca;
}

.qaj-status-student_absent,
.qaj-status-border-student_absent {
  background: #eef4ff;
  color: #3538cd;
  border-color: #c7d7fe;
}

.qaj-mini-detail-card {
  border-width: 2px;
}

.classes-report-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-bottom: 12px;
}

.classes-report-content {
  overflow: auto;
  max-height: 68vh;
  padding: 4px;
}

.qaj-pdf-report {
  background: #ffffff;
  color: #172033;
  padding: 18px;
}

.qaj-pdf-report h2 {
  margin-top: 0;
}

.qaj-report-session-list {
  display: grid;
  gap: 10px;
}

.exam-request-list,
.academic-comment-list {
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.exam-request-card,
.academic-comment-card {
  border: 1px solid #e5e7eb;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 18px;
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr 190px;
  gap: 12px;
}

.exam-request-card h3,
.academic-comment-card h3 {
  margin: 5px 0 8px;
  color: #172033;
}

.exam-request-card p,
.academic-comment-card p {
  margin: 5px 0;
  color: #475467;
}

.exam-score-wrap {
  display: grid;
  grid-template-columns: 1fr 70px;
  gap: 10px;
  align-items: center;
}

.exam-score-wrap strong {
  font-size: 20px;
  color: #172033;
  text-align: center;
}

.compact-comment-form {
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 14px;
}

.comment-search-row {
  margin-top: 14px;
}

@media (max-width: 800px) {
  .qaj-summary-head,
  .classes-report-actions {
    display: grid;
  }

  .qaj-summary-actions {
    justify-content: stretch;
  }

  .qaj-summary-actions button,
  .classes-report-actions button {
    width: 100%;
  }

  .qaj-month-row {
    grid-template-columns: 1fr;
  }

  .qaj-month-row-score {
    text-align: left;
    grid-template-columns: auto auto;
    justify-content: start;
    gap: 6px;
  }

  .exam-request-card,
  .academic-comment-card {
    grid-template-columns: 1fr;
  }

  .exam-score-wrap {
    grid-template-columns: 1fr;
  }
}

@media print {
  body * {
    visibility: hidden;
  }

  #qajPdfReportArea,
  #qajPdfReportArea * {
    visibility: visible;
  }

  #qajPdfReportArea {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
  }
}


/* ================================
   CLASSES MONTH NAV BUTTONS
================================ */

.qaj-month-nav-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.qaj-month-nav-actions .mini-action,
.qaj-month-nav-actions .secondary-action {
  min-width: fit-content;
}

@media (max-width: 700px) {
  .qaj-month-nav-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .qaj-month-nav-actions .mini-action,
  .qaj-month-nav-actions .secondary-action {
    width: 100%;
  }
}


/* ================================
   EXAM REQUESTS IMPROVED
================================ */

.improved-exam-card {
  display: grid;
  grid-template-columns: 1fr 180px;
  gap: 14px;
  align-items: start;
}

.exam-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.exam-card-head h3 {
  margin: 5px 0 8px;
  color: #172033;
}

.exam-status-badge {
  border-radius: 999px;
  padding: 7px 10px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.exam-status-badge.pending {
  background: #fff7ed;
  color: #c2410c;
}

.exam-status-badge.done {
  background: #ecfdf3;
  color: #027a48;
}

.exam-available-box {
  margin-top: 12px;
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  border-radius: 16px;
  padding: 12px;
}

.exam-available-box small {
  display: block;
  color: #667085;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.exam-time-list {
  display: grid;
  gap: 7px;
}

.exam-time-chip {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  border-radius: 12px;
  padding: 9px 10px;
}

.exam-time-chip strong {
  color: #172033;
  font-size: 13px;
}

.exam-time-chip span {
  background: #dcfae6;
  color: #027a48;
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 11px;
  font-weight: 900;
}

.exam-time-chip.today {
  border-color: #bbf7d0;
  background: #ecfdf3;
}

.exam-time-chip.muted {
  background: #ffffff;
  color: #98a2b3;
}

@media (max-width: 760px) {
  .improved-exam-card {
    grid-template-columns: 1fr;
  }

  .exam-time-chip {
    display: grid;
  }
}


/* ================================
   QAJ MESSAGES APP
================================ */

.messages-top-actions {
  flex-wrap: wrap;
}

.messages-context-card {
  margin-bottom: 16px;
}

.messages-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.messages-summary-grid article {
  border: 1px solid #e5e7eb;
  background: #f8fafc;
  border-radius: 16px;
  padding: 14px;
}

.messages-summary-grid small {
  display: block;
  color: #667085;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  margin-bottom: 5px;
}

.messages-summary-grid strong {
  font-size: 26px;
  color: #172033;
}

.messages-tools-card {
  margin-bottom: 14px;
}

.messages-thread-list {
  display: grid;
  gap: 12px;
}

.message-thread-card {
  border: 1px solid #e5e7eb;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border-radius: 18px;
  padding: 15px;
  cursor: pointer;
  transition: 0.16s ease;
}

.message-thread-card:hover {
  transform: translateY(-2px);
  border-color: #c9a227;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.message-thread-card.has-unread {
  border-color: #c9a227;
  background: linear-gradient(180deg, #fffdf4 0%, #ffffff 100%);
}

.message-thread-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.message-thread-top h3 {
  margin: 5px 0 8px;
  color: #172033;
}

.message-preview {
  color: #475467;
  line-height: 1.45;
  margin: 8px 0;
}

.message-thread-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.message-thread-meta strong {
  color: #b54708;
}

.message-priority {
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.message-priority.normal {
  background: #f2f4f7;
  color: #475467;
}

.message-priority.important {
  background: #fffbeb;
  color: #b54708;
}

.message-priority.urgent {
  background: #fee4e2;
  color: #b42318;
}

.message-thread-modal-box {
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.thread-messages-list {
  display: grid;
  gap: 10px;
  overflow: auto;
  max-height: 52vh;
  padding: 4px;
}

.thread-message-bubble {
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  padding: 12px;
  max-width: 82%;
}

.thread-message-bubble.mine {
  justify-self: end;
  background: #ecfdf3;
  border-color: #bbf7d0;
}

.thread-message-bubble.theirs {
  justify-self: start;
  background: #f8fafc;
}

.thread-message-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.thread-message-bubble p {
  margin: 8px 0 0;
  color: #172033;
  line-height: 1.45;
}

.thread-message-bubble small {
  display: block;
  margin-top: 8px;
  color: #667085;
  font-weight: 800;
}

.reply-message-form {
  border-top: 1px solid #e5e7eb;
  margin-top: 14px;
  padding-top: 14px;
}

.reply-message-form textarea {
  min-height: 90px;
}

@media (max-width: 700px) {
  .message-thread-top {
    display: grid;
  }

  .message-thread-meta {
    display: grid;
  }

  .thread-message-bubble {
    max-width: 100%;
  }

  .messages-summary-grid {
    grid-template-columns: 1fr 1fr;
  }
}
