/* Final stable overrides for profile strips, student profiles, and CR80 ID cards. */
.public-school-page a.leader-profile,
.public-school-page a.leader-profile:visited,
.public-school-page a.leader-profile:hover,
.public-school-page a.leader-profile:focus,
.public-school-page .school-staff-section a,
.public-school-page .school-staff-section a:visited,
.public-school-page .school-staff-section a:hover,
.public-school-page .school-staff-section a:focus,
.public-school-page a.staff-profile-card,
.public-school-page a.staff-profile-card:visited,
.public-school-page a.staff-profile-card:hover,
.public-school-page a.staff-profile-card:focus {
  text-decoration: none !important;
}

/* Stable money rendering: loaded last so older responsive overrides cannot split decimals. */
.fee-balance-preview strong,
.fee-summary-box strong,
.fee-period-grid strong,
.fee-payment-success-amount strong,
.fee-payment-success-list dd,
.student-profile-balance strong,
.student-readonly-profile .student-profile-balance strong,
.student-fee-breakup dd,
.student-readonly-profile .student-fee-breakup dd,
.student-fee-summary strong,
.student-readonly-profile .student-fee-summary strong {
  line-height: 1.15;
  overflow-wrap: normal !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
}

.fee-balance-preview strong,
.fee-period-grid strong,
.student-fee-breakup dd,
.student-readonly-profile .student-fee-breakup dd {
  font-size: clamp(0.88rem, 1.35vw, 1.05rem);
}

.fee-summary-box strong,
.student-profile-balance strong,
.student-readonly-profile .student-profile-balance strong,
.student-fee-summary strong,
.student-readonly-profile .student-fee-summary strong {
  font-size: clamp(1rem, 1.6vw, 1.45rem);
}

.table td.text-success,
.table td.text-danger,
.table td.text-right.font-weight-bold,
.student-fee-table td,
.student-fee-table th {
  overflow-wrap: normal !important;
  white-space: nowrap !important;
  word-break: keep-all !important;
}

.public-school-page .leader-profile {
  transition: background-color 180ms ease, box-shadow 180ms ease, color 180ms ease, transform 180ms ease !important;
}

.public-school-page .leader-profile:hover,
.public-school-page .leader-profile:focus {
  background: #fffaf0 !important;
  box-shadow: 0 12px 24px rgba(25, 57, 67, .12) !important;
  color: #176b68 !important;
  transform: translateY(-4px) !important;
}

.public-school-page .school-staff-section {
  overflow: hidden !important;
}

.public-school-page .school-staff-marquee {
  margin-top: 24px !important;
  overflow: hidden !important;
  padding: 14px 0 28px !important;
}

.public-school-page .school-staff-track {
  align-items: stretch !important;
  animation: staff-scroll 42s linear infinite !important;
  display: flex !important;
  flex-direction: row !important;
  flex-wrap: nowrap !important;
  gap: 18px !important;
  width: max-content !important;
  will-change: transform !important;
}

.public-school-page .school-staff-marquee:hover .school-staff-track,
.public-school-page .school-staff-marquee:focus-within .school-staff-track {
  animation-play-state: paused !important;
}

.public-school-page .staff-profile-card {
  align-items: center !important;
  background: #fff !important;
  border: 1px solid #dce5e8 !important;
  border-radius: 8px !important;
  box-shadow: 0 10px 24px rgba(25, 57, 67, .08) !important;
  color: #243b45 !important;
  display: flex !important;
  flex: 0 0 clamp(190px, 17vw, 225px) !important;
  flex-direction: column !important;
  min-height: 292px !important;
  overflow: hidden !important;
  padding: 10px 10px 14px !important;
  position: relative !important;
  text-align: center !important;
  transition: border-color 180ms ease, box-shadow 180ms ease, color 180ms ease, transform 180ms ease !important;
  white-space: normal !important;
}

.public-school-page .staff-profile-card:hover,
.public-school-page .staff-profile-card:focus {
  border-color: #19706e !important;
  box-shadow: 0 18px 36px rgba(25, 57, 67, .18) !important;
  color: #176b68 !important;
  transform: translateY(-10px) scale(1.04) !important;
  z-index: 5 !important;
}

.public-school-page .staff-profile-card img,
.public-school-page .staff-profile-fallback {
  border: 1px solid #dbe3e6 !important;
  border-radius: 8px !important;
  flex: 0 0 145px !important;
  height: 145px !important;
  object-fit: cover !important;
  object-position: top center !important;
  width: 100% !important;
}

.public-school-page .staff-profile-fallback {
  align-items: center !important;
  background: #e6f4f2 !important;
  color: #19706e !important;
  display: flex !important;
  font-size: 2rem !important;
  justify-content: center !important;
}

.public-school-page .staff-profile-card > div {
  align-items: center !important;
  display: flex !important;
  flex: 1 !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  padding: 12px 5px 0 !important;
}

.public-school-page .staff-profile-card small {
  color: #19706e !important;
  display: block !important;
  font-weight: 700 !important;
  text-transform: uppercase !important;
}

.public-school-page .staff-profile-card h3 {
  color: #223840 !important;
  font-size: 1.05rem !important;
  font-weight: 650 !important;
  margin: 4px 0 6px !important;
}

.public-school-page .staff-profile-card p {
  color: #64757c !important;
  font-size: .9rem !important;
  line-height: 1.55 !important;
  margin: 0 !important;
  max-height: 82px !important;
  overflow: hidden !important;
}

.student-readonly-profile {
  display: grid !important;
  gap: 18px !important;
}

.student-readonly-profile .student-profile-showcase {
  background: linear-gradient(180deg, #fff, #f5fafb) !important;
  border: 1px solid #dbe5e8 !important;
  border-radius: 8px !important;
  box-shadow: 0 18px 42px rgba(18, 43, 53, .12) !important;
  overflow: hidden !important;
}

.student-readonly-profile .student-profile-hero {
  align-items: center !important;
  background: radial-gradient(circle at 92% 10%, rgba(244, 201, 93, .22), transparent 28%), linear-gradient(135deg, #173642, #176b68) !important;
  color: #fff !important;
  display: flex !important;
  gap: 18px !important;
  justify-content: space-between !important;
  min-height: 174px !important;
  padding: 24px !important;
}

.student-readonly-profile .student-readonly-header {
  align-items: center !important;
  display: flex !important;
  gap: 18px !important;
}

.student-readonly-profile .student-readonly-header img,
.student-readonly-profile .student-readonly-header > span {
  align-items: center !important;
  background: #eaf5f3 !important;
  border: 3px solid rgba(255, 255, 255, .72) !important;
  border-radius: 8px !important;
  box-shadow: 0 14px 26px rgba(0, 0, 0, .18) !important;
  color: #176b68 !important;
  display: flex !important;
  flex: 0 0 106px !important;
  font-size: 2rem !important;
  height: 132px !important;
  justify-content: center !important;
  object-fit: cover !important;
  object-position: top center !important;
  width: 106px !important;
}

.student-readonly-profile .student-readonly-header .student-admission-number,
.student-readonly-profile .student-readonly-header div > span:first-child {
  color: #f4c95d !important;
  display: block !important;
  font-weight: 800 !important;
  letter-spacing: .05em !important;
  text-transform: uppercase !important;
}

.student-readonly-profile .student-readonly-header div > span:first-child {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  display: inline-block !important;
  height: auto !important;
  line-height: 1.1 !important;
  min-width: 0 !important;
  white-space: nowrap !important;
  width: auto !important;
  word-break: normal !important;
}

.student-readonly-profile .student-readonly-header h2 {
  color: #fff !important;
  font-size: clamp(1.5rem, 2.5vw, 2.2rem) !important;
  font-weight: 800 !important;
  margin: 3px 0 5px !important;
}

.student-readonly-profile .student-readonly-header p {
  color: #d8e9ec !important;
  font-size: 1rem !important;
  margin: 0 !important;
}

.student-readonly-profile .student-profile-balance {
  background: rgba(255, 255, 255, .13) !important;
  border: 1px solid rgba(255, 255, 255, .32) !important;
  border-radius: 8px !important;
  min-width: 240px !important;
  padding: 16px !important;
  text-align: right !important;
}

.student-readonly-profile .student-profile-balance span {
  color: #d8e9ec !important;
  display: block !important;
  font-size: .78rem !important;
  text-transform: uppercase !important;
}

.student-readonly-profile .student-profile-balance strong {
  color: #fff !important;
  display: block !important;
  font-size: 1.55rem !important;
}

.dropout-lookup-form {
  align-items: end !important;
  display: grid !important;
  gap: 14px !important;
  grid-template-columns: minmax(170px, .8fr) minmax(170px, .8fr) minmax(260px, 2fr) auto !important;
}

.dropout-profile .dropout-hero {
  background: radial-gradient(circle at 92% 10%, rgba(244, 201, 93, .2), transparent 28%), linear-gradient(135deg, #3f2424, #176b68) !important;
}

.dropout-reason-band {
  background: #fff7e0 !important;
  border-bottom: 1px solid #ead8a8 !important;
  color: #473710 !important;
  padding: 12px 18px !important;
}

.dropout-reason-band span {
  color: #6b5b28 !important;
  display: inline-block !important;
  margin-left: 12px !important;
}

.dropout-reason-band p {
  margin: 6px 0 0 !important;
}

.student-profile-actions {
  align-items: center !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

.student-readonly-profile .student-profile-panels {
  display: grid !important;
  gap: 18px !important;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .85fr) !important;
  padding: 18px !important;
}

.student-readonly-profile .student-profile-panels article {
  background: #f8fbfc !important;
  border: 1px solid #e0e8eb !important;
  border-radius: 7px !important;
  padding: 16px !important;
}

.student-readonly-profile .student-readonly-grid {
  display: grid !important;
  gap: 12px !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  margin: 0 !important;
}

.student-readonly-profile .student-readonly-grid > div,
.student-readonly-profile .student-fee-breakup > div,
.student-readonly-profile .student-fee-summary > div {
  border-radius: 7px !important;
}

.student-readonly-profile .student-readonly-grid .span-2 {
  grid-column: 1 / -1 !important;
}

.student-readonly-profile .student-fee-summary {
  display: grid !important;
  gap: 12px !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
}

.id-card-module .id-card-batch {
  align-items: flex-start !important;
  display: grid !important;
  gap: 3mm !important;
  grid-template-columns: repeat(2, 86mm) !important;
  justify-content: center !important;
  overflow-x: auto !important;
  padding: 18px 0 !important;
}

.id-card-module .student-id-card {
  background: #fff !important;
  border: 0 !important;
  border-radius: 3mm !important;
  box-shadow: 0 16px 36px rgba(10, 32, 40, .18) !important;
  box-sizing: border-box !important;
  color: #1f333b !important;
  display: grid !important;
  grid-template-rows: 13mm 1fr 8mm !important;
  min-height: 0 !important;
  overflow: hidden !important;
  position: relative !important;
}

.id-card-module .student-id-card.cr80,
.id-card-module .student-id-card.landscape {
  height: 54mm !important;
  max-height: 54mm !important;
  max-width: 86mm !important;
  min-height: 54mm !important;
  min-width: 86mm !important;
  width: 86mm !important;
}

.id-card-module .student-id-card header {
  background: #66828b !important;
  color: #fff !important;
  display: grid !important;
  min-height: 0 !important;
  padding: 3mm 5mm !important;
  position: relative !important;
  text-align: left !important;
  z-index: 2 !important;
}

.id-card-module .student-id-card header strong {
  font-size: 4.2mm !important;
  line-height: 1.05 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

.id-card-module .student-id-card header span {
  font-size: 2.15mm !important;
  line-height: 1.15 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.id-card-module .student-id-card main {
  display: grid !important;
  gap: 3.5mm !important;
  grid-template-columns: 21mm 1fr !important;
  min-height: 0 !important;
  padding: 3mm 5mm 1.5mm !important;
  position: relative !important;
  z-index: 1 !important;
}

.id-card-module .student-id-card main::after {
  background: rgba(126, 207, 230, .34) !important;
  border-radius: 50% !important;
  bottom: -28mm !important;
  content: "" !important;
  height: 70mm !important;
  position: absolute !important;
  right: -20mm !important;
  width: 72mm !important;
  z-index: -1 !important;
}

.id-card-module .student-id-photo {
  align-items: center !important;
  background: #eef6f5 !important;
  border: 1px solid #66828b !important;
  border-radius: 3px !important;
  display: flex !important;
  height: 27mm !important;
  justify-content: center !important;
  overflow: hidden !important;
  width: 21mm !important;
}

.id-card-module .student-id-photo img {
  height: 100% !important;
  object-fit: cover !important;
  object-position: top center !important;
  width: 100% !important;
}

.id-card-module .student-id-details h2 {
  color: #111 !important;
  font-size: 4mm !important;
  font-weight: 800 !important;
  line-height: 1.08 !important;
  margin: 0 0 2mm !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.id-card-module .student-id-details dl {
  display: grid !important;
  gap: .7mm 2mm !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  margin: 0 !important;
}

.id-card-module .student-id-details dt {
  color: #60727a !important;
  font-size: 1.75mm !important;
  line-height: 1 !important;
  text-transform: uppercase !important;
}

.id-card-module .student-id-details dd {
  font-size: 2.25mm !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
  margin: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.id-card-module .student-id-details .wide {
  grid-column: 1 / -1 !important;
}

.id-card-module .student-id-card footer {
  align-items: center !important;
  border-top: 1px solid #d8e3e7 !important;
  display: flex !important;
  font-size: 2.2mm !important;
  justify-content: space-between !important;
  padding: 1.5mm 5mm !important;
  position: relative !important;
  z-index: 1 !important;
}

@media (max-width: 767.98px) {
  .public-school-page .staff-profile-card {
    flex-basis: min(76vw, 255px) !important;
  }

  .public-school-page .staff-profile-card img,
  .public-school-page .staff-profile-fallback {
    height: 138px !important;
  }

  .student-readonly-profile .student-profile-hero {
    align-items: flex-start !important;
    flex-direction: column !important;
  }

  .student-readonly-profile .student-profile-balance {
    text-align: left !important;
    width: 100% !important;
  }

  .student-readonly-profile .student-readonly-grid,
  .student-readonly-profile .student-fee-summary,
  .student-readonly-profile .student-profile-panels {
    grid-template-columns: 1fr !important;
  }

  .dropout-lookup-form {
    grid-template-columns: 1fr !important;
  }
}

@media print {
  .id-card-module .id-card-batch {
    display: grid !important;
    gap: 3mm !important;
    grid-auto-rows: 54mm !important;
    grid-template-columns: repeat(2, 86mm) !important;
    justify-content: start !important;
    overflow: visible !important;
    padding: 0 !important;
  }

  .id-card-module .student-id-card {
    box-shadow: none !important;
    page-break-inside: avoid !important;
  }
}

/* Codex stable interaction fixes: mobile public menu, user action dropdowns, fixed sidebar media, and gallery layout. */
@media (max-width: 991.98px) {
  .public-school-page .public-school-nav {
    align-items: center !important;
    display: flex !important;
    flex-wrap: wrap !important;
    width: 100% !important;
  }

  .public-school-page .public-school-nav .navbar-toggler {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    margin-left: auto !important;
    order: 2 !important;
  }

  .public-school-page .public-school-nav .navbar-collapse {
    flex: 0 0 100% !important;
    order: 4 !important;
    width: 100% !important;
  }

  .public-school-page .public-school-nav .navbar-collapse.show {
    background: #fff !important;
    border-top: 1px solid #dfe7ea !important;
    display: block !important;
    margin-top: 12px !important;
    padding: 8px 0 !important;
  }

  .public-school-page .public-school-nav .navbar-collapse.show .navbar-nav {
    align-items: stretch !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 2px !important;
    width: 100% !important;
  }

  .public-school-page .public-school-nav .navbar-collapse.show .nav-link {
    border-radius: 6px !important;
    display: block !important;
    padding: 10px 12px !important;
    width: 100% !important;
  }
}

.school-home-sidebar-card {
  grid-template-columns: 76px minmax(0, 1fr) !important;
}

.school-home-sidebar-card img,
.dynamic-sidebar-photo img,
.dynamic-sidebar-photo span {
  aspect-ratio: 4 / 5 !important;
  height: 96px !important;
  max-height: 96px !important;
  min-height: 96px !important;
  object-fit: cover !important;
  object-position: center !important;
  width: 76px !important;
}

.dynamic-sidebar-photo img,
.dynamic-sidebar-photo span {
  height: 145px !important;
  max-height: 145px !important;
  min-height: 145px !important;
  width: 116px !important;
}

.user-actions-dropdown {
  position: relative !important;
}

.user-actions-dropdown .dropdown-menu.show {
  display: block !important;
  inset: auto 0 auto auto !important;
  position: absolute !important;
  transform: none !important;
  z-index: 2050 !important;
}

.gallery-filter-form {
  align-items: center;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.gallery-filter-form select {
  max-width: 260px;
}

.gallery-grid {
  display: grid;
  gap: 18px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}

.gallery-card {
  background: #fff;
  border: 1px solid #dfe7ea;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(18, 43, 53, .08);
  overflow: hidden;
}

.gallery-a4-frame {
  align-items: center;
  aspect-ratio: 210 / 297;
  background: #f4f7f8;
  display: flex;
  justify-content: center;
  overflow: hidden;
  width: 100%;
}

.gallery-a4-frame img {
  height: 100%;
  object-fit: cover;
  object-position: top center;
  width: 100%;
}

.gallery-card-missing .gallery-a4-frame {
  background: repeating-linear-gradient(45deg, #f4f7f8, #f4f7f8 10px, #e9eef0 10px, #e9eef0 20px);
}

.gallery-card-body {
  padding: 12px;
}

.gallery-card-body h3 {
  color: #213943;
  font-size: 1rem;
  font-weight: 700;
  margin: 8px 0 4px;
}

.gallery-card-body p {
  color: #62757d;
  margin: 0;
}

@media (max-width: 767.98px) {
  .gallery-filter-form {
    align-items: stretch;
    flex-direction: column;
    justify-content: flex-start;
  }

  .gallery-filter-form select {
    max-width: none;
  }
}

/* Codex gallery/user/settings sizing polish: fixed image grids, stable dropdowns, and passport previews. */
.gallery-module .gallery-scroll-shell {
  max-height: calc(100vh - 230px);
  min-height: 320px;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 2px 8px 12px 2px;
}

.gallery-module .gallery-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

.gallery-module .gallery-card {
  color: inherit !important;
  display: block !important;
  min-width: 0 !important;
  overflow: hidden !important;
  text-decoration: none !important;
  transition: box-shadow 180ms ease, transform 180ms ease !important;
}

.gallery-module .gallery-card:hover,
.gallery-module .gallery-card:focus-visible {
  box-shadow: 0 16px 34px rgba(18, 43, 53, .16) !important;
  outline: none !important;
  transform: translateY(-4px) !important;
}

.gallery-module .gallery-card-link {
  cursor: pointer;
}

.gallery-module .gallery-a4-frame {
  aspect-ratio: 210 / 297 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

.gallery-module .gallery-a4-frame img {
  transform: translateZ(0);
  transition: transform 180ms ease !important;
}

.gallery-module .gallery-card:hover .gallery-a4-frame img,
.gallery-module .gallery-card:focus-visible .gallery-a4-frame img {
  transform: scale(1.035) !important;
}

.gallery-module .gallery-card-body h3,
.gallery-module .gallery-card-body p {
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-list-card,
.user-list-card .user-list-body {
  overflow: visible !important;
}

.user-list-card .user-list-table {
  table-layout: fixed;
  width: 100%;
}

.user-list-card .user-list-table th,
.user-list-card .user-list-table td {
  max-width: 0;
  overflow-wrap: anywhere;
  vertical-align: top;
  white-space: normal !important;
}

.user-list-card .user-list-table th:nth-child(1) {
  width: 28%;
}

.user-list-card .user-list-table th:nth-child(2) {
  width: 25%;
}

.user-list-card .user-list-table th:nth-child(3) {
  width: 12%;
}

.user-list-card .user-list-table th:nth-child(4) {
  width: 18%;
}

.user-list-card .user-list-table th:nth-child(5) {
  width: 17%;
}

.user-actions-dropdown {
  display: inline-block;
}

.user-actions-dropdown .dropdown-menu.show {
  display: block !important;
  inset: auto 0 auto auto !important;
  left: auto !important;
  max-height: min(70vh, 360px);
  min-width: 260px;
  overflow-x: hidden;
  overflow-y: auto;
  position: absolute !important;
  right: 0 !important;
  top: 100% !important;
  transform: none !important;
  z-index: 2060 !important;
}

.user-actions-dropdown.dropup .dropdown-menu.show {
  bottom: 100% !important;
  top: auto !important;
}

.public-info-hero {
  height: clamp(280px, 36vw, 420px) !important;
  min-height: 0 !important;
}

.public-info-hero img {
  height: 100% !important;
  max-height: none !important;
  object-fit: cover !important;
  object-position: center !important;
  width: 100% !important;
}

.public-info-sidebar .school-home-sidebar-list {
  max-height: 560px;
  overflow-x: hidden;
  overflow-y: auto;
  padding-right: 4px;
}

.public-info-sidebar .school-home-sidebar-card {
  grid-template-columns: 76px minmax(0, 1fr) !important;
  overflow: hidden;
}

.public-info-sidebar .school-home-sidebar-card img {
  aspect-ratio: 19 / 24;
  height: 96px !important;
  max-height: 96px !important;
  max-width: 76px !important;
  object-fit: cover !important;
  object-position: top center !important;
  width: 76px !important;
}

.dynamic-profile-editor {
  grid-template-columns: 116px minmax(0, 1fr) !important;
}

.dynamic-profile-photo img,
.dynamic-profile-photo span {
  aspect-ratio: 4 / 5 !important;
  height: 145px !important;
  max-height: 145px !important;
  max-width: 116px !important;
  min-height: 145px !important;
  min-width: 116px !important;
  object-fit: cover !important;
  object-position: top center !important;
  width: 116px !important;
}

.dynamic-page-photo img,
.dynamic-page-photo span,
.dynamic-sidebar-photo img,
.dynamic-sidebar-photo span {
  height: 145px !important;
  max-height: 145px !important;
  max-width: 116px !important;
  min-height: 145px !important;
  object-fit: cover !important;
  object-position: center !important;
  width: 116px !important;
}

@media (max-width: 1199.98px) {
  .gallery-module .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 991.98px) {
  .gallery-module .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  .user-list-card .user-list-body {
    padding: 0 10px 10px !important;
  }

  .user-list-card .user-list-table,
  .user-list-card .user-list-table thead,
  .user-list-card .user-list-table tbody,
  .user-list-card .user-list-table th,
  .user-list-card .user-list-table td,
  .user-list-card .user-list-table tr {
    display: block;
    width: 100%;
  }

  .user-list-card .user-list-table thead {
    display: none;
  }

  .user-list-card .user-list-table tr {
    border-bottom: 1px solid #e6edf0;
    padding: 12px 0;
  }

  .user-list-card .user-list-table td {
    border: 0;
    max-width: none;
    padding: 5px 0;
    text-align: left !important;
  }

  .user-actions-dropdown .dropdown-menu.show {
    left: 0 !important;
    max-width: calc(100vw - 48px);
    right: auto !important;
  }
}

@media (max-width: 767.98px) {
  .gallery-module .gallery-scroll-shell {
    max-height: none;
    overflow: visible;
    padding-right: 0;
  }

  .gallery-module .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .public-info-hero {
    height: 300px !important;
  }

  .dynamic-profile-editor,
  .dynamic-page-editor,
  .dynamic-sidebar-editor {
    grid-template-columns: 116px minmax(0, 1fr) !important;
  }
}

@media (max-width: 479.98px) {
  .gallery-module .gallery-grid {
    grid-template-columns: 1fr !important;
  }

  .dynamic-profile-editor,
  .dynamic-page-editor,
  .dynamic-sidebar-editor,
  .public-info-sidebar .school-home-sidebar-card {
    grid-template-columns: 1fr !important;
  }
}

/* Codex gallery v2 and user actions: title, category pills, fixed grid thumbnails, and upward permission menus. */
.gallery-page-heading {
  align-items: center !important;
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
  padding: 8px 0 6px !important;
  text-align: center !important;
}

.gallery-page-heading h1 {
  color: #173642 !important;
  font-size: clamp(1.8rem, 3vw, 2.5rem) !important;
  font-weight: 800 !important;
  margin: 0 !important;
}

.gallery-filter-form {
  align-items: center !important;
  flex-direction: column !important;
  justify-content: center !important;
  width: 100% !important;
}

.gallery-filter-select {
  max-width: 260px !important;
}

.gallery-filter-pills {
  align-items: center !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
  justify-content: center !important;
}

.gallery-filter-pill {
  border: 1px solid #17a2b8 !important;
  border-radius: 999px !important;
  color: #147183 !important;
  font-size: .82rem !important;
  font-weight: 700 !important;
  line-height: 1 !important;
  min-width: 82px !important;
  padding: 8px 14px !important;
  text-align: center !important;
  text-decoration: none !important;
}

.gallery-filter-pill:hover,
.gallery-filter-pill:focus-visible,
.gallery-filter-pill.active {
  background: #17a2b8 !important;
  color: #fff !important;
  text-decoration: none !important;
}

.gallery-module .gallery-scroll-shell {
  max-height: calc(100vh - 250px) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

.gallery-module .gallery-grid {
  display: grid !important;
  gap: 14px !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

.gallery-module .gallery-card {
  display: block !important;
  overflow: hidden !important;
  text-decoration: none !important;
}

.gallery-module .gallery-a4-frame {
  aspect-ratio: 4 / 3 !important;
  min-height: 0 !important;
}

.user-actions-dropdown .dropdown-menu.show {
  bottom: 100% !important;
  left: auto !important;
  max-height: min(72vh, 390px) !important;
  min-width: 280px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  right: 0 !important;
  top: auto !important;
  transform: none !important;
}

.user-permission-form {
  padding: 0 16px 10px !important;
}

.user-permission-checklist {
  display: grid !important;
  gap: 6px !important;
  max-height: 210px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

.user-permission-checklist .custom-control-label {
  color: #213943 !important;
  cursor: pointer !important;
  font-weight: 600 !important;
  opacity: 1 !important;
}

@media (max-width: 1199.98px) {
  .gallery-module .gallery-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 991.98px) {
  .gallery-module .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 767.98px) {
  .gallery-module .gallery-scroll-shell {
    max-height: none !important;
    overflow: visible !important;
    padding-right: 0 !important;
  }

  .gallery-module .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 479.98px) {
  .gallery-module .gallery-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Final-final ID card color print overrides. Keep at EOF so duplicated legacy blocks cannot override it. */
.id-card-module,
.id-card-module * {
  print-color-adjust: exact !important;
  -webkit-print-color-adjust: exact !important;
}

.id-card-module .id-card-filter-form .form-control[type="color"] {
  height: 38px !important;
  min-width: 64px !important;
  padding: 3px !important;
}

.id-card-module .id-card-style-tools {
  min-width: 120px !important;
}

.id-card-module .student-id-card {
  background: var(--id-bg, #fff) !important;
  color: var(--id-text, #1f333b) !important;
  font-family: var(--id-font, Arial), sans-serif !important;
}

.id-card-module .student-id-card header {
  background: var(--id-header, #66828b) !important;
  color: #fff !important;
}

.id-card-module .student-id-card main::after {
  background: color-mix(in srgb, var(--id-accent, #7ecfe6) 42%, transparent) !important;
}

.id-card-module .student-id-photo {
  background: color-mix(in srgb, var(--id-accent, #7ecfe6) 18%, #fff) !important;
  border-color: var(--id-header, #66828b) !important;
}

.id-card-module .student-id-details h2,
.id-card-module .student-id-details dd {
  color: var(--id-text, #1f333b) !important;
  font-style: var(--id-style, normal) !important;
  font-weight: var(--id-weight, 700) !important;
}

.id-card-module .student-id-details dt {
  color: color-mix(in srgb, var(--id-text, #1f333b) 68%, #fff) !important;
}

.id-card-module .student-id-card footer {
  border-top-color: color-mix(in srgb, var(--id-header, #66828b) 28%, #fff) !important;
  color: var(--id-text, #1f333b) !important;
}

@media print {
  body {
    print-color-adjust: exact !important;
    -webkit-print-color-adjust: exact !important;
  }

  .id-card-module {
    background: #fff !important;
  }

  .id-card-module .student-id-card {
    box-shadow: none !important;
    outline: .15mm solid color-mix(in srgb, var(--id-header, #66828b) 35%, #fff) !important;
  }
}

/* Final fee dashboard visibility guard. Keep at EOF so fee tiles never render as white-on-white. */
.fee-summary-box {
  color: #fff !important;
  opacity: 1 !important;
}

.fee-summary-box span,
.fee-summary-box strong {
  color: #fff !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

.fee-summary-box > i {
  color: rgba(255, 255, 255, 0.18) !important;
  opacity: 1 !important;
}

.fee-summary-box.fee-summary-total,
.fee-summary-grid .fee-summary-total { background: #2878a0 !important; background-color: #2878a0 !important; }
.fee-summary-box.fee-summary-paid,
.fee-summary-grid .fee-summary-paid { background: #1f8a70 !important; background-color: #1f8a70 !important; }
.fee-summary-box.fee-summary-due,
.fee-summary-grid .fee-summary-due { background: #c84f32 !important; background-color: #c84f32 !important; }
.fee-summary-box.fee-summary-additional,
.fee-summary-grid .fee-summary-additional { background: #6f5b95 !important; background-color: #6f5b95 !important; }
.fee-summary-box.fee-summary-all,
.fee-summary-grid .fee-summary-all { background: #34495e !important; background-color: #34495e !important; }
.fee-summary-box.fee-summary-hostel,
.fee-summary-grid .fee-summary-hostel { background: #5f8f3d !important; background-color: #5f8f3d !important; }
.fee-summary-box.fee-summary-transport,
.fee-summary-grid .fee-summary-transport { background: #0f766e !important; background-color: #0f766e !important; }
.fee-summary-box.fee-summary-supplementary,
.fee-summary-grid .fee-summary-supplementary { background: #2f64c9 !important; background-color: #2f64c9 !important; }
.fee-summary-box.fee-summary-books,
.fee-summary-grid .fee-summary-books { background: #6d5b92 !important; background-color: #6d5b92 !important; }
.fee-summary-box.fee-summary-exam,
.fee-summary-grid .fee-summary-exam { background: #b45f06 !important; background-color: #b45f06 !important; }
.fee-summary-box.fee-summary-uniform,
.fee-summary-grid .fee-summary-uniform { background: #8a5a44 !important; background-color: #8a5a44 !important; }

/* Stable fallback for Portal Users action menus even when an old site.js is cached. */
.user-actions-dropdown:focus-within > .dropdown-menu,
.user-actions-dropdown:hover > .dropdown-menu {
  bottom: 100% !important;
  display: block !important;
  left: auto !important;
  max-height: min(72vh, 390px) !important;
  min-width: 280px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  position: absolute !important;
  right: 0 !important;
  top: auto !important;
  transform: none !important;
  z-index: 2060 !important;
}

/* Sidebar label recovery: if AdminLTE leaves the menu in mini mode while wide, show labels. */
.portal-layout.sidebar-expanded-labels .main-sidebar .nav-sidebar > .nav-item > .nav-link,
.portal-layout.sidebar-expanded-labels .main-sidebar .nav-sidebar .nav-treeview > .nav-item > .nav-link {
  align-items: center !important;
  display: flex !important;
  gap: .45rem !important;
  min-width: 0 !important;
}

.portal-layout.sidebar-expanded-labels .main-sidebar .nav-sidebar .nav-icon {
  flex: 0 0 1.65rem !important;
  margin-left: 0 !important;
  margin-right: .25rem !important;
  text-align: center !important;
  width: 1.65rem !important;
}

.portal-layout.sidebar-expanded-labels .main-sidebar .nav-sidebar .nav-link p,
.portal-layout.sidebar-expanded-labels .main-sidebar .nav-sidebar .nav-link .right {
  display: inline-block !important;
  opacity: 1 !important;
  overflow: hidden !important;
  text-indent: 0 !important;
  visibility: visible !important;
  white-space: normal !important;
  width: auto !important;
}

.portal-layout.sidebar-expanded-labels .main-sidebar .nav-sidebar .nav-link p {
  flex: 1 1 auto !important;
  margin: 0 !important;
  min-width: 0 !important;
  text-overflow: ellipsis !important;
}

/* Portal responsive stability guard: prevent overlap/hidden text at narrow and wide sizes. */
html,
body,
.portal-layout,
.portal-layout .wrapper,
.portal-layout .content-wrapper {
  max-width: 100% !important;
  overflow-x: hidden !important;
}

.portal-layout .content,
.portal-layout .container,
.portal-layout .container-fluid,
.portal-layout .row,
.portal-layout .row > [class*="col-"],
.portal-layout .card,
.portal-layout .card-body,
.portal-layout .small-box,
.portal-layout .info-box,
.portal-layout .callout,
.portal-layout .form-group,
.portal-layout .input-group {
  min-width: 0 !important;
}

.portal-layout .card,
.portal-layout .small-box,
.portal-layout .info-box,
.portal-layout .callout {
  overflow: hidden !important;
}

.portal-layout .card-title,
.portal-layout .small-box p,
.portal-layout .small-box h3,
.portal-layout .info-box-text,
.portal-layout .info-box-number,
.portal-layout .callout,
.portal-layout label,
.portal-layout .form-control,
.portal-layout .input-group-text,
.portal-layout .dropdown-item,
.portal-layout .badge,
.portal-layout .alert,
.portal-layout td,
.portal-layout th {
  overflow-wrap: anywhere !important;
  word-break: normal !important;
}

.portal-layout .btn,
.portal-layout .btn-group,
.portal-layout .btn-group-vertical,
.portal-layout .dropdown,
.portal-layout .dropdown-menu {
  max-width: 100% !important;
}

.portal-layout .btn {
  align-items: center !important;
  display: inline-flex !important;
  justify-content: center !important;
  white-space: normal !important;
}

.portal-layout .table-responsive {
  max-width: 100% !important;
}

.portal-layout .main-header {
  min-width: 0 !important;
  overflow: hidden !important;
}

.portal-layout .main-header .navbar-nav,
.portal-layout .main-header .nav-item,
.portal-layout .main-header .nav-link,
.portal-layout .main-header .nav-user-link {
  min-width: 0 !important;
}

@media (hover: hover) {
  .portal-layout .btn,
  .portal-layout .dropdown-toggle,
  .portal-layout .nav-sidebar .nav-link {
    transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease, box-shadow .16s ease !important;
  }

  .portal-layout .btn:hover,
  .portal-layout .dropdown-toggle:hover {
    transform: translateY(-1px) !important;
  }
}

@media (max-width: 767.98px) {
  .portal-layout .content-wrapper {
    margin-left: 0 !important;
  }

  .portal-layout .content-header h1,
  .portal-layout h1 {
    line-height: 1.15 !important;
    max-width: 100% !important;
    overflow-wrap: anywhere !important;
  }

  .portal-layout .main-header .portal-header-title {
    max-width: 38vw !important;
  }

  .portal-layout .main-header .nav-user-link {
    max-width: 42vw !important;
  }

  .portal-layout .main-header .nav-user-role {
    display: none !important;
  }
}

.student-readonly-profile .student-readonly-header .student-admission-number,
.student-readonly-profile .student-readonly-header div > .student-admission-number,
.student-profile-showcase .student-readonly-header .student-admission-number {
  align-items: flex-start !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: #f4c95d !important;
  display: block !important;
  flex: 0 1 auto !important;
  font-size: clamp(1rem, 1.5vw, 1.35rem) !important;
  font-weight: 800 !important;
  height: auto !important;
  justify-content: flex-start !important;
  letter-spacing: .04em !important;
  line-height: 1.15 !important;
  margin: 0 0 6px !important;
  min-height: 0 !important;
  min-width: 0 !important;
  object-fit: initial !important;
  padding: 0 !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  width: auto !important;
  word-break: keep-all !important;
}

/* Final Student Profile guard: this file loads last, so keep the live profile stable here. */
.student-profile-search-card,
.student-profile-search-card .card-body,
.student-profile-search-card .student-lookup-form,
.student-profile-search-card .student-suggest-box {
  overflow: visible !important;
}

.student-profile-search-card {
  position: relative !important;
  z-index: 40 !important;
}

.student-profile-search-card .student-suggest-box {
  position: relative !important;
  z-index: 50 !important;
}

.student-profile-search-card .student-suggest-list {
  background: #fff !important;
  border: 1px solid #d5e0e6 !important;
  border-radius: 0 0 8px 8px !important;
  box-shadow: 0 18px 34px rgba(18, 43, 53, .18) !important;
  left: 0 !important;
  max-height: 320px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  position: absolute !important;
  right: 0 !important;
  top: calc(100% + 4px) !important;
  z-index: 4000 !important;
}

.student-profile-search-card .student-suggest-list a {
  display: block !important;
  min-width: 0 !important;
  padding: 10px 14px !important;
  white-space: normal !important;
}

body.portal-layout .student-readonly-profile .student-readonly-header,
body.portal-layout .student-profile-showcase .student-readonly-header {
  align-items: center !important;
  display: flex !important;
  flex-wrap: nowrap !important;
}

body.portal-layout .student-readonly-profile .student-readonly-header > div,
body.portal-layout .student-profile-showcase .student-readonly-header > div {
  flex: 1 1 auto !important;
  min-width: 0 !important;
}

body.portal-layout .student-readonly-profile .student-readonly-header img,
body.portal-layout .student-profile-showcase .student-readonly-header img {
  flex: 0 0 106px !important;
  height: 132px !important;
  object-fit: cover !important;
  object-position: center !important;
  width: 106px !important;
}

body.portal-layout .student-readonly-profile .student-readonly-header .student-admission-number,
body.portal-layout .student-profile-showcase .student-readonly-header .student-admission-number {
  align-items: center !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #f4c95d !important;
  display: inline-flex !important;
  flex: 0 1 auto !important;
  font-size: clamp(1rem, 1.4vw, 1.35rem) !important;
  font-weight: 800 !important;
  height: auto !important;
  letter-spacing: .04em !important;
  line-height: 1.15 !important;
  margin: 0 0 6px !important;
  max-width: 100% !important;
  min-height: 0 !important;
  min-width: 0 !important;
  overflow-wrap: normal !important;
  padding: 0 !important;
  white-space: nowrap !important;
  width: auto !important;
  word-break: keep-all !important;
}

@media (max-width: 767.98px) {
  body.portal-layout .student-readonly-profile .student-readonly-header,
  body.portal-layout .student-profile-showcase .student-readonly-header {
    align-items: flex-start !important;
  }

  body.portal-layout .student-readonly-profile .student-readonly-header img,
  body.portal-layout .student-profile-showcase .student-readonly-header img {
    flex-basis: 88px !important;
    height: 110px !important;
    width: 88px !important;
  }
}

/* Student Profile visual fix v2: avoid legacy span/image collisions and keep live lookup visible. */
body.portal-layout .student-profile-search-card .student-suggest-list {
  border-radius: 8px !important;
  max-height: min(360px, calc(100vh - 120px)) !important;
  position: fixed !important;
  z-index: 9999 !important;
}

body.portal-layout .student-readonly-profile .student-readonly-header .student-profile-photo,
body.portal-layout .student-profile-showcase .student-readonly-header .student-profile-photo,
body.portal-layout .student-readonly-profile .student-readonly-header .student-profile-photo-placeholder,
body.portal-layout .student-profile-showcase .student-readonly-header .student-profile-photo-placeholder {
  align-items: center !important;
  background: #eaf5f3 !important;
  border: 3px solid rgba(255, 255, 255, .72) !important;
  border-radius: 8px !important;
  box-shadow: 0 14px 28px rgba(0, 0, 0, .16) !important;
  color: #176b68 !important;
  display: inline-flex !important;
  flex: 0 0 106px !important;
  height: 132px !important;
  justify-content: center !important;
  max-height: 132px !important;
  max-width: 106px !important;
  min-height: 132px !important;
  min-width: 106px !important;
  object-fit: cover !important;
  object-position: center !important;
  overflow: hidden !important;
  width: 106px !important;
}

body.portal-layout .student-readonly-profile .student-readonly-header .student-admission-number,
body.portal-layout .student-profile-showcase .student-readonly-header .student-admission-number,
body.portal-layout .student-readonly-profile .student-readonly-header div > .student-admission-number,
body.portal-layout .student-profile-showcase .student-readonly-header div > .student-admission-number {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: #f4c95d !important;
  display: inline !important;
  font-size: clamp(1rem, 1.35vw, 1.28rem) !important;
  font-weight: 800 !important;
  height: auto !important;
  line-height: 1.15 !important;
  margin: 0 0 7px !important;
  max-width: 100% !important;
  min-height: 0 !important;
  min-width: 0 !important;
  overflow-wrap: normal !important;
  padding: 0 !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
  width: auto !important;
  word-break: keep-all !important;
}

body.portal-layout .student-readonly-profile .student-readonly-header div > span:first-child:not(.student-profile-photo-placeholder),
body.portal-layout .student-profile-showcase .student-readonly-header div > span:first-child:not(.student-profile-photo-placeholder) {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  display: inline !important;
  height: auto !important;
  padding: 0 !important;
  white-space: nowrap !important;
  width: auto !important;
}

body.portal-layout .student-readonly-profile .student-readonly-header img.student-profile-photo,
body.portal-layout .student-profile-showcase .student-readonly-header img.student-profile-photo {
  display: block !important;
  object-fit: cover !important;
  object-position: center center !important;
}

/* Student Profile search fix v4: one in-flow suggestion panel and a stable photo crop. */
body.portal-layout .student-profile-search-card,
body.portal-layout .student-profile-search-card .card-body,
body.portal-layout .student-profile-search-card .student-lookup-form,
body.portal-layout .student-profile-search-card .student-suggest-box {
  overflow: visible !important;
}

body.portal-layout .student-profile-search-card {
  position: relative !important;
  z-index: 5 !important;
}

body.portal-layout .student-profile-search-card .student-suggest-list {
  background: #fff !important;
  border: 1px solid #d6e1e6 !important;
  border-radius: 8px !important;
  box-shadow: 0 12px 28px rgba(18, 43, 53, .12) !important;
  display: none !important;
  left: auto !important;
  margin-top: 8px !important;
  max-height: 360px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  position: static !important;
  right: auto !important;
  top: auto !important;
  width: 100% !important;
  z-index: auto !important;
}

body.portal-layout .student-profile-search-card .student-suggest-list.is-open {
  display: block !important;
}

body.portal-layout .student-profile-search-card .student-suggest-list a {
  border-bottom: 1px solid #edf2f4 !important;
  color: #203942 !important;
  display: block !important;
  min-width: 0 !important;
  padding: 10px 14px !important;
  text-decoration: none !important;
  white-space: normal !important;
}

body.portal-layout .student-profile-search-card .student-suggest-list a:last-child {
  border-bottom: 0 !important;
}

body.portal-layout .student-profile-search-card .student-suggest-list a:hover,
body.portal-layout .student-profile-search-card .student-suggest-list a:focus {
  background: #eaf6f4 !important;
}

body.portal-layout .student-profile-showcase .student-readonly-header img.student-profile-photo {
  aspect-ratio: 106 / 132 !important;
  display: block !important;
  flex: 0 0 106px !important;
  height: 132px !important;
  max-height: 132px !important;
  max-width: 106px !important;
  min-height: 132px !important;
  min-width: 106px !important;
  object-fit: cover !important;
  object-position: center center !important;
  width: 106px !important;
}

@media (max-width: 767.98px) {
  body.portal-layout .student-profile-showcase .student-readonly-header img.student-profile-photo {
    aspect-ratio: 88 / 110 !important;
    flex-basis: 88px !important;
    height: 110px !important;
    max-height: 110px !important;
    max-width: 88px !important;
    min-height: 110px !important;
    min-width: 88px !important;
    width: 88px !important;
  }
}

/* Student Profile search fix v5: detached results row, no old overlay behavior. */
body.portal-layout .student-profile-search-card .student-profile-live-results {
  background: #fff !important;
  border: 1px solid #d6e1e6 !important;
  border-radius: 8px !important;
  box-shadow: 0 12px 28px rgba(18, 43, 53, .12) !important;
  display: none !important;
  left: auto !important;
  margin-top: 10px !important;
  max-height: none !important;
  overflow: visible !important;
  position: static !important;
  right: auto !important;
  top: auto !important;
  width: 100% !important;
  z-index: auto !important;
}

body.portal-layout .student-profile-search-card .student-profile-live-results.is-open {
  display: block !important;
}

body.portal-layout .student-profile-search-card .student-profile-live-results[hidden] {
  display: none !important;
}

body.portal-layout .student-profile-search-card .student-profile-live-results a {
  border-bottom: 1px solid #edf2f4 !important;
  color: #203942 !important;
  cursor: pointer !important;
  display: block !important;
  min-width: 0 !important;
  padding: 11px 14px !important;
  text-decoration: none !important;
  white-space: normal !important;
}

body.portal-layout .student-profile-search-card .student-profile-live-results a:last-child {
  border-bottom: 0 !important;
}

body.portal-layout .student-profile-search-card .student-profile-live-results a:hover,
body.portal-layout .student-profile-search-card .student-profile-live-results a:focus {
  background: #eaf6f4 !important;
}

body.portal-layout .student-profile-search-card .student-profile-live-results strong {
  color: #203942 !important;
  display: block !important;
  line-height: 1.25 !important;
}

body.portal-layout .student-profile-search-card .student-profile-live-results small {
  color: #5f7480 !important;
  display: block !important;
  line-height: 1.25 !important;
  margin-top: 2px !important;
}

.contact-protection-field {
  height: 1px !important;
  left: -10000px !important;
  overflow: hidden !important;
  position: absolute !important;
  top: auto !important;
  width: 1px !important;
}

/* Super Admin high-density finish: desktop table first, compact text, no broken wrapping. */
body.portal-layout {
  font-size: 0.875rem !important;
  line-height: 1.3 !important;
}

body.portal-layout .content-wrapper,
body.portal-layout .content-header,
body.portal-layout .content,
body.portal-layout .card,
body.portal-layout .card-body,
body.portal-layout .table,
body.portal-layout .form-control,
body.portal-layout .btn {
  font-size: 0.875rem !important;
  line-height: 1.3 !important;
}

body.portal-layout .super-admin-hero {
  padding: 0.55rem 0.5rem 0.35rem !important;
}

body.portal-layout .super-admin-hero .d-flex > div:first-child,
body.portal-layout .super-admin-runtime-band > div,
body.portal-layout .super-admin-school-card-top > div {
  min-width: 0 !important;
}

body.portal-layout .super-admin-hero h1 {
  color: #102f3b !important;
  font-size: 1.35rem !important;
  line-height: 1.15 !important;
}

body.portal-layout .super-admin-hero p {
  font-size: 0.82rem !important;
  line-height: 1.25 !important;
  margin-bottom: 0.1rem !important;
}

body.portal-layout .super-admin-page {
  padding-bottom: 0.75rem !important;
}

body.portal-layout .super-admin-page > .row {
  margin-left: -0.35rem !important;
  margin-right: -0.35rem !important;
}

body.portal-layout .super-admin-page > .row > [class*="col-"] {
  padding-left: 0.35rem !important;
  padding-right: 0.35rem !important;
}

body.portal-layout .super-admin-metrics {
  gap: 0.5rem !important;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)) !important;
  margin-bottom: 0.6rem !important;
}

body.portal-layout .super-admin-metric {
  border-radius: 6px !important;
  min-height: 68px !important;
  padding: 0.55rem 0.65rem !important;
}

body.portal-layout .super-admin-metric::after {
  height: 58px !important;
  right: -18px !important;
  top: -18px !important;
  width: 58px !important;
}

body.portal-layout .super-admin-metric span {
  font-size: 0.76rem !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
}

body.portal-layout .super-admin-metric strong {
  font-size: 1.65rem !important;
  line-height: 1 !important;
  margin-top: 0.2rem !important;
}

body.portal-layout .super-admin-card {
  border-top-width: 2px !important;
  margin-bottom: 0.6rem !important;
}

body.portal-layout .super-admin-card .card-header {
  min-height: 34px !important;
  padding: 0.38rem 0.55rem !important;
}

body.portal-layout .super-admin-card .card-body,
body.portal-layout .super-admin-card .card-footer {
  padding: 0.55rem !important;
}

body.portal-layout .super-admin-card .card-title {
  font-size: 0.92rem !important;
  line-height: 1.2 !important;
}

body.portal-layout .super-admin-db-panel,
body.portal-layout .super-admin-runtime-band {
  margin-bottom: 0.55rem !important;
  padding: 0.55rem 0.65rem !important;
}

body.portal-layout .super-admin-section-title {
  font-size: 0.9rem !important;
  line-height: 1.2 !important;
  margin-bottom: 0.45rem !important;
}

body.portal-layout .super-admin-page .form-group {
  margin-bottom: 0.42rem !important;
}

body.portal-layout .super-admin-page label {
  font-size: 0.78rem !important;
  line-height: 1.15 !important;
  margin-bottom: 0.15rem !important;
}

body.portal-layout .super-admin-page .form-control {
  min-height: 31px !important;
  padding: 0.28rem 0.45rem !important;
}

body.portal-layout .super-admin-page textarea.form-control {
  min-height: 58px !important;
}

body.portal-layout .super-admin-module-grid {
  gap: 0.35rem 0.45rem !important;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)) !important;
}

body.portal-layout .super-admin-module-option {
  border-radius: 5px !important;
  min-height: 32px !important;
  padding-bottom: 0.3rem !important;
  padding-top: 0.3rem !important;
}

body.portal-layout .super-admin-module-option .custom-control-label {
  font-size: 0.78rem !important;
  line-height: 1.18 !important;
  overflow-wrap: anywhere !important;
  white-space: normal !important;
}

body.portal-layout .super-admin-runtime-band strong {
  font-size: 0.92rem !important;
  line-height: 1.2 !important;
  overflow-wrap: anywhere !important;
}

body.portal-layout .super-admin-runtime-band small,
body.portal-layout .super-admin-runtime-label {
  font-size: 0.72rem !important;
  line-height: 1.15 !important;
}

body.portal-layout .super-admin-school-table {
  border-top: 1px solid #dfe8ed !important;
  overflow-x: auto !important;
}

body.portal-layout .super-admin-school-table table {
  margin-bottom: 0 !important;
  min-width: 940px !important;
  table-layout: fixed !important;
}

body.portal-layout .super-admin-school-table th:nth-child(1) { width: 17% !important; }
body.portal-layout .super-admin-school-table th:nth-child(2) { width: 8% !important; }
body.portal-layout .super-admin-school-table th:nth-child(3) { width: 11% !important; }
body.portal-layout .super-admin-school-table th:nth-child(4) { width: 17% !important; }
body.portal-layout .super-admin-school-table th:nth-child(5) { width: 10% !important; }
body.portal-layout .super-admin-school-table th:nth-child(6) { width: 18% !important; }
body.portal-layout .super-admin-school-table th:nth-child(7) { width: 19% !important; }

body.portal-layout .super-admin-school-table th,
body.portal-layout .super-admin-school-table td,
body.portal-layout .super-admin-runs-table th,
body.portal-layout .super-admin-runs-table td {
  font-size: 0.78rem !important;
  line-height: 1.22 !important;
  padding: 0.32rem 0.38rem !important;
  vertical-align: top !important;
}

body.portal-layout .super-admin-school-table strong,
body.portal-layout .super-admin-school-table small,
body.portal-layout .super-admin-school-table span,
body.portal-layout .super-admin-runs-table td {
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
}

body.portal-layout .super-admin-school-table .badge,
body.portal-layout .super-admin-runs-table .badge {
  font-size: 0.68rem !important;
  line-height: 1.1 !important;
  white-space: nowrap !important;
}

body.portal-layout .super-admin-school-table .btn-group {
  align-items: stretch !important;
  display: grid !important;
  gap: 0.25rem !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  width: 100% !important;
}

body.portal-layout .super-admin-school-table .btn-group form,
body.portal-layout .super-admin-school-table .btn-group > .btn {
  display: flex !important;
  min-width: 0 !important;
  width: 100% !important;
}

body.portal-layout .super-admin-school-table .btn {
  font-size: 0.72rem !important;
  justify-content: center !important;
  line-height: 1.15 !important;
  min-height: 26px !important;
  padding: 0.22rem 0.3rem !important;
  white-space: nowrap !important;
  width: 100% !important;
}

body.portal-layout .super-admin-module-summary {
  display: -webkit-box !important;
  max-width: 100% !important;
  overflow: hidden !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
  white-space: normal !important;
}

@media (min-width: 992px) {
  body.portal-layout .super-admin-school-grid {
    display: none !important;
  }
}

@media (max-width: 991.98px) {
  body.portal-layout .super-admin-school-table {
    display: none !important;
  }

  body.portal-layout .super-admin-school-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
  }

  body.portal-layout .super-admin-school-card-top,
  body.portal-layout .super-admin-school-card-stats,
  body.portal-layout .super-admin-school-card-note,
  body.portal-layout .super-admin-school-actions {
    font-size: 0.82rem !important;
    line-height: 1.25 !important;
  }

  body.portal-layout .super-admin-school-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.portal-layout .super-admin-school-actions form,
  body.portal-layout .super-admin-school-actions .btn {
    width: 100% !important;
  }
}

/* Super Admin control-center finish: card dashboard is the source of truth. */
body.portal-layout .super-admin-school-grid {
  display: grid !important;
  gap: 0.65rem !important;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)) !important;
  padding: 0.65rem !important;
}

body.portal-layout .super-admin-school-table {
  display: none !important;
}

body.portal-layout .super-admin-school-link,
body.portal-layout .super-admin-school-link:hover,
body.portal-layout .super-admin-school-link:focus {
  color: inherit !important;
  display: inline !important;
  text-decoration: none !important;
}

body.portal-layout .super-admin-school-link:hover,
body.portal-layout .super-admin-school-link:focus {
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
}

body.portal-layout .super-admin-school-card {
  border-radius: 7px !important;
  min-width: 0 !important;
}

body.portal-layout .super-admin-school-card-top {
  min-height: 82px !important;
}

body.portal-layout .super-admin-school-card-top h4 {
  font-size: 1rem !important;
  line-height: 1.12 !important;
  max-width: 100% !important;
}

body.portal-layout .super-admin-school-card-top small,
body.portal-layout .super-admin-school-code {
  display: block !important;
  max-width: 100% !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.portal-layout .super-admin-school-card-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body.portal-layout .super-admin-school-card-stats div {
  padding: 0.52rem 0.62rem !important;
}

body.portal-layout .super-admin-school-card-stats span,
body.portal-layout .super-admin-school-card-stats small {
  font-size: 0.72rem !important;
  line-height: 1.12 !important;
}

body.portal-layout .super-admin-school-card-stats strong {
  font-size: 0.9rem !important;
  line-height: 1.12 !important;
}

body.portal-layout .super-admin-school-card-note {
  padding: 0.48rem 0.62rem !important;
}

body.portal-layout .super-admin-school-card-note span {
  font-size: 0.74rem !important;
  line-height: 1.15 !important;
}

body.portal-layout .super-admin-school-actions {
  display: grid !important;
  gap: 0.32rem !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  padding: 0.52rem 0.62rem 0.62rem !important;
}

body.portal-layout .super-admin-school-actions form,
body.portal-layout .super-admin-school-actions .btn {
  min-width: 0 !important;
  width: 100% !important;
}

body.portal-layout .super-admin-school-actions .btn {
  font-size: 0.7rem !important;
  line-height: 1.1 !important;
  min-height: 28px !important;
  padding: 0.2rem 0.24rem !important;
  white-space: nowrap !important;
}

body.portal-layout .super-admin-detail-actions {
  align-items: center !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.35rem !important;
  justify-content: flex-end !important;
}

body.portal-layout .super-admin-detail-actions form {
  display: inline-flex !important;
  margin: 0 !important;
}

body.portal-layout .super-admin-details-page .super-admin-card {
  height: calc(100% - 0.6rem) !important;
}

body.portal-layout .super-admin-detail-list {
  display: grid !important;
  gap: 0.35rem !important;
}

body.portal-layout .super-admin-detail-list div {
  background: #f8fbfc !important;
  border: 1px solid #e1ebef !important;
  border-radius: 6px !important;
  min-width: 0 !important;
  padding: 0.42rem 0.5rem !important;
}

body.portal-layout .super-admin-detail-list span {
  color: #60717c !important;
  display: block !important;
  font-size: 0.72rem !important;
  font-weight: 700 !important;
  line-height: 1.12 !important;
  text-transform: uppercase !important;
}

body.portal-layout .super-admin-detail-list strong {
  color: #102f3b !important;
  display: block !important;
  font-size: 0.86rem !important;
  line-height: 1.18 !important;
  margin-top: 0.12rem !important;
  overflow-wrap: anywhere !important;
}

body.portal-layout .super-admin-module-chip-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.35rem !important;
}

body.portal-layout .super-admin-module-chip {
  background: #eaf6f4 !important;
  border: 1px solid #bddbd6 !important;
  border-radius: 999px !important;
  color: #145c57 !important;
  font-size: 0.74rem !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
  padding: 0.28rem 0.48rem !important;
}

body.portal-layout .super-admin-progress-overlay {
  align-items: center !important;
  background: rgba(9, 25, 32, 0.54) !important;
  bottom: 0 !important;
  display: flex !important;
  justify-content: center !important;
  left: 0 !important;
  padding: 1rem !important;
  position: fixed !important;
  right: 0 !important;
  top: 0 !important;
  z-index: 5000 !important;
}

body.portal-layout .super-admin-progress-overlay[hidden] {
  display: none !important;
}

body.portal-layout .super-admin-progress-dialog {
  background: #fff !important;
  border: 1px solid #cfe2e7 !important;
  border-radius: 8px !important;
  box-shadow: 0 24px 70px rgba(7, 28, 36, 0.28) !important;
  max-width: 640px !important;
  padding: 1rem 1.1rem !important;
  width: min(640px, 100%) !important;
}

body.portal-layout .super-admin-progress-icon {
  align-items: center !important;
  background: linear-gradient(135deg, #123f4b, #1c8f67) !important;
  border-radius: 8px !important;
  color: #fff !important;
  display: inline-flex !important;
  height: 42px !important;
  justify-content: center !important;
  margin-bottom: 0.75rem !important;
  width: 42px !important;
}

body.portal-layout .super-admin-progress-copy {
  display: grid !important;
  gap: 0.2rem !important;
  margin-bottom: 0.75rem !important;
}

body.portal-layout .super-admin-progress-copy strong {
  color: #102f3b !important;
  font-size: 1rem !important;
  line-height: 1.2 !important;
}

body.portal-layout .super-admin-progress-copy span {
  color: #60717c !important;
  font-size: 0.82rem !important;
  line-height: 1.25 !important;
}

body.portal-layout .super-admin-progress-track {
  background: #e8f0f3 !important;
  border-radius: 999px !important;
  border: 1px solid #cfdee3 !important;
  height: 18px !important;
  overflow: hidden !important;
  padding: 2px !important;
}

body.portal-layout .super-admin-progress-track div {
  background: linear-gradient(90deg, #0d8ca2, #24a85a) !important;
  border-radius: inherit !important;
  height: 100% !important;
  transition: width 280ms ease !important;
  width: 0 !important;
}

body.portal-layout .super-admin-progress-percent {
  color: #173f4a !important;
  display: block !important;
  font-size: 0.78rem !important;
  font-weight: 800 !important;
  margin-top: 0.45rem !important;
  text-align: right !important;
}

body.portal-layout .super-admin-progress-detail {
  border-top: 1px solid #e2edf1 !important;
  display: grid !important;
  gap: 0.35rem !important;
  margin-top: 0.75rem !important;
  max-height: 210px !important;
  overflow: auto !important;
  padding-top: 0.75rem !important;
}

body.portal-layout .super-admin-progress-detail-item {
  align-items: center !important;
  color: #60717c !important;
  display: grid !important;
  font-size: 0.82rem !important;
  gap: 0.5rem !important;
  grid-template-columns: 16px minmax(0, 1fr) !important;
  line-height: 1.2 !important;
  min-width: 0 !important;
}

body.portal-layout .super-admin-progress-detail-item span:last-child {
  min-width: 0 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.portal-layout .super-admin-progress-detail-marker {
  background: #d8e5ea !important;
  border: 2px solid #edf5f7 !important;
  border-radius: 50% !important;
  box-shadow: 0 0 0 1px #bdcdd3 !important;
  height: 12px !important;
  width: 12px !important;
}

body.portal-layout .super-admin-progress-detail-item.is-active {
  color: #123f4b !important;
  font-weight: 800 !important;
}

body.portal-layout .super-admin-progress-detail-item.is-active .super-admin-progress-detail-marker {
  animation: super-admin-progress-pulse 950ms ease-in-out infinite !important;
  background: #18a05f !important;
  box-shadow: 0 0 0 4px rgba(24, 160, 95, 0.15) !important;
}

body.portal-layout .super-admin-progress-detail-item.is-done {
  color: #20845d !important;
}

body.portal-layout .super-admin-progress-detail-item.is-done .super-admin-progress-detail-marker {
  background: #24a85a !important;
  box-shadow: 0 0 0 1px #24a85a !important;
}

@keyframes super-admin-progress-pulse {
  0% {
    transform: scale(0.9);
  }
  50% {
    transform: scale(1.15);
  }
  100% {
    transform: scale(0.9);
  }
}

@media (max-width: 1199.98px) {
  body.portal-layout .super-admin-school-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 575.98px) {
  body.portal-layout .super-admin-school-grid {
    grid-template-columns: 1fr !important;
  }

  body.portal-layout .super-admin-school-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  body.portal-layout .super-admin-detail-actions {
    justify-content: stretch !important;
  }

  body.portal-layout .super-admin-detail-actions .btn,
  body.portal-layout .super-admin-detail-actions form {
    width: 100% !important;
  }
}

/* Super Admin interactive cards: final override for uploaded builds. */
body.portal-layout .super-admin-metrics {
  display: grid !important;
  gap: 0.72rem !important;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)) !important;
}

body.portal-layout .super-admin-metric.small-box {
  border-radius: 7px !important;
  box-shadow: 0 12px 28px rgba(17, 47, 62, 0.16) !important;
  color: #fff !important;
  margin-bottom: 0 !important;
  min-height: 88px !important;
  transition: box-shadow 180ms ease, transform 180ms ease !important;
}

body.portal-layout .super-admin-metric.small-box.bg-info {
  background: linear-gradient(135deg, #123f4b, #197783) !important;
}

body.portal-layout .super-admin-metric.small-box.bg-success {
  background: linear-gradient(135deg, #0f743f, #21a45d) !important;
}

body.portal-layout .super-admin-metric.small-box.bg-teal {
  background: linear-gradient(135deg, #145b5d, #2a8671) !important;
}

body.portal-layout .super-admin-metric.small-box.bg-primary {
  background: linear-gradient(135deg, #0b6eb6, #168dce) !important;
}

body.portal-layout .super-admin-metric.small-box.bg-secondary {
  background: linear-gradient(135deg, #4b5b64, #6d7d85) !important;
}

body.portal-layout .super-admin-metric.small-box:hover,
body.portal-layout .super-admin-school-card:hover {
  box-shadow: 0 18px 38px rgba(18, 54, 72, 0.18) !important;
  transform: translateY(-3px) !important;
}

body.portal-layout .super-admin-metric.small-box .inner {
  padding: 0.78rem 0.9rem !important;
}

body.portal-layout .super-admin-metric.small-box span {
  color: rgba(255, 255, 255, 0.94) !important;
  display: block !important;
  font-size: 0.82rem !important;
  font-weight: 700 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.portal-layout .super-admin-metric.small-box strong {
  color: #fff !important;
  display: block !important;
  font-size: 2rem !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}

body.portal-layout .super-admin-school-grid {
  display: grid !important;
  gap: 0.75rem !important;
  grid-template-columns: repeat(auto-fit, minmax(285px, 1fr)) !important;
  padding: 0.75rem !important;
}

body.portal-layout .super-admin-school-table {
  display: none !important;
}

body.portal-layout .super-admin-school-card {
  border: 1px solid #d7e5eb !important;
  border-radius: 7px !important;
  box-shadow: 0 12px 26px rgba(18, 54, 72, 0.1) !important;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease !important;
}

body.portal-layout .super-admin-school-card-top {
  background: linear-gradient(135deg, #123f4b, #247b67) !important;
  color: #fff !important;
  min-height: 82px !important;
}

body.portal-layout .super-admin-school-card-top h4,
body.portal-layout .super-admin-school-card-top h4 a {
  color: #fff !important;
  font-size: 1rem !important;
  line-height: 1.15 !important;
  text-decoration: none !important;
}

body.portal-layout .super-admin-school-actions {
  display: grid !important;
  gap: 0.35rem !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
}

body.portal-layout .super-admin-school-actions form,
body.portal-layout .super-admin-school-actions .btn {
  min-width: 0 !important;
  width: 100% !important;
}

body.portal-layout .super-admin-school-actions .btn {
  font-size: 0.72rem !important;
  min-height: 29px !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.portal-layout .super-admin-admin-table {
  table-layout: fixed !important;
  min-width: 760px !important;
}

body.portal-layout .super-admin-admin-table th,
body.portal-layout .super-admin-admin-table td {
  font-size: 0.78rem !important;
  line-height: 1.22 !important;
  padding: 0.42rem 0.5rem !important;
  vertical-align: top !important;
}

body.portal-layout .super-admin-admin-table span,
body.portal-layout .super-admin-admin-table strong,
body.portal-layout .super-admin-admin-table small {
  max-width: 100% !important;
  overflow-wrap: anywhere !important;
}

body.portal-layout .super-admin-password-list {
  display: grid !important;
  gap: 0.75rem !important;
}

body.portal-layout .super-admin-password-card {
  background: #f8fafc !important;
  border: 1px solid #d9e2e8 !important;
  border-radius: 6px !important;
  padding: 0.75rem !important;
}

body.portal-layout .super-admin-password-identity {
  display: grid !important;
  gap: 0.65rem !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  margin-bottom: 0.75rem !important;
}

body.portal-layout .super-admin-password-identity > div,
body.portal-layout .super-admin-password-form,
body.portal-layout .super-admin-password-control {
  min-width: 0 !important;
}

body.portal-layout .super-admin-password-label {
  color: #5f6f79 !important;
  display: block !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  margin-bottom: 0.22rem !important;
  text-transform: uppercase !important;
}

body.portal-layout .super-admin-password-identity strong,
body.portal-layout .super-admin-password-identity small {
  overflow-wrap: anywhere !important;
}

body.portal-layout .super-admin-password-control {
  display: grid !important;
  gap: 0.5rem !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
}

body.portal-layout .super-admin-password-control .form-control,
body.portal-layout .super-admin-password-control .btn {
  min-height: 36px !important;
}

@media (max-width: 575.98px) {
  body.portal-layout .super-admin-password-identity,
  body.portal-layout .super-admin-password-control {
    grid-template-columns: 1fr !important;
  }

  body.portal-layout .super-admin-password-control .btn {
    width: 100% !important;
  }
}

@media (max-width: 1199.98px) {
  body.portal-layout .super-admin-school-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 575.98px) {
  body.portal-layout .super-admin-metrics,
  body.portal-layout .super-admin-school-grid {
    grid-template-columns: 1fr !important;
  }

  body.portal-layout .super-admin-school-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Super Admin visual polish v6 final: equal stat cards, controlled wrapping, and stronger hover affordance. */
body.portal-layout .super-admin-metrics {
  display: grid !important;
  gap: 0.75rem !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  margin-bottom: 0.85rem !important;
}

body.portal-layout .super-admin-metric-card.small-box {
  border: 0 !important;
  border-radius: 7px !important;
  box-shadow: 0 12px 26px rgba(12, 35, 47, 0.15) !important;
  color: #fff !important;
  margin-bottom: 0 !important;
  min-height: 102px !important;
  overflow: hidden !important;
  padding: 0 !important;
  position: relative !important;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease !important;
}

body.portal-layout .super-admin-metric-card.small-box:hover {
  box-shadow: 0 18px 38px rgba(12, 35, 47, 0.22) !important;
  filter: saturate(1.05) !important;
  transform: translateY(-3px) !important;
}

body.portal-layout .super-admin-metric-card.small-box .inner {
  min-width: 0 !important;
  padding: 1rem 0.95rem !important;
  position: relative !important;
  z-index: 2 !important;
}

body.portal-layout .super-admin-metric-card.small-box span,
body.portal-layout .super-admin-metric-card.small-box small {
  color: rgba(255, 255, 255, 0.94) !important;
  display: block !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  max-width: calc(100% - 3.2rem) !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.portal-layout .super-admin-metric-card.small-box small {
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  opacity: 0.9 !important;
}

body.portal-layout .super-admin-metric-card.small-box strong {
  color: #fff !important;
  display: block !important;
  font-size: 1.85rem !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  line-height: 1.05 !important;
  margin: 0.35rem 3.25rem 0.2rem 0 !important;
  max-width: calc(100% - 3.2rem) !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.portal-layout .super-admin-metric-card.small-box .icon {
  bottom: -0.2rem !important;
  color: rgba(255, 255, 255, 0.24) !important;
  font-size: 4.15rem !important;
  line-height: 1 !important;
  right: 0.5rem !important;
  top: auto !important;
  transition: transform 180ms ease !important;
}

body.portal-layout .super-admin-metric-card.small-box:hover .icon {
  transform: scale(1.08) rotate(-3deg) !important;
}

body.portal-layout .super-admin-metric-schools.small-box {
  background: linear-gradient(135deg, #2f83a7, #17647f) !important;
}

body.portal-layout .super-admin-metric-active.small-box {
  background: linear-gradient(135deg, #218c72, #157a55) !important;
}

body.portal-layout .super-admin-metric-admins.small-box {
  background: linear-gradient(135deg, #334b64, #23394f) !important;
}

body.portal-layout .super-admin-metric-modules.small-box {
  background: linear-gradient(135deg, #6f5a93, #57437c) !important;
}

body.portal-layout .super-admin-metric-runtime.small-box {
  background: linear-gradient(135deg, #ba6608, #9a4f04) !important;
}

body.portal-layout .super-admin-school-grid {
  display: grid !important;
  gap: 0.75rem !important;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)) !important;
}

body.portal-layout .super-admin-school-card {
  border: 1px solid #cfe0e7 !important;
  border-radius: 7px !important;
  box-shadow: 0 12px 26px rgba(12, 35, 47, 0.11) !important;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease !important;
}

body.portal-layout .super-admin-school-card:hover {
  border-color: #72b8b1 !important;
  box-shadow: 0 18px 36px rgba(12, 35, 47, 0.18) !important;
  transform: translateY(-3px) !important;
}

@media (max-width: 1399.98px) {
  body.portal-layout .super-admin-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 767.98px) {
  body.portal-layout .super-admin-metrics {
    grid-template-columns: 1fr !important;
  }
}

/* Super Admin stat-card grid v7: column count follows the page value. */
body.portal-layout .super-admin-stat-grid {
  display: grid !important;
  gap: 0.75rem !important;
  grid-template-columns: repeat(var(--super-admin-stat-columns, 5), minmax(0, 1fr)) !important;
  margin-bottom: 0.9rem !important;
}

body.portal-layout .super-admin-stat-card {
  border: 0 !important;
  border-radius: 7px !important;
  box-shadow: 0 12px 26px rgba(12, 35, 47, 0.15) !important;
  color: #fff !important;
  display: block !important;
  min-height: 102px !important;
  min-width: 0 !important;
  overflow: hidden !important;
  padding: 1rem 0.95rem !important;
  position: relative !important;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease !important;
}

body.portal-layout .super-admin-stat-card:hover {
  box-shadow: 0 18px 38px rgba(12, 35, 47, 0.22) !important;
  filter: saturate(1.05) !important;
  transform: translateY(-3px) !important;
}

body.portal-layout .super-admin-stat-card span,
body.portal-layout .super-admin-stat-card small {
  color: rgba(255, 255, 255, 0.94) !important;
  display: block !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  max-width: calc(100% - 3.2rem) !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.portal-layout .super-admin-stat-card small {
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  opacity: 0.9 !important;
}

body.portal-layout .super-admin-stat-card strong {
  color: #fff !important;
  display: block !important;
  font-size: 1.82rem !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  line-height: 1.05 !important;
  margin: 0.35rem 3.25rem 0.2rem 0 !important;
  max-width: calc(100% - 3.2rem) !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.portal-layout .super-admin-stat-card i {
  bottom: -0.2rem !important;
  color: rgba(255, 255, 255, 0.24) !important;
  font-size: 4.15rem !important;
  line-height: 1 !important;
  position: absolute !important;
  right: 0.5rem !important;
  transition: transform 180ms ease !important;
}

body.portal-layout .super-admin-stat-card:hover i {
  transform: scale(1.08) rotate(-3deg) !important;
}

body.portal-layout .super-admin-stat-card.is-sky { background: linear-gradient(135deg, #2f83a7, #17647f) !important; }
body.portal-layout .super-admin-stat-card.is-green { background: linear-gradient(135deg, #218c72, #157a55) !important; }
body.portal-layout .super-admin-stat-card.is-red { background: linear-gradient(135deg, #cf4d31, #b13b26) !important; }
body.portal-layout .super-admin-stat-card.is-navy { background: linear-gradient(135deg, #334b64, #23394f) !important; }
body.portal-layout .super-admin-stat-card.is-olive { background: linear-gradient(135deg, #5e943d, #4b7b2f) !important; }
body.portal-layout .super-admin-stat-card.is-teal { background: linear-gradient(135deg, #148273, #0f665f) !important; }
body.portal-layout .super-admin-stat-card.is-blue { background: linear-gradient(135deg, #3466c6, #2452a8) !important; }
body.portal-layout .super-admin-stat-card.is-purple { background: linear-gradient(135deg, #6f5a93, #57437c) !important; }
body.portal-layout .super-admin-stat-card.is-orange { background: linear-gradient(135deg, #ba6608, #9a4f04) !important; }
body.portal-layout .super-admin-stat-card.is-brown { background: linear-gradient(135deg, #95654f, #7c503e) !important; }

@media (max-width: 1399.98px) {
  body.portal-layout .super-admin-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 767.98px) {
  body.portal-layout .super-admin-stat-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Super Admin v11 final: this must remain last so the reference 5-card layout wins. */
body.portal-layout .super-admin-stat-grid.row {
  align-items: stretch !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.75rem !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

body.portal-layout .super-admin-stat-grid.row > .super-admin-stat-col {
  flex: 0 0 calc(20% - 0.6rem) !important;
  max-width: calc(20% - 0.6rem) !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.portal-layout .super-admin-stat-grid.row > .super-admin-stat-card.small-box {
  display: block !important;
  margin-bottom: 0 !important;
  width: auto !important;
}

body.portal-layout .super-admin-stat-card.small-box .inner {
  min-height: 102px !important;
}

body.portal-layout .super-admin-stat-card.small-box span,
body.portal-layout .super-admin-stat-card.small-box small,
body.portal-layout .super-admin-stat-card.small-box strong {
  overflow-wrap: normal !important;
  word-break: normal !important;
}

@media (max-width: 767.98px) {
  body.portal-layout .super-admin-stat-grid.row > .super-admin-stat-col {
    flex-basis: 100% !important;
    max-width: 100% !important;
  }
}

/* Super Admin v13 actual final: school details render as two-column label/value rows. */
body.portal-layout .super-admin-details-page .super-admin-card .card-header {
  background: linear-gradient(90deg, #f8fbfc, #eef6f5) !important;
  border-bottom: 1px solid #d7e6eb !important;
  min-height: 38px !important;
}

body.portal-layout .super-admin-details-page .super-admin-card .card-title {
  color: #113f4b !important;
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif !important;
  font-size: 0.98rem !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  line-height: 1.2 !important;
  text-transform: uppercase !important;
}

body.portal-layout .super-admin-details-page .super-admin-card .card-title i {
  color: #128477 !important;
}

body.portal-layout .super-admin-details-page .super-admin-detail-list {
  display: grid !important;
  gap: 0 !important;
  padding: 0 !important;
}

body.portal-layout .super-admin-details-page .super-admin-detail-list > div {
  align-items: center !important;
  background: #fff !important;
  border: 0 !important;
  border-bottom: 1px solid #e4eef2 !important;
  border-radius: 0 !important;
  display: grid !important;
  gap: 0.75rem !important;
  grid-template-columns: minmax(118px, 34%) minmax(0, 1fr) !important;
  min-height: 40px !important;
  min-width: 0 !important;
  padding: 0.48rem 0.65rem !important;
}

body.portal-layout .super-admin-details-page .super-admin-detail-list > div:nth-child(even) {
  background: #f8fbfc !important;
}

body.portal-layout .super-admin-details-page .super-admin-detail-list > div:last-child {
  border-bottom: 0 !important;
}

body.portal-layout .super-admin-details-page .super-admin-detail-list span {
  color: #60717c !important;
  display: block !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  line-height: 1.18 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

body.portal-layout .super-admin-details-page .super-admin-detail-list strong {
  color: #0f2f3a !important;
  display: block !important;
  font-size: 0.88rem !important;
  font-weight: 800 !important;
  line-height: 1.22 !important;
  margin: 0 !important;
  min-width: 0 !important;
  overflow: hidden !important;
  overflow-wrap: normal !important;
  text-align: right !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

@media (max-width: 575.98px) {
  body.portal-layout .super-admin-details-page .super-admin-detail-list > div {
    grid-template-columns: minmax(92px, 38%) minmax(0, 1fr) !important;
  }

  body.portal-layout .super-admin-details-page .super-admin-detail-list strong {
    font-size: 0.82rem !important;
  }
}

/* Super Admin v13: school detail panels use label/value columns instead of stacked text. */
body.portal-layout .super-admin-details-page .super-admin-card .card-header {
  background: linear-gradient(90deg, #f8fbfc, #eef6f5) !important;
  border-bottom: 1px solid #d7e6eb !important;
  min-height: 38px !important;
}

body.portal-layout .super-admin-details-page .super-admin-card .card-title {
  color: #113f4b !important;
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif !important;
  font-size: 0.98rem !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  line-height: 1.2 !important;
  text-transform: uppercase !important;
}

body.portal-layout .super-admin-details-page .super-admin-card .card-title i {
  color: #128477 !important;
}

body.portal-layout .super-admin-details-page .super-admin-detail-list {
  display: grid !important;
  gap: 0 !important;
  padding: 0 !important;
}

body.portal-layout .super-admin-details-page .super-admin-detail-list > div {
  align-items: center !important;
  background: #fff !important;
  border: 0 !important;
  border-bottom: 1px solid #e4eef2 !important;
  border-radius: 0 !important;
  display: grid !important;
  gap: 0.75rem !important;
  grid-template-columns: minmax(118px, 34%) minmax(0, 1fr) !important;
  min-height: 40px !important;
  min-width: 0 !important;
  padding: 0.48rem 0.65rem !important;
}

body.portal-layout .super-admin-details-page .super-admin-detail-list > div:nth-child(even) {
  background: #f8fbfc !important;
}

body.portal-layout .super-admin-details-page .super-admin-detail-list > div:last-child {
  border-bottom: 0 !important;
}

body.portal-layout .super-admin-details-page .super-admin-detail-list span {
  color: #60717c !important;
  display: block !important;
  font-size: 0.72rem !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  line-height: 1.18 !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  text-transform: uppercase !important;
  white-space: nowrap !important;
}

body.portal-layout .super-admin-details-page .super-admin-detail-list strong {
  color: #0f2f3a !important;
  display: block !important;
  font-size: 0.88rem !important;
  font-weight: 800 !important;
  line-height: 1.22 !important;
  margin: 0 !important;
  min-width: 0 !important;
  overflow: hidden !important;
  overflow-wrap: normal !important;
  text-align: right !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

@media (max-width: 575.98px) {
  body.portal-layout .super-admin-details-page .super-admin-detail-list > div {
    grid-template-columns: minmax(92px, 38%) minmax(0, 1fr) !important;
  }

  body.portal-layout .super-admin-details-page .super-admin-detail-list strong {
    font-size: 0.82rem !important;
  }
}

/* Super Admin v11: force the summary cards into the reference 5-column card layout. */
body.portal-layout .super-admin-stat-grid.row {
  align-items: stretch !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.75rem !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

body.portal-layout .super-admin-stat-grid.row > .super-admin-stat-col {
  flex: 0 0 calc(20% - 0.6rem) !important;
  max-width: calc(20% - 0.6rem) !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.portal-layout .super-admin-stat-grid.row > .super-admin-stat-card.small-box {
  display: block !important;
  margin-bottom: 0 !important;
  width: auto !important;
}

body.portal-layout .super-admin-stat-card.small-box .inner {
  min-height: 102px !important;
}

body.portal-layout .super-admin-stat-card.small-box span,
body.portal-layout .super-admin-stat-card.small-box small,
body.portal-layout .super-admin-stat-card.small-box strong {
  overflow-wrap: normal !important;
  word-break: normal !important;
}

@media (max-width: 767.98px) {
  body.portal-layout .super-admin-stat-grid.row > .super-admin-stat-col {
    flex-basis: 100% !important;
    max-width: 100% !important;
  }
}

/* Super Admin v8: use tenant cards only; hide the legacy table that wraps text badly. */
body.portal-layout .super-admin-page .super-admin-school-table {
  display: none !important;
}

body.portal-layout .super-admin-page,
body.portal-layout .super-admin-page .card,
body.portal-layout .super-admin-page .card-body {
  min-width: 0 !important;
}

body.portal-layout .super-admin-page .super-admin-school-grid {
  display: grid !important;
  gap: 0.75rem !important;
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)) !important;
  padding: 0.75rem !important;
}

body.portal-layout .super-admin-page .super-admin-school-card {
  min-width: 0 !important;
}

body.portal-layout .super-admin-school-card-top,
body.portal-layout .super-admin-school-card-stats,
body.portal-layout .super-admin-school-card-note,
body.portal-layout .super-admin-school-actions {
  min-width: 0 !important;
}

body.portal-layout .super-admin-school-card-top h4,
body.portal-layout .super-admin-school-card-top h4 a,
body.portal-layout .super-admin-school-card-stats strong {
  display: block !important;
  max-width: 100% !important;
  overflow: hidden !important;
  overflow-wrap: normal !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.portal-layout .super-admin-school-card-stats small,
body.portal-layout .super-admin-school-card-note span {
  display: -webkit-box !important;
  overflow: hidden !important;
  -webkit-box-orient: vertical !important;
  -webkit-line-clamp: 2 !important;
  white-space: normal !important;
}

body.portal-layout .super-admin-school-actions {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
}

body.portal-layout .super-admin-school-actions .btn {
  max-width: 100% !important;
}

body.portal-layout .super-admin-school-actions .btn i {
  flex: 0 0 auto !important;
}

@media (max-width: 575.98px) {
  body.portal-layout .super-admin-page .super-admin-school-grid {
    grid-template-columns: 1fr !important;
  }

  body.portal-layout .super-admin-school-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Super Admin v10: summary cards use AdminLTE small-box fallback plus polished high-density layout. */
body.portal-layout .super-admin-stat-grid {
  align-items: stretch !important;
  display: grid !important;
  gap: 0.75rem !important;
  grid-template-columns: repeat(var(--super-admin-stat-columns, 5), minmax(0, 1fr)) !important;
  margin-bottom: 0.9rem !important;
}

body.portal-layout .super-admin-stat-card.small-box {
  border: 0 !important;
  border-radius: 7px !important;
  box-shadow: 0 12px 26px rgba(12, 35, 47, 0.15) !important;
  color: #fff !important;
  margin-bottom: 0 !important;
  min-height: 102px !important;
  min-width: 0 !important;
  overflow: hidden !important;
  position: relative !important;
  transition: transform 180ms ease, box-shadow 180ms ease, filter 180ms ease !important;
}

body.portal-layout .super-admin-stat-card.small-box:hover {
  box-shadow: 0 18px 38px rgba(12, 35, 47, 0.22) !important;
  filter: saturate(1.05) !important;
  transform: translateY(-3px) !important;
}

body.portal-layout .super-admin-stat-card.small-box .inner {
  min-width: 0 !important;
  padding: 1rem 0.95rem !important;
  position: relative !important;
  z-index: 2 !important;
}

body.portal-layout .super-admin-stat-card.small-box span,
body.portal-layout .super-admin-stat-card.small-box small {
  color: rgba(255, 255, 255, 0.94) !important;
  display: block !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  line-height: 1.2 !important;
  max-width: calc(100% - 3.2rem) !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.portal-layout .super-admin-stat-card.small-box small {
  font-size: 0.72rem !important;
  font-weight: 600 !important;
  opacity: 0.9 !important;
}

body.portal-layout .super-admin-stat-card.small-box strong {
  color: #fff !important;
  display: block !important;
  font-size: 1.82rem !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  line-height: 1.05 !important;
  margin: 0.35rem 3.25rem 0.2rem 0 !important;
  max-width: calc(100% - 3.2rem) !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.portal-layout .super-admin-stat-card.small-box .icon {
  bottom: -0.2rem !important;
  display: block !important;
  height: 4.2rem !important;
  position: absolute !important;
  right: 0.5rem !important;
  top: auto !important;
  width: 4.2rem !important;
  z-index: 1 !important;
}

body.portal-layout .super-admin-stat-card.small-box .icon i {
  bottom: 0 !important;
  color: rgba(255, 255, 255, 0.24) !important;
  font-size: 4.15rem !important;
  line-height: 1 !important;
  position: absolute !important;
  right: 0 !important;
  top: auto !important;
  transition: transform 180ms ease !important;
}

body.portal-layout .super-admin-stat-card.small-box:hover .icon i {
  transform: scale(1.08) rotate(-3deg) !important;
}

body.portal-layout .super-admin-stat-card.small-box.is-sky { background: linear-gradient(135deg, #2f83a7, #17647f) !important; }
body.portal-layout .super-admin-stat-card.small-box.is-green { background: linear-gradient(135deg, #218c72, #157a55) !important; }
body.portal-layout .super-admin-stat-card.small-box.is-red { background: linear-gradient(135deg, #cf4d31, #b13b26) !important; }
body.portal-layout .super-admin-stat-card.small-box.is-navy { background: linear-gradient(135deg, #334b64, #23394f) !important; }
body.portal-layout .super-admin-stat-card.small-box.is-olive { background: linear-gradient(135deg, #5e943d, #4b7b2f) !important; }
body.portal-layout .super-admin-stat-card.small-box.is-teal { background: linear-gradient(135deg, #148273, #0f665f) !important; }
body.portal-layout .super-admin-stat-card.small-box.is-blue { background: linear-gradient(135deg, #3466c6, #2452a8) !important; }
body.portal-layout .super-admin-stat-card.small-box.is-purple { background: linear-gradient(135deg, #6f5a93, #57437c) !important; }
body.portal-layout .super-admin-stat-card.small-box.is-orange { background: linear-gradient(135deg, #ba6608, #9a4f04) !important; }
body.portal-layout .super-admin-stat-card.small-box.is-brown { background: linear-gradient(135deg, #95654f, #7c503e) !important; }

@media (max-width: 1399.98px) {
  body.portal-layout .super-admin-stat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 767.98px) {
  body.portal-layout .super-admin-stat-grid {
    grid-template-columns: 1fr !important;
  }
}

/* Super Admin v11 actual final: keep the summary cards like the reference image. */
body.portal-layout .super-admin-stat-grid.row {
  align-items: stretch !important;
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 0.75rem !important;
  grid-template-columns: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

body.portal-layout .super-admin-stat-grid.row > .super-admin-stat-col {
  flex: 0 0 calc(20% - 0.6rem) !important;
  max-width: calc(20% - 0.6rem) !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.portal-layout .super-admin-stat-grid.row > .super-admin-stat-card.small-box {
  display: block !important;
  margin-bottom: 0 !important;
  width: auto !important;
}

@media (max-width: 767.98px) {
  body.portal-layout .super-admin-stat-grid.row > .super-admin-stat-col {
    flex-basis: 100% !important;
    max-width: 100% !important;
  }
}
