:root {
  --student-blue: #1783e6;
  --student-blue-dark: #0868c4;
  --student-ink: #0a2540;
  --student-border: #d4e2ef;
  --student-soft: #f5f9fc;
}

.students-list-page,
.enrolment-page {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.students-list-page .page-heading,
.enrolment-page .page-heading {
  margin: 0;
  gap: 16px;
}

.students-list-page .heading-actions,
.enrolment-page .heading-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.students-list-page .heading-actions button,
.enrolment-page .heading-actions button {
  min-height: 40px;
  height: 40px;
  width: auto;
  padding: 0 14px;
  gap: 7px;
  border-radius: 7px;
  font-size: 13px;
  white-space: nowrap;
}

.students-list-page .heading-actions .button-svg,
.enrolment-page .heading-actions .button-svg {
  width: 18px;
  height: 18px;
}

.consolidated-tabs button {
  gap: 7px;
}

.consolidated-tab-count {
  display: inline-grid;
  min-width: 22px;
  height: 20px;
  padding: 0 6px;
  place-items: center;
  border-radius: 10px;
  background: #e7f2fc;
  color: #45627c;
  font-size: 11px;
  font-weight: 700;
}

.consolidated-tabs button.active .consolidated-tab-count {
  background: var(--student-blue);
  color: #fff;
}

.student-filter-panel,
.student-list-panel {
  min-width: 0;
  border: 1px solid var(--student-border);
  border-radius: 8px;
  background: #fff;
}

.student-filter-panel {
  padding: 12px;
}

.student-filter-row {
  display: grid;
  grid-template-columns: minmax(250px, 1.8fr) minmax(150px, .8fr) minmax(170px, 1fr) repeat(3, auto);
  gap: 9px;
  align-items: end;
}

.student-filter-row label,
.student-advanced-filters label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: #425b72;
  font-size: 11px;
  font-weight: 700;
}

.student-filter-row input,
.student-filter-row select,
.student-advanced-filters input,
.student-advanced-filters select {
  width: 100%;
  min-width: 0;
  height: 40px;
  padding: 0 10px;
  border: 1px solid #c7d9e9;
  border-radius: 7px;
  background: #fff;
  color: var(--student-ink);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
}

.student-list-search > div {
  position: relative;
}

.student-list-search svg {
  position: absolute;
  left: 11px;
  top: 50%;
  width: 17px;
  height: 17px;
  transform: translateY(-50%);
  color: #6b8195;
  pointer-events: none;
}

.student-list-search input {
  padding-left: 36px;
}

.student-filter-row > button {
  min-height: 40px;
  height: 40px;
  padding: 0 12px;
  border-radius: 7px;
  font-size: 12px;
  white-space: nowrap;
}

.student-filter-row > button b {
  display: inline-grid;
  min-width: 18px;
  height: 18px;
  margin-left: 3px;
  place-items: center;
  border-radius: 9px;
  background: var(--student-blue);
  color: #fff;
  font-size: 10px;
}

.student-advanced-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(145px, 1fr));
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5edf4;
}

.student-advanced-filters[hidden] {
  display: none;
}

.student-filter-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-top: 10px;
  color: #617489;
  font-size: 11px;
}

.student-filter-summary strong {
  color: var(--student-blue-dark);
}

.student-filter-summary span {
  padding: 4px 7px;
  border-radius: 5px;
  background: #f0f7fd;
}

.student-list-panel {
  position: relative;
  padding: 0;
  overflow: visible;
}

.student-list-summary {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--student-border);
  color: #617489;
  font-size: 12px;
}

.student-list-summary strong {
  color: var(--student-ink);
  font-size: 15px;
}

.student-list-panel .data-table-shell {
  border: 0;
  border-radius: 0;
}

.student-list-table {
  min-width: 1050px;
  table-layout: fixed;
}

.student-list-table-transfers,
.student-list-table-archives {
  min-width: 1220px;
}

.student-list-table th,
.student-list-table td {
  height: 43px;
  padding: 8px 10px;
  font-size: 13px;
  vertical-align: middle;
}

.student-list-table th {
  font-size: 12px;
}

.student-list-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.student-list-table td:last-child {
  overflow: visible;
}

.student-action-menu {
  position: relative;
  display: inline-block;
}

.student-action-menu summary {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid #cbdceb;
  border-radius: 6px;
  color: #36556f;
  cursor: pointer;
  list-style: none;
  font-weight: 800;
}

.student-action-menu summary::-webkit-details-marker {
  display: none;
}

.student-action-menu > div {
  position: absolute;
  z-index: 30;
  top: calc(100% + 4px);
  right: 0;
  display: grid;
  width: 205px;
  padding: 5px;
  border: 1px solid #cdddeb;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(10, 37, 64, .15);
}

.student-list-table tbody tr:nth-last-child(-n + 3) .student-action-menu > div {
  top: auto;
  bottom: calc(100% + 4px);
}

.student-action-menu button {
  min-height: 32px;
  padding: 6px 9px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--student-ink);
  text-align: left;
  font-size: 12px;
}

.student-action-menu button:hover {
  background: #eef7fe;
  color: var(--student-blue-dark);
}

.student-confirm-modal,
.enrolment-modal {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: grid;
  padding: 18px;
  place-items: center;
}

.student-confirm-backdrop,
.enrolment-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(8, 29, 48, .48);
}

.student-confirm-modal > section,
.enrolment-modal > section {
  position: relative;
  width: min(100%, 560px);
  max-height: calc(100vh - 36px);
  overflow: auto;
  border: 1px solid var(--student-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(8, 29, 48, .24);
}

.student-confirm-modal header,
.enrolment-modal header {
  display: flex;
  gap: 13px;
  padding: 20px;
}

.student-confirm-modal header > span,
.enrolment-modal header > span {
  display: grid;
  flex: 0 0 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: #eaf5fe;
  color: var(--student-blue);
}

.student-confirm-modal h2,
.enrolment-modal h2 {
  margin: 0 0 5px;
  color: var(--student-ink);
  font-size: 19px;
}

.student-confirm-modal p,
.enrolment-modal p {
  margin: 0;
  color: #62768a;
  font-size: 13px;
  line-height: 1.5;
}

.student-confirm-modal footer,
.enrolment-modal footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding: 14px 20px;
  border-top: 1px solid #e5edf4;
  background: #f9fbfd;
}

.enrolment-page .enrolment-form {
  margin: 0;
}

.enrolment-page .form-fields label > span {
  display: block;
  margin-bottom: 6px;
}

.enrolment-page .field-invalid input,
.enrolment-page .field-invalid select {
  border-color: #dc3545;
  box-shadow: 0 0 0 2px rgba(220, 53, 69, .08);
}

.field-error {
  display: block;
  margin-top: 5px;
  color: #c62838;
  font-size: 11px;
  font-weight: 600;
}

.enrolment-success-card dl,
.receipt-success-body dl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0 20px 20px;
  border: 1px solid #dbe8f2;
  border-radius: 7px;
  overflow: hidden;
}

.enrolment-success-card dl div,
.receipt-success-body dl div {
  display: grid;
  gap: 3px;
  padding: 11px 13px;
  border-bottom: 1px solid #e6eef5;
}

.enrolment-success-card dt,
.receipt-success-body dt {
  color: #6a7e91;
  font-size: 11px;
}

.enrolment-success-card dd,
.receipt-success-body dd {
  margin: 0;
  color: var(--student-ink);
  font-size: 13px;
  font-weight: 700;
}

.receipt-success-actions {
  justify-content: flex-start !important;
}

.receipt-success-actions button {
  min-height: 38px;
  padding: 0 11px;
  font-size: 12px;
}

@media (max-width: 1366px) {
  .student-filter-row {
    grid-template-columns: minmax(240px, 2fr) repeat(2, minmax(150px, 1fr));
  }

  .student-filter-row > button {
    width: 100%;
  }

  .student-advanced-filters {
    grid-template-columns: repeat(4, minmax(145px, 1fr));
  }
}

@media (max-width: 1024px) {
  .students-list-page .page-heading,
  .enrolment-page .page-heading {
    align-items: flex-start;
  }

  .students-list-page .heading-actions,
  .enrolment-page .heading-actions {
    justify-content: flex-start;
  }

  .student-advanced-filters {
    grid-template-columns: repeat(3, minmax(145px, 1fr));
  }
}

@media (max-width: 768px) {
  .student-filter-row,
  .student-advanced-filters {
    grid-template-columns: 1fr 1fr;
  }

  .student-list-search {
    grid-column: 1 / -1;
  }

  .students-list-page .heading-actions,
  .enrolment-page .heading-actions {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr 1fr;
  }

  .students-list-page .heading-actions button,
  .enrolment-page .heading-actions button {
    width: 100%;
    justify-content: center;
  }

  .enrolment-page .heading-actions .primary-action {
    grid-column: 1 / -1;
  }
}

@media (max-width: 480px) {
  .student-filter-row,
  .student-advanced-filters,
  .students-list-page .heading-actions,
  .enrolment-page .heading-actions,
  .enrolment-success-card dl,
  .receipt-success-body dl {
    grid-template-columns: 1fr;
  }

  .student-list-search,
  .enrolment-page .heading-actions .primary-action {
    grid-column: auto;
  }

  .student-filter-panel {
    padding: 10px;
  }

  .student-confirm-modal,
  .enrolment-modal {
    padding: 10px;
  }

  .student-confirm-modal footer,
  .enrolment-modal footer {
    display: grid;
    grid-template-columns: 1fr;
  }

  .student-confirm-modal footer button,
  .enrolment-modal footer button {
    width: 100%;
  }
}
