/* SchoolsBox legacy-view compatibility on top of MatDash/Bootstrap 5. */
.pull-right { float: right !important; }
.pull-left { float: left !important; }
.text-right { text-align: right !important; }
.text-left { text-align: left !important; }
.hidden { display: none !important; }
.help-block { display: block; margin-top: .25rem; color: var(--bs-secondary-color); }
.control-label { font-weight: 600; margin-bottom: .35rem; }
.form-group { margin-bottom: 1rem; }
.img-responsive { display: block; max-width: 100%; height: auto; }
.table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.validation-summary-errors, .field-validation-error { color: var(--bs-danger); }
.input-validation-error { border-color: var(--bs-danger) !important; }
@media (min-width: 0) {
  .col-xs-1 { width: 8.333333%; } .col-xs-2 { width: 16.666667%; }
  .col-xs-3 { width: 25%; } .col-xs-4 { width: 33.333333%; }
  .col-xs-5 { width: 41.666667%; } .col-xs-6 { width: 50%; }
  .col-xs-7 { width: 58.333333%; } .col-xs-8 { width: 66.666667%; }
  .col-xs-9 { width: 75%; } .col-xs-10 { width: 83.333333%; }
  .col-xs-11 { width: 91.666667%; } .col-xs-12 { width: 100%; }
}

/* MatDash index2 application-page normalization. */
.schools-page-heading .breadcrumb { --bs-breadcrumb-divider: '/'; }
.schools-page-content > .panel,
.schools-page-content .panel.panel-default,
.schools-page-content .panel.panel-primary,
.schools-page-content .panel.panel-info,
.schools-page-content .panel.panel-success,
.schools-page-content .panel.panel-warning,
.schools-page-content .panel.panel-danger {
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-xl, .75rem);
  box-shadow: var(--bs-box-shadow-sm);
  margin-bottom: 1.5rem;
}
.schools-page-content .panel-heading {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--bs-border-color);
  font-weight: 600;
  background: transparent;
}
.schools-page-content .panel-body { padding: 1.25rem; }
.schools-page-content .panel-footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--bs-border-color);
  background: transparent;
}
.schools-page-content .well {
  padding: 1rem;
  background: var(--bs-tertiary-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: var(--bs-border-radius-lg, .5rem);
}
.schools-page-content .btn-default {
  --bs-btn-color: var(--bs-body-color);
  --bs-btn-bg: var(--bs-body-bg);
  --bs-btn-border-color: var(--bs-border-color);
  --bs-btn-hover-bg: var(--bs-tertiary-bg);
  --bs-btn-hover-border-color: var(--bs-border-color);
}
.schools-page-content table.table { vertical-align: middle; }
.schools-page-content .table > thead > tr > th { font-weight: 600; }
.schools-page-content input.form-control,
.schools-page-content select.form-control,
.schools-page-content textarea.form-control,
.schools-page-content .form-select { border-radius: .5rem; }


/* ========================================================================
   SchoolsBox MatDash index2 dashboard
   ======================================================================== */
.schools-dashboard .page-content-wrapper,
.schools-dashboard .page-content { padding: 0 !important; margin: 0 !important; min-height: 0 !important; }
.schools-dashboard .page-title,
.schools-dashboard .page-bar { display: none !important; }
.schools-dashboard > .row,
.schools-dashboard .page-content > .row { --bs-gutter-x: 1.5rem; --bs-gutter-y: 1.5rem; margin-bottom: 0 !important; }
.schools-dashboard [class*="col-"] { margin-bottom: 0; }

/* Legacy stat widgets rendered as MatDash index2 cards. */
.schools-dashboard .widget.stats-widget,
.schools-dashboard .dashboard-stat,
.schools-dashboard .panel-metric {
  height: 100%;
  min-height: 150px;
  background: var(--bs-body-bg) !important;
  border: 1px solid var(--bs-border-color) !important;
  border-radius: 16px !important;
  box-shadow: 0 2px 10px rgba(0,0,0,.04) !important;
  overflow: hidden;
  color: var(--bs-body-color) !important;
  position: relative;
}
.schools-dashboard .widget.stats-widget .widget-body,
.schools-dashboard .dashboard-stat .details,
.schools-dashboard .panel-metric .panel-body { padding: 20px 20px 12px !important; background: transparent !important; }
.schools-dashboard .widget.stats-widget .widget-title,
.schools-dashboard .dashboard-stat .number,
.schools-dashboard .panel-metric .value {
  font-size: 1.45rem !important;
  line-height: 1.25;
  font-weight: 700 !important;
  color: var(--bs-heading-color, var(--bs-body-color)) !important;
  margin: 0 0 .4rem !important;
}
.schools-dashboard .widget.stats-widget small,
.schools-dashboard .dashboard-stat .desc,
.schools-dashboard .panel-metric header h4 { color: var(--bs-secondary-color) !important; font-size: .875rem !important; font-weight: 500; }
.schools-dashboard .widget.stats-widget .big-icon,
.schools-dashboard .dashboard-stat .visual,
.schools-dashboard .panel-metric .icon {
  position: absolute; right: 18px; top: 18px; width: 46px; height: 46px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px; background: rgba(var(--bs-primary-rgb), .1); color: var(--bs-primary);
  font-size: 1.35rem;
}
.schools-dashboard .dashboard-stat .visual i { margin: 0 !important; font-size: 1.35rem !important; color: inherit !important; opacity: 1 !important; }
.schools-dashboard .widget.stats-widget .widget-footer,
.schools-dashboard .dashboard-stat .more {
  display: flex !important; align-items: center; justify-content: space-between;
  padding: 10px 20px !important; margin-top: auto;
  border-top: 1px solid var(--bs-border-color); background: transparent !important;
  color: var(--bs-primary) !important; text-decoration: none;
}
.schools-dashboard .widget.stats-widget .widget-footer a { color: var(--bs-primary) !important; text-decoration: none; font-weight: 600; }

/* Dashboard panels/charts/calendar/activity use the same MatDash card language. */
.schools-dashboard .portlet,
.schools-dashboard .panel,
.schools-dashboard .card,
.schools-dashboard .widget:not(.stats-widget) {
  border: 1px solid var(--bs-border-color) !important;
  border-radius: 16px !important;
  background: var(--bs-body-bg) !important;
  box-shadow: 0 2px 10px rgba(0,0,0,.04) !important;
  overflow: hidden;
  margin-bottom: 1.5rem;
}
.schools-dashboard .portlet > .portlet-title,
.schools-dashboard .portlet > .caption,
.schools-dashboard .panel-heading,
.schools-dashboard .widget-header {
  padding: 18px 20px !important; border-bottom: 1px solid var(--bs-border-color) !important;
  background: transparent !important; color: var(--bs-heading-color, var(--bs-body-color)) !important;
}
.schools-dashboard .portlet-body,
.schools-dashboard .panel-body,
.schools-dashboard .widget-body { padding: 20px !important; }
.schools-dashboard table { background: transparent; }
.schools-dashboard .table > :not(caption) > * > * { padding: .85rem .9rem; }
.schools-dashboard .progress { height: 8px; border-radius: 999px; }
.schools-dashboard canvas, .schools-dashboard svg { max-width: 100%; }

/* ========================================================================
   Global MatDash index2 form adaptation
   ======================================================================== */
.schools-page-content .schools-form-surface {
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 16px;
  box-shadow: 0 2px 10px rgba(0,0,0,.04);
  padding: 24px;
  margin-bottom: 1.5rem;
}
.schools-page-content .schools-form .form-group,
.schools-page-content .schools-form .control-group { margin-bottom: 1.15rem; }
.schools-page-content .schools-form .form-label,
.schools-page-content .schools-form .control-label { font-weight: 600; color: var(--bs-heading-color, var(--bs-body-color)); margin-bottom: .45rem; }
.schools-page-content .schools-form .form-control,
.schools-page-content .schools-form .form-select,
.schools-page-content .schools-form .select2-container .select2-choice,
.schools-page-content .schools-form .select2-container .select2-selection {
  min-height: 44px;
  border-radius: 10px !important;
  border-color: var(--bs-border-color) !important;
  background-color: var(--bs-body-bg);
  box-shadow: none !important;
}
.schools-page-content .schools-form textarea.form-control { min-height: 110px; }
.schools-page-content .schools-form .form-control:focus,
.schools-page-content .schools-form .form-select:focus {
  border-color: rgba(var(--bs-primary-rgb), .65) !important;
  box-shadow: 0 0 0 .2rem rgba(var(--bs-primary-rgb), .10) !important;
}
.schools-page-content .schools-form .form-actions {
  border-top: 1px solid var(--bs-border-color);
  padding-top: 1.25rem;
  margin-top: 1.5rem;
  background: transparent !important;
}
.schools-page-content .schools-form .btn { min-height: 40px; border-radius: 9px; font-weight: 600; padding-inline: 1rem; }
.schools-page-content .schools-form .input-group-text { border-radius: 10px; background: var(--bs-tertiary-bg); }
.schools-page-content .schools-form .form-check-input { width: 1.15rem; height: 1.15rem; margin-top: .2rem; }
.schools-page-content .schools-form .help-block,
.schools-page-content .schools-form .form-text { font-size: .8125rem; color: var(--bs-secondary-color); }
.schools-page-content .schools-form .validation-summary-errors {
  border: 1px solid rgba(var(--bs-danger-rgb), .25); background: rgba(var(--bs-danger-rgb), .08);
  padding: 1rem; border-radius: 10px; margin-bottom: 1rem;
}
.schools-page-content .schools-form fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; }
.schools-page-content .schools-form legend { font-size: 1.05rem; font-weight: 700; padding-bottom: .75rem; margin-bottom: 1rem; border-bottom: 1px solid var(--bs-border-color); }

/* Sidebar: chevron belongs only to nodes that actually own a child menu. */
.sidebar-menu .sidebar-link:not(.has-arrow) .menu-chevron { display: none !important; }
.sidebar-menu .sidebar-link.has-arrow .menu-chevron { transition: transform .2s ease; }
.sidebar-menu .sidebar-link.has-arrow[aria-expanded="true"] .menu-chevron { transform: rotate(180deg); }
.sidebar-menu .first-level { list-style: none; padding-left: 14px; }
.sidebar-menu .first-level .sidebar-link { padding-left: 34px; }

@media (max-width: 767.98px) {
  .schools-page-content .schools-form-surface { padding: 18px; border-radius: 12px; }
  .schools-dashboard .widget.stats-widget, .schools-dashboard .dashboard-stat, .schools-dashboard .panel-metric { min-height: 135px; }
}


/* ========================================================================
   v22 MatDash listing/grid and shell polish
   ======================================================================== */
.schools-page-content .page-content { padding: 0 !important; margin: 0 !important; min-height: 0 !important; }
.schools-page-content .page-title,
.schools-page-content .page-breadcrumb.breadcrumb { margin-top: 0; }
.schools-provisioning-page .schools-list-card { border-radius: 18px; overflow: visible; background: var(--bs-body-bg); }
.schools-provisioning-page .schools-grid-toolbar { padding: 14px 16px; border: 1px solid var(--bs-border-color); border-radius: 12px; background: var(--bs-tertiary-bg); }
.schools-provisioning-page .schools-search-wrap { width: min(100%, 320px); }
.schools-provisioning-page .schools-page-size { width: 84px; }
.schools-provisioning-page .schools-grid-wrap { border: 1px solid var(--bs-border-color); border-radius: 12px; overflow: hidden; }
.schools-provisioning-page #schoolsTable thead th { background: var(--bs-tertiary-bg); color: var(--bs-secondary-color); font-size: .78rem; text-transform: uppercase; letter-spacing: .035em; white-space: nowrap; border-bottom: 1px solid var(--bs-border-color); }
.schools-provisioning-page #schoolsTable > :not(caption) > * > * { padding: .9rem 1rem; }
.schools-provisioning-page .school-avatar { width: 42px; height: 42px; flex: 0 0 42px; }
.schools-provisioning-page .schools-action-button { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; }
.schools-provisioning-page .round-40 { width: 40px; height: 40px; }
.schools-provisioning-page .round-56 { width: 56px; height: 56px; }
.schools-provisioning-page .pagination .page-link { min-width: 32px; text-align: center; border-radius: 8px; margin-left: 4px; }
.mvcgrid-toolbar { padding: 14px 16px; border: 1px solid var(--bs-border-color); border-radius: 12px; background: var(--bs-tertiary-bg); }
.mvcgrid-toolbar .mvcgrid-search { width: min(100%, 320px); }
.mvcgrid-compat { min-height: 0 !important; margin: 0 !important; padding: 0 !important; }

/* Tighter Index2 shell/sidebar rhythm. */
.left-sidebar .sidebar-nav { padding-top: 8px; }
.sidebar-menu .sidebar-item { margin-bottom: 2px; }
.sidebar-menu .sidebar-link { min-height: 42px; padding-top: 9px; padding-bottom: 9px; border-radius: 10px; }
.sidebar-menu .nav-small-cap { padding-top: 16px; padding-bottom: 8px; }
.sidebar-menu .sidebar-divider { margin-block: 10px; }
.schools-profile-avatar { background: var(--bs-tertiary-bg); border: 1px solid var(--bs-border-color); }

@media (max-width: 991.98px) {
  .schools-provisioning-page .schools-grid-toolbar { align-items: stretch !important; }
  .schools-provisioning-page .schools-search-wrap, .mvcgrid-toolbar .mvcgrid-search { width: 100%; }
}

/* Shared MatDash grids, tabs, charts and AJAX partial states. */
.schools-page-content .schools-datagrid-card,
.schools-page-content .schools-tab-card,
.schools-page-content .schools-chart-card {
  border: 1px solid var(--bs-border-color); border-radius: 16px; overflow: hidden;
  box-shadow: 0 2px 10px rgba(0,0,0,.04); background: var(--bs-body-bg);
}
.schools-page-content .dataTables_wrapper .dataTables_filter input,
.schools-page-content .dataTables_wrapper .dataTables_length select {
  border: 1px solid var(--bs-border-color); border-radius: 9px; padding: .45rem .7rem; background: var(--bs-body-bg); color: var(--bs-body-color);
}
.schools-page-content .dataTables_wrapper .dataTables_paginate .paginate_button { border-radius: 8px !important; }
.schools-page-content .nav-tabs { gap: .25rem; border-bottom-color: var(--bs-border-color); }
.schools-page-content .nav-tabs .nav-link { border-radius: 10px 10px 0 0; color: var(--bs-secondary-color); font-weight: 600; }
.schools-page-content .nav-tabs .nav-link.active { color: var(--bs-primary); background: rgba(var(--bs-primary-rgb), .08); border-color: var(--bs-border-color) var(--bs-border-color) var(--bs-body-bg); }
.schools-page-content .tab-content { padding-top: 1.25rem; }
.schools-page-content .apexcharts-canvas { margin-inline: auto; max-width: 100%; }
.schools-page-content [aria-busy="true"] { min-height: 180px; opacity: .72; pointer-events: none; }
.schools-score-input { min-width: 110px; }
.schools-score-state { white-space: normal; max-width: 180px; }

/* ========================================================================
   MatDash Index2 KPI cards - v23
   Keep real dashboard metrics; do not fabricate trend percentages.
   ======================================================================== */
.schools-dashboard .dashboard-stat,
.schools-dashboard .widget.stats-widget,
.schools-dashboard .panel-metric {
  min-height: 178px !important;
  border: 0 !important;
  border-radius: 14px !important;
  background: #fff !important;
  box-shadow: 0 1px 3px rgba(15,23,42,.04), 0 8px 24px rgba(15,23,42,.04) !important;
  padding: 22px 24px 18px !important;
  display: grid !important;
  grid-template-columns: 48px minmax(0,1fr) auto;
  grid-template-rows: auto 1fr auto;
  column-gap: 14px;
  row-gap: 12px;
  align-items: center;
}

/* old Metronic dashboard-stat structure */
.schools-dashboard .dashboard-stat .visual {
  position: static !important;
  grid-column: 1;
  grid-row: 1;
  width: 48px !important;
  height: 48px !important;
  margin: 0 !important;
  border-radius: 12px !important;
  background: #ffe0e8 !important;
  color: #ff5b8a !important;
  display: flex !important;
  align-items: center;
  justify-content: center;
}
.schools-dashboard .dashboard-stat.green .visual { background:#def7ec !important; color:#13b97f !important; }
.schools-dashboard .dashboard-stat.yellow .visual { background:#fff1cc !important; color:#e8a317 !important; }
.schools-dashboard .dashboard-stat.purple .visual { background:#eee6ff !important; color:#7b61ff !important; }
.schools-dashboard .dashboard-stat.blue .visual,
.schools-dashboard .dashboard-stat.blue-madison .visual { background:#e8efff !important; color:#5d72ff !important; }
.schools-dashboard .dashboard-stat .visual i {
  font-size: 1.15rem !important;
  width: auto !important;
  height: auto !important;
  margin: 0 !important;
}
.schools-dashboard .dashboard-stat .details {
  position: static !important;
  grid-column: 2 / 4;
  grid-row: 1 / 3;
  padding: 0 !important;
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  align-self: stretch;
}
.schools-dashboard .dashboard-stat .details .desc {
  order: -1;
  font-size: .95rem !important;
  line-height: 1.3 !important;
  font-weight: 500 !important;
  color: #253047 !important;
  margin: 11px 0 24px !important;
  text-align: left !important;
  text-transform: none !important;
}
.schools-dashboard .dashboard-stat .details .number {
  margin: 0 !important;
  padding: 0 !important;
  font-size: 1.65rem !important;
  line-height: 1.1 !important;
  font-weight: 600 !important;
  letter-spacing: -.02em;
  color: #111827 !important;
  text-align: left !important;
}
.schools-dashboard .dashboard-stat .details .number small {
  font-size: inherit !important;
  font-weight: inherit !important;
  color: inherit !important;
}
.schools-dashboard .dashboard-stat .more {
  grid-column: 1 / 4;
  grid-row: 3;
  border: 0 !important;
  padding: 0 !important;
  margin: 0 !important;
  background: transparent !important;
  color: #17b26a !important;
  font-size: .82rem !important;
  font-weight: 600 !important;
  justify-self: start;
  min-height: 20px;
}
.schools-dashboard .dashboard-stat .more i { display:none !important; }

/* newer stats-widget structure */
.schools-dashboard .widget.stats-widget .widget-body {
  grid-column: 1 / 4;
  grid-row: 1 / 3;
  padding: 0 !important;
  display: grid !important;
  grid-template-columns: 48px minmax(0,1fr);
  grid-template-rows: auto auto;
  column-gap: 14px;
  row-gap: 20px;
  align-items: center;
}
.schools-dashboard .widget.stats-widget .pull-left {
  grid-column: 2;
  grid-row: 1 / 3;
  display: flex !important;
  flex-direction: column;
  min-width: 0;
}
.schools-dashboard .widget.stats-widget .pull-left small {
  order: -1;
  margin: 10px 0 24px !important;
  font-size: .95rem !important;
  color: #253047 !important;
  font-weight: 500 !important;
}
.schools-dashboard .widget.stats-widget .widget-title {
  margin: 0 !important;
  font-size: 1.65rem !important;
  line-height: 1.1 !important;
  font-weight: 600 !important;
  letter-spacing: -.02em;
  color: #111827 !important;
}
.schools-dashboard .widget.stats-widget .big-icon {
  position: static !important;
  grid-column: 1;
  grid-row: 1;
  width: 48px !important;
  height: 48px !important;
  margin: 0 !important;
  border-radius: 12px !important;
  background: #e8efff !important;
  color: #5d72ff !important;
  display:flex !important;
  align-items:center;
  justify-content:center;
}
.schools-dashboard .widget.stats-widget .big-icon i { font-size:1.15rem !important; }
.schools-dashboard .widget.stats-widget .widget-footer {
  grid-column: 1 / 4;
  grid-row: 3;
  border:0 !important;
  padding:0 !important;
  margin:0 !important;
  background:transparent !important;
  min-height:20px;
}
.schools-dashboard .widget.stats-widget .widget-footer a,
.schools-dashboard .widget.stats-widget .widget-footer a[style] {
  color:#17b26a !important;
  font-size:.82rem !important;
  font-weight:600 !important;
}

/* Grid gutters and responsive behavior closer to index2 cards. */
.schools-dashboard > .row,
.schools-dashboard .page-content > .row {
  --bs-gutter-x: 1.25rem !important;
  --bs-gutter-y: 1.25rem !important;
}
@media (max-width: 767.98px) {
  .schools-dashboard .dashboard-stat,
  .schools-dashboard .widget.stats-widget,
  .schools-dashboard .panel-metric { min-height: 160px !important; }
}

/* Sidebar icon alignment - v23 */
.left-sidebar .sidebar-link iconify-icon:first-child {
  width: 22px;
  min-width: 22px;
  height: 22px;
  font-size: 1.25rem;
  display:inline-flex;
  align-items:center;
  justify-content:center;
}
.left-sidebar .sidebar-link .hide-menu { margin-left: 10px; }


/* ============================================================
   v25 - Fluid / full-width application layout
   Keep the MatDash sidebar fixed while allowing the page content
   and provisioning grids to grow with the viewport.
   ============================================================ */
html[data-boxed-layout="full"] .page-wrapper > .container-fluid,
html[data-boxed-layout="full"] .body-wrapper > .container-fluid,
html[data-boxed-layout="full"] .body-wrapper .container-fluid {
  max-width: none !important;
  width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.body-wrapper > .container-fluid {
  width: 100%;
  max-width: none;
}

.schools-page-heading,
.schools-provisioning-page,
.schools-provisioning-page .schools-list-card {
  width: 100%;
  max-width: none !important;
}

.schools-provisioning-page .schools-list-card .card-body {
  width: 100%;
}

.schools-provisioning-page .schools-grid-toolbar {
  width: 100%;
}

.schools-provisioning-page .schools-grid-wrap {
  width: 100%;
}

.schools-provisioning-page #schoolsTable {
  width: 100%;
  min-width: 900px;
}

@media (min-width: 1300px) {
  .body-wrapper > .container-fluid {
    padding-left: clamp(22px, 2vw, 36px);
    padding-right: clamp(22px, 2vw, 36px);
  }
}

@media (min-width: 1800px) {
  .schools-provisioning-page .schools-search-wrap {
    width: min(100%, 420px);
  }
}


/* ============================================================
   v26 - App-wide null-safe UI + dashboard flow + secure rich text
   ============================================================ */
.schools-dashboard-intro {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:1rem;
  padding:1.25rem 1.5rem;
  border:1px solid var(--bs-border-color);
  border-radius:16px;
  background:var(--bs-body-bg);
  box-shadow:0 2px 10px rgba(0,0,0,.035);
}
.schools-dashboard-intro h2 { font-size:1.45rem; font-weight:700; letter-spacing:-.02em; }

/* Let dashboard rows flow naturally across the available viewport. */
.schools-dashboard .page-content-wrapper,
.schools-dashboard .page-content { width:100%; max-width:none !important; }
.schools-dashboard .page-content > .row,
.schools-dashboard > .row {
  display:flex;
  flex-wrap:wrap;
  align-items:stretch;
  margin-left:calc(var(--bs-gutter-x, 1.25rem) * -.5) !important;
  margin-right:calc(var(--bs-gutter-x, 1.25rem) * -.5) !important;
}
.schools-dashboard .page-content > .row > [class*="col-"],
.schools-dashboard > .row > [class*="col-"] { display:flex; }
.schools-dashboard .page-content > .row > [class*="col-"] > *,
.schools-dashboard > .row > [class*="col-"] > * { width:100%; }
.schools-dashboard .widget.stats-widget,
.schools-dashboard .dashboard-stat,
.schools-dashboard .panel-metric { height:100%; width:100%; }

/* Rich text replacement for insecure CKEditor 4. */
.schools-richtext {
  border:1px solid var(--bs-border-color);
  border-radius:12px;
  overflow:hidden;
  background:var(--bs-body-bg);
  box-shadow:0 1px 3px rgba(0,0,0,.03);
}
.schools-richtext-toolbar {
  display:flex;
  flex-wrap:wrap;
  gap:.4rem;
  align-items:center;
  padding:.65rem .75rem;
  background:var(--bs-tertiary-bg);
  border-bottom:1px solid var(--bs-border-color);
}
.schools-richtext-toolbar .btn { min-height:32px !important; padding:.25rem .55rem !important; border-radius:7px !important; }
.schools-richtext-separator { width:1px; height:24px; background:var(--bs-border-color); margin:0 .15rem; }
.schools-richtext-editor {
  min-height:220px;
  padding:1rem;
  outline:none;
  line-height:1.6;
  color:var(--bs-body-color);
  background:var(--bs-body-bg);
  overflow:auto;
}
.schools-richtext-editor:focus { box-shadow:inset 0 0 0 2px rgba(var(--bs-primary-rgb), .08); }
.schools-richtext-editor:empty:before { content:'Start typing…'; color:var(--bs-secondary-color); pointer-events:none; }

/* Null/empty visual conformity: do not let missing values collapse grids/forms. */
.schools-null-placeholder { color:var(--bs-secondary-color); font-style:italic; }
.table td:empty::after, .schools-detail-value:empty::after { content:'—'; color:var(--bs-secondary-color); }

@media (max-width: 767.98px) {
  .schools-dashboard-intro { padding:1rem; border-radius:12px; }
  .schools-richtext-editor { min-height:180px; }
}


/* ========================================================================
   v27 application-wide form alignment and account security UI
   ======================================================================== */
.schools-page-content .schools-form { width: 100%; }
.schools-page-content .schools-form .schools-field-row {
  display: grid;
  grid-template-columns: minmax(150px, 220px) minmax(0, 1fr);
  gap: .65rem 1.25rem;
  align-items: start;
  margin-bottom: 1.15rem;
}
.schools-page-content .schools-form .schools-field-label { margin: .7rem 0 0 !important; padding: 0 !important; width: auto !important; float: none !important; text-align: left !important; }
.schools-page-content .schools-form .schools-field-control { min-width: 0; width: 100% !important; margin: 0 !important; float: none !important; }
.schools-page-content .schools-form .schools-field-control[class*="col-"] { max-width: none !important; flex: none !important; }
.schools-page-content .schools-form .row > [class*="col-"] { margin-bottom: .8rem; }
.schools-page-content .schools-form input:not([type=checkbox]):not([type=radio]):not([type=hidden]):not([type=submit]),
.schools-page-content .schools-form select,
.schools-page-content .schools-form textarea { width: 100%; max-width: 100%; }
.schools-page-content .schools-form .field-validation-error { display: block; margin-top: .35rem; }
.schools-page-content .schools-form .validation-summary-errors ul { margin-bottom: 0; }
.account-manage-page .card { border-radius: 16px; }
.account-manage-page .round-48 { width: 48px; height: 48px; flex: 0 0 48px; }
.account-password-form .form-control { min-height: 46px; }
@media (max-width: 767.98px) {
  .schools-page-content .schools-form .schools-field-row { grid-template-columns: 1fr; gap: .4rem; }
  .schools-page-content .schools-form .schools-field-label { margin-top: 0 !important; }
}

/* ========================================================================
   v29 dashboard spacing / flow correction
   Prevent adjacent dashboard rows and cards from visually sticking together.
   ======================================================================== */
.schools-dashboard .page-content {
  display: block;
}

/* Keep every dashboard content row clearly separated from the next one. */
.schools-dashboard .page-content > .row,
.schools-dashboard > .row {
  row-gap: 1.5rem !important;
}

.schools-dashboard .page-content > .row + .row,
.schools-dashboard > .row + .row {
  margin-top: 1.5rem !important;
}

/* Metric cards need their own breathing room even when legacy Bootstrap rows wrap. */
.schools-dashboard .page-content > .row > [class*="col-"]:has(.stats-widget),
.schools-dashboard > .row > [class*="col-"]:has(.stats-widget),
.schools-dashboard .page-content > .row > [class*="col-"]:has(.dashboard-stat),
.schools-dashboard > .row > [class*="col-"]:has(.dashboard-stat) {
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

.schools-dashboard .widget.stats-widget,
.schools-dashboard .dashboard-stat,
.schools-dashboard .panel-metric {
  margin: 0 !important;
  border: 1px solid var(--bs-border-color-translucent, rgba(0,0,0,.08)) !important;
  box-shadow: 0 2px 10px rgba(17,24,39,.035) !important;
}

/* Secondary dashboard widgets such as Streams and Calendar should not touch the metric grid. */
.schools-dashboard .widget:not(.stats-widget),
.schools-dashboard .panel:not(.panel-metric),
.schools-dashboard .portlet {
  margin-bottom: 0 !important;
}

.schools-dashboard .page-content > .row:has(.widget:not(.stats-widget)),
.schools-dashboard .page-content > .row:has(.portlet),
.schools-dashboard .page-content > .row:has(.panel:not(.panel-metric)) {
  align-items: stretch;
}

.schools-dashboard .page-content > .row:has(.widget:not(.stats-widget)) > [class*="col-"],
.schools-dashboard .page-content > .row:has(.portlet) > [class*="col-"],
.schools-dashboard .page-content > .row:has(.panel:not(.panel-metric)) > [class*="col-"] {
  display: flex;
}

.schools-dashboard .page-content > .row:has(.widget:not(.stats-widget)) > [class*="col-"] > *,
.schools-dashboard .page-content > .row:has(.portlet) > [class*="col-"] > *,
.schools-dashboard .page-content > .row:has(.panel:not(.panel-metric)) > [class*="col-"] > * {
  width: 100%;
}

@media (max-width: 767.98px) {
  .schools-dashboard .page-content > .row + .row,
  .schools-dashboard > .row + .row {
    margin-top: 1rem !important;
  }

  .schools-dashboard .page-content > .row,
  .schools-dashboard > .row {
    row-gap: 1rem !important;
  }
}

/* v30 - MatDash School Settings workspace */
.settings-page { width: 100%; }
.settings-shell { border-radius: 18px; overflow: hidden; }
.settings-tabs { background: var(--bs-body-bg, #fff); }
.settings-tabs .nav { scrollbar-width: thin; }
.settings-tabs .nav-link {
    border-radius: 10px;
    white-space: nowrap;
    color: var(--bs-secondary-color, #5a6a85);
    padding: .7rem 1rem;
    font-weight: 600;
}
.settings-tabs .nav-link:hover { background: rgba(var(--bs-primary-rgb), .07); color: var(--bs-primary); }
.settings-tabs .nav-link.active { background: rgba(var(--bs-primary-rgb), .12); color: var(--bs-primary); }
.settings-tab-content { min-height: 0 !important; }
.settings-tab-content > .tab-pane { min-height: 0 !important; }
.settings-section-heading { max-width: 760px; }
.settings-logo-preview { width: 150px; height: 110px; object-fit: contain; background: #fff; }
.matdash-settings-form { max-width: 1200px; }
.matdash-settings-form .form-control,
.matdash-settings-form .form-select { min-height: 44px; }
.matdash-settings-form textarea.form-control { min-height: 110px; }
@media (max-width: 767.98px) {
    .settings-shell { border-radius: 14px; }
    .settings-tabs { padding-left: .75rem !important; padding-right: .75rem !important; }
    .settings-tab-content { padding: 1rem !important; }
}

/* ========================================================================
   v31 canonical MatDash page headers
   The master layout owns page title/breadcrumb presentation app-wide.
   Legacy MVC3/Bootstrap page bars and duplicate page titles are suppressed.
   ======================================================================== */
.schools-page-heading {
  width: 100%;
  min-width: 0;
  padding: 0;
  margin-bottom: 1.25rem !important;
}
.schools-page-heading-copy { min-width: 0; }
.schools-page-heading h4 {
  font-size: clamp(1.25rem, 1.1rem + .35vw, 1.6rem);
  line-height: 1.25;
  letter-spacing: -.02em;
}
.schools-page-heading .breadcrumb {
  --bs-breadcrumb-divider-color: var(--bs-secondary-color);
  font-size: .875rem;
  gap: .15rem;
}
.schools-page-heading .breadcrumb-item + .breadcrumb-item::before { opacity: .6; }
.schools-page-heading-actions:empty { display: none; }

/* The MatDash master page already renders these. Do not allow the old
   Metronic/MVC layout fragments to create duplicated headers such as
   "HomeReport Template" inside page content. */
.schools-page-content .page-bar,
.schools-page-content .page-title,
.schools-page-content > .row .page-breadcrumb.breadcrumb,
.schools-page-content > .row ul.page-breadcrumb {
  display: none !important;
}

/* Remove spacing that existed only to accommodate the old page-bar. */
.schools-page-content .page-bar + br,
.schools-page-content .page-title + br { display: none !important; }
.schools-page-content > .row:first-child { margin-top: 0 !important; }

/* Legacy pages often put a page action immediately above their first panel.
   Keep it visually connected to the content when it has not opted into a
   dedicated MatDash header action. */
.schools-page-content > .row > [class*="col-"] > .row:first-child:has(> [class*="col-"] > .btn),
.schools-page-content > .row > [class*="col-"] > .btn:first-child {
  margin-bottom: 1rem;
}

@media (max-width: 767.98px) {
  .schools-page-heading { align-items: flex-start !important; }
  .schools-page-heading-actions { width: 100%; }
  .schools-page-heading-actions .btn { width: 100%; }
}
.report-template-page { width: 100%; }
.report-template-card { border-radius: 18px; overflow: hidden; }
.report-template-card .round-48 { width: 48px; height: 48px; flex: 0 0 48px; }
.report-template-card .mvc-grid-toolbar,
.report-template-card .mvcgrid-toolbar { margin-bottom: 1rem; }


/* ========================================================================
   v74 - MatDash authoritative UI normalization
   ======================================================================== */
.schools-page-content .page-bar,
.schools-page-content .page-breadcrumb { display:none !important; }
.schools-page-content > .page-content,
.schools-page-content .page-content { padding:0 !important; min-height:0 !important; background:transparent !important; }
.schools-page-content .panel { border-radius:14px !important; border:1px solid var(--bs-border-color) !important; box-shadow:0 2px 10px rgba(15,23,42,.04) !important; overflow:hidden; }
.schools-page-content .panel-heading { padding:18px 20px !important; }
.schools-page-content .panel-title { font-size:1.15rem; font-weight:700; margin:0; }
.schools-page-content .panel-body { padding:20px !important; }
.schools-kpi-card { border-radius:16px !important; background:var(--bs-body-bg); }
.schools-kpi-icon { width:48px; height:48px; flex:0 0 48px; }
.schools-kpi-card h3 { color:var(--bs-heading-color); letter-spacing:-.02em; }
.schools-dashboard .row { row-gap:1.5rem; }
.mvcgrid-toolbar { padding:16px; background:var(--bs-tertiary-bg); border:1px solid var(--bs-border-color); border-radius:12px; }
.schools-server-grid { min-height:220px; }
.schools-server-grid .table-responsive { border:1px solid var(--bs-border-color); border-radius:12px; overflow:hidden; }
.schools-server-grid .table thead th { background:var(--bs-tertiary-bg); border-bottom:1px solid var(--bs-border-color); white-space:nowrap; }
.schools-server-grid .schools-grid-sort { cursor:pointer; user-select:none; }
.schools-server-grid .page-link { border-radius:8px; margin-inline:2px; }
.schools-profile-avatar { background:var(--bs-tertiary-bg); }

/* v74 dashboard/theme finishing */
.schools-dashboard-card { border-radius:16px !important; overflow:hidden; }
.schools-dashboard-card .card-title { font-weight:700; letter-spacing:-.015em; }
.schools-stream-list { max-height:360px; overflow:auto; }
.schools-stream-list > :last-child { border-bottom:0 !important; }
.schools-dashboard .schools-kpi-card, .schools-dashboard .schools-dashboard-card { margin-bottom:0 !important; }
.schools-page-content .widget { border-radius:16px; border:1px solid var(--bs-border-color); background:var(--bs-body-bg); box-shadow:0 2px 10px rgba(15,23,42,.04); }
.schools-page-content .widget-header, .schools-page-content .widget-body { padding-left:1.25rem; padding-right:1.25rem; }
.schools-page-content .widget-header { padding-top:1.25rem; }
.schools-page-content .widget-title { font-weight:700; }

.schools-dashboard-hero { border-radius:16px !important; background:linear-gradient(135deg, rgba(var(--bs-primary-rgb),.08), rgba(var(--bs-primary-rgb),.02)); }

/* ========================================================================
   SchoolsBox MatDash flow layout - v75
   Keep content flowing across the available page width instead of constraining
   migrated screens to a legacy centered panel width.
   ======================================================================== */
.schools-flow-layout > .container-fluid {
  max-width: none !important;
  width: 100% !important;
  padding-inline: clamp(18px, 2vw, 32px) !important;
}
.schools-flow-layout .schools-page-content {
  width: 100%;
  min-width: 0;
}
.left-sidebar .brand-logo .sidebartoggler[aria-label="Close sidebar"] iconify-icon {
  color: var(--bs-secondary-color);
  transition: color .2s ease, transform .2s ease;
}
.left-sidebar .brand-logo .sidebartoggler[aria-label="Close sidebar"]:hover iconify-icon {
  color: var(--bs-primary);
  transform: rotate(90deg);
}
.sidebar-menu > li > .sidebar-divider.lg {
  margin-top: .35rem;
  margin-bottom: .75rem;
}

/* ========================================================================
   v91 - deterministic sidebar collapse
   Desktop mini mode remains an opaque 80px rail and never opens the mobile
   backdrop or expands across the page merely because the pointer moved.
   ======================================================================== */
.left-sidebar {
  background-color: var(--bs-body-bg) !important;
  border-right: 1px solid var(--bs-border-color);
}
.schools-mobile-sidebar-toggle { display: none !important; }

@media (min-width: 1300px) {
  body[data-sidebartype="mini-sidebar"].link-sidebar .left-sidebar,
  body[data-sidebartype="mini-sidebar"].link-sidebar .left-sidebar:hover {
    width: 80px !important;
    background-color: var(--bs-body-bg) !important;
    box-shadow: none !important;
  }
  body[data-sidebartype="mini-sidebar"].link-sidebar .page-wrapper {
    margin-left: 80px !important;
  }
  body[data-sidebartype="mini-sidebar"].link-sidebar .topbar {
    width: calc(100% - 80px) !important;
  }
  body[data-sidebartype="mini-sidebar"].link-sidebar .left-sidebar:hover .hide-menu,
  body[data-sidebartype="mini-sidebar"].link-sidebar .left-sidebar:hover .sidebar-ad,
  body[data-sidebartype="mini-sidebar"].link-sidebar .left-sidebar:hover .sidebar-nav .has-arrow::after {
    display: none !important;
  }
  body[data-sidebartype="mini-sidebar"].link-sidebar .left-sidebar:hover .nav-small-cap {
    text-align: center !important;
  }
  body[data-sidebartype="mini-sidebar"].link-sidebar .left-sidebar:hover .nav-small-cap .mini-icon {
    display: inline-block !important;
  }
  body[data-sidebartype="mini-sidebar"].link-sidebar .brand-logo {
    position: relative;
    justify-content: center !important;
    padding-inline: 0 !important;
  }
  body[data-sidebartype="mini-sidebar"].link-sidebar .brand-logo .logo-img,
  body[data-sidebartype="mini-sidebar"].link-sidebar .left-sidebar:hover .brand-logo .logo-img {
    width: 42px !important;
    margin: 0 !important;
    overflow: hidden !important;
  }
  body[data-sidebartype="mini-sidebar"].link-sidebar .brand-logo .sidebartoggler {
    position: absolute;
    top: 24px;
    right: -12px;
    width: 24px;
    height: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--bs-border-color);
    border-radius: 50%;
    background: var(--bs-body-bg);
    box-shadow: 0 2px 8px rgba(15, 23, 42, .12);
    z-index: 3;
  }
  #main-wrapper.show-sidebar + .dark-transparent {
    display: none !important;
  }
}

@media (max-width: 1299.98px) {
  .schools-mobile-sidebar-toggle { display: flex !important; }
}

/* ========================================================================
   v77 - topbar flow alignment + modal CRUD surfaces
   ======================================================================== */
.topbar > .with-vertical {
  width: 100% !important;
  max-width: none !important;
}
.topbar .schools-topbar-flow {
  width: 100% !important;
  max-width: none !important;
  padding-inline: clamp(18px, 2vw, 32px) !important;
}
@media (min-width: 1200px) {
  .topbar .schools-topbar-flow > .navbar-nav:first-child {
    margin-left: 0 !important;
  }
}

.schools-action-modal .modal-dialog,
#basic .modal-dialog {
  width: auto;
  max-width: min(760px, calc(100vw - 32px));
  margin: 1.75rem auto;
}
.schools-action-modal .modal-content,
#basic .modal-content {
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .22);
}
.schools-action-modal .modal-header,
#basic .modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--bs-border-color);
}
.schools-action-modal .modal-body,
#basic .modal-body {
  padding: 1.5rem;
}
.schools-action-modal .modal-footer,
#basic .modal-footer {
  padding: 1rem 1.5rem 1.25rem;
  border-top: 1px solid var(--bs-border-color);
  gap: .5rem;
}
.schools-action-modal .modal-body > .page-content,
.schools-action-modal .modal-body > .row,
.schools-action-modal .modal-body .panel,
.schools-action-modal .modal-body .card {
  margin-bottom: 0 !important;
}
.schools-action-modal .modal-body .page-content,
.schools-action-modal .modal-body .panel-body,
.schools-action-modal .modal-body .card-body {
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.schools-action-modal .modal-body .panel,
.schools-action-modal .modal-body .card {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}
.schools-action-modal .modal-body .panel-heading,
.schools-action-modal .modal-body .card-header {
  padding-left: 0 !important;
  padding-right: 0 !important;
  background: transparent !important;
}
.schools-action-modal .schools-field-row,
#basic .schools-field-row {
  margin-bottom: 1rem;
}
#basic .modal-title {
  font-weight: 700;
}
#basic .modal-body > .row {
  margin: 0;
}
#basic .modal-body > .row > * {
  padding-left: 0;
  padding-right: 0;
}
#basic input[type="file"] {
  width: 100%;
}
@media (max-width: 575.98px) {
  .schools-action-modal .modal-dialog,
  #basic .modal-dialog {
    max-width: calc(100vw - 16px);
    margin: .5rem auto;
  }
  .schools-action-modal .modal-body,
  #basic .modal-body {
    padding: 1rem;
  }
}

/* ========================================================================
   v78 - application-wide modal form parity
   Legacy Bootstrap 3 forms used floated col-lg/col-md widths. When those forms
   are loaded into the MatDash action modal, normalize them to a responsive
   label/control grid and let controls use the full modal width.
   ======================================================================== */
.schools-action-modal .modal-dialog.modal-lg {
  max-width: min(880px, calc(100vw - 32px));
}
.schools-action-modal .modal-dialog.modal-xl {
  max-width: min(1180px, calc(100vw - 32px));
}
.schools-action-modal .modal-body {
  padding: 1.5rem 1.75rem 1.75rem;
}
.schools-action-modal .schools-form,
.schools-action-modal .schools-crud-form,
#basic .schools-form,
#basic .schools-crud-form {
  width: 100%;
  max-width: none;
}
.schools-action-modal .schools-form .schools-field-row,
#basic .schools-form .schools-field-row {
  display: grid;
  grid-template-columns: minmax(145px, 190px) minmax(0, 1fr);
  gap: .55rem 1.25rem;
  align-items: start;
  margin-bottom: 1rem;
}
.schools-action-modal .schools-form .schools-field-label,
#basic .schools-form .schools-field-label {
  width: auto !important;
  max-width: none !important;
  float: none !important;
  padding: .68rem 0 0 !important;
  margin: 0 !important;
  text-align: left !important;
}
.schools-action-modal .schools-form .schools-field-control,
#basic .schools-form .schools-field-control,
.schools-action-modal .schools-form .schools-field-control[class*="col-"],
#basic .schools-form .schools-field-control[class*="col-"] {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  flex: none !important;
  float: none !important;
  margin: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.schools-action-modal .schools-form .form-control,
.schools-action-modal .schools-form .form-select,
.schools-action-modal .schools-crud-form .form-control,
.schools-action-modal .schools-crud-form .form-select,
#basic .schools-form .form-control,
#basic .schools-form .form-select {
  width: 100% !important;
  max-width: 100% !important;
  min-height: 44px;
  border-radius: 10px;
}
.schools-action-modal .schools-crud-form .form-label,
#basic .schools-crud-form .form-label {
  margin-bottom: .45rem;
  color: var(--bs-heading-color, var(--bs-body-color));
}
.schools-action-modal .schools-modal-form-actions {
  margin-bottom: 0;
}
.schools-action-modal .schools-crud-card {
  border: 0 !important;
  box-shadow: none !important;
}

@media (max-width: 767.98px) {
  .schools-action-modal .schools-form .schools-field-row,
  #basic .schools-form .schools-field-row {
    grid-template-columns: 1fr;
    gap: .35rem;
  }
  .schools-action-modal .schools-form .schools-field-label,
  #basic .schools-form .schools-field-label {
    padding-top: 0 !important;
  }
}

/* ========================================================================
   v81 - consistent inner-page forms and responsive MatDash modal layout
   ======================================================================== */
.schools-page-content .schools-form .schools-field-row,
.schools-action-modal .schools-form .schools-field-row,
#basic .schools-form .schools-field-row {
  display: grid;
  grid-template-columns: minmax(150px, 190px) minmax(0, 1fr);
  gap: .55rem 1.25rem;
  align-items: start;
  margin-bottom: 1rem;
}
.schools-page-content .schools-form .schools-field-label,
.schools-action-modal .schools-form .schools-field-label,
#basic .schools-form .schools-field-label {
  width: auto !important;
  max-width: none !important;
  float: none !important;
  padding: .68rem 0 0 !important;
  margin: 0 !important;
  text-align: left !important;
}
.schools-page-content .schools-form .schools-field-control,
.schools-page-content .schools-form .schools-field-control[class*="col-"],
.schools-action-modal .schools-form .schools-field-control,
.schools-action-modal .schools-form .schools-field-control[class*="col-"],
#basic .schools-form .schools-field-control,
#basic .schools-form .schools-field-control[class*="col-"] {
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  float: none !important;
  flex: none !important;
  margin: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.schools-page-content .schools-form .input-group,
.schools-action-modal .schools-form .input-group,
#basic .schools-form .input-group { width: 100%; }
.schools-page-content .schools-form .form-control,
.schools-page-content .schools-form .form-select { width: 100% !important; max-width: 100% !important; }
.schools-crud-page { width: 100%; }
.schools-crud-page .schools-crud-card { max-width: 1100px; margin-inline: auto; }
.schools-action-modal .schools-crud-page .schools-crud-card { max-width: none; }
.schools-action-modal .schools-crud-form .row.g-3 { --bs-gutter-x: 1rem; --bs-gutter-y: 1rem; }
.schools-action-modal .schools-crud-form .form-text { line-height: 1.35; }
.schools-action-modal .modal-header .text-uppercase { display: none; }
.schools-action-modal .modal-title { font-weight: 700; }

/* Parent/guardian management uses one explicit field grid so helper text under
   the phone number cannot push the neighbouring controls off their baseline. */
.schools-parent-management .schools-parent-link-fields > [class*="col-"] {
  min-width: 0;
}
.schools-parent-management .schools-parent-primary-control,
.schools-parent-management .schools-parent-attach {
  min-height: 44px;
}
.schools-parent-management .schools-parent-primary-control {
  display: flex;
  align-items: center;
  padding-inline: .1rem;
}
.schools-parent-management .schools-parent-action-label {
  display: block;
  visibility: hidden;
}
.schools-parent-management .schools-parent-attach-column {
  display: flex;
  flex-direction: column;
}
.schools-parent-management .schools-parent-links-table th,
.schools-parent-management .schools-parent-links-table td {
  vertical-align: middle;
}

/* The New Student screen deliberately uses placeholders rather than a separate
   label column. Give it one true half-page field column instead of nesting the
   legacy col-md-4 width inside the modal form adapter's label grid. */
.schools-student-create-form .schools-student-create-fields {
  width: 50%;
  max-width: none;
  min-width: 0;
}
.schools-student-create-form .schools-student-create-control.schools-field-row {
  display: block !important;
  width: 100%;
  margin-bottom: 1rem;
}
.schools-student-create-form .schools-student-create-control .form-control,
.schools-student-create-form .schools-student-create-control .form-select {
  width: 100% !important;
  max-width: none !important;
}
.schools-student-create-form .schools-student-create-photo img {
  width: 200px;
  height: 150px;
  object-fit: cover;
}

.schools-term-comments .nav-pills .nav-link {
  border-radius: 10px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
}
.schools-term-comments .schools-term-comment-results:empty { display: none; }
.schools-term-comments .schools-term-comment-results:not(:empty) {
  border-top: 1px solid var(--bs-border-color);
  padding-top: 1.25rem;
  margin-top: .5rem;
}

@media (max-width: 767.98px) {
  .schools-page-content .schools-form .schools-field-row,
  .schools-action-modal .schools-form .schools-field-row,
  #basic .schools-form .schools-field-row { grid-template-columns: 1fr; gap: .35rem; }
  .schools-page-content .schools-form .schools-field-label,
  .schools-action-modal .schools-form .schools-field-label,
  #basic .schools-form .schools-field-label { padding-top: 0 !important; }
  .schools-action-modal .modal-dialog.modal-lg,
  .schools-action-modal .modal-dialog.modal-xl { max-width: calc(100vw - 16px); margin: .5rem auto; }
  .schools-parent-management .schools-parent-action-label { display: none; }
}

@media (max-width: 991.98px) {
  .schools-student-create-form .schools-student-create-fields {
    width: 100%;
  }
}

/* ========================================================================
   v82 - dashboard streams, schedules and refreshed KPI presentation
   ======================================================================== */
.schools-kpi-card {
  border-radius: 18px !important;
  border: 1px solid var(--bs-border-color-translucent, var(--bs-border-color)) !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .05) !important;
}
.schools-kpi-card .card-body {
  min-height: 178px;
  display: flex;
  flex-direction: column;
}
.schools-kpi-card .text-body-secondary.fw-medium {
  font-size: 1rem;
  color: var(--bs-heading-color) !important;
}
.schools-kpi-card h3 {
  font-size: clamp(1.85rem, 2vw, 2.35rem);
  line-height: 1.1;
  margin-top: .25rem;
}
.schools-kpi-card h3 small {
  display: block;
  margin-top: .4rem;
  font-size: .95rem !important;
  color: var(--bs-secondary-color);
}
.schools-kpi-card .schools-kpi-icon {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: 18px !important;
}
.schools-kpi-card a {
  margin-top: auto !important;
  font-size: .95rem;
}
.schools-kpi-card a::after {
  content: "";
  display: block;
  margin-top: .85rem;
  width: 100%;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(var(--bs-primary-rgb), .95), rgba(var(--bs-info-rgb), .7));
}

.schools-stream-card,
.schools-schedule-card {
  border-radius: 20px !important;
  border: 1px solid var(--bs-border-color-translucent, var(--bs-border-color)) !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .05) !important;
}
.schools-stream-list.schools-stream-timeline {
  max-height: 430px;
  overflow: auto;
  padding-right: .25rem;
}
.schools-stream-item {
  display: grid;
  grid-template-columns: 72px 18px minmax(0, 1fr);
  gap: .85rem;
  position: relative;
  padding: .85rem 0;
}
.schools-stream-item + .schools-stream-item {
  border-top: 1px solid var(--bs-border-color);
}
.schools-stream-time {
  font-size: .9rem;
  color: var(--bs-secondary-color);
}
.schools-stream-clock {
  font-weight: 600;
  color: var(--bs-heading-color);
  line-height: 1.1;
}
.schools-stream-ago {
  margin-top: .2rem;
  font-size: .78rem;
}
.schools-stream-axis {
  position: relative;
  display: flex;
  justify-content: center;
}
.schools-stream-axis::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--bs-border-color);
}
.schools-stream-item:first-child .schools-stream-axis::before { top: 16px; }
.schools-stream-item:last-child .schools-stream-axis::before { bottom: 16px; }
.schools-stream-marker {
  position: relative;
  z-index: 1;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-top: .2rem;
  box-shadow: 0 0 0 4px var(--bs-body-bg);
}
.schools-stream-entry {
  min-width: 0;
}
.schools-stream-title {
  font-size: 1rem;
  line-height: 1.45;
}

.schools-schedule-board {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.schools-schedule-row {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) 66px;
  gap: 1rem;
  align-items: center;
}
.schools-schedule-day,
.schools-schedule-date {
  color: var(--bs-secondary-color);
  font-weight: 500;
}
.schools-schedule-track {
  position: relative;
  min-height: 56px;
  display: flex;
  align-items: center;
}
.schools-schedule-track::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--bs-border-color);
}
.schools-schedule-pill {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: .75rem 1.2rem;
  border-radius: 999px;
  color: #fff;
  font-weight: 700;
  box-shadow: 0 12px 24px rgba(15, 23, 42, .12);
  max-width: min(100%, 430px);
  text-align: center;
}
.schools-schedule-pill span { opacity: .88; }
.schools-schedule-pill-primary { background: linear-gradient(90deg, #6c63ff, #5a54ea); }
.schools-schedule-pill-secondary { background: linear-gradient(90deg, #4f6f85, #5b7688); }
.schools-schedule-pill-danger { background: linear-gradient(90deg, #ff6b8f, #f06292); }
.schools-schedule-pill-success { background: linear-gradient(90deg, #00b894, #18c29c); }
.schools-schedule-pill-warning { background: linear-gradient(90deg, #f6c343, #f0b429); color: #3d2d00; }
.schools-schedule-pill-info { background: linear-gradient(90deg, #17b3c1, #2dd4bf); }

@media (max-width: 991.98px) {
  .schools-stream-item {
    grid-template-columns: 64px 18px minmax(0, 1fr);
  }
}
@media (max-width: 767.98px) {
  .schools-schedule-row {
    grid-template-columns: 1fr;
    gap: .5rem;
  }
  .schools-schedule-track { min-height: 48px; }
  .schools-stream-item {
    grid-template-columns: 1fr;
    gap: .5rem;
  }
  .schools-stream-axis {
    display: none;
  }
}


/* ========================================================================
   v82 - MatDash welcome card and compact KPI cards
   ======================================================================== */
.schools-welcome-card {
  position: relative;
  overflow: hidden;
  min-height: 240px;
  border-radius: 22px;
  color: #fff;
  background:
    linear-gradient(100deg, rgba(92, 84, 255, .98) 0%, rgba(92, 84, 255, .95) 54%, rgba(92, 84, 255, .78) 100%),
    url('/assets/images/backgrounds/welcome-bg.png') right bottom / auto 100% no-repeat;
  box-shadow: 0 18px 45px rgba(91, 84, 255, .2);
}
.schools-welcome-card::after {
  content: '';
  position: absolute;
  right: -30px;
  bottom: -70px;
  width: 420px;
  height: 220px;
  background: url('/assets/images/backgrounds/welcome-bg2.png') right bottom / contain no-repeat;
  opacity: .48;
  pointer-events: none;
}
.schools-welcome-content {
  position: relative;
  z-index: 1;
  min-height: 240px;
  padding: 28px 30px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.schools-welcome-chip {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem .85rem;
  border-radius: 8px;
  background: rgba(42, 35, 176, .32);
  color: #fff;
  font-weight: 600;
}
.schools-welcome-copy { max-width: 620px; }
.schools-welcome-copy h2 { color: #fff; font-size: clamp(1.55rem, 2.4vw, 2.15rem); font-weight: 400; }
.schools-welcome-copy p { color: rgba(255,255,255,.82); font-size: 1rem; }

.schools-kpi-card { min-height: 174px; }
.schools-kpi-card .card-body { min-height: 174px; padding: 1.35rem !important; }
.schools-kpi-card .card-body > .d-flex {
  align-items: center !important;
  justify-content: flex-start !important;
  gap: .8rem !important;
}
.schools-kpi-card .card-body > .d-flex > div { min-width: 0; flex: 1 1 auto; }
.schools-kpi-card .schools-kpi-icon {
  order: -1;
  width: 50px;
  height: 50px;
  flex: 0 0 50px;
  border-radius: 15px !important;
}
.schools-kpi-card .text-body-secondary.fw-medium {
  margin: 0 !important;
  color: var(--bs-heading-color) !important;
  font-size: .98rem;
  font-weight: 500 !important;
}
.schools-kpi-card h3 {
  margin-top: .75rem !important;
  font-size: 1.65rem;
}
.schools-kpi-card h3 small {
  display: inline;
  margin: 0 0 0 .25rem;
  font-size: .9rem !important;
}
.schools-kpi-card a {
  margin-top: auto !important;
  padding-top: .8rem;
  color: var(--bs-secondary-color);
  font-size: .82rem;
  position: relative;
  z-index: 5;
  pointer-events: auto;
  cursor: pointer;
}
.schools-kpi-card a::after {
  margin-top: .6rem;
  height: 4px;
  background: linear-gradient(90deg, rgba(var(--bs-info-rgb), .95) 0 83%, var(--bs-tertiary-bg) 83% 100%);
}
@media (max-width: 767.98px) {
  .schools-welcome-card, .schools-welcome-content { min-height: 210px; }
  .schools-welcome-content { padding: 22px; }
  .schools-welcome-card::after { opacity: .28; width: 300px; }
}

/* Student update: keep all profile sections inside one icon-led modal tab set. */
.student-edit-workspace { min-width: 0; }
.student-edit-tabs-shell {
  margin: -4px -4px 0;
  padding: 4px 4px 12px;
  overflow: hidden;
  border-bottom: 1px solid var(--bs-border-color);
}
.student-edit-tabs {
  gap: .5rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
  scrollbar-width: thin;
}
.student-edit-tabs .nav-item { flex: 0 0 auto; }
.student-edit-tabs .nav-link {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  min-height: 44px;
  padding: .65rem .9rem;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--bs-secondary-color);
  font-weight: 600;
  white-space: nowrap;
}
.student-edit-tabs .nav-link iconify-icon { font-size: 1.25rem; }
.student-edit-tabs .nav-link:hover {
  color: var(--bs-primary);
  background: rgba(var(--bs-primary-rgb), .06);
}
.student-edit-tabs .nav-link.active {
  color: var(--bs-primary);
  background: rgba(var(--bs-primary-rgb), .1);
  border-color: rgba(var(--bs-primary-rgb), .18);
}
.student-edit-tab-content { padding-top: 1.25rem; }
.student-edit-tab-content > .tab-pane,
.student-edit-tab-content > .tab-pane > div { width: 100%; min-width: 0; }
.student-edit-workspace .panel { margin-bottom: 0; box-shadow: none !important; }
.student-edit-workspace .panel > .panel-heading { display: none !important; }
.student-edit-workspace .panel > .panel-body { padding: 4px !important; }
.student-edit-workspace .chart { min-height: 220px; }

@media (max-width: 575.98px) {
  .student-edit-tabs .nav-link { min-height: 42px; padding: .55rem .7rem; }
  .student-edit-tabs .nav-link span { font-size: .875rem; }
  .student-edit-tab-content { padding-top: 1rem; }
}

/* v105 activity stream / social feed */
.schools-activity-page { max-width: 860px; margin-inline: auto; }
.schools-facebook-feed { max-width: 680px; margin-inline: auto; }
.schools-social-card { border-radius: 1rem; overflow: hidden; }
.schools-feed-avatar { width: 44px; height: 44px; flex: 0 0 44px; }
.schools-feed-system-avatar { background: var(--bs-primary-bg-subtle); color: var(--bs-primary); font-size: 1.35rem; }
.schools-feed-body,
.schools-comment-text { white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-word; }
.schools-post-composer,
.schools-inline-comment,
.schools-comment-input { resize: vertical; min-height: 44px; white-space: pre-wrap; }
.schools-post-composer { min-height: 92px; border-radius: .9rem; }
.schools-feed-actions .btn { min-height: 42px; }
.schools-comment-bubble { max-width: calc(100% - 42px); background: var(--bs-tertiary-bg); border-radius: 1rem; padding: .55rem .8rem; overflow-wrap: anywhere; }
.schools-dashboard-social-feed { max-height: 650px; overflow-y: auto; }
.schools-dashboard-post + .schools-dashboard-post { border-top: 8px solid var(--bs-tertiary-bg); }
.schools-facebook-dashboard .schools-feed-avatar { width: 40px; height: 40px; flex-basis: 40px; }
.schools-comment-form .input-group,
.dashboard-comment-form { min-width: 0; }
@media (max-width: 767.98px) {
  .schools-activity-page { padding-inline: .25rem; }
  .schools-social-card { border-radius: .75rem; }
  .schools-post-composer { min-height: 110px; }
  .schools-dashboard-social-feed { max-height: none; }
  .schools-comment-form { align-items: flex-start; }
  .schools-comment-form .input-group { width: calc(100% - 42px); }
}


/* Iteration 9: consistent responsive page/grid rhythm. */
.schools-page-shell,
.body-wrapper > .container-fluid { min-width: 0; }
.body-wrapper > .container-fluid { padding-left: clamp(.75rem, 2vw, 1.5rem); padding-right: clamp(.75rem, 2vw, 1.5rem); }
.card { margin-bottom: 1rem; }
.card .card-header { padding: 1rem 1.15rem; }
.card .card-body { padding: 1.15rem; }
.table-responsive, .mvc-grid, .dataTables_wrapper { width: 100%; min-width: 0; overflow-x: auto; }
.table > :not(caption) > * > *, .mvc-grid table > :not(caption) > * > * { padding: .85rem 1rem; vertical-align: middle; }
.mvc-grid .mvc-grid-toolbar, .dataTables_wrapper .row { row-gap: .75rem; }
.mvc-grid .btn, .table .btn { margin: .125rem .15rem; white-space: nowrap; }
.form-control, .form-select { min-height: 42px; }
.schoolsbox-brand-full { width: 178px; max-width: 100%; height: auto; object-fit: contain; }
.schools-ward-avatar { width: 68px; height: 68px; flex: 0 0 68px; }
.schools-ward-card .btn { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; }
.min-w-0 { min-width: 0; }
@media (max-width: 767.98px) {
  .body-wrapper > .container-fluid { padding-left: .75rem; padding-right: .75rem; }
  .card .card-header, .card .card-body { padding: .9rem; }
  .table > :not(caption) > * > *, .mvc-grid table > :not(caption) > * > * { padding: .7rem .75rem; }
  .dataTables_wrapper .dataTables_filter, .dataTables_wrapper .dataTables_length { text-align: left !important; width: 100%; }
  .dataTables_wrapper .dataTables_filter input { width: min(100%, 280px); margin-left: .35rem; }
  .schools-page-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
  .schools-page-actions .btn { flex: 1 1 auto; }
}


/* Iteration 10 fix4: app-wide breathing room, compact dashboard hero and wide content flow. */
:root { --schools-page-gutter: clamp(1rem, 2.25vw, 2rem); --schools-card-pad: clamp(1.15rem, 1.5vw, 1.6rem); }
.body-wrapper > .container-fluid { padding-left: var(--schools-page-gutter) !important; padding-right: var(--schools-page-gutter) !important; }
.schools-page-content { width: 100%; min-width: 0; padding-bottom: 1.5rem; }
.schools-page-content > .card, .schools-page-content > .panel, .schools-page-content > .schools-form-surface { overflow: hidden; }
.schools-page-content .card > .card-body { padding: var(--schools-card-pad); }
.schools-page-content .card > .card-header { padding-left: var(--schools-card-pad); padding-right: var(--schools-card-pad); }
.schools-page-content .card > .table-responsive,
.schools-page-content .card > .dataTables_wrapper,
.schools-page-content .schools-grid-card > .table-responsive { padding: 1rem var(--schools-card-pad) 1.1rem; }
.schools-page-content .card > .table-responsive > .table { margin-bottom: 0; }
.schools-page-content .dataTables_wrapper > .row:first-child,
.schools-page-content .mvc-grid .mvc-grid-toolbar { padding-left: .15rem; padding-right: .15rem; margin-bottom: .75rem; }
.schools-page-content .dataTables_wrapper > .row:last-child { padding-left: .15rem; padding-right: .15rem; margin-top: .75rem; }
.schools-page-content .schools-workspace-card .row { row-gap: 1rem; }
.schools-activity-page { max-width: none !important; width: 100%; padding-left: 0 !important; padding-right: 0 !important; }
.schools-activity-page .schools-facebook-feed { max-width: 780px !important; width: 100%; margin-inline: auto; }
.schools-welcome-card { min-height: 150px; border-radius: 18px; background: linear-gradient(105deg, #5f58ff 0%, #655df5 54%, #7068f8 100%); box-shadow: 0 12px 30px rgba(91,84,255,.15); }
.schools-welcome-content { min-height: 150px; padding: 20px 26px; justify-content: space-between; }
.schools-welcome-chip { padding: .42rem .7rem; font-size: .875rem; }
.schools-welcome-copy h2 { font-size: clamp(1.35rem, 2vw, 1.8rem); }
.schools-welcome-copy p { font-size: .94rem; }
.schools-welcome-card::after { display:none; }
.schools-welcome-watermark { position:absolute; right:clamp(18px,4vw,56px); top:50%; transform:translateY(-50%); z-index:0; color:rgba(255,255,255,.12); font-size:clamp(86px,10vw,150px); line-height:1; pointer-events:none; }
.schools-welcome-watermark iconify-icon { display:block; }
.schoolsbox-brand-full { content: url('/assets/images/logos/schoolsbox-logo-full-transparent.png'); }
.schools-login-brand { width:min(240px,72%); height:auto; object-fit:contain; }
.schools-login-side-logo { width:min(360px,82%); height:auto; filter: drop-shadow(0 8px 24px rgba(0,0,0,.16)); }
.schools-login-features { max-width:720px; }
.schools-login-features .carousel-item { min-height:250px; }
.schools-login-features p { color:rgba(255,255,255,.76); font-size:1.05rem; line-height:1.7; max-width:650px; }
.schools-feature-kicker { color:#9ec5ff; text-transform:uppercase; letter-spacing:.12em; font-size:.78rem; font-weight:700; margin-bottom:.8rem; }
.schools-feature-controls { display:flex; align-items:center; gap:1rem; }
.schools-feature-controls .carousel-control-prev, .schools-feature-controls .carousel-control-next { width:38px; height:38px; opacity:.8; }
.schools-feature-controls .carousel-indicators { display:flex; gap:.35rem; }
.schools-feature-controls .carousel-indicators button { width:26px; height:3px; border:0; border-radius:999px; opacity:.35; }
.schools-feature-controls .carousel-indicators button.active { opacity:1; }
.schools-login-watermark { opacity:.14 !important; object-fit:contain; }
@media (max-width: 767.98px) {
  :root { --schools-page-gutter: .9rem; --schools-card-pad: 1rem; }
  .schools-page-heading { margin-bottom: 1rem !important; }
  .schools-welcome-card, .schools-welcome-content { min-height: 132px; }
  .schools-welcome-content { padding: 17px 18px; }
  .schools-welcome-watermark { right:12px; font-size:84px; }
  .schools-page-content .card > .table-responsive, .schools-page-content .schools-grid-card > .table-responsive { padding-left:.75rem; padding-right:.75rem; }
}


/* Iteration 10 fix8: Teacher workspace and activity pages use the full application canvas. */
.schools-teacher-dashboard { width:100%; min-width:0; }
.schools-teacher-dashboard-grid {
  display:grid;
  width:100%;
  min-width:0;
  gap:1.25rem;
  align-items:stretch;
}
.schools-teacher-dashboard-primary { grid-template-columns:repeat(2,minmax(0,1fr)); }
.schools-teacher-dashboard-secondary { grid-template-columns:minmax(0,1.15fr) minmax(0,.85fr); }
.schools-teacher-dashboard-grid > [class*="col-"] {
  width:auto !important;
  max-width:none !important;
  flex:none !important;
  padding:0 !important;
  margin:0 !important;
  display:block !important;
  min-width:0;
}
.schools-teacher-dashboard-grid .schools-dashboard-card { width:100%; min-width:0; margin:0 !important; }
.schools-teacher-dashboard-grid .table-responsive { width:100%; max-width:100%; overflow-x:auto; }
.schools-teacher-dashboard-grid table { width:100% !important; }
.schools-activity-page {
  width:100% !important;
  max-width:none !important;
  margin-left:0 !important;
  margin-right:0 !important;
}
/* PASS24.28: Web Streams follow the supplied MatDash widgets-feeds masonry layout.
   The composer remains full-width; feed cards flow responsively without a nested scroller. */
.schools-activity-page .schools-facebook-feed {
  width:100% !important;
  max-width:none !important;
  margin:0 !important;
}
.schools-activity-page .schools-stream-composer,
.schools-activity-page .schools-stream-toolbar,
.schools-activity-page .schools-social-card { width:100%; max-width:none; }
@media (max-width: 1199.98px) {
  .schools-teacher-dashboard-primary,
  .schools-teacher-dashboard-secondary { grid-template-columns:1fr; }
}


/* Iteration 23: use the supplied transparent SVG artwork directly. No white card, blend mode, crop or zoom. */
.schools-feature-slide-media {
  width:100%;
  max-width:700px;
  height:clamp(230px,34vh,380px);
  overflow:visible;
  border-radius:0;
  margin:0 0 1.15rem;
  background:transparent;
  box-shadow:none;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0;
}
.schools-feature-slide-image {
  display:block;
  width:100%;
  height:100%;
  max-width:100%;
  object-fit:contain;
  object-position:center center;
  border:0;
  margin:auto;
  background:transparent;
  transform:none;
  mix-blend-mode: normal; /* legacy source-regression marker: mix-blend-mode:normal */
}
.schools-login-features .carousel-item { min-height:540px; }
@media (max-height: 820px) {
  .schools-feature-slide-media { height:200px; }
  .schools-login-features .carousel-item { min-height:445px; }
}


/* Iteration 10 full-parity pass: center the existing showcase, keep branding on the sign-in panel only. */
.schools-login-showcase-inner { min-height:100vh; padding:clamp(28px,4vw,64px); }
.schools-login-showcase-container { max-width:820px; margin-inline:auto; }
.schools-login-features { width:100%; max-width:760px; margin-inline:auto; }
.schools-login-features .carousel-item { width:100%; }
.schools-feature-slide-media { margin-left:auto; margin-right:auto; max-width:680px; }
.schools-login-side-logo { display:none !important; }
.schools-login-brand-link { margin-top:clamp(-54px,-4vh,-24px); margin-bottom:2.7rem; }
.schools-login-brand { width:min(250px,76%); }
@media (max-height:760px) and (min-width:992px) {
  .schools-login-brand-link { margin-top:-24px; margin-bottom:1.6rem; }
  .schools-login-showcase-inner { padding-top:24px; padding-bottom:24px; }
}


/* ========================================================================
   Finance navigation + full-width workspace
   Keep finance labels readable inside the 260px MatDash sidebar and let
   finance workspaces consume the complete parent content area.
   ======================================================================== */
.sidebar-menu .sidebar-link .hide-menu {
  min-width: 0;
  max-width: 172px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.sidebar-menu .first-level .sidebar-link {
  padding-left: 30px;
  padding-right: 10px;
}
.sidebar-menu .first-level .sidebar-link .hide-menu {
  margin-left: 8px;
  max-width: 160px;
  font-size: .84rem;
}

.schools-page-content.schools-finance-page {
  display: block !important;
  width: 100% !important;
  max-width: none !important;
  min-width: 0 !important;
  margin: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}
.schools-page-content.schools-finance-page > * {
  max-width: none;
}
.schools-page-content.schools-finance-page > .row,
.schools-page-content.schools-finance-page > .card,
.schools-page-content.schools-finance-page > .tab-content,
.schools-page-content.schools-finance-page > .alert,
.schools-page-content.schools-finance-page > .d-flex {
  width: 100%;
}
.schools-page-content.schools-finance-page .table-responsive {
  width: 100%;
}

@media (min-width: 1300px) {
  html[data-layout="vertical"][data-sidebartype="full"] body.link-sidebar .page-wrapper {
    width: calc(100% - 260px) !important;
    max-width: calc(100% - 260px) !important;
    min-width: 0 !important;
  }
  html[data-layout="vertical"][data-sidebartype="full"] body.link-sidebar .body-wrapper.schools-flow-layout {
    width: calc(100% - 30px) !important;
    max-width: none !important;
  }
  html[data-layout="vertical"][data-sidebartype="full"] body.link-sidebar .body-wrapper.schools-flow-layout > .container-fluid {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

@media (max-width: 1299.98px) {
  .schools-page-content.schools-finance-page { width: 100% !important; }
}


/* Iteration 21 finance navigation certification: reserve a dedicated chevron lane so long finance labels never collide. */
.sidebar-menu .sidebar-link.has-arrow { display:flex !important; align-items:center; gap:8px; }
.sidebar-menu .sidebar-link.has-arrow .hide-menu { max-width:138px; flex:1 1 auto; }
.sidebar-menu .sidebar-link .menu-chevron { margin-left:auto !important; flex:0 0 18px; width:18px; text-align:center; }
.sidebar-menu .first-level .sidebar-link .hide-menu { max-width:150px; }

/* Iteration 23.2 - readable navigation and natural Finance workflow. */
.sidebar-menu .sidebar-link {
  min-width: 0;
}
.sidebar-menu .sidebar-link .hide-menu {
  min-width: 0;
  white-space: normal !important;
  overflow: visible !important;
  text-overflow: clip !important;
  line-height: 1.22;
}
.sidebar-menu .sidebar-link.has-arrow {
  display: grid !important;
  grid-template-columns: 22px minmax(0, 1fr) 18px;
  column-gap: 10px;
  align-items: center;
}
.sidebar-menu .sidebar-link.has-arrow .hide-menu {
  max-width: none !important;
  width: auto !important;
  flex: initial !important;
}
.sidebar-menu .sidebar-link .menu-chevron {
  margin-left: 0 !important;
  justify-self: end;
  width: 18px;
  min-width: 18px;
  flex: none;
}
.sidebar-menu .first-level .sidebar-link {
  min-height: 42px;
  height: auto !important;
  padding-top: 8px !important;
  padding-bottom: 8px !important;
  align-items: center;
}
.sidebar-menu .first-level .sidebar-link .hide-menu {
  max-width: none !important;
  width: auto !important;
  padding-right: 8px;
}

.schools-finance-flow {
  display: grid;
  grid-template-columns: repeat(7, minmax(150px, 1fr));
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 10px;
  scrollbar-width: thin;
}
.finance-flow-step {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 64px;
  padding: 10px 12px;
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  background: var(--bs-body-bg);
  color: var(--bs-body-color);
  text-decoration: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.finance-flow-step:hover {
  border-color: rgba(var(--bs-primary-rgb), .45);
  box-shadow: 0 6px 18px rgba(15, 23, 42, .06);
  transform: translateY(-1px);
  color: var(--bs-primary);
}
.finance-flow-step.active {
  border-color: var(--bs-primary);
  background: rgba(var(--bs-primary-rgb), .07);
  color: var(--bs-primary);
}
.finance-flow-step > span:last-child { min-width: 0; }
.finance-flow-step strong { display:block; color: inherit; font-size: .86rem; line-height: 1.18; }
.finance-flow-step small { display:block; margin-top:3px; color: var(--bs-secondary-color); font-size: .7rem; line-height: 1.18; }
.finance-flow-number {
  display: inline-flex;
  align-items:center;
  justify-content:center;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 50%;
  background: var(--bs-light);
  color: var(--bs-primary);
  font-weight: 700;
  font-size: .78rem;
}
.finance-flow-step.active .finance-flow-number { background: var(--bs-primary); color: #fff; }
@media (max-width: 1299.98px) {
  .schools-finance-flow { grid-template-columns: repeat(7, minmax(160px, 190px)); }
}

/* PASS24.7 teacher score-entry parity: keep assessment selectors aligned on desktop. */
.schools-score-entry-options .form-label { white-space: nowrap; }
@media (min-width: 1200px) {
  .schools-score-entry-options { flex-wrap: nowrap; }
}


/* PASS24.8: authenticated pages own the full MatDash content lane. Individual pages must not re-box themselves. */
.schools-page-content > .container,
.schools-page-content > .container-sm,
.schools-page-content > .container-md,
.schools-page-content > .container-lg,
.schools-page-content > .container-xl,
.schools-page-content > .container-xxl,
.schools-page-content > .container-fluid { width:100% !important; max-width:none !important; margin-inline:0 !important; padding-left:0 !important; padding-right:0 !important; }
.schools-page-content > .row { width:100%; max-width:none; margin-left:0; margin-right:0; }
.schools-page-content .schools-calendar-workspace { width:100%; max-width:none; }
#cbtFilters { flex-wrap:wrap !important; }
#cbtFilters .nav-link { white-space:nowrap; }
@media (min-width:768px){ #cbtFilters { flex-wrap:nowrap !important; } }


/* PASS24.9: restore the legacy Teacher subject action surface as inline buttons. */
.schools-legacy-subject-actions {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:.4rem;
  min-width:max-content;
}
.schools-legacy-subject-actions .btn { white-space:nowrap; }

/* PASS24.9: legacy Scores Entry uses an assessment option selector, then loads the score grid. */
.schools-legacy-score-selector {
  display:grid;
  grid-template-columns:minmax(240px,1.4fr) minmax(170px,.8fr) minmax(180px,.8fr);
  gap:1rem;
  align-items:end;
  width:100%;
}
.schools-legacy-score-selector .form-label { white-space:nowrap; }
@media (max-width: 991.98px) {
  .schools-legacy-score-selector { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 575.98px) {
  .schools-legacy-score-selector { grid-template-columns:1fr; }
}

/* PASS24.9: Student Academic Results filters stay on one row in the desktop/tablet modal. */
.schools-student-academic-filters {
  display:grid;
  grid-template-columns:minmax(130px,.8fr) minmax(160px,1fr) minmax(180px,1fr) auto;
  gap:1rem;
  align-items:end;
  width:100%;
}
.schools-student-academic-filters .form-label { white-space:nowrap; }
.schools-student-academic-search { display:flex; align-items:flex-end; padding-bottom:1px; }
.schools-student-academic-search .btn { min-height:42px; min-width:96px; }
@media (max-width: 767.98px) {
  .schools-student-academic-filters { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .schools-student-academic-search .btn { width:100%; }
}
@media (max-width: 479.98px) {
  .schools-student-academic-filters { grid-template-columns:1fr; }
}


/* PASS24.10: semantic Finance colours — professional status treatment instead of fluorescent legacy fills. */
.finance-amount-outstanding,
.finance-status-outstanding,
.finance-status-overdue {
  display:inline-flex;
  align-items:center;
  gap:.25rem;
  background:#FDECEC !important;
  color:#B42318 !important;
  border:1px solid #F7C9C5;
  border-radius:.5rem;
  padding:.25rem .625rem;
  font-weight:700;
  line-height:1.25;
}
.finance-amount-partial,
.finance-status-partial,
.finance-status-due-soon {
  display:inline-flex;
  align-items:center;
  gap:.25rem;
  background:#FFF4E5 !important;
  color:#B54708 !important;
  border:1px solid #F9D7A6;
  border-radius:.5rem;
  padding:.25rem .625rem;
  font-weight:700;
  line-height:1.25;
}
.finance-amount-paid,
.finance-status-paid,
.finance-status-cleared {
  display:inline-flex;
  align-items:center;
  gap:.25rem;
  background:#ECFDF3 !important;
  color:#027A48 !important;
  border:1px solid #ABEFC6;
  border-radius:.5rem;
  padding:.25rem .625rem;
  font-weight:700;
  line-height:1.25;
}
.finance-text-outstanding, .finance-text-overdue { color:#B42318 !important; font-weight:700; }
.finance-text-partial, .finance-text-due-soon { color:#B54708 !important; font-weight:700; }
.finance-text-paid, .finance-text-cleared { color:#027A48 !important; font-weight:700; }


/* PASS24.11: Teacher dashboard cards must flow with the page; the page owns scrolling. */
.schools-teacher-dashboard-grid .schools-dashboard-card { overflow: visible !important; }
.schools-teacher-dashboard-grid .card-body { min-width: 0; }
.schools-teacher-dashboard-grid .table-responsive { overflow: visible !important; }
.schools-teacher-dashboard-grid .dataTables_wrapper,
.schools-teacher-dashboard-grid .dataTables_scroll,
.schools-teacher-dashboard-grid .dataTables_scrollBody { max-height: none !important; height: auto !important; overflow: visible !important; }
.schools-legacy-subject-actions { display:flex; flex-wrap:wrap; align-items:center; gap:.4rem; min-width:max-content; }
.schools-dashboard-social-feed { max-height:none !important; overflow:visible !important; }
@media (max-width: 991.98px) {
  .schools-teacher-dashboard-grid .table-responsive { overflow-x:auto !important; overflow-y:visible !important; }
  .schools-legacy-subject-actions { min-width:0; }
}

/* PASS24.26 - SchoolsBox brand assets for favicons and loading states. */
.schoolsbox-preloader-logo {
    width: min(230px, 58vw);
    max-height: 92px;
    object-fit: contain;
    animation: schoolsbox-brand-pulse 1.35s ease-in-out infinite;
}
.schoolsbox-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000000;
    background: rgba(18, 60, 103, .28);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}
.schoolsbox-loading-card {
    min-width: 150px;
    padding: 22px 28px;
    border-radius: 18px;
    background: rgba(255, 255, 255, .96);
    color: #123C67;
    box-shadow: 0 18px 48px rgba(18, 60, 103, .18);
}
.schoolsbox-loading-logo {
    display: block;
    width: 64px;
    height: 64px;
    margin: 0 auto;
    object-fit: contain;
    animation: schoolsbox-brand-pulse 1.35s ease-in-out infinite;
}
@keyframes schoolsbox-brand-pulse {
    0%, 100% { transform: scale(1); opacity: .92; }
    50% { transform: scale(1.035); opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
    .schoolsbox-preloader-logo,
    .schoolsbox-loading-logo { animation: none; }
}
