/* Education pages: one shared, responsive layer for the list, form, detail and report templates in
   apps/education/templates. Colours, borders and shadows come from the --cs-* tokens in styles.css; headings use the
   portal serif (Libre Baskerville) and body text keeps the portal sans. Pages are loaded as fragments into
   #mainContentContainer (or the shared side panels), so nothing here may depend on a page-level wrapper.

   Layout contract (see the "edu-" blocks below):
     .edu-page           page wrapper (never wider than its container, no horizontal page scroll)
     .edu-hero           back button + icon + title + toolbar
     .edu-card           bordered surface; .edu-filter the filter form inside one
     .edu-table-card     card around a .table-responsive; table.edu-table pins first column + actions;
                         table.edu-stack turns rows into stacked cards on phones (td[data-label])
     .edu-form-grid      auto-fit grid for form fields (one column in a panel / on phones, two on wide pages)
     .edu-badge          status / severity chips (--success | --warning | --danger | --neutral)
     .edu-detail-list    label / value pairs used by the details side panels
     .edu-section-nav    sticky in-page section navigation for long forms
     .edu-empty          empty state with an explanation of what to do
*/

:root {
  --edu-serif: "Libre Baskerville", "Iowan Old Style", Georgia, serif;
  --edu-sans: "Source Sans 3", "Source Sans Pro", "Segoe UI", sans-serif;
  --edu-radius: 10px;
  --edu-radius-sm: 8px;
  --edu-gap: .75rem;
}

/* ---------- Page ---------- */
/* Used all over the education templates; Bootstrap has no such utility, so flex children never shrank. */
.min-w-0 {
  min-width: 0;
}

.edu-page {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  font-family: var(--edu-sans);
  color: var(--cs-text, #14221f);
}

.edu-page .btn:focus-visible,
.edu-page .form-control:focus-visible,
.edu-page .form-select:focus-visible,
.edu-page .nav-link:focus-visible,
.edu-page a:focus-visible,
.offcanvas .btn:focus-visible {
  outline: 2px solid var(--cs-accent, #00a88f);
  outline-offset: 2px;
  box-shadow: 0 0 0 .2rem var(--cs-focus, rgba(0, 168, 143, .24));
}

.edu-hero {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem 1rem;
  margin-bottom: 1rem;
}

.edu-hero__main {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 0;
  flex: 1 1 16rem;
}

.edu-hero__icon {
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--edu-radius-sm);
  background: var(--cs-primary-soft, #e4eeec);
  border: 1px solid var(--cs-border, #d9e0dc);
  color: var(--cs-primary, #123b36);
  font-size: 1.15rem;
}

.edu-title {
  margin: 0;
  font-family: var(--edu-serif);
  font-size: clamp(1.05rem, 1.6vw + .7rem, 1.4rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--cs-primary-strong, #092b28);
  overflow-wrap: anywhere;
}

.edu-subtitle {
  margin: .1rem 0 0;
  color: var(--cs-muted, #5d6c68);
  font-size: .85rem;
  overflow-wrap: anywhere;
}

.edu-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  min-width: 0;
}

.edu-toolbar .btn {
  white-space: nowrap;
}

.edu-toolbar .dropdown-menu {
  max-width: calc(100vw - 2rem);
}

.edu-back {
  flex: 0 0 auto;
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--cs-border-strong, #bdc9c4);
  background: var(--cs-surface, #fff);
  color: var(--cs-primary, #123b36);
  box-shadow: var(--cs-shadow-sm);
}

.edu-back:hover {
  background: var(--cs-primary-soft, #e4eeec);
  color: var(--cs-primary-strong, #092b28);
}

/* ---------- Cards, filters ---------- */
.edu-card {
  background: var(--cs-surface, #fff);
  border: 1px solid var(--cs-border, #d9e0dc);
  border-radius: var(--edu-radius);
  box-shadow: 0 1px 2px rgba(9, 43, 40, .05), 0 6px 16px rgba(9, 43, 40, .05);
  min-width: 0;
}

.edu-card__body,
.edu-card > .card-body {
  padding: 1rem;
}

.edu-card > .card-header,
.edu-card > .card-footer {
  padding: .65rem 1rem;
  background: var(--cs-surface-soft, #f7f9f6);
  border-color: var(--cs-border, #d9e0dc);
}

.edu-card > .card-header {
  border-bottom: 1px solid var(--cs-border, #d9e0dc);
  font-weight: 600;
  border-radius: var(--edu-radius) var(--edu-radius) 0 0;
}

.edu-eyebrow {
  margin-bottom: .15rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--cs-accent, #00a88f);
}

.edu-card-title {
  margin: 0 0 .25rem;
  font-family: var(--edu-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--cs-primary-strong, #092b28);
}

.edu-section-title {
  margin: 0 0 .15rem;
  font-family: var(--edu-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--cs-primary-strong, #092b28);
}

.edu-filter {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr));
  gap: .65rem;
  align-items: end;
}

.edu-filter__search {
  grid-column: span 2;
}

/* Phones: only the search box and a Filters toggle show; the other filters sit in a collapsible block.
   From 768px up the block is transparent to the grid (display: contents) and the toggle is hidden. */
.edu-filter-toggle {
  display: flex;
  align-items: center;
  width: 100%;
}

.edu-filter-toggle[aria-expanded="true"] .edu-filter-toggle__chevron {
  transform: rotate(180deg);
}

.edu-filter-collapse {
  grid-column: 1 / -1;
}

.edu-filter-collapse.show {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .65rem;
}

@media (min-width: 768px) {
  .edu-filter .edu-filter-toggle {
    display: none;
  }

  .edu-filter .edu-filter-collapse.collapse:not(.show),
  .edu-filter .edu-filter-collapse.collapse.show {
    display: contents;
  }
}

/* Sheet pages with their own filter rows: same toggle on phones, always open from 768px. */
@media (min-width: 768px) {
  .edu-filter-block.collapse:not(.show) {
    display: block;
  }

  .edu-page .edu-filter-toggle:not(.edu-filter-toggle--always) {
    display: none;
  }
}

.edu-page .form-select {
  padding-right: 2.25rem;
  text-overflow: ellipsis;
}

.edu-filter__actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  justify-content: flex-end;
}

.edu-filter .form-label {
  margin-bottom: .2rem;
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .02em;
  text-transform: uppercase;
  color: var(--cs-muted, #5d6c68);
}

.edu-page .form-control,
.edu-page .form-select {
  border-color: var(--cs-border-strong, #bdc9c4);
  border-radius: var(--edu-radius-sm);
}

/* ---------- Tables ---------- */
.edu-table-card {
  overflow: hidden;
}

.edu-table-card .table-responsive {
  border-radius: 0;
}

/* Keep the first column and the Actions column visible while the rest scrolls sideways
   (same idea as the Citizen Accounts table). Cells keep the opaque row colours of .cs-data-table. */
:is(#mainContentContainer, .dashboard-viewport, .edu-page) table.edu-table thead th:first-child,
:is(#mainContentContainer, .dashboard-viewport, .edu-page) table.edu-table tbody td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  box-shadow: 1px 0 0 var(--cs-border, #d9e0dc);
  font-weight: 600;
}

:is(#mainContentContainer, .dashboard-viewport, .edu-page) table.edu-table thead th:first-child {
  z-index: 4;
}

:is(#mainContentContainer, .dashboard-viewport, .edu-page) table.edu-table thead th.edu-actions-head,
:is(#mainContentContainer, .dashboard-viewport, .edu-page) table.edu-table tbody td.edu-actions-cell {
  position: sticky;
  right: 0;
  z-index: 1;
  box-shadow: -1px 0 0 var(--cs-border, #d9e0dc);
}

:is(#mainContentContainer, .dashboard-viewport, .edu-page) table.edu-table thead th.edu-actions-head {
  z-index: 4;
}

.edu-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: .25rem;
}

.edu-actions .cs-table-icon-action {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
}

.edu-actions .cs-table-icon-action:hover,
.edu-actions .cs-table-icon-action:focus-visible {
  background: var(--cs-primary-soft, #e4eeec);
}

.edu-actions .cs-table-icon-delete:hover,
.edu-actions .cs-table-icon-delete:focus-visible {
  background: var(--cs-danger-soft, #fff1f2);
}

.edu-page .cs-table-footer {
  display: flex;
  flex-wrap: wrap;
}

/* ---------- Badges ---------- */
.edu-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .12rem .55rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: .75rem;
  font-weight: 600;
  line-height: 1.4;
  white-space: nowrap;
}

.edu-badge--success { background: var(--cs-success-soft, #d9f5ef); color: var(--cs-success, #087260); border-color: rgba(8, 114, 96, .25); }
.edu-badge--warning { background: var(--cs-warning-soft, #fff6df); color: var(--cs-warning, #a66b00); border-color: rgba(166, 107, 0, .28); }
.edu-badge--danger { background: var(--cs-danger-soft, #fff1f2); color: var(--cs-danger, #b4233a); border-color: rgba(180, 35, 58, .28); }
.edu-badge--neutral { background: var(--cs-surface-tint, #edf2ef); color: #3d4b47; border-color: var(--cs-border, #d9e0dc); }

/* ---------- Empty state ---------- */
.edu-empty {
  max-width: 22rem;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  text-align: center;
  white-space: normal;
}

.edu-empty__icon {
  width: 3rem;
  height: 3rem;
  margin: 0 auto .5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--cs-primary-soft, #e4eeec);
  color: var(--cs-primary, #123b36);
  font-size: 1.35rem;
}

.edu-empty__title {
  font-family: var(--edu-serif);
  font-weight: 700;
  color: var(--cs-primary-strong, #092b28);
}

.edu-empty__text {
  margin: .25rem 0 0;
  color: var(--cs-muted, #5d6c68);
  font-size: .875rem;
}

/* ---------- Details side panel ---------- */
.edu-detail-list {
  display: grid;
  grid-template-columns: minmax(7rem, 38%) minmax(0, 1fr);
  gap: .55rem 1rem;
  margin: 0;
  font-size: .9rem;
}

.edu-detail-list dt {
  font-weight: 600;
  font-size: .75rem;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--cs-muted, #5d6c68);
  padding-top: .15rem;
}

.edu-detail-list dd {
  margin: 0;
  overflow-wrap: anywhere;
  white-space: pre-line;
}

.edu-panel .offcanvas-header {
  gap: .75rem;
  align-items: flex-start;
}

.edu-panel .offcanvas-header > div {
  flex: 1 1 auto;
}

.edu-panel .offcanvas-title {
  overflow-wrap: anywhere;
  font-family: var(--edu-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--cs-primary-strong, #092b28);
}

.offcanvas.edu-panel,
#formOffcanvas {
  --bs-offcanvas-width: min(34rem, 100vw);
}

.edu-panel__footer {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--cs-border, #d9e0dc);
}

/* ---------- Forms ---------- */
.edu-form-card {
  border-radius: var(--edu-radius);
}

.edu-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: .75rem;
  align-items: start;
}

.edu-field,
.edu-form-sections__body {
  min-width: 0;
}

.edu-form-grid > .edu-field--wide {
  grid-column: 1 / -1;
}

.edu-form-card .form-floating > .form-control,
.edu-form-card .form-floating > .form-select {
  min-height: 3rem;
  height: 3rem;
  border-color: var(--cs-border-strong, #bdc9c4);
  border-radius: var(--edu-radius-sm) !important;
  background-color: var(--cs-surface, #fff);
  color: var(--cs-text, #14221f);
  font-size: .9rem;
  padding: 1.15rem .75rem .35rem;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.edu-form-card .form-floating > .form-control:focus,
.edu-form-card .form-floating > .form-select:focus {
  border-color: var(--cs-accent, #00a88f);
  box-shadow: 0 0 0 .2rem var(--cs-focus, rgba(0, 168, 143, .24));
}

.edu-form-card textarea.form-control {
  min-height: 6rem;
  height: auto;
  padding-top: 1.5rem;
  resize: vertical;
}

.edu-form-card .form-floating > label {
  color: var(--cs-muted, #5d6c68);
  font-size: .9rem;
  padding: .55rem .75rem;
}

.edu-form-card .form-floating > .form-control:focus ~ label,
.edu-form-card .form-floating > .form-control:not(:placeholder-shown) ~ label,
.edu-form-card .form-floating > .form-select ~ label {
  color: var(--cs-primary-strong, #092b28);
}

.edu-form-card .form-text {
  color: var(--cs-muted, #5d6c68);
  font-size: .78rem;
  margin-top: .2rem;
}

.edu-form-card .invalid-feedback,
.edu-form-card .text-danger.small {
  font-size: .8rem;
}

.edu-check-row {
  display: flex;
  align-items: center;
  min-height: 3rem;
  margin: 0;
  background: var(--cs-surface-soft, #f7f9f6);
  border-color: var(--cs-border-strong, #bdc9c4) !important;
  border-radius: var(--edu-radius-sm) !important;
}

.edu-check-row .form-check-input {
  margin: 0 .6rem 0 0;
  float: none;
  flex: 0 0 auto;
}

.edu-check-row .form-check-label {
  font-weight: 600;
  font-size: .9rem;
}

.edu-check-group {
  background: var(--cs-surface-soft, #f7f9f6);
  border: 1px solid var(--cs-border-strong, #bdc9c4);
  border-radius: var(--edu-radius-sm);
  padding: .75rem;
}

.edu-form-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .5rem;
  margin-top: 1.25rem;
  padding-top: 1rem;
  border-top: 1px solid var(--cs-border, #d9e0dc);
}

/* In the side panel the offcanvas header already carries the title and a close button. */
.offcanvas .edu-form-page {
  padding: 0 !important;
}

.offcanvas .edu-form-page .edu-hero {
  display: none;
}

.offcanvas .edu-form-card {
  border: 0;
  box-shadow: none;
  background: transparent;
}

.offcanvas .edu-form-card .edu-card__body {
  padding: 0;
}

.offcanvas .edu-form-actions {
  position: sticky;
  bottom: 0;
  margin: 1rem -1rem -1rem;
  padding: .75rem 1rem;
  background: var(--cs-surface, #fff);
}

.edu-assessment-block {
  background: var(--cs-surface-soft, #f7f9f6);
  border: 1px solid var(--cs-border-strong, #bdc9c4);
  border-radius: var(--edu-radius);
}

.edu-assessment-row {
  background: var(--cs-surface, #fff);
  border: 1px solid var(--cs-border, #d9e0dc);
  border-radius: var(--edu-radius-sm);
}

.edu-assessment-row .form-control {
  min-height: 2.35rem;
  font-size: .9rem;
}

.edu-period-row {
  background: var(--cs-surface-soft, #f7f9f6) !important;
  border-color: var(--cs-border-strong, #bdc9c4) !important;
}

/* Sticky section navigation for long, multi-section forms (desktop). */
.edu-section-nav {
  position: sticky;
  top: 5.5rem;
  align-self: start;
  display: none;
  flex-direction: column;
  gap: .15rem;
  padding: .5rem;
  border: 1px solid var(--cs-border, #d9e0dc);
  border-radius: var(--edu-radius);
  background: var(--cs-surface, #fff);
  font-size: .875rem;
}

.edu-section-nav a {
  display: block;
  padding: .35rem .6rem;
  border-radius: 6px;
  color: var(--cs-text, #14221f);
  text-decoration: none;
}

.edu-section-nav a:hover,
.edu-section-nav a.active {
  background: var(--cs-primary-soft, #e4eeec);
  color: var(--cs-primary-strong, #092b28);
}

/* position: sticky does not work under an ancestor with overflow hidden/auto (the portal shell has several, to stop
   sideways scroll). Where a section navigation is present its ancestors clip sideways overflow instead, which
   does not make them scroll containers. */
body:has(.edu-section-nav),
body :has(.edu-section-nav) {
  overflow-x: clip !important;
  overflow-y: visible !important;
}

.edu-form-section {
  min-width: 0;
  margin: 0 0 1.5rem;
  padding: 0;
  border: 0;
  scroll-margin-top: 5.5rem;
}

.edu-form-section > legend {
  float: none;
  width: 100%;
  margin: 0 0 .65rem;
  padding: 0 0 .35rem;
  border-bottom: 1px solid var(--cs-border, #d9e0dc);
  font-size: 1rem;
}

.edu-section-nav a.active {
  font-weight: 600;
}

@media (min-width: 992px) {
  .edu-section-nav {
    display: flex;
  }

  .edu-form-sections {
    display: grid;
    grid-template-columns: 12.5rem minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
  }
}

/* ---------- Tablet and up ---------- */
@media (min-width: 992px) {
  .edu-toolbar {
    justify-content: flex-end;
  }
}

/* ---------- Phones ---------- */
@media (max-width: 575.98px) {
  .edu-hero__main {
    flex-basis: 100%;
  }

  .edu-toolbar {
    width: 100%;
  }

  .edu-toolbar > .btn,
  .edu-toolbar > .dropdown {
    flex: 1 1 auto;
  }

  .edu-toolbar > .dropdown > .btn {
    width: 100%;
  }

  .edu-filter__search {
    grid-column: auto;
  }

  .edu-filter__actions {
    justify-content: stretch;
  }

  .edu-filter__actions .btn {
    flex: 1 1 auto;
  }

  .edu-form-actions .btn,
  .edu-panel__footer .btn {
    flex: 1 1 auto;
  }

  .edu-detail-list {
    grid-template-columns: 1fr;
    gap: .1rem;
  }

  .edu-detail-list dd {
    margin-bottom: .5rem;
  }

  /* Wide tables become stacked cards: the first column is the card title, each other cell a label / value row. */
  :is(#mainContentContainer, .dashboard-viewport, .edu-page) table.edu-stack {
    display: block;
    width: 100%;
    min-width: 0;
    background: transparent;
  }

  :is(#mainContentContainer, .dashboard-viewport, .edu-page) table.edu-stack thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  :is(#mainContentContainer, .dashboard-viewport, .edu-page) table.edu-stack tbody {
    display: block;
  }

  :is(#mainContentContainer, .dashboard-viewport, .edu-page) table.edu-stack tbody tr {
    display: block;
    margin: .6rem;
    padding: .5rem .85rem;
    border: 1px solid var(--cs-border, #d9e0dc);
    border-radius: var(--edu-radius);
    background: var(--cs-surface, #fff);
    box-shadow: 0 1px 2px rgba(9, 43, 40, .05);
  }

  :is(#mainContentContainer, .dashboard-viewport, .edu-page) table.edu-stack tbody td {
    position: static;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    padding: .3rem 0;
    border: 0;
    border-bottom: 1px dashed var(--cs-border, #d9e0dc);
    background: transparent !important;
    box-shadow: none !important;
    text-align: right;
    white-space: normal;
    overflow-wrap: anywhere;
    font-weight: 400;
  }

  :is(#mainContentContainer, .dashboard-viewport, .edu-page) table.edu-stack tbody td::before {
    content: attr(data-label);
    flex: 0 0 38%;
    max-width: 38%;
    text-align: left;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--cs-muted, #5d6c68);
  }

  :is(#mainContentContainer, .dashboard-viewport, .edu-page) table.edu-stack tbody td:first-child {
    justify-content: flex-start;
    padding-bottom: .45rem;
    font-family: var(--edu-serif);
    font-size: 1rem;
    font-weight: 700;
    text-align: left;
    color: var(--cs-primary-strong, #092b28);
  }

  :is(#mainContentContainer, .dashboard-viewport, .edu-page) table.edu-stack tbody td:first-child::before {
    display: none;
  }

  :is(#mainContentContainer, .dashboard-viewport, .edu-page) table.edu-stack tbody td.edu-actions-cell {
    justify-content: flex-end;
    width: 100%;
    border-bottom: 0 !important;
    padding-top: .5rem;
  }

  :is(#mainContentContainer, .dashboard-viewport, .edu-page) table.edu-stack tbody td.edu-actions-cell::before {
    display: none;
  }

  :is(#mainContentContainer, .dashboard-viewport, .edu-page) table.edu-stack tbody td.edu-empty-cell {
    display: block;
    text-align: center;
  }

  :is(#mainContentContainer, .dashboard-viewport, .edu-page) table.edu-stack tbody td.edu-empty-cell::before {
    display: none;
  }

  .edu-page .cs-table-footer {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  .edu-page * {
    transition: none !important;
  }
}

/* ---------- Transitional aliases: legacy class names still used by templates not yet moved to edu-* ---------- */
.education-list-page,
.education-form-page { font-family: var(--edu-sans); }
.education-page-icon { flex: 0 0 auto; width: 2.5rem; height: 2.5rem; display: inline-flex; align-items: center; justify-content: center; border-radius: var(--edu-radius-sm); background: var(--cs-primary-soft, #e4eeec); border: 1px solid var(--cs-border, #d9e0dc); color: var(--cs-primary, #123b36); font-size: 1.15rem; }
.education-toolbar { display: flex; flex-wrap: wrap; gap: .5rem; justify-content: flex-start; }
.education-filter-card { border: 1px solid var(--cs-border, #d9e0dc) !important; background: var(--cs-surface, #fff); box-shadow: 0 1px 2px rgba(9,43,40,.05), 0 6px 16px rgba(9,43,40,.05) !important; overflow: hidden; }
.education-empty-state { max-width: 280px; }
.education-empty-icon { width: 48px; height: 48px; margin: 0 auto; border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; background: var(--cs-primary-soft, #e4eeec); color: var(--cs-primary, #123b36); font-size: 1.35rem; }
@media (min-width: 992px) { .education-toolbar { justify-content: flex-end; } }

/* Bootstrap rows use negative gutters; the portal zeroes the padding of .container-fluid on small screens, which clips
   rows by half a gutter at both edges. Keep enough page padding so nothing is cut off. */
@media (max-width: 991.98px) {
  :is(#mainContentContainer, .dashboard-viewport) .edu-page.container-fluid {
    padding-left: .75rem !important;
    padding-right: .75rem !important;
  }
}

/* The portal styles every form.submit-form in the content area as a card; education forms already sit in .edu-form-card. */
:is(#mainContentContainer, .dashboard-viewport, [data-structure-active-slot], [data-drilldown-active-slot]) .edu-form-card form.submit-form:not(.app-dashboard-action-buttons):not(.vacancy-clearance-form) {
  max-width: none;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
}

/* A reason box and its button in a details panel (reverse a payment). */
.edu-panel__reason {
  display: flex;
  flex: 1 1 100%;
  gap: .5rem;
}

.edu-panel__reason .form-control {
  min-width: 0;
}

/* Row actions that are POST forms (delete) must not pick up the portal's card styling for form.submit-form. */
:is(#mainContentContainer, .dashboard-viewport, [data-structure-active-slot], [data-drilldown-active-slot]) .edu-actions form.submit-form:not(.app-dashboard-action-buttons):not(.vacancy-clearance-form) {
  display: inline-flex;
  max-width: none;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  border-radius: 0;
}

.edu-actions .cs-table-icon-action {
  flex: 0 0 2rem;
}

/* A long list of checkboxes (many-to-many fields) scrolls inside its box, with a filter above it. */
.edu-check-group--scroll .edu-check-group__list {
  max-height: 14rem;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.edu-check-group__filter {
  margin-bottom: .5rem;
}
