/* Global system shell styles, theme variables, navigation, and shared layout utilities. */

/* Poppins is now requested with a <link> in the templates that load this
   stylesheet, not with @import. A CSS @import is invisible to the browser's
   preload scanner: it could not even be discovered until this entire
   stylesheet had been downloaded and parsed, which put a full serialized
   round trip in front of first paint on every page. */

:root{
  /* Global fallbacks â€“ perâ€‘client themes override these via client_theme.css */
  --primary-color: #8F469B;
  --secondary-color: #494C9E;
  --bg-color: #f8f9ff;
  --navbar-bg-color: #b2c9ff;
  --sidebar-color: var(--navbar-bg-color);
  --btn-color: #6918b4;
  /* Table headers use the tenant's brand color everywhere for consistency;
     this alias exists for the handful of rules still written against the
     older name (see main_system_index.css search "table header color"). */
  --table-header-color: var(--primary-color);

  --side-bar-bg-color: #f0f0f5d2;
  --modul-bg-color: ##555;
  --flashcard-header-color: #6c5ce7;
  --quiz-header-color: #fd79a8;
  --assist-subject-card-color:#ddd;
  --blue-primary: var(--btn-color);

  /* The platform logos colors */

   --color-blue-light: #3498db33;
  --color-blue-dark: #3498db80;
  --color-red-shadow: #e6060670;
  --color-red-dark: rgb(204 0 0 / 36.1%);
  --color-green-light: #2ecc7133;
  --color-green-dark: #2ecc7180;
  --color-blue-variant-light: #22a8e648;
  --color-blue-variant-darik: #222fe680;
  --color-lime-light: #3ce74d33;
  --color-lime-dark: #3ce78680;
  --color-pink-light: #e90ff133;
  --color-pink-dark: #e90ff180;
  --color-white-transparent-2: #fff3;
  --color-red-shadow: #ff44444d;
  --bg-sequential-colour-grey:linear-gradient(to right top, #110f0f, #1a1818, #333131, #3b3838, #a3a3a3);

}

/* Programme Teams tab: stacked, labelled records on narrow screens. */
@media (max-width: 767.98px) {
  body.programme-management-content-page #programme-teams-panel,
  body.programme-management-content-page #programme-teams-panel .programme-table-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  body.programme-management-content-page #programme-teams-panel .programme-table-header {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    padding: 14px 12px;
  }

  body.programme-management-content-page #programme-teams-panel .programme-table-heading {
    width: 100%;
    min-width: 0;
    overflow-wrap: anywhere;
  }

  body.programme-management-content-page #programme-teams-panel .programme-actions,
  body.programme-management-content-page #programme-teams-panel .programme-actions .btn {
    width: 100%;
  }

  body.programme-management-content-page #programme-teams-panel .programme-actions .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    margin: 0;
    white-space: normal;
  }

  body.programme-management-content-page #programme-teams-panel .programme-table-wrapper {
    width: 100%;
    max-width: 100%;
    padding: 12px;
    overflow: visible;
    box-sizing: border-box;
  }

  body.programme-management-content-page #programme-teams-panel .programme-teams-table,
  body.programme-management-content-page #programme-teams-panel .programme-teams-table tbody,
  body.programme-management-content-page #programme-teams-panel .programme-teams-table tr,
  body.programme-management-content-page #programme-teams-panel .programme-teams-table td {
    display: block;
    width: 100%;
  }

  body.programme-management-content-page #programme-teams-panel .programme-teams-table {
    min-width: 0;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
  }

  body.programme-management-content-page #programme-teams-panel .programme-teams-table colgroup,
  body.programme-management-content-page #programme-teams-panel .programme-teams-table thead {
    display: none;
  }

  body.programme-management-content-page #programme-teams-panel .programme-team-row {
    margin: 0 0 12px;
    padding: 8px 12px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 7px 18px rgba(15, 23, 42, 0.06);
    overflow: visible;
  }

  body.programme-management-content-page #programme-teams-panel .programme-team-row td {
    display: grid;
    grid-template-columns: minmax(105px, 40%) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 40px;
    padding: 8px 0;
    border: 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.07);
    color: var(--pm-ink);
    font-size: 12px;
    text-align: right;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body.programme-management-content-page #programme-teams-panel .programme-team-row td:last-child {
    border-bottom: 0;
  }

  body.programme-management-content-page #programme-teams-panel .programme-team-row td::before {
    content: attr(data-label);
    color: var(--pm-muted);
    font-size: 11px;
    font-weight: 800;
    line-height: 1.25;
    text-align: left;
  }

  body.programme-management-content-page #programme-teams-panel .programme-team-name {
    text-align: right;
  }

  body.programme-management-content-page #programme-teams-panel .programme-team-actions-cell {
    overflow: visible;
  }

  body.programme-management-content-page #programme-teams-panel .programme-team-actions-cell .programme-learner-manage-dropdown,
  body.programme-management-content-page #programme-teams-panel .programme-team-actions-cell .programme-learner-manage-toggle {
    width: 100%;
    max-width: none;
  }

  body.programme-management-content-page #programme-teams-panel .programme-team-actions-cell .programme-learner-manage-toggle {
    min-height: 38px;
    justify-content: center;
  }

  body.programme-management-content-page #programme-teams-panel .programme-empty-row td {
    display: block;
    width: 100%;
    padding: 18px 12px;
    text-align: center;
    white-space: normal;
  }

  body.programme-management-content-page #programme-teams-panel .programme-pagination {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    padding: 12px;
    text-align: center;
  }

  body.programme-management-content-page #programme-teams-panel .programme-pagination-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    width: 100%;
  }

  body.programme-management-content-page #programme-teams-panel .programme-pagination-link {
    flex: 1 1 90px;
    min-height: 38px;
    padding: 9px 12px;
    text-align: center;
  }
}

/* Standalone management pages: shared CSS extracted from templates */
.standalone-border-2 {
  border-width: 2px !important;
}

.force-display-block {
  display: block !important;
}

.standalone-icon-square {
  width: 40px;
  height: 40px;
  border-radius: 10px;
}

.card-icon-inverse {
  width: 55px;
  height: 55px;
  object-fit: contain;
}

body.programme-management-standalone-page #app.programme-management-app-shell {
  margin-top: -26px !important;
  width: 100%;
  max-width: 100%;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Keep standalone programme management pages scrollable.
   This protects touch scrolling on iPad/mobile even when other
   layout stabilizers adjust overflow behavior. */
body.programme-management-standalone-page {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

body.programme-management-standalone-page #app.programme-management-app-shell .programme-management-embed-header-shell,
body.programme-management-standalone-page #app.programme-management-app-shell .programme-management-embed-content-shell {
  padding-left: 0.2rem !important;
  padding-right: 0.2rem !important;
}

/* Tighten the standalone Programme Management shell gutters so the
   main white card sits closer to the sidebar and browser edge. */
body.programme-management-standalone-page:not(.view-programme-main-page):not(.programme-management-content-page) #app.programme-management-app-shell > #status_tabContent {
  width: 100%;
  max-width: 100%;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0.1rem !important;
  padding-right: 0.1rem !important;
  box-sizing: border-box;
}

body.programme-management-standalone-page:not(.view-programme-main-page):not(.programme-management-content-page) #app.programme-management-app-shell > #status_tabContent.pe-5,
body.programme-management-standalone-page:not(.view-programme-main-page):not(.programme-management-content-page) #app.programme-management-app-shell > #status_tabContent.pe-md-0,
body.programme-management-standalone-page:not(.view-programme-main-page):not(.programme-management-content-page) #app.programme-management-app-shell > #status_tabContent.me-2,
body.programme-management-standalone-page:not(.view-programme-main-page):not(.programme-management-content-page) #app.programme-management-app-shell > #status_tabContent.px-3 {
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0.1rem !important;
  padding-right: 0.1rem !important;
  box-sizing: border-box;
}

body.programme-management-standalone-page:not(.view-programme-main-page):not(.programme-management-content-page) #app.programme-management-app-shell > #status_tabContent > .card,
body.programme-management-standalone-page:not(.view-programme-main-page):not(.programme-management-content-page) #app.programme-management-app-shell > #status_tabContent > .card.border-light.shadow {
  width: 100%;
  max-width: 100%;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box;
}

body.programme-management-standalone-page #app.programme-management-app-shell .header-card .card-body {
  padding: 1rem 1rem 0.95rem !important;
}

/* Trim the Bootstrap .p-4 gutter on #admin-content-area (the wrapper one
   level up from .programme-management-embed) so the shell sits closer to
   both the sidebar and the browser edge. Left/right only -- top/bottom is
   untouched so vertical spacing doesn't shift. */
body.programme-management-standalone-page #app.programme-management-app-shell #admin-content-area {
  padding-left: 0.2rem !important;
  padding-right: 0.2rem !important;
}

body.programme-management-standalone-page #app.programme-management-app-shell .header-card h6 {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  line-height: 1.2;
}

@media (min-width: 768px) {
  body.programme-management-standalone-page:not(.view-programme-main-page):not(.programme-management-content-page):not(.programme-management-hide-sidebar-page) .home-section.mx-4 {
    margin-left: 0.5rem !important;
    margin-right: 0.25rem !important;
  }

  /* Same margin correction, extended to the other admin-home pages that got
     the matching width/padding trims elsewhere in this file. Without this,
     their .home-section falls back to Bootstrap's plain .mx-4 (1.5rem each
     side), which reads as a much wider left gutter than Programme
     Management even though the width/padding trims are identical.
     System Management and Platform Theme use their own extra body class
     here (system-management-content-page / platform-theme-page) since the
     rule above excludes .programme-management-content-page, which both of
     them also carry. */
  body.course-management-standalone-page .home-section.mx-4,
  body.practicals-management-standalone-page .home-section.mx-4,
  body.admin-dashboard-standalone-page .home-section.mx-4,
  body.system-management-content-page .home-section.mx-4,
  body.platform-theme-page .home-section.mx-4 {
    margin-left: 0.5rem !important;
    margin-right: 0.25rem !important;
  }

  /* Keep the assessment-template card visually centred in the available
     content area by using the same gutter on both sides. */
  body.assessment-templates-standalone-page .home-section.mx-4 {
    margin-left: 0.375rem !important;
    margin-right: 0.375rem !important;
  }

  /* Course Curriculum: equal margins both sides -- the 0.5rem/0.25rem split
     above (tuned for the other standalone shells) read as lopsided here. */
  body.course-curriculum-standalone-page .home-section.mx-4 {
    margin-left: 0.375rem !important;
    margin-right: 0.375rem !important;
  }

  body.programme-management-standalone-page:not(.view-programme-main-page):not(.programme-management-content-page):not(.programme-management-hide-sidebar-page) .home-section:not(.admin-home-layout) {
    left: 126px !important;
    width: calc(100% - 111px) !important;
  }

  /* Extend the page shell left while preserving its right edge. */
  body.assessment-templates-standalone-page .home-section:not(.admin-home-layout) {
    left: 109px !important;
    width: calc(100% - 112px) !important;
  }

  /* course_view_template (Manage Course/Subject Curriculum) never sets
     is_admin_home either -- same gap, same fix. Its own shell already has
     p-0 m-0 (course-view-curriculum-page), so the only remaining offender is
     the outer .w-100.d-flex.mx-2 wrapper div, zeroed below. */
  body.course-curriculum-standalone-page .home-section:not(.admin-home-layout) {
    /* Centre the content within the area remaining beside the sidebar. */
    left: 114px !important;
    width: calc(100% - 114px) !important;
  }

  /* practicals_management (skill_management app) never sets is_admin_home,
     so .home-section falls back to the un-inset base rule (left: 75px;
     width: calc(100% - 99px); padding: 15px) instead of the
     .admin-home-layout path every other management page uses -- none of
     the .home-section.admin-home-layout trims elsewhere in this file ever
     match here. Give it the same left/width/padding values tuned for the
     admin-home pages so it reads the same as its sibling, Assessments. */
  body.practicals-management-standalone-page .home-section:not(.admin-home-layout) {
    left: 115px !important;
    width: calc(100% - 115px - 0.75rem) !important;
    padding-left: 0.2rem !important;
    padding-right: 0.2rem !important;
  }

  /* System Management: halve the desktop gap beside the 109px sidebar at
     the page-container level. The matching width increase preserves the
     shell's existing right edge. */
  body.system-management-content-page .home-section:not(.admin-home-layout) {
    left: 113px !important;
    width: calc(100% - 161px) !important;
  }
}

body.qualification-management-standalone-page #qualification-management-app.qualification-management-app-shell {
  margin-top: 0 !important;
  width: 100%;
  max-width: 100%;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.qualification-management-standalone-page #qualification-management-app.qualification-management-app-shell .qualification-management-embed-shell {
  padding-left: 0.85rem !important;
  padding-right: 0.85rem !important;
  margin-right: 0 !important;
}

body.applicants-management-standalone-page #applicants-management-app.applicants-management-app-shell {
  margin-top: 0 !important;
  width: 100%;
  max-width: 100%;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.applicants-management-standalone-page #applicants-management-app.applicants-management-app-shell .applicants-management-embed-shell {
  padding-left: 0.85rem !important;
  padding-right: 0.85rem !important;
}

body.applicants-management-standalone-page.applicants-page-loading {
  overflow: hidden;
}

body.applicants-management-standalone-page.applicants-page-loading #applicants-management-app.applicants-management-app-shell {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

body.course-management-standalone-page #app.course-management-app-shell {
  margin-top: -26px !important;
  width: 100%;
  max-width: 100%;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Mentors use the compact shell spacing on these standalone pages. */
body.role-mentor.course-management-standalone-page #app.course-management-app-shell {
  margin-top: -7px !important;
}

body.course-management-standalone-page #app.course-management-app-shell .course-management-embed-shell {
  padding-left: 0.2rem !important;
  padding-right: 0.2rem !important;
  margin-right: 0 !important;
}

/* Trim the Bootstrap .p-4 gutter on #admin-content-area, one level up from
   .course-management-embed-shell, matching the Programme Management trim.
   Left/right only -- top/bottom is untouched. */
body.course-management-standalone-page #app.course-management-app-shell #admin-content-area {
  padding-left: 0.2rem !important;
  padding-right: 0.2rem !important;
}

body.assessment-management-standalone-page #app.assessment-management-app-shell,
body.practicals-management-standalone-page #app.practicals-management-app-shell {
  margin-top: -7px !important;
  width: 100%;
  max-width: 100%;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

body.course-curriculum-standalone-page .course-view-curriculum-page.card-margin-top,
body.course-curriculum-standalone-page .teacher-subject-curriculum-page.card-margin-top {
  margin-top: -7px !important;
}

/* Mentor's Course Curriculum page (course_view_template.html) shares its
   markup with the learner view and otherwise falls back to the default
   1.5rem .card-margin-top on desktop, leaving a large gap under the topnav
   above the hero card. Match the tight -7px top spacing already used for
   the admin standalone view and the learner homepage hero. */
body.mentor-course-curriculum-page .course-view-curriculum-page.card-margin-top,
body.mentor-course-curriculum-page .teacher-subject-curriculum-page.card-margin-top {
  margin-top: -7px !important;
}

/* teacher_subject_curriculum.html -- "Add My Tutor Curriculum" modal
   (#aiGenerateCourseModal). Previously inline style=""; Bootstrap's
   max-height utilities are percentage-only (mh-100), so these viewport-based
   limits need their own rules. */
.ai-generate-course-modal-content {
  max-height: 90vh;
}

.ai-generate-course-modal-body {
  max-height: calc(90vh - 140px);
}

/* The curriculum shell itself is already p-0 m-0; the remaining side gutter
   comes from its parent .w-100.d-flex.mx-2 wrapper (course_view_template.html).
   Zero it, matching the assessment-templates-page shell trim. */
body.course-curriculum-standalone-page .w-100.d-flex.mx-2 {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

body.assessment-management-standalone-page #app.assessment-management-app-shell .assessment-management-embed-shell,
body.practicals-management-standalone-page #app.practicals-management-app-shell .assessment-management-embed-shell {
  padding-left: 0.2rem !important;
  padding-right: 0.2rem !important;
  margin-right: 0 !important;
}

/* Extend only the desktop Practicals shell to the left by halving its gutter. */
@media (min-width: 768px) {
  body.practicals-management-standalone-page #app.practicals-management-app-shell .assessment-management-embed-shell {
    padding-left: 0.1rem !important;
  }
}

@media (min-width: 768px) {
  body.assessment-management-standalone-page #app.assessment-consistent-shell {
    margin-left: 0.25rem !important;
    margin-top: -26px !important;
    width: calc(100% + 0.75rem);
    max-width: none;
  }

  body.assessment-management-standalone-page #app.assessment-consistent-shell > .assessment-management-embed-shell {
    padding-left: 0.04rem !important;
    padding-right: 0.04rem !important;
  }
}

/* Trim the Bootstrap .p-4 gutter one level up from the embed shell, matching
   the Programme Management trim. Assessments has #admin-content-area;
   Practicals' equivalent .card-body has no id, so target it structurally.
   The page-specific assessment shell rule above uses the same -26px top
   reference as Assessment Templates. This padding is inside that shell and
   is trimmed from Bootstrap's 1.5rem default to 0.5rem. */
body.assessment-management-standalone-page #app.assessment-management-app-shell #admin-content-area {
  padding-left: 0.2rem !important;
  padding-right: 0.2rem !important;
  padding-top: 0.5rem !important;
}

body.practicals-management-standalone-page #practicals-management-shell > .card > .card-body {
  padding-left: 1.25rem !important;
  padding-right: 1.25rem !important;
  padding-top: 1.25rem !important;
}

body.practicals-management-standalone-page #practicals-management-shell > .card {
  border-color: var(--primary-color) !important;
  border-radius: 1.5rem !important;
  overflow: hidden;
}

/* Give the active Practicals content card the same header treatment as the
   Programme Management Learners card. The outer navigation shell remains
   unchanged; this header belongs to the content card below it. */
body.practicals-management-standalone-page .practicals-content-header {
  min-height: 56px;
  margin: 0;
  padding: 10px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--primary-color);
  color: #fff;
  border-top-left-radius: 1.5rem;
  border-top-right-radius: 1.5rem;
}

body.practicals-management-standalone-page .practicals-content-header .programme-table-heading {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.25;
}

#app.assessment-management-app-shell,
#app.practicals-management-app-shell {
  margin-top: -26px !important;
  width: 100%;
  max-width: 100%;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

#app.assessment-management-app-shell .assessment-management-embed-shell,
#app.practicals-management-app-shell .assessment-management-embed-shell {
  padding-left: 0.2rem !important;
  padding-right: 0.2rem !important;
  margin-right: 0 !important;
}

@media (max-width: 767.98px) {
  #app.assessment-management-app-shell,
  #app.practicals-management-app-shell {
    margin-top: 0.55rem !important;
  }

  #app.assessment-management-app-shell .assessment-management-embed-shell,
  #app.practicals-management-app-shell .assessment-management-embed-shell {
    padding-left: 0.45rem !important;
    padding-right: 0.45rem !important;
  }

  /* The mobile bottom nav (.sidebar.sidebar-md) is fixed to the bottom of
     the viewport -- without bottom clearance here, the last practicals card
     (and the tab-panel content beneath it) renders underneath the bar
     instead of scrolling clear of it. */
  body.practicals-management-standalone-page #app.practicals-management-app-shell {
    padding-bottom: 4.5rem;
  }

  body.course-curriculum-standalone-page .course-view-curriculum-page.card-margin-top,
  body.course-curriculum-standalone-page .teacher-subject-curriculum-page.card-margin-top {
    margin-top: 0.55rem !important;
  }
}

body.admin-dashboard-standalone-page .admin-dashboard-app-shell #status_tabContent {
  padding-left: 0.85rem !important;
  padding-right: 0.85rem !important;
  margin-right: 0 !important;
}

/* Keep admin management sidebars visible immediately on initial paint.
   These pages always use the cards sidebar, so avoid the d-none -> shown flash
   while unified sidebar JS initializes. */
body.programme-management-standalone-page .sidebar .app-programme-cards-list,
body.qualification-management-standalone-page .sidebar .app-programme-cards-list,
body.applicants-management-standalone-page .sidebar .app-programme-cards-list,
body.course-management-standalone-page .sidebar .app-programme-cards-list,
body.course-curriculum-standalone-page .sidebar .app-programme-cards-list,
body.dynamic-report-standalone-page .sidebar .app-programme-cards-list,
body.practicals-management-standalone-page .sidebar .app-programme-cards-list,
body.assessment-management-standalone-page .sidebar .app-programme-cards-list,
body.system-management-standalone-page .sidebar .app-programme-cards-list {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

@media (min-width: 768px) and (max-width: 1199.98px) {
  body.programme-management-standalone-page .home-section.admin-home-layout,
  body.qualification-management-standalone-page .home-section.admin-home-layout,
  body.course-management-standalone-page .home-section.admin-home-layout,
  body.assessment-management-standalone-page .home-section.admin-home-layout {
    transition: none !important;
    overflow-x: auto !important;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  body.programme-management-standalone-page .home-section.admin-home-layout {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior-y: contain;
    height: calc(100vh - 153px) !important;
    max-height: calc(100vh - 153px) !important;
  }

  body.programme-management-standalone-page .home-section.admin-home-layout #app.programme-management-app-shell,
  body.qualification-management-standalone-page .home-section.admin-home-layout #qualification-management-app.qualification-management-app-shell,
  body.applicants-management-standalone-page .home-section.admin-home-layout #applicants-management-app.applicants-management-app-shell,
  body.course-management-standalone-page .home-section.admin-home-layout #app.course-management-app-shell,
  body.assessment-management-standalone-page .home-section.admin-home-layout #app.assessment-management-app-shell,
  body.practicals-management-standalone-page .home-section.admin-home-layout #app.practicals-management-app-shell {
    margin-left: 1.35rem !important;
    max-width: calc(100% - 1.35rem);
  }

  body.programme-management-standalone-page .sidebar.sidebar-md .orcaa-sidebar-container,
  body.qualification-management-standalone-page .sidebar.sidebar-md .orcaa-sidebar-container,
  body.applicants-management-standalone-page .sidebar.sidebar-md .orcaa-sidebar-container,
  body.course-management-standalone-page .sidebar.sidebar-md .orcaa-sidebar-container,
  body.course-curriculum-standalone-page .sidebar.sidebar-md .orcaa-sidebar-container,
  body.dynamic-report-standalone-page .sidebar.sidebar-md .orcaa-sidebar-container,
  body.practicals-management-standalone-page .sidebar.sidebar-md .orcaa-sidebar-container,
  body.assessment-management-standalone-page .sidebar.sidebar-md .orcaa-sidebar-container,
  body.system-management-standalone-page .sidebar.sidebar-md .orcaa-sidebar-container {
    margin-top: 0 !important;
  }

  body.programme-management-standalone-page .sidebar.sidebar-md .orcaa-sidebar,
  body.qualification-management-standalone-page .sidebar.sidebar-md .orcaa-sidebar,
  body.applicants-management-standalone-page .sidebar.sidebar-md .orcaa-sidebar,
  body.course-management-standalone-page .sidebar.sidebar-md .orcaa-sidebar,
  body.course-curriculum-standalone-page .sidebar.sidebar-md .orcaa-sidebar,
  body.dynamic-report-standalone-page .sidebar.sidebar-md .orcaa-sidebar,
  body.practicals-management-standalone-page .sidebar.sidebar-md .orcaa-sidebar,
  body.assessment-management-standalone-page .sidebar.sidebar-md .orcaa-sidebar,
  body.system-management-standalone-page .sidebar.sidebar-md .orcaa-sidebar {
    margin-top: 3.2rem !important;
  }

  body.programme-management-standalone-page #app.programme-management-app-shell .program-tree-card-row {
    flex-direction: row !important;
    align-items: center !important;
  }

  body.programme-management-standalone-page #app.programme-management-app-shell .program-tree-card-actions {
    width: auto !important;
    align-items: flex-end !important;
  }

  body.programme-management-standalone-page #app.programme-management-app-shell .programme-tree-toolbar-count {
    display: flex !important;
  }
}

@media (max-width: 767.98px) {
  body.programme-management-standalone-page #app.programme-management-app-shell {
    margin-top: 0.55rem !important;
    margin-bottom: 1.5rem !important;
  }

  /* Bootstrap's plain .mx-4 (1.5rem each side) is only trimmed for
     desktop widths elsewhere in this file (see the min-width:768px block
     above). On narrow phones that leaves ~48px of unused margin eating
     into the shell, which is why the app doesn't visually fill the
     screen -- trim it here too so the shell can reach full width. */
  body.programme-management-standalone-page .home-section.mx-4 {
    margin-left: 0.25rem !important;
    margin-right: 0.25rem !important;
  }

  body.programme-management-standalone-page .home-section.admin-home-layout {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  body.programme-management-standalone-page #app.programme-management-app-shell .programme-management-embed-header-shell,
  body.programme-management-standalone-page #app.programme-management-app-shell .programme-management-embed-content-shell {
    padding-left: 0.45rem !important;
    padding-right: 0.45rem !important;
  }

  /* The Active/Completed/Pending tabs use .status-tab + flex-wrap, but
     Bootstrap's .d-flex is !important so wrapping alone still leaves
     cramped, unevenly-sized pills on narrow phones. Force them into an
     even 3-column grid instead so each tab is a full-width, equally
     sized touch target. */
  body.programme-management-standalone-page .programme-management-status-tabs-wrap {
    padding-left: 0.15rem !important;
    padding-right: 0.15rem !important;
  }

  body.programme-management-standalone-page .programme-management-status-tabs.nav.d-flex {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.45rem;
  }

  /* With the "Requested Access" tab there are four tabs: a 2 x 2 grid reads
     better than 3 + 1. Must stay after the 3-column rule above. */
  body.programme-management-standalone-page .programme-management-status-tabs.programme-management-status-tabs-four.nav.d-flex {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body.programme-management-standalone-page .programme-management-status-tabs .nav-item {
    width: 100%;
  }

  body.programme-management-standalone-page .programme-management-status-tabs .nav-link {
    width: 100%;
    min-height: 2.45rem;
    padding: 0.48rem 0.35rem;
    font-size: 0.85rem;
    justify-content: center;
    text-align: center;
  }

  body.programme-management-standalone-page #app.programme-management-app-shell .header-card .card-body {
    padding: 0.95rem 0.95rem 0.9rem !important;
  }

  body.qualification-management-standalone-page #qualification-management-app.qualification-management-app-shell,
  body.applicants-management-standalone-page #applicants-management-app.applicants-management-app-shell,
  body.course-management-standalone-page #app.course-management-app-shell,
  body.assessment-management-standalone-page #app.assessment-management-app-shell,
  body.practicals-management-standalone-page #app.practicals-management-app-shell {
    margin-top: 0.55rem !important;
  }

  body.qualification-management-standalone-page #qualification-management-app.qualification-management-app-shell .qualification-management-embed-shell,
  body.applicants-management-standalone-page #applicants-management-app.applicants-management-app-shell .applicants-management-embed-shell,
  body.course-management-standalone-page #app.course-management-app-shell .course-management-embed-shell,
  body.assessment-management-standalone-page #app.assessment-management-app-shell .assessment-management-embed-shell,
  body.practicals-management-standalone-page #app.practicals-management-app-shell .assessment-management-embed-shell {
    padding-left: 0.45rem !important;
    padding-right: 0.45rem !important;
  }

  /* Keep the course toolbar action readable on narrow screens. */
  body.course-management-standalone-page #app.course-management-app-shell .programme-courses-toolbar {
    flex-wrap: wrap;
    align-items: stretch;
    gap: 0.6rem;
  }

  body.course-management-standalone-page #app.course-management-app-shell .programme-courses-content-card .admin-courses-status-tabs {
    flex: 1 1 100%;
    width: 100%;
  }

  body.course-management-standalone-page #app.course-management-app-shell .programme-courses-toolbar-menu {
    margin-left: 2rem;
    width: 100%;
    max-width: 100%;
  }

  body.course-management-standalone-page #app.course-management-app-shell .programme-courses-toolbar-menu > .btn {
    width: 100%;
    max-width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    line-height: 1.2;
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
  }

  body.course-management-standalone-page #app.course-management-app-shell .programme-courses-toolbar-menu > .btn i {
    margin-right: 0 !important;
  }

  /* Match course-management edge spacing on view-programme-main mobile. */
  body.view-programme-main-page #status_tabContent,
  body.view-programme-main-page #status_tabContent.pe-5,
  body.view-programme-main-page #status_tabContent.pe-md-0,
  body.view-programme-main-page #status_tabContent.me-2,
  body.view-programme-main-page #status_tabContent.px-3 {
    width: 100%;
    max-width: 100%;
    padding-left: 0.45rem !important;
    padding-right: 0.45rem !important;
    margin-right: 0 !important;
    box-sizing: border-box;
  }

  body.view-programme-main-page #status_tabContent > .card {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: auto !important;
  }

  body.view-programme-main-page #status_tabContent > .card > .card-body,
  body.view-programme-main-page #status_tabContent > .card > .card-body.p-4 {
    padding: 0.8rem !important;
  }
}

@media (min-width: 768px) {
  /* Keep the assessment toolbar on one desktop row and neutralize the old fixed filter offset. */
  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .row:first-child {
    align-items: center;
    flex-wrap: nowrap;
    gap: 0.75rem;
  }

  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .row:first-child > div {
    min-width: 0;
  }

  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .row:first-child > div:first-child {
    flex: 0 0 auto;
    width: auto;
    max-width: none;
  }

  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .row:first-child > div:nth-child(2) {
    flex: 1 1 auto;
    width: auto;
    max-width: none;
    display: flex;
    justify-content: flex-end;
    align-items: center;
  }

  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .row:first-child > div:empty {
    display: none;
  }

  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .dataTables_length,
  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .dataTables_filter,
  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .dt-length,
  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .dt-search {
    float: none !important;
    margin: 0 0 0.5rem !important;
    width: auto;
    min-width: 0;
  }

  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .dataTables_length,
  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .dt-length {
    display: inline-flex;
    align-items: center;
    justify-content: flex-start;
  }
}

/* Styles migrated from templates/new_ui/curriculum_content.html */
.learner-cart-layout .cart-header-card {
  overflow: hidden;
  border: 0;
  border-radius: 24px;
  background-color: #2f326b;
  background-image:
    linear-gradient(90deg, rgba(47, 50, 107, 0.62) 0%, rgba(47, 50, 107, 0.32) 38%, rgba(47, 50, 107, 0.12) 68%, rgba(47, 50, 107, 0.26) 100%),
    url("../../images/ChatGPT%20Image%20Sep%204,%202026,%2010_05_36%20AM%20(1).png");
  background-position: center;
  background-size: cover;
  color: #fff;
}

.learner-cart-layout .cart-header-card .content-panel,
.learner-cart-layout .cart-header-card .panel-header {
  background: transparent;
  box-shadow: none;
}

.learner-cart-layout .cart-header-card .panel-header {
  border-bottom-color: rgba(255, 255, 255, 0.22);
}

.learner-cart-layout .cart-header-card .panel-title,
.learner-cart-layout .cart-header-card .cart-header-body .text-dark {
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

.learner-cart-layout .cart-header-card .btn-outline-primary {
  border-color: rgba(255, 255, 255, 0.8);
  color: #fff;
}

.learner-cart-layout .cart-header-card .btn-outline-primary:hover,
.learner-cart-layout .cart-header-card .btn-outline-primary:focus {
  border-color: #fff;
  background: #fff;
  color: var(--primary-color);
}

/* Trim the hero banner's height by ~1/3: it was mostly empty background
   image around the short title/description/button. */
.learner-cart-layout .cart-header-card .panel-header {
  padding-top: 13px;
  padding-bottom: 13px;
}

.learner-cart-layout .cart-header-card .cart-header-body {
  padding-top: 0.65rem !important;
  padding-bottom: 0.65rem !important;
}

.learner-cart-layout .cart-header-card .cart-header-body p {
  margin-bottom: 0.65rem;
}

.learner-cart-layout .cart-header-shell {
  margin-top: -7px !important;
}

/* My Courses "Courses' Information" hero card: match the same -7px pull
   used on the Checkout courses card so both sit the same distance below
   the navbar instead of the wider default Bootstrap .mt-4 gap. */
.learner-course-page-shell > .card.bg-white.shadow.mt-4 {
  margin-top: -7px !important;
}

/* Same hero photo used on the Checkout courses card (.cart-header-card) and
   the shared .teacher-curriculum-hero component ("My assessments" header),
   but confined to the panel-header row here (its own border-bottom is the
   "breaker line") since the tabs/course grid below need to stay on a plain
   white background. */
.learner-course-info-hero .panel-header {
  background-color: #2f326b;
  background-image:
    linear-gradient(90deg, rgba(47, 50, 107, 0.62) 0%, rgba(47, 50, 107, 0.32) 38%, rgba(47, 50, 107, 0.12) 68%, rgba(47, 50, 107, 0.26) 100%),
    url("../../images/ChatGPT%20Image%20Sep%204,%202026,%2010_05_36%20AM%20(1).png");
  background-position: center;
  background-size: cover;
  border-bottom-color: rgba(255, 255, 255, 0.22);
}

.learner-course-info-hero .panel-title {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* The learner course shell used to grow beyond its parent on desktop to
   reclaim a layout gutter. That extra width created page-level horizontal
   scrolling, even though the course cards themselves fit the viewport. */
html body.learner-course-layout {
  overflow-x: hidden;
}

body.learner-course-layout .home-section,
body.learner-course-layout .learner-course-page-shell {
  box-sizing: border-box;
  max-width: 100%;
  overflow-x: hidden;
}

@media (max-width: 767.98px) {
  /* Keep the checkout hero compact on phones: roughly half the former
     vertical footprint while retaining the title, description and action. */
  body.learner-cart-layout .cart-header-card {
    height: 140px;
    min-height: 140px;
    border-radius: 16px;
  }

  body.learner-cart-layout .cart-header-card .panel-header {
    padding: 0.45rem 0.75rem;
  }

  body.learner-cart-layout .cart-header-card .panel-title {
    font-size: 0.9rem;
    line-height: 1.15;
  }

  body.learner-cart-layout .cart-header-card .cart-header-body {
    padding: 0.35rem 0.75rem !important;
  }

  body.learner-cart-layout .cart-header-card .cart-header-body p {
    margin-bottom: 0.35rem;
    font-size: 0.68rem !important;
    line-height: 1.25;
  }

  body.learner-cart-layout .cart-header-card .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    max-width: 100%;
    min-height: 32px;
    padding: 0.3rem 0.75rem;
    font-size: 0.68rem;
    line-height: 1.2;
    white-space: nowrap;
  }

  /* The mobile sidebar becomes the bottom navigation on the cart page; it
     must not retain the desktop rule that shifts the content 60px right. */
  html body.learner-cart-layout .home-section,
  html body.learner-cart-layout .sidebar.active ~ .home-section,
  html body.learner-cart-layout .sidebar.close ~ .home-section {
    position: relative !important;
    left: 0 !important;
    right: auto !important;
    /* Sit right under the fixed top bar (its real mobile height, not the
       ~60px guess the base .home-section rule uses) instead of leaving a
       gap sized for a taller navbar. */
    top: calc(var(--topnav-height-mobile, 56px) + 4px) !important;
    width: 100% !important;
    max-width: 100vw !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-top: 0.5rem !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    /* Clear the fixed bottom nav (~60px tall) plus breathing room so the
       last course card/button isn't hidden underneath it. */
    padding-bottom: calc(22rem + env(safe-area-inset-bottom, 0px)) !important;
    box-sizing: border-box !important;
  }

  html body.learner-cart-layout .home-section > .container {
    width: 100%;
    max-width: 100%;
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
  }

  /* Keep the checkout hero inset evenly from both mobile edges. */
  html body.learner-cart-layout .cart-header-shell {
    width: 100% !important;
    max-width: 100% !important;
    /* Override the desktop -7px pull-in so the hero clears the fixed
       mobile top bar instead of being clipped beneath it. */
    margin-top: 1rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0.5rem !important;
    /* The mobile content area includes the narrow scrollbar gutter; reclaim
       that small amount so the card's visible side insets match. */
    padding-right: 0.25rem !important;
    margin-bottom: 1rem !important;
    box-sizing: border-box !important;
  }

  /* My Courses "Courses' Information" hero card sits under three stacked
     insets on the way out to the viewport edge: the <section> element's own
     .mx-4 (1.5rem) margin, .home-section's 15px padding, and this
     container-fluid's 0.75rem gutter. Cancelling only the last one (as a
     prior attempt did) still left the other two in place and made the card
     narrower than expected, or overshot into a horizontal scrollbar when the
     card's own negative margin was guessed instead. Zero out the ancestor
     spacing directly instead of guessing an offset on the card. */
  .home-section:has(> .learner-course-page-shell),
  .sidebar.active ~ .home-section:has(> .learner-course-page-shell) {
    left: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  /* A later, unscoped global rule (".container, .container-fluid { padding:
     1.5rem !important }", written for the subscription/pricing page) has
     equal specificity and comes after this in the file, so it was winning
     on source order and re-adding the gutter here. Use the two-class form
     to out-specify it instead of relying on order. */
  .container-fluid.learner-course-page-shell {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

@media (min-width: 768px) {
  /* Expand the checkout hero toward the sidebar while preserving its
     existing right edge. */
  body.learner-cart-layout .cart-header-shell {
    position: relative;
    left: -1rem;
    width: calc(100% + 1rem);
    max-width: none;
  }

  /* Keep the My Courses card's left edge fixed while consuming the unused
     right-side page gutter. */
  .learner-course-page-shell {
    width: 100%;
    max-width: 100%;
  }

  /* Keep the learner curriculum page's left edge fixed while using the
     excess right gutter, giving both sides the same visual spacing. */
  body.curriculum-content-layout:not(.course-curriculum-standalone-page) #curriculum-content-app {
    width: calc(100% + 1.25rem);
    max-width: none;
  }

  body.curriculum-content-layout #curriculum-content-app .teacher-curriculum-hero {
    margin-top: 0.5rem;
  }

  /* Grow the curriculum viewer toward the sidebar without moving its
     existing right edge. The rendered shell carries Bootstrap's mx-3. */
  body.curriculum-content-layout #curriculum-view-app > .container-fluid,
  body.course-curriculum-standalone-page #curriculum-view-app > .container-fluid {
    margin-left: 0 !important;
    width: calc(100% + 1rem);
    max-width: none;
  }

  /* Admin curriculum viewer: halve the remaining left gutter and return the
     recovered space to the card width, preserving its current right edge. */
  body.course-curriculum-standalone-page #curriculum-view-app > .container-fluid {
    margin-left: -0.75rem !important;
    width: calc(100% + 1.75rem);
  }

  /* The remaining left gap belongs to the parent page shell, not the card.
     Reduce only that padding; the content box grows left and its right edge
     remains governed by the unchanged right padding. */
  body.course-curriculum-standalone-page .home-section:not(.admin-home-layout) {
    padding-left: 0.145rem !important;
  }

  /* Keep the teacher curriculum's left edge fixed and consume the excess
     right gutter so both sides have matching visual spacing. */
  .teacher-subject-curriculum-page.card-margin-top.monitoring-margin-top {
    width: calc(100% + 1rem);
    max-width: none;
  }
}

#add_code_challenge_popup .code-challenge-dialog {
  max-width: min(1000px, calc(100vw - 48px));
}

#add_code_challenge_popup .modal-content {
  border: 0;
  border-radius: 10px;
  overflow: hidden;
}

#add_code_challenge_popup .modal-body {
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

#add_code_challenge_popup .code-challenge-shell {
  min-height: 0;
}

#add_code_challenge_popup .code-challenge-panel {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  min-width: 0;
}

#add_code_challenge_popup .code-challenge-panel .card-header {
  gap: 0.75rem;
  position: relative;
  z-index: 2;
}

#add_code_challenge_popup .code-challenge-content-list {
  max-height: 355px;
  overflow-y: auto;
}

#add_code_challenge_popup .code-challenge-content-list .list-group-item {
  gap: 0.75rem;
  white-space: normal;
}

#add_code_challenge_popup .code-challenge-content-list .list-group-item span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

#add_code_challenge_popup .code-challenge-table-actions {
  min-width: 220px;
}

#add_code_challenge_popup [data-code-challenge-requirements-list] {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#add_code_challenge_popup .code-challenge-requirement-row {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
}

#add_code_challenge_popup .code-challenge-requirement-input {
  min-height: 52px;
  max-height: 180px;
  resize: vertical;
  overflow-y: hidden;
  line-height: 1.45;
  padding: 0.75rem 0.875rem;
  white-space: pre-wrap;
}

/* Same red, white-x remove button as the Rubric Weighting rows (btn-danger
   btn-sm); it was btn-outline-danger, which the theme draws purple with a
   red x. Sized like those rows' button instead of a 44px block. */
#add_code_challenge_popup .code-challenge-requirement-remove {
  flex: 0 0 auto;
  min-width: 38px;
  height: 31px;
  margin-top: 0.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

#add_code_challenge_popup [data-code-challenge-preview-requirements] li {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

#add_code_challenge_popup .quill-editor-container .ql-container {
  min-height: 150px;
}

#add_code_challenge_popup .starter-code-editor-container {
  display: flex;
  min-height: 180px;
  border: 1px solid #ced4da;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

#add_code_challenge_popup .line-numbers-input {
  width: 48px;
  padding: 0.75rem 0.5rem;
  background: #f8f9fa;
  color: #6c757d;
  text-align: right;
  user-select: none;
  overflow: hidden;
}

#add_code_challenge_popup .starter-code-editor-container textarea {
  flex: 1;
  border: 0;
  resize: vertical;
  min-height: 180px;
  padding: 0.75rem;
  font-family: Consolas, Monaco, "Courier New", monospace;
}

@media (max-width: 767.98px) {
  #add_code_challenge_popup .code-challenge-dialog {
    max-width: calc(100vw - 16px);
    width: calc(100vw - 16px);
    margin: 0.5rem auto;
  }

  #add_code_challenge_popup .modal-body {
    max-height: calc(100vh - 120px);
  }
}

  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .dataTables_filter,
  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .dt-search {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    margin-left: 0 !important;
    text-align: right;
    white-space: nowrap;
  }

  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .dataTables_length label,
  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .dataTables_filter label,
  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .dt-length label,
  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .dt-search label {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-bottom: 0;
    white-space: nowrap;
  }

  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .dataTables_length select,
  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .dt-length select {
    display: inline-block;
    width: 68px !important;
    min-width: 68px !important;
    max-width: 68px !important;
    margin: 0;
    vertical-align: middle;
    border-radius: 0.6rem;
  }

  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .dataTables_filter input[type="search"],
  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .dt-search input[type="search"] {
    display: inline-block;
    width: auto !important;
    max-width: 100%;
    margin: 0;
    vertical-align: middle;
  }

  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .dataTables_filter input[type="search"],
  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .dt-search input[type="search"] {
    min-width: 12rem;
    max-width: 18rem;
  }

  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .dataTables_filter .reset-btn,
  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .dt-search .reset-btn {
    margin-left: 0.5rem !important;
    white-space: nowrap;
    flex: 0 0 auto;
    vertical-align: middle;
  }

@media (max-width: 768px) {
  /* Keep the main Assessments table readable on phones and small tablets. */
  body.assessment-management-standalone-page #management_assessment_app #manual_assessments .card-body {
    padding: 0.85rem 0.75rem !important;
  }

  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    position: relative;
    max-width: 100%;
    margin-bottom: 0.25rem;
    padding-bottom: 0.25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable both-edges;
  }

  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .dataTables_scroll,
  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .dataTables_scrollBody {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }

  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper table.data-table,
  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper table.dataTable {
    min-width: 860px !important;
    table-layout: auto !important;
  }

  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper table.data-table th,
  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper table.data-table td,
  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper table.dataTable th,
  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper table.dataTable td {
    font-size: 0.68rem !important;
    line-height: 1.25 !important;
    padding: 0.4rem 0.45rem !important;
    vertical-align: top;
    white-space: nowrap !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
  }

  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .row:first-child {
    align-items: flex-start;
    gap: 0.35rem;
  }

  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .row:first-child > div {
    flex: 0 0 100%;
    max-width: 100%;
  }

  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .row:first-child > div:empty {
    display: none;
  }

  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .dataTables_length,
  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .dataTables_filter {
    float: none !important;
    width: 100%;
    margin: 0 0 0.5rem !important;
  }

  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .dataTables_length select,
  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .dt-length select {
    width: 68px !important;
    min-width: 68px !important;
    max-width: 100%;
  }

  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .dataTables_length label,
  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .dataTables_filter label {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    width: 100%;
    margin-bottom: 0;
  }

  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .dataTables_filter input[type="search"] {
    flex: 1 1 12rem;
    min-width: 0;
    max-width: 100%;
    width: auto;
    font-size: 0.72rem;
    margin-left: 0 !important;
  }

  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .dataTables_filter .reset-btn {
    margin-left: 0 !important;
    white-space: nowrap;
    flex: 0 0 auto;
    align-self: center;
  }

  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .row.mt-2.dt-bottom > div {
    flex: 0 0 100%;
    max-width: 100%;
    text-align: left !important;
  }

  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .dataTables_info,
  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .dataTables_paginate {
    float: none !important;
    width: 100%;
    margin-top: 0.35rem;
  }

  body.assessment-management-standalone-page #management_assessment_app #manual_assessments_table_wrapper .dataTables_paginate {
    text-align: left !important;
  }
}

@media (max-width: 767.98px) {
  body.programme-management-standalone-page.admin-home-tablet-stable .home-section.admin-home-layout,
  body.qualification-management-standalone-page.admin-home-tablet-stable .home-section.admin-home-layout,
  body.course-management-standalone-page.admin-home-tablet-stable .home-section.admin-home-layout,
  body.assessment-management-standalone-page.admin-home-tablet-stable .home-section.admin-home-layout {
    transition: none !important;
    overflow-x: auto !important;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
  }

  body.programme-management-standalone-page.admin-home-tablet-stable .home-section.admin-home-layout {
    overflow-x: hidden !important;
    overflow-y: auto !important;
    height: calc(100vh - 153px) !important;
    max-height: calc(100vh - 153px) !important;
    overscroll-behavior-y: contain;
  }

  body.programme-management-standalone-page.admin-home-tablet-stable .home-section.admin-home-layout #app.programme-management-app-shell,
  body.qualification-management-standalone-page.admin-home-tablet-stable .home-section.admin-home-layout #qualification-management-app.qualification-management-app-shell,
  body.course-management-standalone-page.admin-home-tablet-stable .home-section.admin-home-layout #app.course-management-app-shell,
  body.assessment-management-standalone-page.admin-home-tablet-stable .home-section.admin-home-layout #app.assessment-management-app-shell,
  body.practicals-management-standalone-page.admin-home-tablet-stable .home-section.admin-home-layout #app.practicals-management-app-shell {
    margin-left: 1.35rem !important;
    max-width: calc(100% - 1.35rem);
  }

  body.programme-management-standalone-page.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar-container,
  body.qualification-management-standalone-page.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar-container,
  body.course-management-standalone-page.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar-container,
  body.course-curriculum-standalone-page.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar-container,
  body.dynamic-report-standalone-page.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar-container,
  body.practicals-management-standalone-page.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar-container,
  body.assessment-management-standalone-page.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar-container,
  body.system-management-standalone-page.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar-container {
    margin-top: 3rem !important;
  }

  body.programme-management-standalone-page.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar,
  body.qualification-management-standalone-page.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar,
  body.course-management-standalone-page.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar,
  body.course-curriculum-standalone-page.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar,
  body.dynamic-report-standalone-page.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar,
  body.practicals-management-standalone-page.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar,
  body.assessment-management-standalone-page.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar,
  body.system-management-standalone-page.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar {
    margin-top: 3.2rem !important;
  }
}

*{
  font-family: "Poppins" , sans-serif;
}

/* The curriculum page has separate desktop/tablet and mobile lists. On a
   short landscape viewport Bootstrap's md utilities otherwise select the
   desktop list and leave the course area mostly empty. */
html body.learner-mobile-bootstrap-ui .teacher-subject-curriculum-page {
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box;
}

html body.learner-mobile-bootstrap-ui .home-section,
html body.learner-mobile-bootstrap-ui .sidebar.active ~ .home-section {
  left: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
  box-sizing: border-box;
}

html body.learner-mobile-bootstrap-ui .teacher-subject-curriculum-page .mian-course-section,
html body.learner-mobile-bootstrap-ui .teacher-subject-curriculum-page .mian-course-section > .card,
html body.learner-mobile-bootstrap-ui .teacher-subject-curriculum-page .mobile-course-curriculum,
html body.learner-mobile-bootstrap-ui .teacher-subject-curriculum-page .mobile-module-card-shell,
html body.learner-mobile-bootstrap-ui .teacher-subject-curriculum-page .mobile-module-card {
  width: 100% !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-sizing: border-box;
}

html body.learner-mobile-bootstrap-ui .teacher-subject-curriculum-page .teacher-curriculum-hero.d-none.d-md-block,
html body.learner-mobile-bootstrap-ui .teacher-subject-curriculum-page .curriculum-list.d-none.d-md-block {
  display: none !important;
}

html body.learner-mobile-bootstrap-ui .teacher-subject-curriculum-page .mobile-course-curriculum.d-block.d-md-none {
  display: block !important;
  width: 100% !important;
}

/* ==========================================================================
   Platform-wide button standardization: every Bootstrap .btn (Save, Cancel,
   Manage, table row actions, etc.) and every .nav-pills toggle share the same
   readable typography and compact shape, regardless of which page or
   component renders them. Colors/variants are left alone on purpose.

   Placed right after the global Poppins rule, early in this file's cascade,
   so it sets the shared baseline everywhere .btn is used unqualified; the
   older bespoke button classes elsewhere in this file (.btn-orca,
   .admin-dashboard-primary-btn, etc.) still set their own font-size/padding
   later in the file and will keep winning for elements that carry those
   classes until they're individually migrated off -- that's expected, not a
   bug in this rule. */
.btn,
.nav-pills .nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
  font-family: "Poppins", sans-serif !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1.2 !important;
  min-height: 26px;
  padding: 5px 16px !important;
  border-radius: 8px !important;
  text-align: center;
  white-space: normal;
  /* break-word, not anywhere: "anywhere" also shrinks the button's
     min-content width to a single character, so a squeezed flex/grid button
     stacked its label one letter per line. break-word still breaks an
     over-long word but keeps whole words as the minimum width. */
  overflow-wrap: break-word;
}

@media (max-width: 767.98px) {
  .btn,
  .nav-pills .nav-link {
    min-height: 27px;
    padding: 5px 14px !important;
  }

  .btn-group,
  .btn-group-vertical {
    max-width: 100%;
  }

  .btn-group > .btn,
  .btn-group-vertical > .btn {
    min-width: 0;
    flex: 1 1 auto;
  }
}

/* Shared mobile auth / landing / login layout
   (used by mobile landing page and mobile login) */
@media (max-width: 767.98px) {
  .mobile-auth-landing {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #fff;
  }

  .mobile-auth-landing main {
    flex: 1 1 auto;
  }

  .mobile-auth-hero-card {
    background: #fff;
    border-radius: 18px;
    padding: 0.9rem 0.9rem 1.1rem;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.25);
  }

  .mobile-auth-login-box {
    background-color: rgba(0, 0, 0, 0);
    border-radius: 12px;
    padding: 1rem 1.1rem;
  }

  .mobile-auth-landing .landing-login-btn {
    border-radius: 999px;
    padding: 0.7rem 2.75rem;
    font-weight: 600;
    color: #212529;
    background-color: #dee2e6;
    border-color: var(--primary-color);
  }
}

.loader {
    position: fixed;
    left: 0px;
    top: 0px;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: rgba(255, 255, 255, 0.95);
  }

  .unload {
    position: fixed;
    left: 0px;
    top: 0px;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: none;
    background: rgba(255, 255, 255, 0.95);
  }

  .loader,
  .unload {
    transition: background 0.2s ease;
    backdrop-filter: blur(2px);
  }

  .loader.page-transition-active,
  .unload.page-transition-active {
    background:
      radial-gradient(circle at top, color-mix(in srgb, var(--primary-color, #8f469b) 12%, transparent), transparent 32%),
      rgba(255, 255, 255, 0.96);
  }

  .loader::before,
  .unload::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 3rem;
    height: 3rem;
    margin-top: -1.5rem;
    margin-left: -1.5rem;
    border: 0.35rem solid color-mix(in srgb, var(--primary-color, #8f469b) 18%, transparent);
    border-top-color: var(--primary-color, #8f469b);
    border-radius: 50%;
    box-shadow: 0 0 0 0.45rem color-mix(in srgb, var(--primary-color, #8f469b) 8%, transparent);
    animation: orcaa-loader-spin 0.8s linear infinite;
  }

  @keyframes orcaa-loader-spin {
    from {
      transform: rotate(0deg);
    }

    to {
      transform: rotate(360deg);
    }
  }

  .loader-text {
    font-size: 20px;
    font-weight: bold;
    color: var(--primary-color, #8f469b);
    margin-top: 40%;
    display: none;
    text-align: center;
  }

  /* Page-level opt-out: disable all global page loaders. */
  body.disable-page-loader #loader,
  body.disable-page-loader .loader,
  body.disable-page-loader .unload,
  body.disable-page-loader #submiting_loader,
  body.disable-page-loader .submiting_loader {
    display: none !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  /* Hide Vue templates until the app finishes mounting. */
  [v-cloak] {
    display: none !important;
  }
  
  /* Timeline */
  .timeline {
    border-left: 1px solid hsl(0, 0%, 90%);
    position: relative;
    list-style: none;
    left: 20px;
  }
  /* curently running  */
  .timeline .timeline-item {
    position: relative;
  }
  
  .timeline .timeline-item:after {
    position: absolute;
    display: block;
    top: 0;
  }
  
  .timeline .timeline-item:after {
    background-color: rgba(42,43,99,1);
    left: -38px;
    border-radius: 50%;
    height: 11px;
    width: 11px;
    content: "";
  }
  /* due timeline objectives */
  .timeline .due-timeline-item {
    position: relative;
    border: rgba(42,43,99,100%); 
  }
  
  .timeline .due-timeline-item::after {
    position: absolute;
    display: block;
    top: 0;
  }
  
  .timeline .due-timeline-item::after {
    background-color: color(168, 0, 0);
    left: -38px;
    border-radius: 50%;
  
    height: 11px;
    width: 11px;
    content: "";
  }
  /* archived objective  */
  .timeline .archived-timeline-item {
    position: relative;
    border: rgba(42,43,99,1); 
  }
  
  .timeline .archived-timeline-item:after {
    position: absolute;
    display: block;
    top: 0;
  }
  
  .timeline .archived-timeline-item:after {
    background-color: rgb(8 166 32);
    left: -38px;
    border-radius: 50%;
  
    height: 11px;
    width: 11px;
    content: "";
  }
  /* future objectives */
  .timeline .future-timeline-item {
    position: relative;
  }
  
  .timeline .future-timeline-item:after {
    position: absolute;
    display: block;
    top: 0;
  }
  
  .timeline .future-timeline-item:after {
    background-color: rgb(128, 127, 127);
    left: -38px;
    border-radius: 50%;
    height: 11px;
    width: 11px;
    content: "";
  }
  
/* Animation for the spinner */
  @keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
  }


 
    body {
        background-color: var(--bg-color);
        margin: 0;
    }

/* Attendance calendar styling */
.attendance-calendar-table {
  table-layout: fixed;
  width: 100%;
}

.attendance-calendar-table th,
.attendance-calendar-table td {
  border: none;
}

.attendance-calendar-table td {
  min-height: 80px;
  height: 80px;
  vertical-align: middle;
  padding: 2px;
}

.attendance-day-card {
  background-color: #f9fafb;
  border-radius: 0.5rem;
  border: 1px solid #e5e7eb;
  box-shadow: none;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #374151;
}

  .attendance-day-card-disabled {
  opacity: 0.55;
  cursor: default;
  background-color: #f3f4f6;
  color: #9ca3af;
}

.attendance-day-date {
  font-size: 13px;
}


.attendance-day-card-selected {
  border-color: transparent;
  box-shadow: 0 10px 30px rgba(88, 86, 214, 0.35);
  transform: translateY(-2px);
}

.attendance-summary-card {
  min-height: 104px;
  border-radius: 0.75rem;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
  padding: 1.25rem 1rem;
  color: #111827;
  background-color: #f9fafb;
}

/* Present/Late/Partial/Absent/Attendance Rate row only (the admin analytics
   variant below overrides min-height/padding on its own, more specific
   selector, so it's unaffected). Vertically center the single content row
   within the taller card without touching that other variant's layout. */
.attendance-summary-card:not(.attendance-admin-summary-grid .attendance-summary-card) {
  display: flex;
  align-items: center;
}

.attendance-summary-card:not(.attendance-admin-summary-grid .attendance-summary-card) > div {
  width: 100%;
}

.attendance-summary-card-present {
  background-color: rgba(34, 197, 94, 0.8);
}

.attendance-summary-card-late {
  background-color: rgba(234, 179, 8, 0.8);
}

.attendance-summary-card-partial {
  background-color: rgba(14, 165, 233, 0.8);
}

.attendance-summary-card-absent {
  background-color: rgba(239, 68, 68, 0.8);
}

.attendance-summary-card-rate {
  background-color: rgba(139, 92, 246, 0.8);
}

.attendance-admin-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(96px, 1fr));
  gap: 0.5rem;
  align-items: stretch;
  overflow-x: auto;
  padding-bottom: 0.125rem;
}

.attendance-admin-summary-item {
  min-width: 0;
}

.attendance-admin-summary-grid .attendance-summary-card {
  border-radius: 0.5rem;
  min-height: 4rem;
  height: 100%;
  padding: 0.55rem 0.65rem;
}

.attendance-admin-summary-content {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.3rem;
  min-height: 2.8rem;
}

.attendance-admin-summary-label {
  display: flex;
  align-items: center;
  color: #111827;
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.15;
}

.attendance-admin-summary-grid .summary-value {
  font-size: 0.95rem;
  line-height: 1;
}

@media (max-width: 575.98px) {
  .attendance-admin-summary-grid {
    grid-template-columns: repeat(5, minmax(86px, 1fr));
  }

  .attendance-admin-summary-grid .attendance-summary-card {
    padding: 0.5rem;
  }
}

.attendance-calendar-shell,
.attendance-day-detail-card {
  border-radius: 1rem;
  box-shadow: 0 16px 45px rgba(15, 23, 42, 0.06);
  background-color: #ffffff;
}

.attendance-calendar-shell .card-header {
  background-color: #ffffff !important;
  border-bottom: none;
  padding-top: 1.25rem;
  padding-bottom: 0.75rem;
}

.attendance-calendar-table thead tr th {
  background-color: var(--primary-color);
  color: #fff;
  font-weight: 500;
  border-bottom: none;
}

.summary-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.summary-dot-present {
  background-color: #22c55e;
}

.summary-dot-late {
  background-color: #eab308;
}

.summary-dot-partial {
  background-color: #0ea5e9;
}

.summary-dot-absent {
  background-color: #ef4444;
}

.summary-dot-rate {
  background-color: #8b5cf6;
}

/* Status-based backgrounds for calendar cards */
.attendance-day-card-status-present {
  background: #22c55e;
  color: #fff;
}

.attendance-day-card-status-late {
  background: #eab308;
  color: #111827;
}

.attendance-day-card-status-partial {
  background: #0ea5e9;
  color: #0f172a;
}

.attendance-day-card-status-absent {
  background: #ef4444;
  color: #ffffff;
}

.attendance-status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  margin-top: 4px;
}

.attendance-status-dot-present {
  background-color: #22c55e;
}

.attendance-status-dot-late {
  background-color: #eab308;
}

.attendance-status-dot-partial {
  background-color: #0ea5e9;
}

  .attendance-status-dot-absent {
    background-color: #ef4444;
  }

  /* Attendance header styling */
  .attendance-header-card {
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    background-image: linear-gradient(
      135deg,
      color-mix(in srgb, var(--primary-color) 84%, #ffffff 16%),
      color-mix(in srgb, var(--secondary-color, var(--primary-color)) 92%, #000000 8%)
    );
    color: #ffffff;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.16);
  }

  .attendance-header-title {
    font-size: 1.25rem;
    font-weight: 700;
  }

  .attendance-header-subtitle {
    font-size: 0.85rem;
    opacity: 0.9;
  }

  /* Programme attendance page typography overrides (non-embedded mode) */
  #program-attendance-page .attendance-header-title {
    font-size: 1rem;
  }

  #program-attendance-page .attendance-header-subtitle {
    font-size: 0.8rem;
  }

  .attendance-header-time {
    font-size: 1.35rem;
    font-weight: 700;
  }

  .attendance-header-date {
    font-size: 0.75rem;
    opacity: 0.9;
  }

  .attendance-view-toggle {
    border-radius: 999px;
    font-weight: 500;
  }

  .attendance-header-card .attendance-view-toggle.btn-primary,
  .attendance-header-card .attendance-view-toggle.btn-primary:disabled,
  .attendance-header-card .attendance-view-toggle.active,
  .attendance-header-card .attendance-view-toggle.active:disabled {
    background-image: linear-gradient(
      135deg,
      color-mix(in srgb, var(--primary-color) 78%, #ffffff 22%),
      color-mix(in srgb, var(--primary-color) 92%, #000000 8%)
    );
    border-color: transparent;
    color: #ffffff;
    opacity: 1;
  }

  .attendance-header-card .attendance-view-toggle.btn-light,
  .attendance-header-card .attendance-view-toggle.btn-light:disabled {
    background-color: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    opacity: 1;
  }

  .attendance-selected-date-banner {
    background-color: #eff6ff;
    border-radius: 0.75rem;
    padding: 0.75rem 1rem;
    color: #1d4ed8;
  }

  .attendance-clock-row-btn {
    border-radius: 0.5rem;
    padding-top: 0.65rem;
    padding-bottom: 0.65rem;
  }

  /* --------- Text Sizes and Custom Sizes--------- */
          .text-xs {
            font-size: 12px;
        }
        
        .text-xxs {
            font-size: 10px;
        }

        .text-sm {
            font-size: 14px;
        }
        
        .fs-6 {
            font-size: 1rem!important;
        } 
   
        .text-s {
            font-size: small;
        }

        .w-65 {
        width: 65%;
        }

        .ms-200 {
            margin-left: 200px;
          }
        
        .letter-spacing-1
        {
        letter-spacing: 0.4px;
        }
        
        .text-md
        {
        font-size: 13px!important;
        }
        
          .btn-sm {
          background: var(--primary-color);
          border-radius: 8px;
          border: transparent;
          }

.attendance-clock-btn {
  font-size: 0.95rem;
  padding: 0.5rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
}

        .rounded-icon
        {
            border-radius: 10px;
        }
      
        .mh-300{
            height:300px;
        }

        .w-40 {
            width: 40px !important;
        }
        .w-auto-max-content
        {
            width: max-content;
        }
        
        .roouded-8
        {
            border-radius: 8px;
        }

        .w-97
        {
          width: 97%;
        }
        
        .z-3
        {
          z-index: 3!important;
        }
        
        .h-24
        {
          height: 24px;
        }

        .h-90
        {
          height: 90%;
        }

        .top-58
        {
        top: 58px;
        }

        .top-34
        {
        top: 50px;
        }
        
        .top-10
        {
        top: -10px;
        }
        
        .z-99
        {
          z-index: 99;
        }

        .z-100
        {
          z-index: 100!important;
        }

/* --------- Sidebar ---------*/
        .sidebar.close .text-light{
            display: none;
        }
        
        .sidebar.close .logo-details{
        display: none;
        }
        
        .sidebar{
        position: fixed;
        top: 0;
        left: 0; 
        margin-left: 10px;
        margin-top: 27px;
        height: 100%;
        width: 20px;
        z-index: 90;
        transition: all 0.5s ease;
        }

        .sidebar.close{
        width: 70px;
        }
  
        .sidebar.close .logo-details{
        display: none;
        }

        .sidebar .logo-details{
        height: 60px;
        width: 100%;
        display: flex;
        align-items: center;
        }

        .sidebar .logo-details i{
        font-size: 30px;
        color: #fff;
        height: 50px;
        min-width: 78px;
        text-align: left;
        line-height: 50px;
        margin-left: 20px;
        }

        .sidebar .logo-details .logo-name{
        font-size: 10px;
        color: #fff;
        font-weight: 600;
        transition: 0.3s ease;
        transition-delay: 0.1s;
        text-align: left;
        }

        .sidebar.close .logo-details .logo-name{
        transition-delay: 0s;
        opacity: 0;
        pointer-events: none;
        }

        .sidebar .nav-links{
            height: 100%;
            padding: 10px 0 100px 0;
            overflow: auto;
        }
  
        .sidebar .nav-links::-webkit-scrollbar{
        width: 8px;
        }

        .sidebar .nav-links::-webkit-scrollbar-thumb {
            background: var(--scroller-color);
            border-radius: 4px;
        }

        .sidebar .nav-links::-webkit-scrollbar-thumb:hover {
            background: var(--scroller-color-hovered);
        }
  
        .sidebar .nav-links li{
        position: relative;
        list-style: none;
        transition: all 0.4s ease;
        }

        .sidebar .nav-links > li.active:before,
        .sidebar .nav-links > li:before{
        position:absolute;
        left:0;
        top:0;
        content:'';
        width:4px;
        height:100%;
        opacity: 0;
        transition: all 0.25s ease-in-out;
        border-top-right-radius:5px;
        border-top-right-radius:5px;
        }

        .sidebar .nav-links li.active:before,
        .sidebar .nav-links li:hover::before{
        opacity: 1;
        }

        .sidebar .nav-links li .iocn-link{
        display: flex;
        align-items: center;
        justify-content: space-between;
        }

        .sidebar.close .nav-links li .iocn-link{
        display: block
        }
        
        .sidebar .nav-links li.showMenu i.arrow{
        transform: rotate(-180deg);
        }

        .sidebar.close .nav-links i.arrow{
        display: none;
        }

        .sidebar .nav-links li a{
        display: flex;
        align-items: center;
        text-decoration: none;
        }
        
        .sidebar .nav-links li .sub-menu{
        padding: 6px 6px 14px 80px;
        margin-top: -10px; 
        color: #fff;
        display: none;
        }
  
  
  #main {
    transition: margin-left .5s;
    padding: 16px;
    margin-left: 225px;
  }
  
        .sidebar .nav-links li.showMenu .sub-menu{
        display: block;
        }

        .sidebar .nav-links li .sub-menu a{
        color: var(--sidebar-text-color);
        font-size: 10px;
        padding: 5px 0;
        white-space: nowrap;
        opacity: 0.6;
        transition: all 0.3s ease;
        }

        .sidebar .nav-links li .sub-menu a:hover{
        opacity: 1;
        }

        .sidebar.close .nav-links li .sub-menu{
        position: absolute;
        left: 100%;
        top: -10px;
        margin-top: 0;
        padding: 10px 20px;
        border-radius: 0 6px 6px 0;
        opacity: 0;
        display: block;
        pointer-events: none;
        transition: 0s;
        }

        .sidebar.close .nav-links li:hover .sub-menu{
        top: 0;
        opacity: 1;
        pointer-events: auto;
        transition: all 0.4s ease;
        }

        .sidebar .nav-links li .sub-menu .link-name{
        display: none;
        }

        .sidebar.close .nav-links li .sub-menu .link-name{
        font-size: 11px;
        opacity: 1;
        display: block;
        }

        .sidebar .nav-links li .sub-menu.blank{
        opacity: 1;
        pointer-events: auto;
        padding: 3px 20px 6px 16px;
        opacity: 0;
        pointer-events: none;
        }

        .sidebar .nav-links li:hover .sub-menu.blank{
        top: 50%;
        transform: translateY(-50%);
        }

        .sidebar .profile-details{
        position: fixed;
        bottom: 0;
        width: 260px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        background: #1d1b31;
        padding: 12px 0;
        transition: all 0.5s ease;
        }

        .sidebar.close .profile-details{
        background: none;
        }

        .sidebar.close .profile-details{
        width: 78px;
        }

        .sidebar .profile-details .profile-content{
        display: flex;
        align-items: center;
        }

        .sidebar .profile-details img{
        height: 52px;
        width: 52px;
        object-fit: cover;
        border-radius: 16px;
        margin: 0 14px 0 12px;
        background: #1d1b31;
        transition: all 0.5s ease;
        }

        .sidebar.close .profile-details img{
        padding: 10px;
        }

        .sidebar .profile-details .profile_name,
        .sidebar .profile-details .job{
        color: #000;
        font-size: 16px;
        font-weight: 400;
        white-space: nowrap;
        }

        .sidebar .profile-details .job{
        color: #000;
        font-size: 14px;
        font-weight: 300;
        opacity:.5;
        white-space: nowrap;
        }

        .sidebar .profile-details i.bx{  
            min-width: 50px;
        }
        
        .sidebar .profile-details i.fa{  
        min-width: 50px;
        }
        
        .sidebar.close .profile-details i,
        .sidebar.close .profile-details .profile_name,
        .sidebar.close .profile-details .job{
        display: none;
        }
        
        .sidebar .profile-details .job{
        font-size: 12px;
        }

        .sidebar.close ~ .navbar {
        left: 70px;
        width: calc(100% - 78px);
        }

        .sidebar .nav-links li a .link-name{
        font-size: 10px;
        font-weight: 400;
        color: var(--sidebar-text-color);
        transition: all 0.4s ease;
        }
        
        .sidebar .nav-links li i{
        height: 45px;
        min-width: 78px;
        text-align: center;
        line-height: 50px;
        color: var(--sidebar-text-color);
        font-weight: 500;
        font-size: 10px;
        cursor: pointer;
        transition: all 0.3s ease;
        }
          
        .sidebar .nav-links li.active a .link-name,
        .sidebar .nav-links li:hover a .link-name{  
        color: var(--scroller-color);
        }
          
        .sidebar .nav-links li.active i,
        .sidebar .nav-links li:hover i{
        color: var(--scroller-color);
        }

         /* -- Sidebar on Mobile*/
  
        @media (min-width: 768px) {
            
            .sidebar-icon-menu
            {
            display: none!important;
            }
            .img-navbar
            {
            display: none;
            }
        }
        
        
        @media screen and (min-width:768px) and (max-width:1166px)
        {
        .d-icon{
            display: none;
        }
        }
        .z-0
        {
            z-index: 0;
        }
        

        /* Role badge */
        .role_name_sm {
          display: inline-flex;
          align-items: center;
          padding: 2px 8px;
          border-radius: 999px;
          font-size: 0.7rem;
          font-weight: 500;
          background-color:#fff;
          color: #000;
        }

        @media (max-width: 767.98px) {
            .role_name_sm {
              display: none;
            }
        
            .role-icon-sm {
              display: none!important;
            }
        
            .img-navbar
            {
            display: flex;
            }
        
            .navbar
            {
            position: fixed; 
            top: 0px!important;
            border-radius: 0px;
            z-index: 100;
            }

            @media (max-width: 767.98px) {
            .navbar {
              min-height: 38px !important; /* or your preferred height */
              height: 38px !important;
              padding-top: 2px !important;
              padding-bottom: 2px !important;
            }
            }
        
            .sidebar
            {
            z-index: 106;
            top: -25px;
            left: -20px;
            border-radius: 0px;
            }
        
            .home-section
            {
            margin-top: -134px
        
            }
        
            .sidebar.close ~ .home-section {
            left: auto!important;
            width: initial!important;
            }
        
            .home-section ~ .sidebar.close
            {
            display: none;
            }
        
        
            .sidebar-icon-menu
            {
            display: initial;
            }
        
            .top-58{
            top: 0px!important;
            }
        
            .sidebar.close ~ .navbar {
            left: inherit!important; 
        }
        }
      
        .sidebar.close {
            width: 211px; 
        }
        
        .sidebar.close .text-light {
            display: flex;
        }
        
        .sidebar.close .nav-links { 
            overflow-y: scroll;
        }


/* --------- End Sidebar ---------*/



/* --------- Block Content --------- */

  
        .home-section{
        position: relative;
        left: 75px;
        width: calc(100% - 99px);
        transition: all 0.5s ease;
        top: 153px; 
        padding: 15px;
        box-sizing: border-box;

        }
    
        .home-section .home-content{
        height: 60px;
        display: flex;
        align-items: center;
        }

        .home-section .home-content .bx-menu,
        .home-section .home-content .text{
        color: #11101d;
        font-size: 35px;
        }

        .home-section .home-content .bx-menu{
        margin: 0 15px;
        cursor: pointer;
        }

        .home-section .home-content .text{
        font-size: 26px;
        font-weight: 600;
        }
  
  .navbar {
    background:var(--navbar-bg-color); 
  }

  .application_form{
    margin-top: 10px;
    margin-left: 10px;
    margin-right: 10px;
    margin-bottom: 10px;
    padding: 10px;
    background: #ebebec;
    border-radius: 3px;
  }
  
/* --------- Sidebar RESPONSIVENESS ---------*/
        @media (max-width: 767.98px) {
            .sidebar{
                width: 0;
            }
            .sidebar.active{
                width: 60px;
            }
            .home-section{
                width: 100%;
                left: 0;
                max-width: 100vw;
            }
            .sidebar.active ~ .home-section{
                left: 60px;
                width: calc(100% - 60px);
                max-width: calc(100vw - 60px);
            }
            .home-section nav{
                width: 100%;
                left: 0; 
                margin-top: 17px;
                background: #fff;
            }
            .sidebar.active ~ .home-section nav{
                left: 60px;
                width: calc(100% - 60px);
            }
            .logo-details{
                display: none !important;
            }
            
            .sidebar-md-close
                {
                display: none!important;
                }
        }
/* --------- End Sidebar RESPONSIVENESS ---------*/  

        #intern_alert{
            display: none;
        }
          
        .dot {
            height: 50px;
            width: 52px;
            background:black;
            border-radius: 50%;
            display: inline-block;
        }
        
        .form-select {
            font-size: 10px;
        }


/* --------- Table---------*/  
        .dataTables_length {
            font-size: 10px;
        }
        
        .dataTables_filter {
            font-size: 10px;
            margin-left: 260px;
        } 

        .data_tables_info {
            font-size: 10px;
        }
        
        .page-item.active .page-link {
            color: #fff;
            background-color: var(--primary-color);
            border-color: var(--primary-color);
        }
        
        .paginate_button {
            font-size: 10px;
        }
        
        table.dataTable.nowrap th, table.dataTable.nowrap td {
            white-space: nowrap;
        }

        .tbody, td, tfoot, th, thead, tr {
            border-color: inherit;
            border-style: none;
            border-width: 0;
          }

thead
{
background: var(--table-header-color)!important;
color: whitesmoke!important;
letter-spacing: 0.3px!important;
font-weight: 500!important;
}

#completed-programs-table thead.completed-programs-thead th {
  background: var(--table-header-color) !important;
  color: #fff !important;
  opacity: 1 !important;
}

/* Programme Management -> "Requested Access" tab
   (_programme_access_requests_templates.html). Bootstrap covers layout,
   spacing, buttons and the striped rows; these cover what it cannot. */

/* Brand-coloured header (no Bootstrap utility is bound to --primary-color). */
.programme-access-table thead th {
  background: var(--primary-color) !important;
  color: #fff !important;
  opacity: 1 !important;
  vertical-align: middle;
}

.programme-access-table thead th .programme-access-sort {
  color: inherit;
  text-decoration: none;
}

/* Search-or-programme dropdown: long programme lists scroll inside the menu.
   Bootstrap has overflow utilities but no max-height one. */
.programme-access-find-menu {
  max-height: 18rem;
  overflow-y: auto;
}

/* Request note preview: one line in the table, full text in the tooltip. */
.programme-access-note {
  display: inline-block;
  max-width: 14rem;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}
          
/* ---------End Table---------*/ 



        .breadcrumb-item{
            color: white !important;
        }


/* --------- Custom Colors & Buttons---------*/
        .bg-blue {
            background: linear-gradient(to right, #96d4f5, #92daf0) !important;
        }

        .bg-blue-light {
            background: #c1e5f8 !important;
        }

        .bg-secondary {
            background-color: var(--secondary-color) !important;
        }
        
        /* Brandâ€‘aware buttons (use theme primary/secondary colors) */
        .btn-outline-primary {
            background-color: var(--primary-color);
            color: #fff;
            border-color: var(--primary-color);
        }

        .btn-outline-primary:hover,
        .btn-outline-primary:focus {
            background-color: var(--secondary-color);
            color: #fff;
            border-color: var(--secondary-color);
        }
        
        /* Brandâ€‘aware buttons (use theme primary/secondary colors) */
        .btn-outline-primary {
            background-color: var(--btn-outline-primary-bg, var(--primary-color));
            color: var(--btn-outline-primary-text, #fff);
            border-color: var(--btn-outline-primary-border, var(--primary-color));
        }

        .btn-outline-primary:hover,
        .btn-outline-primary:focus {
            background-color: var(--btn-outline-primary-hover-bg, var(--secondary-color));
            color: var(--btn-outline-primary-hover-text, #fff);
            border-color: var(--btn-outline-primary-hover-border, var(--secondary-color));
        }

        /* Buttons placed on a colored header bar/card (e.g. .programme-table-header)
           inherit the same brand color as their background and become invisible.
           Force a neutral dark treatment there instead of the brand color, so the
           button stays visible regardless of what the tenant's primary color is. */
        .header-card .btn-outline-primary,
        .header-card-secondary .btn-outline-primary,
        .card-header.bg-outline-primary .btn-outline-primary,
        .programme-table-header .btn-outline-primary,
        .bg-blue-wave .btn-outline-primary {
            background-color: var(--btn-outline-primary-bg);
            background-image: none;
            border-color: transparent;
            color: #fff;
            box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
        }

        .header-card .btn-outline-primary:hover,
        .header-card .btn-outline-primary:focus-visible,
        .header-card-secondary .btn-outline-primary:hover,
        .header-card-secondary .btn-outline-primary:focus-visible,
        .card-header.bg-outline-primary .btn-outline-primary:hover,
        .card-header.bg-outline-primary .btn-outline-primary:focus-visible,
        .programme-table-header .btn-outline-primary:hover,
        .programme-table-header .btn-outline-primary:focus-visible,
        .bg-blue-wave .btn-outline-primary:hover,
        .bg-blue-wave .btn-outline-primary:focus-visible {
            background-color: #1d2124;
            background-image: none;
            border-color: transparent;
            color: #fff;
            box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
        }
        
        .btn-outline-secondary {
            background-color: var(--secondary-color);
            color: #fff;
            border-color: var(--secondary-color);
        }
        
        .btn-outline-success {
            background-color: #2fae4f;
            color: #fff;
            border-color: #2fae4f;
        }
        
        .btn-outline-success:hover {
            background-color: #2fae4f;
            color: #fff;
            border-color: #2fae4f;
        }
        
        .btn-outline-success:after {
            background-color: #2fae4f;
            color: #fff;
            border-color: #2fae4f;
        }
        
        .btn-outline-info {
            background-color: var(--btn-color) !important;
            color: #152329 !important;
            border-color: #c1e5f8 !important;
        }
        
        .btn-outline-info:hover {
            background-color: #c1e5f8 !important;
            color: #152329 !important;
            border-color: #c1e5f8 !important;
        }
        
        .btn-outline-info:after {
            background-color: #c1e5f8 !important;
            color: #152329 !important;
            border-color: #c1e5f8 !important;
        }

        .text-blue {
            color: #2f65ae;
        }
    
        .fw-bold {
            font-weight: 700!important;
        }
        
        .bg-Orcaa {
            background: linear-gradient(to right,var(--secondary-color));
        }

        .bg-Orcaa-footer  {
        background:#a830b3;
        }

        .btn-orcaa-save{
        background: #300067;
        }

        .bg-Orcaa-footerr{
        background: #300067;
        }
        
        .bg-tree{
        background:#5353b7;
        }
        
        .btn-Orcaa-cancel{
        background:#9530b3;
        }
 
        .text-light{
            font-size: 10px;
            color:  var(--primary-color) !important;
            margin: auto;
            font-weight: 600;
        }

        .sidebar-text-muted{
            font-size: 10px;
            color: var(--disabled-link-color) !important;
            margin: auto;
            margin-left: 20px;
            font-weight: 600;
        }

        .text-darkblue {
            color: #152329;
        }
        
        .text-blue {
            color: #2f65ae;
        }
     
        .btn-dark-blue
        {
            background: linear-gradient(0deg, rgba(73,76,158,0.677) 27%, rgba(119, 121, 197, 0.677) 100%);        
            border-radius: 10px;
            border: transparent;
        }

        .text-purple,
        .text-primary
        {
            color: var(--primary-color);
        }
        
        .bg-text-purple,
        .bg-primary
        {
            background-color: var(--primary-color);
        }
        
        .btn-purple-transparent
        {
            color: var(--primary-color);
        border: 1px solid var(--bg-primary-btn);
        background-color: transparent;
        border-radius: 10px;
        }

        .btn-purple-transparent:hover
        {
        color: var(--primary-color);
        border: 1px solid var(--bg-primary);
        background-color: transparent;
        border-radius: 10px;
        }
        
        .text-opacity
        {
            opacity: 0.8;
        }
        
        .bg-icon
        {
        background-color: var(--teriary-color);
        border-radius: 12px;
        font-size: 30px
        }

        .bg-icon-inner
        {
            background-color: var(--primary-light-primary);
            border-radius: 12px;
            font-size: 30px; 
        }
        
        .bg-purple
        {
        background-color: var(--primary-light-primary);        
        }

        .border-blue {
            border-color: #c1e5f8;
            border-width: 2px;
        }

        .btn-orca {
        padding: 0.25rem 1.5rem;
        font-size: .875rem;
        border-radius: 2.2rem;
        margin-left:-7px;
        background:#5353b7;
        }
        
        .btn-orca-subskill {
        padding: 0.25rem 1.5rem;
        font-size: .875rem;
        border-radius: 2.2rem;
        margin-left:1px;
        background:#5353b7;
        }
        
        .a {
            color:#000;
            text-decoration:none;
        }

        .btn-purple
        {
          background:  var(--btn-color);
        border-radius: 10px;
        border: transparent;
        }

        .bg-purple-wave
        {
            background:var(--dark-purple-2);
            border-radius:20px;
            background-repeat: no-repeat;
            background-size: cover;
        }
        
        .bg-blue-wave
        {
            background:var(--dark-purple-2);
            border-radius:11px;
            background-repeat: no-repeat;
            background-size: cover;
        }

        .text-dark-puple
        {
            color: var(--secondary-light-color);
        }
        
        .text-dark-blue
        {
            color: var(--teriary-light-color);
        }
        .bg-dark-blue
        {
            background-color:var(--teriary-light-color);
        }

        .btn-danger
        {
            background: linear-gradient(0deg, #dc3545 27%, #dc3545bf 100%)!important;
        }

        .btn-success{
            background: linear-gradient(0deg, #23c956cc 27%, #2bbf5a 100%)!important;
        }
        
        .bg-rating-1
        {
            background:linear-gradient(0deg, rgb(255 1 1) 0%, rgb(206 35 35 / 79%) 100%);
        }

        .bg-rating-2{
            background: linear-gradient(0deg, rgb(255 70 1) 0%, rgb(206 89 35 / 79%) 100%);
        }

        .bg-rating-3
        {
            background: linear-gradient(0deg, rgb(255 166 1) 0%, rgb(206 161 35 / 79%) 100%);
        }

        .bg-rating-4
        {
            background: linear-gradient(0deg, rgb(247, 255, 1) 0%, rgb(255, 167, 0) 100%);
        }

        .bg-rating-5
        {
            background: linear-gradient(0deg, rgb(1, 255, 53) 0%, rgba(40, 206, 35, 0.79) 100%)
        }

        .btn-gray
        {
            background: var(--bg-colour-grey);
            border-radius: 10px;
            border: transparent;
            pointer-events: none;
            cursor: not-allowed !important;
        }

        .btn-sequential-gray
        {
            background: var(--bg-sequential-colour-grey);
            border-radius: 10px;
            border: transparent;
            pointer-events: none;
            cursor: not-allowed !important;
        }
        
        
        .bg-icon-inner-gray
        {
            background: var(--bg-colour-grey) !important;
            border-radius: 12px;
            font-size: 30px;
            pointer-events: none;
        }

        .bg-navbar-content-md
        {
          /* Top navbar background driven by client theme */
          background: var(--navbar-bg-color, var(--primary-color));
        }

        .bg-light-purple {
          background-color: #8f469b!important;
        }

        .bg-purple-gradient
        {
          background-image: linear-gradient(to bottom, var(--homepage-card-color-1), var(--homepage-card-color-2));
        }
        
        .bg-blue-gradient
        {
          background-image:  linear-gradient(to top, var(--homepage-card-color-3), var(--homepage-card-color-2));
        }
        
        .bg-blue-1
        {
          background-color:var(--homepage-card-color-4);
        }
        
/* --------- End Custom Colors & Buttons ---------*/



/* ---------  Program-Management ---------*/ 
        .folder-structure {
            margin-left: 32px;
        }
        
        .folder-structure ul {
            margin:0px;
        }
        
        .folder-structure li {
            padding: var(--folder-structure-item-padding-top) 0rem 0rem 0rem;
            position: relative;
        }
        
        .folder-structure li::before {
            border-left: 2px solid var(--primary-color);
            content: '';
            /* Position */
            left: 0;
            position: absolute;
            top: 0;
            transform: translate(calc(-1 * var(--folder-structure-item-margin-left)), 0);
        
            /* Size */
            height: 100%;
        }
        
        .folder-structure li::after {
            border-bottom: 2px solid var(--primary-color);
            content: '';
            /* Position */
            left: 0;
            position: absolute;
            top: calc(var(--folder-structure-item-padding-top) + var(--folder-structure-item-height) / 2);
            transform: translate(-100%, 0);
        
            /* Size */
            width: var(--folder-structure-item-margin-left);
        }
    
        /* Remove the border from the last item */
        .folder-structure li:last-child::before {
            height: calc(var(--folder-structure-item-padding-top) + var(--folder-structure-item-height) / 2);
        }
        
        .ul-tree{
            list-style-type: none;
            margin: 0;
            padding: 0;
        }
        
        .caret {
            cursor: pointer;
            -webkit-user-select: none;
            -moz-user-select: none;
            -ms-user-select: none;
            user-select: none;
        }
        
        .caret::before {
            content: "\1F4C1";
            color: black;
            font-size: 24px;
        }
        
        .caret-down::before {
            -ms-transform: rotate(90deg);
            -webkit-transform: rotate(90deg);
            transform: rotate(90deg);
        }
        
        .nested {
            display: none;
            list-style-type: none;
        }
        
        .active {
            display: block;
        } 

        .select-box {
            position: relative;
        }
        
        .select-box select {
            width: 100%;
        }
        
        .over-select {
            position: absolute;
            left: 0;
            right: 0;
            top: 0;
            bottom: 0;
        }
    
        .select-options-container {
            display: none;
            border: 0.5px #7c7c7c solid;
            background-color: #ffffff5d;
            max-height: 150px;
            overflow-y: scroll;
        }
        
        .select-options-container label {
            display: block;
            font-weight: normal;
            display: block;
            white-space: nowrap;
            min-height: 1.2em;
            background-color: #ffffff00;
            padding: 0 2.25rem 0 0.75rem;
        }
        
        .select-options-container label:hover {
            background-color: #1e90ff;
        }

        .card-h {
            padding: 0.5rem 1rem;
            margin-bottom: 0;
            background-color: rgba(12,0,0,.03);
            border-bottom: 1px solid rgba(125, 64, 146, 0.831);
        }

        .card-header:first-child {
            border-radius: calc(0.25rem - 1px) calc(0.25rem - 1px) 0 0;
        }
/* ---------  End Program-Management ---------*/ 
 
  .circle {
    width: 50px;
    height: 50px; 
    background-color:#300067; 
    border-radius: 50%; 
    position: absolute;
    right: 0;
    left:365px;
    top: 50%;
    transform: translateY(-50%);
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  }

  .test{
    background-image: url('../images/geomatric5.png');
    background-repeat: no-repeat; 
    background-size:25%;
    background-position:620px 269px;
  }

  .disabled-link {
    color:var(--disabled-link-color) !important;
    pointer-events: none !important;
    text-decoration: none !important;
    cursor: not-allowed !important;
  } 

  .no-cursor {
    cursor: not-allowed;
  }
  
  .no-hover{
    pointer-events: none;
    opacity: 0.6;
    cursor: default;
  }

        .card-overview {
            position: relative;
            display: flex;
            flex-direction: column;
            min-width: 0;
            word-wrap: break-word;
            background-color:rgb(235, 235, 235);
            background-image: url('../images/geomatric5.png');
            background-repeat: no-repeat; 
            background-size:25%;
            background-position:610px 82px;
            background-clip: border-box;
            border: 1px solid rgba(0,0,0,.125);
            border-radius: 0.25rem;
        }


        .card-image {
            position: relative;
            display: flex;
            flex-direction: column;
            min-width: 0;
            word-wrap: break-word;
            background-color: rgb(74, 22, 104);
            background-position: 620px 269px;
            background-clip: border-box;
            border: 1px solid rgba(0,0,0,.125);
            border-radius: 1.25rem;
            margin-left:60px;
            margin-top:60px;
        }

        .card-body {
            flex: 1 1 auto;
            padding: 1rem 1rem; 
        }

        .card-header {  
          border-top-left-radius: 15px!important;
          border-top-right-radius: 15px!important;
        }

 
        .scrollable {
            height: 400px;
            overflow-y: scroll;
            background-color:#fff; 
            
        }

        .assessment-scrollable {
            height: 81vh;
            overflow-y: scroll;
            background-color:#fff; 
        }

        .manage_quiz_questions .scrollable {
            height: 550px;
            overflow-y: scroll;
            background-color:#fff; 
        }

        .alert-secondary {
            color: #41464b;
            background-color: #dce0e4;
            border-color: #d7dade;
        }

        .alert-purple
        {
            background: linear-gradient(0deg, rgba(165,161,182,1) 0%, rgba(165,161,182,0.7933637640449438) 100%);
        }

        .alert-danger
        {
            background: linear-gradient(0deg, #dc3545 27%, #dc3545bf 100%)!important;
            border-radius: 15px!important;
        }
  
        .frame_size iframe {
            border: 0;
            width: 500px;
        }
        
        .card_scrollable{
        height:5rem;
        width: 25rem;
        position: relative;
        }
        
        .choices__list--dropdown .choices__item--selectable {
            padding-right: 6px !important;
        }
        
        div.dataTables_wrapper div.dataTables_length select {
            width: 50px !important;
        }
        
        .card_question_paper {
            position: relative;
            display: flex;
            flex-direction: column;
            min-width: 0;
            word-wrap: break-word;
            background-color:rgba(235, 235, 235, 0.755);
        }
        
        ul.checkbox-list {
            list-style-type: none;
            padding: 0;
        }
        
        ul.checkbox-list li {
            display: flex;
            align-items: center;
            margin-bottom: 5px; /* Adjust as needed */
        }
        
        ul.checkbox-list input[type="checkbox"] {
            margin-right: 10px; /* Adjust as needed */
        }
        /* course content */
        .course-sidebar {
            height: 100%;
            overflow-y: auto; /* Add this */
            background: #f8f9fa;
        } 

        .list-item {
            cursor: pointer;
        }
 
        .view-img-size
        {
            max-width: 62%;
            height: 100px;
        }
        
        .dropdown-icon {
            display: inline-block;
            transition: transform 0.3s;
            transform: rotate(90deg);
        }
        
        .rotate-90 {
            transform: rotate(90deg);
        }
        
        .rotate-0 {
            transform: rotate(0deg);
        }
        
        li.active p.text-muted {
            color: white !important;
        }
        .course_detail_paragraph {
            max-width: 150px;
            overflow: hidden;
            text-overflow: ellipsis;
        }
  
        @media (max-width: 360px) 
        {
        
        .media_card{
        width:72% !important;
        }
        }
   
        .header-card {
            position: relative;
            display: flex;
            flex-direction: column;
            min-width: 0;
            /* Use theme-driven gradient so all clients get a branded header */
            background: var(
                --bg-card-purple,
                linear-gradient(var(--primary-color))
            );
            background-clip: border-box;
            border-radius:20px;
            background-repeat: no-repeat;
            background-size: cover;
        }

        /* The "<X> Management" section header (Programme Management, Recruitment
           Management, Select Your Programme) -- flat --primary-color instead of
           the --bg-card-purple multi-stop gradient. */
        .programme-management-embed-header-shell .header-card {
            background: var(--primary-color) !important;
            background-image: none !important;
        }

        .header-card-secondary {
            position: relative;
            display: flex;
            flex-direction: column;
            min-width: 0; 
            background-clip: border-box;
            border-radius:20px;
            /* Theme-driven secondary header gradient */
            background-image: var(
                --bg-card-secondary,
                linear-gradient(var(--primary-color))
            );
            padding: 15px;
        }
        
        
        .header-side-card {
            position: relative;
            display: flex;
            flex-direction: column;
            min-width: 0;
            background-color: #73859f21;
            border-radius:20px;
            background-repeat: no-repeat;
            background-size: cover;
        }

        .files-warehouse-panel .warehouse-header-bar,
        .success-stories-panel .success-story-header-bar {
            background: var(--primary-color) !important;
            color: #ffffff !important;
            border-bottom: 1px solid rgba(255, 255, 255, 0.18);
            border-radius: 18px 18px 0 0;
        }

        .files-warehouse-panel {
            width: 100%;
            max-width: 100%;
            margin-left: 0;
            margin-right: 0;
            --folder-structure-item-margin-left: 0.5rem;
            --folder-structure-item-height: 1.5rem;
        }

        .files-warehouse-panel .warehouse-header-bar i,
        .success-stories-panel .success-story-header-bar i {
            color: inherit !important;
        }

        .files-warehouse-panel .header-side-card,
        .files-warehouse-panel .card-body,
        .files-warehouse-panel .folder-structure {
            background-color: #ffffff !important;
        }

        .files-warehouse-panel .system-management-table-shell {
            overflow-x: auto !important;
            overflow-y: visible !important;
        }

        .files-warehouse-panel .card-body {
            width: 100%;
            max-width: 100%;
            padding: 1rem 0.5rem 1.25rem 0 !important;
            box-sizing: border-box;
        }

        .files-warehouse-panel .header-side-card {
            padding: 0 !important;
            width: 100%;
            max-width: 100%;
            margin-left: 0;
            margin-right: 0;
            box-sizing: border-box;
        }

        .files-warehouse-panel .folder-structure {
            width: 100%;
            margin-left: 0;
            padding-left: 0;
        }

        .files-warehouse-panel .folder-structure li {
            padding-top: var(--folder-structure-item-padding-top) !important;
        }

        .files-warehouse-panel .folder-structure li::before {
            top: var(--folder-structure-item-padding-top);
            height: calc(100% - var(--folder-structure-item-padding-top));
        }

        .files-warehouse-panel .folder-structure li:last-child::before {
            height: calc(var(--folder-structure-item-height) / 2);
        }

        .files-warehouse-panel .folder-structure .caret {
            display: inline-flex;
            align-items: center;
            flex-wrap: wrap;
            min-height: var(--folder-structure-item-height);
            line-height: 1.15;
            vertical-align: middle;
        }

        .files-warehouse-panel .caret::before {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 1.5rem;
            flex: 0 0 1.5rem;
            vertical-align: middle;
            line-height: 1;
            margin-right: 0.15rem;
        }

        .files-warehouse-panel .folder-name {
            margin-top: 0 !important;
        }

        .files-warehouse-panel .course-li .folder-name small {
            flex: 0 0 100%;
            box-sizing: border-box;
            margin-top: 0.15rem;
            padding-left: 1.65rem;
            line-height: 1.15;
        }

        .files-warehouse-panel .warehouse-header-bar {
            display: block;
            width: 100%;
            margin: 0 !important;
            box-sizing: border-box;
        }

        .files-warehouse-panel thead,
        .success-stories-panel thead,
        #task_management thead,
        #task_table_wrapper thead {
            background: var(--primary-color) !important;
            color: #ffffff !important;
        }

        .files-warehouse-panel thead th,
        .success-stories-panel thead th,
        #task_management thead th,
        #task_table_wrapper thead th {
            background: var(--primary-color) !important;
            color: #ffffff !important;
        }

        .success-stories-panel #success-story-add-post-btn {
            background: #000000 !important;
            border-color: #000000 !important;
            color: #ffffff !important;
        }

        .success-stories-panel #success-story-add-post-btn:hover,
        .success-stories-panel #success-story-add-post-btn:focus {
            background: #1f1f1f !important;
            border-color: #1f1f1f !important;
            color: #ffffff !important;
        }
  
/* ---------End Cards and header Cards---------*/

/* ---------Scroller---------*/
          .scroller
          {
            scroll-behavior: smooth;
              max-height: 400px;
              overflow-y: scroll;
              overflow-x: hidden;
              scrollbar-width: thin;
              scrollbar-color: rgba(0, 0, 0, 0.5) rgba(255, 255, 255, 0.5);
          }
          .side-card-height
          {
            height: 80hv;
          
          }
          
          @media (max-width: 1700px) {
            .bg-icon
            { 
            font-size: 20px!important;
            }

            .side-scroller
            {
                scroll-behavior: smooth;
                max-height: 620px;
                overflow-y: scroll;
                overflow-x: hidden;
                scrollbar-width: thin;
                scrollbar-color: rgba(0, 0, 0, 0.5) rgba(255, 255, 255, 0.5);
            }

            .side_card_h_md .side-scroller
            {
                scroll-behavior: smooth;
                max-height: 497px;
                overflow-y: scroll; 
            }
          }
      
          @media (min-width: 1700px) {
            
            .scroller
            { 
                max-height:fit-content; 
            } 
          
            .side-scroller
            {
            max-height:none; 
          }
          
          }

  /* ---------END Scroller---------*/

      @media (max-width: 1232px) {
        .header-img-1
        {
          display: none;
        }
        .header-img-2
        {
          display: none;
        }
        .content-card
        {
        width: auto!important;
        height: auto!important;
        }
      }
  
      @media  screen and (min-width:766px) and  (max-width:1472px)  {
      .side-icon
      {
        display: none;
      }
      }
      
      .content-card
      {
        min-width: 80px;
        height: 86px;
      }
  
  /* ---------ALERTS AND MODALS---------*/
      /* Keep every SweetAlert action consistent with the platform buttons. */
      .swal2-container button.swal2-styled.swal2-confirm,
      .swal2-container button.swal2-styled.swal2-cancel,
      .swal2-container button.swal2-styled.swal2-deny {
        border: 1px solid transparent !important;
        border-radius: 0.375rem !important;
        background: var(--btn-outline-primary-bg, var(--secondary-color, #0d6efd)) !important;
        color: var(--btn-outline-primary-text, #fff) !important;
        font-size: 0.85rem;
        font-weight: 600;
        line-height: 1.2;
        min-width: 6.5rem;
        min-height: 2rem;
        padding: 0.45rem 0.9rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-shadow: none !important;
      }

      .learner-assessment-swal .learner-assessment-swal__actions {
        display: flex;
        justify-content: center;
        gap: 0.75rem;
        margin-top: 1.25rem;
      }

      .learner-assessment-swal .learner-assessment-swal__confirm,
      .learner-assessment-swal .learner-assessment-swal__cancel {
        min-width: 5.5rem;
        min-height: 2rem;
        padding: 0.45rem 0.9rem;
        border-radius: 999px;
        font-size: 0.72rem;
        font-weight: 700;
        line-height: 1.2;
        white-space: nowrap;
      }

.learner-assessment-swal .learner-assessment-swal__confirm {
        border: 1px solid transparent;
        background: var(--primary-color);
        color: #fff;
      }

      .learner-assessment-swal .learner-assessment-swal__cancel {
        border: 1px solid transparent;
        background: #fff;
        color: #343a40;
      }

      .learner-assessment-swal .learner-assessment-swal__confirm:hover,
      .learner-assessment-swal .learner-assessment-swal__confirm:focus {
        filter: brightness(0.92);
        color: #fff;
      }

      .learner-assessment-swal .learner-assessment-swal__cancel:hover,
      .learner-assessment-swal .learner-assessment-swal__cancel:focus {
        background: #f1f3f5;
        color: #212529;
      }
      
      .modal-backdrop {
        z-index: 1050;
      }

      .modal {
        z-index: 1055;
      }

      .modal-content {
        border-radius: 10px!important;
      }
      .modal-header { 
        border-bottom: none;
        color: var(--modal-header-text)!important;
        padding: 10px!important;
        background: var(--primary-color);
        border-top-left-radius: 9px;
        border-top-right-radius: 9px;
        border: 0.1px solid #fff;
      }
  
      .modal-body label
      {
        color:var(--modal-label-color);
        margin-top: 3px;
        margin-bottom: 3px;
      }
   /* ---------ALERTS AND MODALS---------*/
  

   /* ---------NAV TABS---------*/
        .nav-tabs .nav-item.show .nav-link, .nav-tabs .nav-link.active {
          color: var(--modal-label-color);
          border-radius: 10px;
          background-color: var(--tab-color);
          color: whitesmoke; 
        }
        .nav-tabs .nav-link:hover { 
          border: 0px solid transparent;
        }
        
        .nav-tabs {
          border-bottom:transparent;
        }
        .nav-link { 
          color: #6c757d;
        }
        
        ul.nav-tabs { 
          background-color: transparent!important;
        }
  /* ---------END NAV TABS---------*/


  .highcharts-title
  {
    font-size: 12px!important;
    color: var(--sidebar-text-color)!important;d
    font-weight: bold!important;
    fill: var(--sidebar-text-color)!important;
  }
  
  .choices__list--multiple .choices__item {
    display: inline-block;
    vertical-align: middle;
    border-radius: 10px!important;
    padding: 4px 10px;
    font-size: 11px!important;
    font-weight: 100!important;
    margin-right: 3.75px;
    margin-bottom: 3.75px;
    background-color: var(--dark-blue-color, var(--primary-color))!important;
    border: 1px solid  var(--dark-blue-color, var(--primary-color))!important;
    color: #fff;
    word-break: break-all;
  }
 
  
  @media (max-width: 1232px) {
  .header-card-secondary .col-6,.header-card-secondary .col-9
  {
  width: 100%!important;
  }
  }
  
  
  
/*  --------- PAGE SCROLLER  ---------*/
  
        ::-webkit-scrollbar {
            width: 7px;
            height: 6px;
        }
        
        body::-webkit-scrollbar-track {
            background-color: var(--white);
        }
        
        body::-webkit-scrollbar-thumb {
            background-color: var(--scroller-color);
            border: 1px solid var(--white);
            border-radius: 10px;
        }
        
        .sidebar-text-color{
            color: var(--sidebar-text-color) !important;
        }
        
        .disabled-div{
            pointer-events: none;
            opacity: 0.7;
            cursor: default
        }
        
        .submit-button-font-size {
            font-size: 18px;
        }
        @media (max-width: 600px) {
            .video-container {
                max-width: 100%; 
            }
        } 
  
        .table-responsive-rubric table {
            border-collapse: collapse;
            width: 100%;
        }
        
        .table-responsive-rubric table tr,
        .table-responsive-rubric table th,
        .table-responsive-rubric table td {
            padding: 8px;
        }
        
        .table-responsive-rubric table th,
        .table-responsive-rubric table td {
            border: 1px solid #ddd;
        }
        
        .table-responsive-rubric {
            margin-bottom: 20px;
        }

        /* Rubric PDF viewer sizing for code challenge page */
        .rubric-pdf-viewer {
            width: 100%;
            min-height: 720px;
            height: 70vh;
            border-radius: 8px;
            overflow: hidden;
            background: #f8f9fa;
            border: 2px solid #e5e7eb;
        }

        .rubric-pdf-frame {
            width: 100%;
            height: 100%;
            min-height: 720px;
            border: none;
            border-radius: 8px;
        }

        @media (max-width <= 768px) {
            .rubric-pdf-viewer {
                min-height: 420px;
                height: 55vh;
            }

            .rubric-pdf-frame {
                height: 100%;
                min-height: 420px;
            }
        }

        
        .review_scroller{
            max-height:400px;
            overflow-y:auto;
            scrollbar-color:rgb(130, 122, 122) white !important;
        
        }
        
        .question_scroller{
            max-height:300px;
            overflow-y:auto;
            scrollbar-color:rgb(130, 122, 122) white !important;
        }
    
        .timeline {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }
        
        .tl-item {
            display: flex;
            align-items: center;
        }
        
        .tl-dot {  
            width: 25px;
            height: 25px;
            border-radius: 50%;
            margin-right: 13px;
            margin-left: -13px;
            display: flex;
            justify-content: center;
            color: white;
        }
        
        .tl-content {
            font-family: Arial, sans-serif;
        }
        
        .tl-content b {
            font-weight: bold;
            color: black;
        }
        
        .swal2-container button.swal2-styled.swal2-confirm,
        .swal2-container button.swal2-styled.swal2-cancel,
        .swal2-container button.swal2-styled.swal2-deny {
            border: 1px solid transparent !important;
            border-radius: 0.375rem !important;
            background: var(--btn-outline-primary-bg, var(--secondary-color, #0d6efd)) !important;
            color: var(--btn-outline-primary-text, #fff) !important;
            font-size: 0.85rem;
            font-weight: 600;
            line-height: 1.2;
            min-width: 6.5rem;
            min-height: 2rem;
            padding: 0.45rem 0.9rem;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            box-shadow: none !important;
        }
        .progress
        {
            height: 3px;
        }
        .progress-bar
        {
            background-color: var(--bg-progress-bar);
            width: 25%;
        }
        
        .scrolling-container {
            overflow-x: auto;
            white-space: nowrap;
            padding: inherit;
        }  
        .scrolling-container::-webkit-scrollbar {
            width: 6px; 
        }
        
        
        .scrolling-container::-webkit-scrollbar-thumb {
            background-color: var(--bg-progress-bar);
            border-radius: 6px;
        }
  
  
        .scrolling-container::-webkit-scrollbar-thumb:hover {
            background-color: var(--bg-progress-bar);
        }
        
        @media (min-width: 100px) {
            .modal-100
            {
            width: 100% !important;
            max-width: 100% !important;
            }
        }
        
        table.dataframe thead th {
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis; /* Add ellipsis for overflow */
        }
        
        .form-scroller {
        height:80vh;
        overflow-y:scroll;
        overflow-x: hidden;
        
        }
        
        .form-scroller::-webkit-scrollbar {
            width: 7px;
            height: 6px;
        }

        .form-scroller::-webkit-scrollbar-track {
            background-color: var(--white);
        }

        .form-scroller::-webkit-scrollbar-thumb {
            background-color: var(--scroller-color);
            border: 1px solid var(--white);
            border-radius: 10px;
        }

/*  ---------End PAGE SCROLLER  ---------*/

 
  .nowrap-button {
    white-space: nowrap; /* Prevent text wrapping */
    overflow: hidden; /* Optional: Hide overflow text */
    text-overflow: ellipsis; /* Optional: Add ellipsis for overflow text */
  }
  
  .no-events {
    pointer-events: none;
  }
  
  .header-gray-card {
    pointer-events: none;
    cursor: not-allowed !important;
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    background: var(--bg-colour-grey);
    background-clip: border-box;
    border-radius:20px;
    background-repeat: no-repeat;
    background-size: cover;
  }

  /* Shared platform popup redesign */
  .assessment-guided-success-popup,
  .platform-guided-popup-shell {
    border: 1px solid rgba(232, 227, 242, 0.96);
    border-radius: 14px;
    box-shadow: 0 28px 72px rgba(45, 27, 86, 0.26);
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
    overflow: hidden;
    padding: 0 !important;
  }

  .assessment-guided-success-popup .swal2-title,
  .platform-guided-popup-shell .swal2-title,
  .assessment-guided-success-popup .swal2-icon,
  .platform-guided-popup-shell .swal2-icon {
    display: none !important;
  }

  .assessment-guided-success-popup .swal2-html-container,
  .platform-guided-popup-shell .swal2-html-container {
    margin: 0 !important;
    padding: 0.55rem 0.6rem 0.45rem !important;
    text-align: left;
  }

  .assessment-guided-success-popup .swal2-footer,
  .platform-guided-popup-shell .swal2-footer {
    align-items: center;
    border-top: 1px solid var(--line, #e8e3f2);
    display: flex;
    gap: 0.35rem;
    justify-content: flex-end;
    margin: 0 !important;
    padding: 0.5rem 0.6rem 0.55rem !important;
  }

  .platform-guided-popup {
    color: var(--ink, #1f1730);
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
  }

  .platform-guided-popup__header {
    align-items: flex-start;
    display: flex;
    gap: 0.5rem;
  }

  .platform-guided-popup__header-copy {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    min-width: 0;
  }

  .platform-guided-popup__badge {
    align-items: center;
    background: #edf8f1;
    border: 1px solid rgba(174, 224, 191, 0.8);
    border-radius: 50%;
    color: var(--success, #3fb27f);
    display: flex;
    flex: 0 0 auto;
    height: 2.1rem;
    justify-content: center;
    width: 2.1rem;
  }

  .platform-guided-popup__badge-icon {
    display: inline-flex;
    height: 0.95rem;
    width: 0.95rem;
  }

  .platform-guided-popup__badge-icon svg {
    height: 100%;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.6;
    width: 100%;
  }

  .platform-guided-popup__title {
    color: var(--ink, #1f1730);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
  }

  .platform-guided-popup__message {
    color: var(--ink-soft, #645d78);
    font-size: 0.74rem;
    line-height: 1.45;
    margin: 0;
  }

  .platform-guided-popup__steps {
    background: #faf8fd;
    border: 1px solid rgba(227, 218, 241, 0.98);
    border-radius: 14px;
    padding: 0.5rem 0.6rem 0.55rem;
  }

  .platform-guided-popup__steps-label {
    color: var(--purple-700, #4b2e83);
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    margin: 0 0 0.45rem;
    text-transform: uppercase;
  }

  .platform-guided-popup__steps-list {
    color: #4f4860;
    font-size: 0.74rem;
    line-height: 1.45;
    margin: 0;
    padding-left: 1.15rem;
  }

  .platform-guided-popup__steps-item {
    font-size: 0.74rem;
    margin-bottom: 0.18rem;
  }

  .platform-guided-popup__checkbox {
    align-items: center;
    color: #4f4860;
    display: flex;
    gap: 0.35rem;
    font-size: 0.78rem;
    line-height: 1.4;
    margin-top: 0.05rem;
  }

  .platform-guided-popup__checkbox input {
    accent-color: var(--purple-500, #6d3fb0);
    cursor: pointer;
    height: 14px;
    width: 14px;
  }

  .platform-guided-popup__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-end;
    width: 100%;
  }

  .platform-guided-popup__action-btn {
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    min-width: 4.8rem;
    padding: 0.3rem 0.6rem;
    transition: background-color 0.12s ease, filter 0.12s ease, transform 0.05s ease;
  }

  .platform-guided-popup__action-btn.btn-outline-primary {
    border-width: 1px;
  }

  .platform-guided-popup__action-btn:active {
    transform: scale(0.985);
  }

  .platform-guided-popup__action-btn--secondary {
    background: #f4eefc;
    color: var(--purple-700, #4b2e83);
  }

  .platform-guided-popup__action-btn--secondary:hover,
  .platform-guided-popup__action-btn--secondary:focus-visible {
    background: #e9e0f7;
    color: var(--purple-700, #4b2e83);
  }

  .platform-guided-popup__action-btn--primary {
    background: var(--purple-500, #6d3fb0);
    color: #ffffff;
  }

  .platform-guided-popup__action-btn--primary:hover,
  .platform-guided-popup__action-btn--primary:focus-visible {
    background: var(--purple-700, #4b2e83);
    color: #ffffff;
  }

  @media (max-width: 575.98px) {
    .assessment-guided-success-popup .swal2-html-container,
    .platform-guided-popup-shell .swal2-html-container {
      padding: 0.45rem 0.5rem 0.4rem !important;
    }

    .assessment-guided-success-popup .swal2-footer,
    .platform-guided-popup-shell .swal2-footer {
      padding: 0.45rem 0.5rem 0.5rem !important;
    }

    .platform-guided-popup__header {
      gap: 0.4rem;
    }

    .platform-guided-popup__badge {
      height: 1.9rem;
      width: 1.9rem;
    }

    .platform-guided-popup__title {
      font-size: 0.95rem;
    }

    .platform-guided-popup__action-btn {
      min-width: 4.3rem;
      padding: 0.28rem 0.55rem;
    }
  }

  /* Shared platform danger popup redesign */
  .platform-danger-popup-shell {
    border: 1px solid rgba(241, 209, 209, 0.96);
    border-radius: 18px;
    box-shadow: 0 28px 72px rgba(86, 27, 27, 0.22);
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, sans-serif;
    overflow: hidden;
    padding: 0 !important;
  }

  .platform-danger-popup-shell .swal2-title,
  .platform-danger-popup-shell .swal2-icon {
    display: none !important;
  }

  .platform-danger-popup-shell .swal2-html-container {
    margin: 0 !important;
    padding: 0.8rem 0.8rem 0.65rem !important;
    text-align: left;
  }

  .platform-danger-popup-shell .swal2-footer {
    align-items: center;
    border-top: 1px solid rgba(241, 209, 209, 0.9);
    display: flex;
    gap: 0.45rem;
    justify-content: flex-end;
    margin: 0 !important;
    padding: 0.6rem 0.8rem 0.75rem !important;
  }

  .platform-danger-popup {
    color: var(--ink, #1f1730);
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
  }

  .platform-danger-popup__header {
    align-items: flex-start;
    display: flex;
    gap: 0.65rem;
  }

  .platform-danger-popup__header-copy {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
  }

  .platform-danger-popup__badge {
    align-items: center;
    background: #fff1f1;
    border: 1px solid rgba(243, 198, 198, 0.96);
    border-radius: 50%;
    color: #e04d4d;
    display: flex;
    flex: 0 0 auto;
    height: 2.7rem;
    justify-content: center;
    width: 2.7rem;
  }

  .platform-danger-popup__badge-icon {
    display: inline-flex;
    height: 1.2rem;
    width: 1.2rem;
  }

  .platform-danger-popup__badge-icon svg {
    height: 100%;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.2;
    width: 100%;
  }

  .platform-danger-popup__title {
    color: var(--ink, #1f1730);
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
  }

  .platform-danger-popup__message {
    color: var(--ink-soft, #645d78);
    font-size: 0.82rem;
    line-height: 1.45;
    margin: 0;
  }

  .platform-danger-popup__message--secondary {
    margin-top: -0.05rem;
  }

  .platform-danger-popup__warning {
    align-items: flex-start;
    background: #fff4f4;
    border: 1px solid rgba(240, 196, 196, 0.95);
    border-radius: 14px;
    display: flex;
    gap: 0.55rem;
    padding: 0.6rem 0.7rem;
  }

  .platform-danger-popup__warning-icon {
    align-items: center;
    background: #fff;
    border: 1px solid rgba(240, 196, 196, 0.95);
    border-radius: 50%;
    color: #e04d4d;
    display: inline-flex;
    flex: 0 0 auto;
    height: 1.35rem;
    justify-content: center;
    margin-top: 0.05rem;
    width: 1.35rem;
  }

  .platform-danger-popup__warning-icon svg {
    height: 0.95rem;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.2;
    width: 0.95rem;
  }

  .platform-danger-popup__warning-text {
    color: #d14e4e;
    font-size: 0.8rem;
    line-height: 1.45;
    margin: 0;
  }

  .platform-danger-popup__footer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    justify-content: flex-end;
    width: 100%;
  }

  .platform-danger-popup__action-btn {
    border-radius: 10px;
    font-size: 0.84rem;
    font-weight: 700;
    min-width: 5.6rem;
    padding: 0.38rem 0.72rem;
    transition: background-color 0.12s ease, filter 0.12s ease, transform 0.05s ease;
  }

  .platform-danger-popup__action-btn:active {
    transform: scale(0.985);
  }

  .platform-danger-popup__action-btn--cancel {
    background: #f4eefc;
    color: var(--purple-700, #4b2e83);
  }

  .platform-danger-popup__action-btn--cancel:hover,
  .platform-danger-popup__action-btn--cancel:focus-visible {
    background: #e9e0f7;
    color: var(--purple-700, #4b2e83);
  }

  .platform-danger-popup__action-btn--danger {
    background: #dc4a4a;
    color: #ffffff;
  }

  .platform-danger-popup__action-btn--danger:hover,
  .platform-danger-popup__action-btn--danger:focus-visible {
    background: #c84040;
    color: #ffffff;
  }

  @media (max-width: 575.98px) {
    .platform-danger-popup-shell .swal2-html-container {
      padding: 0.75rem 0.75rem 0.6rem !important;
    }

    .platform-danger-popup-shell .swal2-footer {
      padding: 0.55rem 0.75rem 0.65rem !important;
    }

    .platform-danger-popup__badge {
      height: 2.45rem;
      width: 2.45rem;
    }

    .platform-danger-popup__title {
      font-size: 1.1rem;
    }

    .platform-danger-popup__action-btn {
      min-width: 5rem;
      padding: 0.34rem 0.65rem;
    }
  }



/* --------- Calender ---------*/
        .fc {
            background-color: var(--calendar-bg-color) !important;
            border-radius: 8px !important;
            font-size: 0.25rem !important;
            padding: 0 0.10rem 0.10rem 0.10rem !important;
        }
        
        .fc .fc-toolbar.fc-header-toolbar {
            font-size: 2.50em !important;
            padding: 0.50em !important;
            margin-bottom: 0 !important;
        }
        
        .fc .fc-toolbar-title {
            color:var(--calendar-title-color);
            font-size: 2.25em !important;
            margin: 0 !important;
            text-align: center !important;
            width: 100% !important;
        }
        
        .fc .fc-button-primary {
            background-color:var(--calendar-buttons-color) !important;
            border: 1px solid var(--calendar-buttons-border-color) !important;
            font-size: 1em;
        }
        
        .fc-scrollgrid-sync-inner,
        .fc-scrollgrid,
        .fc-scroller-harness {
            border-radius: 8px !important;
            background-color: transparent !important;
        }
        
        .fc .fc-scrollgrid-section > td {
            border-bottom-left-radius: 8px !important;
            border-bottom-right-radius: 8px !important;
        }
        
        .fc-col-header-cell-cushion {
            font-size: 2.25em !important;
            text-align: center !important;
            color: var(--calendar-header-days-color) !important;
            background-color: transparent !important;
            padding: 0.3em !important;
            border: bottom !important;
            text-decoration: none !important;
        }
        
        .fc-daygrid-day-number {
            color: var(--calendar-dates-color);
            text-align: center !important;
            font-size: 1.5em !important;
            display: flex !important;
            justify-content: center !important;
            align-items: center !important;
            margin-top: 5px !important;
            margin-right: 5px !important;
            position: relative !important;
            z-index: 4 !important;
            text-decoration: none !important;
            border-radius: 360px !important;
            width: 20px !important;
            height: 20px !important;
        }
        
        .fc .fc-daygrid-day.fc-day-today {
            background-color: transparent !important;
        }
        
        .fc-daygrid-day.fc-day-today .fc-daygrid-day-number {
            color: var(--calendar-current-date-color) !important;
            background-color: var(--calendar-current-date-background-color) !important;
            border: 1px solid var(--calendar-dates-circle-color) !important;
        }
        
        .fc .fc-scrollgrid-section-sticky > * {
            background: none !important;
            position: sticky !important;
            z-index: 3 !important;
        }
        
        .fc .fc-daygrid-day {
            border: 1px solid var(--calendar-grid-color) !important;
            text-align: center !important;
            font-size: 1.5em !important;
        }
        
        .fc-event-title {
            display: none;
        }
        
        .fc-event-time {
            display: none;
        }
        
        .fc-button {
            font-size: 0.8em !important;
            padding: 0.3em 0.5em !important;
            border-radius: 4px !important;
        }
        
        .fc-view {
            max-width: 100% !important;
            margin: 0 auto !important;
        }
        
        .fc-col-header-cell {
            background-color: transparent !important;
            border: none !important;
            text-align: center !important;
            padding: 0.3em !important;
        }
        
        .fc-col-header,
        .fc-scrollgrid-section > th {
            background-color: transparent !important;
            border-top-right-radius: 8px !important;
        }
        
        .fc thead {
            background: none !important;
            color: whitesmoke !important;
            letter-spacing: 0.3px !important;
            font-weight: 500 !important;
            border: 1px solid var(--calendar-header-border-color);
        }
        
        .subskill-padding-left {
            padding-left: 14rem;
        }
        .mainskill-padding-left {
            padding-left: 12rem;
        }
        
        .calendar-tab-content .fc-daygrid-day-number {
            color: var(--calendar-dates-color);
            text-align: center !important;
            font-size: 3.5em !important;
            display: flex !important;
            justify-content: center !important;
            align-items: center !important;
            margin-top: 5px !important;
            margin-right: 5px !important;
            position: relative !important;
            z-index: 4 !important;
            text-decoration: none !important;
            border-radius: 360px !important;
            width: 20px !important;
            height: 20px !important;
        }
        .calendar-tab-content .fc .fc-daygrid-day-number {
            padding: 20px;
            position: relative;
            z-index: 4;
        }
        .calendar-tab-content .fc-event-title {
            padding-top: 4px;
            font-size: 11px;
        }
        .calendar-tab-content .fc .fc-toolbar.fc-header-toolbar {
            font-size: 3.5em !important;
            padding: 0.50em !important;
            margin-bottom: 0 !important;
        }
        
        .calendar-tab-content .fc-col-header-cell {
            background-color: transparent !important;
            border: none !important;
            text-align: center !important;
            padding: 0.3em !important;
            font-size:8px;
        }
        /* Flashing effect */
        .flashing-event {
            animation: flash 1s infinite;
        }
        
        @keyframes flash {
            0%, 100% {
                background-color: red; /* or any other color you want */
            }
            50% {
                background-color: white; /* alternate color */
            }
        }
        
        .legend-color {
            display: inline-block;
            width: 12px;
            height: 12px;
            margin-right: 8px;
        }
        .blue-event { background-color: #0077B6; }
        .green-event { background-color: #29BF12; }
        .red-event { background-color: #C00021; }
        .yellow-event { background-color: #FFD100; }
        .legend-list {
            list-style-type: none;
            padding: 0;
            margin: 0;
            display: flex;
            flex-wrap: wrap; /* This will allow items to wrap to the next line if needed */
        }
        
        .legend-list li {
            display: flex;
            align-items: center;
            margin-right: 20px; /* Spacing between legend items */
        }
        #calendar-legend {
            display: flex;
            justify-content: center;
            margin-bottom: 20px;
        }
        
        #calendar-legend .legend-list {
            display: flex;
            gap: 20px;
            list-style-type: none;
            padding: 0;
            margin: 0;
        }
        
        #calendar-legend .legend-list li {
            cursor: pointer;
        }
        
        #calendar-legend .legend-color {
            display: inline-block;
            width: 12px;
            height: 12px;
            margin-right: 8px;
            vertical-align: middle;
        }
        
        #calendar-legend .disabled {
            opacity: 0.5;
        }

/* --------- End Calender ---------*/



  .view-event-assessment {
    content: 'View';
  }
  
  .hidden-btn {
    display: none;
  }


/* --------- Card Scrollers ---------*/

        /* Ensure that the card containers have the same height and align properly */
        .card .chart-height-card {
            height: 100%;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
        }
        
        .card .chart-height-card-body {
            flex-grow: 1;
        } 

        [role="list"] {
          display: none;
        }
       
        .card .chart-height-card-content {
            flex-grow: 1;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
            position: relative;
            overflow: hidden;
        }
        
        .card .chart-height-card-container {
            width: 100%;
            height: 300px; /* Adjust the height as needed */  
        }
        
        /* Adjust the padding of columns */
        .card .chart-height-padding .col-sm-3,
        .card .chart-height-padding .col-sm-6 {
            padding: 10px;
        }
        
        .scrollable-similarity-chart-card {
            max-height: 700px;
            overflow-y: auto;
            overflow-x: hidden; /* Hide horizontal scrollbar if not needed */
            height: auto; /* Allow height to adjust based on content */
        }
        
        .highcharts-similarity-figure {
            margin: 0; /* Remove default figure margins if necessary */
        }
        
        .similarity-heatmap-chart-container {
            width: 100%;
            max-height: 400px; /* Set maximum height */
            height: auto; /* Adjust height automatically if smaller */
            min-height: 200px; /* Optional: Set a minimum height if needed */
        }
        
        select.qrcode:invalid {
            color: white;
        }
        
        .option-qrcode {
            color: black;
        }
        
        select:not(:invalid) {
            color: black;
        }
        .no-answer-line {
            border-top: 2px solid red;
            margin-top: 10px;
        }
        
        /* Ensure the scrollbar is always visible */
        .program-filter-scrollbar {
            overflow-y: scroll; /* Force scrollbar to always show */
        }
        
        /* WebKit browsers */
        .program-filter-scrollbar::-webkit-scrollbar {
            width: 6px; /* Adjust the width of the scrollbar */
        }
        
        .program-filter-scrollbar::-webkit-scrollbar-thumb {
            background-color: #888; /* Color of the scrollbar thumb */
            border-radius: 8px; /* Rounded scrollbar thumb */
        }
        
        .program-filter-scrollbar::-webkit-scrollbar-track {
            background-color: #f1f1f1; /* Background of the scrollbar track */
        }
         
        /* Firefox */
        .program-filter-scrollbar {
            scrollbar-width: auto; /* Ensures the scrollbar is always visible */
            scrollbar-color: #888 #f1f1f1; /* Custom color for thumb and track */
        }
        
        /* p in email_body_container */
        .email_body_container p {
            margin: 0;
        }
  
        /* NEW DASHBOARD CARDS */
        .dashboard-card { 
            padding: 20px;
            box-shadow: 0 2px 4px rgba(0,0,0,0.05); 
        }
  
        .metric-value {
            font-size: 22px;
            font-weight: bold;
            color: #fff;
        }
        
        .metric-label {
            color: #fff;
            font-size: 11px;
        }
        
        .trend-up {
            color: #fff;
            font-size: 12px;
        }
        
        .trend-icon {
            font-size: 18px;
        }
        
        .gender-stat {
            display: flex;
            align-items: center;
            gap: 10px;
            margin: 10px 0;
        }
        
        .person-icon {
            font-size: 24px;
        }
        
        .info-icon {
            background: var(--primary-light-primary);
            color: var(--primary-color);
            width: 32px;
            height: 32px;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 8px;
        }
  
.view-applicant-profile-page .applicant-program-content {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.view-applicant-profile-page .applicant-program-card {
    width: 100%;
    margin-bottom: 0.25rem;
    padding: 0.85rem 0.9rem 0.95rem;
    border-radius: 20px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(251, 251, 253, 0.98) 100%);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.view-applicant-profile-page .applicant-program-card + .applicant-program-card {
    margin-top: 1rem !important;
}

.view-applicant-profile-page .applicant-program-header-row {
    margin-bottom: 0.15rem;
}

        .view-applicant-profile-page .scroll-container {
            display: flex;
            overflow-x: auto;
            overflow-y: hidden;
            gap: 14px;
            align-items: stretch;
            width: 100%;
            padding: 0.35rem 0.1rem 0.85rem;
            scroll-snap-type: x proximity;
            scrollbar-width: thin;
            scrollbar-color: rgba(47, 0, 96, 0.4) rgba(236, 236, 252, 0.85);
        }

        .view-applicant-profile-page .scroll-item {
            flex: 0 0 clamp(13.3rem, 16vw, 14.7rem);
            max-width: 14.7rem;
            min-height: 10.3rem;
            align-self: stretch;
            scroll-snap-align: start;
            display: flex;
            flex-direction: column;
            justify-content: flex-start;
            align-items: flex-start;
            border-radius: 16px;
            border: 1px solid rgba(47, 0, 96, 0.15);
            padding: 0.57rem 0.63rem 0.63rem;
            background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(244, 245, 254, 0.96));
            box-shadow: 0 12px 24px rgba(15, 23, 42, 0.08);
            transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease, background-color 0.24s ease;
            position: relative;
        }

        .view-applicant-profile-page .scroll-item.current {
            transform: translateY(-4px);
            border-color: rgba(56, 189, 248, 0.55);
            box-shadow: 0 18px 28px rgba(37, 99, 235, 0.18);
        }

        .view-applicant-profile-page .scroll-item:hover {
            transform: translateY(-3px);
            box-shadow: 0 16px 28px rgba(15, 23, 42, 0.12);
        }

        .view-applicant-profile-page .applicant-step-card--completed {
            border-color: rgba(34, 197, 94, 0.45);
            background: linear-gradient(145deg, rgba(34, 197, 94, 0.11), rgba(220, 252, 231, 0.48));
        }

        .view-applicant-profile-page .applicant-step-card--in-progress {
            border-color: rgba(59, 130, 246, 0.45);
            background: linear-gradient(145deg, rgba(59, 130, 246, 0.12), rgba(239, 246, 255, 0.92));
        }

        .view-applicant-profile-page .applicant-step-card--not-started {
            border-color: rgba(194, 204, 218, 0.92);
            background: linear-gradient(180deg, rgba(240, 243, 246, 0.99) 0%, rgba(225, 231, 238, 0.98) 100%);
            box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
        }

        .view-applicant-profile-page .applicant-step-card--warning {
            border-color: rgba(245, 158, 11, 0.45);
            background: linear-gradient(145deg, rgba(245, 158, 11, 0.12), rgba(255, 251, 235, 0.92));
        }

        .view-applicant-profile-page .applicant-step-card--failed {
            border-color: rgba(239, 68, 68, 0.45);
            background: linear-gradient(145deg, rgba(239, 68, 68, 0.12), rgba(254, 242, 242, 0.94));
        }

        .view-applicant-profile-page .applicant-step-card-header {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
            justify-content: flex-start;
            gap: 0.16rem;
            width: 100%;
            margin-bottom: 0.23rem;
        }

        .view-applicant-profile-page .applicant-step-status-row {
            display: flex;
            align-items: center;
            justify-content: flex-start;
            flex: 0 0 auto;
            min-width: 0;
            margin-bottom: 0;
            width: 100%;
            align-self: flex-start;
        }

        .view-applicant-profile-page .applicant-step-status-row--timeline {
            justify-content: center;
            align-items: center;
        }

        .view-applicant-profile-page .applicant-step-status-chip {
            display: inline-flex;
            align-items: center;
            justify-content: flex-start;
            gap: 0.24rem;
            border-radius: 999px;
            padding: 0.22rem 0.5rem;
            min-height: 1.28rem;
            font-size: 0.5rem;
            line-height: 1;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 0.04em;
            border: 1px solid transparent;
            max-width: 100%;
            white-space: nowrap;
        }

        .view-applicant-profile-page .applicant-step-status-chip--timeline {
            justify-content: center;
            padding: 0.18rem 0.46rem;
            min-height: 1.06rem;
            font-size: 0.46rem;
            letter-spacing: 0.035em;
        }

        .view-applicant-profile-page .applicant-step-status-chip.is-completed {
            color: #166534;
            background: rgba(220, 252, 231, 0.85);
            border-color: rgba(34, 197, 94, 0.45);
        }

        .view-applicant-profile-page .applicant-step-status-chip.is-active {
            color: #1d4ed8;
            background: rgba(219, 234, 254, 0.88);
            border-color: rgba(96, 165, 250, 0.5);
        }

        .view-applicant-profile-page .applicant-step-status-chip.is-locked {
            color: #4b5563;
            background: rgba(241, 243, 245, 0.98);
            border-color: rgba(203, 213, 225, 0.92);
        }

        .view-applicant-profile-page .applicant-step-status-chip.is-warning {
            color: #92400e;
            background: rgba(254, 243, 199, 0.9);
            border-color: rgba(245, 158, 11, 0.55);
        }

        .view-applicant-profile-page .applicant-step-status-chip.is-failed {
            color: #991b1b;
            background: rgba(254, 226, 226, 0.92);
            border-color: rgba(239, 68, 68, 0.5);
        }

        .view-applicant-profile-page .applicant-step-status-chip-icon {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex: 0 0 auto;
            font-size: 0.98em;
            line-height: 1;
        }

        .view-applicant-profile-page .applicant-step-status-chip-icon--outside {
            font-size: 0.72rem;
            line-height: 1;
        }

        .view-applicant-profile-page .applicant-step-status-stack {
            display: inline-flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 0.14rem;
            flex: 0 0 auto;
            text-align: center;
            line-height: 1;
        }

        .view-applicant-profile-page .applicant-step-status-stack--featured {
            gap: 0.18rem;
        }

        .view-applicant-profile-page .applicant-step-status-stack--featured .applicant-step-status-chip--timeline {
            padding: 0.24rem 0.58rem;
            min-height: 1.22rem;
            font-size: 0.56rem;
            letter-spacing: 0.045em;
        }

        .view-applicant-profile-page .applicant-step-status-stack--featured .applicant-step-status-chip-icon--outside {
            font-size: 0.88rem;
        }

        .view-applicant-profile-page .applicant-step-status-stack--featured .applicant-step-status-chip-label {
            font-size: 0.56rem;
        }

        .view-applicant-profile-page .applicant-step-status-stack.is-completed {
            color: #166534;
        }

        .view-applicant-profile-page .applicant-step-status-stack.is-active {
            color: #1d4ed8;
        }

        .view-applicant-profile-page .applicant-step-status-stack.is-locked {
            color: #4b5563;
        }

        .view-applicant-profile-page .applicant-step-status-stack.is-warning {
            color: #92400e;
        }

        .view-applicant-profile-page .applicant-step-status-stack.is-failed {
            color: #991b1b;
        }

        .view-applicant-profile-page .applicant-step-status-chip-label {
            line-height: 1;
        }

        @media (max-width: 767.98px) {
            .view-applicant-profile-page .applicant-program-header-row {
                flex-direction: column;
                align-items: flex-start !important;
                gap: 0.6rem !important;
            }

            .view-applicant-profile-page .applicant-program-header-row .applicant-program-content {
                width: 100%;
            }

            .view-applicant-profile-page .applicant-program-header-row .withdraw-application-btn {
                width: auto;
                max-width: min(100%, 9.5rem);
                min-width: 0;
                align-self: flex-start;
                white-space: normal;
                line-height: 1.15;
                text-align: center;
                padding: 0.45rem 0.7rem;
                margin-left: 0 !important;
                margin-right: 0 !important;
            }

            .view-applicant-profile-page .applicant-program-card + .applicant-program-card {
                margin-top: 1rem !important;
            }

            .view-applicant-profile-page .applicant-program-card {
                padding: 0.7rem 0.6rem 0.8rem;
                border-radius: 18px;
                gap: 0.45rem;
                margin-top: 0.35rem !important;
            }

            .view-applicant-profile-page .scroll-item {
                flex-basis: 67vw;
                max-width: 67vw;
                min-height: 149px;
            }

            .view-applicant-profile-page .applicant-step-card-header {
                gap: 0.12rem;
                margin-bottom: 0.16rem;
            }

            .view-applicant-profile-page .applicant-step-status-chip {
                gap: 0.2rem;
                padding: 0.19rem 0.42rem;
                min-height: 1.34rem;
                font-size: 0.5rem;
            }

            .view-applicant-profile-page .applicant-step-status-chip--timeline {
                padding: 0.15rem 0.38rem;
                min-height: 1.02rem;
                font-size: 0.44rem;
            }

            .view-applicant-profile-page .applicant-step-status-chip-icon {
                font-size: 0.77em;
            }

            .view-applicant-profile-page .applicant-step-status-chip-icon--outside {
                font-size: 0.64rem;
            }

            .view-applicant-profile-page .applicant-step-status-stack {
                gap: 0.11rem;
            }

            .view-applicant-profile-page .applicant-step-status-stack--featured {
                gap: 0.14rem;
            }

            .view-applicant-profile-page .applicant-step-status-stack--featured .applicant-step-status-chip--timeline {
                padding: 0.2rem 0.46rem;
                min-height: 1.12rem;
                font-size: 0.51rem;
            }

            .view-applicant-profile-page .applicant-step-status-stack--featured .applicant-step-status-chip-icon--outside {
                font-size: 0.72rem;
            }

            .view-applicant-profile-page .applicant-step-status-stack--featured .applicant-step-status-chip-label {
                font-size: 0.51rem;
            }

            .view-applicant-profile-page .applicant-step-title {
                font-size: 0.74rem;
                margin-bottom: 0.35rem;
            }

            .view-applicant-profile-page .applicant-step-meta,
            .view-applicant-profile-page .applicant-step-date {
                font-size: 0.6rem;
                line-height: 1.22;
            }

            .view-applicant-profile-page .applicant-step-actions {
                display: flex;
                flex-direction: column;
                align-items: stretch;
                gap: 0.28rem;
                padding-top: 0.31rem;
            }

            .view-applicant-profile-page .applicant-step-actions .btn,
            .view-applicant-profile-page .applicant-step-actions a.btn {
                width: 100%;
                max-width: 100%;
                min-width: 0;
                white-space: normal;
                line-height: 1.15;
                text-align: center;
            }

        }

        .view-applicant-profile-page .applicant-program-status-text {
            font-size: 0.9rem;
            font-weight: 700;
            line-height: 1.2;
        }

        .view-applicant-profile-page .applicant-program-status-text.is-completed {
            color: #166534;
        }

        .view-applicant-profile-page .applicant-program-status-text.is-warning {
            color: #92400e;
        }

        .view-applicant-profile-page .applicant-program-status-text.is-failed {
            color: #991b1b;
        }

        .view-applicant-profile-page .applicant-program-status-text.is-active {
            color: #1d4ed8;
        }

        .view-applicant-profile-page .applicant-program-status-text.is-locked {
            color: #475569;
        }

        .view-applicant-profile-page .applicant-step-title {
            color: #0f172a;
            font-size: 0.76rem;
            font-weight: 700;
            line-height: 1.22;
            margin-bottom: 0.44rem;
            overflow-wrap: anywhere;
            text-align: left;
        }

        .view-applicant-profile-page .applicant-step-meta,
        .view-applicant-profile-page .applicant-step-date {
            color: #475569;
            font-size: 0.61rem;
            line-height: 1.3;
            text-align: left;
            overflow-wrap: anywhere;
        }

        .view-applicant-profile-page .applicant-step-date span {
            font-weight: 700;
        }

        .view-applicant-profile-page .applicant-step-actions {
            margin-top: auto;
            padding-top: 0.3rem;
            width: 100%;
            text-align: left;
        }

        .view-applicant-profile-page .applicant-profile-step-action,
        .view-applicant-profile-page .applicant-profile-step-action:hover,
.view-applicant-profile-page .applicant-profile-step-action:focus {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #fff !important;
}

.view-applicant-profile-page .interview-slot-calendar {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: flex-start;
    gap: 12px;
    min-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 2px 2px 12px;
    scrollbar-gutter: stable;
}

.view-applicant-profile-page .interview-slot-day {
    flex: 0 0 250px;
    max-width: 250px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
    overflow: hidden;
}

.view-applicant-profile-page .interview-slot-date {
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    background: #f8fafc;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 0;
    text-align: center;
}

.view-applicant-profile-page .interview-slot-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    max-height: clamp(320px, calc(100vh - 315px), 500px);
    overflow-y: auto;
    padding: 12px;
}

.view-applicant-profile-page .interview-slot-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    min-height: 62px;
    padding: 9px 7px;
    cursor: pointer;
    color: #1f2937;
    background: #f8fafc;
}

.view-applicant-profile-page .interview-slot-radio:checked + .interview-slot-option {
    border-color: #2f0060;
    background: #2f0060;
    color: #fff;
}

.view-applicant-profile-page .interview-slot-option.is-booked {
    cursor: not-allowed;
    opacity: 0.78;
    background: #f1f5f9;
    color: #64748b;
    border-style: dashed;
}

.view-applicant-profile-page .interview-slot-option.is-booked .interview-slot-state {
    color: #b91c1c;
    font-weight: 700;
}

.view-applicant-profile-page .interview-slot-time {
    font-weight: 700;
    font-size: 0.86rem;
    line-height: 1.1;
}

.view-applicant-profile-page .interview-slot-state {
    font-size: 0.68rem;
    line-height: 1.1;
}

@media (max-width: 767.98px) {
    .view-applicant-profile-page .interview-slot-day {
        flex-basis: 220px;
        max-width: 220px;
    }

    .view-applicant-profile-page .interview-slot-grid {
        grid-template-columns: 1fr;
        max-height: 420px;
    }
}
        
        .view-applicant-profile-page .scroll-container::-webkit-scrollbar-thumb {
            background-color: rgba(47, 0, 96, 0.42);
            border-radius: 999px;
        }

        .tl-dot {
            width: 25px;
            height: 25px;
            border-radius: 50%;
            background-color: #007bff;
            margin-bottom: 10px;
            display: flex;
            justify-content: center;
            align-items: center;
            color: white;
            position: relative;
            z-index: 1;
        }
        .vertical-divider {
            width: 2px;
            background-color: white; /* Adjust the color to match your theme */
            height: 80%; /* Adjust the height as needed */
            margin: 0 10px;
            align-self: center; /* Center the divider vertically */
        }
        
        /* certificate preview model styling */
        .certificate-custom-height-modal .modal-content {
            height: 90vh; /* Adjust as needed */
        }
        
        .certificate-custom-height-modal .modal-body {
            height: calc(100% - 56px); /* Adjust as needed, considering header height */
        }
        
        .certificate-custom-height-modal #certificate_iframe {
            height: 100%; /* Make iframe take up the full height of the modal body */
        }
  
/* --------- End Scrollers ---------*/


/* --------- Dashboard cards ---------*/
        .dashboard-section .row {
            display: flex;
            justify-content: center;
            margin: -10px;
        }
        
        .dashboard-section .col {
            flex: 1;
            padding: 10px;
        }
        
        .dashboard-card {
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            display: flex;
            align-items: center;
            padding: 0rem;
            cursor: pointer;
        }
        
        .dashboard-card:hover {
            background-color: var(--dark-purple); 
            color: whitesmoke;
        }
        
        .dashboard-card .card-text:hover
        { 
        color: whitesmoke!important; 
        }
        
        .dashboard-list-selected
        {
        background-color: var(--dark-purple); 
        color: whitesmoke; 
        }
        
        .dashboard-list-selected a
        {
            color: whitesmoke!important; 
        }
        
        .dashboard-list-selected .card-text
        {
        background-color: var(--dark-purple); 
        color: whitesmoke!important; 
        }
        
        .sidebar-list-active
        {
        background-color: var(--dark-purple); 
        color: whitesmoke; 
        }
        
        
        .sidebar-list-active a
        {
            color: whitesmoke!important; 
        }
        
        .sidebar-list-active .card-text
        {
        background-color: var(--dark-purple); 
        color: whitesmoke!important; 
        }
        
        .dashboard-card .card-body {
            display: flex;
            align-items: center;
            width: 100%;
        }
        
        .dashboard-card .icon {
            background-color: var(--dark-purple);
            color: #fff;
            border-radius: 50%;
            width: 28px;
            height: 28px;
            display: flex;
            justify-content: center;
            align-items: center;
            font-weight: bold;
            font-size: 10px;
            border: 2px solid #fff;
        }
        
        .dashboard-card .content {
            margin-left: 1rem;
        }
        
        .dashboard-card .card-title {
            font-size: 10px; 
            margin-bottom: 0.3rem; 
        }
        
        .dashboard-card .card-text {
            font-size: 9px;
            color: #6c757d;
        }
        
        .dashboard-card a{ 
            color: #333;
        }
        
        .dashboard-card a:hover{ 
            color: #fff;
        }
        
        .dashboard-section-stat .row {
            display: flex; 
            margin: -10px;
        }
        
        .dashboard-section-stat .col {
            flex: 1;
            padding: 10px;
        }
        
        .dashboard-card-stat {
            border-radius: 15px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            display: flex;
            align-items: center;
            padding: 0rem;
            cursor: pointer;
            color:whitesmoke;
            background-color: var(--navbar-bg-color);
            
        }
        
        .dashboard-card-stat .card-text {
            font-size: 15px; 
        }

        .dashboard-card-stat .card-body {

          width: 150px;
          height: 150px;
        }
        
        .dashboard-card-stat .icon {
            background-color: var(--dark-purple);
            color: #fff;
            border-radius: 50%;
            width: 25px;
            height: 25px;
            display: flex;
            justify-content: center;
            align-items: center;
            font-weight: bold; 
            border: 2px solid #fff;
        }
        
        .dashboard-card-stat .icon-md {
            background-color: var(--dark-purple);
            color: #fff;
            border-radius: 50%;
            width: 35px;
            height: 35px;
            display: flex;
            justify-content: center;
            align-items: center;
            font-weight: bold; 
            border: 2px solid #fff;
        }
        
        .dashboard-card-stat .content {
            margin-left: 1rem;
        }
/* --------- End Dashboard cards ---------*/


 
/* --------- Top Main Navbar ---------*/
        :root {
            --primary: #1F1F21;
            --text: white;
            --text-gray: #9D9D9E;
            --hover: #353537;
            --border: #3C3C3E;
            --error: #E3452F;
            --bg: #373739;
        }
        
        .profile-menu .cart-container {
            position: relative;
            display: inline-block;
        }
        
        .profile-menu .badge {
            position: absolute;
            top: -3px;
            right: -10px;
            background-color: red;
            color: white;
            font-size: 8px;
            padding: 2px 6px; 
            font-weight: bold;
            min-width: 18px;
            text-align: center;
        }
        
        .profile-menu   {
            position: relative; 
            padding: 2px 3px;
            display: flex;
            align-items: center;
            /* Use the per-client profile menu background color, falling back to primary */
            background: var(--profile-menu-bg-color, var(--primary-color));
            color: var(--profile-menu-text-color, #fff);
            justify-content: end;
            z-index: 99;
        }

        /* Ensure all icons inside the profile-menu follow the per-client
           profile-menu text color (e.g. black for DWYPD / recruitment). */
        .profile-menu i,
        .profile-menu svg {
            color: var(--profile-menu-text-color, #fff) !important;
            fill: var(--profile-menu-text-color, #fff) !important;
        }
        
        .profile-menu .navigation__group {
            display: flex!important;
            gap: 5px!important;
            align-items: center!important;
        }
        
        .profile-menu .navigation__group > .icon {
            cursor: pointer!important; 
            transition: all 0.2s ease-in-out!important;
        }
        
        .profile-menu .navigation__group > .icon:hover {
            transform: scale(1.1)!important;
        }

        /* Ensure any Bootstrap text-white utility inside profile-menu
           follows the per-client profile-menu text color (e.g. black
           for DWYPD / recruitment themes). */
        .profile-menu .text-white {
            color: var(--profile-menu-text-color, #fff) !important;
        }
        
        .profile-menu .profile {
            display: block;
            width: 30px;
            cursor: pointer;
            object-fit: cover;
            border-radius: 50%;
            filter: drop-shadow(-20px 0 10px 
            rgba(0, 0, 0, 0.1));
        }
        
        .profile-menu .profile:hover {
            transform: scale(1.05);
            transition: all 0.2s ease-in-out;
        }
        
        .profile-menu .dropdown__wrapper {
            width: 9rem;
            top: 37px;
            right: 1rem;
            padding: 1rem;
            position: absolute;
            border-radius: 12px;
            background: #fff;
            border: 1px solid #c4c4c4;
            display: flex;
            flex-direction: column;
            color: var(--text);
            gap: 0.25rem;
            animation: fadeOutAnimation 
            ease-in-out 0.3s forwards;
            font: 12px;
        }
        
        .profile-menu .dropdown__wrapper h2 {
            font-size: 1.15rem;
        }
        
        .profile-menu .dropdown__wrapper--fade-in {
            animation: fadeInAnimation 
            ease-in-out 0.3s forwards;
        }
        
        .profile-menu .none {
            display: none;
        }
        
        .profile-menu .hide {
            opacity: 0;
            visibility: hidden;
            animation: fadeOutAnimation 
            ease-in-out 0.3s forwards;
        }
   
        @keyframes fadeInAnimation {
            0% {
                opacity: 0;
                visibility: hidden;
            }
            100% {
                opacity: 1;
                visibility: visible;
            }
        }
        
        @keyframes fadeOutAnimation {
            0% {
                opacity: 1;
                visibility: visible;
            }
            100% {
                opacity: 0;
                visibility: hidden;
            }
        }
  
        .profile-menu .dropdown__group {
            padding: 0.75rem;
        }
        
        .profile-menu .divider {
            width: 100%;
            padding: 0;
            margin: 1rem 0;
            border: 1px solid 
            var(--text-gray);
        }
        
        .profile-menu .profile-menu nav > ul {
            list-style-type: none;
            padding: 0;
            margin: 0;
            gap: 0.25rem;
        }
        
        .profile-menu nav > ul > li { 
            cursor: pointer;
            display: flex;
            flex-direction: row;
            border-radius: 0.5rem;
            align-items: center;
            color: #000;
            gap: 1rem; 
            width: 100%;
            font-weight: normal;
            transition: all 0.2s ease-in-out;
            font-size: 12px;
        }
        
        .profile-menu nav > ul > li > svg {
            stroke: var(--text-gray);
            height: 1.75rem;
            width: 1.75rem;
        }
  
        .profile-menu nav > ul > li:hover > svg {
            stroke: var(--text);
        }
        
        .switch__account ul {
            list-style-type: none;
            padding: 0;
            margin: 0;
            display: flex;
            gap: 1.25rem;
            flex-direction: column;
        }
        
        .profile-menu .switch__account li {
            display: flex;
            align-items: center;
            font-weight: bold;
            gap: 0.75rem;
            padding: 0.75rem;
            cursor: pointer;
            border-radius: 0.5rem;
        }
        
        .profile-menu .switch__account .active {
            color: var(--text);
            background: var(--hover);
        }
        
        .profile-menu .switch__account img {
            border-radius: 50%;
            height: 2.75rem;
            width: 2.75rem;
            object-fit: cover;
        }
        
        .profile-menu .sign-out-all {
            background: var(--btn-color); 
            width: 100%;
            min-height: 3rem;
            margin-top: 1rem;
            border-radius: 0.5rem;
            color: whitesmoke;  
            transition: all 0.2s ease-in-out;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 0.5rem;
            font: 12px!important;
        }
        
        .profile-menu .sign-out-all:hover {
            color: var(--text);
            border: 1px solid var(--text);
            font: 12px!important;
        }
        
        .profile-menu .email {
            font-size: 0.95rem;
        }
        
        .profile-menu .marker { 
            background: yellowgreen;
            min-width: 1rem;
            min-height: 1rem;
            margin-left: auto;
            border-radius: 50%;
            display: none;
        }
  
        .profile-menu .switch__account .active .marker {
            display: block;
        }
        
        .dropdown__wrapper ul
        {
            margin-left: -28px;
        }
        
        .profile-menu .logo a {
            font-size: 24px;
            font-weight: bold;
            text-decoration: none;
            color: #333;
        }
        
        
        .profile-menu .nav-links li {
            position: relative;
            margin-left: 20px;
        }
        
        .profile-menu .nav-links li a {
            text-decoration: none;
            color: #666;
            padding: 10px;
            display: inline-block;
        }
  
        /* Dropdown Menu */
        .top-dropdown-menu {
            display: none;
            position: absolute;
            top: 100%; 
            background-color: #fff;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            padding: 20px;
            width: 900px;
            z-index: 1000;
            border-radius: 8px;
            display: grid;
            grid-template-columns: 1fr 1fr 1fr 1fr;
            gap: 20px;
        }
        
        .top-dropdown-menu li {
            list-style: none;
            margin-bottom: 10px;
        }
        
        .top-dropdown-menu li a {
            text-decoration: none!important;
            color:#212529!important;
        }
  
   
        .dropdown-section {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }
        
        .dropdown-section h4 {
            font-size: 16px;
            font-weight: bold;
            color: #333;
            margin-bottom: 10px;
        }
        
        /* Icon Section */
        .icon-item {
            display: flex;
            align-items: center;
            gap: 10px;
            background-color: #f9f9f9;
            border-radius: 5px;
            padding: 10px;
        }
        
        .top-dropdown-menu .icon-item .bx
        {
            background-color: var(--dark-purple);
            border: 1px solid #fff;
        }
        
        .icon-item img {
            width: 40px;
            height: 40px;
            object-fit: cover;
        }
        
        .icon-item a {
            text-decoration: none;
            color: #333;
            font-weight: bold;
        }
  
        /* Hover Effects */
        .nav-links li:hover > .top-dropdown-menu {
            display: grid;
        }
        
        .top-dropdown-menu li a:hover {
            color: #0073e6;
        }
        
        .icon-item:hover {
            background-color: #f0f0f0;
        }
        
        
        @media (min-width: 800px) {
        
            .navbar-content-sm ,.navbar-list-sm
            {
            display: none;
            }
        
        }
  
        /* NAVBAR AND SIDEBAR */
        
        @media (max-width: 799px) {
        
            .navbar-content-sm ,.navbar-list-sm
            {
            display: block!important;
            }
        
            
        
            .dashboard-card-stat .icon
            {
            display: none;
            }
        
            .dashboard-card .icon
            {
            width: 23px;
            height: 23px;
            font-size: 10px;
            }
        
        }
  
/* --------- Global Search On Navbar ---------*/
        .search-container {
            position: relative;
            width: min(1000px, calc(100vw - 2rem));
            max-width: min(1000px, calc(100vw - 2rem));
            margin: 0 auto;
        }

        .top-learning-navbar {
            position: fixed;
        }

        .top-global-search {
            position: absolute;
            left: 50%;
            top: 50%;
            transform: translate(-50%, -50%);
            width: min(1000px, calc(100vw - 280px));
            display: flex !important;
            justify-content: center !important;
            align-items: center !important;
            margin: 0 !important;
            z-index: 2;
        }

        .top-global-search .search-container {
            width: 100%;
            max-width: 1000px;
        }
        
        .search-input {
            border-radius: 999px;
            padding-left: 46px;
            padding-right: 1rem;
            height: 40px;
            font-size: 0.95rem;
        }
        
        .search-icon {
            position: absolute;
            left: 18px;
            top: 50%;
            transform: translateY(-50%);
            z-index: 2;
            color: #64748b;
            font-size: 0.95rem;
            pointer-events: none;
        }

        .border-primary {
            border: 1px solid var(--primary-color) !important;
        }

        .border-card {
            border: 2px solid var(--btn-color) !important;
        }
        .big-emoji {
            font-size: 3rem;
        }
        
        #search-input {
            width: 100%;
            padding: 4px 17px;
            font-size: 10px;
            border: 1px solid #ddd;
            border-radius: 25px;
            outline: none;
            transition: box-shadow 0.3s ease-in-out;
        }
        
        #search-input:focus {
            box-shadow: 0 0 8px rgba(0, 123, 255, 0.5);
        }
        
        .search-container .dropdown {
            position: absolute;
            width:111vh;
            max-height: 454px;
            overflow-y: auto;
            background-color: white;
            border: 1px solid #ddd;
            border-radius: 8px;
            margin-top: 5px;
            padding: 15px;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
            display: none; 
            z-index: 1030;
            left:-100px;
        }
        
        .global-search-sm
        {
            display: none;
        }
  
        @media (max-width: 980px) 
        { 
            .search-container
            {
            width: inherit!important;
            }
        
            .search-container .dropdown {
            width: 75vh;
            }
        }
        
        @media (max-width: 885px) {
            .search-container .dropdown {
                width: 72vh;
            }
        }
  
  
        @media (max-width: 840px)
        
            { 
                .search-container
                {
                width: inherit!important;
                }
            }
    
        @media (max-width: 799px) {
            .search-container .dropdown {
                width: 60vh;
            }
            .global-search-md
            {
            display: none;
            }

            .top-global-search {
              position: static;
              transform: none;
              width: 100%;
            }
        }
  
        @media (max-width: 798px) {
            .search-container .dropdown {
            left: inherit;
            width: auto!important;
            }
            .global-search-md
            {
            display: none;
            }
        
            .global-search-sm
            {
            display: block;
            } 
        }
  
  
        .search-container .profile-card {
            position: relative;
            border-radius: 15px;
            border: 1px solid #e0e0e0;
            padding: 20px;
            margin-bottom: 15px;
            background: #fafafa;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            
        }
        
        .search-container .role-badge {
            font-size: 8px;
            padding: 2px 8px;
            border-radius: 12px;
            background: #f0f0f0;
            color: #333;
            margin-left: 8px;
        }
        
        .search-container .contact-info {
            color: #666;
            margin: 8px 0;
            font-size: 13px;
        }
        
        .search-container .contact-info i {
            width: 20px;
            color: var(--primary-color);
        }
        
        .search-container .profile-actions {
            position: absolute;
            top: 15px;
            right: 15px;
        }
        
        .search-container .btn-action { 
            color: #300067; 
            padding: 0;
            border-radius: 50%;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            border: none;
        }

        .top-global-search .search-container .dropdown {
            left: 50%;
            transform: translateX(-50%);
            width: min(1040px, calc(100vw - 32px));
            max-height: min(72vh, 620px);
            padding: 12px;
            border-color: #d8dee8;
            box-shadow: 0 18px 42px rgba(15, 23, 42, 0.18);
        }

        .search-container .search_results {
            margin: 0;
            row-gap: 10px;
        }

        .search-container .global-search-result-card {
            border-radius: 8px;
            padding: 16px;
            margin: 0;
            background: #ffffff;
            box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
        }

        .global-search-card-header {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto;
            align-items: start;
            gap: 12px 16px;
        }

        .global-search-person {
            min-width: 0;
            flex: 1;
        }

        .global-search-name-row {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 6px;
            margin-bottom: 8px;
        }

        .global-search-name-row .full_name {
            font-size: 0.95rem;
            font-weight: 700;
            line-height: 1.2;
        }

        .global-search-status-row {
            display: flex;
            flex-wrap: wrap;
            gap: 6px;
            margin-bottom: 8px;
        }

        .global-search-status-row .badge {
            white-space: nowrap;
        }

        .global-search-contact-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
            gap: 6px 14px;
            color: #475569;
            font-size: 0.78rem;
        }

        .global-search-contact-grid span {
            min-width: 0;
            overflow-wrap: anywhere;
        }

        .global-search-contact-grid i,
        .global-search-section-title i {
            color: #475569;
            margin-right: 4px;
        }

        .search-container .global-search-actions {
            position: static;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            flex-wrap: wrap;
            flex-shrink: 0;
            gap: 6px;
            max-width: 100%;
            margin-left: auto;
            padding-left: 0;
            align-self: start;
        }

        .search-container .global-search-actions .btn-action-label {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            height: 28px;
            padding: 0 10px;
            background: #ffffff;
            border: 1px solid #cbd5e1;
            border-radius: 999px;
            color: #300067;
            font-size: 0.72rem;
            font-weight: 600;
            line-height: 1;
            white-space: nowrap;
            text-decoration: none;
            flex: 0 0 auto;
            box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
        }

        .search-container .global-search-actions .btn-action-label.text-warning {
            color: #b45309;
        }

        .search-container .global-search-actions .btn-action-label.text-danger {
            color: #b91c1c;
        }

        .search-container .global-search-actions .btn-action-label:hover,
        .search-container .global-search-actions .btn-action-label:focus {
            background: #f8fafc;
            border-color: #94a3b8;
            color: #1e293b;
        }

        .global-search-metrics {
            display: grid;
            grid-template-columns: repeat(5, minmax(86px, 1fr));
            gap: 8px;
            margin-top: 12px;
        }

        .global-search-metrics > div {
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            background: #f8fafc;
            padding: 8px 10px;
        }

        .global-search-metrics span {
            display: block;
            color: #64748b;
            font-size: 0.68rem;
            text-transform: uppercase;
            letter-spacing: 0;
        }

        .global-search-metrics strong {
            display: block;
            color: #111827;
            font-size: 0.9rem;
            line-height: 1.2;
        }

        .global-search-section {
            border-top: 1px solid #e8edf4;
            margin-top: 12px;
            padding-top: 10px;
        }

        .global-search-section-title {
            display: flex;
            align-items: center;
            gap: 4px;
            color: #0f172a;
            font-size: 0.76rem;
            font-weight: 700;
            margin-bottom: 8px;
        }

        .global-search-assignment {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 12px;
            border: 1px solid #dbe3ee;
            border-radius: 8px;
            background: #f8fafc;
            padding: 10px;
            margin-bottom: 8px;
        }

        .global-search-assignment-main {
            min-width: 0;
            flex: 1;
        }

        .global-search-assignment-title {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 6px;
            color: #111827;
            font-size: 0.8rem;
            font-weight: 700;
        }

        .global-search-assignment-subtitle,
        .global-search-assignment-activity {
            color: #475569;
            font-size: 0.74rem;
            overflow-wrap: anywhere;
        }

        .global-search-assignment-actions {
            display: flex;
            justify-content: flex-end;
            flex-wrap: wrap;
            gap: 6px;
        }

        .global-search-assignment-actions .btn {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            border-radius: 6px;
            font-size: 0.68rem;
            line-height: 1.1;
            white-space: nowrap;
        }

        .global-search-review-btn {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            border-radius: 6px;
            font-size: 0.72rem;
        }

        .global-search-history-list {
            display: grid;
            gap: 6px;
        }

        .global-search-history-item {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 5px;
            color: #475569;
            font-size: 0.74rem;
        }

        .global-search-history-item strong {
            color: #111827;
        }

        .global-search-history-item small {
            color: #64748b;
        }

        .global-search-inline-alert {
            display: inline-flex;
            align-items: center;
            gap: 5px;
            color: #b91c1c;
            font-size: 0.76rem;
            font-weight: 700;
        }

        .global-search-form-row {
            display: flex;
            align-items: baseline;
            flex-wrap: wrap;
            gap: 6px;
            color: #475569;
            font-size: 0.74rem;
            margin-bottom: 4px;
        }

        .global-search-form-row strong {
            color: #111827;
        }

        .global-search-form-value {
            overflow-wrap: anywhere;
        }

        @media (max-width: 798px) {
            .top-global-search .search-container .dropdown,
            .search-container .dropdown {
                left: 0;
                transform: none;
                width: min(100vw - 24px, 100%) !important;
                max-height: 70vh;
            }

            .global-search-card-header,
            .global-search-assignment {
                display: flex;
                flex-direction: column;
            }

            .search-container .global-search-actions,
            .global-search-assignment-actions {
                justify-content: flex-start;
                width: 100%;
                padding-left: 0;
            }

            .global-search-metrics {
                grid-template-columns: repeat(2, minmax(0, 1fr));
            }
        }

        .selected-item
        {
            background: var(--dark-purple); 
        }
        
        .selected-item .link-name
        { 
            color: whitesmoke!important;
        }
/* ---------End  Global Search On Navbar ---------*/

/* ---------Profile ---------*/
input.country-code {
    max-width: 70px;
}
/* ---------End Profile ---------*/

/* ---------Orcaa Assist Parent Dashboard ---------*/ 
        .feature-icon {
            width: 140px; 
        }  
        
        .feature-card {
            background-color: var(--light-purple);
            border-radius: 15px;
            padding: 10px;
            text-align: center;
            transition: transform 0.3s;
        }
        
        .feature-card:hover {
            transform: translateY(-5px);
        } 
        
        /* dashboard container superset*/
        #dashboard-container iframe {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border: 0;
        }
        
        
        .superset-container {
            width: 100%;
            height: 100vh;
        }
        
        #dashboard-container {
            width: 100%;
            height: 100%;
            max-width: 1000px;
        }

        /* Teacher Monitoring Performance â€“ Superset embed should fill card */
        #teacher-monitoring-dashboard-wrapper {
            width: 100%;
        }

        #teacher-monitoring-dashboard-container {
            position: relative;
            width: 100%;
            height: 70vh; /* Make dashboard tall enough to be readable */
        }

        #teacher-monitoring-dashboard-container iframe {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border: 0;
        }
/* --------- End Orcaa Assist Parent Dashboard ---------*/

/* --------- Programme Courses Embed (compact cards) ---------*/

.programme-courses-embed-wrapper {
    width: 100%;
}

/* The course dashboard has four KPI cards; let them use the full row. */
.programme-courses-embed-wrapper .assessment-kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.programme-courses-embed-wrapper .assessment-kpi-tile {
    min-height: 104px;
    border-top: 0;
}

@media (max-width: 767.98px) {
    .programme-courses-embed-wrapper .assessment-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.programme-courses-import-mount {
    height: 0;
    overflow: hidden;
    position: absolute;
    width: 0;
}

.programme-courses-content-card {
    background: #ededed;
    border: 1px solid rgba(15, 23, 42, 0.06);
    border-radius: 24px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
    padding: 0.85rem 0;
}

.programme-courses-content-inner {
    background: transparent;
    border: 0;
    border-radius: 20px;
    min-height: 420px;
    padding: 1rem 1rem 1.25rem;
}

.programme-courses-toolbar {
    align-items: flex-start;
    display: flex;
    gap: 0.5rem;
    justify-content: space-between;
    margin-bottom: 0.15rem;
    width: 100%;
}

.programme-courses-panel-menu-btn {
    align-items: center;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.24);
    border-radius: 999px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
    color: #334155;
    display: inline-flex;
    height: 40px;
    justify-content: center;
    padding: 0;
    width: 40px;
}

.programme-courses-toolbar-menu,
.programme-courses-panel-header .dropdown {
    margin-left: auto;
}

.programme-courses-panel-menu-btn:hover,
.programme-courses-panel-menu-btn:focus {
    background: #f8fafc;
    color: #0f172a;
}

/* Positioning (right/left/top offset) is intentionally left to Bootstrap's
   default Popper config -- dropdown-menu-end + Popper's flip/preventOverflow
   already right-align this under its toggle and drop it below, flipping
   above or shifting sideways when the viewport doesn't have room. A
   hardcoded right/left/margin-top here would fight that; the global
   ".dropdown-menu.show { transform: none !important }" rule further down
   this file carves this class out for the same reason. */
.programme-courses-panel-menu {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
    min-width: 240px;
    padding: 0.5rem;
}

.programme-courses-panel-action,
.programme-courses-panel-menu-item {
    border-radius: 12px;
}

.programme-courses-panel-action {
    align-items: center;
    color: #334155;
    display: flex;
    font-size: 0.8rem;
    font-weight: 600;
    gap: 0.35rem;
    padding: 0.7rem 0.85rem;
}

.programme-courses-panel-action:hover,
.programme-courses-panel-action:focus {
    background: rgba(76, 29, 149, 0.08);
    color: #3b0a73;
}

.programme-courses-panel-menu-item {
    margin: 0.15rem 0;
    overflow: hidden;
}

.programme-courses-panel-menu-item #import_course_vue_app {
    width: 100%;
}

.programme-courses-panel-menu-item #import_course_vue_app .btn {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 12px;
    box-shadow: none;
    color: #334155 !important;
    display: flex;
    font-size: 0.8rem;
    font-weight: 600;
    justify-content: flex-start;
    padding: 0.7rem 0.85rem;
    width: 100%;
    white-space: nowrap;
}

.programme-courses-panel-menu-item #import_course_vue_app .btn:hover,
.programme-courses-panel-menu-item #import_course_vue_app .btn:focus {
    background: rgba(76, 29, 149, 0.08);
    color: #3b0a73 !important;
}

.programme-courses-panel-menu-item #import_course_vue_app .btn i,
.programme-courses-panel-menu-item #import_course_vue_app .btn span,
.programme-courses-panel-menu-item #import_course_vue_app .btn,
.programme-courses-panel-menu-item #import_course_vue_app .text-white {
    color: inherit !important;
}

.programme-courses-content-card .admin-courses-status-tabs {
    border-bottom: 1px solid rgba(148, 163, 184, 0.22);
    flex: 1 1 auto;
    margin: 0;
    min-width: 0;
    padding: 0;
}

.programme-courses-content-card .admin-courses-status-tabs .nav-tabs {
    align-items: center;
    border-bottom: 0;
    gap: 0.35rem;
    margin-bottom: 0;
}

.programme-courses-content-card .admin-courses-status-tabs .nav-link {
    border: 0;
    border-radius: 999px;
    color: #475569;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.55rem 1rem;
}

.programme-courses-content-card .admin-courses-status-tabs .nav-link.active {
    background: rgba(76, 29, 149, 0.08);
    color: #3b0a73;
}

.programme-courses-content-card .tab-pane .card-body {
    padding: 0.35rem 0 0;
}

.programme-state-card-link > div,
.qualification-admin-nav-link > div,
.programme-assessments-dashboard-link > div,
.programme-assessments-manage-link > div {
    border: 3px solid var(--primary-color) !important;
    outline: 3px solid var(--primary-color);
    outline-offset: 0;
    box-shadow: 0 0 0 2px var(--primary-color);
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.programme-state-card-link,
.qualification-admin-nav-link {
    opacity: 1;
}

.programme-state-card-link.is-faded > div,
.qualification-admin-nav-link.is-faded > div {
    opacity: 1;
    border-color: var(--primary-color) !important;
    filter: none;
    outline-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-color), inset 0 0 0 9999px rgba(255, 255, 255, 0.12);
}

.programme-state-card-link.is-active > div,
.qualification-admin-nav-link.is-active > div {
    opacity: 1;
    border-color: var(--primary-color) !important;
    filter: saturate(1) brightness(1);
    transform: translateY(-2px);
    outline-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-color), 0 16px 34px rgba(15, 23, 42, 0.18) !important;
}

.programme-state-card-link.is-active > .bg-blue-wave,
.qualification-admin-nav-link.is-active > .bg-blue-wave {
    background: var(--dark-purple-2) !important;
    border-radius: 11px;
    background-repeat: no-repeat;
    background-size: cover;
}

.programme-state-card-link.is-faded > .bg-blue-wave,
.qualification-admin-nav-link.is-faded > .bg-blue-wave {
    background: linear-gradient(rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.16)), var(--dark-purple-2) !important;
    border-radius: 11px;
    background-repeat: no-repeat;
    background-size: cover;
}

.programme-state-card-link.is-faded:hover > div,
.qualification-admin-nav-link.is-faded:hover > div {
    opacity: 1;
    filter: none;
    outline-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-color), inset 0 0 0 9999px rgba(255, 255, 255, 0.07);
}

.programme-state-card-link.is-faded:hover > .bg-blue-wave,
.qualification-admin-nav-link.is-faded:hover > .bg-blue-wave {
    background: linear-gradient(rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.1)), var(--dark-purple-2) !important;
}

.programme-state-card-link .text-white-50,
.qualification-admin-nav-link .text-white-50,
.programme-assessments-dashboard-link .text-white-50,
.programme-assessments-manage-link .text-white-50 {
    color: rgba(255, 255, 255, 0.92) !important;
}

/* Give the admin-home System Management section a balanced outer inset so the
   card rail and the embedded panel line up with the same left and right gutter. */
.home-section.admin-home-layout #system-management-section-shell.system-management-home-shell {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 24px 32px 32px;
    box-sizing: border-box;
}

.home-section.admin-home-layout #system-management-section-shell.system-management-home-shell .system-management-card-row {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 24px;
    margin: 0;
}

.home-section.admin-home-layout #system-management-section-shell.system-management-home-shell .system-management-card-row > .col {
    width: 100%;
    max-width: none;
    min-width: 0;
    margin-top: 0;
    padding: 0;
}

@media (max-width: 1199.98px) {
    .home-section.admin-home-layout #system-management-section-shell.system-management-home-shell {
        padding: 20px 24px 28px;
    }

    .home-section.admin-home-layout #system-management-section-shell.system-management-home-shell .system-management-card-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .home-section.admin-home-layout #system-management-section-shell.system-management-home-shell {
        padding: 16px 16px 24px;
    }

    .home-section.admin-home-layout #system-management-section-shell.system-management-home-shell .system-management-card-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }
}

/* Keep the System Management dashboard cards aligned on one shared rail.
   This preserves the existing visual treatment while making the icon,
   copy, and footer spacing consistent across every card. */
.system-management-home-shell .system-management-card-row > .col {
    min-width: 0;
}

.system-management-home-shell .system-management-card-row > .col > .programme-state-card-link {
    display: block;
    width: 100%;
    height: 100%;
    min-width: 0;
}

.system-management-home-shell .system-management-card-row > .col > .programme-state-card-link > .system-management-card-shell {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0.85rem;
    width: 100%;
    min-width: 0;
    height: 100%;
    padding: 1rem;
}

.system-management-home-shell .system-management-card-row > .col > .programme-state-card-link > .system-management-card-shell > .system-management-card-top {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    margin: 0;
}

.system-management-home-shell .system-management-card-row > .col > .programme-state-card-link > .system-management-card-shell > .system-management-card-copy {
    display: flex;
    flex-direction: column;
    gap: 0.22rem;
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
}

.system-management-home-shell .system-management-card-row > .col > .programme-state-card-link > .system-management-card-shell > .system-management-card-copy > span {
    min-width: 0;
    overflow-wrap: anywhere;
    word-break: normal;
}

.system-management-home-shell .system-management-card-row > .col > .programme-state-card-link > .system-management-card-shell > .system-management-card-copy > span.text-sm {
    line-height: 1.25;
}

.system-management-home-shell .system-management-card-row > .col > .programme-state-card-link > .system-management-card-shell > .system-management-card-copy > span.text-xxs {
    line-height: 1.35;
}

.system-management-home-shell .system-management-card-row > .col > .programme-state-card-link > .system-management-card-shell > .system-management-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-top: auto;
    min-width: 0;
    width: 100%;
}

.system-management-home-shell .system-management-card-row > .col > .programme-state-card-link > .system-management-card-shell > .system-management-card-footer > span {
    min-width: 0;
}

.system-management-home-shell .system-management-card-row > .col > .programme-state-card-link > .system-management-card-shell > .system-management-card-footer > span:first-child {
    flex: 0 0 auto;
    white-space: nowrap;
}

.system-management-home-shell .system-management-card-row > .col > .programme-state-card-link > .system-management-card-shell > .system-management-card-footer > span:last-child {
    flex: 0 1 auto;
    margin-left: auto;
    text-align: right;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 767.98px) {
    .system-management-home-shell .system-management-card-row > .col > .programme-state-card-link > .system-management-card-shell {
        gap: 0.7rem;
        padding: 0.85rem;
    }

    .system-management-home-shell .system-management-card-row > .col > .programme-state-card-link > .system-management-card-shell > .system-management-card-footer {
        gap: 0.5rem;
    }
}

#programme-assessments-manage-pane,
#programme-assessments-manage-pane .card,
#programme-assessments-manage-pane .card-body,
#programme-assessments-manage-pane .tab-content,
#programme-assessments-manage-pane .tab-pane {
    max-width: 100%;
    overflow-x: hidden;
}

#programme-assessments-manage-pane .table-responsive,
#programme-assessments-manage-pane .assessment-results-table-wrapper {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

#programme-assessments-manage-pane table {
    width: 100% !important;
    max-width: 100%;
}

#programme-assessments-states,
#programme-assessments-wrapper,
#programme-assessments-dashboard-pane,
#programme-assessments-manage-pane,
#programme-assessments-templates-pane {
    min-width: 0;
    max-width: 100%;
}

#programme-assessments-templates-pane.show,
#programme-assessments-templates-pane.show .programme-courses-content-card,
#programme-assessments-templates-pane.show #assessment-templates-root {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Shared assessment manage menu, matching the course curriculum panel */
body.programme-cards-medium-bootstrap .assessment-manage-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 156px;
    min-width: 156px;
    max-width: 100%;
    padding: 0.45rem 0.7rem;
    white-space: nowrap;
    border-radius: 999px;
    box-shadow: none !important;
}

body.programme-cards-medium-bootstrap .assessment-manage-button:hover,
body.programme-cards-medium-bootstrap .assessment-manage-button:focus,
body.programme-cards-medium-bootstrap .assessment-manage-button:focus-visible {
    box-shadow: none !important;
}

body.programme-cards-medium-bootstrap .assessment-manage-menu {
    position: fixed;
    left: var(--assessment-manage-menu-left, 0);
    top: var(--assessment-manage-menu-top, 0);
    width: 260px;
    max-width: calc(100vw - 1rem);
    max-height: var(--assessment-manage-menu-max-height, calc(100vh - 1rem));
    overflow: hidden auto;
    padding: 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    background: #fff;
    border: 1px solid rgb(15 23 42 / 8%);
    border-radius: 1rem;
    box-shadow: 0 20px 40px rgb(15 23 42 / 18%);
    z-index: 3000;
    visibility: hidden;
    pointer-events: none;
}

body.programme-cards-medium-bootstrap .assessment-manage-menu.is-open {
    visibility: visible;
    pointer-events: auto;
}

body.programme-cards-medium-bootstrap .assessment-manage-menu[aria-hidden="true"] {
    display: none !important;
}

body.programme-cards-medium-bootstrap .assessment-manage-menu-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 0.85rem;
    border: 0;
    border-radius: 0.85rem;
    background: transparent;
    appearance: none;
    box-shadow: none;
    color: #1f2937;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.25;
    text-align: left;
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease;
}

body.programme-cards-medium-bootstrap .assessment-manage-menu-item:hover,
body.programme-cards-medium-bootstrap .assessment-manage-menu-item:focus {
    background: #f8fafc;
    color: #111827;
}

body.programme-cards-medium-bootstrap .assessment-manage-menu-item:focus-visible {
    outline: 2px solid rgb(13 110 253 / 22%);
    outline-offset: 2px;
}

body.programme-cards-medium-bootstrap .assessment-manage-menu-item .menu-item-icon {
    width: 1rem;
    flex: 0 0 1rem;
    font-size: 1rem;
    line-height: 1;
}

@media (max-width: 768px) {
    body.programme-cards-medium-bootstrap .programme-assessments-embed-wrapper > .bg-outline-primary,
    body.assessment-management-standalone-page .programme-assessments-embed-wrapper > .bg-outline-primary {
        align-items: flex-start !important;
        gap: 0.5rem !important;
        padding: 0.85rem 0.85rem 0.75rem !important;
    }

    body.programme-cards-medium-bootstrap .programme-assessments-embed-wrapper > .bg-outline-primary > .d-flex,
    body.assessment-management-standalone-page .programme-assessments-embed-wrapper > .bg-outline-primary > .d-flex {
        width: 100%;
        justify-content: flex-end;
    }

    body.programme-cards-medium-bootstrap .assessment-manage-button,
    body.assessment-management-standalone-page .assessment-manage-button {
        width: auto;
        min-width: 6.75rem;
        max-width: 100%;
        height: 2.1rem;
        padding: 0.28rem 0.55rem;
        font-size: 0.64rem;
        line-height: 1;
        border-radius: 0.8rem;
        gap: 0.22rem;
    }

    body.programme-cards-medium-bootstrap .assessment-manage-button .bx,
    body.assessment-management-standalone-page .assessment-manage-button .bx {
        font-size: 0.88rem;
        margin-right: 0.15rem !important;
    }

    body.programme-cards-medium-bootstrap .assessment-manage-menu,
    body.assessment-management-standalone-page .assessment-manage-menu {
        width: min(15.5rem, calc(100vw - 1rem));
        max-width: calc(100vw - 1rem);
        max-height: calc(100vh - 1rem);
        padding: 0.35rem;
        border-radius: 0.9rem;
        box-shadow: 0 14px 32px rgba(15, 23, 42, 0.16);
        z-index: 4000;
    }

    body.programme-cards-medium-bootstrap .assessment-manage-menu-item,
    body.assessment-management-standalone-page .assessment-manage-menu-item {
        padding: 0.48rem 0.6rem;
        font-size: 0.7rem;
        line-height: 1.1;
        gap: 0.5rem;
        border-radius: 0.7rem;
    }

    body.programme-cards-medium-bootstrap .assessment-manage-menu-item .menu-item-icon,
    body.assessment-management-standalone-page .assessment-manage-menu-item .menu-item-icon {
        width: 0.9rem;
        flex: 0 0 0.9rem;
        font-size: 0.9rem;
    }

    body.programme-cards-medium-bootstrap .assessment-manage-menu-item span,
    body.assessment-management-standalone-page .assessment-manage-menu-item span {
        min-width: 0;
        white-space: nowrap;
    }
}

body.programme-cards-medium-bootstrap #app .programme-team-add-learner-option {
    padding: 0.85rem 1rem;
    min-height: 2.95rem;
    font-size: 0.95rem;
    line-height: 1.2;
}

@media (max-width: 768px) {
    body.programme-cards-medium-bootstrap #app .programme-team-add-learner-option {
        padding: 0.75rem 0.9rem;
        min-height: 2.7rem;
        font-size: 0.9rem;
    }
}

#create_pop_up_model {
    position: fixed;
    inset: 0;
    z-index: 1085 !important;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    padding-right: 0 !important;
    overflow-x: hidden;
    overflow-y: auto;
}

#create_pop_up_model .modal-dialog,
#create_pop_up_model .modal-content {
    position: relative;
    z-index: 1086 !important;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
}

body.programme-modal-open #create_pop_up_model {
    opacity: 1 !important;
    filter: none !important;
}

body.programme-modal-open {
    overflow: hidden;
}

/* Keep every toggle in the "Add {{ programme }}" and "Programme Setup" modals on
   the brand primary colour. Without this the plain switches fall back to
   Bootstrap blue and the specialization switch shows purple (see
   .learner-specialization-switch). */
#create_pop_up_model .form-check-input:checked,
#edit_program_form .form-check-input:checked {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

#create_pop_up_model .form-check-input:focus,
#edit_program_form .form-check-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--primary-color) 20%, transparent);
}

body.programme-modal-open .modal-backdrop,
body.programme-modal-open .programme-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1080 !important;
    opacity: 0.55 !important;
    background-color: rgba(15, 23, 42, 0.55);
}

body.programme-modal-open .programme-standard-modal {
    position: fixed;
    inset: 0;
    opacity: 1 !important;
    filter: none !important;
    z-index: 1090 !important;
    overflow-x: hidden;
    overflow-y: auto;
}

body.programme-modal-open .programme-standard-modal .modal-dialog {
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    max-width: 560px;
    margin: 1.75rem auto;
}

body.programme-modal-open .programme-standard-modal .modal-content,
body.programme-modal-open .programme-standard-modal .modal-body,
body.programme-modal-open .programme-standard-modal .modal-header,
body.programme-modal-open .programme-standard-modal .modal-footer,
body.programme-modal-open .programme-standard-modal form {
    opacity: 1 !important;
    filter: none !important;
}

body.programme-modal-open .programme-standard-modal .modal-content {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 3rem);
    min-height: 0;
    overflow: hidden;
    background-color: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 18px 60px rgba(15, 23, 42, 0.18);
}

body.programme-modal-open .programme-standard-modal .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.programme-create-modal-scroll-body,
.programme-edit-modal-scroll-body,
.programme-create-evaluation-modal-body {
    max-height: min(68vh, 640px);
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 0.35rem;
    -webkit-overflow-scrolling: touch;
}

#programme_create_evaluation_modal .programme-evaluation-form-modal-content,
#programme_assign_evaluation_modal .programme-evaluation-form-modal-content {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 3rem);
    overflow: hidden;
}

#programme_create_evaluation_modal .programme-create-evaluation-modal-body,
#programme_assign_evaluation_modal .programme-assign-evaluation-modal-body {
    flex: 1 1 auto;
    max-height: calc(100vh - 11rem);
    min-height: 0;
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.programme-edit-modal-scroll-body::-webkit-scrollbar,
.programme-create-modal-scroll-body::-webkit-scrollbar,
.programme-create-evaluation-modal-body::-webkit-scrollbar {
    width: 8px;
}

.programme-edit-modal-scroll-body::-webkit-scrollbar-thumb,
.programme-create-modal-scroll-body::-webkit-scrollbar-thumb,
.programme-create-evaluation-modal-body::-webkit-scrollbar-thumb {
    background-color: rgba(108, 117, 125, 0.55);
    border-radius: 999px;
}

.programme-edit-modal-scroll-body .ck.ck-editor {
    width: 100%;
}

#programme_create_evaluation_modal .programme-create-evaluation-modal-body .form-label {
    margin-bottom: 0.3rem;
}

#programme_create_evaluation_modal .programme-create-evaluation-modal-body hr.programme-evaluation-divider {
    margin: 0.75rem 0;
    border: 0;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.programme-edit-modal-scroll-body .ck-editor__editable_inline {
    font-size: 0.78rem;
    min-height: 190px;
}

/* "Main Content" vs "Additional Content" placement picker at the top of the
   Add / Edit Content modals. */
.content-placement-options .content-placement-option {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--bs-border-color, #d7dbe7);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.15s ease;
}

.content-placement-options .content-placement-option:hover {
    border-color: var(--primary-color);
}

.content-placement-options .content-placement-option .form-check-input {
    margin-top: 0.15rem;
    flex-shrink: 0;
}

.content-placement-options .content-placement-option-body {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}

.content-placement-options .content-placement-option-title {
    font-weight: 600;
    color: var(--bs-body-color, #212529);
}

.content-placement-options .content-placement-option-subtitle {
    font-size: 0.75rem;
    color: var(--bs-secondary-color, #6c757d);
}

.content-placement-options .content-placement-option:has(.form-check-input:checked) {
    border-color: var(--primary-color);
    background-color: color-mix(in srgb, var(--primary-color) 8%, transparent);
    box-shadow: 0 0 0 1px var(--primary-color) inset;
}

.content-placement-options .content-placement-option:has(.form-check-input:checked) .content-placement-option-title {
    color: var(--primary-color);
}

/* Type Notes editor in the Add/Edit Content modal was rendering much
   smaller than the Content Name field and never grew with the content. */
.rich-edit-container .ck.ck-editor,
.rich-edit-container-edit .ck.ck-editor {
    width: 100%;
}

.rich-edit-container .ck-editor__editable_inline,
.rich-edit-container-edit .ck-editor__editable_inline {
    min-height: 480px;
    height: auto;
    width: 100%;
}

.programme-edit-intro-icon {
    align-items: center;
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 999px;
    color: #111827;
    display: inline-flex;
    flex: 0 0 auto;
    font-size: 1rem;
    height: 40px;
    justify-content: center;
    width: 40px;
}

.programme-edit-image-preview-card {
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 22px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    aspect-ratio: 1 / 1;
    display: flex;
    overflow: hidden;
}

.programme-edit-image-preview-img {
    background: #f8fafc;
    display: block;
    height: 100%;
    object-fit: cover;
    width: 100%;
}

.programme-edit-image-placeholder {
    align-items: center;
    background:
        radial-gradient(circle at top, rgba(99, 102, 241, 0.12), transparent 36%),
        linear-gradient(135deg, #f8fafc 0%, #eef2ff 55%, #e2e8f0 100%);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    height: 100%;
    justify-content: center;
    padding: 0.95rem;
    text-align: center;
    width: 100%;
}

.programme-edit-image-placeholder-icon {
    align-items: center;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 24px;
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.08);
    color: var(--primary-color);
    display: inline-flex;
    font-size: 1.55rem;
    height: 64px;
    justify-content: center;
    width: 64px;
}

.programme-edit-image-placeholder-copy {
    color: #475569;
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    margin-top: 0;
    max-width: 14rem;
}

.programme-edit-image-placeholder-copy strong {
    color: #111827;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.15;
    text-wrap: balance;
}

.programme-edit-image-placeholder-copy span {
    font-size: 0.68rem;
    line-height: 1.3;
    text-wrap: balance;
}

.programme-edit-image-copy {
    color: #64748b;
    font-size: 0.84rem;
    line-height: 1.55;
    max-width: 32rem;
}

.programme-edit-image-actions {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.programme-edit-image-action-btn {
    align-items: center;
    border-radius: 16px;
    display: inline-flex;
    font-size: 0.79rem;
    font-weight: 600;
    gap: 0.35rem;
    justify-content: center;
    min-width: 176px;
    padding: 0.58rem 0.9rem;
}

.programme-edit-image-action-btn.btn-outline-dark {
    background: #ffffff;
    border-color: rgba(15, 23, 42, 0.22);
    color: #111827;
}

.programme-edit-image-action-btn.btn-outline-dark:hover,
.programme-edit-image-action-btn.btn-outline-dark:focus {
    background: #f8fafc;
    border-color: rgba(15, 23, 42, 0.32);
    color: #111827;
}

.programme-edit-image-action-btn.btn-outline-danger {
    background: #ffffff;
    border-color: rgba(220, 38, 38, 0.42);
    color: #b91c1c;
}

.programme-edit-image-action-btn.btn-outline-danger:hover,
.programme-edit-image-action-btn.btn-outline-danger:focus {
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.62);
    color: #991b1b;
}

.programme-edit-image-file-name {
    color: #64748b;
    word-break: break-word;
}

.programme-document-add-btn {
    background: var(--primary-color);
    align-items: center;
    border: 0;
    border-radius: 999px;
    box-shadow: 0 8px 18px rgba(13, 110, 253, 0.2);
    display: inline-flex;
    height: 36px;
    justify-content: center;
    color: #fff;
    width: 36px;
}

.programme-document-add-btn:hover,
.programme-document-add-btn:focus {
    background: var(--primary-color);
    color: #fff;
}

.programme-document-summary-actions {
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.35rem;
}

.programme-document-action-btn {
    align-items: center;
    display: inline-flex;
    font-weight: 600;
    justify-content: center;
    min-width: 5.2rem;
    white-space: nowrap;
}

/* Document management summary table should stay readable even when body text
   color is themed light (e.g. white) for other sections. */
#programme-document-management-section .table tbody td {
    color: #111827 !important;
}

#programme-document-management-section .table tbody a {
    color: #1d4ed8;
}

#programme-document-management-section .table tbody a:hover,
#programme-document-management-section .table tbody a:focus {
    color: #1e40af;
}

#programme-document-management-section .programme-document-status-badge {
    border: 1px solid transparent;
    color: #111827 !important;
    font-weight: 600;
}

#programme-document-management-section .programme-document-status-badge--pending {
    background-color: #e2e8f0;
    border-color: #cbd5e1;
}

#programme-document-management-section .programme-document-status-badge--assigned-configured {
    background-color: #bbf7d0;
    border-color: #86efac;
}

#programme-document-management-section .programme-document-status-badge--assigned {
    background-color: #bfdbfe;
    border-color: #93c5fd;
}

#programme-document-management-section .programme-document-status-badge--configured {
    background-color: #bae6fd;
    border-color: #7dd3fc;
}

#programme-document-management-section .programme-document-status-badge--uploaded {
    background-color: #fde68a;
    border-color: #fcd34d;
}

body.programme-details-compact #app .programme-document-action-btn {
    font-size: 0.6rem !important;
    min-width: 4.8rem;
    padding: 0.22rem 0.55rem !important;
}

.programme-edit-modal-scroll-body .choices:hover .choices__inner,
.programme-edit-modal-scroll-body .choices.is-focused .choices__inner,
.programme-edit-modal-scroll-body .choices.is-open .choices__inner {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.18);
}

.programme-edit-modal-scroll-body .choices__list--dropdown .choices__item--selectable.is-highlighted {
    background-color: #e9ecef;
    color: #212529;
}

.programme-edit-modal-scroll-body .choices__list--multiple .choices__item {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #fff !important;
    font-weight: 600;
}

.programme-edit-modal-scroll-body .choices__list--multiple .choices__item.is-highlighted {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: #fff !important;
}

.programme-edit-modal-scroll-body .choices__list--multiple .choices__item .choices__button {
    border-left-color: rgba(255, 255, 255, 0.55) !important;
    color: #fff !important;
}

body.programme-modal-open .programme-standard-modal .modal-header,
body.programme-modal-open .programme-standard-modal .modal-footer {
    flex-shrink: 0;
}

body.programme-modal-open #addNotificationModal {
    z-index: 1090 !important;
    opacity: 1 !important;
    filter: none !important;
}

body.programme-modal-open #addNotificationModal .modal-dialog {
    max-width: 560px;
    margin: 1.75rem auto;
}

body.programme-modal-open #addNotificationModal .modal-content {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 3rem);
    overflow: hidden;
}

body.programme-modal-open #addNotificationModal form {
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

body.programme-modal-open #addNotificationModal .modal-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    overflow: hidden;
}

body.programme-modal-open #addNotificationModal .notification-modal-scroll-area {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-right: 0.25rem;
}

body.programme-modal-open #addNotificationModal .notification-modal-scroll-area .table-responsive {
    margin-bottom: 0;
}

.notification-management-modal .notification-rich-text-editor-shell {
    border: 1px solid #ced4da;
    border-radius: 0.5rem;
    overflow: hidden;
}

.notification-management-modal .notification-rich-text-editor-shell .ql-toolbar.ql-snow {
    background: #f8fafc;
    border: 0;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.15rem;
    padding: 0.5rem;
}

.notification-management-modal .notification-rich-text-editor-shell .ql-container.ql-snow {
    border: 0;
    font-family: inherit;
    font-size: 0.78rem;
    min-height: 9rem;
}

.notification-management-modal .notification-rich-text-editor-shell .ql-editor {
    min-height: 9rem;
    overflow-wrap: anywhere;
    padding: 0.75rem;
}

.notification-management-modal .notification-rich-text-editor-shell:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--primary-color) 20%, transparent);
}

body.programme-modal-open #addNotificationModal .notification-recipients-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background-color: var(--primary-color);
    color: #fff;
}

body.programme-modal-open #addNotificationModal .modal-header,
body.programme-modal-open #addNotificationModal .modal-footer {
    flex-shrink: 0;
}

body.assign-programme-modal-open {
    overflow: hidden;
}

body.assign-programme-modal-open .modal-backdrop {
    position: fixed;
    inset: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1080 !important;
    opacity: 0.55 !important;
    background-color: rgba(15, 23, 42, 0.55);
}

body.assign-programme-modal-open .modal-backdrop.show {
    opacity: 0.55 !important;
}

body.assign-programme-modal-open #assign_programme {
    z-index: 1090 !important;
}

body.assign-programme-modal-open #assign_programme .modal-dialog {
    position: relative;
    z-index: 1091 !important;
}

body.course-assign-programme-modal-open {
    overflow: hidden;
}

body.course-assign-programme-modal-open .modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 1040 !important;
    opacity: 1 !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
}

body.course-assign-programme-modal-open .modal-backdrop.show {
    opacity: 1 !important;
}

body.course-assign-programme-modal-open #course_assign_programme {
    z-index: 1055 !important;
}

body.course-assign-programme-modal-open #course_assign_programme .modal-dialog {
    position: relative;
    z-index: 1056 !important;
}

/* Give the Assign (Scheduled) Course modal real breathing room: it needs to
   fit a wide table (name, access type, start/end date-time, mainskill,
   assign) plus a long list of rows, so widen the dialog and make the body
   scroll internally instead of being clipped by a fixed-size modal. */
#course_assign_programme .modal-dialog {
    width: min(1400px, calc(100vw - 2rem));
    max-width: min(1400px, calc(100vw - 2rem));
    margin: 1.75rem auto;
}

#course_assign_programme .modal-content {
    display: flex;
    flex-direction: column;
    /* Fixed size: the modal keeps this shape no matter how much content loads
       (the body scrolls internally instead of the modal growing/shrinking).
       max-height keeps it inside the viewport on short screens. */
    height: min(88vh, 900px);
    max-height: calc(100vh - 3rem);
    overflow: hidden;
    max-width: 100%;
}

#course_assign_programme .modal-content > .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#course_assign_programme .modal-content > .modal-body::-webkit-scrollbar {
    width: 8px;
}

#course_assign_programme .modal-content > .modal-body::-webkit-scrollbar-thumb {
    background-color: rgba(108, 117, 125, 0.55);
    border-radius: 999px;
}

#course_assign_programme .assign_card,
#course_assign_programme .assign_to_program,
#course_assign_programme .specialization_element {
    max-width: 100%;
}

/* Assign Additional Programmes (learner profile modal): shares the
   .programme-standard-modal structure (header, dialog size, scroll body,
   footer) used by the Add Programme modal; this just flattens the
   checklist rows instead of boxed list-group "cards". */
#additionalProgrammeModal .additional-programme-item {
    display: flex;
    align-items: center;
    padding: 0.4rem 0.25rem;
    margin: 0;
    border: 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    background: transparent;
    cursor: pointer;
}

#additionalProgrammeModal .additional-programme-item:last-child {
    border-bottom: 0;
}

#additionalProgrammeModal .additional-programme-item:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

#course_assign_programme .table-responsive {
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

#course_assign_programme table .assign_switch {
    white-space: nowrap;
}

#course_assign_programme table td:last-child,
#course_assign_programme table th:last-child {
    min-width: 110px;
}

body.programme-modal-open .programme-modal-standard,
body.programme-modal-open .programme-standard-modal {
    --programme-label-font-size: 0.84rem;
    --programme-muted-font-size: 0.68rem;
}

body.programme-modal-open .programme-modal-standard .programme-label-bold,
body.programme-modal-open .programme-standard-modal .programme-label-bold {
    font-size: var(--programme-label-font-size) !important;
    font-weight: 600;
    line-height: 1.3;
}

body.programme-modal-open .programme-modal-standard .programme-text-muted,
body.programme-modal-open .programme-standard-modal .programme-text-muted {
    color: #6c757d !important;
    font-size: var(--programme-muted-font-size) !important;
    line-height: 1.25;
}

body.programme-modal-open .programme-modal-standard .programme-text-muted .programme-label-bold,
body.programme-modal-open .programme-standard-modal .programme-text-muted .programme-label-bold,
.programme-modal-standard .programme-text-muted .programme-label-bold,
.programme-standard-modal .programme-text-muted .programme-label-bold {
    font-size: inherit !important;
    font-weight: 700;
    line-height: inherit;
}

body.programme-modal-open .programme-modal-standard .btn,
body.programme-modal-open .programme-standard-modal .btn,
body.programme-modal-open .programme-modal-standard .form-control,
body.programme-modal-open .programme-standard-modal .form-control,
body.programme-modal-open .programme-modal-standard .form-select,
body.programme-modal-open .programme-standard-modal .form-select,
body.programme-modal-open .programme-modal-standard textarea,
body.programme-modal-open .programme-standard-modal textarea {
    font-size: 0.84rem !important;
    line-height: 1.35;
}

.programme-modal-standard,
.programme-standard-modal {
    --programme-label-font-size: 0.84rem;
    --programme-muted-font-size: 0.68rem;
    filter: none !important;
    opacity: 1 !important;
    z-index: 1090;
}

.programme-modal-standard .modal-dialog,
.programme-standard-modal .modal-dialog {
    height: auto !important;
    margin: 1.75rem auto;
    max-width: min(560px, calc(100vw - 1.5rem)) !important;
    opacity: 1 !important;
    transform: none !important;
    width: min(560px, calc(100vw - 1.5rem)) !important;
    filter: none !important;
}

.programme-modal-standard .modal-content,
.programme-standard-modal .modal-content,
.programme-modal-standard .modal-body,
.programme-standard-modal .modal-body,
.programme-modal-standard .modal-header,
.programme-standard-modal .modal-header,
.programme-modal-standard .modal-footer,
.programme-standard-modal .modal-footer,
.programme-modal-standard form,
.programme-standard-modal form {
    filter: none !important;
    opacity: 1 !important;
}

.programme-modal-standard .modal-content,
.programme-standard-modal .modal-content {
    background-color: #fff !important;
    border: 1px solid rgba(15, 23, 42, 0.08) !important;
    border-radius: 8px;
    box-shadow: 0 18px 60px rgba(15, 23, 42, 0.18) !important;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 3rem);
    min-height: 0;
    overflow: hidden;
}

.programme-modal-standard form,
.programme-standard-modal form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    width: 100%;
}

.programme-modal-standard .modal-body,
.programme-standard-modal .modal-body {
    background-color: #fff !important;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

/* Manage Assessment Questions modals (Create Question, Update Assessment):
   this page does not toggle `body.programme-modal-open`, so the constrained-
   height rules above can be beaten by Bootstrap's own
   `.modal-dialog-scrollable .modal-content`. Pin the flex-column + scrolling-
   body layout here with the id so a tall form scrolls inside the modal
   instead of pushing the Save buttons off-screen -- the same behaviour as the
   Create Mainskill modal on the programme pages. */
#create_quiz_popup .modal-content,
#update_assessment_modal .modal-content {
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 3rem);
    min-height: 0;
    overflow: hidden;
}

#create_quiz_popup #question_form,
#update_assessment_modal #assessment_form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
}

#create_quiz_popup .modal-body,
#update_assessment_modal .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
}

/* Create Question holds several questions with long answer options, so the
   standard 560px cap squeezed the options and showed little per scroll.
   Widen it and let it use more of the viewport height. */
#create_quiz_popup .modal-dialog {
    max-width: min(960px, calc(100vw - 2rem)) !important;
    width: min(960px, calc(100vw - 2rem)) !important;
    margin: 1rem auto;
}

#create_quiz_popup .modal-content {
    max-height: calc(100vh - 2rem);
}

/* Give the dynamic-form editor enough room for its field configuration panels. */
.dynamic-form-editor-modal .modal-dialog {
    max-width: min(960px, calc(100vw - 1.5rem)) !important;
    width: min(960px, calc(100vw - 1.5rem)) !important;
}

.dynamic-form-editor-modal .modal-content {
    max-height: calc(100vh - 2rem);
}

.dynamic-form-editor-modal .programme-create-modal-scroll-body {
    max-height: calc(100vh - 7rem);
}

@media (max-width: 767.98px) {
    .dynamic-form-editor-modal .modal-dialog {
        max-width: calc(100vw - 1rem) !important;
        width: calc(100vw - 1rem) !important;
        margin: 0.5rem auto;
    }

    .dynamic-form-editor-modal .modal-content {
        max-height: calc(100vh - 1rem);
    }
}

.programme-modal-standard .modal-header,
.programme-standard-modal .modal-header {
    align-items: center;
    background: var(--primary-color) !important;
    background-image: none !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
    color: #fff !important;
    padding: 1rem !important;
}

.programme-modal-standard .modal-header > .modal-title,
.programme-standard-modal .modal-header > .modal-title,
.programme-modal-standard .modal-header > h1,
.programme-standard-modal .modal-header > h1,
.programme-modal-standard .modal-header > h2,
.programme-standard-modal .modal-header > h2,
.programme-modal-standard .modal-header > h3,
.programme-standard-modal .modal-header > h3,
.programme-modal-standard .modal-header > h4,
.programme-standard-modal .modal-header > h4,
.programme-modal-standard .modal-header > h5,
.programme-standard-modal .modal-header > h5,
.programme-modal-standard .modal-header > h6,
.programme-standard-modal .modal-header > h6 {
    color: #fff !important;
    font-size: 0.95rem !important;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 !important;
}

.programme-modal-standard .modal-header > .modal-title-standard,
.programme-standard-modal .modal-header > .modal-title-standard,
.modal-header.modal-header-standard > .modal-title-standard {
    color: #fff !important;
    font-family: inherit;
    font-size: 0.95rem !important;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 !important;
}

.programme-modal-standard .modal-header .text-dark,
.programme-standard-modal .modal-header .text-dark,
.programme-modal-standard .modal-header .fa-times,
.programme-standard-modal .modal-header .fa-times {
    color: #fff !important;
    font-size: 1rem !important;
    line-height: 1;
}

.programme-modal-standard .modal-header .btn-close,
.programme-standard-modal .modal-header .btn-close,
.programme-modal-standard .modal-header .modal-close-standard,
.programme-standard-modal .modal-header .modal-close-standard,
.modal-header.modal-header-standard .btn-close,
.modal-header.modal-header-standard .modal-close-standard {
    filter: brightness(0) invert(1);
    opacity: 1;
}

#add_curriculum_popup .modal-header > button[data-bs-dismiss="modal"],
#add_curriculum_popup .modal-header > i.fa-times[data-bs-dismiss="modal"] {
    align-items: center;
    display: inline-flex;
    /* Cross halved from 1.8rem / 2.1rem at the user's request. */
    font-size: 0.9rem !important;
    height: 1.05rem;
    justify-content: center;
    line-height: 1;
    min-width: 1.05rem;
    padding: 0;
}

#add_curriculum_popup .modal-header > button.btn-close[data-bs-dismiss="modal"] {
    /* .btn-close draws its X from a background SVG sized in em, so the halved
       font-size above already halves the glyph; keep the SVG in step and let
       the small Bootstrap padding utility (p-1) set the hit area. */
    background-size: 0.9rem;
    width: 0.9rem;
}

.programme-modal-standard .modal-footer,
.programme-standard-modal .modal-footer {
    background-color: #fff !important;
    border-top: 0 !important;
    flex-shrink: 0;
    margin-top: 0 !important;
    padding: 1rem !important;
}

/* The Edit Course modal uses filled secondary buttons; keep both action
   labels readable against their backgrounds. */
#editCourseModal .modal-footer .btn {
    background-color: var(--secondary-color) !important;
    border-color: var(--secondary-color) !important;
    color: #fff !important;
}

/* Keep Edit Course footer labels white even when a tenant theme applies a
   higher-priority text rule to generic Bootstrap buttons. */
#editCourseModal .modal-footer .edit-course-modal-action,
#course_action_modal.course-action-edit-modal .modal-footer .edit-course-modal-action,
#editCourseModal .modal-footer .edit-course-modal-action:hover,
#editCourseModal .modal-footer .edit-course-modal-action:focus,
#editCourseModal .modal-footer .edit-course-modal-action:active,
#course_action_modal.course-action-edit-modal .modal-footer .edit-course-modal-action:hover,
#course_action_modal.course-action-edit-modal .modal-footer .edit-course-modal-action:focus,
#course_action_modal.course-action-edit-modal .modal-footer .edit-course-modal-action:active {
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
}

/* Keep both actions visible in the Add User modal after a save attempt. */
#system_add_user_modal .modal-footer {
    align-items: center;
    display: flex !important;
    gap: 0.5rem;
    justify-content: flex-end;
}

#system_add_user_modal #system_add_user_save {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Keep the edit action visible while Vue toggles its loading state. */
#editUserModal .user-edit-submit {
    display: inline-flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.programme-modal-standard .modal-header.modal-header-standard,
.modal-header.modal-header-standard {
    align-items: center;
    padding: 1rem !important;
}

.programme-modal-standard .modal-header.modal-header-standard .btn-close,
.modal-header.modal-header-standard .btn-close {
    opacity: 1 !important;
}

/* Keep Add Content header proportions aligned with the AI assessment header. */
#upload_content_popup .modal-header.modal-header-standard {
    align-items: center;
    padding: 1rem !important;
}

#upload_content_popup .modal-header.modal-header-standard > h1 {
    color: #fff !important;
    font-size: 0.95rem !important;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 !important;
}

#upload_content_popup .modal-header.modal-header-standard .btn-close {
    opacity: 1 !important;
}

.programme-modal-standard label,
.programme-standard-modal label,
.programme-modal-standard .form-label,
.programme-standard-modal .form-label,
.programme-modal-standard .labels,
.programme-standard-modal .labels,
.programme-modal-standard .form-check-label,
.programme-standard-modal .form-check-label {
    font-size: 0.84rem !important;
    font-weight: 600;
    line-height: 1.35;
}

.programme-modal-standard .programme-label-bold,
.programme-standard-modal .programme-label-bold {
    font-size: var(--programme-label-font-size) !important;
    font-weight: 600;
    line-height: 1.3;
}

.programme-modal-standard .programme-text-muted,
.programme-standard-modal .programme-text-muted,
.programme-modal-standard .form-text,
.programme-standard-modal .form-text,
.programme-modal-standard small,
.programme-standard-modal small,
.programme-modal-standard .text-muted,
.programme-standard-modal .text-muted {
    color: #6c757d !important;
    font-size: var(--programme-muted-font-size) !important;
    line-height: 1.25;
}

.programme-modal-standard .text-xs,
.programme-standard-modal .text-xs {
    font-size: 0.84rem !important;
    line-height: 1.35;
}

.programme-modal-standard .programme-modal-intro-copy,
.programme-standard-modal .programme-modal-intro-copy {
    font-size: 0.84rem !important;
    line-height: 1.4;
}

.programme-modal-standard .programme-modal-intro-copy h6,
.programme-standard-modal .programme-modal-intro-copy h6,
.programme-modal-standard .programme-modal-intro-copy li,
.programme-standard-modal .programme-modal-intro-copy li {
    font-size: 0.84rem !important;
    line-height: 1.4;
}

.programme-modal-standard .programme-modal-intro-copy strong,
.programme-standard-modal .programme-modal-intro-copy strong,
.programme-modal-standard .programme-modal-intro-copy .programme-label-bold,
.programme-standard-modal .programme-modal-intro-copy .programme-label-bold {
    font-size: inherit !important;
    line-height: inherit !important;
    font-weight: 700 !important;
}

.programme-modal-standard .invalid-feedback,
.programme-standard-modal .invalid-feedback,
.programme-modal-standard .profile-invalid-feedback,
.programme-standard-modal .profile-invalid-feedback {
    font-size: 0.84rem !important;
    line-height: 1.25;
}

.programme-modal-standard .btn,
.programme-standard-modal .btn,
.programme-modal-standard .btn-sm,
.programme-standard-modal .btn-sm,
.programme-modal-standard .form-control,
.programme-standard-modal .form-control,
.programme-modal-standard .form-select,
.programme-standard-modal .form-select,
.programme-modal-standard textarea,
.programme-standard-modal textarea {
    font-size: 0.84rem !important;
    line-height: 1.35;
}

/* Keep the applicant profile modal flat and page-like instead of nested card scroll areas. */
body #initial_profile_modal.applicant-profile-modal .modal-dialog,
body.programme-modal-open .applicant-profile-modal .modal-dialog {
    height: 100vh !important;
    margin: 0 !important;
    max-width: 100vw !important;
    width: 100vw !important;
}

body #initial_profile_modal.applicant-profile-modal .modal-content,
body.programme-modal-open .applicant-profile-modal .modal-content {
    display: flex;
    flex-direction: column;
    border-radius: 0 !important;
    height: 100vh;
    max-height: 100vh;
    min-height: 0;
    overflow: hidden;
    background-color: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 18px 60px rgba(15, 23, 42, 0.18);
}

body #initial_profile_modal.applicant-profile-modal .modal-body,
body #initial_profile_modal.applicant-profile-modal .applicant-profile-modal-body,
body.programme-modal-open .applicant-profile-modal .modal-body,
body.programme-modal-open .applicant-profile-modal .applicant-profile-modal-body {
    flex: 1 1 auto;
    min-height: 0;
    max-height: none !important;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 1.25rem clamp(1rem, 2.2vw, 2.5rem) 1.5rem;
}

body #initial_profile_modal.applicant-profile-modal .modal-footer,
body.programme-modal-open .applicant-profile-modal .modal-footer {
    position: static;
    z-index: auto;
    margin-top: 1rem !important;
    background: transparent !important;
    box-shadow: none;
    border-top: 0 !important;
    padding: 0 !important;
}

body #initial_profile_modal.applicant-profile-modal .applicant-profile-form-actions {
    align-items: center;
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-bottom: 1.5rem;
}

body #initial_profile_modal.applicant-profile-modal .tab-content,
body #initial_profile_modal.applicant-profile-modal .tab-pane,
body #initial_profile_modal.applicant-profile-modal #profile_form,
body #initial_profile_modal.applicant-profile-modal #learner-dashboard-app,
body #initial_profile_modal.applicant-profile-modal .ld-carousel-wrapper {
    width: 100%;
    max-width: none;
}

body #initial_profile_modal.applicant-profile-modal .ld-carousel-wrapper {
    margin: 0;
    padding: 0;
}

body #initial_profile_modal.applicant-profile-modal #learner-dashboard-app .bg-transparent.p-0.overflow-auto.hide-survey-scrollbar.rounded-3.shadow-sm.border.border-1.max-height-600,
body #initial_profile_modal.applicant-profile-modal #learner-dashboard-app .border.rounded.p-3.mb-4.bg-light.max-height-800.overflow-y-auto,
body #initial_profile_modal.applicant-profile-modal #learner-dashboard-app .overflow-y-auto.max-height-350 {
    max-height: none !important;
    overflow: visible !important;
}

body #initial_profile_modal.applicant-profile-modal .programme-modal-intro-copy {
    max-width: none;
}

body #initial_profile_modal.applicant-profile-modal .modal-body {
    padding-top: 0.75rem;
}

body #initial_profile_modal.applicant-profile-modal .modal-body > .card {
    margin-bottom: 0.5rem !important;
}

body #initial_profile_modal.applicant-profile-modal .programme-modal-intro-copy.card-body {
    padding: 0.6rem 0.8rem !important;
}

body #initial_profile_modal.applicant-profile-modal .programme-modal-intro-copy h6 {
    font-size: 0.88rem;
    line-height: 1.2;
    margin-bottom: 0.2rem !important;
}

body #initial_profile_modal.applicant-profile-modal .programme-modal-intro-copy p {
    font-size: 0.78rem;
    line-height: 1.25;
}

body #initial_profile_modal.applicant-profile-modal .ld-steps {
    gap: 0.4rem;
    padding: 0 0 0.35rem;
    width: 100%;
    border-bottom-width: 1px;
}

body #initial_profile_modal.applicant-profile-modal .ld-step {
    flex-direction: row;
    gap: 0.35rem;
    padding: 0 0.35rem;
}

body #initial_profile_modal.applicant-profile-modal .ld-step-num {
    width: 1.45rem;
    height: 1.45rem;
    font-size: 0.78rem;
}

body #initial_profile_modal.applicant-profile-modal .ld-step-title {
    margin-top: 0;
    font-size: 0.82rem;
    line-height: 1.15;
}

body #initial_profile_modal.applicant-profile-modal .ld-forms-carousel {
    gap: 0.5rem;
    padding-top: 0.6rem;
}

body #initial_profile_modal.applicant-profile-modal .ld-form-slide.mb-5 {
    margin-bottom: 1rem !important;
}

body #initial_profile_modal.applicant-profile-modal #learner-dashboard-app .border.rounded.p-3.mb-4.bg-light.max-height-800.overflow-y-auto {
    margin-bottom: 0.75rem !important;
    padding: 0.7rem !important;
}

body #initial_profile_modal.applicant-profile-modal #learner-dashboard-app .row.g-3 {
    --bs-gutter-y: 0.55rem;
}

body #initial_profile_modal.applicant-profile-modal #learner-dashboard-app .row.mb-3 {
    margin-bottom: 0.45rem !important;
}

body #initial_profile_modal.applicant-profile-modal #learner-dashboard-app .row.mb-3 .d-flex.justify-content-between.align-items-center.mb-2.border-bottom.pb-1.text-dark {
    margin-bottom: 0.35rem !important;
    padding-bottom: 0.35rem !important;
}

body #initial_profile_modal.applicant-profile-modal #learner-dashboard-app .row.mb-3 h5 {
    font-size: 1.05rem;
    line-height: 1.15;
}

body #initial_profile_modal.applicant-profile-modal #learner-dashboard-app .mb-2.p-2.rounded.bg-transparent {
    margin-bottom: 0.45rem !important;
    padding: 0.25rem 0 !important;
}

body #initial_profile_modal.applicant-profile-modal #learner-dashboard-app .form-label {
    margin-bottom: 0.18rem !important;
    font-size: 0.84rem !important;
    line-height: 1.2;
}

body #initial_profile_modal.applicant-profile-modal #learner-dashboard-app .text-muted.small.mb-2 {
    margin-bottom: 0.35rem !important;
    line-height: 1.25;
}

body #initial_profile_modal.applicant-profile-modal #learner-dashboard-app .form-control:not(textarea),
body #initial_profile_modal.applicant-profile-modal #learner-dashboard-app .form-select {
    min-height: 2.15rem;
    padding-top: 0.38rem;
    padding-bottom: 0.38rem;
}

body #initial_profile_modal.applicant-profile-modal #learner-dashboard-app textarea.form-control {
    min-height: 4.5rem;
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.view-applicant-profile-page #learner-dashboard-app.applicant-profile-layout {
    width: 100%;
    max-height: none;
    overflow: visible;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.view-applicant-profile-page #learner-dashboard-app.applicant-profile-layout .bg-transparent.p-0.overflow-auto.hide-survey-scrollbar.rounded-3.shadow-sm.border.border-1.max-height-600,
.view-applicant-profile-page #learner-dashboard-app.applicant-profile-layout .border.rounded.p-3.mb-4.bg-light.max-height-800.overflow-y-auto,
.view-applicant-profile-page #learner-dashboard-app.applicant-profile-layout .overflow-y-auto.max-height-350 {
    max-height: none !important;
    overflow: visible !important;
}

.view-applicant-profile-page #learner-dashboard-app.applicant-profile-layout .bg-transparent.p-0.overflow-auto.hide-survey-scrollbar.rounded-3.shadow-sm.border.border-1.max-height-600 {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.view-applicant-profile-page #learner-dashboard-app.applicant-profile-layout .border.rounded.p-3.mb-4.bg-light.max-height-800.overflow-y-auto {
    margin-bottom: 1.5rem !important;
    padding: 0 0 1.25rem !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(34, 197, 94, 0.35) !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.view-applicant-profile-page #learner-dashboard-app.applicant-profile-layout .row.mb-3 {
    margin-bottom: 1rem !important;
}

.view-applicant-profile-page #learner-dashboard-app.applicant-profile-layout .row.mb-3 .d-flex.justify-content-between.align-items-center.mb-2.border-bottom.pb-1.text-dark {
    display: flex !important;
    flex-direction: column;
    align-items: flex-start !important;
    gap: 0.15rem;
    width: 100%;
    margin-bottom: 0 !important;
    padding-bottom: 0.35rem !important;
    border-bottom: 1px solid rgba(34, 197, 94, 0.55) !important;
}

.view-applicant-profile-page #learner-dashboard-app.applicant-profile-layout .row.mb-3 .d-flex.justify-content-between.align-items-center.mb-2.border-bottom.pb-1.text-dark h5 {
    margin: 0 !important;
    font-size: 0.95rem;
    font-weight: 700 !important;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.view-applicant-profile-page #learner-dashboard-app.applicant-profile-layout .row.mb-3 .d-flex.justify-content-between.align-items-center.mb-2.border-bottom.pb-1.text-dark .text-muted.ms-3 {
    margin-left: 0 !important;
    font-size: 0.8rem !important;
    font-weight: 400 !important;
}

.view-applicant-profile-page #learner-dashboard-app.applicant-profile-layout .mb-2.p-2.rounded.bg-transparent {
    padding: 0 !important;
    margin-bottom: 1.25rem !important;
    border: 0 !important;
    background: transparent !important;
}

.view-applicant-profile-page #learner-dashboard-app.applicant-profile-layout .form-label {
    margin-bottom: 0.35rem;
    font-size: 0.92rem !important;
    font-weight: 500 !important;
    color: #1f2937 !important;
}

.view-applicant-profile-page #learner-dashboard-app.applicant-profile-layout .form-control:not(textarea):not([type="file"]),
.view-applicant-profile-page #learner-dashboard-app.applicant-profile-layout .form-select {
    min-height: 2.55rem;
    border-radius: 999px;
    border: 1px solid #cfd6df;
    background-color: #fff;
    box-shadow: none;
    padding: 0.55rem 1rem;
}

.view-applicant-profile-page #learner-dashboard-app.applicant-profile-layout textarea.form-control {
    border-radius: 1rem;
    border: 1px solid #cfd6df;
    background-color: #fff;
    box-shadow: none;
    padding: 0.75rem 1rem;
}

.view-applicant-profile-page #learner-dashboard-app.applicant-profile-layout .form-check {
    margin-bottom: 0.35rem;
}

.view-applicant-profile-page #learner-dashboard-app.applicant-profile-layout .form-check-input {
    margin-top: 0.2rem;
}

.view-applicant-profile-page #learner-dashboard-app.applicant-profile-layout .form-check-label {
    font-weight: 400 !important;
}

.view-applicant-profile-page #learner-dashboard-app.applicant-profile-layout .d-flex.flex-wrap.gap-3 {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 0.25rem !important;
}

.view-applicant-profile-page #learner-dashboard-app.applicant-profile-layout .contact-methods-field .row.g-2 > [class*="col-"] {
    flex: 0 0 100%;
    max-width: 100%;
}

.global-access-modal.programme-modal-standard .modal-header,
.global-access-modal.programme-standard-modal .modal-header {
    background: #000 !important;
    background-image: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    color: #fff !important;
    padding: 0.95rem 1rem !important;
}

.global-access-modal.programme-modal-standard .modal-header > .modal-title,
.global-access-modal.programme-standard-modal .modal-header > .modal-title,
.global-access-modal.programme-modal-standard .modal-header > h1,
.global-access-modal.programme-standard-modal .modal-header > h1,
.global-access-modal.programme-modal-standard .modal-header > h2,
.global-access-modal.programme-standard-modal .modal-header > h2,
.global-access-modal.programme-modal-standard .modal-header > h3,
.global-access-modal.programme-standard-modal .modal-header > h3,
.global-access-modal.programme-modal-standard .modal-header > h4,
.global-access-modal.programme-standard-modal .modal-header > h4,
.global-access-modal.programme-modal-standard .modal-header > h5,
.global-access-modal.programme-standard-modal .modal-header > h5,
.global-access-modal.programme-modal-standard .modal-header > h6,
.global-access-modal.programme-standard-modal .modal-header > h6 {
    color: #fff !important;
    font-size: 0.95rem !important;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 !important;
    min-width: 0;
}

.global-access-modal.programme-modal-standard .modal-header .fa-times,
.global-access-modal.programme-standard-modal .modal-header .fa-times,
.global-access-modal.programme-modal-standard .modal-header .btn-close,
.global-access-modal.programme-standard-modal .modal-header .btn-close {
    align-items: center;
    color: #fff !important;
    display: inline-flex;
    font-size: 1.35rem !important;
    height: 1.8rem;
    justify-content: center;
    line-height: 1;
    min-width: 1.8rem;
    opacity: 1;
    padding: 0;
    cursor: pointer;
    width: 1.8rem;
}

.global-access-modal .modal-body {
    gap: 1.25rem;
}

.global-access-modal .global-access-intro {
    border-left: 3px solid rgba(148, 163, 184, 0.22);
    padding-left: 1rem;
}

.global-access-modal .global-access-intro .text-xs {
    color: #6b7280 !important;
    line-height: 1.45;
}

.global-access-modal .global-access-intro ul {
    margin-bottom: 0;
    margin-top: 0.35rem;
    padding-left: 1.15rem;
}

.global-access-modal .global-access-intro li + li {
    margin-top: 0.15rem;
}

/* "Global settings for: <course>" modal - make-course-public confirmation. */
.global-programme-settings-modal .course-public-warning {
    background: #f6f7f8;
    border: 1px solid #e6e6e6;
    border-left: 4px solid #b6b6b6;
    border-radius: 8px;
    padding: 0.85rem 1rem;
    font-size: 0.8rem;
    line-height: 1.5;
    color: #374151;
}

.global-access-modal .global-access-type-row {
    color: #111827;
    font-size: 0.84rem;
    line-height: 1.35;
}

.global-access-modal .global-access-type-row .course_type_name_display {
    font-weight: 600;
    margin-left: 0.25rem;
}

.global-access-modal .global-access-toggle-row {
    display: flex;
    align-items: center;
}

.global-access-modal .modal-footer.global-access-modal-footer {
    padding: 0 1rem 1rem !important;
}

@media (max-width: 575.98px) {
    .global-access-modal.programme-modal-standard .modal-header,
    .global-access-modal.programme-standard-modal .modal-header {
        padding: 0.85rem 0.9rem !important;
    }

    .global-access-modal.programme-modal-standard .modal-header > .modal-title,
    .global-access-modal.programme-standard-modal .modal-header > .modal-title,
    .global-access-modal.programme-modal-standard .modal-header > h1,
    .global-access-modal.programme-standard-modal .modal-header > h1,
    .global-access-modal.programme-modal-standard .modal-header > h2,
    .global-access-modal.programme-standard-modal .modal-header > h2,
    .global-access-modal.programme-modal-standard .modal-header > h3,
    .global-access-modal.programme-standard-modal .modal-header > h3,
    .global-access-modal.programme-modal-standard .modal-header > h4,
    .global-access-modal.programme-standard-modal .modal-header > h4,
    .global-access-modal.programme-modal-standard .modal-header > h5,
    .global-access-modal.programme-standard-modal .modal-header > h5,
    .global-access-modal.programme-modal-standard .modal-header > h6,
    .global-access-modal.programme-standard-modal .modal-header > h6 {
        font-size: 0.9rem !important;
    }

    .global-access-modal .modal-body {
        gap: 1rem;
    }

    .global-access-modal .modal-footer.global-access-modal-footer {
        padding: 0 0.9rem 0.9rem !important;
    }
}

body.programme-modal-open #create_pop_up_model .modal-dialog {
    max-width: 560px;
    margin: 1.75rem auto;
}

#create_pop_up_model .modal-body,
#create_pop_up_model .modal-header,
#create_pop_up_model .modal-footer,
#create_pop_up_model form {
    opacity: 1 !important;
    filter: none !important;
}

#popUpModel {
    z-index: 1085 !important;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    padding-right: 0 !important;
}

#popUpModel .modal-dialog,
#popUpModel .modal-content,
#popUpModel .modal-body,
#popUpModel .modal-header,
#popUpModel .modal-footer,
#popUpModel form {
    position: relative;
    z-index: 1086 !important;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
}

body.programme-modal-open #popUpModel {
    opacity: 1 !important;
    filter: none !important;
}

body.programme-modal-open #popUpModel .modal-dialog {
    max-width: 560px;
    margin: 1.75rem auto;
}

body.programme-modal-open #profileModal {
    z-index: 1090 !important;
    opacity: 1 !important;
    filter: none !important;
}

body.programme-modal-open #profileModal .modal-dialog {
    position: relative;
    z-index: 1091 !important;
}

body.programme-modal-open #profileModal .modal-content,
body.programme-modal-open #profileModal .modal-body,
body.programme-modal-open #profileModal .modal-header,
body.programme-modal-open #profileModal .modal-footer,
body.programme-modal-open #profileModal form {
    opacity: 1 !important;
    filter: none !important;
}

/* Keep the Add User modal fully bright above any faded backdrop layer. */
body.modal-open #createUserModal {
    z-index: 1090 !important;
    opacity: 1 !important;
    filter: none !important;
}

body.modal-open #createUserModal .modal-dialog {
    position: relative;
    z-index: 1091 !important;
    opacity: 1 !important;
    filter: none !important;
}

body.modal-open #createUserModal .modal-content,
body.modal-open #createUserModal .modal-body,
body.modal-open #createUserModal .modal-header,
body.modal-open #createUserModal .modal-footer,
body.modal-open #createUserModal form {
    opacity: 1 !important;
    filter: none !important;
}

/* Keep the warehouse modals above both the backdrop and the page loader. */
body.modal-open #upload_files_modal,
body.modal-open #view_file_modal,
body.modal-open #update_files_modal,
body.modal-open #create_folder_modal,
body.modal-open #arrange_files_modal {
    position: fixed;
    inset: 0;
    z-index: 10060 !important;
    opacity: 1 !important;
    filter: none !important;
    pointer-events: auto !important;
    transform: none !important;
}

body.modal-open #upload_files_modal .modal-dialog,
body.modal-open #view_file_modal .modal-dialog,
body.modal-open #update_files_modal .modal-dialog,
body.modal-open #create_folder_modal .modal-dialog,
body.modal-open #arrange_files_modal .modal-dialog {
    position: relative;
    z-index: 10061 !important;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    pointer-events: auto !important;
}

body.modal-open #upload_files_modal .modal-content,
body.modal-open #upload_files_modal .modal-body,
body.modal-open #upload_files_modal .modal-header,
body.modal-open #upload_files_modal .modal-footer,
body.modal-open #upload_files_modal form,
body.modal-open #view_file_modal .modal-content,
body.modal-open #view_file_modal .modal-body,
body.modal-open #view_file_modal .modal-header,
body.modal-open #view_file_modal .modal-footer,
body.modal-open #view_file_modal form,
body.modal-open #update_files_modal .modal-content,
body.modal-open #update_files_modal .modal-body,
body.modal-open #update_files_modal .modal-header,
body.modal-open #update_files_modal .modal-footer,
body.modal-open #update_files_modal form,
body.modal-open #create_folder_modal .modal-content,
body.modal-open #create_folder_modal .modal-body,
body.modal-open #create_folder_modal .modal-header,
body.modal-open #create_folder_modal .modal-footer,
body.modal-open #create_folder_modal form,
body.modal-open #arrange_files_modal .modal-content,
body.modal-open #arrange_files_modal .modal-body,
body.modal-open #arrange_files_modal .modal-header,
body.modal-open #arrange_files_modal .modal-footer,
body.modal-open #arrange_files_modal form {
    opacity: 1 !important;
    filter: none !important;
    pointer-events: auto !important;
}

body.modal-open #upload_files_modal .modal-content,
body.modal-open #view_file_modal .modal-content,
body.modal-open #update_files_modal .modal-content,
body.modal-open #create_folder_modal .modal-content,
body.modal-open #arrange_files_modal .modal-content {
    position: relative;
    z-index: 10062 !important;
    background-color: #fff !important;
}

body.modal-open #upload_files_modal .modal-body,
body.modal-open #upload_files_modal .modal-footer,
body.modal-open #view_file_modal .modal-body,
body.modal-open #view_file_modal .modal-footer,
body.modal-open #update_files_modal .modal-body,
body.modal-open #update_files_modal .modal-footer,
body.modal-open #create_folder_modal .modal-body,
body.modal-open #create_folder_modal .modal-footer,
body.modal-open #arrange_files_modal .modal-body,
body.modal-open #arrange_files_modal .modal-footer {
    background-color: #fff !important;
}

.programme-details-solid-modal {
    z-index: 1085 !important;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
    padding-right: 0 !important;
}

.swal2-container {
    z-index: 20000 !important;
}

.programme-details-solid-modal .modal-dialog,
.programme-details-solid-modal .modal-content,
.programme-details-solid-modal .modal-body,
.programme-details-solid-modal .modal-header,
.programme-details-solid-modal .modal-footer,
.programme-details-solid-modal form {
    position: relative;
    z-index: 1086 !important;
    opacity: 1 !important;
    filter: none !important;
    transform: none !important;
}

body.programme-modal-open .programme-details-solid-modal {
    opacity: 1 !important;
    filter: none !important;
}

#programme-store-modal .programme-store-dialog {
    max-width: 720px;
}

#programme-store-modal .programme-store-modal-content {
    border: 0;
    border-radius: 10px;
    box-shadow: 0 18px 45px rgba(14, 23, 38, 0.22);
    overflow: hidden;
}

#programme-store-modal .programme-store-modal-header {
    background: var(--primary-color);
    border: 0;
    color: #fff;
    padding: 0.8rem 1rem;
}

#programme-store-modal .modal-title {
    color: #fff;
    font-size: 0.94rem;
    font-weight: 700;
    letter-spacing: 0;
}

#programme-store-modal .programme-store-title-icon {
    align-items: center;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 7px;
    display: inline-flex;
    height: 26px;
    justify-content: center;
    width: 26px;
}

#programme-store-modal .programme-store-title-icon i {
    color: #fff;
    font-size: 1rem;
}

#programme-store-modal .programme-store-modal-close {
    align-items: center;
    background: rgba(0, 0, 0, 0.18);
    border: 0;
    border-radius: 999px;
    color: #fff;
    display: inline-flex;
    font-size: 1.1rem;
    height: 28px;
    justify-content: center;
    line-height: 1;
    padding: 0;
    width: 28px;
}

#programme-store-modal .programme-store-modal-close:hover {
    background: rgba(0, 0, 0, 0.3);
}

#programme-store-modal .modal-body {
    padding: 1rem;
}

#programme-store-modal .programme-store-programme-field .form-control,
#programme-store-modal .programme-store-row-fields .form-control {
    border: 1px solid #d8dee8;
    border-radius: 8px;
    min-height: 36px;
}

#programme-store-modal .programme-store-programme-field .form-control:disabled {
    background: #eef1f5;
    color: #2d3748;
    opacity: 1;
}

#programme-store-modal .dealer_dropdown_searchable {
    border-color: #d8dee8;
    border-radius: 8px;
    margin-bottom: 0.55rem;
}

#programme-store-modal .add-new-store-toggle {
    align-items: center;
    background: #fff;
    border: 1px solid var(--primary-color);
    border-radius: 999px;
    color: var(--primary-color);
    display: inline-flex;
    font-size: 0.68rem;
    font-weight: 700;
    gap: 0.25rem;
    line-height: 1;
    padding: 0.42rem 0.7rem;
}

#programme-store-modal .add-new-store-toggle:hover {
    background: var(--primary-color);
    color: #fff;
}

#programme-store-modal .add-store-row,
#programme-store-modal .remove-store-row {
    align-items: center;
    border-radius: 999px;
    display: inline-flex;
    height: 30px;
    justify-content: center;
    margin-top: 0.15rem !important;
    padding: 0;
    width: 30px;
}

#programme-store-modal .add-store-row {
    background: #050505;
}

#programme-store-modal .remove-store-row {
    background: var(--primary-color);
}

#programme-store-modal .add-store-row i,
#programme-store-modal .remove-store-row i {
    background: transparent !important;
    color: #fff !important;
    font-size: 1rem;
    padding: 0 !important;
}

#programme-store-modal .manual-store-fields {
    background: #f8fafc;
    border: 1px solid #e1e7ef;
    border-radius: 8px;
    margin-left: 0;
    margin-right: 0;
    padding: 0.45rem;
}

#programme-store-modal .manual-store-help {
    color: #667085 !important;
    font-size: 0.68rem;
}

#programme-store-modal .use-existing-store-toggle {
    background: transparent;
    border: 0;
    color: var(--primary-color);
    font-size: 0.68rem;
    font-weight: 700;
    margin-left: 0.35rem;
    padding: 0;
}

#programme-store-modal .use-existing-store-toggle:hover {
    text-decoration: underline;
}

#programme-store-modal .programme-store-save-btn {
    background: #050505;
    border: 0;
    border-radius: 999px;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.55rem 0.85rem;
}

#programme-store-modal .programme-store-save-btn:hover {
    background: var(--primary-color);
}

#programme-recruitment-adverts-card {
    border: 1.5px solid rgb(99 102 241 / 30%);
    border-radius: 16px;
}

#programme-recruitment-adverts-list.programme-recruitment-adverts-grid {
    align-items: start;
    display: grid;
    gap: 1.1rem;
    grid-template-columns: repeat(1, minmax(0, 1fr));
}

#programme-recruitment-adverts-list.programme-recruitment-adverts-grid.is-starting {
    grid-template-columns: minmax(0, 1fr);
}

#programme-recruitment-adverts-list.programme-recruitment-adverts-grid.is-template-browser {
    grid-template-columns: minmax(0, 1fr);
}

.programme-recruitment-start-panel {
    display: grid;
    gap: 1.35rem;
    width: 100%;
}

.programme-recruitment-start-header {
    align-items: center;
    background: #2f5590;
    border-radius: 8px;
    color: #fff;
    display: flex;
    justify-content: space-between;
    min-height: 4.8rem;
    padding: 1rem 1.3rem;
}

.programme-recruitment-start-header-copy {
    min-width: 0;
}

.programme-recruitment-start-header h3 {
    color: #fff;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.25;
    margin: 0;
}

.programme-recruitment-start-header p {
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.78rem;
    font-weight: 700;
    margin: 0.2rem 0 0;
}

.programme-recruitment-start-header-action {
    align-items: center;
    color: #2f5590;
    display: inline-flex;
    font-weight: 800;
    gap: 0.25rem;
    justify-content: center;
    white-space: nowrap;
}

.programme-recruitment-start-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(2, minmax(16rem, 22rem));
    justify-content: center;
}

.programme-recruitment-start-card {
    align-items: center;
    background: #fff;
    border: 1px solid #d7dce5;
    border-radius: 8px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
    min-height: 18rem;
    padding: 2rem 1.5rem;
    text-align: center;
    width: 100%;
}

.programme-recruitment-start-icon {
    align-items: center;
    background: #dbeafe;
    border-radius: 8px;
    color: #2f5590;
    display: inline-flex;
    font-size: 2rem;
    height: 4.4rem;
    justify-content: center;
    width: 4.4rem;
}

.programme-recruitment-start-card h3 {
    color: #0f172a;
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.25;
    margin: 0;
}

.programme-recruitment-start-card p {
    color: #334155;
    font-size: 0.82rem;
    font-weight: 600;
    line-height: 1.45;
    margin: 0;
    max-width: 18rem;
}

.programme-recruitment-start-card .programme-recruitment-start-action {
    font-weight: 800;
    margin-top: auto;
}

.programme-recruitment-template-browser-head {
    align-items: center;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    color: #1e3a8a;
    display: flex;
    font-size: 0.75rem;
    font-weight: 700;
    gap: 1rem;
    grid-column: 1 / -1;
    justify-content: space-between;
    justify-self: stretch;
    padding: 0.75rem 1rem;
}

/* Add/Edit/Use-template Advert wizard, embedded inline in
   #programme-recruitment-wizard-panel (programme_management_content.html). */
.recruitment-wizard-stepper { display: flex; align-items: center; flex-wrap: wrap; gap: 0; margin-bottom: 1.1rem; }
.recruitment-wizard-step { display: flex; align-items: center; gap: 0.4rem; font-size: 0.76rem; font-weight: 700; color: #9aa3b8; }
.recruitment-wizard-step-num { width: 1.5rem; height: 1.5rem; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 0.7rem; border: 1.5px solid #dfe4ee; color: #9aa3b8; flex-shrink: 0; }
.recruitment-wizard-step.is-done .recruitment-wizard-step-num { background: var(--btn-outline-primary-bg, #ecf0fb); border-color: var(--primary-color, #300067); color: var(--primary-color, #300067); }
.recruitment-wizard-step.is-active .recruitment-wizard-step-num { background: var(--primary-color, #300067); border-color: var(--primary-color, #300067); color: #fff; }
.recruitment-wizard-step.is-active { color: #10284d; }
.recruitment-wizard-step-rule { width: 1.8rem; height: 1px; background: #dfe4ee; margin: 0 0.6rem; }

.recruitment-pipeline-row { display: flex; align-items: stretch; gap: 0; overflow-x: auto; padding: 0.25rem 0.1rem 0.5rem; }
.recruitment-stage-card { width: 13rem; flex-shrink: 0; border: 1.5px solid #e7ecf6; border-radius: 0.7rem; padding: 0.65rem 0.7rem; background: #f8fbff; }
.recruitment-stage-card.is-default { background: #ecf0fb; }
.recruitment-stage-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 0.3rem; font-size: 0.62rem; font-weight: 700; color: #5f7190; text-transform: uppercase; }
.recruitment-stage-title { font-size: 0.78rem; font-weight: 700; color: #10284d; margin-bottom: 0.2rem; }
.recruitment-stage-meta { font-size: 0.66rem; color: #5f7190; line-height: 1.5; margin-bottom: 0.45rem; }
.recruitment-stage-footer { display: flex; justify-content: space-between; align-items: center; padding-top: 0.4rem; border-top: 1px solid #e7ecf6; font-size: 0.66rem; }
.recruitment-stage-footer a { cursor: pointer; }
.recruitment-add-step-card { width: 9rem; flex-shrink: 0; border: 1.5px dashed #c9d3e6; border-radius: 0.7rem; display: flex; align-items: center; justify-content: center; gap: 0.3rem; color: var(--primary-color, #300067); font-weight: 700; font-size: 0.74rem; cursor: pointer; margin-left: 0.5rem; }
.recruitment-add-step-card:hover { background: #ecf0fb; }
.recruitment-stage-chevron { width: 1.3rem; flex-shrink: 0; display: flex; align-items: center; justify-content: center; color: #b9c1d4; }

@media (width >= 768px) {
    #programme-recruitment-adverts-list.programme-recruitment-adverts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (width >= 1200px) {
    #programme-recruitment-adverts-list.programme-recruitment-adverts-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 767.98px) {
    .programme-recruitment-start-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.85rem;
    }

    .programme-recruitment-start-grid {
        grid-template-columns: minmax(0, 22rem);
    }
}

#programme-recruitment-adverts-card .programme-recruitment-advert-card {
    background: #fff;
    border: 1.5px solid rgb(99 102 241 / 52%) !important;
    border-radius: 16px;
    box-shadow: 0 8px 20px rgb(15 23 42 / 8%);
    display: flex;
    flex-direction: column;
    height: 31rem;
    min-height: 31rem;
    max-height: 31rem;
    overflow: hidden !important;
}

#programme-recruitment-adverts-card .programme-recruitment-advert-card .programme-recruitment-advert-card-body {
    gap: 0.85rem;
    height: 100%;
    min-height: 0;
    padding: 1.15rem;
}

#programme-recruitment-adverts-card .programme-recruitment-advert-name {
    color: #0f172a;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.2;
}

#programme-recruitment-adverts-card .programme-recruitment-advert-subtitle {
    color: #64748b;
    font-weight: 600;
}

#programme-recruitment-adverts-card .programme-recruitment-status-badge {
    border-radius: 999px;
    font-weight: 700;
    line-height: 1;
    padding: 0.35rem 0.55rem;
    text-transform: uppercase;
    white-space: nowrap;
}

#programme-recruitment-adverts-card .programme-recruitment-status-badge.is-recruiting {
    background: rgb(22 163 74 / 15%);
    color: #166534;
}

#programme-recruitment-adverts-card .programme-recruitment-status-badge.is-paused {
    background: rgb(148 163 184 / 20%);
    color: #334155;
}

#programme-recruitment-adverts-card .programme-recruitment-advert-details {
    border-top: 1px dashed rgb(148 163 184 / 52%);
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 0.05rem;
    margin-top: 0.1rem;
    min-height: 0;
    overflow: hidden;
    padding-top: 0.35rem;
}

#programme-recruitment-adverts-card .programme-recruitment-advert-detail-row {
    align-items: baseline;
    border-bottom: 1px solid rgb(148 163 184 / 44%);
    display: flex;
    gap: 0.55rem;
    justify-content: space-between;
    min-height: 1.85rem;
    padding: 0.28rem 0;
}

#programme-recruitment-adverts-card .programme-recruitment-advert-meta-label {
    color: #64748b;
    font-size: 0.64rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    text-transform: uppercase;
}

#programme-recruitment-adverts-card .programme-recruitment-advert-detail-value {
    color: #0f172a;
    font-size: 0.72rem;
    font-weight: 600;
    line-height: 1.3;
    max-width: 68%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#programme-recruitment-adverts-card .programme-recruitment-advert-detail-row.is-multiline {
    align-items: flex-start;
    flex: 1 1 auto;
    flex-direction: column;
    gap: 0.22rem;
    min-height: 0;
    overflow: hidden;
    padding-bottom: 0.4rem;
    padding-top: 0.42rem;
}

#programme-recruitment-adverts-card .programme-recruitment-advert-detail-row.is-multiline .programme-recruitment-advert-detail-value {
    color: #334155;
    display: block;
    font-size: 0.69rem;
    line-height: 1.35;
    max-width: 100%;
    min-height: 0;
    overflow: hidden;
    white-space: normal;
}

#programme-recruitment-adverts-card .programme-recruitment-advert-detail-row:last-child {
    border-bottom: 0;
}

#programme-recruitment-adverts-card .programme-recruitment-advert-detail-value.is-rich-text {
    flex: 1 1 auto;
    height: 100%;
    max-height: none;
    min-height: 0;
    overflow: auto;
    padding-right: 0.1rem;
}

#programme-recruitment-adverts-card .programme-recruitment-advert-detail-value.is-rich-text p {
    margin: 0 0 0.45rem;
}

#programme-recruitment-adverts-card .programme-recruitment-advert-detail-value.is-rich-text p:last-child {
    margin-bottom: 0;
}

#programme-recruitment-adverts-card .programme-recruitment-advert-detail-value.is-rich-text h1,
#programme-recruitment-adverts-card .programme-recruitment-advert-detail-value.is-rich-text h2,
#programme-recruitment-adverts-card .programme-recruitment-advert-detail-value.is-rich-text h3,
#programme-recruitment-adverts-card .programme-recruitment-advert-detail-value.is-rich-text h4,
#programme-recruitment-adverts-card .programme-recruitment-advert-detail-value.is-rich-text h5,
#programme-recruitment-adverts-card .programme-recruitment-advert-detail-value.is-rich-text h6 {
    color: #0f172a;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0.2rem 0 0.45rem;
}

#programme-recruitment-adverts-card .programme-recruitment-advert-detail-value.is-rich-text ul,
#programme-recruitment-adverts-card .programme-recruitment-advert-detail-value.is-rich-text ol {
    margin: 0.2rem 0 0.45rem 1rem;
    padding-left: 0.85rem;
}

#programme-recruitment-adverts-card .programme-recruitment-advert-detail-value.is-rich-text li {
    margin-bottom: 0.2rem;
}

#programme-recruitment-adverts-card .programme-recruitment-advert-detail-value.is-rich-text blockquote {
    border-left: 2px solid rgb(99 102 241 / 35%);
    color: #334155;
    margin: 0.25rem 0 0.5rem;
    padding-left: 0.55rem;
}

#programme-recruitment-adverts-card .programme-recruitment-advert-detail-value.is-rich-text a {
    color: #4338ca;
    text-decoration: underline;
}

#programme-recruitment-adverts-card .programme-recruitment-advert-action-row {
    margin-top: auto;
}

#programme-recruitment-adverts-card .programme-recruitment-advert-action-row .btn {
    color: #ffffff !important;
}

#programme-recruitment-adverts-card .programme-recruitment-apply-button {
    background: #111827;
    border-color: #111827;
    color: #ffffff !important;
    min-width: 6.45rem;
}

#programme-recruitment-adverts-card .programme-recruitment-view-more-button {
    background-color: var(--btn-outline-primary-bg, var(--primary-color));
    background-image: var(--btn-outline-primary-bg);
    background-repeat: no-repeat;
    background-size: cover;
    border: 1px solid transparent;
    color: #ffffff !important;
    min-width: 10.5rem;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
    transition: none;
}

#programme-recruitment-adverts-card .programme-recruitment-view-more-button:hover,
#programme-recruitment-adverts-card .programme-recruitment-view-more-button:focus,
#programme-recruitment-adverts-card .programme-recruitment-view-more-button:active {
    background-color: var(--btn-outline-primary-bg, var(--primary-color));
    background-image: var(--btn-outline-primary-bg);
    border-color: transparent;
    color: #ffffff !important;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
    transform: none;
}

#programme-recruitment-adverts-card .programme-recruitment-apply-button:hover,
#programme-recruitment-adverts-card .programme-recruitment-apply-button:focus,
#programme-recruitment-adverts-card .programme-recruitment-apply-button:active {
    color: #ffffff !important;
}

#programme-recruitment-adverts-card .programme-recruitment-manage-toggle {
    padding-left: 0.6rem;
    padding-right: 0.6rem;
}

#programme-recruitment-adverts-card .programme-recruitment-manage-dropdown .assessment-manage-menu {
    max-height: none !important;
    overflow: visible !important;
}

#programme-recruitment-adverts-card .programme-recruitment-advert-card.is-expanded {
    height: min(42rem, calc(88vh - 10rem));
    min-height: min(36rem, calc(88vh - 10rem));
    max-height: min(42rem, calc(88vh - 10rem));
    overflow: hidden !important;
}

#programme-recruitment-adverts-card .programme-recruitment-advert-card.is-expanded .programme-recruitment-advert-details {
    flex: 1 1 auto;
    overflow: hidden;
}

#programme-recruitment-adverts-card .programme-recruitment-advert-card.is-expanded .programme-recruitment-advert-detail-row.is-multiline {
    flex: 1 1 auto;
    overflow: hidden;
    position: relative;
}

#programme-recruitment-adverts-card .programme-recruitment-advert-card.is-expanded .programme-recruitment-advert-detail-value.is-rich-text {
    scrollbar-color: rgba(71, 85, 105, 0.75) rgba(226, 232, 240, 0.85);
    scrollbar-width: thin;
    height: 100%;
    max-height: none;
    overflow-x: hidden;
    overflow-y: auto;
    padding-bottom: 1.8rem;
    padding-right: 0.55rem;
}

#programme-recruitment-adverts-card .programme-recruitment-advert-card.is-expanded .programme-recruitment-advert-detail-value.is-rich-text::-webkit-scrollbar {
    width: 0.56rem;
}

#programme-recruitment-adverts-card .programme-recruitment-advert-card.is-expanded .programme-recruitment-advert-detail-value.is-rich-text::-webkit-scrollbar-track {
    background: rgba(226, 232, 240, 0.9);
    border-radius: 999px;
}

#programme-recruitment-adverts-card .programme-recruitment-advert-card.is-expanded .programme-recruitment-advert-detail-value.is-rich-text::-webkit-scrollbar-thumb {
    background: rgba(71, 85, 105, 0.78);
    border-radius: 999px;
}

#programme-recruitment-adverts-card .programme-recruitment-advert-card.is-expanded.has-scrollable-summary .programme-recruitment-advert-detail-row.is-multiline::before {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #ffffff 74%);
    bottom: 0;
    content: "";
    height: 2.8rem;
    left: 0;
    pointer-events: none;
    position: absolute;
    right: 0.7rem;
    z-index: 1;
}

#programme-recruitment-adverts-card .programme-recruitment-advert-card.is-expanded.has-scrollable-summary .programme-recruitment-advert-detail-row.is-multiline::after {
    background: rgba(15, 23, 42, 0.9);
    border-radius: 999px;
    bottom: 0.35rem;
    color: #ffffff;
    content: "Scroll for more";
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
    padding: 0.36rem 0.55rem;
    pointer-events: none;
    position: absolute;
    right: 0.8rem;
    z-index: 2;
}

#programme-recruitment-adverts-card .programme-recruitment-advert-card.is-expanded .programme-recruitment-advert-action-row {
    margin-top: 0.65rem;
}

@media (width < 576px) {
    #programme-recruitment-adverts-card .programme-recruitment-advert-card {
        height: auto;
        min-height: 0;
        max-height: none;
    }

    #programme-recruitment-adverts-card .programme-recruitment-advert-detail-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.12rem;
        padding-bottom: 0.36rem;
        padding-top: 0.36rem;
    }

    #programme-recruitment-adverts-card .programme-recruitment-advert-detail-value {
        max-width: 100%;
        white-space: normal;
    }

    #programme-recruitment-adverts-card .programme-recruitment-advert-action-row {
        align-items: stretch !important;
        flex-direction: column;
    }

    #programme-recruitment-adverts-card .programme-recruitment-advert-detail-value.is-rich-text {
        height: auto;
        max-height: 9rem;
    }

    #programme-recruitment-adverts-card .programme-recruitment-advert-action-row .btn,
    #programme-recruitment-adverts-card .programme-recruitment-advert-action-row .programme-recruitment-manage-dropdown {
        width: 100%;
    }

    #programme-recruitment-adverts-card .programme-recruitment-manage-toggle {
        width: 100%;
    }
}

#programme-recruitment-modal .programme-recruitment-title-icon {
    align-items: center;
    background: rgba(255, 255, 255, 0.16);
    border-radius: 7px;
    display: inline-flex;
    height: 26px;
    justify-content: center;
    width: 26px;
}

#programme-recruitment-modal .programme-recruitment-title-icon i {
    color: #fff;
    font-size: 1rem;
}

#programme-recruitment-modal .programme-recruitment-save-btn {
    background: #050505;
    border: 0;
    border-radius: 999px;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.55rem 0.85rem;
}

#programme-recruitment-modal .programme-recruitment-save-btn:hover {
    background: var(--primary-color);
}

#programme-recruitment-modal .ck.ck-editor {
    width: 100%;
}

#programme-recruitment-modal .ck-editor__editable_inline {
    font-size: 0.78rem;
    min-height: 180px;
}

body.programme-management-content-page #programme-recruitment-adverts-card {
    background: #f6f7fb;
    border: 0;
    border-radius: 0;
    overflow: visible !important;
    padding: 1rem 0 !important;
    position: relative;
}

body.programme-management-content-page #programme-recruitment-adverts-list.programme-recruitment-adverts-grid {
    align-items: stretch;
    display: grid;
    gap: 0.95rem;
    grid-template-columns: minmax(0, 1fr) !important;
    overflow: visible;
}

body.programme-management-content-page #programme-recruitment-adverts-list.programme-recruitment-adverts-grid.is-starting {
    grid-template-columns: minmax(0, 1fr) !important;
}

body.programme-management-content-page #programme-recruitment-adverts-list.programme-recruitment-adverts-grid.is-template-browser {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-start-grid {
    grid-template-columns: repeat(2, minmax(0, 20rem)) !important;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
    max-width: 41.25rem;
    width: 100%;
}

body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-start-card {
    max-width: 20rem;
}

body.programme-management-content-page #programme-recruitment-section .programme-table-card {
    overflow: visible;
}

body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-card {
    align-items: stretch;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.1) !important;
    border-radius: 10px;
    box-sizing: border-box;
    box-shadow: 0 18px 34px rgba(15, 23, 42, 0.08);
    display: flex;
    flex-direction: row;
    gap: 0.8rem;
    height: auto;
    max-height: none;
    max-width: 100%;
    min-height: 150px;
    min-width: 0;
    overflow: visible !important;
    padding: 0.7rem;
    position: relative;
    width: 100%;
}

body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-media {
    align-items: center;
    background: var(--dark-purple-2, #3d0878);
    border-radius: 12px;
    color: #ffffff;
    display: flex;
    flex: 0 0 150px;
    flex-direction: column;
    gap: 0.55rem;
    justify-content: center;
    min-height: 122px;
    text-align: center;
}

body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-media i {
    color: #ffffff;
    font-size: 2rem;
    line-height: 1;
}

body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-media span {
    color: #ffffff;
    font-size: 0.95rem;
    font-weight: 500;
    line-height: 1.2;
}

body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-body {
    align-items: center;
    display: grid;
    flex: 1 1 auto;
    gap: 1rem;
    grid-template-columns: minmax(0, 1fr) auto;
    min-width: 0;
    padding: 0.2rem 0.15rem 0.2rem 0.05rem;
    width: 100%;
}

/* Recruitment step configuration needs room for its conditional forms and
   assessment library. Keep the shared standard-modal appearance without its
   compact 560px dialog cap. */
.programme-modal-standard.recruitment-workflow-wide-modal .modal-dialog,
.programme-standard-modal.recruitment-workflow-wide-modal .modal-dialog,
body.programme-modal-open .programme-standard-modal.recruitment-workflow-wide-modal .modal-dialog {
    max-width: min(1140px, calc(100vw - 2rem)) !important;
    width: min(1140px, calc(100vw - 2rem)) !important;
}

body.programme-management-content-page .programme-recruitment-reference-heading {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

body.programme-management-content-page .programme-recruitment-reference-heading .programme-recruitment-preview-status-value {
    background: #e9f8ef;
    border-radius: 999px;
    color: #159455;
    font-size: 0.68rem;
    padding: 0.22rem 0.65rem;
}

body.programme-management-content-page .programme-recruitment-reference-heading .programme-recruitment-preview-status-value.is-closed {
    background: #f0f1f5;
    color: #777b8c;
}

body.programme-management-content-page .programme-recruitment-reference-meta,
body.programme-management-content-page .programme-recruitment-reference-metrics {
    align-items: center;
    color: #77758d;
    display: flex;
    flex-wrap: wrap;
    font-size: 0.76rem;
    gap: 1rem;
}

body.programme-management-content-page .programme-recruitment-reference-pipeline {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
    margin: 0.25rem 0;
}

body.programme-management-content-page .programme-recruitment-pipeline-pill {
    align-items: center;
    background: #eaf8f0;
    border-radius: 999px;
    color: #168950;
    display: inline-flex;
    font-size: 0.68rem;
    font-weight: 700;
    gap: 0.3rem;
    padding: 0.32rem 0.65rem;
}

body.programme-management-content-page .programme-recruitment-pipeline-pill.is-monitoring {
    background: #f1eaff;
    color: #733ee2;
}

body.programme-management-content-page .programme-recruitment-pipeline-pill.is-interview {
    background: #eaf1ff;
    color: #3768dd;
}

body.programme-management-content-page .programme-recruitment-pipeline-pill.is-approval {
    background: #fff1df;
    color: #d17a16;
}

body.programme-management-content-page .programme-recruitment-pipeline-arrow {
    color: #d7d6e3;
    font-size: 0.68rem;
}

body.programme-management-content-page .programme-recruitment-reference-metrics {
    margin-top: 0.15rem;
}

body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-actions .programme-recruitment-manage-toggle {
    background: #6e3e98;
    border-color: #6e3e98;
    border-radius: 6px !important;
    color: #fff;
    font-weight: 700;
}

body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-content {
    display: flex;
    flex-direction: column;
    gap: 0.36rem;
    min-width: 0;
}

body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-advert-name {
    color: #050816;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.2;
    margin: 0;
    overflow-wrap: anywhere;
}

body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-meta {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    min-width: 0;
}

body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-meta-label,
body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-date-label {
    color: #506080;
    font-size: 0.67rem;
    font-weight: 800;
    line-height: 1.2;
    text-transform: uppercase;
}

body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-meta-value {
    color: #050816;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.2;
}

body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-status-value {
    color: #058342;
    font-size: 0.84rem;
    font-weight: 800;
    line-height: 1.2;
}

body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-status-value.is-closed {
    color: #64748b;
}

body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-dates {
    display: flex;
    flex-direction: column;
    gap: 0.72rem;
    margin-top: 0.34rem;
}

body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-date {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-date-value {
    align-items: center;
    color: #050816;
    display: inline-flex;
    gap: 0.35rem;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.2;
}

body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-date-value i {
    color: #d82323;
    font-size: 0.92rem;
}

body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    justify-content: flex-end;
    margin-top: 0;
    max-width: 100%;
    min-width: 0;
}

body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-actions .btn {
    max-width: 100%;
    min-height: 2rem;
    white-space: nowrap;
}

body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-manage-toggle,
body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-use-template-btn {
    align-items: center;
    background: var(--primary-color, #6b16bd) !important;
    border-color: var(--primary-color, #6b16bd) !important;
    box-shadow: 0 10px 20px rgba(107, 22, 189, 0.16);
    color: #ffffff !important;
    display: inline-flex;
    font-weight: 800;
    gap: 0.35rem;
    justify-content: center;
    line-height: 1.15;
    max-width: 100%;
    min-height: 2.15rem;
    padding-left: 0.95rem;
    padding-right: 0.95rem;
    text-align: center;
}

body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-manage-toggle:hover,
body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-manage-toggle:focus,
body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-manage-toggle:active,
body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-use-template-btn:hover,
body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-use-template-btn:focus,
body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-use-template-btn:active {
    background: color-mix(in srgb, var(--primary-color, #6b16bd) 88%, #000 12%) !important;
    border-color: color-mix(in srgb, var(--primary-color, #6b16bd) 88%, #000 12%) !important;
    color: #ffffff !important;
}

body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-manage-dropdown {
    display: inline-flex;
    max-width: 100%;
    min-width: 0;
    position: relative;
    z-index: 20;
}

body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-manage-dropdown.show {
    z-index: 1105;
}

body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-manage-dropdown .dropdown-menu {
    max-width: min(18rem, calc(100vw - 2rem));
    overflow-wrap: anywhere;
    z-index: 1100;
}

body.programme-management-content-page #programme-recruitment-adverts-card .assessment-manage-menu-item.is-delete {
    color: #1f2937;
}

body.programme-management-content-page #programme-recruitment-adverts-card .assessment-manage-menu-item.is-delete .menu-item-icon {
    color: #dc2626;
}

body.programme-management-content-page #programme-recruitment-adverts-card .assessment-manage-menu-item.is-delete:hover,
body.programme-management-content-page #programme-recruitment-adverts-card .assessment-manage-menu-item.is-delete:focus {
    background: #f8fafc;
    color: #111827;
}

@media (min-width: 768px) and (max-width: 1199.98px) {
    body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-card {
        flex-direction: column;
    }

    body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-media {
        flex-basis: auto;
        min-height: 110px;
        width: 100%;
    }

    body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-body {
        align-items: stretch;
        gap: 0.75rem;
        grid-template-columns: 1fr;
        padding: 0;
    }

    body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-actions {
        justify-content: flex-start;
        width: 100%;
    }

    body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-actions .btn,
    body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-actions .programme-recruitment-manage-dropdown,
    body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-manage-toggle {
        width: 100%;
    }

    body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-actions .btn {
        white-space: normal;
    }

    body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-manage-dropdown .dropdown-menu {
        min-width: 100%;
        width: 100%;
    }
}

#programme-recruitment-details-modal .modal-dialog {
    max-width: min(560px, calc(100vw - 1.5rem)) !important;
    width: min(560px, calc(100vw - 1.5rem)) !important;
}

#programme-recruitment-details-modal .modal-content {
    background: #ffffff;
    border: 1px solid #7472d9;
    border-radius: 9px;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.2);
    overflow: hidden;
    position: relative;
}

#programme-recruitment-details-modal .programme-recruitment-details-close {
    opacity: 0.85;
}

#programme-recruitment-details-modal .programme-recruitment-details-close:hover {
    opacity: 1;
}

#programme-recruitment-details-modal .programme-recruitment-details-body {
    padding: 1rem !important;
}

#programme-recruitment-details-modal .programme-recruitment-details-card {
    background: #ffffff;
    min-height: 0;
    padding: 0;
}

#programme-recruitment-details-modal .programme-recruitment-details-summary {
    align-items: center;
    display: grid;
    gap: 0.55rem;
    grid-template-columns: 41px minmax(0, 1fr) auto;
    padding: 0 1.7rem 0.92rem 0;
}

#programme-recruitment-details-modal .programme-recruitment-details-preview {
    background: #5656a4;
    border-radius: 8px;
    display: block;
    height: 41px;
    width: 41px;
}

#programme-recruitment-details-modal .programme-recruitment-details-heading {
    min-width: 0;
}

#programme-recruitment-details-modal .programme-recruitment-details-heading h5 {
    color: #0f172a;
    font-size: 0.95rem;
    font-weight: 800;
    line-height: 1.18;
    margin: 0 0 0.16rem;
    overflow-wrap: anywhere;
    padding-right: 0.25rem;
    text-transform: uppercase;
}

#programme-recruitment-details-modal .programme-recruitment-details-heading span {
    color: #65708b;
    display: block;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1.2;
    overflow-wrap: anywhere;
}

#programme-recruitment-details-modal .programme-recruitment-status-badge {
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    justify-self: end;
    line-height: 1;
    max-width: 7.2rem;
    overflow-wrap: anywhere;
    padding: 0.43rem 0.68rem;
    text-align: center;
    text-transform: uppercase;
}

#programme-recruitment-details-modal .programme-recruitment-status-badge.is-recruiting {
    background: #d9f2df;
    color: #166534;
}

#programme-recruitment-details-modal .programme-recruitment-status-badge.is-paused {
    background: #e5e7eb;
    color: #334155;
}

#programme-recruitment-details-modal .programme-recruitment-details-meta-list {
    border-top: 1px solid #d3d7e4;
}

#programme-recruitment-details-modal .programme-recruitment-details-meta-row {
    align-items: center;
    border-bottom: 1px solid #d3d7e4;
    display: flex;
    justify-content: space-between;
    min-height: 33px;
    padding: 0.38rem 0.52rem 0.38rem 0.05rem;
}

#programme-recruitment-details-modal .programme-recruitment-details-meta-row span,
#programme-recruitment-details-modal .programme-recruitment-details-description-label {
    color: #66718d;
    display: block;
    font-size: 0.65rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1.2;
    text-transform: uppercase;
}

#programme-recruitment-details-modal .programme-recruitment-details-meta-row strong {
    color: #1f2937;
    font-size: 0.68rem;
    font-weight: 800;
    line-height: 1.2;
    text-align: right;
}

#programme-recruitment-details-modal .programme-recruitment-details-description {
    padding: 0.58rem 0.16rem 0.75rem 0.05rem;
}

#programme-recruitment-details-modal .programme-recruitment-details-description-body {
    background: #ffffff;
    border: 1px solid #d5d9e6;
    border-radius: 6px;
    color: #334155;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.28;
    margin-top: 0.32rem;
    max-height: min(50vh, 286px);
    min-height: 238px;
    overflow: auto;
    overflow-wrap: anywhere;
    padding: 0.28rem;
    resize: none;
    white-space: pre-wrap;
    width: 100%;
}

#programme-recruitment-details-modal .programme-recruitment-details-description-body:focus {
    border-color: rgba(116, 114, 217, 0.55);
    box-shadow: 0 0 0 0.16rem rgba(116, 114, 217, 0.14);
    outline: 0;
}

#programme-recruitment-details-modal .programme-recruitment-details-description-body p:last-child {
    margin-bottom: 0;
}

@media (max-width: 767.98px) {
    body.programme-management-content-page #programme-recruitment-adverts-list.programme-recruitment-adverts-grid {
        grid-template-columns: 1fr !important;
    }

    body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-start-grid {
        grid-template-columns: minmax(0, 20rem) !important;
        max-width: 20rem;
    }

    body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-card {
        flex-direction: column;
        min-height: 0;
        max-width: 100%;
    }

    body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-media {
        flex-basis: auto;
        min-height: 118px;
        width: 100%;
    }

    body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-body {
        align-items: stretch;
        gap: 0.75rem;
        grid-template-columns: 1fr;
        padding: 0;
    }

    body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-actions {
        align-items: stretch;
        flex-direction: column;
        justify-content: flex-start;
        width: 100%;
    }

    body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-actions .btn,
    body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-actions .programme-recruitment-manage-dropdown,
    body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-manage-toggle {
        width: 100%;
    }

    body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-actions .btn {
        white-space: normal;
    }

    body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-manage-dropdown .dropdown-menu {
        min-width: 100%;
        width: 100%;
    }

    #programme-recruitment-details-modal .modal-dialog {
        max-width: calc(100% - 1rem);
    }

    #programme-recruitment-details-modal .programme-recruitment-details-card {
        min-height: auto;
    }
}

@media (max-width: 575.98px) {
    body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-card {
        border-radius: 14px;
        padding: 0.6rem;
    }

    body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-meta,
    body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-date {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.2rem;
    }

    body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-actions .btn,
    body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-actions .programme-recruitment-manage-dropdown {
        width: 100%;
    }

    #programme-recruitment-details-modal .programme-recruitment-details-summary {
        grid-template-columns: 41px minmax(0, 1fr);
        padding-right: 0.45rem;
    }

    #programme-recruitment-details-modal .programme-recruitment-status-badge {
        grid-column: 2;
        justify-self: start;
    }
}

.programme-course-card {
    padding: 0.75rem 0.75rem 0.85rem;
    margin-bottom: 1.25rem;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 18px !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08) !important;
}

.programme-course-card .card-title {
    font-size: 0.8rem;
}

.programme-course-card .card-text,
.programme-course-card .small,
.programme-course-card .text-muted {
    font-size: 0.7rem;
}

.programme-course-card .btn,
.programme-course-card .btn-sm {
    font-size: 0.6rem;
    padding: 0.18rem 0.45rem;
}

.programme-course-card .custom-image-size {
    width: 100%;
    max-width: 100%;
    max-height: 200px;
    height: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.programme-course-card .course-actions-toggle {
    align-items: center;
    background: var(--btn-outline-primary-bg, var(--primary-color));
    border: 1px solid var(--btn-outline-primary-border, var(--primary-color));
    border-radius: 6px;
    color: var(--btn-outline-primary-text, #fff);
    display: flex;
    font-size: 0.75rem;
    font-family: inherit;
    font-weight: 600;
    justify-content: flex-start;
    min-height: 26px;
    padding: 5px 10px;
    text-align: left;
    width: 100%;
}

.programme-course-card .course-actions-panel {
    border: 1px solid #dfcdef;
    border-top: 0;
    border-radius: 0 0 12px 12px;
    margin-top: -1px;
    padding: 0.7rem 0.85rem;
}

/* The open card grows to show its actions. While any actions list is open,
   cards keep their own height instead of stretching to the tallest card in
   the row, so the other cards do not appear to expand too. */
.programme-course-card-table.dataTable tbody:has(.course-actions-panel:not([hidden])) > tr {
    align-self: start;
}

.programme-course-card-table.dataTable tbody:has(.course-actions-panel:not([hidden])) > tr,
.programme-course-card-table.dataTable tbody:has(.course-actions-panel:not([hidden])) td,
.programme-course-card-table.dataTable tbody:has(.course-actions-panel:not([hidden])) .programme-course-table-item,
.programme-course-card-table.dataTable tbody:has(.course-actions-panel:not([hidden])) .programme-course-table-item > .card {
    height: auto;
}

[data-programme-course-grid]:has(.course-actions-panel:not([hidden])) {
    align-items: flex-start;
}

[data-programme-course-grid]:has(.course-actions-panel:not([hidden])) .programme-course-card {
    height: auto !important;
}

[data-programme-course-grid].has-open-course-actions {
    align-items: flex-start;
}

[data-programme-course-grid].has-open-course-actions [data-programme-course-item] {
    align-self: flex-start;
}

[data-programme-course-grid].has-open-course-actions .programme-course-card {
    height: auto !important;
}

[data-programme-course-grid].has-open-course-actions .programme-course-card:not(.course-actions-open) {
    height: fit-content !important;
}

.programme-course-card.course-actions-open {
    height: auto !important;
}

.programme-course-card .course-action-link {
    align-items: center;
    background: transparent;
    border: 0;
    color: var(--primary-color);
    display: flex;
    font-size: 12px;
    font-family: "Poppins", sans-serif;
    font-weight: 500;
    justify-content: flex-start;
    margin: 0.15rem 0;
    padding: 0.5rem 0.35rem;
    text-align: left;
    text-decoration: none;
    width: 100%;
}

.programme-course-card .course-action-link i {
    color: #7040b0;
    flex: 0 0 1.35rem;
    font-size: 1.35rem;
    margin-right: 0.65rem;
}

.programme-course-card .course-action-delete i {
    color: inherit;
}

.programme-course-card .course-actions-panel .row {
    display: block;
    margin-left: 0;
    margin-right: 0;
}

.programme-course-card .course-actions-panel .row > [class*="col-"] {
    padding-left: 0;
    padding-right: 0;
    width: 100%;
}

.programme-course-card .course-action-delete {
    background-color: #dc3545;
    border: 1px solid #dc3545;
    border-top: 1px solid #dc3545;
    border-radius: 0.375rem;
    color: #fff;
    margin-top: 0.35rem;
    padding-top: 0.7rem;
}

.programme-course-card .course-action-delete:hover,
.programme-course-card .course-action-delete:focus,
.programme-course-card .course-action-delete:active,
.programme-course-card .delete_course_btn:hover,
.programme-course-card .delete_course_btn:focus,
.programme-course-card .delete_course_btn:active {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

.programme-course-card-table.dataTable {
    display: block;
    width: 100% !important;
    border: 0;
}

.programme-course-card-table.dataTable thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.programme-course-card-table.dataTable tbody {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
    width: 100%;
}

.programme-course-card-table.dataTable tbody tr,
.programme-course-card-table.dataTable tbody td {
    display: block !important;
    width: 100% !important;
    height: 100%;
    border: 0 !important;
    background: transparent !important;
}

.programme-course-card-table.dataTable tbody td {
    padding: 0 !important;
}

.programme-course-card-table .programme-course-table-item {
    width: 100% !important;
    max-width: none;
    height: 100%;
    padding: 0;
}

.programme-course-card-table .programme-course-table-item > .card {
    height: 100%;
    margin-bottom: 0 !important;
}

.programme-course-card-table.dataTable tbody td.dt-empty {
    padding: 2rem 1rem !important;
    text-align: center;
}

.programme-courses-content-card .dt-container .dt-layout-row {
    gap: 0.75rem;
    align-items: center;
}

@media (min-width: 576px) {
    .programme-course-card-table.dataTable tbody {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 768px) {
    .programme-course-card-table.dataTable tbody {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (min-width: 992px) {
    .programme-course-card-table.dataTable tbody {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

.programme-course-dashboard-v2 {
    padding-top: 0.2rem;
}

.programme-course-dashboard-v2-title {
    font-size: 1.55rem;
    font-weight: 800;
    color: #1f172c;
}

.programme-course-kpi-card {
    position: relative;
    background: #fff;
    border-radius: 18px;
    border-top: 4px solid #4c1d95;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
    padding: 1.15rem 1rem 1rem;
    min-height: 152px;
    overflow: hidden;
}

.programme-course-kpi-card::after {
    content: "";
    position: absolute;
    right: -0.5rem;
    bottom: -0.75rem;
    width: 86px;
    height: 86px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(76, 29, 149, 0.08), rgba(76, 29, 149, 0));
}

.programme-course-kpi-card.accent-gold {
    border-top-color: #c27a00;
}

.programme-course-kpi-card.accent-purple {
    border-top-color: #4c1d95;
}

.programme-course-kpi-card.accent-orange {
    border-top-color: #f59e0b;
}

.programme-course-kpi-card.accent-danger {
    border-top-color: #dc2626;
}

.programme-course-kpi-icon {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.8rem;
    background: rgba(76, 29, 149, 0.12);
    color: #4c1d95;
    font-size: 1.15rem;
}

.programme-course-kpi-card.accent-gold .programme-course-kpi-icon {
    background: rgba(194, 122, 0, 0.14);
    color: #c27a00;
}

.programme-course-kpi-card.accent-orange .programme-course-kpi-icon {
    background: rgba(245, 158, 11, 0.14);
    color: #d97706;
}

.programme-course-kpi-card.accent-danger .programme-course-kpi-icon {
    background: rgba(220, 38, 38, 0.14);
    color: #dc2626;
}

.programme-course-kpi-card h3 {
    font-size: 2rem;
    font-weight: 800;
    color: #1f172c;
}

.programme-course-chart-card {
    background: #fcfbff;
    border: 1px solid rgba(76, 29, 149, 0.1);
    border-radius: 18px;
    padding: 1.25rem 1.2rem 1rem;
}

.programme-course-chart-legend {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.65rem;
    color: #6b7280;
    font-weight: 600;
}

.programme-course-chart-legend .dot {
    width: 10px;
    height: 10px;
    border-radius: 999px;
    display: inline-block;
}

.programme-course-chart-legend .dot.revenue {
    background: #4c1d95;
}

.programme-course-chart-legend .dot.engagement {
    background: #f97316;
}

.programme-course-chart-grid {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 0.75rem;
    min-height: 280px;
}

.programme-course-chart-axis {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    padding: 0.3rem 0 1.8rem;
    color: #9ca3af;
    font-size: 0.65rem;
    font-weight: 600;
}

.programme-course-chart-canvas {
    position: relative;
    border-radius: 16px;
    background:
        linear-gradient(to top, rgba(76, 29, 149, 0.08) 1px, transparent 1px) 0 0 / 100% 20%,
        linear-gradient(to right, rgba(76, 29, 149, 0.05) 1px, transparent 1px) 0 0 / 12.5% 100%,
        #fff;
    min-height: 280px;
    overflow: hidden;
}

.programme-course-chart-line {
    position: absolute;
    left: 4%;
    right: 4%;
    top: 12%;
    bottom: 18%;
    border-radius: 16px 16px 0 0;
}

.programme-course-chart-line.revenue-line {
    background:
        radial-gradient(circle at 0% 68%, rgba(76, 29, 149, 0.9) 0 3px, transparent 4px),
        radial-gradient(circle at 14% 64%, rgba(76, 29, 149, 0.9) 0 3px, transparent 4px),
        radial-gradient(circle at 28% 30%, rgba(76, 29, 149, 0.9) 0 3px, transparent 4px),
        radial-gradient(circle at 42% 66%, rgba(76, 29, 149, 0.9) 0 3px, transparent 4px),
        radial-gradient(circle at 57% 82%, rgba(76, 29, 149, 0.9) 0 3px, transparent 4px),
        radial-gradient(circle at 71% 26%, rgba(76, 29, 149, 0.9) 0 3px, transparent 4px),
        radial-gradient(circle at 85% 92%, rgba(76, 29, 149, 0.9) 0 3px, transparent 4px),
        radial-gradient(circle at 100% 86%, rgba(76, 29, 149, 0.9) 0 3px, transparent 4px),
        linear-gradient(180deg, rgba(76, 29, 149, 0.28), rgba(76, 29, 149, 0.02));
    clip-path: polygon(0% 68%, 14% 64%, 28% 30%, 42% 66%, 57% 82%, 71% 26%, 85% 92%, 100% 86%, 100% 100%, 0% 100%);
    border-bottom: 2px solid rgba(76, 29, 149, 0.55);
}

.programme-course-chart-line.engagement-line {
    background:
        radial-gradient(circle at 0% 66%, rgba(249, 115, 22, 0.9) 0 3px, transparent 4px),
        radial-gradient(circle at 14% 78%, rgba(249, 115, 22, 0.9) 0 3px, transparent 4px),
        radial-gradient(circle at 28% 46%, rgba(249, 115, 22, 0.9) 0 3px, transparent 4px),
        radial-gradient(circle at 42% 66%, rgba(249, 115, 22, 0.9) 0 3px, transparent 4px),
        radial-gradient(circle at 57% 54%, rgba(249, 115, 22, 0.9) 0 3px, transparent 4px),
        radial-gradient(circle at 71% 48%, rgba(249, 115, 22, 0.9) 0 3px, transparent 4px),
        radial-gradient(circle at 85% 72%, rgba(249, 115, 22, 0.9) 0 3px, transparent 4px),
        radial-gradient(circle at 100% 84%, rgba(249, 115, 22, 0.9) 0 3px, transparent 4px),
        linear-gradient(180deg, rgba(249, 115, 22, 0.12), rgba(249, 115, 22, 0.01));
    clip-path: polygon(0% 66%, 14% 78%, 28% 46%, 42% 66%, 57% 54%, 71% 48%, 85% 72%, 100% 84%, 100% 100%, 0% 100%);
    mix-blend-mode: multiply;
    opacity: 0.75;
}

.programme-course-chart-months {
    position: absolute;
    left: 4%;
    right: 4%;
    bottom: 0.6rem;
    display: grid;
    grid-template-columns: repeat(8, minmax(0, 1fr));
    color: #6b7280;
    font-size: 0.66rem;
    font-weight: 600;
}

.programme-course-status-stack {
    display: flex;
    width: 100%;
    height: 18px;
    border-radius: 999px;
    overflow: hidden;
    background: #efe9fb;
}

.programme-course-status-segment {
    height: 100%;
}

.programme-course-status-segment.approved {
    background: linear-gradient(90deg, #4c1d95, #6d28d9);
}

.programme-course-status-segment.pending {
    background: linear-gradient(90deg, #f59e0b, #fbbf24);
}

.programme-course-status-segment.declined {
    background: linear-gradient(90deg, #dc2626, #f87171);
}

.programme-course-status-card {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.85rem 0.9rem;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid rgba(76, 29, 149, 0.1);
}

.programme-course-status-card strong {
    font-size: 1.35rem;
    color: #1f172c;
    line-height: 1;
}

.programme-course-status-card small {
    font-size: 0.68rem;
    color: #6b7280;
    font-weight: 600;
}

.programme-course-status-label {
    font-size: 0.72rem;
    font-weight: 700;
    color: #1f172c;
}

.programme-course-status-card.approved {
    border-top: 3px solid #4c1d95;
}

.programme-course-status-card.pending {
    border-top: 3px solid #f59e0b;
}

.programme-course-status-card.declined {
    border-top: 3px solid #dc2626;
}

.programme-course-donut-wrap {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.programme-course-donut-svg {
    flex: 0 0 45%;
    width: 100%;
    max-width: 120px;
    height: auto;
}

.programme-course-donut-total {
    font-size: 1.15rem;
    font-weight: 800;
    fill: #1f172c;
}

.programme-course-donut-label {
    font-size: 0.42rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    fill: #6b7280;
}

.programme-course-donut-legend {
    flex: 1;
    min-width: 0;
    font-size: 0.68rem;
}

/* Enrollment Status key: size of the colour dot before each status. Shape,
   display and spacing are Bootstrap classes in the template
   (rounded-circle, d-inline-block, me-1); Bootstrap 5.0 has no fixed-size
   width/height utility this small, so only the size lives here. */
.programme-course-donut-legend .legend-dot {
    width: 0.5rem;
    height: 0.5rem;
}

.course-not-started-dot { background-color: #9ca3af; }
.course-in-progress-dot { background-color: #f59e0b; }
.course-completed-dot { background-color: #16a34a; }
.course-dropped-dot { background-color: #dc2626; }

.programme-course-histogram-svg {
    width: 100%;
    height: 160px;
}

.programme-course-histogram-axis {
    display: flex;
    justify-content: space-between;
    margin-top: 0.35rem;
    font-size: 0.62rem;
    color: #6b7280;
    text-align: center;
}

.programme-course-histogram-axis span {
    flex: 1;
}

.programme-course-illustrative-badge {
    font-size: 0.62rem;
    font-weight: 600;
    color: #92400e;
    background-color: #fffbeb;
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
    white-space: nowrap;
}

@media (max-width: 991.98px) {
    .programme-course-dashboard-v2-title {
        font-size: 1.25rem;
    }

    .programme-course-chart-grid {
        grid-template-columns: 1fr;
    }

    .programme-course-chart-axis {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .programme-courses-content-card {
        border-radius: 18px;
        padding: 0.75rem;
    }

    .programme-courses-content-inner {
        border-radius: 16px;
        padding: 0.85rem 0.85rem 1rem;
    }

    .programme-courses-panel-header {
        align-items: center;
    }

    .programme-courses-toolbar {
        align-items: center;
    }
}

/* ---------Profile ---------*/
input.country-code {
    max-width: 70px;
  }
  /* ---------End Profile ---------*/

/* ------------------Home Page new ------------------ */

      .home-page-card {
          border-radius: 30px;
          height: 53%;
          display: flex;
          flex-direction: column;
          align-items: center;
          justify-content: center;
          transition: transform 0.3s;
          position: relative;
          overflow: hidden;
          box-shadow: 0 4px 8px rgba(0,0,0,0.1);
          color: white;
          cursor:pointer;
          text-decoration: none;
        }
        
        .home-page-card:hover {
          transform: translateY(-5px);
          color: white;
        }
        
        .home-page-card-2 {
          border-radius: 30px;
          height: 40%;
          display: flex; 
          flex-direction: column;
          align-items: center;
          justify-content: center;
          transition: transform 0.3s;
          position: relative;
          overflow: hidden;
          box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
          color: white;
          text-decoration: none;
        }
  
        .h-277
        {
          height:277px;
        }
        
        .home-page .home-page-card-2:hover {
          transform: translateY(-5px);
          color: white;
        }
        .card-icon { 
          height: 100px;
          margin-bottom: 15px;
        }
      
        .home-page .card-title { 
          font-size: 16px;
          justify-content: start !important;
          position: absolute;
          bottom: 5px;
          left: 27px; 
        }
        
        .next-icon {
          position: absolute;
          top: 13px;
          right: 15px;
          background-color: white;
          border-radius: 50%;
          width: 25px;
          height: 25px;
          display: flex;
          align-items: center;
          justify-content: center;
          color: #6c757d;
        }
        
        .next-icon-2 {
          position: absolute;
          right: 10px;
          bottom: 14px;
          background-color: white;
          border-radius: 50%;
          width: 30px;
          height: 30px;
          display: flex;
          align-items: center;
          justify-content: center;
          color: #6c757d;
        }
  
        @media screen and (width >= 979px) {
        
          .home-page-sm
          {
              display:none;
          } 
        }
        
        @media screen and (width <= 978px) {
        
          .home-page-sm
          {
              display:block;
          }
        
          .next-icon
          {
              top:initial;
              bottom:10px;
          }
          
          .home-page-md
          {
              display:none;
          }
        }
        
        /* For smaller cards */
        .col-md-6 .home-page-card {
          height: 180px;
        }
        
        .welcome-text {
          margin: 30px 0;
          text-align: center;
        }
/* ------------------END Home Page new ------------------ */



/* ---------------- APP 4 CARDS DISPLAY AND STATUS TABS ---------------- */

        .top-nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 10px 15px;
            color: var(--text-color);
            text-decoration: none;
          }
          
          .nav-circle {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background-color: #888;
            display: flex;
            justify-content: center;
            align-items: center;
            margin-bottom: 5px;
          }
        
          .scrollable-nav-container .active {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background-color: var(--primary-color);;
            display: flex;
            justify-content: center;
            align-items: center;
            margin-bottom: 5px;
          }
          
          .scrollable-nav-container .active .nav-circle {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background-color: var(--primary-color);
            display: flex;
            justify-content: center;
            align-items: center;
            margin-bottom: 5px;
          }
    
          .scrollable-nav-container .active:before {
            content: "";
            position: absolute;
            width: 46px;
            height: 46px;
            background-color: var(--primary-color);
            opacity: 0.1;
            border-radius: 50%;
            z-index: -1;
            animation: pulse 3s ease-in-out;
            animation-iteration-count: 2;
          }
        
          @keyframes pulse {
            0% {
              transform: scale(1);
              opacity: 0.1;
            }
            50% {
              transform: scale(1.1);
              opacity: 0.2;
            }
            100% {
              transform: scale(1);
              opacity: 0.1;
            }
          }
          
          .nav-label {
            font-size: 12px;
          }
    
          .stats-card {
            background: linear-gradient(135deg, var(--homepage-card-color-1), var(--homepage-card-color-2));
            color: #fff;
            border-radius: 30px;
            padding: 20px;
            text-align: right;
            position: relative;
            min-height: 120px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
          }
          
          .stats-card h1 {
            font-size: 25px;
            font-weight: bold;
            margin: 0;
            text-align: end;
          }
          
          .stats-card p {
            font-size: 15px;
            margin: 0;
            position: absolute;
            bottom: 20px;
            left: 20px;
          }
    
          .view-analytics-card {
            background: var(-- --white-1);
            color: var(--black-1);
            border-radius: 30px;
            padding: 20px;
            text-align: right;
            position: relative;
            min-height: 120px;
            display: flex;
            flex-direction: column;
            justify-content: space-between;
          }
          
          .view-analytics-card i {
            font-size: 15px;
            font-weight: bold;
            text-align: end;
          }
        
          .view-analytics-card p {
            font-size: 15px;
            margin: 0;
            position: absolute;
            bottom: 20px;
            left: 20px;
          } 
        
          .tab-content-section {
            min-height: 400px;
            background-color:#e3f2fd;
            border-radius: 5px;
            margin-top: 20px;
            padding: 20px;
          }
      
          .nav-tabs {
            border-bottom: none;
          }
          
        .nav-tabs .nav-link {
            border: none;
            color: var(--text-color);
            padding: 10px 20px;
            font-weight: 500;
            border-radius: 20px;
            margin-right: 10px;
            cursor: pointer; /* ensure whole tab shows as clickable */
          }
          
          .nav-tabs .nav-link.active {

            color: #000 !important;  
            background-color: transparent !important; 
            border-radius: 0;
            border-bottom: 5px solid var(--primary-color);
            transition: all 0.2s ease;
          }

          /* Compact tabs for the Manage Forms hub */
          .system-management-forms .system-management-forms-tabs {
            border-bottom: 0;
          }

          .system-management-forms .system-management-forms-tabs .nav-item {
            flex: 0 0 auto;
          }

          .system-management-forms .system-management-forms-tabs .nav-link {
            padding: 0.35rem 0.75rem;
            font-size: 0.84rem;
            line-height: 1.15;
            border-radius: 0.7rem 0.7rem 0 0;
            border-bottom: 2px solid transparent;
            margin-right: 0;
          }

          .system-management-forms .system-management-forms-tabs .nav-item.show .nav-link,
          .system-management-forms .system-management-forms-tabs .nav-link.active {
            border-bottom-color: var(--primary-color);
            border-bottom-width: 2px;
          }

          /*
           * Keep inactive User Management panes out of layout even before the
           * Bootstrap/permissions tab initializer runs after an HTMX swap.
           */
          [data-user-register-root] > #myTabContent > .tab-pane:not(.active),
          [data-user-register-root] #roleSubTabsContent > .tab-pane:not(.active) {
            display: none !important;
          }

          [data-user-register-root] > #myTabContent > .tab-pane.active,
          [data-user-register-root] #roleSubTabsContent > .tab-pane.active {
            display: block !important;
          }

          /* Keep the system-management tables on the same horizontal rail as the top cards. */
          .system-management-users .system-management-table-shell,
          .system-management-roles .system-management-table-shell,
          .system-management-permissions .system-management-table-shell {
            padding-left: 0 !important;
            padding-right: 0 !important;
          }

          .system-management-users .system-management-table-shell .card-body,
          .system-management-roles .system-management-table-shell .card-body,
          .system-management-permissions .system-management-table-shell .card-body {
            padding-left: 0 !important;
            padding-right: 0 !important;
          }

        .system-management-users .system-management-table-shell .table,
        .system-management-roles .system-management-table-shell .table,
        .system-management-permissions .system-management-table-shell .table {
            width: 100%;
            margin-bottom: 0;
          }

          .system-management-notifications .system-management-table-shell {
            overflow-x: auto !important;
            overflow-y: visible !important;
            padding-left: 0 !important;
            padding-right: 0 !important;
          }

          .system-management-notifications .system-management-table-shell .table {
            width: 100%;
            margin-bottom: 0;
          }

          .notification-management-modal.show {
            background: rgba(15, 23, 42, 0.45);
            z-index: 20000 !important;
          }

          .notification-management-modal .modal-dialog,
          .notification-management-modal .modal-content {
            position: relative;
            z-index: 20001 !important;
          }
  
  
          /* Action buttons style like in the image */
          .status-tab{
            border-radius: 50px;
            padding: 6px 13px;
            margin: 5px;
            display: inline-flex;
            align-items: center;
            color: var(--text-color);
            text-decoration: none;
            font-size: 12px;
            border: transparent;
            cursor: pointer; /* treat status tabs as fully clickable buttons */
          }
        

          .status-tab.active {
            color: #000 !important;  
            background-color: transparent !important; 
            border-radius: 0;
            border-bottom: 3px solid var(--primary-color);
            transition: all 0.2s ease;
          }
          
          .status-tab.icon {
            width: 25px;
            height: 25px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 8px;
          }

          .programme-management-embed .programme-management-status-tabs-wrap {
            padding: 0.55rem 0.55rem 0.2rem;
          }

          .programme-management-embed .programme-management-status-tabs {
            margin: 0;
            justify-content: center;
            gap: 0.45rem;
          }
        
          .view-analytics-card {
            background-color: var(--white-1);
            border-radius: 30px;
            padding: 20px;
            text-align: center;
            height: 100%;
          }
    
          .user-avatar {
            width: 30px;
            height: 30px;
            border-radius: 50%;
            background-color: var(--white);
          }
          
          .icon{
            background:var(--primary-color);
          }
          
          @media (max-width: 998px) {
            .scrollable-section {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch; /* Smooth scrolling */
                padding-bottom: 10px;
                display: flex;
                gap: 10px;
          
            }
          
            .row.flex-nowrap {
                flex-wrap: nowrap; /* Prevent wrapping on small screens */
            } 
          

            
          }
  
          @media (max-width: 998px) {
            .scrollable-nav-container {
                overflow-x: auto;
                -webkit-overflow-scrolling: touch; /* Smooth scrolling */
                padding-bottom: 10px;
                padding: 20px;
                
            }
          
            .scrollable-nav {
                display: flex;
                flex-wrap: nowrap; /* Prevent wrapping */
                gap: 5px!important;
                justify-content:start!important;
            }
          
            .top-nav-item {
                flex: 0 0 auto; /* Prevent shrinking */
                white-space: nowrap; /* Prevent text from breaking */
            }
          
            .d-flex.justify-content-center {
                justify-content: center; /* Center the content */
            }
          }

   /* ----------------END APP 4 CARDS DISPLAY AND STATUS TABS ----------------*/



  /* bulk option */
 
.create-assessment-container {
    max-width: 320px;
  }
  
  .create-assessment-container .circle-group {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
  }
  
  .create-assessment-container .circle {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: -8px;
  }
  
    
  .create-assessment-container .dropdown-menu { 
    padding: 15px;
    border-radius: 15px;
    border: none;
    box-shadow: 0 4px 12px var(--shadow-color);
  }
  
  .create-assessment-container .dropdown-item {
    color: var(--text-gray);
    padding: 10px 12px;
    border-radius: 8px;
    margin-bottom: 5px;
    font-size: 14px;
  }
  
  .create-assessment-container .dropdown-item:hover {
    background-color: var(--primary-color);
    color: #fff;
  }
  
  .create-assessment-container .create-text {
    font-size: 16px;
    font-weight: 500;
    margin-left: 10px;
    color: var(--text-gray);
  }
  
  .create-assessment-container .dropdown-toggle::after {
    display: none;
  }
 
  
/* ----------------- APP LAUNCHER MENU  -----------------*/

      .launcher-icon {
          cursor: pointer;
          font-size: 25px;
          color: #fff;
        }
        
        .app_launcher .dropdown-menu {
          width: 600px;
          background-color: var(--ms-dark);
          color: var(--ms-text);
          border-radius: 6px;
          padding: 20px;
          margin-top: 10px;
          border: none;
        }
        
        .app_search_bar {
          background-color: rgba(255, 255, 255, 0.1);
          border: none;
          color: white;
          border-radius: 4px;
          padding: 10px;
        }
        
        .app_search_bar::placeholder {
          color: rgba(255, 255, 255, 0.7);
        }
        
        .search-icon {
          color: rgba(255, 255, 255, 0.7);
        }
        
        .app-grid {
          display: grid;
          grid-template-columns: repeat(5, 1fr);
          gap: 20px;
          margin-top: 20px;
        }
  
        .app-item {
          display: flex;
          flex-direction: column;
          align-items: center;
          text-align: center;
          cursor: pointer;
          transition: background-color 0.2s;
          padding: 10px;
          border-radius: 4px;
        }
        
        .app-item:hover {
          background-color: rgba(255, 255, 255, 0.1);
        }
        
        .app-icon {
          width: 50px;
          height: 50px;
          margin-bottom: 5px;
        }
        
        .app-name {
          font-size:  12px;
          font-weight: 600;
          color: #1d1d1d;
        }
        
        .divider {
          height: 1px;
          background-color: rgba(255, 255, 255, 0.1);
          margin: 20px 0;
        }
  
        .create-more {
          display: flex;
          justify-content: center;
          align-items: center;
          width: 40px;
          height: 40px;
          border-radius: 50%;
          border: 1px solid rgba(255, 255, 255, 0.3);
          color: var(--ms-text);
          font-size: 20px;
        }
        
        .app-launcher .dropdown-menu
        {
          background-color: #fff;
          border-radius: 20px;
          inset: 46px auto auto -16px!important;
        }
  
/* ----------------- APP LAUNCHER MENU  -----------------*/


/*-----------------  Orcaa new sidebar ----------------- */    
      .orcaa-sidebar-container {
        position: relative;
        height: 100vh;
        width: 200px;           /* match .sidebar width to avoid overlapping main content */
        max-width: 125px;
        transition: all 0.3s ease;
        margin-top: 2.5rem;
        overflow-y: auto;      /* container can scroll */
      }
      
      .orcaa-sidebar {
        background-color: var(--orcaa-sidebar-white);
        height: 90vh;
        width: 115px;          /* fill container */
        box-shadow: 0 0 15px var(--orcaa-sidebar-shadow);
        display: flex;
        flex-direction: column;
        overflow-y: auto;      /* inner menu scrolls when taller than viewport */
        transition: width 0.3s ease;
        /* Match the rounded cardâ€‘like style used for .chiefluthuli-sidebar .orcaa-sidebar */
        border-radius: 26px;
        border: 1px solid rgba(0, 0, 0/ 50%);
        padding-top: 1.5rem;
        margin-top: 2.8rem;
      }

      /* Dedicated sidebar styling for curriculum "Up next" panel */
      .upnes-sidebar {
        background-color: var(--orcaa-sidebar-white);
        height: 84vh;
        width: 100%;
        box-shadow: 0 0 15px var(--orcaa-sidebar-shadow);
        display: flex;
        flex-direction: column;
        overflow-y: auto;      /* inner menu scrolls when taller than viewport */
        transition: width 0.3s ease;
      }
  
      .orcaa-sidebar.collapsed {
        width: 70px;
        padding: 20px 10px;
        overflow: visible;
      }

      /* Mobile bottom-nav layout for unified sidebar */
      @media (max-width: 767.98px) {
        /* Reposition the unified sidebar to the bottom of the viewport */
        .sidebar.sidebar-md {
          top: auto;
          bottom: 0;
          left: 0;
          margin: 0;
          width: 100%;
          height: auto;
          z-index: 1040;
        }

        .orcaa-sidebar-container {
          height: auto;
          width: 100%;
          max-width: 100%;
          margin: 0;
          overflow-x: auto;
          overflow-y: hidden;
        }

        .orcaa-sidebar {
          height: auto;
          width: 100%;
          margin-top: 0;
          border-radius: 0;
          background-color: var(--navbar-bg-color);
          box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.12);
          padding-top: 0.25rem;
          padding-bottom: 0.25rem;
        }

        /* Mobile sidebar: ensure icons and labels are white for all users (learner, admin, etc.) */
        .sidebar.sidebar-md .orcaa-sidebar .programme-icon-link,
        .sidebar.sidebar-md .orcaa-sidebar .nav-text,
        .sidebar.sidebar-md .orcaa-sidebar .programme-icon-label {
          color: #fff;
        }

        .sidebar.sidebar-md .orcaa-sidebar .programme-icon-circle i {
          color: #fff;
        }

        /* Display app sidebars (home, programme-cards, etc.) horizontally */
        .orcaa-sidebar .programme-icons-sidebar {
          flex-direction: row;
          justify-content: space-around;
          align-items: center;
          padding: 0.25rem 0.4rem;
          gap: 0.25rem;
        }

        /* Neutralise large negative top margins used on desktop */
        .orcaa-sidebar .programme-icons-sidebar.card-margin-top,
        .orcaa-sidebar .home-root-link.card-margin-top {
          margin-top: 0 !important;
        }

        /* Remove large bottom margin from home link (.mb-4) inside bottom nav */
        .orcaa-sidebar .home-root-link {
          margin-bottom: 0 !important;
        }

        .orcaa-sidebar .programme-icon-link {
          margin-bottom: 0;
          padding: 0.15rem 0.25rem;
        }

        /* Make bottom-nav icons and labels more compact */
        .orcaa-sidebar .programme-icon-circle {
          width: 26px;
          height: 26px;
          margin-bottom: 0.05rem;
        }

        .orcaa-sidebar .programme-icon-circle i {
          font-size: 11px;
        }

        /* Slightly larger icon just for the home link so it stays legible */
        .orcaa-sidebar .home-root-link .programme-icon-circle {
          width: 30px;
          height: 30px;
        }

        .orcaa-sidebar .home-root-link .programme-icon-circle i {
          font-size: 14px;
        }

        .orcaa-sidebar .programme-icon-label {
          font-size: 8px;
        }

        .app-home-list #home-admin-fixed-sidebar .programme-icon-label,
        .app-home-list #home-default-sidebar .programme-icon-label,
        .app-home-list .home-root-link .programme-icon-label,
        .app-programme-cards-list .mentor-primary-sidebar .programme-icon-label {
          font-size: 11px !important;
          font-weight: 500;
          line-height: 1.2;
          text-align: center;
        }

        /* On touch phones, do not retain a hover/focus colour after tapping
           the bottom navigation. Devices with a real hover pointer can keep
           the desktop-style affordance. */
        @media (hover: hover) {
          .sidebar.sidebar-md .orcaa-sidebar .programme-icon-link:hover,
          .sidebar.sidebar-md .orcaa-sidebar .programme-icon-link:focus {
            color: var(--secondary-color, #fff);
          }
          .sidebar.sidebar-md .orcaa-sidebar .programme-icon-link:hover .programme-icon-circle i,
          .sidebar.sidebar-md .orcaa-sidebar .programme-icon-link:focus .programme-icon-circle i {
            color: var(--secondary-color, #fff);
          }
        }

        /* Also shrink generic nav text in the unified sidebar on mobile */
        .orcaa-sidebar .nav-text {
          font-size: 9px;
        }

        /* On mobile, active nav items use a very compact width */
        .orcaa-sidebar-container .nav-item.active {
          width: 6%;
        }

        /* Ensure page content is not hidden behind the bottom nav */
        .academic-page {
          padding-bottom: 4.5rem;
        }
      }

      /* Shared curriculum hero card (Chief Luthuli style) */
      .teacher-curriculum-hero {
        background-color: #2f326b;
        background-image:
          linear-gradient(90deg, rgba(47, 50, 107, 0.62) 0%, rgba(47, 50, 107, 0.32) 38%, rgba(47, 50, 107, 0.12) 68%, rgba(47, 50, 107, 0.26) 100%),
          url("../../images/ChatGPT%20Image%20Sep%204,%202026,%2010_05_36%20AM%20(1).png");
        background-size: cover;
        background-position: center;
        border-radius: 24px;
        color: #fff;
      }

      .teacher-curriculum-hero .card-body {
        min-height: 80px;
        display: flex;
        flex-direction: row;
        align-items: stretch;
        justify-content: space-between;
        padding-bottom: 0.75rem;
      }

      /* Learner assessment records header: match the My Courses hero photo
         instead of the flat purple gradient from the assessment governance
         workspace section below (.assurance-hero). */
      #learner-assessment-records .assurance-hero-compact,
      #assessment-assurance-workspace .assurance-hero-compact {
        background-color: #2f326b;
        background-image:
          linear-gradient(90deg, rgba(47, 50, 107, 0.62) 0%, rgba(47, 50, 107, 0.32) 38%, rgba(47, 50, 107, 0.12) 68%, rgba(47, 50, 107, 0.26) 100%),
          url("../../images/ChatGPT%20Image%20Sep%204,%202026,%2010_05_36%20AM%20(1).png");
        background-size: cover;
        background-position: center;
      }

      /* This page's hero card sat almost flush against the top nav -- the
         shared .card-margin-top utility only adds space from 768px up, and
         even then it reads tighter than the gap Course Insights gives its
         own header panel. Give the hero card explicit breathing room at
         every width, scoped to this page only. */
      #learner-assessment-records.card-margin-top {
        margin-top: 2rem !important;
      }

      /* Keep the records content spacing intact while aligning only the hero
         card with the top of the learner sidebar. */
      @media (min-width: 768px) {
        #learner-assessment-records .assurance-hero {
          transform: translateY(-34px);
        }
      }

      #learner-assessment-records .assurance-back-button {
        background-color: var(--secondary-color);
        border-color: var(--secondary-color);
      }

      @media (min-width: 768px) {
        #learner-assessment-records .assurance-kpis {
          margin-top: -11px;
        }
      }

      @media (max-width: 767.98px) {
        #learner-assessment-records.card-margin-top {
          margin-top: 1.25rem !important;
        }
      }

      .teacher-curriculum-hero-main {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        flex: 1;
      }

      .teacher-curriculum-hero-main .hero-actions {
        margin-top: auto;
      }

      .teacher-curriculum-hero .hero-back {
        align-self: flex-start;
      }

      .teacher-curriculum-hero .academic-title,
      .teacher-curriculum-hero p,
      .teacher-curriculum-hero .small,
      .teacher-curriculum-hero .text-muted,
      .teacher-curriculum-hero .text-uppercase {
        color: #fff !important;
        text-shadow: 0 1px 2px rgba(0, 0, 0/ 40%);
      }

      /* Curriculum content page overrides */
      .teacher-subject-curriculum-page.container-fluid {
        margin-top: -0.6rem;
      }

      .teacher-subject-curriculum-page .teacher-curriculum-hero {
        margin-bottom: 0.75rem !important;
      }

      .teacher-subject-curriculum-page .teacher-curriculum-hero .card-body {
        min-height: 108px;
        padding-top: 0.65rem;
        padding-bottom: 0.45rem;
      }

      .teacher-subject-curriculum-page .teacher-curriculum-hero .academic-title {
        font-size: 1.26rem;
      }

      .teacher-subject-curriculum-page .teacher-curriculum-hero p,
      .teacher-subject-curriculum-page .teacher-curriculum-hero .small,
      .teacher-subject-curriculum-page .teacher-curriculum-hero .text-uppercase {
        font-size: 0.76rem;
      }

      .edit-content-type-wrapper {
        position: relative;
      }

      .edit-content-type-select {
        padding-right: 2.75rem;
        appearance: none;
        -webkit-appearance: none;
        -moz-appearance: none;
        background-image: none;
      }

      .edit-content-type-icon {
        position: absolute;
        top: 50%;
        right: 0.9rem;
        transform: translateY(-50%);
        color: #6c757d;
        pointer-events: none;
      }

      .learner-teams-page .learner-teams-empty-wrap {
        min-height: clamp(160px, 20vh, 220px);
        display: flex;
        align-items: center;
        justify-content: center;
      }

      .learner-teams-page.tables-margin-top {
        /* The learner shell already positions the content below its fixed
           navbar. A negative table offset pulled the page hero and the team
           card header underneath that navbar. Keep the complete Teams page
           in normal flow so its headings remain visible. */
        margin-top: 1rem !important;
      }

      /* The shared desktop shell reserves an extra 24px on its right edge.
         Give that width back only on the learner Teams page: its left edge
         stays fixed while the cards expand to an equal right-hand gutter. */
      @media (min-width: 768px) {
        .home-section:has(> .learner-teams-page) {
          width: calc(100% - 75px);
        }

        .learner-teams-page .learner-teams-groups-card,
        .learner-teams-page .learner-team-detail-card {
          margin-top: -7px;
        }
      }

      /* Empty-state desktop/tablet: the base -5.25rem pull-up (tuned for the
         populated teams list) drags the hero card up under the navbar when
         there's no list beneath it. Push it back down, same fix as the
         equivalent Learner Certificates empty state. */
      @media (min-width: 768px) {
        .academic-page.learner-teams-page.learner-teams-empty-page.tables-margin-top {
          margin-top: 0.425rem !important;
        }
      }

      /* Pull the "My Groups" hero card itself up an extra 7px, on top of
         whatever the container above it already contributes. */
      .learner-teams-page .teacher-curriculum-hero {
        margin-top: -7px !important;
      }

      .learner-teams-page .learner-teams-empty-state {
        width: 100%;
        margin: 0 auto;
        border-radius: 24px;
        overflow: hidden;
        background:
          radial-gradient(
            circle at top left,
            color-mix(in srgb, var(--primary-color, #6f42c1) 14%, #ffffff 86%) 0%,
            transparent 42%
          ),
          radial-gradient(
            circle at bottom right,
            color-mix(in srgb, var(--btn-color, var(--primary-color, #6f42c1)) 16%, #ffffff 84%) 0%,
            transparent 44%
          ),
          linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.99),
            color-mix(in srgb, var(--primary-color, #6f42c1) 6%, #ffffff 94%)
          );
        border: 1px solid color-mix(in srgb, var(--primary-color, #6f42c1) 10%, #e5e7eb 90%);
        box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
      }

      .learner-teams-page .learner-teams-empty-state .card-body {
        position: relative;
        padding: 1rem 1.5rem;
      }

      .learner-teams-page .learner-teams-empty-state .card-body::before {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        width: 8px;
        background: linear-gradient(
          180deg,
          color-mix(in srgb, var(--primary-color, #6f42c1) 78%, #ffffff 22%),
          color-mix(in srgb, var(--btn-color, var(--primary-color, #6f42c1)) 92%, #000000 8%)
        );
      }

      .learner-teams-page .learner-teams-empty-icon {
        width: 48px;
        height: 48px;
        margin: 0 auto 0.45rem;
        border-radius: 14px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 1.4rem;
        background: linear-gradient(
          135deg,
          color-mix(in srgb, var(--primary-color, #6f42c1) 86%, #ffffff 14%),
          color-mix(in srgb, var(--btn-color, var(--primary-color, #6f42c1)) 92%, #000000 8%)
        );
        box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14);
      }

      .learner-teams-page .learner-teams-empty-eyebrow {
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: var(--btn-color, var(--primary-color, #6f42c1));
      }

      .learner-teams-page .learner-teams-empty-title {
        font-size: clamp(1.15rem, 1.3vw, 1.4rem);
        font-weight: 700;
        color: #0f172a;
      }

      .learner-teams-page .learner-teams-empty-copy {
        max-width: 440px;
        margin-left: auto;
        margin-right: auto;
        font-size: 0.95rem;
        line-height: 1.5;
        color: #334155;
      }

      @media (max-width: 767.98px) {
        .learner-teams-page.tables-margin-top {
          margin-top: 0.75rem !important;
        }

        .learner-teams-page .learner-teams-empty-wrap {
          min-height: auto;
        }

        .learner-teams-page .learner-teams-empty-state .card-body {
          padding: 1.1rem 0.85rem;
        }

        .learner-teams-page .learner-teams-empty-icon {
          width: 44px;
          height: 44px;
          border-radius: 14px;
          font-size: 1.15rem;
        }

        .learner-teams-page .learner-teams-empty-title {
          font-size: 1.05rem;
        }

        .learner-teams-page .learner-teams-empty-copy {
          font-size: 0.9rem;
          line-height: 1.45;
        }
      }

      .learner-certificates-page .learner-certificates-empty-wrap {
        min-height: clamp(160px, 20vh, 220px);
        display: flex;
        align-items: center;
        justify-content: center;
      }

      .mobile-learner-home.learner-certificates-mobile-home {
        padding-bottom: 0 !important;
      }

      .learner-certificates-page .tables-margin-top {
        margin-top: -5.25rem !important;
      }

      /* Pull the hero card itself up an extra 7px, on top of whatever the
         row/container above it already contribute. */
      .learner-certificates-page .teacher-curriculum-hero {
        margin-top: -7px !important;
      }


      /* Empty-state desktop/tablet: the base -5.25rem pull-up (tuned for the
         populated table view) drags the hero card up under the navbar when
         there's no table beneath it. Push it back down, matching the
         equivalent mobile override below. */
      @media (min-width: 768px) {
        .academic-page.learner-certificates-page.learner-certificates-empty-page .tables-margin-top {
          margin-top: 0.85rem !important;
        }
      }

      .learner-certificates-page .learner-certificates-empty-state {
        width: 100%;
        margin: 0 auto;
        border-radius: 24px;
        overflow: hidden;
        height: auto !important;
        min-height: 0;
        max-height: none !important;
        display: block;
        background:
          radial-gradient(
            circle at top left,
            color-mix(in srgb, var(--primary-color, #6f42c1) 14%, #ffffff 86%) 0%,
            transparent 42%
          ),
          radial-gradient(
            circle at bottom right,
            color-mix(in srgb, var(--btn-color, var(--primary-color, #6f42c1)) 16%, #ffffff 84%) 0%,
            transparent 44%
          ),
          linear-gradient(
            180deg,
            rgba(255, 255, 255, 0.99),
            color-mix(in srgb, var(--primary-color, #6f42c1) 6%, #ffffff 94%)
          );
        border: 1px solid color-mix(in srgb, var(--primary-color, #6f42c1) 10%, #e5e7eb 90%);
        box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
      }

      .learner-certificates-page .learner-certificates-empty-inner {
        position: relative;
        padding: 1rem 1.5rem;
        height: auto !important;
        min-height: 0;
        max-height: none !important;
      }

      .learner-certificates-page .learner-certificates-empty-inner::before {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        width: 8px;
        background: linear-gradient(
          180deg,
          color-mix(in srgb, var(--primary-color, #6f42c1) 78%, #ffffff 22%),
          color-mix(in srgb, var(--btn-color, var(--primary-color, #6f42c1)) 92%, #000000 8%)
        );
      }

      .learner-certificates-page .learner-certificates-empty-icon {
        width: 48px;
        height: 48px;
        margin: 0 auto 0.45rem;
        border-radius: 14px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 1.55rem;
        background: linear-gradient(
          135deg,
          color-mix(in srgb, var(--primary-color, #6f42c1) 86%, #ffffff 14%),
          color-mix(in srgb, var(--btn-color, var(--primary-color, #6f42c1)) 92%, #000000 8%)
        );
        box-shadow: 0 16px 34px rgba(15, 23, 42, 0.14);
      }

      .learner-certificates-page .learner-certificates-empty-eyebrow {
        font-size: 0.72rem;
        font-weight: 700;
        letter-spacing: 0.1em;
        text-transform: uppercase;
        color: var(--btn-color, var(--primary-color, #6f42c1));
      }

      .learner-certificates-page .learner-certificates-empty-title {
        font-size: clamp(1.4rem, 1.55vw, 1.75rem);
        font-weight: 700;
        color: #0f172a;
      }

      .learner-certificates-page .learner-certificates-empty-copy {
        max-width: 520px;
        margin-left: auto;
        margin-right: auto;
        font-size: 0.92rem;
        line-height: 1.55;
        color: #475569;
      }

      @media (max-width: 767.98px) {
        /* These used to rely on the in-flow (non-fixed) .mobile-learner-hero
           above this container for top clearance under the navbar; that hero
           has been removed from the template, so give a small top gap here
           directly instead of zeroing it out. */
        .academic-page.learner-certificates-page {
          padding-top: 1rem !important;
        }

        .academic-page.learner-certificates-page .tables-margin-top {
          margin-top: 0 !important;
        }

        .academic-page.learner-certificates-page.learner-certificates-empty-page {
          width: 100% !important;
          max-width: 100% !important;
          box-sizing: border-box;
          padding-top: 1rem !important;
          padding-bottom: 6rem;
        }

        .academic-page.learner-certificates-page.learner-certificates-empty-page .tables-margin-top {
          margin-top: 0.85rem !important;
          justify-content: center;
        }

        /* Keep the empty card inside the mobile viewport. Bootstrap's row
           and column gutters otherwise shift this full-width card right. */
        .academic-page.learner-certificates-page.learner-certificates-empty-page > .row {
          --bs-gutter-x: 0;
          margin-left: 0 !important;
          margin-right: 0 !important;
        }

        .academic-page.learner-certificates-page.learner-certificates-empty-page > .row > .col-12 {
          padding-left: 0 !important;
          padding-right: 0 !important;
        }

        .academic-page.learner-certificates-page.learner-certificates-empty-page .learner-certificates-empty-state {
          max-width: 100%;
          box-sizing: border-box;
        }

        .academic-page.learner-certificates-page.learner-certificates-empty-page .mx-25 {
          display: flex;
          justify-content: center;
        }

        .learner-certificates-page .learner-certificates-empty-wrap {
          min-height: auto;
          margin-top: 0;
        }

        .academic-page.learner-certificates-page.learner-certificates-empty-page .learner-certificates-empty-wrap {
          width: 100%;
          min-height: calc(100vh - 22rem);
          align-items: flex-start;
          justify-content: center;
          padding: 0 0.1rem 6.5rem;
        }

        .learner-certificates-page .learner-certificates-empty-state {
          overflow: visible;
          width: min(100%, 29rem);
          margin-left: auto;
          margin-right: auto;
        }

        .learner-certificates-page .learner-certificates-empty-inner {
          padding: 1.35rem 0.95rem 1.4rem;
        }

        .learner-certificates-page .learner-certificates-empty-icon {
          width: 48px;
          height: 48px;
          border-radius: 14px;
          font-size: 1.2rem;
        }

        .learner-certificates-page .learner-certificates-empty-title {
          font-size: 1.15rem;
        }

        .learner-certificates-page .learner-certificates-empty-copy {
          font-size: 0.84rem;
          line-height: 1.45;
        }
      }

      /* Ensure page content is not hidden behind the bottom nav */
      .academic-page {
        padding-bottom: 4.5rem;
      }

      /* Tighter hero card on mobile: reduce height and font sizes */
      @media (max-width: 767.98px) {
        /* Base hero card-body is hardcoded to flex-direction: row (for
           desktop), which beats Bootstrap's "d-flex flex-column flex-md-row"
           utility classes on the element by specificity alone -- so the hero
           never actually stacked on mobile. Force column here so hero-main
           and hero-back (the Back button) stack full-width instead of being
           squeezed side by side. */
        .teacher-curriculum-hero .card-body {
          flex-direction: column;
          min-height: 58px;
          padding: 0.75rem 0.85rem;
        }
        .teacher-curriculum-hero .academic-title {
          font-size: 18px;
        }
        .teacher-curriculum-hero p,
        .teacher-curriculum-hero .small,
        .teacher-curriculum-hero .text-muted,
        .teacher-curriculum-hero .text-uppercase {
          font-size: 0.78rem;
        }
      }

      /* Shared Chief Luthuli academic layout (used for homepage,
         teacher_course_curriculum and curriculum_content across suits) */
      .academic-page {
        padding-top: 1.75rem;
      }

      /* Background colour for the teacher subject / course curriculum pages */
      .teacher-subject-curriculum-page {
        background-color: transparent;
      }

      .academic-page .academic-header {
        margin-bottom: 0.75rem;
      }

      .academic-page .academic-title {
        font-size: 24px;
        font-weight: 700;
        color: #111827;
      }

      .academic-page .academic-subtitle {
        font-size: 13px;
        color: #6b7280;
      }

      .academic-page .academic-tabs {
        border-bottom: 1px solid #e5e7eb;
        column-gap: 2.5rem;
      }

      .academic-page .academic-tab-link {
        border: none;
        background: transparent;
        padding: 0.4rem 0;
        font-size: 14px;
        font-weight: 600;
        color: #6b7280;
        position: relative;
      }

      .academic-page .academic-tab-link.active {
        color: #111827;
      }

      .academic-page .academic-tab-link.active::after {
        content: "";
        position: absolute;
        left: 0;
        right: 0;
        bottom: -6px;
        height: 3px;
        border-radius: 999px;
        background-color: var(--primary-color);
      }

      .academic-page .academic-tab-content {
        padding-top: 1.5rem;
      }

      /* Teacher subject / course curriculum page: smaller text + buttons on mobile */
      @media (max-width: 767.98px) {
        .teacher-subject-curriculum-page {
          font-size: 0.85rem;
        }
        .teacher-subject-curriculum-page .academic-title {
          font-size: 1.1rem;
        }
        .teacher-subject-curriculum-page .academic-subtitle,
        .teacher-subject-curriculum-page p,
        .teacher-subject-curriculum-page .small,
        .teacher-subject-curriculum-page .text-muted {
          font-size: 0.78rem;
        }
        .teacher-subject-curriculum-page .btn {
          font-size: 0.7rem;
          padding: 0.2rem 0.55rem;
        }

        /* Wrap the mobile week filters in a subtle card */
        .teacher-subject-curriculum-page .mobile-course-weeks {
          background: #ffffff;
          border-radius: 16px;
          padding: 0.5rem 0.75rem;
          box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
        }

        .teacher-subject-curriculum-page .curriculum-card h5 {
          font-size: 0.95rem;
        }
        .teacher-subject-curriculum-page .curriculum-card .text-xxs,
        .teacher-subject-curriculum-page .curriculum-card .badge {
          font-size: 0.7rem;
        }
        /* Curriculum card actions: two small buttons side by side on mobile */
        .teacher-subject-curriculum-page .curriculum-card .curriculum-actions {
          width: 100%;
          justify-content: space-between;
        }
        .teacher-subject-curriculum-page .curriculum-card .curriculum-actions .btn {
          font-size: 0.65rem;
          padding: 0.18rem 0.5rem;
          flex: 1 1 calc(50% - 0.5rem);
          text-align: center;
        }

        /* Mobile course curriculum pills + cards */
        .teacher-subject-curriculum-page .mobile-course-weeks {
          padding: 0.25rem 0.25rem 0.5rem;
          display: flex;
          flex-wrap: wrap;
          gap: 0.4rem;
        }

        .teacher-subject-curriculum-page .mobile-week-pill {
          border-radius: 999px;
          background-color: #f3f4ff;
          color: #4b5563;
          border: none;
          font-size: 0.75rem;
          padding: 0.35rem 0.8rem;
          flex: 1 0 calc(50% - 0.4rem);
          text-align: center;
        }

        .teacher-subject-curriculum-page .mobile-week-pill.active {
          background-color: var(--primary-color);
          color: #fff;
        }

        .teacher-subject-curriculum-page .mobile-course-curriculum {
          margin-top: 0.5rem;
        }

        .teacher-subject-curriculum-page .mobile-module-card-shell {
          border-radius: 18px;
          overflow: hidden;
        }

        .teacher-subject-curriculum-page .mobile-module-card-shell .mobile-module-card:last-child {
          margin-bottom: 0 !important;
        }

        .teacher-subject-curriculum-page .mobile-module-card {
          background: #e2e8f0;
          border-radius: 18px;
          padding: 0.85rem 0.9rem;
          box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
        }

        .teacher-subject-curriculum-page .mobile-module-index {
          width: 32px;
          height: 32px;
          border-radius: 999px;
          background: #eef2ff;
          color: #4f46e5;
          display: flex;
          align-items: center;
          justify-content: center;
          font-size: 0.8rem;
          font-weight: 700;
        }

        .teacher-subject-curriculum-page .mobile-module-title {
          font-size: 0.95rem;
          font-weight: 600;
          color: #0f172a;
          margin-top: 0.25rem;
        }

        .teacher-subject-curriculum-page .mobile-module-subtitle {
          font-size: 0.8rem;
          color: #6b7280;
        }

        .teacher-subject-curriculum-page .mobile-module-meta {
          font-size: 0.75rem;
          color: #6b7280;
        }

        .teacher-subject-curriculum-page .mobile-status-badge {
          font-size: 0.7rem;
          border-radius: 999px;
          padding: 0.15rem 0.6rem;
        }

        .teacher-subject-curriculum-page .mobile-status-complete {
          background: #dcfce7;
          color: #15803d;
        }

        .teacher-subject-curriculum-page .mobile-status-progress {
          background: #fef9c3;
          color: #a16207;
        }

        .teacher-subject-curriculum-page .mobile-status-notstarted {
          background: #e5e7eb;
          color: #374151;
        }

        .teacher-subject-curriculum-page .mobile-view-btn,
        .teacher-subject-curriculum-page .mobile-assessments-btn {
          font-size: 0.8rem;
          border-radius: 999px;
        }

        .teacher-subject-curriculum-page .mobile-view-btn {
          background-color: var(--navbar-bg-color);
          border-color: var(--navbar-bg-color);
        }

        .teacher-subject-curriculum-page .independent-assessment-card,
        .teacher-subject-curriculum-page .independent-assessment-mobile-card {
          padding: 1rem;
          border-radius: 20px;
        }

        .teacher-subject-curriculum-page .independent-assessment-icon {
          width: 3rem;
          height: 3rem;
        }

        .teacher-subject-curriculum-page .independent-assessment-mobile-card .mobile-module-index {
          background: var(--assessment-card-accent-soft);
          color: var(--assessment-card-accent);
        }

        .teacher-subject-curriculum-page .independent-assessment-card .curriculum-action-row,
        .teacher-subject-curriculum-page .independent-assessment-mobile-card .curriculum-action-row {
          width: 100%;
        }

        .teacher-subject-curriculum-page .independent-assessment-card .curriculum-action-btn,
        .teacher-subject-curriculum-page .independent-assessment-mobile-card .curriculum-action-btn,
        .teacher-subject-curriculum-page .independent-assessment-card .curriculum-lock-chip,
        .teacher-subject-curriculum-page .independent-assessment-mobile-card .curriculum-lock-chip {
          width: auto;
        }

        .teacher-subject-curriculum-page .independent-assessment-start-btn {
          flex: 0 0 2.75rem;
          height: 2.75rem;
          min-width: 2.75rem;
          width: 2.75rem;
        }

        /* Keep the curriculum content back button compact and visible on mobile.
           Pull it to the front of the now-column hero (order: -1) so it sits
           above the title instead of below the whole stack of admin action
           buttons (AI Generated Assessments, Add Content, etc.) -- otherwise
           it's pushed off the bottom of the hero and reads as broken/unreachable. */
        body.curriculum-content-layout .teacher-subject-curriculum-page .teacher-curriculum-hero .hero-back {
          order: -1;
          margin-top: 0;
          margin-bottom: 0.5rem;
          max-width: 100%;
        }

        body.curriculum-content-layout .teacher-subject-curriculum-page .teacher-curriculum-hero .hero-back .btn {
          display: inline-flex;
          align-items: center;
          justify-content: center;
          min-height: 2rem;
          min-width: 3.4rem;
          padding: 0.22rem 0.55rem;
          font-size: 0.68rem;
          line-height: 1;
          border-radius: 999px;
          white-space: nowrap;
        }
      }

@media (max-width: 767.98px) {
  .teacher-subject-curriculum-page .mobile-status-notstarted {
    background: #ccc;
    color: #374151;
  }
}

      /* Default subject / course card image */
      .teacher-subject-image {
        display: block;
        width: calc(100% - 10px);
        height: 140px;
        margin: 4px;
        background-image: url("../../images/ChatGPT%20Image%20Sep%204,%202026,%2010_05_36%20AM%20(1).png");
        background-size: cover;
        background-position: center;
        border-radius: 18px;
        object-fit: cover;
      }

      /* Learner home: use more of the content area and make course cards easier
         to scan without changing the shared teacher/admin card layouts. */
      .learner-home-dashboard-page .learner-home-subject-card {
        min-height: 360px;
      }

      .learner-home-dashboard-page .learner-home-subject-card .teacher-subject-image {
        height: 180px;
        background-image: url("../../images/ChatGPT%20Image%20Sep%204,%202026,%2010_05_36%20AM%20(1).png");
      }

      .learner-home-dashboard-page .learner-home-subject-card > .card-body {
        padding: 1.5rem;
      }

      .academic-page .card .btn-learner-progress {
        background-color: var(--navbar-bg-color);
        border-color: var(--navbar-bg-color);
        color: #000;
      }

      .academic-page .card .btn-learner-progress-link {
        background-color: var(--navbar-bg-color);
        border-color: var(--navbar-bg-color);
        color: #000;
      }

      /* Parent "My Children" cards (shared Chief Luthuli academic layout) */
      .children-card {
        border-radius: 18px;
        border: 1px solid #e5e7eb;
        position: relative;
        overflow: hidden;
      }

      /* Center child cards and let them fill the available width */
      body.parent-my-children-layout .children-card {
        margin-left: auto;
        margin-right: auto;
        width: 95%;
      }

      /* The "View Subjects" learner header card sits above a full-width
         subject-card row, so it should stay flush left/right like its
         siblings instead of the 95%-centered treatment above. */
      body.parent-my-children-layout .learner-subjects-header-card {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
      }

      /* Reclaim the full-width layout for the "My Children" page: the
         shared spacing utilities below assume a right-hand sidebar/widget,
         but this layout hides the sidebar instead, so neutralize their
         right-side margins/padding here. */
      body.parent-my-children-layout .margin-right {
        margin-right: 0 !important;
        padding-right: var(--bs-gutter-x, .75rem) !important;
      }

      body.parent-my-children-layout .card-gap {
        margin-right: 0 !important;
      }

      body.parent-my-children-layout .mobile-spacing {
        margin-right: 0 !important;
        margin-left: 0 !important;
      }

      .mobile-spacing {
        margin-right: 1rem !important;
        margin-left: -1rem !important;
      }

      .mobile-spacing-main {
          margin-right: 0rem !important;
          margin-left: -1rem !important;
      }

      .mobile-margin-bottom {
        margin-bottom: 8rem !important;
      }

      .margin-right{
        margin-right: 125px;
      }

      .container-mobile, .container-fluid-mobile{
          padding-right: var(--bs-gutter-x, 16.75rem);
          padding-left: var(--bs-gutter-x, .75rem);
          margin-right: auto;
          margin-left: auto;
      }

      .card-gap {
          gap: 1rem !important;
          margin-right: 379px;
      }

      /* Parent My Children â€“ mobile layout refinements */
      @media (max-width: 767.98px) {
        body.parent-my-children-layout .children-card {
          width: 100%;
          max-width: 100%;
          margin-left: 0;
          margin-right: 0;
        }

        .margin-right {
          margin-right: 0 !important;
        }

        .mobile-spacing {
          margin-right: 0.75rem !important;
          margin-left: 0.75rem !important;
        }

        .card-gap {
          gap: 0.75rem !important;
          margin-right: 0 !important;
        }
      }

      /* Thin top accent bar on each child card */
      .children-card::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        height: 4px;
        background: var(--secondary-color, #f9a8d4);
      }

      .children-name {
        font-weight: 600;
      }

      .parent-children-nav-link {
        border-radius: 18px;
        padding: 0.75rem 1rem;
        border: none;
        background: transparent;
        font-size: 14px;
        font-weight: 600;
        color: #374151;
      }

      .parent-children-nav-link.active {
        background: var(--navbar-bg-color);
        color: #fff;
      }

      .subject-pill {
        background-color: var(--sidebar-color, var(--primary-color));
        color: #f9fafb;
        font-size: 11px;
        padding: 0.2rem 0.75rem;
      }

      .grade-pill {
        background: var(--navbar-bg-color);
        color: #374151;
        font-size: 11px;
        padding: 0.2rem 0.9rem;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
      }

      .children-actions .btn {
        font-size: 12px;
        background: var(--secondary-color, #f9a8d4);
        border-color: var(--secondary-color, #f9a8d4);
        color: #ffffff;
        min-width: 120px;
      }

      .children-actions .btn:hover {
        filter: brightness(0.96);
        color: #ffffff;
      }

      @media (max-width: 767.98px) {
        .children-actions {
          width: 100%;
        }
      }

      /* Curriculum view learning mode layout */
      body.cv-learning-mode {
        /* Use the same light app background tone as the rest
           of the platform instead of a solid black */
        background-color: var(--bg-color, #f8f9ff);
        overflow: hidden;
      }

      /* Turn the Vue shell into a full-screen overlay */
      body.cv-learning-mode #curriculum-view-app {
        position: fixed;
        inset: 0;
        z-index: 1040;
      }

      body.cv-learning-mode #curriculum-view-app::before {
        content: "";
        position: absolute;
        inset: 0;
        background-color: var(--bg-color, #f8f9ff);
        z-index: 1035;
      }

      body.cv-learning-mode #curriculum-view-app > * {
        position: relative;
        z-index: 1036;
      }

      body.cv-learning-mode .cv-learning-layout {
        position: relative;
      }

      body.cv-learning-mode .cv-learning-background {
        position: absolute;
        inset: 0;
        background-color: var(--bg-color, #f8f9ff);
        z-index: 1035;
      }

      body.cv-learning-mode .cv-learning-main-wrapper {
        position: relative;
        z-index: 1036;
      }

      /* Hide the global sidebar and top learning navbar in learning mode,
         but keep the main profile-menu navbar visible */
      body.cv-learning-mode .sidebar.sidebar-md,
      body.cv-learning-mode .top-learning-navbar {
        display: none !important;
      }

      /* Hide global sidebars for parent My Children layout, but keep navbar */
      body.parent-my-children-layout .sidebar.sidebar-md {
        display: none !important;
      }

      /* Hide global sidebars for the parent learner progress overview page, but keep navbar */
      body.parent-learner-progress-layout .sidebar.sidebar-md {
        display: none !important;
      }

      /* Let the content shell reclaim the space freed by hiding the sidebar */
      body.parent-my-children-layout .home-section,
      body.parent-learner-progress-layout .home-section {
        left: 0;
        width: 100%;
        margin-left: 0 !important;
        margin-right: 0 !important;
      }

      body.parent-my-children-layout .navbar,
      body.parent-my-children-layout .home-section nav,
      body.parent-learner-progress-layout .navbar,
      body.parent-learner-progress-layout .home-section nav {
        left: 0;
        width: 100%;
      }

      /* Hide global sidebars when a parent views the curriculum page, but keep navbar */
      body.parent-curriculum-layout .sidebar.sidebar-md {
        display: none !important;
      }

      body.parent-curriculum-layout .home-section {
        left: 0;
        width: 100%;
        margin-left: 0 !important;
        margin-right: 0 !important;
      }

      body.parent-curriculum-layout .navbar,
      body.parent-curriculum-layout .home-section nav {
        left: 0;
        width: 100%;
      }

      body.parent-curriculum-layout .learner-activity-profile.card-margin-top {
        width: calc(100% - 3rem);
        max-width: 1480px;
        margin-left: auto !important;
        margin-right: auto !important;
      }

      .parent-learner-profile-topbar {
        justify-content: flex-start;
      }

      .parent-learner-profile-back {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        border-radius: 999px;
        padding: 0.65rem 1rem;
        border: none;
        background: var(--secondary-color, #f9a8d4);
        color: #ffffff;
        font-size: 12px;
        font-weight: 600;
        line-height: 1;
        text-decoration: none;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
      }

      .parent-learner-profile-back:hover {
        color: #ffffff;
        filter: brightness(0.97);
      }

      @media (max-width: 767.98px) {
        body.parent-curriculum-layout .learner-activity-profile.card-margin-top {
          width: calc(100% - 1.5rem);
        }

        .parent-learner-profile-back {
          padding: 0.55rem 0.9rem;
          font-size: 11px;
        }
      }

      body.parent-my-children-layout .academic-page .mx-25 {
        /* Center the main column and let cards control their own max-width */
        margin-left: auto !important;
        margin-right: auto !important;
        width: 100%;
      }

      /* Remove the centered max-width behaviour on the main column */
      body.cv-learning-mode .academic-page .mx-25 {
        margin-left: 0 !important;
        margin-right: 0 !important;
        max-width: 100% !important;
      }

      /* Make the learning layout truly full-screen and flush with edges */
      body.cv-learning-mode #curriculum-view-app > .container-fluid {
        height: 100%;
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin: 0 !important;
      }

      body.cv-learning-mode #curriculum-view-app > .container-fluid > .row {
        height: 100%;
        margin-left: 0 !important;
        margin-right: 0 !important;
      }

      body.cv-learning-mode #curriculum-view-app > .container-fluid > .row > .col-12 {
        height: 100%;
        padding-left: 0 !important;
        padding-right: 0 !important;
      }

      /* Remove extra gutters/margins so content touches the edges */
      body.cv-learning-mode .teacher-subject-curriculum-page {
        margin: 0 !important;
        padding: 0 !important;
      }

      /* Stretch sidebar + content card to full height */
      body.cv-learning-mode .cv-learning-layout {
        height: 100%;
        align-items: stretch;
      }

      body.cv-learning-mode .cv-learning-main {
        display: flex;
        flex-direction: column;
        height: 96%;
        margin-bottom: 0 !important; /* cancel Bootstrap mb-3 so bottoms align */
      }

      body.cv-learning-mode .cv-learning-main .card-body {
        flex: 1 1 auto;
        overflow-y: auto;
        display: flex;
        flex-direction: column;
        margin-bottom: 0 !important; /* remove space below buttons */
        padding-bottom: 0 !important; /* no padding under buttons */
      }

      /* In learning mode, push action buttons to the bottom of the card */
      body.cv-learning-mode .cv-learning-main .cv-learning-actions-row {
        margin-top: auto;
      }

      /* Notes should size to their content. The generic learning viewer is
         intentionally tall for video and embedded documents, but that leaves
         short notes floating in a large empty scroll area and hides Next. */
      body.cv-learning-mode .cv-learning-main--manual-note .cv-content-viewer--manual-note {
        flex: 0 0 auto;
        min-height: 0;
        max-height: none;
        overflow: visible;
      }

      body.cv-learning-mode .cv-learning-main--manual-note .cv-learning-actions-row {
        margin-top: 0.75rem;
      }

      .cv-learning-layout {
        min-height: calc(100vh - 120px);
      }

      .cv-learning-main {
        border-radius: 1rem;
      }

      .cv-learning-sidebar {
        display: block !important;
        position: relative;
        z-index: 1036;
        width: 100%;
        max-width: 320px;
      }

      /* ORCAA-style Up next sidebar in learning mode */
      body.cv-learning-mode .cv-upnext-sidebar {
        margin-top: 0 !important;
        padding: 1rem 0.75rem;
      }

      body.cv-learning-mode .cv-upnext-sidebar .upnes-sidebar {
        height: 100%;
        border-radius: 1rem;
        border: 1px solid rgba(0, 0, 0, 0.125);
        background-color: #ddd; /* match .learning-card background */
        padding: 0.75rem;
        box-shadow: 0 10px 24px rgba(15, 23, 42 / 12%);
      }

      body.cv-learning-mode .cv-upnext-sidebar-card {
        border: none;
        box-shadow: 0 4px 12px rgba(15, 23, 42 / 80%);
        background-color: #e6e6e6; /* slightly darker than white */
        height: auto;
        display: flex;
        flex-direction: column;
        flex: 1 1 auto;
      }

      body.cv-learning-mode .cv-upnext-sidebar .card-body {
        padding: 0.75rem 0.85rem;
        flex: 1 1 auto;
      }

      body.cv-learning-mode .cv-upnext-sidebar ul li + li {
        border-top: 1px solid rgba(0, 0, 0 / 40%);
        padding-top: 0.45rem;
      }

      body.cv-learning-mode .cv-upnext-active-card {
        border-radius: 18px;
        border: 1px solid rgba(0, 0, 0 / 6%);
        box-shadow: 0 6px 14px rgba(15 23 42 / 12%);
      }

      /* Main content viewer: tall but scrollable when content is long */
      .cv-content-viewer {
        min-height: 660px;
        max-height: 70vh;
        overflow-y: auto;
      }

      .cv-content-viewer.cv-content-viewer--embed {
        min-height: 0;
        max-height: none;
        overflow: visible;
      }

      /* Standalone curriculum-view-content page (content creator / admin, i.e.
         NOT the learner "learning mode" shell): the note/slide viewer must not
         be its own scroll container. Its own max-height:70vh + overflow-y:auto
         competed with the page scroll -- dragging the page scrollbar moved the
         card ~250px while the slides stayed trapped in a 660px box, so the
         visible scrollbar and the content fell out of sync. Let it grow with
         its content and scroll natively with the page (one scroll container).
         Learning mode keeps its bounded scroll; embeds and code challenges keep
         their bespoke layouts. */
      body.curriculum-view-content-page:not(.cv-learning-mode)
        .cv-content-viewer:not(.cv-content-viewer--embed):not(.cv-content-viewer--code-challenge) {
        max-height: none;
        overflow: visible;
      }

      .cv-content-viewer.cv-content-viewer--code-challenge {
        display: flex;
        flex-direction: column;
      }

      .cv-code-challenge-inline {
        background: #f7f4f1;
        border: 1px solid #e2d8cf;
        border-radius: 1rem;
        box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
        color: #211c18;
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        min-height: 100%;
        overflow: hidden;
      }

      .cv-code-challenge-inline > div {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        min-height: 0;
      }

      .cv-code-challenge-inline > div > div:not(.alert) {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        min-height: 0;
      }

      .cv-code-challenge-inline .text-center.py-4 {
        background: #ffffff;
        flex: 1 1 auto;
      }

      .cv-challenge-lab-card {
        background: #ffffff;
        border-radius: inherit;
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        min-height: 100%;
        overflow-x: hidden;
        overflow-y: auto;
      }

      /* Desktop: the lab has a fixed height and scrolls inside its own card,
         so the hint, Kubiki input and footer buttons are always reachable. */
      @media (min-width: 768px) {
        .cv-challenge-lab-card {
          height: min(80vh, 760px);
          min-height: 0;
        }
      }

      .cv-challenge-lab-head {
        align-items: center;
        background: #ffffff;
        border-bottom: 1px solid #e3d9d1;
        display: flex;
        gap: 0.85rem;
        justify-content: space-between;
        padding: 0.85rem 1rem;
      }

      .cv-challenge-title {
        color: #211c18;
        font-size: 1rem;
        font-weight: 800;
        line-height: 1.25;
      }

      .cv-challenge-meta {
        color: #7a7068;
        font-size: 0.76rem;
        font-weight: 700;
      }

      .cv-challenge-actions,
      .cv-challenge-switcher {
        align-items: center;
        display: flex;
        flex-wrap: wrap;
        gap: 0.45rem;
      }

      .cv-challenge-btn,
      .cv-challenge-switcher-btn,
      .cv-challenge-reset-btn {
        align-items: center;
        border-radius: 0.65rem;
        display: inline-flex;
        font-size: 0.78rem;
        font-weight: 800;
        gap: 0.35rem;
        justify-content: center;
        line-height: 1.1;
        min-height: 2.35rem;
        padding: 0.48rem 0.78rem;
      }

      .cv-challenge-btn-outline {
        background: #ffffff;
        border: 1px solid #d4c8bf;
        color: #211c18;
      }

      .cv-challenge-btn-success {
        background: #16b879;
        border: 1px solid #16b879;
        box-shadow: 0 10px 20px rgba(22, 184, 121, 0.22);
        color: #ffffff;
      }

      .cv-challenge-btn-success:disabled {
        opacity: 0.7;
      }

      .cv-challenge-switcher {
        background: #fbfaf8;
        border-bottom: 1px solid #e3d9d1;
        padding: 0.55rem 1rem;
      }

      .cv-challenge-switcher-btn {
        background: #ffffff;
        border: 1px solid #ded5ce;
        color: #554d47;
        min-height: 2rem;
        padding: 0.35rem 0.65rem;
      }

      .cv-challenge-switcher-btn.active {
        border-color: var(--primary-color);
        color: var(--primary-color);
      }

      .cv-challenge-lab-grid {
        display: grid;
        flex: 1 1 auto;
        grid-template-columns: minmax(220px, 0.95fr) minmax(320px, 1.45fr) minmax(320px, 1.35fr);
        min-height: 520px;
      }

      .cv-challenge-mission-panel {
        background: #fffdfa;
        border-right: 1px solid #e3d9d1;
        display: flex;
        flex-direction: column;
        min-width: 0;
        padding: 0.9rem 1rem;
      }

      .cv-challenge-mission-panel h6 {
        color: #7b6f68;
        font-size: 0.72rem;
        font-weight: 900;
        letter-spacing: 0.12em;
        margin: 0 0 0.55rem;
        text-transform: uppercase;
      }

      .cv-challenge-mission-panel p {
        color: #2f2925;
        font-size: 0.85rem;
        line-height: 1.5;
        margin: 0 0 0.85rem;
      }

      .cv-challenge-task-list {
        display: grid;
        gap: 0.45rem;
        list-style: none;
        margin: 0;
        padding: 0;
      }

      .cv-challenge-task-item {
        align-items: flex-start;
        color: #4a413b;
        display: grid;
        font-size: 0.8rem;
        gap: 0.48rem;
        grid-template-columns: auto 1fr;
        line-height: 1.35;
      }

      .cv-challenge-task-check {
        align-items: center;
        background: #f1eee9;
        border: 1px solid #dfd5cc;
        border-radius: 0.35rem;
        color: #8a7d72;
        display: inline-flex;
        font-size: 0.7rem;
        font-weight: 900;
        height: 1.15rem;
        justify-content: center;
        margin-top: 0.05rem;
        width: 1.15rem;
      }

      .cv-challenge-task-item.is-passed .cv-challenge-task-check {
        background: #17b879;
        border-color: #17b879;
        color: #ffffff;
      }

      .cv-challenge-task-item.is-failed .cv-challenge-task-check {
        background: #fff1f1;
        border-color: #f2b5b5;
        color: #b42318;
      }

      .cv-challenge-task-body {
        display: grid;
        gap: 0.2rem;
        min-width: 0;
      }

      .cv-challenge-task-body small,
      .cv-challenge-task-empty {
        color: #786f68;
        font-size: 0.72rem;
      }

      .cv-ada-panel {
        border-top: 1px solid #e8ded6;
        margin: 1rem -1rem 0;
        padding: 0.85rem 1rem 0;
      }

      .cv-ada-head {
        align-items: center;
        color: #201b18;
        display: flex;
        gap: 0.55rem;
        margin-bottom: 0.75rem;
      }

      .cv-ada-avatar {
        align-items: center;
        background: linear-gradient(135deg, #8d4cf6, #c847d9);
        border-radius: 0.55rem;
        color: #ffffff;
        display: inline-flex;
        flex: 0 0 1.95rem;
        font-size: 0.85rem;
        font-weight: 900;
        height: 1.95rem;
        justify-content: center;
        width: 1.95rem;
      }

      .cv-ada-head strong {
        display: block;
        font-size: 0.86rem;
        line-height: 1.1;
      }

      .cv-ada-head small {
        align-items: center;
        color: #10a86f;
        display: inline-flex;
        font-size: 0.72rem;
        font-weight: 700;
        gap: 0.25rem;
        line-height: 1.1;
      }

      .cv-ada-head small span {
        background: #10c47f;
        border-radius: 50%;
        display: inline-block;
        height: 0.42rem;
        width: 0.42rem;
      }

      .cv-ada-messages {
        display: grid;
        gap: 0.55rem;
        max-height: 10rem;
        overflow-y: auto;
        padding-right: 0.15rem;
      }

      .cv-ada-bubble {
        background: #ffffff;
        border: 1px solid #e2d7cf;
        border-radius: 0.65rem;
        color: #231f1c;
        font-size: 0.76rem;
        line-height: 1.4;
        padding: 0.62rem 0.68rem;
      }

      .cv-ada-bubble.is-user {
        background: #f2edff;
        border-color: #d8cbff;
      }

      .cv-ada-bubble strong {
        color: var(--primary-color);
        font-weight: 900;
        margin-right: 0.2rem;
      }

      .cv-ada-hint-btn {
        background: #ffffff;
        border: 1px solid #e0d6ce;
        border-radius: 0.55rem;
        color: #2a2420;
        font-size: 0.78rem;
        font-weight: 800;
        margin-top: 0.75rem;
        min-height: 2.45rem;
        padding: 0.45rem 0.75rem;
        width: 100%;
      }

      .cv-ada-hint-btn:hover {
        border-color: var(--primary-color);
        color: var(--primary-color);
      }

      .cv-ada-hint-btn:disabled,
      .cv-ada-send-btn:disabled,
      .cv-ada-input-row input:disabled {
        cursor: not-allowed;
        opacity: 0.68;
      }

      .cv-ada-input-row {
        display: grid;
        gap: 0.45rem;
        grid-template-columns: minmax(0, 1fr) auto;
        margin-top: 0.85rem;
      }

      .cv-ada-input-row input {
        background: #ffffff;
        border: 1px solid #e0d6ce;
        border-radius: 0.55rem;
        color: #26211d;
        font-size: 0.78rem;
        min-height: 2.3rem;
        min-width: 0;
        padding: 0.45rem 0.65rem;
      }

      .cv-ada-input-row input:focus {
        border-color: var(--primary-color);
        box-shadow: 0 0 0 0.15rem rgba(65, 0, 127, 0.12);
        outline: 0;
      }

      .cv-ada-send-btn {
        align-items: center;
        background: var(--primary-color);
        border: 0;
        border-radius: 0.55rem;
        color: #ffffff;
        display: inline-flex;
        font-size: 0.8rem;
        font-weight: 900;
        height: 2.3rem;
        justify-content: center;
        width: 2.3rem;
      }

      .cv-ada-send-btn:hover {
        background: #2f005f;
      }

      .cv-challenge-editor {
        background: #10141f;
        color: #e7edf8;
        display: flex;
        flex-direction: column;
        min-height: 520px;
        min-width: 0;
      }

      .cv-challenge-editor-tabs {
        align-items: flex-end;
        background: #10141f;
        border-bottom: 1px solid #262d3f;
        display: flex;
        gap: 0.18rem;
        min-height: 2.6rem;
        padding: 0.55rem 0.7rem 0;
      }

      .cv-challenge-editor-tab {
        align-items: center;
        border: 1px solid transparent;
        border-bottom: 0;
        border-radius: 0.55rem 0.55rem 0 0;
        color: #9aa5ba;
        display: inline-flex;
        font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
        font-size: 0.78rem;
        font-weight: 800;
        gap: 0.42rem;
        min-height: 2.05rem;
        padding: 0.42rem 0.65rem;
      }

      .cv-challenge-editor-tab.active {
        background: #171d2c;
        border-color: #36415c;
        color: #ffffff;
      }

      .cv-challenge-file-dot {
        border-radius: 50%;
        height: 0.5rem;
        width: 0.5rem;
      }

      .cv-challenge-file-dot--html {
        background: #ff6b5f;
      }

      .cv-challenge-file-dot--css {
        background: #63a5ff;
      }

      .cv-challenge-file-dot--js {
        background: #ffc457;
      }

      .cv-code-challenge-inline .code-editor-container {
        background: #10141f;
        border: 0;
        border-radius: 0;
        flex: 1 1 auto;
        height: auto;
        min-height: 0;
        resize: none;
      }

      .cv-code-challenge-inline .code-editor-container .line-numbers-editor {
        background: #10141f;
        border-right: 1px solid #222a3b;
        color: #647087;
        font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
        font-size: 0.82rem;
        padding-top: 0.85rem;
      }

      .cv-code-challenge-inline .code-editor-container textarea {
        color: #e7edf8;
        font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
        font-size: 0.86rem;
        line-height: 1.55;
        min-height: 0;
        padding: 0.85rem 1rem;
      }

      .cv-code-challenge-inline .code-editor-container textarea::placeholder {
        color: #7b8496;
      }

      .cv-challenge-editor-foot {
        align-items: center;
        border-top: 1px solid #262d3f;
        color: #778196;
        display: flex;
        font-size: 0.72rem;
        justify-content: space-between;
        min-height: 2.2rem;
        padding: 0.45rem 0.75rem;
      }

      .cv-challenge-reset-btn {
        background: transparent;
        border: 1px solid #344059;
        color: #d6deee;
        min-height: 1.6rem;
        padding: 0.2rem 0.55rem;
      }

      .cv-challenge-preview {
        background: #fbfaf8;
        display: flex;
        flex-direction: column;
        min-height: 520px;
        min-width: 0;
      }

      .cv-challenge-preview-top {
        align-items: center;
        border-bottom: 1px solid #e3d9d1;
        display: flex;
        gap: 0.55rem;
        min-height: 2.6rem;
        padding: 0.5rem 0.7rem;
      }

      .cv-challenge-preview-dots {
        display: inline-flex;
        flex: 0 0 auto;
        gap: 0.22rem;
      }

      .cv-challenge-preview-dots span {
        border-radius: 50%;
        height: 0.5rem;
        width: 0.5rem;
      }

      .cv-challenge-preview-dots span:nth-child(1) {
        background: #ff6559;
      }

      .cv-challenge-preview-dots span:nth-child(2) {
        background: #f7b84b;
      }

      .cv-challenge-preview-dots span:nth-child(3) {
        background: #25c96f;
      }

      .cv-challenge-preview-url {
        background: #ffffff;
        border: 1px solid #ded5ce;
        border-radius: 0.45rem;
        color: #7a7068;
        display: block;
        flex: 1 1 auto;
        font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
        font-size: 0.72rem;
        min-width: 0;
        overflow: hidden;
        padding: 0.28rem 0.55rem;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      .cv-code-challenge-inline .live-preview-iframe {
        border: 0;
        border-radius: 0;
        flex: 1 1 auto;
        height: auto;
        min-height: 0;
      }

      @media (max-width: 1199.98px) {
        .cv-challenge-lab-grid {
          grid-template-columns: minmax(220px, 0.8fr) minmax(320px, 1fr);
        }

        .cv-challenge-preview {
          grid-column: 1 / -1;
          min-height: 360px;
        }
      }

      @media (max-width: 767.98px) {
        .cv-challenge-lab-head {
          align-items: flex-start;
          flex-direction: column;
        }

        .cv-challenge-actions {
          width: 100%;
        }

        .cv-challenge-btn {
          flex: 1 1 8rem;
        }

        .cv-challenge-lab-grid {
          grid-template-columns: 1fr;
          min-height: 0;
        }

        .cv-challenge-mission-panel {
          border-bottom: 1px solid #e3d9d1;
          border-right: 0;
        }

        .cv-challenge-editor,
        .cv-challenge-preview {
          min-height: 340px;
        }
      }

      .curriculum-rich-text {
        color: #2d2d2d;
        font-size: 1.02rem;
        line-height: 1.5;
      }

      .curriculum-rich-text h1,
      .curriculum-rich-text h2,
      .curriculum-rich-text h3,
      .curriculum-rich-text h4,
      .curriculum-rich-text h5,
      .curriculum-rich-text h6 {
        margin-top: 1rem;
        margin-bottom: 0.4rem;
        font-weight: 700;
        color: #262626;
        line-height: 1.25;
      }

      .curriculum-rich-text h1 {
        font-size: 2.1rem;
      }

      .curriculum-rich-text h2 {
        font-size: 2rem;
      }

      .curriculum-rich-text h3 {
        font-size: 1.6rem;
      }

      .curriculum-rich-text p {
        margin: 0 0 0.8rem;
      }

      .curriculum-rich-text ul,
      .curriculum-rich-text ol {
        margin: 0 0 0.9rem;
        padding-left: 1.35rem;
      }

      .curriculum-rich-text li {
        margin: 0.2rem 0;
      }

      #curriculum-view-app .cv-learning-main-wrapper {
        min-width: 0;
      }

      .curriculum-note-table-scroll {
        max-width: 100%;
        overflow-x: auto;
        overscroll-behavior-x: contain;
        margin-bottom: 1rem;
      }

      .curriculum-note-table-scroll:focus-visible {
        outline: 2px solid currentColor;
        outline-offset: -2px;
      }

      .curriculum-rich-text table.curriculum-note-table {
        width: 100%;
        margin: 0 0 1rem;
        border-collapse: collapse;
        font-size: 0.92em;
      }

      .curriculum-rich-text table.curriculum-note-table th,
      .curriculum-rich-text table.curriculum-note-table td {
        padding: 0.55rem 0.75rem;
        border: 1px solid #e2e5ea;
        text-align: left;
        vertical-align: top;
      }

      .curriculum-rich-text table.curriculum-note-table th {
        background: var(--primary-color, #36006f);
        color: #fff;
        font-weight: 700;
      }

      .curriculum-rich-text table.curriculum-note-table tr:nth-child(even) td {
        background: #f8f9fb;
      }

      .curriculum-rich-text strong {
        font-weight: 700;
      }

      .curriculum-rich-text a {
        color: #0d6efd;
        text-decoration: underline;
        word-break: break-word;
      }

      /* Keep the note body readable at narrow learner widths. */
      .cv-content-viewer--manual-note .curriculum-rich-text {
        font-size: 1rem;
        line-height: 1.55;
      }

      .cv-content-viewer--manual-note .curriculum-rich-text p {
        font-size: inherit;
      }

      .cv-embed-wrapper {
        width: 100%;
        min-height: 72vh;
        max-height: 80vh;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        touch-action: pan-y;
        overscroll-behavior: contain;
        border: 1px solid rgba(15, 23, 42, 0.14);
        border-radius: 0.75rem;
        background: #ffffff;
      }

      /* Documents use the same explicit media viewport as videos. This is
         important on mobile, where PDF object fallbacks otherwise collapse
         to the height of their fallback text. */
      .cv-document-wrapper {
        width: 100%;
        height: 72vh;
        min-height: 520px;
        overflow: hidden;
        border: 1px solid rgba(15, 23, 42, 0.14);
        border-radius: 0.75rem;
        background: #ffffff;
      }

      .cv-embed-iframe {
        display: block;
        width: 100%;
        height: 72vh;
        min-height: 520px;
        border: 0;
      }

      .cv-embed-actions {
        display: flex;
        justify-content: flex-end;
      }

      /* Ensure video and play overlay are clickable */
      .cv-content-viewer .cv-video-wrapper {
        position: relative;
      }

      .cv-content-viewer .cv-video-overlay-play {
        position: absolute;
        inset: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        background: radial-gradient(circle, rgba(0,0,0,0.35) 0, rgba(0,0,0,0.6) 60%);
        color: #fff;
        font-size: 3rem;
        cursor: pointer;
        z-index: 2;
      }

      .cv-content-viewer .cv-video-overlay-play i {
        filter: drop-shadow(0 2px 4px rgba(0,0,0,0.6));
      }

      /* Keep the course-content video viewport compact. The video remains
         responsive, while its source is contained inside a shorter centered
         frame instead of expanding to the natural media height. */
      @media (min-width: 768px) {
        body.curriculum-view-content-page .cv-content-viewer {
          min-height: 0;
        }

        body.curriculum-view-content-page .cv-video-wrapper {
          width: 100%;
          height: min(56.25vw, 52vh, 520px);
          display: flex;
          align-items: center;
          justify-content: center;
          overflow: hidden;
          background: #0b0d12;
        }

        body.curriculum-view-content-page .cv-video-wrapper video {
          display: block;
          width: 100%;
          height: 100%;
          max-height: none;
          object-fit: contain;
          object-position: center;
        }
      }

      /* Let the viewer grow inside the flex card in learning mode */
      body.cv-learning-mode .cv-learning-main .cv-content-viewer {
        flex: 1 1 auto;
      }

      /* Mobile tweaks: adjust viewer height and shrink typography */
      @media (max-width: 767.98px) {
        /* Reduce overall viewer height so buttons sit closer */
        .cv-content-viewer {
          min-height: 260px;
          max-height: 60vh;
        }
        .cv-content-viewer.cv-content-viewer--embed {
          min-height: 0;
          max-height: none;
        }
        .cv-content-viewer.mb-3 {
          margin-bottom: 0.75rem !important;
        }
        .cv-learning-actions-row.mt-3 {
          margin-top: 0.75rem !important;
        }

        /* Give the video/iframe a taller minimum area on phones */
        .cv-content-viewer .cv-video-wrapper video,
        .cv-content-viewer .cv-embed-iframe {
          min-height: 280px;
        }
        .cv-embed-wrapper {
          min-height: 70vh;
          max-height: 78vh;
          overflow-y: auto;
          -webkit-overflow-scrolling: touch;
        }
        .cv-document-wrapper {
          height: 70vh;
          min-height: 420px;
          overflow: hidden;
        }

        .cv-image-preview {
          width: 100%;
          max-height: 70vh;
          overflow: auto;
          text-align: center;
          background: #fff;
        }

        .cv-image-preview img {
          display: block;
          width: 100%;
          height: auto;
          max-height: 70vh;
          object-fit: contain;
        }

        .cv-mobile-pdf-preview {
          width: 100%;
          max-height: 70vh;
          overflow-y: auto;
          -webkit-overflow-scrolling: touch;
          background: #e9ecef;
          padding: 0.75rem;
        }

        .cv-mobile-pdf-pages {
          display: flex;
          flex-direction: column;
          align-items: center;
          gap: 0.75rem;
        }

        .cv-mobile-pdf-toolbar {
          display: flex;
          align-items: center;
          justify-content: center;
          gap: 0.5rem;
          margin-bottom: 0.75rem;
        }

        .cv-mobile-pdf-page {
          display: block;
          width: 100%;
          height: auto;
          background: #fff;
          box-shadow: 0 1px 4px rgba(15, 23, 42, 0.2);
        }

        .cv-embed-iframe {
          height: 100%;
          min-height: 100%;
        }
        /* Extra-small text/buttons inside the curriculum view card */
        .curriculum-view-card h5 {
          font-size: 0.9rem;
        }
        .curriculum-view-card p,
        .curriculum-view-card .small {
          font-size: 0.72rem;
        }

        .cv-content-viewer--manual-note .curriculum-rich-text,
        .cv-content-viewer--manual-note .curriculum-rich-text p {
          font-size: 1rem;
          line-height: 1.55;
        }
        .curriculum-view-card .btn {
          font-size: 0.7rem;
          padding: 0.2rem 0.55rem;
        }
        .curriculum-rich-text {
          font-size: 0.95rem;
          line-height: 1.45;
        }
        .curriculum-rich-text h1 {
          font-size: 1.65rem;
        }
        .curriculum-rich-text h2 {
          font-size: 1.55rem;
        }
        .curriculum-rich-text h3 {
          font-size: 1.3rem;
        }
      }

      @media (min-width <= 1200px) {
        .cv-content-viewer {
          min-height: 560px;
        }
      }

      @media (min-width: 1200px) {
        body.cv-learning-mode .cv-learning-main {
          flex: 1 1 82%;
          max-width: 98%;
        }

        body.cv-learning-mode .cv-learning-sidebar {
          flex: 0 0 18%;
          max-width: 18%;
          order: 0;
        }

        body.cv-learning-mode .cv-learning-main-wrapper {
          order: 1;
          flex: 1 1 auto;
        }
      }

      .academic-page .card .btn-learner-progress:hover {
        opacity: 0.9;
      }

      .academic-page .card .btn-curriculum {
        background-color: var(--btn-color);
        border-color: var(--btn-color);
        color: #000;
      }

      .academic-page .card .btn-curriculum:hover {
        opacity: 0.9;
      }

      /* Term / week tabs on curriculum pages */
      .academic-page .learner-progress-terms .nav-link {
        color: #333;
        font-weight: 500;
        border-radius: 0;
        padding-bottom: 0.75rem;
        margin-right: 5.5rem;
      }

      .academic-page .learner-progress-terms .nav-link.active {
        border-color: transparent;
        border-bottom: 3px solid var(--navbar-bg-color);
        color: #000;
      }

      .academic-page .learner-progress-terms-detailed {
        background-color: var(--navbar-bg-color);
      }

      /* Question paper page: make typography denser on mobile for better fit */
      @media (max-width: 767.98px) {
        .question-paper-page {
          width: calc(100% - 0.3rem) !important;
          max-width: none !important;
          margin-left: auto !important;
          margin-right: auto !important;
          padding-left: 0.15rem !important;
          padding-right: 0.15rem !important;
          font-size: 0.85rem;
        }
        .question-paper-page > .card-body {
          padding-left: 0.35rem !important;
          padding-right: 0.35rem !important;
        }
        .question-paper-page .sticky-header {
          margin-left: 0 !important;
          margin-right: 0 !important;
        }
        .question-paper-page .card-header,
        .question-paper-page label,
        .question-paper-page p,
        .question-paper-page .form-check-label,
        .question-paper-page .mark a {
          font-size: 0.8rem;
        }
        /* The header's two spans ("Assessment: X" / "Pass Mark: Y") are a
           d-flex justify-content-between row with no wrap - a long
           assessment name has nowhere to go but wrap mid-span while
           "Pass Mark" stays pinned to the right, producing a jumbled
           two-line/two-column mess. Stack them instead on narrow screens. */
        .question-paper-page .card-header {
          flex-direction: column !important;
          align-items: flex-start !important;
          gap: 0.15rem;
        }
        .question-paper-page .card-header span {
          width: 100%;
        }
        .question-paper-page .btn {
          font-size: 0.7rem;
          padding: 0.2rem 0.5rem;
        }
        .question-paper-page .card {
          padding: 0.4rem 0.5rem;
        }
        .question-paper-page .question-row .card {
          margin-left: 0.2rem !important;
          margin-right: 0.2rem !important;
        }
      }

      /* Keep term tabs in a single horizontal row on mobile (scrollable) */
      @media (max-width: 767.98px) {
        .academic-page .learner-progress-terms {
          flex-wrap: nowrap;
          overflow-x: auto;
          overflow-y: hidden;
          white-space: nowrap;
        }

        .academic-page .learner-progress-terms .nav-item {
          flex: 0 0 auto;
        }

        .academic-page .learner-progress-terms .nav-link {
          margin-right: 0.75rem;
          font-size: 11px;
          padding: 0.25rem 0;
        }
      }

      /* Curriculum cards used on teacher / course curriculum page */
      .curriculum-card {
        background-color: rgba(228, 222, 222/80%);
        border-radius: 18px;
        box-shadow: 0 8px 16px rgba(0, 0, 0/50%);
      }

      .curriculum-card .curriculum-icon {
        width: 48px;
        height: 48px;
        background-color: var(--primary-color);
        color: #fff;
        font-size: 1.4rem;
      }

      /* Assessment tree styling reused on curriculum content page */
      .learner-activity-profile .learner-assessment-item-list {
        position: relative;
        margin-left: 1.75rem;
        padding-left: 1.25rem;
        border-left: 2px solid #888;
      }

      .learner-activity-profile .learner-assessment-item {
        position: relative;
        padding: 0.45rem 0.75rem;
        background: #dfdfdf;
        border-radius: 12px;
        box-shadow: 0 2px 6px rgba(0 0 0 / 4%);
        margin-bottom: 0.6rem;
      }

      .learner-activity-profile .learner-assessment-item::before {
        content: "";
        position: absolute;
        left: -1.25rem;
        top: 50%;
        width: 1.25rem;
        height: 1px;
        background: #888;
      }

      /* Suppress connector lines on curriculum_content page only */
      .curriculum-content-page .learner-assessment-item-list {
        border-left: none;
        margin-left: 0;
        padding-left: 0;
      }

      .curriculum-content-page .learner-assessment-item::before {
        background: none;
        width: 0;
      }

      .curriculum-content-page .learner-assessment-item .badge {
        display: inline-block;
      }

      .learner-activity-profile .learner-assessment-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 32px;
        border-radius: 12px;
        background: #ef9b9f;
        color: #fff;
        font-size: 0.9rem;
      }

      /* Compliance rule checklist (progress_reporting_tool/internCharts.html) */
      .learner-profile-page .compliance-check-list {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        margin-top: 0.6rem;
      }

      .learner-profile-page .compliance-check-row {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.65rem 0.85rem;
        background: #fff;
        border: 1px solid #e5e7eb;
        border-radius: 12px;
        transition: box-shadow 160ms ease;
      }

      .learner-profile-page .compliance-check-row:hover {
        box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
      }

      .learner-profile-page .compliance-check-row.is-passed {
        border-left: 3px solid #16a34a;
      }

      .learner-profile-page .compliance-check-row.is-failed {
        border-left: 3px solid #dc2626;
      }

      .learner-profile-page .compliance-check-icon {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        border-radius: 50%;
        flex: 0 0 auto;
        font-size: 0.85rem;
      }

      .learner-profile-page .compliance-check-row.is-passed .compliance-check-icon {
        background: #ecfdf3;
        color: #16a34a;
      }

      .learner-profile-page .compliance-check-row.is-failed .compliance-check-icon {
        background: #fef2f2;
        color: #dc2626;
      }

      .learner-profile-page .compliance-check-body {
        flex: 1 1 auto;
        min-width: 0;
      }

      .learner-profile-page .compliance-check-label {
        font-size: 0.86rem;
        font-weight: 600;
        color: #1f2937;
      }

      .learner-profile-page .compliance-check-source {
        font-weight: 400;
        color: #9ca3af;
        font-size: 0.78rem;
        margin-left: 0.35rem;
      }

      .learner-profile-page .compliance-check-values {
        display: flex;
        align-items: center;
        gap: 0.4rem;
        margin-top: 0.25rem;
        flex-wrap: wrap;
      }

      .learner-profile-page .compliance-check-value-item {
        display: inline-flex;
        align-items: baseline;
        gap: 0.3rem;
        font-size: 0.78rem;
      }

      .learner-profile-page .compliance-check-value-key {
        color: #9ca3af;
        font-weight: 500;
      }

      .learner-profile-page .compliance-check-value-val {
        color: #374151;
        font-weight: 600;
        background: #f3f4f6;
        padding: 0.05rem 0.4rem;
        border-radius: 6px;
      }

      .learner-profile-page .compliance-check-value-divider {
        color: #d1d5db;
        font-size: 0.75rem;
      }

      .learner-profile-page .compliance-check-chip {
        flex: 0 0 auto;
      }

        /* Shared rounded sidebar variant used across all clients */
      .orcaa-sidebar-variant.orcaa-sidebar-container {
        margin-top: 70px;
      }

      .orcaa-sidebar-variant .orcaa-sidebar {
        border-radius: 26px;
        border: 1px solid rgba(0, 0, 0/ 50%);
        background-color: var(--white);
        padding-top: 0.75rem;
        margin-top: 0.75rem;
      }

      .orcaa-sidebar-variant .nav {
        display: flex;
        flex-wrap: wrap;
        padding-left: 0;
        margin-bottom: -22px;
        list-style: none;
      }

      .orcaa-sidebar-variant .nav.p-4 {
        padding: 0.5rem !important;
      }

      .orcaa-sidebar-variant .nav-item {
        border-radius: 18px;
        margin: 0 0.75rem 0.85rem;
      }

      .orcaa-sidebar-variant .nav-item.active {
        margin-left: 0.15rem;
        margin-right: 0.15rem;
        width: calc(100% - 0.3rem);
        background-color: #6f7ab8;
        color: #fff;
        box-shadow: 0 10px 20px rgba(0, 0, 0/ 16%);
      }

      .orcaa-sidebar-variant .nav-item.active .nav-icon,
      .orcaa-sidebar-variant .nav-item.active .nav-text {
        color: #fff;
      }

      /* On mobile, strip extra padding/margin from the sidebar variant wrapper
         and make sure it uses the compact bottom-nav styling and navbar bg */
      @media (max-width: 767.98px) {
        .sidebar.sidebar-md .orcaa-sidebar-variant.orcaa-sidebar-container {
          margin: 0 !important;
          padding: 0 !important;
        }

        .sidebar.sidebar-md .orcaa-sidebar-variant .orcaa-sidebar {
          background-color: var(--navbar-bg-color) !important;
          border-radius: 0;
          border: none;
          margin-top: 0;
          padding-top: 0.2rem;
          padding-bottom: 0.2rem;
          height: auto;
          box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.12);
        }
      }

      .curriculum-card-background-light {
          background-color: #e0dbdb;
          border-radius: 15px;
          box-shadow: 0 2px 6px rgba(0, 0, 0/ 5%);
      }

      /* teacher_subject_curriculum locked-state refinements */
      .teacher-subject-curriculum-page .curriculum-card {
        position: relative;
        overflow: hidden;
        transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
      }

      .teacher-subject-curriculum-page .mobile-module-card {
        position: relative;
        overflow: hidden;
      }

      /* Match the left/right card gutter and top spacing used on the
         content_creator/view_course_curriculums card list */
      .teacher-subject-curriculum-page:not(.course-view-curriculum-page) .curriculum-list.d-none.d-md-block .curriculum-card {
        margin-left: 0;
        margin-right: 0;
        margin-top: 0.75rem;
      }

      /* Match the white "page card" look (border-0 shadow-sm) used for the
         course/subject cards on home_page, instead of the flat grey block */
      .teacher-subject-curriculum-page:not(.course-view-curriculum-page) .curriculum-list.d-none.d-md-block .curriculum-card {
        background-color: #fff;
        border: 1px solid rgba(15, 23, 42, 0.06);
        box-shadow: 0 2px 10px rgba(15, 23, 42, 0.08);
      }

      .teacher-subject-curriculum-page:not(.course-view-curriculum-page) .curriculum-list.d-none.d-md-block .curriculum-card:hover {
        box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
      }

      .teacher-subject-curriculum-page .curriculum-card--locked {
        background-image: linear-gradient(
          rgba(0, 0, 0, 0.1),
          rgba(0, 0, 0, 0.1)
        );
        border: 1px solid rgba(0, 0, 0, 0.14);
      }

      .teacher-subject-curriculum-page .curriculum-card--locked::before,
      .teacher-subject-curriculum-page .mobile-module-card--locked::before,
      .teacher-subject-curriculum-page .curriculum-card--available::before,
      .teacher-subject-curriculum-page .mobile-module-card--available::before,
      .teacher-subject-curriculum-page .curriculum-card--complete::before,
      .teacher-subject-curriculum-page .mobile-module-card--complete::before {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        width: 6px;
        pointer-events: none;
      }

      .teacher-subject-curriculum-page .curriculum-card--locked::before,
      .teacher-subject-curriculum-page .mobile-module-card--locked::before {
        background: color-mix(
          in srgb,
          var(--btn-color, #6f42c1) 78%,
          #000000 22%
        );
        opacity: 0.72;
      }

      .teacher-subject-curriculum-page .curriculum-card--available::before,
      .teacher-subject-curriculum-page .mobile-module-card--available::before {
        background: color-mix(
          in srgb,
          var(--primary-color, var(--btn-color, #6f42c1)) 72%,
          #ffffff 28%
        );
        opacity: 0.72;
      }

      .teacher-subject-curriculum-page .curriculum-card--complete::before,
      .teacher-subject-curriculum-page .mobile-module-card--complete::before {
        background: color-mix(
          in srgb,
          var(--primary-color, var(--btn-color, #6f42c1)) 84%,
          #ffffff 16%
        );
        opacity: 0.9;
      }

      .teacher-subject-curriculum-page .mobile-module-card--locked {
        background-image: linear-gradient(
          rgba(0, 0, 0, 0.1),
          rgba(0, 0, 0, 0.1)
        );
        border: 1px solid rgba(0, 0, 0, 0.14);
      }

      .teacher-subject-curriculum-page .curriculum-action-stack {
        min-width: 220px;
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
      }

      .teacher-subject-curriculum-page .curriculum-action-row {
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
        justify-content: flex-end;
      }

      .teacher-subject-curriculum-page .curriculum-action-btn {
        min-width: 168px;
        padding: 0.6rem 1rem;
        border-radius: 999px !important;
        font-size: 12px !important;
        line-height: 1.2;
        font-weight: 600;
        border: 1px solid transparent;
      }

      .teacher-subject-curriculum-page .curriculum-action-btn:hover,
      .teacher-subject-curriculum-page .curriculum-action-btn:focus {
        color: #fff;
      }

      .teacher-subject-curriculum-page .curriculum-action-btn--primary {
        background-color: var(--btn-color, #6f42c1);
        border-color: var(--btn-color, #6f42c1);
        color: var(--white, #fff);
      }

      .teacher-subject-curriculum-page .curriculum-action-btn--primary:hover,
      .teacher-subject-curriculum-page .curriculum-action-btn--primary:focus {
        background-color: var(--btn-color, #6f42c1);
        border-color: var(--btn-color, #6f42c1);
      }

      .teacher-subject-curriculum-page .curriculum-action-btn--secondary {
        background-color: var(--secondary-color, var(--primary-color, #6f42c1));
        border-color: var(--secondary-color, var(--primary-color, #6f42c1));
        color: var(--white, #fff);
      }

      .teacher-subject-curriculum-page .curriculum-action-btn--secondary:hover,
      .teacher-subject-curriculum-page .curriculum-action-btn--secondary:focus {
        background-color: var(--secondary-color, var(--primary-color, #6f42c1));
        border-color: var(--secondary-color, var(--primary-color, #6f42c1));
      }

      .teacher-subject-curriculum-page .curriculum-lock-chip {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.45rem;
        min-width: 168px;
        padding: 0.6rem 1rem;
        border-radius: 999px;
        font-size: 0.8rem;
        font-weight: 600;
        line-height: 1.1;
        border: 1px solid transparent;
        user-select: none;
      }

      .teacher-subject-curriculum-page .curriculum-lock-chip--content {
        background: rgba(255, 255, 255, 0.88);
        border-color: var(--primary-color, var(--btn-color, #6f42c1));
        color: var(--primary-color, var(--btn-color, #6f42c1));
      }

      .teacher-subject-curriculum-page .curriculum-lock-chip--assessment {
        background: rgba(255, 255, 255, 0.45);
        border-color: var(--primary-color, var(--btn-color, #6f42c1));
        color: var(--primary-color, var(--btn-color, #6f42c1));
      }

      .teacher-subject-curriculum-page .curriculum-manage-menu {
        position: fixed;
        left: var(--curriculum-manage-menu-left, 0);
        top: var(--curriculum-manage-menu-top, 0);
        width: 272px;
        max-width: calc(100vw - 1rem);
        max-height: calc(100vh - 1rem);
        overflow: hidden auto;
        padding: 0.6rem;
        display: flex;
        flex-direction: column;
        gap: 0.18rem;
        background: #fff;
        border: 1px solid rgb(15 23 42 / 7%);
        border-radius: 1.35rem;
        box-shadow: 0 18px 38px rgb(15 23 42 / 16%);
        z-index: 99999;
        visibility: hidden;
        pointer-events: none;
      }

      .teacher-subject-curriculum-page .curriculum-manage-menu.is-open {
        visibility: visible;
        pointer-events: auto;
      }

      .teacher-subject-curriculum-page .curriculum-manage-menu[aria-hidden="true"] {
        display: none !important;
      }

      .teacher-subject-curriculum-page .curriculum-manage-menu-item {
        width: 100%;
        display: flex;
        align-items: center;
        gap: 0.82rem;
        padding: 0.82rem 0.95rem;
        border: 0;
        border-radius: 1rem;
        background: transparent;
        appearance: none;
        box-shadow: none;
        color: #16233d;
        font-size: 0.93rem;
        font-weight: 700;
        line-height: 1.25;
        text-align: left;
        text-decoration: none;
        white-space: nowrap;
        letter-spacing: -0.01em;
        transition: background-color 0.15s ease, color 0.15s ease;
      }

      .teacher-subject-curriculum-page .curriculum-manage-menu-item:hover,
      .teacher-subject-curriculum-page .curriculum-manage-menu-item:focus {
        background: #f4f7fb;
        color: #101828;
      }

      .teacher-subject-curriculum-page .curriculum-manage-menu-item:focus-visible {
        outline: 2px solid rgb(13 110 253 / 22%);
        outline-offset: 2px;
      }

      .teacher-subject-curriculum-page .curriculum-manage-menu-item .menu-item-icon {
        width: 1.1rem;
        flex: 0 0 1.1rem;
        font-size: 1.08rem;
        line-height: 1;
        color: #16233d;
      }

      .teacher-subject-curriculum-page .curriculum-manage-menu .delete-curriculum-btn,
      .teacher-subject-curriculum-page .curriculum-manage-menu .delete-curriculum-btn .menu-item-icon {
        color: #dc3545;
      }

      .teacher-subject-curriculum-page .curriculum-manage-menu .delete-curriculum-btn:hover,
      .teacher-subject-curriculum-page .curriculum-manage-menu .delete-curriculum-btn:focus {
        background: rgb(220 53 69 / 9%);
        color: #b02a37;
      }

      .teacher-subject-curriculum-page .curriculum-manage-menu .delete-curriculum-btn:hover .menu-item-icon,
      .teacher-subject-curriculum-page .curriculum-manage-menu .delete-curriculum-btn:focus .menu-item-icon {
        color: #b02a37;
      }

      .teacher-subject-curriculum-page .independent-assessment-card,
      .teacher-subject-curriculum-page .independent-assessment-mobile-card {
        background: linear-gradient(135deg, #fff7ed 0%, #fffbeb 100%);
        border: 1px solid rgba(234, 88, 12, 0.24);
      }

      .teacher-subject-curriculum-page .independent-assessment-card::before,
      .teacher-subject-curriculum-page .independent-assessment-mobile-card::before {
        content: "";
        position: absolute;
        top: 0;
        bottom: 0;
        left: 0;
        width: 6px;
        pointer-events: none;
      }

      .teacher-subject-curriculum-page .independent-assessment-card--available::before {
        background: #ea580c;
        opacity: 0.86;
      }

      .teacher-subject-curriculum-page .independent-assessment-card--locked::before {
        background: #6b7280;
        opacity: 0.76;
      }

      .teacher-subject-curriculum-page .independent-assessment-icon {
        background: rgba(234, 88, 12, 0.13);
        color: #c2410c;
      }

      .teacher-subject-curriculum-page .independent-assessment-card--locked .independent-assessment-icon {
        background: rgba(107, 114, 128, 0.14);
        color: #4b5563;
      }

      .teacher-subject-curriculum-page .independent-assessment-kicker {
        color: #c2410c;
        font-size: 0.68rem;
        font-weight: 800;
        letter-spacing: 0.08em;
        line-height: 1.1;
        text-transform: uppercase;
      }

      .teacher-subject-curriculum-page .independent-assessment-title {
        color:var(--primary-color);
      }

      .teacher-subject-curriculum-page .independent-assessment-card--locked .independent-assessment-kicker,
      .teacher-subject-curriculum-page .independent-assessment-card--locked .independent-assessment-title {
        color: #374151;
      }

      .teacher-subject-curriculum-page .independent-assessment-start-btn {
        background: var(--btn-color);
        border-color: var(--btn-color);
        color: #fff;
      }

      .teacher-subject-curriculum-page .independent-assessment-start-btn:hover,
      .teacher-subject-curriculum-page .independent-assessment-start-btn:focus {
        background: var(--btn-color);
        border-color: var(--btn-color);
        color: #fff;
      }

      .teacher-subject-curriculum-page .independent-assessment-lock-chip {
        background: rgba(255, 255, 255, 0.68);
        border-color: var(--btn-color);
        color: #374151;
      }

      .teacher-subject-curriculum-page .independent-assessment-ready-badge {
        background: #fed7aa;
        color: #9a3412;
      }

      .teacher-subject-curriculum-page .independent-assessment-card,
      .teacher-subject-curriculum-page .independent-assessment-mobile-card {
        --assessment-card-accent: #e86674;
        --assessment-card-accent-soft: rgba(232, 154, 157, 0.14);
        background: #ffffff;
        border: 1px solid rgba(232, 154, 157, 0.18);
        border-bottom: 4px solid var(--assessment-card-accent);
        border-radius: 18px;
        box-shadow: 0 10px 22px rgba(15, 23, 42, 0.06);
        min-height: 160px;
        padding: 18px;
        transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
      }

      .teacher-subject-curriculum-page .independent-assessment-card:hover,
      .teacher-subject-curriculum-page .independent-assessment-card:focus-within,
      .teacher-subject-curriculum-page .independent-assessment-mobile-card:hover,
      .teacher-subject-curriculum-page .independent-assessment-mobile-card:focus-within {
        transform: translateY(-4px);
        box-shadow: 0 16px 36px rgba(15, 23, 42, 0.11);
        border-color: rgba(232, 154, 157, 0.3);
      }

      .teacher-subject-curriculum-page .independent-assessment-card--locked,
      .teacher-subject-curriculum-page .independent-assessment-mobile-card--locked {
        --assessment-card-accent: #94a3b8;
        --assessment-card-accent-soft: rgba(148, 163, 184, 0.16);
        border-color: rgba(148, 163, 184, 0.22);
      }

      .teacher-subject-curriculum-page .independent-assessment-card::before,
      .teacher-subject-curriculum-page .independent-assessment-mobile-card::before {
        content: none;
      }

      .teacher-subject-curriculum-page .independent-assessment-card .d-flex.align-items-start.gap-3,
      .teacher-subject-curriculum-page .independent-assessment-mobile-card .d-flex.align-items-start.gap-3 {
        gap: 12px !important;
      }

      .teacher-subject-curriculum-page .independent-assessment-icon {
        width: 54px;
        height: 54px;
        flex: 0 0 54px;
        background: var(--assessment-card-accent-soft);
        color: var(--assessment-card-accent);
        box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
      }

      .teacher-subject-curriculum-page .independent-assessment-icon i {
        font-size: 24px;
        line-height: 1;
      }

.teacher-subject-curriculum-page .independent-assessment-card--locked .independent-assessment-icon,
.teacher-subject-curriculum-page .independent-assessment-mobile-card--locked .independent-assessment-icon {
        background: rgba(148, 163, 184, 0.15);
        color: #64748b;
}

/* Bootstrap utilities handle the appearance; these are the only dimensions
   not available as standard Bootstrap utilities. */
.teacher-subject-curriculum-page .independent-assessment-card .independent-assessment-icon,
.teacher-subject-curriculum-page .independent-assessment-mobile-card .independent-assessment-icon {
  width: 48px;
  height: 48px;
  flex-basis: 48px;
}

.teacher-subject-curriculum-page .independent-assessment-card .curriculum-action-row .btn,
.teacher-subject-curriculum-page .independent-assessment-mobile-card .curriculum-action-row .btn {
  min-height: 26px;
  min-width: 122px;
  flex: 0 0 auto;
}

@media (min-width: 768px) {
  .teacher-subject-curriculum-page .independent-assessment-card .independent-assessment-start-btn {
    flex: 0 0 auto !important;
    min-width: 122px !important;
  }
}

      .teacher-subject-curriculum-page .independent-assessment-title,
      .teacher-subject-curriculum-page .mobile-module-title.independent-assessment-title {
        color: #1f2937;
        font-size: 16px;
        font-weight: 700;
        line-height: 1.3;
      }

      .teacher-subject-curriculum-page .independent-assessment-card p.text-muted,
      .teacher-subject-curriculum-page .independent-assessment-mobile-card .mobile-module-subtitle,
      .teacher-subject-curriculum-page .independent-assessment-mobile-card .mobile-module-meta {
        color: #6b7280 !important;
        font-size: 12px;
        line-height: 1.45;
      }

      .teacher-subject-curriculum-page .independent-assessment-card .curriculum-action-stack,
      .teacher-subject-curriculum-page .independent-assessment-mobile-card .curriculum-action-stack {
        min-width: 0;
        width: auto;
      }

      .teacher-subject-curriculum-page .independent-assessment-card .curriculum-action-row,
      .teacher-subject-curriculum-page .independent-assessment-mobile-card .curriculum-action-row {
        align-items: center;
        gap: 0.65rem;
        justify-content: flex-end;
      }

      .teacher-subject-curriculum-page .independent-assessment-card .curriculum-action-btn,
      .teacher-subject-curriculum-page .independent-assessment-mobile-card .curriculum-action-btn,
      .teacher-subject-curriculum-page .independent-assessment-card .curriculum-lock-chip,
      .teacher-subject-curriculum-page .independent-assessment-mobile-card .curriculum-lock-chip {
        max-width: none;
        width: auto;
      }

      .teacher-subject-curriculum-page .independent-assessment-start-btn {
        align-items: center;
        background: var(--assessment-card-accent);
        border-color: var(--assessment-card-accent);
        border-radius: 50%;
        color: #fff;
        box-shadow: 0 10px 20px rgba(232, 154, 157, 0.22);
        display: inline-flex;
        flex: 0 0 2.75rem;
        height: 2.75rem;
        justify-content: center;
        min-width: 2.75rem;
        padding: 0;
        width: 2.75rem;
      }

      .teacher-subject-curriculum-page .independent-assessment-start-btn:hover,
      .teacher-subject-curriculum-page .independent-assessment-start-btn:focus {
        background: var(--assessment-card-accent);
        border-color: var(--assessment-card-accent);
        color: #fff;
        box-shadow: 0 14px 26px rgba(232, 154, 157, 0.28);
        transform: translateY(-1px);
      }

      .teacher-subject-curriculum-page .independent-assessment-start-btn i {
        font-size: 1rem;
        line-height: 1;
      }

      .teacher-subject-curriculum-page .curriculum-lock-note {
        max-width: 320px;
        margin-left: auto;
        color: var(--text-secondary, #666);
        font-size: 0.76rem;
        line-height: 1.45;
        text-align: right;
      }

      /* Compact curriculum card layout for content_creator/view_course_curriculums */
      .course-view-curriculum-page .combined-curriculum-card {
        padding: 0.7rem 0.8rem !important;
        border-radius: 12px;
      }

      .course-view-curriculum-page .curriculum-item {
        margin-top: 0.05rem !important;
        margin-bottom: 0.05rem !important;
        padding-top: 0.05rem !important;
        padding-bottom: 0.05rem !important;
      }

      .course-view-curriculum-page .combined-curriculum-card.mx-4 {
        margin-left: 0.55rem !important;
        margin-right: 0.55rem !important;
      }

      .course-view-curriculum-page .curriculum-card .curriculum-icon {
        width: 36px;
        height: 35px;
        font-size: 0.92rem;
      }

      .course-view-curriculum-page .curriculum-item-name {
        font-size: 0.74rem !important;
        line-height: 1.2;
        margin-bottom: 0.2rem !important;
      }

      .course-view-curriculum-page .curriculum-card .text-xs,
      .course-view-curriculum-page .curriculum-card .text-xxs,
      .course-view-curriculum-page .curriculum-card .badge {
        font-size: 0.64rem !important;
      }

      .course-view-curriculum-page .curriculum-card .text-muted span.fw-bold,
      .course-view-curriculum-page .curriculum-card .fw-bold.video_count,
      .course-view-curriculum-page .curriculum-card .fw-bold.note_count,
      .course-view-curriculum-page .curriculum-card .fw-bold.assessment_count {
        font-size: 0.64rem;
      }

      .teacher-subject-curriculum-page .curriculum-progress-wrap {
        max-width: 380px;
        min-width: min(100%, 220px);
        width: 100%;
      }

      .teacher-subject-curriculum-page .curriculum-progress-label {
        align-items: center;
        color: #4f5666;
        display: flex;
        font-size: 0.64rem;
        font-weight: 400 !important;
        gap: 0.65rem;
        justify-content: space-between;
        line-height: 1.2;
        margin-bottom: 0.28rem;
      }

      .teacher-subject-curriculum-page .curriculum-progress-label strong {
        color: #14b87a !important;
        flex: 0 0 auto;
        font-size: 0.66rem;
        font-weight: 900;
      }

      .teacher-subject-curriculum-page .curriculum-progress-track {
        background: rgba(65, 0, 127, 0.12);
        border-radius: 999px;
        height: 0.42rem;
        overflow: hidden;
        position: relative;
        width: 100%;
      }

      .teacher-subject-curriculum-page .curriculum-progress-fill {
        background:#14b87a;
        border-radius: inherit;
        display: block;
        height: 100%;
        min-width: 0;
        transition: width 0.25s ease;
      }

      .teacher-subject-curriculum-page .mobile-curriculum-progress {
        max-width: 100%;
      }

      .course-view-curriculum-page .curriculum-card--managed {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0.75rem;
      }

      .course-view-curriculum-page .curriculum-card--managed .curriculum-card-main {
        width: 100%;
        min-width: 0;
      }

      .course-view-curriculum-page .curriculum-card--managed .curriculum-card-copy {
        min-width: 0;
      }

      .course-view-curriculum-page .curriculum-card--managed .curriculum-card-actions {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: stretch;
        margin-top: 0 !important;
      }

      .course-view-curriculum-page .curriculum-card--managed .curriculum-action-row {
        display: flex;
        width: 100%;
        justify-content: flex-end;
      }

      .course-view-curriculum-page .curriculum-action-stack {
        min-width: 154px;
        gap: 0.35rem;
      }

      .course-view-curriculum-page .curriculum-action-row {
        gap: 0.35rem;
      }

      .course-view-curriculum-page .curriculum-action-btn,
      .course-view-curriculum-page .curriculum-lock-chip {
        min-width: 122px;
        padding: 0.32rem 0.62rem;
        font-size: 0.64rem !important;
      }

      /* Curriculum card actions use the same button standard as the page header. */
      .course-view-curriculum-page .curriculum-card .curriculum-actions .btn {
        min-height: 26px;
        min-width: 122px;
        padding: 5px 16px !important;
        border: 1px solid transparent !important;
        border-radius: 0.375rem !important;
        background: var(--btn-outline-primary-bg, var(--secondary-color, #0d6efd)) !important;
        color: var(--btn-outline-primary-text, #fff) !important;
        font-family: "Poppins", sans-serif !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        line-height: 1.2 !important;
        box-shadow: none !important;
      }

      /* Dropdown actions remain neutral instead of inheriting the filled
         primary-button treatment used by the card action buttons. */
      .course-view-curriculum-page .curriculum-card .curriculum-manage-menu-item {
        min-height: 26px;
        min-width: 122px;
        padding: 5px 16px !important;
        border: 1px solid transparent !important;
        border-radius: 0.375rem !important;
        background: transparent !important;
        color: #1f2937 !important;
        font-family: "Poppins", sans-serif !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        line-height: 1.2 !important;
        box-shadow: none !important;
      }

      .course-view-curriculum-page .curriculum-card .curriculum-actions .btn:hover,
      .course-view-curriculum-page .curriculum-card .curriculum-actions .btn:focus-visible {
        background: var(--btn-outline-primary-hover-bg, var(--secondary-color, #0d6efd)) !important;
        border-color: transparent !important;
        color: var(--btn-outline-primary-hover-text, #fff) !important;
        box-shadow: none !important;
      }

      .course-view-curriculum-page .curriculum-card .curriculum-manage-menu-item:hover,
      .course-view-curriculum-page .curriculum-card .curriculum-manage-menu-item:focus-visible {
        background: #f8fafc !important;
        border-color: transparent !important;
        color: #111827 !important;
        box-shadow: none !important;
      }

      .course-view-curriculum-page .curriculum-card .curriculum-manage-menu-item.delete-curriculum-btn,
      .course-view-curriculum-page .curriculum-card .curriculum-manage-menu-item.delete-curriculum-btn .menu-item-icon {
        color: #dc3545 !important;
      }

      .course-view-curriculum-page .curriculum-card .curriculum-manage-menu-item.delete-curriculum-btn:hover,
      .course-view-curriculum-page .curriculum-card .curriculum-manage-menu-item.delete-curriculum-btn:focus-visible {
        background: rgb(220 53 69 / 8%) !important;
        color: #b02a37 !important;
      }

      .course-view-curriculum-page .curriculum-card .curriculum-manage-menu-item .menu-item-icon {
        color: currentColor !important;
      }

      .course-view-curriculum-page .curriculum-lock-chip {
        gap: 0.22rem;
      }

      .course-view-curriculum-page .curriculum-card .d-flex.flex-wrap.gap-3.text-xxs {
        gap: 0.6rem !important;
      }

      .course-view-curriculum-page .curriculum-actions {
        margin-top: 0.55rem !important;
      }

      @media (min-width: 768px) {
        .course-view-curriculum-page .curriculum-card--managed {
          flex-direction: row;
          align-items: center;
          gap: 0.9rem;
        }

        .course-view-curriculum-page .curriculum-card--managed .curriculum-card-main {
          flex: 1 1 auto;
          width: auto;
        }

        .course-view-curriculum-page .curriculum-card--managed .curriculum-card-actions {
          width: auto;
          display: flex;
          flex-direction: column;
          align-items: stretch;
          margin-left: auto !important;
          align-self: center;
        }

        .course-view-curriculum-page .curriculum-card--managed .curriculum-action-row {
          width: auto;
        }
      }

      .course-view-curriculum-page .curriculum-card .d-flex.justify-content-end.mb-2 {
        margin-bottom: 0.35rem !important;
      }

      .teacher-subject-curriculum-page .mobile-status-locked {
        background: rgba(255, 255, 255, 0.84);
        border: 1px solid var(--btn-color, #6f42c1);
        color: var(--btn-color, #6f42c1);
      }

      /* Monitoring vs Curriculum tabs on teacher_subject_curriculum */
      .teacher-subject-curriculum-page .teacher-monitor-tabs {
        display: flex;
        align-items: center;
        column-gap: 2rem; /* more spacing between tabs */
      }

      .teacher-subject-curriculum-page .teacher-monitor-tabs .btn-link {
        font-size: 0.9rem;
        color: #6b7280;
        border-bottom: 2px solid transparent;
        border-radius: 0;
      }

      .teacher-subject-curriculum-page .teacher-monitor-tabs .btn-link.fw-semibold {
        color: var(--primary-color, #6f42c1);
        border-bottom-color: var(--primary-color, #6f42c1);
      }

      @media (max-width: 767.98px) {
        .teacher-subject-curriculum-page .curriculum-action-stack {
          width: 100%;
          min-width: 0;
        }

        .teacher-subject-curriculum-page .mobile-module-actions {
          margin-top: 1rem;
        }

        .teacher-subject-curriculum-page .curriculum-action-row {
          justify-content: flex-start;
          width: 100%;
        }

        .teacher-subject-curriculum-page .curriculum-action-btn,
        .teacher-subject-curriculum-page .curriculum-lock-chip,
        .teacher-subject-curriculum-page .curriculum-lock-note {
          width: 100%;
          max-width: none;
          text-align: left;
        }

        .teacher-subject-curriculum-page .curriculum-manage-menu {
          width: min(15.5rem, calc(100vw - 0.75rem));
          max-width: calc(100vw - 0.75rem);
          max-height: calc(100vh - 0.75rem);
          padding: 0.38rem;
          border-radius: 1.1rem;
          box-shadow: 0 14px 32px rgb(15 23 42 / 16%);
          z-index: 99999;
        }

        .teacher-subject-curriculum-page .curriculum-manage-menu-item {
          padding: 0.5rem 0.6rem;
          font-size: 0.72rem;
          line-height: 1.1;
          gap: 0.5rem;
          border-radius: 0.85rem;
        }

        .teacher-subject-curriculum-page .curriculum-manage-menu-item .menu-item-icon {
          width: 0.95rem;
          flex: 0 0 0.95rem;
          font-size: 0.95rem;
        }

        .course-view-curriculum-page .combined-curriculum-card.mx-4 {
          margin-left: 0.15rem !important;
          margin-right: 0.15rem !important;
        }

        .course-view-curriculum-page .combined-curriculum-card {
          padding: 0.65rem 0.7rem !important;
        }

        .course-view-curriculum-page .curriculum-item {
          width: 100%;
          margin-left: 0 !important;
          margin-right: 0 !important;
          padding-left: 0 !important;
          padding-right: 0 !important;
        }

        .course-view-curriculum-page .curriculum-item > [class*="col-"] {
          width: 100%;
          max-width: 100%;
          padding-left: 0 !important;
          padding-right: 0 !important;
        }

        .course-view-curriculum-page .curriculum-item .combined-curriculum-card,
        .course-view-curriculum-page .curriculum-item .combined-curriculum-card.mx-4 {
          width: 100%;
          max-width: 100%;
          margin-left: 0 !important;
          margin-right: 0 !important;
          box-sizing: border-box;
        }

        body:has(.course-view-curriculum-page) .course-view-curriculum-page .curriculum-content-page > .col-12 {
          padding-left: 0 !important;
          padding-right: 0 !important;
        }

        body:has(.course-view-curriculum-page) .course-view-curriculum-page .teacher-curriculum-hero,
        body:has(.course-view-curriculum-page) .course-view-curriculum-page .mobile-course-curriculum,
        body:has(.course-view-curriculum-page) .course-view-curriculum-page .curriculum-list {
          width: 100% !important;
          max-width: 100% !important;
          margin-left: 0 !important;
          margin-right: 0 !important;
          box-sizing: border-box;
        }

        body:has(.course-view-curriculum-page) .course-view-curriculum-page .teacher-curriculum-hero {
          margin-top: -30px !important;
        }
      }

      .learning-card {
          position: relative;
          display: flex;
          flex-direction: column;
          min-width: 0;
          word-wrap: break-word;
          background-color: #fff;
          background-clip: border-box;
          border: 1px solid rgba(0, 0, 0, .125);
          border-radius: .25rem;
      }

      /* Make the learning card more compact on mobile */
      @media (max-width: 767.98px) {
        .learning-card {
          border-radius: 0.75rem;
        }
        .learning-card .card-body {
          padding: 0.75rem 0.9rem;
        }
        .learning-card.mt-2 {
          margin-top: 0.5rem !important;
        }
        .learning-card.mb-3 {
          margin-bottom: 0.75rem !important;
        }
      }
      .brand {
        display: flex;
        align-items: center;
        justify-content: space-between;
        margin-bottom: 30px;
      }
  
      .brand-wrapper {
        display: flex;
        align-items: center;
        gap: 10px;
      }
  
      .brand-icon {
        min-width: 24px;
        height: 24px;
        background-color: var(--orcaa-sidebar-primary);
        transform: rotate(45deg);
        border-radius: 4px;
      }
  
      .brand-name {
        font-weight: 600;
        font-size: 18px;
        color: var(--orcaa-sidebar-text-dark);
        white-space: nowrap;
        overflow: hidden;
        opacity: 1;
        transition: opacity 0.2s ease;
      }
  
      .collapsed .brand-name {
        opacity: 0;
        width: 0;
      }
  
      .orcaa-sidebar-container  .toggle-sidebar {
        width: 30px;
        height: 30px;
        background-color: var(--orcaa-sidebar-primary);
        color: var(--orcaa-sidebar-white);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
        transition: transform 0.3s ease;
        box-shadow: 0 2px 5px var(--orcaa-sidebar-shadow-dark);
      }
  
      .collapsed .toggle-sidebar {
        transform: rotate(180deg);
      }
  
      .orcaa-sidebar-container  .section-heading {
        font-size: 12px;
        text-transform: uppercase;
        color: var(--orcaa-sidebar-text-light);
        font-weight: 600;
        margin: 20px 0 10px 15px;
        letter-spacing: 0.5px;
        white-space: nowrap;
        overflow: hidden;
        transition: opacity 0.2s ease;
      }
  
      .orcaa-sidebar-container  .collapsed .section-heading {
        opacity: 0;
        height: 10px;
        margin: 10px 0 5px 0;
      }
  
      .orcaa-sidebar-container  .nav-item {
        display: flex;
        align-items: center;
        padding: 9px 15px;
        border-radius: 10px;
        margin-top: 0.4rem;
        margin-bottom: -0.5rem;
        color: #000;
        text-decoration: none;
        transition: all 0.2s ease;
        cursor: pointer;
        white-space: nowrap;
        overflow: hidden;
        position: relative;
        font-size: 12px;
      }
  
      .orcaa-sidebar-container  .collapsed .nav-item {
        padding: 12px;
        justify-content: center;
      }
  
      .orcaa-sidebar-container  .nav-item:hover {
        background-color: var(--orcaa-sidebar-hover-bg);
        color: #000;
        width: 50%
      }

      .card-margin-top-programme-view {
          margin-top: -0.5rem !important;
      }
        
      .orcaa-sidebar-container  .nav-item.active {
        background-color: var(--sidebar-color);
        color: #000;
        width: 80%;
      }

      /* On programme details sidebar, ensure hover width matches active width */
      .app-programme-cards-list .nav-item:hover {
        width: 80%;
      }

      .orcaa-sidebar-container  .nav-icon {
        min-width: 16px;
        margin-right: 10px;
        font-size: 14px;
        opacity: 0.8;
        text-align: center;
        color: #000;
      }

      img.nav-icon {
        width: 40px;
        height: 40px;
        object-fit: contain;
        vertical-align: -8px;
      }

      /* Slightly larger icons for programme details sidebar */
      .app-programme-cards-list .nav-icon {
        font-size: 18px;
        min-width: 20px;
      }
  
      .orcaa-sidebar-container  .collapsed .nav-icon {
        margin-right: 0;
      }
  
      .orcaa-sidebar-container  .nav-text {
        transition: opacity 0.1s ease;
        font-size: 13px;
        color: #000;
      }
  
      .orcaa-sidebar-container  .collapsed .nav-text {
        opacity: 0;
        width: 0;
      }

      /* Distinguish active state between main section buttons
         and inner options on the programme cards sidebar.
         - Main headers keep the standard accent (var(--sidebar-color))
         - Selected inner options use a light grey background */
      .app-programme-cards-list #programme-sidebar-accordion > .nav-item.active,
      .app-home-list #home-admin-fixed-sidebar > .nav-item.active,
      .app-home-list #home-default-sidebar > .nav-item.active,
      .app-home-list .home-root-link.active,
      .app-course-list #admin-course-sidebar > .nav-item.active,
      .app-course-list #learner-course-sidebar > .nav-item.active,
      .app-course-list #teacher-course-sidebar > .nav-item.active {
        background-color: var(--sidebar-color);
      }

      .app-programme-cards-list #programme-sidebar-accordion .collapse .nav-item.active {
        background-color: #f2f2f2;
      }

      /* Keep label visible for programme cards header even when collapsed */
      .orcaa-sidebar-container .programme-cards-header.collapsed .nav-text {
        opacity: 1;
        width: auto;
      }

      /* Keep label visible for Learners header when its submenu is collapsed */
      .orcaa-sidebar-container .nav-item[data-programme-section="learners"].collapsed .nav-text {
        opacity: 1;
        width: auto;
      }

      /* Keep label visible for Evaluation, Courses, Assessments, Settings and Attendance headers when collapsed */
      .orcaa-sidebar-container .nav-item[data-programme-section="evaluation"].collapsed .nav-text,
      .orcaa-sidebar-container .nav-item[data-programme-section="courses"].collapsed .nav-text,
      .orcaa-sidebar-container .nav-item[data-programme-section="assessments"].collapsed .nav-text,
      .orcaa-sidebar-container .nav-item[data-programme-section="programme-settings"].collapsed .nav-text,
      .orcaa-sidebar-container .nav-item[data-programme-section="system-management"].collapsed .nav-text,
      .orcaa-sidebar-container .nav-item[data-programme-section="attendance"].collapsed .nav-text {
        opacity: 1;
        width: auto;
      }
  
      .orcaa-sidebar-container  .dropdown-toggle {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
      }
  
      .orcaa-sidebar-container  .dropdown-toggle::after {
        display: none;
      }
  
      .orcaa-sidebar-container  .dropdown-toggle .bi-chevron-down {
        transition: transform 0.2s;
        font-size: 14px;
      }
  
      .orcaa-sidebar-container  .collapsed .dropdown-toggle .bi-chevron-down {
        opacity: 0;
        width: 0;
      }
  
      .orcaa-sidebar-container  .dropdown-toggle[aria-expanded="true"] .bi-chevron-down {
        transform: rotate(180deg);
      }
  
      .orcaa-sidebar-container  .dropdown-menu {
        position: static !important;
        width: 100%;
        padding: 0;
        margin: 0 0 5px 0;
        border: none;
        box-shadow: none;
        transform: none !important;
        background: transparent;
      }

      .orcaa-sidebar-container  .recruitment-dropdown-menu {
        margin: 4px 0 5px 0;
      }

      .orcaa-sidebar-container  .programme-dropdown-menu {
        margin: 4px 0 5px 0;
      }
  
      .orcaa-sidebar-container  .collapsed .dropdown-menu {
        position: absolute !important;
        left: 100% !important;
        top: 0 !important;
        width: 180px;
        background: var(--orcaa-sidebar-white);
        box-shadow: 0 5px 15px var(--orcaa-sidebar-shadow-medium);
        border-radius: 8px;
        padding: 8px;
        margin-left: 5px;
        display: none; /* Hidden by default in collapsed mode */
      }
  
      .orcaa-sidebar-container  .collapsed .dropdown:hover .dropdown-menu {
        display: block; /* Show on hover in collapsed mode */
      }
  
      .orcaa-sidebar-container  .dropdown-item {
        padding: 8px 15px 8px 44px;
        color: #777;
        border-radius: 10px;
        margin-bottom: 2px;
        font-size: 14px;
      }

      .orcaa-sidebar-container  .recruitment-dropdown-menu .dropdown-item {
        padding: 8px 15px;
      }

      .orcaa-sidebar-container  .programme-dropdown-menu .dropdown-item {
        padding: 8px 15px;
      }

      .orcaa-sidebar-container  .dropdown-menu .nav-icon {
        font-size: 13px;
        min-width: 14px;
        margin-right: 8px;
      }
  
      .collapsed .dropdown-item {
        padding: 8px 15px;
      }
  
      .orcaa-sidebar-container  .dropdown-item:hover {
        background-color: var(--orcaa-sidebar-hover-bg);
        color: var(--orcaa-sidebar-text-dark);
      }
  
      .orcaa-sidebar-container  .dropdown-item.active {
        background-color: var(--orcaa-sidebar-light-bg);
        color: var(--orcaa-sidebar-primary);
      }
  
      .orcaa-sidebar-container  .collapsed .nav-item:hover .nav-tooltip {
        display: block;
      }
  
      .orcaa-sidebar-container  .nav-tooltip {
        display: none;
        position: absolute;
        left: calc(100% + 10px);
        top: 0;
        background: var(--orcaa-sidebar-white);
        width: 180px;
        padding: 12px 15px;
        border-radius: 8px;
        box-shadow: 0 5px 15px var(--orcaa-sidebar-shadow-medium);
        color: var(--orcaa-sidebar-text-medium);
        z-index: 100;
      }
  
      .premium-container {
        margin-top: auto;
        background-color: var(--orcaa-sidebar-light-bg);
        border-radius: 12px;
        padding: 20px;
        position: relative;
        overflow: hidden;
        margin-bottom: 94px;
        transition: all 0.3s ease;
      }
  
      .premium-content {
        position: relative;
        z-index: 2;
      }
  
      .premium-title {
        font-weight: 600;
        font-size: 16px;
        margin-bottom: 8px;
      }
  
      .premium-description {
        font-size: 12px;
        color: var(--orcaa-sidebar-text-medium);
        margin-bottom: 15px;
      }
  
      .premium-button {
        background-color: var(--orcaa-sidebar-primary);
        color: var(--orcaa-sidebar-white);
        border: none;
        border-radius: 8px;
        padding: 8px 15px;
        font-size: 11px;
        cursor: pointer;
        width: 100%;
        transition: all 0.2s;
      }
  
      .premium-button:hover {
        background-color: var(--orcaa-sidebar-primary-dark);
      }
  
      .premium-illustration {
        position: absolute;
        right: 72px;
        width: 83px;
        z-index: 1;
      }
      
      .premium-container
      {
        display: none;
      }

      .premium-illustration
      {
        display: none;
      }
    

      .table>thead {
        vertical-align: bottom;
        z-index: auto;
    }



 /*----------------- END  Orcaa new sidebar ----------------- */ 


/* ----------------- Manage Program section-----------------  */
      .bg-team-member-1
      {
        background:var(--team-member-1);
      }

      .bg-team-member-2
      {
        background:var(--team-member-2);
      }

      .tabs-container {  
        padding: 0 35px;
      }

      .tabs-container  .nav-pills {
        display: flex;
        flex-wrap: nowrap;
        gap: 10px;
        margin-bottom: 1rem;
        scrollbar-width: thin;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 5px;
        overflow-x: auto;
      }

      /* Hide scrollbar for Chrome, Safari and Opera */
      .tabs-container  .nav-pills::-webkit-scrollbar {
        height: 4px;
      }

      /* Handle */
      .tabs-container  .nav-pills::-webkit-scrollbar-thumb {
        background: var(--color-border);
        border-radius: 4px;
      }

      .tabs-container  .nav-item .nav-link {
        border-radius: 12px;
        padding: 12px 16px;
        display: flex;
        flex-direction: column;
        align-items: center;
        background: var(--color-card);
        color: var(--color-text);
        border: 1px solid var(--color-border);
        box-shadow: 0 2px 4px rgba(0,0,0,0.04);
        min-width: 80px;
      }

      .tabs-container  .nav-item .nav-link.active {
        background-color: var(--color-all-light);
        color: var(--color-all);
        border-color: var(--color-all-border);
      }

      .tabs-container  .nav-item .nav-link i {
        font-size: 22px;
        margin-bottom: 4px;
      }

      .tabs-container  .nav-text {
        font-size: 12px;
        font-weight: 500;
      }

      /* ----------- Tab specific styles ----------- */
      .program-detail-tab { color: var(--color-all) !important; } 

      .active.program_detail_tab {
        background-color: var(--color-all-light) !important;
        border-color: var(--color-all-border);
      }



  
      .programme-management-card {
        background: var(--color-card);
        border-radius: 12px;
        margin-top: 20px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.06);
        border: 1px solid var(--color-border);
      }

      .tabs-container  .card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        border-bottom: 1px solid var(--color-border);
        padding-bottom: 15px;
        margin-bottom: 15px;
      }

      .programme-management-title {
        font-weight: 600;
        color: white;
        margin-bottom: 0;
      }

      .black-outline {
        border: 2px solid #000000;
        border-radius: 20px;
    }

      .recruit-outline {
        border: 1px solid #1c1515;
        border-radius: 15px;
    }
      .programme-management-badge {
        font-size: 11px;
        padding: 4px 10px;
        border-radius: 20px;
      }

      .programme-badge {
        background-color: var(--color-all-light);
        color: var(--color-all);
      }


      .tabs-container  .card-content {
        color: var(--color-text);
        font-size: 14px;
      }

      .tabs-container  .team-members {
        font-size: 12px;
        color: var(--color-text-light);
        margin-top: 15px;
        text-align: right;
      }

      .avatar-group {
        display: inline-flex;
        margin-left: 8px;
      }

      .avatar {
        width: 50px;
        height: 43px;
        border-radius: 50%;
        color: #000;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 10px;
        font-weight: bold;
        margin-left: -8px;
        border: 2px solid white;
      }

      .tabs-container .tab-pane {
        display: none;
      }

      .tabs-container  .tab-pane.active {
        display: block;
      }
/* ----------------- END  Manage Program section-----------------  */
  

/* ----------------- Chat whindow -----------------*/

      .chat-button {
        position: fixed;
        bottom: 30px;
        right: 30px;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        background-color: #b197fc;
        display: flex;
        justify-content: center;
        align-items: center;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        cursor: pointer;
        z-index: 100;
        transition: all 0.3s ease;
      }

      .chat-button:hover {
        transform: scale(1.05);
      }

      .chat-icon {
        color: white;
        font-size: 24px;
        left: 18px;
        top: 9px;
        position: absolute;
      }

      .close-button {
        position: fixed;
        bottom: 30px;
        right: 100px;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        background-color: #b197fc;
        display: flex;
        justify-content: center;
        align-items: center;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        cursor: pointer;
        z-index: 100;
        transition: all 0.3s ease;
        opacity: 0;
        pointer-events: none;
      }

      .close-button.active {
        opacity: 1;
        pointer-events: auto;
      }

      .chat-window {
        position: fixed;
        bottom: 100px;
        right: 30px;
        width: 320px;
        height: 450px;
        background-color: #fff;
        border-radius: 15px;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
        overflow: hidden;
        display: flex;
        flex-direction: column;
        opacity: 0;
        transform: translateY(20px);
        pointer-events: none;
        transition: all 0.3s ease;
        z-index: 99;
      }

      .chat-window.active {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
      }

      .chat-header {
        padding: 15px 20px;
        background-color: #b197fc;
        display: flex;
        justify-content: space-between;
        align-items: center;
      }

      .chat-header-title {
        display: flex;
        align-items: center;
        color: #fff;
        font-weight: bold;
      }

      .chat-header-icon {
        margin-right: 10px;
        font-size: 20px;
      }

      .chat-header-actions {
        display: flex;
      }

      .chat-body {
        flex-grow: 1;
        padding: 10px;
        overflow-y: auto;
        background-color: #f9f9f9;
        display: flex;
        flex-direction: column;
      }

      .chat-input-container {
        padding: 10px;
        background-color: #fff;
        border-top: 1px solid #eee;
      }

      .chat-input {
        width: 100%;
        padding: 10px 15px;
        border-radius: 20px;
        border: 1px solid #ddd;
        outline: none;
        font-size: 11px;
      }

      .message {
        max-width: 70%;
        padding: 10px 15px;
        margin: 5px 0;
        border-radius: 15px;
        font-size: 14px;
        line-height: 1.4;
      }

      .user-message {
        align-self: flex-end;
        background-color: #fff;
        border: 1px solid #eee;
        border-bottom-right-radius: 5px;
      }

      .user-message-container {
        display: flex;
        justify-content: flex-end;
        align-items: flex-start;
        margin: 5px 0;
      }

      .agent-message {
        align-self: flex-start;
        background-color: #b197fc;
        color: #fff;
        border-bottom-left-radius: 5px;
      }

      .agent-message-container {
        display: flex;
        justify-content: flex-start;
        align-items: flex-start;
        margin: 5px 0;
      }

      .avatar {
        width: 50px;
        height: 43px;
        border-radius: 50%;
        overflow: hidden;
        margin: 0 5px;
      }

      .avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
      }

      .send-button {
        position: absolute;
        right: 16px;
        bottom: 59px;
        width: 25px;
        height: 25px;
        border-radius: 50%;
        background-color: var(--dark-purple);
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;
      }

/* ----------------- END  Chat window -----------------*/


/*----------------- Assesment layout -----------------*/

      .slide-container {
        max-width: 1000px;
        margin: 0 auto;
        position: relative; 
      }

      .slide-container .progress-bar-container {
        height: 15px !important;
        background-color: #6610f2 !important;
        border-radius: 30px !important;
        position: relative;
        margin-bottom: 20px;
      }

      .slide-container .progress-indicator {
        width: 40px;
        height: 40px;
        background-color: #d3d3d3 !important;
        border-radius: 50%;
        position: absolute;
        top: -12px;
        left: 43%;
        z-index: 10;
      }

      .slide-container .main-content
      {
        max-width: 100%!important;
      }

      .slide-container .content-container {
        display: flex;
        gap: 30px;
      }

      .main-content {
        flex: 5;
        background-color: white;
        border-radius: 15px;
        padding: 0;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        position: relative;
        overflow: hidden;
        margin: 0px;
      }

      .card-content {
        padding: 25px;
      } 

      .key-takeaway {
        flex: 1;
        background-color: #f0f0f0;
        border-radius: 15px;
        padding: 20px;
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
      }

      .explanation-text {
        font-size: 1.1rem;
        line-height: 1.6;
      }

      .takeaway-header {
        font-weight: bold;
        margin-bottom: 15px;
        color: #333;
        font-size: 13px
      }

      .takeaway-content {
        font-size: 0.9rem;
        line-height: 1.5;
      }

/*-----------------END  Assesment layout -----------------*/


/* ----------------- QUIZE Assesment modal ----------------- */

      .modal-learning-modal-container  .card {
        width: 350px;
        border-radius: 25px;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        overflow: hidden;
        max-height: 85vh;
        display: flex;
        flex-direction: column;
      }

      .modal-learning-modal-container .card-header {
        background-color: white;
        border-bottom: none;
        padding: 20px;
      }

      .modal-learning-modal-container .card-body {
        background-color: white;
        padding: 0;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: #d0d0d0 #f5f7ff;
      }

      .modal-learning-modal-container .card-body::-webkit-scrollbar {
        width: 6px;
      }

      .modal-learning-modal-container.card-body::-webkit-scrollbar-track {
        background: #f5f7ff;
      }

      .modal-learning-modal-container .card-body::-webkit-scrollbar-thumb {
        background-color: #d0d0d0;
        border-radius: 10px;
      }

      .modal-learning-modal-container .sub-topics-item {
        background-color: #f5f7ff;
        border-radius: 15px;
        margin: 10px 20px;
        padding: 15px;
        display: flex;
        align-items: center;
        justify-content: space-between;
      }

      .modal-learning-modal-container .sub-topics-icon {
        width: 45px;
        height: 45px;
        background-color: var(--dark-purple);
        color: white;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 15px;
      }

      .modal-learning-modal-container .sub-topics-icon.disabled {
        background-color: #d0d0d0;
      }

      .modal-learning-modal-container .sub-topics-info {
        flex: 1;
      }

      .modal-learning-modal-container .sub-topics-title {
        font-weight: 600;
        margin-bottom: 4px;
      }

      .modal-learning-modal-container .sub-topics-date {
        color: #888;
        font-size: 0.8rem;
      }

      .modal-learning-modal-container .header-title {
        font-weight: bold;
      }

      .modal-learning-modal-container .header-subtitle {
        color: #888;
        font-size: 0.9rem;
      }

      .wave-icon {
        margin-right: 10px;
      }

      .background-shapes .shape {
        position: absolute;
        z-index: -1;
        opacity: 0.7;
      }

      .shape-1 {
        top: 10%;
        left: 5%;
        width: 60px;
        height: 60px;
        background-color: var(--accent-teal);
        border-radius: 10px;
        transform: rotate(45deg);
      }

      .shape-2 {
        bottom: 15%;
        left: 10%;
        width: 100px;
        height: 100px;
        background-color: var(--primary-purple-light);
        border-radius: 50%;
      }

      .shape-3 {
        top: 20%;
        right: 10%;
        width: 70px;
        height: 70px;
        background-color: var(--accent-teal);
        border-radius: 50%;
      }

      .shape-4 {
        bottom: 20%;
        right: 5%;
        width: 80px;
        height: 80px;
        background-color: var(--accent-teal);
        border-radius: 12px;
        transform: rotate(15deg);
      }

      .quize-section .container {
        max-width: 900px;
      }

      .quize-section .card {
        border-radius: 15px;
        border: none;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        padding: 2rem;
      }

      .quize-section .progress {
        height: 10px;
        background-color: var(--light-purple-bg);
      }

      .quize-section .progress-bar {
        background-color: var(--primary-purple);
      }

      .quize-section .quiz-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-bottom: 2rem;
      }

      .quize-section .quiz-title {
        font-weight: 600;
        color: var(--text-dark);
        margin-bottom: 0;
      }

      .quiz-subtitle {
        color: #6c757d;
        font-size: 0.9rem;
      }

      .quiz-actions {
        display: flex;
        align-items: center;
        gap: 15px;
      }

      .btn-review {
        background-color: var(--medium-gray);
        color: var(--text-dark);
        border-radius: 20px;
        padding: 6px 15px;
        font-size: 0.85rem;
        border: none;
      }

      .btn-back {
        background-color: var(--light-gray);
        color: var(--text-dark);
        border-radius: 20px;
        padding: 6px 15px;
        font-size: 0.85rem;
        border: 1px solid #dee2e6;
      }

      .quize-section .timer {
        display: flex;
        align-items: center;
        gap: 5px;
        color: var(--text-dark);
        font-weight: 500;
      }

      .timer i {
        color: var(--primary-purple);
      }

      .question-container {
        margin-top: 2rem;
        padding: 1rem 0;
      }

      .question-number {
        font-size: 0.9rem;
        color: #6c757d;
        margin-bottom: 0.5rem;
      }

      .question-text {
        font-weight: 500;
        color: var(--text-dark);
        margin-bottom: 1.5rem;
      }

      .options-container {
        margin-top: 1rem;
      }

      .option {
        display: flex;
        align-items: center;
        padding: 12px 16px;
        margin-bottom: 10px;
        border-radius: 10px;
        cursor: pointer;
        transition: all 0.2s ease;
      }

      .option:hover {
        background-color: var(--light-purple-bg);
      }

      /* Style for disabled options */
      .option[disabled], .option.disabled {
        cursor: not-allowed;
        opacity: 0.8;
      }

      .option.selected {
        background-color: var(--light-purple-bg);
        border-left: 4px solid var(--primary-purple);
      }

      .option-label {
        width: 30px;
        color: #6c757d;
      }

      .option-text {
        flex: 1;
      }

      .option-radio {
        width: 18px;
        height: 18px;
        border: 2px solid #ced4da;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
      }

      .option.selected .option-radio {
        border-color: var(--primary-purple);
      }

      .option.selected .option-radio::after {
        content: '';
        width: 10px;
        height: 10px;
        background-color: var(--primary-purple);
        border-radius: 50%;
      }
 
    .option.correct {
      background-color: rgba(40, 167, 69, 0.2) !important;
      border-left: 4px solid #28a745 !important;
    }

    .option.correct .option-radio {
      border-color: #28a745;
    }

    .option.correct .option-radio::after {
      background-color: #28a745;
    }

    .option.incorrect {
      background-color: rgba(220, 53, 69, 0.2) !important;
      border-left: 4px solid #dc3545 !important;
    }

    .option.incorrect .option-radio {
      border-color: #dc3545;
    }

    .option.incorrect .option-radio::after {
      background-color: #dc3545;
    }

    /* Notification styling - replacing modal */
    .notification {
      position: fixed;
      bottom: 20px;
      right: 20px;
      padding: 15px 20px;
      border-radius: 8px;
      box-shadow: 0 5px 15px rgba(0,0,0,0.1);
      display: flex;
      align-items: center;
      gap: 10px;
      z-index: 1050;
      font-weight: 500;
      animation: fadeIn 0.3s ease-in-out;
    }
      
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(20px); }
      to { opacity: 1; transform: translateY(0); }
    }

    .navigation {
      display: flex;
      justify-content: space-between;
      margin-top: 2rem;
      padding-top: 1rem;
      border-top: 1px solid #dee2e6;
    }

    .quize-section .quize-prev-btn,  .quize-section .quize-next-btn {
      display: flex;
      align-items: center;
      gap: 8px;
      border-radius: 20px;
      padding: 6px 15px;
      font-size: 0.9rem;
      background-color: var(--light-gray);
      color: var(--text-dark);
      border: 1px solid #dee2e6;
    }

    .quize-prev-btn:disabled, .quize-next-btn:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

    .btn-submit {
      background-color: var(--primary-purple);
      color: white;
      border-radius: 20px;
      padding: 6px 20px;
      border: none;
    }

    .btn-submit:disabled {
      background-color: #a491e8;
      cursor: not-allowed;
    } 
 
/* -----------------END QUIZE Assesment modal ----------------- */
  
.wave-shape {
  position: absolute;
  /* top: -0; */
  right: 0;
  height: 100vh;
  width: 80%;
  background-color: #7B68EE;
  z-index: 0;
  border-radius: 0;
  clip-path: path('M1000,0 L1000,1000 L0,1000 C300,850 200,650 400,500 C600,350 500,150 1000,0 Z');
}

.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  color: white;
}

.hero-title {
  font-size: 4rem; 
  margin-bottom: 1rem;
  color: #000;
}

.hero-subtitle {
  font-size: 1.5rem;
  margin-bottom: 2rem;
  color: #333;
}
  
.device-mockup {
  position: relative;
  z-index: 2;
  max-width: 100%;
  transform: perspective(1000px) rotateY(-10deg);
  transition: transform 0.5s ease;
}

.device-mockup:hover {
  transform: perspective(1000px) rotateY(0deg);
}

.btn-primary-custom {
  background-color: #7B68EE;
  border: none;
  padding: 0.8rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  transition: all 0.3s ease;
  color: whitesmoke;
}

.btn-primary-custom:hover {
  background-color: #6A5ACD;
  transform: translateY(-3px);
  box-shadow: 0 10px 20px var(--shadow-color);
  color: whitesmoke;
}

.logo-container {
  text-align: center;
  margin-bottom: 1rem;
}

.logo {
  width: 50px;
  height: 50px;
  background-color: #7B68EE;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
}

.footer {
  position: absolute;
  bottom: 20px;
  right: 20px;
  color: #fff;
  z-index: 2;
}

@media (max-width: 991.98px) {
  .hero-title {
      font-size: 3rem;
  }
  
  .hero-subtitle {
      font-size: 1.2rem;
  }
  
  .wave-shape {
      width: 50%;
  }
}

@media (max-width: 767px) {
  .hero-section {
      padding: 3rem 0;
      min-height: auto;
  }
  
  .hero-title {
      font-size: 2.5rem;
      text-align: center;
  }
  
  .hero-subtitle {
      text-align: center;
  }
  
  .text-container {
      margin-bottom: 3rem;
      text-align: center;
  }
  
  .device-mockup {
      margin: 0 auto;
      transform: none;
  }
  
  .wave-shape {
      display: none;
  }
  
  .bg-primary-custom {
      background-image: linear-gradient(to bottom, #7B68EE, #9370DB);
  }
}

/*-------------------------STEP 1 - PARENTS ONBOARDING-------------------------*/
      .top-banner {
          background-color: var(--purple-primary);
          height: 25px;
          width: 100%;
      }

      .header-section { 
          color: black; 
          text-align: center;
      }

      .welcome-text {
          font-size: 25px;
          font-weight: bold;
          margin-bottom: 1rem;
          margin-top: 50px;
      }

      .purple-text {
          color: var(--purple-primary);
      }

      .progress-bars {
          margin: 1rem 0;
          text-align: center;
      }

      .bar {
          display: inline-block;
          width: 50px;
          height: 8px;
          margin: 0 5px;
          border-radius: 4px;
      }

      .bar-active {
          background-color: var(--purple-primary);
      }

      .bar-inactive {
          background-color:var(--grey-placeholder);
      }
              
      .pricing-card {
          background-color: var(--grey-light);
          border-radius: 15px;
          padding: 2rem;
          height: 100%;
      }

      .pricing-type {
          background-color: var(--grey-placeholder);
          color: var(--text-primary);
          padding: 0.5rem 2rem;
          border-radius: 25px;
          display: inline-block;
          margin-bottom: 1rem;
          position: relative;
          top: -15px;
      }

      .annual {
          background-color: var(--purple-primary);
          color: white;
      }

      .btn-subscribe:hover,  #subscribe-annual:hover  {
          background-color: var(--purple-hover);
          border: 1px solid var(--purple-primary);
          color:#fff;
      } 

      .price {
          font-size: 2.5rem;
          font-weight: bold;
          margin-bottom: 1.5rem;
      }

      .feature-list {
          list-style-type: none;
          padding-left: 0;
          margin-bottom: 2rem;
      }

      .feature-list li {
          margin-bottom: 0.5rem;
          position: relative;
          padding-left: 1.5rem;
      }

      .feature-list li::before {
          content: "â€¢";
          position: absolute;
          left: 0;
          color: var(--text-primary);
      }

      .btn-subscribe {
          background-color: var(--purple-primary);
          color: white;
          border: none;
          border-radius: 25px;
          padding: 0.75rem 0;
          width: 100%;
          font-weight: bold;
      }

      .btn-subscribe-outline {
          background-color: transparent;
          color: var(--text-primary);
          border: 2px solid var( --grey-border);
          border-radius: 25px;
          padding: 0.75rem 0;
          width: 100%;
          font-weight: bold;
      }

      .footer {
          text-align: center;
          padding: 2rem 0;
          color: var(--text-primary);
      }

      .form-section {
          max-width: 600px;
          margin: 0 auto;
          text-align: center;
      }

      .form-control {
          border-radius: 10px; 
      }

      .btn-next {
          background-color: var(--purple-primary);
          color: white;
          border: none;
          border-radius: 25px;
          padding: 10px 0;
          width: 200px;
          font-weight: bold;
          margin-top: 20px;
      }

      .btn-next:hover {
          background-color: var(--purple-light);
          color: white; 
      }

      .form-label {
          display: block;
          margin-bottom: 5px;
          text-align: left;
      }

      .registration-page,
      .pricing-page,
      .subjects-page {
          transition: opacity 0.5s ease-in-out;
      }

      .side-info {
          position: absolute;
          top: 10px;
          left: 10px;
          background-color: white;
          border: 1px solid var( --grey-border);
          border-radius: 5px;
          padding: 2px 5px;
          font-size: 12px;
      }

      .avatar-container {
          display: flex;
          flex-direction: row;
          flex-wrap: nowrap; /* Prevents wrapping of the avatars */
          justify-content: center; /* Centers the avatars */
          gap: 10px; /* Adds spacing between the avatars */
          max-width: 100%;
          overflow-x: auto;

      }
      
      .avatar {
          width: 60px;
          height: 60px;
          border-radius: 50%;
          display: flex;
          align-items: center;
          justify-content: center;
          font-weight: bold;
          font-size: 15px;
          cursor: pointer;
      }

      .avatar.active {
          border: 3px solid var(--green-primary);
      }

      .avatar.inactive {
          border: 3px solid #000;
      }

      .avatar.add {
          background-color: var(--grey-placeholder);
      }

      .avatar-label {
          text-align: center;
          margin-top: 5px;
          font-size: 12px;
          cursor: pointer;
      }

      .search-box {
          max-width: 400px;
          margin: 20px auto;
          position: relative;
      }

      .search-input {
          border-radius: 16px;
          padding: 4px 10px;
          width: 100%;
          border: 1px solid #cccccc5c; 
      }

      .search-dropdown {
          position: absolute;
          top: 100%;
          left: 0;
          right: 0;
          background-color: white;
          border: 1px solid var( --grey-border);
          border-radius: 10px;
          margin-top: 5px;
          z-index: 100;
          max-height: 200px;
          overflow-y: auto;
          display: none;
          box-shadow: 0 2px 8px rgba(0,0,0,10%);
      }

      .search-dropdown-item {
          padding: 10px 15px;
          cursor: pointer;
          border-bottom: 1px solid var(--grey-border-light);
      }

      .search-dropdown-item:last-child {
          border-bottom: none;
      }

      .search-dropdown-item:hover {
          background-color:var(--grey-light);
      }

      .tag {
          display: inline-block;
          background-color: var(--green-primary);
          color: white;
          border-radius: 25px;
          padding: 5px 15px;
          margin: 5px;
          font-size: 14px;
      }

      .subject-grid {
          display: flex;
          flex-wrap: wrap; 
          gap: 15px;
          margin-top: 20px;
      }

      .subject-card {
          width: 100px;
          height: 100px;
          border-radius: 15px;
          display: flex;
          flex-direction: column;
          align-items: center;
          justify-content: center;
          background-color: var(--grey-medium);
          cursor: pointer;
          position: relative;
      }

      .subject-card.active {
          background-color: var(--dark-purple);
          color: white;
      }

      .subject-indicator {
          width: 50px;
          height: 3px;
          background-color: white;
          border-radius: 3px;
          margin-top: 10px;
      }

      .remove-subject {
          position: absolute;
          top: 5px;
          right: 5px;
          background-color: rgba(255, 255, 255, 0.8);
          border-radius: 50%;
          width: 20px;
          height: 20px;
          display: flex;
          align-items: center;
          justify-content: center;
          font-size: 12px;
          cursor: pointer;
          display: none;
      }

      .subject-card.active .remove-subject {
          display: flex;
      }

      /* Additional CSS for the new content section */
      .subject-btn {
          background-color: var(--grey-medium);
          color: var(--text-primary);
          border-radius: 25px;
          padding: 8px 25px;
          margin: 0 10px;
          border: none;
          transition: all 0.3s ease;
          width:300px;
          font-size: 12px;
      }

      .subject-btn.active {
          background-color: var(--purple-primary);
          color: white;
      }

      .selected-subject-btn {
          background-color: var(--grey-medium);
          color: var(--text-primary);
          border-radius: 25px;
          padding: 8px 25px;
          margin: 0 10px; 
          border: none;
          transition: all 0.3s ease;
      }

      .selected-subject-btn.active {
          background-color: var(--purple-primary);
          color: white;
      }

      .content-card {
          background:var(--primary-color);
          border-radius: 15px;
          overflow: hidden;
          box-shadow: 0 4px 8px rgb(0 0 0 / 10%);
          height: 100%;
          display: flex;
          flex-direction: column;
      }

     

      .card-header h5 {
          margin: 0;
          font-weight: bold;
      }

      .card-body {
          padding: 10px !important;
          flex-grow: 1;
      }

      .resource-count {
          color: var(--purple-primary);
          font-weight: bold;
          margin-top: 10px;
      }

      .card-footer {
          padding: 15px;
          background-color: var(--grey-lightest);
          text-align: right;
      }

      .btn-view {
          background-color: transparent;
          color: var(--purple-primary);
          border: 2px solid var(--purple-primary);
          border-radius: 25px;
          padding: 5px 20px;
          font-weight: bold;
          transition: all 0.3s ease;
      }

      .btn-view:hover {
          background-color: var(--purple-primary);
          color: white;
      }

      .btn-continue {
          background-color: var(--purple-primary);
          color: white;
          border: none;
          border-radius: 25px;
          padding: 10px 30px;
          font-weight: bold;
          transition: all 0.3s ease;
      }

      .btn-continue:hover {
          background-color: #7b68eed9;
          color: white;
      }



      /* Subject section */
      .subject-section {
          margin-bottom: 30px;
      }

      .subject-title {
          font-size: 22px;
          font-weight: 600;
          margin-bottom: 15px;
          padding-left: 5px;
          text-align: center;
      }

      /* Tiles grid */
      .tiles-grid {
          display: grid;
          grid-template-columns: repeat(4, 1fr);
          gap: 15px;
      }

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

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

      /* Individual tile */
      .tile {
          background-color: #e5e5e5;
          border-radius: 12px;
          padding: 30px 20px;
          display: flex;
          flex-direction: column;
          align-items: center;
          justify-content: center;
          min-height: 120px;
          transition: transform 0.2s ease, box-shadow 0.2s ease;
          cursor: pointer;
          position: relative;
      }

      .tile.active {
          background-color: var(--text-dark);
          color: white;
      }

      .tile:hover {
          transform: scale(1.02);
          box-shadow: 0 4px 12px color(rgba(0, 0, 0, 0.1));
      }

      .tile-icon {
          position: absolute;
          top: 10px;
          right: 10px;
          font-size: 18px;
          width: 24px;
          height: 24px;
          background-color: #fff;
          color: #000;
          border-radius: 50%;
          display: flex;
          align-items: center;
          justify-content: center;
      }

      .active .tile-icon {
          background-color: var(--text-primary);
          color: var(--purple-primary);
      }

      .tile-count {
          font-size: 42px;
          font-weight: 600;
          margin-bottom: 15px;
      }

      .tile-name {
          text-align: center;
          font-size: 16px;
          font-weight: 500;
      }

      /* Two-line tile names */
      .two-line {
          display: flex;
          flex-direction: column;
          align-items: center;
      }

      .modal-header {
          padding: 10px 10px; /* Adjust padding to reduce the header's height */
          font-size: 18px; /* Reduce font size for the title */
          justify-content: space-between;
      }

      .modal-title {
          font-size: 18px; /* Optional: adjust title font size as needed */
      }

      /* Optional: Adjust the close button size if necessary */
      .modal-header .btn-close {
        font-size: 18px; /* Smaller close button */
        padding: 5px; /* Reduce padding around the close button */
        background: url("../../images/close-btn.svg") center / 1em auto no-repeat !important;
        filter: none !important;
        opacity: 1;
      }

      .modal-header i.fa-times[data-bs-dismiss="modal"],
      .modal-header i.fa-close[data-bs-dismiss="modal"],
      .modal-header i.fa-xmark[data-bs-dismiss="modal"] {
        color: #fff !important;
        opacity: 1;
      }

      .file-upload {
          display: flex;
          flex-direction: column;
          align-items: center;
          justify-content: center;
          border: 2px dashed var( --grey-border);
          border-radius: 10px;
          padding: 30px;
          text-align: center;
          margin-bottom: 20px;
          cursor: pointer;
      }

      .file-upload:hover {
          border-color: #999;
          background-color: var(--grey-lighter);
      }

      .upload-icon {
        font-size: 3rem;
        color: var(--dark-purple);
        margin-bottom: 1rem;
    }

      .file-input {
          display: none;
      }

      .selected-files {
          margin-top: 15px;
          padding: 10px;
          background-color: #f5f5f7;
          border-radius: 8px;
          width: 100%;
          display: none;
      }

      .selected-files p {
          margin: 5px 0;
      }

      .btn {
          position: relative;
          z-index: 1; /* ensure buttons sit above overlapping layout elements */
      }

      .btn-primary {
          background-color: var(--primary-color);
          border-color: var(--primary-color);
          border-radius: 20px;
          padding: 8px 20px;
      }

      .btn-primary:hover,
      .btn-primary:focus,
      .btn-primary:active {
          background-color: var(--blue-primary);
          border-color: var(--blue-primary);
          color: #fff;
      }

      .upload-container {
          background-color: white;
          border-radius: 8px;
          box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
          padding: 20px;
          max-width: 700px;
          margin: 0 auto;
      }

      .upload-header {
          margin-bottom: 20px;
      }

      .upload-header h4 {
          color: var(--green-dark);
          margin: 0 0 5px 0;
          font-weight: 600;
      }

      .upload-header p {
          color: var(--text-secondary);
          margin: 0;
          font-size: 14px;
      }

      .upload-content {
          display: flex;
          gap: 20px;
      }

      .upload-area {
        flex: 0.4;
      }

      .upload-dropzone {
          border: 2px dashed var( --grey-border);
          border-radius: 8px;
          padding: 30px;
          text-align: center;
          background-color: var(--grey-lighter);
          height: 100%;
          display: flex;
          flex-direction: column;
          justify-content: center;
          align-items: center;
          cursor: pointer;
          transition: all 0.3s ease;
      }

      .upload-dropzone:hover {
          border-color: var(--green-dark);
          background-color: #f0f7f0;
      }

      .upload-icon {
          font-size: 40px;
          color: #9e9e9e;
          margin-bottom: 15px;
      }

      .upload-text {
          color: var(--text-secondary);
          margin: 0 0 10px 0;
          font-size: 14px;
      }

      .upload-text-or {
          color: #999;
          margin: 5px 0;
          font-size: 14px;
      }

      .upload-button {
          background-color: var(--green-dark);
          color: white;
          border: none;
          border-radius: 4px;
          padding: 8px 16px;
          font-size: 14px;
          cursor: pointer;
          margin-top: 10px;
          transition: background-color 0.3s ease;
      }

      .upload-button:hover {
          background-color:var(--green-darker);
      }

      .uploaded-files {
          flex: 1;
      }

      .uploaded-files h5 {
          margin: 0 0 15px;
          color: var(--text-primary);
          font-weight: 600;
      }

      .file-list {
          display: flex;
          flex-direction: column;
          gap: 10px;
      }

      .file-item {
          display: flex;
          align-items: center;
          padding: 10px;
          border-bottom: 1px solid var(--grey-border-light);
      }

      .file-icon {
          font-size: 20px;
          margin-right: 10px;
          display: flex;
          align-items: center;
          justify-content: center;
      }

      .file-icon.pdf {
          color: var(--red-primary);
      }

      .file-icon.excel {
          color: var(--green-light);
      }

      .file-icon.doc {
          color: var(--blue-light);
      }

      .file-icon.audio {
          color:var(--orange-primary);
      }

      .file-details {
          flex: 1;
      }

      .file-name {
          margin: 0;
          font-size: 13px;
          color: #555;
      }

      .file-status {
          margin-left: 10px;
      }

      .status-complete {
          color: var(--green-light);
          font-size: 12px;
      }

      .file-actions {
          display: flex;
          gap: 4px;
      }

      .action-btn {
          width: 28px;
          height: 28px;
          border-radius: 50%;
          border: none;
          display: flex;
          align-items: center;
          justify-content: center;
          cursor: pointer;
          transition: all 0.2s ease;
          font-size: 14px;
      }

      .view-btn {
          background-color: #e3f2fd;
          color: var(--blue-light);
      }

      .view-btn:hover {
          background-color: var(--blue-light);
          color: white;
      }

      .edit-btn {
          background-color: var(--btn-color);
          color: var(--green-light);
      }

      .edit-btn:hover {
          background-color: var(--btn-color);
          color: white;
      }

      .delete-btn {
          background-color: #ffebee;
          color: var(--red-primary);
      }

      .delete-btn:hover {
          background-color: var(--red-primary);
          color: white;
      }

      /* Drag over state */
      .upload-dropzone.drag-over {
          border-color: var(--green-dark);
          background-color: #e8f5e9;
      }

      @media (max-width: 768px) {
          .upload-content {
          flex-direction: column;
          }
          
          .upload-dropzone {
          margin-bottom: 20px;
          }
      }

      /* Payment Page Specific Styles */
      .payment-page {
          transition: opacity 0.5s ease-in-out;
      }

      .bg-light {
          background-color: var(--grey-light);
          border-radius: 15px;
          box-shadow: 0 2px 6px rgba(0,0,0,5%);
      }

      .bg-purple {
          background-color: var(--dark-purple);
          border-radius: 25px;
          padding: 4px 15px;
          font-weight: bold;
      }

      .payment-item {
          padding: 10px 0;
          border-bottom: 1px solid var(--grey-border-light);
      }

      .payment-item:last-child {
          border-bottom: none;
      }

      .payment-label {
          font-weight: 500;
      }

      .payment-value {
          text-align: right;
          font-weight: 600;
      }

      .total-row {
          border-top: 2px solid var( --grey-border-lighter);
          padding-top: 15px;
          margin-top: 10px;
      }

      #proceed-to-pay {
          background-color: var(--purple-primary);
          color: white;
          border: none;
          border-radius: 25px;
          padding: 10px 40px;
          font-weight: bold;
          font-size: 16px;
          transition: all 0.3s ease;
      }

      #proceed-to-pay:hover {
          background-color:var(--purple-dark);
          transform: translateY(-2px);
          box-shadow: 0 4px 8px rgba(0,0,0,0.1);
      }

      .payment-method-options {
          display: flex;
          justify-content: center;
          gap: 15px;
          margin: 20px 0;
      }

      .payment-method {
          border: 2px solid var( --grey-border-lighter);
          border-radius: 10px;
          padding: 15px 20px;
          text-align: center;
          cursor: pointer;
          transition: all 0.2s ease;
      }

      .payment-method:hover {
          border-color: var(--purple-primary);
          transform: translateY(-2px);
      }

      .payment-method.active {
          border-color: var(--purple-primary);
          background-color: rgba(123, 104, 238, 0.05);
      }

      .payment-icon {
          font-size: 24px;
          margin-bottom: 8px;
          color: var(--text-primary);
      }

      .payment-method.active .payment-icon {
          color: var(--purple-primary);
      }


      /* --------------------------Alert-------------------------- */
      .alert-container {
          position: fixed;
          bottom: 20px;
          right: 20px;
          z-index: 1050;
      }

      .custom-alert {
          min-width: 300px;
          box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 15%);
          margin-bottom: 10px;
          opacity: 0;
          transform: translateY(20px);
          transition: opacity 0.3s, transform 0.3s;
      }

      .custom-alert.show {
          opacity: 1;
          transform: translateY(0);
      }

      .custom-alert .alert-icon {
          display: flex;
          align-items: center;
          justify-content: center;
          width: 24px;
          height: 24px;
          border-radius: 50%;
          margin-right: 10px;
      }

      .btn-loading {
          position: relative;
          padding-right: 40px !important;
          pointer-events: none;
          opacity: 0.8;
      }

      .spinner {
          position: absolute;
          left: 15px;
          top: 50%;
          transform: translateY(-50%);
          width: 20px;
          height: 20px;
          border: 2px solid color(rgba(255, 255, 255, 0.3));
          border-radius: 50%;
          border-top-color: white;
          animation: spin 0.8s linear infinite;
      }

      @keyframes spin {
          to { transform: translateY(-50%) rotate(360deg); }
      }

      #avatar-container-first {
          display: flex;
          flex-wrap: wrap; /* Allows items to wrap onto the next line */
          gap: 10px; /* Adds space between the items */
          justify-content: center; /* Centers the content horizontally */
          align-items: center; /* Centers the content vertically */
          overflow-x: auto;
      }

      .child-selector {
          display: flex;
          flex-direction: column;
          align-items: center; /* Centers the children inside each selector */
          justify-content: center; /* Centers the children vertically inside each selector */
      }

      .avatar {
          width: 50px;
          height: 50px;
          border-radius: 50%;
          display: flex;
          justify-content: center;
          align-items: center;
          background-color: #f0f0f0;
          font-size: 20px;
          font-weight: bold;
      }

      .avatar.add {
          background-color: #4CAF50;
          color: white;
      }

      .avatar-label {
          margin-top: 5px;
          font-size: 14px;
          text-align: center; /* Centers the label text */
      }

      .d-none {
          display: none;
      }

      .avatar-list-container {
          display: flex;
          flex-wrap: wrap;
          gap: 10px;
      }

      .child-selector {
          display: flex;
          flex-direction: column;
          align-items: center;
          text-align: center;
      }

      .avatar {
          width: 50px;
          height: 50px;
          border-radius: 50%;
          display: flex;
          align-items: center;
          justify-content: center;
          font-weight: bold;
          background-color: #f0f0f0;
      }

      .add {
          background-color: #ddd;
      }

      .subject-grid {
          display: flex;
          flex-wrap: nowrap; /* No wrapping */
          gap: 5px;
          overflow-x: auto; /* Enable horizontal scrolling */
          white-space: nowrap;
          padding-bottom: 10px;
          scroll-behavior: smooth; /* Smooth scrolling */
          font-size: 13px;
      }

      .selected-subject-grid {
          display: flex;
          flex-wrap: nowrap; /* Prevent wrapping */
          overflow-x: auto; /* Enable horizontal scrolling */
          gap: 5px; /* Adjust spacing */
          white-space: nowrap; /* Prevent text wrapping inside items */
          
      }
      
      #learner-selected-subjects {
          max-width: 100%; /* Ensure it fits within the parent container */
          overflow-x: auto; /* Enable scrolling */
          padding: 5px; /* Optional: for visual clarity */
      }
      
      #learner-selected-subjects .selected-subject-grid > * {
          flex-shrink: 0;
          width: 30%;
          max-width: 100%;
          padding-right: calc(var(--bs-gutter-x) * 0.5);
          padding-left: calc(var(--bs-gutter-x) * 0.5);
          margin-top: var(--bs-gutter-y);
      }
      .selected-subject-btn {
          background-color: var(--grey-medium);
          color: var(--text-primary);
          border-radius: 25px;
          padding: 8px 25px;
          margin: 0 10px;
          border: none;
          transition: all 0.3s ease;
          width: fit-content;
      }

      .subject-card {
          flex: 0 0 150px; /* Fixed width */
          background: #f8f9fa;
          padding: 10px;
          width:287px;
          text-align: center;
          border: 1px solid #ddd;
          border-radius: 5px;
          position: relative;
      }

      .remove-subject {
          position: absolute;
          top: 5px;
          right: 5px;
          cursor: pointer;
      }

      /* Hide scrollbar for a cleaner look */
      .subject-grid::-webkit-scrollbar {
          display: none;
      }

      .subject-grid {
          -ms-overflow-style: none;
          scrollbar-width: none;
      }

      /* Scroll Buttons */
      .scroll-btn {
          position: absolute;
          top: 50%;
          transform: translateY(-30%);
          background: color(rgba(0, 0, 0, 0.5));
          color: black;
          border: none;
          padding: 10px 15px;
          cursor: pointer;
          border-radius: 50%;
          z-index: 10;
          transition: 0.3s;
      }

      .scroll-btn:hover {
          background:rgba(0, 0, 0, 80%);
      }

      .scroll-btn.left {
          left: -70px;
      }

      .scroll-btn.right {
          right: -70px;
      }

      /* Show buttons only when scrolling is needed */
      .container.position-relative:hover .scroll-btn {
          display: block;
      }

      .uploaded-file-item .btn {
          padding: 0.25rem 0.5rem; /* Adjust padding */
          font-size: 0.5rem; /* Reduce font size */
          line-height: 1.5; /* Adjust line-height for consistency */
      }

      .child-selector .active{
          display: inline-flex;

      }

      body { 
          padding-top: 0;
      }
      
      .header-purple {
          background-color: var(--primary-color);
          height: 40px;
          width: 100%;
      }
      
      .main-content {
          max-width: 800px;
          margin: 66px auto;
          padding: 20px;
          text-align: center;
      }
      
      .title {
          margin-top: 100px;
          margin-bottom: 60px;
          font-size: 28px;
          font-weight: 600;
      }

      .avatar {
          display: flex;
          flex-direction: column;
          align-items: center;
      }
      
      .avatar-circle {
          width: 60px;
          height: 60px;
          border-radius: 50%;
          display: flex;
          align-items: center;
          justify-content: center;
          font-size: 20px;
          font-weight: bold;
          margin-bottom: 10px;
      }

      .learner-subject-card {
          width: 172px;
          height: 110px;
          background-color: linear-gradient(135deg, var(--homepage-card-color-1), var(--homepage-card-color-2));
          border-radius: 20px;
          display: flex;
          flex-direction: column;
          align-items: center;
          justify-content: space-between;
          color: #000;
          position: relative;
          padding: 0;
          z-index: 1;
      }

      .learner-subject-card-footer {
          width: 100%;
          text-align: center;
          position: absolute;
          bottom: 10px; /* Adjust as needed */
      }

      .file-count {
          font-size: 14px;
          font-weight: bold;
      }

      .learner-subject-cards {
          display: flex;
          justify-content: center;
          gap: 20px;
          margin-bottom: 100px;
          position: relative;
      }

      .learner-subject-card-header {
          background-color: #7d7d7d;
          width: 77%;
          height: 9px;
          border-radius: 20px;
          position: absolute;
          top: -20px;
          z-index: 0;
          top: -8px;
          left: 16px;
      }

      .learner-subject-card-content {
          flex-grow: 1;
          display: flex;
          align-items: center;
          justify-content: center;
          width: 100%;
          font-size: 14px;
          font-weight: 500;
          margin-top: 5px;
      }
      
      .learner-subject-card-footer {
          width: 19%;
          height: 3px;
          background-color: white;
          border-radius: 10px;
          margin-bottom: 15px;
      }
      
      .learner-footer {
          margin-top: auto;
          padding: 20px;
          text-align: center;
          color: #333;
      } 
      
      .header {
          background-color: var(--primary-color);
          height: 32px;
      }
      
      .avatar-circle {
          width: 50px;
          height: 50px;
          border-radius: 50%;
          display: flex;
          align-items: center;
          justify-content: center;
          font-weight: bold;
          font-size: 18px;
      }
      
      .avatar-velly {
          border: 2px solid #2ecc71;
          color: #2ecc71;
          background-color: white;
      }
      
      .avatar-mpho {
          border: 2px solid #333;
          color: #333;
          background-color: white;
      }
      
      .nav-pill {
          display: flex;
          align-items: center;
          background-color: #e9ecef;
          border-radius: 20px;
          padding: 5px 10px;
          margin: 5px 0;
          cursor: pointer;
      }
      
      .nav-pill.active {
          background-color: var(--primary-color);
          color: white;
      }
      
      .nav-pill i {
          margin-right: 10px;
      }
      
      .subject-card {
          background-color: var(--light-gray);
          border-radius: 10px;
          padding: 20px;
          margin-bottom: 15px;
          cursor: pointer;
          transition: background-color 0.2s;
      }
      
      .subject-card:hover {
          background-color: var(--secondary-color);
      }
      
      .progress-col {
          border-left: 1px solid #dee2e6;
      }
      
      .progress-percentage {
          font-size: 24px;
          font-weight: bold;
      }
      
      .locked-item {
          color: var(--dark-gray);
      }
      
      .back-button {
          cursor: pointer;
          font-weight: 500;
      }
      
      .back-button i {
          margin-right: 5px;
      }
      
      .subject-nav {
          background-color: #e9ecef;
          border-radius: 50%;
          width: 40px;
          height: 40px;
          display: flex;
          align-items: center;
          justify-content: center;
          margin-right: 15px;
          cursor: pointer;
      }
      
      .subject-nav.active {
          background-color: var(--primary-color);
          color: white;
      }
      
      .footer {
          text-align: center;
          color: var(--dark-gray);
          padding: 20px 0;
          font-size: 14px;
      }
      
      /* Modal styles */
      .modal-content {
          border-radius: 15px;
          border: none;
      }
      
      .modal-header {
          border-bottom: none;
          padding: 20px 20px 10px;
      }
      
      .modal-body {
          padding: 0 20px 20px;
      }
      
      .modal-title {
          font-weight: 600;
      }
      
      /* Ensure modal image is responsive */
      .modal-body img {
          max-width: 100%;
          height: auto;
          border-radius: 8px;
      }

      .active-subject {
          border: 2px solid green;
          background-color: #e0f7e0; /* Optional: gives a light green background */
      }

.avatar-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 10px;
}

.avatar-circle .active {
  border: 2px solid #4cd137;
  color: #4cd137;
  display: inline-flex;
}

.subject-nav.active {
  background-color: var(--primary-color);
  color: white;
  display: inline-flex;
}

.topic-header {
  background-color:var(--purple-dark);
  height: 32px;
}

.nav-pill {
display: flex;
align-items: center;
background-color: #e9ecef;
border-radius: 20px;
padding: 5px 10px;
margin: 5px 0;
cursor: pointer;
}

.nav-pill.active {
background-color: var(--primary-color);
color: white;
}

.nav-pill i {
margin-right: 10px;
}



.topic-subject-card:hover {
background-color: #e9ecef;
}

.progress-col {
border-left: 1px solid #dee2e6;
}

.progress-percentage {
font-size: 24px;
font-weight: bold;
}

.locked-item {
color: var(--dark-gray);
}

.back-button {
cursor: pointer;
font-weight: 500;
}

.back-button i {
margin-right: 5px;
}

.subject-nav {
background-color: #e9ecef;
border-radius: 50%;
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
margin-right: 15px;
cursor: pointer;
}

.subject-nav.active {
background-color: var(--dark-purple);
color: white;
}

.footer {
text-align: center;
color: var(--dark-gray);
padding: 20px 0;
font-size: 14px;
}

/* Modal styles */
.modal-content {
border-radius: 15px;
border: none;
}

.modal-header {
border-bottom: none;
padding: 20px 20px 10px;
}

.modal-body {
padding: 0 20px 20px;
}

.modal-title {
font-weight: 600;
}

/* Ensure modal image is responsive */
.modal-body img {
max-width: 100%;
height: auto;
border-radius: 8px;
}

.back-button a {
  text-decoration: none;
}

.topic-item.active {
  background-color: #f0f0f0; /* Example active background color */
  border-left: 4px solid #00ff22; /* Optional border to highlight the active topic */
}

.subject-title {
  font-weight: bold;
  color: #333;
}

.topics {
  max-height: 380px;  /* Adjust the height as needed */
  overflow-y: auto;   /* Enable vertical scrolling */
}

/*-------------------------END STEP 1 - PARENTS ONBOARDING-------------------------*/

 

.loading-modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5); /* Transparent effect */
  display: flex;
  justify-content: center;
  align-items: center;
  transition: opacity 0.5s ease;
  z-index: 9999; /* Ensure it's on top */
}

.loading-modal-content {
  background: transparent;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  max-width: 90%; /* Limit content width */
  max-height: 90%; /* Limit content height */
  overflow: hidden;
}

.loading-loader {
  width: 4rem;
  height: 4rem;
  border: 5px solid #f3f3f3;
  border-top: 5px solid var(--primary-color);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: auto;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.scrollable-container {
  display: flex;
  overflow-x: auto;
  padding: 0 10px; /* Optional: padding for left and right space */
  gap: 15px; /* Space between learner cards */
  max-width: 100%;
}

.learner-card {
  flex: 0 0 auto; /* Prevents wrapping */
  min-width: 120px; /* Width of each learner card */
  text-align: center;
}

/* Modal container to hold sidebar and content */
.modal-learning-modal-container {
  display: flex;
  height: 100%;
}

/* Sidebar styles */
.modal-sidebar {
  width: 250px;
  background-color: #f8f9fa;
  padding: 10px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  border-right: 1px solid #ddd;
}

.modal-hamburger-menu {
  display: none; 
  font-size: 24px;
  cursor: pointer;
  margin-bottom: 20px;
}

.modal-menu-item {
  display: flex;
  align-items: center;
  padding: 10px;
  margin: 5px 0;
  cursor: pointer;
}

.modal-menu-item.active {
  background-color: var(--primary-color);
  color: white;
}

.modal-menu-badge {
  font-weight: bold;
  margin-right: 10px;
}

.modal-menu-text {
  flex: 1;
}

.modal-menu-icon {
  font-size: 20px;
}

/* Main content area */
.modal-main-content {
  flex: 1;
  background-color:  #fff;
  padding: 20px;
  overflow-y: auto;
}

/* Header styles */
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-header-hamburger {
  display: none;
}

/* Content area */
.modal-purple-bar {
  height: 5px;
  background-color: var(--primary-color);
  margin-bottom: 15px;
}

.modal-white-content {
  padding: 20px;
  background-color: #f4f4f4;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Responsive styling for small screens */
@media (max-width: 768px) {
  .modal-learning-modal-container {
      flex-direction: column;
  }

  .modal-sidebar {
      width: 100%;
      border-right: none;
  }

  .modal-main-content {
      margin-top: 20px;
  }

  .modal-hamburger-menu {
      display: block;
  }
}

/*----------------- ASSESMENT MODAL ----------------- */ 

.file-url-view {
  width: 100%;
  height: 500px;
  border: none;
}

/* Basic progress bar styles */
.progress-bar {
  width: 0%;
  height: 20px;
  background-color: #007bff;
  transition: width 0.6s ease;
}

/* Stripes effect for the progress bar */
.progress-bar-striped {
  background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent);
  background-size: 40px 40px;
}

/* Animated progress bar effect */
.progress-bar-animated {
  animation: progress-bar-stripes 1s linear infinite;
}

@keyframes progress-bar-stripes {
  0% {
    background-position: 40px 0;
  }
  
  100% {
    background-position: 0 0;
  }
}

.custom-scrollable-dropdown {
  max-height: 200px;
  overflow-y: auto;
}

.avatar-container .avatar {
  flex-shrink: 0; /* Prevent avatars from shrinking */
  margin-right: 10px; /* Optional: Space between avatars */
}

/* Basic styling for modal */
.kubici-modal {
  display: none; /* Hidden by default */
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7); /* Darker background shade */
  justify-content: center;
  align-items: center;
}

.kubici-modal-content {
  background-color: white;
  border-radius: 10px;
  padding: 20px;
  text-align: center;
  width: 50%;
  height: 50%;
}

.kubici-robot {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.kubici-robot-image {
  width: 100px;
  height: 100px;
  border-radius: 50%;
}

.kubici-welcome-text {
  margin-top: 10px;
  font-size: 16px;
  font-weight: bold;
}

.kubici-modal-footer {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.kubici-close-btn {
  padding: 10px 20px;
  background-color: #4CAF50;
  color: white;
  border: none;
  border-radius: 5px;
  cursor: pointer;
}

.kubici-close-btn:hover {
  background-color: #45a049;
}

.bg-light-grey {
  background-color: #878787; /* Light grey color */
  color: white;
}

.bg-green {
  background-color: #3fcc3f; /* Light grey color */
  color: white;
}

.flashcard-modal-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px; /* Space between items */
  padding: 16px;
}

.sub-sub-timeline-modal-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px; /* Space between items */
  padding: 16px;
}

.flashcard-modal-sidebar-menu-item {
  background:  #fff; /* White background */
  border-radius: 10px; /* Rounded corners */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Soft shadow */
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s ease;
  cursor: pointer;
}

.flashcard-modal-sidebar-menu-item:hover {
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15); /* Stronger shadow on hover */
  transform: translateY(-2px); /* Slight lift effect */
}

.flashcard-modal-menu-badge {
  width: 280px;
  height: 50px;
  border-radius: 50%;
  margin-right: 20px;
}

.modal-menu-text {
  flex-grow: 1;
  font-size: 14px;
  font-weight: bold;
  color: #333;
}

.modal-menu-icon {
  color: #555;
  font-size: 18px;
}


/* ----------------- END  Manage Program section-----------------  */

.search-bar {
  background-color: var(--light-purple);
  padding: 10px 0;
}

.search-container {
  position: relative;
  max-width: 500px;
  margin: 0 auto;
}

.search-box .search-input {
  border-radius: 20px;
  border: none;
  padding: 8px 15px;
  width: 100%;
  text-align: center;
}

.welcome-container {
  text-align: center;
  padding: 50px 20px;
}

.welcome-title {
  color: #555;
  font-size: 32px;
  margin-bottom: 10px;
}

.welcome-subtitle {
  color: #777;
  font-size: 18px;
  margin-bottom: 40px;
}

.countdown-circle {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background-color: #666;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
  border: 10px solid var(--primary-purple);
}

.count-number {
  font-size: 72px;
  font-weight: bold;
  line-height: 1;
  margin-bottom: 5px;
}

.count-text {
  font-size: 16px;
}

.btn-light-outline {
  background-color: transparent;
  color: #333;
  border: 1px solid #ddd;
  border-radius: 20px;
  padding: 8px 25px;
}

.floating-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #666;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  font-size: 24px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

:root {
/* Color palette */
--learner-primary: #7b2cbf;
--learner-secondary: #1a77b8;
--learner-light-blue: #38b6ff;
--learner-light-gray: #f0f0f0;
--learner-white: #ffffff;
--learner-dark-text: #333333;
}

.learner-header {
background-color: var(--learner-primary);
color: var(--learner-white);
padding: 10px 0;
text-align: center;
}

.learner-subheader {
background-color: #d4b8e8;
padding: 10px 0;
}

.learner-search {
max-width: 400px;
margin: 0 auto;
background-color: var(--learner-white);
border-radius: 20px;
}

.learner-search input {
border: none;
width: 100%;
padding: 8px 15px;
border-radius: 20px;
text-align: center;
}

.learner-search input:focus {
outline: none;
}

.learner-welcome {
text-align: center;
margin: 40px 0;
}

.learner-welcome h1 {
font-size: 28px;
margin-bottom: 15px;
color: var(--learner-dark-text);
}

.learner-welcome p {
color: #666;
max-width: 850px;
margin: 0 auto;
line-height: 1.6;
}

.learner-subject {
  height: 60px;
  width: 100%;
  aspect-ratio: 1/1;
  border-radius: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--learner-white);
  font-weight: 400;
  transition: transform 0.2s;
  cursor: pointer;
  gap: 2px;
}

.learner-subject:hover {
transform: scale(1.05);
}

.learner-subject.purple {
background-color: var(--learner-primary);
}

.learner-subject.blue {
background-color: var(--learner-secondary);
}

.learner-subject.light-blue {
background-color: var(--learner-light-blue);
}

.learner-motivation {
text-align: center;
margin: 50px 0;
color: #555;
line-height: 1.6;
}

.learner-question {
font-weight: bold;
}

.learner-action-btn {
background-color: var(--learner-primary);
color: var(--learner-white);
border: none;
padding: 10px 40px;
border-radius: 30px;
font-size: 18px;
margin-top: 30px;
transition: background-color 0.2s;
}

.learner-action-btn:hover {
background-color: #681fa8;
}

.learner-profile-page .learner-profile-status-actions {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
align-items: center;
justify-content: flex-end;
}

.learner-profile-page .learner-profile-status-actions .learner-status-action-btn {
margin-top: 0;
padding: 0.5rem 0.85rem;
font-size: 0.78rem;
border-radius: 8px;
background-color: var(--btn-outline-primary-bg, var(--primary-color));
color: var(--learner-white);
}

.learner-profile-page .learner-status-action-btn.is-active {
background-color: var(--btn-outline-primary-bg, var(--primary-color));
color: var(--learner-white);
}

.learner-profile-page .learner-profile-status-actions .learner-status-action-btn:hover {
background-color: var(--btn-outline-primary-hover-bg, var(--secondary-color));
color: var(--learner-white);
}

.learner-profile-page .learner-status-action-btn:disabled {
opacity: 0.7;
cursor: wait;
}

.learner-cart-btn {
background-color: var(--learner-primary);
color: var(--learner-white);
border-radius: 5px;
padding: 6px 15px;
}

.learner-admin-btn {
background-color: #f0f0f0;
color: #555;
border-radius: 5px;
padding: 6px 15px;
margin-left: 10px;
}

.typing {
border-right: 2px solid var(--learner-dark-text);
white-space: nowrap;
overflow: hidden;
display: inline-block;
animation: typing 3s steps(40, end), blink 0.5s step-end infinite alternate;
}

@keyframes typing {
from {
  width: 0;
}
to {
  width: 100%;
}
}

@keyframes blink {
from {
  border-color: transparent;
}
to {
  border-color: var(--learner-dark-text);
}
}

.bot-icon {
width: 50px;
height: 50px;
margin-right: 10px;
animation: bounce 1s infinite alternate;
}

@keyframes bounce {
from {
  transform: translateY(0);
}
to {
  transform: translateY(-10px);
}
}

.fade-in {
opacity: 0;
animation: fadeIn 2s forwards;
}



/* ----------------- Chat Window -----------------*/

.chat-button {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #b197fc;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  z-index: 100;
  transition: all 0.3s ease;
}

.chat-button:hover {
  transform: scale(1.05);
}

.chat-icon {
  color: white;
  font-size: 24px;
  left: 18px;
  top: 9px;
  position: absolute;
}

.close-button {
  position: fixed;
  bottom: 30px;
  right: 100px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #b197fc;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  cursor: pointer;
  z-index: 100;
  transition: all 0.3s ease;
  opacity: 0;
  pointer-events: none;
}

.close-button.active {
  opacity: 1;
  pointer-events: auto;
}

.chat-window {
  position: fixed;
  bottom: 100px;
  right: 30px;
  width: 320px;
  height: 450px;
  background-color: #fff;
  border-radius: 15px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 99;
}

.chat-window.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.chat-header {
  padding: 15px 20px;
  background-color: #b197fc;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.chat-header-title {
  display: flex;
  align-items: center;
  color: #fff;
  font-weight: bold;
}

.chat-header-icon {
  margin-right: 10px;
  font-size: 20px;
}

.chat-header-actions {
  display: flex;
}

.header-button {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.2);
  display: flex;
  justify-content: center;
  align-items: center;
  margin-left: 10px;
  cursor: pointer;
}

.chat-body {
  flex-grow: 1;
  padding: 10px;
  overflow-y: auto;
  background-color: #f9f9f9;
  display: flex;
  flex-direction: column;
}

.chat-input-container {
  padding: 10px;
  background-color: #fff;
  border-top: 1px solid #eee;
}

.chat-input {
  width: 100%;
  padding: 10px 15px;
  border-radius: 20px;
  border: 1px solid #ddd;
  outline: none;
  font-size: 11px;
}

.message {
  max-width: 70%;
  padding: 10px 15px;
  margin: 5px 0;
  border-radius: 15px;
  font-size: 14px;
  line-height: 1.4;
}

.user-message {
  align-self: flex-end;
  background-color: #fff;
  border: 1px solid #eee;
  border-bottom-right-radius: 5px;
}

.user-message-container {
  display: flex;
  justify-content: flex-end;
  align-items: flex-start;
  margin: 5px 0;
}

.agent-message {
  align-self: flex-start;
  background-color: #b197fc;
  color: #fff;
  border-bottom-left-radius: 5px;
}

.agent-message-container {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  margin: 5px 0;
}

.avatar {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 5px;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.send-button {
  position: absolute;
  right: 16px;
  bottom: 59px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background-color: var(--dark-purple);
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
}
/* ----------------- END  Chat whindow -----------------*/


/*-----------------   Assesment layout -----------------*/


.slide-container {
  max-width: 1000px;
  margin: 0 auto;
  position: relative; 
}

.slide-container .progress-bar-container {
  height: 15px !important;
  background-color: #6610f2 !important;
  border-radius: 30px !important;
  position: relative;
  margin-bottom: 20px;
}

.slide-container .progress-indicator {
  width: 40px;
  height: 40px;
  background-color: #d3d3d3 !important;
  border-radius: 50%;
  position: absolute;
  top: -12px;
  left: 43%;
  z-index: 10;
}

.slide-container .main-content
{
  max-width: 100%!important;
}

.slide-container .content-container {
  display: flex;
  gap: 30px;
}

.main-content {
  flex: 5;
  background-color: white;
  border-radius: 15px;
  padding: 0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  position: relative;
  overflow: hidden;
  margin: 0px;
}

.card-content {
  padding: 25px;
} 

.key-takeaway {
  flex: 1;
  background-color: #f0f0f0;
  border-radius: 15px;
  padding: 20px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.explanation-text {
  font-size: 1.1rem;
  line-height: 1.6;
}

.takeaway-header {
  font-weight: bold;
  margin-bottom: 15px;
  color: #333;
  font-size: 13px
}

.takeaway-content {
  font-size: 0.9rem;
  line-height: 1.5;
}

/*-----------------END  Assesment layout -----------------*/

/* ----------------- QUIZE Assesment modal ----------------- */

.modal-learning-modal-container  .card {
  width: 350px;
  border-radius: 25px;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  overflow: hidden;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
}

.modal-learning-modal-container .card-header {
  background-color: white;
  border-bottom: none;
  padding: 20px;
}

.modal-learning-modal-container .card-body {
  background-color: white;
  padding: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #d0d0d0 #f5f7ff;
}

.modal-learning-modal-container .card-body::-webkit-scrollbar {
  width: 6px;
}

.modal-learning-modal-container.card-body::-webkit-scrollbar-track {
  background: #f5f7ff;
}

.modal-learning-modal-container .card-body::-webkit-scrollbar-thumb {
  background-color: #d0d0d0;
  border-radius: 10px;
}

.modal-learning-modal-container .flashcard-sidebar-title-item,
.modal-learning-modal-container .question-sidebar-title-item {
  background-color: #f5f7ff;
  border-radius: 15px;
  margin: 10px 20px;
  padding: 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* flashcard icon */
.modal-learning-modal-container .flashcard-sidebar-title-icon {
  width: 45px;
  height: 45px;
  background-color: var(--dark-purple);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
}

/* question icon */
.modal-learning-modal-container .question-sidebar-title-icon {
  width: 45px;
  height: 45px;
  background-color: #fd79a8;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 15px;
}

.modal-learning-modal-container .flashcard-sidebar-title-icon.disabled,
.modal-learning-modal-container .question-sidebar-title-icon.disabled {
  background-color: #d0d0d0;
}

.modal-learning-modal-container .flashcard-sidebar-title-info,
.modal-learning-modal-container .question-sidebar-title-info {
  flex: 1;
}

.modal-learning-modal-container .flashcard-sidebar-title,
.modal-learning-modal-container .question-sidebar-title {
  font-weight: 600;
  margin-bottom: 4px;
}

.modal-learning-modal-container .flashcard-sidebar-sub-title,
.modal-learning-modal-container .question-sidebar-sub-title {
  color: #888;
  font-size: 0.8rem;
}


.modal-learning-modal-container .header-title {
  font-weight: bold;
}

.modal-learning-modal-container .header-subtitle {
  color: #888;
  font-size: 0.9rem;
}

.wave-icon {
  margin-right: 10px;
}

.modal-learning-modal-container .flashcard-sidebar-title-item:hover,
.modal-learning-modal-container .question-sidebar-title-item:hover {
  background-color: #e2e6ea; /* hover effect */
}

.modal-learning-modal-container .flashcard-sidebar-title-item.active,
.modal-learning-modal-container .question-sidebar-title-item.active {
  background-color: #4f46e5; /* Indigo-600 for active item */
  opacity: 70%;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.modal-learning-modal-container .flashcard-sidebar-title-item.active .flashcard-sidebar-title-icon i,
.modal-learning-modal-container .flashcard-sidebar-title-item.active .flashcard-sidebar-title,
.modal-learning-modal-container .flashcard-sidebar-title-item.active .flashcard-sidebar-sub-title,
.modal-learning-modal-container .flashcard-sidebar-title-item.active i.bx-chevron-right,

.modal-learning-modal-container .question-sidebar-title-item.active .question-sidebar-title-icon i,
.modal-learning-modal-container .question-sidebar-title-item.active .question-sidebar-title,
.modal-learning-modal-container .question-sidebar-title-item.active .question-sidebar-sub-title,
.modal-learning-modal-container .question-sidebar-title-item.active i.bx-chevron-right {
  color: #ffffff;
}

.background-shapes .shape {
  position: absolute;
  z-index: -1;
  opacity: 0.7;
}

/* in your stylesheet */
.flashcard-sidebar-title-item.loading::after,
.question-sidebar-title-item.loading::after {
  content: '';
  border: 2px solid #ccc;
  border-top-color: #4f46e5;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-left: 8px;
  vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* correct answer highlight */
.option-box-correct {
  background-color: #d4edda;
}

/* incorrect answer highlight */
.option-box-incorrect {
  background-color: #f8d7da;
}


.shape-1 {
  top: 10%;
  left: 5%;
  width: 60px;
  height: 60px;
  background-color: var(--accent-teal);
  border-radius: 10px;
  transform: rotate(45deg);
}

.shape-2 {
  bottom: 15%;
  left: 10%;
  width: 100px;
  height: 100px;
  background-color: var(--primary-purple-light);
  border-radius: 50%;
}

.shape-3 {
  top: 20%;
  right: 10%;
  width: 70px;
  height: 70px;
  background-color: var(--accent-teal);
  border-radius: 50%;
}

.shape-4 {
  bottom: 20%;
  right: 5%;
  width: 80px;
  height: 80px;
  background-color: var(--accent-teal);
  border-radius: 12px;
  transform: rotate(15deg);
}

.quize-section .container {
  max-width: 900px;
}

.quize-section .card {
  border-radius: 15px;
  border: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 2rem;
}

.quize-section .progress {
  height: 10px;
  background-color: var(--light-purple-bg);
}

.quize-section .progress-bar {
  background-color: var(--primary-purple);
}

.quize-section .quiz-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.quize-section .quiz-title {
  font-weight: 600;
  color: var(--text-dark);
  margin-bottom: 0;
}

.quiz-subtitle {
  color: #6c757d;
  font-size: 0.9rem;
}

.quiz-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

.btn-review {
  background-color: var(--medium-gray);
  color: var(--text-dark);
  border-radius: 20px;
  padding: 6px 15px;
  font-size: 0.85rem;
  border: none;
}

.btn-back {
  background-color: var(--light-gray);
  color: var(--text-dark);
  border-radius: 20px;
  padding: 6px 15px;
  font-size: 0.85rem;
  border: 1px solid #dee2e6;
}

.quize-section .timer {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--text-dark);
  font-weight: 500;
}

.timer i {
  color: var(--primary-purple);
}

.question-container {
  margin-top: 2rem;
  padding: 1rem 0;
}

.question-number {
  font-size: 0.9rem;
  color: #6c757d;
  margin-bottom: 0.5rem;
}

.question-text {
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 1.5rem;
}

.options-container {
  margin-top: 1rem;
}

.option {
  display: flex;
  align-items: center;
  padding: 12px 16px;
  margin-bottom: 10px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.option:hover {
  background-color: var(--light-purple-bg);
}

/* Style for disabled options */
.option[disabled], .option.disabled {
  cursor: not-allowed;
  opacity: 0.8;
}

.option.selected {
  background-color: var(--light-purple-bg);
  border-left: 4px solid var(--primary-purple);
}

.option-label {
  width: 30px;
  color: #6c757d;
}

.option-text {
  flex: 1;
}

.option-radio {
  width: 18px;
  height: 18px;
  border: 2px solid #ced4da;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.option.selected .option-radio {
  border-color: var(--primary-purple);
}

.option.selected .option-radio::after {
  content: '';
  width: 10px;
  height: 10px;
  background-color: var(--primary-purple);
  border-radius: 50%;
}

/* Styles for correct and incorrect answers */
.option.correct {
  background-color: rgba(40, 167, 69, 0.2) !important;
  border-left: 4px solid #28a745 !important;
}

.option.correct .option-radio {
  border-color: #28a745;
}

.option.correct .option-radio::after {
  background-color: #28a745;
}

.option.incorrect {
  background-color: rgba(220, 53, 69, 0.2) !important;
  border-left: 4px solid #dc3545 !important;
}

.option.incorrect .option-radio {
  border-color: #dc3545;
}

.option.incorrect .option-radio::after {
  background-color: #dc3545;
}

/* Notification styling - replacing modal */
.notification {
  position: fixed;
  bottom: 20px;
  right: 20px;
  padding: 15px 20px;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 1050;
  font-weight: 500;
  animation: fadeIn 0.3s ease-in-out;
}
  
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

.navigation {
  display: flex;
  justify-content: space-between;
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid #dee2e6;
}

.quize-section .quize-prev-btn,  .quize-section .quize-next-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  border-radius: 20px;
  padding: 6px 15px;
  font-size: 0.9rem;
  background-color: var(--light-gray);
  color: var(--text-dark);
  border: 1px solid #dee2e6;
}

.quize-prev-btn:disabled, .quize-next-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-submit {
  background-color: var(--primary-purple);
  color: white;
  border-radius: 20px;
  padding: 6px 20px;
  border: none;
}

.btn-submit:disabled {
  background-color: #a491e8;
  cursor: not-allowed;
} 

.child-subjects {
  white-space: nowrap;
  scroll-behavior: smooth;
  width: 100%;
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 10px 0;
}

.subject-grid {
  display: flex;
  flex-wrap: nowrap; /* Ensure subjects stay in a single row */
  gap: 10px;
}

.subject-card {
  flex: 0 0 auto; /* Prevent shrinking */
  width: 300px;
  height: 100px;
  background-color: #e9ecef;
  text-align: center;
  padding: 10px;
  border-radius: 8px;
  box-shadow: 0px 2px 5px rgba(0, 0, 0, 0.2);
}

.scroll-btn {
  position: absolute;
  top: 100%;
  transform: translateY(-50%);
  background-color: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
  z-index: 10;
}

.left {
  left: -10px;
}

.right {
  right: -10px;
}

#progress-bar-template .progress {
  height: 7px;
}
/* -----------------END QUIZE Assesment modal ----------------- */

.uploaded-file-list {
  max-height: 300px;        /* Set the maximum height */
  overflow-y: auto;         /* Add vertical scrolling */
  border: 1px solid #ddd;   /* Optional: visual boundary */
  padding: 10px;            /* Optional: inner spacing */
  border-radius: 4px;       /* Optional: rounded corners */
  background-color: #f9f9f9; /* Optional: background color */
}



.timeline-sidebar {
  display: flex;
  flex-direction: column;
  gap: 12px; /* Space between items */
  padding: 16px;
}

.timeline-menu-item {
  background:  #fff; /* White background */
  border-radius: 10px; /* Rounded corners */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1); /* Soft shadow */
  padding: 12px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.3s ease;
  cursor: pointer;
}

.timeline-menu-item:hover {
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.15); /* Stronger shadow on hover */
  transform: translateY(-2px); /* Slight lift effect */
}

.timeline-menu-badge {
  width: 280px;
  height: 50px;
  border-radius: 50%;
  margin-right: 20px;
}

.sub-topic-title {
  font-size: 18px;
}

.sub-topic-title .topic-name {
  font-size: 16px;
}



.timeline-row {
  width: 100%;
  display: flex;
  flex-wrap: nowrap; /* Prevent wrapping of columns */
}

.timeline-col-md-2 {
  flex: 0 0 16.6667%; /* Ensure the sidebar takes up 2/12 of the row */
  max-width: 16.6667%;
  padding: 0 15px; /* Add some padding for spacing */
  margin-right: auto;
}
.sidebar-topics {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid #ddd;
  background-color: white;
  padding: 15px;
  box-shadow: 0 2px 4px color(rgba(0, 0, 0, 0.1));
  border-radius: 20px;
  width:400px;
}

.timeline-container {
  padding: 8px;
  position: relative;
}

.main-timeline {
  position: absolute;
  left: 24px;
  top: 16px;
  bottom: 16px;
  width: 4px;
  background-color: #d1d5db;
}

.term-container {
  margin-bottom: 24px;
  position: relative;
}

.term-node {
  position: absolute;
  left: 16px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: white;
  border: 2px solid;
  z-index: 10;
  transform: translateX(-8px);
  top: 12px;
}

.term-button {
  margin-left: 40px;
  width: calc(100% - 40px);
  padding: 8px;
  border-radius: 4px;
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: bold;
}

.term-content {
  margin-left: 40px;
  padding-left: 16px;
  border-left: 2px dashed #9ca3af;
  margin-top: 8px;
  margin-bottom: 8px;
  position: relative;
  display: none; /* Hidden by default */
}

.term-title {
  font-weight: 600;
  font-size: 14px;
  color: #374151;
  margin-bottom: 8px;
}

.week-container {
  margin-bottom: 16px;
  position: relative;
}

.week-node {
  position: absolute;
  left: 0;
  top: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  transform: translateX(-20px);
}

.week-card {
  display: flex;
  flex-direction: column;
  padding: 8px;
  border-radius: 6px;
  border-left-width: 4px;
  border-left-style: solid;
}

.week-number {
  font-size: 14px;
  font-weight: bold;
  margin-bottom: 4px;
}

.week-topic {
  font-size: 14px;
  color: #4b5563;
}

/* Term 1 - Blue */
.term-1 .term-node {
  border-color: #3b82f6;
}

.term-1 .term-button {
  background-color: #3b82f6;
}

.term-1 .week-node {
  background-color: #3b82f6;
}

.term-1 .week-card {
  background-color: #dbeafe;
  border-left-color: #3b82f6;
}

.term-1 .week-number {
  color: #1d4ed8;
}

/* Term 2 - Green */
.term-2 .term-node {
  border-color: #10b981; /* Green */
}

.term-2 .term-button {
  background-color: #10b981; /* Green */
}

.term-2 .week-node {
  background-color: #10b981; /* Green */
}

.term-2 .week-card {
  background-color: #d1fae5; /* Light Green */
  border-left-color: #10b981; /* Green */
}

.term-2 .week-number {
  color: #047857; /* Dark Green */
}

/* Term 3 - Purple */
.term-3 .term-node {
  border-color: #8b5cf6; /* Purple */
}

.term-3 .term-button {
  background-color: #8b5cf6; /* Purple */
}

.term-3 .week-node {
  background-color: #8b5cf6; /* Purple */
}

.term-3 .week-card {
  background-color: #ede9fe; /* Light Purple */
  border-left-color: #8b5cf6; /* Purple */
}

.term-3 .week-number {
  color: #6d28d9; /* Dark Purple */
}

/* Term 4 - Red */
.term-4 .term-node {
  border-color: #ef4444; /* Red */
}

.term-4 .term-button {
  background-color: #ef4444; /* Red */
}

.term-4 .week-node {
  background-color: #ef4444; /* Red */
}

.term-4 .week-card {
  background-color: #fee2e2; /* Light Red */
  border-left-color: #ef4444; /* Red */
}

.term-4 .week-number {
  color: #b91c1c; /* Dark Red */
}


/* Add styles for other terms as needed */
.term-button:hover {
  opacity: 0.9;
}

.active {
  display: block;
}

/* Make the card-body scrollable */
.card-body.flashcard-modal-sidebar {
  overflow-y: auto; /* Enable vertical scrolling */
  overflow-x: hidden; /* Prevent horizontal scrolling */
  padding-right: 15px; /* Add padding for better spacing */
  scrollbar-width: thin; /* For modern browsers, make the scrollbar thinner */
  scrollbar-color: #ccc #f8f9fa; /* Customize scrollbar colors */
}

/* Optional: Customize the scrollbar for Webkit browsers (Chrome, Safari) */
.card-body.flashcard-modal-sidebar::-webkit-scrollbar {
  width: 8px; /* Set the width of the scrollbar */
}

.card-body.flashcard-modal-sidebar::-webkit-scrollbar-thumb {
  background-color: #ccc; /* Set the color of the scrollbar thumb */
  border-radius: 4px; /* Add rounded corners to the scrollbar thumb */
}

.card-body.flashcard-modal-sidebar::-webkit-scrollbar-track {
  background-color: #f8f9fa; /* Set the color of the scrollbar track */
}

.sidebar-toggle-container {
  z-index: 1055;
}

#sidebar-toggle {
  z-index: 1060 !important;
}

.sidebar-toggle-container.collapsed .flashcard-modal-sidebar-main-sub-topic {
  display: none;
}

/* Unique styles for timeline */

.full-screen-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: transparent; /* semi-transparent black */
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.loader-overlay {
  text-align: center;
}

.full-screen-loader .loader-spinner {
  width: 4rem;
  height: 4rem;
}

.full-screen-loader .loader-text {
  margin-top: 1rem;
}

.custom-height {
  height: 90%;
}

.center-align {
  text-align: center;
}

.sp-learning-module body {
  background-color: #f8f9fa;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.sp-content-card {
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
  margin-bottom: 20px;
  overflow: hidden;
  max-width: 1000px;
  margin-left: auto;
  margin-right: auto;
}
.sp-content-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}
.sp-card-header {
  color: white;
  font-weight: bold;
  padding: 12px 20px;
  border-bottom: none;
}
.sp-card-body {
  padding: 25px;
  background-color: white;
}
.sp-explanation-text {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #333;
}
.sp-option-btn {
  display: block;
  width: 100%;
  margin-bottom: 10px;
  padding: 12px;
  border-radius: 8px;
  transition: all 0.2s;
  text-align: left;
}
.sp-option-btn:hover {
  background-color: #e9ecef;
}
.sp-option-btn.sp-selected {
  background-color: #6c5ce7;
  color: white;
  border-color: #6c5ce7;
}
.sp-option-btn.sp-correct {
  background-color: #28a745;
  color: white;
  border-color: #28a745;
}
.sp-option-btn.sp-incorrect {
  background-color: #dc3545;
  color: white;
  border-color: #dc3545;
}
.sp-progress {
  height: 6px;
  border-radius: 5px;
}
.sp-progress-bar {
  background-color: #6c5ce7;
}
.sp-nav-btn {
  background-color: #6c5ce7;
  color: white;
  border: none;
  transition: all 0.2s;
  padding: 10px 25px;
}
.sp-nav-btn:hover {
  background-color: #5649c0;
}
.sp-nav-btn:disabled {
  background-color: #d1d1d1;
}
.sp-card-note .sp-card-header {
  background-color: var(--flashcard-header-color);
}
.sp-card-quiz .sp-card-header {
  background-color: var(--quiz-header-color);
}
.sp-card-icon {
  margin-right: 10px;
  font-size: 1.2rem;
}
.sp-feedback-message {
  margin-top: 15px;
  padding: 10px;
  border-radius: 8px;
  font-weight: 500;
  display: none;
}
.sp-feedback-correct {
  background-color: rgba(40, 167, 69, 0.2);
  color: #28a745;
}
.sp-feedback-incorrect {
  background-color: rgba(220, 53, 69, 0.2);
  color: #dc3545;
}
.sp-card-container {
  min-height: 300px;
}
/* Animation for card transitions */
@keyframes spFadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.sp-content-card {
  animation: spFadeIn 0.5s ease-out;
}
.sp-center-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.sp-learning-main-content {
  padding: 20px;
  border-radius: 10px;
  background-color: #ffffff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}
.sp-progress-wrapper {
  padding: 15px;
  background-color: #f9f9f9;
  border-radius: 10px;
  margin-top: 20px;
}
.sp-nav-buttons {
  margin-top: 15px;
}

/* Status Card */
.status-card {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 350px;
  z-index: 1050;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.08);
  border-radius: 0.5rem;
  overflow: hidden;
}

.progress-bar {
    transition: width 0.5s ease-in-out;
}

.alert {
    margin-bottom: 0;
    border-left: 4px solid;
    border-radius: 20px;
}

.alert-warning {
    border-left-color: #ffc107;
}

.alert-info {
    border-left-color: #0dcaf0;
}

.alert-success {
    border-left-color: #198754;
}

.alert-light {
    border-left-color: #f8f9fa;
}

/* Animation for appearance */
@keyframes slideIn {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.status-card:not(.d-none) {
    animation: slideIn 0.3s ease forwards;
}


/* ----------------- Global styles ----------------- */


.breadcrumb {
    padding: 10px 30px;
    background-color: #fff;
    border-bottom: 1px solid #e0e0e0;
}

.breadcrumb a {
    text-decoration: none;
    color: #666;
}

.breadcrumb span {
    color: #999;
}

.container-timeline {
    display: flex;
    height: calc(100vh - 100px);
    padding: 15px;
    gap: 15px;
}

/* First sidebar for terms */
.terms-sidebar {
    width: 100px;
    background-color: #f0f0f5;
    padding: 20px 0;
    border-right: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.sidebar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    margin-bottom: 10px;
    cursor: pointer;
}

.sidebar-icon {
    width: 40px;
    height: 40px;
    background-color: #ddd;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
}

.active-icon {
    background-color: #7859cb;
    color: white;
}

.term-label {
    font-size: 12px;
    color: #888;
    text-align: center;
}

/* Second sidebar for weeks */
.weeks-sidebar {
    width: 250px;
    background-color:var(--side-bar-bg-color);
    padding: 20px 10px;
    border-right: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    overflow-y: auto;
}

.week-selector {
    max-height: 100%;
    overflow-y: auto;
    padding: 0 10px;
}

.week-button {
    display: block;
    width: 100%;
    padding: 15px;
    margin-bottom: 10px;
    background-color: #e1e0f5;
    border: none;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    font-size: 14px;
    color: #555;
}

.week-button.active {
    background-color: #7859cb;
    color: white;
}

.topic-list {
    max-height: 200px;
    overflow-y: auto;
}

.topic-item {
    padding: 10px;
    margin: 5px 0;
    background-color: var(--bg-primary);
    border-radius: 5px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.topic-item-active {
    background-color:var(--bg-primary-active);
}

.topic-icon {
    margin-right: 10px;
}

.main-content-timeline {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    background-color: #fff;
    border-radius: 12px;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.progress-bar-timeline {
    height: 10px;
    background-color: #e0e0e0;
    border-radius: 5px;
    margin: 10px 0 30px;
    position: relative;
}

.progress-fill {
    height: 100%;
    width: 10%;
    background-color: #4cd964;
    border-radius: 5px;
}

.progress-text {
    text-align: right;
    font-size: 12px;
    color: #888;
    margin-top: 5px;
}

.module-container {
    margin-bottom: 30px;
}

.modules-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.module {
    background-color: #e1e0f5;
    padding: 25px 20px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 100px;
    cursor: pointer;
    height: 60px;
}

.module.active {
    background-color: #7859cb;
    color: white;
}

.module-title {
    font-size: 16px;
    margin-bottom: 10px;
}

.module-count {
    font-size: 12px;
    color: #888;
}

.module.active .module-count {
    color: #e0e0e0;
}

.progress-circle {
    width: 30px;
    height: 30px;
    background-color: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    /* color: transparent; */
    font-weight: bold;
}

.module-icon {
    width: 30px;
    height: 30px;
    background-color: transparent;
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}

.module.active .module-icon {
    background-color: #9d86e2;
}

.footer {
    text-align: center;
    padding: 20px;
    color: #666;
    font-size: 14px;
}

.number-patterns-header {
    background-color: #e1e0f5;
    padding: 3px 10px;
    border-radius: 5px;
    font-size: 12px;
    color: #7859cb;
    margin-bottom: 5px;
}

.nav-btn {
    padding: 8px 15px;
    border: none;
    background-color: #7859cb;
    color: white;
    border-radius: 5px;
    cursor: pointer;
}

.term-dropdown {
    cursor: pointer;
    margin-bottom: 10px;
}

.term-content {
    display: none;
}

.term-content.active {
    display: block;
}

.timeline-header {
    background-color: #f0f0f5;
    padding: 10px 15px;
    margin-top: -15px;
    border-radius: 5px;
}

.timeline-title {
    font-size: 18px;
    margin-bottom: 5px;
}

.timeline-subtitle {
    font-size: 14px;
    color: #666;
}

.flashcard-modal-sidebar {
  max-height: 100vh;
  overflow-y: auto;
}

.topic-item.active {
  background-color: #0056b3;
  color: white;
  font-weight: bold;
  font-size: .875em;; /* Font size */
}

.sidebar-icon.active {
  background-color: var(--secondary-color); /* Highlight color */
  color: white;
  border-radius: 8px; /* Optional: rounded corners */
}

.topic-item.active {
  background-color: var(--course-border-light); /* Active background color */
  border-left: 4px solid #007bff; /* Blue border on the left */
  color: #0056b3; /* Text color */
  font-weight: bold; /* Bold text */
  font-size: .875em;; /* Font size */
}


@media (min-width: 768px) {
  .week-button {
      flex: 1 1 calc(25% - 10px); /* Four buttons per row on medium screens */
  }
}

.topic-subject-card {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
}
/* Ensure .topic-subject-card retains its fixed size */
.topic-subject-card {
  background-color: var(--light-gray);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 15px;
  cursor: pointer;
  transition: background-color 0.2s;
  border: 1px solid #ddd;
  width: 100%;
  height: 145px; /* Fixed height */
  display: flex;
  flex-direction: column;
  gap: 15px; /* Space between modules */
  overflow: hidden; /* Prevent overflow if content exceeds height */
}

/* Modules grid inside .topic-subject-card */
.topic-subject-card .modules-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); /* Flexible layout */
  gap: 15px;
  height: 100%; /* Ensure grid fills the card */
}

/* Ensure text remains inside the module */
.topic-subject-card .module {
  background-color: #e1e0f5;
  padding: 20px 15px;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 80px;
  cursor: pointer;
  height: auto; /* Allow height to adjust dynamically */
  overflow: hidden; /* Prevent content from overflowing */
}

/* Style for the text inside the module */
.topic-subject-card .module h5.small {
  font-size: 0.875em; /* Default size */
  margin: 0;
  color: var(----modul-bg-color); /* Text color */
  display: -webkit-box; /* Use a flexbox-like container */
  -webkit-line-clamp: 3; /* Limit to 3 lines */
  -webkit-box-orient: vertical; /* Set the box orientation to vertical */
  overflow: hidden; /* Hide overflowing text */
  text-overflow: ellipsis; /* Add ellipsis for overflowing text */
  max-width: 100%; /* Ensure text stays within the module */
  word-wrap: break-word; /* Break long words if necessary */
}

/* Adjust text styles for smaller screens */
@media (max-width: 768px) {
  .topic-subject-card .module h5.small {
    font-size: 0.8em; /* Reduce font size for smaller screens */
  }
}

@media (max-width: 480px) {
  .topic-subject-card .module h5.small {
    font-size: 0.75em; /* Further reduce font size for extra small screens */
  }
}

/* Adjust text sizes for module titles and counts */
.topic-subject-card .module-title {
  font-size: 0.875em; /* Default size */
  margin-bottom: 10px;
  color: #555;
}

.topic-subject-card .module-count {
  font-size: 12px; /* Default size */
  color: #888;
}

/* Adjust styles for smaller screens */
@media (max-width: 768px) {
  .topic-subject-card .modules-grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr)); /* Smaller grid items */
  }

  .topic-subject-card .module-title {
    font-size: 0.8em; /* Smaller text for titles */
  }

  .topic-subject-card .module-count {
    font-size: 11px; /* Smaller text for counts */
  }

  .topic-subject-card .progress-circle {
    width: 25px;
    height: 25px;
    font-size: 0.8em; /* Adjust progress circle text size */
    background-color: #666;
  }

  .topic-subject-card .module-icon {
    width: 25px;
    height: 25px;
    margin-bottom: 8px; /* Adjust spacing */
  }
}

/* Adjust styles for extra small screens */
@media (max-width: 480px) {
  .topic-subject-card .modules-grid {
    grid-template-columns: 1fr; /* Single column layout */
  }

  .topic-subject-card .module-title {
    font-size: 0.75em; /* Further reduce text size */
  }

  .topic-subject-card .module-count {
    font-size: 10px;
  }

  .topic-subject-card .progress-circle {
    width: 20px;
    height: 20px;
    font-size: 0.7em;
  }

  .topic-subject-card .module-icon {
    width: 20px;
    height: 20px;
    margin-bottom: 5px;
  }
}

.flashcard-details {
  width: 80%; /* Maintain the increased width */
  height: auto;
  margin: 0 auto; /* Center the flashcard details */
  padding: 20px; /* Add padding for spacing */
  border: 2px solid #ddd; /* Add a light border */
  border-radius: 10px; /* Add rounded corners */
  background-color: var(--primary-color);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); /* Add a subtle shadow */
}

.flashcard-details .card-title {
  font-size: 1.2rem; /* Increase font size for the title */
  font-weight: bold; /* Make the title bold */
  color: #333; /* Darker color for the title */
  margin-bottom: 15px; /* Add spacing below the title */
  text-align: center; /* Center-align the title */
  border-bottom: 2px solid #ddd; /* Add a bottom border */
  padding-bottom: 10px; /* Add padding below the title */
  background-color: var(--dark-purple);
  width: 100%;
}

.flashcard-details .card-body {
  font-size: 1rem; /* Set a readable font size for the content */
  line-height: 1.6; /* Improve readability with line height */
  color: #555; /* Use a medium-dark color for the content */
  text-align: justify; /* Justify the content for better alignment */
}

body {
  font-family: 'Arial', sans-serif; /* Replace 'Arial' with your desired font */
  font-size: 14px; /* Optional: Set a consistent font size */
  line-height: 1.5; /* Optional: Set a consistent line height */
}

.selected-option label {
  font-weight: bold;
  color: green; /* Bootstrap primary color */
}

.selected-option input[type="radio"] {
  accent-color: green; /* Change the radio button color */
}

/* Remove bullet points from options */
.flashcard-details ul {
  list-style-type: none; /* Remove bullet points */
  padding-left: 0; /* Remove default padding */
}

.flashcard-details ul li {
  margin-bottom: 10px; /* Add spacing between options */
}

.card .learner-card {
  background-color: var(--primary-color);
}

.container, .container-fluid, .container-lg, .container-md, .container-sm, .container-xl, .container-xxl {
  padding-right: var(--bs-gutter-x, .75rem);
  padding-left: var(--bs-gutter-x, .75rem);
  margin-right: auto;
  margin-left: auto;
}

/* Custom container padding helper for parent My Children layout.
   Keeps default padding on mobile, adds extra right padding only on large screens
   to align cards without breaking small viewports. */
.margin-right {
  padding-right: var(--bs-gutter-x, .75rem);
  padding-left: var(--bs-gutter-x, .75rem);
}

@media (min-width: 1200px) {
  .margin-right {
    /* Adjust 14.75rem if you want more/less shift */
    padding-right: calc(var(--bs-gutter-x, .75rem) + 14.75rem);
  }
}

.assist-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  word-wrap: break-word;
  background-color:var(--assist-subject-card-color);
  border: 1px solid rgba(0, 0, 0, .125);
  border-radius: 13px;
}

/* General styles for the modal */
.modal-learning-modal-container {
  display: flex;
  flex-direction: row;
  gap: 1rem;
}

/* Sidebar styles */
.flashcard-modal-sidebar-main-sub-topic {
  flex: 1;
  max-width: 380px;

}

/* Main content styles */
.modal-main-content {
  flex: 3;
  overflow-y: auto;
}

/* Responsive styles for smaller screens */
@media (max-width: 768px) {
  .modal-learning-modal-container {
      flex-direction: column;
  }

  .flashcard-modal-sidebar-main-sub-topic {
      max-width: 100%;
      margin-bottom: 1rem;
  }

  .modal-main-content {
      flex: 1;
  }

  .sp-progress-wrapper {
      flex-direction: column;
      align-items: flex-start;
  }

  .monitoring-margin-top {
        margin-top: -241px !important;
    }

  .timeline-and-progress {
      flex-direction: column;
      align-items: flex-start;
  }

  .progress-counter {
      margin-left: 0;
      margin-top: 0.5rem;
  }

  /* These three were written for the learning/flashcard modal above
     (term_week_topics.js) but were unscoped, so on every phone-width page
     every .btn became 35% of its container (letter-stacked labels, oversized
     question tiles) and every .text-center flex row turned into a column.
     Keep them inside the component they were written for. (.btn-semi is a
     bespoke class used only by that component's pages, so it stays as is.) */
  .modal-learning-modal-container .text-center {
      flex-direction: column;
      gap: 0.5rem;
  }

  .modal-learning-modal-container .btn {
      width: 35%;
  }

  .btn-semi {
      width: 22%;
  }
}
#sidebar_toggle {
  z-index: 1000;
  cursor: pointer;
  font-size: 1.5rem;
}

/* Loader styles */
.learner-subject.loading {
  position: relative;
  pointer-events: none; /* Disable clicks while loading */
  opacity: 0.7; /* Optional: Dim the subject while loading */
}

.learner-subject.loading::after {
  content: '';
  border: 2px solid #ccc;
  border-top-color: #4f46e5;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  animation: spin 1s linear infinite;
  display: inline-block;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.custom-transparent-modal .modal-content {
  background-color: rgba(255, 255, 255, 0.8); /* Semi-transparent white background */
  border: none;
  box-shadow: none;
}

.custom-transparent-modal .modal-backdrop {
  background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black backdrop */
}


.option-box {
  transition: background-color 0.3s, border-color 0.3s;
}

.option-box-correct {
  background-color: #d4edda;
  border-color: #28a745;
  color: #155724;
}

.option-box-incorrect {
  background-color: #f8d7da;
  border-color: #dc3545;
  color: #721c24;
}

.option-box-selected {
  background-color: #f0f8ff; /* Light blue background */
  border-color: #007bff; /* Blue border */
}

.option-box,
.option-box * {
    filter: none !important;
    opacity: 1 !important;
    backdrop-filter: none !important;
}

/* Adjust layout for smaller screens */
@media (max-width: 768px) {
  .modal-learning-modal-container {
      flex-direction: column;
  }

  .flashcard-modal-sidebar-main-sub-topic {
      width: 100%;
      max-width: none;
      border-right: none;
      border-bottom: 1px solid #ddd;
  }

  .modal-main-content {
      width: 100%;
      padding: 10px;
  }

  .sp-card-container {
      margin-bottom: 20px;
  }

  .sp-progress-wrapper {
      flex-direction: column;
      align-items: flex-start;
  }

  .progress-counter {
      margin-top: 10px;
      margin-left: 0;
  }

  .text-center {
      flex-direction: column;
  }

  .text-center button {
      margin-bottom: 10px;
      width: 40%;
      text-align: center !important;
  }
}

/* Adjust font sizes for smaller screens */
@media (max-width: 576px) {
  .sp-note-title,
  .sp-quiz-title {
      font-size: 1rem;
  }

  .sp-quiz-question {
      font-size: 0.9rem;
  }

  .form-check-label {
      font-size: 0.85rem;
  }

  .btn {
      font-size: 0.8rem;
  }
}

/* Recruitment management */
.recruitment-management-standalone-page { background: #f6f7fb; }
.recruitment-management-shell { color: #182230; padding: 1.5rem; }
.recruitment-page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; margin-bottom: 1.4rem; }
.recruitment-eyebrow { color: #6941c6; font-size: .73rem; font-weight: 700; letter-spacing: .08em; margin: 0 0 .35rem; text-transform: uppercase; }
.recruitment-page-title { font-size: 1.55rem; font-weight: 700; letter-spacing: -.025em; margin: 0; color: #101828; }
.recruitment-page-copy { color: #667085; font-size: .84rem; margin: .4rem 0 0; }
.recruitment-head-actions { display: flex; gap: .65rem; flex-shrink: 0; }
.recruitment-btn { align-items: center; border: 1px solid #d0d5dd; border-radius: .55rem; display: inline-flex; font-size: .78rem; font-weight: 650; gap: .45rem; justify-content: center; padding: .58rem .85rem; text-decoration: none; transition: .18s ease; }
.recruitment-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(16, 24, 40, .08); }
.recruitment-btn.light { background: #fff; color: #344054; }
.recruitment-btn.primary { background: #7f56d9; border-color: #7f56d9; color: #fff; }
.recruitment-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; margin-bottom: 1rem; }
.recruitment-metric { background: #fff; border: 1px solid #eaecf0; border-radius: .75rem; padding: 1rem; box-shadow: 0 1px 2px rgba(16, 24, 40, .04); }
.recruitment-metric-top { align-items: center; color: #667085; display: flex; font-size: .75rem; font-weight: 600; justify-content: space-between; }
.recruitment-metric-icon { align-items: center; background: #f4ebff; border-radius: .5rem; color: #7f56d9; display: flex; height: 2rem; justify-content: center; width: 2rem; }
.recruitment-metric-value { color: #101828; font-size: 1.55rem; font-weight: 700; letter-spacing: -.03em; line-height: 1; margin-top: .85rem; }
.recruitment-metric-foot { color: #667085; font-size: .68rem; margin-top: .45rem; }
.recruitment-metric-foot strong { color: #039855; font-weight: 700; }
.recruitment-workspace { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(17rem, .72fr); gap: 1rem; }
.recruitment-panel { background: #fff; border: 1px solid #eaecf0; border-radius: .8rem; box-shadow: 0 1px 3px rgba(16, 24, 40, .04); overflow: hidden; }
.recruitment-panel-head { align-items: center; border-bottom: 1px solid #eaecf0; display: flex; justify-content: space-between; padding: 1rem 1.15rem; }
.recruitment-panel-title { color: #101828; font-size: .92rem; font-weight: 700; margin: 0; }
.recruitment-panel-copy { color: #667085; font-size: .7rem; margin: .25rem 0 0; }
.recruitment-more { align-items: center; background: #fff; border: 1px solid #eaecf0; border-radius: .45rem; color: #667085; display: flex; height: 2rem; justify-content: center; width: 2rem; }
.recruitment-flow { list-style: none; margin: 0; padding: 1rem 1.15rem 1.2rem; }
.recruitment-flow-step { display: grid; grid-template-columns: 2.1rem minmax(0, 1fr) auto; gap: .75rem; min-height: 4.75rem; position: relative; }
.recruitment-flow-step:not(:last-child)::after { background: #e4e7ec; content: ""; height: calc(100% - 2rem); left: 1rem; position: absolute; top: 2rem; width: 2px; }
.recruitment-step-marker { align-items: center; background: #f4ebff; border: 4px solid #f9f5ff; border-radius: 50%; color: #7f56d9; display: flex; font-size: .72rem; font-weight: 700; height: 2.1rem; justify-content: center; position: relative; width: 2.1rem; z-index: 1; }
.recruitment-step-marker.complete { background: #12b76a; border-color: #ecfdf3; color: #fff; }
.recruitment-step-copy { padding: .12rem 0 .85rem; }
.recruitment-step-name { color: #344054; font-size: .8rem; font-weight: 700; margin: 0; }
.recruitment-step-description { color: #667085; font-size: .69rem; line-height: 1.45; margin: .25rem 0 0; }
.recruitment-step-tools { align-items: flex-start; display: flex; gap: .4rem; padding-top: .08rem; }
.recruitment-badge { border-radius: 999px; font-size: .62rem; font-weight: 700; padding: .27rem .52rem; white-space: nowrap; }
.recruitment-badge.flexible { background: #f2f4f7; color: #475467; }
.recruitment-badge.timed { background: #fff6ed; color: #c4320a; }
.recruitment-badge.live { background: #ecfdf3; color: #027a48; }
.recruitment-side-stack { display: grid; align-content: start; gap: 1rem; }
.recruitment-progress-body { padding: 1rem 1.15rem 1.15rem; }
.recruitment-progress-row { align-items: end; display: flex; justify-content: space-between; margin-bottom: .55rem; }
.recruitment-progress-label { color: #344054; font-size: .73rem; font-weight: 650; }
.recruitment-progress-number { color: #101828; font-size: 1.3rem; font-weight: 700; }
.recruitment-progress-track { background: #f2f4f7; border-radius: 999px; height: .48rem; overflow: hidden; }
.recruitment-progress-fill { background: #7f56d9; border-radius: inherit; height: 100%; width: 68%; }
.recruitment-progress-meta { color: #667085; display: flex; font-size: .65rem; justify-content: space-between; margin-top: .55rem; }
.recruitment-action-list { display: grid; gap: .15rem; padding: .55rem; }
.recruitment-action { align-items: center; border-radius: .55rem; color: #344054; display: grid; font-size: .74rem; font-weight: 650; gap: .7rem; grid-template-columns: 2rem minmax(0, 1fr) auto; padding: .62rem; text-decoration: none; transition: background .15s ease; }
.recruitment-action:hover { background: #f9fafb; color: #6941c6; }
.recruitment-action-icon { align-items: center; background: #f4ebff; border-radius: .48rem; color: #7f56d9; display: flex; height: 2rem; justify-content: center; }
.recruitment-action small { color: #98a2b3; display: block; font-size: .61rem; font-weight: 500; margin-top: .12rem; }

@media (max-width: 991.98px) {
  .recruitment-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .recruitment-workspace { grid-template-columns: 1fr; }
}

@media (max-width: 575.98px) {
  .recruitment-management-shell { padding: .85rem; }
  .recruitment-page-head { display: block; }
  .recruitment-head-actions { margin-top: 1rem; }
  .recruitment-head-actions .recruitment-btn { flex: 1; }
  .recruitment-metrics { gap: .6rem; }
  .recruitment-metric { padding: .8rem; }
  .recruitment-metric-value { font-size: 1.3rem; }
  .recruitment-flow-step { grid-template-columns: 2.1rem minmax(0, 1fr); }
  .recruitment-step-tools { grid-column: 2; padding: 0 0 .8rem; }
}

@media (max-width: 768px) {
  .sidebar-item {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px;
      font-size: 14px;
  }

  .sidebar-icon.term-icon {
      margin-right: 10px;
  }

  .term-label {
      flex-grow: 1;
      text-align: left;
  }

  .week-selector {
      display: flex;
      flex-direction: column;
      gap: 10px;
  }

  .week-container {
      display: flex;
      flex-direction: column;
      align-items: stretch;
  }

  .week-button {
      width: 100%;
      font-size: 14px;
      padding: 8px;
  }

  .week-topic-list {
      margin-top: 10px;
      padding-left: 15px;
  }

  .topic-item {
      display: flex;
      align-items: center;
      padding: 8px;
      font-size: 14px;
  }

  .topic-icon {
      margin-right: 10px;
  }
}
/* Container for the layout */
.container-timeline {
  display: flex;
  flex-direction: row;
  height: 100vh; /* Full height */
  overflow: hidden;
}

/* Term Sidebar */
.terms-sidebar {
  flex: 0 0 100px; /* Fixed width for the term sidebar */
  background-color: #f0f0f5;
  padding: 20px 0;
  border-right: 1px solid #e0e0e0;
  overflow-y: auto;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Week Sidebar */
.weeks-sidebar {
  flex: 0 0 250px; /* Fixed width for the week sidebar */
  background-color: #f0f0f5;
  padding: 20px 10px;
  border-right: 1px solid #e0e0e0;
  overflow-y: auto;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Main Content */
.main-content-timeline {
  flex: 1; /* Take up the remaining space */
  padding: 20px;
  overflow-y: auto;
  background-color: #fff;
  border-radius: 12px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
  .terms-sidebar {
      flex: 0 0 80px; /* Reduce width for smaller screens */
  }

  .weeks-sidebar {
      flex: 0 0 200px; /* Reduce width for smaller screens */
  }

  .main-content-timeline {
      padding: 10px; /* Adjust padding for smaller screens */
  }
}

.learner-card-list {
  min-width: 180px;
  max-width: 200px;
  cursor: pointer;
}

.selected-learner {
  background-color:var(--secondary-color);
  color: white;
}

.unselected-learner {
  background-color: text-dark;
  color: black;
}

.progress-bar-container {
  height: 10px;
}

.performance-dashboard .stats-card {
  border-radius: 16px;
  color: white;
  padding: 1rem;
}

.performance-dashboard .card-title {
  margin-bottom: 1rem;
  font-size: 0.875rem;
  font-weight: bold;
  text-align: center;
}

.performance-dashboard .list-group-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  background-color: transparent;
  color: white;
}

/* manage subjects */


.search-input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Subject Grid */
.subject-grid {
    display: flex;
    overflow-x: auto;
    gap: 1rem;
    padding: 0.5rem;
    scrollbar-width: thin;
}

.subject-grid::-webkit-scrollbar {
    height: 4px;
}

.subject-grid::-webkit-scrollbar-thumb {
    background-color: #cbd5e1;
    border-radius: 4px;
}

.subject-card.active, .subject-card.active-subject {
    border-color: var(--secondary-color);
}

.scroll-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    color: #64748b;
    transition: all 0.2s;
}

.scroll-btn:hover {
    background-color:var(--dark-purple);
    color: var(--primary-color);
}

.scroll-btn.left {
    left: -4.5rem;
}

.scroll-btn.right {
    right: -5.5rem;
}

/* Folders */
.folders-container {
    margin-top: -3rem;
}

.tile {
    background-color: #e9ecef;
    border-radius: 0.75rem;
    padding: 1.5rem 1rem;
    height: 100%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s;
    cursor: pointer;
}

.tile:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tile-icon {
    font-size: 2rem;
    color: var(--dark-purple);
    margin-bottom: 0.5rem;
}

.folder-name {
    font-weight: 600;
    margin-top: 0.75rem;
}

.folder-total-content {
    background-color: var(--purple-primary);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.folder-learner-grade {
    color: #64748b;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Upload Area */
.upload-area {
  background-color: #f8fafc;
  border: 2px dashed #cbd5e1;
  border-radius: 1.75rem;
  padding: 52rem;
  text-align: center;
  transition: all 0.3s;
  height: 229px;
  margin-top: 60px;
}

.upload-area:hover {
    border-color: var(--dark-purple);
}

/* File Items */
.file-item, .uploaded-file-item {
    background-color: white;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
}

.uploaded-file-item:hover {
    background-color: #f1f5f9;
}

.uploaded-file-link {
    font-weight: 500;
    color: #334155;
    text-decoration: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .subject-card {
        min-width: 150px;
    }

    .status-card {
        width: 300px;
    }
}

/* Text sizes */
.text-xs {
    font-size: 0.95rem;
}

.text-xxs {
    font-size: 0.84rem;
}

/* iFrame */
iframe.file-url-view {
    width: 100%;
    height: 600px;
    border: none;
}

.dropdown-btn {
  background-color: var(--dark-purple);
  color: white;
  border: none;
  border-radius: 25px;
  padding: 10px 30px;
  font-weight: bold;
}

.dropdown-btn:hover {
  background-color: var(--primary-color);
  color: white;
}

.assist-form-container {
  max-width: 800px; /* Set a maximum width for the form */
  margin: 0 auto; /* Center the form horizontally */
  padding: 20px; /* Add padding inside the form container */
  background-color: transparent; /* Set a white background */
  border-radius: 10px; /* Add rounded corners */

  border: 1px solid #ddd; /* Optional: Add a light border */
}

.assist-form-container h2 {
  text-align: center; /* Center-align the heading */
  margin-bottom: 20px; /* Add spacing below the heading */
  font-size: 1.5rem; /* Adjust the font size */
}

.assist-form-container .form-label {
  font-weight: bold; /* Make the labels bold */
  margin-bottom: 5px; /* Add spacing below the labels */
  display: block; /* Ensure labels are on their own line */
}

.assist-form-container .form-control {
  width: 100%; /* Make the input fields take up the full width */
  padding: 10px; /* Add padding inside the input fields */
  border: 1px solid #ccc; /* Add a light border */
  border-radius: 5px; /* Add rounded corners */
  font-size: 1rem; /* Set a consistent font size */
  margin-bottom: 15px; /* Add spacing below the input fields */
}


  .tabs-container  .assist-nav-item .nav-link {
    border-radius: 12px;
    padding: 12px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--purple-primary);
    color: white;
    border: 1px solid var(--color-border);
    box-shadow: 0 2px 4px rgba(0,0,0,0.04);
    min-width: 80px;
  }

  .tabs-container  .assist-nav-item .nav-link.active {
    background-color: var(--color-all-light);
    color: var(--color-all);
    border-color: var(--color-all-border);
  }

  .tabs-container  .assist-nav-item .nav-link i {
    font-size: 22px;
    margin-bottom: 4px;
  }

  .bg-assist-success {
    background-color: var(--btn-color) !important;
}

  .bg-selected-subject {
    background-color: var(--secondary-color) !important;
}

/* Custom vertical scrollbar for subject tiles */
.child-subjects-tile {
  overflow-x: auto;
  white-space: nowrap;
  scroll-behavior: smooth;
  width: 100%;
  flex-direction: row;
  align-items: center;
  padding: 10px 0;
  margin-top: 16px; /* Add space above the scroller */
  margin-bottom: 16px; /* Add space below the scroller */
}

/* For Chrome, Edge, and Safari */
.child-subjects-tile::-webkit-scrollbar {
  width: 10px;                /* Vertical scrollbar width */
  height: 0;                  /* Hide horizontal scrollbar */
}

.child-subjects-tile::-webkit-scrollbar-thumb {
  background: #7B68EE;
  border-radius: 8px;
}

.child-subjects-tile::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.nav-tabs-responsive-wrapper {
  -webkit-overflow-scrolling: touch;
  width: 100%;
  overflow-x: auto;
}

.programme_tabs {
  min-width: 600px;
}

@media (max-width: 767.98px) {
  .programme_tabs {
    flex-wrap: wrap;
    display: flex;
    gap: 0.5rem;
  }

  .programme_tabs > .assist-nav-item {
    width: 33.3333% !important;
    max-width: 33.3333%;
    flex: 0 0 33.3333%;
    padding-left: 4px !important;
    padding-right: 4px !important;
    margin-bottom: 8px;
  }

  .programme_tabs .nav-link {
    font-size: 0.85rem;
    padding: 0.5rem 0.25rem;
    min-height: 60px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .programme_tabs .nav-text {
    font-size: 0.8rem;
    margin-top: 2px;
  }
  .programme_tabs i {
    font-size: 1.2rem;
    margin-top: 2px;
  }
}

@media (max-width: 767.98px) {
  .programme_tabs {
    flex-wrap: wrap;
    display: flex;
    gap: 0;
  }

  .programme_tabs > .assist-nav-item {
    width: 33.3333% !important;
    max-width: 16.3333%;
    flex: 1 0 -5.6667%;
    padding-left: 0 !important;
    padding-right: -8px !important;
    margin-bottom: 4px;
  }

  .programme_tabs .nav-link {
    min-width: 0 !important;
    width: 100% !important;
    padding: 0.3rem 0.1rem !important;
    font-size: 0.75rem !important;
    min-height: 44px;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .programme_tabs .nav-text {
    font-size: 0.75rem;
    margin-top: 2px;
  }

  .programme_tabs i {
    font-size: 1rem;
    margin-top: 2px;
  }
}
/* Responsive adjustments for parent_dashboard.html */
@media (max-width: 991.98px) {
    .home-page-md {
        display: none !important;
    }

    .home-page-sm {
        display: flex !important;
    }
}

@media (min-width: 992px) {
    .home-page-sm {
        display: none !important;
    }

    .home-page-md {
        display: flex !important;
    }
}

@media (max-width: 767.98px) {
    .welcome-text h2 {
        font-size: 1.3rem;
        line-height: 1.5;
        letter-spacing: 0.02em;
        padding-right: 6.5rem;
    }
    .home-page-card,
    .home-page-card-2 {
        padding: 1rem !important;
        font-size: 1rem !important;
    }

    .card-title {
        font-size: 1rem !important;
    }

    .device-mockup img {
        width: 100%;
        height: auto;
    }

    .hero-title {
        font-size: 2rem !important;
    }

    .hero-subtitle {
        font-size: 1rem !important;
    }

    .btn-primary-custom {
        font-size: 1rem !important;
        padding: 0.5rem 1rem !important;
    }

    .container.home-page {
        padding: 0 !important;
    }

    .row.home-page-sm > div {
        padding-left: 60px !important;
        padding-right: 0 !important;
    }
}

.learner-subjects-tiles {
  max-height: 600px;
  overflow-y: auto;
  margin-top: 20px;
}

@media (max-width: 600px) {
  .home-page-card,
  .home-page-card-2 {
    height: 120px !important;         /* Reduce card height */
    min-height: 90px !important;
    padding: 0.5rem !important;
    font-size: 0.85rem !important;
  }

  .card-icon {
    height: 48px !important;          /* Reduce icon size */
    width: 48px !important;
    margin-bottom: 8px !important;
  }

  .card-title {
    font-size: 0.95rem !important;    /* Reduce title font size */
    left: 16px !important;
    bottom: 8px !important;
  }

  .next-icon,
  .next-icon-2 {
    width: 20px !important;
    height: 20px !important;
    font-size: 1rem !important;
    top: 8px !important;
    right: 8px !important;
    bottom: 8px !important;
  }

  .welcome-text h2 {
    font-size: 1.1rem !important;
  }

  .hero-title {
    font-size: 1.3rem !important;
  }

  .hero-subtitle {
    font-size: 0.95rem !important;
  }

  .btn-primary-custom {
    font-size: 0.95rem !important;
    padding: 0.4rem 0.8rem !important;
    width: 80%;
  }
}

/* Make nav-link smaller on mobile */
@media (max-width: 767.98px) {
  .programme_tabs .nav-link {
    font-size: 0.85rem;
    padding: 0.5rem 0.25rem;
  }

  .programme_tabs .nav-text {
    font-size: 0.8rem;
  }

  .programme_tabs i {
    font-size: 1rem;
  }
}

.home-page-md { display: flex; }
.home-page-sm { display: none; }

/* Mobile: show .home-page-sm, hide .home-page-md, adjust card sizes */
@media (max-width: 767.98px) {
  .home-page-md { display: none !important; }
  .home-page-sm { display: block !important; }

  .home-page-card,
  .home-page-card-2 {
    padding: 12px 10px;
    min-height: 60px;
    font-size: 0.95rem;
    border-radius: 12px;
  }

  .card-title {
    font-size: 1rem;
  }

  .card-icon {
    width: 28px;
    height: 28px;
    margin-right: 8px;
  }

  .next-icon, .next-icon-2 {
    font-size: 1rem;
  }

  .h-277 {
    min-height: 80px !important;
  }
}

@media (max-width: 767.98px) {
  .home-page-sm {
    display: flex !important;
    flex-wrap: wrap;
    flex-direction: row !important;
    gap: 0.5rem;
  }

  .home-page-sm > div[class^="col-"] {
    width: 50% !important;
    max-width: 50%;
    flex: 0 0 50%;
    padding-left: 4px !important;
    padding-right: 4px !important;
    margin-bottom: 8px;
  }

  .home-page-card,
  .home-page-card-2 {
    width: 100%;
    margin-bottom: 0.5rem;
  }
}


@media (max-width: 767.98px) {
  .home-page-sm {
    display: flex !important;
    flex-wrap: wrap;
    flex-direction: row !important;
    gap: 0.5rem;
  }

  .home-page-sm > div[class^="col-"] {
    width: 33.3333% !important;
    max-width: 33.3333%;
    flex: 0 0 33.3333%;
    /* ... */
  }

  .home-page-card,
  .home-page-card-2 {
    width: 100%;
    height: 120px !important;      /* Fixed card height */
    min-height: 120px !important;
    max-height: 120px !important;
    margin-bottom: 0.5rem;
    padding: 0.5rem !important;
    font-size: 0.95rem !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }

  .card-icon {
    height: 48px !important;
    width: 48px !important;
    margin-bottom: 8px !important;
  }

  .card-title {
    font-size: 0.95rem !important;
    left: 16px !important;
    bottom: 8px !important;
    position: static !important;
    margin-top: 4px;
  }

  .next-icon,
  .next-icon-2 {
    width: 20px !important;
    height: 20px !important;
    font-size: 1rem !important;
    top: 8px !important;
    right: 8px !important;
    bottom: 8px !important;
  }
}

/* Ensure select product suit cards are not clipped on mobile */
@media (max-width: 767.98px) {
  #select_product_app .home-page-card,
  #select_product_app .home-page-card-2 {
    height: auto !important;
    min-height: 110px !important;
    max-height: none !important;
  }
}

/* Select product page: layout suit cards nicely on mobile */
@media (max-width: 767.98px) {
  #select_product_app .home-page-sm {
    display: flex !important;
    flex-wrap: wrap;
    flex-direction: row !important;
    justify-content: center;
    gap: 0.75rem;
  }

  #select_product_app .home-page-sm > div[class^="col-"] {
    width: 50% !important;
    max-width: 200px;
    flex: 0 0 50%;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-bottom: 0.75rem;
  }

  #select_product_app .home-page-card {
    width: 100%;
    margin: 0 auto;
  }

  /* Center the "Select a Product" heading on this page */
  #select_product_app .welcome-text,
  #select_product_app .welcome-text h2 {
    text-align: center !important;
    padding-left: 0;
    padding-right: 0;
  }
}

/* Select product page: ensure container is tall enough on mobile */
@media (max-width: 767.98px) {
  #select_product_app .scrollable-nav-container-none {
    min-height: 100vh;
    padding-bottom: 4.5rem; /* room above bottom nav */
  }
}

@media (max-width: 767.98px) {
    .container,
    .container-fluid,
    .container-lg,
    .container-md,
    .container-sm,
    .container-xl,
    .container-xxl {
        width: 100% !important;
        padding-right: var(--bs-gutter-x, 0.75rem 12px) !important;
        padding-left: var(--bs-gutter-x, 0.75rem) !important;
        margin-right: auto !important;
        margin-left: auto !important;
    }
}

@media (max-width: 767.98px) {
  .welcome-text {
    text-align: center !important;
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding-left: 1rem;
    padding-right: 6rem;
  }

  .welcome-text h2 {
    font-size: 1.3rem;
    line-height: 1.5; /* Add more vertical spacing */
    letter-spacing: 0.02em; /* Optional: add a bit of spacing between letters */
  }
}

@media (max-width: 767.98px) {
  .welcome-text {
    text-align: center !important;
    font-size: 1.1rem !important;
    margin-top: 1rem;
    margin-bottom: 1rem;
    padding-left: 1rem;
    padding-right: 1rem;
    line-height: 1.4;
  }

  .welcome-text h4 {
    font-size: 1.1rem !important;
    line-height: 1.3;
  }

  .progress-bars {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 1rem;
    margin-bottom: 1rem;
  }

  .progress-bars .bar {
    width: 18px;
    height: 8px;
    border-radius: 4px;
    margin: 0 2px;
  }

  .pricing-card {
    padding: 0.8rem 0.5rem;
    font-size: 0.95rem;
    border-radius: 12px;
    margin-bottom: 1rem;
  }

  .pricing-type.annual {
    font-size: 1rem;
  }

  .price {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
  }

  .feature-list {
    padding-left: 1rem;
    font-size: 0.92rem;
  }

  .btn-subscribe.subscription-plan {
    font-size: 0.95rem;
    padding: 0.4rem 0.8rem;
    width: 100%;
    margin-top: 0.5rem;
  }

  /* .container, .container-fluid {
    padding-left: 0.5rem !important;
    padding-right: 1.5rem !important;
  } */

  .container, .container-fluid {
    padding-left: 1.5rem !important;
    padding-right: 1.5rem !important;
  }

  .container-suits, .container-fluid-suits {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }


  .text-center {
    text-align: center !important;
  }
}

@media (max-width: 767.98px) {
  .pricing-card {
    padding: 0.6rem 0.4rem;
    font-size: 0.85rem;
    border-radius: 10px;
    margin-bottom: 0.7rem;
  }

  .pricing-type.annual {
    font-size: 0.92rem;
  }

  .price {
    font-size: 1rem;
    font-weight: bold;
    margin-bottom: 0.3rem;
  }

  .feature-list {
    padding-left: 0.8rem;
    font-size: 0.82rem;
  }

}

@media (max-width: 767.98px) {
  .btn-subscribe.subscription-plan {
    font-size: 0.75rem !important;
    width: 40% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
    text-align: center !important;
    padding: 0.3rem 0.5rem !important;
  }
}

@media (max-width: 768px) {
    .text-center button {
        margin-bottom: 10px;
        width: 48%;
    }
}

@media (max-width: 767.98px) {
  .container-lg,
  .container-md,
  .container-sm,
  .container-xl {
    width: 403px !important;
    padding-right: var(--bs-gutter-x, 4.75rem) !important;
    padding-left: var(--bs-gutter-x, -1.25rem) !important;
    margin-right: auto !important;
    margin-left: auto !important;
  }
  body, html {
    overflow-x: hidden !important;
  }
}


/* Make home-page cards and text left-aligned and more compact on mobile */
@media (max-width: 767.98px) {
  .home-page .row {
    justify-content: flex-start !important;
    gap: 0.5rem;
  }
  .home-page .col-md-3 {
    max-width: 95% !important;
    flex: 0 0 95% !important;
    margin-left: 0 !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
  .home-page-card,
  .home-page-card-2 {
    width: 100% !important;
    max-width: 320px !important;
    margin-left: 19px !important;
    margin-right: auto !important;
    height: auto !important;
    padding: 0.7rem 0.5rem !important;
    font-size: 1rem !important;
    align-items: flex-start !important;
    text-align: left !important;
  }

  .info-row {
    display: flex;
    margin-bottom: 8px;
    font-size: 14px;
    line-height: 1.5;
  }


  .card-title {
    font-size: 1rem !important;
    left: 0 !important;
    right: auto !important;
    text-align: left !important;
    position: static !important;
    margin-top: 8px;
    margin-bottom: 0;
  }

  .device-mockup {
    margin: 1.5rem 0 0 0 !important;
    text-align: left !important;
  }
  .container.home-page {
    padding: 0 !important;
  }
}

.clickable-subject {
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
}

.clickable-subject:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.clickable-icon {
  position: absolute;
  bottom: 0;
  right: 0;
  margin: 8px;
  font-size: 20px;
  color: white;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.clickable-subject:hover .clickable-icon {
  opacity: 1;
}

@media (max-width: 576px) {
  .small-card,
  .stats-card {
    border-radius: 10px;
    padding: 0.25rem !important;
    font-size: 0.75rem !important;
    min-width: 80px;
    max-width: 293px;
    min-height: 50px;
    max-height: 110px;
    width: auto;
    height: 100%;
    text-align: center;
    word-break: break-word;
    margin-left: 0.75rem !important;
    margin-right: 0.75rem !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
  }
  .stats-card .card-title,
  .small-card .card-title {
    font-size: 0.85em !important;
    margin-bottom: 0.3em;
    text-align: center;
    word-break: break-word;
  }
  .stats-card .list-group-item,
  .small-card .list-group-item {
    font-size: 0.75em !important;
    padding: 0.15em 0.2em !important;
    gap: 0.3em;
    text-align: center;
    word-break: break-word;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }
  .stats-card .badge,
  .small-card .badge {
    font-size: 0.75em !important;
    padding: 0.1em 0.4em !important;
    word-break: break-word;
  }
  .dashboard-welcome {
    font-size: 1rem !important;
    text-align: center !important;
  }
  .performance-dashboard,
  .performance-dashboard .row {
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
  }

  .program .stats-card {
    min-width: 150px;
    min-height: 100px;
    border-radius: 30px;
  }
}

.subject-grid {
    display: flex !important;
    flex-wrap: wrap !important;
    overflow-x: unset !important;
    white-space: normal !important;
}

.subject-grid .col-md-6 {
  display:block;
}

.preview-section {
  position: sticky;
  top: 20px;
  height: fit-content;
  align-self: flex-start; /* Align to top within grid */
}


/* Code Editor Preview Specific Styles (for the right panel) */
.code-editor-preview {
  background: #f1f3f5;
  border: 2px solid #dee2e6;
  border-radius: 8px;
  padding: 15px;
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  color: #495057;
  margin: 15px 0;
  display: flex; /* Use flexbox for line numbers and code content */
  align-items: baseline; /* Align content to the top baseline */
  overflow-x: auto; /* Allow horizontal scrolling for long lines */
  max-height: 300px; /* Limit height and allow vertical scrolling */
  overflow-y: auto;
}

.code-editor-preview .line-numbers {
  color: #6c757d;
  margin-right: 15px;
  user-select: none;
  flex-shrink: 0; /* Prevent line numbers from shrinking */
  text-align: right;
  white-space: pre; /* Preserve whitespace and line breaks for numbers */
  padding-right: 5px; /* Small padding for separation */
  border-right: 1px solid #e9ecef; /* Visual separator */
}

.code-editor-preview .code-content {
  flex-grow: 1; /* Allow code content to take remaining space */
  white-space: pre-wrap; /* Preserve whitespace and wrap lines */
  word-break: break-word; /* Break long words to prevent overflow */
}

/* Starter Code Input Editor Styles (for the left panel) */
.starter-code-editor-container {
  position: relative;
  display: flex;
  border: 2px solid #e9ecef; /* Match form control border */
  border-radius: 8px; /* Match form control border-radius */
  overflow: hidden; /* Hide overflow for scroll sync */
  background: white; /* Match form control background */
  transition: all 0.3s ease; /* Add transition for consistency */
  min-height: 150px; /* Ensure a minimum height for the editor */
}

.starter-code-editor-container:focus-within {
  border-color: #667eea; /* Custom focus color */
  box-shadow: 0 0 0 0.25rem rgba(102, 126, 234, 0.25); /* Custom focus shadow */
  transform: translateY(-2px); /* Slight lift on focus */
}

.starter-code-editor-container .line-numbers-input {
  flex-shrink: 0;
  width: 40px; /* Fixed width for line numbers */
  padding: 12px 0; /* Match textarea vertical padding */
  text-align: right;
  color: #6c757d;
  background-color: #f8f9fa; /* Light background for line numbers */
  border-right: 1px solid #e9ecef;
  user-select: none;
  overflow: hidden; /* Hide scrollbar for line numbers */
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.5; /* Match textarea line-height */
}

.starter-code-editor-container textarea {
  flex-grow: 1;
  border: none; /* Remove default textarea border */
  outline: none; /* Remove default textarea outline */
  resize: none; /* Disable textarea resize */
  padding: 12px 16px; /* Match form control padding */
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  line-height: 1.5; /* Ensure line height matches line numbers */
  background: transparent; /* Transparent background to show container background */
  overflow-y: auto; /* Enable scrolling for the textarea */
}

/* Modal Styles - Adapted for Bootstrap look */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1050; /* Higher than Bootstrap's default modal-backdrop */
  backdrop-filter: blur(1px);
}

.custom-modal-content {
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  width: 95%;
  max-width: 900px;
  text-align: left;
  position: relative;
  transform: translateY(-20px);
  opacity: 0;
  animation: modal-fade-in 0.3s forwards;
}

@keyframes modal-fade-in {
  to {
      transform: translateY(0);
      opacity: 1;
  }
}

/* Loading indicator */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.8);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1060; /* Above modal */
  font-size: 1.5rem;
  color: #667eea;
  backdrop-filter: blur(3px);
}

.curriculum-content-list .list-group-item,
.challenge-list .list-group-item {
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
    border-radius: 8px;
    margin-bottom: 8px;
}
.curriculum-content-list .list-group-item:hover,
.challenge-list .list-group-item:hover {
    background-color: #e2f0ff;
    transform: translateY(-2px);
}
.curriculum-content-list .list-group-item.active,
.challenge-list .list-group-item.active {
    background-color: #4facfe;
    border-color: #4facfe;
    color: white;
    font-weight: bold;
}

.code-editor-container {
    position: relative;
    display: flex;
    border: 2px solid #ced4da;
    border-radius: 8px;
    overflow: hidden;
    background: white;
    min-height: 300px; /* Min height for editor */
    height: 100%; /* Make it fill parent height */
    resize: vertical; /* Allow vertical resizing */
}

.code-editor-container .line-numbers-editor {
    flex-shrink: 0;
    width: 40px;
    padding: 12px 0;
    text-align: right;
    color: #6c757d;
    background-color: #f8f9fa;
    border-right: 1px solid #e9ecef;
    user-select: none;
    overflow: hidden;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

.code-editor-container textarea {
    flex-grow: 1;
    border: none;
    outline: none;
    resize: none;
    padding: 12px 16px;
    font-family: 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
    background: transparent;
    overflow-y: auto;
}

.live-preview-iframe {
    width: 100%;
    height: 100%; /* Make it fill parent height */
    border: 2px solid #ced4da;
    border-radius: 8px;
    background-color: white;
}

/* New style for the row containing editor and preview */
.editor-preview-row {
    min-height: 450px; /* Ensure enough vertical space for side-by-side */
    display: flex;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
}


.CodeMirror-gutters {
  border-right: 1px solid #ddd;
  background-color: #f8f9fa;
}


.input-group .btn {
  z-index: 0;

}

.school_level_container{
    width: 80%;
    padding-right: var(--bs-gutter-x, .75rem);
    padding-left: var(--bs-gutter-x, .75rem);
    margin-right: auto;
    margin-left: auto;
}

.folder-tile {
  position: relative;
  min-height: 110px;
  width: 100%;
  border: 1px solid #dee2e6;
  padding: 1rem;
  background: #e9ecef;
  border-radius: 0.25rem;
}

.folder-name-top-left {
  position: absolute;
  top: 1rem;
  left: 1rem;
  text-align: left;
  font-weight: bold;
  margin-bottom: 0.5rem;
  z-index: 2;
  background: transparent;
  padding-right: 1rem;
}

.folder-add-btn {
  position: relative;
  top: 1rem;
  right: 1rem;
  z-index: 2;
  background:linear-gradient(135deg, #667eea 0%, #764ba2 100%)
}

.folder-files-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80px;
  height: 100%;
  width: 100%;
  text-align: center;
  position: relative;
  z-index: 1;
}

.btn-link {
    font-weight: 400;
    color: #fff;
    text-decoration: none;
}

.subject-tick-icon {
  position: absolute;
  top: 8px;
  right: 12px;
  font-size: 1.4em;
  color: white;
  z-index: 2;
  pointer-events: none;
}

.learner-subject-badge {
  font-size: 0.95em;
  padding: 0.7em 1.5em 0.7em 0.8em;
  border-radius: 20px;
  margin-bottom: 8px;
}

/* create new container style width */

.subject-tile-container {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.child-subjects-tile-flex {
  max-height: 600px;
  overflow-y: auto;
  margin-top: 20px;
}

.top-lebel-badge {
  position: absolute;
  top: 12px;
  right: 12px;
}

.scrollable-list-icon {
  overflow-y: auto;
}


.course_img {
  height: 100%;
  object-fit: cover;
}

@media (max-width: 767.98px) {
    .terms-sidebar,
    .weeks-sidebar {
        display: none !important; /* Hide sidebars on mobile, show via offcanvas */
        width: 0 !important;
        padding: 0 !important;
        border: none !important;
        box-shadow: none !important;
    }
    .main-content-timeline {
        padding: 8px !important;
        border-radius: 8px !important;
    }
    /* If using offcanvas, Vue/Bootstrap will handle sidebar display */
}

@media (max-width: 767.98px) {
    .terms-sidebar,
    .weeks-sidebar {
        display: none !important;
    }
    /* Offcanvas handled by Bootstrap/Vue, appears on top */
}

.responsive-modules-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 1rem;
    align-items: stretch;
}

@media (max-width: 768px) {
    .responsive-modules-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
    .topic-subject-card {
        margin-bottom: 1rem;
    }
    .module-title, .module-count, .progress-circle {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .responsive-modules-grid {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    .topic-subject-card {
        padding: 0.5rem;
    }
    .module-title, .module-count, .progress-circle {
        font-size: 0.9rem;
    }
}
/* Desktop: 5 columns, good spacing */
.topic-subject-card .modules-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 15px;
  height: 100%;
}

/* Tablet: 2 columns */
@media (max-width: 900px) {
  .topic-subject-card .modules-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}

/* Mobile: 1 column, compact, stacked */
@media (max-width: 600px) {
  .topic-subject-card {
    padding: 10px !important;
    height: auto !important;
    min-height: unset !important;
    margin-bottom: 10px !important;
  }
  .topic-subject-card .modules-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .topic-subject-card .module {
    min-height: 60px;
    padding: 10px 8px;
    font-size: 0.95em;
  }
  .topic-subject-card .module-title {
    font-size: 1em;
    margin-bottom: 4px;
  }
  .topic-subject-card .module-count {
    font-size: 0.95em;
  }
  .topic-subject-card .progress-circle {
    width: 34px;
    height: 32px;
    font-size: 0.9em;
  }
  .topic-subject-card .module-icon {
    width: 22px;
    height: 22px;
    margin-bottom: 4px;
    font-size: 1em;
  }
  .topic-subject-card .module h5.small {
    font-size: 1em;
    margin-bottom: 2px;
    word-break: break-word;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
}

.btn-xs-custom {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.75rem !important;
    line-height: 1.2 !important;
    border-radius: 0.2rem !important;
}

@media (max-width: 768px) {
    .btn-xs-custom {
        min-width: 64px;
    }
}

    .sidebar-toggle-btn {
        z-index: 1001;
    }
    .sidebar-toggle-btn-desktop {
        position: absolute;
        top: 0;
        right: 0;
        margin-top: 1rem;
        margin-right: 1rem;
    }
    .flashcard-modal-sidebar-main-sub-topic.mobile-sidebar {
        z-index: 1000;
        background: white;
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: 100vw;
        max-width: 100vw;
        overflow-y: auto;
        box-shadow: 2px 0 8px rgba(0,0,0,0.1);
        border: none !important;
    }
    .flashcard-modal-sidebar-main-sub-topic.mobile-sidebar .card {
        border: none !important;
        box-shadow: none !important;
    }
    .sidebar-close-btn {
        position: absolute;
        top: 10px;
        right: 10px;
        border: none !important;
        background: transparent !important;
        z-index: 1100;
        box-shadow: none !important;
    }
    .btn-xs-custom {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.75rem !important;
        line-height: 1.2 !important;
        border-radius: 0.2rem !important;
    }
    .hide-on-mobile {
        display: none !important;
    }
    
    @media (min-width: 769px) {
        .hide-on-mobile {
            display: block !important;
        }
    }

    @media (max-width: 991.98px) {
    .profile-tabs-sidebar {
      flex-direction: row !important;
      width: 100% !important;
      margin-bottom: 1rem;
      margin-right: 0 !important;
    }
    .profile-tabs-sidebar ul {
      flex-direction: row !important;
      width: 100% !important;
    }
    .profile-tabs-sidebar .nav-item {
      width: 100% !important;
      margin-bottom: 0.5rem !important;
      margin-right: 0.5rem !important;
    }
    .profile-main-card-content {
      width: 100% !important;
      max-width: 100% !important;
    }
    .container.d-flex.flex-column.align-items-center.justify-content-center.py-4 {
      padding: 0.5rem !important;
    }
  }

  @media (max-width: 767.98px) {
    .profile-tabs-sidebar {
      flex-direction: row !important;
      width: 100% !important;
      margin-bottom: 1rem;
      margin-right: 0 !important;
    }
    .profile-tabs-sidebar ul {
      flex-direction: row !important;
      width: 100% !important;
    }
    .profile-tabs-sidebar .nav-item {
      width: 100% !important;
      margin-bottom: 0.5rem !important;
      margin-right: 0.5rem !important;
    }
    .profile-main-card-content {
      width: 100% !important;
      max-width: 100% !important;
    }
    .container.d-flex.flex-column.align-items-center.justify-content-center.py-4 {
      padding: 0.25rem !important;
    }
  }

  /* Tab button: increase width, decrease height */
  .profile-tabs-sidebar .nav-link {
    min-width: 180px;
    width: 320px !important;
    min-height: 48px;
    height: 78px !important;
    font-size: 1.15rem !important;
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
    border-radius: 0.5rem !important;
    margin-bottom: 0.5rem !important;
    display: flex;
    align-items: center;
    gap: -1.25rem;
  }

  @media (max-width: 991.98px) {
    .profile-tabs-sidebar .nav-link {
      width: 100% !important;
      min-width: 0 !important;
      font-size: 1rem !important;
      height: 44px !important;
      min-height: 44px !important;
      padding: 0.4rem 0.5rem !important;
    }
  }

  @media (max-width: 767.98px) {
    .profile-tabs-sidebar .nav-link {
      width: 100% !important;
      min-width: 0 !important;
      font-size: 0.98rem !important;
      height: 40px !important;
      min-height: 40px !important;
      padding: 0.3rem 0.4rem !important;
    }
  }

  /* Responsive card widths */
  .profile-main-card-content > div[class*="w-100"] {
    max-width: 900px;
    margin: 0 auto;
  }

  @media (max-width: 991.98px) {
    .profile-main-card-content > div[class*="w-100"] {
      max-width: 100% !important;
      margin: 0 !important;
    }
  }

  @media (max-width: 991.98px) {
    .profile-main-card-content {
      display: block !important;
      width: 100% !important;
      max-width: 100% !important;
      min-width: 0 !important;
      flex-grow: 1 !important;
    }
    .profile-main-card-content > div[class*="w-100"] {
      display: block !important;
      width: 100% !important;
      max-width: 100% !important;
      min-width: 0 !important;
    }
}

/* Professional Dashboard Styles */
.dashboard {
  max-width: 2400px;
  margin: 0 auto;
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  overflow: hidden;
}

.header {
  background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
  color: white;
  padding: 30px 40px;
  position: relative;
  overflow: hidden;
}

.header-content { position: relative; z-index: 2; }
.student-name { font-size: 2.5rem; font-weight: 700; margin-bottom: 10px; text-shadow: 0 2px 4px rgba(0,0,0,0.3);}
.last-updated { font-size: 1rem; opacity: 0.9; font-weight: 300;}
.main-content { padding: 40px;}
.overview-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 25px;
  margin-bottom: 40px;
}

.overview-card {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 16px;
  padding: 25px;
  text-align: center;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.overview-card.excellent { --accent-color: #10b981; }
.overview-card.good { --accent-color: #3b82f6; }
.overview-card.needs-attention { --accent-color: #f59e0b; }
.overview-card.critical { --accent-color: #ef4444; }
.card-value { font-size: 2rem; font-weight: 700; color: #1e293b; margin-bottom: 5px;}
.card-label { font-size: 0.85rem; color: #64748b;}
.subjects-section { margin-top: 40px;}
.section-title { font-size: 1.5rem; font-weight: 600; color: #1e293b; margin-bottom: 25px; display: flex; align-items: center; gap: 10px;}
.section-icon { width: 24px; height: 24px; background: linear-gradient(135deg, #4f46e5, #7c3aed); border-radius: 6px; display: flex; align-items: center; justify-content: center; color: white; font-size: 12px;}
.subjects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 25px;
}

.subject-card {
  background: white;
  border-radius: 16px;
  padding: 25px;
  border: 1px solid #e2e8f0;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.subject-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--progress-color);
}

.subject-header { display: flex; justify-content: between; align-items: flex-start; margin-bottom: 20px;}
.subject-name { font-size: 1.1rem; font-weight: 600; color: black; margin-bottom: 5px;}
.subject-status { padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.5px;}
.status-excellent { background: #d1fae5; color: #065f46;}
.status-good { background: #dbeafe; color: #1e40af;}
.status-attention { background: #fef3c7; color: #92400e;}
.status-critical { background: #fee2e2; color: #991b1b;}
.progress-container { margin: 20px 0;}
.progress-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px;}
.progress-label { font-size: 0.9rem; color: #64748b; font-weight: 500;}
.progress-percentage { font-size: 0.9rem; font-weight: 600; color: #1e293b;}
.progress-section .progress-bar { width: 100%; height: 8px; background: #f1f5f9; border-radius: 4px; overflow: hidden;}
.progress-fill { height: 100%; border-radius: 4px; transition: width 0.8s ease; position: relative;}
.skills-breakdown {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.skill-item { text-align: center; padding: 12px; background: #f8fafc; border-radius: 12px; border: 1px solid #e2e8f0;}
.skill-score { font-size: 1.5rem; font-weight: 700; margin-bottom: 5px;}
.skill-name { font-size: 0.8rem; color: #64748b; font-weight: 500;}
.last-activity { margin-top: 15px; padding-top: 15px; border-top: 1px solid #e2e8f0; font-size: 0.85rem; color: #64748b;}
.export-section { margin-top: 40px; padding: 25px; background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%); border-radius: 16px; text-align: center;}
.export-btn { background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%); color: white; border: none; padding: 12px 24px; border-radius: 12px; font-weight: 600; cursor: pointer; transition: all 0.3s ease; margin: 0 10px;}
.export-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);}
@media (max-width: 768px) {
  .main-content { padding: 20px;}
  .header { padding: 20px;}
  .student-name { font-size: 2rem;}
  .subjects-grid { grid-template-columns: 1fr;}
}


.profile-tab-container {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}


.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

@media (min-width: 1100px) {
    .subjects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 700px) and (max-width: 1099px) {
    .subjects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

@media (max-width: 767.98px) {
  .dashboard {
    max-width: 95%;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    padding-left: 0.75rem;
    margin-right: 3rem;
    padding-right: 0.75rem;
  }
}

/* Layout containers */
.parent-desktop-layout {
  min-height: 30vh;
  margin-top: 2rem;
  margin-bottom: 2rem;
  margin-left: 0.5rem;
  margin-right: 0.5rem;
  display: flex;
}

.parent-mobile-layout {
  margin-top: 1rem;
  padding-left: 0.25rem;
  padding-right: 1.25rem;
}

.parent-sidebar {
  width: 306px;
  min-width: 200px;
}

.parent-learner-list {
  gap: 1rem;
}

.parent-learner-card {
  cursor: pointer;
}

.parent-main-content {
  padding: 1rem;
}

.parent-top-subjects-list,
.parent-attention-subjects-list {
  max-height: 72px;
  overflow-y: auto;
}

.parent-subject-cards-scroll {
  max-height: 520px;
  overflow-y: auto;
}

.parent-export-title {
  margin-bottom: 15px;
  color: #1e293b;
}

.bg-purple {
  background-color: #7B68EE !important;
}

@media (max-width: 767.98px) {
  .xsmall-card {
    font-size: 0.7rem !important;
    padding: 0.3rem 0.5rem !important;
    border-radius: 8px !important;
    min-height: 60px !important;
    height: auto !important;
    box-shadow: none !important;
  }
  .xsmall-text {
    font-size: 0.7rem !important;
    padding: 0.05rem !important;
  }
  .xsmall-bar {
    height: 0.25rem !important;
  }
  .export-btn.btn-sm {
    font-size: 0.8rem !important;
    padding: 0.15rem 0.4rem !important;
    margin-right: 0.1rem;
  }
  .progress-card.xsmall-card {
    padding: 0.5rem !important;
    margin-bottom: 0.5rem !important;
    box-shadow: none !important;
    width: 376px;
    right: 19px;
    
  }
  
}

/* Profile Dashboard Styles */
.profile-container {
  max-width: 2100px;
  margin: 0 auto;
  background: rgba(255,255,255,0.95);
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.1);
  overflow: hidden;
  min-height: 100vh; /* Increased height */
}
.profile-header {
  background:var(--primary-color);
  color: white;
  padding: 0rem;
  text-align: center;
  position: relative;
  height: 50px;
}
.profile-header h1 { font-size: 2.5rem; margin-bottom: 0.5rem;}
.profile-header p { font-size: 1.1rem; opacity: 0.9; }
.profile-content { padding: 2rem; }
.profile-tab-navigation {
  display: flex;
  background: #f8fafc;
  border-radius: 12px;
  padding: 6px;
  margin-bottom: 2rem;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.06);
}
.profile-tab-btn {
  flex: 1;
  padding: 12px 20px;
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  color: #64748b;
  transition: all 0.3s ease;
  position: relative;
}
.profile-tab-btn.active {
  background: var(--primary-color);
  color: white;
  box-shadow: 0 4px 12px rgba(79,70,229,0.3);
}
.profile-tab-content { }
.profile-profile-section {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.profile-profile-avatar { text-align: center; }
.profile-avatar {
  width: 150px; height: 150px; border-radius: 50%;
  background: linear-gradient(135deg,#ff6b6b,#feca57);
  display: flex; align-items: center; justify-content: center;
  font-size: 3rem; color: white; margin: 0 auto 1rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
}
.profile-avatar:hover { transform: scale(1.05); }
.profile-edit-btn {
  background: linear-gradient(135deg,#10b981 0%,#059669 100%);
  color: white; border: none; padding: 0.75rem 1.5rem;
  border-radius: 8px; cursor: pointer; font-weight: 600;
  transition: all 0.3s ease; margin-top: 1rem;
}
.profile-edit-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 25px rgba(16,185,129,0.3); }
.profile-profile-info {
  background: #f8fafc; padding: 1.5rem; border-radius: 12px; border-left: 4px solid #4f46e5;
}
.profile-info-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.75rem 0; border-bottom: 1px solid #e2e8f0;
}
.profile-info-row:last-child { border-bottom: none; }
.profile-info-label { font-weight: 600; color: #374151; }
.profile-info-value { color: #6b7280; }
.profile-edit-profile-card {
  max-width: 600px; margin: 0 auto; background: #fff; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.07);
  margin-bottom: 2rem;
}
.profile-card-header { font-weight: bold; padding: 1rem 1.5rem; border-bottom: 1px solid #e2e8f0; }
.profile-card-body { padding: 1.5rem; }
.profile-row { display: flex; gap: 1rem; margin-bottom: 1rem; }
.profile-col { flex: 1; }
.profile-col-full { flex: 1 1 100%; }
.profile-form-label { font-size: 0.95rem; }
.profile-form-control { width: 100%; padding: 0.5rem; border-radius: 6px; border: 1px solid #e2e8f0; }
.profile-is-invalid { border-color: #dc3545; }
.profile-invalid-feedback { color: #dc3545; font-size: 0.85rem; }
.profile-btn-save {
  background: linear-gradient(135deg,#10b981 0%,#059669 100%);
  color: white; border: none; padding: 0.5rem 1.2rem; border-radius: 8px; font-weight: 600; margin-right: 1rem;
}
.profile-btn-cancel {
  background: #e2e8f0; color: #374151; border: none; padding: 0.5rem 1.2rem; border-radius: 8px; font-weight: 600;
}
.profile-text-danger { color: #dc3545; }
.profile-subscription-card {
  background: linear-gradient(135deg,#667eea 0%,#764ba2 100%);
  color: white; padding: 2rem; border-radius: 16px; margin-bottom: 2rem; position: relative; overflow: hidden;
}
.profile-plan-name { font-size: 1.8rem; font-weight: 700; margin-bottom: 0.5rem; }
.profile-plan-price { font-size: 2.5rem; font-weight: 800; margin-bottom: 1rem; }
.profile-plan-price-unit { font-size: 1rem; opacity: 0.8; }
.profile-plan-features { list-style: none; padding-left: 0; }
.profile-plan-features li { padding: 0.5rem 0; position: relative; padding-left: 1.5rem; }
.profile-plan-features li::before { content: 'âœ“'; position: absolute; left: 0; color: #10b981; font-weight: 800; }
.profile-subscription-details {
  background: #f8fafc; padding: 1.5rem; border-radius: 12px; margin-top: 1rem;
}
.profile-payment-table {
  background: white; border-radius: 12px; overflow: hidden; box-shadow: 0 4px 6px rgba(0,0,0,0.07);
}
.profile-table-header {
  background: #f8fafc; padding: 1rem; border-bottom: 2px solid #e2e8f0; font-weight: 600; color: #374151;
  display: grid; grid-template-columns: 1fr 1fr 1fr 1fr;
}
.profile-table-row {
  display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; padding: 1rem; border-bottom: 1px solid #f1f5f9; transition: background 0.2s ease;
}
.profile-table-row:last-child { border-bottom: none; }
.profile-status-badge {
  display: inline-block; padding: 0.25rem 0.75rem; border-radius: 20px; font-size: 0.875rem; font-weight: 600;
}
.profile-status-success { background: #dcfce7; color: #166534; }
.profile-status-pending { background: #fef3c7; color: #92400e; }
.profile-btn-download {
  color: #4f46e5; text-decoration: none; font-weight: 600; border: none; background: none; cursor: pointer;
}
.profile-plan-options { display: flex; gap: 2rem; flex-wrap: wrap; }
.profile-plan-option {
  background: #fff; color: #374151; padding: 1.5rem; border-radius: 12px; box-shadow: 0 2px 8px rgba(0,0,0,0.07); margin-bottom: 1rem; flex: 1 1 300px;
  border: 2px solid transparent; transition: border 0.2s;
}
.profile-plan-active { border-color: #4f46e5; }
.profile-plan-option-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.profile-btn-subscribe {
  background: linear-gradient(135deg,#10b981 0%,#059669 100%);
  color: white; border: none; padding: 0.5rem 1.2rem; border-radius: 8px; font-weight: 600; margin-top: 1rem;
}
@media (max-width: 768px) {
  .profile-content { padding: 1rem; }
  .profile-tab-navigation { flex-direction: column; gap: 4px; padding: 4px; }
  .profile-tab-btn { padding: 14px 16px; font-size: 0.9rem; }
  .profile-profile-section { grid-template-columns: 1fr; gap: 1.5rem; }
  .profile-avatar { width: 120px; height: 120px; font-size: 2.5rem; }
  .profile-profile-info { padding: 1rem; }
  .profile-info-row { flex-direction: column; align-items: flex-start; padding: 1rem 0; gap: 0.3rem; }
  .profile-subscription-card { padding: 1.5rem; margin-bottom: 1.5rem; }
  .profile-plan-name { font-size: 1.5rem; }
  .profile-plan-price { font-size: 2rem; }
  .profile-plan-features { font-size: 0.9rem; }
  .profile-payment-table { border-radius: 8px; }
  .profile-table-header { display: none; }
  .profile-table-row { display: block; padding: 1.5rem 1rem; border-bottom: 1px solid #f1f5f9; background: white; margin-bottom: 8px; border-radius: 8px; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
  .profile-table-row > div { display: flex; justify-content: space-between; align-items: center; padding: 0.5rem 0; border-bottom: 1px solid #f1f5f9; }
  .profile-table-row > div:last-child { border-bottom: none; }
  .profile-table-row > div::before { content: attr(data-label); font-weight: 600; color: #6b7280; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.5px; }
}


.btn-xs, .form-control-xs {
  padding: 0.15rem 0.5rem;
  font-size: 0.75rem;
  border-radius: 0.2rem;
  line-height: 1.2;
}

/* Extra small button style */
.btn-xs {
  font-size: 0.7rem !important;
  padding: 0.15rem 0.5rem !important;
  line-height: 1.1 !important;
  border-radius: 0.2rem !important;
}


/* Space below subjects list so button doesn't overlap */
.subjects-row {
  margin-bottom: 2.2rem;
  padding-right: 7rem;
}

/* Mobile adjustments */
@media (max-width: 767.98px) {
  .add-subject-btn-mobile {
    position: absolute;
    bottom: 12px;
    right: 9px;
    z-index: 2;
    font-size: 0.7rem !important;
    padding: 0.15rem 0.4rem !important;
    line-height: 1.1 !important;
    border-radius: 0.2rem !important;
    width: 66px;
  }
  .subjects-row-mobile {
    margin-bottom: 2.2rem;
    padding-right: 5.5rem;
  }
}

.add-subjects-back-btn { font-size: 1.25rem; }
.add-subjects-title-desktop { font-size: 1.25rem; }
.add-subjects-search-group { max-width: 300px; }

.subject-name-desktop { padding: 1rem; }

.add-subjects-back-btn-mobile { font-size: 1rem; }
.add-subjects-title-mobile { font-size: 1rem; }
.add-subjects-mobile-container { padding: 0; margin: 0; }
.add-subjects-learner-mobile { margin: 0 4px 8px 4px; }
.avatar-mobile { font-size: 0.85rem; width: 32px; height: 32px; }
.avatar-label-mobile { font-size: 0.85rem; }
.learner-name-mobile { font-size: 0.75rem; white-space: nowrap; }
.add-subjects-search-mobile { font-size: 0.85rem; padding: 0 8px; }
.add-subjects-search-group-mobile { max-width: 110px; }
.add-subjects-tile-mobile { padding: 0 4px; }
.add-subjects-col-mobile { padding-left: 2px; padding-right: 2px; }
.subject-mobile {
  min-height: 38px;
  font-size: 0.72rem;
  padding: 0.25rem 0.2rem;
  border-radius: 8px;
  margin-bottom: 4px;
  overflow: hidden;
  width: 100%;
}
.subject-tick-mobile { top: 2px; right: 2px; font-size: 0.75rem; }
.subject-name-mobile { font-size: 0.72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0; }
.add-subjects-content-btn { font-size: 0.8rem; padding: 2px 8px; }
.add-subjects-next-btn-mobile button { font-size: 0.8rem; padding: 2px 18px; }

/* Desktop */
.subject-desktop { cursor: pointer; }
.subject-name-desktop { padding: 1rem; }
.folder-name-desktop { margin-right: 1.5rem; }
.folder-add-btn-desktop { font-size: 0.85rem; min-width: 32px; min-height: 24px; line-height: 1; margin-left: auto; }

/* Mobile */
.content-back-btn-mobile { font-size: 1rem; }
.content-title-mobile { font-size: 1rem; }
.avatar-mobile { width: 32px; height: 32px; font-size: 0.85rem; }
.learner-name-mobile { font-size: 0.75rem; white-space: nowrap; }
.content-alert-mobile { font-size: 0.9rem; }
.content-subjects-mobile { padding: 0 2px; }
.content-col-mobile { padding-left: 2px; padding-right: 2px; }
.subject-mobile {
  min-height: 38px;
  font-size: 0.72rem;
  padding: 0.25rem 0.2rem;
  border-radius: 8px;
  margin-bottom: 4px;
  overflow: hidden;
  width: 100%;
}
.subject-tick-mobile { top: 2px; right: 2px; font-size: 0.75rem; }
.subject-name-mobile { font-size: 0.72rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0; }
.folder-tile-mobile { padding: 0.5rem 0.7rem; }
.folder-name-mobile { margin-right: 1.2rem; font-size: 0.68rem; max-width: 90px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.folder-add-btn-mobile-wrapper { position: relative; flex: 1; margin-top: -13px;padding-left: 42px; }
.folder-add-btn-mobile {
  position: absolute;
  top: 0; right: 0;
  font-size: 0.7rem;
  min-width: 24px;
  min-height: 20px;
  line-height: 1;
}
.folder-files-center-mobile { font-size: 0.85rem; }
.content-no-folder-mobile { font-size: 0.9rem; }
.next-btn-mobile { font-size: 0.85rem; padding: 2px 18px; }

.custom-modal-height {
  min-height: 85vh;
}

@media (max-width: 768px) {
.btn-mobile {
        width: 37%
194.531px
;
    }
}

/* Mobile Subscription Section Styles */
.mobile-title {
  font-size: 1.5rem;
}
.mobile-subtitle {
  font-size: 0.5rem;
}
.mobile-arrow-btn {
  font-size: 0.45rem;
  padding: 0.04rem 0.09rem;
}
.mobile-alert {
  font-size: 0.5rem;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
}
.mobile-pricing-card {
  font-size: 0.3rem;
  min-height: 20px;
  box-sizing: border-box;
}
.mobile-plan-name {
  font-size: 0.30rem;
}
.mobile-plan-price {
  font-size: 0.5rem;
}
.mobile-feature-list {
  padding-left: 0.1rem;
  margin-bottom: 0.08rem;
}
.mobile-feature-list li {
  font-size: 0.55rem;
}
.mobile-subscribe-btn {
  font-size: 0.65rem;
  padding: 0.2rem 0.5rem;
  min-height: 1.0em;
  border-radius: 8px;
  margin-top: 0.2rem;
}
.mobile-next-btn {
  font-size: 0.5rem;
  padding: 0.04rem 0.12rem;
  min-height: 1.5rem;
}

.subscription-card-colored {
  background: linear-gradient(135deg, #7B68EE 0%, #A084E8 100%);
  color: #fff;
  border-radius: 1rem;
  transition: box-shadow 0.2s, border 0.2s;
}
.subscription-card-monthly {
  background: var(--secondary-color);
}
.subscription-card-annual {
  background: var(--secondary-color);
}
.profile-plan-active {
  border: 2px solid #6c63ff !important;
  box-shadow: 0 0 0 2px #a084e8;
}

/* Desktop Card */
.custom-desktop-card {
    cursor: pointer;
    margin-bottom: 16px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
    transition: box-shadow 0.2s, border-color 0.2s;
    background: #fff;
}
.custom-desktop-card-hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.08);
    border-color: #b3d4fc;
}
.subtopic-title {
    font-weight: 600;
}
.module-title-desktop {
    font-size: 1rem;
}
.module-count-desktop {
    font-size: 0.95rem;
}
.notes-icon { color: #1976d2; }
.quiz-icon { color: #ff9800; }
.assessment-icon { color: #43a047; }
.progress-circle-desktop {
    background: #f5f5f5;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #1976d2;
}

/* Mobile Card */
.custom-mobile-card {
    padding: 8px;
    border-radius: 8px;
    border: 1px solid #eee;
    background:#d09eff;
    margin-bottom: 10px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.03);
    cursor: pointer;
}
.subtopic-title-mobile {
    font-weight: 600;
}
.module-row-mobile {
    font-size: 0.97rem;
}
.notes-icon-mobile { color: #1976d2; }
.quiz-icon-mobile { color: #ff9800; }
.assessment-icon-mobile { color: #43a047; }
.progress-icon-mobile { color: #1976d2; }
.module-count-mobile {
    font-weight: 500;
}
.progress-mobile {
    font-weight: 600;
}

@media (max-width: 768px) {
  .modal-header {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }
  .modal-header .modal-title {
    flex: 1 1 auto;
    text-align: left;
  }
  .modal-header .btn {
    margin-left: auto !important;
  }
}

/* Card gradients */
.card-gradient-green {
  background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%) !important;
  box-shadow: 0 8px 32px rgba(86, 171, 47, 0.15);
  border: none !important;
}
.card-gradient-blue {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%) !important;
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.15);
  border: none !important;
}
.card-gradient-orange {
  background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%) !important;
  box-shadow: 0 8px 32px rgba(245, 158, 11, 0.15);
  border: none !important;
}
.card-gradient-red {
  background: linear-gradient(135deg, #FFA0AC 0%, #FF6B9D 100%) !important;
  box-shadow: 0 8px 32px rgba(255, 107, 107, 0.15);
  border: none !important;
}

/* Skill circle progress backgrounds */
.skill-item-mobile {
  background: rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 8px;
  flex: 1;
  min-width: 70px;
  text-align: center;
  backdrop-filter: blur(10px);
  margin-bottom: 4px;
}
.skill-progress-circle {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  margin: 0 auto 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
  color: #000;
  background: rgba(255,255,255,0.2);
  position: relative;
}
.circle-green {
  background: conic-gradient(#4ade80 0% 80%, rgba(255,255,255,0.2) 80% 100%);
}
.circle-blue {
  background: conic-gradient(#3b82f6 0% 60%, rgba(255,255,255,0.2) 60% 100%);
}
.circle-orange {
  background: conic-gradient(#f59e0b 0% 40%, rgba(255,255,255,0.2) 40% 100%);
}
.circle-red {
  background: conic-gradient(#ef4444 0% 20%, rgba(255,255,255,0.2) 20% 100%);
}

/* Card and button hover effects */
.progress-card.xsmall-card {
  border: none !important;
  border-radius: 16px !important;
  backdrop-filter: blur(20px);
  box-shadow: 0 8px 32px rgba(0,0,0,0.1);
}
.skill-item-mobile:hover {
  transform: scale(1.05);
  transition: transform 0.2s ease;
}
.progress-card.xsmall-card button:hover {
  background: rgba(255,255,255,0.3) !important;
  transform: translateY(-1px);
  transition: all 0.2s ease;
}

.min-w-220 { min-width: 220px; }
.subject-title-lg { font-size: 1.5rem; font-weight: 700; }
.subject-title-mobile { color: #000; font-weight: 700; font-size: 1.25rem; }
.subject-status-mobile { background: rgba(251,15,15,0.2); color: #000; padding: 2px 6px; border-radius: 8px; font-size: 0.6rem; }
.subject-label-mobile { color: rgba(255,255,255,0.8); font-size: 0.9rem; }
.subject-progress-mobile { color: #000; font-weight: 600; font-size: 1.1rem; }
.skill-name-mobile { font-size: 0.6rem; color: #212529;; }
.subject-last-activity-mobile { font-size: 0.65rem; color: #64748b; }
.subject-btn-mobile {
  font-size: 0.8rem;
  background: rgba(255,255,255,0.2);
  border: 1px solid rgba(255,255,255,0.3);
  color: white;
  border-radius: 20px;
  backdrop-filter: blur(10px);
  font-weight: 600;
  padding: 8px 16px;
}
.xsmall-bar { background: rgba(255,255,255,0.2); height: 6px; border-radius: 3px; }
.list-disc { list-style: disc; }

@media (min-width: 768px) {
  .overview-cards.d-md-flex {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 25px !important;
    width: 100%;
  }
  .overview-card {
    min-width: 0 !important;
    width: 100% !important;
    height: 100% !important;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
  }
}

.overview-card {
  min-height: 180px;
}

/* Make the profile card bigger on mobile */
@media (max-width: 767.98px) {
    .mobile-container .profile-card-mobile {
        min-height: 220px;
        font-size: 1.2rem;
        padding: 2rem 1rem;
    }
}

  .overall-card {
    background: linear-gradient(135deg, var(--homepage-card-color-1), var(--homepage-card-color-2));
    color: #fff;
    border-radius: 30px;
    padding: 20px;
    position: relative;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  
  .overall-card h1 {
    font-size: 25px;
    font-weight: bold;
    margin: 0;
    text-align: end;
  }
  
  .overall-card p {
    font-size: 15px;
    margin: 0;
    position: absolute;
    bottom: 20px;
    left: 20px;
  }


.hide-survey-scrollbar::-webkit-scrollbar {
  display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
.hide-survey-scrollbar {
  -ms-overflow-style: none;  /* IE and Edge */
  scrollbar-width: none;     /* Firefox */
}

.learning-header-card {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  position: relative;
}

.header-gradient {
  height: 4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.header-content {
  padding: 24px;
  text-align: center;
}

.header-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a202c;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.header-subtitle {
  color: #718096;
  margin-bottom: 0;
  font-size: 0.95rem;
  line-height: 1.5;
}

.modern-alert {
  border: none;
  border-radius: 12px;
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fef5e7;
  border-left: 4px solid #f6ad55;
}


.alert-content strong {
  display: block;
  color: #c05621;
  margin-bottom: 4px;
}

.alert-content p {
  color: #744210;
  font-size: 0.9rem;
}

.modern-close {
  background: none;
  border: none;
  font-size: 1.2rem;
  opacity: 0.6;
  transition: opacity 0.3s ease;
}

.modern-close:hover {
  opacity: 1;
}


.subject-card-modern {
  background: white;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  border: 1px solid #e2e8f0;
  overflow: hidden;
  transition: all 0.3s ease;
  position: relative;
  width: 95%;
  height: 100%;
  display: flex;
  flex-direction: column;
  right:11px;
}

.subject-card-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.subject-header-modern {
  padding: 20px 20px 16px;
  position: relative;
}

.subject-name-modern {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1a202c;
  margin: 0;
  flex-grow: 1;
  padding-right: 12px;
}

.subject-progress-badge {
  background: #f7fafc;
  color: #4a5568;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 0.9rem;
  font-weight: 600;
  border: 1px solid #e2e8f0;
}


.status-badge-modern {
  padding: 4px 10px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge-modern.needs-attention {
  background: #fed7d7;
  color: #c53030;
}

.status-badge-modern.on-track {
  background: #c6f6d5;
  color: #38a169;
}

.status-badge-modern.completed {
  background: #bee3f8;
  color: #3182ce;
}

.skills-performance-grid {
  grid-template-columns: repeat(auto-fit, minmax(75px, 1fr));
  gap: 5px;
  padding: 0 20px 20px;
  margin: 0 -1px;
}

.skill-performance-item {
  text-align: center;
  padding: 12px 8px;
  background: white;
  border-radius: 12px;
  transition: all 0.3s ease;
  border: 1px solid #e2e8f0;
  width: 90px;
}

.skill-performance-item:hover {
  background: #edf2f7;
  transform: translateY(-1px);
}


.skill-progress-circle-modern {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  margin: 0 auto;
  position: relative;
  background: conic-gradient(
    var(--skill-color) 0deg calc(var(--progress) * 3.6deg),
    #e2e8f0 calc(var(--progress) * 3.6deg) 360deg
  );
  padding: 3px;
}

.skill-progress-inner {
  width: 100%;
  height: 100%;
  background: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.skill-percentage {
  font-size: 0.75rem;
  font-weight: 600;
  color: #4a5568;
}

.skill-label-modern {
  font-size: 0.75rem;
  color: #718096;
  font-weight: 500;
  line-height: 1.2;
}

.subject-action-section {
  padding: 0 20px 20px;
  margin-top: auto;
}

.start-learning-btn-modern {
  width: 100%;
  background: var(--button-gradient);
  color: white;
  border: none;
  padding: 14px 20px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.start-learning-btn-modern:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

.start-learning-btn-modern:active {
  transform: translateY(0);
}

.btn-arrow {
  font-size: 1rem;
  transition: transform 0.3s ease;
}

.start-learning-btn-modern:hover .btn-arrow {
  transform: translateX(2px);
}

/* Skill-specific colors */
.skill-performance-item:nth-child(1) .skill-progress-circle-modern { --skill-color: #48bb78; }
.skill-performance-item:nth-child(2) .skill-progress-circle-modern { --skill-color: #4299e1; }
.skill-performance-item:nth-child(3) .skill-progress-circle-modern { --skill-color: #ed8936; }
.skill-performance-item:nth-child(4) .skill-progress-circle-modern { --skill-color: #9f7aea; }
.skill-performance-item:nth-child(5) .skill-progress-circle-modern { --skill-color: #38b2ac; }

/* Responsive improvements */
@media (max-width: 576px) {
  .skills-performance-grid {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }
  
  .subject-name-modern {
    font-size: 1.1rem;
  }
  
  .header-title {
    font-size: 1.3rem;
  }
}

  .progress-section {
      background: linear-gradient(135deg, #e1e0f5 0%, #e1e0f5 100%);
      border: 1px solid #0ea5e9;
      border-radius: 16px;
      padding: 24px;
      margin-bottom: 32px;

  }
  .progress-label {
      font-size: 16px;
      font-weight: 600;
      color: #0c4a6e;
      margin-bottom: 12px;
  }

.subject-chip {
  background: #fff;
  color: #333;
  border-radius: 999px;
  padding: 0.4rem 1.1rem;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.2s ease-in-out;
  border: 1px solid #e0e0e0;
}

.subject-chip.active {
  background-color: #b090f9;
  color: #fff;
  font-weight: 500;
}

.card-top-strip {
  height: 6px; /* or 4px if you prefer thinner */
  width: 100%;
  border-top-left-radius: 0.75rem;
  border-top-right-radius: 0.75rem;
}

.navigation {
  background: white;
  padding: 16px;
  margin: 16px;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
        
.term-selector {
  display: flex;
  background: #f8f9fa;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.term-btn {
  flex: 1;
  min-width: 80px;
  padding: 12px 16px;
  font-size: 14px;
  font-weight: 600;
  border: none;
  background: transparent;
  color: #666;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.term-btn.active {
  background: #667eea;
  color: white;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.weeks-container {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  padding-bottom: 8px;
  scroll-behavior: smooth;
  scrollbar-width: thin; /* For Firefox */
}

.weeks-container::-webkit-scrollbar {
  height: 6px;
}
.weeks-container::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.2);
  border-radius: 3px;
}
.weeks-container::-webkit-scrollbar-track {
  background: transparent;
}

/* week button styling you already have */
.week-btn {
  padding: 6px 8px;
  border: 2px solid #e9ecef;
  border-radius: 12px;
  background: white;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  transition: all 0.3s ease;
  color: #333;
  position: relative;
  overflow: hidden;
  width: 100px; /* Adjust width as needed */
  flex: 0 0 auto; /* Prevent shrinking and wrapping */
}

.week-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s;
}

.week-btn:hover::before {
  left: 100%;
}

.week-btn:hover {
  border-color: #667eea;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
}

.week-btn.active {
  background: linear-gradient(135deg, #667eea, #764ba2);
  border-color: #667eea;
  color: white;
  transform: translateY(1px);
  box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.card {
  border-radius: 1rem;
  
}

.add-learner-btn {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 4px 20px rgba(102, 126, 234, 0.3);
  padding: 0.6rem 1rem;
  border-radius: 12px;
  font-weight: 600;
  cursor: pointer;
}

.learners-grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.learners-grid .learner-card {
  background: #fff;
  backdrop-filter: blur(20px);
  border-radius: 12px;
  padding: 1.5rem;
  border: 2px solid rgba(0, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.learners-grid .learner-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.grade-badge {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
}

.subject-tag {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 0.375rem 0.75rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 500;
  transition: all 0.3s ease;
  cursor: pointer;
}

.add-subscription-btn {
  background: #f8f9fa;
  border: 1px solid rgba(102, 126, 234, 0.3);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  color: #667eea;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  white-space: nowrap;
}


.add-subscription-btn:hover {
  transform: translateY(-1px);
}


.search-limit {
  max-width: 400px;
}

@media (max-width: 768px) {
  .learner-subject { 
    max-width: 95%;
    
  }
}

.list-group-item.disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.list-group-item.completed {
  border-left: 4px solid #28a745;
}

.list-group-item.locked {
  border-left: 4px solid #6c757d;
}

.topic-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 20px;
    padding: 24px;
    margin-bottom: 20px;
    border: 2px solid transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}


.topic-card.completed {
    background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
    border-color: #10b981;
}

.topic-card.completed:hover {
    box-shadow: 0 20px 40px rgba(16, 185, 129, 0.2);
}

.topic-card.in-progress {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border-color: #f59e0b;
}

.topic-card.in-progress:hover {
    box-shadow: 0 20px 40px rgba(245, 158, 11, 0.2);
}

.topic-card.not-started {
  background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
  border-color: #6b7280;
}
.topic-card .topic-title {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    flex-grow: 1;
    line-height: 1.3;
}

.status-badge {
    padding: 6px 16px;
    border-radius: 25px;
    font-size: 12px;
    font-weight: 700;
    margin-left: 16px;
    white-space: nowrap;
    backdrop-filter: blur(10px);
}

.status-badge.completed {
    background: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    color: white;
    box-shadow: 0 4px 8px rgba(16, 185, 129, 0.3);
}

.status-badge.in-progress {
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%);
  color: white;
  box-shadow: 0 4px 8px rgba(245, 158, 11, 0.3);
}

.status-badge.not-started {
  background: linear-gradient(135deg, #6b7280 0%, #9ca3af 100%);
  color: white;
  box-shadow: 0 4px 8px rgba(107, 114, 128, 0.3);
}

.topic-stats {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}

.stat-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: white;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.stat-icon.notes { 
  background: linear-gradient(135deg, #3b82f6 0%, #60a5fa 100%); 
}
.stat-icon.quizzes { 
  background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%); 
}
.stat-icon.assessments { 
  background: linear-gradient(135deg, #10b981 0%, #34d399 100%); 
}


.topic-progress-fill.completed { 
  background: linear-gradient(90deg, #10b981 0%, #34d399 100%); 
}
.topic-progress-fill.in-progress { 
  background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%); 
}
.topic-progress-fill.not-started { 
  background: linear-gradient(90deg, #9ca3af 0%, #d1d5db 100%); 
}

.topic-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: shimmer 2s infinite;
}

.topic-progress-text {
  font-size: 14px;
  font-weight: 700;
  color: #374151;
  min-width: 40px;
}
.topic-progress {
  display: flex;
  align-items: center;
  gap: 16px;
}

.topic-progress-bar {
  flex-grow: 1;
  background: #e5e7eb;
  border-radius: 8px;
  height: 8px;
  overflow: hidden;
}

.topic-progress-fill {
  height: 100%;
  border-radius: 8px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.topic-progress-fill.completed { 
  background: linear-gradient(90deg, #10b981 0%, #34d399 100%); 
}
.topic-progress-fill.in-progress { 
  background: linear-gradient(90deg, #f59e0b 0%, #fbbf24 100%); 
}
.topic-progress-fill.not-started { 
  background: linear-gradient(90deg, #9ca3af 0%, #d1d5db 100%); 
}

.topic-progress-fill::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
  animation: shimmer 2s infinite;
}

.topic-progress-text {
  font-size: 14px;
  font-weight: 700;
  color: #374151;
  min-width: 40px;
}

.custom-image-size {
    width: 100%;
    height: 280px;
    object-fit: contain;
    background: #f8f9fa;
    display: block;
}

.cart_image {
    width: 100%;
    height: 200px; /* set a fixed height */
    object-fit: cover;
    background: #f8f9fa;
    display: block;
}


.step-card {
    background-color: #f9f9f9;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.2);
}

.step-circle {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #3498db;
    color: #fff;
}
.submitted-overlay {
  position: relative;
}

.submitted-overlay::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 128, 0, 0.2); /* green overlay with 20% opacity */
  pointer-events: none;
}

/* User CRUD Vue */

.user-card {
  transition: all 0.3s ease;
  border: 1px solid #e0e0e0;
}

.user-card:hover {
  box-shadow: 0 4px 8px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}

.status-badge {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
}

.tab-button {
  border: none;
  background: none;
  padding: 0.5rem 1rem;
  border-radius: 0.25rem;
  transition: all 0.3s ease;
}

.tab-button.active {
  background-color: #007bff;
  color: white;
}

.tab-button:hover:not(.active) {
  background-color: #f8f9fa;
}

.assignment-section {
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

.assignment-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem;
  border: 1px solid #e9ecef;
  border-radius: 0.25rem;
  margin-bottom: 0.5rem;
}

.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.search-box {
  border-radius: 20px;
  border: 1px solid #ddd;
  padding: 0.5rem 1rem;
  width: 300px;
}

.search-box:focus {
  outline: none;
  border-color: #007bff;
  box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

/* Scrollable user types container */
.user-types-container {
  max-height: 200px;
  overflow-y: auto;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  background: #f8f9fa;
  position: relative;
}

.user-types-container::-webkit-scrollbar {
  width: 8px;
}

.user-types-container::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 4px;
}

.user-types-container::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 4px;
}

.user-types-container::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

.user-types-scroll-indicator {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 20px;
  background: linear-gradient(transparent, #f8f9fa);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.user-types-container.has-scroll .user-types-scroll-indicator {
  opacity: 1;
}

.user-type-item {
  padding: 0.5rem 1rem;
  border-bottom: 1px solid #e9ecef;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.user-type-item:hover {
  background-color: #e9ecef;
}

.user-type-item.active {
  background-color: #007bff;
  color: white;
}

.user-type-item:last-child {
  border-bottom: none;
}

/* DataTable customizations */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
  margin-bottom: 1rem;
}

.dataTables_wrapper .dataTables_info {
  margin-top: 1rem;
}

.dataTables_wrapper .dataTables_paginate {
  margin-top: 1rem;
}

/* The Manage Assessments tables (Teacher/Mentor embedded card and the
   admin standalone page share this markup) need the search bar attached
   to the table instead of the generic 1rem gap above, but still need a
   small buffer so the input isn't flush against the table header. */
#management_assessment_app [id$="_table_wrapper"] .dataTables_filter,
#management_assessment_app [id$="_table_wrapper"] .dt-search {
  margin-bottom: 0.5rem !important;
}

#management_assessment_app [id$="_table_wrapper"] .table-responsive,
#management_assessment_app [id$="_table_wrapper"] table.dataTable {
  margin-top: 0 !important;
}

/* The blanket ".table-responsive { overflow: visible !important; }" rule
   further down (added so row-action dropdown menus aren't clipped) also
   kills the horizontal scrollbar these Manage Assessments tables need --
   wide tables (many columns, Action buttons) were overflowing their card
   with no way to reach the cut-off content. Restore scrolling on the
   wrapper itself, which still lets the "Enhanced dropdown overflow fixes"
   ".table-responsive" element stay overflow: visible above it. A matching,
   more detailed override already existed for mobile (max-width: 768px)
   further down -- this is the missing desktop/tablet counterpart. */
#management_assessment_app [id$="_table_wrapper"] {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Same fix as above for the Assessment Overview / Analysis table
   (#assessment_overview_table): its wrapper only had a mobile override
   (.learner-assessments-page .table-responsive, further down) restoring
   the scrollbar, so on desktop/tablet it fell back to the blanket
   overflow: visible !important rule and overflowed the card uncontained. */
#programme-assessments-analysis-pane .table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Same fix as above for My Evaluations Assigned (#learner_evaluations_table,
   templates/skill_management/skill_tracker_management/learner_my_evaluations.html):
   its wrapper shares .learner-assessments-table-responsive with other pages,
   which already have a mobile-only override further down restoring the
   scrollbar. On desktop/tablet it fell back to the blanket
   overflow: visible !important rule too -- with the Name/Target/.../Action
   columns this table is wide enough to overflow its card with no way to
   reach the cut-off columns.

   Not Bootstrap's own .overflow-auto utility: bootstrap.min.css@5.0.2 loads
   before this stylesheet (templates/index/platform/platform_index.html), and
   more fundamentally, !important always wins over a non-important
   declaration for the same longhand regardless of selector specificity or
   source order -- overflow-x is one of the longhands "overflow: visible
   !important" expands to, so only another !important declaration for it can
   win at all; a plain utility class (or a non-important override, no matter
   how specific) cannot. Bootstrap 5.0.2 also has no axis-only overflow-x
   utility (added in 5.2), and no utility at all for
   -webkit-overflow-scrolling (a non-standard, WebKit-only property Bootstrap
   has never covered). Scoped with :has() (already used the same way further
   down in this file) so only this table's wrapper is affected -- every
   other .table-responsive on the site keeps the blanket rule's overflow:
   visible, needed there so row-action dropdown menus aren't clipped. */
.learner-assessments-page:has(#learner_evaluations_table) .learner-assessments-table-responsive {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

.user-actions-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: 100%;
  min-width: 0;
  position: relative;
  overflow: visible;
}

/* Learner specialization toggle used by the Add Learners modal */
.learner-specialization-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.learner-specialization-toggle-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: nowrap;
}

.learner-specialization-switch.form-check.form-switch {
  display: inline-flex;
  align-items: center;
  padding-left: 0;
  min-height: 0;
  margin: 0;
}

.learner-specialization-switch .form-check-input {
  width: 1.6rem;
  height: 0.9rem;
  margin: 0;
  cursor: pointer;
  background-color: #d7dbe7;
  border-color: #d7dbe7;
  box-shadow: none;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.learner-specialization-switch .form-check-input:checked {
  background-color: #4c1d95;
  border-color: #4c1d95;
}

.learner-specialization-switch .form-check-input:focus {
  border-color: #4c1d95;
  box-shadow: 0 0 0 0.15rem rgba(76, 29, 149, 0.15);
}

.learner-specialization-mode-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.08rem;
  flex-wrap: nowrap;
  line-height: 1.05;
  min-width: 0;
  padding-top: 0.03rem;
}

.learner-specialization-mode-title {
  color: #2b233d;
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
}

.learner-specialization-mode-hint {
  color: #8c93a6;
  font-size: 0.72rem;
  white-space: nowrap;
}

/* ID/passport capture used by the Add Learner modal on programme pages. */
.programme-identity-field {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  width: 100%;
}

.programme-identity-field .programme-identity-type,
.programme-identity-field .programme-identity-value {
  min-height: 2.35rem;
  background-color: #fff;
  border: 1px solid #d8dce4;
  border-radius: 0.55rem;
  box-shadow: none;
}

.programme-identity-field .programme-identity-type {
  font-weight: 600;
  color: #2f3340;
  padding-left: 0.7rem;
  padding-right: 1.8rem;
}

.programme-identity-field .programme-identity-value {
  min-width: 0;
  padding-left: 0.75rem;
}

.programme-identity-field .programme-identity-type:focus,
.programme-identity-field .programme-identity-value:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.16rem rgba(143, 70, 155, 0.14);
}

.programme-identity-field .programme-identity-value.is-invalid {
  padding-right: 0.75rem;
}

.programme-swal-loading {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: 100%;
  color: #4b5563;
  font-size: 0.98rem;
  line-height: 1.4;
}

.programme-swal-spinner {
  width: 2rem;
  height: 2rem;
  border: 0.22rem solid rgba(48, 128, 214, 0.18);
  border-top-color: #3080d6;
  border-radius: 50%;
  animation: programme-swal-spinner 0.8s linear infinite;
  flex: 0 0 auto;
}

@keyframes programme-swal-spinner {
  to {
    transform: rotate(360deg);
  }
}

/* Programme specialization header used by the Add Programme modal */
.programme-specialization-row {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.programme-specialization-label {
  margin: 0;
}

.programme-specialization-toggle-line {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  width: 100%;
  min-width: 0;
}

.programme-specialization-switch-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-width: 0;
}

.programme-specialization-optional {
  color: #dc3545;
  font-size: 0.72rem;
  line-height: 1;
  white-space: nowrap;
}

.programme-specialization-hint {
  margin: 0;
}

.programme-specialization-feedback {
  width: 100%;
}

.programme-specialization-existing {
  width: 100%;
}

.programme-specialization-create {
  width: 100%;
}

@media (max-width: 767.98px) {
  .learner-specialization-toggle-row {
    flex-wrap: wrap;
  }

  .learner-specialization-mode-title,
  .learner-specialization-mode-hint {
    white-space: normal;
  }

  .programme-specialization-toggle-line {
    flex-wrap: wrap;
  }
}

.user-actions-wrapper .manage-user-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  width: auto;
  min-width: 0;
  white-space: nowrap;
}

.manage-user-popover-wrapper.is-open {
  z-index: 5;
}

.manage-user-popover {
  position: absolute;
  top: auto;
  bottom: calc(100% + 0.45rem);
  right: 0;
  z-index: 10000;
  width: 12.75rem;
  max-width: calc(100vw - 1rem);
  overflow: visible;
}

.manage-user-popover .manage-user-action-panel {
  width: 100%;
  box-shadow: 0 1.25rem 3rem rgba(15, 23, 42, 0.18);
}

.manage-user-action-panel {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1.35rem;
  padding: 0.4rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.manage-user-action-btn {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  border: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  padding: 0.7rem 0.85rem;
  border-radius: 0.85rem;
  text-align: left;
  color: #1f2937;
  font-weight: 600;
  font-size: 0.82rem;
  line-height: 1.25;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.manage-user-action-btn:hover,
.manage-user-action-btn:focus {
  background: #f8fafc;
  color: #111827;
}

.manage-user-action-btn:focus-visible {
  outline: 2px solid rgb(13 110 253 / 22%);
  outline-offset: 2px;
}

.manage-user-action-btn i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  flex: 0 0 1rem;
  font-size: 1rem;
  line-height: 1;
}

.manage-user-action-btn-edit i {
  color: #334155;
}

.manage-user-action-btn-profile i {
  color: #334155;
}

.manage-user-action-btn-assign i {
  color: #334155;
}

.manage-user-action-btn-toggle i {
  color: #334155;
}

.manage-user-action-btn-delete i {
  color: #dc3545;
}

.manage-user-action-btn.is-activate i {
  color: #334155;
}

.system-management-roles .manage-role-row-dropdown,
.system-management-roles .manage-user-popover-wrapper,
.system-management-roles .manage-assessment-row-dropdown {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: 100%;
  min-width: 0;
  position: relative;
  overflow: visible;
}

.system-management-roles .manage-role-actions-toggle,
.system-management-roles .manage-assessment-actions-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: auto;
  min-width: 0;
  white-space: nowrap;
  line-height: 1;
}

.system-management-roles .manage-role-actions-menu,
.system-management-roles .manage-assessment-actions-menu {
  position: absolute !important;
  top: auto !important;
  bottom: calc(100% + 0.45rem) !important;
  right: 0 !important;
  left: auto !important;
  z-index: 10000 !important;
  width: 12.75rem;
  min-width: 0 !important;
  max-width: calc(100vw - 1rem);
  max-height: calc(100vh - 1rem);
  overflow: visible !important;
  padding: 0 !important;
  display: block !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin-top: 0 !important;
  transform: none !important;
  visibility: hidden;
  pointer-events: none;
}

.system-management-roles .manage-role-actions-menu.is-open,
.system-management-roles .manage-assessment-actions-menu.is-open {
  visibility: visible;
  pointer-events: auto;
}

.system-management-roles .manage-role-row-dropdown.is-open,
.system-management-roles .manage-user-popover-wrapper.is-open,
.system-management-roles .manage-assessment-row-dropdown.is-open {
  z-index: 5;
}

.system-management-roles .manage-role-actions-menu[aria-hidden="true"],
.system-management-roles .manage-assessment-actions-menu[aria-hidden="true"] {
  display: none !important;
}

.system-management-roles .manage-role-actions-menu .manage-user-action-panel,
.system-management-roles .manage-assessment-actions-menu .manage-user-action-panel {
  width: 100%;
  box-shadow: 0 1.25rem 3rem rgba(15, 23, 42, 0.18);
}

.system-management-roles .manage-role-menu-item.is-danger {
  color: #d14343;
}

.system-management-roles .manage-role-menu-item.is-danger:hover,
.system-management-roles .manage-role-menu-item.is-danger:focus {
  background: #fff1f1;
  color: #b42318;
}

.programme-learner-manage-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: auto;
  min-width: 0;
  white-space: nowrap;
  line-height: 1;
}

.programme-learner-manage-toggle .programme-learner-manage-toggle-icon {
  transition: transform 0.18s ease;
}

.programme-learner-manage-toggle[aria-expanded="true"] .programme-learner-manage-toggle-icon {
  transform: rotate(180deg);
}

.programme-learner-manage-menu {
  position: fixed;
  z-index: 3000;
  /* Grow to the longest label (e.g. "Mark as submitted to SETA") instead of
     letting it run past the menu edge. */
  width: max-content;
  min-width: min(14.5rem, calc(100vw - 1rem));
  max-width: calc(100vw - 1rem);
  padding: 0.4rem;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1rem;
  box-shadow: 0 1rem 2.4rem rgba(15, 23, 42, 0.16);
  overflow: visible;
}

.programme-learner-manage-menu::after {
  content: "";
  position: absolute;
  left: var(--programme-learner-menu-arrow-left, 50%);
  width: 0.8rem;
  height: 0.8rem;
  background: #ffffff;
  transform: translateX(-50%) rotate(45deg);
}

.programme-learner-manage-menu[data-placement="top"]::after {
  bottom: -0.38rem;
  border-right: 1px solid rgba(15, 23, 42, 0.08);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.programme-learner-manage-menu[data-placement="bottom"]::after {
  top: -0.38rem;
  border-left: 1px solid rgba(15, 23, 42, 0.08);
  border-top: 1px solid rgba(15, 23, 42, 0.08);
}

.programme-learner-manage-menu .programme-learner-menu-item {
  display: flex;
  align-items: center;
  gap: 0.72rem;
  width: 100%;
  border: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  padding: 0.72rem 0.9rem;
  border-radius: 0.85rem;
  text-align: left;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  line-height: 1.2;
  color: #334155;
  white-space: nowrap;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.programme-learner-manage-menu .programme-learner-menu-item:hover,
.programme-learner-manage-menu .programme-learner-menu-item:focus {
  background: #f3f6fb;
  color: #111827;
  outline: none;
}

.programme-learner-manage-menu .programme-learner-menu-item:focus-visible {
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.18);
}

.programme-learner-manage-menu .programme-learner-menu-item.is-danger {
  color: #dc3545;
}

.programme-learner-manage-menu .programme-learner-menu-item.is-danger:hover,
.programme-learner-manage-menu .programme-learner-menu-item.is-danger:focus {
  background: rgba(220, 53, 69, 0.09);
  color: #b02a37;
}

.programme-learner-manage-menu .programme-learner-menu-item.is-success {
  color: #198754;
}

.programme-learner-manage-menu .programme-learner-menu-item.is-success:hover,
.programme-learner-manage-menu .programme-learner-menu-item.is-success:focus {
  background: rgba(25, 135, 84, 0.09);
  color: #157347;
}

.programme-learner-manage-menu .programme-learner-menu-item.is-brand {
  color: #4f46e5;
}

.programme-learner-manage-menu .programme-learner-menu-item.is-brand:hover,
.programme-learner-manage-menu .programme-learner-menu-item.is-brand:focus {
  background: rgba(79, 70, 229, 0.09);
  color: #4338ca;
}

.programme-learner-manage-menu .programme-learner-menu-icon {
  width: 1.15rem;
  flex: 0 0 1.15rem;
  text-align: center;
  font-size: 1rem;
  line-height: 1;
}

body.programme-management-content-page .programme-table-card,
body.programme-management-content-page .programme-table-wrapper {
  overflow: visible;
}

body.programme-management-standalone-page.programme-management-content-page .programme-table-card,
body.programme-management-standalone-page.programme-management-content-page .programme-table-wrapper {
  overflow: visible;
}

/* Unprefixed by design (not scoped to body.programme-management-content-page):
   .programme-learner-row-menu/-actions-cell/-manage-dropdown are specific
   enough names that nothing else in the codebase uses them, so this same
   "Manage X" row dropdown look is reusable on any page (e.g. manage_team.html)
   just by reusing these classes, without carrying the rest of that body
   class's page-wide styling along with it. */
.programme-learner-actions-cell {
  position: relative;
  overflow: visible;
}

.programme-learner-manage-dropdown {
  position: relative;
  z-index: 40;
  width: 100%;
  justify-content: flex-end;
}

.programme-learner-row-menu {
  width: 12.5rem;
  min-width: 12.5rem;
  max-width: min(12.5rem, calc(100vw - 1rem));
  padding: 0.35rem;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.8rem;
  box-shadow: 0 0.85rem 2rem rgba(15, 23, 42, 0.16);
  overflow: hidden;
  z-index: 99999 !important;
}

/* Keep the team action labels on one line, including
   "Add existing programme learners". */
.programme-teams-table .programme-learner-row-menu {
  width: 24rem;
  min-width: 24rem;
  max-width: min(24rem, calc(100vw - 1rem));
}

/* The toolbar's own "{{ learner_plural }} Actions" dropdown (e.g. "Team
   Actions") had no z-index of its own outside the mobile layout below, so
   it only had Bootstrap's default dropdown z-index to fall back on --
   lower than the per-row "Manage" toggles' menu just above, which is why
   the toolbar menu could render underneath a row's Manage button. Matching
   the same z-index those row menus already use keeps it on top regardless
   of stacking context inside the table. */
.programme-learner-actions-dropdown {
  position: relative;
  z-index: 40;
}
.programme-learner-actions-menu {
  z-index: 99999 !important;
}

/* programme_management_content.html "{{ learner_plural }} Actions" toggle:
   keep the standard themed btn-outline-primary look in every state.
   The theme only recolours :hover/:focus, so Bootstrap's :active and
   .dropdown-toggle.show (bright #0d6efd) showed through on click/open;
   .programme-table-header's button rule also added a transparent border
   and a dark hover. Scoped to this wrapper (only used here) and specific
   enough to beat Bootstrap's .btn-outline-primary.dropdown-toggle.show.
   The focus ring / header drop shadow are removed by Bootstrap's
   shadow-none on the button instead. Custom CSS only because no Bootstrap
   utility can target :active/.show states, and the bg and text colour
   utilities use fixed palette colours rather than the per-tenant
   --btn-outline-primary-bg/-border/-text theme variables. */
.programme-learner-actions-dropdown > .btn.btn-outline-primary,
.programme-learner-actions-dropdown > .btn.btn-outline-primary:hover,
.programme-learner-actions-dropdown > .btn.btn-outline-primary:focus,
.programme-learner-actions-dropdown > .btn.btn-outline-primary:focus-visible,
.programme-learner-actions-dropdown > .btn.btn-outline-primary:active,
.programme-learner-actions-dropdown > .btn.btn-outline-primary.active,
.programme-learner-actions-dropdown > .btn.btn-outline-primary.show,
.programme-learner-actions-dropdown > .btn.btn-outline-primary.show:hover,
.programme-learner-actions-dropdown > .btn.btn-outline-primary.show:focus,
.programme-learner-actions-dropdown > .btn.btn-outline-primary:active:focus {
  background-color: var(--btn-outline-primary-bg, var(--primary-color));
  border-color: var(--btn-outline-primary-border, var(--primary-color));
  color: var(--btn-outline-primary-text, #fff);
}
/* shadow-none removes the focus ring entirely, so keyboard users need a
   visible focus indicator back; :focus-visible only matches keyboard focus,
   so mouse clicks stay glow-free. Custom because Bootstrap has no
   focus-visible utility, and its focus-ring helper (5.3 only) is a
   box-shadow that shadow-none's !important would cancel. */
.programme-learner-actions-dropdown > .btn.btn-outline-primary:focus-visible {
  outline: 2px solid var(--btn-outline-primary-border, var(--primary-color));
  outline-offset: 2px;
}

/* No hardcoded inset/transform here: Popper (via data-bs-boundary="viewport"
   on the toggle) needs to be able to set its own inline position so the menu
   can flip above the button for rows near the bottom of the table/viewport. */

.programme-learner-row-menu .programme-learner-menu-item {
  display: flex;
  align-items: center;
  gap: 0.58rem;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 0.58rem 0.7rem;
  border-radius: 0.62rem;
  text-align: left;
  text-decoration: none;
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.2;
  color: #334155;
  white-space: nowrap;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.programme-learner-row-menu .programme-learner-menu-item:hover,
.programme-learner-row-menu .programme-learner-menu-item:focus {
  background: #f3f6fb;
  color: #111827;
  outline: none;
}

.programme-learner-row-menu .programme-learner-menu-item.is-danger {
  color: #dc3545;
}

.programme-learner-row-menu .programme-learner-menu-item.is-danger:hover,
.programme-learner-row-menu .programme-learner-menu-item.is-danger:focus {
  background: rgba(220, 53, 69, 0.09);
  color: #b02a37;
}

.programme-learner-row-menu .programme-learner-menu-item.is-success {
  color: #198754;
}

.programme-learner-row-menu .programme-learner-menu-item.is-success:hover,
.programme-learner-row-menu .programme-learner-menu-item.is-success:focus {
  background: rgba(25, 135, 84, 0.09);
  color: #157347;
}

.programme-learner-row-menu .programme-learner-menu-item.is-brand {
  color: #4f46e5;
}

.programme-learner-row-menu .programme-learner-menu-item.is-brand:hover,
.programme-learner-row-menu .programme-learner-menu-item.is-brand:focus {
  background: rgba(79, 70, 229, 0.09);
  color: #4338ca;
}

.programme-learner-row-menu .programme-learner-menu-icon {
  width: 1.15rem;
  flex: 0 0 1.15rem;
  text-align: center;
  font-size: 1rem;
  line-height: 1;
}

/* Ensure dropdown can overflow outside table boundaries */
.dataTables_wrapper {
  overflow: visible !important;
}

/* Force dropdown to be visible even when parent has overflow hidden */
.dropdown-menu.show {
  position: absolute !important;
  z-index: 9999 !important;
  overflow: visible !important;
}

/* Additional positioning for dropup */
.dropup .dropdown-menu {
  margin-bottom: 0.125rem;
}

/* Enhanced dropdown overflow fixes for all table scenarios */
.table-responsive {
  overflow: visible !important;
}

.table {
  overflow: visible !important;
}

/* The completed-programmes table has no row dropdown menus, so unlike
   the blanket rule above, it's safe -- and necessary -- to let it
   scroll horizontally instead of overflowing the page on narrow
   screens. Same specificity as .table-responsive above, so this wins
   on source order -- keep it below that rule, not above. */
.completed-programs-table-responsive {
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch;
}

/* Ensure all dropdowns in tables have proper z-index */
.table .dropdown-menu,
.table-responsive .dropdown-menu,
.dataTables_wrapper .dropdown-menu {
  z-index: 99999 !important;
  position: absolute !important;
  overflow: visible !important;
}

/* Fix for Bootstrap DataTables */
.dataTables_wrapper .dataTables_scroll {
  overflow: visible !important;
}

.dataTables_wrapper .dataTables_scrollBody {
  overflow: visible !important;
}

/* Ensure dropdowns appear above modals and other overlays */
.dropdown-menu {
  z-index: 99999 !important;
}

/* Fix for specific table containers */
.table-container,
.table-wrapper,
.data-table-container {
  overflow: visible !important;
}

/* Ensure action buttons container doesn't clip wrapped buttons */
.action-buttons {
  overflow: visible !important;
  position: relative;
}

@media (max-width: 575.98px) {
  .user-actions-wrapper {
    align-items: stretch;
  }

  .user-actions-wrapper .manage-user-toggle {
    width: 100%;
    justify-content: center;
  }

  .manage-user-popover {
    right: 0;
    left: auto;
    top: auto;
    bottom: calc(100% + 0.4rem);
    width: min(15rem, calc(100vw - 1rem));
  }

  .system-management-roles .manage-role-actions-toggle,
  .system-management-roles .manage-assessment-actions-toggle {
    min-width: 7.25rem !important;
    padding: 0.22rem 0.52rem !important;
    font-size: 0.58rem !important;
    line-height: 1.05;
  }

  .system-management-roles .manage-role-actions-menu,
  .system-management-roles .manage-assessment-actions-menu {
    width: min(15rem, calc(100vw - 1rem)) !important;
    min-width: 0 !important;
    max-width: calc(100vw - 1rem) !important;
    max-height: calc(100vh - 1rem) !important;
    z-index: 5000 !important;
  }

  .system-management-roles .manage-role-actions-menu .manage-user-action-panel,
  .system-management-roles .manage-assessment-actions-menu .manage-user-action-panel {
    padding: 0.35rem !important;
    border-radius: 0.95rem !important;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.16) !important;
  }

  .system-management-roles .manage-role-menu-item {
    padding: 0.5rem 0.65rem !important;
    font-size: 0.68rem !important;
    line-height: 1.05;
  }
}

/* Force dropdown positioning for edge cases */
.dropdown-menu.show,
.dropdown-menu.dropdown-menu-end.show {
  position: absolute !important;
  z-index: 99999 !important;
  overflow: visible !important;
  min-width: 13rem;
}

/* Every dropdown-menu gets transform: none EXCEPT .programme-courses-panel-menu
   (the "Learners Actions" panel-header menus, the per-row "Manage
   Learner"/"Manage Doc" row menus, and the recruitment "Manage <role>" card
   menu). That class is Popper-positioned: Bootstrap's bundled Popper already
   computes the correct `transform: translate(x, y)` to drop the menu below
   its toggle, right-aligned, flipping/shifting when the viewport is tight.
   Forcing `transform: none !important` on it (as every other dropdown gets,
   above) discarded that correct value and left the menu pinned to the
   toggle's top-left corner -- overlapping the toggle and whatever sits
   beside it -- instead of dropping below it. Simply not setting `transform`
   with !important on this class lets Popper's own inline transform (which
   nothing else here overrides) take effect; position/z-index/overflow/
   min-width above are unaffected and still apply to it exactly as before. */
.dropdown-menu.show:not(.programme-courses-panel-menu),
.dropdown-menu.dropdown-menu-end.show:not(.programme-courses-panel-menu) {
  transform: none !important;
}

.menu-items .app-name {
  font-size: 0.65rem !important; /* Smallest readable */
  line-height: 1.1;
  padding: 0;
  margin: 0;
}
.menu-items .app-item {
  padding: 0.25rem 0 !important;
}


/* Additional fix for dropup menus */
.dropup .dropdown-menu.show {
  margin-bottom: 0.125rem;
  z-index: 99999 !important;
}

/* Notification message inner container (assist_index.html's own dropdown,
   which is unrelated to platform_index.html's #notificationDropdown panel
   below -- see main_system_index.css's "Notification bell panel" section). */
.notification-bell-panel .collapse > .text-muted {
  border-radius: 0.65rem;
}

/* Make the notification bell pop while dropdown is open (no panel color changes). */
.notification-bell-toggle[aria-expanded="true"] {
  position: relative;
  z-index: 100001;
  background-color: rgba(255, 255, 255, 0.14) !important;
  border-radius: 0.5rem;
}

.notification-bell-toggle[aria-expanded="true"] > .bi-bell-fill {
  filter: brightness(1.55) drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
}

.notification-bell-toggle[aria-expanded="true"] > .bi-bell {
  filter: brightness(1.55) drop-shadow(0 0 8px rgba(255, 255, 255, 0.8));
}

.notification-bell-toggle[aria-expanded="true"] > .badge {
  position: relative;
  z-index: 100002;
}

.menu-items {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 0.5rem !important;
}
.menu-items .col {
  width: 100% !important;
  max-width: 100% !important;
  flex: 0 0 auto !important;
}

/* Hierarchical tree styling for edit modal */
.hierarchical-tree {
  max-height: 400px;
  overflow-y: auto;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  padding: 1rem;
  background: #f8f9fa;
}

.tree-node {
  margin-bottom: 0.5rem;
}

.tree-node-header {
  display: flex;
  align-items: center;
  padding: 0.5rem;
  background: #fff;
  border: 1px solid #e9ecef;
  border-radius: 0.25rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.tree-node-header:hover {
  background-color: #f8f9fa;
}

.tree-node-content {
  margin-left: 1.5rem;
  margin-top: 0.5rem;
  padding-left: 1rem;
  border-left: 2px solid #dee2e6;
}

.level-name, .class-name {
  font-weight: 600;
  margin-left: 0.5rem;
  flex-grow: 1;
}

.level-actions, .class-actions {
  display: flex;
  gap: 0.25rem;
}

.class-teacher-checkbox {
  display: flex;
  align-items: center;
  margin-left: 1rem;
}

.subject-item {
  padding: 0.25rem 0;
}

.add-class-section {
  margin-top: 1rem;
  padding: 0.5rem;
  background: #e9ecef;
  border-radius: 0.25rem;
}

.assignment-summary {
  max-height: 300px;
  overflow-y: auto;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  padding: 1rem;
  background: #fff;
}

.summary-level {
  margin-bottom: 1rem;
}

.summary-class {
  margin-left: 1rem;
  margin-bottom: 0.5rem;
}

.summary-subject {
  margin-left: 1rem;
  color: #6c757d;
}

.class-indent, .subject-indent {
  font-size: 0.9rem;
}

/* Choices.js customizations */
.choices {
  margin-bottom: 0;
}

.choices__inner {
  background-color: #fff;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  min-height: 38px;
  padding: 0.375rem 0.75rem;
}

.choices__input {
  background-color: transparent;
  border: 0;
  padding: 0;
  margin: 0;
}

.choices__input:focus {
  outline: none;
  box-shadow: none;
}

.choices__list--dropdown {
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Inside a Bootstrap modal, the open dropdown must render in front of the
   rest of the modal (e.g. the footer's submit button) instead of being
   visually covered by it, so it always opens on top of - not behind -
   other modal content. */
.modal .choices__list--dropdown {
  z-index: 5;
}

/* While a Choices dropdown inside a modal is open, grow the modal itself
   so the full options list has room and isn't clipped - it shrinks back
   down once the dropdown closes. */
.modal-content.choices-dropdown-open {
  min-height: 480px;
  transition: min-height 0.15s ease;
}

.choices__list--dropdown .choices__item--selectable {
  padding: 0.5rem 0.75rem;
}

.choices__list--dropdown .choices__item--selectable.is-highlighted {
  background-color: #007bff;
  color: white;
}

.choices__list--multiple .choices__item {
  background-color: #007bff;
  border: 1px solid #007bff;
  border-radius: 0.25rem;
  color: white;
  margin: 2px;
  padding: 0.25rem 0.5rem;
}

.choices__list--multiple .choices__item .choices__button {
  border-left: 1px solid rgba(255, 255, 255, 0.5);
  color: white;
  margin-left: 0.5rem;
  padding-left: 0.5rem;
}

.choices__list--multiple .choices__item .choices__button:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.choices__placeholder {
  color: #6c757d;
  opacity: 1;
}

/* .dynamic-report-page's Choices.js theming lives further down (search
   "Build Report page" below) - that version is brand-color-aware
   (var(--report-brand), so it follows each tenant's --primary-color)
   rather than hardcoded to Bootstrap blue like the generic rules above. */

/* Hierarchical Tree Styles */
.hierarchical-tree {
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  max-height: 400px;
  overflow-y: auto;
  background-color: #f8f9fa;
}

.tree-node {
  border-bottom: 1px solid #dee2e6;
}

.tree-node:last-child {
  border-bottom: none;
}

.tree-node-header {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  background-color: #e9ecef;
  cursor: pointer;
  transition: background-color 0.2s;
  font-weight: 600;
}

.tree-node-header:hover {
  background-color: #dee2e6;
}

.tree-node-header i {
  margin-right: 0.5rem;
  color: #fff;
  transition: transform 0.2s;
}

.tree-node-header .level-name {
  flex: 1;
  color: #495057;
}

.level-actions {
  display: flex;
  gap: 0.25rem;
}

.tree-node-content {
  background-color: #ffffff;
  border-top: 1px solid #dee2e6;
}

.sub-node {
  border-bottom: 1px solid #f1f3f4;
}

.sub-node:last-child {
  border-bottom: none;
}

.sub-node-header {
  display: flex;
  align-items: center;
  padding: 0.5rem 1rem 0.5rem 2rem;
  background-color: #f8f9fa;
  cursor: pointer;
  transition: background-color 0.2s;
  font-weight: 500;
}

.sub-node-header:hover {
  background-color: #e9ecef;
}

.sub-node-header i {
  margin-right: 0.5rem;
  color: #6c757d;
  transition: transform 0.2s;
}

.sub-node-header .class-name {
  flex: 1;
  color: #495057;
}

.class-actions {
  display: flex;
  gap: 0.25rem;
}

.sub-node-content {
  background-color: #ffffff;
  border-top: 1px solid #f1f3f4;
  padding: 0.5rem 1rem 0.5rem 3rem;
}

.subject-item {
  padding: 0.25rem 0;
}

.subject-item .form-check {
  margin-bottom: 0;
}

.subject-item .form-check-label {
  color: #495057;
  font-weight: normal;
}

.btn-sm {
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
}

/* Assignment Summary Styles */
.assignment-summary {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  padding: 1rem;
  max-height: 200px;
  overflow-y: auto;
}

.summary-level {
  margin-bottom: 0.75rem;
}

.summary-level:last-child {
  margin-bottom: 0;
}

.summary-level strong {
  color: #495057;
  font-size: 0.9rem;
}

.summary-class {
  margin-left: 1rem;
  margin-top: 0.25rem;
}

.class-indent {
  color: #6c757d;
  font-size: 0.85rem;
}

.summary-subject {
  margin-left: 1rem;
  margin-top: 0.125rem;
}

.subject-indent {
  color: #6c757d;
  font-size: 0.8rem;
}

.add-class-section {
  margin-top: 1rem;
  padding: 0.75rem;
  background-color: #f8f9fa;
  border: 1px dashed #dee2e6;
  border-radius: 0.375rem;
}

.add-class-section .input-group {
  max-width: 400px;
}

.add-class-section .form-control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.add-class-section .btn {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* end of hierarchical tree styles */

.bg-light-success {
  background-color: #d4edda !important;
}

.bg-light-danger {
  background-color: #f8d7da !important;
}

.payment-method-card {
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  padding: 20px;
  margin-bottom: 15px;
  cursor: pointer;
  transition: all 0.3s ease;
}

.payment-method-card:hover {
  border-color: #007bff;
  box-shadow: 0 2px 8px rgba(0,123,255,0.2);
}

.payment-method-card.selected {
  border-color: #007bff;
  background-color: #f8f9ff;
}

.payment-method-card.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.gateway-logo {
  width: 60px;
  height: 40px;
  object-fit: contain;
  margin-right: 15px;
}

.order-summary {
  background-color: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
}

.loading-overlay {
  position: fixed;
  top: 0;c
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.dot {
    width: 10px;
    height: 10px;
    display: inline-block;
}

.student-info-card {
  background: linear-gradient(135deg, #ffffff 0%, #fafbfc 100%);
  border-radius: 16px;
  padding: 25px 35px;
  margin-bottom: 30px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  border: 1px solid rgba(102, 126, 234, 0.1);
  position: relative;
  overflow: hidden;
}

.student-info-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #667eea, #764ba2, #f093fb);
}

.student-info-card::after {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.03) 0%, transparent 70%);
  pointer-events: none;
}


.table-loader{
  position:absolute;
  inset:0;
  display:flex;
  align-items:center;
  justify-content:center;
  background: rgba(255,255,255,.6);
  z-index:5;
}
.table-responsive{ position:relative; }
.table-loader .spinner-border{ width:2.5rem; height:2.5rem; }

/* spacing + consistent control widths */
.filters .form-select { min-width: 220px; }
@media (max-width: 768px) { .filters .form-select { min-width: 160px; } }

/* keep the button on one line */
.text-nowrap { white-space: nowrap; }

/* Keep widths consistent for the Status column */
.table-transactions { table-layout: fixed; }
.table-transactions .col-status { width: 8rem; }          /* adjust as you like */
.table-transactions .status-badge { display: block; width: 100%; }

/* (optional) a bit narrower on phones */
@media (max-width: 576px) {
    .table-transactions .col-status { width: 6.5rem; }
}


/* Payment Gateway css */

.gateway-card {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.gateway-card:hover {
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.status-active {
    background-color: #d4edda;
    color: #155724;
}

.status-tested {
    background-color: #fff3cd;
    color: #856404;
}

.status-inactive {
    background-color: #f8d7da;
    color: #721c24;
}

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

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}

.modal-content {
    border-radius: 8px;
}

.form-group {
    margin-bottom: 15px;
}

.alert {
    border-radius: 4px;
    padding: 12px;
    margin-bottom: 15px;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.dataTables_filter {
    margin: 0.25rem 0.5rem 0.5rem 0;
}
.dataTables_filter input.form-control.form-control-sm {
    min-width: 220px;
}

/* Theme common floating help/support launchers to the current client brand. */
button[aria-label*="help" i],
button[aria-label*="support" i],
button[title*="help" i],
button[title*="support" i],
a[aria-label*="help" i],
a[aria-label*="support" i],
a[title*="help" i],
a[title*="support" i] {
  background: linear-gradient(
    135deg,
    var(--primary-color),
    color-mix(in srgb, var(--primary-color) 35%, var(--secondary-color) 65%)
  ) !important;
  color: var(--white) !important;
  border-color: transparent !important;
  box-shadow: 0 6px 24px color-mix(in srgb, var(--primary-color) 35%, transparent) !important;
}
 
.draggable {
  position: fixed !important;
  user-select: none;
  touch-action: none;
  cursor: move;
}
 
.learner-header-section {
    /* background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%); */
    background: var(--primary-color);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
    color: #fff;
    box-shadow: 0 4px 20px rgba(26, 54, 93, 0.3);
  }

  .learner-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
  }

  .learner-info-block {
    display: flex;
    align-items: center;
    gap: 20px;
  }

  .learner-avatar-block {
    width: 72px;
    height: 72px;
    background: linear-gradient(45deg, #4fd1c7, #81e6d9);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    color: #1a365d;
    box-shadow: 0 4px 15px rgba(79, 209, 199, 0.3);
  }

  .learner-details-block h2 {
    font-size: 26px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #fff;
  }

  .learner-meta-block {
    display: flex;
    gap: 16px;
    font-size: 14px;
    opacity: 0.9;
    flex-wrap: wrap;
  }

  .learner-meta-badge {
    background: rgba(255, 255, 255, 0.15);
    padding: 4px 12px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
    color: #fff;
    font-weight: 400;
  }

  .learner-header-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
  }

  .learner-action-btn {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    gap: 6px;
  }

  .learner-action-btn:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: translateY(-1px);
    color: #fff;
  }

  .activity-icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    font-size: 1.5rem;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    background-color: var(--primary-color);
  }

  .sidebar-panel {
      display: flex;
      flex-direction: column;
      gap: 20px;
  }

  .sidebar-tall-card {
    min-height: 260px;
  }

  /* Attendance progress widget sits on the purple .learner-header-section
     (internCharts), where its default/.text-muted greys are invisible.
     Force readable white text; keep the fine print slightly softened. */
  .learner-header-section #attendance-progress-app,
  .learner-header-section #attendance-progress-app h6,
  .learner-header-section #attendance-progress-app .text-muted {
    color: #fff !important;
  }

  .learner-header-section #attendance-progress-app .small {
    color: rgba(255, 255, 255, 0.8) !important;
  }

  /* Add breathing room below the navbar on mobile for learner header */
  @media (max-width: 767.98px) {
    .learner-activity-profile .learner-header-section {
      margin-top: 1.25rem !important;
    }
  }

  /* Pull the learner profile header card up 7px on desktop/tablet,
     matching the -7px pull used on the other hero cards. */
  @media (min-width: 768px) {
    .learner-activity-profile .learner-header-section {
      margin-top: -7px !important;
    }
  }

  /* Smaller than the shared .learner-header-section default (32px/24px) so
     the card takes up less room on this page specifically. Scoped to
     .learner-activity-profile rather than the shared rule, since
     learner_course.html and verify_application.html reuse that same class
     at the original size. */
  .learner-activity-profile .learner-header-section {
    padding: 22px;
    margin-bottom: 16px;
  }

  /* Clears the Back/Profile Details buttons pinned to the card's top
     corners (position-absolute top-0, internCharts.html only) so they
     don't crowd the avatar/name row below. 22px card padding (above) + 30px
     of this margin clears the buttons' own ~46px footprint (m-3 offset +
     btn-sm/text-xxs height) with a small buffer, while still being smaller
     than the 32px+32px this totaled before the card shrank. Scoped to
     .learner-activity-profile rather than the shared .learner-header-content
     rule, since learner_course.html and verify_application.html reuse
     that same class without those corner buttons. */
  .learner-activity-profile .learner-header-content {
    margin-top: 30px;
  }

  /* Smaller than the shared .learner-avatar-block default (72px), to sit
     proportionate to this page's now-more-compact header card. Scoped the
     same way and for the same reason as the rules above. */
  .learner-activity-profile .learner-avatar-block {
    width: 52px;
    height: 52px;
    font-size: 1.35rem;
  }

  /* Scoped the same way and for the same reason as the rules above. */
  .learner-activity-profile .learner-details-block h2 {
    font-size: 22px;
  }

  .learner-activity-profile .learner-meta-block {
    font-size: 13px;
    gap: 12px;
  }

  /* Reserves space for the embedded DocuSeal signing form
     (progress_reporting_tool/internCharts/'s programme_document_sign_modal)
     before it loads, so the panel doesn't jump/collapse while the iframe is
     still fetching. Moved out of a style= attribute on the element itself. */
  #programme-document-sign-form-shell {
    min-height: 620px;
  }

  .sidebar-tall-alert {
    min-height: 110px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 16px;
    font-size: 16px;
    color: white;
    }

  .activity-icon.subjects { background: var(--primary-color); }

  .activity-icon.classes { background: var(--primary-color); }

  .activity-icon.assessments { background: var(--primary-color); }

  .activity-icon.documents { background: var(--primary-color); }

  .activity-icon.media { background: var(--primary-color); }

  .activity-icon.certificates { background: var(--primary-color); }

  .activity-icon.actions { background: var(--primary-color); }

  .activity-icon.reviews { background: var(--primary-color); }

/* Intern learner profile (internCharts): make buttons, badges, and text extra small on mobile */
@media (max-width: 767.98px) {
  .learner-activity-profile {
    font-size: 0.8rem;
  }

  .learner-activity-profile .learner-header-section {
    padding: 16px;
  }

  .learner-activity-profile .learner-avatar-block {
    width: 56px;
    height: 56px;
    font-size: 1.4rem;
  }

  .learner-activity-profile .learner-details-block h2 {
    font-size: 1.1rem;
  }

  .learner-activity-profile .learner-meta-badge {
    font-size: 0.65rem;
    padding: 2px 8px;
  }

  .learner-activity-profile .btn,
  .learner-activity-profile .learner-action-btn {
    font-size: 0.65rem;
    padding: 0.2rem 0.45rem;
  }

  .learner-activity-profile .badge {
    font-size: 0.65rem;
    padding: 0.15rem 0.4rem;
  }

  .learner-activity-profile .panel-title,
  .learner-activity-profile .data-value,
  .learner-activity-profile .data-label,
  .learner-activity-profile .activity-icon,
  .learner-activity-profile .list-group-item,
  .learner-activity-profile .small,
  .learner-activity-profile .text-xs,
  .learner-activity-profile .text-xxs {
    font-size: 0.75rem;
  }
}

.data-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
    gap: 12px;
    background: transparent;
    margin: 24px 12px;
}

.data-cell {
    display: flex;
    min-height: 102px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 10px 14px;
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(30, 41, 59, 0.06);
    text-align: center;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.data-cell:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(30, 41, 59, 0.1);
}

.data-value {
    font-size: 2rem;
    font-weight: 700;
    color: #2b6cb0;
    display: block;
    margin-bottom: 4px;
}

.data-label {
    font-size: 12px;
    color: #718096;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

@media (max-width: 768px) {
    .data-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        margin: 20px 10px;
    }

    .data-cell {
        min-height: 92px;
        padding: 14px 8px 12px;
    }
}

.content-panel {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.panel-header {
    background: #f7fafc;
    padding: 20px 24px;
    border-bottom: 1px solid #e2e8f0;
}

.panel-title {
    font-size: 18px;
    font-weight: 600;
    color: #2d3748;
    display: flex;
    align-items: center;
    gap: 10px;
}

.list-group-item.activity-hover:hover {
    background-color: #f0f4fa !important;
    cursor: pointer;
    transition: background 0.2s;
}

.edit-specs-popper {
    position: absolute;
    z-index: 9999;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    min-width: 320px;
    max-width: 95vw;
    background: #fff;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    border-radius: 8px;
    border: 1px solid #ddd;
    padding: 16px;
    overflow-y: auto;
    max-height: 80vh;
}

.bg-job-role-icon{
  color: var(--white) !important;
  background: var(--btn-color) !important;
}

.programme-portfolio-hero {
    background: linear-gradient(135deg, #43bfc1 0%, #3d7086 100%);
    border-radius: 1.35rem;
    color: #fff;
}

.programme-portfolio-hero-body {
    position: relative;
    padding: 1.4rem 1.45rem;
}

.programme-portfolio-hero-orb {
    position: absolute;
    border-radius: 999px;
    pointer-events: none;
    opacity: 0.18;
    background: #7af4e2;
}

.programme-portfolio-hero-orb-left {
    width: 110px;
    height: 110px;
    left: 28%;
    top: -34px;
}

.programme-portfolio-hero-orb-right {
    width: 170px;
    height: 170px;
    right: -36px;
    top: -72px;
}

.programme-portfolio-hero-content {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 1rem;
}

.programme-portfolio-title {
    font-size: 1.55rem;
    font-weight: 700;
    color: #fff;
}

.programme-portfolio-create-btn,
.programme-portfolio-link-btn {
    border-radius: 0.7rem;
    border: 0;
    font-weight: 600;
    padding: 0.48rem 0.95rem;
}

.programme-portfolio-create-btn {
    background: #fff;
    color: #244054;
}

.programme-portfolio-link-btn {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
}

.programme-portfolio-setting-group {
    min-width: 280px;
}

.programme-portfolio-setting-select {
    border-radius: 0.7rem;
    border: 0;
}

.programme-portfolio-shell {
    border: 3px solid #4ccfd1;
    border-radius: 1.2rem;
    background: #fff;
}

.programme-portfolio-shell-body {
    padding: 1rem;
}

.programme-management-status-nav {
    justify-content: center;
    gap: 0.75rem;
}

.programme-management-status-pill {
    border: 1px solid #b9e8e8;
    border-radius: 999px;
    color: #3f5462;
    background: #f8ffff;
    min-width: 112px;
}

.programme-management-status-pill.active,
.programme-management-status-pill:hover {
    background: #43bfc1;
    color: #fff;
}

.programme-tree-toolbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.programme-tree-toolbar-count {
    display: flex;
    align-items: center;
    gap: 0.55rem;
}

.programme-tree-toolbar-select {
    width: 68px;
    border-radius: 0.6rem;
}

.programme-tree-toolbar-label {
    font-size: 0.88rem;
    color: #5d6570;
}

.programme-tree-toolbar-search {
    min-width: min(100%, 320px);
}

.programme-tree-toolbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
    flex: 1 1 320px;
    min-width: 0;
    margin-left: auto;
}

.programme-tree-toolbar-actions .programme-tree-toolbar-search {
    flex: 1 1 320px;
    min-width: 0;
    max-width: 420px;
}

.programme-tree-search-wrap {
    position: relative;
}

.programme-tree-search-icon {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9aa6b2;
    font-size: 0.9rem;
}

.programme-tree-search-input {
    padding-left: 2.45rem;
    border-radius: 0.65rem;
}

.program-tree-card {
    position: relative;
    margin-bottom: 1.1rem;
}

.program-tree-card-shell {
    border: 1.6px solid var(--primary-color);
    border-radius: 1rem;
    box-shadow: none;
}

.program-tree-card .card-body {
    padding: 0.95rem 1rem;
}

/* Tree children layout â€“ no connector lines, simple stacked cards */
.tree-children-container {
    margin-left: 1.5rem;
    padding-left: 0;
    position: relative;
}

.tree-children-container::before,
.tree-child::before {
    display: none;
}

.tree-child {
    position: relative;
    margin-bottom: 1rem;
}

.tree-child:last-child {
    margin-bottom: 0;
}

.program-tree-card-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.program-tree-card-main {
    display: flex;
    align-items: center;
    gap: 0.95rem;
    min-width: 0;
}

.program-tree-card-copy {
    min-width: 0;
}

.program-tree-card-copy .card-title {
    color: #17212b;
}

.program-tree-card-meta,
.program-dates {
    color: #6b7280;
}

.program-tree-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.35rem;
    height: 2.35rem;
    border-radius: 0.6rem;
    background: var(--primary-color);
    color: #fff;
    font-size: 1.25rem;
    flex: 0 0 auto;
}

/* Programme list cards (programme_management / programme_cards / recruitment
   programme list -- all mount #app): show the brand "Programmes" illustration
   used in the sidebar instead of the generic Bootstrap folder glyph, at 2rem.
   The learner "My Practicals" task cards (.task-tree-card on #user-tasks-app)
   are outside #app and keep their own clipboard icon. */
#app .program-tree-card-icon {
    width: 2rem;
    height: 2rem;
    background-color: transparent;
    background-image: url("../../platform_icons/nav/06-programmes.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
}

#app .program-tree-card-icon > i {
    display: none;
}

.program-tree-card-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.7rem;
    flex: 0 0 auto;
    align-self: stretch;
    min-height: 100%;
}

.program-tree-card-action-icons {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    width: 100%;
}

.program-tree-card-menu-btn,
.program-sub-toggle-btn,
.program-tree-card-open-link,
.program-tree-card-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border: 0;
    background: transparent;
    color: #233143;
    border-radius: 999px;
    text-decoration: none;
    box-shadow: none;
}

.program-tree-card-menu-btn:hover,
.program-sub-toggle-btn:hover,
.program-tree-card-open-link:hover,
.program-tree-card-icon-btn:hover {
    background: #eefcfc;
    color: #0f7d82;
}

.program-tree-card-icon-btn.is-delete {
    color: #d14343;
}

.program-tree-card-icon-btn.is-delete:hover {
    background: #fff1f1;
    color: #bb1f1f;
}

.program-tree-card-menu {
    border-radius: 0.75rem;
    border: 1px solid #d8ecec;
    box-shadow: 0 14px 32px rgba(20, 47, 66, 0.12);
}

.program-tree-card-action-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.4rem;
    max-width: 26rem;
    margin-top: auto;
}

.program-tree-card-action-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    white-space: nowrap;
    text-align: center;
}

.program-tree-card-manage-dropdown {
    position: relative;
    width: min(20rem, 100%);
    margin-left: auto;
}

.program-tree-card-manage-btn {
    display: inline-flex;
    align-items: center;
    width: 100%;
    justify-content: center;
    text-align: center;
    padding-inline: 1rem;
}

.program-tree-card-manage-menu {
    position: absolute;
    top: auto;
    bottom: calc(100% + 0.7rem);
    right: 0;
    width: min(20rem, calc(100vw - 2rem));
    max-width: min(20rem, calc(100vw - 2rem));
    padding: 0.4rem;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 1.15rem;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.16);
    z-index: 20;
    overflow: hidden;
}

.program-tree-card-manage-menu .program-tree-card-menu-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    width: 100%;
    border: 0;
    background: transparent;
    color: #334155;
    border-radius: 0.85rem;
    padding: 0.72rem 0.9rem;
    text-align: left;
    text-decoration: none;
    white-space: normal;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.2;
}

.program-tree-card-manage-menu .program-tree-card-menu-item i {
    width: 1.35rem;
    flex: 0 0 auto;
    text-align: center;
    font-size: 1.25rem;
    line-height: 1;
    color: inherit;
}

.program-tree-card-manage-menu .program-tree-card-menu-item:hover,
.program-tree-card-manage-menu .program-tree-card-menu-item:focus {
    background: #f4f8ff;
    color: #0f172a;
}

.program-tree-card-manage-menu .program-tree-card-menu-item.is-danger {
    color: #d14343;
}

.program-tree-card-manage-menu .program-tree-card-menu-item.is-danger:hover,
.program-tree-card-manage-menu .program-tree-card-menu-item.is-danger:focus {
    background: #fff1f1;
    color: #b42318;
}

.skill-hierarchy-manage-btn {
    width: auto;
    min-width: 10rem;
    padding-inline: 1rem;
}

.skill-hierarchy-manage-menu {
    width: min(15rem, calc(100vw - 2rem));
    max-width: min(15rem, calc(100vw - 2rem));
    z-index: 1000;
}

.skill-hierarchy-actions {
    z-index: 1;
}

.skill-hierarchy-actions--open {
    z-index: 1001;
}

.skill-hierarchy-collapse-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    line-height: 1;
}

.skill-hierarchy-collapse-btn:hover,
.skill-hierarchy-collapse-btn:focus {
    background: transparent;
    box-shadow: none;
    outline: none;
}

.skill-hierarchy-collapse-btn:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 0.15rem;
}

.skill-hierarchy-row {
    position: relative;
    z-index: 0;
    margin-left: -0.5rem;
    margin-right: -0.25rem;
    padding: 0.45rem 0.75rem;
    border-radius: 0.5rem;
    transition: background-color 160ms ease, box-shadow 160ms ease;
}

.skill-hierarchy-row--open {
    z-index: 2000;
}

.skill-hierarchy-row--spec:hover,
.skill-hierarchy-row--spec:focus-within {
    background-color: rgba(25, 135, 84, 0.08);
    box-shadow: inset 0.25rem 0 0 rgba(25, 135, 84, 0.22);
}

.skill-hierarchy-row--main:hover,
.skill-hierarchy-row--main:focus-within {
    background-color: rgba(13, 202, 240, 0.1);
    box-shadow: inset 0.25rem 0 0 rgba(13, 202, 240, 0.28);
}

.skill-hierarchy-row--sub:hover,
.skill-hierarchy-row--sub:focus-within {
    background-color: rgba(255, 193, 7, 0.14);
    box-shadow: inset 0.25rem 0 0 rgba(255, 193, 7, 0.34);
}

.skill-hierarchy-resource-summary {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}

.skill-hierarchy-resource-pill {
    display: inline-flex;
    align-items: center;
    min-height: 1.45rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    color: #64748b;
    font-size: 0.78rem;
    font-weight: 600;
    line-height: 1.1;
}

.skill-hierarchy-swal-popup.swal2-popup {
    width: min(38rem, calc(100vw - 2rem));
    padding: 0;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 1.75rem 4.5rem rgba(15, 23, 42, 0.24);
}

.skill-hierarchy-swal-title.swal2-title {
    margin: 0;
    padding: 1.15rem 3.75rem 1.15rem 1.5rem;
    background: #3d0066;
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
}

.skill-hierarchy-swal-close.swal2-close {
    top: 0.85rem;
    right: 1rem;
    width: 2rem;
    height: 2rem;
    color: #ffffff;
    font-size: 2rem;
    line-height: 1;
    opacity: 1;
}

.skill-hierarchy-swal-close.swal2-close:hover,
.skill-hierarchy-swal-close.swal2-close:focus {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

.skill-hierarchy-swal-content.swal2-html-container {
    margin: 0;
    padding: 1.75rem 2rem 0.25rem;
    text-align: left;
}

.skill-hierarchy-swal-form {
    display: grid;
    gap: 0.65rem;
}

.skill-hierarchy-swal-help {
    margin: 0 0 0.75rem;
    color: #64748b;
    font-size: 0.9rem;
    line-height: 1.45;
}

.skill-hierarchy-swal-label {
    margin: 0.25rem 0 0;
    color: #1f2937;
    font-size: 0.9rem;
    font-weight: 700;
}

.skill-hierarchy-swal-control {
    width: 100%;
    min-height: 2.9rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    background: #ffffff;
    color: #111827;
    font-size: 0.95rem;
    line-height: 1.4;
    padding: 0.7rem 0.9rem;
}

.skill-hierarchy-swal-control::placeholder {
    color: #9ca3af;
}

.skill-hierarchy-swal-control:focus {
    border-color: #6ea8fe;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(110, 168, 254, 0.25);
}

.skill-hierarchy-swal-actions.swal2-actions {
    justify-content: flex-end;
    gap: 0.75rem;
    width: 100%;
    margin: 0;
    padding: 1.25rem 2rem 1.5rem;
}

.skill-hierarchy-swal-confirm,
.skill-hierarchy-swal-cancel {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 6.75rem;
    border: 0;
    border-radius: 0.5rem;
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1;
    padding: 0.75rem 1.25rem;
}

.skill-hierarchy-swal-confirm {
    background: #3d0066;
}

.skill-hierarchy-swal-cancel {
    background: #4f46a6;
}

.skill-hierarchy-swal-confirm:hover,
.skill-hierarchy-swal-confirm:focus,
.skill-hierarchy-swal-cancel:hover,
.skill-hierarchy-swal-cancel:focus {
    filter: brightness(1.08);
    box-shadow: 0 0 0 0.2rem rgba(110, 168, 254, 0.22);
}

.skill-hierarchy-resource-swal-popup.swal2-popup {
    width: min(50rem, calc(100vw - 2rem));
}

.skill-hierarchy-view-swal-popup.swal2-popup {
    width: min(46rem, calc(100vw - 2rem));
}

.skill-hierarchy-view-modal {
    display: grid;
    gap: 0.85rem;
}

.skill-hierarchy-view-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.skill-hierarchy-view-summary span {
    display: inline-flex;
    align-items: center;
    min-height: 1.75rem;
    border-radius: 999px;
    background: #eef2ff;
    color: #3730a3;
    font-size: 0.82rem;
    font-weight: 800;
    padding: 0.25rem 0.7rem;
}

.skill-hierarchy-view-section {
    border: 1px solid #e5e7eb;
    border-radius: 0.65rem;
    background: #f8fafc;
    padding: 0.85rem;
}

.skill-hierarchy-view-section h6 {
    margin: 0 0 0.65rem;
    color: #1f2937;
    font-size: 0.92rem;
    font-weight: 800;
}

.skill-hierarchy-view-list {
    display: grid;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.skill-hierarchy-view-list li {
    display: grid;
    gap: 0.15rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #ffffff;
    color: #334155;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 0.65rem 0.75rem;
}

.skill-hierarchy-view-list small {
    color: #64748b;
    font-size: 0.76rem;
    font-weight: 600;
}

.skill-hierarchy-view-empty {
    margin: 0;
    color: #94a3b8;
    font-size: 0.86rem;
}

.skill-hierarchy-resource-columns {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.skill-hierarchy-resource-panel {
    min-height: 12rem;
    max-height: 20rem;
    overflow: auto;
    border: 1px solid #e5e7eb;
    border-radius: 0.65rem;
    background: #f8fafc;
    padding: 0.85rem;
}

.skill-hierarchy-resource-panel h6 {
    margin: 0 0 0.65rem;
    color: #1f2937;
    font-size: 0.92rem;
    font-weight: 800;
}

.skill-hierarchy-resource-option {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    width: 100%;
    margin: 0 0 0.5rem;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    background: #ffffff;
    color: #334155;
    cursor: pointer;
    font-size: 0.86rem;
    font-weight: 600;
    line-height: 1.3;
    padding: 0.65rem 0.75rem;
}

.skill-hierarchy-resource-option:hover,
.skill-hierarchy-resource-option:focus-within {
    border-color: #bfdbfe;
    background: #eff6ff;
}

.skill-hierarchy-resource-option input {
    flex: 0 0 auto;
    margin-top: 0.1rem;
}

.skill-hierarchy-swal-empty {
    margin: 0;
    color: #94a3b8;
    font-size: 0.86rem;
}

@media (max-width: 768px) {
    .skill-hierarchy-resource-columns {
        grid-template-columns: 1fr;
    }
}

.program-tree-card .program-sub-count {
    font-weight: 600;
    color: #111827;
}

.home-section.admin-home-layout .programme-management-admin-home-shell .header-card h6 {
    font-size: 1.3rem;
}

.home-section.admin-home-layout .programme-management-admin-home-shell .btn,
.home-section.admin-home-layout .programme-management-admin-home-shell .nav-link,
.home-section.admin-home-layout .programme-management-admin-home-shell .form-control,
.home-section.admin-home-layout .programme-management-admin-home-shell .form-select {
    font-size: 0.96rem !important;
    line-height: 1.3;
}

.home-section.admin-home-layout .programme-management-admin-home-shell .programme-tree-toolbar-label,
.home-section.admin-home-layout .programme-management-admin-home-shell .program-tree-card-meta,
.home-section.admin-home-layout .programme-management-admin-home-shell .program-dates,
.home-section.admin-home-layout .programme-management-admin-home-shell .text-xxs,
.home-section.admin-home-layout .programme-management-admin-home-shell small {
    font-size: 0.92rem !important;
    line-height: 1.35;
}

.home-section.admin-home-layout .programme-management-admin-home-shell .program-tree-card-copy .card-title {
    font-size: 1.12rem;
    line-height: 1.3;
}

.home-section.admin-home-layout .programme-management-admin-home-shell .programme-tree-search-input {
    font-size: 0.95rem;
}

.home-section.admin-home-layout .programme-management-admin-home-shell .program-tree-card-action-btn {
    font-size: 0.92rem;
    font-weight: 600;
}

@media (max-width: 1199.98px) {
    .home-section.admin-home-layout.mx-4 {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .home-section.admin-home-layout {
        padding-left: 0.65rem !important;
        padding-right: 0.65rem !important;
    }

    .home-section.admin-home-layout #app.container-fluid {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .home-section.admin-home-layout #status_tabContent {
        width: 100%;
        max-width: 100%;
        padding-left: 0.45rem !important;
        padding-right: 0.45rem !important;
        margin-right: 0 !important;
        box-sizing: border-box;
    }

    .home-section.admin-home-layout #status_tabContent.pe-5,
    .home-section.admin-home-layout #status_tabContent.pe-md-0,
    .home-section.admin-home-layout #status_tabContent.me-2,
    .home-section.admin-home-layout #status_tabContent.px-3 {
        padding-left: 0.45rem !important;
        padding-right: 0.45rem !important;
        margin-right: 0 !important;
        box-sizing: border-box;
    }

    .home-section.admin-home-layout #status_tabContent > .card.border-light.shadow,
    .home-section.admin-home-layout #status_tabContent > .card {
        width: 100%;
        max-width: 100%;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .home-section.admin-home-layout #status_tabContent > .card > .card-body,
    .home-section.admin-home-layout #status_tabContent > .card > .card-body.p-4 {
        padding: 1rem !important;
    }

    .home-section.admin-home-layout .programme-management-admin-home-shell {
        width: 100%;
    }

    .home-section.admin-home-layout .programme-management-admin-home-shell .programme-management-embed-header-shell,
    .home-section.admin-home-layout .programme-management-admin-home-shell .programme-management-embed-content-shell {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .home-section.admin-home-layout .programme-management-admin-home-shell .programme-management-embed-content-shell {
        margin-top: 0.85rem !important;
    }

    .home-section.admin-home-layout .programme-management-admin-home-shell .header-card,
    .home-section.admin-home-layout .programme-management-admin-home-shell .programme-management-embed-content-shell > .card {
        width: 100%;
        max-width: 100%;
    }

    .home-section.admin-home-layout .programme-management-admin-home-shell .header-card .card-body {
        padding: 0.95rem !important;
    }

    .home-section.admin-home-layout .programme-management-admin-home-shell .programme-management-embed-content-shell > .card > .card-body,
    .home-section.admin-home-layout .programme-management-admin-home-shell .programme-management-embed-content-shell > .card > .card-body.pb-0 {
        padding: 0.85rem 0.85rem 0 !important;
    }

    .home-section.admin-home-layout .programme-management-admin-home-shell .programme-management-embed-tab-panel {
        padding: 0.85rem 0 0 !important;
    }

    .home-section.admin-home-layout .programme-management-admin-home-shell .programme-management-status-tabs-wrap {
        padding: 0.35rem 0.35rem 0.15rem;
    }

    .home-section.admin-home-layout .programme-management-admin-home-shell .programme-tree-toolbar {
        gap: 0.75rem;
        align-items: stretch;
    }

    .home-section.admin-home-layout .programme-management-admin-home-shell .programme-tree-toolbar-actions {
        width: 100%;
        flex: 1 1 100%;
        justify-content: flex-start;
        margin-left: 0;
    }

    .home-section.admin-home-layout .programme-management-admin-home-shell .programme-tree-toolbar-search,
    .home-section.admin-home-layout .programme-management-admin-home-shell .programme-tree-toolbar-actions .programme-tree-toolbar-search {
        width: 100%;
        max-width: none;
        min-width: 0;
        flex: 1 1 100%;
    }

    .home-section.admin-home-layout .programme-management-admin-home-shell .program-tree-card {
        margin-bottom: 0.9rem;
        width: 100%;
    }

    .home-section.admin-home-layout .programme-management-admin-home-shell .program-tree-card-row {
        flex-direction: column;
        align-items: stretch;
        gap: 0.85rem;
    }

    .home-section.admin-home-layout .programme-management-admin-home-shell .program-tree-card-main {
        width: 100%;
    }

    .home-section.admin-home-layout .programme-management-admin-home-shell .program-tree-card-actions {
        width: 100%;
        align-items: stretch;
        gap: 0.65rem;
    }

    .home-section.admin-home-layout .programme-management-admin-home-shell .program-tree-card-action-icons {
        justify-content: flex-start;
    }

    .home-section.admin-home-layout .programme-management-admin-home-shell .program-tree-card-action-buttons {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        max-width: none;
        justify-content: stretch;
        align-items: stretch;
        gap: 0.5rem;
    }

    .home-section.admin-home-layout .programme-management-admin-home-shell .program-tree-card-action-btn {
        flex: 1 1 auto;
        min-width: 0;
        width: 100%;
        max-width: 100%;
        text-align: center;
        min-height: 2.45rem;
        white-space: normal;
        line-height: 1.2;
        overflow-wrap: anywhere;
    }

    .home-section.admin-home-layout .programme-management-admin-home-shell .program-tree-card-action-buttons > .program-tree-card-manage-dropdown:only-child,
    .home-section.admin-home-layout .programme-management-admin-home-shell .program-tree-card-action-buttons > .program-tree-card-manage-dropdown:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .home-section.admin-home-layout .programme-management-admin-home-shell .program-tree-card-action-buttons .program-tree-card-action-btn:only-child,
    .home-section.admin-home-layout .programme-management-admin-home-shell .program-tree-card-action-buttons .program-tree-card-action-btn:last-child:nth-child(odd) {
        grid-column: 1 / -1;
    }

    .home-section.admin-home-layout .programme-management-admin-home-shell .tree-children-container {
        margin-left: 0.65rem !important;
    }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
    .home-section.admin-home-layout #status_tabContent,
    .home-section.admin-home-layout #status_tabContent.pe-5,
    .home-section.admin-home-layout #status_tabContent.pe-md-0,
    .home-section.admin-home-layout #status_tabContent.me-2,
    .home-section.admin-home-layout #status_tabContent.px-3 {
        padding-left: 1rem !important;
    }

    .home-section.admin-home-layout #status_tabContent > .card.border-light.shadow,
    .home-section.admin-home-layout #status_tabContent > .card {
        margin-left: 0.25rem !important;
    }
}

/* Ensure the last horizontal line aligns perfectly with the end of the vertical line */
.tree-child:last-child::before {
    top: auto;
    bottom: 2.4rem; /* This aligns the horizontal line with the end of the vertical line */
}

@media (max-width: 767.98px) {
    .home-section.admin-home-layout #status_tabContent {
        padding-left: 0.2rem !important;
        padding-right: 0.2rem !important;
    }

    .home-section.admin-home-layout #status_tabContent.pe-5,
    .home-section.admin-home-layout #status_tabContent.pe-md-0,
    .home-section.admin-home-layout #status_tabContent.me-2,
    .home-section.admin-home-layout #status_tabContent.px-3 {
        padding-left: 0.2rem !important;
        padding-right: 0.2rem !important;
    }

    .home-section.admin-home-layout #status_tabContent > .card > .card-body,
    .home-section.admin-home-layout #status_tabContent > .card > .card-body.p-4 {
        padding: 0.8rem !important;
    }

    .home-section.admin-home-layout .programme-management-admin-home-shell .header-card .card-body {
        padding: 0.85rem !important;
    }

    .home-section.admin-home-layout .programme-management-admin-home-shell .programme-management-embed-content-shell > .card > .card-body,
    .home-section.admin-home-layout .programme-management-admin-home-shell .programme-management-embed-content-shell > .card > .card-body.pb-0 {
        padding: 0.75rem 0.75rem 0 !important;
    }

    .home-section.admin-home-layout .programme-management-admin-home-shell .programme-management-embed-tab-panel {
        padding-top: 0.75rem !important;
    }

    .home-section.admin-home-layout .programme-management-admin-home-shell .programme-management-status-tabs-wrap {
        padding-left: 0.15rem;
        padding-right: 0.15rem;
    }

    .home-section.admin-home-layout .programme-management-admin-home-shell .program-tree-card .card-body {
        padding: 0.75rem !important;
    }

    .home-section.admin-home-layout .programme-management-admin-home-shell .program-tree-card-action-buttons {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.45rem;
    }

    .home-section.admin-home-layout .programme-management-admin-home-shell .program-tree-card-action-btn {
        min-height: 2.35rem;
        font-size: 0.84rem;
        padding: 0.45rem 0.55rem;
    }

    .home-section.admin-home-layout .programme-management-admin-home-shell .tree-children-container {
        margin-left: 0.35rem !important;
    }

    .programme-management-embed .programme-management-mobile-card,
    .programme-management-embed .programme-management-mobile-list-card {
        border-radius: 1rem;
    }

    .programme-management-embed .programme-management-mobile-card .card-body {
        padding: 0.9rem !important;
    }

    .programme-management-embed .programme-management-mobile-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.55rem;
    }

    .programme-management-embed .programme-management-mobile-actions .btn {
        width: 100%;
        min-height: 2.35rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.45rem 0.65rem;
    }

    .programme-management-embed .programme-management-mobile-menu-btn {
        color: #1f2937;
        width: 2.1rem;
        height: 2.1rem;
        flex: 0 0 auto;
    }

    .programme-management-embed .programme-management-mobile-settings {
        background: #f8fafc;
        border: 1px solid rgba(13, 110, 253, 0.18);
        border-radius: 0.85rem;
        padding: 0.75rem;
    }

    .programme-management-embed .programme-management-mobile-tabs-wrap {
        padding: 0;
    }

    .programme-management-embed .programme-management-mobile-tabs {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.45rem;
    }

    .programme-management-embed .programme-management-mobile-tabs .nav-item {
        width: 100%;
    }

    .programme-management-embed .programme-management-mobile-tabs .nav-link {
        width: 100%;
        min-height: 2.45rem;
        padding: 0.48rem 0.35rem;
        font-size: 0.88rem;
    }

    .programme-portfolio-hero-body {
        padding: 1.1rem;
    }

    .programme-portfolio-title {
        font-size: 1.25rem;
    }

    .programme-management-status-nav {
        justify-content: flex-start;
    }

    .programme-tree-toolbar-search {
        width: 100%;
        min-width: 100%;
    }

    .programme-management-embed .programme-tree-toolbar-count {
        display: none;
    }

    .programme-tree-toolbar-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .programme-management-embed .programme-tree-toolbar {
        margin-bottom: 0.75rem;
    }

    .programme-management-embed .programme-tree-search-input {
        min-height: 2.4rem;
        font-size: 0.94rem;
    }

    .programme-management-embed .program-tree-card {
        margin-bottom: 0.75rem;
    }

    .programme-management-embed .program-tree-card-shell {
        border-radius: 0.85rem;
    }

    .programme-management-embed .program-tree-card .card-body {
        padding: 0.8rem 0.8rem;
    }

    .program-tree-card-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.75rem;
    }

    .programme-management-embed .program-tree-card-main {
        gap: 0.7rem;
        width: 100%;
    }

    .programme-management-embed .program-tree-card-icon {
        width: 2rem;
        height: 2rem;
        font-size: 1rem;
        border-radius: 0.55rem;
    }

    .programme-management-embed .program-tree-card-copy .card-title {
        font-size: 1.05rem;
        line-height: 1.25;
    }

    .programme-management-embed .program-tree-card-meta,
    .programme-management-embed .program-dates {
        font-size: 0.86rem;
        line-height: 1.25;
    }

    .program-tree-card-actions {
        width: 100%;
        align-items: stretch;
        gap: 0.55rem;
    }

    .programme-management-embed .program-tree-card-action-icons {
        justify-content: flex-start;
    }

    .program-tree-card-action-buttons {
        width: 100%;
        justify-content: flex-start;
        gap: 0.45rem;
    }

    .programme-management-embed .program-tree-card-action-btn {
        flex: 1 1 calc(50% - 0.45rem);
        min-width: calc(50% - 0.45rem);
        text-align: center;
        padding: 0.45rem 0.6rem;
        font-size: 0.75rem;
    }
}

.scrollable-visible {
  overflow-y: scroll !important;
  scrollbar-width: thick; /* For Firefox */
  background: #f8f9fa; /* Light background for contrast */
}

/* For Webkit browsers (Chrome, Edge, Safari) */
.scrollable-visible::-webkit-scrollbar {
  width: 10px;
  background: transparent;
}

.scrollable-visible::-webkit-scrollbar-thumb {
  background: #b0b0b0;
  border-radius: 5px;
}


.scrollable-visible::-webkit-scrollbar-track {
  background:transparent;
}
.max-height-250 {
  max-height: 250px;
  overflow-y: auto;
  scrollbar-width: auto;
}

.max-height-300 {
  max-height: 300px;
  overflow-y: auto;
  scrollbar-width: auto;
}
.max-height-600 {
  max-height: 600px;
  overflow-y: auto;
  scrollbar-width: auto;
}
.max-width-100 {
  max-width: 100px;
  overflow-y: auto;
  scrollbar-width: auto;
}

.max-height-100 {
  max-height: 100px;
  overflow-y: auto;
  scrollbar-width: auto;
}
.max-height-400 {
  max-height: 400px;
  overflow-y: auto;
  scrollbar-width: auto;
}

/* Course view assessment table */
#view-assessment-popup table#assessment_table {
  width: 100% !important;
}

#view-assessment-popup .assessment-table-container {
  width: 100%;
}

#view-assessment-popup .assessment-table-container .row {
  margin-left: 0;
  margin-right: 0;
  flex-wrap: wrap;
}

#view-assessment-popup .assessment-table-container .row > div {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

#view-assessment-popup .assessment-table-container .dataTables_scrollHead,
#view-assessment-popup .assessment-table-container .dataTables_scrollBody {
  margin-bottom: 0;
}

#view-assessment-popup .assessment-table-container .dataTables_scrollBody {
  max-height: 60vh;
  overflow-x: auto;
}

#view-assessment-popup .assessment-table-container .dataTables_length label,
#view-assessment-popup .assessment-table-container .dataTables_filter label {
  width: 100%;
}

#view-assessment-popup .assessment-table-container .dataTables_filter input {
  width: 100%;
}

#manage-assessment-app .manage-assessment-row-dropdown {
  display: inline-flex;
  max-width: 100%;
  width: auto;
}

#simple-form-table-app .manage-assessment-row-dropdown,
#simple-form-table-app .manage-user-popover-wrapper {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: 100%;
  min-width: 0;
  position: relative;
  overflow: visible;
}

#manage-assessment-app .manage-assessment-actions-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

#simple-form-table-app .manage-assessment-actions-toggle,
#simple-form-table-app .manage-user-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  width: auto;
  min-width: 0;
  padding: 0.14rem 0.3rem;
  font-size: 0.68rem;
  line-height: 1;
  border-radius: 999px;
  white-space: nowrap;
}

#manage-assessment-app .manage-assessment-actions-menu {
  position: fixed !important;
  left: var(--manage-assessment-actions-menu-left, 0) !important;
  top: var(--manage-assessment-actions-menu-top, 0) !important;
  width: 260px;
  max-width: calc(100vw - 1rem);
  max-height: calc(100vh - 1rem);
  overflow: hidden auto;
  padding: 0.4rem;
  display: flex !important;
  flex-direction: column;
  gap: 0.35rem;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 1.35rem;
  box-shadow: 0 1.25rem 3rem rgba(15, 23, 42, 0.18);
  z-index: 4000 !important;
  visibility: hidden;
  pointer-events: none;
  right: auto !important;
  margin-top: 0 !important;
  transform: none !important;
}

#manage-assessment-app .manage-assessment-actions-menu .programme-courses-panel-action {
  gap: 0.75rem;
  font-size: 0.82rem;
  font-weight: 600;
  border-radius: 0.85rem;
  color: #1f2937;
  transition: background-color 0.15s ease, color 0.15s ease;
}

#manage-assessment-app .manage-assessment-actions-menu .programme-courses-panel-action:hover,
#manage-assessment-app .manage-assessment-actions-menu .programme-courses-panel-action:focus {
  background: #f8fafc;
  color: #111827;
}

#manage-assessment-app .manage-assessment-actions-menu .programme-courses-panel-action i {
  color: #334155;
  width: 1rem;
  flex: 0 0 1rem;
  font-size: 1rem;
}

/* Assessment template "Manage" menu (Edit/Delete/Configure/Learners/Assign) --
   fixed-position panel matching the manage-assessment-actions-menu above
   instead of Bootstrap's Popper-driven dropdown; JS (assessment_templates.js)
   positions it via the --assessment-template-manage-menu-left/top custom
   properties so it stays fully visible near table edges. */
.table .dropdown-menu.assessment-template-manage-menu,
.table-responsive .dropdown-menu.assessment-template-manage-menu,
.dataTables_wrapper .dropdown-menu.assessment-template-manage-menu,
.assessment-template-manage-menu {
  position: fixed !important;
  left: var(--assessment-template-manage-menu-left, 0) !important;
  top: var(--assessment-template-manage-menu-top, 0) !important;
  right: auto !important;
  width: 240px;
  max-width: calc(100vw - 1rem);
  max-height: calc(100vh - 1rem);
  overflow: hidden auto;
  display: block !important;
  margin-top: 0 !important;
  transform: none !important;
  z-index: 4000 !important;
  visibility: hidden;
  pointer-events: none;
}

.assessment-template-manage-menu.is-open {
  visibility: visible;
  pointer-events: auto;
}

.assessment-template-manage-menu[aria-hidden="true"] {
  display: none !important;
}

@media (max-width: 768px) {
  .assessment-template-manage-menu {
    width: min(15.5rem, calc(100vw - 1rem)) !important;
    max-width: calc(100vw - 1rem) !important;
    max-height: calc(100vh - 1rem) !important;
    padding: 0.35rem !important;
    border-radius: 0.95rem !important;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.16) !important;
    z-index: 5000 !important;
  }

  .assessment-template-manage-menu .programme-courses-panel-action {
    padding: 0.5rem 0.65rem !important;
    font-size: 0.68rem !important;
    line-height: 1.05;
  }
}

#simple-form-table-app .manage-assessment-actions-menu,
#simple-form-table-app .manage-user-popover {
  position: absolute !important;
  top: auto !important;
  bottom: calc(100% + 0.45rem) !important;
  right: 0 !important;
  left: auto !important;
  width: 12.75rem;
  max-width: calc(100vw - 1rem);
  max-height: calc(100vh - 1rem);
  overflow: visible !important;
  padding: 0 !important;
  display: block !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  z-index: 10000 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  margin-top: 0 !important;
  transform: none !important;
}

#simple-form-table-app .manage-assessment-actions-menu .manage-user-action-panel,
#simple-form-table-app .manage-user-popover .manage-user-action-panel {
  width: 100%;
  box-shadow: 0 1.25rem 3rem rgba(15, 23, 42, 0.18);
}

#manage-assessment-app .manage-assessment-actions-menu.is-open {
  visibility: visible;
  pointer-events: auto;
}

#simple-form-table-app .manage-assessment-actions-menu.is-open,
#simple-form-table-app .manage-user-popover-wrapper.is-open {
  z-index: 5;
}

#manage-assessment-app .manage-assessment-actions-menu[aria-hidden="true"],
#simple-form-table-app .manage-assessment-actions-menu[aria-hidden="true"],
#simple-form-table-app .manage-user-popover[aria-hidden="true"] {
  display: none !important;
}

@media (max-width: 768px) {
  #manage-assessment-app .manage-assessment-actions-toggle {
    width: auto;
    min-width: 7.25rem !important;
    padding: 0.22rem 0.52rem !important;
    font-size: 0.58rem !important;
    line-height: 1.05;
    justify-content: center;
  }

  #simple-form-table-app .manage-assessment-actions-toggle,
  #simple-form-table-app .manage-user-toggle {
    width: auto;
    min-width: 7.25rem !important;
    padding: 0.22rem 0.52rem !important;
    font-size: 0.58rem !important;
    line-height: 1.05;
    justify-content: center;
  }

  #manage-assessment-app .manage-assessment-actions-menu {
    width: min(15.5rem, calc(100vw - 1rem)) !important;
    max-width: calc(100vw - 1rem) !important;
    max-height: calc(100vh - 1rem) !important;
    padding: 0.35rem !important;
    border-radius: 0.95rem !important;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.16) !important;
    z-index: 5000 !important;
  }

  #simple-form-table-app .manage-assessment-actions-menu,
  #simple-form-table-app .manage-user-popover {
    width: min(15rem, calc(100vw - 1rem)) !important;
    max-width: calc(100vw - 1rem) !important;
    max-height: calc(100vh - 1rem) !important;
    padding: 0.35rem !important;
    border-radius: 0.95rem !important;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.16) !important;
    z-index: 5000 !important;
    margin-top: 0 !important;
  }

  #manage-assessment-app .manage-assessment-actions-menu .programme-courses-panel-action {
    padding: 0.5rem 0.65rem !important;
    font-size: 0.68rem !important;
    line-height: 1.05;
  }

  #simple-form-table-app .manage-assessment-actions-menu .programme-courses-panel-action,
  #simple-form-table-app .manage-user-popover .manage-user-action-btn {
    padding: 0.5rem 0.65rem !important;
    font-size: 0.68rem !important;
    line-height: 1.05;
  }

  #manage-assessment-app .manage-assessment-actions-toggle .bx {
    font-size: 0.95rem;
    margin-right: 0.2rem !important;
  }

  #simple-form-table-app .manage-assessment-actions-toggle .bx {
    font-size: 0.95rem;
    margin-right: 0.2rem !important;
  }

  #simple-form-table-app .manage-user-toggle i {
    font-size: 0.95rem;
    margin-right: 0.2rem !important;
  }

  #ai_generated_assessment_popup .modal-dialog {
    width: calc(100vw - 1rem);
    max-width: calc(100vw - 1rem);
    margin: 0.5rem auto;
  }

  #ai_generated_assessment_popup .modal-footer {
    padding: 0.75rem 0.75rem 1rem;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
  }

  #ai_generated_assessment_popup #step1_buttons,
  #ai_generated_assessment_popup #step2_buttons {
    width: 100%;
  }

  #ai_generated_assessment_popup #step1_buttons {
    display: flex;
    justify-content: center;
  }

  #ai_generated_assessment_popup #step2_buttons > div {
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.45rem;
  }

  #ai_generated_assessment_popup #submit_ai_assessment_btn,
  #ai_generated_assessment_popup #back_to_step1_btn,
  #ai_generated_assessment_popup #submit_scheduled_assessment_btn,
  #ai_generated_assessment_popup #generate_question_btn {
    max-width: 100%;
    min-height: 2.25rem;
    padding: 0.38rem 0.8rem;
    font-size: 0.72rem;
    line-height: 1.1;
    white-space: nowrap;
  }

  #ai_generated_assessment_popup #submit_ai_assessment_btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-width: 4.75rem;
    padding: 0.3rem 0.7rem;
    font-size: 0.68rem;
  }

  .course-view-curriculum-page #view-assessment-popup .modal-dialog {
    width: calc(100vw - 1rem);
    max-width: calc(100vw - 1rem);
    margin: 0.5rem auto;
  }

  .course-view-curriculum-page #view-assessment-popup .modal-content {
    max-height: calc(100vh - 1rem);
    overflow: hidden;
  }

  .course-view-curriculum-page #view-assessment-popup .modal-header {
    padding: 0.7rem 0.8rem 0.55rem;
  }

  .course-view-curriculum-page #view-assessment-popup .modal-header h1 {
    font-size: 0.9rem;
    line-height: 1.2;
    margin-top: 0.15rem !important;
  }

  .course-view-curriculum-page #view-assessment-popup .modal-content > .card-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    padding: 0.75rem;
  }

  .course-view-curriculum-page #view-assessment-popup .table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable both-edges;
    padding-bottom: 0.25rem;
  }

  .course-view-curriculum-page #view-assessment-popup table#assessment_table {
    min-width: 780px;
    table-layout: auto;
  }

  .course-view-curriculum-page #view-assessment-popup table#assessment_table th,
  .course-view-curriculum-page #view-assessment-popup table#assessment_table td {
    font-size: 0.68rem;
    line-height: 1.25;
    padding: 0.35rem 0.45rem;
    vertical-align: top;
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
  }

  .course-view-curriculum-page #view-assessment-popup table#assessment_table th:last-child,
  .course-view-curriculum-page #view-assessment-popup table#assessment_table td:last-child {
    min-width: 7.5rem;
    text-align: center;
  }

  .course-view-curriculum-page #view-assessment-popup table#assessment_table td:last-child .btn,
  .course-view-curriculum-page #view-assessment-popup table#assessment_table td:last-child a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.5rem;
    font-size: 0.65rem;
    line-height: 1;
    white-space: nowrap;
  }
}

.assessment-assign-modal .modal-content {
  max-height: calc(100vh - 2rem);
  overflow: hidden;
}

.assessment-assign-modal .modal-content > .modal-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  overflow: auto;
  padding-right: 0.35rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  scrollbar-width: auto;
  scrollbar-color: rgb(108 117 125 / 55%) #f1f1f1;
}

.assessment-assign-modal .modal-content > .modal-body::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.assessment-assign-modal .modal-content > .modal-body::-webkit-scrollbar-track {
  background-color: #f1f1f1;
}

.assessment-assign-modal .modal-content > .modal-body::-webkit-scrollbar-thumb {
  background-color: rgb(108 117 125 / 55%);
  border-radius: 999px;
}

.assessment-assign-modal .choices {
  margin-bottom: 0;
}

.assessment-assign-modal .choices__list--dropdown,
.assessment-assign-modal .choices__list[aria-expanded] {
  z-index: 2055;
}

.assessment-assign-modal .assign-assessment-table-shell {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.assessment-assign-modal .assign-assessment-table-shell > .card-body,
.assessment-assign-modal .assign-assessment-table-shell > .col,
.assessment-assign-modal .assign-assessment-table-shell > .table-responsive {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.assessment-assign-modal .assign-assessment-table-shell .table-responsive {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.assessment-assign-modal .assign-assessment-table-shell .dt-container,
.assessment-assign-modal .assign-assessment-table-shell .dataTables_wrapper {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
}

.assessment-assign-modal .assign-assessment-table-shell .dt-scroll,
.assessment-assign-modal .assign-assessment-table-shell .dataTables_scroll {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
}

.assessment-assign-modal .assign_switch {
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.assessment-assign-modal .dt-scroll-head,
.assessment-assign-modal .dataTables_scrollHead,
.assessment-assign-modal .dt-scroll-body,
.assessment-assign-modal .dataTables_scrollBody {
  margin-bottom: 0;
}

.assessment-assign-modal .dt-scroll-body,
.assessment-assign-modal .dataTables_scrollBody {
  overflow-x: auto !important;
  overflow-y: auto !important;
  padding-bottom: 0.35rem;
  position: relative;
  z-index: 1;
  /* End-edge only: "both-edges" reserves a ~15px gutter on the left of the
     scroll body that the header strip doesn't get, shifting every body cell
     right of its header. */
  scrollbar-gutter: stable;
  scrollbar-width: auto;
  scrollbar-color: #9ca3af #f1f1f1;
}

/* --- "Assign Assessment" modal tables, every "Assign To" type (Individual /
   Team / Course / Programme / Specialization) --- give the columns real
   padding, keep each field under its own header, and scroll the table as one
   piece. scrollX (set in manage_assessment.js) syncs the header and body table
   widths; this local DataTables build omits the overflow:hidden it normally
   puts on the header/footer strips, so pin it here or the wider header leaks
   past the modal edge. */
.assessment-assign-modal .dt-scroll-head,
.assessment-assign-modal .dt-scroll-foot,
.assessment-assign-modal .dataTables_scrollHead,
.assessment-assign-modal .dataTables_scrollFoot {
  overflow: hidden;
}
.assessment-assign-modal table.dataTable > thead > tr > th,
.assessment-assign-modal table.dataTable > tbody > tr > td {
  padding: 0.55rem 0.9rem;
  vertical-align: middle;
}
/* DataTables' own `td.dt-center` already centres most control columns, but it
   also tags the "No" column `dt-type-numeric` and right-aligns it at the same
   specificity, which wins by source order. Re-assert centre here (no Bootstrap
   utility both centres and out-ranks `dt-type-numeric` without !important). */
.assessment-assign-modal table.dataTable th.dt-center,
.assessment-assign-modal table.dataTable td.dt-center {
  text-align: center;
}
/* Compact fields still need to become inline blocks so centring the column
   actually centres the control, rather than a full-width input / flex row
   stretching edge to edge under a centred header. */
.assessment-assign-modal table.dataTable td.dt-center input[type="datetime-local"] {
  width: auto;
  min-width: 12rem;
  max-width: 100%;
  display: inline-block;
}
.assessment-assign-modal table.dataTable td.dt-center .assign-skills-cell {
  display: inline-block;
  text-align: center;
}
.assessment-assign-modal table.dataTable td.dt-center > .d-flex,
.assessment-assign-modal table.dataTable td.dt-center .assign_switch {
  display: inline-flex;
  justify-content: center;
}

.assessment-assign-modal .dt-scroll-body::-webkit-scrollbar,
.assessment-assign-modal .dataTables_scrollBody::-webkit-scrollbar {
  height: 14px;
}

.assessment-assign-modal .dt-scroll-body::-webkit-scrollbar-track,
.assessment-assign-modal .dataTables_scrollBody::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.assessment-assign-modal .dt-scroll-body::-webkit-scrollbar-thumb,
.assessment-assign-modal .dataTables_scrollBody::-webkit-scrollbar-thumb {
  background: #9ca3af;
  border-radius: 999px;
  border: 3px solid #f1f1f1;
}

.assessment-assign-modal .dt-scroll-body::-webkit-scrollbar-thumb:hover,
.assessment-assign-modal .dataTables_scrollBody::-webkit-scrollbar-thumb:hover {
  background: #6b7280;
}

/* Mobile responsiveness fix for Cart and Profile/Menu button overlap */
@media (max-width: 768px) {
    /* Reduce cart button spacing aggressively */
    .navbar-nav .cart-btn,
    button.cart-btn {
        margin-left: 0.25rem !important;
        margin-right: 0.25rem !important;
        padding-left: 0.3rem !important;
        padding-right: 0.3rem !important;
        font-size: 0.7rem !important;
        white-space: nowrap !important;
    }

    /* Hide "Cart" text on mobile, show only icon and badge */
    .navbar-nav .cart-btn {
        font-size: 0 !important;
        line-height: 0 !important;
    }

    .navbar-nav .cart-btn .bx-cart {
        font-size: 1.1rem !important;
        line-height: normal !important;
        margin-right: 0 !important;
    }

    .navbar-nav .cart-btn .badge {
        font-size: 0.65rem !important;
        line-height: normal !important;
        padding: 0.1rem 0.25rem !important;
        margin-left: 0.25rem !important;
    }

    /* Reduce profile button spacing */
    .navbar-nav .profile-button {
        margin-left: 0.25rem !important;
        margin-right: 0.25rem !important;
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
    }

    /* Control navbar list item spacing */
    .navbar-nav li.d-flex {
        gap: 0.15rem !important;
        flex-wrap: nowrap !important;
        align-items: center !important;
    }

    /* Reduce icon and text sizes */
    .navbar-nav .role-icon-sm {
        font-size: 0.85rem !important;
        margin-right: 0.25rem !important;
    }

    .navbar-nav .role_name_sm {
        font-size: 0.7rem !important;
        white-space: nowrap !important;
    }

    /* Reduce sidebar menu icon spacing */
    .navbar-nav .sidebar-icon-menu {
        margin-left: 0.25rem !important;
        font-size: 1.2rem !important;
    }
}

/* Extra small devices - even more aggressive spacing */
@media (max-width: 480px) {
    .navbar-nav .cart-btn,
    button.cart-btn {
        margin-left: 0.15rem !important;
        margin-right: 0.15rem !important;
        padding-left: 0.2rem !important;
        padding-right: 0.2rem !important;
        min-width: auto !important;
    }

    .navbar-nav .cart-btn .bx-cart {
        font-size: 1rem !important;
        margin-right: 0.1rem !important;
    }

    .navbar-nav .cart-btn .badge {
        font-size: 0.6rem !important;
        padding: 0.05rem 0.2rem !important;
        margin-left: 0.1rem !important;
    }

    .navbar-nav .profile-button {
        margin-left: 0.15rem !important;
        margin-right: 0.15rem !important;
        padding-left: 0.15rem !important;
        padding-right: 0.15rem !important;
    }

    .navbar-nav li.d-flex {
        gap: 0.1rem !important;
    }

    .navbar-nav .role-icon-sm {
        font-size: 0.75rem !important;
        margin-right: 0.15rem !important;
    }

    .navbar-nav .role_name_sm {
        font-size: 0.65rem !important;
    }

    .navbar-nav .sidebar-icon-menu {
        margin-left: 0.15rem !important;
        font-size: 1rem !important;
    }
}


.note-content p {
  width: 100% !important;
  margin-bottom: 1.5rem;
  border-collapse: collapse;
}

.flashcard-card {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,4%);
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 8px 0;
}

.flashcard-card p {
  margin: 0;
  line-height: 1.55;
  font-size: 15px;
}

.note-content img {
  max-width: 35%;    /* shrink width on desktop */
  height: auto;      /* keep aspect ratio */
  display: block;
  margin: 1.5rem auto;  /* center + spacing */
  border-radius: 12px;  /* optional: rounded corners */
  object-fit: cover;

}

.flashcard-card p {
  white-space: pre-wrap;
}

.flashcard-card p strong {
  display: inline-block;
  min-width: 120px;
  color: #374151;
}

/* On mobile, let them use full width */
@media (max-width: 768px) {
  .note-content img {
    max-width: 100%;
  }
}

.flashcard-line {
  display: inline;
  padding: 1px 2px;
  border-radius: 3px;
}


.flashcard-line-active{
  background-color: #e0e0e0;;
  box-shadow: 0 0 0 2px rgb(125 124 120 / 60%);
  transition: background-color 0.05s linear;
}

/* ---------------- Mobile learner homepage (new UI) ---------------- */
@media (max-width: 767.98px) {
  .mobile-learner-margins {
    margin-right: 0 !important;
    margin-left: 0 !important;
  }

  /* Select product mobile view â€“ keep cards centered with equal side spacing */
  .select-product-page .mobile-learner-margins {
    margin-right: 1rem !important;
    margin-left: 1rem !important;
  }

  @media (max-width: 767.98px) {
    .select-product-page .mobile-learner-margins {
        margin-right: 4rem !important;
        margin-left: 1rem !important;
    }
}
  .mobile-learner-home {
    /* Keep learner mobile sections clear of the bottom nav. */
    padding: 0 0 5.75rem 0;
  }

  /* Homepage carries denser content and needs a little extra room above bottom nav. */
  .mobile-learner-home.learner-dashboard-mobile-home {
    padding-bottom: 8.25rem;
  }

  .mobile-learner-hero {
    /* Match the primary gradient look used on the learner
       homepage hero so all learner flows feel consistent,
       but keep the header compact and flat-edged on mobile */
    background: var(--primary-color);
    background-image: linear-gradient(
      135deg,
      var(--primary-color),
      var(--navbar-bg-color, var(--primary-color))
    );
    padding: 0.55rem 0.75rem 0.7rem;
    margin-top: -0.8rem;
    margin-bottom: 0;
    color: #fff;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    border-radius: 0;
    position: relative;
    box-sizing: border-box;
  }

  .mobile-learner-hero-header .mobile-hello {
    font-size: 0.8rem;
    opacity: 0.85;
  }

  .mobile-program-name {
    font-size: 1.1rem;
    font-weight: 700;
  }

  .mobile-program-subtitle {
    font-size: 0.75rem;
    opacity: 0.9;
  }

  .mobile-learner-metrics {
    margin-top: 0.25rem;
  }

  .mobile-metric-card {
    /* Use the client's primary brand color for metric tiles */
    background: var(--primary-color);
    border-radius: 8px;
    padding: 0.12rem 0.3rem;
    text-align: center;
  }

  .mobile-metric-label {
    font-size: 0.6rem;
    opacity: 0.9;
  }

  .mobile-metric-value {
    font-size: 0.85rem;
    font-weight: 700;
  }

  .mobile-metric-value-small {
    font-size: 0.75rem;
  }

  .mobile-learner-section {
    padding: 0.75rem 1rem 0;
  }

  .mobile-section-title {
    font-size: 0.95rem;
    font-weight: 600;
  }

  .mobile-see-all-link {
    font-size: 0.8rem;
    color: var(--primary-color);
  }

  .mobile-course-card {
    background: #fff;
    background-image: linear-gradient(rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.9)), var(--mobile-course-image, none);
    background-position: center;
    background-size: cover;
    border-radius: 16px;
    padding: 0.6rem 0.8rem;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
  }

  /* Reduce vertical gap so at least two cards
     are fully visible above the bottom nav */
  .mobile-course-list .mobile-course-card.mb-3 {
    margin-bottom: 0.6rem !important;
  }

  .mobile-course-icon {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
    color: #ffffff;
  }

  .mobile-course-image-icon {
    overflow: hidden;
    background: transparent;
  }

  .mobile-course-image-icon img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
  }

  .mobile-course-tag {
    font-size: 0.65rem;
    color: #64748b;
  }

  .mobile-course-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
  }

  .mobile-course-meta {
    font-size: 0.75rem;
    color: #6b7280;
  }

  .mobile-view-btn {
    border-radius: 999px;
    font-size: 0.8rem;
    padding: 0.35rem 0.7rem;
    background-color: var(--navbar-bg-color);
    border-color: var(--navbar-bg-color);
  }

  .mobile-empty-title {
    font-size: 0.95rem;
    font-weight: 600;
  }

  .mobile-empty-subtitle {
    font-size: 0.8rem;
    color: #6b7280;
  }

  /* Generic mobile landing wrapper */
  .mobile-landing-page {
    background-color: var(--bg-color);
    padding: 0 0 5rem 0; /* leave room for bottom nav */
  }

  /* Select product mobile layout: fix container padding so cards are centered */
  .select-product-page .container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Give the select product mobile container extra height
     so all product cards are visible above the bottom nav */
  .select-product-page .mobile-container.container-suits {
    padding-bottom: 8rem;
  }

  /* Select product mobile cards */
  .select-product-page .select-product-mobile-shell {
    margin-top: 1.25rem;
  }

  .select-product-page .mobile-product-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    /* mimic a custom mx-3 just for this list */
    margin-right: -1rem !important;
    margin-left: 1rem !important;
  }

  .select-product-page .mobile-product-card {
    background: var(--primary-color);
    border-radius: 16px;
    padding: 0.7rem 0.9rem;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    color: #ffffff;
  }

  .select-product-page .mobile-product-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: #ffffff;
  }

  .select-product-page .mobile-product-subtitle {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.85);
  }

  .select-product-page .mobile-product-icon img.card-icon {
    width: 32px;
    height: 32px;
  }
}

/* Mobile curriculum_content list styling */
@media (max-width: 767.98px) {
  .curriculum-content-page .chapters-heading {
    font-size: 0.75rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #9ca3af;
  }

  .curriculum-content-page .mobile-curriculum-back .mobile-back-btn {
    background: #eef2ff;
    border: none;
    color: #111827;
    font-size: 0.8rem;
  }

  .curriculum-content-page .mobile-curriculum-list {
    margin-top: 0.5rem;
  }

  .curriculum-content-page .mobile-curriculum-item {
    background: #e2e8f0;
    border-radius: 18px;
    padding: 0.85rem 0.9rem;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.06);
  }

  .curriculum-content-page .mobile-status-badge {
    font-size: 0.7rem;
    border-radius: 999px;
    padding: 0.15rem 0.6rem;
  }

  .curriculum-content-page .mobile-status-complete {
    background: #dcfce7;
    color: #15803d;
  }

  /* Position mobile back button similarly to learner hero back button */
  .curriculum-content-page .mobile-curriculum-back {
    margin-top: 0.25rem;
  }

  body.curriculum-content-layout .curriculum-content-page .mobile-manage-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.3rem;
    min-height: 2rem;
    width: fit-content;
    min-width: 6.15rem;
    max-width: calc(100vw - 1rem);
    padding: 0.22rem 0.62rem;
    font-size: 0.66rem;
    line-height: 1.1;
    border-radius: 999px;
    white-space: nowrap;
  }

  body.curriculum-content-layout .curriculum-content-page .content-actions-menu {
    width: min(11rem, calc(100vw - 1rem));
    min-width: 7.75rem;
    max-width: calc(100vw - 1rem);
    padding: 0.35rem 0.3rem;
    z-index: 1085;
  }

  body.curriculum-content-layout .curriculum-content-page .content-actions-dropdown.dropup .content-actions-menu {
    margin-bottom: 0.25rem;
  }

  body.curriculum-content-layout .curriculum-content-page .content-actions-menu .dropdown-item {
    align-items: center;
    gap: 0.35rem;
    padding: 0.5rem 0.45rem;
    font-size: 0.72rem;
  }

  body.curriculum-content-layout .curriculum-content-page .content-action-icon {
    width: 0.9rem;
    min-width: 0.9rem;
    flex: 0 0 0.9rem;
    font-size: 0.82rem;
  }
}

.curriculum-content-page .content-actions-dropdown {
  position: relative;
}

.curriculum-content-page .content-actions-menu {
  --bs-dropdown-min-width: 6.25rem;
  min-width: 6.25rem;
  width: 6.25rem;
  max-width: 6.25rem;
  box-sizing: border-box;
  padding: 0.55rem 0.35rem;
  border-radius: 16px;
  background-color: #fff;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.14);
}

.curriculum-content-page .content-actions-dropdown.dropup .content-actions-menu {
  margin-bottom: 0.4rem;
  margin-top: 0;
}

.curriculum-content-page .content-actions-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.8rem 0.5rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  color: #334155;
  white-space: nowrap;
}

.curriculum-content-page .content-actions-menu .dropdown-item:hover,
.curriculum-content-page .content-actions-menu .dropdown-item:focus {
  background-color: #f3f6fb;
  color: #1f2937;
}

.curriculum-content-page .content-actions-menu .dropdown-item.is-delete:hover,
.curriculum-content-page .content-actions-menu .dropdown-item.is-delete:focus {
  background-color: #fdecee;
  color: #dc3545;
}

.curriculum-content-page .content-actions-menu .dropdown-item.is-muted {
  opacity: 0.55;
}

.curriculum-content-page .content-action-icon {
  width: 1rem;
  min-width: 1rem;
  text-align: center;
  font-size: 0.9rem;
  flex: 0 0 1rem;
}

.curriculum-content-page .curriculum-content-drag-handle {
  align-items: center;
  border: 1px solid rgba(79, 70, 229, 0.16);
  border-radius: 10px;
  color: var(--primary-color);
  cursor: grab;
  display: inline-flex;
  flex: 0 0 2rem;
  height: 2rem;
  justify-content: center;
  touch-action: none;
  width: 2rem;
}

.curriculum-content-page .curriculum-content-drag-handle:active {
  cursor: grabbing;
}

.curriculum-content-page .curriculum-content-drag-handle:hover,
.curriculum-content-page .curriculum-content-drag-handle:focus {
  background: rgba(79, 70, 229, 0.08);
  border-color: var(--primary-color);
  outline: none;
}

.curriculum-content-page .curriculum-content-row,
.curriculum-content-page .mobile-curriculum-item {
  transition: border-color 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.curriculum-content-page .is-content-dragging {
  opacity: 0.58;
}

.curriculum-content-page .is-content-drop-before {
  box-shadow: inset 0 3px 0 var(--primary-color);
}

.curriculum-content-page .is-content-drop-after {
  box-shadow: inset 0 -3px 0 var(--primary-color);
}

.curriculum-content-page .curriculum-content-sort-placeholder {
  background: rgba(79, 70, 229, 0.08);
  border: 2px dashed var(--primary-color);
  border-radius: 14px;
  min-height: 4.25rem;
  margin-bottom: 0.5rem;
}

/* Academic Years page: custom mobile container padding */
@media (max-width: 767.98px) {
  .academic-years-mobile-shell {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }
}

/* Teacher program subjects (All Subjects list) â€“ custom mobile container padding */
@media (max-width: 767.98px) {
  .teacher-program-subjects-shell {
    padding-left: 0.5rem !important;
    padding-right: 4.5rem !important;
  }
}

/* Teacher program subjects page shell */
.teacher-program-subjects-shell {
  position: relative;
  border: 1px solid var(--primary-color);
  border-radius: 1.75rem;
  width: 95%;
  max-width: 95%;
  margin: 0.35rem auto 0;
  background: #ffffff;
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.08);
  padding: clamp(0.875rem, 1vw, 1.25rem) !important;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.teacher-all-subjects-header-card {
  border-radius: 1.25rem;
  overflow: hidden;
}

/* All Courses / All Subjects page title+subtitle currently render on plain
   markup with no header-card wrapper, so they fell back to unstyled browser
   defaults. Match Academic Years' sizing
   (.academic-page .academic-title/.academic-subtitle,
   main_system_index.css ~line 12378/12384) so the two pages read the same. */
.teacher-all-subjects-title {
  color: #111827;
  font-size: 24px;
  font-weight: 700;
}

.teacher-all-subjects-subtitle {
  color: #6b7280;
  font-size: 13px;
}

.teacher-all-subjects-header-card .card-header {
  padding: 1rem 1.25rem 1.1rem;
}

.teacher-all-subjects-header-card.bg-outline-primary .teacher-all-subjects-academic-year {
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(1.15rem, 1.55vw, 1.45rem);
  font-weight: 700;
  line-height: 1.08;
}

.teacher-all-subjects-header-card.bg-outline-primary .teacher-all-subjects-title {
  color: #ffffff;
  font-size: clamp(1.05rem, 1.35vw, 1.2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.teacher-all-subjects-header-card.bg-outline-primary .teacher-all-subjects-subtitle {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.88rem;
  line-height: 1.45;
}

.teacher-subject-card {
  border: 1px solid var(--primary-color);
  border-radius: 1.15rem;
  overflow: hidden;
  background: #ffffff;
}

.teacher-grade-card {
  border: 1px solid var(--primary-color);
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
}

body.mentor-subject-insights-page .mentor-subject-insights-shell {
  position: relative;
  border: 1px solid var(--primary-color);
  border-radius: 1.75rem;
  width: 95%;
  max-width: 95%;
  margin: 0.35rem auto 0;
  background: #ffffff;
  box-shadow: 0 22px 55px rgba(15, 23, 42, 0.08);
  padding: clamp(0.875rem, 1vw, 1.25rem) !important;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

body.mentor-subject-insights-page.programme-cards-medium-bootstrap .mentor-subject-insights-shell {
  margin-top: -7px !important;
}

body.mentor-subject-insights-page .mentor-subject-insights-header-card {
  border-radius: 1.25rem;
  overflow: hidden;
}

body.mentor-subject-insights-page .mentor-subject-insights-header-card .card-header {
  padding: 1rem 1.25rem 1.1rem;
}

body.mentor-subject-insights-page .mentor-subject-insights-tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  color: rgb(33 29 29 / 92%);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1;
  padding: 0.38rem 0.7rem;
  text-transform: uppercase;
}

body.mentor-subject-insights-page .mentor-subject-insights-title {
  color: #3a3232;
  font-size: clamp(1.25rem, 1.7vw, 1.65rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

body.mentor-subject-insights-page .mentor-subject-insights-subtitle {
  color: #3a3232;
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 62rem;
}

body.mentor-subject-insights-page .mentor-subject-insights-filter-card,
body.mentor-subject-insights-page .mentor-subject-insights-tab-card {
  border: 1px solid var(--primary-color) !important;
  border-radius: 1.35rem;
  overflow: hidden;
  background: #ffffff;
}

body.mentor-subject-insights-page .mentor-subject-insights-filter-card .card-body,
body.mentor-subject-insights-page .mentor-subject-insights-tab-card .card-body {
  padding: 1rem 1.05rem;
}

body.mentor-subject-insights-page .mentor-subject-insights-filter-card .form-control,
body.mentor-subject-insights-page .mentor-subject-insights-filter-card .form-select,
body.mentor-subject-insights-page .mentor-subject-insights-comment-toolbar .form-control,
body.mentor-subject-insights-page .mentor-subject-insights-comment-toolbar .form-select {
  border-radius: 0.9rem;
}

body.mentor-subject-insights-page .mentor-subject-insights-tabs {
  gap: 0.5rem;
  padding: 0.9rem 1.05rem 0;
}

body.mentor-subject-insights-page .mentor-subject-insights-tabs .nav-link {
  border: 1px solid rgba(111, 66, 193, 0.18);
  border-radius: 999px;
  color: var(--primary-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.5;
  min-height: 28px;
  min-width: 7.5rem;
  padding: 4px 16px;
  white-space: nowrap;
}

body.mentor-subject-insights-page .mentor-subject-insights-tabs .nav-link.active {
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-color: transparent;
  color: #ffffff;
  box-shadow: 0 10px 24px rgba(111, 66, 193, 0.24);
}

body.mentor-subject-insights-page .mentor-subject-insights-summary-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

body.mentor-subject-insights-page .mentor-subject-insights-metric-card {
  border: 1px solid rgba(111, 66, 193, 0.14);
  border-radius: 1rem;
  background: linear-gradient(180deg, #ffffff 0%, #faf8ff 100%);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  min-height: 8rem;
  padding: 1rem;
}

body.mentor-subject-insights-page .mentor-subject-insights-metric-label {
  color: #6b7280;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

body.mentor-subject-insights-page .mentor-subject-insights-metric-value {
  color: #111827;
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.1;
}

body.mentor-subject-insights-page .mentor-subject-insights-metric-copy {
  color: #4b5563;
  font-size: 0.84rem;
  line-height: 1.45;
}

body.mentor-subject-insights-page .mentor-subject-insights-activity-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

body.mentor-subject-insights-page .mentor-subject-insights-activity-card {
  border: 1px solid rgba(111, 66, 193, 0.14);
  border-radius: 1rem;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
  height: 100%;
}

body.mentor-subject-insights-page .mentor-subject-insights-activity-card .card-header {
  background: linear-gradient(135deg, rgba(111, 66, 193, 0.12), rgba(73, 76, 158, 0.12));
  border-bottom: 1px solid rgba(111, 66, 193, 0.12);
  color: #1f2937;
  padding: 0.85rem 1rem;
}

body.mentor-subject-insights-page .mentor-subject-insights-activity-list {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}

body.mentor-subject-insights-page .mentor-subject-insights-activity-item {
  border-bottom: 1px solid rgba(107, 114, 128, 0.12);
  padding: 0.75rem 0;
}

body.mentor-subject-insights-page .mentor-subject-insights-activity-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

body.mentor-subject-insights-page .mentor-subject-insights-timeline {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

body.mentor-subject-insights-page .mentor-subject-insights-timeline-item {
  border: 1px solid rgba(111, 66, 193, 0.14);
  border-radius: 1rem;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.05);
  padding: 1rem;
}

body.mentor-subject-insights-page .mentor-subject-insights-avatar {
  align-items: center;
  background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  flex: 0 0 auto;
  height: 2.75rem;
  justify-content: center;
  width: 2.75rem;
}

body.mentor-subject-insights-page .mentor-subject-insights-avatar-text {
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

body.mentor-subject-insights-page .mentor-subject-insights-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}

body.mentor-subject-insights-page .mentor-subject-insights-content {
  color: #1f2937;
  font-size: 0.95rem;
  line-height: 1.6;
  white-space: pre-wrap;
}

body.mentor-subject-insights-page .mentor-subject-insights-empty-state {
  background: rgba(111, 66, 193, 0.06);
  border: 1px dashed rgba(111, 66, 193, 0.24);
  border-radius: 1rem;
  color: #374151;
  padding: 1.25rem;
  text-align: center;
}

body.mentor-subject-insights-page .mentor-subject-insights-status {
  border-radius: 0.9rem;
}

body.mentor-subject-insights-page .mentor-subject-insights-pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
  align-items: center;
}

@media (max-width: 767.98px) {
  body.mentor-subject-insights-page .mentor-subject-insights-shell {
    border-radius: 1.25rem;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
    padding: 0.9rem !important;
  }

  body.mentor-subject-insights-page.programme-cards-medium-bootstrap .mentor-subject-insights-shell {
    margin-top: 0.55rem !important;
  }

  body.mentor-subject-insights-page .mentor-subject-insights-header-card .card-header {
    padding: 0.9rem 0.95rem 1rem;
  }

  body.mentor-subject-insights-page .mentor-subject-insights-filter-card .card-body,
  body.mentor-subject-insights-page .mentor-subject-insights-tab-card .card-body {
    padding: 0.9rem;
  }

  body.mentor-subject-insights-page .mentor-subject-insights-tabs {
    padding: 0.8rem 0.9rem 0;
  }

  body.mentor-subject-insights-page .mentor-subject-insights-metric-card,
  body.mentor-subject-insights-page .mentor-subject-insights-timeline-item {
    border-radius: 0.85rem;
  }
}

@media (max-width: 767.98px) {
  /* width/max-width/margin here are already fully governed by the more
     specific body.teacher-program-subjects-page .teacher-program-subjects-shell
     rule at this same breakpoint further down this file -- that rule's
     margin: auto also wins over any 0 set here, so don't re-add them. */
  .teacher-program-subjects-shell {
    border-radius: 1.25rem;
    padding: 0.75rem !important;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  }

  .teacher-all-subjects-header-card .teacher-all-subjects-academic-year {
    font-size: 1rem;
  }

  .teacher-all-subjects-header-card .teacher-all-subjects-title {
    font-size: 0.98rem;
  }

  .teacher-all-subjects-header-card .teacher-all-subjects-subtitle {
    font-size: 0.8rem;
  }

  .teacher-all-subjects-header-card .card-header {
    padding: 0.85rem 0.9rem 0.95rem;
  }
}

@media (max-width: 767.98px) {
  .mobile-learner-hero .mobile-back-btn {
    background: #eef2ff;
    border: none;
    color: #111827;
    font-size: 0.72rem;
    padding: 0.2rem 0.5rem;
  }

  /* Compact, unified top navbar on mobile (profile-menu) */
  .profile-menu.navbar-content-md {
    background-image: linear-gradient(
      135deg,
      var(--profile-menu-bg-color, var(--primary-color)),
      var(--navbar-bg-color, var(--primary-color))
    );
    padding: 0.35rem 0.75rem;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.25);
  }

  .profile-menu.navbar-content-md .container-fluid {
    padding-left: 0.25rem;
    padding-right: 0.25rem;
  }

  .profile-menu.navbar-content-md .container-fluid .row {
    align-items: center;
  }

  .profile-menu.navbar-content-md .launcher-icon {
    font-size: 1.1rem;
  }

  .profile-menu.navbar-content-md .btn-link {
    color: var(--profile-menu-text-color, #fff) !important;
  }

  .profile-menu.navbar-content-md .navigation__group .icon i,
  .profile-menu.navbar-content-md .navigation__group .icon svg {
    font-size: 1.1rem;
    color: var(--profile-menu-text-color, #fff) !important;
    fill: var(--profile-menu-text-color, #fff) !important;
  }

  /* For learner and curriculum-content mobile layouts, hide the secondary
     breadcrumb navbar so we only have a single compact top bar. */
  body.learner-homepage-layout .navbar.top-34,
  body.curriculum-content-layout .navbar.top-34 {
    display: none !important;
  }

  /* On learner mobile pages, hide the extra mobile waffle button
     from the platform header to avoid duplicate grid icons. */
  body.learner-homepage-layout #mobile_waffle_btn {
    display: none !important;
  }

  /* On curriculum content mobile view, pull the hero
     right up under the profile-menu with no extra gap */
  .curriculum-content-page.card-margin-top {
    margin-top: 0 !important;
  }

  .curriculum-content-page .mobile-learner-hero {
    margin-top: 0 !important;
  }

  .mobile-learner-hero .mobile-back-wrapper {
    position: absolute;
    top: 0.4rem;
    right: 0.6rem;
    margin: 0;
  }

  .mobile-learner-hero-header {
    padding-right: 2.75rem;
    margin-top: 0;
  }

  /* Curriculum view page: keep the hero back button compact and aligned on mobile */
  body.curriculum-content-layout #curriculum-view-app .mobile-learner-hero {
    padding: 0.6rem 0.7rem 0.7rem !important;
  }

  body.curriculum-content-layout #curriculum-view-app .mobile-learner-hero-header {
    padding-right: 2.15rem !important;
  }

  body.curriculum-content-layout #curriculum-view-app .mobile-learner-hero .mobile-back-wrapper {
    top: 0.34rem !important;
    right: 0.45rem !important;
    margin: 0 !important;
  }

  body.curriculum-content-layout #curriculum-view-app .mobile-learner-hero .mobile-back-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 2.15rem !important;
    min-width: 2.15rem !important;
    height: 2.15rem !important;
    min-height: 2.15rem !important;
    padding: 0 !important;
    font-size: 0.72rem !important;
    line-height: 1 !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
  }

}

/* Learner mobile sections v2:
   replace legacy learner mobile overrides with one unified layout
   for home_page, teacher_course_curriculum, learner assessments and teams. */
@media (max-width: 767.98px) {
  body.learner-mobile-bootstrap-ui {
    --learner-mobile-gutter: 0rem;
    --learner-mobile-max-width: 28.5rem;
    --learner-mobile-fixed-top: 52px;
    --learner-mobile-hero-height: 132px;
    margin: 0 !important;
    overflow-x: hidden !important;
  }

  body.learner-mobile-bootstrap-ui .sidebar.sidebar-md {
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    height: auto !important;
    margin: 0 !important;
    z-index: 1040 !important;
  }

  body.learner-mobile-bootstrap-ui .sidebar.sidebar-md .orcaa-sidebar-container {
    width: 100% !important;
    max-width: 100% !important;
    height: auto !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
  }

  body.learner-mobile-bootstrap-ui .sidebar.sidebar-md .orcaa-sidebar {
    width: max-content !important;
    min-width: 100% !important;
    max-width: none !important;
    height: auto !important;
    margin-top: 0 !important;
    padding-top: 0.12rem !important;
    padding-bottom: 0.12rem !important;
  }

  body.learner-mobile-bootstrap-ui .home-section,
  body.learner-mobile-bootstrap-ui .sidebar.active ~ .home-section {
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    overflow-x: hidden !important;
  }

  body.learner-mobile-bootstrap-ui .home-section nav,
  body.learner-mobile-bootstrap-ui .sidebar.active ~ .home-section nav {
    left: 0 !important;
    width: 100% !important;
  }

  body.learner-mobile-bootstrap-ui .mobile-learner-home {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: calc(var(--learner-mobile-fixed-top) + var(--learner-mobile-hero-height) + 0.5rem) 0 5.2rem 0 !important;
  }

  body.learner-mobile-bootstrap-ui .mobile-learner-home.card-margin-top {
    margin-top: 0 !important;
  }

  /* The assessments mobile hero is fixed and this wrapper contains no other
     content. Reserve exactly its occupied viewport space in normal flow so
     the tabs and the "Assessments Assigned" heading cannot slide behind it. */
  body.learner-mobile-bootstrap-ui .mobile-learner-home.learner-assessments-mobile-home {
    height: calc(var(--learner-mobile-fixed-top) + var(--learner-mobile-hero-height) + 0.5rem);
    padding: 0 !important;
  }

  body.learner-mobile-bootstrap-ui .learner-assessments-page.card-margin-top {
    /* The preceding mobile hero wrapper already reserves the fixed hero's
       space. Adding another hero-sized margin pushes the tabs and table below
       the fold on first load. */
    margin-top: 0 !important;
  }

  /* homepage.html no longer renders a .mobile-learner-hero above this list
     (removed from the template) -- the generic .mobile-learner-home rule
     above still reserves --learner-mobile-hero-height (132px default) of
     padding-top for it, leaving a large empty gap. Override that here with
     just a small top gap instead. */
  body.learner-mobile-bootstrap-ui .mobile-learner-home.learner-dashboard-mobile-home {
    min-height: calc(100vh - var(--learner-mobile-fixed-top) - 0.2rem);
    padding-top: 0.75rem !important;
    padding-bottom: 5.2rem !important;
  }

  /* curriculum_content.html renders no .mobile-learner-hero either -- same
     fix as .learner-dashboard-mobile-home above so the tabs sit close to
     the navbar instead of leaving the reserved hero-height gap. */
  body.learner-mobile-bootstrap-ui .mobile-learner-home.curriculum-content-mobile-home {
    padding-top: 0.75rem !important;
    position: relative;
  }

  /* Same learner-role back button, reused on teacher_subject_curriculum.html
     (its container never gets the .mobile-learner-home/.curriculum-content-mobile-home
     classes for the learner role, so it needs its own anchor for position:relative). */
  body.learner-mobile-bootstrap-ui .curriculum-list-page.teacher-subject-curriculum-page {
    position: relative;
  }

  /* Back button floats top-left, absolutely positioned so it never adds to
     the flow height -- the tabs below stay exactly where the small
     padding-top above puts them. */
  body.learner-mobile-bootstrap-ui .mobile-learner-home.curriculum-content-mobile-home .mobile-curriculum-content-back,
  body.learner-mobile-bootstrap-ui .curriculum-list-page.teacher-subject-curriculum-page .mobile-curriculum-content-back {
    position: absolute;
    top: 0.55rem;
    left: 0.9rem;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    width: auto;
    height: 2rem;
    min-width: 4.25rem;
    min-height: 2rem;
    padding: 0 0.65rem !important;
    font-size: 0.8rem;
    line-height: 1;
    white-space: nowrap;
    background: var(--btn-outline-primary-bg, var(--secondary-color, #494c9e));
    border: none;
    color: #fff;
  }

  body.learner-mobile-bootstrap-ui .mobile-learner-hero {
    position: fixed !important;
    top: var(--learner-mobile-fixed-top) !important;
    left: 0 !important;
    right: 0 !important;
    z-index: 98 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    margin-top: 0 !important;
    border-radius: 0 !important;
    padding: 0.4rem 0.85rem 0.4rem !important;
    overflow: hidden !important;
  }

  body.learner-mobile-bootstrap-ui .mobile-learner-hero-header {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding-right: 2rem !important;
  }

  body.learner-mobile-bootstrap-ui .mobile-learner-hero .mobile-back-wrapper {
    top: 0.34rem !important;
    right: 0.5rem !important;
  }

  body.learner-mobile-bootstrap-ui #curriculum-content-app .mobile-learner-hero .mobile-back-wrapper {
    right: 0.85rem !important;
    z-index: 2;
  }

  body.learner-mobile-bootstrap-ui #curriculum-content-app .mobile-learner-hero .mobile-back-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 4.25rem;
    height: 2rem;
    min-height: 2rem;
    padding: 0 0.65rem !important;
    line-height: 1;
    white-space: nowrap;
  }

  body.learner-mobile-bootstrap-ui .teacher-subject-curriculum-page.monitoring-margin-top .mobile-learner-hero .mobile-back-wrapper {
    right: 0.85rem !important;
    z-index: 2;
  }

  body.learner-mobile-bootstrap-ui .teacher-subject-curriculum-page.monitoring-margin-top .mobile-learner-hero .mobile-back-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 4.25rem;
    height: 2rem;
    min-height: 2rem;
    padding: 0 0.65rem !important;
    line-height: 1;
    white-space: nowrap;
  }

  body.learner-mobile-bootstrap-ui .mobile-learner-hero .mobile-hello {
    font-size: 0.76rem !important;
    line-height: 1.2 !important;
    margin-bottom: 0.1rem !important;
  }

  body.learner-mobile-bootstrap-ui .mobile-learner-hero .mobile-program-name {
    font-size: 0.92rem !important;
    line-height: 1.15 !important;
    margin-bottom: 0.15rem !important;
  }

  body.learner-mobile-bootstrap-ui .mobile-learner-hero .mobile-program-subtitle {
    font-size: 0.68rem !important;
    line-height: 1.25 !important;
  }

  body.learner-mobile-bootstrap-ui .mobile-learner-margins,
  body.learner-mobile-bootstrap-ui .mobile-learner-section,
  body.learner-mobile-bootstrap-ui .learner-assessments-page,
  body.learner-mobile-bootstrap-ui .learner-teams-page,
  body.learner-mobile-bootstrap-ui #curriculum-content-app .teacher-subject-curriculum-page.card-margin-top,
  body.learner-mobile-bootstrap-ui #curriculum-view-app .teacher-subject-curriculum-page.card-margin-top,
  body.learner-mobile-bootstrap-ui .teacher-subject-curriculum-page.card-margin-top.monitoring-margin-top {
    width: calc(100% - (var(--learner-mobile-gutter) * 2)) !important;
    max-width: var(--learner-mobile-max-width) !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body.learner-mobile-bootstrap-ui .mobile-course-list {
    min-height: max(12rem, calc(100vh - var(--learner-mobile-fixed-top) - var(--learner-mobile-hero-height) - 7.3rem));
  }

  body.learner-mobile-bootstrap-ui .learner-assessments-page,
  body.learner-mobile-bootstrap-ui .learner-teams-page,
  body.learner-mobile-bootstrap-ui #curriculum-content-app .teacher-subject-curriculum-page.card-margin-top,
  body.learner-mobile-bootstrap-ui #curriculum-view-app .teacher-subject-curriculum-page.card-margin-top,
  body.learner-mobile-bootstrap-ui .teacher-subject-curriculum-page.card-margin-top.monitoring-margin-top {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.learner-mobile-bootstrap-ui .teacher-subject-curriculum-page.card-margin-top.monitoring-margin-top {
    margin-top: 0.85rem !important;
  }

  /* learner_team.html no longer renders a .mobile-learner-hero on mobile
     (removed from the template), so the page needs no reserved space above
     it any more -- just a small top gap (the shared .academic-page
     padding-top is only zeroed for this page on desktop, ~line 33707). */
  body.learner-mobile-bootstrap-ui .learner-teams-page.academic-page {
    padding-top: 1rem !important;
  }

  body.learner-mobile-bootstrap-ui .teacher-subject-curriculum-page > .row {
    --bs-gutter-x: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body.learner-mobile-bootstrap-ui .teacher-subject-curriculum-page > .row > [class*="col-"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.learner-mobile-bootstrap-ui .teacher-subject-curriculum-page .mobile-course-weeks,
  body.learner-mobile-bootstrap-ui .teacher-subject-curriculum-page .mobile-course-curriculum,
  body.learner-mobile-bootstrap-ui .teacher-subject-curriculum-page .teacher-monitor-tabs {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body.learner-mobile-bootstrap-ui .teacher-subject-curriculum-page .mobile-course-curriculum {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    max-height: max(18rem, calc(100vh - var(--learner-mobile-fixed-top, 52px) - var(--learner-mobile-hero-height, 132px) - 4.8rem));
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
  }

  body.learner-mobile-bootstrap-ui .teacher-subject-curriculum-page .mian-course-section {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-height: calc(100vh - var(--learner-mobile-fixed-top, 52px) - var(--learner-mobile-hero-height, 132px) - 4.9rem);
  }

  body.learner-mobile-bootstrap-ui .teacher-subject-curriculum-page .mian-course-section > .mobile-course-curriculum {
    flex: 1 1 auto;
  }

  body.learner-mobile-bootstrap-ui .teacher-subject-curriculum-page .mobile-module-card-shell {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body.learner-mobile-bootstrap-ui .teacher-subject-curriculum-page .mobile-module-card,
  body.learner-mobile-bootstrap-ui .teacher-subject-curriculum-page .curriculum-card,
  body.learner-mobile-bootstrap-ui .mobile-course-card,
  body.learner-mobile-bootstrap-ui .learner-mobile-content-card {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body.learner-mobile-bootstrap-ui .mobile-course-card,
  body.learner-mobile-bootstrap-ui .learner-mobile-content-card .card-body {
    border-radius: 16px !important;
  }

  body.learner-mobile-bootstrap-ui #curriculum-content-app .curriculum-content-page .learner-progress-terms {
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    flex-wrap: nowrap !important;
    gap: 0.45rem !important;
    padding-bottom: 0.2rem !important;
  }

  body.learner-mobile-bootstrap-ui #curriculum-content-app .curriculum-content-page .learner-progress-terms .nav-item {
    flex: 0 0 auto !important;
  }

  body.learner-mobile-bootstrap-ui #curriculum-content-app .curriculum-content-page .card.border-0.shadow-sm,
  body.learner-mobile-bootstrap-ui #curriculum-content-app .curriculum-content-page .mobile-curriculum-list {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body.learner-mobile-bootstrap-ui #curriculum-content-app .curriculum-content-page .mobile-curriculum-item {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body.learner-mobile-bootstrap-ui #curriculum-content-app .curriculum-content-page .mobile-manage-btn {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: fit-content !important;
    min-width: 6.15rem !important;
    max-width: calc(100vw - 1rem) !important;
    padding: 0.22rem 0.62rem !important;
    font-size: 0.66rem !important;
    line-height: 1.1 !important;
  }

  body.learner-mobile-bootstrap-ui #curriculum-view-app .curriculum-view-card,
  body.learner-mobile-bootstrap-ui #curriculum-view-app .cv-upnext-sidebar-card {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body.learner-mobile-bootstrap-ui #curriculum-view-app .learning-card.curriculum-view-card {
    margin-top: 0.75rem !important;
    margin-bottom: 0.7rem !important;
    border-radius: 16px !important;
  }

  body.learner-mobile-bootstrap-ui #curriculum-view-app .learning-card.curriculum-view-card .card-body {
    padding: 0.72rem 0.82rem !important;
  }

  body.learner-mobile-bootstrap-ui #curriculum-view-app .cv-content-viewer {
    min-height: 18rem !important;
    max-height: calc(100vh - var(--learner-mobile-fixed-top, 52px) - var(--learner-mobile-hero-height, 132px) - 13.2rem) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
  }

  body.learner-mobile-bootstrap-ui #curriculum-view-app .cv-learning-actions-row {
    flex-wrap: nowrap !important;
    gap: 0.5rem !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  body.learner-mobile-bootstrap-ui #curriculum-view-app .cv-learning-actions-row > .d-flex {
    width: auto !important;
    flex: 0 0 auto !important;
    align-items: center !important;
  }

  body.learner-mobile-bootstrap-ui #curriculum-view-app .cv-learning-actions-row > .d-flex:first-child {
    margin-right: auto !important;
    justify-content: flex-start !important;
  }

  body.learner-mobile-bootstrap-ui #curriculum-view-app .cv-learning-actions-row > .d-flex:last-child {
    margin-left: auto !important;
    justify-content: flex-end !important;
    flex-wrap: nowrap !important;
  }

  body.learner-mobile-bootstrap-ui #curriculum-view-app .cv-learning-actions-row .btn {
    min-height: 2rem;
    font-size: 0.72rem !important;
    line-height: 1.2 !important;
  }

  body.learner-mobile-bootstrap-ui #curriculum-view-app .cv-learning-actions-row .btn.prev {
    width: 2.35rem !important;
    min-width: 2.35rem !important;
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  body.learner-mobile-bootstrap-ui #curriculum-view-app .cv-learning-actions-row > .d-flex:last-child .btn {
    max-width: 12.8rem;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  body.learner-mobile-bootstrap-ui .learner-assessments-page .learner-assessments-tabs {
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    flex-wrap: nowrap !important;
    gap: 0.4rem !important;
    padding-bottom: 0.2rem !important;
  }

  body.learner-mobile-bootstrap-ui .learner-assessments-page .learner-assessments-tabs .nav-item {
    flex: 0 0 auto !important;
  }

  body.learner-mobile-bootstrap-ui .learner-assessments-page .learner-assessments-tabs .nav-link {
    white-space: nowrap !important;
    font-size: 0.82rem !important;
    padding: 0.34rem 0.62rem !important;
  }

  body.learner-mobile-bootstrap-ui .learner-assessments-page:not(.learner-evaluations-page) .tab-content {
    padding-right: 0 !important;
    margin-right: 0 !important;
  }

  body.learner-mobile-bootstrap-ui .learner-assessments-page .table-responsive,
  body.learner-mobile-bootstrap-ui .learner-assessments-page .dataTables_wrapper,
  body.learner-mobile-bootstrap-ui .learner-assessments-page .dataTables_wrapper .dataTables_scroll,
  body.learner-mobile-bootstrap-ui .learner-assessments-page .dataTables_wrapper .dataTables_scrollBody {
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  body.learner-mobile-bootstrap-ui .learner-assessments-page table.data-table {
    min-width: 760px !important;
  }

  body.learner-mobile-bootstrap-ui .learner-assessments-page table.data-table th:last-child,
  body.learner-mobile-bootstrap-ui .learner-assessments-page table.data-table td:last-child {
    min-width: 10.75rem !important;
    width: 10.75rem !important;
    vertical-align: top !important;
  }

  body.learner-mobile-bootstrap-ui .learner-assessments-page table.data-table td:last-child .d-flex.flex-wrap.gap-2 {
    width: 100% !important;
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 0.32rem !important;
  }

  body.learner-mobile-bootstrap-ui .learner-assessments-page table.data-table td:last-child .btn,
  body.learner-mobile-bootstrap-ui .learner-assessments-page table.data-table td:last-child > .btn {
    width: 100% !important;
    min-width: 0 !important;
    justify-content: center !important;
    white-space: nowrap !important;
  }

  body.learner-mobile-bootstrap-ui .learner-assessments-page .learner-assessments-table-shell,
  body.learner-mobile-layout .learner-assessments-page .learner-assessments-table-shell {
    position: relative;
  }

  body.learner-mobile-bootstrap-ui .learner-assessments-page .learner-assessments-table-responsive,
  body.learner-mobile-layout .learner-assessments-page .learner-assessments-table-responsive {
    position: relative;
    z-index: 1;
    overflow-x: scroll !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  body.learner-mobile-bootstrap-ui .learner-assessments-page #program_table th,
  body.learner-mobile-bootstrap-ui .learner-assessments-page #program_table td,
  body.learner-mobile-layout .learner-assessments-page #program_table th,
  body.learner-mobile-layout .learner-assessments-page #program_table td {
    font-size: 0.66rem !important;
    line-height: 1.2 !important;
  }

  body.learner-mobile-bootstrap-ui .learner-assessments-page .learner-assessments-bottom-scroll,
  body.learner-mobile-layout .learner-assessments-page .learner-assessments-bottom-scroll {
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable both-edges;
    margin-top: 0.35rem;
    padding-bottom: 0.15rem;
    border-top: 1px solid rgba(99, 102, 241, 0.18);
  }

  body.learner-mobile-bootstrap-ui .learner-assessments-page .learner-assessments-bottom-scroll-inner,
  body.learner-mobile-layout .learner-assessments-page .learner-assessments-bottom-scroll-inner {
    height: 1px;
  }

  body.learner-mobile-bootstrap-ui .learner-assessments-page .learner-assessments-bottom-scroll::-webkit-scrollbar,
  body.learner-mobile-layout .learner-assessments-page .learner-assessments-bottom-scroll::-webkit-scrollbar {
    height: 0.58rem;
  }

  body.learner-mobile-bootstrap-ui .learner-assessments-page .learner-assessments-bottom-scroll::-webkit-scrollbar-track,
  body.learner-mobile-layout .learner-assessments-page .learner-assessments-bottom-scroll::-webkit-scrollbar-track {
    background: #e9ecff;
    border-radius: 999px;
  }

  body.learner-mobile-bootstrap-ui .learner-assessments-page .learner-assessments-bottom-scroll::-webkit-scrollbar-thumb,
  body.learner-mobile-layout .learner-assessments-page .learner-assessments-bottom-scroll::-webkit-scrollbar-thumb {
    background: #5d56d4;
    border-radius: 999px;
    border: 1px solid #e9ecff;
  }

  body.learner-mobile-bootstrap-ui .learner-assessments-page .learner-assessments-table-responsive::-webkit-scrollbar,
  body.learner-mobile-layout .learner-assessments-page .learner-assessments-table-responsive::-webkit-scrollbar {
    height: 0;
  }
}

/* -------------------- Teacher Subject Curriculum Mobile Tweaks -------------------- */
@media (max-width: 767.98px) {
  /* Make all buttons on the teacher subject curriculum page extra small on mobile,
     including "View Content" and "View Assessments" actions. */
  .teacher-subject-curriculum-page .btn,
  .teacher-subject-curriculum-page .btn-sm {
    font-size: 0.7rem !important;
    padding: 0.2rem 0.35rem !important;
  }
}
@media (max-width: 767.98px) {
  /* Keep action labels readable on mobile (e.g. "Complete & Finish"). */
  .teacher-subject-curriculum-page .cv-learning-actions-row .btn {
    width: auto !important;
    min-width: max-content;
    white-space: nowrap;
  }

  /* Only the icon-only previous button stays compact. */
  .teacher-subject-curriculum-page .cv-learning-actions-row .btn.prev {
    width: 2.35rem !important;
    min-width: 2.35rem;
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
}


/* -------------------- Learner Assessments Mobile Tweaks -------------------- */
@media (min-width: 320px) and (max-width: 767.98px) {
  /* Only affect the learner assessments page on small screens */
  .learner-assessments-page {
    width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
  .learner-assessments-page:not(.learner-evaluations-page) .tab-content {
    padding-right: 0.75rem !important;
    margin-right: 0 !important;
    margin-top: 0.6rem !important;
  }
  .learner-assessments-page .table-responsive {
    overflow-x: auto !important;
    padding-right: 0.5rem;
    -webkit-overflow-scrolling: touch;
  }
  /* Let the table be wider than the viewport so
     columns stay readable and can scroll sideways */
  .learner-assessments-page table.data-table {
    min-width: 720px;
  }

  /* Practicals roster / code-challenge tables opt into the stacked-card
     row layout defined further down this file for
     ".learner-assessments-page table.data-table" (thead:none, td as a
     label/value grid via data-label). That layout also resets *tbody*
     back to 100% width, but only clears this table's own 720px min-width
     under body.learner-mobile-bootstrap-ui/-layout -- neither class is set
     on the practicals pages, so without this the table stays pinned to
     720px and the right-aligned values render off-screen past the visible
     viewport instead of stacking under their labels. */
  .practicals-roster-table,
  .code-challenges-table {
    min-width: 0 !important;
  }

  .learner-assessments-page table.code-challenges-table.data-table thead.table-header-card tr th:first-child {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
  }

  .learner-assessments-page table.code-challenges-table.data-table thead.table-header-card tr th:last-child {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
  }

  /* The action-column button ("View" / "Manage") is a grid item with no
     explicit width, so it shrinks to a narrower "fits the icon" box and
     white-space: normal (from the shared row-card td rule above) wraps
     the label onto two lines instead of growing to fit it on one. */
  .practicals-roster-table tbody td[data-label="Actions"] .btn,
  .code-challenges-table tbody td[data-label="Actions"] .btn {
    white-space: nowrap;
  }

  /* Ensure DataTables scroll container can also scroll horizontally */
  .learner-assessments-page .dataTables_wrapper,
  .learner-assessments-page .dataTables_wrapper .dataTables_scroll,
  .learner-assessments-page .dataTables_wrapper .dataTables_scrollBody {
    overflow-x: auto !important;
  }
}

/* -------------------- Learner Assessments Desktop Hero Tweaks -------------------- */
@media (min-width: 768px) {
  .learner-assessments-page .learner-assessments-desktop-hero {
    margin-bottom: 0.65rem !important;
  }

  .learner-assessments-page .learner-assessments-desktop-hero .teacher-curriculum-hero {
    margin-bottom: 0 !important;
    width: 100%;
  }

  .learner-assessments-page .learner-assessments-tabs {
    margin-top: 0.35rem !important;
  }

  .learner-assessments-page .learner-assessments-desktop-hero .teacher-curriculum-hero-main {
    width: 100%;
    max-width: 100%;
    flex: 1 1 100%;
  }
}

/* Learner Assessments: align "entries" and "search" in a row and shrink text */
.learner-assessments-page .dataTables_wrapper .row:first-child {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
}

.learner-assessments-page .dataTables_wrapper .row:first-child > div {
  flex: 0 0 50%;
  max-width: 50%;
}

.learner-assessments-page .dataTables_wrapper .dataTables_length,
.learner-assessments-page .dataTables_wrapper .dataTables_filter {
  float: none !important;
  margin: 0 !important;
  font-size: 0.8rem;
}

.learner-assessments-page .dataTables_wrapper .dataTables_length label,
.learner-assessments-page .dataTables_wrapper .dataTables_filter label {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: inherit;
  margin-bottom: 0;
}

.learner-assessments-page .dataTables_wrapper .dataTables_filter input[type="search"] {
  font-size: inherit;
  max-width: 170px;
}

/* Learner Assessments: this table is initialised by the local DataTables 2.x
   build (system_management/static/datatables/datatables.js), which renders
   the length/search controls as .dt-length/.dt-search inside .dt-layout-cell
   .dt-layout-start/.dt-layout-end - not the legacy .dataTables_length /
   .dataTables_filter + Bootstrap .row/.col markup targeted above. Align
   those on their own row here so "entries per page" and "Search" sit side
   by side instead of stacking, including on mobile.
   Matched with :has() instead of ">" + ":first-child" - some tables on
   this page render an extra wrapper between .dt-container and the row,
   which silently broke the stricter direct-child selector while the
   .dt-length/.dt-search rules below (unscoped by depth) kept working. */
.learner-assessments-page .dt-container .dt-layout-row:has(> .dt-layout-cell .dt-length),
.learner-assessments-page .dt-container .dt-layout-row:has(> .dt-layout-cell .dt-search) {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 0.6rem;
}

/* Length control (dt-layout-start) keeps its natural width; search
   (dt-layout-end) grows to fill the rest of the row - matches the
   learner_assessments_mockup_v3 reference layout. */
.learner-assessments-page .dt-container .dt-layout-cell:has(> .dt-length) {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  max-width: none;
}

.learner-assessments-page .dt-container .dt-layout-cell:has(> .dt-search) {
  display: flex;
  align-items: center;
  flex: 1 1 auto;
  max-width: none;
  min-width: 0;
}

/* NOTE: DataTables 2.x puts the <select>/<input> as SIBLINGS of the
   <label> (not nested inside it) when the language string starts or
   ends with _MENU_/_INPUT_ (our default "_MENU_ per page" and
   "Search:_INPUT_" both qualify). So the label itself must stay an
   inline element - .dt-length/.dt-search (the parent div) are what
   need to become the flex row, or the label ends up shoved onto its
   own line above/below its sibling control. */
.learner-assessments-page .dt-length,
.learner-assessments-page .dt-search {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 !important;
  font-size: 0.75rem;
}

/* Capped on every screen size (not just mobile) - this is the search bar
   used on the "My Assessments" page's tables (program_table etc.), which
   don't use the evaluations page's custom toolbar layout, so they fall
   back to this generic rule. Previously unbounded, so it grew to fill all
   remaining row width on any screen. */
.learner-assessments-page .dt-search {
  max-width: 180px;
}

.learner-assessments-page .dt-length label {
  font-size: inherit;
  margin-bottom: 0;
  white-space: nowrap;
  color: #6c757d;
}

.learner-assessments-page .dt-length select {
  /* auto width (sized to the selected option's own text) instead of a
     fixed px value - a fixed width risked clipping the number once a
     wider option (25, 50) was selected. min-width is just a floor so it
     never looks too cramped for single-digit-style values. */
  width: auto;
  min-width: 52px;
  height: 34px;
  min-height: 34px;
  flex: 0 0 auto;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  padding: 0 1.1rem 0 0.4rem;
  font-size: inherit;
  background-color: #fff;
}

/* The "Search:" label carries no visual value once the input has its own
   placeholder (matches the reference mockup, which shows no label at all) -
   hide it visually but keep it in the accessibility tree for screen readers. */
.learner-assessments-page .dt-search label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.learner-assessments-page .dt-search input[type="search"] {
  font-size: inherit;
  flex: 1 1 auto;
  min-width: 90px;
  max-width: 100%;
  height: 34px;
  min-height: 34px;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  padding: 0 0.75rem;
  background-color: #fff;
}

/* "Course Assessments Assigned" table (#subject_assessment_table) is initialised
   with DataTables scrollX so its extra Course/Curriculum columns scroll
   horizontally in the table's own body instead of squashing every column.
   Keep cells on one line so the scroll is meaningful, and keep the DataTables
   scroll wrapper within the card so only the table body scrolls -- never the
   page. This local DataTables build's CSS omits the overflow:hidden it
   normally puts on the header/footer scroll strips, so the (wider) header
   table leaks out and widens the page -- pin it here. (The partial swaps its
   Bootstrap .table-responsive wrapper for .overflow-visible on this table,
   since DataTables owns the scroll.) */
.learner-assessments-page #subject_assessment_table th,
.learner-assessments-page #subject_assessment_table td {
  white-space: nowrap;
}
.learner-assessments-page #subject_assessment_table_wrapper,
.learner-assessments-page #subject_assessment_table_wrapper .dt-scroll {
  max-width: 100%;
  overflow: hidden;
}
.learner-assessments-page #subject_assessment_table_wrapper .dt-scroll-head,
.learner-assessments-page #subject_assessment_table_wrapper .dt-scroll-foot {
  max-width: 100%;
  overflow: hidden;
}
.learner-assessments-page #subject_assessment_table_wrapper .dt-scroll-body {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
}

/* Both learner assessment tables ("Assessments Assigned" #program_table and
   "Course Assessments Assigned" #subject_assessment_table): the #, Attempt and
   Score columns only ever hold a digit (or a short "In Progress"/"Not Marked"),
   so size them to their heading instead of an equal share of the row. The
   value is centred under the heading with Bootstrap's .text-md-center utility
   on the cells (desktop only -- the <768px card layout keeps its own
   alignment). Only width:1% and the nowrap live here because Bootstrap has no
   utility for them. */
@media (min-width: 768px) {
  .learner-assessments-page .lva-col-compact {
    width: 1%;
    white-space: nowrap;
  }
  .learner-assessments-page td.lva-col-compact {
    padding-left: 0.4rem;
    padding-right: 0.4rem;
  }
  /* DataTables reserves 30px on the right of a sortable header for its sort
     caret, which on these one-digit columns nearly doubles the width. Tuck the
     caret in and trim the reservation -- sorting still works, the column just
     fits "Attempt" / "Score". */
  .learner-assessments-page table.dataTable thead > tr > th.lva-col-compact {
    padding-left: 0.4rem;
    padding-right: 0.95rem;
  }
  .learner-assessments-page table.dataTable thead > tr > th.lva-col-compact span.dt-column-order {
    right: 2px;
  }
}

@media (max-width: 767.98px) {
  .learner-assessments-page .dt-container .dt-layout-row:has(> .dt-layout-cell .dt-length) {
    font-size: 0.66rem;
  }
}

.learner-assessments-page .learner-evals-toolbar-row {
  margin-bottom: 0.35rem !important;
  /* Bootstrap's .row defaults to flex-wrap: wrap, and nothing in the
     rowClass utility list (justify-content-between align-items-center)
     overrides that - so the pageLength cell and the search cell could
     silently drop onto separate lines under some widths even though both
     cells and their controls were individually sized/aligned correctly. */
  flex-wrap: nowrap !important;
  /* Bootstrap's .row also carries negative left/right margins (to offset
     the padding it expects on "col" children), which made this row's own
     edges creep outward past the table's edges below it. Cancel that so
     the row lines up exactly with the table's left/right corners. */
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.learner-assessments-page .learner-evals-toolbar {
  min-width: 0;
  /* Cancel the Bootstrap "col" class's gutter padding on BOTH sides (added
     via the layout config's topEnd className) for corner alignment -
     padding-right alone still left padding-left in place, which pushed
     the search box's start (and therefore its whole span) further right
     than the pageLength cell actually ends at. */
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.learner-assessments-page .learner-evals-toolbar .dt-search {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  /* Matches the Learner Assessments table's search box size
     (.dataTables_filter input[type="search"] max-width: 170px below)
     instead of stretching flush to the table's right edge. */
  flex: 0 1 auto;
  width: auto;
  max-width: 190px;
  min-width: 110px;
}

.learner-assessments-page .learner-evals-toolbar .dt-search label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.learner-assessments-page .learner-evals-toolbar .dt-search input[type="search"] {
  width: 100%;
  max-width: 170px;
  min-width: 0;
  flex: 0 1 auto;
}

.learner-assessments-page .learner-evals-info-row {
  margin-top: 0.25rem !important;
}

/* Pagination now lives in its own row after the table (bottom1Start in the
   layout config), separate from the "Showing X of Y entries" info row -
   that row is hidden on mobile below, but pagination needs to stay usable
   there, so it can't share that row. */
.learner-assessments-page .learner-evals-paging-row {
  margin-top: 0.5rem !important;
}

.learner-assessments-page .learner-evals-paging-row .pagination {
  margin-bottom: 0;
  flex-wrap: nowrap;
  justify-content: center;
}

@media (max-width: 767.98px) {
  body.learner-mobile-bootstrap-ui .learner-assessments-page:has(#learner_evaluations_table).card-margin-top,
  body.learner-mobile-layout .learner-assessments-page:has(#learner_evaluations_table).card-margin-top {
    margin-top: 0.25rem !important;
  }

  body.learner-mobile-bootstrap-ui .learner-assessments-page:has(#learner_evaluations_table) .tab-content,
  body.learner-mobile-layout .learner-assessments-page:has(#learner_evaluations_table) .tab-content {
    margin-top: 0.35rem !important;
  }

  /* This table sets scrollX:true, so DataTables already wraps just the
     <table> itself in its own .dt-scroll/.dt-scroll-body for horizontal
     scrolling. The outer .table-responsive wrapper's overflow-x:scroll +
     overflow-y:hidden (further up in this file) was written for OTHER
     tables that don't use scrollX and instead rely on that outer scroll +
     the synced .learner-assessments-bottom-scroll bar. Because DataTables
     inserts its whole toolbar+table+paging block inside that same outer
     wrapper, the per-page/search row was getting dragged into that
     scroll/clip box too, so it could end up scrolled out of view or
     vertically clipped. Not needed here - let it size and show normally. */
  body.learner-mobile-bootstrap-ui .learner-assessments-page:has(#learner_evaluations_table) .learner-assessments-table-responsive,
  body.learner-mobile-layout .learner-assessments-page:has(#learner_evaluations_table) .learner-assessments-table-responsive {
    overflow-x: visible !important;
    overflow-y: visible !important;
  }

  .learner-assessments-page .learner-evals-toolbar-row {
    margin-bottom: 0.25rem !important;
  }

  .learner-assessments-page .learner-evals-toolbar .dt-search input[type="search"] {
    font-size: 0.66rem;
  }

  .learner-assessments-page .learner-evals-info-row {
    display: none !important;
  }

  .learner-assessments-page .learner-evals-paging-row .pagination .page-link {
    padding: 0.18rem 0.34rem;
    font-size: 0.64rem;
  }
}

/* ------------ Global mobile body + learner hero tweaks on mobile ------------ */
@media (max-width: 767.98px) {
  body {
    background-color: var(--bg-color);
    margin: -5px;
    overflow-x: hidden;
  }

  /* Fine-tune the learner mobile hero width independently of the profile-menu */
  .mobile-learner-hero {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .mian-course-section {
    margin-top: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100% !important;
    box-sizing: border-box;
    padding-top: 0.65rem !important;
    padding-bottom: 0.65rem !important;
  }

  /* Override width for the profile-menu header that uses w-100
     on general mobile layouts */
  .profile-menu.navbar-content-md.w-100 {
    width: 100vw !important;
    max-width: 100vw !important;
    left: 0 !important;
    right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
    overflow-x: clip;
  }

  /* Parent view: ensure the mobile profile-menu spans the full
     visible header area on teacher_subject_curriculum and add
     a small gap below it so the content is not cramped. */
  body.parent-curriculum-layout .profile-menu.navbar-content-md.w-100 {
    width: 100vw !important;
    max-width: 100vw !important;
    left: 0 !important;
    right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-bottom: 0.5rem;
  }
}

/* Written assessment page (mobile only): let a short assessment still fill
   most of the viewport instead of collapsing to its content height. Desktop
   used to vertically-center a single self-contained card here; the redesigned
   page (2026-09) is a normal flowing page instead, so that centering rule --
   which fought the page scrolling naturally with more than a couple of
   questions -- was removed rather than reworked. */

@media (max-width: 767.98px) {
  .written-assessment-page {
    min-height: calc(100vh - 120px);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding-bottom: 2.5rem;
  }

  /* Scoped to the single outer content card, not every nested .card --
     a blanket ".written-assessment-page .card" also matched the small
     Score/Requires marking/Other attempts stat cards and the per-question
     cards further down, blowing each of them up to 60vh tall on mobile. */
  .written-assessment-page .written-assessment-main-card {
    min-height: 60vh;
  }
}

/* Written assessment review page (templates/assessment_management/written_assessment.html).
   Was an inline <style> block on that page; moved here so the project keeps one
   stylesheet. Rules that touch shared shell classes (.sidebar, .home-section) are
   scoped to body.written-assessment-view-page so they only apply on that page.

   Design alignment (2026-09): the review page used to hide the standard
   sidebar and go full-bleed, which made it read as a different screen from
   learner_view_assessment/trainee_answers. It now keeps the same sidebar and
   the same default `.home-section` gutter as every other page in the flow --
   nothing left here to override. */

.written-assessment-page {
  margin-top: 0 !important;
  padding-top: 0 !important;
  position: relative;
  top: 0;
}

.written-assessment-page .written-assessment-top-row {
  margin-top: 0 !important;
}

.written-assessment-page .written-assessment-main-card {
  /* No negative margin: the compact fixed navbar (~77px) only leaves the
     content area at top:72px, and this page zeroes every other top offset,
     so any upward pull buries the card header + Back button under the bar. */
  margin-top: 0 !important;
}

.written-assessment-page .assessment-container {
  overflow-x: hidden;
}

/* "All attempts used" soft alert. Bootstrap 5.0.2 (this project's pinned
   version) has no subtle/soft alert-color utility -- bg-danger-subtle and
   the text-*-emphasis tokens only exist from Bootstrap 5.3 -- and this
   file's own .alert-danger rule (further up) forces a solid red gradient
   with !important, so plain Bootstrap classes can't produce a light
   background here. Bootstrap's own .alert-danger text/border colors
   (#842029 / #f5c2c7) are already the right dark red, so only the
   background needs escaping; scoped to this one alert's own class so every
   other .alert-danger on the site is untouched. The left accent extends
   this file's own existing .alert-warning/.alert-info left-border
   convention (further up) to danger, which never got one of its own. */
.written-assessment-page .written-assessment-attempts-exhausted-alert {
  background: #f8d7da !important;
  border-left-color: #dc3545 !important;
}

.written-assessment-page .written-assessment-attempts-exhausted-icon {
  color: #842029;
  font-size: 1.15rem;
  line-height: 1;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.written-assessment-page .written-assessment-attempts-exhausted-title,
.written-assessment-page .written-assessment-attempts-exhausted-text {
  color: #842029;
}

/* Solution Upload marking controls ("View Learner Solution" inline with
   Solution score, "Upload solution", "Save") -- platform-standard
   btn-outline-primary styling but flat: no color change on hover/focus/active.
   .btn-outline-primary:hover/:focus (main_system_index.css, ~line 2836) swaps
   in --secondary-color for every other outline-primary button on purpose;
   this class opts these three back out of that swap only. */
.written-assessment-page .written-assessment-flat-btn,
.written-assessment-page .written-assessment-flat-btn:hover,
.written-assessment-page .written-assessment-flat-btn:focus,
.written-assessment-page .written-assessment-flat-btn:active {
  background-color: var(--btn-outline-primary-bg, var(--primary-color)) !important;
  color: var(--btn-outline-primary-text, #fff) !important;
  border-color: var(--btn-outline-primary-border, var(--primary-color)) !important;
  box-shadow: none !important;
}

.written-assessment-admin-signature-canvas {
  width: min(100%, 420px);
  height: 110px;
  border: 1px dashed rgba(59, 130, 246, 0.35);
  border-radius: 0.85rem;
  background: #ffffff;
  touch-action: none;
  cursor: crosshair;
}

.template-marking-score-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.35rem 0.75rem;
  background: rgba(59, 130, 246, 0.08);
  color: #1d4ed8;
  font-weight: 600;
  font-size: 0.8rem;
}

.question-result-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.35rem;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1;
  vertical-align: middle;
}

.question-result-icon.is-correct {
  color: #198754;
}

.question-result-icon.is-incorrect {
  color: #dc3545;
}

.template-marking-raw-response {
  max-height: 360px;
  overflow: auto;
  background: #0f172a;
  color: #e2e8f0;
  border-radius: 0.85rem;
  padding: 1rem;
  font-size: 0.78rem;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

@media (max-width: 767.98px) {
  body.written-assessment-learner.learner-mobile-bootstrap-ui .written-assessment-page {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - var(--learner-mobile-fixed-top, 52px) - 5.2rem);
    min-height: calc(100dvh - var(--learner-mobile-fixed-top, 52px) - 5.2rem);
    padding-top: 0.5rem !important;
    padding-bottom: 5.2rem !important;
    padding-left: 0.2rem !important;
    padding-right: 0.2rem !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body.written-assessment-learner.learner-mobile-bootstrap-ui .written-assessment-page .written-assessment-top-row {
    --bs-gutter-x: 0.25rem;
    display: flex;
    flex: 1 1 auto;
    margin-top: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body.written-assessment-learner.learner-mobile-bootstrap-ui .written-assessment-page .written-assessment-top-row > [class*="col-"] {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    padding-left: 0.1rem !important;
    padding-right: 0.1rem !important;
  }

  body.written-assessment-learner.learner-mobile-bootstrap-ui .written-assessment-page .written-assessment-main-card {
    margin-top: 0 !important;
    flex: 1 1 auto;
    min-height: calc(100vh - var(--learner-mobile-fixed-top, 52px) - 7.1rem);
    min-height: calc(100dvh - var(--learner-mobile-fixed-top, 52px) - 7.1rem);
    max-height: none !important;
    overflow: visible !important;
  }

  body.written-assessment-learner.learner-mobile-bootstrap-ui .written-assessment-page .assessment-container {
    flex: 1 1 auto;
    min-height: calc(100vh - var(--learner-mobile-fixed-top, 52px) - 13rem);
    min-height: calc(100dvh - var(--learner-mobile-fixed-top, 52px) - 13rem);
    max-height: none !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.8rem;
  }

  body.written-assessment-learner.learner-mobile-bootstrap-ui .written-assessment-page .written-assessment-main-card .card-header {
    font-size: 0.82rem !important;
    padding: 0.55rem 0.7rem !important;
  }

  body.written-assessment-learner.learner-mobile-bootstrap-ui .written-assessment-page .assessment-container {
    font-size: 0.9rem !important;
  }

  body.written-assessment-learner.learner-mobile-bootstrap-ui .written-assessment-page .assessment-container .btn,
  body.written-assessment-learner.learner-mobile-bootstrap-ui .written-assessment-page .written-assessment-main-card .card-header .btn {
    font-size: 0.72rem !important;
    padding: 0.32rem 0.58rem !important;
    border-radius: 0.5rem !important;
    line-height: 1.15 !important;
  }
}

.ld-carousel-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1rem;
}

.ld-forms-carousel {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  gap: 1rem;
  padding-top: 1rem;
}

.ld-form-slide {
  min-width: 100%;
  flex: 0 0 100%;
  scroll-snap-align: start;
}

.ld-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ld-nav-prev { left: -20px; }

.ld-nav-next { right: -20px; }

/* Stepper titles */
.ld-steps {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: center;
  overflow-x: auto;
  padding: 0.5rem 2.5rem;
  border-bottom: 2px solid #e9ecef;
  width: calc(100% - 120px);
}

.ld-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  flex: 0 0 auto;
  padding: 0 0.5rem;
}

.ld-step-num {
  background: #e9ecef;
  color: #333;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
}

.ld-step-title {
  font-size: 0.85rem;
  color: #666;
  white-space: nowrap;
  margin-top: 4px;
}

/* Active step styling using parent data attribute */
.ld-forms-carousel[data-active-index="0"] ~ .ld-steps .ld-step[data-index="0"],

.ld-forms-carousel[data-active-index="1"] ~ .ld-steps .ld-step[data-index="1"],

.ld-forms-carousel[data-active-index="2"] ~ .ld-steps .ld-step[data-index="2"],

.ld-forms-carousel[data-active-index="3"] ~ .ld-steps .ld-step[data-index="3"],

.ld-forms-carousel[data-active-index="4"] ~ .ld-steps .ld-step[data-index="4"] {
  /* fallback in case parent-sibling selectors are not supported in some environments */
}

/* Simpler approach: highlight based on attribute on wrapper (applied via JS in template) */
.ld-carousel-wrapper[data-active-index] .ld-step { opacity: 0.6; }

.ld-carousel-wrapper[data-active-index] .ld-step.ld-active,

.ld-carousel-wrapper .ld-step:hover { opacity: 1; }

/* Active step styles (when JS applies ld-active) */
.ld-step.ld-active .ld-step-num { background: #0d6efd; color: #fff; }

.ld-step.ld-active .ld-step-title { color: #0d6efd; font-weight: 700; }

/* Wide modal helper */
.ld-modal-wide { max-width: 1100px; }

/* Disabled programme module links */
.programme-state-card-link.is-disabled {
  opacity: .55;
  cursor: not-allowed;
  pointer-events: none;
}

/* My Learners page: constrain learner table to card body and allow scrolling */
.my-learners-card .my-learners-table-wrapper {
  max-height: calc(100vh - 260px);
  overflow-y: auto;
  overflow-x: auto;
  width: 100%;
}

.my-learners-page-shell {
  padding-top: 1.45rem;
  border: 1px solid var(--primary-color);
}

/* DataTables needs a small mobile-only card layout; Bootstrap handles the
   modal, spacing, borders and overflow utilities. */
@media (max-width: 767.98px) {
  #view-assessment-popup .assessment-table-container,
  #view-assessment-popup .dataTables_wrapper { overflow: visible !important; }

  #view-assessment-popup #assessment_table,
  #view-assessment-popup #assessment_table tbody { display: block; width: 100% !important; }

  #view-assessment-popup #assessment_table thead { display: none; }

  #view-assessment-popup #assessment_table tbody tr {
    display: block;
    margin-bottom: .75rem;
    padding: .7rem;
    border: 1px solid #e1dce8;
    border-left: 4px solid var(--primary-color, #7627a8);
    border-radius: .75rem;
    background: #fff;
    box-shadow: 0 .2rem .5rem rgba(45, 27, 78, .08);
  }

  #view-assessment-popup #assessment_table tbody tr:last-child { margin-bottom: 0; }

  #view-assessment-popup #assessment_table tbody td {
    display: grid;
    grid-template-columns: minmax(5.75rem, 38%) minmax(0, 1fr);
    gap: .5rem;
    width: 100% !important;
    padding: .35rem 0;
    border: 0;
    white-space: normal !important;
    overflow-wrap: anywhere;
    text-align: left;
  }

  #view-assessment-popup #assessment_table tbody td::before {
    content: attr(data-label);
    color: #777083;
    font-size: .64rem;
    font-weight: 700;
    text-transform: uppercase;
  }

  #view-assessment-popup #assessment_table tbody td.dataTables_empty {
    display: block;
    text-align: center;
  }

  #view-assessment-popup .course-assessment-actions-cell,
  #view-assessment-popup .manage-assessment-row-dropdown,
  #view-assessment-popup .manage-assessment-actions-toggle {
    width: 100%;
    min-width: 0;
  }

  #view-assessment-popup .manage-assessment-actions-toggle { white-space: normal; }
}

body.role-mentor .my-learners-page-shell {
  margin-top: -7px !important;
}

/* Keep every piece of the mentor/teacher course analysis modal on the
   platform's Poppins type scale, including values inserted by course_analysis.js. */
#teacherCourseAnalysisModal .modal-content,
#teacherCourseAnalysisModal .modal-content * {
  font-family: "Poppins", sans-serif !important;
}

.course-analysis-report-card {
  padding: 1.25rem;
  border: 1px solid #e6e0d8;
  border-radius: 0.6rem;
  background: #fff;
}

.course-analysis-report-card h4 {
  margin: 0 0 1.25rem;
  color: #10152d;
  font-family: "Poppins", sans-serif;
  font-size: 1.35rem;
}

.course-analysis-report .assessment-kpi-tile {
  min-height: 5.25rem;
  padding: 0.9rem 1rem;
  border: 1px solid #e6e0d8;
  border-radius: 0.5rem;
  background: #faf9f6;
}

.course-analysis-report .assessment-kpi-tile .kpi-value {
  color: #10152d;
  font-size: 1.35rem;
}

.course-analysis-progress-ring {
  display: flex;
  width: 10rem;
  height: 10rem;
  margin: 0 auto 1rem;
  background: conic-gradient(#e9e7df 0 100%);
  box-shadow: inset 0 0 0 1.2rem #fff;
  border-radius: 50%;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.course-analysis-progress-ring strong {
  color: #10152d;
  font-family: "Poppins", sans-serif;
  font-size: 2rem;
}

.course-analysis-progress-ring span {
  color: #536174;
  font-size: 0.72rem;
  text-align: center;
}

.course-analysis-calculation-modal {
  border: 0;
  background: #fbfcff;
  color: #101b4d;
}

.course-analysis-calculation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  color: #fff;
  background: linear-gradient(105deg, #52318f, #7b4cb6);
}

.course-analysis-calculation-header h5 { font-size: clamp(1.2rem, 2vw, 2rem); font-weight: 800; }
.course-analysis-calculation-header p { color: rgba(255,255,255,.82); font-size: .82rem; }
.course-analysis-summary-panel { padding: .55rem; border: 1px solid #cfe0ff; border-radius: .7rem; background: #fff; }
.course-analysis-kpi-grid, .course-analysis-definition-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .7rem; }
.course-analysis-kpi, .course-analysis-definition-grid article { border: 1px solid #e1e8f8; border-radius: .55rem; padding: .75rem; }
.course-analysis-kpi { display: flex; align-items: center; gap: .75rem; background: linear-gradient(135deg, #f8fbff, #edf5ff); }
.course-analysis-kpi i { font-size: 2rem; color: #2b76d3; }
.course-analysis-kpi span { display: block; font-size: .72rem; font-weight: 800; text-transform: uppercase; }
.course-analysis-kpi strong { display: block; font-size: 1.7rem; line-height: 1.1; }
.course-analysis-kpi strong small { font-size: .9rem; font-weight: 500; }
.course-analysis-kpi-completed { background: linear-gradient(135deg, #f5fffa, #e7f8ee); }.course-analysis-kpi-completed i { color: #259b58; }
.course-analysis-kpi-progress { background: linear-gradient(135deg, #f6fffc, #e6f7ef); }.course-analysis-kpi-progress i { color: #148c4b; }
.course-analysis-kpi-completion { background: linear-gradient(135deg, #fffaf5, #fff1e6); }.course-analysis-kpi-completion i { color: #ed8b18; }
.course-analysis-definition-grid article { background: #f8f7ff; min-height: 7.4rem; }
.course-analysis-definition-grid h6 { margin: 0 0 .25rem; font-size: .86rem; font-weight: 800; }
.course-analysis-definition-grid p { margin: 0 0 .45rem; font-size: .76rem; line-height: 1.25; }
.course-analysis-definition-grid strong { font-size: .78rem; }
.course-analysis-calculation-card { border: 1px solid #dfe6f2; border-radius: .65rem; padding: .85rem; background: #fff; }
.course-analysis-calculation-card h4 { margin: 0 0 .65rem; font-size: 1.05rem; font-weight: 800; }
.course-analysis-progress-overview { display: flex; align-items: center; justify-content: center; gap: 1.25rem; min-height: 14rem; }
.course-analysis-progress-donut { display: flex; width: 10.5rem; height: 10.5rem; padding: 1.45rem; border-radius: 50%; box-shadow: inset 0 0 0 1.25rem #fff; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.course-analysis-progress-donut strong { font-size: 1.7rem; line-height: 1; }.course-analysis-progress-donut span { font-size: .72rem; font-weight: 700; }
.course-analysis-progress-legend { min-width: 13rem; }.course-analysis-progress-legend > div, .course-analysis-performance-list > div { display: flex; justify-content: space-between; gap: .75rem; padding: .38rem 0; border-bottom: 1px solid #e7ebf3; font-size: .83rem; }.course-analysis-progress-legend > div:last-child, .course-analysis-performance-list > div:last-child { border-bottom: 0; }
.course-analysis-progress-legend i { display: inline-block; width: .85rem; height: .85rem; margin-right: .45rem; border-radius: .15rem; vertical-align: -.12rem; }.course-analysis-progress-legend small { font-weight: 500; }
.course-analysis-performance-list strong { white-space: nowrap; }
.course-analysis-calculation-table { font-size: .74rem; color: #152152; }.course-analysis-calculation-table thead th { color: #fff; background: #8643a4; border-color: #9c68b5; }.course-analysis-calculation-table td, .course-analysis-calculation-table th { padding: .38rem; vertical-align: middle; }.course-analysis-total-row { background: #f2f5fb; font-weight: 800; }
.course-analysis-calculation-step h4 { display: flex; align-items: center; gap: .55rem; font-size: .92rem; }.course-analysis-calculation-step h4 span { display: inline-flex; width: 2rem; height: 2rem; border-radius: 50%; align-items: center; justify-content: center; color: #fff; background: #2b76d3; }.course-analysis-calculation-step.step-purple h4 span { background: #7042a9; }.course-analysis-calculation-step.step-green h4 span { background: #248b5a; }.course-analysis-calculation-step.step-blue { background: #f1f9ff; }.course-analysis-calculation-step.step-purple { background: #f8f3ff; }.course-analysis-calculation-step.step-green { background: #f1fbf6; }
.course-analysis-pass-note { padding: .6rem; border-radius: .45rem; background: #ecf8f1; font-size: .76rem; font-weight: 600; }

@media (min-width: 1400px) { .modal-xxl { max-width: min(1530px, 96vw); } }
@media (max-width: 1199.98px) { .course-analysis-kpi-grid, .course-analysis-definition-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .course-analysis-progress-overview { flex-wrap: wrap; } }
@media (max-width: 575.98px) { .course-analysis-kpi-grid, .course-analysis-definition-grid { grid-template-columns: 1fr; } .course-analysis-calculation-header { padding: 1rem; } }

.course-analysis-breakdown > div,
.course-analysis-metric,
.course-analysis-module-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0;
  border-bottom: 1px solid #ece8e0;
  color: #1d2943;
}

.course-analysis-breakdown > div:last-child,
.course-analysis-metric:last-child {
  border-bottom: 0;
}

.course-analysis-breakdown strong,
.course-analysis-metric strong,
.course-analysis-module-row strong {
  color: #10152d;
  font-family: "Poppins", sans-serif;
  font-size: 1.1rem;
}

.course-analysis-module-bar {
  height: 0.65rem;
  margin: 0.75rem 0 1.25rem;
  overflow: hidden;
  border-radius: 999px;
  background: #eceae4;
}

.course-analysis-module-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #3f805f;
}

.course-analysis-module-list {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.course-analysis-module-detail {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid #ece9e2;
  color: #1b2438;
}

.course-analysis-module-detail span:first-child {
  flex: 1 1 auto;
  min-width: 10rem;
}

.course-analysis-module-detail span:not(:first-child) {
  flex: 0 0 4.5rem;
  text-align: right;
}

.course-analysis-module-heading {
  color: #536070;
  font-size: 0.75rem;
  font-weight: 700;
}

.course-analysis-module-detail span:last-child {
  color: #3f518f;
  font-weight: 700;
  white-space: nowrap;
}

.course-analysis-breakdown-heading {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 1rem;
  padding: 0.4rem 0;
  color: #536070;
  font-size: 0.75rem;
  font-weight: 700;
}

.course-analysis-report-link {
  display: inline-block;
  margin-top: 1rem;
  color: #2e4f9b;
  text-decoration: none;
}

.course-analysis-module-index {
  display: inline-block;
  min-width: 1.6rem;
  margin-right: 0.5rem;
  color: #9aa2b1;
  font-family: Georgia, serif;
}

.course-analysis-module-detail span.course-analysis-module-progress-cell {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex: 0 0 8.5rem;
  text-align: left;
}

.course-analysis-module-progress-track {
  flex: 1 1 auto;
  height: 0.5rem;
  border-radius: 999px;
  background: #eceae4;
  overflow: hidden;
}

.course-analysis-module-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.course-analysis-module-progress-fill.course-analysis-chip-good {
  background: #2f9e64;
}

.course-analysis-module-progress-fill.course-analysis-chip-warn {
  background: #d99a3d;
}

.course-analysis-module-progress-fill.course-analysis-chip-bad {
  background: #d9534f;
}

.course-analysis-module-progress-value {
  flex: 0 0 auto;
  min-width: 2.5rem;
  color: #1b2438;
  font-weight: 700;
  text-align: right;
}

.course-analysis-chip {
  display: inline-block;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  font-weight: 700;
}

.course-analysis-chip.course-analysis-chip-good {
  color: #1c7a4c !important;
  background: #e2f4ea;
}

.course-analysis-chip.course-analysis-chip-warn {
  color: #a3611a !important;
  background: #fbead3;
}

.course-analysis-chip.course-analysis-chip-bad {
  color: #b23c3c !important;
  background: #fbe2e0;
}

.course-analysis-struggling-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid #ece9e2;
}

.course-analysis-struggling-row:last-of-type {
  border-bottom: 0;
}

.course-analysis-struggling-name {
  flex: 1 1 auto;
  min-width: 8rem;
  color: #1b2438;
}

.course-analysis-struggling-bar {
  flex: 0 0 6rem;
  height: 0.5rem;
  overflow: hidden;
  border-radius: 999px;
  background: #f3e2df;
}

.course-analysis-struggling-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #bd5b43;
}

.course-analysis-struggling-score {
  flex: 0 0 auto;
  color: #bd5b43;
  font-weight: 700;
}

.course-analysis-insight {
  display: flex;
  gap: 0.8rem;
  align-items: flex-start;
  color: #536174;
}

.course-analysis-insight p {
  margin: 0;
}

.course-analysis-insight strong {
  color: #10152d;
}

.course-analysis-insight-dot {
  width: 0.75rem;
  height: 0.75rem;
  margin-top: 0.3rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #bd5b43;
}

.my-learners-page-shell.mark-register-page-shell {
  border: 1px solid var(--primary-color) !important;
}

/* Keep these pages aligned with the assessment shell while preserving the
   sidebar clearance established by the shared platform layout. */
@media (min-width: 768px) {
  body.my-learners-page-layout .home-section.mx-4,
  body.mark-register-page-layout .home-section.mx-4,
  body.teacher-program-subjects-page .home-section.mx-4 {
    margin-left: 0.5rem !important;
    margin-right: 0.25rem !important;
  }

  /* Match Mark Register: the visible mentor sidebar occupies the
     126px desktop content boundary in this shell. */
  body.my-learners-page-layout .home-section:not(.admin-home-layout),
  body.mark-register-page-layout .home-section:not(.admin-home-layout),
  body.teacher-program-subjects-page .home-section:not(.admin-home-layout) {
    left: 126px !important;
    width: calc(100% - 126px - 2rem) !important;
    padding-left: 0.2rem !important;
    padding-right: 0.2rem !important;
  }

  body.my-learners-page-layout .my-learners-page-shell,
  body.mark-register-page-layout .mark-register-page-shell {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* All Courses uses the teacher subject page rather than the management
     shell. Apply the same assessment spacing without allowing its content
     to move below the desktop sidebar. */
  body.teacher-program-subjects-page .teacher-program-subjects-shell {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    margin-top: -7px !important;
  }
}

/* Keep the desktop/sidebar positioning above, but let the mentor course
   shell use the full available width on small phones. */
@media (max-width: 575.98px) {
  body.teacher-program-subjects-page .home-section.mx-4 {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body.teacher-program-subjects-page .home-section:not(.admin-home-layout) {
    left: 0 !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.teacher-program-subjects-page .teacher-program-subjects-shell {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

.my-learners-page-shell .academic-page {
  padding-top: 0.85rem;
}

.my-learners-header-card {
  border-radius: 1.25rem;
  overflow: hidden;
}

.my-learners-header-card .card-header {
  padding: 1rem 1.25rem 1.05rem;
}

.my-learners-header-card.bg-outline-primary .academic-title {
  color: #ffffff;
  font-size: 0.725rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.08;
}

.my-learners-header-card.bg-outline-primary .academic-subtitle {
  color: #ffffff;
}

.my-learners-card {
  border: 1px solid var(--primary-color) !important;
}

/* Matches Academic Years' title/subtitle sizing
   (.academic-page .academic-title/.academic-subtitle,
   main_system_index.css ~line 12378/12384) so both pages read the same. */
.my-learners-page-shell .academic-title {
  color: #111827;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: normal;
  line-height: normal;
}

.my-learners-page-shell .academic-subtitle {
  color: #6b7280;
  font-size: 13px;
}

@media (max-width: 767.98px) {
  .my-learners-page-shell {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-top: 0.95rem;
    padding-left: 0.6rem !important;
    padding-right: 0.6rem !important;
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)) !important;
    border-radius: 1rem;
    overflow-x: hidden !important;
    box-sizing: border-box;
  }

  .my-learners-page-shell .academic-page {
    padding-top: 0.8rem;
  }

  .my-learners-header-card .card-header {
    padding: 0.85rem 1rem 0.9rem;
  }

  .my-learners-header-card.bg-outline-primary .academic-title {
    font-size: 0.725rem;
  }

  .my-learners-page-shell .academic-title {
    font-size: 24px;
  }

  .my-learners-page-shell .academic-subtitle {
    font-size: 13px;
  }
}

/* Accordion button arrow styling - make arrow white when collapsed */
.accordion-button.collapsed::after {
  filter: brightness(0) invert(1) !important;
}

/* ========================================
   Payment Requirements Popup (cart.js)
   ======================================== */
.payment-popup-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    margin: 0 auto 20px;
}

.payment-popup-title {
    margin: 0 0 6px;
    font-size: 20px;
    font-weight: 700;
    color: #1a1a2e;
}

.payment-popup-subtitle {
    color: #6c757d;
    font-size: 13px;
    margin: 0 0 24px;
}

.payment-popup-cards {
    max-width: 380px;
    margin: 0 auto;
}

.payment-popup-card {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    margin-bottom: 10px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.payment-popup-card-icon {
    width: 36px;
    height: 36px;
    min-width: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 14px;
}

.payment-popup-card-icon--fields {
    background: var(--primary-color);
}

.payment-popup-card-icon--docs {
    background: var(--secondary-color);
}

.payment-popup-card-content {
    flex: 1;
}

.payment-popup-card-label {
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
}

.payment-popup-card-desc {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

.payment-popup-card-status {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.payment-popup-card-status--fields {
    background: #fee2e2;
}

.payment-popup-card-status--docs {
    background: #fef3c7;
}

.payment-popup-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--primary-color);
    color: #fff;
    text-decoration: none;
    padding: 12px 32px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.25s ease;
    letter-spacing: 0.3px;
}

.payment-popup-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    color: #fff;
    text-decoration: none;
}

.payment-popup-dismiss {
    background: var(--secondary-color) !important;
    color: #fff !important;
    font-weight: 500 !important;
    font-size: 13px !important;
    border: none !important;
}

.payment-popup-dismiss:hover {
    opacity: 0.9;
}

.swal2-close:focus {
    box-shadow: none !important;
}

.payment-popup-close {
    color: var(--primary-color) !important;
    font-size: 28px !important;
}

.payment-popup-close:hover {
    color: var(--secondary-color) !important;
}

.notification-fade-overlay {
    position: fixed;
    inset: 0;
    /* No dim -- unlike the Practicals/Skills Audit drawers, this one only
       needs a click-catcher to close on an outside click, not a visible
       backdrop over the rest of the page. */
    background: transparent;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    /* This overlay is a direct child of <body> (a sibling of .app-topnav),
       NOT nested inside .app-topnav alongside .notification-bell-wrap --
       so it competes directly against .app-topnav's own z-index (1040
       !important, elsewhere in this file), not against the wrap's 1060.
       .app-topnav establishes its own stacking context, which caps
       everything inside it (the wrap, and the panel nested inside the
       wrap) at that ceiling from any outside sibling's point of view,
       regardless of their own higher z-index values. Must stay below
       1040 or this click-catcher sits in front of the whole topnav,
       including the notification panel, and swallows every click meant
       for it (same class of bug as .kubiki-floating-launcher below). */
    z-index: 1035;
}

.notification-fade-overlay.show,
body.notification-dropdown-open .notification-fade-overlay,
body:has(.dropdown-menu[aria-labelledby="notificationDropdown"].show) .notification-fade-overlay {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.notification-bell-wrap {
    position: relative;
    z-index: 1060;
}

/* Keep the open notification drawer above neighbouring header actions such as
   the cart button. */
body.notification-dropdown-open .notification-bell-wrap {
    z-index: 1070 !important;
}

#notificationDropdown {
    position: relative;
    z-index: 1061;
}

/* Hide the trigger behind its own open panel. */
body.notification-dropdown-open #notificationDropdown {
    visibility: hidden;
    pointer-events: none;
}

.dropdown-menu[aria-labelledby="notificationDropdown"] .notification-title:not(.notif-v2-mark-read) {
    background-color: var(--primary-color) !important;
    color: #fff !important;
}

.dropdown-menu[aria-labelledby="notificationDropdown"] .notif-v2-card-title {
    color: #fff !important;
}

/* ──────────────── Notification bell panel ────────────────
   A Bootstrap dropdown-menu (#notificationDropdown, data-bs-toggle=
   "dropdown") CSS-shaped into a fixed right-side drawer rather than a real
   Offcanvas -- the existing mark-as-read/dismiss/load-more wiring in
   index_real.js listens on the dropdown's own shown/hidden.bs.dropdown
   events, and switching component would mean redoing that. Applies to every
   theme, including theme-aic1, which used to get a smaller anchored dropdown
   here; that distinction had already gone stale (a later, contradictory
   override elsewhere in this file was silently pushing it toward this same
   full-height layout anyway) so it's been retired rather than propagated
   into the redesign below. */
/* Selector needs 3 classes (not 2) to outrank the sitewide
   .dropdown-menu.dropdown-menu-end.show { position: absolute !important }
   rule earlier in this file (same file, line ~25176) at equal specificity --
   two classes here would lose to its three regardless of !important or
   source order. */
.notification-bell-panel.dropdown-menu.show {
    position: fixed !important;
    inset: 0 0 0 auto !important;
    width: min(380px, 100vw) !important;
    max-width: min(380px, 100vw) !important;
    min-width: 0 !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 0 0 0.75rem !important;
    background: #fff;
    box-shadow: -8px 0 28px rgba(15, 23, 42, 0.16);
    transform: none !important;
    z-index: 1064 !important;
    overflow: hidden;
    display: flex !important;
    flex-direction: column;
}

/* ---- header: gradient, icon badge, title/subtitle, unread pill ---- */
.notif-v2-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex: 0 0 auto;
    padding: 0.6rem 1rem;
    background: var(--primary-color);
    color: #fff;
}
.notif-v2-header .min-width-0 { min-width: 0; }
.notif-v2-header-icon {
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.18);
    color: #fff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}
/* Belt-and-suspenders: force it on the glyph itself, not just the
   container, in case some other rule targets the icon element directly
   with equal-or-higher specificity elsewhere on this page. */
.notif-v2-header-icon i,
.notif-v2-icon-btn i,
.notif-v2-unread-pill i {
    color: #fff !important;
}
.notif-v2-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
}
.notif-v2-subtitle {
    font-size: 0.74rem;
    color: rgba(255, 255, 255, 0.8);
}
.notif-v2-unread-pill {
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    padding: 0.2rem 0.6rem;
}
.notif-v2-unread-pill i { font-size: 0.45rem; }
.notif-v2-header-actions {
    display: flex;
    gap: 0.4rem;
    flex-shrink: 0;
}
.notif-v2-icon-btn {
    width: 1.75rem;
    height: 1.75rem;
    border: 0;
    border-radius: 0.5rem;
    background: rgba(255, 255, 255, 0.18);
    color: #fff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease;
}
.notif-v2-icon-btn:hover,
.notif-v2-icon-btn:focus-visible {
    background: rgba(255, 255, 255, 0.3);
}

/* ---- read-state filters: only All/Unread, the only states this data
   actually tracks (there's no notification category field to back
   per-type pills like "Assignments"/"Reviews"). ---- */
.notif-v2-filters {
    display: flex;
    gap: 0.4rem;
    flex: 0 0 auto;
    padding: 0.65rem 0.85rem;
    overflow-x: auto;
    border-bottom: 1px solid #e5e7eb;
}
.notif-v2-filter-pill {
    border: 1px solid #e5e7eb;
    background: #fff;
    color: #52606d;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 600;
    padding: 0.3rem 0.75rem;
    white-space: nowrap;
    flex-shrink: 0;
}
.notif-v2-filter-pill.active {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}
.notif-v2-filter-count { opacity: 0.8; margin-left: 0.15rem; }

/* ---- scrollable body, grouped by day ---- */
.notif-v2-body {
    flex: 1 1 auto;
    overflow-y: auto;
    padding: 0.75rem 0.65rem 0.9rem;
    background: #f7f8fa;
}
.notif-v2-day-group + .notif-v2-day-group { margin-top: 0.5rem; }
.notif-v2-day-heading {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #9aa5b1;
    padding: 0.3rem 0.2rem;
}

/* ---- card ---- */
.notif-v2-card {
    display: flex;
    align-items: stretch;
    gap: 0.55rem;
    background: #fff;
    border-radius: 0.6rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    margin-bottom: 0.45rem;
    position: relative;
    transition: box-shadow 0.15s ease;
}
.notif-v2-card:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}
.notif-v2-card.notif-v2-read {
    opacity: 0.65;
}

.notif-v2-card-left {
    width: 4px;
    flex-shrink: 0;
    border-radius: 0.6rem 0 0 0.6rem;
    background: transparent;
}
.notif-v2-card-left.notif-v2-unread-bar {
    background: var(--primary-color);
}

.notif-v2-card-icon {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    margin: 0.65rem 0 0.65rem -0.3rem;
    border-radius: 0.5rem;
    background: color-mix(in srgb, var(--primary-color) 12%, #fff);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}

.notif-v2-card-body {
    flex: 1;
    min-width: 0;
    padding: 0.5rem 0.65rem 0.5rem 0;
}

.notif-v2-title-row { gap: 0.5rem; }
.notif-v2-unread-dot {
    display: inline-block;
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: var(--primary-color);
    margin-right: 0.3rem;
    vertical-align: middle;
}
.notif-v2-card-title {
    font-size: 0.82rem;
    color: #1f2937;
    line-height: 1.3;
    display: inline;
}

.notif-v2-card-date {
    font-size: 0.68rem;
    color: #9ca3af;
    white-space: nowrap;
    flex-shrink: 0;
}

.notif-v2-full-msg {
    font-size: 0.76rem;
    color: #374151;
    line-height: 1.45;
    padding: 0.35rem 0 0.15rem;
}

.notif-v2-card-actions {
    margin-top: 0.35rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.35rem;
}
.notif-v2-approve {
    background: var(--primary-color);
    border: 0;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
}
.notif-v2-approve:hover,
.notif-v2-approve:focus {
    background: var(--primary-color);
    color: #fff;
}
.notif-v2-approve:disabled { opacity: 0.6; }
.notif-v2-approved-note {
    font-size: 0.7rem;
    font-weight: 600;
    color: #15803d;
}
.notif-v2-mark-read {
    background: color-mix(in srgb, var(--primary-color) 10%, #fff);
    border: 0;
    color: var(--primary-color);
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.25rem 0.65rem;
}

.notif-v2-dismiss {
    background: none;
    border: none;
    color: #9ca3af;
    font-size: 1rem;
    padding: 0.5rem 0.55rem;
    cursor: pointer;
    align-self: flex-start;
    line-height: 1;
    flex-shrink: 0;
    border-radius: 0.35rem;
    transition: color 0.15s, background 0.15s;
}
.notif-v2-dismiss:hover {
    color: #ef4444;
    background: rgba(239, 68, 68, 0.08);
}

/* ---- empty state ---- */
.notif-v2-empty {
    text-align: center;
    padding: 2.5rem 1rem;
    color: #9ca3af;
}
.notif-v2-empty i {
    font-size: 2rem;
    display: block;
    margin-bottom: 0.5rem;
}
.notif-v2-empty p {
    font-size: 0.85rem;
    margin: 0;
}

/* ---- footer: pagination, then the Mark all/Clear all bar ---- */
.notif-v2-footer {
    flex: 0 0 auto;
    padding: 0.5rem 0.85rem;
    background: #fff;
    border-top: 1px solid #e5e7eb;
}
.notif-v2-view-more-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: 0.6rem;
    background: #eef1f6;
    color: var(--primary-color);
    font-size: 0.78rem;
    font-weight: 700;
}
.notif-v2-bottom-actions {
    flex: 0 0 auto;
    padding: 0.75rem 0.85rem;
    background: #fff;
    border-top: 1px solid #e5e7eb;
}
.notif-v2-btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
}
.notif-v2-btn-primary:hover,
.notif-v2-btn-primary:focus-visible {
    background: var(--secondary-color);
    border-color: var(--secondary-color);
    color: #fff;
}
.notif-v2-btn-outline {
    background: #fff;
    border: 1px solid #d7dce3;
    color: #52606d;
    font-weight: 600;
    font-size: 0.8rem;
}
.notif-v2-footer-note {
    font-size: 0.68rem;
    color: #9aa5b1;
}

/* Bulk actions (and the pagination footer above them) are not shown to
   learner-type roles -- unchanged from the previous design. */
body.role-intern .notif-v2-footer,
body.role-graduate .notif-v2-footer,
body.role-learner .notif-v2-footer {
    display: none !important;
}

/* ── Responsive ── */
@media (max-width: 767.98px) {
    .notification-bell-panel.dropdown-menu,
    .notification-bell-panel.dropdown-menu.show {
        width: 100vw !important;
        max-width: 100vw !important;
        border-radius: 0 !important;
    }

    /* The drawer is a child of the fixed header stacking context. It must
       sit above the header controls and above the fixed bottom navigation,
       both of which use a higher z-index only on mobile. */
    .app-topnav .notification-bell-panel.dropdown-menu,
    .app-topnav .notification-bell-panel.dropdown-menu.show {
        z-index: 1075 !important;
    }

    body.notification-dropdown-open .sidebar.sidebar-md {
        z-index: 1035 !important;
    }

    .notif-v2-header {
        padding-top: calc(1rem + env(safe-area-inset-top, 0px));
    }

    body.notification-dropdown-open .app-topnav__actions > button.cart-btn {
        visibility: hidden !important;
        pointer-events: none !important;
    }
}

/* Center modal header for Action Required modal */

.modal-header-center {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  border-bottom: none;
  padding-bottom: 0;
}

.modal-header-center .modal-title {
  margin-top: 8px;
  font-weight: 600;
  font-size: 1.5rem;
  text-align: center;
}

.modal-header-center .btn-close {
  position: absolute;
  right: 16px;
  top: 16px;
}

.modal-header-center .payment-popup-icon {
  margin-bottom: 0;
}

/* Modal and cart.html inline style replacements (shared for all clients) */

.mt-24 {
  margin-top: 24px !important;
}

.modal-icon-red {
  color: #e60000 !important;
  font-size: 32px !important;
}

.fs-18 {
  font-size: 18px !important;
}

.checkbox-lg {
  width: 24px !important;
  height: 24px !important;
}

.fs-14 {
  font-size: 14px !important;
}

.text-danger-link {
  color: #e60000 !important;
  text-decoration: underline !important;
}

  .app-programme-cards-list #programme-sidebar-accordion > .nav-item.active,
  .app-assessment-list #programme-sidebar-accordion > .nav-item.active,
  .app-home-list #home-admin-fixed-sidebar > .nav-item.active,
  .app-home-list #home-default-sidebar > .nav-item.active,
  .app-home-list .home-root-link.active,
  .app-course-list #admin-course-sidebar > .nav-item.active,
  .app-course-list #learner-course-sidebar > .nav-item.active,
  .app-course-list #teacher-course-sidebar > .nav-item.active,
  .app-programme-cards-list .mentor-primary-sidebar > .nav-item.active,
  .app-evaluation-list #evaluation-sidebar-accordion > .nav-item.active {
      background: var(--primary-color) !important; /* main button color */
      color: #fff !important;
  }

  /* Ensure sidebar hover fills the same width as active items */
  .orcaa-sidebar .nav-item:hover,
  .orcaa-sidebar .nav-item:focus-within {
      background: var(--orcaa-sidebar-hover-bg, rgba(0, 0, 0, 0.03));
      margin-top: 1rem;
  }

  .app-home-list #home-admin-fixed-sidebar {
    margin-top: 1rem;
  }

  .app-home-list #home-admin-fixed-sidebar > .nav-item:hover,
  .app-home-list #home-admin-fixed-sidebar > .nav-item:focus-within {
      background: var(--primary-color) !important;
      color: #fff !important;
      width: 80%;
      border-radius: 10px;
  }

  .app-home-list #home-admin-fixed-sidebar > .nav-item:hover .programme-icon-circle,
  .app-home-list #home-admin-fixed-sidebar > .nav-item:hover .programme-icon-circle i,
  .app-home-list #home-admin-fixed-sidebar > .nav-item:hover .programme-icon-label,
  .app-home-list #home-admin-fixed-sidebar > .nav-item:focus-within .programme-icon-circle,
  .app-home-list #home-admin-fixed-sidebar > .nav-item:focus-within .programme-icon-circle i,
  .app-home-list #home-admin-fixed-sidebar > .nav-item:focus-within .programme-icon-label {
      color: #fff !important;
  }

  .app-course-list #learner-course-sidebar > .nav-item:hover,
  .app-course-list #learner-course-sidebar > .nav-item:focus-within {
      width: 80%;
      border-radius: 10px;
  }

  .app-programme-cards-list #programme-sidebar-accordion .collapse .nav-item.active {
      background-color: var(--navbar-bg-color) !important;
  }

  .app-programme-cards-list #programme-sidebar-accordion .collapse .nav-item.active {
  background: var(--navbar-bg-color) !important;
  color: #000 !important;
  }

  .bg-outline-primary {
    background: var(--primary-color);
  }

  .bg-outline-primary-darker {
    /* Darker variant of primary: use secondary if available, else primary */
    background-color: var(--secondary-color, var(--primary-color));
  }

  /* Programme cards â€“ vertical icon sidebar */
  .programme-icons-sidebar {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 0;
  }

      .programme-icons-sidebar .nav-item {
        border: none;
        background: transparent;
      }

      /* The local-admin sidebar already sits inside the rounded sidebar card;
         do not stack the generic menu top margin and 3rem menu padding on it.
         Mentor shares the same sidebar shell, so it gets the same treatment. */
      .orcaa-sidebar .local-admin-primary-sidebar,
      .orcaa-sidebar .mentor-primary-sidebar {
        margin-top: 0 !important;
        padding-top: 0.25rem;
      }

      .programme-icon-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #000;
    margin-bottom: 1rem;
  }

  /* Ensure icon above label when used inside the main sidebar container */
  .orcaa-sidebar-container .programme-icons-sidebar .programme-icon-link {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
  }

  .programme-icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 35px;
    height: 30px;
    border-radius: 50%;
    border:transparent;
    margin-bottom: 1.25rem;
  }

  .programme-icon-circle i {
    font-size: 24px;
  }

  .programme-icon-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  .programme-icon-pill {
    min-width: 104px;
    padding: 0.35rem 0.75rem;
    border-radius: 14px;
    background-color: #fff;
    color: #000;
    border: 1px solid rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 0.35rem;
  }

  .programme-icon-pill i {
    font-size: 24px;
    margin-bottom: 0.1rem;
  }

  .programme-icon-pill-label {
    font-size: 13px;
    font-weight: 600;
  }

  .programme-icon-label {
    font-size: 9px;
    font-weight: 400;
  }

  .app-home-list #home-admin-fixed-sidebar .programme-icon-label,
  .app-home-list #home-default-sidebar .programme-icon-label,
  .app-home-list .home-root-link .programme-icon-label,
  .app-programme-cards-list .mentor-primary-sidebar .programme-icon-label {
    font-size: 12px !important;
    font-weight: 500;
    line-height: 1.2;
    text-align: center;
  }

  .tables-margin-top {
    margin-top: -11.5rem !important;
}

  .programme-icons-sidebar .nav-item.active .programme-icon-circle {
    color: #fff;
  }

  .programme-icons-sidebar .nav-item.active .programme-icon-circle i {
    color: #fff;
  }

  .programme-icons-sidebar .nav-item.active .programme-icon-label {
    color: #fff;
  }

  .programme-icons-sidebar .nav-item.active .programme-icon-pill {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
  }

  .programme-icons-sidebar .nav-item.active .programme-icon-pill i {
    color: #fff;
  }

  .programme-icons-sidebar .assistant-visibility-toggle {
    margin-top: auto;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  /* On desktop, keep the Home icon's top offset in line with the admin
     home page's sidebar (.programme-icons-sidebar's 3rem padding-top +
     the shared 1.5rem .card-margin-top = 4.5rem total). Previously this
     added a further 2rem on top of that, pushing Home (and everything
     below it) noticeably further down than the admin home page sidebar. */
  @media (min-width: 768px) {
    .orcaa-sidebar-container .programme-icons-sidebar .home-root-link.card-margin-top-home {
      margin-top: 0 !important;
    }
  }

  /* Programme cards â€“ learners/teams tabs */
  .programme-tabs .nav-link {
    border-radius: 0;
    color: #000;
    background-color: transparent;
    border-bottom: 2px solid transparent;
    padding-left: 0;
    padding-right: 1rem;
  }

  .programme-tabs .nav-link:hover {
    color: var(--primary-color);
    background-color: transparent;
  }

  .programme-tabs .nav-link.active {
    color: var(--primary-color);
    background-color: transparent;
    border-bottom-color: var(--primary-color);
  }

  /* Programme details - Assessments dashboard */
  .assessment-dashboard-wrapper {
    background-color: #fff;
  }

  .assessment-alert-banner {
    border-radius: 12px;
    border: 1px solid rgba(248, 113, 113, 0.3);
    background-color: #fff7f5;
    color: #7f1d1d;
  }

  .assessment-alert-banner .bi-exclamation-triangle-fill {
    color: #f97373;
  }

  .assessment-summary-card {
    border-radius: 16px;
    min-height: 6rem;
    padding: 0.65rem 1rem;
    background-color: #fff;
    border: 1px solid rgba(15, 23, 42, 0.03);
    box-shadow: 0 6px 12px rgba(15, 23, 42, 0.05);
  }

  .assessment-summary-card .summary-label {
    letter-spacing: 0.04em;
    font-size: 0.8rem;
    line-height: 1.2;
  }

  .assessment-summary-card .summary-value {
    color: #1f172c;
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
  }

  .assessment-summary-card .summary-hint {
    font-size: 0.8rem;
    line-height: 1.2;
  }

  @media (min-width: 768px) {
    .assessment-kpi-tile,
    .assessment-summary-card {
      height: 6rem !important;
    }
  }

  .assessment-summary-card.needs-attention {
    border-top: 4px solid #f97373;
  }

  .assessment-summary-card.watch-closely {
    border-top: 4px solid #fbbf24;
  }

  .assessment-summary-card.on-track {
    border-top: 4px solid #22c55e;
  }

  .assessment-summary-card.overall-average {
    border-top: 4px solid #6366f1;
  }

  .assessment-subject-card {
    border-radius: 18px;
    background-color: #fff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.06);
    padding: 1rem 1.1rem;
    font-size: 0.92rem;
  }

  .assessment-chip {
    padding: 0.1rem 0.5rem;
    border-radius: 999px;
    background-color: rgba(248, 113, 113, 0.1);
    color: #b91c1c;
    font-weight: 600;
    white-space: nowrap;
    font-size: 0.82rem;
  }

  .assessment-tag {
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    background-color: rgba(148, 163, 184, 0.15);
    color: #4b5563;
    white-space: nowrap;
    font-size: 0.8rem;
  }

  .assessment-recent-results {
    margin-top: 0.5rem;
  }

  .assessment-results-header {
    background-color: #111827;
    color: #fff;
  }

  .assessment-results-header th {
    font-weight: 600;
    font-size: 0.84rem;
    text-transform: uppercase;
  }

  .assessment-recent-results h6 {
    font-size: 1rem;
  }

  .assessment-results-table-wrapper table td {
    font-size: 0.9rem;
  }

  .assessment-status-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 90px;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.82rem;
  }

  .assessment-status-chip.status-danger {
    background-color: #fef2f2;
    color: #b91c1c;
  }

  .assessment-status-chip.status-warning {
    background-color: #fffbeb;
    color: #92400e;
  }

  .assessment-status-chip.status-success {
    background-color: #ecfdf3;
    color: #166534;
  }

  .assessment-status-chip.status-neutral {
    background-color: #e5e7eb;
    color: #374151;
  }

  .assessment-trend {
    font-size: 0.84rem;
    font-weight: 600;
  }

  .assessment-trend-positive {
    color: #16a34a;
  }

  .assessment-trend-negative {
    color: #b91c1c;
  }

  .assessment-trend-neutral {
    color: #4b5563;
  }

  .assessment-kpi-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 0.75rem;
  }

  .assessment-kpi-grid-four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .assessment-kpi-tile {
    position: relative;
    background-color: #fff;
    border-radius: 18px;
    border: 1px solid rgba(15, 23, 42, 0.03);
    box-shadow: 0 6px 12px rgba(15, 23, 42, 0.05);
    padding: 1.25rem 1rem;
    min-height: 130px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-top: 4px solid #4c1d95;
  }

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

  @media (max-width: 767.98px) {
    .assessment-kpi-grid {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }

  .assessment-kpi-tile .kpi-label {
    font-size: 0.8rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.04em;
  }

  .assessment-kpi-tile .kpi-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: #1f172c;
  }

  .assessment-kpi-tile.accent-purple {
    border-top-color: #7c3aed;
  }

  .assessment-kpi-tile.accent-teal {
    border-top-color: #0d9488;
  }

  .assessment-kpi-tile.accent-gold {
    border-top-color: #c27a00;
  }

  .assessment-kpi-tile.accent-success {
    border-top-color: #16a34a;
  }

  .assessment-kpi-tile.accent-danger {
    border-top-color: #dc2626;
  }

  .assessment-kpi-tile.accent-orange {
    border-top-color: #f59e0b;
  }

  .programme-course-analysis-card {
    cursor: pointer;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
  }

  .programme-course-analysis-card:hover {
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.1);
    transform: translateY(-1px);
  }

  .assessment-chart-card {
    border-radius: 18px;
    background-color: #fff;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 10px 18px rgba(15, 23, 42, 0.06);
    padding: 1rem 1.1rem;
    height: 100%;
  }

  .assessment-chart-card h6 {
    font-size: 0.92rem;
    font-weight: 700;
  }

  .assessment-chart-card canvas {
    max-height: 190px;
  }

  .assessment-chart-card #assessmentScoreDistributionChart {
    display: block;
    width: 100% !important;
    height: 230px !important;
    max-height: 230px;
  }

  .assessment-chart-card #practicalsLanguageDistributionChart {
    display: block;
    width: 100% !important;
    height: 190px !important;
    max-height: 190px;
  }

  .assessment-submission-summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
  }

  .assessment-submission-chart {
    flex: 0 0 50%;
    height: 145px;
    min-width: 0;
  }

  .assessment-submission-chart canvas {
    width: 100% !important;
    height: 145px !important;
  }

  .assessment-submission-legend {
    flex: 1;
    min-width: 0;
    font-size: 0.68rem;
  }

  .assessment-submission-legend-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    margin-bottom: 0.45rem;
  }

  .assessment-submission-legend-row:last-child {
    margin-bottom: 0;
  }

  .assessment-submission-legend-row > span {
    display: flex;
    align-items: center;
    min-width: 0;
  }

  .assessment-submission-legend-row strong {
    color: #111827;
    line-height: 1.05;
    text-align: right;
    white-space: nowrap;
  }

  .assessment-submission-legend-row small {
    font-size: 0.62rem;
  }

  .assessment-submission-legend .legend-dot {
    display: inline-block;
    flex: 0 0 auto;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    margin-right: 0.35rem;
  }

  .assessment-not-started-dot { background-color: #b34232; }
  .assessment-in-progress-dot { background-color: #c48a27; }
  .assessment-submitted-dot { background-color: #597252; }
  .assessment-late-dot { background-color: #365d78; }
  .assessment-overdue-dot { background-color: #765680; }

  .assessment-completion-rate {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 0.75rem;
    padding-top: 0.85rem;
    border-top: 1px dashed rgba(107, 114, 128, 0.35);
  }

  .assessment-completion-rate span {
    color: #4b5563;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  .assessment-completion-rate strong {
    color: #597252;
    font-family: "Poppins", sans-serif;
    font-size: 1.4rem;
    line-height: 1;
  }

  .assessment-completion-rate strong::after {
    content: '%';
  }

  .assessment-pass-fail-summary {
    display: flex;
    align-items: center;
    gap: 0.85rem;
  }

  .assessment-pass-fail-chart {
    flex: 0 0 52%;
    height: 145px;
    min-width: 0;
  }

  .assessment-pass-fail-chart canvas {
    width: 100% !important;
    height: 145px !important;
  }

  .assessment-pass-fail-legend {
    flex: 1;
    min-width: 0;
    font-size: 0.75rem;
  }

  .assessment-pass-fail-legend-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    margin-bottom: 0.8rem;
  }

  .assessment-pass-fail-legend-row:last-child {
    margin-bottom: 0;
  }

  .assessment-pass-fail-legend-row > span {
    display: flex;
    align-items: center;
    white-space: nowrap;
  }

  .assessment-pass-fail-legend-row strong {
    color: #111827;
    line-height: 1.05;
    text-align: right;
  }

  .assessment-pass-fail-legend-row small {
    display: block;
    font-size: 0.7rem;
  }

  .assessment-pass-fail-legend .legend-dot {
    display: inline-block;
    width: 0.55rem;
    height: 0.55rem;
    border-radius: 50%;
    margin-right: 0.35rem;
  }

  .assessment-pass-dot {
    background-color: #52694a;
  }

  .assessment-fail-dot {
    background-color: #b34232;
  }

  .assessment-pass-fail-rates {
    margin: 0.75rem 0 0;
    padding-top: 0.85rem;
    border-top: 1px dashed rgba(107, 114, 128, 0.35);
  }

  .assessment-pass-fail-rates .text-xxs {
    min-height: 2.2rem;
    font-size: 0.58rem !important;
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: 0.035em;
  }

  .assessment-pass-fail-rates .fw-bold {
    font-family: Georgia, serif;
    font-size: 1.2rem;
  }

  .assessment-reassessment-rate {
    color: #c18422;
  }

  .assessment-chart-legend {
    font-size: 0.82rem;
  }

  .assessment-chart-legend .legend-dot {
    display: inline-block;
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    margin-right: 0.35rem;
  }

  .assessment-skills-table th {
    background-color: var(--primary-color);
    color: #fff;
    font-weight: 600;
    font-size: 0.84rem;
    text-transform: uppercase;
  }

  .assessment-skills-table td {
    font-size: 0.9rem;
  }

  .assessment-overview-table th {
    background-color: var(--primary-color);
    color: #fff;
    font-weight: 600;
    font-size: 0.84rem;
    text-transform: uppercase;
    white-space: nowrap;
  }

.assessment-overview-table td {
    font-size: 0.9rem;
    vertical-align: middle;
}

/* Assigned, Submitted, Average Score, Pass Rate, Status are centered via the
   Bootstrap .text-center utility class directly on the th/td in
   _programme_assessments_overview_content.html instead of a bespoke
   nth-child rule here. */

/* This table is a real DataTable (programme_assessments_overview.js), and
   DataTables' own CSS gives every sortable <th> an extra 30px of
   padding-right to make room for its sort-arrow icon. That's fine for
   left-aligned text, but for text-align:center it skews the header label
   ~15px left of true center while the data cell below it (no such padding)
   centers in the full column width -- match it with the same padding-left
   so the header text centers on the same axis as its values. */
.assessment-overview-table thead th.dt-orderable-asc,
.assessment-overview-table thead th.dt-orderable-desc,
.assessment-overview-table thead th.dt-ordering-asc,
.assessment-overview-table thead th.dt-ordering-desc {
    padding-left: 30px;
}

  /* Programme page header spacing overrides */
  .programme-header-offset {
    margin-top: 2.7rem !important;
    margin-right: -0.5rem !important;
  }

  /* Programme management content page styles */
  body.programme-management-standalone-page {
    --pm-primary: var(--primary-color, #36006f);
    --pm-primary-soft: var(--primary-color, #36006f);
    --pm-primary-soft: color-mix(in srgb, var(--primary-color, #36006f) 78%, #ffffff 22%);
    --pm-accent: var(--secondary-color, var(--btn-color, var(--primary-color, #4d54a3)));
    --pm-accent-hover: var(--pm-accent);
    --pm-accent-hover: color-mix(in srgb, var(--pm-accent) 86%, #000000 14%);
    --pm-accent-shadow: rgb(0 0 0 / 14%);
    --pm-accent-shadow: color-mix(in srgb, var(--pm-accent) 22%, transparent);
    --pm-border: var(--pm-primary);
    --pm-border: color-mix(in srgb, var(--primary-color, #36006f) 82%, #000000 18%);
    --pm-ink: #252932;
    --pm-muted: #6d7380;
    --pm-line: #e7e7f0;
    --pm-surface: #fff;
    --pm-status-bg: #f4f0f8;
    --pm-status-bg: color-mix(in srgb, var(--pm-primary) 12%, #ffffff 88%);
    --pm-content-top-offset: 0rem;
  }

  body.programme-management-standalone-page .programme-content-ui {
    width: 100%;
    color: var(--pm-ink);
    font-family: "Poppins", "Segoe UI", sans-serif;
    margin-top: var(--pm-content-top-offset);
    margin-left: 1.5rem;
    margin-right: 1.5rem;
    max-width: calc(100% - 3rem);
  }

  /* Per-programme content: keep only a very small, even gutter so the shell
     expands without touching either edge. */
  body.programme-management-content-page .programme-content-ui {
    margin-top: -10px;
    margin-left: 0.0375rem;
    margin-right: 0.0375rem;
    max-width: calc(100% - 0.075rem);
  }

  body.programme-management-standalone-page .programme-content-shell {
    background: var(--pm-surface);
    border-radius: 24px;
    box-shadow: 0 10px 28px rgba(29, 21, 61, 0.1);
    padding: 18px 14px 0;
    margin-top: 7px;
    overflow: hidden;
  }

  /* System Management and Platform Theme both render through this same
     .programme-content-ui / .programme-content-shell structure (shared with
     this page's own per-programme detail view). Their left/right spacing is
     already symmetric, so matching Programme Management's tighter gutters
     here is a straight reduction -- scoped via each page's own extra body
     class (system-management-content-page / platform-theme-page) so the
     shared rule above, and the per-programme detail page that also uses
     these classes, are left untouched. */
  body.system-management-content-page .programme-content-ui {
    margin-left: 0.2rem;
    margin-right: 0.2rem;
    max-width: calc(100% - 0.4rem);
  }

  /* Halve only the Platform Theme shell's left gutter. Its right margin is
     retained, while the recovered space increases the shell on the left. */
  body.platform-theme-page .programme-content-ui {
    margin-left: 0.1rem;
    margin-right: 0.2rem;
    max-width: calc(100% - 0.3rem);
  }

  body.system-management-content-page .programme-content-shell,
  body.platform-theme-page .programme-content-shell {
    padding-left: 0.2rem;
    padding-right: 0.2rem;
  }

  /* Match the shell's vertical offset to Assessments/Practicals (margin-top:
     -7px on their #app shell). The base .programme-content-shell rule above
     uses margin-top: 7px (positive), which sits ~14px lower than the other
     admin-home shells -- scoped to System Management only, so Platform
     Theme and the per-programme detail page are untouched. */
  body.system-management-content-page .programme-content-shell {
    margin-top: -7px !important;
  }

  /* Same reasoning as the Assessments/Practicals card-body trim above: the
     -7px margin-top is already within ~3px of the fixed navbar's bottom
     edge, so the remaining space above the cards has to come out of this
     shell's own top padding (18px, from the base rule's "18px 14px 0")
     instead. */
  body.system-management-content-page .programme-content-shell {
    padding-top: 0.5rem !important;
  }

  body.programme-management-standalone-page .programme-content-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
  }

  body.programme-management-standalone-page .programme-content-title {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
  }

  body.programme-management-standalone-page .programme-back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 0;
    border-radius: 999px;
    background: var(--pm-accent);
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    padding: 10px 20px;
    text-decoration: none;
    box-shadow: 0 10px 18px var(--pm-accent-shadow);
  }

  body.programme-management-standalone-page .programme-back-button:hover,
  body.programme-management-standalone-page .programme-back-button:focus {
    color: #fff;
    background: var(--pm-accent-hover);
    text-decoration: none;
  }

  body.programme-management-standalone-page .programme-module-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
  }

  body.programme-management-standalone-page .programme-module-card {
    min-height: 238px;
    border: 5px solid var(--pm-primary);
    border-radius: 24px;
    background: var(--pm-primary-soft);
    color: #fff;
    padding: 26px 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: left;
    width: 100%;
  }

  body.programme-management-standalone-page .programme-module-card.is-active {
    background: var(--pm-primary);
  }

  body.programme-management-standalone-page .programme-module-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: var(--pm-accent);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 29px;
    margin-bottom: 18px;
  }

  /* Without an explicit size, a PNG icon_img (real intrinsic pixel
     dimensions) renders at full natural size instead of shrinking to fit
     this badge -- SVG icon_img files happen to auto-fit the flex container
     because they carry no width/height attributes of their own.
     Fill the badge (not a small icon floating inside it): several of these
     assets are "card" icons with their own full-canvas background baked in
     (meant to be seen, per design intent), so shrinking them to a small
     glyph left a mismatched colour patch inside the badge's own background.
     object-fit: contain (not cover) still guarantees nothing gets cropped
     for the handful of icons that are transparent line art instead. */
  body.programme-management-standalone-page .programme-module-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: inherit;
  }

  body.programme-management-standalone-page .programme-module-name {
    display: block;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 3px;
  }

  body.programme-management-standalone-page .programme-module-copy {
    display: block;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.92);
  }

  body.programme-management-standalone-page .programme-module-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 20px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
  }

  body.programme-management-standalone-page .programme-module-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 31px;
    border-radius: 999px;
    background: var(--pm-accent);
    color: #fff;
    padding: 7px 12px;
    white-space: nowrap;
  }

  body.programme-management-standalone-page.programme-management-content-page .programme-module-card {
    border-width: 3px;
    border-radius: 18px;
    min-height: 158px;
    padding: 16px 14px;
  }

  /* Sized up from the original 38px badge -- at that size the icon read as
     a faint corner mark against this card's 158px min-height, especially
     for icon_img icons whose own background/artwork is the point (see the
     "fill the badge" comment on the `img` rule below). */
  body.programme-management-standalone-page.programme-management-content-page .programme-module-icon {
    border-radius: 14px;
    font-size: 32px;
    height: 33.9px;
    margin-bottom: 14px;
    width: 33.9px;
  }

  /* Unlike the Course/Assessment/Practicals Management pages, this page's
     .programme-module-icon had no matching `img` rule, so a custom PNG icon
     (which has real intrinsic pixel dimensions, unlike these attribute-less
     SVGs which happen to shrink to fit their flex container) rendered at
     full natural size instead of shrinking to fit the 38px icon badge.
     Sized to 25.9px so the picture sits with visible padding inside the
     58px badge, rather than filling it edge-to-edge. */
  body.programme-management-standalone-page.programme-management-content-page .programme-module-icon img {
    width: 25.9px;
    height: 25.9px;
    object-fit: contain;
    border-radius: inherit;
  }

  body.programme-management-standalone-page.programme-management-content-page .programme-module-name {
    font-size: 13px;
    margin-bottom: 2px;
  }

  body.programme-management-standalone-page.programme-management-content-page .programme-module-copy {
    font-size: 11px;
    font-weight: 500;
    line-height: 1.24;
  }

  body.programme-management-standalone-page.programme-management-content-page .programme-module-footer {
    gap: 8px;
    font-size: 12px;
    line-height: 1.2;
    margin-top: 12px;
  }

  body.programme-management-standalone-page.programme-management-content-page .programme-module-pill {
    min-height: 25px;
    padding: 5px 9px;
  }

  /* Course Management / Assessment Management / Practicals Management: reuse
     the Programme workspace's compact purple module-card styling
     (programme-module-*) so these landing screens look and behave exactly
     the same as the per-programme "2027 Programme" workspace cards. */
  body.course-management-standalone-page,
  body.assessment-management-standalone-page,
  body.practicals-management-standalone-page {
    --pm-primary: var(--primary-color, #36006f);
    --pm-primary-soft: var(--primary-color, #36006f);
    --pm-primary-soft: color-mix(in srgb, var(--primary-color, #36006f) 78%, #ffffff 22%);
    --pm-accent: var(--secondary-color, var(--btn-color, var(--primary-color, #4d54a3)));
  }

  body.course-management-standalone-page .programme-module-grid,
  body.assessment-management-standalone-page .programme-module-grid,
  body.practicals-management-standalone-page .programme-module-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
  }

  body.course-management-standalone-page .programme-module-card,
  body.assessment-management-standalone-page .programme-module-card,
  body.practicals-management-standalone-page .programme-module-card {
    min-height: 158px;
    border: 3px solid var(--pm-primary);
    border-radius: 18px;
    background: var(--pm-primary-soft);
    color: #fff;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: left;
    width: 100%;
  }

  /* Keep every assessment module on the same card treatment. Older
     programme-state rules target only the dashboard and manage links and
     otherwise add a second outline, which makes those two cards flash with a
     different border while the page/theme is loading. */
  body.assessment-management-standalone-page .programme-module-card,
  body.assessment-management-standalone-page .programme-module-card.is-active {
    outline: 0;
    outline-offset: 0;
    box-shadow: none;
  }

  body.assessment-management-standalone-page .programme-module-card.is-active {
    box-shadow: 0 12px 28px color-mix(in srgb, var(--pm-primary, #36006f) 18%, transparent);
  }

  body.course-management-standalone-page .programme-module-card.is-active,
  body.assessment-management-standalone-page .programme-module-card.is-active,
  body.practicals-management-standalone-page .programme-module-card.is-active {
    background: var(--pm-primary);
  }

  body.course-management-standalone-page .programme-module-icon,
  body.assessment-management-standalone-page .programme-module-icon,
  body.practicals-management-standalone-page .programme-module-icon {
    width: 33.9px;
    height: 33.9px;
    border-radius: 10px;
    background: var(--pm-accent);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 10px;
  }

  /* Fill the badge with the icon's own artwork/background instead of
     floating a small glyph inside a mismatched CSS-coloured box -- several
     of these assets are "card" icons with their own full-canvas background
     baked in, meant to be seen. object-fit: contain still guarantees
     nothing gets cropped for the icons that are transparent line art. */
  body.course-management-standalone-page .programme-module-icon img,
  body.assessment-management-standalone-page .programme-module-icon img,
  body.practicals-management-standalone-page .programme-module-icon img {
    width: 25.9px;
    height: 25.9px;
    object-fit: contain;
    border-radius: inherit;
  }

  body.course-management-standalone-page .programme-module-name,
  body.assessment-management-standalone-page .programme-module-name,
  body.practicals-management-standalone-page .programme-module-name {
    display: block;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 2px;
  }

  body.course-management-standalone-page .programme-module-copy,
  body.assessment-management-standalone-page .programme-module-copy,
  body.practicals-management-standalone-page .programme-module-copy {
    display: block;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.24;
    color: rgba(255, 255, 255, 0.92);
  }

  body.course-management-standalone-page .programme-module-footer,
  body.assessment-management-standalone-page .programme-module-footer,
  body.practicals-management-standalone-page .programme-module-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 12px;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 700;
    color: #fff;
  }

  body.course-management-standalone-page .programme-module-pill,
  body.assessment-management-standalone-page .programme-module-pill,
  body.practicals-management-standalone-page .programme-module-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 25px;
    border-radius: 999px;
    background: var(--pm-accent);
    color: #fff;
    padding: 5px 9px;
    white-space: nowrap;
    border: 0;
  }

  /* Same responsive column step-down as the Programmes module grid
     (body.programme-management-standalone-page below): 5 fixed 180px
     columns never wrap, so on phones the row overflows and later cards
     (e.g. "Course Analysis") get sliced off at the viewport edge. */
  @media (max-width: 1200px) {
    body.course-management-standalone-page .programme-module-grid,
    body.assessment-management-standalone-page .programme-module-grid,
    body.practicals-management-standalone-page .programme-module-grid {
      grid-template-columns: repeat(3, minmax(210px, 1fr));
    }
  }

  @media (max-width: 900px) {
    body.course-management-standalone-page .programme-module-grid,
    body.assessment-management-standalone-page .programme-module-grid,
    body.practicals-management-standalone-page .programme-module-grid {
      grid-template-columns: repeat(2, minmax(180px, 1fr));
    }
  }

  @media (max-width: 640px) {
    body.course-management-standalone-page .programme-module-grid,
    body.assessment-management-standalone-page .programme-module-grid,
    body.practicals-management-standalone-page .programme-module-grid {
      grid-template-columns: minmax(0, 1fr);
      gap: 12px;
      width: 100%;
    }

    body.course-management-standalone-page .programme-module-card,
    body.assessment-management-standalone-page .programme-module-card,
    body.practicals-management-standalone-page .programme-module-card {
      max-width: none;
      min-height: 158px;
      padding: 20px 18px;
    }
  }

  /* System Management admin-home cards: same purple module-card styling,
     but this partial (_admin_home_system_management_cards.html) is embedded
     into several different parent shells rather than one standalone page, so
     its --pm-* variables are defined on its own grid wrapper instead of a
     body class. */
  .system-management-module-grid {
    --pm-primary: var(--primary-color, #36006f);
    --pm-primary-soft: var(--primary-color, #36006f);
    --pm-primary-soft: color-mix(in srgb, var(--primary-color, #36006f) 78%, #ffffff 22%);
    --pm-accent: var(--secondary-color, var(--btn-color, var(--primary-color, #4d54a3)));
    display: grid;
    grid-template-columns: repeat(5, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 14px;
  }

  .system-management-module-grid .programme-module-card {
    min-height: 158px;
    border: 3px solid var(--pm-primary);
    border-radius: 18px;
    background: var(--pm-primary-soft);
    color: #fff;
    padding: 16px 14px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: left;
    width: 100%;
  }

  .system-management-module-grid .programme-module-card.is-active {
    background: var(--pm-primary);
  }

  .system-management-module-grid .programme-module-icon {
    width: 33.9px;
    height: 33.9px;
    border-radius: 10px;
    background: var(--pm-accent);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 10px;
  }

  /* Fill the badge with the icon's own artwork/background rather than a
     small glyph floating inside a mismatched CSS-coloured box -- see the
     matching comment on the Course/Assessment/Practicals Management rule. */
  .system-management-module-grid .programme-module-icon img {
    width: 25.9px;
    height: 25.9px;
    object-fit: contain;
    border-radius: inherit;
  }

  .system-management-module-grid .programme-module-name {
    display: block;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 2px;
  }

  .system-management-module-grid .programme-module-copy {
    display: block;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.24;
    color: rgba(255, 255, 255, 0.92);
  }

  .system-management-module-grid .programme-module-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 12px;
    font-size: 12px;
    line-height: 1.2;
    font-weight: 700;
    color: #fff;
  }

  .system-management-module-grid .programme-module-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 25px;
    border-radius: 999px;
    background: var(--pm-accent);
    color: #fff;
    padding: 5px 9px;
    white-space: nowrap;
    border: 0;
  }

  body.programme-management-standalone-page .programme-panel {
    border: 1.5px solid var(--pm-border);
    border-radius: 20px;
    background: #fff;
    padding: 20px 18px 0;
    min-height: 390px;
    margin-bottom: 12px;
  }

  body.programme-management-standalone-page .programme-panel-title {
    margin: 0 0 16px;
    font-size: 20px;
    font-weight: 800;
    line-height: 1.2;
  }

  /* Programme content module headers use the same rectangular purple bar as
     the learner and recruitment table headers. */
  body.programme-management-content-page .programme-module-header {
    min-height: 56px;
    margin: -20px -18px 16px;
    padding: 10px 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: var(--pm-primary);
    color: #fff;
  }

  body.programme-management-content-page .programme-module-header .programme-table-heading {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.25;
  }

  body.programme-management-content-page .programme-module-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-left: auto;
  }

  body.programme-management-content-page #programme-learners-panel .programme-table-header,
  body.programme-management-content-page #programme-learners-module-panel .programme-module-header,
  body.programme-management-content-page #programme-recruitment-section .programme-table-header,
  body.programme-management-content-page #programme-recruitment-panel .programme-module-header,
  body.programme-management-content-page #programme-evaluations-panel .programme-module-header,
  body.programme-management-content-page #programme-attendance-panel .programme-module-header,
  body.programme-management-content-page #programme-documents-panel .programme-module-header,
  body.programme-management-content-page #programme-documents-panel .card-header,
  body.programme-management-content-page #programme-attendance-panel .attendance-header-card {
    border-radius: 20px 20px 0 0;
  }

  body.programme-management-standalone-page .programme-content-tabs {
    display: flex;
    align-items: center;
    gap: 26px;
    margin: 0 0 54px;
    padding: 0;
    list-style: none;
  }

  body.programme-management-standalone-page .programme-content-tab {
    border: 0;
    background: transparent;
    color: var(--pm-ink);
    font-size: 15px;
    font-weight: 500;
    padding: 0 0 12px;
    position: relative;
  }

  body.programme-management-standalone-page .programme-content-tab.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--pm-primary);
    border-radius: 999px;
  }

  body.programme-management-standalone-page .programme-evaluation-tabs {
    margin-bottom: 20px;
  }

  body.programme-management-standalone-page .programme-primary-tabs {
    margin-bottom: 16px;
  }

  /* Practicals Code Editor Setup's Learn/Assess switcher, restyled to match
     the Learners/Teams underlined-tab look above -- practicals_management.html
     doesn't carry body.programme-management-standalone-page (and the --pm-*
     custom properties it defines), so this re-declares the same shape here
     using --primary-color directly instead of duplicating that page's whole
     variable/style block. */
  body.practicals-management-standalone-page .practicals-track-tabs {
    display: flex;
    align-items: center;
    gap: 26px;
    margin: 0 0 12px;
    padding: 0;
    list-style: none;
  }

  body.practicals-management-standalone-page .practicals-track-tab {
    border: 0;
    background: transparent;
    color: #252932;
    font-size: 15px;
    font-weight: 500;
    padding: 0 0 12px;
    position: relative;
  }

  body.practicals-management-standalone-page .practicals-track-tab.active {
    color: var(--primary-color, #36006f);
  }

  body.practicals-management-standalone-page .practicals-track-tab.active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--primary-color, #36006f);
    border-radius: 999px;
  }

  body.programme-management-standalone-page .programme-compliance-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    flex-wrap: wrap;
    margin: 0 0 16px;
    padding-top: 12px;
    border-top: 1px solid var(--pm-border);
  }

  body.programme-management-standalone-page .programme-compliance-tabs {
    margin: 0;
    padding: 0;
  }

  body.programme-management-standalone-page .programme-compliance-row .programme-filter-row {
    margin-bottom: 0;
    padding-right: 0;
  }

  body.programme-management-standalone-page .programme-filter-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-bottom: 10px;
    padding-right: 17px;
  }

  body.programme-management-standalone-page .programme-filter-row label {
    margin: 0;
    font-size: 15px;
    font-weight: 500;
  }

  body.programme-management-standalone-page .programme-filter-select {
    flex: 0 1 168px;
    min-width: 0;
    width: min(100%, 168px);
    height: 34px;
    border: 1px solid #d4d7e0;
    border-radius: 12px;
    color: var(--pm-ink);
    font-size: 14px;
  }

  body.programme-management-standalone-page .programme-table-card {
    border: 1px solid rgba(35, 35, 52, 0.08);
    border-radius: 15px 15px 0 0;
    container-type: inline-size;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(29, 21, 61, 0.06);
  }

  body.programme-management-standalone-page .programme-table-header {
    min-height: 56px;
    background: var(--pm-primary);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 18px;
  }

  body.programme-management-standalone-page .programme-table-heading {
    font-size: 16px;
    font-weight: 800;
    line-height: 1.25;
  }

  body.programme-management-standalone-page .programme-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
  }

  body.programme-management-standalone-page .programme-action-button {
    border: 0;
    border-radius: 999px;
    background: var(--pm-accent);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    min-height: 35px;
    padding: 9px 15px;
    box-shadow: 0 14px 22px var(--pm-accent-shadow);
    text-decoration: none;
  }

  body.programme-management-standalone-page .programme-action-button:hover,
  body.programme-management-standalone-page .programme-action-button:focus {
    background: var(--pm-accent-hover);
    color: #fff;
  }

  body.programme-management-standalone-page .programme-search-row {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    min-height: 69px;
    border-bottom: 1px solid var(--pm-line);
    padding: 10px 17px;
  }

  body.programme-management-standalone-page .programme-page-size-form {
    align-items: center;
    color: var(--pm-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 13px;
    font-weight: 700;
    gap: 8px;
  }

  body.programme-management-standalone-page .programme-page-size-select {
    border: 1px solid #d4d7e0;
    border-radius: 10px;
    color: var(--pm-ink);
    min-width: 76px;
    width: auto;
  }

  body.programme-management-standalone-page .programme-search-input {
    flex: 0 1 168px;
    margin-left: auto;
    width: min(100%, 168px);
    min-height: 34px;
    border: 1px solid #d4d7e0;
    border-radius: 12px;
    color: var(--pm-ink);
    font-size: 14px;
    padding: 8px 10px;
  }

  body.programme-management-standalone-page .programme-search-input::placeholder {
    color: #737a86;
  }

  body.programme-management-standalone-page .programme-table-wrapper {
    padding: 17px 17px 0;
    overflow-x: auto;
  }

  body.programme-management-standalone-page .programme-people-table .programme-person-row {
    position: relative;
  }

  body.programme-management-standalone-page .programme-people-table .programme-person-row:has(.programme-learner-row-menu.show) {
    z-index: 30;
  }

  body.programme-management-standalone-page .programme-people-table .programme-learner-actions-cell {
    position: relative;
  }

  body.programme-management-standalone-page .programme-people-table .programme-learner-actions-cell:has(.programme-learner-row-menu.show) {
    z-index: 3001;
  }

  body.programme-management-standalone-page .programme-learner-manage-dropdown {
    position: relative;
  }

  body.programme-management-standalone-page .programme-learner-manage-dropdown:has(.programme-learner-row-menu.show),
  body.programme-management-standalone-page .programme-learner-row-menu.show {
    z-index: 3000 !important;
  }

  body.programme-management-standalone-page .programme-learners-table {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.programme-management-standalone-page .programme-people-table-wrapper {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  body.programme-management-standalone-page .programme-learners-table {
    width: 100% !important;
    margin: 0;
    border-collapse: collapse;
    table-layout: fixed;
  }

  body.programme-management-standalone-page .programme-people-table .programme-col-person-select {
    width: 4%;
  }

  body.programme-management-standalone-page .programme-people-table .programme-col-person-number {
    width: 5%;
  }

  body.programme-management-standalone-page .programme-people-table .programme-col-person-name {
    width: 17%;
  }

  body.programme-management-standalone-page .programme-people-table .programme-col-person-email {
    width: 19%;
  }

  body.programme-management-standalone-page .programme-people-table .programme-col-person-unit {
    width: 17%;
  }

  body.programme-management-standalone-page .programme-people-table .programme-col-person-login {
    width: 14%;
  }

  body.programme-management-standalone-page .programme-people-table .programme-col-person-status {
    width: 10%;
  }

  body.programme-management-standalone-page .programme-people-table .programme-col-person-actions {
    width: 13%;
  }

  body.programme-management-standalone-page .programme-teams-table .programme-col-team-number {
    width: 6%;
  }

  body.programme-management-standalone-page .programme-teams-table .programme-col-team-name {
    width: 19%;
  }

  body.programme-management-standalone-page .programme-teams-table .programme-col-team-dealer {
    width: 11%;
  }

  body.programme-management-standalone-page .programme-teams-table .programme-col-team-members {
    width: 9%;
  }

  body.programme-management-standalone-page .programme-teams-table .programme-col-team-created-by {
    width: 16%;
  }

  body.programme-management-standalone-page .programme-teams-table .programme-col-team-created-date {
    width: 12%;
  }

  body.programme-management-standalone-page .programme-teams-table .programme-col-team-actions {
    width: 27%;
  }

  body.programme-management-standalone-page .programme-learners-table thead th {
    background: var(--pm-primary);
    color: #fff;
    border: 0;
    box-sizing: border-box;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.2;
    padding: 10px 12px;
    text-align: left;
    vertical-align: middle;
    white-space: nowrap;
  }

  /* The row-action button (.programme-learner-manage-dropdown) is
     right-aligned via justify-content: flex-end, so its "Actions" header
     must match or the button reads as shifted right/misaligned -- most
     visible on the Teams table where the Actions column is widest. */
  body.programme-management-standalone-page .programme-learners-table thead th:last-child {
    text-align: right;
  }

  body.programme-management-standalone-page .programme-last-login-header {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
  }

  body.programme-management-standalone-page .programme-last-login-year-controls {
    display: inline-flex;
    align-items: center;
    gap: 2px;
  }

  body.programme-management-standalone-page .programme-last-login-year-control {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 6px;
    color: #fff;
    font-size: 0.72rem;
    line-height: 1;
    text-decoration: none;
    transition: background-color 0.18s ease, border-color 0.18s ease;
  }

  body.programme-management-standalone-page .programme-last-login-year-control:hover,
  body.programme-management-standalone-page .programme-last-login-year-control:focus,
  body.programme-management-standalone-page .programme-last-login-year-control.is-active {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.76);
    color: #fff;
  }

  body.programme-management-standalone-page .programme-learners-table tbody td {
    color: var(--pm-muted);
    border: 0;
    box-sizing: border-box;
    font-size: 15px;
    line-height: 1.35;
    padding: 16px 12px;
    text-align: left;
    vertical-align: middle;
    overflow-wrap: anywhere;
  }

  body.programme-management-standalone-page .programme-people-table th:nth-child(1),
  body.programme-management-standalone-page .programme-people-table th:nth-child(5),
  body.programme-management-standalone-page .programme-people-table th:nth-child(6),
  body.programme-management-standalone-page .programme-people-table td:nth-child(1),
  body.programme-management-standalone-page .programme-people-table td:nth-child(5),
  body.programme-management-standalone-page .programme-people-table td:nth-child(6),
  body.programme-management-standalone-page .programme-teams-table th:nth-child(1),
  body.programme-management-standalone-page .programme-teams-table th:nth-child(3),
  body.programme-management-standalone-page .programme-teams-table th:nth-child(4),
  body.programme-management-standalone-page .programme-teams-table th:nth-child(6),
  body.programme-management-standalone-page .programme-teams-table td:nth-child(1),
  body.programme-management-standalone-page .programme-teams-table td:nth-child(3),
  body.programme-management-standalone-page .programme-teams-table td:nth-child(4),
  body.programme-management-standalone-page .programme-teams-table td:nth-child(6) {
    text-align: center;
  }

  body.programme-management-standalone-page .programme-row-number {
    color: var(--pm-ink);
    font-weight: 800;
    white-space: nowrap;
  }

  body.programme-management-standalone-page .programme-learners-table th:last-child,
  body.programme-management-standalone-page .programme-learners-table td:last-child {
    text-align: left;
  }

  /* The Teams table's Actions header is right-aligned (see the
     thead th:last-child rule above) and its row button is right-aligned
     via justify-content: flex-end on .programme-learner-manage-dropdown.
     The generic td:last-child: left rule above was fighting that intent
     for text/inline content, so re-assert right-alignment here to keep
     the "Actions" column and the "Manage Team" button lined up. */
  body.programme-management-standalone-page .programme-teams-table td:last-child {
    text-align: right;
  }

  body.programme-management-standalone-page .programme-person-row td,
  body.programme-management-standalone-page .programme-team-row td {
    border-bottom: 1px solid var(--pm-line);
  }

  body.programme-management-standalone-page .programme-person-name,
  body.programme-management-standalone-page .programme-team-name {
    color: var(--pm-ink);
    font-weight: 700;
    text-align: left;
  }

  body.programme-management-standalone-page .programme-status-text {
    color: var(--pm-primary);
    display: inline;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.3;
  }

  body.programme-management-standalone-page .programme-team-row td:last-child > .d-flex {
    justify-content: flex-start;
  }

  body.programme-management-standalone-page .programme-row-action,
  body.programme-management-standalone-page .programme-row-action.btn.btn-outline-primary {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    min-width: 4rem;
    border-color: var(--pm-primary) !important;
    color: #fff !important;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
  }

  body.programme-management-standalone-page .programme-row-action:hover,
  body.programme-management-standalone-page .programme-row-action:focus,
  body.programme-management-standalone-page .programme-row-action.btn.btn-outline-primary:hover,
  body.programme-management-standalone-page .programme-row-action.btn.btn-outline-primary:focus {
    background: var(--pm-primary) !important;
    border-color: var(--pm-primary) !important;
    color: #fff !important;
    text-decoration: none;
  }

  body.programme-management-standalone-page .programme-empty-row td {
    background: #fff;
  }

  body.programme-management-standalone-page .programme-empty-message {
    color: var(--pm-muted);
    font-weight: 700;
  }

  body.programme-management-standalone-page .programme-pagination {
    align-items: center;
    color: var(--pm-muted);
    display: flex;
    flex-wrap: wrap;
    font-size: 13px;
    gap: 10px;
    justify-content: space-between;
    padding: 14px 17px 18px;
  }

  body.programme-management-standalone-page .programme-pagination-actions {
    display: flex;
    gap: 8px;
  }

  body.programme-management-standalone-page .programme-pagination-link {
    border: 1px solid rgba(77, 84, 163, 0.2);
    border-radius: 999px;
    color: var(--pm-accent);
    font-weight: 800;
    padding: 6px 12px;
    text-decoration: none;
  }

  body.programme-management-standalone-page .programme-pagination-link:hover,
  body.programme-management-standalone-page .programme-pagination-link:focus {
    background: var(--pm-accent);
    color: #fff;
    text-decoration: none;
  }

  @media (max-width: 1200px) {
    body.programme-management-standalone-page .programme-module-grid {
      grid-template-columns: repeat(3, minmax(210px, 1fr));
    }
  }

  @media (min-width: 768px) and (max-width: 1199.98px) {
    body.programme-management-standalone-page {
      --pm-content-top-offset: -2.15rem;
    }
  }

  @media (max-width: 900px) {
    body.programme-management-standalone-page .programme-module-grid {
      grid-template-columns: repeat(2, minmax(220px, 1fr));
    }

    body.programme-management-content-page .programme-module-header {
      align-items: flex-start;
      flex-direction: column;
      gap: 10px;
    }

    body.programme-management-content-page .programme-module-header-actions {
      justify-content: flex-start;
      flex-wrap: wrap;
      margin-left: 0;
      width: 100%;
    }

    body.programme-management-standalone-page .programme-table-header {
      align-items: flex-start;
      flex-direction: column;
    }

    body.programme-management-standalone-page .programme-actions {
      justify-content: flex-start;
    }
  }

  @media (max-width: 640px) {
    body.programme-management-standalone-page {
      --pm-content-top-offset: 0.55rem;
    }

    body.programme-management-standalone-page .programme-content-ui {
      width: 100%;
      max-width: 100%;
      margin-left: 0;
      margin-right: 0;
    }

    body.programme-management-standalone-page .programme-content-shell {
      border-radius: 18px;
      padding: 14px 8px 0;
    }

    body.programme-management-standalone-page .programme-content-topbar {
      align-items: flex-start;
      flex-direction: column;
    }

    body.programme-management-standalone-page .programme-back-button {
      align-self: flex-start;
    }

    body.programme-management-standalone-page .programme-module-grid {
      grid-template-columns: minmax(0, 1fr);
      gap: 12px;
      width: 100%;
    }

    body.programme-management-standalone-page .programme-module-card {
      max-width: none;
      min-height: 215px;
      padding: 24px 20px;
    }

    body.programme-management-standalone-page .programme-panel {
      padding: 16px 10px 0;
      width: 100%;
    }

    body.programme-management-content-page .programme-module-header {
      margin-left: -10px;
      margin-right: -10px;
      padding-left: 12px;
      padding-right: 12px;
    }

    body.programme-management-content-page .programme-module-header-actions {
      align-items: stretch;
      flex-direction: column;
      gap: 7px;
    }

    body.programme-management-content-page .programme-module-header-actions .btn,
    body.programme-management-content-page .programme-module-header-actions > button,
    body.programme-management-content-page .programme-module-header-actions > a {
      width: 100%;
    }

    body.programme-management-standalone-page .programme-content-tabs {
      margin-bottom: 28px;
    }

    body.programme-management-standalone-page .programme-filter-row {
      justify-content: flex-end;
      flex-wrap: wrap;
    }

    body.programme-management-standalone-page .programme-filter-select {
      flex-basis: 156px;
      width: min(100%, 156px);
    }

    body.programme-management-standalone-page .programme-actions {
      width: 100%;
    }

    body.programme-management-standalone-page .programme-action-button {
      flex: 1 1 auto;
    }

    body.programme-management-standalone-page .programme-search-row {
      justify-content: flex-end;
    }

    body.programme-management-standalone-page .programme-search-input {
      flex-basis: 156px;
      width: min(100%, 156px);
    }

    body.programme-management-standalone-page .programme-table-wrapper {
      overflow-x: auto;
      padding: 12px 12px 0;
    }

    body.programme-management-standalone-page .programme-learners-table {
      min-width: 720px;
    }

    body.programme-management-standalone-page .programme-learners-table thead th,
    body.programme-management-standalone-page .programme-learners-table tbody td {
      font-size: 12px;
      padding: 10px 9px;
    }

    body.programme-management-standalone-page .programme-learner-manage-toggle {
      max-width: 150px;
      padding-inline: 0.7rem !important;
    }

    body.programme-management-standalone-page .programme-learner-manage-toggle-label {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
  }

  /* Programme details â€“ learners table mobile tweaks */
  @media (max-width: 767.98px) {
    .programme-learners-table-wrapper {
      width: 100%;
      overflow-x: auto;
    }

    .programme-learners-table th,
    .programme-learners-table td {
      white-space: nowrap;
      font-size: 0.7rem;
      padding: 0.35rem 0.5rem;
    }

    .programme-learners-table thead {
      position: sticky;
      top: 0;
      z-index: 1;
    }
  }

  @media (max-width: 767.98px) {
    body.programme-management-standalone-page .programme-table-wrapper {
      padding: 12px;
      overflow: visible;
    }

    body.programme-management-standalone-page .programme-people-table,
    body.programme-management-standalone-page .programme-people-table tbody,
    body.programme-management-standalone-page .programme-people-table tr,
    body.programme-management-standalone-page .programme-people-table td {
      display: block;
      width: 100%;
    }

    body.programme-management-standalone-page .programme-people-table {
      min-width: 0;
      table-layout: auto;
      border-collapse: separate;
      border-spacing: 0;
    }

    body.programme-management-standalone-page .programme-people-table colgroup,
    body.programme-management-standalone-page .programme-people-table thead {
      display: none;
    }

    body.programme-management-standalone-page .programme-people-table .programme-person-row {
      position: relative;
      margin: 0 0 12px;
      padding: 10px 12px;
      border: 1px solid rgba(15, 23, 42, 0.08);
      border-radius: 8px;
      background: #fff;
      box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    }

    body.programme-management-standalone-page .programme-people-table .programme-person-row.d-none,
    body.programme-management-standalone-page .programme-people-table .programme-empty-row.d-none {
      display: none !important;
    }

    body.programme-management-standalone-page .programme-people-table .programme-person-row td {
      display: grid;
      grid-template-columns: minmax(7.5rem, 38%) minmax(0, 1fr);
      align-items: center;
      gap: 10px;
      min-height: 36px;
      padding: 7px 0;
      border-bottom: 1px solid rgba(15, 23, 42, 0.06);
      color: var(--pm-ink);
      font-size: 13px;
      text-align: right;
      white-space: normal;
      overflow-wrap: anywhere;
    }

    body.programme-management-standalone-page .programme-people-table .programme-person-row td:last-child {
      border-bottom: 0;
    }

    body.programme-management-standalone-page .programme-people-table .programme-person-row td::before {
      content: attr(data-label);
      color: var(--pm-muted);
      font-size: 12px;
      font-weight: 800;
      text-align: left;
      text-transform: none;
    }

    body.programme-management-standalone-page .programme-people-table .programme-person-name {
      text-align: right;
    }

    body.programme-management-standalone-page .programme-people-table .programme-learner-actions-cell {
      align-items: center;
      overflow: visible;
    }

    body.programme-management-standalone-page .programme-learner-manage-toggle {
      width: min(100%, 12.5rem);
      min-height: 32px;
      justify-content: center;
      padding-left: 12px !important;
      padding-right: 12px !important;
      white-space: nowrap;
    }

    body.programme-management-standalone-page .programme-learner-manage-toggle-label {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    body.programme-management-content-page .programme-learner-manage-dropdown .programme-learner-row-menu.show {
      max-width: min(12.5rem, calc(100vw - 2rem));
    }

    body.programme-management-standalone-page .programme-people-table .programme-empty-row td {
      display: block;
      padding: 16px 12px;
      text-align: center;
      white-space: normal;
    }
  }

  @container (max-width: 760px) {
    body.programme-management-standalone-page .programme-table-wrapper {
      padding: 12px;
      overflow: visible;
    }

    body.programme-management-standalone-page .programme-people-table,
    body.programme-management-standalone-page .programme-people-table tbody,
    body.programme-management-standalone-page .programme-people-table tr,
    body.programme-management-standalone-page .programme-people-table td {
      display: block;
      width: 100%;
    }

    body.programme-management-standalone-page .programme-people-table {
      min-width: 0;
      table-layout: auto;
      border-collapse: separate;
      border-spacing: 0;
    }

    body.programme-management-standalone-page .programme-people-table colgroup,
    body.programme-management-standalone-page .programme-people-table thead {
      display: none;
    }

    body.programme-management-standalone-page .programme-people-table .programme-person-row {
      position: relative;
      margin: 0 0 12px;
      padding: 10px 12px;
      border: 1px solid rgba(15, 23, 42, 0.08);
      border-radius: 8px;
      background: #fff;
      box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
    }

    body.programme-management-standalone-page .programme-people-table .programme-person-row.d-none,
    body.programme-management-standalone-page .programme-people-table .programme-empty-row.d-none {
      display: none !important;
    }

    body.programme-management-standalone-page .programme-people-table .programme-person-row td {
      display: grid;
      grid-template-columns: minmax(7.5rem, 38%) minmax(0, 1fr);
      align-items: center;
      gap: 10px;
      min-height: 36px;
      padding: 7px 0;
      border-bottom: 1px solid rgba(15, 23, 42, 0.06);
      color: var(--pm-ink);
      font-size: 13px;
      text-align: right;
      white-space: normal;
      overflow-wrap: anywhere;
    }

    body.programme-management-standalone-page .programme-people-table .programme-person-row td:last-child {
      border-bottom: 0;
    }

    body.programme-management-standalone-page .programme-people-table .programme-person-row td::before {
      content: attr(data-label);
      color: var(--pm-muted);
      font-size: 12px;
      font-weight: 800;
      text-align: left;
    }

    body.programme-management-standalone-page .programme-people-table .programme-person-name {
      text-align: right;
    }

    body.programme-management-standalone-page .programme-people-table .programme-learner-actions-cell {
      align-items: center;
      overflow: visible;
    }

    body.programme-management-standalone-page .programme-learner-manage-toggle {
      width: min(100%, 12.5rem);
      min-height: 32px;
      justify-content: center;
      padding-left: 12px !important;
      padding-right: 12px !important;
      white-space: nowrap;
    }

    body.programme-management-standalone-page .programme-learner-manage-toggle-label {
      min-width: 0;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    body.programme-management-content-page .programme-learner-manage-dropdown .programme-learner-row-menu.show {
      max-width: min(12.5rem, calc(100vw - 2rem));
    }

    body.programme-management-standalone-page .programme-people-table .programme-empty-row td {
      display: block;
      padding: 16px 12px;
      text-align: center;
      white-space: normal;
    }
  }

  .bg-outline-secondary {
    background: var(--badge-color)
  }

  .card-margin-top {
    margin-top: 1.5rem !important;
  }

  /* Homepage academic hero: sits right under the header, so it only
     needs a hairline gap instead of the shared page top-spacing.
     Scoped to .learner-home-dashboard-page (not body.learner-homepage-layout,
     which several other learner pages also set) so it doesn't shrink the
     top spacing on those other pages. Padding can't go negative, so the
     -7px pull comes from margin-top below. */
  .learner-home-dashboard-page.academic-page {
    padding-top: 0;
  }

  .learner-home-dashboard-page.card-margin-top {
    margin-top: -7px !important;
  }

  /* Teacher curriculum view: match the learner homepage's tight top
     spacing above the hero card instead of the shared page top-spacing. */
  .teacher-subject-curriculum-page.academic-page {
    padding-top: 0;
  }

  .teacher-subject-curriculum-page.card-margin-top {
    margin-top: -7px !important;
  }

  /* Learner Certificates / Assessments / Evaluations header cards: these
     pages stack the shared .academic-page padding-top (1.75rem) with
     .card-margin-top (1.5rem), leaving a large gap above the hero card.
     Tighten both, scoped to each page's own class so other .academic-page
     / .card-margin-top consumers are unaffected. */
  .learner-certificates-page.academic-page {
    padding-top: 0;
    margin-top: -7px !important;
  }

  .learner-assessments-page.academic-page {
    padding-top: 0;
  }

  .learner-assessments-page.card-margin-top {
    margin-top: -7px !important;
  }

  /* My Groups (Teams) header card: same treatment as My Courses/Certificates
     /Assessments above. This page's own margin control is .tables-margin-top
     (already scoped for it elsewhere) rather than .card-margin-top, so only
     the shared .academic-page padding-top needs zeroing here. */
  .learner-teams-page.academic-page {
    padding-top: 0;
  }

  .card-margin-top-home {
    margin-top: -1.5rem !important;
  }

  /* Evaluation Report / Skills Reports pages: the very first screenshots of
     this issue already showed a properly rounded, floating sidebar card --
     the only real problem was empty space *inside* that card before "Home"
     appeared. Earlier attempts also zeroed .orcaa-sidebar-container's and
     .orcaa-sidebar's own margin/padding (which control the card's outer
     position, size, and where its rounded top corner clears the fixed
     .app-topnav header -- .sidebar is z-index:106, above the header's z-99,
     so with too little top offset the card is pushed up underneath/behind
     the header's painted area instead of floating below it) -- that broke
     the card shape itself. Left untouched now, on purpose. Only the *inner*
     content offset is reduced: .programme-icons-sidebar's own padding-top
     (default 3rem) and the .card-margin-top utility already applied to that
     same content div (1.5rem) -- these are what were pushing "Home" down
     well past the top of an otherwise correctly-shaped card. */
  body.skills-report-flush-sidebar .programme-icons-sidebar {
    padding-top: 0.1rem;
  }

  body.skills-report-flush-sidebar .programme-icons-sidebar.card-margin-top {
    margin-top: 0 !important;
  }

  /* Written Assessment view: same flush-sidebar treatment as the Evaluation
     Report / Skills Reports pages above -- the sidebar card itself is fine,
     only the empty space inside it before "Home" needs trimming. */
  body.written-assessment-view-page .programme-icons-sidebar {
    padding-top: 0.1rem;
  }

  body.written-assessment-view-page .programme-icons-sidebar.card-margin-top {
    margin-top: 0 !important;
  }

  @media (min-width: 1200px) {
    body.programme-details-compact #status_tabContent {
      padding-left: 0 !important;
      padding-right: 0 !important;
      padding-top: 0 !important;
      padding-bottom: 0 !important;
      margin-left: -0.8rem !important;
      margin-right: 0 !important;
      width: 100%;
      max-width: none;
    }

    body.programme-details-compact #status_tabContent > .card {
      width: 104%;
      max-width: none;
      margin-left: -1.0rem !important; /* 76px */
      margin-right: 0 !important;
      margin-top: -3rem !important;
    }

    body.programme-details-compact .card-margin-top {
      margin-top: 2.85rem !important;
    }

    body.programme-details-compact #app .card-body {
      padding: 0.9rem !important;
    }

    body.programme-details-compact #app h5,
    body.programme-details-compact #app .h5 {
      font-size: 0.84rem;
    }

    body.programme-details-compact #app .text-sm {
      font-size: 0.86rem !important;
    }

    body.programme-details-compact #app .text-xs {
      font-size: 0.78rem !important;
    }

    body.programme-details-compact #app .text-xxs,
    body.programme-details-compact #app .small,
    body.programme-details-compact #app small {
      font-size: 0.72rem !important;
    }

    body.programme-details-compact #app .btn-sm {
      font-size: 0.72rem;
      padding: 0.34rem 0.72rem;
    }

    body.programme-details-compact #app .dashboard-card,
    body.programme-details-compact #app .dashboard-card-stat,
    body.programme-details-compact #app .programme-management-card,
    body.programme-details-compact #app .programme-courses-content-card,
    body.programme-details-compact #app .programme-courses-embed-wrapper .card,
    body.programme-details-compact #app .card.border-light.shadow {
      transform: scale(0.92);
      transform-origin: top center;
    }

    body.programme-details-compact #app .programme-courses-content-card {
      width: 105%;
      max-width: none;
      margin-left: -3.5rem;
    }

    body.programme-details-compact #app.container-fluid,
    body.programme-details-compact .container-fluid.card-margin-top {
      padding-left: 0 !important;
      padding-right: 0 !important;
    }

    body.programme-details-compact #app > .pe-5,
    body.programme-details-compact #app > .pe-md-0,
    body.programme-details-compact #app > .px-3,
    body.programme-details-compact #app > .me-2 {
      padding-right: 0 !important;
      padding-left: 0 !important;
      margin-right: 0 !important;
    }

    body.programme-details-compact .programme-icons-sidebar {
      width: 112px;
      padding: 1rem 0.4rem;
      align-items: center;
      margin-left: auto;
      margin-right: auto;
    }

    body.programme-details-compact .programme-icons-sidebar .nav-item {
      min-height: 56px;
      padding: 0.5rem 0.3rem;
      width: 100%;
      display: flex;
      justify-content: flex-end;
      margin-bottom: 0.75rem;
    }

    body.programme-details-compact .programme-icon-link {
      width: 82px;
      align-items: center;
      justify-content: center;
      margin-left: auto;
      margin-bottom: 0;
    }

    body.programme-details-compact .programme-icon-circle {
      height: 2.25rem;
      width: 2.25rem;
      margin-bottom: 0.45rem;
    }

    body.programme-details-compact .programme-icon-circle i {
      font-size: 1.15rem;
    }

    body.programme-details-compact .programme-icon-label {
      font-size: 0.8rem;
      line-height: 1.25;
      text-align: center;
    }

    body.programme-details-compact .programme-icons-sidebar .nav-item.active .programme-icon-pill,
    body.programme-details-compact .programme-icons-sidebar .nav-item.active .programme-icon-link {
      width: 82px;
      max-width: 82px;
      min-height: 78px;
      border-radius: 14px;
      margin-left: auto;
      margin-right: auto;
      padding: 0.6rem 0.4rem;
    }

    body.programme-details-compact #app .row {
      --bs-gutter-x: 0.85rem;
      --bs-gutter-y: 0.85rem;
    }

    body.programme-details-compact #app .mb-4 {
      margin-bottom: 0.9rem !important;
    }

    body.programme-details-compact #app .mb-3 {
      margin-bottom: 0.7rem !important;
    }
  }

  /* On mobile, reduce the vertical offset for card-margin-top and card-margin-top-home */
  @media (max-width: 767.98px) {
    body.programme-details-compact #status_tabContent {
      width: 100%;
      max-width: 100%;
      margin-left: auto !important;
      margin-right: auto !important;
      padding-left: 0.75rem !important;
      padding-right: 0.75rem !important;
    }

    body.programme-details-compact #status_tabContent.pe-5,
    body.programme-details-compact #status_tabContent.pe-md-0,
    body.programme-details-compact #status_tabContent.me-2,
    body.programme-details-compact #status_tabContent.px-3 {
      padding-left: 0.75rem !important;
      padding-right: 0.75rem !important;
      margin-right: auto !important;
    }

    body.programme-details-compact #status_tabContent > .card.border-light.shadow,
    body.programme-details-compact #status_tabContent > .card {
      width: 100%;
      max-width: 100%;
      margin-left: auto !important;
      margin-right: auto !important;
    }

    body.programme-details-compact #status_tabContent > .card > .card-body,
    body.programme-details-compact #status_tabContent > .card > .card-body.p-4 {
      padding-left: 0.8rem !important;
      padding-right: 0.8rem !important;
      padding-top: 0.8rem !important;
      padding-bottom: 0.8rem !important;
    }

    body.programme-details-compact #programme-assessments-states {
      margin-top: 0.75rem !important;
      padding-top: 0.75rem !important;
    }

    body.programme-details-compact #programme-assessments-states .programme-assessments-embed-wrapper {
      margin-left: 0 !important;
      margin-right: 0 !important;
    }

    body.programme-details-compact #programme-assessments-manage-pane {
      margin-top: 0.75rem !important;
    }

    body.programme-details-compact #programme-assessments-manage-pane .table-responsive {
      overflow-x: auto;
      -webkit-overflow-scrolling: touch;
    }

    body.programme-details-compact #app h5,
    body.programme-details-compact #app .h5 {
      font-size: 0.76rem !important;
    }

    body.programme-details-compact #app .text-sm {
      font-size: 0.72rem !important;
    }

    body.programme-details-compact #app .text-xs {
      font-size: 0.66rem !important;
    }

    body.programme-details-compact #app .text-xxs,
    body.programme-details-compact #app .small,
    body.programme-details-compact #app small,
    body.programme-details-compact #app label,
    body.programme-details-compact #app p,
    body.programme-details-compact #app span,
    body.programme-details-compact #app a,
    body.programme-details-compact #app th,
    body.programme-details-compact #app td {
      font-size: 0.62rem !important;
    }

    body.programme-details-compact #app input,
    body.programme-details-compact #app select,
    body.programme-details-compact #app textarea {
      font-size: 0.64rem !important;
    }

    body.programme-details-compact #app .btn,
    body.programme-details-compact #app .btn-sm {
      font-size: 0.6rem !important;
      line-height: 1.15 !important;
      padding: 0.22rem 0.46rem !important;
      border-radius: 0.7rem;
    }

    body.programme-details-compact #app .rounded-pill.btn,
    body.programme-details-compact #app .btn.rounded-pill {
      padding: 0.22rem 0.48rem !important;
      border-radius: 999px !important;
    }

    body.programme-details-compact #app .text-xxs.btn,
    body.programme-details-compact #app .btn .text-xxs {
      font-size: 0.6rem !important;
    }

    body.programme-details-compact #app .programme-tabs .nav-link,
    body.programme-details-compact #app .nav-pills .nav-link,
    body.programme-details-compact #app .nav-link.btn {
      font-size: 0.62rem !important;
      padding: 0.28rem 0.5rem !important;
    }

    body.programme-details-compact #app .programme-state-card-link .btn,
    body.programme-details-compact #app .qualification-admin-nav-link .btn,
    body.programme-details-compact #app .programme-assessments-dashboard-link .btn,
    body.programme-details-compact #app .programme-assessments-manage-link .btn {
      font-size: 0.62rem !important;
      padding: 0.2rem 0.45rem !important;
    }

    body.programme-details-compact #app .program-tree-card-action-btn {
      flex: 0 0 auto;
      min-width: 0;
      font-size: 0.6rem !important;
      padding: 0.22rem 0.44rem !important;
    }

    body.programme-details-compact #app .program-tree-card-manage-btn {
      font-size: 0.6rem !important;
      padding: 0.22rem 0.44rem !important;
    }

    body.programme-details-compact #app .program-tree-card-manage-menu {
      width: min(18rem, calc(100vw - 1rem));
      max-width: min(18rem, calc(100vw - 1rem));
      padding: 0.3rem;
    }

    body.programme-details-compact #app .program-tree-card-manage-menu .program-tree-card-menu-item {
      font-size: 0.65rem;
      padding: 0.42rem 0.6rem;
    }

    body.programme-details-compact #app .program-tree-card-icon-btn,
    body.programme-details-compact #app .program-tree-card-menu-btn,
    body.programme-details-compact #app .program-sub-toggle-btn,
    body.programme-details-compact #app .program-tree-card-open-link {
      width: 1.7rem;
      height: 1.7rem;
      font-size: 0.82rem;
    }

    .card-margin-top,
    .card-margin-top-home {
      margin-top: 0.5rem !important;
    }

    /* Keep curriculum content below the mobile hero/header.
       The previous large negative offset caused cards to overlap
       and clip the heading on learner course-curriculum pages. */
    .teacher-subject-curriculum-page.card-margin-top.monitoring-margin-top {
      margin-top: 0.45rem !important;
    }
  }

  /* Learner profile (internCharts) needs extra space below navbar */
  @media (max-width: 767.98px) {
    .learner-activity-profile.card-margin-top {
      margin-top: 1.5rem !important;
    }
  }

  @media (min-width: 768px) {
    .learner-activity-profile.card-margin-top {
      margin-top: 0.35rem !important;
    }

    body.learner-profile-admin-sidebar-page .home-section {
      left: 117px !important;
      width: calc(100% - 117px) !important;
      max-width: calc(100vw - 117px) !important;
      margin-inline: 0 !important;
      padding-inline: 0 !important;
      overflow-x: visible;
      box-sizing: border-box;
    }

    body.learner-profile-admin-sidebar-page .learner-activity-profile {
      margin-top: -3px !important;
      margin-left: 0.0078125rem !important;
      margin-right: 0.0078125rem !important;
      padding-inline: 0 !important;
      width: calc(100% - 0.015625rem);
      max-width: 100%;
      overflow-x: visible;
      box-sizing: border-box;
    }

    body.learner-profile-admin-sidebar-page .learner-activity-profile > *:not(.modal) {
      min-width: 0;
      max-width: 100%;
      box-sizing: border-box;
    }

    body.learner-profile-admin-sidebar-page .learner-header-section,
    body.learner-profile-admin-sidebar-page .learner-profile-main-row {
      width: calc(100% - 1rem);
      max-width: none;
    }

    body.learner-profile-admin-sidebar-page .learner-profile-main-row {
      margin-left: 0 !important;
      margin-right: 0 !important;
    }

    body.learner-profile-admin-sidebar-page .learner-profile-main-row > [class*="col-"] {
      padding-left: 0 !important;
      padding-right: 0 !important;
    }

    body.learner-profile-admin-sidebar-page .learner-profile-status-actions {
      padding-right: 3rem;
      box-sizing: border-box;
    }
  }

  .table-light {
    --bs-table-bg:var(--primary-color);
    --bs-table-striped-bg: #ecedee;
    --bs-table-striped-color: #000;
    --bs-table-active-bg: #dfe0e1;
    --bs-table-active-color: #000;
    --bs-table-hover-bg: #e5e6e7;
    --bs-table-hover-color: #000;
    color: #000;
    border-color: #dfe0e1;
}

.academic-page .grade-header {
  border: none;
  outline: none;
  background-color: #f9fafb;
  color: #111827;
  border-radius: 14px;
  padding: 0.85rem 1.25rem;
  min-height: 35px;
  font-weight: 600;
  font-size: 14px;
}

.academic-page .grade-header i {
  font-size: 16px;
}

.academic-page .grade-header[aria-expanded="true"] {
  background-color: var(--navbar-bg-color);
  color: #111827;
}
.modal-header i.fa-times[data-bs-dismiss="modal"] {
  cursor: pointer;
}

/* Parent My Children â€“ mobile column width tweak for cards */
@media (max-width: 767.98px) {
  body.parent-my-children-layout .card-gap .col-12 {
    flex: 0 0 auto;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
}

.mobile-nav-width {
    width: 100% !important;
}

@media (max-width: 767.98px) {
  .home-section.admin-home-layout {
    left: 0 !important;
    width: 100% !important;
    top: 6.75rem !important;
    margin: 0 !important;
    padding: 0.7rem 0.45rem 6rem !important;
    padding-bottom: calc(6rem + env(safe-area-inset-bottom)) !important;
    box-sizing: border-box;
    overflow-x: hidden;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  /* iPhone/Safari-safe: avoid clipped admin-home content caused by
     narrow viewport + inherited fixed container widths. */
  .home-section.admin-home-layout .container-lg,
  .home-section.admin-home-layout .container-md,
  .home-section.admin-home-layout .container-sm,
  .home-section.admin-home-layout .container-xl {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
  }

  .home-section.admin-home-layout,
  .home-section.admin-home-layout #status_tabContent,
  .home-section.admin-home-layout #status_tabContent > .card,
  .home-section.admin-home-layout #status_tabContent > .card > .card-body {
    max-width: 100vw !important;
    overflow-x: hidden !important;
  }

  .home-section.admin-home-layout.mx-4 {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .home-section.admin-home-layout .admin-home-dashboard-shell,
  .home-section.admin-home-layout .container-fluid,
  .home-section.admin-home-layout .superset-container,
  .home-section.admin-home-layout #admin-content-area,
  .home-section.admin-home-layout #dashboard-container {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box;
  }

  .home-section.admin-home-layout .superset-container {
    height: auto !important;
    min-height: calc(100vh - 11rem);
  }

  .home-section.admin-home-layout #dashboard-container {
    height: calc(100vh - 11rem) !important;
    min-height: 32rem;
    overflow: hidden;
  }

  .home-section.admin-home-layout #dashboard-container iframe {
    width: 100% !important;
    max-width: 100% !important;
  }

  .home-section.admin-home-layout .dashboard-section-stat > .row,
  .home-section.admin-home-layout .dashboard-section-stat .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .home-section.admin-home-layout .dashboard-section-stat .col,
  .home-section.admin-home-layout .dashboard-section-stat [class*="col-"] {
    min-width: 0;
    padding: 0.35rem !important;
  }

  .home-section.admin-home-layout .dashboard-card-stat {
    width: 100%;
    min-height: 100%;
  }

  .home-section.admin-home-layout .dashboard-card-stat .card-body {
    width: 100%;
    height: auto;
    min-height: 7.5rem;
  }

  .home-section.admin-home-layout .dashboard-card-stat .card-text {
    font-size: 0.8rem;
    line-height: 1.25;
  }
}

@media (max-width: 767.98px) {
  /* The legacy collapsed-sidebar rules can shift fixed navigation by 60px.
     The unified header must always span the phone viewport independently of
     the sidebar state. */
  .profile-menu.app-topnav {
    left: 0 !important;
    right: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: 0 !important;
    box-sizing: border-box;
    overflow: visible;
  }

  .sidebar.sidebar-md.active ~ .home-section {
    left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  .sidebar.sidebar-md.active ~ .home-section nav {
    left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
  }

  .app-topnav__row {
    min-width: 0;
  }

  .app-topnav__brand {
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
  }

  .app-topnav__brand-copy {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }

  .app-topnav__greeting-title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .app-topnav__actions {
    flex: 0 0 auto;
  }

  .top-learning-navbar.mobile-nav-width {
    width: 100% !important;
    max-width: 100vw !important;
    left: 0 !important;
    right: 0 !important;
  }

  .sidebar.sidebar-md {
    width: 100% !important;
    max-width: 100vw !important;
  }

  .sidebar.sidebar-md .orcaa-sidebar-container {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .sidebar.sidebar-md .orcaa-sidebar {
    width: max-content !important;
    min-width: 100%;
    max-width: none !important;
    overflow: visible;
    padding-top: 0.12rem;
    padding-bottom: 0.12rem;
  }

  .sidebar.sidebar-md .orcaa-sidebar-container::-webkit-scrollbar {
    height: 4px;
  }

  .sidebar.sidebar-md .orcaa-sidebar-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.45);
    border-radius: 999px;
  }

  .sidebar.sidebar-md .orcaa-sidebar .programme-icons-sidebar {
    flex-wrap: nowrap !important;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.25rem;
    width: max-content;
    min-width: 100%;
    overflow: visible;
    scroll-snap-type: x proximity;
    margin-top: 0 !important;
    padding: 0.08rem 0.3rem 0.1rem;
  }

  .sidebar.sidebar-md .orcaa-sidebar .programme-icon-circle {
    width: 30px;
    height: 30px;
    margin-bottom: 0;
  }

  .sidebar.sidebar-md .orcaa-sidebar .programme-icon-circle i {
    font-size: 13px;
  }

  .sidebar.sidebar-md .orcaa-sidebar .home-root-link .programme-icon-circle {
    width: 32px;
    height: 32px;
  }

  .sidebar.sidebar-md .orcaa-sidebar .home-root-link .programme-icon-circle i {
    font-size: 14px;
  }

  .sidebar.sidebar-md .orcaa-sidebar .programme-icon-link,
  .sidebar.sidebar-md .orcaa-sidebar .home-root-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.15rem;
    flex: 0 0 5.5rem;
    width: 5.5rem;
    min-width: 5.5rem;
    max-width: 5.5rem;
    min-height: 4rem;
    padding: 0.3rem 0.3rem;
    margin: 0 !important;
    box-sizing: border-box;
    scroll-snap-align: start;
  }

  .sidebar.sidebar-md .orcaa-sidebar .programme-icon-label {
    display: block;
    width: 100%;
    max-width: 100%;
    font-size: 0.7rem !important;
    line-height: 1.1;
    white-space: normal !important;
    word-break: break-word;
    overflow-wrap: anywhere;
    text-align: center;
    min-height: 1.9em;
    overflow: visible;
  }

  .sidebar.sidebar-md .orcaa-sidebar-container .nav-item.active {
    width: 5.5rem !important;
    min-width: 5.5rem;
    max-width: 5.5rem;
    min-height: 4rem;
    margin-top: 0.05rem !important;
    margin-bottom: 0.05rem !important;
    border-radius: 0.85rem;
  }

  .app-home-list > .programme-icons-sidebar {
    justify-content: flex-start !important;
    align-items: center !important;
    gap: 0.25rem;
    width: max-content;
    min-width: 100%;
    padding: 0.08rem 0.3rem 0.1rem;
    margin: 0;
  }

  .app-home-list #home-admin-fixed-sidebar,
  .app-home-list #home-default-sidebar,
  .app-programme-cards-list .mentor-primary-sidebar {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.25rem;
    width: max-content;
    min-width: 0;
    padding: 0 !important;
    margin: 0 !important;
  }

  .app-home-list .programme-icon-link,
  .app-home-list .home-root-link,
  .app-programme-cards-list .mentor-primary-sidebar .programme-icon-link {
    flex: 0 0 5.35rem;
    width: 5.35rem;
    min-width: 5.35rem;
    max-width: 5.35rem;
  }

  .app-home-list .programme-icon-label,
  .app-programme-cards-list .mentor-primary-sidebar .programme-icon-label {
    font-size: 0.58rem !important;
    min-height: 1.9em;
  }

  .app-home-list .home-root-link .programme-icon-label {
    min-height: 1.9em;
  }

  .app-home-list .nav-item.active,
  .app-home-list #home-admin-fixed-sidebar > .nav-item.active,
  .app-home-list #home-default-sidebar > .nav-item.active,
  .app-home-list .home-root-link.active,
  .app-programme-cards-list .mentor-primary-sidebar > .nav-item.active,
  .sidebar.sidebar-md .orcaa-sidebar-container .nav-item.active {
    width: 5.35rem !important;
    min-width: 5.35rem;
    max-width: 5.35rem;
    min-height: 3.7rem;
    margin-top: 0.05rem !important;
    margin-bottom: 0.05rem !important;
    border-radius: 0.85rem;
  }

  .app-course-list #learner-course-sidebar {
    align-items: center !important;
    gap: 0.35rem;
    padding-top: 0.3rem !important;
    padding-bottom: 0.3rem !important;
  }

  .app-course-list #learner-course-sidebar > .programme-icon-link {
    min-height: 3.4rem;
    margin-top: 0.15rem !important;
    margin-bottom: 0 !important;
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
    border-radius: 0.8rem;
    align-self: center;
  }

  .app-course-list #learner-course-sidebar > .programme-icon-link .programme-icon-label {
    min-height: 1.9em;
  }

  .app-course-list #learner-course-sidebar > .programme-icon-link.active {
    min-height: 3.4rem;
    margin-top: 0.15rem !important;
    margin-bottom: 0 !important;
    padding-top: 0.3rem;
    padding-bottom: 0.3rem;
    align-self: center;
  }

  /* Mentor mobile sidebar: let the active item reach the bottom edge of the
     bottom navigation without the row's default bottom padding showing below
     the purple highlight. */
  .app-course-list #teacher-course-sidebar {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  .app-course-list #teacher-course-sidebar > .programme-icon-link.active {
    min-height: 4rem;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    align-self: stretch;
  }
}

/* Keep iPad/tablet admin-home layout consistent across browsers even when
   a browser reports a sub-768 viewport width. */
@media (max-width: 767.98px) {
  body.admin-home-tablet-stable .top-learning-navbar.mobile-nav-width {
    width: calc(100% - 99px) !important;
    max-width: none !important;
    left: 92px !important;
    right: auto !important;
  }

  body.admin-home-tablet-stable .home-section.admin-home-layout {
    left: 92px !important;
    width: calc(100% - 99px) !important;
    top: 153px !important;
    margin: 0 !important;
    padding: 15px !important;
    overflow-x: visible !important;
  }

  body.admin-home-tablet-stable .home-section.admin-home-layout #status_tabContent,
  body.admin-home-tablet-stable .home-section.admin-home-layout #status_tabContent.pe-5,
  body.admin-home-tablet-stable .home-section.admin-home-layout #status_tabContent.pe-md-0,
  body.admin-home-tablet-stable .home-section.admin-home-layout #status_tabContent.me-2,
  body.admin-home-tablet-stable .home-section.admin-home-layout #status_tabContent.px-3 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
    margin-right: 0 !important;
  }

  body.admin-home-tablet-stable .sidebar.sidebar-md {
    top: 0 !important;
    bottom: auto !important;
    left: 0 !important;
    margin-left: 10px !important;
    margin-top: 27px !important;
    width: 20px !important;
    max-width: none !important;
    height: 100% !important;
    z-index: 90 !important;
  }

  body.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar-container {
    height: 100vh !important;
    width: 200px !important;
    max-width: 125px !important;
    margin-top: 2.5rem !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  body.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar {
    height: 80vh !important;
    width: 115px !important;
    margin-top: 2.8rem !important;
    border-radius: 26px !important;
    background-color: var(--orcaa-sidebar-white) !important;
    box-shadow: 0 0 15px var(--orcaa-sidebar-shadow) !important;
    padding-top: 1.5rem !important;
    padding-bottom: 0 !important;
  }

  body.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar .programme-icons-sidebar,
  body.admin-home-tablet-stable .app-home-list > .programme-icons-sidebar,
  body.admin-home-tablet-stable .app-home-list #home-admin-fixed-sidebar,
  body.admin-home-tablet-stable .app-home-list #home-default-sidebar,
  body.admin-home-tablet-stable .app-home-list .team-admin-primary-sidebar,
  body.admin-home-tablet-stable .app-home-list .local-admin-primary-sidebar,
  body.admin-home-tablet-stable .app-home-list .mentor-primary-sidebar {
    flex-direction: column !important;
    flex-wrap: nowrap !important;
    align-items: stretch !important;
    justify-content: flex-start !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 0 !important;
    gap: 0 !important;
    margin: 0 !important;
  }

  body.admin-home-tablet-stable .app-home-list .team-admin-primary-sidebar,
  body.admin-home-tablet-stable .app-home-list .local-admin-primary-sidebar,
  body.admin-home-tablet-stable .app-home-list .mentor-primary-sidebar {
    padding-top: 1rem !important;
  }

  body.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar .programme-icon-link,
  body.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar .home-root-link,
  body.admin-home-tablet-stable .app-home-list .programme-icon-link,
  body.admin-home-tablet-stable .app-home-list .home-root-link,
  body.admin-home-tablet-stable .app-home-list .nav-item.active,
  body.admin-home-tablet-stable .app-home-list #home-admin-fixed-sidebar > .nav-item.active,
  body.admin-home-tablet-stable .app-home-list #home-default-sidebar > .nav-item.active,
  body.admin-home-tablet-stable .app-home-list .home-root-link.active,
  body.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar-container .nav-item.active {
    width: calc(100% - 0.85rem) !important;
    min-width: 0 !important;
    max-width: calc(100% - 0.85rem) !important;
    min-height: 3.45rem !important;
    padding: 0.34rem 0.38rem 0.4rem !important;
    gap: 0.18rem !important;
    margin: 0 auto 0.42rem auto !important;
    border-radius: 0.9rem;
    box-sizing: border-box;
  }

  body.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar .programme-icon-circle,
  body.admin-home-tablet-stable .app-home-list .programme-icon-circle {
    width: 1.72rem !important;
    height: 1.72rem !important;
    margin-bottom: 0 !important;
  }

  body.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar .programme-icon-circle i,
  body.admin-home-tablet-stable .app-home-list .programme-icon-circle i {
    font-size: 0.95rem !important;
    line-height: 1 !important;
    color: #0f172a !important;
  }

  body.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar .programme-icon-label,
  body.admin-home-tablet-stable .app-home-list .programme-icon-label {
    font-size: 0.74rem !important;
    font-weight: 500 !important;
    line-height: 1.1 !important;
    min-height: 0 !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    letter-spacing: 0.01em;
    text-align: center !important;
    color: #111827 !important;
  }

  body.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar .nav-item.active .programme-icon-circle i,
  body.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar .nav-item.active .programme-icon-label,
  body.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar .programme-icon-link.active .programme-icon-circle i,
  body.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar .programme-icon-link.active .programme-icon-label,
  body.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar .home-root-link.active .programme-icon-circle i,
  body.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar .home-root-link.active .programme-icon-label,
  body.admin-home-tablet-stable .app-home-list .nav-item.active .programme-icon-circle i,
  body.admin-home-tablet-stable .app-home-list .nav-item.active .programme-icon-label,
  body.admin-home-tablet-stable .app-home-list .programme-icon-link.active .programme-icon-circle i,
  body.admin-home-tablet-stable .app-home-list .programme-icon-link.active .programme-icon-label,
  body.admin-home-tablet-stable .app-home-list .home-root-link.active .programme-icon-circle i,
  body.admin-home-tablet-stable .app-home-list .home-root-link.active .programme-icon-label {
    color: #fff !important;
  }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
  body.programme-cards-medium-bootstrap .app-home-list .team-admin-primary-sidebar,
  body.programme-cards-medium-bootstrap .app-home-list .local-admin-primary-sidebar,
  body.programme-cards-medium-bootstrap .app-home-list .mentor-primary-sidebar {
    margin-top: 0 !important;
    padding-top: 1rem;
    padding-bottom: 1rem;
  }
}

/* Learner pages: tighten hero and buttons for mobile readability. */
@media (max-width: 767.98px) {
  body.teacher-curriculum-mobile-shell .home-section,
  body.teacher-curriculum-mobile-shell .sidebar.active ~ .home-section {
    left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body.teacher-curriculum-mobile-shell .sidebar.active {
    width: 0 !important;
  }

  body.teacher-curriculum-mobile-shell .home-section nav,
  body.teacher-curriculum-mobile-shell .sidebar.active ~ .home-section nav {
    left: 0 !important;
    width: 100% !important;
  }

  body.teacher-curriculum-mobile-shell .mobile-learner-home.card-margin-top {
    margin-top: 1.2rem !important;
    padding-bottom: 0 !important;
  }

  body.teacher-curriculum-mobile-shell .mobile-learner-hero {
    margin-top: 0 !important;
  }

  body.teacher-curriculum-mobile-shell .mobile-learner-hero-header {
    margin-bottom: 0.8rem !important;
  }

  body.teacher-curriculum-mobile-shell .teacher-subject-curriculum-page.card-margin-top.monitoring-margin-top {
    margin-top: 0.85rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.teacher-curriculum-mobile-shell .teacher-subject-curriculum-page > .row {
    --bs-gutter-x: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body.teacher-curriculum-mobile-shell .teacher-subject-curriculum-page > .row > [class*="col-"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.teacher-curriculum-mobile-shell .teacher-subject-curriculum-page .mobile-course-weeks,
  body.teacher-curriculum-mobile-shell .teacher-subject-curriculum-page .mobile-course-curriculum,
  body.teacher-curriculum-mobile-shell .teacher-subject-curriculum-page .teacher-monitor-tabs {
    width: calc(100% - 1.7rem) !important;
    max-width: 27.5rem;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body.teacher-curriculum-mobile-shell .teacher-subject-curriculum-page .mobile-module-card,
  body.teacher-curriculum-mobile-shell .teacher-subject-curriculum-page .curriculum-card {
    width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body.teacher-curriculum-mobile-shell .teacher-subject-curriculum-page .mobile-course-curriculum {
    margin-top: 0.85rem !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* teacher_course_curriculum / teacher_subject_curriculum mobile:
     force full-width content lane even if sidebar stays "active". */
  body:has(.teacher-subject-curriculum-page) .sidebar.active {
    width: 0 !important;
  }

  body:has(.teacher-subject-curriculum-page) .sidebar.active ~ .home-section {
    left: 0 !important;
    width: 100% !important;
  }

  body:has(.teacher-subject-curriculum-page) .sidebar.active ~ .home-section nav {
    left: 0 !important;
    width: 100% !important;
  }

  body:has(.teacher-subject-curriculum-page) .teacher-subject-curriculum-page.card-margin-top.monitoring-margin-top {
    margin-top: 0.65rem !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body:has(.teacher-subject-curriculum-page) .teacher-subject-curriculum-page > .row {
    --bs-gutter-x: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body:has(.teacher-subject-curriculum-page) .teacher-subject-curriculum-page > .row > [class*="col-"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body:has(.teacher-subject-curriculum-page) .teacher-subject-curriculum-page .mobile-course-weeks,
  body:has(.teacher-subject-curriculum-page) .teacher-subject-curriculum-page .mobile-course-curriculum,
  body:has(.teacher-subject-curriculum-page) .teacher-subject-curriculum-page .teacher-monitor-tabs {
    width: calc(100% - 1.7rem) !important;
    max-width: 27.5rem;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body:has(.teacher-subject-curriculum-page) .teacher-subject-curriculum-page .mobile-module-card,
  body:has(.teacher-subject-curriculum-page) .teacher-subject-curriculum-page .curriculum-card {
    width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body.learner-mobile-layout {
    margin: 0 !important;
    overflow-x: hidden;
    --learner-mobile-card-gutter: 0.85rem;
    --learner-mobile-card-max-width: 27.5rem;
  }

  body.learner-mobile-layout .sidebar.active {
    width: 0 !important;
  }

  body.learner-mobile-layout .home-section,
  body.learner-mobile-layout .sidebar.active ~ .home-section {
    left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
  }

  body.learner-mobile-layout .home-section.mx-4,
  body.learner-mobile-layout .sidebar.active ~ .home-section.mx-4 {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* internCharts (Chief Luthuli learner profile/progress page): the container
     still carries Bootstrap's mx-3/px-3 utility spacing on top of the
     home-section gutter above, which left a left/right inset even after that
     was flattened. Flatten it too so the header/stat cards run edge-to-edge. */
  body.learner-mobile-layout .learner-activity-profile {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    max-width: 100% !important;
  }

  body.learner-mobile-layout .home-section nav,
  body.learner-mobile-layout .sidebar.active ~ .home-section nav {
    left: 0 !important;
    width: 100% !important;
  }

  body.learner-mobile-layout .mobile-learner-home.learner-assessments-mobile-home,
  body.learner-mobile-layout .mobile-learner-home.learner-teams-mobile-home,
  body.learner-mobile-layout .mobile-learner-home.learner-certificates-mobile-home {
    padding-bottom: 0 !important;
  }

  body.learner-mobile-layout .mobile-learner-home {
    margin: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
  }

  body.learner-mobile-layout .mobile-learner-hero {
    margin: 0 !important;
    margin-top: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    padding: 0.55rem 0.65rem 0.65rem !important;
  }

  body.learner-mobile-layout .mobile-learner-hero-header {
    padding-right: 2.15rem !important;
    margin-top: 0 !important;
  }

  body.learner-mobile-layout .mobile-learner-hero .mobile-back-wrapper {
    top: 0.38rem;
    right: 0.45rem;
  }

  body.learner-mobile-layout .mobile-learner-hero .mobile-hello {
    font-size: 0.72rem;
  }

  body.learner-mobile-layout .mobile-learner-hero .mobile-program-name {
    font-size: 1.05rem;
    line-height: 1.25;
  }

  body.learner-mobile-layout .mobile-learner-hero .mobile-program-subtitle {
    font-size: 0.68rem;
    line-height: 1.3;
  }

  body.learner-mobile-layout .mobile-learner-margins {
    margin-left: var(--learner-mobile-card-gutter) !important;
    margin-right: var(--learner-mobile-card-gutter) !important;
  }

  body.learner-mobile-layout .mobile-learner-section,
  body.learner-mobile-layout .learner-certificates-page .learner-certificates-empty-wrap,
  body.learner-mobile-layout .learner-teams-page .learner-teams-empty-wrap {
    max-width: 26.5rem;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body.learner-mobile-layout .learner-assessments-page,
  body.learner-mobile-layout .learner-teams-page,
  body.learner-mobile-layout .learner-certificates-page {
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0.7rem !important;
    padding-right: 0.7rem !important;
  }

  body.learner-mobile-layout .learner-assessments-page .btn.btn-sm,
  body.learner-mobile-layout .learner-certificates-page .btn.btn-sm,
  body.learner-mobile-layout .learner-teams-page .btn.btn-sm {
    font-size: 0.68rem !important;
    line-height: 1.2 !important;
    padding: 0.23rem 0.45rem !important;
    white-space: nowrap;
  }

  body.learner-mobile-layout .learner-assessments-page .dataTables_wrapper .row:first-child {
    flex-wrap: wrap;
    gap: 0.45rem;
  }

  body.learner-mobile-layout .learner-assessments-page .dataTables_wrapper .row:first-child > div {
    flex: 0 0 100%;
    max-width: 100%;
  }

  body.learner-mobile-layout .learner-assessments-page .dataTables_wrapper .dataTables_filter input[type="search"] {
    width: 100%;
    max-width: 100%;
  }

  body.learner-mobile-layout .learner-assessments-page .learner-assessments-tabs {
    margin-left: 0 !important;
    margin-right: 0 !important;
    overflow-x: auto;
    overflow-y: hidden;
    flex-wrap: nowrap;
    gap: 0.4rem;
    padding-bottom: 0.25rem;
  }

  body.learner-mobile-layout .learner-assessments-page .learner-assessments-tabs .nav-item {
    flex: 0 0 auto;
  }

  body.learner-mobile-layout .learner-assessments-page .learner-assessments-tabs .nav-link {
    font-size: 0.85rem;
    padding: 0.35rem 0.65rem;
    white-space: nowrap;
  }

  body.learner-mobile-layout .learner-assessments-page:not(.learner-evaluations-page) .tab-content {
    padding-right: 0 !important;
    margin-right: 0 !important;
  }

  body.learner-mobile-layout .learner-assessments-page table.data-table {
    min-width: 760px;
    table-layout: auto !important;
  }

  body.learner-mobile-layout .learner-assessments-page table.data-table th:last-child,
  body.learner-mobile-layout .learner-assessments-page table.data-table td:last-child {
    min-width: 9.75rem !important;
    width: 9.75rem !important;
    overflow: visible !important;
    white-space: normal !important;
    vertical-align: middle;
  }

  body.learner-mobile-layout .learner-assessments-page table.data-table td:last-child .d-flex.flex-wrap.gap-2 {
    gap: 0.32rem !important;
    flex-wrap: wrap !important;
    align-items: flex-start;
    overflow: visible !important;
  }

  body.learner-mobile-layout .learner-assessments-page table.data-table td:last-child .btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 5.6rem;
    max-width: 100%;
    padding: 0.24rem 0.52rem !important;
    font-size: 0.67rem !important;
    line-height: 1.2 !important;
    white-space: nowrap !important;
    flex: 0 0 auto !important;
    overflow: visible !important;
  }

  body.learner-mobile-layout .learner-assessments-page table.data-table td:last-child .btn i {
    margin-right: 0.2rem !important;
  }

  body.learner-mobile-layout .learner-mobile-content-card {
    border-radius: 14px;
  }

  body.learner-mobile-layout .learner-mobile-content-card .card-body {
    padding: 0.9rem;
  }

  body.learner-mobile-layout .learner-certificates-mobile-list .learner-mobile-content-card .card-body {
    padding: 0.9rem;
  }

  body.learner-mobile-layout .learner-teams-page .mx-25,
  body.learner-mobile-layout .learner-certificates-page .mx-25 {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  /* Learner curriculum flow (View Curriculum -> content -> view content):
     keep full-width hero with centered, clean cards on mobile. */
  body.learner-mobile-layout .teacher-subject-curriculum-page.card-margin-top,
  body.learner-mobile-layout #curriculum-content-app .teacher-subject-curriculum-page.card-margin-top,
  body.learner-mobile-layout #curriculum-view-app .teacher-subject-curriculum-page.card-margin-top {
    margin-top: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.learner-mobile-layout .teacher-subject-curriculum-page > .row,
  body.learner-mobile-layout #curriculum-content-app .teacher-subject-curriculum-page > .row,
  body.learner-mobile-layout #curriculum-view-app .teacher-subject-curriculum-page > .row,
  body.learner-mobile-layout .teacher-subject-curriculum-page > .row.curriculum-content-page {
    --bs-gutter-x: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body.learner-mobile-layout .teacher-subject-curriculum-page > .row > [class*="col-"],
  body.learner-mobile-layout #curriculum-content-app .teacher-subject-curriculum-page > .row > [class*="col-"],
  body.learner-mobile-layout #curriculum-view-app .teacher-subject-curriculum-page > .row > [class*="col-"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.learner-mobile-layout .teacher-subject-curriculum-page .mobile-course-weeks,
  body.learner-mobile-layout .teacher-subject-curriculum-page .mobile-course-curriculum,
  body.learner-mobile-layout .teacher-subject-curriculum-page .curriculum-list,
  body.learner-mobile-layout .teacher-subject-curriculum-page .teacher-monitor-tabs,
  body.learner-mobile-layout .curriculum-content-page .card.border-0.shadow-sm,
  body.learner-mobile-layout .curriculum-content-page .mobile-curriculum-list,
  body.learner-mobile-layout #curriculum-view-app .curriculum-view-card,
  body.learner-mobile-layout #curriculum-view-app .cv-upnext-sidebar-card {
    width: calc(100% - (var(--learner-mobile-card-gutter) * 2)) !important;
    max-width: var(--learner-mobile-card-max-width);
    margin-left: auto !important;
    margin-right: auto !important;
  }

  body.learner-mobile-layout .teacher-subject-curriculum-page .mobile-module-card,
  body.learner-mobile-layout .teacher-subject-curriculum-page .curriculum-card,
  body.learner-mobile-layout .curriculum-content-page .mobile-curriculum-item {
    width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body.learner-mobile-layout .curriculum-content-page .learner-progress-terms.mx-3,
  body.learner-mobile-layout .teacher-subject-curriculum-page .learner-progress-terms.mx-3 {
    margin-left: var(--learner-mobile-card-gutter) !important;
    margin-right: var(--learner-mobile-card-gutter) !important;
  }

  body.learner-mobile-layout #curriculum-view-app .cv-learning-actions-row {
    flex-wrap: nowrap !important;
    gap: 0.5rem !important;
    align-items: center !important;
    justify-content: space-between !important;
  }

  body.learner-mobile-layout #curriculum-view-app .cv-learning-actions-row > .d-flex {
    width: auto !important;
    flex: 0 0 auto !important;
    align-items: center !important;
  }

  body.learner-mobile-layout #curriculum-view-app .cv-learning-actions-row > .d-flex:first-child {
    margin-right: auto !important;
    justify-content: flex-start !important;
  }

  body.learner-mobile-layout #curriculum-view-app .cv-learning-actions-row > .d-flex:last-child {
    margin-left: auto !important;
    justify-content: flex-end !important;
    flex-wrap: nowrap !important;
  }

  body.learner-mobile-layout #curriculum-view-app .cv-learning-actions-row .btn {
    min-height: 2rem;
    font-size: 0.72rem !important;
    line-height: 1.2 !important;
  }

  body.learner-mobile-layout #curriculum-view-app .cv-learning-actions-row .btn.prev {
    width: 2.35rem !important;
    min-width: 2.35rem !important;
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  body.learner-mobile-layout #curriculum-view-app .cv-learning-actions-row > .d-flex:last-child .btn {
    max-width: 12.8rem;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Mobile tables: prevent clipped/overlapping action buttons. */
  body.learner-mobile-layout .learner-assessments-page table.data-table th:last-child,
  body.learner-mobile-layout .learner-assessments-page table.data-table td:last-child {
    min-width: 10.75rem !important;
    width: 10.75rem !important;
  }

  body.learner-mobile-layout .learner-assessments-page table.data-table td:last-child .d-flex.flex-wrap.gap-2 {
    flex-direction: column !important;
    align-items: stretch !important;
    width: 100% !important;
  }

  body.learner-mobile-layout .learner-assessments-page table.data-table td:last-child .btn,
  body.learner-mobile-layout .learner-assessments-page table.data-table td:last-child > .btn {
    width: 100% !important;
    min-width: 0 !important;
    justify-content: center !important;
  }
}

/* Demo client tablet/medium: keep inactive labels dark but active labels/icons white. */
@media (max-width: 1199.98px) {
  body.theme-demo.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar .programme-icon-circle i,
  body.theme-demo.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar .programme-icon-label,
  body.theme-demo.admin-home-tablet-stable .app-home-list .programme-icon-circle i,
  body.theme-demo.admin-home-tablet-stable .app-home-list .programme-icon-label,
  body.client-demo.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar .programme-icon-circle i,
  body.client-demo.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar .programme-icon-label,
  body.client-demo.admin-home-tablet-stable .app-home-list .programme-icon-circle i,
  body.client-demo.admin-home-tablet-stable .app-home-list .programme-icon-label {
    color: #111827 !important;
  }

  body.theme-demo.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar .nav-item.active .programme-icon-circle i,
  body.theme-demo.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar .nav-item.active .programme-icon-label,
  body.theme-demo.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar .programme-icon-link.active .programme-icon-circle i,
  body.theme-demo.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar .programme-icon-link.active .programme-icon-label,
  body.theme-demo.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar .home-root-link.active .programme-icon-circle i,
  body.theme-demo.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar .home-root-link.active .programme-icon-label,
  body.theme-demo.admin-home-tablet-stable .app-home-list .nav-item.active .programme-icon-circle i,
  body.theme-demo.admin-home-tablet-stable .app-home-list .nav-item.active .programme-icon-label,
  body.theme-demo.admin-home-tablet-stable .app-home-list .programme-icon-link.active .programme-icon-circle i,
  body.theme-demo.admin-home-tablet-stable .app-home-list .programme-icon-link.active .programme-icon-label,
  body.theme-demo.admin-home-tablet-stable .app-home-list .home-root-link.active .programme-icon-circle i,
  body.theme-demo.admin-home-tablet-stable .app-home-list .home-root-link.active .programme-icon-label,
  body.client-demo.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar .nav-item.active .programme-icon-circle i,
  body.client-demo.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar .nav-item.active .programme-icon-label,
  body.client-demo.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar .programme-icon-link.active .programme-icon-circle i,
  body.client-demo.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar .programme-icon-link.active .programme-icon-label,
  body.client-demo.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar .home-root-link.active .programme-icon-circle i,
  body.client-demo.admin-home-tablet-stable .sidebar.sidebar-md .orcaa-sidebar .home-root-link.active .programme-icon-label,
  body.client-demo.admin-home-tablet-stable .app-home-list .nav-item.active .programme-icon-circle i,
  body.client-demo.admin-home-tablet-stable .app-home-list .nav-item.active .programme-icon-label,
  body.client-demo.admin-home-tablet-stable .app-home-list .programme-icon-link.active .programme-icon-circle i,
  body.client-demo.admin-home-tablet-stable .app-home-list .programme-icon-link.active .programme-icon-label,
  body.client-demo.admin-home-tablet-stable .app-home-list .home-root-link.active .programme-icon-circle i,
  body.client-demo.admin-home-tablet-stable .app-home-list .home-root-link.active .programme-icon-label {
    color: #fff !important;
  }
}

.nav-pills .nav-link.active, .nav-pills .show>.nav-link {
    color: #fff;
    background-color:var(--btn-outline-primary-bg);
}

.learner-document-preview-modal .modal-header,
#view_document_modal .modal-header {
  align-items: center;
  background: var(--primary-color, var(--btn-color, #0a2251)) !important;}

/* Match the Programme Management shell (#app.programme-management-app-shell,
   lines ~58-64): the .home-section.mx-4 gutter is already trimmed for
   body.assessment-management-standalone-page above (min-width: 768px block).
   The remaining ~28px came from this shell's own .mx-3 margin plus the
   default .container-fluid gutter -- drop both so the card fills the same
   whitespace Programme Management does. The .home-section left/width itself
   is widened to match in the min-width:768px block above (~line 148). */
body.assessment-management-standalone-page #assessment-templates-root.assessment-templates-page {
  width: 100%;
  max-width: 100%;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Match the Course Management shell's top spacing
   (#app.course-management-app-shell, ~line 225-226, same -26px used by
   #app.programme-management-app-shell at ~line 58-59). */
body.assessment-management-standalone-page #assessment-templates-root.assessment-templates-page.card-margin-top {
  margin-top: -26px !important;
}

@media (max-width: 767.98px) {
  .assessment-templates-page {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }

  .assessment-templates-page .row.mt-4 {
    margin-top: 0.75rem !important;
  }

  .assessment-templates-page .assessment-templates-shell {
    border-radius: 1rem;
    margin-left: auto;
    margin-right: auto;
  }

  .assessment-templates-page .assessment-templates-mobile-header {
    padding: 0.9rem 0.9rem 0.85rem;
  }

  .assessment-templates-page .assessment-templates-mobile-header h6 {
    font-size: 0.9rem;
  }

  .assessment-templates-page .assessment-templates-mobile-back {
    min-width: 2rem;
    min-height: 2rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem 0.45rem;
  }

  .assessment-templates-page .assessment-templates-shell-body {
    padding: 0.8rem !important;
  }

  .assessment-templates-page .programme-courses-content-card {
    margin-top: 0 !important;
  }

  .assessment-templates-page .programme-courses-toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.6rem;
  }

  .assessment-templates-page .programme-courses-toolbar > .btn,
  .assessment-templates-page .programme-courses-toolbar > button {
    width: 100%;
    margin-left: 0 !important;
  }

  .assessment-templates-page .programme-certificates-status-tabs .nav-tabs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    border-bottom: 0;
  }

  .assessment-templates-page .programme-certificates-status-tabs .nav-item {
    width: 100%;
  }

  .assessment-templates-page .programme-certificates-status-tabs .nav-link {
    width: 100%;
    border-radius: 0.8rem;
    text-align: center;
    font-size: 0.72rem;
    padding: 0.45rem 0.4rem;
  }

  .assessment-templates-page .card-body p.text-purple {
    font-size: 0.76rem;
    margin-bottom: 0.55rem;
  }

  .assessment-templates-page .table-responsive {
    overflow-x: visible;
  }

  .assessment-templates-page #certificate_template_table,
  .assessment-templates-page #assessmentTemplateLearnersModal table {
    min-width: 0;
    width: 100% !important;
  }

  .assessment-templates-page #certificate_template_table thead,
  .assessment-templates-page #assessmentTemplateLearnersModal thead {
    display: none;
  }

  .assessment-templates-page #certificate_template_table tbody,
  .assessment-templates-page #certificate_template_table tr,
  .assessment-templates-page #certificate_template_table td,
  .assessment-templates-page #assessmentTemplateLearnersModal tbody,
  .assessment-templates-page #assessmentTemplateLearnersModal tr,
  .assessment-templates-page #assessmentTemplateLearnersModal td {
    display: block;
    width: 100%;
  }

  .assessment-templates-page #certificate_template_table tbody tr,
  .assessment-templates-page #assessmentTemplateLearnersModal tbody tr {
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 0.95rem;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    margin-bottom: 0.8rem;
    padding: 0.2rem 0;
    overflow: hidden;
  }

  .assessment-templates-page #certificate_template_table tbody td,
  .assessment-templates-page #assessmentTemplateLearnersModal tbody td {
    border: 0 !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06) !important;
    padding: 0.45rem 0.75rem 0.45rem 7.2rem !important;
    text-align: left !important;
    white-space: normal !important;
    position: relative;
    min-height: 2.1rem;
  }

  .assessment-templates-page #certificate_template_table tbody td:last-child,
  .assessment-templates-page #assessmentTemplateLearnersModal tbody td:last-child {
    border-bottom: 0 !important;
  }

  .assessment-templates-page #certificate_template_table tbody td .data-label,
  .assessment-templates-page #assessmentTemplateLearnersModal tbody td .data-label {
    position: absolute;
    left: 0.75rem;
    top: 0.45rem;
    width: 5.8rem;
    font-weight: 700;
    color: #475569;
    text-transform: none;
    pointer-events: none;
  }

  .assessment-templates-page #certificate_template_table tbody td .d-flex,
  .assessment-templates-page #assessmentTemplateLearnersModal tbody td .d-flex {
    justify-content: flex-start !important;
  }

  .assessment-templates-page #certificate_template_table tbody td .btn,
  .assessment-templates-page #assessmentTemplateLearnersModal tbody td .btn {
    margin-top: 0.2rem;
    margin-left: 0 !important;
    margin-right: 0.3rem !important;
  }

  .assessment-templates-page .btn,
  .assessment-templates-page .btn-sm {
    font-size: 0.66rem !important;
    line-height: 1.15;
    padding: 0.24rem 0.48rem !important;
  }

  .assessment-templates-page .text-xxs,
  .assessment-templates-page small,
  .assessment-templates-page label,
  .assessment-templates-page th,
  .assessment-templates-page td,
  .assessment-templates-page p,
  .assessment-templates-page a,
  .assessment-templates-page span {
    font-size: 0.66rem !important;
  }

  .assessment-templates-page input,
  .assessment-templates-page select,
  .assessment-templates-page textarea {
    font-size: 0.7rem !important;
  }

  .assessment-templates-page .modal-dialog {
    margin-left: 0.5rem;
    margin-right: 0.5rem;
  }
}

/* ==========================================================================
   Mobile card layout for admin list tables: opt in with .responsive-card-table
   on the <table> and .responsive-card-toolbar on its Add/action button row.
   Used by the Whiteboard, Assessment Templates, and Certificate Templates
   panels (_programme_whiteboard_embed.html, whiteboard_management.html,
   _programme_assessment_templates_embed.html,
   _programme_certificates_embed.html). Column labels are per-table (nth-child
   position, not a data attribute) since some rows are DataTables-injected
   after an Add action (see whiteboard_management.js's table.row.add) rather
   than server-rendered, so a data-th attribute on each <td> wouldn't survive
   that path -- position-based labels do, with no JS changes needed. */
@media (max-width: 767.98px) {
  .responsive-card-toolbar {
    flex-direction: column !important;
    align-items: stretch !important;
  }

  .responsive-card-toolbar > .btn,
  .responsive-card-toolbar > a,
  .responsive-card-toolbar > button {
    width: 100%;
    margin-left: 0 !important;
    white-space: nowrap;
  }

  /* DataTables sets an inline pixel width on the <table> itself at init
     time (autoWidth), sized to the desktop column layout -- that inline
     style outranks Bootstrap's .table { width: 100% }, so once thead/tbody/
     tr/td are switched to block/grid below, the whole card stack is stuck
     at that stale narrower width with dead space on both sides instead of
     filling its container. Force it back to 100% here. table-layout stays
     "auto" by default too, which lets the browser compute the table's own
     intrinsic min-width from its cell content and grow past width:100%
     regardless of the inline style fight above -- display:block on the
     table itself (not just its descendants below) is what actually stops
     that overflow, but Blink/WebKit still keep a table-layout:auto
     <table>'s browser-computed intrinsic min-width even once it's
     display:block, so min-width has to be reset alongside it. */
  .responsive-card-table {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    border: 0;
  }

  /* Each row already renders as its own bordered/shadowed card below, so the
     generic Bootstrap .card-body padding that used to give the plain table
     breathing room now just double-insets it relative to sibling elements
     (e.g. the toolbar's "Add Certificate" button, which only sits inside
     .programme-courses-content-inner's padding) -- trim it here so the
     cards reach the same edges. */
  .card-body:has(.responsive-card-table) {
    padding-left: 0.15rem !important;
    padding-right: 0.15rem !important;
  }

  .responsive-card-table thead {
    display: none;
  }

  .responsive-card-table tbody {
    display: block;
    width: 100%;
  }

  /* Row-as-card, each field as a left-label/right-value grid line -- same
     treatment as the Programme people table's mobile card
     (body.programme-management-standalone-page .programme-person-row), so
     Whiteboard/Assessment Template/Certificate Template rows read the same
     way as the Learner card on a phone instead of stacking label-over-value. */
  .responsive-card-table tbody tr {
    display: block;
    background: #fff !important;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
    padding: 0.1rem 0.85rem;
    margin-bottom: 0.6rem;
  }

  /* Bootstrap's .table-striped paints each *cell*'s own background (via
     --bs-table-accent-bg cascaded onto "tbody tr:nth-of-type(odd) > *"),
     not just the row -- without resetting it here every other card shows
     through with a grey panel instead of the white card background above.
     align-items:start (not center) keeps the label lined up with the FIRST
     line of a value that wraps onto two lines, instead of the label
     floating at the vertical midpoint between the wrapped lines, which
     read as the label and value text overlapping. */
  .responsive-card-table tbody td {
    display: grid;
    grid-template-columns: minmax(7rem, 40%) minmax(0, 1fr);
    align-items: start;
    justify-items: end;
    gap: 10px;
    min-height: 1.9rem;
    padding: 0.4rem 0 !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06) !important;
    background: #fff !important;
    text-align: right !important;
    white-space: normal !important;
    overflow-wrap: break-word;
  }

  .responsive-card-table tbody td:last-child {
    border-bottom: 0 !important;
  }

  .responsive-card-table tbody td::before {
    content: attr(data-mobile-label);
    justify-self: start;
    text-align: left;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
  }

  .responsive-card-table tbody td .btn {
    margin: 2px 4px 2px 0 !important;
  }

  /* The "Manage" toggle sits alone in the value column of a grid cell whose
     column track can shrink to 0 (minmax(0, 1fr)) -- overflow-wrap:break-word
     above is meant for long values like emails, but if inherited into this
     button it lets the grid item's minimum size collapse to nothing, which
     wraps "Manage" letter-by-letter into a tall, narrow pill instead of
     rendering it on one line. Give it the same fixed-ish width + nowrap
     treatment as .programme-learner-manage-toggle so its size never depends
     on the shrinkable grid track around it. */
  .responsive-card-table tbody td .certificate-template-manage-toggle,
  .responsive-card-table tbody td .assessment-template-manage-toggle {
    width: min(100%, 8rem);
    justify-content: center;
    white-space: nowrap;
    overflow-wrap: normal;
  }

  /* Column labels: text-only rows (a single row with colspan, e.g. "No
     whiteboards have been created yet.") have nothing worth labelling, so
     they're left without a ::before label via the :only-child guard below. */
  .responsive-card-table tbody tr td:only-child {
    display: block;
    padding-top: 0 !important;
    text-align: center !important;
  }

  .responsive-card-table tbody tr td:only-child::before {
    content: none;
  }

  #whiteboard_table.responsive-card-table td:nth-child(1)::before { content: "Room Name"; }
  #whiteboard_table.responsive-card-table td:nth-child(2)::before { content: "Actions"; }

  #assessment_template_table.responsive-card-table td:nth-child(1)::before { content: "#"; }
  #assessment_template_table.responsive-card-table td:nth-child(2)::before { content: "Template Name"; }
  #assessment_template_table.responsive-card-table td:nth-child(3)::before { content: "Assessment"; }
  #assessment_template_table.responsive-card-table td:nth-child(4)::before { content: "Status"; }
  #assessment_template_table.responsive-card-table td:nth-child(5)::before { content: "Action"; }

  #certificate_template_table.responsive-card-table td:nth-child(1)::before { content: "#"; }
  #certificate_template_table.responsive-card-table td:nth-child(2)::before { content: "Template Name"; }
  #certificate_template_table.responsive-card-table td:nth-child(3)::before { content: "Assessment"; }
  #certificate_template_table.responsive-card-table td:nth-child(4)::before { content: "Status"; }
  #certificate_template_table.responsive-card-table td:nth-child(5)::before { content: "Action"; }
}

.assessment-templates-back-btn {
  color: #111827 !important;
  border-color: #fff !important;
  background-color: #fff !important;
  transition: none !important;
}

.assessment-templates-back-btn:hover,
.assessment-templates-back-btn:active {
  color: #111827 !important;
  border-color: #fff !important;
  background-color: #fff !important;
}

/* Learner template assessment page */
.learner-template-assessment-shell .sidebar.sidebar-md.navbar-content-md {
  display: none !important;
}

.learner-template-assessment-shell .home-section {
  left: 0 !important;
  width: 100% !important;
}

.learner-template-assessment-page {
  max-width: 1600px;
  margin: 0 auto;
}

.learner-template-assessment-page .assessment-template-page-card {
  background: #fff;
}

.learner-template-assessment-page .assessment-template-frame {
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.5rem;
}

.learner-template-assessment-page .assessment-template-sidebar {
  position: sticky;
  top: 1rem;
  transform: none;
  align-self: flex-start;
  width: 100%;
  max-height: calc(100vh - 2rem);
  overflow: hidden;
  z-index: 5;
}

.learner-template-assessment-page .assessment-template-sidebar-column {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.learner-template-assessment-page .assessment-template-tag-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  max-height: calc(100vh - 18rem);
  overflow-y: auto;
}

.learner-template-assessment-page .assessment-template-tag-item {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 0.9rem;
  background: #f8fafc;
  padding: 0.85rem;
  cursor: pointer;
  transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.learner-template-assessment-page .assessment-template-tag-item.placed {
  opacity: 0.55;
  border-style: dashed;
}

.learner-template-assessment-page .assessment-template-tag-item:hover,
.learner-template-assessment-page .assessment-template-tag-item.active {
  border-color: rgba(37, 99, 235, 0.28);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
  transform: translateY(-1px);
}

.learner-template-assessment-page .assessment-template-tag-item strong {
  display: block;
  font-size: 0.82rem;
  color: #0f172a;
}

.learner-template-assessment-page .assessment-template-tag-item small {
  display: block;
  margin-top: 0.3rem;
  color: #64748b;
  font-size: 0.72rem;
}

.learner-template-assessment-page .assessment-template-tag-answer {
  margin-top: 0.7rem;
}

.learner-template-assessment-page .assessment-template-tag-answer textarea,
.learner-template-assessment-page .assessment-template-tag-answer input {
  width: 100%;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 0.6rem;
  background: #fff;
  color: #0f172a;
  font-size: 0.8rem;
  font-style: italic;
  font-weight: 700;
  padding: 0.55rem 0.7rem;
  outline: none;
}

.learner-template-assessment-page .assessment-template-tag-answer textarea {
  min-height: 110px;
  resize: vertical;
}

.learner-template-assessment-page .assessment-template-tag-answer input:focus,
.learner-template-assessment-page .assessment-template-tag-answer textarea:focus {
  border-color: rgba(37, 99, 235, 0.45);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.learner-template-assessment-page .assessment-template-tag-answer .prefilled-locked,
.learner-template-assessment-page .assessment-template-input.prefilled-locked {
  background: rgba(241, 245, 249, 0.98) !important;
  color: #475569 !important;
  cursor: not-allowed !important;
  border-style: dashed !important;
}

.learner-template-assessment-page .assessment-template-stage {
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
}

.learner-template-assessment-page .instruction-list {
  margin: 0;
  padding-left: 1.05rem;
}

.learner-template-assessment-page .instruction-list li + li {
  margin-top: 0.35rem;
}

.learner-template-assessment-page .instruction-toggle summary {
  cursor: pointer;
  color: #2563eb;
  font-size: 0.72rem;
  font-weight: 600;
  list-style: none;
}

.learner-template-assessment-page .instruction-toggle summary::-webkit-details-marker {
  display: none;
}

.learner-template-assessment-page .instruction-toggle summary::after {
  content: "View more";
}

.learner-template-assessment-page .instruction-toggle[open] summary::after {
  content: "View less";
}

.learner-template-assessment-page .assessment-template-loading {
  min-height: 12rem;
  border: 1px dashed rgba(148, 163, 184, 0.55);
  border-radius: 1rem;
  background: linear-gradient(180deg, #f8fafc 0%, #fff 100%);
}

.learner-template-assessment-page .assessment-template-submit-loader {
  min-height: 6rem;
  border: 1px dashed rgba(59, 130, 246, 0.25);
  border-radius: 0.9rem;
  background: rgba(248, 250, 252, 0.95);
}

.learner-template-assessment-page .submit-answer-button {
  min-width: 10.5rem;
}

.learner-template-assessment-page .submit-answer-button .spinner-border {
  width: 0.9rem;
  height: 0.9rem;
  border-width: 0.12em;
}

.learner-template-assessment-page #submit-docuseal-assessment .spinner-border {
  width: 0.85rem;
  height: 0.85rem;
  border-width: 0.12em;
}

.learner-template-assessment-page #submit-docuseal-assessment .submit-docuseal-loading {
  white-space: nowrap;
}

.learner-template-assessment-page .assessment-template-submitting-alert {
  background-color: #3fcc3f;
  border-color: #3fcc3f;
  color: #fff;
}

.learner-template-assessment-page .submit-docuseal-assessment-button {
  cursor: not-allowed;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.template-progress-swal.swal2-popup {
  width: min(680px, calc(100vw - 2rem)) !important;
  padding: 0 !important;
  border-radius: 14px;
  overflow: hidden;
  color: #1f2937;
}

.template-progress-swal .swal2-html-container {
  margin: 0;
  padding: 0;
  overflow: visible;
}

.template-progress-shell {
  text-align: left;
  background: #fff;
}

.template-progress-header {
  display: flex;
  gap: 1rem;
  align-items: center;
  padding: 1.35rem 1.55rem 1.2rem;
  background: #8f1209;
  color: #fff;
}

.template-progress-header-icon {
  flex: 0 0 auto;
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
}

.template-progress-header-icon .spinner-border {
  width: 1.35rem;
  height: 1.35rem;
  border-width: 0.14em;
}

.template-progress-eyebrow {
  margin: 0 0 0.18rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
  opacity: 0.78;
}

.template-progress-title {
  margin: 0;
  color: #fff;
  font-size: 1.35rem;
  line-height: 1.25;
  font-weight: 800;
}

.template-progress-subtitle {
  margin: 0.35rem 0 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.86rem;
  line-height: 1.45;
}

.template-progress-body {
  padding: 1.3rem 1.55rem 1.45rem;
}

.template-progress-current {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border: 1px solid rgba(143, 18, 9, 0.16);
  border-left: 4px solid #8f1209;
  border-radius: 8px;
  background: #fff7f6;
  color: #64110b;
}

.template-progress-current-icon {
  flex: 0 0 auto;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: #8f1209;
}

.template-progress-current-icon .spinner-border {
  width: 1rem;
  height: 1rem;
  border-width: 0.12em;
}

.template-progress-current-label {
  display: block;
  color: #7f1d1d;
  font-size: 0.72rem;
  font-weight: 700;
}

.template-progress-current-message {
  display: block;
  margin-top: 0.15rem;
  color: #450a0a;
  font-size: 0.98rem;
  font-weight: 800;
}

.template-progress-steps {
  margin-top: 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.template-progress-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.35rem;
  padding: 0.72rem 0.95rem;
  border-bottom: 1px solid #eef2f7;
}

.template-progress-step:last-child {
  border-bottom: 0;
}

.template-progress-step-main {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-width: 0;
}

.template-progress-step-icon {
  flex: 0 0 auto;
  width: 1.55rem;
  height: 1.55rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  color: #94a3b8;
  background: #fff;
}

.template-progress-step-icon .spinner-border {
  width: 1rem;
  height: 1rem;
  border-width: 0.13em;
}

.template-progress-step-dot {
  width: 0.32rem;
  height: 0.32rem;
  border-radius: 999px;
  background: currentColor;
}

.template-progress-step-label {
  color: #4b5563;
  font-size: 0.96rem;
  line-height: 1.25;
  font-weight: 700;
}

.template-progress-step-badge {
  flex: 0 0 auto;
  min-width: 5.4rem;
  border-radius: 999px;
  padding: 0.3rem 0.65rem;
  text-align: center;
  font-size: 0.73rem;
  font-weight: 800;
  color: #64748b;
  background: #f8fafc;
}

.template-progress-step.is-complete .template-progress-step-icon {
  border-color: #bbf7d0;
  background: #dcfce7;
  color: #15803d;
}

.template-progress-step.is-complete .template-progress-step-label {
  color: #166534;
}

.template-progress-step.is-complete .template-progress-step-badge {
  background: #dcfce7;
  color: #166534;
}

.template-progress-step.is-active {
  background: #eff6ff;
}

.template-progress-step.is-active .template-progress-step-icon {
  border-color: #bfdbfe;
  background: #fff;
  color: #2563eb;
}

.template-progress-step.is-active .template-progress-step-label {
  color: #1d4ed8;
}

.template-progress-step.is-active .template-progress-step-badge {
  background: #dbeafe;
  color: #1d4ed8;
}

.template-progress-note {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  margin-top: 1rem;
  padding: 0.85rem 0.95rem;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px solid #e5e7eb;
  color: #4b5563;
  font-size: 0.84rem;
  line-height: 1.45;
}

.template-progress-note i {
  margin-top: 0.15rem;
  color: #8f1209;
}

@media (max-width: 575.98px) {
  .template-progress-header {
    align-items: flex-start;
    padding: 1.1rem;
  }

  .template-progress-header-icon {
    width: 2.6rem;
    height: 2.6rem;
  }

  .template-progress-title {
    font-size: 1.15rem;
  }

  .template-progress-body {
    padding: 1rem;
  }

  .template-progress-step {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.5rem;
  }

  .template-progress-step-badge {
    min-width: auto;
    margin-left: 2.3rem;
  }
}

.learner-template-assessment-page .signature-pad-shell {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  margin-top: 1rem;
  padding-top: 1rem;
}

.learner-template-assessment-page .signature-pad-canvas {
  width: 100%;
  height: 150px;
  border: 1px dashed rgba(59, 130, 246, 0.35);
  border-radius: 0.85rem;
  background: #fff;
  touch-action: none;
  cursor: crosshair;
}

.learner-template-assessment-page .signature-preview-tag {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  border: 1px dashed rgba(148, 163, 184, 0.45);
  border-radius: 0.6rem;
  background: rgba(248, 250, 252, 0.9);
  color: #475569;
  font-size: 0.78rem;
  font-style: normal !important;
  font-weight: 500 !important;
  overflow: hidden;
}

.learner-template-assessment-page .signature-preview-tag img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

/* DocuSeal container styling for smooth scrolling within the form */
#assessment-template-docuseal-container {
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 0.5rem;
}

/* Ensure docuseal-form elements don't break out of parent */
#assessment-template-docuseal-container docuseal-form {
  display: block;
  width: 100%;
}

/* Set positioning context for form_container */
.card-body {
  position: relative;
}

#docuseal-form-container-wrapper {
  min-height: 60vh;
  position: relative;
}

#docuseal-form-container-wrapper .orcaa-docuseal-form-container {
  width: 100%;
  height: 100%;
  overflow: auto;
}

/* DocuSeal layout: form scrolls within the reserved right-side space */
.docuseal-section-wrapper {
  display: flex;
  flex-direction: column;
  max-height: 85vh;
}

#assessment-template-docuseal-container {
  flex: 1 1 auto;
  min-height: 0;
}

@keyframes submitPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.5); }
  50% { box-shadow: 0 0 0 8px rgba(22, 163, 74, 0); }
}

@media (min-width: 1200px) {
  .learner-template-assessment-page {
    max-width: 1680px;
    margin: 0 auto;
  }

  .learner-template-assessment-page .assessment-template-main-row,
  .learner-template-assessment-page .assessment-template-content-row {
    justify-content: center !important;
  }

  .learner-template-assessment-page .assessment-template-content-row.docuseal-full {
    justify-content: flex-start !important;
  }

  .learner-template-assessment-page .assessment-template-content-row.docuseal-full .assessment-template-pages-column {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    padding-right: 0 !important;
    margin-right: 0 !important;
  }

  .learner-template-assessment-page .assessment-template-pages-column {
    flex: 0 0 100%;
    max-width: 100%;
    padding-right: 0;
    margin-right: 0;
  }

  .learner-template-assessment-page .assessment-template-pages-column > .card {
    min-height: calc(100vh - 12rem);
  }

  .learner-template-assessment-page .assessment-template-pages-column .card-body {
    padding: 1.75rem 1.75rem 1.5rem;
  }

  .learner-template-assessment-page.docuseal-form-active .assessment-template-main-row,
  .learner-template-assessment-page.docuseal-form-active .assessment-template-content-row {
    justify-content: flex-start !important;
  }

  .learner-template-assessment-page.docuseal-form-active .assessment-template-pages-column {
    flex: 0 0 calc(100% - 30rem);
    max-width: calc(100% - 30rem);
    padding-right: 2.5rem;
    margin-right: 27rem;
  }
}

@media (min-width: 1200px) and (max-width: 1399.98px) {
  .learner-template-assessment-page.docuseal-form-active .assessment-template-pages-column {
    flex: 0 0 calc(100% - 26rem);
    max-width: calc(100% - 26rem);
    margin-right: 23rem;
  }
}

/* Applicant profile incomplete state */
.view-applicant-profile-page .applicant-profile-summary-card {
  margin: 0;
  padding: 0.85rem 1.05rem !important;
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.view-applicant-profile-page .applicant-profile-summary-title {
  margin: 0 0 0.55rem;
}

.view-applicant-profile-page .applicant-profile-summary-title-text {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #fff;
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.2;
}

.view-applicant-profile-page .applicant-profile-summary-title-text i {
  font-size: 1.05rem;
}

.view-applicant-profile-page .applicant-profile-details {
  row-gap: 0.45rem;
}

.view-applicant-profile-page .applicant-profile-detail {
  margin: 0;
  line-height: 1.3;
}

.view-applicant-profile-page .applicant-profile-detail-label {
  display: block;
  margin-bottom: 0.12rem;
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.76rem;
  font-weight: 600;
}

.view-applicant-profile-page .applicant-profile-detail-value {
  display: block;
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.view-applicant-profile-page .applicant-profile-summary-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 0.45rem;
}

.view-applicant-profile-page .applicant-profile-summary-art .header-img-2 {
  max-height: 72px;
  width: auto;
}

.view-applicant-profile-page .applicant-profile-header-actions {
  margin-bottom: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.5rem;
}

.view-applicant-profile-page .applicant-profile-top-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  padding: 0.42rem 0.75rem;
}

        @media (max-width: 767.98px) {
  body:has(.view-applicant-profile-page) .home-section {
    padding-bottom: 0.5rem;
  }

  .view-applicant-profile-page {
    margin-top: 0.4rem !important;
    margin-bottom: 0 !important;
    padding-left: 0.65rem;
    padding-right: 0.65rem;
    padding-bottom: 0;
  }

  .view-applicant-profile-page > .row {
    --bs-gutter-x: 0;
    margin-bottom: 0;
  }

  .view-applicant-profile-page .applicant-profile-summary-card {
    margin-top: 0;
    padding: 0.72rem 0.78rem !important;
    border-radius: 14px;
    box-shadow: 0 12px 20px rgba(15, 23, 42, 0.12);
    margin-left: 0.8rem;
    margin-right: 0.8rem;
  }

  .view-applicant-profile-page .applicant-profile-summary-card > .row,
  .view-applicant-profile-page .applicant-profile-details {
    --bs-gutter-x: 0.55rem;
    --bs-gutter-y: 0.35rem;
  }

  .view-applicant-profile-page .applicant-profile-summary-main,
  .view-applicant-profile-page .applicant-profile-summary-side,
  .view-applicant-profile-page .applicant-profile-details > [class*="col-"] {
    width: 100%;
    flex: 0 0 100%;
    max-width: 100%;
  }

  .view-applicant-profile-page .applicant-profile-summary-art {
    display: none;
  }

  .view-applicant-profile-page .applicant-profile-summary-title {
    margin-bottom: 0.55rem;
  }

  .view-applicant-profile-page .applicant-profile-summary-title-text {
    gap: 0.4rem;
    font-size: 1rem;
  }

  .view-applicant-profile-page .applicant-profile-details {
    row-gap: 0.3rem;
  }

  .view-applicant-profile-page .applicant-profile-detail {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.18rem;
    line-height: 1.2;
  }

  .view-applicant-profile-page .applicant-profile-detail-label {
    display: inline;
    margin-bottom: 0;
    color: #fff;
    font-size: 0.86rem;
    font-weight: 700;
  }

  .view-applicant-profile-page .applicant-profile-detail-label::after {
    content: ":";
    margin-right: 0.12rem;
  }

  .view-applicant-profile-page .applicant-profile-detail-value {
    display: inline;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.25;
  }

  .view-applicant-profile-page .applicant-profile-header-actions {
    justify-content: flex-start;
    align-items: flex-start;
    gap: 0.35rem;
    margin-top: 0.65rem;
    margin-bottom: 0;
  }

  .view-applicant-profile-page .applicant-profile-header-actions .applicant-profile-top-action {
    width: auto;
    max-width: 100%;
    min-width: 0;
    white-space: nowrap;
    line-height: 1.1;
    padding: 0.45rem 0.75rem;
    font-size: 0.8rem;
    text-align: center;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

}

@media (max-width: 767.98px) {
  .view-applicant-profile-page .scroll-item {
    flex-basis: 67vw;
    max-width: 67vw;
    min-height: 149px;
  }
}


/* Programme cards page CSS extracted from templates/new_ui/programme_cards.html */
.programme-course-dashboard-v2 {
        padding-top: 0.2rem;
    }

    .programme-course-dashboard-v2-title {
        font-size: 1.55rem;
        font-weight: 800;
        color: #1f172c;
    }

    .programme-course-kpi-card {
        position: relative;
        background: #fff;
        border-radius: 18px;
        border-top: 4px solid #4c1d95;
        box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
        padding: 1.15rem 1rem 1rem;
        min-height: 152px;
        overflow: hidden;
    }

    .programme-course-kpi-card::after {
        content: "";
        position: absolute;
        right: -0.5rem;
        bottom: -0.75rem;
        width: 86px;
        height: 86px;
        border-radius: 50%;
        background: radial-gradient(circle, rgba(76, 29, 149, 0.08), rgba(76, 29, 149, 0));
    }

    .programme-course-kpi-card.accent-gold {
        border-top-color: #c27a00;
    }

    .programme-course-kpi-card.accent-purple {
        border-top-color: #4c1d95;
    }

    .programme-course-kpi-card.accent-orange {
        border-top-color: #f59e0b;
    }

    .programme-course-kpi-card.accent-danger {
        border-top-color: #dc2626;
    }

    .programme-course-kpi-icon {
        width: 44px;
        height: 44px;
        border-radius: 999px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin-bottom: 0.8rem;
        background: rgba(76, 29, 149, 0.12);
        color: #4c1d95;
        font-size: 1.15rem;
    }

    .programme-course-kpi-card.accent-gold .programme-course-kpi-icon {
        background: rgba(194, 122, 0, 0.14);
        color: #c27a00;
    }

    .programme-course-kpi-card.accent-orange .programme-course-kpi-icon {
        background: rgba(245, 158, 11, 0.14);
        color: #d97706;
    }

    .programme-course-kpi-card.accent-danger .programme-course-kpi-icon {
        background: rgba(220, 38, 38, 0.14);
        color: #dc2626;
    }

    .programme-course-kpi-card h3 {
        font-size: 2rem;
        font-weight: 800;
        color: #1f172c;
    }

    .programme-course-chart-card {
        background: #fcfbff;
        border: 1px solid rgba(76, 29, 149, 0.1);
        border-radius: 18px;
        padding: 1.25rem 1.2rem 1rem;
    }

    .programme-course-chart-legend {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        font-size: 0.65rem;
        color: #6b7280;
        font-weight: 600;
    }

    .programme-course-chart-legend .dot {
        width: 10px;
        height: 10px;
        border-radius: 999px;
        display: inline-block;
    }

    .programme-course-chart-legend .dot.revenue {
        background: #4c1d95;
    }

    .programme-course-chart-legend .dot.engagement {
        background: #f97316;
    }

    .programme-course-chart-grid {
        display: grid;
        grid-template-columns: 44px minmax(0, 1fr);
        gap: 0.75rem;
        min-height: 280px;
    }

    .programme-course-chart-axis {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        align-items: flex-end;
        padding: 0.3rem 0 1.8rem;
        color: #9ca3af;
        font-size: 0.65rem;
        font-weight: 600;
    }

    .programme-course-chart-canvas {
        position: relative;
        border-radius: 16px;
        background:
            linear-gradient(to top, rgba(76, 29, 149, 0.08) 1px, transparent 1px) 0 0 / 100% 20%,
            linear-gradient(to right, rgba(76, 29, 149, 0.05) 1px, transparent 1px) 0 0 / 12.5% 100%,
            #fff;
        min-height: 280px;
        overflow: hidden;
    }

    .programme-course-chart-line {
        position: absolute;
        left: 4%;
        right: 4%;
        top: 12%;
        bottom: 18%;
        border-radius: 16px 16px 0 0;
    }

    .programme-course-chart-line.revenue-line {
        background:
            radial-gradient(circle at 0% 68%, rgba(76, 29, 149, 0.9) 0 3px, transparent 4px),
            radial-gradient(circle at 14% 64%, rgba(76, 29, 149, 0.9) 0 3px, transparent 4px),
            radial-gradient(circle at 28% 30%, rgba(76, 29, 149, 0.9) 0 3px, transparent 4px),
            radial-gradient(circle at 42% 66%, rgba(76, 29, 149, 0.9) 0 3px, transparent 4px),
            radial-gradient(circle at 57% 82%, rgba(76, 29, 149, 0.9) 0 3px, transparent 4px),
            radial-gradient(circle at 71% 26%, rgba(76, 29, 149, 0.9) 0 3px, transparent 4px),
            radial-gradient(circle at 85% 92%, rgba(76, 29, 149, 0.9) 0 3px, transparent 4px),
            radial-gradient(circle at 100% 86%, rgba(76, 29, 149, 0.9) 0 3px, transparent 4px),
            linear-gradient(180deg, rgba(76, 29, 149, 0.28), rgba(76, 29, 149, 0.02));
        clip-path: polygon(0% 68%, 14% 64%, 28% 30%, 42% 66%, 57% 82%, 71% 26%, 85% 92%, 100% 86%, 100% 100%, 0% 100%);
        border-bottom: 2px solid rgba(76, 29, 149, 0.55);
    }

    .programme-course-chart-line.engagement-line {
        background:
            radial-gradient(circle at 0% 66%, rgba(249, 115, 22, 0.9) 0 3px, transparent 4px),
            radial-gradient(circle at 14% 78%, rgba(249, 115, 22, 0.9) 0 3px, transparent 4px),
            radial-gradient(circle at 28% 46%, rgba(249, 115, 22, 0.9) 0 3px, transparent 4px),
            radial-gradient(circle at 42% 66%, rgba(249, 115, 22, 0.9) 0 3px, transparent 4px),
            radial-gradient(circle at 57% 54%, rgba(249, 115, 22, 0.9) 0 3px, transparent 4px),
            radial-gradient(circle at 71% 48%, rgba(249, 115, 22, 0.9) 0 3px, transparent 4px),
            radial-gradient(circle at 85% 72%, rgba(249, 115, 22, 0.9) 0 3px, transparent 4px),
            radial-gradient(circle at 100% 84%, rgba(249, 115, 22, 0.9) 0 3px, transparent 4px),
            linear-gradient(180deg, rgba(249, 115, 22, 0.12), rgba(249, 115, 22, 0.01));
        clip-path: polygon(0% 66%, 14% 78%, 28% 46%, 42% 66%, 57% 54%, 71% 48%, 85% 72%, 100% 84%, 100% 100%, 0% 100%);
        mix-blend-mode: multiply;
        opacity: 0.75;
    }

    .programme-course-chart-months {
        position: absolute;
        left: 4%;
        right: 4%;
        bottom: 0.6rem;
        display: grid;
        grid-template-columns: repeat(8, minmax(0, 1fr));
        color: #6b7280;
        font-size: 0.66rem;
        font-weight: 600;
    }

    @media (max-width: 991.98px) {
        .programme-course-dashboard-v2-title {
            font-size: 1.25rem;
        }

        .programme-course-chart-grid {
            grid-template-columns: 1fr;
        }

        .programme-course-chart-axis {
            display: none;
        }
    }

    .admin-home-helper {
        position: fixed;
        right: 1.25rem;
        bottom: 1.25rem;
        z-index: 1085;
        display: flex;
        flex-direction: column;
        align-items: flex-end;
        gap: 0.65rem;
    }

    .admin-home-helper-toggle {
        width: 56px;
        height: 56px;
        padding: 0;
        border: 0;
        border-radius: 999px;
        background: transparent;
        color: #fff;
        box-shadow: none;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        overflow: visible;
        position: relative;
    }

    .admin-home-helper-toggle-avatar {
        width: 100%;
        height: 100%;
        object-fit: cover;
        border-radius: 999px;
        display: block;
        transform-origin: center;
        animation: admin-home-helper-avatar-bounce 3.8s ease-in-out infinite;
        will-change: transform;
    }

    .admin-home-helper-toggle:hover,
    .admin-home-helper-toggle:focus {
        background: transparent;
        color: #fff;
    }

    .admin-home-helper-toggle:hover .admin-home-helper-toggle-avatar,
    .admin-home-helper-toggle:focus-visible .admin-home-helper-toggle-avatar {
        animation-duration: 2.2s;
    }

    .admin-home-helper-toggle-nudge {
        position: absolute;
        right: calc(100% - 0.28rem);
        top: 36%;
        transform: translateY(-50%);
        padding: 0.28rem 0.58rem;
        border-radius: 999px;
        background: #fff;
        color: #0f172a;
        font-size: 0.62rem;
        font-weight: 700;
        line-height: 1;
        letter-spacing: 0.01em;
        box-shadow: 0 10px 18px rgba(15, 23, 42, 0.16);
        white-space: nowrap;
        pointer-events: none;
        animation: admin-home-helper-bubble-pop 3.8s ease-in-out infinite;
    }

    body.view-programme-main-page .admin-home-helper-toggle-nudge {
        display: inline-flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        z-index: 2;
    }

    .admin-home-helper-toggle-nudge::after {
        content: "";
        position: absolute;
        right: -5px;
        top: 50%;
        transform: translateY(-50%) rotate(45deg);
        width: 9px;
        height: 9px;
        background: #fff;
    }

    @keyframes admin-home-helper-avatar-bounce {
        0%,
        14%,
        100% {
            transform: translateY(0);
        }

        4% {
            transform: translateY(-10px);
        }

        8% {
            transform: translateY(0);
        }

        11% {
            transform: translateY(-6px);
        }
    }

    @keyframes admin-home-helper-bubble-pop {
        0%,
        14%,
        100% {
            transform: translateY(-50%) scale(1);
        }

        4% {
            transform: translateY(calc(-50% - 2px)) scale(1.05);
        }

        8% {
            transform: translateY(-50%) scale(1);
        }

        11% {
            transform: translateY(calc(-50% - 1px)) scale(1.03);
        }
    }

    @media (prefers-reduced-motion: reduce) {
        .admin-home-helper-toggle-avatar,
        .admin-home-helper-toggle-nudge {
            animation: none;
        }
    }

    .admin-home-helper-panel {
        width: min(380px, calc(100vw - 2rem));
        border: 1px solid var(--helper-border-color);
        border-radius: 18px;
        background: var(--helper-surface);
        box-shadow: 0 20px 40px rgba(15, 23, 42, 0.18);
        overflow: hidden;
    }

    .admin-home-helper-panel.d-none {
        display: none !important;
    }

    .admin-home-helper-header {
        display: flex;
        align-items: flex-start;
        justify-content: space-between;
        gap: 0.75rem;
        padding: 0.95rem 1rem 0.85rem;
        background: var(--helper-header-bg);
        border-bottom: 1px solid var(--helper-border-color);
    }

    .admin-home-helper-title {
        margin: 0;
        color: var(--helper-title-color);
        font-size: 0.95rem;
        font-weight: 800;
    }

    .admin-home-helper-subtitle {
        margin: 0.15rem 0 0;
        color: var(--helper-muted-text);
        font-size: 0.72rem;
        line-height: 1.45;
    }

    .admin-home-helper-close {
        border: 1px solid color-mix(in srgb, var(--primary-color) 12%, #fff 88%);
        background: linear-gradient(
            135deg,
            var(--primary-color),
            color-mix(in srgb, var(--primary-color) 55%, var(--secondary-color) 45%)
        );
        color: #fff;
        width: 44px;
        height: 44px;
        border-radius: 14px;
        padding: 0;
        line-height: 1;
        font-size: 1rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 12px 24px var(--helper-shadow);
        transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    }

    .admin-home-helper-close i {
        font-size: 1.1rem;
        font-weight: 800;
    }

    .admin-home-helper-close:hover,
    .admin-home-helper-close:focus {
        background: linear-gradient(
            135deg,
            color-mix(in srgb, var(--primary-color) 88%, #000 12%),
            color-mix(in srgb, var(--secondary-color) 88%, #000 12%)
        );
        color: #fff;
        transform: translateY(-1px) scale(1.02);
        box-shadow: 0 14px 28px var(--helper-shadow);
    }

    .admin-home-helper-header-actions {
        display: flex;
        gap: 0.5rem;
    }

    .admin-home-helper-hide {
        border: 1px solid color-mix(in srgb, var(--primary-color) 12%, #ffffff 88%);
        background: linear-gradient(
            135deg,
            var(--primary-color),
            color-mix(in srgb, var(--primary-color) 55%, var(--secondary-color) 45%)
        );
        color: #fff;
        width: 44px;
        height: 44px;
        border-radius: 14px;
        padding: 0;
        line-height: 1;
        font-size: 1rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 12px 24px var(--helper-shadow);
        transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    }

    .admin-home-helper-hide i {
        font-size: 1.1rem;
        font-weight: 800;
    }

    .admin-home-helper-hide:hover,
    .admin-home-helper-hide:focus {
        background: linear-gradient(
            135deg,
            color-mix(in srgb, var(--primary-color) 88%, #000 12%),
            color-mix(in srgb, var(--secondary-color) 88%, #000 12%)
        );
        color: #fff;
        transform: translateY(-1px) scale(1.02);
        box-shadow: 0 14px 28px var(--helper-shadow);
    }



    .admin-home-helper-body {
        padding: 0.95rem 1rem 1rem;
        background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), var(--helper-surface));
    }

    .admin-home-helper-section-label {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        font-size: 0.67rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: var(--primary-color);
        margin-bottom: 0.5rem;
        padding: 0.28rem 0.55rem;
        border-radius: 999px;
        background: var(--helper-chip-bg);
    }

    .admin-home-helper-description {
        color: #374151;
        font-size: 0.78rem;
        line-height: 1.6;
        margin-bottom: 0.85rem;
    }

    .admin-home-helper-next {
        margin: 0;
        padding-left: 1rem;
        color: #1f2937;
        font-size: 0.75rem;
        line-height: 1.6;
    }

    .admin-home-helper-next li::marker {
        color: var(--primary-color);
    }

    .admin-home-helper-next li + li {
        margin-top: 0.28rem;
    }

    .admin-home-helper-chat {
        margin-top: 0;
        border-top: 0;
        padding-top: 0;
    }

    .admin-home-helper-chat-feed {
        display: flex;
        flex-direction: column;
        gap: 0.45rem;
        max-height: 230px;
        overflow-y: auto;
        padding-right: 0.2rem;
        margin-bottom: 0.7rem;
    }

    .admin-home-helper-chat-message {
        display: flex;
        width: 100%;
    }

    .admin-home-helper-chat-message.is-user {
        justify-content: flex-end;
    }

    .admin-home-helper-chat-message.is-bot {
        justify-content: flex-start;
    }

    .admin-home-helper-chat-bubble {
        max-width: 92%;
        font-size: 0.74rem;
        line-height: 1.45;
        border-radius: 12px;
        padding: 0.48rem 0.62rem;
        white-space: pre-line;
    }

    .admin-home-helper-chat-message.is-user .admin-home-helper-chat-bubble {
        background: color-mix(in srgb, var(--primary-color) 16%, #fff 84%);
        color: #111827;
        border: 1px solid color-mix(in srgb, var(--primary-color) 20%, #d1d5db 80%);
    }

    .admin-home-helper-chat-message.is-bot .admin-home-helper-chat-bubble {
        background: #fff;
        color: #1f2937;
        border: 1px solid #e5e7eb;
    }

    .admin-home-helper-chat-form {
        display: flex;
        gap: 0.4rem;
        margin-bottom: 0.55rem;
    }

    .admin-home-helper-chat-input {
        flex: 1 1 auto;
        border-radius: 10px;
        border: 1px solid #d1d5db;
        padding: 0.43rem 0.58rem;
        font-size: 0.72rem;
        outline: none;
    }

    .admin-home-helper-chat-input:focus {
        border-color: color-mix(in srgb, var(--primary-color) 48%, #93c5fd 52%);
        box-shadow: 0 0 0 0.1rem color-mix(in srgb, var(--primary-color) 22%, transparent);
    }

    .admin-home-helper-chat-send {
        border: 0;
        border-radius: 10px;
        padding: 0.4rem 0.68rem;
        font-size: 0.7rem;
        font-weight: 700;
        color: #fff;
        background: linear-gradient(
            135deg,
            var(--primary-color),
            color-mix(in srgb, var(--primary-color) 35%, var(--secondary-color) 65%)
        );
    }

    .admin-home-helper-chat-send:hover,
    .admin-home-helper-chat-send:focus {
        color: #fff;
        background: linear-gradient(
            135deg,
            color-mix(in srgb, var(--primary-color) 88%, #000 12%),
            var(--secondary-color)
        );
    }

    .admin-home-helper-quick {
        display: flex;
        flex-wrap: wrap;
        gap: 0.3rem;
    }

    .admin-home-helper-quick button {
        border: 1px solid color-mix(in srgb, var(--primary-color) 18%, #d1d5db 82%);
        background: #fff;
        color: #374151;
        border-radius: 999px;
        padding: 0.2rem 0.5rem;
        font-size: 0.64rem;
        line-height: 1.3;
    }

    .admin-home-helper-quick button:hover,
    .admin-home-helper-quick button:focus {
        color: var(--primary-color);
        border-color: var(--primary-color);
    }

    @media (max-width: 767.98px) {
        .admin-home-helper {
            right: 0.85rem;
            bottom: 0.85rem;
        }

        .admin-home-helper-panel {
            width: min(300px, calc(100vw - 1.2rem));
        }
    }

/* Programme cards inline-style replacements */
.programme-attendance-iframe-min {
  min-height: 300px;
}

.programme-team-page-size-fixed {
  width: 88px;
}

.programme-team-overview-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--primary-color);
}

.programme-team-search-shell {
  min-width: 260px;
  width: min(100%, 360px);
}

.programme-cards-table-scroll {
  max-height: 60vh;
  overflow-y: auto;
}

@media (max-width: 767.98px) {
  /* Keep view-programme-main centered with equal side gutters on mobile. */
  body.view-programme-main-page .home-section.admin-home-layout #app.programme-management-app-shell #status_tabContent,
  body.view-programme-main-page .home-section.admin-home-layout #app.programme-management-app-shell #status_tabContent.pe-5,
  body.view-programme-main-page .home-section.admin-home-layout #app.programme-management-app-shell #status_tabContent.pe-md-0,
  body.view-programme-main-page .home-section.admin-home-layout #app.programme-management-app-shell #status_tabContent.me-2,
  body.view-programme-main-page .home-section.admin-home-layout #app.programme-management-app-shell #status_tabContent.px-3 {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0.45rem !important;
    padding-right: 0.45rem !important;
    box-sizing: border-box !important;
  }

  body.view-programme-main-page .home-section.admin-home-layout #app.programme-management-app-shell #status_tabContent > .card,
  body.view-programme-main-page .home-section.admin-home-layout #app.programme-management-app-shell #status_tabContent > .card.border-light.shadow {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }
}

.home-section.admin-home-layout {
  min-width: 0;
  width: calc(100% - 99px - 3rem);
  max-width: calc(100vw - 92px - 3rem);
  overflow-x: visible;
}

.home-section.admin-home-layout > * {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

body.view-programme-main-page #app.programme-management-app-shell,
body.view-programme-main-page #status_tabContent,
body.view-programme-main-page #status_tabContent > .card,
body.view-programme-main-page #status_tabContent > .card > .card-body,
body.view-programme-main-page .tab-content,
body.view-programme-main-page .tab-pane {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

body.view-programme-main-page .programme-learners-table-wrapper {
  max-width: 100%;
  overflow-x: auto;
}

body.view-programme-main-page #programme-pane-evaluation.show.active,
body.view-programme-main-page #programme-evaluations-embed-wrapper {
  display: block;
  min-height: 720px;
}

body.view-programme-main-page #programme-evaluations-iframe {
  display: block;
  min-height: 720px;
}

@media (min-width: 768px) {
  body:has(.app-programme-cards-list:not(.d-none)) .home-section:not(.admin-home-layout) {
    left: 126px;
    width: calc(100% - 174px);
  }

  /* view-programme-main-page renders with is_admin_home=False, so
     .home-section keeps its un-inset base offsets (left: 57px;
     width: calc(100% - 99px)) which sit closer to the real rendered
     width of .orcaa-sidebar-container (~125-135px) than intended,
     crowding the content against the sidebar on the left while the
     compounding right-hand margin/width layers leave an oversized
     gutter on the right. Re-balance both sides for this page. */
  body.view-programme-main-page .home-section:not(.admin-home-layout) {
    left: 126px;
    width: calc(100% - 174px);
  }

  /* /course_insights (course_insights_page) never sets is_admin_home,
     so .home-section falls back to the un-inset base rule -- same fix
     as view-programme-main-page. programme-management-content-page is
     shared with a few other templates, so scope via the page's own
     unique root id instead of a body class. */
  body:has(#course-insights-app) .home-section:not(.admin-home-layout) {
    left: 126px;
    width: calc(100% - 138px);
    padding-left: 3.75px;
    padding-right: 3.75px;
  }

  /* Course Insights previously inherited Bootstrap's 1.5rem .mx-4 margin
     as well as the 15px home-section padding. Halving both gutters gives the
     shell the recovered width while keeping it clear of the fixed sidebar. */
  body:has(#course-insights-app) .home-section.mx-4 {
    margin-left: 0.375rem !important;
    margin-right: 0.375rem !important;
  }

  /* Local admin shells: matched to the view-programme-main-page /
     course_insights look (left: 126px, ~20px gap on both sides --
     confirmed good by eye on that page), instead of their own
     one-off values from earlier tuning passes. */

  /* /programme_management_content/<id>/ (programme_management_content_view):
     explicitly sets is_admin_home=False, so the base rule applies.
     programme-management-content-page is shared with other templates
     (evaluation_management.html), so scope via this page's unique
     id="app" + .programme-content-ui combination instead. */
  body:has(#app.programme-content-ui) .home-section:not(.admin-home-layout) {
    left: 125px;
    width: calc(100% - 125px - 0.5rem);
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-inline: 0.25rem !important;
    box-sizing: border-box;
  }

  /* Mirror the visible left card gap exactly on the right. */
  body:has(#app.programme-content-ui) #app.programme-content-ui {
    width: calc(100% - 0.075rem);
    max-width: none;
    margin-inline: 0.0375rem !important;
    box-sizing: border-box;
  }

  /* /progress_reporting_tool/programme_mark_register/<id>/ (mark_register_view):
     never sets is_admin_home, so the base rule applies. Its body class
     and .mark-register-page-shell wrapper are both shared with
     my_learners.html, which adds its own extra .my-learners-page-shell
     class on the same element -- exclude that to scope this rule to
     mark_register.html only. */
  body:has(.mark-register-page-shell:not(.my-learners-page-shell)) .home-section:not(.admin-home-layout) {
    left: 126px;
    width: calc(100% - 174px);
  }

  /* Dynamic Reporting (progress_reporting_tool/dynamicReport.html) never
     sets is_admin_home, so it inherits the shared programme-cards-sidebar
     rule above (left: 126px; width: calc(100% - 174px), i.e. a 126px left
     offset and a 174 - 126 = 48px calc()-based right reserve). Left offset
     halved to 63px. The right reserve is set equal to the left offset
     (63px) -- with margin-right zeroed below, this leaves only the
     .home-section/.container-fluid padding on the right, which mirrors
     what's already happening on the left (see margin-right note below),
     so the two sides read as the same width of whitespace instead of the
     right looking roughly double the left. */
  body.dynamic-report-standalone-page .home-section:not(.admin-home-layout) {
    left: 63px !important;
    width: calc(100% - 63px) !important;
  }

  /* The width tweak above only controls the calc()-based reserve; it
     doesn't touch the plain Bootstrap .mx-4 margin (1.5rem/24px each
     side) that .home-section also carries. That fixed 24px margin-right
     was extra space stacked on top of the calc reserve that has no
     equivalent counted against the left (the left's 24px margin is
     already absorbed under the sidebar). Zero it so the right side isn't
     carrying an unmatched 24px on top of the mirrored reserve above;
     margin-left is left untouched since the left side already reads
     correctly. */
  body.dynamic-report-standalone-page .home-section.mx-4 {
    margin-right: 0 !important;
  }

  /* /progress_reporting_tool/view_team/<id>/ (view_single_team ->
     manage_team.html): started mirroring Dynamic Reporting's left: 63px;
     width: calc(100% - 63px). Halved again here (this page only, Dynamic
     Reporting untouched): left offset 63 -> 31.5px, and width's subtrahend
     reduced by the same 31.5px (63 -> 31.5) to keep the right edge exactly
     where it was, so the card grows only on the left. */
  body:has(.manage-team-page) .home-section:not(.admin-home-layout) {
    left: 31.5px !important;
    width: calc(100% - 31.5px) !important;
  }

  body:has(.manage-team-page) .home-section.mx-4 {
    margin-right: 0 !important;
  }
}

/* Pull the "Build Report" card up slightly now that the "Dynamic
   Reporting" header banner above it has been removed. */
body.dynamic-report-standalone-page .report-builder-card-wrapper {
  margin-top: -26px;
}

@media (min-width: 768px) {
  /* Every "admin home" shell (dashboard, programmes, courses,
     assessments, qualification, system-management, ...): all of
     these are rendered by new_home_page with is_admin_home=True, so
     they all carry the shared .home-section.admin-home-layout class.
     Nudge the programme-management shell a little narrower on the
     right so its outer gutter reads more evenly against the left gap
     beside the sidebar.
     Mobile (<768px) resets left/width itself with !important
     elsewhere in this file, so this desktop-only rule can't leak
     into those breakpoints. */
  .home-section.admin-home-layout {
    left: 126px;
    width: calc(100% - 126px - 3.5rem);
  }

  /* The 3.5rem reserve above was tuned across every admin-home section, but
     it leaves the right-hand gutter noticeably wider than the left (~63px
     vs ~40px, measured from the sidebar) on every one of them. Scope a
     smaller reserve to each page individually -- via each page's own body
     class, so the shared rule above stays as the fallback for any
     admin-home section not listed here -- instead of retuning it globally.
     `left` is intentionally omitted here so the left gap doesn't move.
     padding-left/right (overriding the base .home-section 15px shorthand)
     trims further still, on both sides equally; top/bottom padding is
     untouched.
     programme-management-standalone-page also covers System Management and
     Platform Theme, which reuse that same body class. */
  body.programme-management-standalone-page .home-section.admin-home-layout,
  body.course-management-standalone-page .home-section.admin-home-layout,
  body.assessment-management-standalone-page .home-section.admin-home-layout,
  body.practicals-management-standalone-page .home-section.admin-home-layout,
  body.admin-dashboard-standalone-page .home-section.admin-home-layout {
    width: calc(100% - 126px - 2rem);
    padding-left: 0.2rem;
    padding-right: 0.2rem;
  }

  /* System Management renders with .admin-home-layout. Halve its visible
     sidebar-to-shell gap (about 31px to 15px) and add the recovered 16px to
     the left side without moving the established right edge. */
  body.system-management-content-page .home-section.admin-home-layout {
    left: 110px;
    /* Keep the left edge fixed and halve only the remaining right reserve.
       Override max-width too; the shared admin-home cap otherwise prevents
       the wider value from taking effect. */
    width: calc(100% - 110px - 0.5rem);
    max-width: calc(100vw - 110px - 0.5rem);
  }

  /* Course Management: halve the left gutter and grow the shell only toward
     the sidebar. The paired width keeps the existing right edge unchanged. */
  body.course-management-standalone-page .home-section.admin-home-layout {
    left: 110px;
    width: calc(100% - 110px - 0.5rem);
    max-width: calc(100vw - 110px - 0.5rem);
  }

  /* Assessment Management: halve the left gutter and grow the shell toward
     the sidebar while preserving its current right edge. */
  body.assessment-management-standalone-page .home-section.admin-home-layout {
    left: 102px;
    /* Account for the retained .mx-4 left margin applied before the relative
       left shift; without this allowance the right border exceeds the view. */
    width: calc(100% - 102px - 3rem);
    max-width: calc(100vw - 102px - 3rem);
    box-sizing: border-box;
  }

  /* Let the recruitment shell use nearly all of the space beside the sidebar. */
  body.applicants-management-standalone-page .home-section.admin-home-layout,
  .home-section.admin-home-layout:has(#applicants-management-app) {
    margin-right: 0 !important;
    width: calc(100vw - 126px - 1.5rem);
    max-width: calc(100vw - 126px - 1.5rem);
    padding-left: 0.1rem;
    padding-right: 0 !important;
    box-sizing: border-box;
  }

  body.applicants-management-standalone-page .home-section.admin-home-layout
    #applicants-management-app.applicants-management-app-shell {
    margin-left: -0.5rem !important;
    width: calc(100% + 2rem);
    max-width: none;
  }

  body.applicants-management-standalone-page
    #applicants-management-app.applicants-management-app-shell
    .applicants-management-embed-shell {
    margin-right: 0 !important;
    padding-left: 0.1rem !important;
    padding-right: 0 !important;
  }

  /* The Bootstrap shell above remains bounded by the admin-home layout.
     Extend the visible card equally on the left and right. The negative left
     margin consumes the oversized left gutter while the wider width keeps the
     already-correct right edge in exactly the same position. */
  body.applicants-management-standalone-page
    #applicants-management-app.applicants-management-app-shell
    .applicants-management-embed-shell > .card {
    margin-top: -26px !important;
    margin-left: -2.125rem !important;
    width: calc(100% + 4rem) !important;
    max-width: none !important;
  }
}

@media (max-width: 767.98px) {
  .home-section.admin-home-layout {
    width: calc(100% - 3rem);
    max-width: calc(100vw - 3rem);
  }

  .sidebar.active ~ .home-section.admin-home-layout {
    width: calc(100% - 60px - 3rem);
    max-width: calc(100vw - 60px - 3rem);
  }

  body.programme-management-content-page .home-section,
  body.programme-management-content-page .sidebar.active ~ .home-section {
    left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-top: 0.7rem !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    padding-bottom: calc(8rem + env(safe-area-inset-bottom)) !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  body.programme-management-content-page .home-section nav,
  body.programme-management-content-page .sidebar.active ~ .home-section nav {
    left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    margin-left: 0 !important;
  }

  body.programme-management-content-page #app.programme-content-ui {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)) !important;
    box-sizing: border-box !important;
  }

  body.programme-management-content-page .programme-content-shell {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom)) !important;
    overflow: visible !important;
  }

  body.programme-management-content-page .programme-panel {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    overflow: visible;
  }

  body.programme-management-content-page #programme-recruitment-section,
  body.programme-management-content-page #programme-recruitment-adverts-card,
  body.programme-management-content-page #programme-recruitment-adverts-list.programme-recruitment-adverts-grid,
  body.programme-management-content-page .programme-table-card {
    width: 100%;
    max-width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box;
  }

  body.programme-management-content-page #programme-recruitment-adverts-list.programme-recruitment-adverts-grid {
    padding-bottom: calc(5.5rem + env(safe-area-inset-bottom));
  }

  body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-advert-card {
    height: auto;
    max-height: none;
    min-height: 0;
  }
}

@media (min-width: 1200px) {
  body.view-programme-main-page.programme-details-compact #status_tabContent > .card {
    width: 100% !important;
    max-width: 100% !important;
  }
}

body.view-programme-main-page #status_tab.programme-main-state-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem !important;
}

body.view-programme-main-page #status_tab.programme-main-state-tabs > .nav-item {
  flex: 1 1 calc(16.666% - 0.85rem);
  min-width: 0;
  margin: 0;
}

body.view-programme-main-page #status_tab.programme-main-state-tabs .programme-main-state-tab.nav-link {
  width: 100%;
  min-height: 186px;
  border-radius: 16px;
  border: 3px solid var(--primary-color) !important;
  outline: 3px solid var(--primary-color);
  outline-offset: 0;
  background: var(--dark-purple-2, #3d0878);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  padding: 1.05rem 1.1rem;
  text-align: left;
  box-shadow: 0 0 0 2px var(--primary-color);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease,
    border-color 0.2s ease,
    background-color 0.2s ease;
}

body.view-programme-main-page #status_tab.programme-main-state-tabs .programme-main-state-tab.nav-link:not(.active) {
  background: linear-gradient(rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.16)), var(--dark-purple-2, #3d0878) !important;
  border-color: var(--primary-color) !important;
  filter: none;
  outline-color: var(--primary-color);
  box-shadow: 0 0 0 2px var(--primary-color), inset 0 0 0 9999px rgba(255, 255, 255, 0.12);
}

body.view-programme-main-page #status_tab.programme-main-state-tabs .programme-main-state-tab.nav-link:hover {
  transform: translateY(-1px);
  outline-color: var(--primary-color);
  box-shadow: 0 0 0 2px var(--primary-color), inset 0 0 0 9999px rgba(255, 255, 255, 0.07);
}

body.view-programme-main-page #status_tab.programme-main-state-tabs .programme-main-state-tab.nav-link.active {
  background: var(--dark-purple-2, #3d0878) !important;
  color: #fff;
  border-color: var(--primary-color) !important;
  filter: saturate(1) brightness(1);
  transform: translateY(-2px);
  outline-color: var(--primary-color);
  box-shadow: 0 0 0 2px var(--primary-color), 0 16px 34px rgba(15, 23, 42, 0.18) !important;
}

/* On view_programme_main, keep the card border on the tab shell only.
   The legacy state-card inner wrapper border creates a vertical split line. */
body.view-programme-main-page #status_tab.programme-main-state-tabs .programme-main-state-tab.programme-state-card-link > div {
  width: 100%;
  border: 0 !important;
  outline: 0 !important;
  box-shadow: none !important;
  transform: none !important;
}

body.view-programme-main-page .programme-main-state-tab-icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: #4950b2;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  line-height: 1;
}

body.view-programme-main-page .programme-main-state-tab-title {
  color: #fff;
  font-size: 1.42rem;
  font-weight: 600;
  line-height: 1.1;
}

body.view-programme-main-page .programme-main-state-tab-desc {
  color: rgba(255, 255, 255, 0.98);
  font-size: 1.04rem;
  line-height: 1.25;
}

body.view-programme-main-page .programme-main-state-tab-footer {
  margin-top: auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
}

body.view-programme-main-page .programme-main-state-tab-open {
  background: #4b54bc;
  color: #fff;
  border-radius: 999px;
  font-size: 0.96rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.38rem 0.72rem;
  white-space: nowrap;
}

body.view-programme-main-page .programme-main-state-tab-meta {
  color: #fff;
  font-size: 0.98rem;
  font-weight: 500;
  white-space: nowrap;
}

@media (max-width: 1399.98px) {
  body.view-programme-main-page #status_tab.programme-main-state-tabs > .nav-item {
    flex: 1 1 calc(33.333% - 0.85rem);
    min-width: 220px;
  }
}

@media (max-width: 1199.98px) {
  body.view-programme-main-page #status_tab.programme-main-state-tabs > .nav-item {
    flex: 1 1 calc(50% - 0.85rem);
    min-width: 260px;
  }
}

@media (max-width: 767.98px) {
  body.view-programme-main-page #status_tab.programme-main-state-tabs > .nav-item {
    flex: 1 1 100%;
    min-width: 0;
  }

  body.view-programme-main-page #status_tab.programme-main-state-tabs .programme-main-state-tab.nav-link {
    min-height: 164px;
    padding: 0.9rem 0.95rem;
  }

  body.view-programme-main-page .programme-main-state-tab-title {
    font-size: 1.16rem;
  }

  body.view-programme-main-page .programme-main-state-tab-desc,
  body.view-programme-main-page .programme-main-state-tab-meta {
    font-size: 0.94rem;
  }

  body.view-programme-main-page .programme-main-state-tab-open {
    font-size: 0.88rem;
  }
}

/* Tablet/medium unified sidebar: keep active item icon + label white for contrast. */
@media (max-width: 1199.98px) {
  .sidebar.sidebar-md .orcaa-sidebar .programme-icons-sidebar > .nav-item.active,
  .app-home-list #home-admin-fixed-sidebar > .nav-item.active,
  .app-home-list #home-default-sidebar > .nav-item.active,
  .app-programme-cards-list #programme-sidebar-accordion > .nav-item.active,
  .app-course-list #admin-course-sidebar > .nav-item.active,
  .app-course-list #learner-course-sidebar > .nav-item.active,
  .app-course-list #teacher-course-sidebar > .nav-item.active,
  .app-programme-cards-list .mentor-primary-sidebar > .nav-item.active {
    color: #fff !important;
  }

  .sidebar.sidebar-md .orcaa-sidebar .programme-icons-sidebar > .nav-item.active .programme-icon-label,
  .sidebar.sidebar-md .orcaa-sidebar .programme-icons-sidebar > .nav-item.active .programme-icon-circle i,
  .app-home-list #home-admin-fixed-sidebar > .nav-item.active .programme-icon-label,
  .app-home-list #home-admin-fixed-sidebar > .nav-item.active .programme-icon-circle i,
  .app-home-list #home-default-sidebar > .nav-item.active .programme-icon-label,
  .app-home-list #home-default-sidebar > .nav-item.active .programme-icon-circle i,
  .app-programme-cards-list #programme-sidebar-accordion > .nav-item.active .programme-icon-label,
  .app-programme-cards-list #programme-sidebar-accordion > .nav-item.active .programme-icon-circle i,
  .app-course-list #admin-course-sidebar > .nav-item.active .programme-icon-label,
  .app-course-list #admin-course-sidebar > .nav-item.active .programme-icon-circle i,
  .app-course-list #learner-course-sidebar > .nav-item.active .programme-icon-label,
  .app-course-list #learner-course-sidebar > .nav-item.active .programme-icon-circle i,
  .app-course-list #teacher-course-sidebar > .nav-item.active .programme-icon-label,
  .app-course-list #teacher-course-sidebar > .nav-item.active .programme-icon-circle i,
  .app-programme-cards-list .mentor-primary-sidebar > .nav-item.active .programme-icon-label,
  .app-programme-cards-list .mentor-primary-sidebar > .nav-item.active .programme-icon-circle i,
  .app-evaluation-list #evaluation-sidebar-accordion > .nav-item.active .programme-icon-label,
  .app-evaluation-list #evaluation-sidebar-accordion > .nav-item.active .programme-icon-circle i {
    color: #fff !important;
  }
}

/* Desktop unified sidebar: keep app navigation visually identical across
   dashboard, programme, and system-management shells. */
@media (min-width: 1200px) {
  body.programme-cards-medium-bootstrap .app-programme-cards-list #programme-sidebar-accordion,
  body.programme-cards-medium-bootstrap .app-assessment-list #programme-sidebar-accordion,
  body.programme-cards-medium-bootstrap .app-home-list #home-admin-fixed-sidebar,
  body.programme-cards-medium-bootstrap .app-home-list #home-default-sidebar,
  body.programme-cards-medium-bootstrap .app-home-list .team-admin-primary-sidebar,
  body.programme-cards-medium-bootstrap .app-home-list .local-admin-primary-sidebar,
  body.programme-cards-medium-bootstrap .app-home-list .mentor-primary-sidebar,
  body.programme-cards-medium-bootstrap .app-programme-cards-list .mentor-primary-sidebar,
  body.programme-cards-medium-bootstrap .app-course-list #teacher-course-sidebar,
  .app-evaluation-list #evaluation-sidebar-accordion {
    width: 100%;
    margin-top: 0 !important;
    padding-top: 0.5rem;
    padding-bottom: 1rem;
    gap: 0;
  }

  body.programme-cards-medium-bootstrap .app-programme-cards-list #programme-sidebar-accordion > .nav-item,
  body.programme-cards-medium-bootstrap .app-assessment-list #programme-sidebar-accordion > .nav-item,
  body.programme-cards-medium-bootstrap .app-home-list #home-admin-fixed-sidebar > .nav-item,
  body.programme-cards-medium-bootstrap .app-home-list #home-default-sidebar > .nav-item,
  body.programme-cards-medium-bootstrap .app-home-list .team-admin-primary-sidebar > .nav-item,
  body.programme-cards-medium-bootstrap .app-home-list .local-admin-primary-sidebar > .nav-item,
  body.programme-cards-medium-bootstrap .app-home-list .mentor-primary-sidebar > .nav-item,
  body.programme-cards-medium-bootstrap .app-programme-cards-list .mentor-primary-sidebar > .nav-item,
  body.programme-cards-medium-bootstrap .app-course-list #teacher-course-sidebar > .nav-item,
  body.programme-cards-medium-bootstrap .app-home-list .home-root-link,
  .app-evaluation-list #evaluation-sidebar-accordion > .nav-item {
    width: calc(100% - 0.85rem) !important;
    min-width: 0 !important;
    max-width: calc(100% - 0.85rem) !important;
    min-height: 3.85rem;
    padding: 0.42rem 0.38rem 0.46rem !important;
    margin: 0 auto 0.44rem auto !important;
    border-radius: 0.9rem;
    gap: 0.18rem;
    box-sizing: border-box;
  }

  body.programme-cards-medium-bootstrap .app-programme-cards-list #programme-sidebar-accordion > .nav-item:hover,
  body.programme-cards-medium-bootstrap .app-programme-cards-list #programme-sidebar-accordion > .nav-item:focus-within,
  body.programme-cards-medium-bootstrap .app-assessment-list #programme-sidebar-accordion > .nav-item:hover,
  body.programme-cards-medium-bootstrap .app-assessment-list #programme-sidebar-accordion > .nav-item:focus-within,
  body.programme-cards-medium-bootstrap .app-home-list #home-admin-fixed-sidebar > .nav-item:hover,
  body.programme-cards-medium-bootstrap .app-home-list #home-admin-fixed-sidebar > .nav-item:focus-within,
  body.programme-cards-medium-bootstrap .app-home-list #home-default-sidebar > .nav-item:hover,
  body.programme-cards-medium-bootstrap .app-home-list #home-default-sidebar > .nav-item:focus-within,
  body.programme-cards-medium-bootstrap .app-home-list .team-admin-primary-sidebar > .nav-item:hover,
  body.programme-cards-medium-bootstrap .app-home-list .team-admin-primary-sidebar > .nav-item:focus-within,
  body.programme-cards-medium-bootstrap .app-home-list .local-admin-primary-sidebar > .nav-item:hover,
  body.programme-cards-medium-bootstrap .app-home-list .local-admin-primary-sidebar > .nav-item:focus-within,
  body.programme-cards-medium-bootstrap .app-home-list .mentor-primary-sidebar > .nav-item:hover,
  body.programme-cards-medium-bootstrap .app-home-list .mentor-primary-sidebar > .nav-item:focus-within,
  body.programme-cards-medium-bootstrap .app-programme-cards-list .mentor-primary-sidebar > .nav-item:hover,
  body.programme-cards-medium-bootstrap .app-programme-cards-list .mentor-primary-sidebar > .nav-item:focus-within,
  body.programme-cards-medium-bootstrap .app-course-list #teacher-course-sidebar > .nav-item:hover,
  body.programme-cards-medium-bootstrap .app-course-list #teacher-course-sidebar > .nav-item:focus-within,
  .app-evaluation-list #evaluation-sidebar-accordion > .nav-item:hover,
  .app-evaluation-list #evaluation-sidebar-accordion > .nav-item:focus-within {
    margin: 0 auto 0.44rem auto !important;
  }

  body.programme-cards-medium-bootstrap .app-programme-cards-list #programme-sidebar-accordion .programme-icon-circle,
  body.programme-cards-medium-bootstrap .app-assessment-list #programme-sidebar-accordion .programme-icon-circle,
  body.programme-cards-medium-bootstrap .app-home-list #home-admin-fixed-sidebar .programme-icon-circle,
  body.programme-cards-medium-bootstrap .app-home-list #home-default-sidebar .programme-icon-circle,
  body.programme-cards-medium-bootstrap .app-home-list .team-admin-primary-sidebar .programme-icon-circle,
  body.programme-cards-medium-bootstrap .app-home-list .local-admin-primary-sidebar .programme-icon-circle,
  body.programme-cards-medium-bootstrap .app-home-list .mentor-primary-sidebar .programme-icon-circle,
  body.programme-cards-medium-bootstrap .app-programme-cards-list .mentor-primary-sidebar .programme-icon-circle,
  body.programme-cards-medium-bootstrap .app-course-list #teacher-course-sidebar .programme-icon-circle,
  .app-evaluation-list #evaluation-sidebar-accordion .programme-icon-circle {
    width: 1.62rem !important;
    height: 1.62rem !important;
    margin-bottom: 0 !important;
  }

  body.programme-cards-medium-bootstrap .app-programme-cards-list #programme-sidebar-accordion .programme-icon-circle i,
  body.programme-cards-medium-bootstrap .app-assessment-list #programme-sidebar-accordion .programme-icon-circle i,
  body.programme-cards-medium-bootstrap .app-home-list #home-admin-fixed-sidebar .programme-icon-circle i,
  body.programme-cards-medium-bootstrap .app-home-list #home-default-sidebar .programme-icon-circle i,
  body.programme-cards-medium-bootstrap .app-home-list .team-admin-primary-sidebar .programme-icon-circle i,
  body.programme-cards-medium-bootstrap .app-home-list .local-admin-primary-sidebar .programme-icon-circle i,
  body.programme-cards-medium-bootstrap .app-home-list .mentor-primary-sidebar .programme-icon-circle i,
  body.programme-cards-medium-bootstrap .app-programme-cards-list .mentor-primary-sidebar .programme-icon-circle i,
  body.programme-cards-medium-bootstrap .app-course-list #teacher-course-sidebar .programme-icon-circle i,
  .app-evaluation-list #evaluation-sidebar-accordion .programme-icon-circle i {
    font-size: 1rem !important;
    line-height: 1 !important;
  }

  body.programme-cards-medium-bootstrap .app-programme-cards-list #programme-sidebar-accordion .programme-icon-label,
  body.programme-cards-medium-bootstrap .app-assessment-list #programme-sidebar-accordion .programme-icon-label,
  body.programme-cards-medium-bootstrap .app-home-list #home-admin-fixed-sidebar .programme-icon-label,
  body.programme-cards-medium-bootstrap .app-home-list #home-default-sidebar .programme-icon-label,
  body.programme-cards-medium-bootstrap .app-home-list .team-admin-primary-sidebar .programme-icon-label,
  body.programme-cards-medium-bootstrap .app-home-list .local-admin-primary-sidebar .programme-icon-label,
  body.programme-cards-medium-bootstrap .app-home-list .mentor-primary-sidebar .programme-icon-label,
  body.programme-cards-medium-bootstrap .app-programme-cards-list .mentor-primary-sidebar .programme-icon-label,
  body.programme-cards-medium-bootstrap .app-course-list #teacher-course-sidebar .programme-icon-label,
  .app-evaluation-list #evaluation-sidebar-accordion .programme-icon-label {
    width: 100%;
    max-width: 100%;
    font-size: 0.68rem !important;
    font-weight: 500 !important;
    line-height: 1.12 !important;
    min-height: 0 !important;
    text-align: center !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
  }

  /* Give the practicals main shell a smaller, even gutter on both sides so
     the card sits closer to the sidebar and the right edge equally. */
  body.practicals-management-standalone-page #practicals-management-shell {
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }

}

@media (max-width: 767.98px) {
  /* Practicals uses the non-admin home-section path. Reset its Bootstrap
     mx-4 margin and base padding so the shell has equal mobile gutters. */
  body.practicals-management-standalone-page .home-section:not(.admin-home-layout) {
    left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    box-sizing: border-box !important;
  }

  body.practicals-management-standalone-page #app.practicals-management-app-shell {
    margin-left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Extend the visible shell toward the sidebar while preserving its flush
     right edge. */
  body.practicals-management-standalone-page #practicals-management-shell {
    margin-left: -2.5rem !important;
    width: calc(100% + 2.5rem) !important;
    max-width: none !important;
    box-sizing: border-box !important;
  }
}

/* Files warehouse explorer tree */
.files-warehouse-panel {
  --warehouse-surface: #fff;
  --warehouse-surface-soft: #f8fafc;
  --warehouse-border: rgba(15, 23, 42, 0.08);
  --warehouse-text: #1f2937;
  --warehouse-muted: #64748b;
  --warehouse-line: rgba(148, 163, 184, 0.38);
  --warehouse-line-strong: rgba(59, 130, 246, 0.18);
  --warehouse-folder: #f59e0b;
  --warehouse-folder-active: #d97706;
  --warehouse-chevron: #475569;
  --warehouse-row-radius: 0.85rem;
  --warehouse-row-height: 2.8rem;
  --warehouse-indent: 1.1rem;
  --warehouse-icon-width: 1.95rem;
}

.files-warehouse-panel .system-management-table-shell {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding: 1rem 1rem 1.15rem !important;
  box-sizing: border-box;
  overflow-x: hidden !important;
  overflow-y: visible !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.98));
}

.files-warehouse-panel .card.border-light {
  border-color: var(--warehouse-border) !important;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

.files-warehouse-panel .files-warehouse-header {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  margin-bottom: 0.9rem;
}

.files-warehouse-panel .files-warehouse-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--warehouse-muted);
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.3;
}

.files-warehouse-panel .files-warehouse-kicker i {
  font-size: 0.85rem;
}

.files-warehouse-panel .files-warehouse-title {
  color: var(--warehouse-text);
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.2;
}

.files-warehouse-panel .folder-structure {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

.files-warehouse-panel .ul-tree,
.files-warehouse-panel .nested {
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 0;
}

.files-warehouse-panel .ul-tree {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.files-warehouse-panel .ul-tree > li,
.files-warehouse-panel .nested > li {
  position: relative;
  min-width: 0;
}

.files-warehouse-panel .nested {
  margin-left: var(--warehouse-indent);
  padding-left: calc(var(--warehouse-indent) - 0.15rem);
  border-left: 1px solid var(--warehouse-line);
  padding-top: 0.2rem;
}

.files-warehouse-panel .nested > li + li {
  margin-top: 0.15rem;
}

.files-warehouse-panel .ul-tree > li::before,
.files-warehouse-panel .ul-tree > li::after,
.files-warehouse-panel .nested > li::after {
  content: none !important;
  display: none !important;
  border: 0 !important;
  transform: none !important;
}

.files-warehouse-panel .nested > li::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--warehouse-indent));
  top: 1.15rem;
  width: var(--warehouse-indent);
  height: 0;
  border-left: 0;
  border-top: 1px solid var(--warehouse-line);
  transform: none;
  pointer-events: none;
}

.files-warehouse-panel .caret,
.files-warehouse-panel .file-item {
  width: 100%;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: var(--warehouse-row-radius);
  color: var(--warehouse-text);
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    color 0.18s ease,
    transform 0.18s ease;
}

.files-warehouse-panel .caret::before,
.files-warehouse-panel .caret::after {
  content: none !important;
  display: none !important;
}

.files-warehouse-panel .caret {
  display: flex;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 0.55rem;
  min-height: var(--warehouse-row-height);
  padding: 0.45rem 0.65rem 0.45rem 0.3rem;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  line-height: 1.35;
}

.files-warehouse-panel .caret:hover,
.files-warehouse-panel .file-item:hover {
  background: var(--warehouse-surface-soft);
}

.files-warehouse-panel .caret.caret-down,
.files-warehouse-panel .caret.is-selected {
  background: rgba(59, 130, 246, 0.08);
  border-color: var(--warehouse-line-strong);
  box-shadow: inset 0 0 0 1px rgba(59, 130, 246, 0.08);
}

.files-warehouse-panel .warehouse-empty-node > .caret {
  cursor: default;
  pointer-events: none;
  opacity: 0.66;
}

.files-warehouse-panel .warehouse-empty-node .tree-chevron {
  display: none;
}

.files-warehouse-panel .warehouse-empty-node .warehouse-tree-icon-stack {
  width: 1rem;
}

.files-warehouse-panel .warehouse-tree-icon-stack {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.28rem;
  width: var(--warehouse-icon-width);
  flex: 0 0 var(--warehouse-icon-width);
  padding-top: 0.12rem;
}

.files-warehouse-panel .tree-chevron {
  width: 0.9rem;
  text-align: center;
  color: var(--warehouse-chevron);
  transition: transform 0.18s ease, color 0.18s ease;
}

.files-warehouse-panel .caret.caret-down .tree-chevron {
  transform: rotate(90deg);
  color: var(--primary-color);
}

.files-warehouse-panel .tree-folder-icon {
  color: var(--warehouse-folder);
  font-size: 1rem;
}

.files-warehouse-panel .caret.caret-down .tree-folder-icon,
.files-warehouse-panel .caret.is-selected .tree-folder-icon {
  color: var(--warehouse-folder-active);
}

.files-warehouse-panel .folder-name,
.files-warehouse-panel .view-file-btn {
  min-width: 0;
  color: var(--warehouse-text);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.files-warehouse-panel .folder-name {
  display: block;
  flex: 1 1 auto;
  font-size: 0.95rem !important;
  font-weight: 600;
  line-height: 1.35;
  padding-top: 0.06rem;
}

.files-warehouse-panel .course-li .folder-name {
  font-size: 0.92rem !important;
}

.files-warehouse-panel .warehouse-tree-meta {
  display: block;
  flex: 0 0 100%;
  width: 100%;
  margin-top: 0.18rem;
  padding-left: calc(var(--warehouse-icon-width) + 0.2rem);
  box-sizing: border-box;
  color: var(--warehouse-muted);
  font-size: 0.72rem;
  font-weight: 400;
  line-height: 1.35;
}

.files-warehouse-panel .file-item {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  min-height: 2.45rem;
  padding: 0.35rem 0.65rem 0.35rem 0.3rem;
}

.files-warehouse-panel .tree-file-icon {
  width: 1rem;
  flex: 0 0 1rem;
  color: var(--warehouse-muted);
  font-size: 0.95rem;
  text-align: center;
}

.files-warehouse-panel .view-file-btn {
  display: block;
  flex: 1 1 auto;
  margin: 0;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.35;
}

.files-warehouse-panel .warehouse-file-actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.files-warehouse-panel .warehouse-file-actions .btn {
  white-space: nowrap;
}

/* Keep the warehouse delete action readable on the danger background. */
.files-warehouse-panel .warehouse-delete-file-btn {
  --bs-btn-color: #fff;
  --bs-btn-bg: var(--bs-danger, #dc3545);
  --bs-btn-border-color: var(--bs-danger, #dc3545);
  --bs-btn-hover-color: #fff;
  --bs-btn-hover-bg: color-mix(in srgb, var(--bs-danger, #dc3545) 86%, #000 14%);
  --bs-btn-hover-border-color: color-mix(in srgb, var(--bs-danger, #dc3545) 78%, #000 22%);
  --bs-btn-active-color: #fff;
  --bs-btn-active-bg: color-mix(in srgb, var(--bs-danger, #dc3545) 80%, #000 20%);
  --bs-btn-active-border-color: color-mix(in srgb, var(--bs-danger, #dc3545) 72%, #000 28%);
  --bs-btn-focus-shadow-rgb: 220, 53, 69;
  --bs-btn-disabled-color: #fff;
  --bs-btn-disabled-bg: var(--bs-danger, #dc3545);
  --bs-btn-disabled-border-color: var(--bs-danger, #dc3545);
  color: #fff;
  background-color: var(--bs-danger, #dc3545);
  border-color: var(--bs-danger, #dc3545);
}

.files-warehouse-panel .warehouse-delete-file-btn i {
  color: inherit;
}

.files-warehouse-panel .warehouse-delete-file-btn:hover,
.files-warehouse-panel .warehouse-delete-file-btn:focus,
.files-warehouse-panel .warehouse-delete-file-btn:focus-visible {
  color: #fff;
  background-color: color-mix(in srgb, var(--bs-danger, #dc3545) 86%, #000 14%);
  border-color: color-mix(in srgb, var(--bs-danger, #dc3545) 78%, #000 22%);
}

.files-warehouse-panel .warehouse-delete-file-btn:active,
.files-warehouse-panel .warehouse-delete-file-btn.active,
.files-warehouse-panel .show > .warehouse-delete-file-btn.dropdown-toggle {
  color: #fff;
  background-color: color-mix(in srgb, var(--bs-danger, #dc3545) 80%, #000 20%);
  border-color: color-mix(in srgb, var(--bs-danger, #dc3545) 72%, #000 28%);
}

.files-warehouse-panel .view-file-btn:hover,
.files-warehouse-panel .view-file-btn:focus {
  color: var(--primary-color);
}

.files-warehouse-panel .add-program-files {
  display: flex !important;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.35rem;
  padding: 0.2rem 0 0.1rem;
}

.files-warehouse-panel .add-program-files .btn {
  margin: 0 !important;
}

.files-warehouse-panel .loader-container {
  display: flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.2rem 0 0.15rem 0.15rem;
  color: var(--warehouse-muted);
}

.files-warehouse-panel .loader-container #spinner,
.files-warehouse-panel .loader-container .bx-loader {
  font-size: 1.2rem !important;
}

@media (max-width: 767.98px) {
  .files-warehouse-panel {
    --warehouse-indent: 0.9rem;
    --warehouse-icon-width: 1.65rem;
  }

  .files-warehouse-panel .system-management-table-shell {
    padding: 0.85rem 0.75rem 1rem !important;
  }

  .files-warehouse-panel .files-warehouse-header {
    margin-bottom: 0.75rem;
  }

  .files-warehouse-panel .files-warehouse-title {
    font-size: 0.95rem;
  }

  .files-warehouse-panel .folder-name {
    font-size: 0.9rem !important;
  }

  .files-warehouse-panel .course-li .folder-name {
    font-size: 0.88rem !important;
  }

  .files-warehouse-panel .warehouse-tree-meta {
    font-size: 0.68rem;
  }

  .files-warehouse-panel .tree-chevron,
  .files-warehouse-panel .tree-folder-icon,
  .files-warehouse-panel .tree-file-icon {
    font-size: 0.9rem;
  }

  .files-warehouse-panel .caret {
    padding-right: 0.4rem;
  }

  .files-warehouse-panel .file-item {
    padding-right: 0.4rem;
  }
}

/* Assessment Management: Rubric Page */
.rubric-page-shell {
  position: relative;
  width: 100%;
  max-width: 1760px;
  margin-left: auto;
  margin-right: auto;
  padding-left: clamp(0.75rem, 1.25vw, 1.5rem);
  padding-right: clamp(0.75rem, 1.25vw, 1.5rem);
  box-sizing: border-box;
  --rubric-brand: var(--primary-color, #8f469b);
  --rubric-brand-solid: var(--primary-color, #8f469b);
  --rubric-brand-deep: var(--rubric-brand-solid);
  --rubric-brand-soft: color-mix(in srgb, var(--rubric-brand) 8%, #fff 92%);
  --rubric-brand-soft-strong: color-mix(in srgb, var(--rubric-brand) 14%, #fff 86%);
  --rubric-brand-border: color-mix(in srgb, var(--rubric-brand-solid) 72%, #111827 28%);
  --rubric-brand-border-strong: color-mix(in srgb, var(--rubric-brand-solid) 64%, #111827 36%);
  --rubric-brand-shadow: color-mix(in srgb, var(--rubric-brand-solid) 18%, transparent);
  --rubric-brand-text: #fff;
  --rubric-brand-muted: rgba(255, 255, 255, 0.78);
}

.rubric-page-hero {
  border: 1px solid color-mix(in srgb, var(--rubric-brand-solid) 74%, #111827 26%);
  border-radius: 1.25rem;
  background: var(--rubric-brand-solid);
  color: #fff;
  box-shadow: 0 18px 44px var(--rubric-brand-shadow);
  overflow: hidden;
}

.rubric-page-hero .card-body {
  position: relative;
  z-index: 1;
}

.rubric-page-eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.78);
}

.rubric-page-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--primary-color) !important;
}

.rubric-page-badge {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  box-shadow: none;
}

.rubric-page-card {
  border: 1px solid color-mix(in srgb, var(--rubric-brand-solid) 16%, #dbe3ea 84%);
  border-radius: 1.25rem;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
}

.rubric-page-section-header {
  background: var(--rubric-brand-solid);
  border-bottom: 1px solid color-mix(in srgb, var(--rubric-brand-solid) 72%, #111827 28%);
}

.rubric-page-section-header .rubric-page-label {
  color: rgba(255, 255, 255, 0.82) !important;
}

.rubric-page-section-header .rubric-page-label,
.rubric-page-section-header .text-dark,
.rubric-page-section-header h5,
.rubric-page-section-header .text-muted {
  color: #fff !important;
}

.rubric-current-panel .text-muted,
.rubric-empty-state-card .text-muted {
  color: #6b7280 !important;
}

.rubric-page-shell .text-bg-primary {
  background-color: color-mix(in srgb, var(--primary-color) 14%, #fff 86%) !important;
  color: var(--primary-color) !important;
  border: 1px solid color-mix(in srgb, var(--primary-color) 24%, #d1d5db 76%);
}

.rubric-page-shell > .card {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.rubric-page-section-header .text-bg-primary {
  background-color: rgba(255, 255, 255, 0.14) !important;
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.rubric-current-panel {
  border: 1px solid var(--rubric-brand-border-strong);
  border-radius: 1rem;
  background: color-mix(in srgb, var(--rubric-brand) 4%, #fff 96%);
  overflow: hidden;
  padding: 0;
  box-shadow: 0 10px 24px var(--rubric-brand-shadow);
}

.rubric-actions-surface {
  overflow: visible;
  position: relative;
  z-index: 1;
}

.rubric-current-panel-header {
  padding: 1rem 1.1rem 0.95rem;
  border-bottom: 0;
}

.rubric-current-panel-header .rubric-page-label,
.rubric-current-panel-header .text-dark,
.rubric-current-panel-header h5,
.rubric-current-panel-header .text-muted {
  color: #fff !important;
}

.rubric-current-panel-footer {
  padding: 1rem 1.1rem 1.05rem;
  background: #fff;
}

.rubric-current-panel .form-check-label {
  font-size: 0.9rem;
}

.rubric-empty-state-card {
  border: 1px dashed var(--rubric-brand-border-strong);
  border-radius: 1rem;
  background: color-mix(in srgb, var(--rubric-brand) 3%, #fff 97%);
  padding: 1rem 1.1rem;
}

.rubric-empty-state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.6rem;
  height: 2.6rem;
  flex: 0 0 auto;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary-color) 14%, #fff 86%);
  color: var(--primary-color);
  font-size: 1.1rem;
}

.rubric-tabs {
  background: color-mix(in srgb, var(--btn-outline-primary-bg, var(--secondary-color)) 6%, #f8fafc 94%);
  padding: 6px;
  border-radius: 999px;
  gap: 6px;
  border: 1px solid color-mix(in srgb, var(--btn-outline-primary-border, var(--primary-color)) 18%, #dbe3ea 82%);
  flex-wrap: wrap;
}

.rubric-tabs .nav-item {
  min-width: 0;
}

.rubric-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.45rem 0.8rem;
  font-size: 0.75rem;
  font-weight: 600;
  border: 1px solid color-mix(in srgb, var(--btn-outline-primary-border, var(--primary-color)) 26%, #d1d5db 74%);
  background-color: color-mix(in srgb, var(--btn-outline-primary-bg, var(--secondary-color)) 12%, #ffffff 88%);
  color: var(--primary-color);
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.rubric-tab.active {
  background-color: var(--btn-outline-primary-bg, var(--secondary-color)) !important;
  color: var(--btn-outline-primary-text, #fff) !important;
  border-color: var(--btn-outline-primary-border, var(--primary-color)) !important;
  box-shadow: none;
}

.rubric-tab:not(.active):hover,
.rubric-tab:not(.active):focus {
  background-color: var(--btn-outline-primary-hover-bg, var(--secondary-color));
  border-color: var(--btn-outline-primary-hover-border, var(--secondary-color));
  color: var(--btn-outline-primary-hover-text, #fff);
}

.rubric-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.25rem;
  padding-top: 0.35rem;
  padding-bottom: 0.35rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.1;
  white-space: nowrap;
}

.rubric-btn-secondary {
  background-color: color-mix(in srgb, var(--btn-outline-primary-bg, var(--secondary-color)) 10%, #fff 90%);
  color: var(--primary-color);
  border-color: color-mix(in srgb, var(--btn-outline-primary-border, var(--primary-color)) 28%, #d1d5db 72%);
}

.rubric-btn-secondary:hover,
.rubric-btn-secondary:focus,
.rubric-btn-secondary:active {
  background-color: color-mix(in srgb, var(--btn-outline-primary-bg, var(--secondary-color)) 16%, #fff 84%);
  color: var(--primary-color);
  border-color: var(--primary-color);
}

.rubric-btn-secondary:disabled {
  opacity: 0.65;
}

.rubric-swal-actions {
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.rubric-swal-btn {
  border-radius: 999px;
  min-height: 2.25rem;
  padding: 0.35rem 0.9rem;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.1;
  box-shadow: none;
}

.rubric-swal-btn--primary {
  background-color: var(--btn-outline-primary-bg, var(--secondary-color));
  color: var(--btn-outline-primary-text, #fff);
  border: 1px solid transparent;
}

.rubric-swal-btn--primary:hover,
.rubric-swal-btn--primary:focus,
.rubric-swal-btn--primary:active {
  background-color: var(--btn-outline-primary-hover-bg, var(--secondary-color));
  color: var(--btn-outline-primary-hover-text, #fff);
  border-color: transparent;
}

.rubric-swal-btn--secondary {
  background-color: var(--btn-outline-primary-bg, var(--secondary-color));
  color: var(--btn-outline-primary-text, #fff);
  border: 1px solid transparent;
}

.rubric-swal-btn--secondary:hover,
.rubric-swal-btn--secondary:focus,
.rubric-swal-btn--secondary:active {
  background-color: var(--btn-outline-primary-hover-bg, var(--secondary-color));
  color: var(--btn-outline-primary-hover-text, #fff);
  border-color: transparent;
}

.swal2-container .swal2-actions {
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.swal2-container .swal2-confirm,
.swal2-container .swal2-cancel {
  border-radius: 999px !important;
  min-height: 2.25rem !important;
  padding: 0.5rem 1rem !important;
  font-size: 0.875rem !important;
  font-weight: 600 !important;
  line-height: 1.1 !important;
  box-shadow: none !important;
  align-items: center !important;
  justify-content: center !important;
  white-space: nowrap !important;
  min-width: 7rem !important;
}

.swal2-container .swal2-confirm {
  display: inline-flex !important;
}

.swal2-container .swal2-cancel[style*="display: none"] {
  display: none !important;
}

.swal2-container .swal2-confirm {
  background-color: var(--btn-outline-primary-bg, var(--secondary-color)) !important;
  color: var(--btn-outline-primary-text, #fff) !important;
  border: 1px solid transparent !important;
}

.swal2-container .swal2-confirm:hover,
.swal2-container .swal2-confirm:focus,
.swal2-container .swal2-confirm:active {
  background-color: var(--btn-outline-primary-hover-bg, var(--secondary-color)) !important;
  color: var(--btn-outline-primary-hover-text, #fff) !important;
  border-color: transparent !important;
}

.swal2-container .swal2-cancel {
  background-color: var(--btn-outline-primary-bg, var(--secondary-color)) !important;
  color: var(--btn-outline-primary-text, #fff) !important;
  border: 1px solid transparent !important;
}

.swal2-container .swal2-cancel:hover,
.swal2-container .swal2-cancel:focus,
.swal2-container .swal2-cancel:active {
  background-color: var(--btn-outline-primary-hover-bg, var(--secondary-color)) !important;
  color: var(--btn-outline-primary-hover-text, #fff) !important;
  border-color: transparent !important;
}

.swal2-container .archive-role-swal-confirm.swal2-confirm,
.swal2-container .archive-role-swal-cancel.swal2-cancel {
  background-color: var(--btn-outline-primary-bg, var(--secondary-color)) !important;
  background-image: none !important;
  color: var(--btn-outline-primary-text, #fff) !important;
  border: 1px solid transparent !important;
  box-shadow: none !important;
}

.swal2-container .archive-role-swal-confirm.swal2-confirm:hover,
.swal2-container .archive-role-swal-confirm.swal2-confirm:focus,
.swal2-container .archive-role-swal-confirm.swal2-confirm:active,
.swal2-container .archive-role-swal-cancel.swal2-cancel:hover,
.swal2-container .archive-role-swal-cancel.swal2-cancel:focus,
.swal2-container .archive-role-swal-cancel.swal2-cancel:active {
  background-color: var(--btn-outline-primary-hover-bg, var(--secondary-color)) !important;
  color: var(--btn-outline-primary-hover-text, #fff) !important;
  border-color: transparent !important;
}

.swal2-container .skill-hierarchy-swal-actions.swal2-actions {
  justify-content: flex-end !important;
  gap: 0.75rem !important;
}

.swal2-container .skill-hierarchy-swal-confirm.swal2-confirm,
.swal2-container .skill-hierarchy-swal-cancel.swal2-cancel {
  border-radius: 0.5rem !important;
  min-width: 6.75rem !important;
  min-height: 2.5rem !important;
  padding: 0.75rem 1.25rem !important;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
}

.swal2-container .skill-hierarchy-swal-confirm.swal2-confirm {
  background-color: #3d0066 !important;
}

.swal2-container .skill-hierarchy-swal-cancel.swal2-cancel {
  background-color: #4f46a6 !important;
}

.swal2-container .assessment-delete-confirm__actions {
  display: inline-flex !important;
  gap: 0.75rem !important;
  justify-content: center !important;
  align-items: center !important;
}

.swal2-container .assessment-delete-confirm__delete,
.swal2-container .assessment-delete-confirm__cancel {
  min-width: 6.75rem !important;
  min-height: 2.5rem !important;
  border-radius: 999px !important;
  padding: 0.5rem 1.1rem !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  line-height: 1.1 !important;
  text-align: center !important;
  background-color: var(--btn-outline-primary-bg, var(--secondary-color)) !important;
  color: var(--btn-outline-primary-text, #fff) !important;
  border: 1px solid transparent !important;
  box-shadow: none !important;
}

.swal2-container .assessment-delete-confirm__delete {
  background-color: var(--btn-outline-primary-bg, var(--secondary-color)) !important;
  color: var(--btn-outline-primary-text, #fff) !important;
  border: 1px solid transparent !important;
}

.swal2-container .assessment-delete-confirm__delete:hover,
.swal2-container .assessment-delete-confirm__delete:focus {
  color: var(--btn-outline-primary-hover-text, #fff) !important;
  background-color: var(--btn-outline-primary-hover-bg, var(--secondary-color)) !important;
  border-color: transparent !important;
}

.swal2-container .assessment-delete-confirm__cancel {
  color: var(--btn-outline-primary-text, #fff) !important;
  background-color: var(--btn-outline-primary-bg, var(--secondary-color)) !important;
  border: 1px solid transparent !important;
}

.swal2-container .assessment-delete-confirm__cancel:hover,
.swal2-container .assessment-delete-confirm__cancel:focus {
  color: var(--btn-outline-primary-hover-text, #fff) !important;
  background-color: var(--btn-outline-primary-hover-bg, var(--secondary-color)) !important;
  border-color: transparent !important;
}

/* Keep SweetAlert buttons on-brand without leaking the outline border color into alerts. */
.swal2-container {
  --btn-outline-primary-border: transparent;
  --btn-outline-primary-hover-border: transparent;
  --bs-btn-border-color: transparent;
  --bs-btn-hover-border-color: transparent;
}

/* Final SweetAlert override so alert buttons do not pick up a red outline from theme button styles. */
.swal2-container .swal2-confirm,
.swal2-container .swal2-cancel,
.swal2-container .btn.btn-outline-primary,
.swal2-container .btn-outline-primary {
  border: 1px solid transparent !important;
  box-shadow: none !important;
}

.swal2-container .swal2-confirm:hover,
.swal2-container .swal2-confirm:focus,
.swal2-container .swal2-confirm:active,
.swal2-container .swal2-cancel:hover,
.swal2-container .swal2-cancel:focus,
.swal2-container .swal2-cancel:active,
.swal2-container .btn.btn-outline-primary:hover,
.swal2-container .btn.btn-outline-primary:focus,
.swal2-container .btn.btn-outline-primary:active,
.swal2-container .btn-outline-primary:hover,
.swal2-container .btn-outline-primary:focus,
.swal2-container .btn-outline-primary:active {
  border-color: transparent !important;
  box-shadow: none !important;
}

.swal2-container .swal2-popup.swal2-loading .swal2-confirm,
.swal2-container .swal2-popup.swal2-loading .swal2-cancel,
.swal2-container .swal2-popup.swal2-loading .swal2-deny {
  display: none !important;
}

/* Final safeguard: remove any inherited red focus/border styling from SweetAlert buttons. */
.swal2-container .swal2-confirm,
.swal2-container .swal2-cancel,
.swal2-container .swal2-deny,
.swal2-container button.swal2-styled.swal2-confirm,
.swal2-container button.swal2-styled.swal2-cancel,
.swal2-container button.swal2-styled.swal2-deny,
.swal2-container .btn.btn-outline-primary,
.swal2-container .btn-outline-primary {
  border: 1px solid transparent !important;
  outline: none !important;
  box-shadow: none !important;
  background-image: none !important;
  background-color: var(--btn-outline-primary-bg, var(--secondary-color, #0d6efd)) !important;
  color: var(--btn-outline-primary-text, #fff) !important;
  border-radius: 0.375rem !important;
  padding: .45rem .9rem !important;
  min-width: 6.5rem;
  min-height: 2rem;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.rubric-form-label {
  font-size: 13px;
  font-weight: 600;
  color: #2d3748;
  margin-bottom: 0.5rem;
}

.rubric-form-label i {
  color: var(--primary-color);
}

.rubric-form-control {
  border-radius: 10px;
  padding: 12px;
  border: 2px solid #e2e8f0;
  font-size: 13px;
  transition: all 0.25s ease;
}

.rubric-form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--primary-color) 18%, transparent);
  outline: none;
}

.rubric-form-select {
  border-radius: 10px;
  padding: 12px;
  border: 2px solid #e2e8f0;
  font-size: 13px;
  transition: all 0.25s ease;
}

.rubric-form-select:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--primary-color) 18%, transparent);
  outline: none;
}

.rubric-form-textarea {
  border-radius: 10px;
  padding: 12px;
  border: 2px solid #e2e8f0;
  font-size: 13px;
  font-family: inherit;
  transition: all 0.25s ease;
}

.rubric-form-textarea:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--primary-color) 18%, transparent);
  outline: none;
}

.rubric-form-text {
  font-size: 12px;
  color: #718096;
  margin-top: 0.5rem;
}

.rubric-file-upload-area {
  border: 2px dashed color-mix(in srgb, var(--primary-color) 22%, #cbd5e1 78%);
  border-radius: 10px;
  padding: 2rem;
  text-align: center;
  background: color-mix(in srgb, var(--primary-color) 3%, #f8fafc 97%);
  transition: all 0.25s ease;
}

.rubric-file-upload-area:hover {
  border-color: var(--primary-color);
  background: color-mix(in srgb, var(--primary-color) 5%, #edf2f7 95%);
}

.rubric-file-upload-icon {
  font-size: 48px;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

.rubric-file-input {
  border: none;
  background: transparent;
  text-align: center;
  font-size: 13px;
}

.rubric-preview-area {
  background: color-mix(in srgb, var(--primary-color) 3%, #f8fafc 97%);
  border-radius: 10px;
  border: 2px solid color-mix(in srgb, var(--primary-color) 16%, #e2e8f0 84%);
  max-height: 250px;
  overflow-y: auto;
  font-size: 12px;
  padding: 1rem;
}

.rubric-table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
  justify-content: center;
  width: 100%;
  overflow: visible;
}

.rubric-table-actions .btn {
  white-space: nowrap;
}

[data-assessment-rubric-root] .rubric-actions-dropdown {
  display: inline-flex;
  max-width: 100%;
  position: relative;
  width: auto;
  overflow: visible;
}

[data-assessment-rubric-root] .rubric-actions-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  white-space: nowrap;
}

[data-assessment-rubric-root] .rubric-actions-menu {
  position: fixed !important;
  left: var(--rubric-actions-menu-left, 0) !important;
  top: var(--rubric-actions-menu-top, 0) !important;
  width: 260px;
  max-width: calc(100vw - 1rem);
  max-height: calc(100vh - 1rem);
  overflow: hidden auto;
  padding: 0.5rem;
  display: flex !important;
  flex-direction: column;
  gap: 0.25rem;
  background: #fff;
  border: 1px solid rgb(15 23 42 / 8%);
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgb(15 23 42 / 18%);
  z-index: 4000 !important;
  visibility: hidden;
  pointer-events: none;
  right: auto !important;
  margin-top: 0 !important;
  transform: none !important;
}

[data-assessment-rubric-root] .rubric-actions-menu.is-open {
  visibility: visible;
  pointer-events: auto;
}

[data-assessment-rubric-root] .rubric-actions-menu[aria-hidden="true"] {
  display: none !important;
}

.rubric-actions-menu .dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.8rem 0.5rem;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 600;
  line-height: 1.2;
  color: #334155;
  white-space: nowrap;
}

.rubric-actions-menu .dropdown-item:hover,
.rubric-actions-menu .dropdown-item:focus {
  background-color: #f3f6fb;
  color: #1f2937;
}

.rubric-actions-menu .dropdown-item.is-delete:hover,
.rubric-actions-menu .dropdown-item.is-delete:focus {
  background-color: #fdecee;
  color: #dc3545;
}

.rubric-actions-menu .dropdown-item.is-muted {
  opacity: 0.55;
}

.rubric-action-icon {
  width: 1rem;
  min-width: 1rem;
  text-align: center;
  font-size: 0.9rem;
  flex: 0 0 1rem;
}

.rubric-loading-spinner {
  color: var(--primary-color);
  width: 3rem;
  height: 3rem;
  border-width: 4px;
}

.rubric-loading-text {
  color: color-mix(in srgb, var(--primary-color) 84%, #111827 16%);
}

.rubric-loading-subtext {
  color: #6b7280;
}

.rubric-summary {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.rubric-empty-state {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  max-width: 100%;
}

.rubric-empty-state-title {
  margin: 0;
  color: #0f172a;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.2;
}

.rubric-empty-state-copy {
  margin: 0.15rem 0 0;
  color: #64748b;
  font-size: 0.84rem;
  line-height: 1.35;
}

.rubric-actions-toggle {
  min-width: 0;
}

.rubric-table-wrap {
  position: relative;
  padding-bottom: 0.35rem;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable both-edges;
}

.rubric-table-wrap table {
  width: 100%;
}

.rubric-table-wrap thead th {
  background: var(--primary-color);
  color: #fff;
  border-bottom: 1px solid var(--rubric-brand-border);
  white-space: nowrap;
}

.rubric-table-wrap tbody td {
  vertical-align: middle;
}

.rubric-table-wrap tbody td:nth-child(6) {
  position: relative;
  z-index: 3;
  overflow: visible;
}

.rubric-table-wrap .rubric-table-empty-cell {
  padding: 1.25rem 1rem;
}

.rubric-table-state {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: #4b5563;
}

.rubric-page-shell .form-check-input:checked {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.rubric-page-shell .form-check-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--primary-color) 20%, transparent);
}

@media (max-width: 767.98px) {
  .home-section.admin-home-layout .rubric-page-shell[data-assessment-rubric-root],
  .rubric-page-shell[data-assessment-rubric-root] {
    width: 124% !important;
    max-width: 117% !important;
    left: -22px;
    padding-top: 1.75rem !important;
    padding-bottom: 12.75rem !important;
    box-sizing: border-box !important;
  }

  .home-section.admin-home-layout .rubric-page-shell[data-assessment-rubric-root] > .card,
  .rubric-page-shell[data-assessment-rubric-root] > .card {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
  }

  .rubric-page-shell[data-assessment-rubric-root] > .card.mb-4 {
    margin-bottom: 0.75rem !important;
  }

  .rubric-page-hero,
  .rubric-page-card {
    border-radius: 1rem;
  }

  .rubric-page-hero {
    margin-bottom: 0.65rem !important;
  }

  .rubric-page-card,
  .rubric-actions-surface {
    margin-bottom: 0.65rem !important;
  }

  .rubric-page-hero .card-body {
    padding: 0.55rem 0.65rem !important;
  }

  .rubric-page-hero .card-body > .d-flex.flex-wrap.justify-content-between {
    align-items: center !important;
    justify-content: flex-start !important;
    gap: 0.22rem 0.32rem !important;
  }

  .rubric-page-hero .card-body > .d-flex.flex-wrap.justify-content-between > .flex-grow-1 {
    display: contents;
  }

  .rubric-page-hero .card-body > .d-flex.flex-wrap.justify-content-between > .flex-grow-1 > .rubric-page-eyebrow,
  .rubric-page-hero .card-body > .d-flex.flex-wrap.justify-content-between > .flex-grow-1 > h3,
  .rubric-page-hero .card-body > .d-flex.flex-wrap.justify-content-between > .flex-grow-1 > p.text-white-50 {
    flex: 0 0 100%;
    width: 100%;
  }

  .rubric-page-hero .card-body > .d-flex.flex-wrap.justify-content-between > .flex-grow-1 > .d-flex.flex-wrap.gap-2 {
    flex: 0 1 auto;
    width: auto;
    align-items: center;
    gap: 0.18rem !important;
    margin-bottom: 0;
  }

  .rubric-page-hero .card-body > .d-flex.flex-wrap.justify-content-between > .d-flex.flex-wrap.justify-content-end {
    display: inline-flex;
    flex: 0 0 auto;
    width: auto !important;
    margin-left: 0;
    align-self: center;
    justify-content: flex-start !important;
  }

  .rubric-page-hero .rubric-button.btn-outline-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.14rem;
    flex: 0 0 auto;
    flex-shrink: 0;
    min-width: 4.25rem;
    width: auto !important;
    max-width: none !important;
    min-height: 1.5rem;
    padding: 0.13rem 0.38rem !important;
    font-size: 0.58rem !important;
    line-height: 1;
    background-color: var(--btn-outline-primary-bg, var(--primary-color)) !important;
    border-color: var(--btn-outline-primary-border, var(--primary-color)) !important;
    color: var(--btn-outline-primary-text, #fff) !important;
    white-space: nowrap;
    box-shadow: none;
  }

  .rubric-page-hero .rubric-button.btn-outline-primary:hover,
  .rubric-page-hero .rubric-button.btn-outline-primary:focus,
  .rubric-page-hero .rubric-button.btn-outline-primary:active {
    background-color: var(--btn-outline-primary-bg, var(--primary-color)) !important;
    border-color: var(--btn-outline-primary-border, var(--primary-color)) !important;
    color: var(--btn-outline-primary-text, #fff) !important;
  }

  .rubric-page-hero .rubric-button.btn-outline-primary i {
    font-size: 0.82em;
    margin: 0 !important;
  }

  .rubric-page-card > .card-header,
  .rubric-page-section-header {
    padding: 0.6rem 0.68rem !important;
  }

  .rubric-page-card > .card-body.p-4 {
    padding: 0.7rem !important;
  }

  .rubric-current-panel-header,
  .rubric-current-panel-footer {
    padding-left: 0.8rem;
    padding-right: 0.8rem;
  }

  .rubric-page-section-header .d-flex {
    gap: 0.4rem;
  }

  .rubric-page-eyebrow,
  .rubric-page-label {
    font-size: 0.54rem;
    letter-spacing: 0.05em;
  }

  .rubric-page-badge,
  .rubric-page-shell .text-bg-primary {
    font-size: 0.55rem;
    line-height: 1.05;
    padding: 0.17rem 0.4rem;
  }

  .rubric-page-hero h3 {
    font-size: 0.98rem;
    line-height: 1.18;
    margin-bottom: 0.15rem !important;
  }

  .rubric-page-hero p.text-white-50 {
    font-size: 0.6rem;
    line-height: 1.35;
    margin-bottom: 0.45rem !important;
  }

  .rubric-page-section-header h5 {
    font-size: 0.83rem;
    line-height: 1.2;
  }

  .rubric-button,
  .rubric-page-shell .btn,
  .rubric-page-shell .btn-sm,
  .rubric-swal-btn {
    min-height: 1.7rem;
    padding: 0.18rem 0.4rem !important;
    font-size: 0.62rem !important;
    line-height: 1.1;
    border-radius: 0.75rem;
  }

  .rubric-button {
    gap: 0.24rem;
  }

  .rubric-button i,
  .rubric-page-shell .btn i,
  .rubric-swal-btn i,
  .rubric-tab i,
  .rubric-actions-toggle i {
    font-size: 0.85em;
    line-height: 1;
  }

  .rubric-tabs {
    padding: 0.3rem;
    gap: 0.3rem;
    border-radius: 0.9rem;
    margin-bottom: 0.8rem !important;
  }

  .rubric-tabs .nav-item {
    flex: 1 1 100%;
  }

  .rubric-tab {
    width: 100%;
    padding: 0.32rem 0.45rem;
    font-size: 0.62rem;
    border-radius: 0.8rem;
  }

  .rubric-form-label {
    font-size: 0.65rem;
    margin-bottom: 0.3rem;
  }

  .rubric-form-control,
  .rubric-form-select,
  .rubric-form-textarea {
    padding: 0.48rem 0.6rem;
    font-size: 0.68rem;
    border-radius: 0.7rem;
  }

  .rubric-form-text {
    font-size: 0.62rem;
    line-height: 1.35;
  }

  .rubric-file-upload-area {
    padding: 0.8rem 0.75rem;
    border-radius: 0.7rem;
  }

  .rubric-file-upload-icon {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
  }

  .rubric-preview-area {
    max-height: 180px;
    padding: 0.65rem;
    font-size: 0.62rem;
    border-radius: 0.7rem;
  }

  .rubric-loading-spinner {
    width: 2rem;
    height: 2rem;
    border-width: 3px;
  }

  .rubric-loading-text {
    font-size: 0.66rem;
  }

  .rubric-loading-subtext {
    font-size: 0.62rem;
  }

  .rubric-table-wrap {
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100%;
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: visible !important;
    scrollbar-gutter: auto;
    box-sizing: border-box;
  }

  .rubric-table-wrap table {
    min-width: 46rem;
    table-layout: fixed;
  }

  .rubric-table-wrap thead th,
  .rubric-table-wrap tbody td {
    padding: 0.4rem 0.45rem !important;
    font-size: 0.62rem;
    line-height: 1.2;
    white-space: normal;
  }

  .rubric-table-wrap thead th:nth-child(1),
  .rubric-table-wrap tbody td:nth-child(1) {
    width: 2.75rem;
  }

  .rubric-table-wrap thead th:nth-child(2),
  .rubric-table-wrap tbody td:nth-child(2) {
    width: 7rem;
  }

  .rubric-table-wrap thead th:nth-child(3),
  .rubric-table-wrap tbody td:nth-child(3) {
    width: 9.75rem;
  }

  .rubric-table-wrap thead th:nth-child(4),
  .rubric-table-wrap tbody td:nth-child(4) {
    width: 7rem;
  }

  .rubric-table-wrap thead th:nth-child(5),
  .rubric-table-wrap tbody td:nth-child(5) {
    min-width: 10.5rem;
  }

  .rubric-table-wrap thead th:nth-child(6),
  .rubric-table-wrap tbody td:nth-child(6) {
    width: 9rem;
    min-width: 9rem;
  }

  .rubric-summary {
    font-size: 0.61rem;
    line-height: 1.25;
  }

  .rubric-table-wrap .rubric-table-empty-cell {
    padding: 0.8rem 0.65rem;
  }

  .rubric-table-state {
    gap: 0.45rem;
    font-size: 0.63rem;
  }

  .rubric-empty-state {
    gap: 0.6rem;
  }

  .rubric-empty-state-icon {
    width: 2rem;
    height: 2rem;
    font-size: 0.9rem;
  }

  .rubric-empty-state-title {
    font-size: 0.75rem;
  }

  .rubric-empty-state-copy {
    font-size: 0.62rem;
  }

  .rubric-actions-toggle {
    display: inline-flex !important;
    flex: 0 0 auto !important;
    flex-shrink: 0 !important;
    min-height: 1.65rem;
    min-width: 7.25rem;
    width: auto !important;
    max-width: none !important;
    padding: 0.22rem 0.52rem !important;
    font-size: 0.58rem !important;
    line-height: 1.05;
    border-radius: 0.75rem !important;
    justify-content: center;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
  }

  .rubric-actions-menu {
    width: min(15.5rem, calc(100vw - 1rem)) !important;
    max-width: calc(100vw - 1rem) !important;
    max-height: calc(100vh - 1rem) !important;
    padding: 0.35rem !important;
    border-radius: 0.95rem !important;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.16) !important;
    z-index: 5000 !important;
  }

  .rubric-actions-menu .dropdown-item {
    padding: 0.5rem 0.65rem !important;
    font-size: 0.68rem !important;
    line-height: 1.05;
  }

  .rubric-table-wrap tbody td:nth-child(6) {
    text-align: center;
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
    overflow: visible !important;
  }

  .rubric-table-wrap tbody td:nth-child(6) .rubric-actions-dropdown {
    display: flex;
    width: 100%;
    align-items: center;
    justify-content: flex-end;
    overflow: visible;
  }

  button[data-bs-target="#manageRubricModal"],
  .btn[data-bs-target="#manageRubricModal"] {
    min-height: 1.7rem;
    padding: 0.18rem 0.42rem !important;
    font-size: 0.62rem !important;
    line-height: 1.1;
    border-radius: 0.75rem !important;
    white-space: nowrap;
  }

button[data-bs-target="#manageRubricModal"] i,
.btn[data-bs-target="#manageRubricModal"] i {
  font-size: 0.85em;
  line-height: 1;
}
}

/* Assessment management questions page styles moved from template */
.assessment-overview-card {
  border: 0;
  border-radius: 18px;
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.09);
  overflow: hidden;
  background: #ffffff;
}

body.assessment-management-questions-page .assessment-overview-card.card-margin-top {
  margin-top: -7px !important;
}

@media (min-width: 768px) {
  /* The cards' right margin is already nearly zero; the remaining visible
     gutter comes from .home-section's base 15px padding. Halve only that
     parent-side constraint so both cards can visibly expand to the right. */
  body.assessment-management-questions-page:not(.assessment-management-hide-sidebar)
    .home-section {
    padding-right: 0.46875rem;
  }

  /* The relatively shifted page shell contributes roughly 10px more gutter
     on the right. Recover only that excess; retain the card's mx-3 left edge. */
  body.assessment-management-questions-page:not(.assessment-management-hide-sidebar)
    :is(
      .assessment-overview-card.mx-3,
      .assessment-template-card.mx-3,
      .assessment-scrollable.mx-3
    ) {
    margin-right: 0.09375rem !important;
  }
}

.assessment-overview-banner {
  border-bottom: 0;
  color: #ffffff;
  padding: 1rem 1.15rem 0.95rem;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}

.assessment-overview-card .card-body {
  padding: 1rem 1.1rem 1.1rem;
}

.assessment-overview-topbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.9rem;
}

.assessment-overview-title {
  min-width: 0;
  flex: 1 1 18rem;
}

.assessment-overview-eyebrow {
  display: block;
  margin-bottom: 0.18rem;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.76);
}

.assessment-overview-name {
  margin: 0;
  font-size: 1.12rem;
  line-height: 1.2;
  font-weight: 700;
  color: #ffffff;
}

.assessment-overview-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.45rem;
  flex: 0 1 auto;
}

.assessment-overview-actions .assessment-overview-btn,
.assessment-overview-actions .btn-outline-primary,
.assessment-overview-actions .btn.btn-outline-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  min-height: 2.25rem;
  padding: 0.5rem 0.9rem;
  font-size: 0.84rem;
  font-weight: 400;
  line-height: 1.1;
  border-radius: 999px;
  white-space: nowrap;
  background-color: var(--btn-outline-primary-bg, var(--primary-color));
  background-image: var(--btn-outline-primary-bg);
  background-repeat: no-repeat;
  background-size: cover;
  border: 1px solid transparent;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-image 0.16s ease;
}

.assessment-overview-actions .assessment-overview-btn:hover,
.assessment-overview-actions .assessment-overview-btn:focus,
.assessment-overview-actions .assessment-overview-btn:active,
.assessment-overview-actions .btn-outline-primary:hover,
.assessment-overview-actions .btn-outline-primary:focus,
.assessment-overview-actions .btn-outline-primary:active,
.assessment-overview-actions .btn.btn-outline-primary:hover,
.assessment-overview-actions .btn.btn-outline-primary:focus,
.assessment-overview-actions .btn.btn-outline-primary:active {
  color: #ffffff;
  background-color: var(--btn-outline-primary-bg, var(--primary-color));
  background-image: linear-gradient(
    135deg,
    color-mix(in srgb, var(--btn-outline-primary-bg) 85%, #fff 15%),
    color-mix(in srgb, var(--btn-outline-primary-bg) 95%, #000 5%)
  );
  border-color: transparent;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.assessment-overview-actions .assessment-overview-btn i,
.assessment-overview-actions .btn-outline-primary i,
.assessment-overview-actions .btn.btn-outline-primary i {
  font-size: 0.9em;
  line-height: 1;
}

.assessment-overview-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.75rem;
  align-items: stretch;
}

.assessment-overview-stat {
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  padding: 0.7rem 0.8rem;
  min-height: 0;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04);
}

.assessment-overview-stat-label {
  display: block;
  margin-bottom: 0.15rem;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #64748b;
}

.assessment-overview-stat-value {
  margin: 0;
  font-size: 0.86rem;
  font-weight: 700;
  line-height: 1.2;
  color: #0f172a;
}

.assessment-overview-duration-panel {
  text-align: center;
}

.assessment-template-card {
  border: 0;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
  overflow: hidden;
  margin-bottom: 1rem;
}

.assessment-template-card .card-header {
  background: #ffffff;
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  padding: 0.9rem 1.1rem;
}

.assessment-template-eyebrow {
  display: block;
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #64748b;
  margin-bottom: 0.25rem;
}

.assessment-template-title {
  margin: 0;
  font-size: 0.96rem;
  font-weight: 700;
  color: #0f172a;
}

.assessment-template-copy {
  margin: 0.25rem 0 0;
  font-size: 0.72rem;
  color: #64748b;
}

.assessment-template-body {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(260px, 0.9fr);
  gap: 1rem;
  padding: 1rem 1.1rem 1.1rem;
  background: #f8fafc;
}

.assessment-template-preview {
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  overflow: hidden;
  min-height: 430px;
}

.assessment-template-preview iframe {
  display: block;
  width: 100%;
  min-height: 430px;
  border: 0;
  background: #fff;
}

.assessment-template-preview-empty {
  height: 100%;
  min-height: 430px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  text-align: center;
  color: #64748b;
  font-size: 0.76rem;
}

.assessment-template-fields {
  background: #fff;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 14px;
  padding: 0.95rem;
}

.assessment-template-fields-title {
  margin: 0 0 0.25rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: #0f172a;
}

.assessment-template-fields-copy {
  margin: 0 0 0.75rem;
  font-size: 0.7rem;
  color: #64748b;
}

.assessment-template-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-bottom: 0.95rem;
}

.assessment-template-badge {
  border-radius: 999px;
  padding: 0.35rem 0.65rem;
  font-size: 0.66rem;
  font-weight: 700;
  background: rgba(91, 33, 182, 0.1);
  color: #5b21b6;
}

.assessment-template-field-list {
  display: grid;
  gap: 0.55rem;
}

.assessment-template-field-item {
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 12px;
  background: #f8fafc;
  padding: 0.7rem 0.8rem;
}

.assessment-template-field-name {
  margin: 0 0 0.18rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: #0f172a;
}

.assessment-template-field-meta {
  margin: 0;
  font-size: 0.68rem;
  color: #64748b;
}

@media (max-width: 767.98px) {
  .assessment-overview-card {
    margin-bottom: 0.75rem;
    border-radius: 16px;
  }

  .assessment-overview-banner {
    padding: 0.85rem 0.85rem 0.8rem;
  }

  .assessment-overview-card .card-body {
    padding: 0.85rem;
  }

  .assessment-overview-topbar {
    flex-direction: column;
    align-items: stretch;
    gap: 0.7rem;
  }

  .assessment-overview-actions {
    width: 100%;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0.35rem;
  }

  .assessment-overview-actions .assessment-overview-btn,
  .assessment-overview-actions .btn-outline-primary,
  .assessment-overview-actions #long_question_marking_btn,
  .assessment-overview-actions #group_similarity_btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 calc(50% - 0.35rem);
    min-width: 0;
    min-height: 1.9rem;
    padding: 0.28rem 0.5rem;
    font-size: 0.64rem;
    line-height: 1.15;
    border-radius: 999px;
    white-space: nowrap;
  }

  .assessment-overview-actions .assessment-overview-btn i,
  .assessment-overview-actions .btn-outline-primary i,
  .assessment-overview-actions #long_question_marking_btn i,
  .assessment-overview-actions #group_similarity_btn i {
    font-size: 0.82em;
  }

  .assessment-scrollable .card-header .d-flex.justify-content-between {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
  }

  .assessment-scrollable .card-header .d-flex.justify-content-between > div:last-child {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    justify-content: flex-start;
  }

  .assessment-scrollable .card-header .d-flex.justify-content-between > div:last-child > .btn,
  .assessment-scrollable .card-header .d-flex.justify-content-between > div:last-child > button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 calc(50% - 0.35rem);
    min-width: 0;
    min-height: 1.9rem;
    padding: 0.26rem 0.45rem;
    font-size: 0.62rem;
    line-height: 1.1;
    border-radius: 999px;
    white-space: nowrap;
  }

  .assessment-scrollable .card-header .d-flex.justify-content-between > div:last-child > .btn i,
  .assessment-scrollable .card-header .d-flex.justify-content-between > div:last-child > button i {
    font-size: 0.82em;
  }

  .assessment-template-card {
    margin-bottom: 0.85rem;
  }

  .assessment-scrollable {
    margin-bottom: 0.9rem;
  }

  .assessment-scrollable .card-header .d-flex.justify-content-between > div:last-child > .btn.float-end {
    float: none !important;
    margin: 0 !important;
  }

  button[data-bs-target="#manageRubricModal"] {
    min-height: 1.9rem;
    padding: 0.26rem 0.45rem !important;
    font-size: 0.62rem !important;
    line-height: 1.1;
    border-radius: 999px;
    white-space: nowrap;
  }

  button[data-bs-target="#manageRubricModal"] i {
    font-size: 0.82em;
  }

  .assessment-overview-stats {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .assessment-overview-stat {
    padding: 0.62rem 0.7rem;
  }

  .assessment-overview-name {
    font-size: 1rem;
  }

  .assessment-overview-stat-label {
    font-size: 0.59rem;
  }

  .assessment-overview-stat-value {
    font-size: 0.82rem;
  }

  .assessment-overview-duration-panel {
    text-align: center;
  }

  .assessment-template-body {
    grid-template-columns: 1fr;
    padding: 0.85rem;
  }
}

.submission-mismatch-alert {
  border: 1px solid rgba(245, 158, 11, 0.22);
  border-left: 5px solid #f59e0b;
  border-radius: 16px;
  background: linear-gradient(135deg, #fff8e1 0%, #fffdf5 100%);
  color: #5b4106;
  box-shadow: 0 10px 24px rgba(245, 158, 11, 0.08);
}

.submission-mismatch-title {
  font-size: 1rem;
  font-weight: 700;
  color: #6b4f0a;
}

.submission-mismatch-description {
  color: #7c5d10;
  max-width: 72rem;
}

.submission-mismatch-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 0.75rem;
}

.matching-assessment-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(51, 65, 85, 0.14);
  background: #fff;
  color: #111827;
  text-decoration: none;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.matching-assessment-link:hover,
.matching-assessment-link:focus {
  transform: translateY(-1px);
  border-color: rgba(76, 29, 149, 0.35);
  box-shadow: 0 12px 26px rgba(76, 29, 149, 0.14);
  color: #2e1065;
  text-decoration: none;
}

.matching-assessment-link:focus-visible {
  outline: 3px solid rgba(124, 58, 237, 0.25);
  outline-offset: 2px;
}

.matching-assessment-copy {
  min-width: 0;
}

.matching-assessment-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.25;
  color: #0f172a;
}

.matching-assessment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.45rem;
}

.matching-assessment-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.28rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.matching-assessment-badge--submitted {
  background: rgba(5, 150, 105, 0.14);
  color: #065f46;
}

.matching-assessment-badge--reason {
  background: rgba(124, 58, 237, 0.12);
  color: #5b21b6;
}

.matching-assessment-open {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  font-size: 0.76rem;
  font-weight: 700;
  color: #4c1d95;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.assessment-rubric-preview-scroll {
  max-height: 400px;
  overflow-y: auto;
}

@media (max-width: 767.98px) {
  .submission-mismatch-actions {
    grid-template-columns: 1fr;
  }

  .matching-assessment-link {
    align-items: flex-start;
    flex-direction: column;
  }
}

body.assessment-management-questions-page.assessment-management-hide-sidebar .sidebar.sidebar-md.navbar-content-md {
  display: none !important;
}

body.assessment-management-questions-page.assessment-management-hide-sidebar .home-section {
  left: 0 !important;
  width: 100% !important;
}

body.applicant-profile-hide-sidebar-page .sidebar.sidebar-md.navbar-content-md {
  display: none !important;
}

body.applicant-profile-hide-sidebar-page .home-section {
  left: 0 !important;
  width: 100% !important;
}

body.academic-years-hide-sidebar-page .sidebar.sidebar-md.navbar-content-md {
  display: none !important;
}

body.academic-years-hide-sidebar-page .home-section {
  left: 0 !important;
  width: 100% !important;
}

body.academic-years-hide-sidebar-page .sidebar-md-close,
body.academic-years-hide-sidebar-page .sidebar-icon-menu {
  display: none !important;
}

/* Card shell for the Academic Years / My Programmes page. Previously scoped
   to body.academic-years-hide-sidebar-page (teacher-only), which meant every
   other role (mentor included) got this content with no visible card
   boundary at all -- no background, border, radius, or shadow. Ungated, and
   values now match the Assessments page shell (.assessment-dashboard-page /
   .assessment-dashboard-shell, main_system_index.css ~line 48057/48078) --
   same card padding, border, radius and shadow -- so the two pages share one
   visual source of truth for card chrome. */
.academic-years-shell {
  width: 100%;
  margin: 0;
  /* NOT -3.5rem (the value this was originally copied from the Assessments
     shell with). The fixed .app-topnav bar is 77px tall (--topnav-height) at
     z-index:1040, above this shell, and .home-section only contributes
     top:72px (the compact-navbar block further down) + its own base 15px
     padding-top -- 87px of clearance before this margin applies. See the
     identical math documented on .admin-dashboard-shell (~line 55305):
     pulling past -10px tucks that much of the shell behind the opaque
     navbar instead of closing the gap. -3.5rem (56px) buried the page's
     title and status tabs behind the navbar. Use the same -7px other
     compact-navbar shells (Assessments/System Management/Practicals) settled
     on, which stays safely inside the 10px budget. */
  margin-top: -7px;
  margin-left: 0.5px;
  margin-right: 0.5px;
  max-width: calc(100% - 1px);
  padding: 0;
  box-sizing: border-box;
}

.academic-years-shell-panel {
  width: 100%;
  background: #ffffff;
  border: 1px solid rgba(232, 154, 157, 0.18);
  border-radius: 28px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
  box-sizing: border-box;
  /* Narrower side padding than Assessments' 32px -- that width left too
     much empty gutter on this page's content, so keep the same top/bottom
     rhythm but tighten the sides to a small gap. */
  padding: 0 14px 24px;
  margin-top: 0;
  overflow: hidden;
}

.academic-years-shell-panel > .container-fluid {
  width: 100%;
  max-width: 100%;
}

.academic-years-shell-panel > .container-fluid.card-margin-top {
  margin-top: 0 !important;
}

/* Course Insights' own shell (.programme-content-ui > .programme-content-shell
   > .programme-content-topbar / .programme-panel) has no nested Bootstrap
   .container-fluid > .row > .col-xl-11 grid inside it -- content sits flush
   against the card's own padding at every width. This page's markup does
   have that nesting (inherited from the pre-existing academic_years.html
   structure), so its default 91.666%-width, mx-auto-centered column was
   the actual source of the large, asymmetric right-hand gap: neutralised
   unconditionally (not just >=1200px) so the content always fills the card
   the same way Course Insights' flatter markup does at every width. */
.academic-years-shell-panel > .container-fluid.academic-page {
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.academic-years-shell-panel > .container-fluid.academic-page > .row {
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.academic-years-shell-panel > .container-fluid.academic-page > .row > .col-12.col-xl-11.mx-auto {
  flex: 0 0 100% !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

@media (max-width: 767.98px) {
  .academic-years-shell {
    width: calc(100% - 0.75rem);
    margin-left: 0;
    margin-right: 0.75rem;
    max-width: calc(100% - 0.75rem);
    /* Matches Assessments' mobile shell reset
       (main_system_index.css ~line 48301). */
    margin-top: 0;
  }

  .academic-years-shell-panel {
    border-radius: 18px;
    padding: 0 10px 16px 6px;
    margin-left: -1.5rem;
    width: calc(100% + 1.5rem);
  }
}

body.programme-management-hide-sidebar-page .sidebar.sidebar-md.navbar-content-md {
  display: none !important;
}

body.programme-management-hide-sidebar-page .home-section {
  left: 0 !important;
  width: 95% !important;
  max-width: 95% !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

#interviewSlotsModal .modal-body {
  --interview-slots-brand: var(--primary-color, #4c1d95);
  --interview-slots-brand-2: var(--secondary-color, #494c9e);
  --interview-slots-surface: color-mix(in srgb, var(--interview-slots-brand) 4%, #f8fafc 96%);
  --interview-slots-surface-strong: color-mix(in srgb, var(--interview-slots-brand) 7%, #ffffff 93%);
  --interview-slots-border: color-mix(in srgb, var(--interview-slots-brand) 16%, #d8dee8 84%);
  position: relative;
  overflow: hidden;
  padding: 0;
  background:
    radial-gradient(
      circle at 10% 0%,
      color-mix(in srgb, var(--interview-slots-brand) 12%, transparent) 0%,
      transparent 36%
    ),
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--interview-slots-brand) 5%, #ffffff 95%) 0%,
      color-mix(in srgb, var(--interview-slots-brand-2) 4%, #f8fafc 96%) 100%
    );
}

#interviewSlotsModal .modal-header {
  border-bottom: 1px solid rgba(226, 232, 240, 0.18);
}

.interview-slots-modal-dialog {
  width: min(88vw, 1580px);
  max-width: min(88vw, 1580px);
}

.interview-slots-modal-content {
  max-height: min(86vh, 920px);
  overflow: hidden;
  border-radius: 9px;
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.28);
}

.interview-slots-toolbar {
  position: sticky;
  top: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--interview-slots-border);
  background:
    linear-gradient(
      90deg,
      color-mix(in srgb, var(--interview-slots-brand) 6%, #ffffff 94%),
      rgba(255, 255, 255, 0.96)
    );
  backdrop-filter: blur(8px);
}

.interview-slots-summary {
  display: block;
  width: min(100%, 980px);
}

.interview-slots-summary-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.1fr) minmax(320px, 1fr);
  gap: 0.7rem;
  align-items: stretch;
}

.interview-slots-insight {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr);
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  max-width: 520px;
  border: 1px solid var(--interview-slots-border);
  border-radius: 10px;
  background:
    linear-gradient(
      135deg,
      color-mix(in srgb, var(--interview-slots-brand) 5%, #ffffff 95%),
      #fff 58%
    );
  padding: 0.55rem 0.7rem;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.065);
}

.interview-slots-estimator {
  display: grid;
  gap: 0.4rem;
  border: 1px solid var(--interview-slots-border);
  border-radius: 10px;
  background:
    linear-gradient(
      145deg,
      color-mix(in srgb, var(--interview-slots-brand) 4%, #ffffff 96%),
      #fff 62%
    );
  padding: 0.6rem 0.7rem;
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.055);
}

.interview-slots-estimator-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.interview-slots-estimator-title {
  color: color-mix(in srgb, var(--interview-slots-brand) 78%, #1f2937 22%);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  line-height: 1;
}

.interview-slots-estimator-meta {
  color: #475569;
  font-size: 0.68rem;
  font-weight: 700;
  line-height: 1.15;
}

.interview-slots-estimator-label {
  color: #374151;
  font-size: 0.67rem;
  font-weight: 800;
  line-height: 1;
}

.interview-slots-estimator-input-wrap .form-control {
  border-radius: 8px;
  border-color: #d7dfeb;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.38rem 0.52rem;
}

.interview-slots-estimator-input-wrap .form-control:focus {
  border-color: color-mix(in srgb, var(--interview-slots-brand) 45%, #a5b4fc 55%);
  box-shadow: 0 0 0 0.17rem color-mix(in srgb, var(--interview-slots-brand) 14%, transparent);
}

.interview-slots-estimator-feedback {
  border-radius: 8px;
  padding: 0.42rem 0.5rem;
  font-size: 0.67rem;
  line-height: 1.3;
}

.interview-slots-estimator-feedback.is-muted {
  background: #f8fafc;
  border: 1px dashed #d6dee9;
  color: #64748b;
}

.interview-slots-estimator-feedback.is-success {
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  color: #166534;
}

.interview-slots-estimator-feedback.is-warning {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  color: #9a3412;
}

.interview-slots-insight-main {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-areas:
    "label label"
    "number caption";
  align-items: end;
  column-gap: 0.45rem;
  min-width: 112px;
}

.interview-slots-insight-label {
  grid-area: label;
  color: color-mix(in srgb, var(--interview-slots-brand) 52%, #64748b 48%);
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.interview-slots-insight-main strong {
  grid-area: number;
  color: color-mix(in srgb, var(--interview-slots-brand) 72%, #111827 28%);
  font-size: 1.55rem;
  font-weight: 900;
  line-height: 0.95;
}

.interview-slots-insight-caption {
  grid-area: caption;
  color: #64748b;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.05;
}

.interview-slots-insight-side {
  display: grid;
  gap: 0.42rem;
  min-width: 0;
}

.interview-slots-meter {
  display: flex;
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: color-mix(in srgb, var(--interview-slots-brand) 10%, #e2e8f0 90%);
}

.interview-slots-meter-open {
  background: #148457;
}

.interview-slots-meter-booked {
  background: var(--interview-slots-brand);
}

.interview-slots-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.interview-slots-breakdown span {
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  color: #475569;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
}

.interview-slots-breakdown i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.interview-slots-breakdown strong {
  color: #111827;
  font-size: 0.78rem;
  font-weight: 900;
}

.interview-slots-breakdown .is-open i {
  background: #148457;
}

.interview-slots-breakdown .is-booked i {
  background: var(--interview-slots-brand);
}

.interview-slots-actions {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  flex-shrink: 0;
}

.interview-slots-hint {
  color: #64748b;
  font-size: 0.7rem;
  font-weight: 700;
}

.interview-slots-scroll-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1px solid #d8dee8;
  border-radius: 999px;
  background: #fff;
  color: #1f2937;
  box-shadow: 0 5px 14px rgba(15, 23, 42, 0.07);
}

.interview-slots-scroll-btn:hover,
.interview-slots-scroll-btn:focus {
  border-color: var(--interview-slots-brand);
  color: var(--interview-slots-brand);
}

.interview-slots-scroll-btn i {
  font-size: 1.15rem;
  line-height: 1;
}

.interview-slots-calendar {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 1rem 1rem 1.2rem;
  scrollbar-gutter: stable;
}

.interview-slots-editor {
  padding: 0.75rem 1rem 0;
}

.interview-slots-editor-empty {
  border: 1px dashed #d6dee9;
  border-radius: 8px;
  background: #f8fafc;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
  padding: 0.65rem 0.75rem;
}

.interview-slots-editor-panel {
  border: 1px solid var(--interview-slots-border);
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
  padding: 0.65rem 0.75rem;
}

.interview-slots-editor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.55rem;
}

.interview-slots-editor-heading {
  display: grid;
  gap: 0.16rem;
  min-width: 0;
}

.interview-slots-editor-kicker {
  color: #64748b;
  font-size: 0.61rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  text-transform: uppercase;
}

.interview-slots-editor-heading strong {
  color: #111827;
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1.15;
}

.interview-slots-editor-heading small {
  color: #6b7280;
  font-size: 0.65rem;
  line-height: 1.2;
}

.interview-slots-editor-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
  gap: 0.6rem;
  align-items: end;
}

.interview-slots-editor-field .form-label {
  color: #5b6474;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
}

.interview-slots-editor-field .form-select,
.interview-slots-editor-field .form-control {
  border-color: #dbe3ee;
  font-size: 0.7rem;
}

.interview-slots-editor-actions {
  display: grid;
  gap: 0.35rem;
}

.interview-slots-editor-assignee {
  color: #475569;
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1.2;
}

.interview-slots-editor-save {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.interview-slots-editor-save .btn {
  border-radius: 999px;
  font-size: 0.63rem;
  font-weight: 800;
  padding: 0.24rem 0.72rem;
}

#interviewSlotsModal .modal-body::before,
#interviewSlotsModal .modal-body::after {
  content: "";
  position: absolute;
  top: 55px;
  bottom: 0;
  z-index: 2;
  width: 38px;
  pointer-events: none;
}

#interviewSlotsModal .modal-body::before {
  left: 0;
  background: linear-gradient(90deg, var(--interview-slots-surface) 0%, rgba(248, 250, 252, 0) 100%);
}

#interviewSlotsModal .modal-body::after {
  right: 0;
  background: linear-gradient(270deg, var(--interview-slots-surface) 0%, rgba(248, 250, 252, 0) 100%);
}

.interview-slots-calendar-strip {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0.7rem;
  min-width: max-content;
}

.interview-slots-day-card {
  flex: 0 0 206px;
  max-width: 206px;
  border: 1px solid var(--interview-slots-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07);
  overflow: hidden;
}

.interview-slots-day-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.8rem;
  border-bottom: 1px solid var(--interview-slots-border);
  background:
    linear-gradient(
      135deg,
      var(--interview-slots-surface-strong),
      #fff
    );
  color: #1f2937;
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.2;
}

.interview-slots-day-heading span {
  min-width: 0;
}

.interview-slots-day-heading small {
  flex-shrink: 0;
  color: #64748b;
  font-size: 0.6rem;
  font-weight: 800;
  line-height: 1.2;
  text-align: right;
}

.interview-slots-day-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.48rem;
  max-height: clamp(320px, calc(86vh - 190px), 650px);
  overflow-y: auto;
  padding: 0.62rem;
}

.interview-slots-cell {
  position: relative;
  min-height: 58px;
  padding: 0.52rem 0.48rem;
  border: 1px solid #dce3ec;
  border-radius: 6px;
  background: #fff;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
}

.interview-slots-cell.is-open:hover {
  border-color: color-mix(in srgb, var(--interview-slots-brand) 35%, rgba(20, 132, 87, 0.38) 65%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--interview-slots-brand) 10%, rgba(20, 132, 87, 0.08) 90%);
}

.interview-slots-cell.is-booked {
  background: #f1f3f5;
  border-color: #d7dde5;
  color: #6b7280;
}

.interview-slots-time {
  display: block;
  margin-bottom: 0.25rem;
  color: #111827;
  font-size: 0.9rem;
  font-weight: 800;
  line-height: 1;
}

.interview-slots-applicant {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #6b7280;
  font-size: 0.66rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.interview-slots-status {
  display: inline-flex;
  align-items: center;
  height: 18px;
  margin-top: 0.3rem;
  border-radius: 999px;
  padding: 0 0.42rem;
  font-size: 0.61rem;
  font-weight: 800;
  line-height: 1;
}

.interview-slots-status-open {
  background: #148457;
  color: #fff;
}

.interview-slots-status-booked {
  border: 1px solid #d7dde5;
  background: #fff;
  color: #6b7280;
}

.interview-slot-admin-empty {
  background: #f8fafc;
  border-color: #dce3ec !important;
}

.interview-slot-admin-empty .form-select {
  min-width: 0;
}

.interview-slot-admin-cell {
  min-height: 182px;
  padding: 0.55rem 0.58rem;
}

.interview-slot-admin-cell .form-label {
  color: #5b6474;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1;
}

.interview-slot-admin-cell .form-select,
.interview-slot-admin-cell .form-control {
  border-color: #dbe3ee;
  font-size: 0.68rem;
}

.interview-slot-admin-cell .btn {
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.24rem 0.66rem;
}

.interview-slot-admin-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.08rem;
  min-height: 62px;
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #1f2937;
  padding: 0.42rem 0.3rem;
  text-align: center;
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.interview-slot-admin-option:hover,
.interview-slot-admin-option:focus {
  border-color: color-mix(in srgb, var(--interview-slots-brand) 45%, #a5b4fc 55%);
  outline: none;
}

.interview-slot-admin-option.is-selected {
  border-color: var(--interview-slots-brand);
  background: color-mix(in srgb, var(--interview-slots-brand) 10%, #f8fafc 90%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--interview-slots-brand) 30%, transparent);
}

.interview-slot-admin-option.is-booked {
  background: #f1f5f9;
  border-style: dashed;
  color: #64748b;
}

.interview-slot-admin-time {
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.05;
}

.interview-slot-admin-state {
  color: #475569;
  font-size: 0.64rem;
  line-height: 1.1;
}

.interview-slot-admin-option.is-open .interview-slot-admin-state {
  color: #14532d;
  font-weight: 700;
}

.interview-slot-admin-option.is-booked .interview-slot-admin-state {
  color: #b91c1c;
  font-weight: 700;
}

.interview-slot-admin-assignee {
  display: block;
  max-width: 100%;
  overflow: hidden;
  color: #64748b;
  font-size: 0.6rem;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.interview-slot-preview-panel {
  border: 1px solid #d8dee8;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
  padding: 0;
  overflow: hidden;
}

.interview-slot-preview-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid #e6ebf2;
  background: #fbfcfe;
}

.interview-slot-preview-kicker {
  display: block;
  color: #6b7280;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
}

.interview-slot-preview-title {
  margin-top: 0.15rem;
  color: #111827;
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.2;
}

.interview-slot-preview-subtitle {
  margin-top: 0.12rem;
  color: #6b7280;
  font-size: 0.7rem;
  font-weight: 600;
}

.interview-slot-preview-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.35rem;
  flex-shrink: 0;
}

.interview-slot-preview-meta span,
.interview-slot-preview-notices span {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border-radius: 999px;
  padding: 0 0.5rem;
  font-size: 0.65rem;
  font-weight: 800;
}

.interview-slot-preview-meta span {
  background: #eef2ff;
  color: #3730a3;
}

.interview-slot-preview-notices {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.65rem 0.85rem 0;
}

.interview-slot-preview-notices span {
  background: #fff7ed;
  color: #9a3412;
}

.interview-slot-preview-strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.55rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.75rem 0.85rem 0.85rem;
  scrollbar-gutter: stable;
}

.interview-slot-preview-day,
.interview-slot-preview-more {
  flex: 0 0 205px;
  border: 1px solid #dce3ec;
  border-radius: 7px;
  background: #f8fafc;
  overflow: hidden;
}

.interview-slot-preview-date {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  border-bottom: 1px solid #e5e7eb;
  background: #fff;
  color: #1f2937;
  padding: 0.48rem 0.6rem;
  font-size: 0.72rem;
  font-weight: 800;
}

.interview-slot-preview-date span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.interview-slot-preview-date small {
  flex-shrink: 0;
  color: #6b7280;
  font-size: 0.6rem;
  font-weight: 800;
}

.interview-slot-preview-times {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.32rem;
  padding: 0.5rem;
}

.interview-slot-preview-times span {
  border: 1px solid #d8dee8;
  border-radius: 6px;
  background: #fff;
  color: #111827;
  padding: 0.28rem 0.3rem;
  font-size: 0.66rem;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.interview-slot-preview-more {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.2rem;
  min-height: 190px;
  padding: 0.85rem;
  border-style: dashed;
  background: #faf7ff;
  color: #4c1d95;
}

.interview-slot-preview-more strong {
  font-size: 0.75rem;
}

.interview-slot-preview-more span,
.interview-slot-preview-empty {
  color: #6b7280;
  font-size: 0.68rem;
  line-height: 1.25;
}

.interview-slot-preview-empty {
  margin: 0.75rem 0.85rem 0.85rem;
  border: 1px solid #fecaca;
  border-radius: 7px;
  background: #fef2f2;
  color: #991b1b;
  padding: 0.7rem;
  font-weight: 700;
}

@media (max-width: 1199.98px) {
  .interview-slots-toolbar {
    flex-wrap: wrap;
    align-items: stretch;
  }

  .interview-slots-summary {
    width: 100%;
  }

  .interview-slots-actions {
    width: 100%;
    justify-content: flex-end;
  }

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

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

  .interview-slots-editor-actions {
    grid-column: 1 / -1;
  }
}

@media (max-width: 767.98px) {
  .interview-slots-toolbar {
    padding: 0.65rem 0.75rem;
  }

  .interview-slots-editor {
    padding: 0.65rem 0.75rem 0;
  }

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

  .interview-slots-editor-actions {
    grid-column: auto;
  }

  .interview-slots-actions {
    justify-content: space-between;
  }

  .interview-slots-day-card {
    flex-basis: 220px;
    max-width: 220px;
  }

  .interview-slots-day-grid {
    grid-template-columns: 1fr;
    max-height: 440px;
  }
}


/* Programme registration page styles moved from templates/registration/program_register.html */
    #programme {
        --programme-surface: #ffffff;
        --programme-surface-soft: #f8fafc;
        --programme-border: rgba(15, 23, 42, 0.1);
        --programme-text: #0f172a;
        --programme-muted: #64748b;
        --programme-accent: var(--btn-color, var(--primary-color, #0a2251));
    }

    #programme .programme-filter-panel {
        align-items: end;
        background: #ffffff;
        border: 1px solid var(--programme-border);
        border-radius: 0.85rem;
        box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
        display: grid;
        gap: 0.85rem;
        grid-template-columns: minmax(220px, 1.4fr) minmax(160px, 0.8fr) minmax(150px, 0.7fr) auto;
        padding: 0.95rem;
    }

    #programme .programme-filter-field {
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
        min-width: 0;
    }

    #programme .programme-filter-field label {
        color: var(--programme-muted);
        font-size: 0.72rem;
        font-weight: 700;
        line-height: 1.1;
        margin: 0;
        text-transform: uppercase;
    }

    #programme .programme-filter-search-control {
        align-items: center;
        display: flex;
        min-width: 0;
        position: relative;
    }

    #programme .programme-filter-search-control i {
        color: var(--programme-muted);
        font-size: 0.95rem;
        left: 0.85rem;
        line-height: 1;
        pointer-events: none;
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 1;
    }

    #programme .programme-filter-search-control .form-control {
        padding-left: 2.25rem;
    }

    #programme .programme-filter-panel .form-control,
    #programme .programme-filter-panel .form-select {
        border-color: rgba(100, 116, 139, 0.28);
        border-radius: 0.65rem;
        color: var(--programme-text);
        font-size: 0.85rem;
        min-height: 2.45rem;
    }

    #programme .programme-filter-panel .form-control:focus,
    #programme .programme-filter-panel .form-select:focus {
        border-color: var(--programme-accent);
        box-shadow: 0 0 0 0.16rem color-mix(in srgb, var(--programme-accent) 18%, transparent);
    }

    #programme .programme-filter-actions {
        align-items: center;
        display: flex;
        gap: 0.6rem;
        justify-content: flex-end;
        min-width: 0;
    }

    #programme .programme-filter-count {
        color: var(--programme-muted);
        font-size: 0.78rem;
        font-weight: 700;
        line-height: 1.2;
        white-space: nowrap;
    }

    #programme .programme-filter-clear {
        border-radius: 999px;
        font-size: 0.78rem;
        font-weight: 700;
        min-height: 2.2rem;
        min-width: 4.4rem;
        white-space: nowrap;
    }

    #programme .programme-preview-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.15rem;
        list-style: none;
        padding-left: 0;
        margin-bottom: 0;
    }

    #programme .programme-preview-grid > li {
        min-width: 0;
    }

    #programme .programme-filter-empty-state {
        grid-column: 1 / -1;
    }

    #programme .programme-filter-empty-card {
        align-items: center;
        background: #ffffff;
        border: 1px dashed rgba(100, 116, 139, 0.35);
        border-radius: 0.85rem;
        color: var(--programme-muted);
        display: flex;
        flex-direction: column;
        gap: 0.55rem;
        justify-content: center;
        min-height: 11rem;
        padding: 1.5rem;
        text-align: center;
    }

    #programme .programme-filter-empty-card i {
        color: var(--programme-accent);
        font-size: 1.65rem;
        line-height: 1;
    }

    #programme .programme-filter-empty-card h5 {
        color: var(--programme-text);
        font-size: 1rem;
        font-weight: 800;
        line-height: 1.2;
        margin: 0;
    }

    #programme .programme-preview-card {
        display: flex;
        flex-direction: row;
        align-items: stretch;
        gap: 0.7rem;
        padding: 0.7rem;
        background: #ffffff;
        border: 1px solid var(--programme-border);
        border-radius: 1.35rem;
        box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
        overflow: hidden;
        transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    }

    #programme .programme-preview-card:hover,
    #programme .programme-preview-card:focus-within {
        transform: translateY(-2px);
        border-color: rgba(15, 23, 42, 0.16);
        box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
    }

    #programme .programme-preview-media {
        flex: 0 0 clamp(140px, 22%, 190px);
        width: clamp(140px, 22%, 190px);
        align-self: stretch;
        height: 132px;
        min-height: 132px;
        position: relative;
        overflow: hidden;
        border-radius: 1rem;
        background-color: var(--primary-color, #111827);
        /* Use the active client's brand color instead of a fixed blue. */
        background: linear-gradient(
            135deg,
            color-mix(in srgb, var(--primary-color, #111827) 82%, #000 18%) 0%,
            var(--primary-color, #111827) 100%
        );
    }

    #programme .programme-preview-media img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }

    #programme .programme-preview-placeholder {
        width: 100%;
        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        color: #f8fafc;
        text-align: center;
        padding: 1rem;
    }

    #programme .programme-preview-placeholder i {
        font-size: 2rem;
    }

    #programme .programme-preview-body {
        display: flex;
        flex: 1 1 auto;
        flex-direction: column;
        min-width: 0;
        gap: 0.45rem;
        padding: 0;
    }

    #programme .programme-preview-heading {
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
        min-width: 0;
    }

    #programme .programme-preview-title {
        margin: 0;
        color: var(--programme-text);
        font-size: 1.05rem;
        font-weight: 800;
        line-height: 1.12;
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 1;
        overflow: hidden;
    }

    #programme .programme-preview-type {
        align-items: center;
        display: flex;
        flex-wrap: wrap;
        gap: 0.2rem 0.35rem;
        min-width: 0;
    }

    #programme .programme-preview-type-label {
        color: var(--programme-muted);
        font-size: 0.68rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        line-height: 1.1;
        margin-bottom: 0;
        text-transform: uppercase;
    }

    #programme .programme-preview-type-value {
        color: var(--programme-text);
        font-size: 0.88rem;
        font-weight: 700;
        line-height: 1.15;
        text-transform: uppercase;
        word-break: break-word;
    }

    #programme .programme-preview-status {
        align-items: center;
        display: flex;
        flex-wrap: wrap;
        gap: 0.2rem 0.35rem;
        min-width: 0;
    }

    #programme .programme-preview-status-label {
        color: var(--programme-muted);
        font-size: 0.68rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        line-height: 1.1;
        margin-bottom: 0;
        text-transform: uppercase;
    }

    #programme .programme-preview-status-value {
        color: var(--programme-text);
        font-size: 0.88rem;
        font-weight: 700;
        line-height: 1.15;
        word-break: break-word;
    }

    #programme .programme-preview-status-open {
        color: #15803d;
    }

    #programme .programme-preview-dates {
        display: flex;
        flex-direction: column;
        gap: 0.35rem;
    }

    #programme .programme-preview-date {
        align-items: center;
        display: flex;
        flex-wrap: wrap;
        gap: 0.2rem 0.35rem;
        min-width: 0;
    }

    #programme .programme-preview-date-label {
        display: inline;
        color: var(--programme-muted);
        font-size: 0.68rem;
        font-weight: 700;
        letter-spacing: 0.04em;
        line-height: 1.1;
        text-transform: uppercase;
    }

    #programme .programme-preview-date-value {
        display: block;
        color: var(--programme-text);
        font-size: 0.86rem;
        font-weight: 600;
        line-height: 1.15;
        word-break: break-word;
    }

    #programme .programme-preview-date-value-row {
        align-items: center;
        display: inline-flex;
        gap: 0.35rem;
        max-width: 100%;
        min-width: 0;
    }

    #programme .programme-preview-date-value-row i {
        color: #b91c1c;
        flex: 0 0 auto;
        font-size: 0.92rem;
        line-height: 1;
    }

    #programme .programme-preview-actions {
        align-items: center;
        display: inline-flex;
        gap: 0.35rem;
        flex: 0 0 auto;
        margin-left: auto;
        justify-content: flex-end;
        width: auto;
    }

    #programme .programme-preview-date--with-action {
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        flex-wrap: nowrap;
    }

    #programme .programme-preview-date-main {
        align-items: center;
        display: inline-flex;
        flex: 1 1 auto;
        flex-wrap: wrap;
        gap: 0.2rem 0.35rem;
        min-width: 0;
    }

    #programme .programme-view-more-button,
    #programme .programme-recruitment-view-more-button {
        align-items: center;
        display: inline-flex;
        flex: 0 0 auto;
        gap: 0.3rem;
        min-height: 1.8rem;
        min-width: 6.55rem;
        padding: 0.28rem 0.75rem;
        border-radius: 999px;
        font-size: 0.68rem;
        line-height: 1.1;
        justify-content: center;
        white-space: nowrap;
        background-color: var(--btn-outline-primary-bg, var(--primary-color));
        background-image: var(--btn-outline-primary-bg);
        background-repeat: no-repeat;
        background-size: cover;
        border: 1px solid transparent;
        color: #ffffff;
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
        transition: none;
    }

    #programme .programme-view-more-button:hover,
    #programme .programme-view-more-button:focus,
    #programme .programme-view-more-button:focus-visible,
    #programme .programme-recruitment-view-more-button:hover,
    #programme .programme-recruitment-view-more-button:focus,
    #programme .programme-recruitment-view-more-button:focus-visible {
        background-color: var(--btn-outline-primary-bg, var(--primary-color));
        background-image: var(--btn-outline-primary-bg);
        border-color: transparent;
        color: #ffffff;
        transform: none;
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
    }

    #programme .programme-view-more-button:active,
    #programme .programme-recruitment-view-more-button:active {
        background-color: var(--btn-outline-primary-bg, var(--primary-color));
        background-image: var(--btn-outline-primary-bg);
        border-color: transparent;
        color: #ffffff;
        transform: none;
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
    }

    #programme .programme-view-more-button:focus-visible,
    #programme .programme-recruitment-view-more-button:focus-visible {
        outline: 0.2rem solid color-mix(in srgb, var(--programme-accent) 20%, #ffffff 80%);
        outline-offset: 0.1rem;
        box-shadow: none;
    }

    #programme .apply-button {
        background-color: var(--btn-outline-primary-bg, var(--primary-color));
        background-image: var(--btn-outline-primary-bg);
        background-repeat: no-repeat;
        background-size: cover;
        border: 0;
        color: #ffffff;
        box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
        transition: none;
    }

    @media (max-width: 991.98px) {
        #programme .programme-filter-panel {
            grid-template-columns: 1fr 1fr;
        }

        #programme .programme-filter-field--search,
        #programme .programme-filter-actions {
            grid-column: 1 / -1;
        }

        #programme .programme-filter-actions {
            justify-content: space-between;
        }

        #programme .programme-preview-grid {
            grid-template-columns: 1fr;
        }
    }

    @media (max-width: 575.98px) {
        #programme .programme-filter-panel {
            align-items: stretch;
            grid-template-columns: 1fr;
            padding: 0.8rem;
        }

        #programme .programme-filter-field--search,
        #programme .programme-filter-actions {
            grid-column: auto;
        }

        #programme .programme-filter-actions {
            align-items: stretch;
            flex-direction: column;
        }

        #programme .programme-filter-count {
            white-space: normal;
        }

        #programme .programme-filter-clear {
            width: 100%;
        }

        #programme .programme-preview-card {
            flex-direction: column;
            gap: 0.75rem;
            padding: 0.8rem;
        }

        #programme .programme-preview-media {
            width: 100%;
            flex-basis: auto;
            height: clamp(150px, 46vw, 188px);
        }

        #programme .programme-preview-body {
            gap: 0.5rem;
        }

        #programme .programme-preview-title {
            font-size: 1rem;
        }

        #programme .programme-preview-dates {
            gap: 0.4rem;
        }

        #programme .programme-preview-date--with-action {
            gap: 0.55rem;
            flex-wrap: wrap;
        }

        #programme .programme-view-more-button,
        #programme .programme-recruitment-view-more-button {
            min-width: 6.4rem;
            width: auto;
        }
    }

body.programme-modal-open .programme-details-modal .modal-dialog {
    margin: 1rem auto;
    max-width: min(960px, calc(100vw - 2rem)) !important;
    width: min(960px, calc(100vw - 2rem)) !important;
}

body.programme-modal-open .programme-details-modal .modal-content {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 1.5rem;
    box-shadow: 0 28px 72px rgba(15, 23, 42, 0.18);
    overflow: hidden;
}

body.programme-modal-open .programme-details-modal .modal-header {
    align-items: flex-start !important;
    background-color: var(--primary-color) !important;
    background-image: none !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-top-left-radius: 1.5rem;
    border-top-right-radius: 1.5rem;
    color: #ffffff;
    margin: 0;
    align-self: stretch;
    gap: 0.55rem;
    width: 100%;
    box-sizing: border-box;
    padding: 0.78rem 0.95rem 0.68rem !important;
}

.programme-details-modal .programme-details-modal-title-wrap {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    gap: 0.2rem;
    min-width: 0;
}

    .programme-details-modal .programme-details-modal-header-icon {
        display: none;
    }

    .programme-details-modal .programme-details-modal-header-icon i {
        font-size: 1.65rem;
        line-height: 1;
    }

.programme-details-modal .programme-details-modal-title {
    color: #ffffff !important;
    flex: 1 1 auto;
    font-size: clamp(1.05rem, 1.9vw, 1.45rem);
    font-weight: 800;
    line-height: 1.1;
    margin: 0;
    min-width: 0;
    display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
        word-break: break-word;
    }

.programme-details-modal .programme-details-modal-meta {
    align-items: flex-start;
    color: rgba(255, 255, 255, 0.82);
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    font-size: 0.68rem;
    font-weight: 600;
    line-height: 1.1;
    min-width: 0;
}

    .programme-details-modal .programme-details-modal-meta-heading {
        color: rgba(255, 255, 255, 0.9);
        font-size: 0.6rem;
        font-weight: 800;
        letter-spacing: 0.08em;
        line-height: 1.1;
        margin: 0;
        text-transform: uppercase;
    }

.programme-details-modal .programme-details-modal-meta-row {
        align-items: center;
        display: inline-flex;
        gap: 0.3rem;
        min-width: 0;
    }

.programme-details-modal .programme-details-modal-meta-row--programme-type {
    flex: 0 0 auto;
    white-space: nowrap;
}

.programme-details-modal .programme-details-modal-meta-row--programme-type .programme-details-modal-meta-value {
    flex: 0 0 auto;
    overflow-wrap: normal;
    white-space: nowrap;
    word-break: normal;
}

.programme-details-modal .programme-details-modal-meta-group {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
}

.programme-details-modal .programme-details-modal-meta-group--inline {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.18rem 1.90rem;
}

.programme-details-modal .programme-details-modal-meta-group--inline .programme-details-modal-meta-row {
    flex: 0 0 auto;
}

.programme-details-modal .programme-details-modal-meta-label {
    font-size: 0.58rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1.1;
    text-transform: uppercase;
}

    .programme-details-modal .programme-details-modal-meta-value {
        color: #ffffff;
        font-size: 0.8rem;
        font-weight: 700;
        line-height: 1.2;
        min-width: 0;
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .programme-details-modal .programme-details-modal-meta i {
        font-size: 0.95rem;
        line-height: 1;
        flex: 0 0 auto;
    }

body.programme-modal-open .programme-details-modal .programme-modal-close {
    align-self: flex-start;
    margin-top: 0.05rem;
}

body.programme-modal-open .programme-details-modal .modal-body {
    background: #ffffff;
    padding: 0;
}

.programme-details-modal .programme-create-modal-scroll-body {
    max-height: min(78vh, 780px);
    overflow-x: hidden;
    padding: 1rem 1.35rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

    .programme-details-modal .programme-details-section {
        margin: 0;
    }

.programme-details-modal .programme-details-section-header {
    align-items: center;
    display: flex;
    gap: 0.6rem;
    margin-bottom: 0.55rem;
}

    .programme-details-modal .programme-details-section-icon {
        align-items: center;
        background: #0a6c31;
        border-radius: 0.55rem;
        color: #ffffff;
        display: inline-flex;
        flex: 0 0 auto;
        height: 2.45rem;
        justify-content: center;
        width: 2.45rem;
    }

    .programme-details-modal .programme-details-section-icon--teal {
        background: #0a6c31;
        color: #ffffff;
    }

    .programme-details-modal .programme-details-section-icon--blue {
        background: #0a6c31;
        color: #ffffff;
    }

    .programme-details-modal .programme-details-section-icon--emerald {
        background: #0a6c31;
        color: #ffffff;
    }

    .programme-details-modal .programme-details-section-icon i {
        font-size: 1.25rem;
        line-height: 1;
    }

    .programme-details-modal .programme-details-section-initial {
        font-size: 0.9rem;
        font-weight: 800;
        letter-spacing: 0.05em;
        line-height: 1;
        text-transform: uppercase;
    }

.programme-details-modal .programme-details-section-title {
    color: #334155;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1.1;
    margin: 0;
    text-transform: uppercase;
}

    .programme-details-modal .programme-details-section--panel {
        background: transparent;
        border: 0;
        box-shadow: none;
        padding: 0;
    }

    .programme-details-modal .programme-details-section--panel .programme-details-section-header {
        margin-bottom: 0;
        padding: 0;
    }

    .programme-details-modal .programme-information-grid {
        display: flex;
        flex-direction: column;
        gap: 0.75rem;
    }

    .programme-details-modal .programme-information-item {
        align-items: flex-start;
        background: #ffffff;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        display: flex;
        gap: 0.75rem;
        min-width: 0;
        padding: 0;
    }

    .programme-details-modal .programme-information-item--full {
        grid-column: auto;
    }

    .programme-details-modal .programme-information-item--full .programme-information-value {
        font-size: 0.98rem;
    }

    .programme-details-modal .programme-information-icon {
        display: none;
    }

    .programme-details-modal .programme-information-icon--blue {
        background: #eaf2ff;
        color: #2563eb;
    }

    .programme-details-modal .programme-information-icon--green {
        background: #eaf8ef;
        color: #15803d;
    }

    .programme-details-modal .programme-information-icon i {
        font-size: 1.18rem;
        line-height: 1;
    }

    .programme-details-modal .programme-information-content {
        display: flex;
        flex: 1 1 auto;
        flex-direction: row;
        align-items: flex-start;
        flex-wrap: nowrap;
        gap: 0.1rem 0.45rem;
        max-width: 100%;
        min-width: 0;
    }

    .programme-details-modal .programme-information-label {
        color: #111827;
        display: inline-block;
        flex: 0 0 auto;
        font-size: 0.78rem;
        font-weight: 800;
        letter-spacing: 0.04em;
        line-height: 1.2;
        margin-bottom: 0;
        white-space: nowrap;
        text-transform: uppercase;
    }

    .programme-details-modal .programme-information-value {
        color: #111827;
        display: inline-block;
        flex: 1 1 auto;
        font-size: 0.92rem;
        font-weight: 500;
        line-height: 1.45;
        min-width: 0;
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .programme-details-modal .programme-information-badge {
        align-items: center;
        border-radius: 999px;
        flex: 0 0 auto;
        display: inline-flex;
        font-size: 0.78rem;
        font-weight: 700;
        justify-content: center;
        letter-spacing: 0;
        line-height: 1.1;
        min-height: 1.75rem;
        padding: 0.3rem 0.75rem;
        text-transform: uppercase;
        width: fit-content;
    }

    .programme-details-modal .programme-information-badge--teal {
        background: #dff3ee;
        color: #0f766e;
    }

    .programme-details-modal .programme-information-badge--open {
        background: #eaf8ef;
        color: #43a047;
    }

    .programme-details-modal .programme-information-badge--closed {
        background: #e2e8f0;
        color: #475569;
    }

.programme-details-modal .programme-details-section--plain {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0 0 0.95rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.programme-details-modal .programme-details-section--plain .programme-details-section-header {
    margin-bottom: 0.55rem;
}

.programme-details-modal .programme-details-description {
    color: #0f172a;
    font-size: 0.95rem;
    line-height: 1.65;
}

.programme-details-modal .programme-details-description.is-editor-content {
    background: #ffffff;
    border: 1px solid rgba(148, 163, 184, 0.28);
    border-radius: 0.65rem;
    overflow-wrap: anywhere;
    padding: 0.85rem 0.95rem;
}

.programme-details-modal .programme-details-description :is(p, ul, ol, blockquote, pre, table) {
    margin-bottom: 0.85rem;
}

.programme-details-modal .programme-details-description.is-editor-content > :last-child {
    margin-bottom: 0;
}

.programme-details-modal .programme-details-description.is-editor-content :is(ul, ol) {
    padding-left: 1.35rem;
}

.programme-details-modal .programme-details-description.is-editor-content li {
    margin-bottom: 0.35rem;
}

.programme-details-modal .programme-details-description :is(h1, h2, h3, h4, h5, h6) {
    color: #111827;
    font-weight: 700;
    margin-bottom: 0.6rem;
    margin-top: 0.85rem;
}

.programme-details-modal .programme-details-description.is-editor-content blockquote {
    border-left: 3px solid var(--primary-color);
    color: #475569;
    padding-left: 0.85rem;
}

.programme-details-modal .programme-details-description.is-editor-content table {
    border-collapse: collapse;
    display: block;
    max-width: 100%;
    overflow-x: auto;
    width: 100%;
}

.programme-details-modal .programme-details-description.is-editor-content :is(th, td) {
    border: 1px solid #dbe4ef;
    padding: 0.45rem 0.55rem;
    vertical-align: top;
}

    .programme-details-modal .programme-details-description a {
        word-break: break-word;
    }

    .programme-details-modal .programme-requirements-list {
        color: #0f172a;
        margin: 0;
        padding-left: 1.35rem;
    }

    .programme-details-modal .programme-requirements-list li {
        line-height: 1.7;
        margin-bottom: 0.65rem;
    }

    .programme-details-modal .programme-requirements-empty {
        color: #64748b;
        margin-bottom: 0;
    }

body.programme-modal-open .programme-details-modal .modal-footer {
    background: #ffffff;
    border-top: 1px solid rgba(15, 23, 42, 0.08) !important;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 0;
    padding: 0.9rem 1.35rem 1.15rem !important;
}

body.programme-modal-open .programme-details-modal .modal-footer .btn {
    min-width: 7rem;
    padding: 0.72rem 1.25rem;
}

body.programme-modal-open .programme-details-modal .modal-footer .apply-button {
    background-color: var(--btn-outline-primary-bg, var(--primary-color));
    background-image: var(--btn-outline-primary-bg);
    background-repeat: no-repeat;
    background-size: cover;
    border: 1px solid transparent;
    border-radius: 0.9rem;
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.18);
    color: #ffffff;
    font-size: 0.92rem;
    font-weight: 700;
    gap: 0.45rem;
    min-width: 7rem;
    padding: 0.72rem 1.25rem;
    transition: none;
}

    .programme-details-modal .modal-footer .apply-button i {
        display: none;
    }

body.programme-modal-open #programme_details_modal .programme-details-modal-content {
    background: #ffffff;
    border: 0;
    border-radius: 1.5rem;
    box-shadow: 0 28px 72px rgba(15, 23, 42, 0.18);
    display: block !important;
    max-height: min(90vh, 900px);
    overflow: hidden;
    padding: 0 !important;
}

body.programme-modal-open #programme_details_modal.programme-details-modal--expanded-advert .programme-details-modal-content {
    max-height: min(96vh, 1060px);
}

body.programme-modal-open #programme_details_modal .programme-details-modal-header {
    align-items: flex-start !important;
    background-color: var(--primary-color) !important;
    background-image: none !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.14) !important;
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
    box-sizing: border-box;
    color: #ffffff;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin: 0 !important;
    padding: 1.15rem 1.4rem 1rem !important;
    width: 100%;
}

body.programme-modal-open #programme_details_modal .programme-details-modal-title-wrap {
    gap: 0.2rem;
}

body.programme-modal-open #programme_details_modal .programme-modal-close {
    align-self: flex-start;
    margin-top: 0.05rem;
}

body.programme-modal-open #programme_details_modal .programme-details-modal-body {
    background: #ffffff;
    max-height: min(70vh, 700px);
    overflow-x: hidden;
    overflow-y: auto;
    padding: 1.2rem 1.55rem 1rem !important;
}

body.programme-modal-open #programme_details_modal.programme-details-modal--expanded-advert .programme-details-modal-body {
    max-height: min(84vh, 910px);
}

body.programme-modal-open #programme_details_modal .programme-details-section--plain {
    padding-bottom: 0.85rem;
}

body.programme-modal-open #programme_details_modal .programme-details-modal-footer {
    background: #ffffff;
    border-top: 1px solid rgba(15, 23, 42, 0.08) !important;
    justify-content: flex-end;
    margin-top: 0;
    padding: 0.85rem 1.4rem 1.1rem !important;
}

body.programme-modal-open #programme_details_modal .programme-details-modal-footer .apply-button {
    border-radius: 0.95rem;
    min-width: 7.25rem;
    padding: 0.72rem 1.25rem;
}

    @media (max-width: 575.98px) {
        body.programme-modal-open .programme-details-modal .modal-dialog {
            margin: 0.5rem auto;
            max-width: calc(100vw - 1rem) !important;
            width: calc(100vw - 1rem) !important;
        }

    body.programme-modal-open #programme_details_modal .programme-details-modal-content {
        max-height: calc(100vh - 1rem);
    }

    body.programme-modal-open #programme_details_modal .programme-details-modal-header {
        gap: 0.55rem;
        padding: 0.82rem 0.9rem 0.72rem !important;
        background-color: var(--primary-color) !important;
    }

    body.programme-modal-open #programme_details_modal .programme-details-modal-title-wrap {
        gap: 0.12rem;
    }

        .programme-details-modal .programme-details-modal-header-icon {
            display: none;
        }

        .programme-details-modal .programme-details-modal-header-icon i {
            font-size: 1.15rem;
        }

    body.programme-modal-open #programme_details_modal .programme-details-modal-title {
        font-size: 1.05rem;
    }

    body.programme-modal-open #programme_details_modal .programme-details-modal-meta {
        font-size: 0.66rem;
    }

    body.programme-modal-open #programme_details_modal .programme-details-modal-meta-heading {
        font-size: 0.58rem;
    }

    body.programme-modal-open #programme_details_modal .programme-details-modal-meta-value {
        font-size: 0.76rem;
    }

    body.programme-modal-open #programme_details_modal .programme-details-modal-meta-group--inline {
        gap: 0.18rem 1.42rem;
    }

    body.programme-modal-open #programme_details_modal .programme-details-modal-meta-group--inline .programme-details-modal-meta-row {
        flex: 0 0 auto;
    }

    body.programme-modal-open #programme_details_modal .programme-modal-close {
        margin-top: 0;
    }

    body.programme-modal-open #programme_details_modal .programme-details-modal-body {
        max-height: min(48vh, 400px);
        padding: 0.9rem 1rem 0.85rem !important;
    }

    body.programme-modal-open #programme_details_modal .programme-create-modal-scroll-body {
        gap: 0.9rem;
    }

    body.programme-modal-open #programme_details_modal .programme-details-section-header {
        gap: 0.55rem;
        margin-bottom: 0.5rem;
    }

        .programme-details-modal .programme-details-section-icon {
            height: 2.15rem;
            width: 2.15rem;
        }

        .programme-details-modal .programme-details-section-icon i {
            font-size: 1rem;
        }

        .programme-details-modal .programme-details-section-initial {
            font-size: 0.8rem;
        }

    body.programme-modal-open #programme_details_modal .programme-details-section-title {
        font-size: 0.75rem;
    }

        .programme-details-modal .programme-details-section--panel .programme-details-section-header {
            padding: 0;
        }

        .programme-details-modal .programme-information-item {
            padding: 0;
        }

        .programme-details-modal .programme-information-icon {
            display: none;
        }

        .programme-details-modal .programme-information-icon i {
            font-size: 1rem;
        }

        .programme-details-modal .programme-information-label {
            font-size: 0.72rem;
        }

        .programme-details-modal .programme-information-value {
            font-size: 0.88rem;
        }

        .programme-details-modal .programme-information-item--full .programme-information-value {
            font-size: 0.88rem;
        }

        .programme-details-modal .programme-information-content {
            flex-wrap: wrap;
        }

    body.programme-modal-open #programme_details_modal .programme-details-section--plain {
        padding-bottom: 0.85rem;
    }

        .programme-details-modal .programme-details-description {
            font-size: 0.92rem;
        }

    body.programme-modal-open #programme_details_modal .programme-details-modal-footer {
        padding: 0.8rem 1rem 0.95rem !important;
    }

        body.programme-modal-open #programme_details_modal .programme-details-modal-footer .btn {
            width: 100%;
            min-width: 0;
            justify-content: center;
        }
    }

/* Intern charts / learner profile modal styling moved from templates/progress_reporting_tool/internCharts.html */
.learner-activity-profile .modal .modal-content {
  border: 0;
  border-radius: 1.25rem;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.2);
  overflow: hidden;
}

.learner-activity-profile .modal .modal-header {
  align-items: flex-start;
  background: var(--primary-color, var(--btn-color, #3b0066)) !important;
  border: 0 !important;
  color: #ffffff !important;
  gap: 1rem;
  padding: 1rem 1.25rem;
}

.learner-activity-profile .modal .modal-header .modal-title {
  color: #ffffff !important;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0;
}

.learner-activity-profile .modal .modal-header .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
  flex: 0 0 auto;
  margin-top: 0.1rem;
  opacity: 1;
  box-shadow: none;
}

.learner-activity-profile .modal .modal-header .fa-times {
  align-items: center;
  background: transparent;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1.25rem;
  height: auto;
  justify-content: center;
  line-height: 1;
  margin: 0;
  min-width: 1.25rem;
  padding: 0.15rem 0.1rem;
  width: auto;
}

.learner-activity-profile .modal .modal-header .fa-times:hover,
.learner-activity-profile .modal .modal-header .fa-times:focus {
  opacity: 0.85;
  transform: none;
}

.learner-activity-profile .modal .modal-body,
.learner-activity-profile .modal .modal-footer {
  background: #ffffff;
}

#certificates_modal .modal-content {
  border: 0;
  border-radius: 1rem;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
  overflow: hidden;
}

#certificates_modal .modal-header {
  align-items: center;
  background: var(--primary-color, var(--btn-color, #e60000)) !important;
  border: 0 !important;
  color: #ffffff !important;
  padding: 1rem 1.25rem;
}

#certificates_modal .modal-title {
  color: #ffffff !important;
  font-weight: 700;
}

#certificates_modal .certificates-modal-close {
  align-items: center;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  height: 2rem;
  justify-content: center;
  line-height: 1;
  margin-left: auto;
  padding: 0;
  width: 2rem;
}

#certificates_modal .certificates-modal-close:hover,
#certificates_modal .certificates-modal-close:focus {
  background: rgba(255, 255, 255, 0.28);
  color: #ffffff;
  outline: none;
}

#certificates_modal .modal-body > .border.rounded-3 {
  border-left: 4px solid var(--primary-color, var(--btn-color, #e60000)) !important;
}

/* #certificates_modal .btn-outline-primary (+ :hover/:focus) removed: a
   leftover from before this modal was converted to the Skills Audit
   side-panel component (progress_reporting_tool/internCharts.html), back
   when its buttons sat in a Bootstrap .modal-body. Its ID selector outranked
   skills_audit.css's .sa-drawerh .btn-outline-primary rule, which is meant
   to invert Expand/Close to white on this drawer's purple header -- so
   Expand/Close rendered the header's own color at rest (invisible except
   for the text). Body buttons lose nothing: .sa-drawerb .btn-outline-primary
   in skills_audit.css already resolves to the exact same background/border/
   text-color this rule hardcoded. */

#manage_permissions_modal .modal-content {
  border: 0;
  border-radius: 0.75rem;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
  overflow: hidden;
}

#manage_permissions_modal .modal-header {
  align-items: center;
  background: var(--primary-color, var(--btn-color, #3b0066)) !important;
  border: 0 !important;
  color: #ffffff !important;
  padding: 0.9rem 1.15rem;
}

#manage_permissions_modal .modal-title {
  color: #ffffff !important;
  font-weight: 700;
}

#manage_permissions_modal .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
  opacity: 1;
  box-shadow: none;
}

#manage_permissions_modal .modal-body {
  background: color-mix(in srgb, var(--primary-color, #3b0066) 3%, #ffffff 97%);
}

#manage_permissions_modal .modal-footer {
  background: #ffffff !important;
  border-top: 1px solid color-mix(in srgb, var(--primary-color, #3b0066) 14%, #e5e7eb 86%);
}

#manage_permissions_modal .modal-footer .btn,
#manage_permissions_modal #save_permissions_btn {
  background: var(--primary-color, var(--btn-color, #3b0066)) !important;
  border: 1px solid var(--primary-color, var(--btn-color, #3b0066)) !important;
  color: #ffffff !important;
}

#manage_permissions_modal .modal-footer .btn:hover,
#manage_permissions_modal .modal-footer .btn:focus,
#manage_permissions_modal #save_permissions_btn:hover,
#manage_permissions_modal #save_permissions_btn:focus {
  background: var(--secondary-color, var(--primary-color, #3b0066)) !important;
  border-color: var(--secondary-color, var(--primary-color, #3b0066)) !important;
  color: #ffffff !important;
}

#manage_permissions_modal .accordion-item {
  border-color: color-mix(in srgb, var(--primary-color, #3b0066) 18%, #d1d5db 82%) !important;
}

#manage_permissions_modal .accordion-button {
  box-shadow: none;
}

#manage_permissions_modal .accordion-button:not(.collapsed),
#manage_permissions_modal .accordion-collapse.show {
  background: color-mix(in srgb, var(--primary-color, #3b0066) 5%, #ffffff 95%) !important;
}

#manage_permissions_modal .feature-name,
#manage_permissions_modal .sub-name {
  color: color-mix(in srgb, var(--primary-color, #3b0066) 42%, #111827 58%) !important;
}

#manage_permissions_modal .form-check-input:checked {
  background-color: var(--primary-color, var(--btn-color, #3b0066)) !important;
  border-color: var(--primary-color, var(--btn-color, #3b0066)) !important;
}

#manage_permissions_modal .form-check-input:focus {
  border-color: var(--primary-color, var(--btn-color, #3b0066));
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--primary-color, #3b0066) 20%, transparent);
}

.task-management-modal {
  border: 0;
  border-radius: 0.75rem;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
  overflow: hidden;
}

.task-management-modal .modal-header {
  align-items: center;
  background: var(--primary-color, var(--btn-color, #3b0066)) !important;
  border: 0 !important;
  color: #ffffff !important;
  padding: 0.9rem 1.15rem;
}

.task-management-modal .modal-title {
  color: #ffffff !important;
  font-weight: 700;
}

.task-management-modal .modal-header .fa-times {
  /* Plain white glyph -- the invert() filter below is only right for the
     .btn-close background-image X; on a font icon it turns white into black. */
  color: #ffffff !important;
  cursor: pointer;
  opacity: 1;
}

.task-management-modal .modal-header .btn-close {
  color: #ffffff !important;
  cursor: pointer;
  filter: invert(1) grayscale(100%) brightness(200%);
  opacity: 1;
}

.task-management-modal .modal-body {
  background: #ffffff;
}

.task-management-modal .modal-footer {
  background: #ffffff;
  border-top: 1px solid color-mix(in srgb, var(--primary-color, #3b0066) 14%, #e5e7eb 86%);
}

/* Every button in the task modal matches the standard btn-outline-primary,
   which client_theme.css paints from --btn-outline-primary-bg (= the tenant's
   --secondary-color) with a --primary-color border -- NOT a plain
   --primary-color fill. Every interaction state repeats the base declaration
   so the button has no hover/focus/active colour shift. */
.task-management-modal .btn-outline-primary,
.task-management-modal .btn-outline-primary:hover,
.task-management-modal .btn-outline-primary:focus,
.task-management-modal .btn-outline-primary:active,
.task-management-modal .modal-footer .btn,
.task-management-modal .modal-footer .btn:hover,
.task-management-modal .modal-footer .btn:focus,
.task-management-modal .modal-footer .btn:active {
  background-color: var(--btn-outline-primary-bg, var(--primary-color, #3b0066)) !important;
  border-color: var(--btn-outline-primary-border, var(--primary-color, #3b0066)) !important;
  color: var(--btn-outline-primary-text, #ffffff) !important;
  box-shadow: none !important;
}

/* Reusable "Add another"-style link that replaces a boxed "Add X" button --
   an underlined link with a round --primary-colour plus badge (mirrors the
   sm-*-add-btn pattern in programme management). Used in the Create/Edit Task
   modal and the Create Coding Challenge modal. */
.brand-add-another {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  width: max-content;
  font-weight: 600;
  text-decoration: underline;
}

.brand-add-another:hover,
.brand-add-another:focus {
  text-decoration: underline;
}

.brand-add-another-badge {
  background-color: var(--primary-color, #3b0066);
  font-size: 0.85rem;
  line-height: 1;
}

.task-management-modal .form-control:focus,
.task-management-modal .form-select:focus {
  border-color: var(--primary-color, var(--btn-color, #3b0066));
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--primary-color, #3b0066) 20%, transparent);
}

/* Rubric Weighting rows: the modal column is narrow, so the "cancel" button
   was being squeezed until "cancel" wrapped to two lines. Pin the button to
   its natural width on one line and let the criterion field shrink around it
   instead. */
.task-management-modal .card .d-flex > .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.task-management-modal .card .d-flex > .form-control {
  min-width: 0;
}

#job_role_app #job_structure_tabs,
#job_role_app #skillsTrackerTabs {
  border-bottom-color: color-mix(in srgb, var(--primary-color, #3b0066) 16%, #e5e7eb 84%);
}

#job_role_app #job_structure_tabs .nav-link,
#job_role_app #skillsTrackerTabs .nav-link {
  border: 0;
  border-bottom: 4px solid transparent;
  color: #1f2937 !important;
  font-weight: 600;
}

#job_role_app #job_structure_tabs .nav-link.active,
#job_role_app #skillsTrackerTabs .nav-link.active {
  background: transparent;
  border-color: var(--primary-color, var(--btn-color, #3b0066)) !important;
  color: var(--primary-color, var(--btn-color, #3b0066)) !important;
}

#job_role_app .job-role-manager-card,
#job_role_app .job-role-manager-card > .card {
  border-radius: 0.85rem;
  overflow: hidden;
}

#job_role_app .job-role-manager-banner,
#job_role_app .job-role-item-banner,
#job_role_app .card-header.bg-success,
#job_role_app .card-header.bg-info {
  background: var(--primary-color, var(--btn-color, #3b0066)) !important;
  border: 0 !important;
  color: #ffffff !important;
}

#job_role_app .job-role-manager-banner h5,
#job_role_app .job-role-item-banner span,
#job_role_app .card-header.bg-success h5,
#job_role_app .card-header.bg-info h5 {
  color: #ffffff !important;
}

#job_role_app .job-role-item-banner .btn-link {
  color: #ffffff !important;
}

#job_role_app .btn:not(.btn-link):not(.btn-outline-danger):not(.btn-outline-secondary),
#job_role_app .btn-outline-primary {
  background: var(--primary-color, var(--btn-color, #3b0066)) !important;
  border-color: var(--primary-color, var(--btn-color, #3b0066)) !important;
  color: #ffffff !important;
}

#job_role_app .btn:not(.btn-link):not(.btn-outline-danger):not(.btn-outline-secondary):hover,
#job_role_app .btn:not(.btn-link):not(.btn-outline-danger):not(.btn-outline-secondary):focus,
#job_role_app .btn-outline-primary:hover,
#job_role_app .btn-outline-primary:focus {
  background: var(--secondary-color, var(--primary-color, #3b0066)) !important;
  border-color: var(--secondary-color, var(--primary-color, #3b0066)) !important;
  color: #ffffff !important;
}

#job_role_app .form-check-input:checked {
  background-color: var(--primary-color, var(--btn-color, #3b0066)) !important;
  border-color: var(--primary-color, var(--btn-color, #3b0066)) !important;
}

#job_role_app .form-control:focus,
#job_role_app .form-select:focus,
#job_role_app .form-check-input:focus {
  border-color: var(--primary-color, var(--btn-color, #3b0066));
  box-shadow: 0 0 0 0.2rem color-mix(in srgb, var(--primary-color, #3b0066) 20%, transparent);
}

.learner-document-preview-modal .modal-header,
#view_document_modal .modal-header {
  align-items: center;
  background: var(--primary-color, var(--btn-color, #3b0066)) !important;
  border: 0 !important;
  color: #ffffff !important;
  gap: 1rem;
  margin-bottom: 0;
  padding: 1rem 1.25rem;
}

.learner-document-preview-modal .modal-header .modal-title,
#view_document_modal .modal-header .modal-title {
  color: #ffffff !important;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 0;
}

.learner-document-preview-modal .modal-header .fa-times,
#view_document_modal .modal-header .fa-times {
  align-items: center;
  background: transparent;
  color: #ffffff !important;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 auto;
  font-size: 1.25rem;
  justify-content: center;
  line-height: 1;
  margin: 0;
  opacity: 1;
  padding: 0.15rem 0.1rem;
}

.learner-document-preview-modal .modal-header .btn-close,
#view_document_modal .modal-header .btn-close {
  align-items: center;
  background: transparent !important;
  box-shadow: none !important;
  display: inline-flex;
  height: auto;
  justify-content: center;
  margin: 0;
  opacity: 1;
  padding: 0.15rem 0.1rem;
  width: auto;
}

.learner-document-preview-modal .modal-header .fa-times:hover,
.learner-document-preview-modal .modal-header .fa-times:focus,
#view_document_modal .modal-header .fa-times:hover,
#view_document_modal .modal-header .fa-times:focus {
  opacity: 0.85;
  transform: none;
}

.learner-activity-profile .learner-doc-status,
.learner-activity-profile .programme-document-sign-status-badge {
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  display: inline;
  line-height: 1.2;
  padding: 0 !important;
  white-space: nowrap;
}

.learner-activity-profile .learner-doc-status--missing,
.learner-activity-profile .programme-document-sign-status-badge--pending {
  color: #f4b400 !important;
}

.learner-activity-profile .programme-document-sign-status-badge--signed {
  color: #0f8f5f !important;
}

.learner-activity-profile .programme-document-sign-status-badge--in-progress {
  color: #0ea5e9 !important;
}

.learner-activity-profile .assessment-status-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.1;
  padding: 0;
  white-space: nowrap;
}

.learner-activity-profile .assessment-status-text.status-success {
  color: var(--bs-success, #198754);
}

.learner-activity-profile .assessment-status-text.status-warning {
  color: var(--bs-warning, #d97706);
}

.learner-activity-profile .assessment-status-text.status-info {
  color: var(--bs-info, #0ea5e9);
}

.learner-activity-profile .assessment-status-text.status-neutral {
  color: var(--bs-secondary, #64748b);
}

.learner-activity-profile .assessment-status-text.status-danger {
  color: var(--bs-danger, #dc3545);
}

@media (max-width: 575.98px) {
  .learner-activity-profile .modal .modal-header {
    padding: 0.9rem 1rem;
  }
}



/* Applicants page styles moved from internship_applications/static/css/applicants.css */
.badge-truncate {
    max-width: 140px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: inline-block;
    vertical-align: middle;
}

.badge-sm {
    font-size: 0.75rem;
    padding: 0.25rem 0.65rem;
}

/* Applicants top cards (mobile first), aligned with course-management card style. */
.applicants-main-card-tabs {
    position: relative;
    z-index: 10;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
    margin-left: 1rem;
    margin-right: 1rem;
}

.applicants-main-card-tab {
    position: relative;
    z-index: 11;
    cursor: pointer;
    border: 0;
    background: transparent;
    padding: 0;
    width: 100%;
}

.applicants-main-card-tab .bg-blue-wave {
    border-radius: 1rem;
    min-height: 11.25rem;
}

/* Keep the selected card level with the other cards in this row. */
.applicants-main-card-tab.is-active > div {
    transform: none;
}

@media (width >= 768px) {
    .applicants-main-card-tabs {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (width >= 1200px) {
    .applicants-main-card-tabs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.applicants-inner-tab-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.applicants-inner-tab-nav .nav-link {
    border: 1px solid rgb(74 35 129 / 30%);
    border-radius: 999px;
    background: #fff;
    color: #2f2c6a;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.45rem 0.9rem;
}

.applicants-inner-tab-nav .nav-link:hover,
.applicants-inner-tab-nav .nav-link:focus-visible {
    color: #2f2c6a;
    border-color: rgb(74 35 129 / 45%);
}

.applicants-inner-tab-nav .nav-link.active,
.applicants-inner-tab-nav .show > .nav-link {
    background: linear-gradient(135deg, #4a63c8 0%, #7a4db3 100%);
    border-color: transparent;
    color: #fff;
}

.recruitment-insights-panel {
    border: 1px solid #b8c4d6;
    border-radius: 0.5rem;
    background: #f1f5f9;
    padding: 1rem;
    box-shadow: 0 10px 22px rgb(15 23 42 / 9%);
}

.recruitment-insights-header {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-bottom: 0.85rem;
}

.recruitment-insights-eyebrow {
    display: block;
    color: #64748b;
    font-size: 0.72rem;
    font-weight: 800;
}

.recruitment-target-form {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}

.recruitment-target-input {
    width: 8.5rem;
}

.recruitment-target-field {
    align-items: center;
    display: inline-flex;
    gap: 0.35rem;
}

.recruitment-target-field-label {
    color: #334155;
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1;
}

.recruitment-target-save-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    border-radius: 0.5rem;
}

.recruitment-target-form-message {
    min-height: 1.1rem;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 0.55rem;
}

.applicant-target-modal-form .recruitment-target-input {
    width: 100%;
}

.applicant-target-config-modal .modal-content {
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
}

.applicant-target-config-modal .modal-header {
    background: var(--dark-purple-2, #3d0878);
    color: #ffffff;
}

.applicant-target-config-modal .fa-times {
    color: #ffffff;
    cursor: pointer;
}

.recruitment-insight-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.recruitment-insight-tile {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.35rem;
    min-height: 7.25rem;
    border: 1px solid #b8c4d6;
    border-radius: 0.5rem;
    background: #e2e8f0;
    padding: 0.85rem;
}

.recruitment-insight-card {
    border-color: #b8c4d6 !important;
    border-radius: 0.5rem;
    background: #e2e8f0;
    box-shadow: 0 8px 18px rgb(15 23 42 / 11%) !important;
}

.recruitment-insight-card .card-body {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 0.45rem;
    min-height: 8rem;
}

.recruitment-insight-label {
    color: #334155;
    font-size: 0.72rem;
    font-weight: 800;
}

.recruitment-insight-value {
    color: #172033;
    font-size: 1.35rem;
    line-height: 1.15;
    margin: 0;
    word-break: break-word;
}

.recruitment-insight-note {
    color: #334155;
    font-size: 0.75rem;
    line-height: 1.35;
}

.recruitment-insight-detail {
    color: #64748b;
    font-size: 0.68rem;
    line-height: 1.25;
}

.recruitment-insight-status-value {
    font-size: 1.04rem;
    line-height: 1.12;
}

.recruitment-target-progress {
    height: 0.55rem;
    border-radius: 0;
    background: #9aa8ba;
}

.recruitment-target-progress .progress-bar {
    background-color: #0052cc;
    border-radius: 0;
}

.recruitment-insight-status {
    align-self: flex-start;
    border-radius: 0.5rem;
    padding: 0.3rem 0.65rem;
    font-size: 0.85rem;
    font-weight: 800;
}

.recruitment-insight-status.is-reached {
    background: #dcfce7;
    color: #166534;
}

.recruitment-insight-status.is-open {
    background: #fff7ed;
    color: #9a3412;
}

.recruitment-insight-status.is-unset {
    background: #e2e8f0;
    color: #475569;
}

@media (width >= 768px) {
    .recruitment-insights-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .recruitment-insight-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .recruitment-insight-tile-wide {
        grid-column: span 2;
    }
}

@media (width >= 1200px) {
    .recruitment-insight-grid {
        grid-template-columns: minmax(15rem, 1.4fr) repeat(4, minmax(0, 1fr));
    }

    .recruitment-insight-tile-wide {
        grid-column: span 1;
    }
}

/* Recruitment pipeline builder styling */
#recruitment-process-tab .modal-header {
    border: 0;
    padding: 0;
    margin-bottom: 0.75rem;
}

#recruitment-process-tab .modal-header .modal-title {
    color: #0f172a;
    letter-spacing: 0.01em;
}

.recruitment-pipeline-builder-header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
    border-radius: 1rem;
    background: var(--primary-color);
    border: 1px solid rgb(73 34 132 / 24%);
    color: #fff;
}

.recruitment-pipeline-programme-label {
    color: rgb(255 255 255 / 88%);
    font-size: 0.95rem;
}

.recruitment-pipeline-builder-heading h5 {
    color: #fff;
    font-size: 1.65rem;
}

.recruitment-pipeline-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.recruitment-pipeline-action-btn {
    border: 1px solid rgb(255 255 255 / 50%);
    color: #fff;
    background: rgb(255 255 255 / 14%);
    border-radius: 0.9rem;
    padding: 0.45rem 0.9rem;
    font-weight: 600;
}

.recruitment-pipeline-action-btn:hover {
    color: #fff;
    background: rgb(255 255 255 / 24%);
    border-color: rgb(255 255 255 / 72%);
}

.recruitment-pipeline-canvas {
    background: #fff;
    border: 1px solid rgb(88 48 151 / 20%);
    border-radius: 1rem;
    box-shadow: 0 8px 24px rgb(15 23 42 / 8%);
}

.recruitment-pipeline-groups {
    display: flex;
    flex-direction: column;
    gap: 1.15rem;
}

.recruitment-pipeline-group {
    display: grid;
    gap: 0.85rem;
    min-width: 0;
}

.recruitment-pipeline-group:not(.is-steps-collapsed) > .recruitment-compact-stepper-shell {
    display: none;
}

.recruitment-pipeline-group.is-steps-collapsed > .specialization-header,
.recruitment-pipeline-group.is-steps-collapsed > .recruitment-pipeline-lane {
    display: none;
}

.recruitment-compact-stepper-shell {
    background: #ffffff;
    border: 1px solid #dbe4ef;
    border-radius: 0.5rem;
    box-shadow: none;
    color: #111827;
    padding: 0.85rem 1rem 0.95rem;
}

.recruitment-compact-stepper-head {
    align-items: center;
    display: flex;
    gap: 0.85rem;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.recruitment-compact-stepper-title {
    display: flex;
    flex-direction: column;
    gap: 0.12rem;
    min-width: 0;
}

.recruitment-compact-stepper-title strong {
    color: #111827;
    font-size: 0.92rem;
    line-height: 1.15;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recruitment-compact-stepper-eyebrow {
    color: #111827;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}

.recruitment-compact-stepper {
    --compact-step-dot-size: 2.05rem;
    --compact-step-gap: 0.45rem;
    display: grid;
    gap: var(--compact-step-gap);
    grid-auto-columns: minmax(5.5rem, 1fr);
    grid-auto-flow: column;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    padding-bottom: 0.1rem;
    position: relative;
}

.recruitment-compact-step {
    align-items: center;
    background: transparent;
    border: 0;
    color: #111827;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    min-width: 0;
    padding: 0;
    position: relative;
    text-align: center;
    z-index: 1;
}

.recruitment-compact-step:not(:last-child)::after {
    background: #c4c9d4;
    border-radius: 999px;
    content: "";
    height: 2px;
    left: calc(50% + (var(--compact-step-dot-size) / 2));
    pointer-events: none;
    position: absolute;
    top: calc(var(--compact-step-dot-size) / 2);
    transform: translateY(-50%);
    width: calc(100% + var(--compact-step-gap) - var(--compact-step-dot-size));
    z-index: 0;
}

.recruitment-compact-step.is-completed:not(:last-child)::after {
    background: #0aa77e;
}

.recruitment-compact-step-dot {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #9ca3af;
    border-radius: 999px;
    color: #111827;
    display: inline-flex;
    font-size: 0.78rem;
    font-weight: 800;
    height: 2.05rem;
    justify-content: center;
    line-height: 1;
    position: relative;
    width: 2.05rem;
    z-index: 2;
}

.recruitment-compact-step.is-completed .recruitment-compact-step-dot {
    background: #eaf8ef;
    border-color: #0aa77e;
    color: #111827;
}

.recruitment-compact-step.is-active .recruitment-compact-step-dot,
.recruitment-compact-step.is-selected .recruitment-compact-step-dot {
    background: #dff3ee;
    border-color: #20c997;
    color: #111827;
    box-shadow: 0 0 0 3px rgb(32 201 151 / 18%);
}

.recruitment-compact-step-label {
    color: inherit;
    display: block;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.18;
    max-width: 100%;
    overflow: hidden;
    position: relative;
    text-overflow: ellipsis;
    white-space: nowrap;
    z-index: 2;
}

.recruitment-compact-step.is-active .recruitment-compact-step-label,
.recruitment-compact-step.is-selected .recruitment-compact-step-label {
    color: #111827;
    font-weight: 800;
}

.recruitment-compact-step:focus-visible .recruitment-compact-step-dot {
    outline: 2px solid #111827;
    outline-offset: 2px;
}

.specialization-header {
    margin-top: 0.4rem;
}

.recruitment-editable-steps-head {
    align-items: center;
    display: flex;
    gap: 0.85rem;
    justify-content: space-between;
}

.specialization-header .specialization-name {
    color: #231942;
    margin-bottom: 0 !important;
}

.recruitment-pipeline-lane {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
    padding-left: 0.85rem;
    position: relative;
}

.recruitment-pipeline-lane::before {
    content: "";
    position: absolute;
    left: 0.42rem;
    top: 0.7rem;
    bottom: 0.7rem;
    width: 2px;
    background: #cbd5e1;
    border-radius: 999px;
}

.recruitment-pipeline-step-card {
    border: 1px solid #d8e2ec;
    border-radius: 0.5rem;
    background: #fff;
    color: #1f2937;
    padding: 0;
    margin: 0;
    overflow: visible;
    box-shadow: 0 6px 14px rgb(15 23 42 / 7%);
    position: relative;
    z-index: 1;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.recruitment-pipeline-step-card::before {
    content: "";
    display: block;
    height: 4px;
    border-radius: 0.5rem 0.5rem 0 0;
    background: #94a3b8;
}

.step-card-shell {
    display: flex;
    flex-direction: column;
    min-height: 7.65rem;
    height: 100%;
    overflow: visible;
    padding: 0.36rem 0.42rem 1.72rem;
    position: relative;
}

.recruitment-pipeline-step-card.step-item-editing .step-card-shell {
    height: auto;
}

.step-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.24rem;
    margin-bottom: 0.2rem;
}

.step-card-head-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.16rem;
}

.step-card-head .step_number {
    color: #334155;
    font-weight: 700;
    font-size: 0.56rem;
}

.step-timeline-status {
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.48rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
    padding: 0.12rem 0.28rem;
}

.step-timeline-status.is-active {
    background: #eaf3ff;
    border-color: #b6d4fe;
    color: #1d4ed8;
}

.step-timeline-status.is-completed {
    background: #eaf9ee;
    border-color: #b7e4c7;
    color: #1f7a3a;
}

.step-timeline-status.is-upcoming {
    background: #fff7ed;
    border-color: #fed7aa;
    color: #9a3412;
}

.step-timeline-status.is-default {
    background: #eef2ff;
    border-color: #c7d2fe;
    color: #3730a3;
}

.recruitment-pipeline-step-card.step-status-active {
    border-color: rgb(37 99 235 / 34%);
    background: #eaf3ff;
    box-shadow: 0 8px 18px rgb(37 99 235 / 14%);
}

.recruitment-pipeline-step-card.step-status-active::before {
    background: #2563eb;
}

.recruitment-pipeline-step-card.step-status-completed {
    border-color: rgb(22 163 74 / 32%);
    background: #eaf9ee;
    box-shadow: 0 8px 18px rgb(22 163 74 / 12%);
}

.recruitment-pipeline-step-card.step-status-completed::before {
    background: #16a34a;
}

.recruitment-pipeline-step-card.step-status-upcoming {
    border-color: #d8e2ec;
    background: #fff7ed;
}

.recruitment-pipeline-step-card.step-status-upcoming::before {
    background: #f59e0b;
}

.recruitment-pipeline-step-card.step-status-default {
    border-color: rgb(79 70 229 / 30%);
    background: #eef2ff;
    box-shadow: 0 8px 18px rgb(79 70 229 / 12%);
}

.recruitment-pipeline-step-card.step-status-default::before {
    background: #4f46e5;
}

.recruitment-pipeline-step-card.step-status-default.cv-screening-disabled::before {
    background: #d97706;
}

.recruitment-pipeline-step-card.step-status-default.cv-screening-disabled {
    background: #fffbeb;
    border-color: rgb(217 119 6 / 34%);
}

.recruitment-pipeline-lane .step-item {
    cursor: pointer;
    position: relative;
    z-index: 1;
}

.recruitment-pipeline-lane .step-item:hover,
.recruitment-pipeline-lane .step-item:focus-within {
    z-index: 25;
}

.recruitment-pipeline-lane .step-item:focus-visible .recruitment-pipeline-step-card,
.recruitment-pipeline-lane .step-item:hover .recruitment-pipeline-step-card {
    border-color: rgb(37 99 235 / 42%);
    box-shadow: 0 10px 20px rgb(15 23 42 / 13%);
    transform: translateY(-2px);
}

.recruitment-pipeline-lane .step-item .step-card-shell::after {
    background: rgb(255 255 255 / 78%);
    border: 1px solid rgb(148 163 184 / 40%);
    border-radius: 999px;
    bottom: 0.42rem;
    color: #475569;
    content: "Click to view table";
    font-size: 0.48rem;
    font-weight: 800;
    left: 0.42rem;
    line-height: 1;
    padding: 0.12rem 0.28rem;
    position: absolute;
}

.recruitment-pipeline-lane .step-item.step-monitoring-selected .step-card-shell::after {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
    content: "Viewing table";
}

.recruitment-pipeline-step-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 2.35rem;
    pointer-events: none;
    position: relative;
    z-index: 1;
}

.recruitment-pipeline-step-arrow::before {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #cbd5e1;
}

.recruitment-pipeline-step-arrow-icon {
    width: 1.55rem;
    height: 1.55rem;
    border-radius: 999px;
    border: 1px solid #cbd5e1;
    background: #fff;
    box-shadow: 0 3px 8px rgb(15 23 42 / 10%);
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transform: rotate(90deg);
    position: relative;
    z-index: 1;
}

.recruitment-pipeline-lane .step-item.step-monitoring-selected .recruitment-pipeline-step-card {
    outline: 2px solid rgb(37 99 235 / 38%);
    outline-offset: 2px;
}

.recruitment-pipeline-lane .step-item.step-monitoring-selected {
    outline: 2px solid rgb(37 99 235 / 35%);
    outline-offset: 2px;
}

.step-type {
    border-radius: 999px;
    padding: 0.12rem 0.3rem;
    font-weight: 700;
    font-size: 0.5rem;
    background: #f1f5f9;
    color: #334155;
}

.step-item[data-process-type-key*="interview"] .step-type {
    background: #d1fae5;
    color: #065f46;
}

.step-item[data-process-type-key*="assessment"] .step-type {
    background: #bfdbfe;
    color: #1d4ed8;
}

.step-item[data-process-type-key*="video"] .step-type {
    background: #ddd6fe;
    color: #5b21b6;
}

.step-card-title-row {
    align-items: center;
    display: flex;
    gap: 0.24rem;
    margin-bottom: 0.24rem;
    min-height: 1.05rem;
}

.step-drag-handle {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 0.35rem;
    color: #475569;
    cursor: grab;
    display: inline-flex;
    flex: 0 0 1.24rem;
    height: 1.24rem;
    justify-content: center;
    padding: 0;
    transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
    width: 1.24rem;
}

.step-drag-handle i {
    font-size: 0.82rem;
    line-height: 1;
}

.step-drag-handle:hover,
.step-drag-handle:focus {
    background: #eff6ff;
    border-color: #93c5fd;
    color: #1d4ed8;
}

.step-drag-handle:active {
    cursor: grabbing;
}

.recruitment-pipeline-lane.step-drag-over {
    outline: 1px dashed #93c5fd;
    outline-offset: 0.2rem;
}

.recruitment-pipeline-lane.step-order-saving {
    opacity: 0.74;
    pointer-events: none;
}

.step-item.recruitment-draggable-step.step-dragging {
    opacity: 0.55;
    z-index: 40;
}

.step-item.recruitment-draggable-step.step-dragging .recruitment-pipeline-step-card {
    border-color: #2563eb;
    box-shadow: 0 14px 28px rgb(37 99 235 / 18%);
    cursor: grabbing;
    transform: scale(0.98);
}

.step_name {
    color: #0f172a;
    flex: 1 1 auto;
    font-size: 0.68rem;
    line-height: 1.14;
    min-width: 0;
}

.step-card-meta {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    display: grid;
    gap: 0.16rem;
    padding: 0.24rem;
}

.step-card-meta-row {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: 0.24rem;
    color: #374151;
    margin-bottom: 0;
}

.step-card-meta-row:last-child {
    margin-bottom: 0;
}

.step-card-pass-mark-row {
    display: flex;
}

.step-card-meta-icon {
    align-items: center;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.34rem;
    color: #475569;
    display: inline-flex;
    height: 0.92rem;
    justify-content: center;
    width: 0.92rem;
}

.step-card-meta-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.step-card-meta-label {
    color: #64748b;
    font-size: 0.44rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 0.08rem;
    text-transform: uppercase;
}

.step-card-meta-value {
    color: #0f172a;
    font-size: 0.52rem;
    font-weight: 700;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.step-pass-mark {
    background: #fde68a;
    color: #78350f;
    font-weight: 700;
}

.track-applicant-step-card {
    border: 1px solid #e2e8f0 !important;
    background: #fff !important;
}

.track-applicant-step-card-completed {
    background: #eaf9ee !important;
    border-color: #b7e4c7 !important;
}

.track-applicant-step-card-current {
    background: #eaf3ff !important;
    border-color: #b6d4fe !important;
}

.track-applicant-step-card.track-applicant-step-card-completed .step-circle {
    background: #d7f2df;
    border: 1px solid #9fd5b3;
    color: #1f7a3a;
}

.track-applicant-step-card.track-applicant-step-card-current .step-circle {
    background: #dcecff;
    border: 1px solid #9ec5fe;
    color: #1d4ed8;
}

.assessment_container {
    margin-top: 0.24rem;
    font-size: 0.56rem;
    text-align: left !important;
}

.default-monitoring-summary {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    display: grid;
    gap: 0.14rem;
    padding: 0.24rem;
}

.default-monitoring-eyebrow {
    color: #4f46e5;
    font-size: 0.45rem;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
    text-transform: uppercase;
}

.default-monitoring-copy {
    color: #334155;
    font-size: 0.48rem;
    font-weight: 600;
    line-height: 1.12;
}

.default-monitoring-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.16rem;
}

.default-monitoring-chip {
    align-items: center;
    background: #fff;
    border: 1px solid #dbe4ef;
    border-radius: 999px;
    color: #334155;
    display: inline-flex;
    font-size: 0.44rem;
    font-weight: 800;
    line-height: 1;
    padding: 0.11rem 0.22rem;
}

.default-screening-state.is-auto {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.default-screening-state.is-manual {
    background: #fffbeb;
    border-color: #fde68a;
    color: #92400e;
}

.default-monitoring-target-panel {
    background: #eef2ff;
    border: 1px solid #c7d2fe;
    border-radius: 0.42rem;
    display: grid;
    gap: 0.12rem;
    padding: 0.2rem 0.24rem;
}

.default-monitoring-target-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
    gap: 0.28rem;
}

.default-monitoring-target-head > span {
    color: #334155;
    font-size: 0.44rem;
    font-weight: 800;
    line-height: 1;
}

.default-monitoring-target-head strong {
    color: #172033;
    font-size: 0.56rem;
    line-height: 1;
}

.default-monitoring-target-progress {
    border-radius: 0;
    height: 0.26rem;
}

.default-monitoring-target-progress .progress-bar {
    border-radius: 0;
}

.default-monitoring-target-form-wrap {
    border-top: 1px solid #c7d2fe;
    padding-top: 0.18rem;
}

.default-monitoring-target-form-wrap .recruitment-target-form {
    gap: 0.22rem;
}

.default-monitoring-target-form-wrap .recruitment-target-input {
    flex: 1 1 4.5rem;
    min-width: 0;
    width: auto;
}

.default-monitoring-target-form-wrap .recruitment-target-save-btn {
    border-radius: 0.38rem;
    font-size: 0.5rem;
    min-height: 1.5rem;
    padding: 0.14rem 0.32rem;
}

.default-monitoring-target-form-wrap .recruitment-target-form-message {
    margin-bottom: 0;
    min-height: 0.8rem;
}

.recruitment-cv-screening-switch {
    align-items: center;
    border-top: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    padding-top: 0.16rem;
}

.recruitment-cv-screening-switch .form-check-input {
    height: 0.72rem;
    margin-top: 0;
    width: 1.35rem;
}

.recruitment-cv-screening-switch .form-check-label {
    color: #475569;
    font-size: 0.52rem !important;
    font-weight: 700 !important;
    line-height: 1;
}

.step_actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 0.32rem;
    padding-top: 0;
    border-top: 0;
    position: absolute;
    right: 0.42rem;
    bottom: 0.32rem;
    z-index: 35;
}

.recruitment-pipeline-step-card.step-item-editing .step_actions {
    display: none;
}

.pipeline-step-actions-menu-btn {
    align-items: center;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 0.45rem;
    color: #334155;
    display: inline-flex;
    font-weight: 800;
    gap: 0.16rem;
    font-size: 0.54rem;
    padding: 0.14rem 0.3rem;
}

.pipeline-step-actions-menu-btn:hover,
.pipeline-step-actions-menu-btn:focus {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

.pipeline-step-actions-menu {
    --bs-dropdown-min-width: 6.6rem;
    border: 1px solid #dbe4ef;
    border-radius: 0.5rem;
    box-shadow: 0 12px 26px rgb(15 23 42 / 14%);
    min-width: 6.6rem;
    max-width: 6.6rem;
    padding: 0.18rem;
    width: 6.6rem;
    z-index: 1080;
}

.pipeline-step-actions-menu .step-action-item {
    margin: 0;
}

.pipeline-step-actions-menu .pipeline-step-action-btn {
    align-items: center;
    border-radius: 0.38rem;
    color: #334155;
    display: flex;
    font-weight: 400;
    line-height: 1.15;
    padding: 0.28rem 0.32rem;
    white-space: normal;
    width: 100%;
}

.pipeline-step-actions-menu .pipeline-step-action-btn i {
    flex: 0 0 1rem;
    font-size: 0.82rem;
    line-height: 1;
    text-align: center;
}

.pipeline-step-actions-menu .pipeline-step-action-btn:hover,
.pipeline-step-actions-menu .pipeline-step-action-btn:focus {
    background: #eff6ff;
    color: #1d4ed8;
}

.pipeline-step-actions-menu .delete-process-btn:hover,
.pipeline-step-actions-menu .delete-process-btn:focus {
    background: #fef2f2;
    color: #b91c1c;
}

.pipeline-step-actions-menu .assign-process-btn:hover,
.pipeline-step-actions-menu .assign-process-btn:focus,
.pipeline-step-actions-menu .view-video-process-btn:hover,
.pipeline-step-actions-menu .view-video-process-btn:focus,
.pipeline-step-actions-menu .view-interview-slots-btn:hover,
.pipeline-step-actions-menu .view-interview-slots-btn:focus {
    background: #ecfdf5;
    color: #047857;
}

.step_actions > .pipeline-step-action-btn {
    border: 1px solid transparent;
    color: #64748b;
    border-radius: 0.4rem;
    background: #f8fafc;
    padding: 0.28rem 0.46rem;
    font-weight: 700;
    line-height: 1.1;
}

.pipeline-step-action-btn:hover {
    color: #1d4ed8;
    background: #eff6ff;
    border-color: #bfdbfe;
}

.delete-process-btn.pipeline-step-action-btn:hover {
    color: #b91c1c;
    background: #fef2f2;
    border-color: #fecaca;
}

.assign-process-btn.pipeline-step-action-btn:hover,
.view-video-process-btn.pipeline-step-action-btn:hover,
.view-interview-slots-btn.pipeline-step-action-btn:hover {
    color: #047857;
    background: #ecfdf5;
    border-color: #bbf7d0;
}

.recruitment-pipeline-step-card .process-template {
    margin-top: 0.8rem;
    border-top: 1px solid rgb(148 163 184 / 32%);
    padding-top: 0.8rem;
    width: 100%;
    max-width: 100%;
}

.recruitment-pipeline-step-card .process-template > .d-flex {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0.6rem !important;
}

.recruitment-pipeline-step-card .process-template .labels,
.recruitment-pipeline-step-card .process-template .form-check-label {
    color: #334155 !important;
}

.recruitment-pipeline-step-card .process-template .form-control {
    background: #fff;
    color: #0f172a;
    border-color: rgb(148 163 184 / 45%);
}

.recruitment-pipeline-step-card .process-template .form-control::placeholder {
    color: rgb(100 116 139 / 82%);
}

.recruitment-pipeline-step-card .process-template > .mt-3 > .d-flex {
    flex-wrap: wrap;
}

.recruitment-pipeline-step-card .process-template .process-description {
    flex: 1 1 16rem;
    min-width: 0;
}

.recruitment-pipeline-step-card .process-template .process-description,
.recruitment-pipeline-step-card .process-template .cancel-update-process-btn,
.recruitment-pipeline-step-card .process-template .update-process-btn {
    margin-bottom: 0 !important;
}

.recruitment-pipeline-step-card .process-template .process-description + .cancel-update-process-btn {
    margin-left: auto;
}

.recruitment-pipeline-step-card .process-template .process-pass-mark {
    width: 100%;
}

.step-monitoring-container {
    margin-top: 0.85rem;
    border-top: 1px solid rgb(148 163 184 / 32%);
    padding-top: 0.75rem;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

.step-monitoring-toolbar {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 0.55rem;
}

.step-monitoring-title {
    font-size: 0.93rem;
    color: #1f2937;
    font-weight: 700;
}

.step-monitoring-filters {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.step-monitoring-table-shell {
    display: block;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto !important;
    overflow-y: hidden;
    width: 100%;
}

.step-monitoring-container .dataTables_wrapper,
.step-monitoring-container .dt-container {
    max-width: 100%;
    min-width: 0;
    overflow: visible !important;
    width: 100%;
}

.step-monitoring-container .dataTables_wrapper > .row,
.step-monitoring-container .dataTables_wrapper > .row > [class*="col-"],
.step-monitoring-container .dt-layout-row,
.step-monitoring-container .dt-layout-cell,
.step-monitoring-container .dt-layout-table {
    max-width: 100%;
    min-width: 0;
}

.step-monitoring-container .dataTables_wrapper > .row {
    margin-left: 0;
    margin-right: 0;
    width: 100%;
}

.step-monitoring-container .dataTables_wrapper > .row > [class*="col-"] {
    padding-left: 0;
    padding-right: 0;
}

.step-monitoring-container .dataTables_wrapper > .row:nth-child(2) > [class*="col-"] {
    overflow-x: auto;
}

.step-monitoring-container .dt-layout-cell.dt-layout-full {
    overflow-x: auto;
}

.step-monitoring-container .dataTables_scroll,
.step-monitoring-container .dt-scroll {
    max-width: 100%;
    min-width: 0;
    overflow: hidden !important;
    width: 100%;
}

.step-monitoring-container .dataTables_scrollBody,
.step-monitoring-container .dt-scroll-body {
    max-height: 54vh;
    max-width: 100%;
    min-width: 0;
    overflow-x: auto !important;
    overflow-y: auto !important;
    width: 100%;
}

.step-monitoring-container .dataTables_scrollBody::-webkit-scrollbar,
.step-monitoring-container .dt-scroll-body::-webkit-scrollbar,
.step-monitoring-table-shell::-webkit-scrollbar {
    height: 0.55rem;
    width: 0.55rem;
}

.step-monitoring-container .dataTables_scrollBody::-webkit-scrollbar-track,
.step-monitoring-container .dt-scroll-body::-webkit-scrollbar-track,
.step-monitoring-table-shell::-webkit-scrollbar-track {
    background: #e2e8f0;
}

.step-monitoring-container .dataTables_scrollBody::-webkit-scrollbar-thumb,
.step-monitoring-container .dt-scroll-body::-webkit-scrollbar-thumb,
.step-monitoring-table-shell::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 999px;
}

.step-monitoring-container .dataTables_scrollBody::-webkit-scrollbar-thumb:hover,
.step-monitoring-container .dt-scroll-body::-webkit-scrollbar-thumb:hover,
.step-monitoring-table-shell::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

.step-monitoring-table {
    max-width: none;
    min-width: 1280px;
    table-layout: auto;
    width: max-content !important;
}

.step-monitoring-table thead th {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    color: #fff !important;
    background-color: var(--primary-color);
    border-color: rgb(148 163 184 / 45%);
    white-space: nowrap;
}

.step-monitoring-action-head {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.step-monitoring-action-head .step-monitoring-action-filter {
    min-width: 9.5rem;
}

.step-monitoring-table tbody td {
    font-size: 0.78rem;
    color: #1f2937;
    vertical-align: middle;
}

/* Keep the desktop table typography unchanged while fitting column content
   more comfortably on phones. This covers both the applicant lists and the
   recruitment-step monitoring table, including DataTables-rendered headers. */
@media (max-width: 767.98px) {
    body.applicants-management-standalone-page .applicant-data-table th,
    body.applicants-management-standalone-page .applicant-data-table td,
    body.applicants-management-standalone-page .step-monitoring-table th,
    body.applicants-management-standalone-page .step-monitoring-table td {
        font-size: 0.625rem !important;
    }
}

.step-monitoring-table th,
.step-monitoring-table td {
    min-width: 10rem;
    white-space: nowrap;
}

.step-monitoring-table .step-monitoring-col-row-number {
    min-width: 3.75rem;
    width: 3.75rem;
}

.step-monitoring-table .step-monitoring-col-applicant-name {
    min-width: 13rem;
}

.step-monitoring-table .step-monitoring-col-email {
    min-width: 15rem;
}

.step-monitoring-table .step-monitoring-col-job-role,
.step-monitoring-table .step-monitoring-col-specialization,
.step-monitoring-table .step-monitoring-col-current-step {
    min-width: 12rem;
}

.step-monitoring-table .step-monitoring-col-assessment,
.step-monitoring-table .step-monitoring-col-scheduled-slot {
    min-width: 14rem;
}

.step-monitoring-table .step-monitoring-col-decline-reason,
.step-monitoring-table .step-monitoring-col-meeting-link,
.step-monitoring-table .step-monitoring-col-performance-summary,
.step-monitoring-table .step-monitoring-col-recommendation {
    min-width: 15rem;
}

.step-monitoring-table .step-monitoring-col-previous-results {
    min-width: 18rem;
}

.step-monitoring-table .step-monitoring-col-admin-note {
    min-width: 24rem;
    white-space: normal;
}

.step-monitoring-table .step-monitoring-col-action-label {
    min-width: 14rem;
}

.step-monitoring-note-editor {
    display: grid;
    gap: 0.22rem;
    min-width: 21rem;
    width: 100%;
}

.step-monitoring-note-actions {
    align-items: center;
    display: flex;
    gap: 0.45rem;
    justify-content: flex-end;
    min-height: 1.95rem;
    width: 100%;
}

.step-monitoring-note-input {
    font-size: 0.72rem;
    line-height: 1.3;
    min-height: 2.05rem;
    min-width: 0;
    resize: vertical;
    width: 100%;
}

.step-monitoring-save-note-btn {
    flex: 0 0 auto;
    min-height: 1.95rem;
    min-width: 4.6rem;
    white-space: nowrap;
}

.step-monitoring-note-state {
    display: block;
    flex: 1 1 auto;
    font-size: 0.68rem;
    line-height: 1;
    min-height: 0.8rem;
    min-width: 0;
    text-align: left;
}

.step-monitoring-table .step-monitoring-btn,
.step-monitoring-table .btn.btn-outline-primary {
    color: #fff !important;
    border-color: #2563eb !important;
    background-color: #2563eb !important;
}

.step-monitoring-table .step-monitoring-btn:hover,
.step-monitoring-table .step-monitoring-btn:focus,
.step-monitoring-table .btn.btn-outline-primary:hover,
.step-monitoring-table .btn.btn-outline-primary:focus {
    color: #fff !important;
    border-color: #1d4ed8 !important;
    background-color: #1d4ed8 !important;
}

.step-monitoring-table > tbody > tr.step-monitoring-row-attended > td {
    background-color: rgb(34 197 94 / 14%) !important;
}

.step-monitoring-table > tbody > tr.step-monitoring-row-approved > td {
    background-color: rgb(16 185 129 / 20%) !important;
}

.step-monitoring-table tbody > tr.step-monitoring-row-attended > td:first-child {
    box-shadow: inset 3px 0 0 rgb(21 128 61 / 72%);
}

.step-monitoring-table > tbody > tr.step-monitoring-row-declined-reason > td {
    background-color: rgb(254 226 226 / 72%) !important;
}

.step-monitoring-table > tbody > tr.step-monitoring-row-declined-reason > td:first-child {
    box-shadow: inset 3px 0 0 rgb(220 38 38 / 72%);
}

.step-monitoring-table > tbody > tr.step-monitoring-row-decline-cv-profile > td {
    background-color: rgb(255 228 230 / 78%) !important;
}

.step-monitoring-table > tbody > tr.step-monitoring-row-decline-cv-profile > td:first-child {
    box-shadow: inset 3px 0 0 rgb(225 29 72 / 72%);
}

.step-monitoring-table > tbody > tr.step-monitoring-row-decline-documents > td {
    background-color: rgb(254 243 199 / 78%) !important;
}

.step-monitoring-table > tbody > tr.step-monitoring-row-decline-documents > td:first-child {
    box-shadow: inset 3px 0 0 rgb(217 119 6 / 72%);
}

.step-monitoring-table > tbody > tr.step-monitoring-row-decline-qualification > td {
    background-color: rgb(237 233 254 / 78%) !important;
}

.step-monitoring-table > tbody > tr.step-monitoring-row-decline-qualification > td:first-child {
    box-shadow: inset 3px 0 0 rgb(124 58 237 / 72%);
}

.step-monitoring-table > tbody > tr.step-monitoring-row-decline-eligibility > td {
    background-color: rgb(254 215 170 / 78%) !important;
}

.step-monitoring-table > tbody > tr.step-monitoring-row-decline-eligibility > td:first-child {
    box-shadow: inset 3px 0 0 rgb(234 88 12 / 72%);
}

.step-monitoring-table > tbody > tr.step-monitoring-row-decline-location > td {
    background-color: rgb(219 234 254 / 78%) !important;
}

.step-monitoring-table > tbody > tr.step-monitoring-row-decline-location > td:first-child {
    box-shadow: inset 3px 0 0 rgb(37 99 235 / 72%);
}

.step-monitoring-table > tbody > tr.step-monitoring-row-decline-assessment > td {
    background-color: rgb(224 231 255 / 78%) !important;
}

.step-monitoring-table > tbody > tr.step-monitoring-row-decline-assessment > td:first-child {
    box-shadow: inset 3px 0 0 rgb(79 70 229 / 72%);
}

.step-monitoring-table > tbody > tr.step-monitoring-row-decline-duplicate > td {
    background-color: rgb(226 232 240 / 78%) !important;
}

.step-monitoring-table > tbody > tr.step-monitoring-row-decline-duplicate > td:first-child {
    box-shadow: inset 3px 0 0 rgb(71 85 105 / 72%);
}

.step-monitoring-table > tbody > tr.step-monitoring-row-decline-palette-1 > td {
    background-color: rgb(252 231 243 / 78%) !important;
}

.step-monitoring-table > tbody > tr.step-monitoring-row-decline-palette-1 > td:first-child {
    box-shadow: inset 3px 0 0 rgb(219 39 119 / 72%);
}

.step-monitoring-table > tbody > tr.step-monitoring-row-decline-palette-2 > td {
    background-color: rgb(224 242 254 / 78%) !important;
}

.step-monitoring-table > tbody > tr.step-monitoring-row-decline-palette-2 > td:first-child {
    box-shadow: inset 3px 0 0 rgb(2 132 199 / 72%);
}

.step-monitoring-table > tbody > tr.step-monitoring-row-decline-palette-3 > td {
    background-color: rgb(236 254 255 / 78%) !important;
}

.step-monitoring-table > tbody > tr.step-monitoring-row-decline-palette-3 > td:first-child {
    box-shadow: inset 3px 0 0 rgb(8 145 178 / 72%);
}

.step-monitoring-table > tbody > tr.step-monitoring-row-decline-palette-4 > td {
    background-color: rgb(254 249 195 / 78%) !important;
}

.step-monitoring-table > tbody > tr.step-monitoring-row-decline-palette-4 > td:first-child {
    box-shadow: inset 3px 0 0 rgb(202 138 4 / 72%);
}

.step-monitoring-table > tbody > tr.step-monitoring-row-decline-palette-5 > td {
    background-color: rgb(243 232 255 / 78%) !important;
}

.step-monitoring-table > tbody > tr.step-monitoring-row-decline-palette-5 > td:first-child {
    box-shadow: inset 3px 0 0 rgb(147 51 234 / 72%);
}

.step-monitoring-table > tbody > tr.step-monitoring-row-decline-palette-6 > td {
    background-color: rgb(255 237 213 / 78%) !important;
}

.step-monitoring-table > tbody > tr.step-monitoring-row-decline-palette-6 > td:first-child {
    box-shadow: inset 3px 0 0 rgb(249 115 22 / 72%);
}

.step-monitoring-table > tbody > tr.step-monitoring-row-declined-application > td {
    background-color: rgb(248 215 218 / 86%) !important;
    color: #842029;
}

.step-monitoring-table > tbody > tr.step-monitoring-row-declined-application > td:first-child {
    box-shadow: inset 3px 0 0 #dc3545;
}

.step-monitoring-empty {
    color: #64748b;
}

.step-monitoring-board {
    background: #f8fafc;
    border: 1px solid #dbe4ef;
    border-left: 3px solid #2563eb;
    border-radius: 0.5rem;
    display: grid;
    gap: 0.85rem;
    margin: 0.25rem 0 1.15rem;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
    padding: 0.75rem;
    width: 100%;
}

.step-monitoring-panel {
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    background: #fff;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
    padding: 0.8rem 0.9rem 0.9rem;
    width: 100%;
}

.step-monitoring-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.7rem;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 0.7rem;
    padding-bottom: 0.6rem;
}

.step-monitoring-panel-title {
    font-size: 0.94rem;
    font-weight: 700;
    color: #0f172a;
}

.step-monitoring-panel-status {
    display: inline-flex;
    align-items: center;
    padding: 0.16rem 0.52rem;
    border-radius: 999px;
    font-size: 0.69rem;
    font-weight: 700;
    letter-spacing: 0.02em;
}

.step-monitoring-panel-status.is-active {
    background: rgb(16 185 129 / 16%);
    color: #047857;
    border: 1px solid rgb(16 185 129 / 32%);
}

.step-monitoring-panel-status.is-completed {
    background: rgb(59 130 246 / 12%);
    color: #1e40af;
    border: 1px solid rgb(59 130 246 / 28%);
}

.step-monitoring-panel-status.is-upcoming {
    background: rgb(148 163 184 / 14%);
    color: #334155;
    border: 1px solid rgb(148 163 184 / 30%);
}

.step-monitoring-panel-status.is-default {
    background: rgb(99 102 241 / 12%);
    color: #3730a3;
    border: 1px solid rgb(99 102 241 / 26%);
}

.step-monitoring-panel .step-monitoring-container {
    margin-top: 0;
    border-top: 0;
    padding-top: 0;
}

.assessment-assign-modal .modal-dialog {
    max-width: min(1240px, 96vw);
    height: calc(100dvh - 2rem);
    margin-block: 1rem;
}

.assessment-assign-modal .modal-content {
    border-radius: 1rem;
    border: 1px solid rgb(74 35 129 / 20%);
    max-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.assessment-assign-modal .modal-content > .modal-header {
    flex: 0 0 auto;
}

.assessment-assign-modal .modal-content > .modal-body {
    background: #fff;
    flex: 1 1 auto;
    min-height: 0;
    max-height: none;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

.assessment-assign-modal #assessmentAssignModalContent .table-responsive {
    max-height: clamp(240px, calc(100dvh - 24rem), 620px);
    overflow: auto;
}

.assessment-assign-modal .assign-assessment-table-shell .table-responsive {
    max-height: clamp(240px, calc(100dvh - 24rem), 620px);
    overflow: auto;
}

.assessment-assign-modal #assessmentAssignModalContent .dt-container {
    min-width: 100%;
}

.assessment-assign-modal #assessmentAssignModalContent .dt-scroll-body,
.assessment-assign-modal .assign-assessment-table-shell .dt-scroll-body {
    max-height: clamp(220px, calc(100dvh - 27rem), 560px) !important;
    overflow: auto !important;
}

.assessment-assign-modal .recruitment-assessment-table {
    min-width: 940px;
}

@media (max-height: 760px) {
    .assessment-assign-modal .modal-dialog {
        height: calc(100dvh - .75rem);
        margin-block: .375rem;
    }

    .assessment-assign-modal .modal-content > .modal-body {
        padding-block: .9rem;
    }

    .assessment-assign-modal #assessmentAssignModalContent .table-responsive,
    .assessment-assign-modal .assign-assessment-table-shell .table-responsive {
        max-height: clamp(220px, calc(100dvh - 20rem), 520px);
    }
}

.add-process-container .modal-content {
    border-radius: 1rem;
    border: 1px solid rgb(74 35 129 / 18%);
}

.add-process-container .modal-header {
    border-bottom: 1px solid rgb(148 163 184 / 26%) !important;
}

.recruitment-add-step-modal-body {
    background: #fff;
}

@media (width >= 992px) {
    .recruitment-pipeline-builder-header {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
    }

    .recruitment-pipeline-lane {
        align-items: stretch;
        display: flex;
        gap: 0.5rem;
        overflow-x: auto;
        padding: 0.2rem 0.2rem 0.65rem;
        scrollbar-color: #94a3b8 #e2e8f0;
        scrollbar-width: thin;
    }

    .recruitment-pipeline-lane::-webkit-scrollbar {
        height: 0.55rem;
    }

    .recruitment-pipeline-lane::-webkit-scrollbar-track {
        background: #e2e8f0;
        border-radius: 999px;
    }

    .recruitment-pipeline-lane::-webkit-scrollbar-thumb {
        background: #94a3b8;
        border-radius: 999px;
    }

    .recruitment-pipeline-lane::before {
        left: 1rem;
        right: 1rem;
        top: 50%;
        bottom: auto;
        width: auto;
        height: 2px;
    }

    .recruitment-pipeline-lane .step-item {
        flex: 0 0 11.25rem;
        max-width: 11.25rem;
        position: relative;
    }

    .recruitment-pipeline-lane .step-item.step-item-editing {
        flex-basis: 45rem;
        max-width: 45rem;
    }

    .recruitment-pipeline-lane .step-item::after,
    .recruitment-pipeline-lane .step-item::before {
        content: none;
    }

    .recruitment-pipeline-step-arrow {
        flex: 0 0 1.65rem;
        align-self: stretch;
    }

    .recruitment-pipeline-step-arrow::before {
        left: 0;
        right: 0;
        top: 50%;
        bottom: auto;
        width: auto;
        height: 2px;
    }

    .recruitment-pipeline-step-arrow-icon {
        transform: rotate(0deg);
    }

    .step-monitoring-toolbar {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .step-monitoring-filters {
        flex-direction: row;
        align-items: center;
    }

    .step-monitoring-filters .step-monitoring-search {
        width: 13rem;
    }

    .step-monitoring-filters .step-monitoring-action-filter {
        width: 11rem;
    }
}

/* Interview slots modal (admin) */
#interviewSlotsModal .modal-dialog.modal-dialog-scrollable {
    height: calc(100% - 1rem);
}

#interviewSlotsModal .modal-dialog-scrollable .modal-content {
    max-height: 100%;
}

#interviewSlotsModal .modal-content {
    border-radius: 0.75rem;
    overflow: hidden;
}

#interviewSlotsModal .modal-body {
    background: #f8fafc;
    padding: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    max-height: calc(100vh - 8rem);
}

#interviewSlotsModal .interview-slots-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid #dbe3ee;
    background: #fff;
}

#interviewSlotsModal .interview-slots-summary {
    width: 100%;
}

#interviewSlotsModal .interview-slots-summary-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1.1fr) minmax(300px, 1fr);
    gap: 0.6rem;
    align-items: stretch;
}

#interviewSlotsModal .interview-slots-insight {
    display: grid;
    grid-template-columns: auto minmax(190px, 1fr);
    gap: 0.75rem;
    width: 100%;
    border: 1px solid #dbe3ee;
    border-radius: 0.65rem;
    background: #fff;
    padding: 0.52rem 0.66rem;
}

#interviewSlotsModal .interview-slots-insight-main {
    display: grid;
    gap: 0.12rem;
    align-content: center;
}

#interviewSlotsModal .interview-slots-insight-label {
    color: #64748b;
    font-size: 0.62rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1;
}

#interviewSlotsModal .interview-slots-insight-main strong {
    color: #111827;
    font-size: 1.35rem;
    font-weight: 900;
    line-height: 1;
}

#interviewSlotsModal .interview-slots-insight-caption {
    color: #64748b;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1;
}

#interviewSlotsModal .interview-slots-insight-side {
    display: grid;
    gap: 0.36rem;
    align-content: center;
}

#interviewSlotsModal .interview-slots-meter {
    display: flex;
    height: 8px;
    border-radius: 999px;
    overflow: hidden;
    background: #e2e8f0;
}

#interviewSlotsModal .interview-slots-meter-open {
    background: #0f766e;
}

#interviewSlotsModal .interview-slots-meter-booked {
    background: #3f3d99;
}

#interviewSlotsModal .interview-slots-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 0.56rem;
}

#interviewSlotsModal .interview-slots-breakdown span {
    display: inline-flex;
    align-items: center;
    gap: 0.24rem;
    color: #475569;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1;
}

#interviewSlotsModal .interview-slots-breakdown i {
    width: 7px;
    height: 7px;
    border-radius: 999px;
}

#interviewSlotsModal .interview-slots-breakdown .is-open i {
    background: #0f766e;
}

#interviewSlotsModal .interview-slots-breakdown .is-booked i {
    background: #3f3d99;
}

#interviewSlotsModal .interview-slots-breakdown strong {
    color: #0f172a;
    font-weight: 900;
}

#interviewSlotsModal .interview-slots-estimator {
    display: grid;
    gap: 0.38rem;
    border: 1px solid #dbe3ee;
    border-radius: 0.65rem;
    background: #fff;
    padding: 0.52rem 0.66rem;
}

#interviewSlotsModal .interview-slots-estimator-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

#interviewSlotsModal .interview-slots-estimator-title {
    color: #3f3d99;
    font-size: 0.66rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1;
}

#interviewSlotsModal .interview-slots-estimator-meta {
    color: #64748b;
    font-size: 0.64rem;
    font-weight: 700;
}

#interviewSlotsModal .interview-slots-estimator-label {
    color: #374151;
    font-size: 0.64rem;
    font-weight: 800;
    line-height: 1;
}

#interviewSlotsModal .interview-slots-estimator-input-wrap .form-control {
    border-color: #dbe3ee;
    border-radius: 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.34rem 0.5rem;
}

#interviewSlotsModal .interview-slots-config-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.46rem;
}

#interviewSlotsModal .interview-slots-config-field {
    display: grid;
    gap: 0.2rem;
}

#interviewSlotsModal .interview-slots-config-field .form-control {
    border-color: #dbe3ee;
    border-radius: 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.34rem 0.5rem;
}

#interviewSlotsModal .interview-slots-config-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.45rem;
    flex-wrap: wrap;
}

#interviewSlotsModal .interview-slots-config-actions .btn {
    border-radius: 999px;
    font-weight: 800;
}

#interviewSlotsModal .interview-slots-config-feedback {
    display: inline-block;
    line-height: 1.2;
}

#interviewSlotsModal .interview-slots-estimator-feedback {
    border-radius: 0.5rem;
    padding: 0.4rem 0.48rem;
    font-size: 0.65rem;
    line-height: 1.3;
}

#interviewSlotsModal .interview-slots-estimator-feedback.is-muted {
    background: #f8fafc;
    border: 1px dashed #d6dee9;
    color: #64748b;
}

#interviewSlotsModal .interview-slots-estimator-feedback.is-success {
    background: #ecfdf5;
    border: 1px solid #bbf7d0;
    color: #166534;
}

#interviewSlotsModal .interview-slots-estimator-feedback.is-warning {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
}

#interviewSlotsModal .interview-slots-actions {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
}

#interviewSlotsModal .interview-slots-hint {
    color: #64748b;
    font-size: 0.68rem;
    font-weight: 700;
}

#interviewSlotsModal .interview-slots-scroll-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #fff;
    color: #1f2937;
}

#interviewSlotsModal .interview-slots-editor {
    padding: 0.68rem 0.9rem 0;
}

#interviewSlotsModal .interview-slots-editor-empty {
    border: 1px dashed #d6dee9;
    border-radius: 0.56rem;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.56rem 0.62rem;
}

#interviewSlotsModal .interview-slots-editor-panel {
    border: 1px solid #dbe3ee;
    border-radius: 0.56rem;
    background: #fff;
    padding: 0.56rem 0.62rem;
}

#interviewSlotsModal .interview-slots-editor-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.46rem;
}

#interviewSlotsModal .interview-slots-editor-heading {
    display: grid;
    gap: 0.14rem;
}

#interviewSlotsModal .interview-slots-editor-kicker {
    color: #64748b;
    font-size: 0.6rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

#interviewSlotsModal .interview-slots-editor-heading strong {
    color: #111827;
    font-size: 0.8rem;
    font-weight: 900;
    line-height: 1.15;
}

#interviewSlotsModal .interview-slots-editor-heading small {
    color: #6b7280;
    font-size: 0.64rem;
    line-height: 1.15;
}

#interviewSlotsModal .interview-slots-editor-grid {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
    gap: 0.52rem;
    align-items: end;
}

#interviewSlotsModal .interview-slots-editor-field .form-label {
    color: #5b6474;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1;
}

#interviewSlotsModal .interview-slots-editor-field .form-select,
#interviewSlotsModal .interview-slots-editor-field .form-control {
    border-color: #dbe3ee;
    font-size: 0.7rem;
}

#interviewSlotsModal .interview-slots-editor-actions {
    display: grid;
    gap: 0.3rem;
}

#interviewSlotsModal .interview-slots-editor-assignee {
    color: #475569;
    font-size: 0.63rem;
    font-weight: 700;
}

#interviewSlotsModal .interview-slots-editor-save {
    display: inline-flex;
    align-items: center;
    gap: 0.42rem;
}

#interviewSlotsModal .interview-slots-editor-save .btn {
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 800;
    padding: 0.24rem 0.68rem;
}

#interviewSlotsModal .interview-slots-calendar {
    overflow-x: auto;
    overflow-y: auto;
    max-height: clamp(280px, calc(100vh - 360px), 660px);
    padding: 0.7rem 0.9rem 1rem;
}

#interviewSlotsModal .interview-slots-calendar-strip {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.58rem;
    min-width: max-content;
}

#interviewSlotsModal .interview-slots-day-card {
    flex: 0 0 210px;
    max-width: 210px;
    border: 1px solid #dbe3ee;
    border-radius: 0.56rem;
    background: #fff;
    overflow: hidden;
}

#interviewSlotsModal .interview-slots-day-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.45rem;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
    padding: 0.56rem 0.62rem;
    font-size: 0.76rem;
    font-weight: 800;
    line-height: 1.2;
    color: #111827;
}

#interviewSlotsModal .interview-slots-day-heading small {
    color: #64748b;
    font-size: 0.58rem;
    font-weight: 700;
}

#interviewSlotsModal .interview-slots-day-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.45rem;
    max-height: clamp(300px, calc(86vh - 210px), 560px);
    overflow-y: auto;
    padding: 0.58rem;
}

#interviewSlotsModal .interview-slot-admin-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.08rem;
    min-height: 60px;
    border: 1px solid #cbd5e1;
    border-radius: 0.5rem;
    background: #f8fafc;
    color: #1f2937;
    text-align: center;
    padding: 0.38rem 0.26rem;
}

#interviewSlotsModal .interview-slot-admin-option.is-selected {
    border-color: #3f3d99;
    background: #eef2ff;
}

#interviewSlotsModal .interview-slot-admin-option.is-booked {
    background: #f1f5f9;
    border-style: dashed;
    color: #64748b;
}

#interviewSlotsModal .interview-slot-admin-time {
    color: #0f172a;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1.05;
}

#interviewSlotsModal .interview-slot-admin-state {
    color: #475569;
    font-size: 0.62rem;
    line-height: 1.1;
}

#interviewSlotsModal .interview-slot-admin-option.is-open .interview-slot-admin-state {
    color: #14532d;
    font-weight: 700;
}

#interviewSlotsModal .interview-slot-admin-option.is-booked .interview-slot-admin-state {
    color: #b91c1c;
    font-weight: 700;
}

#interviewSlotsModal .interview-slot-admin-assignee {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.58rem;
    color: #64748b;
}

@media (width <= 1199.98px) {
    #interviewSlotsModal .interview-slots-toolbar {
        flex-wrap: wrap;
        align-items: stretch;
    }

    #interviewSlotsModal .interview-slots-actions {
        width: 100%;
        justify-content: flex-end;
    }

    #interviewSlotsModal .interview-slots-summary-grid {
        grid-template-columns: 1fr;
    }

    #interviewSlotsModal .interview-slots-editor-grid {
        grid-template-columns: 1fr 1fr;
    }

    #interviewSlotsModal .interview-slots-editor-actions {
        grid-column: 1 / -1;
    }
}

@media (width <= 767.98px) {
    #interviewSlotsModal .interview-slots-toolbar {
        padding: 0.62rem 0.75rem;
    }

    #interviewSlotsModal .interview-slots-editor {
        padding: 0.62rem 0.75rem 0;
    }

    #interviewSlotsModal .interview-slots-editor-grid {
        grid-template-columns: 1fr;
    }

    #interviewSlotsModal .interview-slots-editor-actions {
        grid-column: auto;
    }

    #interviewSlotsModal .interview-slots-config-grid {
        grid-template-columns: 1fr;
    }

    #interviewSlotsModal .interview-slots-calendar {
        padding: 0.62rem 0.75rem 0.92rem;
    }

    #interviewSlotsModal .interview-slots-day-card {
        flex-basis: 220px;
        max-width: 220px;
    }

    #interviewSlotsModal .interview-slots-day-grid {
        grid-template-columns: 1fr;
        max-height: 430px;
    }
}


/* End applicants.css migrated styles */

#view_profile {
    --learner-profile-primary: var(--client-primary, #08245c);
    --learner-profile-primary-dark: var(--client-primary-dark, #061b3d);
    --learner-profile-accent: var(--client-accent, #5fa8dc);
    --learner-profile-surface: #f6f8fb;
    --learner-profile-border: #d8e0ec;
}

#view_profile .modal-content {
    background: var(--learner-profile-surface);
    border: 0;
}

#view_profile .modal-header {
    min-height: 78px;
    padding: 1rem 1.5rem;
    background: var(--primary-color);
    color: #fff;
    border: 0;
}

#view_profile .modal-title {
    display: flex;
    gap: .65rem;
    align-items: center;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0;
    color: #fff !important;
}

#view_profile .modal-title i,
#view_profile .modal-title span,
#view_profile .fa-times {
    color: #fff !important;
}

#view_profile .fa-times {
    display: inline-flex;
    width: 38px;
    height: 38px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    cursor: pointer;
}

#view_profile .modal-body {
    padding: 1.25rem;
}

.learner-profile-modal-shell {
    max-width: none;
    margin: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    overflow: visible;
}

.learner-profile-modal-banner {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 0 1.25rem 1rem;
    background: transparent;
    border-bottom: 0;
}

.learner-profile-modal-banner h5 {
    margin: 0;
    color: var(--learner-profile-primary-dark);
    font-weight: 800;
    letter-spacing: 0;
}

.learner-profile-modal-banner p {
    margin: .25rem 0 0;
    color: #5c6778;
    font-size: .85rem;
}

.learner-profile-modal-badge {
    /* Plain text (no pill) - the text takes the colour the badge used to fill with. */
    color: var(--learner-profile-primary);
    font-size: .8rem;
    font-weight: 700;
    white-space: nowrap;
}

#learner-registration-app,
#learner-profile-app.dashboard-forms {
    padding: 1.5rem 1.25rem;
}

#learner-registration-app + #learner-profile-app.dashboard-forms {
    padding-top: 0;
}

#learner-registration-app .row,
#learner-profile-app .learner-profile-grid {
    padding-inline: .25rem;
}

#learner-profile-app .learner-profile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem 1.5rem;
}

#learner-profile-app .learner-profile-field {
    min-width: 0;
}

#learner-registration-app .row > [class*="col-"],
#learner-profile-app .learner-profile-field {
    padding-inline: .75rem;
    margin-bottom: 1rem;
}

/* Keep long values (especially email addresses) inside the first column so
   they cannot overlap the aligned details in the second column. */
#learner-registration-app .row > .col-md-6 {
    min-width: 0;
}

#learner-registration-app .row > .col-md-6:first-child {
    padding-right: 1.5rem;
}

#learner-registration-app .row > .col-md-6:nth-child(2) {
    padding-left: 2.25rem;
}

#learner-registration-app .row > .col-md-6 p {
    overflow-wrap: anywhere;
    word-break: break-word;
}

#learner-profile-app label,
#learner-registration-app label,
#learner-profile-app .form-label {
    margin-bottom: .35rem;
    color: #253043;
    font-weight: 700;
    font-size: .85rem;
}

#learner-profile-app .form-control,
#learner-profile-app .form-select,
#learner-registration-app .form-control,
#learner-registration-app .form-select {
    min-height: 42px;
    border-radius: 8px;
    border-color: #cfd8e5;
    color: #1f2937;
    font-size: .9rem;
}

#learner-profile-app .form-control:focus,
#learner-profile-app .form-select:focus,
#learner-registration-app .form-control:focus,
#learner-registration-app .form-select:focus {
    border-color: var(--learner-profile-accent);
    box-shadow: 0 0 0 .2rem rgba(95, 168, 220, .22);
}

/* Keep the country list anchored to the field instead of allowing the
   browser's native select popup to grow leftward for long country names. */
#learner-profile-app .learner-country-select {
    position: relative;
    width: 100%;
}

#learner-profile-app .learner-country-select-toggle {
    display: block;
    width: 100%;
    overflow: hidden;
    padding-right: 2rem;
    text-align: left;
    white-space: nowrap;
    text-overflow: ellipsis;
    background-color: #fff;
    cursor: pointer;
}

#learner-profile-app .learner-country-options {
    position: absolute;
    z-index: 1050;
    top: calc(100% + .25rem);
    left: 0;
    width: 100%;
    max-height: 240px;
    overflow-y: auto;
    padding: .25rem 0;
    border: 1px solid #cfd8e5;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 .5rem 1rem rgba(15, 23, 42, .14);
}

#learner-profile-app .learner-country-option {
    display: block;
    width: 100%;
    padding: .45rem .75rem;
    border: 0;
    background: transparent;
    color: #1f2937;
    text-align: left;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

#learner-profile-app .learner-country-option:hover,
#learner-profile-app .learner-country-option.is-selected {
    background: #eef4ff;
}

#learner-profile-app .learner-document-upload {
    padding: .8rem;
    border: 1px dashed #b8c5d8;
    border-radius: 8px;
    background: #f9fbfe;
}

#learner-profile-app .learner-profile-actions .btn,
#learner-profile-app .btn.text-white {
    min-width: 92px;
    border-radius: 8px;
    background: var(--learner-profile-primary);
    border-color: var(--learner-profile-primary);
    font-weight: 700;
}

#learner-profile-app .learner-profile-actions .btn:hover,
#learner-profile-app .btn.text-white:hover {
    background: var(--learner-profile-primary-dark);
    border-color: var(--learner-profile-primary-dark);
}

@media (max-width: 768px) {
    #view_profile .modal-body {
        padding: .75rem;
    }

    .learner-profile-modal-banner {
        align-items: flex-start;
        flex-direction: column;
    }

    #learner-registration-app,
    #learner-profile-app.dashboard-forms {
        padding: 1rem;
    }

    #learner-registration-app .row > [class*="col-"],
    #learner-profile-app .learner-profile-field {
        padding-inline: .25rem;
    }

    #learner-registration-app .row > .col-md-6:first-child,
    #learner-registration-app .row > .col-md-6:nth-child(2) {
        padding-inline: .25rem;
    }

    #learner-profile-app .learner-profile-grid {
        grid-template-columns: 1fr;
    }
}

/* AI assessment modal styles */
:root {
    --ai-assessment-primary: #a90000;
    --ai-assessment-border: #d7dde5;
    --ai-assessment-text: #1f2937;
    --ai-assessment-muted: #64748b;
    --ai-assessment-field-bg: #eef2f6;
    --ai-assessment-shadow: rgba(15, 23, 42, 0.08);
}

#extract_question_paper_assessment_popup .extract-question-paper-close {
    opacity: 1 !important;
}

:is(#ai_assessment_popup, #ai_generated_assessment_popup) .ai-question-type-grid {
    display: grid;
    gap: 10px;
    grid-template-columns: 1fr;
}

:is(#ai_assessment_popup, #ai_generated_assessment_popup) .ai-question-type-card {
    background: #fff;
    border: 1px solid var(--ai-assessment-border);
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
    cursor: pointer;
    display: grid;
    gap: 5px;
    min-height: 92px;
    padding: 10px 12px;
    position: relative;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, opacity 0.15s ease;
}

:is(#ai_assessment_popup, #ai_generated_assessment_popup) .ai-question-type-card:hover {
    border-color: #b8c0cc;
    box-shadow: 0 4px 12px var(--ai-assessment-shadow);
}

:is(#ai_assessment_popup, #ai_generated_assessment_popup) .ai-question-type-card:not(.is-selected) {
    opacity: 0.76;
}

:is(#ai_assessment_popup, #ai_generated_assessment_popup) .ai-question-type-card.is-selected,
:is(#ai_assessment_popup, #ai_generated_assessment_popup) .ai-question-type-card:has(.ai-question-type-toggle:checked) {
    background: #fff8f8;
    border-color: var(--ai-assessment-primary);
    box-shadow: 0 0 0 2px rgba(169, 0, 0, 0.12);
}

:is(#ai_assessment_popup, #ai_generated_assessment_popup) .ai-question-type-header {
    align-items: center;
    cursor: pointer;
    display: grid;
    gap: 8px;
    grid-template-columns: 18px minmax(0, 1fr);
    margin: 0;
}

:is(#ai_assessment_popup, #ai_generated_assessment_popup) .ai-question-type-toggle {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}

:is(#ai_assessment_popup, #ai_generated_assessment_popup) .ai-question-type-check {
    align-items: center;
    border: 1px solid #9aa4b2;
    border-radius: 4px;
    display: flex;
    height: 18px;
    justify-content: center;
    width: 18px;
}

:is(#ai_assessment_popup, #ai_generated_assessment_popup) .ai-question-type-toggle:checked + .ai-question-type-check {
    background: var(--ai-assessment-primary);
    border-color: var(--ai-assessment-primary);
}

:is(#ai_assessment_popup, #ai_generated_assessment_popup) .ai-question-type-toggle:checked + .ai-question-type-check::after {
    color: #fff;
    content: "\2713";
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
}

:is(#ai_assessment_popup, #ai_generated_assessment_popup) .ai-question-type-title {
    color: var(--ai-assessment-text);
    font-size: 0.92rem;
    font-weight: 700;
    line-height: 1.2;
}

:is(#ai_assessment_popup, #ai_generated_assessment_popup) .ai-question-type-subtitle {
    color: var(--ai-assessment-muted);
    display: block;
    font-size: 0.75rem;
    line-height: 1.25;
}

:is(#ai_assessment_popup, #ai_generated_assessment_popup) .question-config-row {
    align-items: end;
    display: none;
    flex-wrap: nowrap;
    gap: 10px;
    justify-content: flex-start;
}

:is(#ai_assessment_popup, #ai_generated_assessment_popup) .ai-question-type-card.is-selected .ai-question-type-config,
:is(#ai_assessment_popup, #ai_generated_assessment_popup) .ai-question-type-card:has(.ai-question-type-toggle:checked) .ai-question-type-config {
    display: flex;
}

:is(#ai_assessment_popup, #ai_generated_assessment_popup) .question-config-field {
    align-items: stretch;
    display: flex;
    flex: 0 1 150px;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

:is(#ai_assessment_popup, #ai_generated_assessment_popup) .question-config-field label {
    color: var(--ai-assessment-text);
    font-size: 0.75rem;
    font-weight: 700;
    margin: 0;
    white-space: nowrap;
}

:is(#ai_assessment_popup, #ai_generated_assessment_popup) .ai-config-input {
    background: var(--ai-assessment-field-bg);
    border: 1px solid #cbd3dc;
    border-radius: 10px;
    color: var(--ai-assessment-text);
    font-size: 0.9rem;
    height: 34px;
    max-width: none;
    min-width: 0;
    padding: 4px 8px;
    text-align: left;
    width: 100%;
}

:is(#ai_assessment_popup, #ai_generated_assessment_popup) .ai-config-input:disabled {
    background: #eef2f7;
    cursor: not-allowed;
}

:is(#ai_assessment_popup, #ai_generated_assessment_popup) .ai-config-input::placeholder {
    color: #6b7280;
    opacity: 1;
}

@media (max-width: 768px) {
    :is(#ai_assessment_popup, #ai_generated_assessment_popup) .ai-question-type-config {
        gap: 10px;
    }
}

/* Mark register page styles moved from templates/new_ui/mark_register.html */
#mark-register-modal {
    z-index: 1060;
    overflow-y: auto;
}

.mark-register-modal-backdrop {
    z-index: 1055;
}

.mark-register-modal-dialog {
    width: min(1120px, calc(100vw - 2rem));
    max-width: min(1120px, calc(100vw - 2rem));
}

.mark-register-modal-content {
    border: 1px solid #e5e7eb;
    border-radius: 1.5rem;
    overflow: hidden;
    background: #fff;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.16);
}

.mark-register-modal-header {
    /* No radius here on purpose: .mark-register-modal-content already clips
       to border-radius: 1.5rem via overflow: hidden, so this and the pink
       card below just need to fill it edge-to-edge as plain rectangles and
       the parent rounds them off automatically - trying to match an inner
       radius to the outer one by hand is what caused the visible gap. */
    margin: 0;
    padding: 0;
    border: 0;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
}

.mark-register-modal-header-card {
    box-sizing: border-box;
    display: block;
    width: 100%;
    margin: 0;
    padding: 1rem;
    border: 0;
    border-radius: 0;
}

.mark-register-modal-header-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.mark-register-topline {
    font-size: 1.05rem;
    font-weight: 700;
}

.mark-register-modal-tabs-row {
    display: flex;
    justify-content: flex-start;
    margin-top: 0.85rem;
    padding: 0 1rem 0.85rem;
}

.mark-register-modal-tabs {
    gap: 0.5rem;
    margin-bottom: 0;
}

.mark-register-modal-tabs .nav-link {
    border: 0;
    border-bottom: 4px solid transparent;
    border-radius: 0;
    color: #111827;
    font-weight: 600;
    padding: 0.45rem 0.8rem 0.6rem;
    background: transparent;
}

.mark-register-modal-tabs .nav-link.active {
    border-bottom-color: var(--btn-outline-primary-bg, #f08f97);
    color: #111827;
}

.mark-register-modal-close {
    width: 2.1rem;
    height: 2.1rem;
    border: 0;
    border-radius: 0.8rem;
    background: var(--btn-outline-primary-bg, #f08f97);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.mark-register-modal-body {
    padding: 1rem;
}

.mark-register-modal-scroll-body {
    max-height: 75vh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.mark-register-field-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
}

.mark-register-filter-row .form-control,
.mark-register-filter-row .form-select {
    border-radius: 0.75rem;
}

.mark-register-filter-row input[disabled] {
    background: #fff;
    opacity: 1;
    color: #111827;
}

.mark-register-table {
    border-radius: 1rem;
    overflow: hidden;
}

.mark-register-table thead th {
    background: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
    font-weight: 700;
}

.mark-register-table tbody td {
  vertical-align: middle;
}

.mark-register-mobile-only {
  display: none;
}

/* Evaluation report learner results table */
.evaluation-report-page {
  --er-surface-1: #f8fafc;
  --er-surface-2: #ffffff;
  --er-border: #e2e8f0;
  --er-border-strong: #cbd5e1;
  --er-text-muted: #94a3b8;
  --er-text-secondary: #475569;
}

/* Practical results: the standalone shell leaves a wider gutter between
   the sidebar and the results card than it does at the card's right edge.
   Grow this page only toward the left so the existing right spacing stays
   unchanged. */
@media (min-width: 768px) {
  body.view-task-page .evaluation-report-page {
    margin-left: -2.5rem;
    margin-top: 0.0625rem !important;
    width: calc(100% + 2.5rem);
  }

  /* Skills Reports: expand only toward the sidebar so its left gutter
     matches the existing right gutter without moving the right edge. */
  body.skills-report-flush-sidebar .skills-reports-page {
    margin-left: -2.5rem;
    margin-top: -7px !important;
    width: calc(100% + 2.5rem);
  }

  /* Evaluation Report / Challenge Learners: grow only toward the sidebar so
     the left gutter matches the existing right gutter without moving the
     right edge. */
  body.skills-report-flush-sidebar .evaluation-report-page,
  body.skills-report-flush-sidebar .challenge-learners-page {
    margin-left: -2.5rem;
    margin-top: -7px !important;
    width: calc(100% + 2.5rem);
  }
}

/* Progress rubric: match the compact right gutter on the left without
   allowing the card to extend beneath the sidebar. The 0.75rem width
   increase offsets the reduction from the original 1rem left margin and
   therefore keeps the existing right edge fixed. */
@media (min-width: 768px) {
  body.progress-rubric-page .progress-rubric-shell {
    margin-left: 0.25rem !important;
    margin-top: -26px !important;
    width: calc(100% + 0.75rem);
    max-width: none;
  }

  /* Progress marks: size the outer page area beside the fixed sidebar instead
     of pushing the inner card underneath it. The sidebar starts 10px from the
     viewport edge and is 115px wide, so the content begins at 125px. */
  body.progress-marks-page .home-section {
    left: 125px !important;
    width: calc(100% - 125px) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.progress-marks-page .progress-marks-shell {
    margin-left: 0.25rem !important;
    margin-right: 0.5rem !important;
    margin-top: -26px !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: calc(100% - 0.75rem);
    max-width: 100%;
  }

  /* Purple title bar sitting directly on top of the Programmes card (same
     pattern as .practicals-content-header), instead of a separate rounded
     bar floating above a second white card. */
  .marks-programmes-header {
    min-height: 56px;
    margin: 0;
    padding: 10px 18px;
    background: var(--primary-color);
    color: #fff;
    border-top-left-radius: 1rem;
    border-top-right-radius: 1rem;
  }

  /* Detailed marks: keep the card clear of the fixed sidebar while leaving
     only a small, equal gutter at both edges of the content area. */
  body.progress-view-marks-page .home-section {
    left: 125px !important;
    width: calc(100% - 125px) !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.progress-view-marks-page .progress-view-marks-shell {
    margin-top: -26px !important;
    margin-left: 0.125rem !important;
    margin-right: 0.25rem !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: calc(100% - 0.375rem);
    max-width: 100%;
  }
}

/* Marks content fetched into the Assessments tab's Marks pane already sits
   right below the shared border-line divider (which provides its own top
   padding), so drop the standalone marks page's default top margin here to
   avoid a doubled gap above the Programmes header. */
#assessment-marks-root .programme-assessments-embed-wrapper {
  margin-top: 0 !important;
}

.evaluation-report-page .evaluation-report-table-card {
  background: #ffffff;
  border: 0.5px solid var(--er-border);
}

.evaluation-report-page .er-report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.evaluation-report-page .er-header-back-btn {
  background: #ffffff;
  color: var(--primary-color);
  border: 0;
  font-weight: 600;
}

.evaluation-report-page .er-header-back-btn:hover,
.evaluation-report-page .er-header-back-btn:focus {
  background: #f1f5f9;
  color: var(--primary-color);
}

/* view_task page: every .btn is the standard btn-outline-primary btn-sm
   text-xxs (secondary-colour fill + primary-colour border, per client_theme
   tokens) with NO hover/focus/active shift. Overrides the shared
   .evaluation-report-page button styling (white header-back btn, the
   --primary-color modal "Close" btn, etc.). The bare `×` modal-close glyph
   (.er-modal-close, no .btn) is left alone. */
body.view-task-page .evaluation-report-page .btn,
body.view-task-page .evaluation-report-page .btn:hover,
body.view-task-page .evaluation-report-page .btn:focus,
body.view-task-page .evaluation-report-page .btn:active {
  background-color: var(--btn-outline-primary-bg, var(--primary-color, #3b0066)) !important;
  border: 1px solid var(--btn-outline-primary-border, var(--primary-color, #3b0066)) !important;
  color: var(--btn-outline-primary-text, #ffffff) !important;
  box-shadow: none !important;
}

/* content_creator/curriculum_view_content: every .btn in the viewer is the
   standard btn-outline-primary btn-sm text-xxs -- flat brand colour, no pill,
   no hover shift. Overrides the page's legacy per-breakpoint button rules
   (the mobile-back pill, the icon-only 2.35rem `.prev` square, the btn-primary
   CTAs). The bespoke code-challenge lab buttons (.cv-challenge-btn*,
   .cv-ada-*, no .btn class) are a separate designed sub-UI -- left alone. */
body.curriculum-view-content-page #curriculum-view-app .btn,
body.curriculum-view-content-page #curriculum-view-app .btn:hover,
body.curriculum-view-content-page #curriculum-view-app .btn:focus,
body.curriculum-view-content-page #curriculum-view-app .btn:active {
  background-color: var(--btn-outline-primary-bg, var(--primary-color, #3b0066)) !important;
  border: 1px solid var(--btn-outline-primary-border, var(--primary-color, #3b0066)) !important;
  color: var(--btn-outline-primary-text, #ffffff) !important;
  border-radius: 0.375rem !important;
  box-shadow: none !important;
}

body.curriculum-view-content-page #curriculum-view-app .cv-learning-actions-row .btn.prev {
  width: auto !important;
  min-width: 0 !important;
}

.evaluation-report-page .evaluation-report-table-card .card-body {
  padding: 0;
  background: var(--er-surface-2);
}

.evaluation-report-page .er-scroll-container {
  position: relative;
  overflow: hidden;
}

.evaluation-report-page .evaluation-report-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overflow-y: visible;
  -webkit-overflow-scrolling: touch;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: var(--er-border-strong) var(--er-surface-2);
}

.evaluation-report-page .evaluation-report-table-wrap::-webkit-scrollbar {
  height: 10px;
}

.evaluation-report-page .evaluation-report-table-wrap::-webkit-scrollbar-track {
  background: var(--er-surface-2);
  border-radius: 999px;
}

.evaluation-report-page .evaluation-report-table-wrap::-webkit-scrollbar-thumb {
  background: var(--er-border-strong);
  border-radius: 999px;
}

.evaluation-report-page #evaluation-report-table {
  min-width: 1220px;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0;
}

.evaluation-report-page #evaluation-report-table th,
.evaluation-report-page #evaluation-report-table td {
  vertical-align: middle;
  border: none;
  border-right: 1px solid var(--er-border);
}

.evaluation-report-page #evaluation-report-table th:last-child,
.evaluation-report-page #evaluation-report-table td:last-child {
  border-right: none;
}

.evaluation-report-page #evaluation-report-table tbody td {
  border-bottom: 1px solid var(--er-border);
}

.evaluation-report-page #evaluation-report-table tbody tr:last-child td {
  border-bottom: none;
}

.evaluation-report-page #evaluation-report-table td {
  padding: 9px 12px;
  color: #1e293b;
}

.evaluation-report-page #evaluation-report-table thead tr {
  background: var(--primary-color);
}

.evaluation-report-page #evaluation-report-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--primary-color);
  color: #fff;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.75rem 0.6rem;
}

.evaluation-report-page #evaluation-report-table tbody tr {
  background: var(--er-surface-2);
}

.evaluation-report-page #evaluation-report-table tbody tr:hover {
  background: var(--er-surface-1);
}

.evaluation-report-page .col-learner {
  position: sticky;
  left: 0;
  z-index: 3;
  min-width: 180px;
  width: 180px;
  border-right: 2px solid var(--er-border-strong);
  background: inherit;
}

.evaluation-report-page thead th.col-learner {
  background:var(--primary-color);
  z-index: 4;
}

.evaluation-report-page tbody td.col-learner {
  background: var(--er-surface-2);
}

.evaluation-report-page tbody tr:hover td.col-learner {
  background: var(--er-surface-1);
}

.evaluation-report-page .er-learner-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.evaluation-report-page .er-avatar {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--er-surface-1);
  color: #475569;
  font-size: 10px;
  font-weight: 700;
}

.evaluation-report-page .er-learner-name {
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
  white-space: nowrap;
}

.evaluation-report-page .er-col-status {
  min-width: 125px;
  width: 125px;
}

.evaluation-report-page .er-status-text {
  display: inline;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
}

.evaluation-report-page .er-status-completed {
  color: #047857;
}

.evaluation-report-page .er-status-in-progress {
  color: #7c2d12;
}

.evaluation-report-page .er-status-not-started {
  color: #64748b;
}

.evaluation-report-page .er-col-overall {
  min-width: 170px;
  width: 170px;
}

.evaluation-report-page .er-group-th {
  min-width: 210px;
  width: 210px;
}

.evaluation-report-page .er-skills-th {
  min-width: 280px;
  width: 280px;
}

.evaluation-report-page #evaluation-report-table td.er-skill-td {
  min-width: 280px;
  white-space: normal;
  vertical-align: top;
}

.evaluation-report-page .er-activity-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.evaluation-report-page .er-skill-tree {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  width: 100%;
}

.evaluation-report-page .er-not-assigned {
  font-style: italic;
  color: #94a3b8;
  font-size: 12px;
}

/* Skills column cell: a single collapsed header card + "View details" button.
   All hierarchy detail (mainskills/subskills) lives in the fetched
   Skills-detail modal, not inline in the table. */
.evaluation-report-page .spec-card {
  border: 1.5px solid #ddd6fe;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
}

.evaluation-report-page .spec-head {
  background: linear-gradient(135deg, #f3e8ff, #ede9fe);
  padding: 9px 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.evaluation-report-page .level-label {
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .05em;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--primary-color);
  color: #fff;
  flex-shrink: 0;
}

.evaluation-report-page .node-name {
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evaluation-report-page .crit-chips {
  display: flex;
  gap: 3px;
  flex-shrink: 0;
}

.evaluation-report-page .cc {
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
}

.evaluation-report-page .cc-c {
  background: #dbeafe;
  color: #1e40af;
}

.evaluation-report-page .cc-p {
  background: #d1fae5;
  color: #065f46;
}

.evaluation-report-page .cc-a {
  background: #ede9fe;
  color: #5b21b6;
}

.evaluation-report-page .score-num {
  font-size: 13px;
  font-weight: 800;
  color: #1e293b;
  flex-shrink: 0;
}

.evaluation-report-page .btn-view-more {
  margin-top: 4px;
}

/* Pass/Fail/Pending badges, reused inside the Skills-detail modal too */
.evaluation-report-page .s-pass {
  background: #d1fae5;
  color: #065f46;
  border-radius: 10px;
  padding: 2px 7px;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.evaluation-report-page .s-fail {
  background: #fee2e2;
  color: #991b1b;
  border-radius: 10px;
  padding: 2px 7px;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.evaluation-report-page .s-pend {
  background: #fef3c7;
  color: #92400e;
  border-radius: 10px;
  padding: 2px 7px;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

.evaluation-report-page .s-ns {
  background: #f1f5f9;
  color: #64748b;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 2px 7px;
  font-size: 9px;
  font-weight: 700;
  white-space: nowrap;
}

/* Skills-detail modal: a real Bootstrap modal (#skills-detail-modal is the
   .modal root, sized via .modal-lg on its .modal-dialog). Only the inner
   content styling is custom from here down. */
.evaluation-report-page .sd-modal-content {
  overflow: hidden;
}

.evaluation-report-page .modal-head {
  background: var(--primary-color);
  padding: 16px 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
}

.evaluation-report-page .sd-head-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.evaluation-report-page .sd-head-text {
  min-width: 0;
}

.evaluation-report-page .sd-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.evaluation-report-page .sd-learner-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.evaluation-report-page .sd-subtitle {
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.evaluation-report-page .sd-scope {
  display: inline-flex;
  max-width: 100%;
  margin-top: 6px;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evaluation-report-page .sd-head-side {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-shrink: 0;
}

.evaluation-report-page .sd-score-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
}

.evaluation-report-page .sd-overall-score {
  font-size: 26px;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}

.evaluation-report-page .sd-close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: rgba(255, 255, 255, 0.12);
  border: 0;
  border-radius: 6px;
  opacity: .8;
  padding: 7px;
}

.evaluation-report-page .sd-close:hover,
.evaluation-report-page .sd-close:focus {
  opacity: 1;
}

.evaluation-report-page .a-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: color-mix(in srgb, var(--primary-color) 8%, white);
  border-bottom: 1px solid color-mix(in srgb, var(--primary-color) 15%, white);
  flex-shrink: 0;
}

.evaluation-report-page .a-stat {
  padding: 10px;
  border-right: 1px solid color-mix(in srgb, var(--primary-color) 15%, white);
  text-align: center;
}

.evaluation-report-page .a-stat:last-child {
  border-right: none;
}

.evaluation-report-page .a-stat-lbl {
  font-size: 8px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 3px;
}

.evaluation-report-page .a-stat-val {
  font-size: 15px;
  font-weight: 800;
  color: var(--primary-color);
}

.evaluation-report-page .crit-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 14px;
  background: color-mix(in srgb, var(--primary-color) 6%, white);
  border-bottom: 1px solid color-mix(in srgb, var(--primary-color) 20%, white);
  flex-shrink: 0;
}

.evaluation-report-page .crit-row-label {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  margin-right: 4px;
}

.evaluation-report-page .modal-body {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  overflow-x: hidden;
  flex: 1 1 auto;
  min-height: 0;
  scrollbar-width: auto;
  scrollbar-color: var(--er-text-muted) var(--er-surface-1);
}

.evaluation-report-page .modal-body::-webkit-scrollbar {
  width: 14px;
}

.evaluation-report-page .modal-body::-webkit-scrollbar-track {
  background: var(--er-surface-1);
  border-radius: 999px;
}

.evaluation-report-page .modal-body::-webkit-scrollbar-thumb {
  background: var(--er-text-muted);
  border-radius: 999px;
  border: 3px solid var(--er-surface-1);
}

.evaluation-report-page .modal-body::-webkit-scrollbar-thumb:hover {
  background: var(--er-text-secondary);
}

.evaluation-report-page .ms-card {
  border: 1px solid color-mix(in srgb, var(--primary-color) 20%, white);
  border-radius: 10px;
  overflow: visible;
}

.evaluation-report-page .ms-card-head {
  background: color-mix(in srgb, var(--primary-color) 6%, white);
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: background .15s;
  user-select: none;
}

.evaluation-report-page .ms-card-head:hover {
  background: color-mix(in srgb, var(--primary-color) 10%, white);
}

.evaluation-report-page .ms-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary-color);
  flex-shrink: 0;
}

.evaluation-report-page .ms-name {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evaluation-report-page .skill-name-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.evaluation-report-page .skill-type-pill {
  flex-shrink: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary-color) 12%, white);
  color: var(--primary-color);
  padding: 2px 7px;
  font-size: 8px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
  white-space: nowrap;
}

.evaluation-report-page .ms-pct {
  font-size: 13px;
  font-weight: 800;
  color: #1e293b;
}

.evaluation-report-page .ms-chevron {
  font-size: 14px;
  color: #94a3b8;
  transition: transform .2s;
  flex-shrink: 0;
}

.evaluation-report-page .ms-chevron.open {
  transform: rotate(180deg);
}

.evaluation-report-page .ms-calc-btn {
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--primary-color) 10%, white);
  border: 1px solid color-mix(in srgb, var(--primary-color) 20%, white);
  color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  font-size: 13px;
  transition: background .15s;
}

.evaluation-report-page .ms-calc-btn:hover {
  background: color-mix(in srgb, var(--primary-color) 18%, white);
}

.evaluation-report-page .calc-wrap {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}

.evaluation-report-page .calc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 0;
  cursor: pointer;
  font-size: 20px;
  padding: 0;
  flex-shrink: 0;
}

.evaluation-report-page .calc-btn::after {
  display: none;
}

.evaluation-report-page .calc-btn-light {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.evaluation-report-page .calc-btn-light:hover {
  background: rgba(255, 255, 255, 0.3);
}

.evaluation-report-page .calc-popover {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 1060;
  width: 280px;
  max-width: min(280px, calc(100vw - 64px));
  background: #fff;
  color: #1e293b;
  border-radius: 8px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.22);
  padding: 10px 12px;
  font-size: 10.5px;
  line-height: 1.5;
  text-align: left;
  white-space: normal;
}

.evaluation-report-page .calc-popover[hidden] {
  display: none;
}

.evaluation-report-page .calc-popover-title {
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .03em;
  color: #94a3b8;
  margin-bottom: 4px;
}

.evaluation-report-page .calc-popover-line {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 2px 0;
  min-width: 0;
}

.evaluation-report-page .calc-popover-line span:first-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.evaluation-report-page .calc-popover-line span:last-child {
  flex-shrink: 0;
}

.evaluation-report-page .calc-popover-formula {
  margin-top: 6px;
  padding: 6px 8px;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 6px;
  font-family: 'Courier New', Consolas, monospace;
  font-size: 10px;
  font-weight: 700;
  color: #334155;
  word-break: break-word;
}

.evaluation-report-page .calc-popover-result {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px solid #e2e8f0;
  font-weight: 700;
  color: var(--primary-color);
}

.evaluation-report-page .ms-card-body {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 10px 14px;
  border-top: 1px solid color-mix(in srgb, var(--primary-color) 12%, white);
  background: #fff;
}

.evaluation-report-page .ms-card-body.open {
  display: flex;
}

.evaluation-report-page .ms-avg-note {
  font-size: 9px;
  font-style: italic;
  color: #94a3b8;
  margin-bottom: 4px;
}

.evaluation-report-page .ms-crit {
  display: flex;
  gap: 3px;
  margin-bottom: 6px;
}

.evaluation-report-page .ss-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.evaluation-report-page .ss-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--primary-color) 12%, white);
  background: #fff;
}

.evaluation-report-page .target-card .ms-card-body {
  display: flex;
}

.evaluation-report-page .activity-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.evaluation-report-page .activity-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  border-radius: 8px;
  border: 1px solid color-mix(in srgb, var(--primary-color) 12%, white);
  background: #fff;
}

.evaluation-report-page .activity-name {
  min-width: 0;
  color: #1e293b;
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evaluation-report-page .activity-pct {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 800;
}

.evaluation-report-page .ss-name {
  font-size: 12px;
  font-weight: 500;
  color: #1e293b;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.evaluation-report-page .ss-pct {
  font-size: 12px;
  font-weight: 800;
  color: var(--primary-color);
  flex-shrink: 0;
}

.evaluation-report-page .ss-bar {
  height: 4px;
  background: #e2e8f0;
  border-radius: 2px;
  overflow: hidden;
  margin: 2px 10px 0;
}

.evaluation-report-page .ss-bar-fill {
  height: 100%;
  border-radius: 2px;
}

.evaluation-report-page .modal-footer {
  padding: 12px 16px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-shrink: 0;
  background: #fff;
}

.evaluation-report-page .footer-note {
  font-size: 10px;
  color: #94a3b8;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.evaluation-report-page .sd-footer-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.evaluation-report-page .btn-export-pdf {
  background: var(--primary-color);
  color: #fff;
  border: 1px solid var(--primary-color);
  border-radius: 7px;
  padding: 7px 14px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}

.evaluation-report-page .btn-export-pdf:hover,
.evaluation-report-page .btn-export-pdf:focus {
  background: color-mix(in srgb, var(--primary-color) 85%, black);
  border-color: color-mix(in srgb, var(--primary-color) 85%, black);
  color: #fff;
}

.evaluation-report-page .sd-close-btn {
  background: var(--primary-color);
  color: #fff;
  border: none;
  border-radius: 7px;
  padding: 7px 16px;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.evaluation-report-page .badge-pass {
  background: #d1fae5;
  color: #065f46;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.evaluation-report-page .badge-fail {
  background: #fee2e2;
  color: #991b1b;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

.evaluation-report-page .badge-pend {
  background: #fef3c7;
  color: #92400e;
  border-radius: 20px;
  padding: 3px 10px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}

/* .cc-c/.cc-p/.cc-a are shared with the main results table's SKILLS
   column, so they're overridden here scoped to the Skills-detail modal
   only, rather than changed at the base rule. */
.evaluation-report-page .sd-modal-content .cc-c {
  background: #dbeafe;
  color: #1e40af;
}

.evaluation-report-page .sd-modal-content .cc-p {
  background: #d1fae5;
  color: #065f46;
}

.evaluation-report-page .sd-modal-content .cc-a {
  background: color-mix(in srgb, var(--primary-color) 12%, white);
  color: var(--primary-color);
}

.evaluation-report-page .er-pill {
  display: inline-block;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  background: var(--er-surface-1);
  border: 1px solid var(--er-border);
  border-left: 3px solid transparent;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 11px;
  color: #1e293b;
}

.evaluation-report-page .er-pill-item-course {
  border-left-color: #93c5fd;
}

.evaluation-report-page .er-pill-item-assessment {
  border-left-color: #c4b5fd;
}

.evaluation-report-page .er-pill-item-practical {
  border-left-color: #6ee7b7;
}

.evaluation-report-page .er-more-btn {
  flex-shrink: 0;
}

.evaluation-report-page .er-overall-cell {
  display: flex;
  align-items: center;
  gap: 5px;
}

.evaluation-report-page .er-overall-score {
  font-weight: 600;
  font-size: 12px;
}

.evaluation-report-page .er-overall-score-empty {
  font-weight: 400;
  color: var(--er-text-muted);
}

.evaluation-report-page .er-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
}

.evaluation-report-page .er-modal-overlay:not([hidden]) {
  display: flex;
}

.evaluation-report-page .er-modal-box {
  background: #fff;
  border-radius: 12px;
  width: 420px;
  max-width: calc(100% - 32px);
  max-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.evaluation-report-page .er-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--primary-color);
  color: #fff;
  padding: 14px 16px;
}

.evaluation-report-page .er-modal-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 13px;
}

.evaluation-report-page .er-modal-close {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.evaluation-report-page .er-modal-body {
  padding: 12px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.evaluation-report-page .er-modal-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--er-border);
  border-radius: 8px;
  padding: 8px 10px;
}

.evaluation-report-page .er-modal-item-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.evaluation-report-page .er-modal-item-name {
  font-weight: 500;
  font-size: 12px;
  color: #1e293b;
}

.evaluation-report-page .er-modal-item-subtitle {
  font-size: 11px;
  color: var(--er-text-muted);
}

/* "How is this calculated?" modal content */
.evaluation-report-page .er-calc-detail {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.evaluation-report-page .er-calc-heading {
  font-size: 13px;
  font-weight: 700;
  color: #1e293b;
}

.evaluation-report-page .er-calc-subheading {
  font-size: 11px;
  font-weight: 600;
  color: #5b21b6;
  margin-top: 4px;
}

.evaluation-report-page .er-calc-item-row {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--er-border);
  border-radius: 6px;
  padding: 5px 8px;
}

.evaluation-report-page .er-calc-item-name {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
  color: #334155;
}

.evaluation-report-page .er-calc-item-score {
  font-size: 11px;
  font-weight: 700;
  color: #475569;
  white-space: nowrap;
}

.evaluation-report-page .er-calc-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
  padding-top: 6px;
  border-top: 1px dashed var(--er-border);
}

.evaluation-report-page .er-calc-row-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--er-text-muted);
  flex-shrink: 0;
}

.evaluation-report-page .er-calc-row-value {
  flex: 1;
  min-width: 0;
  font-size: 11px;
  color: #1e293b;
}

.evaluation-report-page .er-calc-empty {
  font-size: 11px;
  font-style: italic;
  color: #94a3b8;
}

.evaluation-report-page .er-calc-note,
.evaluation-report-page .er-calc-reason {
  font-size: 11px;
  color: var(--er-text-muted);
  line-height: 1.4;
}

.evaluation-report-page .er-modal-footer {
  padding: 12px 16px;
  border-top: 1px solid var(--er-border);
  text-align: right;
}

.evaluation-report-page .er-modal-close-btn {
  background: var(--primary-color);
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.evaluation-report-page .badge {
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 500;
}

.evaluation-report-page .er-badge-completed {
  background: #d1fae5;
  color: #065f46;
}

.evaluation-report-page .er-badge-not-started {
  background: #f1f5f9;
  border: 0.5px solid #cbd5e1;
  color: #64748b;
}

.evaluation-report-page .er-badge-pending {
  background: #fef3c7;
  color: #92400e;
}

.evaluation-report-page .er-badge-failed {
  background: #fee2e2;
  color: #991b1b;
}

.evaluation-report-page .er-badge-in-progress {
  background: #ede9fe;
  color: #5b21b6;
}

.evaluation-report-page .er-badge-pending-marking {
  background: #cffafe;
  color: #155e75;
}

/* Competency tier badges (0-20 Beginner / 21-40 Below Average / 41-60 Average /
   61-80 Above Average / 81-100 Excellent) -- see
   skill_management/services/competency_report.py:get_competency_tier. */
.evaluation-report-page .er-tier-badge {
  margin-left: 4px;
}

.evaluation-report-page .er-tier-beginner {
  background: #f1f5f9;
  color: #475569;
}

.evaluation-report-page .er-tier-below-average {
  background: #fee2e2;
  color: #991b1b;
}

.evaluation-report-page .er-tier-average {
  background: #fef3c7;
  color: #92400e;
}

.evaluation-report-page .er-tier-above-average {
  background: color-mix(in srgb, var(--primary-color) 15%, #fff);
  color: var(--primary-color);
}

.evaluation-report-page .er-tier-excellent {
  background: #d1fae5;
  color: #065f46;
}

.evaluation-report-page .er-tier-not-scored {
  background: #f1f5f9;
  border: 0.5px solid #cbd5e1;
  color: #64748b;
}

.evaluation-report-page .er-badge-withdrawn {
  background: #f1f5f9;
  border: 0.5px solid #cbd5e1;
  color: #64748b;
}

.evaluation-report-page .er-fade-left,
.evaluation-report-page .er-fade-right {
  position: absolute;
  top: 0;
  bottom: 10px;
  z-index: 5;
  width: 34px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.evaluation-report-page .er-fade-left {
  left: 0;
  background: linear-gradient(90deg, var(--er-surface-2), transparent);
}

.evaluation-report-page .er-fade-right {
  right: 0;
  background: linear-gradient(270deg, var(--er-surface-2), transparent);
}

.evaluation-report-page .er-fade-left.is-visible,
.evaluation-report-page .er-fade-right.is-visible {
  opacity: 1;
}

@media (max-width: 767.98px) {
  .evaluation-report-page {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    margin-bottom: calc(23rem + env(safe-area-inset-bottom)) !important;
    box-sizing: border-box;
  }

  .evaluation-report-page .evaluation-report-table-card {
    width: 100%;
    max-width: 100%;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 1rem;
    box-sizing: border-box;
  }

  .evaluation-report-page .er-report-header {
    width: 100%;
    padding: 0.5rem 0.75rem;
    box-sizing: border-box;
  }

  .evaluation-report-page .evaluation-report-table-card .card-body > .alert {
    width: calc(100% - 2rem);
    margin: 1.5rem 1rem !important;
    box-sizing: border-box;
  }

  .evaluation-report-page #evaluation-report-table {
    min-width: 860px;
  }

  .evaluation-report-page .er-group-th,
  .evaluation-report-page .er-group-td {
    min-width: 210px;
    width: 210px;
  }
}

.mark-register-save-btn {
    border: 0;
    border-radius: 0.85rem;
    padding: 0.45rem 0.9rem;
    background: var(--btn-outline-primary-bg, #f08f97);
    color: #fff;
    font-weight: 600;
}

.mark-register-save-btn:hover,
.mark-register-save-btn:focus {
    background: var(--btn-outline-primary-hover-bg, #e87f89);
    color: #fff;
}

.mark-register-empty-state {
    background: #f8fafc;
    border: 1px dashed #d1d5db;
    border-radius: 0.85rem;
}

.mark-register-page-shell {
    position: relative;
    border: 1px solid var(--primary-color);
    border-radius: 1.75rem;
    overflow: hidden;
    background: #ffffff;
    box-shadow: 0 22px 55px rgba(15, 23, 42, 0.08);
    padding: clamp(0.875rem, 1vw, 1.25rem);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
}

.mark-register-page-shell #mark-register-app {
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    min-height: 0;
}

.mark-register-calendar-toolbar {
    gap: 0.75rem;
}

.mark-register-calendar-nav-group {
    min-width: 0;
}

.mark-register-calendar-help {
    flex: 1 1 auto;
}

.mark-register-calendar-grid {
    border-color: var(--primary-color) !important;
    border-radius: 1rem;
    overflow: hidden;
    padding: 0 !important;
}

.mark-register-calendar-weekdays,
.mark-register-calendar-days {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.mark-register-calendar-weekdays {
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
}

.mark-register-calendar-weekday {
    padding: 0.5rem 0.2rem;
    font-size: 0.82rem;
    line-height: 1.1;
    font-weight: 700;
    color: #111827;
    text-align: center;
}

.mark-register-calendar-day {
    min-height: clamp(4.75rem, 10vw, 7rem);
    padding: 0.45rem 0.2rem;
    background: #fff;
    cursor: pointer;
    overflow: hidden;
    border-right: 1px solid #e5e7eb;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 0.25rem;
}

.mark-register-calendar-day:nth-child(7n) {
    border-right: 0;
}

.mark-register-calendar-day:nth-child(-n + 7) {
    border-top: 0;
}

.mark-register-calendar-day.is-selected {
    background: rgba(240, 143, 151, 0.08);
}

.mark-register-calendar-day:not(.is-current-month) {
    color: #94a3b8;
}

.mark-register-calendar-day-number {
    min-height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mark-register-day-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    min-height: 1.75rem;
    padding: 0.1rem 0.4rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1;
}

.mark-register-calendar-day-count {
    line-height: 1;
}

.mark-register-calendar-day-count-btn {
    font-size: 0.68rem;
    padding: 0.1rem 0.35rem;
    border-radius: 999px;
}

.mark-register-calendar-day-actions {
    margin-top: auto;
}

.mark-register-calendar-day-action {
    min-width: 1.9rem;
    width: 1.9rem;
    height: 1.9rem;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.mark-register-action-group {
    width: 100%;
}

.mark-register-action-btn {
    flex: 1 1 11rem;
    min-width: 0;
}

.mark-register-save-row {
    width: 100%;
}

@media (min-width: 768px) {
    .mark-register-page-shell {
        width: 95%;
        max-width: 95%;
        margin: 0.35rem auto 0;
    }

    .mark-register-calendar-toolbar {
        gap: 0.75rem;
    }

    .mark-register-calendar-weekday {
        padding: 0.45rem 0.18rem;
        font-size: 0.8rem;
    }

    .mark-register-calendar-day {
        min-height: clamp(4.5rem, 9.5vw, 6.7rem);
        padding: 0.4rem 0.2rem;
        gap: 0.24rem;
    }

    .mark-register-day-pill {
        min-width: 1.7rem;
        min-height: 1.7rem;
        font-size: 0.86rem;
    }

    .mark-register-calendar-day-count-btn {
        font-size: 0.66rem;
        padding: 0.1rem 0.35rem;
    }

    .mark-register-calendar-day-action {
        width: 1.8rem;
        height: 1.8rem;
    }
}

@media (min-width: 768px) {
    /* Keep the programme mark register shell aligned with the assessment
       dashboard spacing, but only on the real register page. */
    body.mark-register-mobile-shell.programme-cards-medium-bootstrap .mark-register-page-shell {
        margin-top: -7px !important;
    }
}

@media (max-width: 767.98px) {
    /* Pin the greeting card to the viewport edge. As a fixed element it can
       otherwise retain its original document-flow offset and leave a white
       strip above it. */
    body.mark-register-mobile-shell .profile-menu.app-topnav {
        top: 0 !important;
        margin-top: 0 !important;
    }

    body.mark-register-mobile-shell .sidebar.sidebar-md {
        top: auto !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        height: auto !important;
        margin: 0 !important;
        z-index: 1040 !important;
    }

    body.mark-register-mobile-shell .sidebar.sidebar-md .orcaa-sidebar-container {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch;
    }

    body.mark-register-mobile-shell .sidebar.sidebar-md .orcaa-sidebar {
        width: max-content !important;
        min-width: 100% !important;
        max-width: none !important;
        height: auto !important;
        margin-top: 0 !important;
        padding-top: 0.12rem !important;
        padding-bottom: 0.12rem !important;
    }

    body.mark-register-mobile-shell .home-section,
    body.mark-register-mobile-shell .sidebar.active ~ .home-section {
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        padding-bottom: 5.2rem !important;
        overflow-x: hidden !important;
    }

    .mark-register-page-shell {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0.55rem auto 0 !important;
        border: 0;
        border-radius: 0;
        padding: 1.375rem;
        height: auto;
        min-height: calc(100dvh - var(--learner-mobile-fixed-top, 52px) - 5.2rem);
        max-height: none;
        overflow: visible;
        background: #f8f8fb;
        box-shadow: none;
    }

    body.mark-register-mobile-shell.programme-cards-medium-bootstrap .mark-register-page-shell {
        margin-top: 0 !important;
    }

    body.learner-mobile-bootstrap-ui .mark-register-page-shell #mark-register-app {
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 1rem;
    }

    .mark-register-app-shell {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        margin-left: auto;
        margin-right: auto;
        padding: 0 !important;
        box-sizing: border-box;
    }

    .mark-register-app-shell h3.h5 {
        font-size: 1.4rem;
        line-height: 1.15;
    }

    .mark-register-app-shell > .mb-3 > p {
        font-size: 1rem;
        line-height: 1.35;
    }

    .mark-register-calendar-toolbar {
        flex-direction: column;
        align-items: stretch;
    }

    .mark-register-calendar-shell {
        width: calc(100% - 0.5rem);
        max-width: calc(100% - 0.5rem);
        min-width: 0;
        margin-left: auto;
        margin-right: auto;
        box-sizing: border-box;
    }

    .mark-register-calendar-nav-group {
        width: 100%;
        justify-content: space-between;
        flex-wrap: nowrap !important;
        gap: 1rem !important;
    }

    .mark-register-calendar-nav-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 3.4rem;
        width: 3.4rem;
        height: 3.4rem;
        border: 0;
        border-radius: 0.9rem;
        background: var(--primary-color);
        color: #fff;
        font-size: 1.15rem;
        box-shadow: 0 0.35rem 0.8rem rgb(15 23 42 / 8%);
    }

    .mark-register-calendar-nav-btn:hover,
    .mark-register-calendar-nav-btn:focus,
    .mark-register-calendar-nav-btn:active {
        background: var(--primary-color);
        color: #fff;
    }

    .mark-register-calendar-month-label {
        flex: 1 1 auto;
        text-align: center;
        font-size: 1.3rem;
        font-weight: 800;
        color: #10022f;
    }

    .mark-register-calendar-help {
        width: 100%;
        text-align: left !important;
        margin-top: 0.4rem;
    }

    .mark-register-calendar-help small {
        font-size: 0.95rem;
    }

    .mark-register-calendar-grid {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        border: 1px solid #e5e7eb !important;
        border-radius: 1.2rem;
        box-shadow: 0 0.65rem 1.4rem rgb(15 23 42 / 8%);
        box-sizing: border-box;
    }

    .mark-register-calendar-weekdays,
    .mark-register-calendar-days,
    .mark-register-calendar-weekday,
    .mark-register-calendar-day {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .mark-register-calendar-weekday,
    .mark-register-calendar-day {
        overflow: hidden;
    }

    .mark-register-calendar-weekdays {
        background: color-mix(in srgb, var(--primary-color) 10%, #fff);
    }

    .mark-register-calendar-weekday {
        padding: 0.95rem 0.1rem;
        font-size: 0.9rem;
        color: #22005c;
    }

    .mark-register-calendar-day {
        min-height: 4.75rem;
        padding: 0.7rem 0.1rem 0.3rem;
        gap: 0.15rem;
    }

    .mark-register-day-pill {
        min-width: 2rem;
        min-height: 2rem;
        font-size: 0.95rem;
    }

    .mark-register-calendar-day-count-btn {
        font-size: 0.6rem;
        padding: 0.08rem 0.25rem;
    }

    .mark-register-calendar-day-actions {
        flex-direction: row;
        gap: 0.15rem !important;
        margin-top: 0 !important;
    }

    .mark-register-calendar-day-action {
        min-width: 1.5rem;
        width: 1.5rem;
        height: 1.5rem;
        border-radius: 0.35rem;
        font-size: 0.72rem;
    }

    .mark-register-action-group {
        flex-direction: row !important;
        gap: 0.65rem !important;
    }

    .mark-register-action-btn {
        flex: 1 1 0;
        width: auto;
        min-height: 2.4rem;
        border: 0;
        border-radius: 0.65rem;
        font-size: 0.76rem;
        font-weight: 700;
    }

    .mark-register-save-row {
        flex-direction: column;
        align-items: stretch !important;
    }

    .mark-register-save-btn {
        width: 100%;
    }

    #mark-register-modal .mark-register-modal-dialog {
        width: calc(100vw - 1.875rem);
        max-width: calc(100vw - 1.875rem);
        min-height: calc(100dvh - 0.875rem);
        margin: 0.4375rem auto;
        align-items: flex-start;
    }

    #mark-register-modal .mark-register-modal-content {
        max-height: calc(100dvh - 0.875rem);
        border: 0;
        border-radius: 1.25rem;
        box-shadow: 0 1.25rem 3rem rgb(15 23 42 / 20%);
    }

    #mark-register-modal .mark-register-modal-header-card {
        padding: 0.95rem;
        background: var(--primary-color) !important;
    }

    #mark-register-modal .mark-register-topline {
        min-width: 0;
        font-size: 1rem;
        line-height: 1.2;
    }

    #mark-register-modal .mark-register-topline strong,
    #mark-register-modal .mark-register-topline small {
        display: block;
    }

    #mark-register-modal .mark-register-topline small {
        margin: 0.28rem 0 0 !important;
        color: #fff !important;
        font-size: 0.7rem;
        font-weight: 600;
        opacity: 1;
    }

    #mark-register-modal .mark-register-modal-close {
        width: 2rem;
        height: 2rem;
        border-radius: 999px;
        background: rgb(255 255 255 / 16%);
        font-size: 1rem;
    }

    .mark-register-modal-header-top {
        flex-wrap: nowrap;
    }

    .mark-register-modal-tabs-row {
        margin-top: 0;
        padding: 0.35rem 0.95rem 0;
        border-bottom: 1px solid #e5e7eb;
    }

    .mark-register-modal-tabs {
        width: 100%;
        gap: 0.35rem;
    }

    .mark-register-modal-tabs .nav-link {
        padding: 0.55rem 0 0.5rem;
        border-bottom-width: 2px;
        font-size: 0.78rem;
        text-align: left;
    }

    #mark-register-modal .mark-register-modal-body {
        padding: 0.85rem 0.95rem 0.95rem;
        overflow-x: hidden;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    #mark-register-modal .mark-register-filter-row {
        --bs-gutter-y: 0.75rem;
        max-width: 100%;
        margin-bottom: 0.85rem !important;
        margin-left: 0;
        margin-right: 0;
        overflow-x: hidden;
    }

    #mark-register-modal .mark-register-field-label {
        margin-bottom: 0.32rem !important;
        font-size: 0.76rem;
        font-weight: 700;
    }

    #mark-register-modal .mark-register-filter-row .form-control,
    #mark-register-modal .mark-register-filter-row .form-select {
        display: block;
        width: 100%;
        max-width: 100%;
        min-width: 0;
        min-height: 2.45rem;
        border-color: #dfe3eb;
        border-radius: 0.65rem;
        padding-inline: 0.75rem;
        font-size: 0.78rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        box-sizing: border-box;
    }

    #mark-register-modal .mark-register-filter-row > [class*="col-"] {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding-left: 0;
        padding-right: 0;
    }

    #mark-register-modal .mark-register-filter-row .form-select {
        padding-right: 2.25rem;
        background-position: right 0.75rem center;
    }

    #mark-register-modal .mark-register-filter-row .form-select option {
        max-width: 100%;
        white-space: normal;
    }

    .mark-register-mobile-only {
        display: flex;
    }

    .mark-register-mobile-list-controls {
        flex-direction: column;
        align-items: stretch;
        gap: 0.55rem;
        margin: 1rem 0 0.7rem;
        color: #687086;
        font-size: 0.68rem;
    }

    .mark-register-mobile-list-controls > strong {
        color: #697087;
        font-size: 0.7rem;
        letter-spacing: 0.03em;
    }

    .mark-register-mobile-list-controls label {
        display: inline-flex;
        align-items: center;
        gap: 0.45rem;
    }

    .mark-register-mobile-table-controls-row {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
        width: 100%;
    }

    .mark-register-mobile-list-controls .form-select {
        width: 3.2rem;
        min-height: 1.9rem;
        padding: 0.15rem 1.25rem 0.15rem 0.45rem;
        border-radius: 0.45rem;
        font-size: 0.72rem;
    }

    #mark-register-modal .table-responsive {
        display: block;
        width: 100%;
        max-width: 100%;
        margin-bottom: 0 !important;
        border-radius: 0.65rem;
        overflow-x: scroll !important;
        overflow-y: hidden;
        box-shadow: inset 0 -4px 0 #e6e8ef;
        scrollbar-color: var(--primary-color) #e5e7eb;
        scrollbar-width: auto;
        -webkit-overflow-scrolling: touch;
    }

    #mark-register-modal .table-responsive::-webkit-scrollbar {
        height: 0.55rem;
    }

    #mark-register-modal .table-responsive::-webkit-scrollbar-track {
        border-radius: 999px;
        background: #e5e7eb;
    }

    #mark-register-modal .table-responsive::-webkit-scrollbar-thumb {
        border: 2px solid #e5e7eb;
        border-radius: 999px;
        background: var(--primary-color);
    }

    #mark-register-modal .mark-register-table {
        min-width: 40rem;
        border-radius: 0.65rem;
        font-size: 0.7rem;
    }

    #mark-register-modal .mark-register-table thead th {
        padding: 0.65rem 0.7rem;
        background: var(--primary-color);
        border-color: var(--primary-color);
        white-space: nowrap;
    }

    #mark-register-modal .mark-register-table tbody td {
        padding: 0.65rem 0.7rem;
        white-space: nowrap;
    }

    #mark-register-modal .mark-register-table .btn {
        border-radius: 999px;
        font-size: 0.65rem;
        padding: 0.25rem 0.55rem;
    }

    .mark-register-mobile-swipe-hint {
        padding: 0.15rem 0 0;
        color: #94a3b8;
        font-size: 0.62rem;
        text-align: right;
    }

    .mark-register-mobile-pagination {
        display: inline-flex;
        align-items: center;
        gap: 0.65rem;
        padding: 0;
        color: #697087;
        font-size: 0.64rem;
    }

    .mark-register-mobile-pagination button {
        border: 0;
        background: transparent;
        color: #6b7280;
        padding: 0;
        font-size: inherit;
    }

    .mark-register-mobile-pagination button:disabled {
        color: #a9adba;
    }

    .mark-register-mobile-pagination strong {
        color: #16013f;
        white-space: nowrap;
    }

    #mark-register-modal .mark-register-save-row {
        position: sticky;
        bottom: -0.95rem;
        z-index: 2;
        margin: 0.5rem -0.95rem -0.95rem;
        padding: 0.85rem 0.95rem 1.05rem;
        border-top: 1px solid #e5e7eb;
        background: #fff;
    }

    #mark-register-modal .mark-register-save-btn {
        min-height: 2.8rem;
        border-radius: 0.65rem;
        background: var(--primary-color);
        font-size: 0.85rem;
        font-weight: 800;
    }

.mark-register-page-shell {
    overflow: hidden;
}
}

/* ---------------- Assessment dashboard page shell ---------------- */
.assessment-dashboard-page {
  width: 100%;
}

.assessment-dashboard-page.assessment-dashboard-layout {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  margin-top: -3.5rem;
  padding-top: 0;
  width: 100%;
  box-sizing: border-box;
}

.assessment-dashboard-page.assessment-dashboard-layout > .assessment-dashboard-shell {
  flex: 1 1 0;
  min-width: 0;
  width: auto;
  margin-top: 0;
}

.assessment-dashboard-page .assessment-dashboard-shell {
  width: 100%;
  margin-top: 0;
  padding: 0 32px 32px;
  background: #ffffff;
  border: 1px solid rgba(232, 154, 157, 0.18);
  border-radius: 28px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.assessment-dashboard-page .assessment-dashboard-header {
  margin-bottom: 28px;
}

.assessment-dashboard-page .assessment-dashboard-header h1 {
  margin: 0 0 0.35rem;
  color: #333333;
  font-size: clamp(1.7rem, 2vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
}

.assessment-dashboard-page .assessment-dashboard-header p {
  margin: 0;
  color: #6C757D;
  font-size: 1rem;
  line-height: 1.5;
}

.assessment-dashboard-page .assessment-card-row {
  margin-top: 15px;
  margin-bottom: 28px;
}

.assessment-dashboard-page .assessment-feature-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 160px;
  padding: 18px;
  border-radius: 18px;
  background: linear-gradient(135deg, #F49AA0, #E86674);
  color: #ffffff;
  text-decoration: none;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 10px 22px rgba(232, 154, 157, 0.24);
  transition: all 0.3s ease;
}

.assessment-dashboard-page .assessment-feature-card:hover,
.assessment-dashboard-page .assessment-feature-card:focus-visible {
  transform: translateY(-5px);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(232, 154, 157, 0.32);
}

.assessment-dashboard-page .assessment-feature-card:focus-visible {
  outline: 2px solid rgba(232, 154, 157, 0.35);
  outline-offset: 3px;
}

.assessment-dashboard-page .assessment-feature-card.is-disabled {
  cursor: not-allowed;
  opacity: 0.68;
  pointer-events: none;
}

.assessment-dashboard-page .assessment-feature-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.assessment-dashboard-page .assessment-feature-card-icon {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 54px;
}

.assessment-dashboard-page .assessment-feature-card-icon .bi {
  color: #ffffff;
  font-size: 24px;
  line-height: 1;
}

.assessment-dashboard-page .assessment-feature-card-arrow {
  color: #ffffff;
  font-size: 21px;
  line-height: 1;
  margin-left: auto;
}

.assessment-dashboard-page .assessment-feature-card-copy {
  margin-top: auto;
  padding-top: 20px;
}

.assessment-dashboard-page .assessment-feature-card-copy h2 {
  margin: 0;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
}

.assessment-dashboard-page .assessment-feature-card-copy p {
  margin: 0.4rem 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: 12px;
  line-height: 1.45;
}

.assessment-dashboard-page #status_tab.status-tab {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.35rem 1.5rem;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  list-style: none;
}

.assessment-dashboard-page #status_tab.status-tab > .nav-item {
  margin: 0;
  flex: 0 0 auto;
}

.assessment-dashboard-page #status_tab .status-tab {
  margin: 0;
  padding: 0.35rem 0 0.7rem;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  color: #6C757D;
  font-size: 0.98rem;
  font-weight: 600;
  box-shadow: none;
}

.assessment-dashboard-page #status_tab .status-tab:hover,
.assessment-dashboard-page #status_tab .status-tab:focus-visible {
  color: #333333;
  background: transparent !important;
}

.assessment-dashboard-page #status_tab .status-tab.active {
  color: #333333 !important;
  border-bottom: 3px solid #E86674;
  background: transparent !important;
}

.assessment-dashboard-page .assessment-tabs-content {
  margin-top: 18px;
  min-height: 0;
  padding: 0;
  background: transparent;
}

.assessment-dashboard-page .assessment-table-shell {
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.04);
}

.assessment-dashboard-page .assessment-table-header {
  padding: 20px 20px 14px;
  border-bottom: 1px solid #eef1f4;
  background: #ffffff;
}

.assessment-dashboard-page .assessment-table-title {
  margin: 0;
  color: #333333;
  font-size: 1.15rem;
  font-weight: 700;
}

.assessment-dashboard-page .assessment-table-responsive {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.assessment-dashboard-page .assessment-table {
  margin-bottom: 0;
  min-width: 760px;
}

.assessment-dashboard-page .assessment-table thead th {
  background: var(--primary-color);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  border-bottom: 1px solid #dee2e6;
  white-space: nowrap;
}

.assessment-dashboard-page .assessment-table tbody td {
  color: #495057;
  vertical-align: middle;
}

.assessment-dashboard-page .assessment-empty-row td {
  padding: 2rem 1rem;
  color: #6C757D;
  text-align: center;
}

@media (max-width: 767.98px) {
  .assessment-dashboard-page.assessment-dashboard-layout {
    display: block;
    gap: 0;
    margin-top: 0;
    padding-top: 16px;
  }

  .assessment-dashboard-page .assessment-dashboard-shell {
    padding: 0 20px 20px;
  }

  .assessment-dashboard-page .assessment-card-row {
    margin-top: 15px;
    margin-bottom: 24px;
  }

  .assessment-dashboard-page #status_tab.status-tab {
    gap: 0.3rem 0.9rem;
  }

  .assessment-dashboard-page .assessment-table-header {
    padding: 18px 16px 12px;
  }

  .assessment-dashboard-page .assessment-table {
    min-width: 720px;
  }
}

#view_assessment_report_schedules_popup .assessment-report-schedules-dialog {
  width: min(1720px, calc(100vw - 2rem));
  max-width: calc(100vw - 2rem);
  margin: 1rem auto;
}

#view_assessment_report_schedules_popup .assessment-report-schedules-content {
  max-height: calc(100vh - 2rem);
  overflow: hidden;
}

#view_assessment_report_schedules_popup .assessment-report-schedules-body {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  padding: 1rem;
}

#view_assessment_report_schedules_popup .assessment-report-schedules-status {
  flex: 0 0 auto;
}

#view_assessment_report_schedules_popup .assessment-report-schedules-table-wrap {
  flex: 1 1 auto;
  min-height: 22rem;
  max-height: calc(100vh - 12rem);
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.35);
  border-radius: 0.5rem;
  background: #fff;
  scrollbar-gutter: stable both-edges;
}

#view_assessment_report_schedules_popup .assessment-report-schedules-table-wrap.has-assessment-report-datatable {
  overflow: hidden;
}

#view_assessment_report_schedules_popup .assessment-report-schedules-table {
  min-width: 1580px;
  table-layout: fixed;
  margin-bottom: 0;
}

#view_assessment_report_schedules_popup .assessment-report-schedules-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--primary-color);
  color: #fff;
  border-bottom: 1px solid rgba(148, 163, 184, 0.45);
  font-size: 0.68rem;
  line-height: 1.2;
  padding: 0.7rem 0.75rem;
  vertical-align: middle;
  white-space: nowrap;
}

#view_assessment_report_schedules_popup .assessment-report-schedules-table td {
  color: #334155;
  font-size: 0.68rem;
  line-height: 1.35;
  padding: 0.65rem 0.75rem;
  vertical-align: top;
  overflow-wrap: anywhere;
}

#view_assessment_report_schedules_popup .assessment-report-schedules-table th:nth-child(1),
#view_assessment_report_schedules_popup .assessment-report-schedules-table th:nth-child(2) {
  width: 12rem;
}

#view_assessment_report_schedules_popup .assessment-report-schedules-table th:nth-child(3),
#view_assessment_report_schedules_popup .assessment-report-schedules-table th:nth-child(6) {
  width: 6.5rem;
}

#view_assessment_report_schedules_popup .assessment-report-schedules-table th:nth-child(4),
#view_assessment_report_schedules_popup .assessment-report-schedules-table th:nth-child(5),
#view_assessment_report_schedules_popup .assessment-report-schedules-table th:nth-child(7),
#view_assessment_report_schedules_popup .assessment-report-schedules-table th:nth-child(8),
#view_assessment_report_schedules_popup .assessment-report-schedules-table th:nth-child(9) {
  width: 8.8rem;
}

#view_assessment_report_schedules_popup .assessment-report-schedules-table th:nth-child(10) {
  width: 14rem;
}

#view_assessment_report_schedules_popup .assessment-report-schedules-table th:nth-child(11) {
  width: 15rem;
}

#view_assessment_report_schedules_popup .assessment-report-schedules-table th:nth-child(12) {
  width: 16rem;
}

#view_assessment_report_schedules_popup .assessment-report-schedules-table td:nth-child(3),
#view_assessment_report_schedules_popup .assessment-report-schedules-table td:nth-child(4),
#view_assessment_report_schedules_popup .assessment-report-schedules-table td:nth-child(5),
#view_assessment_report_schedules_popup .assessment-report-schedules-table td:nth-child(6),
#view_assessment_report_schedules_popup .assessment-report-schedules-table td:nth-child(7),
#view_assessment_report_schedules_popup .assessment-report-schedules-table td:nth-child(8),
#view_assessment_report_schedules_popup .assessment-report-schedules-table td:nth-child(9) {
  white-space: nowrap;
}

#view_assessment_report_schedules_popup .assessment-report-schedules-table .badge {
  display: inline-flex;
  align-items: center;
  min-height: 1.35rem;
  padding: 0.28rem 0.55rem;
  line-height: 1;
}

#view_assessment_report_schedules_popup .dataTables_wrapper,
#view_assessment_report_schedules_popup .dt-container {
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  width: 100%;
  padding: 0.75rem;
}

#view_assessment_report_schedules_popup .assessment-report-schedules-dt-toolbar,
#view_assessment_report_schedules_popup .assessment-report-schedules-dt-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

#view_assessment_report_schedules_popup .assessment-report-schedules-dt-toolbar {
  margin-bottom: 0.65rem;
}

#view_assessment_report_schedules_popup .assessment-report-schedules-dt-footer {
  margin-top: 0.65rem;
}

#view_assessment_report_schedules_popup .dataTables_length,
#view_assessment_report_schedules_popup .dataTables_filter,
#view_assessment_report_schedules_popup .dataTables_info,
#view_assessment_report_schedules_popup .dataTables_paginate {
  color: #475569;
  font-size: 0.68rem;
}

#view_assessment_report_schedules_popup .dataTables_length label,
#view_assessment_report_schedules_popup .dataTables_filter label {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0;
  color: #475569;
  font-size: 0.68rem;
  font-weight: 700;
}

#view_assessment_report_schedules_popup .dataTables_length select,
#view_assessment_report_schedules_popup .dataTables_filter input {
  min-height: 1.85rem;
  border: 1px solid rgba(148, 163, 184, 0.7);
  border-radius: 0.35rem;
  color: #334155;
  font-size: 0.68rem;
}

#view_assessment_report_schedules_popup .dataTables_filter input {
  width: min(17rem, 48vw);
  padding: 0.25rem 0.5rem;
}

#view_assessment_report_schedules_popup .dataTables_scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden !important;
}

#view_assessment_report_schedules_popup .dataTables_scrollHead,
#view_assessment_report_schedules_popup .dt-scroll-head {
  flex: 0 0 auto;
}

#view_assessment_report_schedules_popup .dataTables_scrollBody,
#view_assessment_report_schedules_popup .dt-scroll-body {
  max-height: 52vh !important;
  overflow: auto !important;
  scrollbar-gutter: stable both-edges;
}

#view_assessment_report_schedules_popup .dataTables_scrollBody table,
#view_assessment_report_schedules_popup .dt-scroll-body table {
  min-width: 1580px;
}

#view_assessment_report_schedules_popup .dataTables_paginate .paginate_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.8rem;
  min-height: 1.8rem;
  margin-left: 0.2rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 0.35rem;
  color: #334155 !important;
  cursor: pointer;
}

#view_assessment_report_schedules_popup .dataTables_paginate .paginate_button.current,
#view_assessment_report_schedules_popup .dataTables_paginate .paginate_button:hover {
  background: #4f46e5;
  border-color: #4f46e5;
  color: #fff !important;
}

#view_assessment_report_schedules_popup .dataTables_paginate .paginate_button.disabled {
  opacity: 0.45;
  cursor: default;
}

@media (max-width: 991.98px) {
  #view_assessment_report_schedules_popup .assessment-report-schedules-dialog {
    width: 100%;
    max-width: 100%;
    margin: 0;
  }

  #view_assessment_report_schedules_popup .assessment-report-schedules-body {
    padding: 0.75rem;
  }

  #view_assessment_report_schedules_popup .assessment-report-schedules-table-wrap {
    max-height: calc(100vh - 9rem);
    border-radius: 0.35rem;
  }

  #view_assessment_report_schedules_popup .dataTables_wrapper,
  #view_assessment_report_schedules_popup .dt-container {
    padding: 0.6rem;
  }

  #view_assessment_report_schedules_popup .dataTables_scrollBody,
  #view_assessment_report_schedules_popup .dt-scroll-body {
    max-height: calc(100vh - 15rem) !important;
  }

  #view_assessment_report_schedules_popup .dataTables_filter input {
    width: min(100%, 15rem);
  }
}

/* Programme learner action menus must escape table/card clipping and later rows. */
body.programme-management-content-page .programme-table-card,
body.programme-management-content-page .programme-table-wrapper,
body.programme-management-content-page .programme-learners-table-wrapper,
body.programme-management-content-page .programme-people-table-wrapper,
body.view-programme-main-page .programme-learners-table-wrapper {
  overflow: visible !important;
}

body.programme-management-content-page .programme-people-table .programme-person-row,
body.view-programme-main-page .programme-people-table .programme-person-row {
  position: relative;
}

body.programme-management-content-page .programme-people-table .programme-person-row:has(.programme-learner-row-menu.show),
body.view-programme-main-page .programme-people-table .programme-person-row:has(.programme-learner-row-menu.show),
body.programme-management-content-page .programme-person-row.programme-learner-menu-open-row,
body.view-programme-main-page .programme-person-row.programme-learner-menu-open-row {
  z-index: 12040 !important;
}

body.programme-management-content-page .programme-learner-actions-cell,
body.view-programme-main-page .programme-learner-actions-cell {
  position: relative;
  overflow: visible !important;
}

body.programme-management-content-page .programme-learner-actions-cell:has(.programme-learner-row-menu.show),
body.view-programme-main-page .programme-learner-actions-cell:has(.programme-learner-row-menu.show),
body.programme-management-content-page .programme-learner-actions-cell.programme-learner-menu-open-cell,
body.view-programme-main-page .programme-learner-actions-cell.programme-learner-menu-open-cell {
  z-index: 12045 !important;
}

body.programme-management-content-page .programme-learner-manage-dropdown,
body.view-programme-main-page .programme-learner-manage-dropdown {
  position: relative;
  isolation: auto;
}

body.programme-management-content-page .programme-learner-manage-dropdown:has(.programme-learner-row-menu.show),
body.view-programme-main-page .programme-learner-manage-dropdown:has(.programme-learner-row-menu.show),
body.programme-management-content-page .programme-learner-manage-dropdown.programme-learner-menu-open,
body.view-programme-main-page .programme-learner-manage-dropdown.programme-learner-menu-open {
  z-index: 12050 !important;
}

body.programme-management-content-page .programme-learner-row-menu.show,
body.view-programme-main-page .programme-learner-row-menu.show,
.programme-learner-manage-menu {
  z-index: 12060 !important;
}

/* Skills Management (Specialization / Mainskill Category / Mainskill / Subskill) */
#programme-skills-management-pane {
  --border-strong: #cbd5e1;
  --surface-1: #f5f3fa;
  --text-muted: #94a3b8;
  --border: #e2e8f0;
}

/* Section header bar */
#programme-evaluations-panel .section-header {
  display: block;
  background: var(--primary-color);
  padding: 14px 20px;
}

#programme-evaluations-panel .section-header h2 {
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  margin: 0 0 2px;
}

#programme-evaluations-panel .section-header p {
  color: #c4b5fd;
  font-size: 12px;
  margin: 0;
}

/* Level 1 tabs (Skills Management / Skills Evaluations / Evaluations) — underline style */
#programme-evaluations-panel .nav-l1 {
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0;
  padding: 0 20px;
  border-bottom: 1px solid #e2e8f0;
  background: #fff;
  list-style: none;
}

#programme-evaluations-panel .nav-l1 .programme-content-tab {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  border: 0;
  background: transparent;
  border-bottom: 2px solid transparent;
  white-space: nowrap;
  transition: color 0.15s, border-color 0.15s;
}

#programme-evaluations-panel .nav-l1 .programme-content-tab::after {
  content: none;
}

#programme-evaluations-panel .nav-l1 .programme-content-tab:hover {
  color: var(--primary-color);
}

#programme-evaluations-panel .nav-l1 .programme-content-tab.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  font-weight: 700;
}

/* Level 2 sub-nav — pill style with a section label */
#programme-evaluations-panel .nav-l2-wrap {
  padding: 14px 20px 0;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}

#programme-evaluations-panel .nav-l2-label {
  font-size: 10px;
  font-weight: 600;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

#programme-evaluations-panel .nav-l2 {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding-bottom: 14px;
}

#programme-evaluations-panel .nav-l2 .nav-link {
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  color: #64748b;
  cursor: pointer;
  border-radius: 20px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  transition: all 0.15s;
  white-space: nowrap;
}

#programme-evaluations-panel .nav-l2 .nav-link:hover {
  color: var(--primary-color);
  border-color: #ddd6fe;
  background: #f3e8ff;
}

#programme-evaluations-panel .nav-l2 .nav-link.active {
  color: #fff;
  background: var(--primary-color);
  border-color: var(--primary-color);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(61, 15, 110, 0.25);
}

/* Content area below the nav bars */
#programme-evaluations-panel .section-tab-content {
  background: #fff;
}

/* Actual content areas (as opposed to the full-bleed nav-l1/nav-l2-wrap
   bars above them) get the "tab content" padding, so the nav bars can
   span the full card width while the content stays consistently inset. */
#programme-evaluations-panel #sm-sub-tabs-content.tab-content,
#programme-evaluations-panel #programme-skills-evaluations-pane,
#programme-evaluations-panel #programme-evaluations-overview-pane {
  padding: 20px 24px;
  background: #fff;
}

/* Toolbar / row buttons: visuals come from .btn.btn-outline-primary; these
   selectors only keep the icon+label alignment the standard button lacks. */
#programme-skills-management-pane .sm-btn-create,
#programme-skills-management-pane .sm-row-manage-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Toolbar: DataTables entries dropdown + search input */
#programme-skills-management-pane .dataTables_length select,
#programme-skills-management-pane .dataTables_filter input {
  border: 0.5px solid var(--border-strong);
  border-radius: 8px;
}

/* Table header */
#programme-skills-management-pane table thead th {
  background: var(--primary-color);
  color: #fff;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 0.5px solid rgba(255, 255, 255, 0.08);
}

/* Row numbers */
#programme-skills-management-pane .sm-mcat-name-cell {
  display: flex;
  align-items: center;
}

#programme-skills-management-pane .sm-row-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--surface-1);
  border: 0.5px solid var(--border-strong);
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 8px;
}

#programme-skills-management-pane .sm-mcat-name {
  font-weight: 500;
}

/* Criteria column pills */
#programme-skills-management-pane .sm-criteria-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

#programme-skills-management-pane .sm-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 20px;
  padding: 2px 8px;
  font-size: 10px;
  font-weight: 600;
}

#programme-skills-management-pane .sm-pill-c {
  background: #dbeafe;
  color: #1e40af;
}

#programme-skills-management-pane .sm-pill-p {
  background: #d1fae5;
  color: #065f46;
}

#programme-skills-management-pane .sm-pill-a {
  background: #ede9fe;
  color: #5b21b6;
}

.sm-create-item {
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.sm-create-criteria-panel {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #eef2f7;
}

.sm-create-criteria-title {
  margin-bottom: 6px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.sm-create-criteria-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.sm-create-criteria-grid label {
  margin: 0;
  color: #475569;
  font-size: 11px;
  font-weight: 700;
}

.sm-create-criteria-summary {
  margin-top: 8px;
  color: #334155;
  font-size: 11px;
}

@media (max-width: 576px) {
  .sm-create-criteria-grid {
    grid-template-columns: 1fr;
  }
}

/* Active for All column */
#programme-skills-management-pane .sm-active-yes {
  color: #065f46;
  font-weight: 600;
}

#programme-skills-management-pane .sm-active-no {
  color: #991b1b;
  font-weight: 600;
}

/* Action buttons: sticky right column */
#programme-skills-management-pane td.col-action,
#programme-skills-management-pane th.col-action {
  position: sticky;
  right: 0;
  background: #fff;
  border-left: 0.5px solid var(--border);
}

#programme-skills-management-pane table thead th.col-action {
  background: var(--primary-color);
}

#programme-skills-management-pane tbody tr:hover td.col-action {
  background: var(--surface-1);
}

#programme-skills-management-pane .sm-action-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* Only the "Manage" trigger is visible; the actual Edit/Criteria/Assign/
   Delete buttons stay in the DOM (so their existing click handlers keep
   working) and are opened via the floating dropdown instead. */
#programme-skills-management-pane .sm-action-btns > .sm-btn:not(.sm-row-manage-btn) {
  display: none;
}

#programme-skills-management-pane .sm-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 600;
  padding: 6px 12px;
}

#programme-skills-management-pane .sm-btn-manage {
  background: var(--primary-color);
  color: #fff;
}

#programme-skills-management-pane .sm-btn-manage:hover,
#programme-skills-management-pane .sm-btn-manage:focus {
  background: color-mix(in srgb, var(--primary-color) 86%, #000 14%);
  color: #fff;
}

#programme-skills-management-pane .sm-btn-edit,
#programme-skills-management-pane .sm-btn-criteria,
#programme-skills-management-pane .sm-btn-assign {
  background: var(--primary-color);
  color: #fff;
}

#programme-skills-management-pane .sm-btn-edit:hover,
#programme-skills-management-pane .sm-btn-edit:focus,
#programme-skills-management-pane .sm-btn-criteria:hover,
#programme-skills-management-pane .sm-btn-criteria:focus,
#programme-skills-management-pane .sm-btn-assign:hover,
#programme-skills-management-pane .sm-btn-assign:focus {
  background: color-mix(in srgb, var(--primary-color) 86%, #000 14%);
  color: #fff;
}

#programme-skills-management-pane .sm-btn-delete {
  background: var(--red-primary);
  color: #fff;
  border: 0;
}

#programme-skills-management-pane .sm-btn-delete:hover,
#programme-skills-management-pane .sm-btn-delete:focus {
  background: color-mix(in srgb, var(--red-primary) 86%, #000 14%);
  color: #fff;
}

/* Row hover */
#programme-skills-management-pane table tbody tr:hover td {
  background: var(--surface-1);
}

/* Pagination */
#programme-skills-management-pane .dataTables_paginate .paginate_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  border: 0.5px solid var(--border-strong);
  padding: 0;
}

#programme-skills-management-pane .dataTables_paginate .paginate_button.current,
#programme-skills-management-pane .dataTables_paginate .paginate_button.current:hover {
  background: #3d0f6e !important;
  color: #fff !important;
  border-color: #3d0f6e;
}

/* Mainskill table: horizontal scroll so the action column stays on one line */
#sm-mainskill-pane .table-responsive {
  overflow-x: auto;
}

#sm-mainskill-table {
  width: auto;
  min-width: 100%;
}

#sm-mainskill-table th,
#sm-mainskill-table td {
  white-space: nowrap;
}

#sm-mainskill-table .sm-action-btns {
  flex-wrap: nowrap;
}

#sm-mainskill-table th.col-action,
#sm-mainskill-table td.col-action {
  min-width: 110px;
}

#sm-mainskill-table .sm-criteria-pills {
  flex-wrap: nowrap;
}

#sm-mainskill-table th:nth-child(4),
#sm-mainskill-table td:nth-child(4) {
  min-width: 220px;
}

/* Skills Hierarchy column + read-only branch/tree modal */
#programme-skills-management-pane th.col-hierarchy,
#programme-skills-management-pane td.col-hierarchy {
  white-space: nowrap;
  min-width: 92px;
}

/* The raw "type:id" cell value is only a marker for the DataTables renderer;
   hide it (and only it) until the renderer swaps in the View button / dash. */
#programme-skills-management-pane td.col-hierarchy {
  visibility: hidden;
}

#programme-skills-management-pane td.col-hierarchy .btn,
#programme-skills-management-pane td.col-hierarchy > span {
  visibility: visible;
}

.sm-h-tree-wrap {
  font-size: 12px;
}

.sm-h-tree,
.sm-h-tree ul {
  list-style: none;
  margin: 0;
  padding-left: 18px;
}

.sm-h-tree > .sm-h-item {
  padding-left: 0;
}

.sm-h-item {
  position: relative;
  padding: 3px 0;
}

.sm-h-tree ul > .sm-h-item::before {
  content: "";
  position: absolute;
  left: -11px;
  top: 14px;
  width: 9px;
  border-top: 1px solid #d9d3e6;
}

.sm-h-tree ul {
  border-left: 1px solid #d9d3e6;
}

.sm-h-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.sm-h-kind {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border-radius: 5px;
  padding: 1px 6px;
  white-space: nowrap;
}

.sm-h-kind-spec {
  background: #ede9fe;
  color: #5b21b6;
}

.sm-h-kind-ms {
  background: #dbeafe;
  color: #1e40af;
}

.sm-h-kind-ss {
  background: #dcfce7;
  color: #166534;
}

.sm-h-name {
  font-weight: 600;
  color: #1f2937;
}

.sm-h-item.sm-h-focus > .sm-h-row .sm-h-name {
  color: #6d28d9;
}

.sm-h-item.sm-h-focus > .sm-h-row .sm-h-name::after {
  content: " \25C0";
  color: #a78bfa;
  font-size: 10px;
}

.sm-h-empty {
  color: #9ca3af;
  font-style: italic;
  padding: 3px 0;
  list-style: none;
}

.sm-h-detail {
  list-style: none;
  padding: 4px 0 2px;
}

.sm-h-sub {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin: 2px 0 4px;
}

.sm-h-cc {
  font-size: 10px;
  font-weight: 600;
  border-radius: 5px;
  padding: 1px 6px;
}

.sm-h-cc-c { background: #dbeafe; color: #1e40af; }
.sm-h-cc-p { background: #fef3c7; color: #92400e; }
.sm-h-cc-a { background: #dcfce7; color: #166534; }

.sm-h-actgroup {
  margin: 2px 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: baseline;
}

.sm-h-actlabel {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  color: #6b7280;
  margin-right: 2px;
}

.sm-h-act {
  font-size: 11px;
  background: #f3f4f6;
  color: #374151;
  border-radius: 5px;
  padding: 1px 6px;
}

/* "View more" assigned-items trigger + modal */
#programme-skills-management-pane .sm-view-more-btn {
  background: #f3e8ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  margin-left: 4px;
}

.sm-list-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
}

.sm-list-modal-overlay:not([hidden]) {
  display: flex;
}

.sm-list-modal-box {
  background: #fff;
  border-radius: 12px;
  width: 380px;
  max-width: calc(100% - 32px);
  max-height: calc(100vh - 64px);
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.sm-list-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--primary-color);
  color: #fff;
  padding: 14px 16px;
  font-weight: 600;
  font-size: 13px;
}

.sm-list-modal-close {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.sm-list-modal-body {
  padding: 12px 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.sm-list-modal-item {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 12px;
  color: #1e293b;
}

.sm-list-modal-footer {
  padding: 12px 16px;
  border-top: 1px solid #e2e8f0;
  text-align: right;
}

.sm-list-modal-close-btn {
  background: var(--primary-color);
  color: #fff;
  border: 0;
  border-radius: 6px;
  padding: 6px 16px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

/* Skills Evaluations tab */
#programme-skills-evaluations-pane {
  --border-strong: #cbd5e1;
  --surface-1: #f5f3fa;
  --text-muted: #94a3b8;
}

/* Info banner */
#programme-skills-evaluations-pane .sm-eval-banner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: #e0f7fa;
  border: 0.5px solid #b2ebf2;
  border-radius: 10px;
  padding: 12px 16px;
}

#programme-skills-evaluations-pane .sm-eval-banner-icon {
  color: #0891b2;
  margin-top: 2px;
}

#programme-skills-evaluations-pane .sm-eval-banner-title {
  font-weight: 600;
  color: #0e7490;
}

#programme-skills-evaluations-pane .sm-eval-banner-subtitle {
  color: #155e75;
  font-size: 12px;
}

/* Section header */
#programme-skills-evaluations-pane .sm-eval-section-title {
  font-weight: 700;
}

#programme-skills-evaluations-pane .sm-eval-section-subtitle {
  color: var(--text-muted);
}

.programme-resource-empty-hint {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #f7f7f7;
  border: 1px solid #e4e4e4;
  border-radius: 8px;
  padding: 8px 10px;
  margin: 4px;
  font-size: 11px;
  line-height: 1.4;
  color: #5b5b5b;
}

.programme-resource-empty-hint-icon {
  color: #8a8a8a;
  margin-top: 1px;
  font-size: 12px;
}

.programme-resource-empty-hint-link {
  color: #2e2e2e;
  text-decoration: underline;
  font-weight: 600;
}

.programme-resource-empty-hint-link:hover {
  color: #000;
}

/* Assign Evaluation modal: error banner, placed right below "Assign To"
   so it's visible immediately after checking a type, without needing to
   scroll and without pushing the footer buttons off screen. */
.programme-assign-error-banner {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  background: #fee2e2;
  border: 1px solid #fca5a5;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 1rem;
  font-size: 12px;
  line-height: 1.4;
  color: #991b1b;
  text-align: left;
}

.programme-assign-error-icon {
  color: #dc2626;
  margin-top: 1px;
  font-size: 14px;
  flex-shrink: 0;
}

/* =========================================================================
   Assign Evaluation modal - simplified layout on a neutral grayscale surface.
   Surface/border/text tones are exposed as --par-* custom properties so a
   brand palette can be layered on top. Checks keep the pre-restyle blue and
   the header card / buttons keep the brand primary colour.
   ========================================================================= */
#programme_assign_evaluation_modal {
  --par-surface: #ffffff;
  --par-surface-subtle: #fafafa;
  --par-surface-hover: #f4f4f4;
  --par-selected-bg: #efefef;
  --par-selected-mark: #2e2e2e;
  --par-border: #e4e4e4;
  --par-border-strong: #c2c2c2;
  --par-text: #1f1f1f;
  --par-text-muted: #6c6c6c;
  /* The check colour the resource checkboxes used before the modal was
     restyled (Bootstrap default .form-check-input:checked). */
  --par-check: #0d6efd;
}

#programme_assign_evaluation_modal .modal-content {
  background: var(--par-surface);
}

#programme_assign_evaluation_modal .programme-assign-evaluation-modal-body {
  color: var(--par-text);
}

#programme_assign_evaluation_modal .programme-assign-section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--par-text-muted);
  margin-bottom: 8px;
}

/* --- "Assign To" chips --- */
#programme_assign_evaluation_modal .programme-assign-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#programme_assign_evaluation_modal .programme-assign-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  padding: 5px 13px;
  border: 1px solid var(--par-border);
  border-radius: 999px;
  background: var(--par-surface);
  font-size: 12px;
  color: var(--par-text);
  cursor: pointer;
  user-select: none;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

#programme_assign_evaluation_modal .programme-assign-chip:hover {
  background: var(--par-surface-hover);
}

#programme_assign_evaluation_modal .programme-assign-chip:has(.programme-assignment-type:checked) {
  background: var(--par-selected-bg);
  border-color: var(--par-selected-mark);
}

/* Layout only - the checkbox keeps its default (blue) checked + focus look. */
#programme_assign_evaluation_modal .programme-assign-chip .form-check-input {
  width: 14px;
  height: 14px;
  margin: 0;
  flex-shrink: 0;
  cursor: pointer;
}

/* --- "Select Resource" grouped list --- */
#programme_assign_evaluation_modal .programme-assign-resources-shell {
  border: 1px solid var(--par-border);
  border-radius: 10px;
  background: var(--par-surface);
  overflow: hidden;
}

#programme_assign_evaluation_modal .programme-resource-placeholder {
  padding: 14px 12px;
  font-size: 12px;
  color: var(--par-text-muted);
}

#programme_assign_evaluation_modal .programme-resource-group + .programme-resource-group {
  border-top: 1px solid var(--par-border);
}

#programme_assign_evaluation_modal .programme-resource-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 12px;
  background: var(--par-surface-subtle);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--par-text);
}

#programme_assign_evaluation_modal .programme-resource-group-count {
  font-weight: 600;
  color: var(--par-text-muted);
}

#programme_assign_evaluation_modal .programme-resource-group-items {
  padding: 4px;
}

#programme_assign_evaluation_modal .programme-resource-empty-row {
  padding: 8px 10px;
  font-size: 11px;
  color: var(--par-text-muted);
}

/* --- Clickable resource row --- */
#programme_assign_evaluation_modal .programme-resource-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 12px;
  color: var(--par-text);
  cursor: pointer;
  user-select: none;
  transition: background-color 0.12s ease;
}

#programme_assign_evaluation_modal .programme-resource-row:hover {
  background: var(--par-surface-hover);
}

#programme_assign_evaluation_modal .programme-resource-row:has(> .programme-resource-option:checked) {
  background: var(--par-selected-bg);
}

#programme_assign_evaluation_modal .programme-resource-option {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
  margin: 0;
}

#programme_assign_evaluation_modal .programme-resource-check {
  position: relative;
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--par-border-strong);
  border-radius: 5px;
  background: var(--par-surface);
  transition: background-color 0.12s ease, border-color 0.12s ease;
}

#programme_assign_evaluation_modal .programme-resource-option:checked ~ .programme-resource-check {
  background: var(--par-check);
  border-color: var(--par-check);
}

#programme_assign_evaluation_modal .programme-resource-option:checked ~ .programme-resource-check::after {
  content: "";
  position: absolute;
  left: 4.5px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid var(--par-surface);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

#programme_assign_evaluation_modal .programme-resource-option:focus-visible ~ .programme-resource-check {
  outline: 2px solid var(--par-check);
  outline-offset: 2px;
}

#programme_assign_evaluation_modal .programme-resource-name {
  flex: 1 1 auto;
  min-width: 0;
}

/* --- Footer (buttons keep their standard .btn-outline-primary styling) --- */
#programme_assign_evaluation_modal .modal-footer {
  border-top: 1px solid var(--par-border);
}

#programme-skills-evaluations-pane .sm-btn-create,
#programme-skills-evaluations-pane .sm-eval-btn-manage {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Table: horizontal scroll */
#programme-skills-evaluations-pane .table-responsive,
#practical-creation-pane .table-responsive {
  overflow-x: auto;
  scrollbar-width: thin;
}

/* Table sizing: wide, comfortable columns; scroll horizontally instead of
   wrapping/compressing content. */
#programme-skills-evaluations-table,
#tasks-table-all {
  width: auto;
  min-width: 100%;
}

#programme-skills-evaluations-table th,
#programme-skills-evaluations-table td,
#tasks-table-all th,
#tasks-table-all td {
  white-space: nowrap;
  padding: 10px 14px;
  border-right: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
}

#programme-skills-evaluations-table th:last-child,
#programme-skills-evaluations-table td:last-child,
#tasks-table-all th:last-child,
#tasks-table-all td:last-child {
  border-right: none;
}

#programme-skills-evaluations-table thead th,
#tasks-table-all thead th {
  border-bottom-width: 2px;
}

#programme-skills-evaluations-table th:nth-child(1),
#programme-skills-evaluations-table td:nth-child(1),
#tasks-table-all th:nth-child(1),
#tasks-table-all td:nth-child(1) {
  min-width: 180px;
}

#programme-skills-evaluations-table th:nth-child(2),
#programme-skills-evaluations-table td:nth-child(2) {
  min-width: 170px;
}

#programme-skills-evaluations-table th:nth-child(3),
#programme-skills-evaluations-table td:nth-child(3) {
  min-width: 220px;
}

#programme-skills-evaluations-table th:nth-child(4),
#programme-skills-evaluations-table td:nth-child(4) {
  min-width: 130px;
}

#programme-skills-evaluations-table th:nth-child(5),
#programme-skills-evaluations-table td:nth-child(5) {
  min-width: 100px;
}

#programme-skills-evaluations-table th:nth-child(6),
#programme-skills-evaluations-table td:nth-child(6),
#programme-skills-evaluations-table th:nth-child(7),
#programme-skills-evaluations-table td:nth-child(7) {
  min-width: 130px;
}

#programme-skills-evaluations-table th:nth-child(8),
#programme-skills-evaluations-table td:nth-child(8) {
  min-width: 80px;
}

#programme-skills-evaluations-table th:nth-child(9),
#programme-skills-evaluations-table td:nth-child(9) {
  min-width: 110px;
}

#programme-skills-evaluations-table th.col-action,
#programme-skills-evaluations-table td.col-action {
  min-width: 190px;
}

/* Table header */
#programme-skills-evaluations-table thead th,
#tasks-table-all thead th {
  background: var(--primary-color);
  color: #fff;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Evaluation column */
#programme-skills-evaluations-table .sm-eval-name,
#tasks-table-all .sm-eval-name {
  font-weight: 600;
  font-size: 13px;
}

/* Evaluating column: Specialization/Main Skill/Sub Skill label */
#programme-skills-evaluations-table .sm-eval-target-type {
  color: var(--primary-color);
  font-weight: 600;
}

/* Evaluating column pill */
#programme-skills-evaluations-table .sm-eval-pill {
  display: inline-flex;
  align-items: center;
  background: var(--primary-color);
  border: 0.5px solid #d8b4fe;
  border-radius: 20px;
  color: #6b21a8;
  font-size: 11px;
  padding: 3px 9px;
}

/* Assignments column */
#programme-skills-evaluations-table .sm-eval-assignments,
#tasks-table-all .sm-eval-assignments {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

#programme-skills-evaluations-table .sm-eval-assignment-row,
#tasks-table-all .sm-eval-assignment-row {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  white-space: nowrap;
}

#programme-skills-evaluations-table .sm-eval-assignment-type,
#tasks-table-all .sm-eval-assignment-type {
  color: var(--primary-color);
  font-weight: 700;
}

#programme-skills-evaluations-table .sm-eval-assignment-name,
#tasks-table-all .sm-eval-assignment-name {
  color: var(--text-secondary);
}

#programme-skills-evaluations-table .sm-eval-more-btn,
#tasks-table-all .sm-eval-more-btn {
  align-self: flex-start;
  background: #f3e8ff;
  color: #6d28d9;
  border: 1px solid #ddd6fe;
  border-radius: 6px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
}

/* Learners column pill */
#programme-skills-evaluations-table .sm-eval-learners-pill,
#tasks-table-all .sm-eval-learners-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #dbeafe;
  color: #1e40af;
  border-radius: 20px;
  font-size: 11px;
  padding: 3px 9px;
}

/* Dates column: single line, one consistent "DD Mon YYYY" format */
#programme-skills-evaluations-table .sm-eval-date {
  font-weight: 500;
}

/* Status column */
#programme-skills-evaluations-table .sm-eval-status,
#tasks-table-all .sm-eval-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-radius: 20px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 600;
}

#programme-skills-evaluations-table .sm-eval-status-active,
#tasks-table-all .sm-eval-status-active {
  background: #d1fae5;
  color: #065f46;
}

#programme-skills-evaluations-table .sm-eval-status-draft,
#tasks-table-all .sm-eval-status-draft {
  background: #fef3c7;
  color: #92400e;
}

#programme-skills-evaluations-table .sm-eval-status-closed,
#tasks-table-all .sm-eval-status-closed {
  background: #fee2e2;
  color: #991b1b;
}

/* Action buttons: sticky right column */
#programme-skills-evaluations-table td.col-action,
#programme-skills-evaluations-table th.col-action,
#tasks-table-all td.col-action,
#tasks-table-all th.col-action {
  position: sticky;
  right: 0;
  z-index: 1;
  background: #fff;
}

#programme-skills-evaluations-table thead th.col-action,
#tasks-table-all thead th.col-action {
  background: var(--primary-color);
  z-index: 2;
}

#programme-skills-evaluations-table tbody tr:hover td.col-action {
  background: var(--surface-1);
}

#programme-skills-evaluations-pane .sm-eval-action-btns {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 6px;
}

#programme-skills-evaluations-pane .sm-eval-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  border-radius: 7px;
  font-size: 11px;
  padding: 6px 13px;
}

#practical-creation-pane .sm-eval-btn-manage {
  background: var(--btn-outline-primary-bg, var(--primary-color));
  border-radius: 0.375rem;
  color: #fff;
}

#programme-skills-evaluations-pane .sm-eval-btn-report {
  background: var(--surface-1);
  border: 0.5px solid var(--border-strong);
  color: var(--text-secondary);
}

/* Row hover */
#programme-skills-evaluations-table tbody tr:hover td,
#tasks-table-all tbody tr:hover td {
  background: var(--surface-1);
}

/* Footer */
#programme-skills-evaluations-pane .sm-eval-footer-count {
  color: var(--text-muted);
  font-size: 12px;
}

/* Keep horizontal scroll working while never clipping the Manage dropdown
   vertically. Everything up the ancestor chain must stay non-clipping. */
#programme-skills-evaluations-pane .table-responsive,
#practical-creation-pane .table-responsive {
  overflow-x: auto !important;
  overflow-y: visible !important;
}

#programme-skills-evaluations-table tbody,
#programme-skills-evaluations-table tbody tr,
#tasks-table-all tbody,
#tasks-table-all tbody tr {
  overflow: visible;
}

#programme-skills-evaluations-table td.col-action,
#tasks-table-all td.col-action {
  overflow: visible;
}

/* Practicals "Practical Creation" table (all_practical_tasks.html) --
   5 columns instead of the Skill Evaluations table's 10, so its per-column
   min-widths differ and can't share the nth-child rules above. Everything
   else about its look reuses the shared #programme-skills-evaluations-*
   rules via the #tasks-table-all / #practical-creation-pane selectors
   threaded through them. */
#tasks-table-all th:nth-child(2),
#tasks-table-all td:nth-child(2) {
  min-width: 220px;
}

#tasks-table-all th:nth-child(3),
#tasks-table-all td:nth-child(3) {
  min-width: 130px;
}

#tasks-table-all th:nth-child(4),
#tasks-table-all td:nth-child(4) {
  min-width: 110px;
}

#tasks-table-all th.col-action,
#tasks-table-all td.col-action {
  min-width: 160px;
}

/* Floating "portal" dropdown menu (see floating_dropdown.js). Rendered
   into <body> with position: fixed, so it is intentionally global and not
   scoped to any one table. */
.floating-dropdown {
  position: fixed;
  z-index: 9999;
  background: #fff;
  border: 1px solid rgb(15 23 42 / 8%);
  border-radius: 1rem;
  box-shadow: 0 20px 40px rgb(15 23 42 / 18%);
  width: 260px;
  max-width: calc(100vw - 1rem);
  max-height: calc(100vh - 1rem);
  padding: 0.5rem;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.floating-dropdown.is-above {
  box-shadow: 0 20px 40px rgb(15 23 42 / 18%);
}

.dd-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.7rem 0.85rem;
  border: 0;
  border-radius: 0.85rem;
  background: transparent;
  font-size: 0.82rem;
  font-weight: 600;
  color: #1e293b;
  cursor: pointer;
  line-height: 1.25;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.dd-item:hover {
  background: #f8fafc;
  color: #111827;
}

.dd-item i {
  width: 1rem;
  flex: 0 0 1rem;
  font-size: 1rem;
  line-height: 1;
  color: #94a3b8;
}

.dd-item.danger {
  color: #991b1b;
}

.dd-item.danger i {
  color: #f87171;
}

.dd-item.danger:hover {
  background: rgb(220 53 69 / 8%);
  color: #b02a37;
}

.programme-subject-manage-cell {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.programme-manage-subject-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: flex-start;
  gap: 0.35rem;
  white-space: nowrap;
}

.programme-manage-subject-btn i {
  font-size: 0.9em;
}

@media (max-width: 768px) {
  .floating-dropdown {
    width: min(15.5rem, calc(100vw - 1rem));
    max-width: calc(100vw - 1rem);
    max-height: calc(100vh - 1rem);
    padding: 0.35rem;
    border-radius: 0.9rem;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.16);
  }

  .dd-item {
    padding: 0.48rem 0.6rem;
    font-size: 0.7rem;
    line-height: 1.1;
    gap: 0.5rem;
    border-radius: 0.7rem;
  }

  .dd-item i {
    width: 0.9rem;
    flex: 0 0 0.9rem;
    font-size: 0.9rem;
  }
}

/* Subject category badge (Core subject / Language / Life skills). Core and
   Language reuse the same green/orange status-color language already used
   for enrollment badges (see getEnrollmentStatusBadgeClass); Life skills
   ties to the tenant's --primary-color so it stays on-theme per client. */
.programme-subject-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.programme-subject-badge--core {
  background: color-mix(in srgb, #198754 16%, #fff 84%);
  color: #198754;
}

.programme-subject-badge--language {
  background: color-mix(in srgb, #fd7e14 18%, #fff 82%);
  color: #b35900;
}

.programme-subject-badge--life_skills {
  background: color-mix(in srgb, var(--primary-color) 18%, #fff 82%);
  color: var(--primary-color);
}

.programme-subject-badge--muted {
  background: #eef1f5;
  color: #94a3b8;
}

.programme-teacher-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border: none;
  border-radius: 999px;
  background: #eef2f7;
  color: #334155;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}

.programme-teacher-chip:hover,
.programme-teacher-chip:focus {
  background: color-mix(in srgb, var(--primary-color) 16%, #eef2f7 84%);
  color: var(--primary-color);
}

.programme-teacher-chip--unassigned {
  background: color-mix(in srgb, #000 14%, #fff 86%);
  color: #000;
}

.programme-teacher-chip--unassigned:hover,
.programme-teacher-chip--unassigned:focus {
  background: color-mix(in srgb, #000 22%, #fff 78%);
  color: #000;
}

.programme-learner-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, #198754 14%, #fff 86%);
  color: #198754;
  font-size: 12.5px;
  font-weight: 700;
}

.floating-select-shell {
  position: relative;
  display: block;
  width: 100%;
}

.floating-select-shell-inline {
  display: inline-block;
  width: auto;
}

.floating-select-overlay {
  position: absolute;
  inset: 0;
  cursor: pointer;
  background: transparent;
  z-index: 2;
}

.floating-select-shell:has(select:disabled) .floating-select-overlay {
  cursor: not-allowed;
  pointer-events: none;
}

/* Evaluation Management: hierarchy tree view */
#evaluation_management .eval-view-toolbar {
  display: flex;
  justify-content: flex-start;
  padding: 10px 14px 0;
}

#evaluation_management .toggle-btns {
  display: flex;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
}

#evaluation_management .toggle-btn {
  padding: 7px 14px;
  font-size: 12px;
  background: #fff;
  color: #64748b;
  border: none;
  cursor: pointer;
}

#evaluation_management .toggle-btn.active {
  background: var(--primary-color);
  color: #fff;
}

#evaluation_management .eval-tree-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 14px;
}

/* Tree connector lines */
#evaluation_management .tree-children {
  padding-left: 24px;
  position: relative;
}

#evaluation_management .tree-children::before {
  content: '';
  position: absolute;
  left: 12px;
  top: 0;
  bottom: 20px;
  width: 2px;
  background: #e2e8f0;
  border-radius: 1px;
}

#evaluation_management .tree-branch {
  position: relative;
  padding-top: 14px;
}

#evaluation_management .tree-branch::before {
  content: '';
  position: absolute;
  left: -12px;
  top: 24px;
  width: 12px;
  height: 2px;
  background: #e2e8f0;
}

/* Shared node structure */
#evaluation_management .tree-node-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
}

#evaluation_management .tree-toggle {
  flex-shrink: 0;
  width: 16px;
  background: transparent;
  border: 0;
  color: inherit;
  font-size: 12px;
  cursor: pointer;
}

#evaluation_management .tree-node-body {
  flex: 1;
  min-width: 0;
}

#evaluation_management .tree-node-title {
  font-weight: 600;
  font-size: 13px;
}

#evaluation_management .tree-node-sub {
  font-size: 11px;
  opacity: 0.75;
  margin-top: 2px;
}

#evaluation_management .tree-icon-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  font-size: 12px;
}

/* Evaluation (root) node */
#evaluation_management .tree-eval > .tree-node-header {
  background: linear-gradient(135deg, var(--primary-color), #6d28d9);
  border-radius: 10px;
  color: #fff;
}

#evaluation_management .tree-node-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

#evaluation_management .meta-chip {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 20px;
}

#evaluation_management .status-badge {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

/* Specialization node */
#evaluation_management .tree-specialization > .tree-node-header {
  background: #f3e8ff;
  border: 1.5px solid #ddd6fe;
  border-radius: 10px;
  color: #4c1d95;
}

#evaluation_management .spec-icon {
  background: #6d28d9;
  color: #fff;
}

/* Mainskill node */
#evaluation_management .tree-mainskill > .tree-node-header {
  background: #ede9fe;
  border: 1.5px solid #c4b5fd;
  border-radius: 9px;
  color: #4c1d95;
}

#evaluation_management .ms-icon {
  background: #7c3aed;
  color: #fff;
}

/* Activity nodes (Assessment/Course/Practical) */
#evaluation_management .tree-activity > .tree-node-header {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  margin-bottom: 6px;
}

#evaluation_management .tree-activity .tree-node-title {
  font-weight: 500;
  font-size: 12px;
  color: #1e293b;
}

#evaluation_management .act-icon {
  color: #fff;
}

#evaluation_management .act-assessment {
  background: #7c3aed;
}

#evaluation_management .act-course {
  background: #2563eb;
}

#evaluation_management .act-practical {
  background: #16a34a;
}

#evaluation_management .activity-status {
  flex-shrink: 0;
  background: #f1f5f9;
  color: #64748b;
  font-size: 10px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 20px;
  white-space: nowrap;
}

/* Criteria chips */
#evaluation_management .cc-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

#evaluation_management .cc-chip {
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
}

#evaluation_management .cc-c {
  background: #dbeafe;
  color: #1e40af;
}

#evaluation_management .cc-p {
  background: #d1fae5;
  color: #065f46;
}

#evaluation_management .cc-a {
  background: #ede9fe;
  color: #5b21b6;
}

/* Empty state nodes */
#evaluation_management .node-empty {
  font-size: 11px;
  color: #94a3b8;
  padding: 8px 10px;
}

#evaluation_management .node-empty-course,
#evaluation_management .node-empty-practical {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  border-radius: 8px;
  padding: 14px 10px;
}

#evaluation_management .node-empty-course {
  border: 1.5px dashed #bfdbfe;
  background: #f0f9ff;
}

#evaluation_management .node-empty-practical {
  border: 1.5px dashed #bbf7d0;
  background: #f0fdf4;
}

#evaluation_management .node-empty-title {
  font-weight: 600;
  font-size: 11px;
  color: #475569;
}

#evaluation_management .node-empty-subtitle {
  font-size: 10px;
  color: #94a3b8;
}

/* Section dividers inside mainskill children */
#evaluation_management .section-title {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0 6px;
  font-size: 10px;
  font-weight: 700;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

#evaluation_management .section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #e2e8f0;
}

/* Skills Reports page */
.skills-reports-page .sr-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.skills-reports-page .sr-title {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 2px;
}

.skills-reports-page .sr-breadcrumb {
  color: #fff;
  font-size: 11px;
  margin: 0;
}

.skills-reports-page .sr-header-back-btn {
  background: #ffffff;
  color: var(--primary-color);
  border: 0;
  font-weight: 600;
  flex-shrink: 0;
}

.skills-reports-page .sr-header-back-btn:hover,
.skills-reports-page .sr-header-back-btn:focus {
  background: #f1f5f9;
  color: var(--primary-color);
}

/* Tabs */
.skills-reports-page .sr-tabs {
  display: flex;
  border-bottom: 1px solid #e2e8f0;
  padding: 0 16px;
}

.skills-reports-page .sr-tab {
  padding: 12px 16px;
  font-size: 13px;
  font-weight: 500;
  color: #64748b;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  cursor: pointer;
}

.skills-reports-page .sr-tab.active {
  color: var(--primary-color);
  border-bottom-color: var(--primary-color);
  font-weight: 700;
}

.skills-reports-page .sr-tab:disabled {
  color: #cbd5e1;
  cursor: not-allowed;
}

.skills-reports-page .sr-tab-pane {
  padding: 16px;
}

.skills-reports-page .sr-coming-soon {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 60px 0;
  color: #94a3b8;
  font-size: 13px;
}

.skills-reports-page .sr-coming-soon i {
  font-size: 32px;
}

/* Filter bar */
.skills-reports-page .sr-filter-bar,
.skills-reports-page .sr-analysis-filters {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 14px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 16px;
}

.skills-reports-page .sr-filter-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.skills-reports-page .sr-filter-field label {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.skills-reports-page .sr-filter-field select,
.skills-reports-page .sr-filter-field input,
.skills-reports-page .sr-analysis-filters select {
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  min-width: 180px;
}

.skills-reports-page .sr-date-range {
  display: flex;
  align-items: center;
  gap: 6px;
}

.skills-reports-page .sr-date-range input {
  min-width: 130px;
}

.skills-reports-page .sr-generate-btn {
  background: var(--primary-color);
  color: #fff;
  border: 0;
  border-radius: 8px;
  padding: 8px 20px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.skills-reports-page .sr-generate-btn:disabled {
  background: #cbd5e1;
  cursor: not-allowed;
}

.skills-reports-page .sr-error {
  background: #fee2e2;
  color: #991b1b;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 12px;
  margin-bottom: 14px;
}

/* Learner info card */
.skills-reports-page .sr-learner-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 14px;
}

.skills-reports-page .sr-learner-avatar {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--primary-color);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  font-weight: 700;
}

.skills-reports-page .sr-learner-info {
  flex: 1;
  min-width: 0;
}

.skills-reports-page .sr-learner-name {
  font-size: 14px;
  font-weight: 700;
  color: #1e293b;
}

.skills-reports-page .sr-learner-meta {
  font-size: 11px;
  color: #64748b;
}

.skills-reports-page .sr-learner-overall {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.skills-reports-page .sr-learner-overall-score {
  font-size: 20px;
  font-weight: 700;
  color: #1e293b;
}

/* Summary chips */
.skills-reports-page .sr-summary-chips {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}

.skills-reports-page .sr-chip {
  flex: 1;
  text-align: center;
  border-radius: 10px;
  padding: 12px;
}

.skills-reports-page .sr-chip-value {
  font-size: 20px;
  font-weight: 700;
}

.skills-reports-page .sr-chip-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.skills-reports-page .sr-chip-total,
.skills-reports-page .sr-chip-pass,
.skills-reports-page .sr-chip-fail,
.skills-reports-page .sr-chip-pending {
  background: var(--primary-color);
  color: #fff;
}

/* Mainskill block */
.skills-reports-page .sr-mainskill-block {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 16px;
  overflow: hidden;
}

.skills-reports-page .sr-roster-wrap {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: 16px;
  overflow: hidden;
}

.skills-reports-page .sr-roster-table {
  margin-bottom: 0;
}

.skills-reports-page .sr-roster-table th,
.skills-reports-page .sr-roster-table td {
  padding: 10px 16px;
  vertical-align: middle;
}

.skills-reports-page .sr-mainskill-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--primary-color);
  color: #fff;
  padding: 11px 16px;
  border-radius: 10px 10px 0 0;
}

.skills-reports-page .sr-mainskill-title,
.skills-reports-page .sr-ai-analysis h4 {
  font-size: 13px;
  font-weight: 700;
}

.skills-reports-page .sr-mainskill-sub {
  font-size: 11px;
  color: #c4b5fd;
  margin-top: 2px;
}

.skills-reports-page .sr-mainskill-score-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.skills-reports-page .sr-mainskill-score {
  font-size: 16px;
  font-weight: 700;
}

.skills-reports-page .sr-mainskill-body {
  background: #fff;
  padding: 14px 16px;
}

/* Criteria progress bars */
.skills-reports-page .sr-criteria-wrap {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}

.skills-reports-page .crit-bar-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.skills-reports-page .crit-bar-head {
  font-size: 11px;
  font-weight: 600;
  color: #475569;
}

.skills-reports-page .crit-bar-track {
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}

.skills-reports-page .crit-bar-fill {
  height: 100%;
  border-radius: inherit;
}

.skills-reports-page .fill-c { background: #3b82f6; }
.skills-reports-page .fill-p { background: #10b981; }
.skills-reports-page .fill-a { background: #8b5cf6; }

/* Competency-tier badges + Score Distribution bars (Programme Report) --
   mirrors the same Coal/Bronze/Silver/Gold/Diamond scale used by the PDF
   exports (skill_management/services/competency_report.py:COMPETENCY_TIERS). */
.skills-reports-page .sr-tier-badge,
.skills-reports-page .sr-competency-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.skills-reports-page .sr-tier-beginner { background: #f1f5f9; color: #475569; }
.skills-reports-page .sr-tier-below-average { background: #fee2e2; color: #991b1b; }
.skills-reports-page .sr-tier-average { background: #fef3c7; color: #92400e; }
.skills-reports-page .sr-tier-above-average { background: #dbeafe; color: #1e40af; }
.skills-reports-page .sr-tier-excellent { background: #d1fae5; color: #065f46; }
.skills-reports-page .sr-tier-not-scored { background: #f1f5f9; color: #94a3b8; }

/* Team-based Programme Report: the evaluation-scope pill (Specialization /
   Main Skill / Sub Skill / Combination) on each Team Overview row, and the
   team-group header row above each team's block in the grouped Learner
   Roster. */
.skills-reports-page .sr-scope-pill,
.skills-reports-page .sr-analysis-chip {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.skills-reports-page .sr-scope-specialization { background: #dbeafe; color: #1e40af; }
.skills-reports-page .sr-scope-mainskill { background: #fef3c7; color: #92400e; }
.skills-reports-page .sr-scope-subskill { background: #d1fae5; color: #065f46; }
.skills-reports-page .sr-scope-combination { background: #ede9fe; color: #5b21b6; }
.skills-reports-page .sr-scope-no_data { background: #f1f5f9; color: #94a3b8; }

.skills-reports-page .sr-team-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: var(--primary-color);
  color: #fff;
  padding: 11px 16px;
  border-radius: 10px 10px 0 0;
  font-size: 13px;
  font-weight: 700;
  margin-top: 16px;
}

/* Strengths / Outstanding-to-complete narrative boxes (Programme Report) --
   on-screen equivalents of the PDF export's .strengths-box/.recommendation-box. */
.skills-reports-page .sr-strengths-box,
.skills-reports-page .sr-outstanding-box {
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.skills-reports-page .sr-strengths-box {
  border: 1px solid #86efac;
  background: #f0fdf4;
}

.skills-reports-page .sr-strengths-box h3,
.skills-reports-page .sr-outstanding-box h3 {
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 8px;
}

.skills-reports-page .sr-strengths-box h3 { color: #065f46; }
.skills-reports-page .sr-strengths-box ul,
.skills-reports-page .sr-outstanding-box ol {
  margin: 0;
  padding-left: 18px;
  font-size: 12px;
}
.skills-reports-page .sr-strengths-box li { color: #065f46; padding: 2px 0; }

.skills-reports-page .sr-outstanding-box {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}
.skills-reports-page .sr-outstanding-box h3 { color: #1e293b; }
.skills-reports-page .sr-outstanding-box li { color: #475569; padding: 2px 0; }

/* Activity rows (name | type tag | progress bar | score% | status) */
.skills-reports-page .sr-activity-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f1f5f9;
}

.skills-reports-page .sr-activity-row:last-child {
  border-bottom: none;
}

.skills-reports-page .sr-activity-name {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  font-weight: 500;
  color: #1e293b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.skills-reports-page .sr-type-tag {
  flex-shrink: 0;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 10px;
  font-weight: 600;
}

.skills-reports-page .sr-type-course { background: #dbeafe; color: #1e40af; }
.skills-reports-page .sr-type-assessment { background: #ede9fe; color: #5b21b6; }
.skills-reports-page .sr-type-practical { background: #d1fae5; color: #065f46; }

.skills-reports-page .sr-mini-bar {
  width: 90px;
  flex-shrink: 0;
}

.skills-reports-page .sr-activity-score {
  flex-shrink: 0;
  width: 40px;
  text-align: right;
  font-size: 12px;
  font-weight: 600;
  color: #1e293b;
}

.skills-reports-page .sr-status-pill {
  flex-shrink: 0;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 600;
  white-space: nowrap;
}

.skills-reports-page .sr-status-pass { background: #d1fae5; color: #065f46; }
.skills-reports-page .sr-status-fail { background: #fee2e2; color: #991b1b; }
.skills-reports-page .sr-status-pending { background: #fef3c7; color: #92400e; }

.skills-reports-page .sr-status-pill-spaced { margin-left: 8px; }

.skills-reports-page .sr-empty-state {
  padding: 20px;
  text-align: center;
  font-size: 12px;
  color: #94a3b8;
}

/* Gap highlighting (Team Report) */
.skills-reports-page .sr-mainskill-block--gap {
  border-left: 3px solid #ef4444;
}

.skills-reports-page .sr-activity-row--gap {
  border-left: 3px solid #ef4444;
  padding-left: 8px;
  background: #fef2f2;
  margin-left: -11px;
  padding-right: 8px;
}

/* Team info card */
.skills-reports-page .sr-team-card .sr-learner-avatar {
  font-size: 18px;
}

/* Gap analysis list */
.skills-reports-page .sr-gap-analysis {
  border: 1px solid #fca5a5;
  background: #fef2f2;
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
}

.skills-reports-page .sr-gap-analysis-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  color: #991b1b;
  margin-bottom: 8px;
}

.skills-reports-page .sr-gap-analysis-empty {
  font-size: 12px;
  color: #64748b;
}

.skills-reports-page .sr-gap-analysis-list {
  margin: 0;
  padding-left: 18px;
}

.skills-reports-page .sr-gap-analysis-list li {
  font-size: 12px;
  color: #991b1b;
  padding: 3px 0;
}

/* Export bar */
.skills-reports-page .sr-export-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 14px 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.skills-reports-page .sr-export-actions {
  display: flex;
  gap: 8px;
}

.skills-reports-page .sr-export-btn {
  text-decoration: none;
}

.skills-reports-page .sr-export-meta {
  font-size: 11px;
  color: #64748b;
}

@media print {
  .skills-reports-page .sr-header,
  .skills-reports-page .sr-tabs,
  .skills-reports-page .sr-filter-bar,
  .skills-reports-page .sr-export-bar {
    display: none !important;
  }
}

/* PDF-SAFE-CSS-START */
/* Skills Report PDF exports (Learner / Team) — skills_report_learner_pdf.html
   and skills_report_team_pdf.html render through xhtml2pdf, which only
   understands plain CSS2.1-level rules (no custom properties, flexbox, grid,
   @font-face with remote urls, etc.) and cannot reliably parse the rest of
   this file (it contains all of those). So the PDF templates do NOT link this
   whole stylesheet — instead the view extracts exactly this block (between
   the PDF-SAFE-CSS-START/END markers) via
   progress_reporting_tool.utils.get_pdf_safe_css() and inlines it in a
   <style> tag. This stays the single source of truth for these rules (per
   the project's "no new CSS files" convention) while keeping xhtml2pdf fed
   only CSS it can actually parse. Scoped under body.skills-report-pdf so
   nothing here leaks into the rest of the site either. */
body.skills-report-pdf {
  font-family: Helvetica, Arial, sans-serif;
  font-size: 11px;
  color: #1e293b;
}

body.skills-report-pdf h1 {
  font-size: 18px;
  color: #3d0f6e;
  margin-bottom: 4px;
}

body.skills-report-pdf .meta {
  font-size: 10px;
  color: #64748b;
  margin-bottom: 14px;
}

body.skills-report-pdf .info-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin-bottom: 14px;
}

body.skills-report-pdf .info-table td {
  padding: 5px 8px;
  font-size: 10px;
  border: 1px solid #e2e8f0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

body.skills-report-pdf .info-label {
  color: #64748b;
  width: 20%;
  background: #f8fafc;
  font-weight: bold;
}

body.skills-report-pdf .mainskill-header {
  background: #1e1040;
  color: #ffffff;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: bold;
}

body.skills-report-pdf .mainskill-sub {
  background: #1e1040;
  color: #c4b5fd;
  padding: 0 10px 8px;
  font-size: 10px;
}

body.skills-report-pdf table.activities {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin-bottom: 16px;
}

body.skills-report-pdf table.activities th {
  background: #f1f5f9;
  color: #475569;
  font-size: 9px;
  text-transform: uppercase;
  padding: 6px 8px;
  text-align: left;
  border: 1px solid #e2e8f0;
}

body.skills-report-pdf table.activities td {
  padding: 6px 8px;
  font-size: 10px;
  border: 1px solid #e2e8f0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

body.skills-report-pdf .pill {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 9px;
  font-weight: bold;
}

body.skills-report-pdf .pill-pass {
  background: #d1fae5;
  color: #065f46;
}

body.skills-report-pdf .pill-fail {
  background: #fee2e2;
  color: #991b1b;
}

body.skills-report-pdf .pill-pending {
  background: #fef3c7;
  color: #92400e;
}

body.skills-report-pdf .gaps-box {
  border: 1px solid #fca5a5;
  background: #fee2e2;
  padding: 8px 10px;
  margin-bottom: 16px;
}

body.skills-report-pdf .gaps-box h2 {
  font-size: 11px;
  color: #991b1b;
  margin: 0 0 4px;
}

body.skills-report-pdf .gaps-box ul {
  margin: 0;
  padding-left: 16px;
  font-size: 10px;
  color: #991b1b;
}

body.skills-report-pdf .footer {
  margin-top: 20px;
  font-size: 9px;
  color: #94a3b8;
}

/* Branded Skills Competency Report additions (learner report + reused by the
   team/specialization/mainskill/subskill/programme reports later). Same
   CSS2.1-only constraint as the block above -- table-based bar charts
   instead of flexbox, literal colors instead of custom properties. */

body.skills-report-pdf .report-header-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 10px;
}

body.skills-report-pdf .report-header-table td {
  border: none;
  padding: 0;
  vertical-align: top;
}

body.skills-report-pdf .report-logo-img {
  display: block;
  width: 85px;
  height: 21px;
  /* The source logo file has ~9.5% transparent padding baked in on its
     left edge -- this negative margin shifts the visible mark back so it
     lines up flush with the text below it instead of the image's box. */
  margin: 0 0 6px -8px;
}

body.skills-report-pdf .report-title-text {
  font-size: 14px;
  font-weight: bold;
  color: #3d0f6e;
}

body.skills-report-pdf .report-ref-cell {
  text-align: right;
  font-size: 9px;
  color: #64748b;
}

body.skills-report-pdf .section-title {
  font-size: 12px;
  font-weight: bold;
  color: #3d0f6e;
  border-left: 3px solid #3d0f6e;
  border-bottom: 1px solid #e2e8f0;
  padding: 0 0 6px 6px;
  margin: 18px 0 10px;
}

body.skills-report-pdf .result-badge {
  display: inline;
  padding: 3px 10px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: bold;
}

body.skills-report-pdf .result-passed {
  background: #d1fae5;
  color: #065f46;
}

body.skills-report-pdf .result-failed {
  background: #fee2e2;
  color: #991b1b;
}

/* Evidence still outstanding: nothing failed, so this must not read as a
   failure. Amber separates "not verifiable yet" from "did not meet the mark". */
body.skills-report-pdf .result-incomplete {
  background: #fef3c7;
  color: #92400e;
}

body.skills-report-pdf .calc-result-incomplete {
  color: #92400e;
  font-weight: bold;
}

body.skills-report-pdf .tier-badge {
  display: inline;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: bold;
}

body.skills-report-pdf .tier-beginner { background: #f1f5f9; color: #475569; }
body.skills-report-pdf .tier-below-average { background: #fee2e2; color: #991b1b; }
body.skills-report-pdf .tier-average { background: #fef3c7; color: #92400e; }
body.skills-report-pdf .tier-above-average { background: #dbeafe; color: #1e40af; }
body.skills-report-pdf .tier-excellent { background: #d1fae5; color: #065f46; }
body.skills-report-pdf .tier-not-scored { background: #f1f5f9; color: #94a3b8; }

/* Team-based Programme Report PDF: evaluation-scope pill on each Team
   Overview row, and the team-group header div above each team's block in
   the grouped Learner Roster. Mirrors the on-screen sr-scope-(key) and
   sr-team-group-header rules above -- see PDF-SAFE-CSS-START comment for
   why this can't just be one shared rule set. */
body.skills-report-pdf .scope-pill {
  display: inline;
  padding: 2px 8px;
  border-radius: 8px;
  font-size: 9px;
  font-weight: bold;
}

body.skills-report-pdf .scope-specialization { background: #dbeafe; color: #1e40af; }
body.skills-report-pdf .scope-mainskill { background: #fef3c7; color: #92400e; }
body.skills-report-pdf .scope-subskill { background: #d1fae5; color: #065f46; }
body.skills-report-pdf .scope-combination { background: #ede9fe; color: #5b21b6; }
body.skills-report-pdf .scope-no_data { background: #f1f5f9; color: #94a3b8; }

body.skills-report-pdf .team-group-row {
  background: #1e1040;
  color: #ffffff;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: bold;
  margin-top: 14px;
}

/* Medal swatches (Coal/Bronze/Silver/Gold/Diamond) next to the Badge column
   in the Competency Scale table. A fixed-size table cell (not a span with
   inline-block) since xhtml2pdf does not reliably size inline-block spans. */
body.skills-report-pdf .medal-swatch-table {
  border-collapse: collapse;
}
body.skills-report-pdf .medal-swatch {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 1px solid #94a3b8;
  font-size: 1px;
  line-height: 1px;
}
body.skills-report-pdf .medal-swatch.tier-beginner { background: #4b5563; border-color: #374151; }
body.skills-report-pdf .medal-swatch.tier-below-average { background: #b45309; border-color: #92400e; }
body.skills-report-pdf .medal-swatch.tier-average { background: #94a3b8; border-color: #64748b; }
body.skills-report-pdf .medal-swatch.tier-above-average { background: #eab308; border-color: #a16207; }
body.skills-report-pdf .medal-swatch.tier-excellent { background: #7dd3fc; border-color: #0284c7; }
body.skills-report-pdf .medal-swatch.tier-not-scored { background: #e2e8f0; border-color: #cbd5e1; }

body.skills-report-pdf .scale-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin-bottom: 14px;
}

body.skills-report-pdf .scale-table th {
  background: #1e1040;
  color: #ffffff;
  font-size: 9px;
  text-transform: uppercase;
  padding: 6px 8px;
  text-align: left;
  border: 1px solid #e2e8f0;
}

body.skills-report-pdf .scale-table td {
  padding: 5px 8px;
  font-size: 10px;
  border: 1px solid #e2e8f0;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

body.skills-report-pdf .scale-row-highlight td {
  background: #ede9fe;
  font-weight: bold;
}

body.skills-report-pdf .row-alt td {
  background: #f8fafc;
}

body.skills-report-pdf .bar-track {
  width: 100%;
  border-collapse: collapse;
  height: 8px;
  margin: 3px 0 10px;
  background: #e2e8f0;
  border: 1px solid #cbd5e1;
}

body.skills-report-pdf .bar-track td {
  border: none;
  padding: 0;
  height: 8px;
  font-size: 1px;
  line-height: 1px;
}

body.skills-report-pdf .bar-fill {
  background: #3d0f6e;
}

body.skills-report-pdf .bar-fill-fail {
  background: #b91c1c;
}

body.skills-report-pdf .bar-empty {
  background: #e2e8f0;
}

body.skills-report-pdf .bar-activity-label {
  font-size: 9px;
  color: #475569;
  margin-left: 12px;
}

body.skills-report-pdf .text-muted {
  color: #94a3b8;
}

body.skills-report-pdf .calc-box {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 10px 12px;
  margin-bottom: 16px;
}

body.skills-report-pdf .calc-box h2 {
  font-size: 11px;
  color: #3d0f6e;
  margin: 0 0 6px;
}

body.skills-report-pdf .calc-box .calc-step {
  font-size: 10px;
  margin: 4px 0;
}

body.skills-report-pdf .calc-box .calc-result-pass {
  color: #065f46;
  font-weight: bold;
}

body.skills-report-pdf .calc-box .calc-result-fail {
  color: #991b1b;
  font-weight: bold;
}

body.skills-report-pdf .strengths-box {
  border: 1px solid #86efac;
  background: #f0fdf4;
  padding: 8px 10px;
  margin-bottom: 16px;
}

body.skills-report-pdf .strengths-box h2 {
  font-size: 11px;
  color: #065f46;
  margin: 0 0 4px;
}

body.skills-report-pdf .strengths-box ul {
  margin: 0;
  padding-left: 16px;
  font-size: 10px;
  color: #065f46;
}

body.skills-report-pdf .recommendation-box {
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  padding: 8px 10px;
  margin-bottom: 16px;
}

body.skills-report-pdf .recommendation-box h2 {
  font-size: 11px;
  color: #3d0f6e;
  margin: 0 0 4px;
}

body.skills-report-pdf .recommendation-box ol {
  margin: 0;
  padding-left: 16px;
  font-size: 10px;
  color: #1e293b;
}

body.skills-report-pdf .summary-stats-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin-bottom: 16px;
}

body.skills-report-pdf .summary-stats-table td {
  padding: 4px 8px;
  font-size: 10px;
  border: 1px solid #e2e8f0;
}

body.skills-report-pdf .summary-stats-label {
  color: #64748b;
  width: 55%;
}

body.skills-report-pdf .overall-assessment-box {
  border: 1px solid #e2e8f0;
  padding: 10px 12px;
  margin-bottom: 16px;
}

body.skills-report-pdf .overall-assessment-box h2 {
  font-size: 13px;
  margin: 0 0 8px;
}

/* Team Report's 4-up stat row (Learners Evaluated/Passed/Failed/Average) --
   table-based so it lays out the same way bar-track/medal-swatch do, since
   xhtml2pdf can't be trusted to lay out flex/grid cards. */
body.skills-report-pdf .stat-cards-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 16px;
}

body.skills-report-pdf .stat-cards-table td {
  width: 25%;
  text-align: center;
  padding: 10px 6px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

body.skills-report-pdf .stat-card-number {
  font-size: 18px;
  font-weight: bold;
  color: #3d0f6e;
}

body.skills-report-pdf .stat-card-label {
  font-size: 8px;
  text-transform: uppercase;
  color: #64748b;
  margin-top: 2px;
}

body.skills-report-pdf .result-pending {
  background: #fef3c7;
  color: #92400e;
}

/* Static column-width utilities for the PDF <colgroup> table layouts, and a
   couple of small layout helpers (float-right label/score pairs, extra
   spacing on a calc-step) -- keeps every skills_report_*_pdf.html template
   free of inline style="" attributes, per the project convention that all
   CSS content lives in this one file and templates/JS only ever reference
   a class name. */
body.skills-report-pdf col.col-w-9 { width: 9%; }
body.skills-report-pdf col.col-w-10 { width: 10%; }
body.skills-report-pdf col.col-w-12 { width: 12%; }
body.skills-report-pdf col.col-w-15 { width: 15%; }
body.skills-report-pdf col.col-w-16 { width: 16%; }
body.skills-report-pdf col.col-w-18 { width: 18%; }
body.skills-report-pdf col.col-w-20 { width: 20%; }
body.skills-report-pdf col.col-w-25 { width: 25%; }
body.skills-report-pdf col.col-w-30 { width: 30%; }
body.skills-report-pdf col.col-w-35 { width: 35%; }
body.skills-report-pdf col.col-w-40 { width: 40%; }
body.skills-report-pdf col.col-w-45 { width: 45%; }
body.skills-report-pdf col.col-w-55 { width: 55%; }
body.skills-report-pdf col.col-w-70 { width: 70%; }

body.skills-report-pdf .float-right { float: right; }
body.skills-report-pdf .calc-step-spaced { margin-top: 8px; }
/* PDF-SAFE-CSS-END */

/* Evaluation sidebar group (Skills Development / Marks / Marking Rubric /
   Task Management / Evaluation Management / Report) active-item and
   compact-desktop-sizing styling now lives alongside the other unified
   app sidebars — see the `.app-evaluation-list #evaluation-sidebar-accordion`
   selectors added to the shared rule blocks above. */

/* Standalone System Management */
.system-management-content-page .system-management-content-ui {
  width: 100% !important;
  max-width: 100% !important;
  margin-top: var(--pm-content-top-offset, 0rem) !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding: .35rem .55rem 2.5rem !important;
  box-sizing: border-box !important;
}

.system-management-content-page .system-management-shell {
  width: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

@media (min-width: 1200px) {
  /* Match the assessment dashboard shell pull-up so the system home shell
     does not sit too far below the shared top bar on desktop. */
  body.system-management-content-page #system-management-content-root[data-system-management-home-shell] {
    margin-top: -26px !important;
  }
}

.system-management-content-page .system-module-grid {
  /* Mirrors the compact purple module-card styling used by the Course
     Management / Assessment Management / per-programme workspace cards
     (programme-module-*) so this landing screen matches them exactly. */
  --sm-primary: var(--primary-color, #36006f);
  --sm-primary-soft: color-mix(in srgb, var(--primary-color, #36006f) 78%, #ffffff 22%);
  --sm-accent: var(--secondary-color, var(--btn-color, var(--primary-color, #4d54a3)));
  display: grid;
  grid-template-columns: repeat(5, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.system-management-content-page .system-module-card {
  min-height: 158px;
  border-radius: 18px;
  border: 3px solid var(--sm-primary);
  background: var(--sm-primary-soft);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px 14px;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.system-management-content-page .system-module-card.is-active,
.system-management-content-page .system-module-card:hover {
  background: var(--sm-primary);
  color: #fff;
  transform: translateY(-1px);
}

.system-management-content-page .system-module-card-icon {
  width: 33.9px;
  height: 33.9px;
  border-radius: 10px;
  background: var(--sm-accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 10px;
}

.system-management-content-page .system-module-card-icon img {
  width: 25.9px;
  height: 25.9px;
  object-fit: contain;
  border-radius: inherit;
}

.system-management-content-page .system-module-card-title {
  font-weight: 700;
  font-size: 13px;
  line-height: 1.2;
  margin: 0 0 2px;
}

.system-management-content-page .system-module-card-copy {
  font-size: 11px;
  font-weight: 500;
  line-height: 1.24;
  margin: 0;
  color: rgba(255, 255, 255, .92);
}

.system-management-content-page .system-module-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 12px;
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
}

.system-management-content-page .system-card-pill {
  border: 0;
  border-radius: 999px;
  background: var(--pm-accent);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-height: 25px;
  padding: 5px 9px;
  font-size: .72rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.system-management-content-page .system-action-pill {
  border: 0 !important;
  border-radius: 6px;
  background: var(--btn-outline-primary-bg, var(--primary-color));
  color: var(--btn-outline-primary-text, #fff);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-height: 26px;
  padding: 5px 10px;
  font-size: .75rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.system-management-content-page .btn-outline-primary,
.system-management-content-page .btn-outline-primary:hover,
.system-management-content-page .btn-outline-primary:focus,
.system-management-content-page .btn-outline-primary:active,
.system-management-content-page .btn-outline-primary:focus-visible {
  border: 0 !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* User type and account status should retain their badge colours without the
   filled badge treatment. */
.system-management-content-page #system-users-table .system-badge {
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
}

.system-management-content-page #system-users-table .system-badge-soft-red,
.system-management-content-page #system-users-table .system-badge-muted {
  color: #f08c94;
}

.system-management-content-page #system-users-table .system-badge-red {
  color: #dc3545;
}

.system-management-content-page #system-users-table .system-badge-green {
  color: #09895a;
}

/* Standard status badges platform-wide: keep the semantic colour as text and
   remove the filled pill treatment. */
.badge.bg-success,
.badge.text-bg-success,
.badge.bg-danger,
.badge.text-bg-danger,
.badge.bg-warning,
.badge.text-bg-warning,
.badge.bg-secondary,
.badge.text-bg-secondary,
.badge.bg-primary,
.badge.text-bg-primary,
.badge.bg-info,
.badge.text-bg-info,
.system-badge {
  min-height: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent !important;
  font-weight: 700;
}

.badge.bg-success,
.badge.text-bg-success,
.system-badge-green {
  color: #09895a !important;
}

.badge.bg-danger,
.badge.text-bg-danger,
.system-badge-red {
  color: #dc3545 !important;
}

.system-badge-soft-red {
  color: #f08c94 !important;
}

.badge.bg-warning,
.badge.text-bg-warning {
  color: #b76505 !important;
}

.badge.bg-secondary,
.badge.text-bg-secondary,
.system-badge-muted {
  color: #6b7280 !important;
}

.badge.bg-primary,
.badge.text-bg-primary,
.badge.bg-info,
.badge.text-bg-info {
  color: var(--primary-color, #5353b7) !important;
}

.system-management-content-page .system-user-actions-dropdown {
  position: relative;
  display: inline-flex;
  justify-content: flex-end;
}

.system-management-content-page .system-user-actions-dropdown.is-open {
  z-index: 10000;
}

.system-management-content-page .system-user-actions-menu {
  top: calc(100% + .45rem);
  right: 0;
  bottom: auto;
  z-index: 10001 !important;
}

.system-management-content-page .system-user-actions-menu .manage-user-action-panel {
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-gutter: stable;
}

.system-management-content-page .system-user-actions-menu[aria-hidden="true"] {
  display: none !important;
}

.system-management-content-page .system-assign-programme-list {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  max-height: 18rem;
  overflow-y: auto;
  border: 1px solid rgba(15, 23, 42, .1);
  border-radius: .5rem;
  padding: .55rem;
  background: #fff;
}

.system-management-content-page .system-assign-programme-option {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-height: 2.25rem;
  margin: 0;
  padding: .45rem .55rem;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: .5rem;
  color: #1f2937;
  font-size: .78rem;
  font-weight: 600;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease;
}

.system-management-content-page .system-assign-programme-option:hover,
.system-management-content-page .system-assign-programme-option:focus-within {
  border-color: rgba(15, 23, 42, .18);
  background: #f8fafc;
}

.system-management-content-page .system-assign-programme-option .form-check-input {
  flex: 0 0 auto;
  margin: 0;
}

.system-management-content-page .system-assign-programme-empty {
  padding: .75rem;
  text-align: center;
}

#system_assign_user_permissions_modal #system_assign_user_permissions_list.system-user-permission-layout {
  display: block;
  max-height: none;
  overflow: visible;
  border: 0;
  padding: 0;
  background: transparent;
}

#system_assign_user_permissions_modal .system-user-permission-grid {
  width: 100%;
}

#system_assign_user_permissions_modal .system-user-permission-stack {
  width: 100%;
}

#system_assign_user_permissions_modal #system_assign_user_permissions_list {
  display: flex;
  flex-direction: column;
  gap: .75rem;
  max-height: none;
  overflow: visible;
  border: 0;
  padding: 0;
  background: transparent;
}

#system_assign_user_permissions_modal .system-user-permission-preview-panel,
#system_assign_user_permissions_modal .system-user-permission-tree-panel {
  display: flex;
  flex-direction: column;
  min-height: 18rem;
  border: 1px solid rgba(15, 23, 42, .1);
  border-radius: .5rem;
  overflow: hidden;
  background: #fff;
}

#system_assign_user_permissions_modal .system-user-permission-preview-header,
#system_assign_user_permissions_modal .system-user-permission-tree-header {
  padding: .8rem .9rem;
  border-bottom: 1px solid rgba(15, 23, 42, .08);
  background: #f8fafc;
}

#system_assign_user_permissions_modal .system-user-permission-preview-body,
#system_assign_user_permissions_modal .system-user-permission-tree-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: .85rem;
}

#system_assign_user_permissions_modal .system-user-permission-preview-content,
#system_assign_user_permissions_modal .system-user-permission-tree-content {
  min-height: 6rem;
}

#system_assign_user_permissions_modal .system-user-permission-option {
  width: 100%;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

#system_assign_user_permissions_modal .system-user-permission-option.is-active {
  border-color: color-mix(in srgb, var(--primary-color, #3b0066) 24%, #d1d5db 76%);
  background: color-mix(in srgb, var(--primary-color, #3b0066) 3%, #ffffff 97%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary-color, #3b0066) 10%, transparent 90%);
}

#system_assign_user_permissions_modal .system-user-permission-option .system-user-permission-card-selector {
  align-items: center;
}

#system_assign_user_permissions_modal .system-user-permission-option .form-check-input {
  margin-top: .15rem;
}

#system_assign_user_permissions_modal .system-user-permission-option .fw-semibold {
  line-height: 1.25;
}

.system-management-content-page .system-user-permission-card {
  align-items: stretch;
  flex-direction: column;
  cursor: default;
}

.system-management-content-page .system-user-permission-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
  width: 100%;
}

.system-management-content-page .system-user-permission-card-selector {
  display: flex;
  align-items: flex-start;
  gap: .55rem;
  min-width: 0;
  width: 100%;
}

.system-management-content-page .system-user-permission-card-selector .form-check-input {
  margin-top: .2rem;
}

.system-management-content-page .system-user-permission-details-toggle {
  flex: 0 0 auto;
  white-space: nowrap;
}

.system-management-content-page .system-user-permission-details {
  width: 100%;
}

.system-management-content-page .system-user-permission-details-body {
  display: flex;
  flex-direction: column;
  gap: .55rem;
  padding-top: .15rem;
}

.system-management-content-page .system-user-permission-feature-group {
  padding: .65rem .7rem;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: .5rem;
  background: #f8fafc;
}

.system-management-content-page .system-user-permission-sub-group {
  padding: .55rem .6rem;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: .45rem;
  background: #ffffff;
}

.system-management-content-page .system-user-permission-crud-pill {
  font-size: .7rem;
  font-weight: 600;
}

#system_assign_user_permissions_modal .modal-content {
  border: 0;
  border-radius: .75rem;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.24);
  overflow: hidden;
}

#system_assign_user_permissions_modal .modal-dialog {
  max-width: min(1140px, calc(100vw - 1.5rem)) !important;
  width: min(1140px, calc(100vw - 1.5rem)) !important;
}

#system_assign_user_permissions_modal .modal-header {
  align-items: center;
  background: var(--primary-color, var(--btn-color, #3b0066)) !important;
  border: 0 !important;
  color: #ffffff !important;
  padding: 0.9rem 1.15rem;
}

#system_assign_user_permissions_modal .modal-title {
  color: #ffffff !important;
  font-weight: 700;
}

#system_assign_user_permissions_modal .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
  opacity: 1;
  box-shadow: none;
}

#system_assign_user_permissions_modal .modal-body {
  background: color-mix(in srgb, var(--primary-color, #3b0066) 3%, #ffffff 97%);
}

#system_assign_user_permissions_modal .modal-footer {
  background: #ffffff !important;
  border-top: 1px solid color-mix(in srgb, var(--primary-color, #3b0066) 14%, #e5e7eb 86%);
}

#system_assign_user_permissions_modal .modal-footer .btn,
#system_assign_user_permissions_modal #system_assign_user_permissions_save {
  background: var(--primary-color, var(--btn-color, #3b0066)) !important;
  border: 1px solid var(--primary-color, var(--btn-color, #3b0066)) !important;
  color: #ffffff !important;
}

#system_assign_user_permissions_modal .modal-footer .btn:hover,
#system_assign_user_permissions_modal .modal-footer .btn:focus,
#system_assign_user_permissions_modal #system_assign_user_permissions_save:hover,
#system_assign_user_permissions_modal #system_assign_user_permissions_save:focus {
  background: var(--secondary-color, var(--primary-color, #3b0066)) !important;
  border-color: var(--secondary-color, var(--primary-color, #3b0066)) !important;
  color: #ffffff !important;
}

#system_assign_user_permissions_modal .accordion-item {
  border-color: color-mix(in srgb, var(--primary-color, #3b0066) 18%, #d1d5db 82%) !important;
}

#system_assign_user_permissions_modal .accordion-button {
  box-shadow: none;
}

#system_assign_user_permissions_modal .accordion-button:not(.collapsed),
#system_assign_user_permissions_modal .accordion-collapse.show {
  background-color: #ffffff;
}

#system_assign_user_permissions_modal .feature-name,
#system_assign_user_permissions_modal .fw-bold,
#system_assign_user_permissions_modal .fw-semibold {
  color: #111827 !important;
}

#system_assign_user_permissions_modal .form-check-input:checked {
  background-color: var(--primary-color, #3b0066);
  border-color: var(--primary-color, #3b0066);
}

#system_assign_user_permissions_modal .form-check-input:focus {
  box-shadow: 0 0 0 0.2rem rgba(59, 0, 102, 0.15);
}

.system-management-content-page .system-add-user-programme-dropdown {
  width: 100%;
}

.system-management-content-page .system-add-user-programme-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  width: 100%;
  min-height: 2.35rem;
  padding: .45rem .65rem;
  border: 1px solid #ced4da;
  border-radius: .375rem;
  background: #fff;
  color: #1f2937;
  font-size: .78rem;
  text-align: left;
}

.system-management-content-page .system-add-user-programme-toggle:focus-visible {
  outline: 0;
  border-color: rgba(13, 110, 253, .55);
  box-shadow: 0 0 0 .2rem rgba(13, 110, 253, .12);
}

.system-management-content-page .system-add-user-programme-summary {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.system-management-content-page .system-add-user-programme-menu {
  position: static !important;
  transform: none !important;
  width: 100%;
  min-width: 100%;
  margin-top: .45rem;
  padding: .75rem;
  border: 1px solid rgba(15, 23, 42, .12);
  border-radius: .5rem;
  box-shadow: 0 .75rem 1.5rem rgba(15, 23, 42, .08);
}

.system-management-content-page .system-add-user-programme-list {
  max-height: 12rem;
}

.system-management-content-page .system-add-user-teacher-shell {
  padding: .75rem;
  border: 1px solid rgba(15, 23, 42, .1);
  border-radius: .5rem;
  background: #f8fafc;
}

.system-management-content-page .system-add-user-teacher-assignment-list {
  display: flex;
  flex-direction: column;
  gap: .45rem;
}

.system-management-content-page .system-add-user-teacher-assignment {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 2.5rem;
  padding: .55rem .65rem;
  border: 1px solid rgba(15, 23, 42, .08);
  border-radius: .5rem;
  background: #fff;
}

.system-management-content-page .system-add-user-teacher-assignment-empty {
  padding: .65rem;
  text-align: center;
  border: 1px dashed rgba(15, 23, 42, .16);
  border-radius: .5rem;
  background: #fff;
}

.system-management-content-page .system-add-user-teacher-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 1.9rem;
  height: 1.9rem;
  border: 1px solid rgba(153, 27, 27, .18);
  border-radius: 50%;
  background: #fff;
  color: #991b1b;
  line-height: 1;
}

.system-management-content-page .system-add-user-teacher-remove:hover,
.system-management-content-page .system-add-user-teacher-remove:focus-visible {
  border-color: rgba(153, 27, 27, .32);
  background: #fef2f2;
}

.system-management-content-page .system-tabs {
  display: flex;
  align-items: center;
  gap: 2rem;
  margin: 0 0 .8rem;
  padding: 0;
  list-style: none;
  border: 0;
}

.system-management-content-page .system-tab-button {
  border: 0;
  background: transparent;
  color: #111;
  font-weight: 700;
  font-size: .9rem;
  padding: .7rem 0 .85rem;
  border-bottom: .26rem solid transparent;
}

.system-management-content-page .system-tab-button.is-active {
  border-bottom-color: var(--primary-color);
  color: #000;
}

.system-management-content-page .system-tab-panel,
.system-management-content-page .system-role-tab-panel,
.system-management-content-page .system-module-panel {
  display: none !important;
}

.system-management-content-page .system-tab-panel.is-active,
.system-management-content-page .system-role-tab-panel.is-active,
.system-management-content-page .system-module-panel.is-active {
  display: block !important;
}

.system-management-content-page .system-toolbar {
  display: grid;
  grid-template-columns: auto minmax(280px, 1fr);
  gap: 1rem;
  align-items: center;
  margin: 0 0 2rem;
}

.system-management-content-page .system-filter-select {
  justify-self: end;
  width: min(100%, 14rem);
  border: 1px solid #cfd7df;
  border-radius: .75rem;
  min-height: 2.85rem;
  font-size: .78rem;
  padding: 0 .85rem;
  background-color: #fff;
}

.system-management-content-page .system-table-card {
  background: #fff;
  border-radius: .25rem;
  box-shadow: 0 .35rem 1.35rem rgba(28, 39, 60, .06);
  padding: 1.9rem 1.55rem;
  overflow: visible;
}

.system-management-content-page .system-table-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.system-management-content-page .system-table-controls label {
  font-size: .9rem;
  font-weight: 500;
  color: #111827;
  margin: 0;
}

.system-management-content-page .system-table-controls select,
.system-management-content-page .system-table-controls input {
  border: 1px solid #cfd7df;
  border-radius: .55rem;
  min-height: 2rem;
  padding: .25rem .65rem;
  font-size: .82rem;
}

.system-management-content-page .system-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.system-management-content-page .system-pagination {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  flex-wrap: wrap;
}

.system-management-content-page .system-page-button {
  border: 1px solid #d6dde6;
  border-radius: .45rem;
  background: #fff;
  color: #111827;
  min-width: 2rem;
  min-height: 1.9rem;
  padding: .25rem .55rem;
  font-size: .74rem;
  font-weight: 700;
}

.system-management-content-page .system-page-button.is-active {
  background: #df1205;
  border-color: #df1205;
  color: #fff;
}

.system-management-content-page .system-page-button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.system-management-content-page .system-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .82rem;
}

.system-management-content-page .system-table thead th {
  background: var(--primary-color);
  color: #fff;
  font-weight: 800;
  padding: .72rem .65rem;
  white-space: nowrap;
}

.system-management-content-page .system-table tbody td {
  padding: .65rem .65rem;
  vertical-align: middle;
  color: #111827;
}

.system-management-content-page .system-table tbody tr:nth-child(odd) {
  background: #f2f2f2;
}

.system-management-content-page .system-table tbody tr:nth-child(even) {
  background: #fff;
}

.system-management-content-page .system-badge {
  border-radius: .25rem;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 1.25rem;
  padding: .15rem .5rem;
  font-size: .68rem;
  font-weight: 800;
  white-space: nowrap;
}

.system-management-content-page .system-badge-soft-red {
  background: #f08c94;
}

.system-management-content-page .system-badge-red {
  background: #dc3545;
}

.system-management-content-page .system-badge-green {
  background: #09895a;
}

.system-management-content-page .system-badge-muted {
  background: #f08c94;
}

.system-management-content-page .system-empty-state {
  min-height: 12rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #6b7280;
}

.system-management-content-page .modal {
  z-index: 1085;
}

.system-management-content-page .modal-backdrop {
  z-index: 1080;
}

@media (max-width: 1200px) {
  .system-management-content-page .system-module-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 768px) {
  .system-management-content-page .system-module-grid,
  .system-management-content-page .system-toolbar {
    grid-template-columns: 1fr;
  }

  .system-management-content-page .system-filter-select {
    justify-self: stretch;
  }

  .system-management-content-page .system-table-controls {
    align-items: stretch;
    flex-direction: column;
  }
}

/* ==========================================================================
   Mobile card layout for the System Management Users/Roles/Permissions
   tables (#system-users-table, #system-defined-roles-table,
   #user-defined-roles-table, #system-permissions-table,
   #roles_permissions_table inside the Assign Permissions modal). Same
   row-as-card / left-label-right-value grid used by
   .responsive-card-table elsewhere, re-implemented at this page's own
   ".system-management-content-page .system-table" specificity so it
   reliably overrides that selector's own padding/odd-even striping rules
   above instead of losing a specificity fight to them. Labels are
   hardcoded per table by column position since these rows are either
   server-rendered once or (for #roles_permissions_table) cloned from a
   <template> row at runtime -- nth-child works either way with no JS. */
@media (max-width: 767.98px) {
  .system-management-content-page .system-table-card {
    padding: 1rem 0.65rem;
  }

  .system-management-content-page .system-table {
    border: 0;
  }

  .system-management-content-page .system-table thead {
    display: none;
  }

  .system-management-content-page .system-table tbody {
    display: block;
  }

  .system-management-content-page .system-table tbody tr,
  .system-management-content-page .system-table tbody tr:nth-child(odd),
  .system-management-content-page .system-table tbody tr:nth-child(even) {
    display: block;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
    padding: 0.1rem 0.85rem;
    margin-bottom: 0.6rem;
  }

  .system-management-content-page .system-table tbody td {
    display: grid;
    grid-template-columns: minmax(6.5rem, 40%) minmax(0, 1fr);
    align-items: start;
    justify-items: end;
    gap: 10px;
    min-height: 1.9rem;
    padding: 0.4rem 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    text-align: right;
    white-space: normal;
    overflow-wrap: break-word;
  }

  .system-management-content-page .system-table tbody td:last-child {
    border-bottom: 0;
  }

  .system-management-content-page .system-table tbody td::before {
    content: attr(data-mobile-label);
    justify-self: start;
    text-align: left;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
  }

  .system-management-content-page .system-table tbody td .system-action-pill {
    margin: 2px 0 2px 4px;
  }

  /* "No X found." empty-state rows (colspan) have nothing to label. */
  .system-management-content-page .system-table tbody tr td:only-child {
    display: block;
    padding-top: 0;
    text-align: center;
  }

  .system-management-content-page .system-table tbody tr td:only-child::before {
    content: none;
  }

  #system-users-table td:nth-child(1)::before { content: "Name"; }
  #system-users-table td:nth-child(2)::before { content: "Email"; }
  #system-users-table td:nth-child(3)::before { content: "User Type"; }
  #system-users-table td:nth-child(4)::before { content: "Status"; }
  #system-users-table td:nth-child(5)::before { content: "Created By"; }
  #system-users-table td:nth-child(6)::before { content: "Created Date"; }
  #system-users-table td:nth-child(7)::before { content: "Actions"; }

  #system-defined-roles-table td:nth-child(1)::before,
  #user-defined-roles-table td:nth-child(1)::before { content: "#"; }
  #system-defined-roles-table td:nth-child(2)::before,
  #user-defined-roles-table td:nth-child(2)::before { content: "Name"; }
  #system-defined-roles-table td:nth-child(3)::before,
  #user-defined-roles-table td:nth-child(3)::before { content: "Status"; }
  #system-defined-roles-table td:nth-child(4)::before,
  #user-defined-roles-table td:nth-child(4)::before { content: "Assigned Permissions"; }
  #system-defined-roles-table td:nth-child(5)::before,
  #user-defined-roles-table td:nth-child(5)::before { content: "Actions"; }

  #system-permissions-table td:nth-child(1)::before { content: "#"; }
  #system-permissions-table td:nth-child(2)::before { content: "Permission Name"; }
  #system-permissions-table td:nth-child(3)::before { content: "Description"; }
  #system-permissions-table td:nth-child(4)::before { content: "Actions"; }

  #roles_permissions_table td:nth-child(1)::before { content: "Permission"; }
  #roles_permissions_table td:nth-child(2)::before { content: "Description"; }
  #roles_permissions_table td:nth-child(3)::before { content: "Assigned"; }

  /* The "Assigned Permissions" cell's badge list and the toggle switch in
     #roles_permissions_table's "Assigned" cell are the value content, not a
     single right-aligned control -- let them use the value column's full
     width instead of shrinking to their own content size. */
  .system-management-content-page .system-table tbody td[data-role-permissions-cell],
  #roles_permissions_table td:last-child {
    justify-items: stretch;
  }

  #roles_permissions_table td:last-child .form-check {
    justify-self: end;
  }
}

/* ==========================================================================
   Mobile card layout for the remaining System Management panels: Manage
   Forms (#simple-forms-table, Vue-rendered by dynamic_form_dashboard.js),
   Notifications (#notifications_table, Vue-rendered by
   notification_management.js), and Payments' Transaction History
   (#txTable, Vue-rendered inline in this page). Same row-as-card /
   left-label-right-value grid as the Users/Roles/Permissions tables above,
   written directly against each table's id since none of these share the
   .system-table class. The row-action dropdowns on #simple-forms-table
   already carry an explicit min-width for mobile (see
   "#simple-form-table-app .manage-assessment-actions-toggle" above), so no
   extra sizing safeguard is needed there. */
@media (max-width: 767.98px) {
  #simple-forms-table,
  #notifications_table,
  #txTable {
    width: 100% !important;
    max-width: 100% !important;
  }

  #simple-forms-table thead,
  #notifications_table thead,
  #txTable thead {
    display: none;
  }

  #simple-forms-table tbody,
  #notifications_table tbody,
  #txTable tbody {
    display: block;
    width: 100%;
  }

  #simple-forms-table tbody tr,
  #notifications_table tbody tr,
  #txTable tbody tr {
    display: block;
    background: #fff !important;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
    padding: 0.1rem 0.85rem;
    margin-bottom: 0.6rem;
  }

  /* These three tables all carry Bootstrap's .table-striped class, which
     paints each *cell*'s own background (not just the row's), so it shows
     through as a grey panel over the white card above unless reset here
     too. align-items:start (not center) keeps the label lined up with the
     first line of a value that wraps onto two lines -- centering both put
     the label at the vertical midpoint between the wrapped lines, which
     read as the label and value overlapping. */
  #simple-forms-table tbody td,
  #notifications_table tbody td,
  #txTable tbody td {
    display: grid;
    grid-template-columns: minmax(6.5rem, 40%) minmax(0, 1fr);
    align-items: start;
    justify-items: end;
    gap: 10px;
    min-height: 1.9rem;
    padding: 0.4rem 0 !important;
    background: #fff !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    text-align: right !important;
    white-space: normal !important;
    overflow-wrap: break-word;
  }

  #simple-forms-table tbody td:last-child,
  #notifications_table tbody td:last-child,
  #txTable tbody td:last-child {
    border-bottom: 0;
  }

  #simple-forms-table tbody td::before,
  #notifications_table tbody td::before,
  #txTable tbody td::before {
    content: attr(data-mobile-label);
    justify-self: start;
    text-align: left;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
  }

  #simple-forms-table tbody td .btn,
  #notifications_table tbody td .btn {
    margin: 2px 0 2px 4px;
  }

  #simple-forms-table td:nth-child(1)::before { content: "No"; }
  #simple-forms-table td:nth-child(2)::before { content: "Title"; }
  #simple-forms-table td:nth-child(3)::before { content: "Description"; }
  #simple-forms-table td:nth-child(4)::before { content: "Form Type"; }
  #simple-forms-table td:nth-child(5)::before { content: "Created At"; }
  #simple-forms-table td:nth-child(6)::before { content: "Action"; }

  #notifications_table td:nth-child(1)::before { content: "Select"; }
  #notifications_table td:nth-child(2)::before { content: "No"; }
  #notifications_table td:nth-child(3)::before { content: "Title"; }
  #notifications_table td:nth-child(4)::before { content: "Status"; }
  #notifications_table td:nth-child(5)::before { content: "Send Date"; }
  #notifications_table td:nth-child(6)::before { content: "Recipient Type"; }
  #notifications_table td:nth-child(7)::before { content: "Recipients"; }
  #notifications_table td:nth-child(8)::before { content: "Actions"; }

  #txTable td:nth-child(1)::before { content: "Full Names"; }
  #txTable td:nth-child(2)::before { content: "Email"; }
  #txTable td:nth-child(3)::before { content: "Store"; }
  #txTable td:nth-child(4)::before { content: "Franchise"; }
  #txTable td:nth-child(5)::before { content: "Course"; }
  #txTable td:nth-child(6)::before { content: "Payment Date"; }
  #txTable td:nth-child(7)::before { content: "Update Date"; }
  #txTable td:nth-child(8)::before { content: "Amount"; }
  #txTable td:nth-child(9)::before { content: "Status"; }

  /* #txTable's Amount column is plain right-aligned text (already correct
     via the shared text-align:right above); Status is a colored badge --
     both stay as normal grid values, no extra override needed. */
}

/* ==========================================================================
   File Warehouse (#system-management-files-warehouse) and Payments filter
   controls: no tables here, just make sure every button meets a usable tap
   target and the two/three inline min-width filter boxes flagged during
   review (Filter by Course/Status/Programme -- .system-filter-min-width)
   don't force horizontal overflow on a phone-width screen. */
@media (max-width: 767.98px) {
  /* .caret (the row/toggle itself) already guarantees a 2.8rem row height
     via --warehouse-row-height -- only the per-file/per-folder action
     buttons (preview/download/replace/delete, add files/folder) need a
     bump, since Bootstrap's .btn-sm + this project's global 6px vertical
     .btn padding lands under a comfortable ~34px tap target. */
  .files-warehouse-panel .warehouse-file-actions .btn,
  .files-warehouse-panel .add-program-files .btn {
    min-width: 34px;
    min-height: 34px;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  #system-payments-panel .system-filter-min-width {
    min-width: 0 !important;
    width: 100%;
  }

  /* Billing tab's learner rows: name/email/paid-total on the left, a status
     badge + Activate/Deactivate button on the right, laid out with
     justify-content-between and no wrap -- a long email can force the row
     wider than the screen. Let the action side drop under the details on
     narrow phones instead of overflowing. */
  #system-payments-panel .list-group-item.d-flex.justify-content-between {
    flex-wrap: wrap;
    row-gap: 0.5rem;
  }
}

/* ==========================================================================
   Payments' and Notifications' tab bars, brought in line with the
   horizontal-scrolling tab pattern used on Course Insights
   (body.course-insights-page #course-insights-panel .programme-content-tabs,
   see above): instead of wrapping tab labels onto extra rows -- which is
   what plain Bootstrap .nav-tabs / .nav-pills do by default and is what
   made Payments' 4 tabs and Notifications' 5 tabs look cramped/broken on a
   phone -- the tab list itself scrolls sideways and each label stays on one
   line. Scoped to each panel's own tab bar rather than a global .nav-tabs
   override, since that class is used platform-wide for things that should
   keep wrapping normally. */
@media (max-width: 767.98px) {
  #system-payments-panel .nav-tabs,
  #notification_status_tab {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start !important;
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
    margin: 0 0 1rem;
    padding: 0 0 0.4rem;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  #system-payments-panel .nav-tabs > .nav-item,
  #notification_status_tab > .nav-item {
    flex: 0 0 auto;
  }

  #system-payments-panel .nav-tabs .nav-link,
  #notification_status_tab .nav-link {
    white-space: nowrap;
  }

  /* Keep the Payments tabs visible as a compact control group instead of
     allowing the active tab to leave the first label partially clipped. */
  #system-payments-panel .nav-tabs {
    gap: 0.15rem;
    overflow-x: hidden;
    padding-inline: 0;
  }

  #system-payments-panel .nav-tabs > .nav-item {
    flex: 1 1 0;
    min-width: 0;
  }

  #system-payments-panel .nav-tabs .nav-link {
    width: 100%;
    min-height: 2.5rem;
    padding: 0.5rem 0.2rem;
    font-size: 0.7rem;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
  }

  /* Full-width action on phones prevents the button from being squeezed
     beside the programme filter. */
  #system-payments-panel .system-filter-min-width + button {
    width: 100%;
    min-height: 2.75rem;
    margin: 0 !important;
    white-space: nowrap;
  }

  /* Preserve complete labels for the bulk learner actions. */
  #system-payments-panel .card-header > .d-flex.flex-wrap button {
    flex: 1 1 0;
    min-width: 0;
    min-height: 2.75rem;
    padding-inline: 0.45rem;
    white-space: nowrap;
  }
}

/* ==========================================================================
   Notifications' recipient-picker tables (#addNotificationModal,
   #assignNotificationModal / #recipientModal) -- same row-as-card /
   left-label-right-value grid as the other System Management tables, just
   with only two columns (a checkbox and a name). */
@media (max-width: 767.98px) {
  .notification-recipients-table {
    width: 100% !important;
    max-width: 100% !important;
  }

  .notification-recipients-table thead {
    display: none;
  }

  .notification-recipients-table tbody {
    display: block;
    width: 100%;
  }

  .notification-recipients-table tbody tr {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 12px;
    padding: 0.55rem 0.75rem;
    margin-bottom: 0.5rem;
  }

  .notification-recipients-table tbody td {
    display: block;
    border: 0 !important;
    padding: 0 !important;
  }

  .notification-recipients-table tbody td:first-child {
    flex: 0 0 auto;
  }

  .notification-recipients-table tbody td:first-child .form-check-input {
    width: 1.15rem;
    height: 1.15rem;
    margin: 0;
  }

  .notification-recipients-table tbody td:last-child {
    flex: 1 1 auto;
    min-width: 0;
    overflow-wrap: break-word;
  }

  .notification-recipients-table tbody td:last-child .form-check-label {
    display: block;
  }
}

/* ==========================================================================
   Assessment Management: the "Assessment Analysis" overview table and the
   Assessment Dashboard's per-assessment analysis modal both use plain
   Bootstrap .table markup (no .data-table class), so the auto-applied
   .data-table -> .responsive-card-table pipeline in index_real.js never
   reaches them. Card-mode them by hand instead of opting them into
   .data-table, since that would also hand them DataTables' search/paging
   UI as an unwanted side effect -- these are meant to just list everything.
   #assessmentTemplateLearnersModal (Assessment Templates' "view assigned
   learners" modal) gets the same treatment; it used to be covered by a
   ".assessment-templates-page"-scoped rule elsewhere in this file, but this
   page's actual body class is "assessment-management-standalone-page", so
   that rule never matched. */
@media (max-width: 767.98px) {
  /* table-layout stays "auto" by default, which lets the browser compute
     the table's own intrinsic min-width from its cell content and grow
     past width:100% regardless -- even though thead/tbody/tr/td are all
     blockified into cards below. display:block on the table itself (not
     just its descendants) is what actually stops that overflow, but
     Blink/WebKit still keep a table-layout:auto <table>'s browser-computed
     intrinsic min-width even once it's display:block, so min-width has to
     be reset alongside it. */
  .assessment-overview-table,
  #assessmentDashboardAnalysisModal table,
  #assessmentTemplateLearnersModal table {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
  }

  .assessment-overview-table thead,
  #assessmentDashboardAnalysisModal table thead,
  #assessmentTemplateLearnersModal table thead {
    display: none;
  }

  .assessment-overview-table tbody,
  #assessmentDashboardAnalysisModal table tbody,
  #assessmentTemplateLearnersModal table tbody {
    display: block;
    width: 100%;
  }

  .assessment-overview-table tbody tr,
  #assessmentDashboardAnalysisModal table tbody tr,
  #assessmentTemplateLearnersModal table tbody tr {
    display: block;
    background: #fff !important;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
    padding: 0.1rem 0.85rem;
    margin-bottom: 0.6rem;
  }

  /* #assessmentTemplateLearnersModal's table carries .table-striped, which
     paints each *cell*'s own background -- reset it here too or it shows
     through as a grey panel over the white card above. align-items:start
     (not center) keeps the label lined up with the first line of a value
     that wraps onto two lines. */
  .assessment-overview-table tbody td,
  #assessmentDashboardAnalysisModal table tbody td,
  #assessmentTemplateLearnersModal table tbody td {
    display: grid;
    grid-template-columns: minmax(6.5rem, 40%) minmax(0, 1fr);
    align-items: start;
    justify-items: end;
    gap: 10px;
    min-height: 1.9rem;
    padding: 0.4rem 0 !important;
    border: 0 !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.06);
    text-align: right !important;
    white-space: normal !important;
    overflow-wrap: break-word;
    background: #fff !important;
  }

  .assessment-overview-table tbody td:last-child,
  #assessmentDashboardAnalysisModal table tbody td:last-child,
  #assessmentTemplateLearnersModal table tbody td:last-child {
    border-bottom: 0;
  }

  .assessment-overview-table tbody td::before,
  #assessmentDashboardAnalysisModal table tbody td::before,
  #assessmentTemplateLearnersModal table tbody td::before {
    content: attr(data-mobile-label);
    justify-self: start;
    text-align: left;
    font-size: 0.68rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6b7280;
  }

  .assessment-overview-table tbody tr td:only-child,
  #assessmentDashboardAnalysisModal table tbody tr td:only-child,
  #assessmentTemplateLearnersModal table tbody tr td:only-child {
    display: block;
    padding-top: 0;
    text-align: center;
  }

  .assessment-overview-table tbody tr td:only-child::before,
  #assessmentDashboardAnalysisModal table tbody tr td:only-child::before,
  #assessmentTemplateLearnersModal table tbody tr td:only-child::before {
    content: none;
  }

  .assessment-overview-table tbody tr .assessment-overview-empty-state {
    display: flex !important;
    align-items: center;
    justify-content: center !important;
    width: 100% !important;
    min-height: 5.5rem;
    padding: 1rem !important;
    text-align: center !important;
  }

  .assessment-overview-table td:nth-child(1)::before { content: "Assessment Name"; }
  .assessment-overview-table td:nth-child(2)::before { content: "Type"; }
  .assessment-overview-table td:nth-child(3)::before { content: "Programme"; }
  .assessment-overview-table td:nth-child(4)::before { content: "Assigned"; }
  .assessment-overview-table td:nth-child(5)::before { content: "Submitted"; }
  .assessment-overview-table td:nth-child(6)::before { content: "Average Score"; }
  .assessment-overview-table td:nth-child(7)::before { content: "Pass Rate"; }
  .assessment-overview-table td:nth-child(8)::before { content: "Status"; }
  .assessment-overview-table td:nth-child(9)::before { content: "Last Submission"; }
  .assessment-overview-table td:nth-child(10)::before { content: "Actions"; }

  #assessmentDashboardAnalysisModal table td:nth-child(1)::before { content: "Learner"; }
  #assessmentDashboardAnalysisModal table td:nth-child(2)::before { content: "Score"; }
  #assessmentDashboardAnalysisModal table td:nth-child(3)::before { content: "Status"; }
  #assessmentDashboardAnalysisModal table td:nth-child(4)::before { content: "Submitted"; }
  #assessmentDashboardAnalysisModal table td:nth-child(5)::before { content: "Assigned via"; }

  #assessmentTemplateLearnersModal table td:nth-child(1)::before { content: "#"; }
  #assessmentTemplateLearnersModal table td:nth-child(2)::before { content: "Learner"; }
  #assessmentTemplateLearnersModal table td:nth-child(3)::before { content: "Email"; }
  #assessmentTemplateLearnersModal table td:nth-child(4)::before { content: "Assessment"; }
  #assessmentTemplateLearnersModal table td:nth-child(5)::before { content: "Status"; }
  #assessmentTemplateLearnersModal table td:nth-child(6)::before { content: "Attempt"; }
  #assessmentTemplateLearnersModal table td:nth-child(7)::before { content: "Score"; }
  #assessmentTemplateLearnersModal table td:nth-child(8)::before { content: "Action"; }
}

/* ==========================================================================
   Manage Forms: "Create/Edit Dynamic Form" modal (#dynamicFormModal,
   Vue-rendered by dynamic_form_dashboard.js).
   - Footer: "Add Section" sits on the left and a second wrapper with the
     "Create Form"/"Update Form" submit button sits on the right via
     justify-content-between -- on a phone the two together are wider than
     the modal, and the right-hand pill was getting clipped past the
     modal's edge. Stretching both to 100% width fixed the clipping but
     made them look oversized as tall stadium pills, which is worse --
     instead just let them wrap onto their own row at their normal compact
     size (flex-wrap, centered) so nothing overflows without inflating them.
   - "Add Fields" (and its sibling toggle buttons: Save/Cancel, Add Option,
     Show Default Fields) use the same compact .btn-sm text-xs py-1 px-2
     styling -- comfortable to read but under a good ~34px tap target on a
     touchscreen. Bump min-height only, keep their natural width. */
@media (max-width: 767.98px) {
  #dynamicFormModal .modal-footer {
    flex-wrap: wrap;
    justify-content: center !important;
    row-gap: 0.6rem;
  }

  #dynamicFormModal .modal-footer > div {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }

  #dynamicFormModal .btn {
    min-height: 34px;
  }
}

.program-subject-comments-modal .modal-content {
    border-radius: 1rem;
    overflow: hidden;
}

.program-subject-comments-modal .modal-header {
    padding: 0.85rem 1.1rem;
}

.program-subject-comments-modal .modal-header .btn-close {
    width: 1.85rem;
    height: 1.85rem;
    padding: 0;
    margin: 0;
    opacity: 1;
    border-radius: 999px;
    background-color: hsl(0 0% 100% / 18%);
    background-size: 0.7rem;
}

.program-subject-comments-modal .program-subject-comments-title {
    font-size: 0.95rem;
}

.program-subject-comment-history {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    max-height: 50vh;
    overflow-y: auto;
    scroll-behavior: smooth;
    padding: 0.75rem 0.25rem;
}

.program-subject-comment-row {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    max-width: 100%;
}

.program-subject-comment-avatar {
    width: 2.1rem;
    height: 2.1rem;
    flex: 0 0 2.1rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: color-mix(in srgb, var(--primary-color, #0d6efd) 22%, #fff 78%);
    color: var(--primary-color, #0d6efd);
}

.program-subject-comment-row[data-role="teacher"] .program-subject-comment-avatar {
    background: color-mix(in srgb, #0d9488 22%, #fff 78%);
    color: #0d9488;
}

.program-subject-comment-row[data-role="admin"] .program-subject-comment-avatar {
    background: color-mix(in srgb, #dc2626 22%, #fff 78%);
    color: #dc2626;
}

.program-subject-comment-column {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    min-width: 0;
    max-width: 100%;
    flex: 1 1 auto;
}

.program-subject-comment-meta {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 0.35rem;
    font-size: 0.72rem;
    padding: 0 0 0.15rem;
}

.program-subject-comment-author {
    font-weight: 700;
    color: #111827;
}

.program-subject-comment-role {
    font-size: 0.65rem;
    font-weight: 600;
    color: #9ca3af;
    white-space: nowrap;
}

.program-subject-comment-time {
    font-size: 0.65rem;
    color: #9ca3af;
}

.program-subject-comment-time::before {
    content: "\00b7";
    margin-right: 0.35rem;
}

.program-subject-comment-reply-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.15rem 0.6rem;
    margin-bottom: 0.3rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--primary-color, #0d6efd) 12%, #fff 88%);
    color: var(--primary-color, #0d6efd);
    font-size: 0.65rem;
    font-weight: 600;
}

.program-subject-comment-bubble {
    padding: 0;
    border-radius: 0;
    background: transparent;
}

.program-subject-comment-body {
    font-size: 0.8rem;
    line-height: 1.4;
    color: #1f2937;
    word-break: break-word;
}

.program-subject-comment-footer {
    display: flex;
    align-items: center;
    margin-top: 0.35rem;
}

.program-subject-comment-reply-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--primary-color, #0d6efd);
}

.program-subject-comment-reply-btn:hover,
.program-subject-comment-reply-btn:focus {
    text-decoration: underline;
}

.program-subject-comment-composer {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-top: 0.75rem;
    margin-top: 0.5rem;
    border-top: 1px solid #e9ecef;
}

.program-subject-comment-composer-avatar {
    background: color-mix(in srgb, var(--primary-color, #0d6efd) 22%, #fff 78%);
    color: var(--primary-color, #0d6efd);
}

.program-subject-comment-composer .program-subject-comment-input {
    flex: 1;
    resize: none;
    border-radius: 1.1rem;
    max-height: 6rem;
}

.program-subject-comment-clear,
.program-subject-comment-save {
    width: 2.15rem;
    height: 2.15rem;
    padding: 0;
    flex-shrink: 0;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
}

.program-subject-comment-clear {
    background: #f1f3f5;
    color: #6c757d;
}

.program-subject-comment-clear:hover {
    background: #e9ecef;
    color: #495057;
}

.program-subject-comment-save {
    background: var(--primary-color, #0d6efd);
    color: #fff;
}

.program-subject-comment-save:disabled {
    opacity: 0.6;
}

/* Platform theme management */
.platform-theme-content-ui {
    background: #f5f6fa;
    min-height: calc(100vh - 3.5rem);
}

body.platform-theme-page .platform-theme-content-ui {
    margin-top: -7px !important;
}

.platform-theme-shell {
    background: #fff;
    border: 1px solid #edf0f6;
    border-radius: 0.9rem;
    box-shadow: 0 1rem 2rem rgba(18, 24, 40, 0.06);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 0 auto;
    max-width: none;
    padding: 0.75rem;
    width: 100%;
}

.platform-theme-topbar,
.platform-theme-header,
.platform-theme-section,
.platform-theme-preview,
.platform-theme-actions {
    background: #fff;
    border: 1px solid #dfe5ef;
    border-radius: 0.35rem;
    box-shadow: none;
}

.platform-theme-topbar {
    align-items: center;
    display: flex;
    justify-content: space-between;
    min-height: 3.1rem;
    padding: 0.65rem 0.9rem;
}

.platform-theme-back,
.platform-theme-scope-pill {
    align-items: center;
    display: inline-flex;
    gap: 0.45rem;
}

.platform-theme-back {
    color: var(--text-dark, #1d1d1f);
    font-size: 0.74rem;
    font-weight: 700;
    text-decoration: none;
}

.platform-theme-back:hover {
    color: var(--primary-color, #300067);
}

.platform-theme-scope-pill {
    background: color-mix(in srgb, var(--primary-color, #300067) 9%, #fff 91%);
    border: 1px solid color-mix(in srgb, var(--primary-color, #300067) 18%, #d1d5db 82%);
    border-radius: 999px;
    color: var(--primary-color, #300067);
    font-size: 0.68rem;
    font-weight: 800;
    max-width: min(22rem, 55vw);
    overflow: hidden;
    padding: 0.34rem 0.65rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.platform-theme-header {
    align-items: flex-start;
    display: flex;
    justify-content: space-between;
    min-height: 5.55rem;
    padding: 1rem;
}

.platform-theme-kicker {
    color: var(--primary-color, #300067);
    font-size: 0.66rem;
    font-weight: 800;
    text-transform: uppercase;
}

.platform-theme-alerts {
    display: grid;
    gap: 0.5rem;
}

.platform-theme-layout {
    align-items: start;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 19.25rem);
}

.platform-theme-section {
    padding: 0.75rem 0.85rem;
}

.platform-theme-section-heading {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.65rem;
}

.platform-theme-section-heading span {
    color: #6b7280;
    font-size: 0.66rem;
    font-weight: 700;
}

.platform-theme-color-grid {
    display: grid;
    gap: 0.55rem 0.75rem;
    grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
}

.platform-theme-color-field,
.platform-theme-asset-field {
    display: grid;
    gap: 0.4rem;
    min-width: 0;
}

.platform-theme-field-label {
    color: var(--text-dark, #1d1d1f);
    font-size: 0.66rem;
    font-weight: 800;
}

.platform-theme-color-control {
    align-items: center;
    border: 1px solid #dfe3ea;
    border-radius: 0.25rem;
    display: grid;
    grid-template-columns: 2.15rem minmax(0, 1fr);
    min-height: 2rem;
    overflow: hidden;
}

.platform-theme-color-control input[type="color"] {
    appearance: none;
    background: transparent;
    border: 0;
    cursor: pointer;
    height: 2rem;
    padding: 0.2rem;
    width: 2.15rem;
}

.platform-theme-color-control input[type="text"],
.platform-theme-asset-field input[type="text"] {
    border: 0;
    color: #666;
    font-size: 0.72rem;
    min-width: 0;
    outline: none;
    padding: 0.45rem 0.55rem;
    width: 100%;
}

.platform-theme-color-control input[type="text"].is-invalid {
    background: #fff1f2;
    color: #b91c1c;
}

.platform-theme-asset-grid {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(6, minmax(0, 1fr));
}

.platform-theme-asset-control {
    border: 1px solid #dfe3ea;
    border-radius: 0.25rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 2rem;
    min-height: 2rem;
    overflow: hidden;
}

.platform-theme-asset-field input[type="text"] {
    border: 1px solid #dfe3ea;
    border-width: 0 1px 0 0;
    border-radius: 0;
    min-height: 2rem;
}

.platform-theme-upload-button {
    align-items: center;
    background: #fff;
    color: var(--primary-color, #300067);
    cursor: pointer;
    display: inline-flex;
    font-size: 0.9rem;
    justify-content: center;
    margin: 0;
    min-height: 2rem;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.platform-theme-upload-button:hover {
    background: color-mix(in srgb, var(--primary-color, #300067) 8%, #fff 92%);
    color: var(--btn-color, #6918b4);
}

.platform-theme-file-input {
    display: none;
}

.platform-theme-preview {
    background: #a9c1f5;
    overflow: hidden;
    position: relative;
}

.platform-theme-preview-nav {
    align-items: center;
    background: var(--navbar-bg-color, #b2c9ff);
    display: flex;
    justify-content: space-between;
    min-height: 3.25rem;
    padding: 0.65rem 0.85rem;
}

.platform-theme-preview-logo {
    align-items: center;
    background: rgba(255, 255, 255, 0.88);
    border-radius: 0.35rem;
    display: inline-flex;
    height: 2rem;
    justify-content: center;
    padding: 0.3rem 0.55rem;
    width: 5.8rem;
}

.platform-theme-preview-logo img {
    max-height: 1.35rem;
    max-width: 4.8rem;
    object-fit: contain;
}

.platform-theme-preview-nav > span {
    background: var(--profile-menu-bg-color, var(--primary-color, #300067));
    border-radius: 999px;
    display: block;
    height: 1.65rem;
    width: 1.65rem;
}

.platform-theme-preview-body {
    background: var(--color-bg, #f5f6fa);
    display: grid;
    grid-template-columns: 3.85rem minmax(0, 1fr);
    min-height: 13.9rem;
}

.platform-theme-preview-sidebar {
    background: var(--sidebar-color, var(--navbar-bg-color, #b2c9ff));
    display: grid;
    gap: 0.42rem;
    align-content: start;
    padding: 0.8rem 0.6rem;
}

.platform-theme-preview-sidebar span {
    background: rgba(255, 255, 255, 0.82);
    border-radius: 999px;
    display: block;
    height: 0.35rem;
}

.platform-theme-preview-main {
    background: var(--color-card, #fff);
    display: grid;
    gap: 0.58rem;
    margin: 0.85rem;
    padding: 0.8rem;
}

.platform-theme-preview-title {
    background: var(--text-dark, #1d1d1f);
    border-radius: 999px;
    height: 0.62rem;
    width: 54%;
}

.platform-theme-preview-row {
    background: color-mix(in srgb, var(--text-secondary, #666) 24%, #fff 76%);
    border-radius: 999px;
    height: 0.45rem;
    width: 84%;
}

.platform-theme-preview-row.short {
    width: 62%;
}

.platform-theme-preview-main button {
    background: var(--btn-color, #6918b4);
    border: 1px solid var(--btn-outline-primary-border, var(--primary-color, #300067));
    border-radius: 0.25rem;
    color: var(--btn-outline-primary-text, #fff);
    font-size: 0.66rem;
    font-weight: 800;
    justify-self: start;
    min-height: 1.95rem;
    padding: 0 0.75rem;
}

.platform-theme-preview-table {
    border: 1px solid #e5e7eb;
    border-radius: 0.25rem;
    display: grid;
    gap: 0.45rem;
    overflow: hidden;
    padding-bottom: 0.55rem;
}

.platform-theme-preview-table div {
    background: var(--table-header-color, #2b333f);
    height: 1.55rem;
}

.platform-theme-preview-table span {
    background: #edf0f5;
    border-radius: 999px;
    display: block;
    height: 0.42rem;
    margin: 0 0.62rem;
}

/* DataTables adds some assessment headers after the initial markup. Keep the
   original and generated cells on the same platform header colour. */
#course_assessments_table > thead > tr > th,
#course_assessments_table > thead > tr > td,
#standalone_assessments_table > thead > tr > th,
#standalone_assessments_table > thead > tr > td,
#ai_assessments_table > thead > tr > th,
#ai_assessments_table > thead > tr > td,
#extract_question_paper_table > thead > tr > th,
#extract_question_paper_table > thead > tr > td,
#content_assessments_table > thead > tr > th,
#content_assessments_table > thead > tr > td {
    background: var(--bg-card-purple, var(--primary-color, #8f469b)) !important;
    color: #fff !important;
    border-color: transparent !important;
}

.platform-theme-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 0.75rem;
    padding: 0.65rem 0.75rem;
}

.platform-theme-actions .btn {
    align-items: center;
    display: inline-flex;
    gap: 0.4rem;
    font-weight: 800;
    min-height: 2rem;
}

@media (min-width: 1600px) {
    .platform-theme-color-grid {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}

@media (max-width: 1199.98px) {
    .platform-theme-layout {
        grid-template-columns: 1fr;
    }

    .platform-theme-preview {
        position: static;
    }

    .platform-theme-asset-grid {
        grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    }
}

@media (max-width: 767.98px) {
    body.platform-theme-page .platform-theme-content-ui {
        margin-top: 0.55rem !important;
    }
}

@media (max-width: 575.98px) {
    .platform-theme-topbar,
    .platform-theme-header,
    .platform-theme-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .platform-theme-scope-pill {
        max-width: 100%;
    }
}

/* Styles for the Practicals feature (dashboard, task list, task form,
   submissions, code editor setup). Colors are sourced entirely from the
   platform's existing theme variables -- no hardcoded hex values here. */

.practicals-card-surface {
  background: var(--primary-color) !important;
  border-radius: 11px;
  background-repeat: no-repeat;
  background-size: cover;
}

.practicals-code-textarea {
  font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
  font-size: 0.85rem;
  background: #1e1e2e;
  color: #f8f8f2;
  border-radius: 6px;
  border: 1px solid var(--grey-border, #444);
}

.practicals-subtask-row {
  margin-bottom: 0.5rem;
}

.practicals-empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-secondary, #666);
}

.practicals-empty-state .bi {
  font-size: 2.5rem;
  color: var(--primary-color);
  margin-bottom: 0.75rem;
  display: inline-block;
}

/* Submissions accordion: expands below the Practicals dashboard card row
   (see practicals_management.js bindSubmissionsAccordion) rather than
   swapping into the shared .practicals-module-panels area the other 3
   cards use. */
.practicals-submissions-accordion {
  margin-top: 0.75rem;
  padding: 0;
  border: 0;
  border-radius: 1.5rem 1.5rem 0 0;
  background: transparent;
  overflow: hidden;
}

/* Note: the practicals-section-tabs cards used to carry their own
   aria-selected-based border/outline/box-shadow overrides here for the old
   bg-blue-wave design. They now reuse the plain .programme-state-card-link
   is-active/is-faded styling (see the unscoped rules above, shared with the
   Course/Assessment module cards) instead, so no page-specific override is
   needed to match. */

/* ==========================================================================
   Unified top navbar. Merges .profile-menu + .top-learning-navbar (platform)
   / .top-34 (assist) into a single compact bar. Additive: applied via new
   .app-topnav* classes alongside the existing .profile-menu element so the
   width-sync/hide-rule selectors already keyed on .profile-menu keep working
   unchanged. Colors are theme-aware via existing --primary-color where the
   client's brand accent should still show (avatar, role pill).
   ========================================================================== */

:root {
  --topnav-height: 77px;
  --topnav-height-mobile: 56px;
  --topnav-bg: var(--navbar-bg-color, var(--profile-menu-bg-color, var(--primary-color)));
  --topnav-text: var(--profile-menu-text-color, #fff);
  --topnav-muted: rgba(255, 255, 255, 0.75);
  --topnav-border: rgba(255, 255, 255, 0.18);
}

.app-topnav {
  --topnav-bg: var(--navbar-bg-color, var(--profile-menu-bg-color, var(--primary-color)));
  --topnav-text: var(--profile-menu-text-color, #fff);
  top: 0;
  height: var(--topnav-height);
  min-height: var(--topnav-height);
  display: flex;
  align-items: center;
  gap: 1rem;
  background: var(--topnav-bg) !important;
  background-image: none !important;
  border-bottom: 1px solid var(--topnav-border);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  padding: 0 1rem;
  /* .z-99 (utility class, z-index:99) sits below .sidebar (z-index:106),
     which caps any dropdown nested in here to that same stacking context
     -- bump above both so the profile/notification dropdowns aren't
     trapped behind the sidebar. */
  z-index: 1040 !important;
}

.app-topnav .container-fluid {
  height: 100%;
  display: flex;
  align-items: center;
  padding-left: 0;
  padding-right: 0;
}

.app-topnav .row {
  width: 100%;
  height: 100%;
  align-items: center;
  margin: 0;
}

.app-topnav i,
.app-topnav svg,
.app-topnav .text-white,
.app-topnav .btn-link {
  color: var(--topnav-text) !important;
  fill: var(--topnav-text) !important;
}

/* Use the header's foreground/background pair on light and dark tenant bars. */
.app-topnav .btn-outline-primary {
  color: var(--topnav-text) !important;
  border-color: currentColor !important;
}

.app-topnav .btn-outline-primary:hover,
.app-topnav .btn-outline-primary:focus {
  color: var(--topnav-bg) !important;
  background-color: var(--topnav-text) !important;
  border-color: var(--topnav-text) !important;
}

.app-topnav__context .btn-outline-primary i {
  color: inherit !important;
}

.app-topnav__row {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 1rem;
  position: relative;
}

.app-topnav__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
  order: 1;
}

.app-topnav__brand-copy {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.app-topnav__brand-copy .client-logo,
.app-topnav__brand-copy .app-topnav__brand-logo {
  width: auto;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

.app-topnav__greeting {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1.05;
}

.app-topnav__greeting-title {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--topnav-text);
}

.app-topnav__greeting-day,
.app-topnav__greeting-time {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--topnav-muted);
  line-height: 1.05;
}

.app-topnav__greeting-time {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.app-topnav__context {
  order: 2;
  flex-shrink: 0;
}

.app-topnav__search {
  /* Participate in the row/grid so search cannot cover account controls. */
  position: relative;
  flex: 1 1 20rem;
  width: 100%;
  display: flex;
  justify-content: center;
  order: 3;
  align-items: center;
  z-index: 2;
  min-width: 0;
}

/* Reset the older, absolutely centered widget inside the shared header. */
.app-topnav__search .top-global-search {
  position: static;
  transform: none;
  min-width: 0;
  display: flex !important;
  justify-content: center;
  width: 100%;
}

.app-topnav__search .top-global-search,
.app-topnav__search .search-container {
  width: 100% !important;
  max-width: 100% !important;
}

.app-topnav__search .search-icon {
  color: #475569 !important;
  font-size: 0.9rem !important;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-topnav__search .search-input {
  height: 28px;
  width: 100%;
  min-width: 0;
  padding: 0 0.9rem 0 2.35rem;
  font-size: 0.85rem;
}

/* Divider between the notification bell and the profile trigger. */
.app-topnav .notification-bell-wrap {
  padding-right: 1rem;
  margin-right: 0.25rem;
  border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.app-topnav__actions {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-shrink: 0;
  margin-left: auto;
  order: 4;
  justify-content: flex-end;
}

/* Avatar (initials) */
.app-topnav__avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff !important;
  background: var(--primary-color, #300067);
  flex-shrink: 0;
  line-height: 1;
}

/* On the bar itself the avatar keeps the primary-color fill (matching the
   bar), with a light ring so it still reads as a distinct control. */
.app-topnav__profile-trigger .app-topnav__avatar {
  border: 2px solid rgba(255, 255, 255, 0.7);
}

.app-topnav__profile-trigger {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 0.25rem 0.5rem;
  border-radius: 8px;
  cursor: pointer;
}

.app-topnav__profile-trigger:hover {
  background: rgba(255, 255, 255, 0.16);
}

.app-topnav__profile-trigger.dropdown-toggle::after {
  display: none;
}

.app-topnav__profile-name {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  text-align: left;
}

.app-topnav__profile-name .name {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--topnav-text);
}

.app-topnav__profile-name .role {
  font-size: 0.7rem;
  color: var(--topnav-muted);
}

.app-topnav__profile-trigger .chevron {
  font-size: 0.7rem;
  color: var(--topnav-muted) !important;
}

/* Profile dropdown card. z-index/margin bumped above the bar's own
   stacking context (.z-99 on .app-topnav, .sidebar at z-index:106) and
   above sibling action buttons -- without this the panel could render
   behind/flush against the trigger row instead of clearly overlaying it. */
.app-topnav__profile-card {
  position: absolute !important;
  top: 100% !important;
  right: 0 !important;
  left: auto !important;
  width: 260px;
  padding: 0;
  margin-top: 0.5rem !important;
  z-index: 1055 !important;
  border: 1px solid var(--topnav-border);
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.18);
  overflow: hidden;
}

/* Keep the header action buttons above the open notification panel so the
   dropdown does not cover the bell or cart controls. */
.app-topnav__actions > button.cart-btn,
.app-topnav__actions #notificationDropdown {
  position: relative;
  z-index: 1066 !important;
}

/* --- Brand SVG icons for the three top-nav action controls (messages, cart,
   notifications). The three controls share one box size so they sit on a
   single baseline via the flex row's align-items:center. --- */
.app-topnav__nav-icon {
  width: 44px;
  height: 44px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  pointer-events: none;
}

.app-topnav__actions .app-topnav__icon-button,
.app-topnav__actions button.cart-btn,
.app-topnav__actions #notificationDropdown {
  width: 52px;
  height: 52px;
  min-width: 52px;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  position: relative;
  transition: background-color 0.15s ease;
}

.app-topnav__actions .app-topnav__icon-button:hover,
.app-topnav__actions button.cart-btn:hover,
.app-topnav__actions #notificationDropdown:hover {
  background: rgba(255, 255, 255, 0.16);
}

.app-topnav__actions button.cart-btn {
  /* Beat the legacy mobile `button.cart-btn { margin: 0.25rem !important }`
     so the cart lines up on the same rhythm as the other two controls. */
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* "New updates" count for cart / notifications: a plain bold number in the
   brand colour, tucked tight against the icon glyph's top-right corner. No
   pill / badge background. Always rendered -- shows "0" when there is nothing
   new. The `.badge` class stays on the notification count for the
   decrementUnreadBadges() JS hook, so the flat look is forced here with
   !important to beat Bootstrap's `.badge`. */
.app-topnav__actions .app-topnav__nav-count {
  position: absolute;
  top: 2px;
  right: 2px;
  display: inline;
  min-width: 0;
  height: auto;
  padding: 0 !important;
  margin: 0;
  border: 0;
  border-radius: 0 !important;
  background: none !important;
  color: var(--primary-color) !important;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
  pointer-events: none;
}

/* Safety net -- the markup always emits a number now. */
.app-topnav__actions .app-topnav__nav-count:empty {
  display: none;
}

/* The count is absolutely positioned against the action button, but the bell
   glyph is drawn much narrower than that box (its cap/nub only reaches ~2/3 of
   the way across), so the shared `right: 2px` leaves the number stranded well
   clear of the bell -- unlike the cart, whose artwork nearly fills its box.
   Pull the bell's number back in so it hugs the glyph's top-right the way the
   cart number does. The icon shrinks on small screens but the button doesn't,
   so the pull-in is smaller there. ID in the selector keeps this above the
   legacy `.profile-menu .badge { right: -10px }` rule without !important. */
@media (min-width: 768px) {
  .app-topnav__actions #notificationDropdown > .app-topnav__nav-count {
    top: 2px;
    right: 13px;
  }
}
@media (max-width: 767.98px) {
  .app-topnav__actions #notificationDropdown > .app-topnav__nav-count {
    top: 6px;
    right: 18px;
  }
}

.app-topnav__profile-card-header {
  background: var(--primary-color);
  color: #fff;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.4rem;
  border-top-left-radius: inherit;
  border-top-right-radius: inherit;
}

.app-topnav__profile-card-header .app-topnav__avatar {
  width: 56px;
  height: 56px;
  font-size: 1.1rem;
}

.app-topnav__profile-card-header .name {
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
}

.app-topnav__profile-card-header .email {
  font-size: 0.75rem;
  color: #fff;
  word-break: break-all;
}

.app-topnav__profile-card-header .role-pill {
  background: var(--primary-color, #300067);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.75rem;
  border-radius: 999px;
  margin-top: 0.2rem;
}

.app-topnav__profile-card-body {
  padding: 0.5rem;
  /* Belt-and-braces: the card itself clips to its border-radius via
     overflow: hidden, but this body panel paints its own opaque
     background right up to the card's bottom edge. Round and clip it
     too so the bottom corners can't render square if anything upstream
     (a scrollable state, a theme override) ever stops the outer clip
     from taking effect. */
  overflow: hidden;
  border-bottom-left-radius: inherit;
  border-bottom-right-radius: inherit;
}

.app-topnav__profile-action {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: none;
  background: transparent;
  color: #1f2937;
  font-size: 0.8rem;
  text-decoration: none;
}

.app-topnav__profile-action i {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #f3f4f6;
  font-size: 0.85rem;
}

.app-topnav__profile-action i.bg-outline-primary {
  background: var(--primary-color) !important;
  color: #fff !important;
}

.app-topnav__profile-action:hover {
  background: #f3f4f6;
  color: #1f2937;
}

.app-topnav__profile-action.sign-out {
  color: #000;
}

.app-topnav__profile-action.sign-out i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.app-topnav__profile-action.sign-out:hover {
  background: #fef2f2;
  color: #000;
}

/* Keep the Sign out icon's own badge matching View Profile's -- only
   the row's text/hover state is red, not
   the icon badge. */
.app-topnav__profile-action.sign-out i.bg-outline-primary,
body.theme-aic1 .app-topnav__profile-action.sign-out i.bg-outline-primary {
  background: var(--primary-color) !important;
  color: #fff !important;
}

/* Divider between the account actions and Sign out. */
.app-topnav__profile-card-body form {
  margin-top: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid #e5e7eb;
}

body.theme-aic1 .profile-menu.app-topnav {
  --topnav-bg: #f8fafc;
  --topnav-text: #0f172a;
  --topnav-muted: #64748b;
  --topnav-border: #dbe2ea;
  background: var(--topnav-bg) !important;
  color: var(--topnav-text);
  overflow: visible;
  box-shadow: inset 0 4px 0 #363636, 0 1px 0 rgba(15, 23, 42, 0.06);
  border-bottom: 1px solid var(--topnav-border);
}

body.theme-aic1 .app-topnav .container-fluid {
  padding-inline: 1rem;
}

body.theme-aic1 .app-topnav__row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 1.5rem;
}

body.theme-aic1 .app-topnav__brand {
  gap: 0.9rem;
  min-width: 0;
}

body.theme-aic1 .app-topnav__brand-copy {
  gap: 0.75rem;
}

body.theme-aic1 .app-topnav__brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  flex-shrink: 0;
}

body.theme-aic1 .app-topnav__greeting {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  line-height: 1.05;
}

body.theme-aic1 .app-topnav__greeting-title {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

body.theme-aic1 .app-topnav__greeting-day,
body.theme-aic1 .app-topnav__greeting-time {
  font-size: 0.68rem;
  font-weight: 700;
  color: #475569;
  line-height: 1.05;
}

body.theme-aic1 .app-topnav__greeting-time {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

body.theme-aic1 .app-topnav__search {
  justify-content: center;
}

body.theme-aic1 .app-topnav__context {
  display: none !important;
}

body.theme-aic1 .app-topnav__search .top-global-search,
body.theme-aic1 .app-topnav__search .search-container {
  width: 100% !important;
  max-width: 100% !important;
}

body.theme-aic1 .app-topnav__search .search-icon {
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: #475569 !important;
  font-size: 0.9rem !important;
}

body.theme-aic1 .app-topnav__search .search-input {
  height: 28px;
  padding: 0 0.9rem 0 2.35rem;
  border-radius: 999px;
  border: 1px solid #d9dee7;
  background: #fff;
  color: #0f172a;
  font-size: 0.85rem;
  text-align: left;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

body.theme-aic1 .app-topnav__search .search-input::placeholder {
  color: #64748b;
}

body.theme-aic1 .app-topnav__search .search-container .dropdown {
  width: min(760px, calc(100vw - 32px)) !important;
  max-width: min(760px, calc(100vw - 32px)) !important;
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%);
  margin-top: 0.6rem !important;
  z-index: 1080;
}

body.theme-aic1 .app-topnav__search,
body.theme-aic1 .app-topnav__search .top-global-search,
body.theme-aic1 .app-topnav__search .search-container {
  overflow: visible;
}

@media (max-width: 900px) {
  body.theme-aic1 .app-topnav__search .search-container .dropdown {
    left: 0 !important;
    transform: none;
    width: min(100%, calc(100vw - 24px)) !important;
    max-width: min(100%, calc(100vw - 24px)) !important;
  }

  body.theme-aic1 .global-search-card-header {
    display: flex;
    flex-direction: column;
  }

  body.theme-aic1 .search-container .global-search-actions {
    justify-content: flex-start;
    width: 100%;
    margin-left: 0;
  }
}

body.theme-aic1 .app-topnav__actions {
  gap: 0.35rem;
  margin-left: 0;
  justify-self: end;
}

body.theme-aic1 .app-topnav__icon-button,
body.theme-aic1 .app-topnav__actions button.cart-btn,
body.theme-aic1 #notificationDropdown {
  width: 52px;
  height: 52px;
  min-width: 52px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0f172a !important;
  transition: background-color 0.15s ease, color 0.15s ease;
}

body.theme-aic1 .app-topnav__icon-button:hover,
body.theme-aic1 .app-topnav__actions button.cart-btn:hover,
body.theme-aic1 #notificationDropdown:hover {
  background: #eef2f7;
}

body.theme-aic1 .app-topnav__message-button i,
body.theme-aic1 #notificationDropdown i {
  font-size: 1rem;
}

body.theme-aic1 .notification-bell-wrap {
  z-index: 1062;
  overflow: visible;
}

body.theme-aic1 .app-topnav__profile-dropdown {
  padding-left: 1rem;
  border-left: 1px solid #dbe2ea;
  margin-left: 0.35rem;
}

body.theme-aic1 .app-topnav__profile-trigger {
  gap: 0.65rem;
  padding: 0.35rem 0.7rem 0.35rem 0.45rem;
  background: #fff;
  border: 2px solid #dc3545;
  border-radius: 20px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.95), 0 6px 16px rgba(15, 23, 42, 0.08);
}

body.theme-aic1 .app-topnav__profile-trigger:hover {
  background: #fff;
}

body.theme-aic1 .app-topnav__profile-trigger .app-topnav__avatar {
  width: 40px;
  height: 40px;
  font-size: 0.82rem;
  background: linear-gradient(135deg, #8b0000 0%, #250000 100%);
  color: #fff !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

body.theme-aic1 .app-topnav__profile-name {
  gap: 0.05rem;
}

.app-topnav__profile-name {
  min-width: 0;
  max-width: 12rem;
}

.app-topnav__profile-name .name,
.app-topnav__profile-name .role {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (min-width: 768px) {
  /* The legacy search widget switches off at 799px, before this shell switches. */
  .app-topnav__search .global-search-md {
    display: block;
  }
}

@media (min-width: 768px) and (max-width: 1199.98px) {
  .app-topnav__profile-name {
    display: none;
  }
}

body.theme-aic1 .app-topnav__profile-name .name {
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 800;
}

body.theme-aic1 .app-topnav__profile-name .role {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 600;
}

body.theme-aic1 .app-topnav__profile-trigger .chevron {
  color: #94a3b8 !important;
  font-size: 0.82rem;
}

body.theme-aic1 .app-topnav__profile-card {
  width: min(18.5rem, calc(100vw - 1rem));
  border: none;
  border-radius: 20px;
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.22);
  margin-top: 0.75rem;
}

body.theme-aic1 .app-topnav__profile-card-header {
  background: var(--primary-color);
  padding: 1.45rem 1.15rem 1.2rem;
  gap: 0.4rem;
}

body.theme-aic1 .app-topnav__profile-card-header .app-topnav__avatar {
  width: 60px;
  height: 60px;
  font-size: 1.15rem;
  background: #fff;
  color: #0f172a !important;
}

body.theme-aic1 .app-topnav__profile-card-header .name {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
}

body.theme-aic1 .app-topnav__profile-card-header .email {
  color: #fff;
  font-size: 0.82rem;
}

body.theme-aic1 .app-topnav__profile-card-header .role-pill {
  background: #ef4454;
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.22rem 0.75rem;
}

body.theme-aic1 .app-topnav__profile-card-body {
  padding: 0.4rem 0;
  background: #fff;
}

body.theme-aic1 .app-topnav__profile-action {
  padding: 0.95rem 1.15rem;
  border-radius: 0;
  font-size: 0.95rem;
  color: #334155;
}

body.theme-aic1 .app-topnav__profile-action i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  line-height: 1;
  flex-shrink: 0;
  border-radius: 8px;
  color: #64748b;
}

body.theme-aic1 .app-topnav__profile-action i.bg-outline-primary {
  color: #fff !important;
}

body.theme-aic1 .app-topnav__profile-action:hover {
  background: #f8fafc;
}

body.theme-aic1 .app-topnav__profile-card-body form {
  margin: 0;
  border-top: 1px solid #e5e7eb;
}

body.theme-aic1 .app-topnav__profile-action.sign-out {
  color: #000;
}

body.theme-aic1 .app-topnav__profile-action.sign-out i {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-color) !important;
  color: #fff !important;
}

body.theme-aic1 .app-topnav__profile-action.sign-out:hover {
  background: #fff1f2;
  color: #000;
}

body.theme-aic1 .sidebar-icon-menu {
  display: none !important;
}

body.theme-aic1 .app-topnav .text-white,
body.theme-aic1 .app-topnav i,
body.theme-aic1 .app-topnav svg {
  color: #0f172a !important;
  fill: #0f172a !important;
}

@media (max-width: 767.98px) {
  /* These learner-page headers are fixed, so anchor them to the viewport
     instead of inheriting space from preceding mobile header controls. */
  body.learner-course-layout .profile-menu.app-topnav,
  body.learner-cart-layout .profile-menu.app-topnav {
    top: 0 !important;
  }

  /* Learner Courses: compact assigned-course cards on phones. */
  body.learner-course-layout #assigned-courses .course_card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    min-height: 104px;
    margin-bottom: 0.65rem !important;
    overflow: hidden;
    border: 1px solid #e1e4ec;
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06) !important;
  }

  body.learner-course-layout #assigned-courses .course_card > .position-relative {
    flex: 0 0 84px;
    width: 84px;
    height: 84px;
    margin: 10px 0 10px 10px;
    overflow: hidden;
    border-radius: 10px;
    background: #dfe4f4;
  }

  body.learner-course-layout #assigned-courses .course_card .custom-image-size {
    width: 100% !important;
    height: 100% !important;
    min-height: 0 !important;
    object-fit: cover;
    border-radius: 10px !important;
  }

  body.learner-course-layout #assigned-courses .course_card > .card-body {
    min-width: 0;
    padding: 0.7rem 0.75rem !important;
  }

  body.learner-course-layout #assigned-courses .course_card .card-title {
    margin-bottom: 0.25rem !important;
    overflow: hidden;
    color: #111827;
    font-size: 0.82rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.learner-course-layout #assigned-courses .course_card .card-text {
    display: -webkit-box;
    margin-bottom: 0.35rem !important;
    overflow: hidden;
    color: #5f6675 !important;
    font-size: 0.68rem;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 1;
  }

  body.learner-course-layout #assigned-courses .course_card .card-body > .mb-2,
  body.learner-course-layout #assigned-courses .course_card .card-body > .d-flex,
  body.learner-course-layout #assigned-courses .course_card .card-body > ul {
    display: none !important;
  }

  body.learner-course-layout #assigned-courses .course_card .mt-auto {
    margin-top: auto !important;
  }

  body.learner-course-layout #assigned-courses .course_card .mt-auto a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto !important;
    margin: 0 !important;
    padding: 0.28rem 0.7rem;
    border: 0;
    border-radius: 8px;
    background: var(--primary-color);
    color: #fff;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
  }

  /* Learner Courses: two equal-width tabs without horizontal scrolling. */
  body.learner-course-layout .learner-course-info-hero > .content-panel {
    margin-bottom: 1.5rem;
  }

  /* Leave scroll clearance for the fixed mobile bottom navigation/app prompt
     so the final course card is never hidden underneath it. */
  body.learner-course-layout .learner-course-info-hero #assigned-courses {
    padding-bottom: calc(17rem + env(safe-area-inset-bottom, 0px));
  }

  body.learner-course-layout .learner-course-info-hero #global-courses {
    padding-bottom: calc(17rem + env(safe-area-inset-bottom, 0px));
  }

  body.learner-course-layout #courseTabs {
    display: flex;
    width: 100%;
    margin: 0 !important;
    padding: 0 0.5rem;
    overflow: visible;
  }

  body.learner-course-layout #courseTabs .nav-item {
    flex: 1 1 50%;
    min-width: 0;
  }

  body.learner-course-layout #courseTabs .nav-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    margin-top: 0 !important;
    padding: 0.65rem 0.25rem 0.55rem;
    overflow: hidden;
    border: 0;
    border-bottom: 2px solid transparent;
    border-radius: 0;
    background: transparent;
    color: #8a8fa0;
    font-size: 0.72rem !important;
    font-weight: 500;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.learner-course-layout #courseTabs .nav-link.active {
    border-bottom-color: var(--primary-color);
    color: #111827;
    font-weight: 700;
  }

  .app-topnav {
    height: var(--topnav-height-mobile);
    min-height: var(--topnav-height-mobile);
    padding: 0 0.5rem;
    gap: 0.5rem;
  }

  /* Brand + greeting + actions are flex-shrink:0 by design (desktop), which
     overflows a phone-width row once the notification bell, platform-switch
     badge, and avatar are all present. Shrink/tighten each cluster so the
     row fits without any item spilling past the viewport edge. */
  .app-topnav__row {
    gap: 0.4rem;
  }

  .app-topnav__brand-copy {
    gap: 0.5rem;
    min-width: 0;
  }

  .app-topnav__brand-copy .client-logo,
  .app-topnav__brand-copy .app-topnav__brand-logo {
    height: 26px;
  }

  .app-topnav__greeting {
    min-width: 0;
  }

  .app-topnav__greeting-title {
    font-size: 0.78rem;
  }

  .app-topnav__greeting-day,
  .app-topnav__greeting-time {
    font-size: 0.6rem;
  }

  .app-topnav__actions {
    gap: 0.5rem;
  }

  .app-topnav .notification-bell-wrap {
    padding-right: 0.5rem;
    margin-right: 0;
  }

  .app-topnav .vr {
    display: none;
  }

  .app-topnav__profile-name {
    display: none;
  }

  .app-topnav__avatar {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
  }

  /* Keep the profile card fully on-screen and fully reachable: clamp its
     width so "right: 0" can never push it past the viewport edge, and cap
     its height with internal scroll so tall content (e.g. a long email)
     can't get cut off below the fold or behind the fixed bottom nav. */
  .app-topnav__profile-card {
    width: calc(100vw - 1.5rem) !important;
    max-width: 320px !important;
    right: 0.25rem !important;
    max-height: calc(100vh - var(--topnav-height-mobile) - 2rem) !important;
    overflow-y: auto !important;
    /* iOS Safari drops border-radius clipping on elements that scroll
       (overflow-y: auto) instead of merely hiding overflow -- the bottom
       corners render square once the box can scroll, even when nothing
       actually overflows. Forcing a mask makes Safari respect the radius
       again on the scroll container itself. */
    -webkit-mask-image: -webkit-radial-gradient(white, black);
  }

  .app-topnav__profile-card-header .app-topnav__avatar {
    width: 56px !important;
    height: 56px !important;
    font-size: 1.1rem !important;
    flex-shrink: 0;
  }

  /* The AIC One theme (body.theme-aic1) styles this same bar with its own
     desktop-sized rules (34px icon buttons, 0.9rem/1.5rem gaps, 40px logo,
     3-column grid) and no mobile variant of its own. Those selectors carry
     higher specificity (body.theme-aic1 .app-topnav__x) than the generic
     .app-topnav__x overrides above, so on a phone they kept winning and the
     bar never actually shrank -- the icon cluster's combined width simply
     exceeded the viewport and got clipped/crowded against the right edge.
     Re-declare the same properties here with the same body.theme-aic1
     prefix so they win on specificity too, scaled down to fit. */
  body.theme-aic1 .app-topnav__row {
    column-gap: 0.4rem;
    height: 56px;
  }

  body.theme-aic1 .app-topnav__brand {
    gap: 0.5rem;
    min-width: 0;
    flex: 1 1 auto;
  }

  body.theme-aic1 .app-topnav__brand-copy {
    gap: 0.5rem;
    margin-left: 0 !important;
    min-width: 0;
  }

  body.theme-aic1 .app-topnav__brand-logo {
    width: 34px;
    height: 34px;
  }

  body.theme-aic1 .app-topnav__greeting-title {
    font-size: 0.78rem;
    white-space: nowrap;
  }

  body.theme-aic1 .app-topnav__greeting-day,
  body.theme-aic1 .app-topnav__greeting-time {
    font-size: 0.6rem;
    white-space: nowrap;
  }

  body.theme-aic1 .app-topnav__greeting {
    flex: 0 0 auto;
    min-width: 6.1rem;
    overflow: visible;
  }

  /* Keep search available on mobile, but move it below the compact brand and
     action row so it does not collide with the notification/profile controls. */
  body.theme-aic1 .app-topnav__search {
    display: flex;
    position: absolute;
    top: 58px;
    left: 0.5rem;
    width: calc(100vw - 1rem);
    max-width: none;
    transform: none;
    z-index: 1;
  }

  body.theme-aic1 .app-topnav {
    height: 94px;
    min-height: 94px;
  }

  body.theme-aic1 .app-topnav__search .search-input {
    width: 100%;
    height: 32px;
  }

  body.theme-aic1 .app-topnav__search .search-container .dropdown {
    max-width: none !important;
  }

  body.theme-aic1 .home-section {
    top: 98px !important;
  }

  body.theme-aic1 .app-topnav__actions {
    gap: 0.35rem;
    margin-left: auto;
    flex: 0 0 auto;
    min-width: 0;
  }

  body.theme-aic1 .app-topnav__icon-button,
  body.theme-aic1 .app-topnav__actions button.cart-btn,
  body.theme-aic1 #notificationDropdown {
    width: 40px;
    height: 40px;
    min-width: 40px;
  }

  .app-topnav__nav-icon {
    width: 32px;
    height: 32px;
  }

  .app-topnav__actions .app-topnav__nav-count {
    font-size: 11px;
  }

  body.theme-aic1 .app-topnav__message-button i,
  body.theme-aic1 #notificationDropdown i {
    font-size: 0.85rem;
  }

  body.theme-aic1 .app-topnav__profile-trigger {
    gap: 0.35rem;
    padding: 0.2rem 0.4rem;
  }

  /* Same gap as the other theme-aic1 overrides in this block: the trigger's
     own avatar (40px, red border, box-shadow -- the initials button on the
     bar itself, not the one inside the dropdown card) has no mobile variant
     of its own, so its higher-specificity desktop rule (body.theme-aic1
     .app-topnav__profile-trigger .app-topnav__avatar) kept winning over the
     generic 32px .app-topnav__avatar shrink above. It stayed full-size and
     crowded the already-tight phone-width icon cluster. */
  body.theme-aic1 .app-topnav__profile-trigger .app-topnav__avatar {
    width: 32px;
    height: 32px;
    font-size: 0.75rem;
    border-width: 1.5px;
  }

  .app-topnav .platform-switcher-btn {
    width: 30px;
    height: 30px;
  }

  .app-topnav .platform-switcher-badge {
    width: 20px;
    height: 20px;
    min-width: 20px;
    font-size: 9px;
  }

  .app-topnav .platform-switcher-chevron {
    font-size: 9px;
  }
}

/* Keep the complete AIC One greeting visible on narrow phones and remove the
   desktop logo offset so the brand cluster starts at the left edge. */
@media (max-width: 380px) {
  .app-topnav__greeting-day,
  .app-topnav__greeting-time,
  body.theme-aic1 .app-topnav__greeting-day,
  body.theme-aic1 .app-topnav__greeting-time {
    display: block;
  }

  body.theme-aic1 .app-topnav__brand-copy {
    margin-left: 0 !important;
  }

  .app-topnav__brand-copy .client-logo,
  .app-topnav__brand-copy .app-topnav__brand-logo {
    height: 22px;
  }

  body.theme-aic1 .app-topnav__brand-logo {
    width: 30px;
    height: 30px;
  }
}

/* Compact-navbar layout offsets: retune values that assumed the old
   ~153px stacked two-bar height for the new single ~64px/56px bar.
   Scoped to desktop/mobile explicitly to avoid touching unrelated
   bottom-nav / off-canvas mobile sidebar layouts that don't depend on
   this offset scheme. */
@media (min-width: 768px) {
  .home-section {
    top: 72px !important;
  }

  .orcaa-sidebar-container {
    margin-top: 72px !important;
  }

  /* Keep the teacher course sidebar compact so the teacher actions sit closer
     to the top of the card instead of leaving a large blank area above them. */
  .app-course-list #teacher-course-sidebar {
    margin-top: 0 !important;
    padding-top: 0.75rem;
  }

  /* Assessment authoring uses the same teacher sidebar as All Subjects.
     Keep the sidebar contents compact on this page too; the more generic
     programme sidebar padding otherwise leaves a large blank area between
     the card edge and the first action (and between navigation items). */
  body.assessment-management-questions-page :is(.app-course-list, .app-assessment-list) #teacher-course-sidebar {
    margin-top: 0 !important;
    padding: 0.5rem 0 1rem !important;
    gap: 0 !important;
  }

  body.assessment-management-questions-page :is(.app-course-list, .app-assessment-list) #teacher-course-sidebar > .programme-icon-link {
    flex: 0 0 calc(100% - 0.85rem);
    width: calc(100% - 0.85rem) !important;
    min-width: 0 !important;
    max-width: calc(100% - 0.85rem) !important;
    min-height: 3.85rem;
    margin: 0 auto 0.44rem !important;
    padding: 0.42rem 0.38rem 0.46rem !important;
    gap: 0.18rem;
    box-sizing: border-box;
  }

  body.assessment-management-questions-page :is(.app-course-list, .app-assessment-list) #teacher-course-sidebar > .programme-icon-link.active {
    flex-basis: calc(100% - 0.85rem);
    width: calc(100% - 0.85rem) !important;
    min-width: 0 !important;
    max-width: calc(100% - 0.85rem) !important;
    min-height: 3.85rem;
  }

  body.assessment-management-questions-page :is(.app-course-list, .app-assessment-list) #teacher-course-sidebar .programme-icon-circle {
    width: 1.62rem !important;
    height: 1.62rem !important;
    margin-bottom: 0 !important;
  }

  body.assessment-management-questions-page :is(.app-course-list, .app-assessment-list) #teacher-course-sidebar .programme-icon-label {
    display: block;
    width: 100%;
    max-width: 100%;
    min-height: 0 !important;
    font-size: 0.68rem !important;
    line-height: 1.12 !important;
    text-align: center !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
  }

  /* Match the selected-item treatment used on Teacher → All Subjects. */
  body.assessment-management-questions-page :is(.app-course-list, .app-assessment-list) #teacher-course-sidebar > .programme-icon-link.active {
    background: var(--primary-color) !important;
    color: #fff !important;
  }

  body.assessment-management-questions-page :is(.app-course-list, .app-assessment-list) #teacher-course-sidebar > .programme-icon-link.active .programme-icon-label,
  body.assessment-management-questions-page :is(.app-course-list, .app-assessment-list) #teacher-course-sidebar > .programme-icon-link.active .programme-icon-circle i {
    color: #fff !important;
  }

  /* Keep the learner course sidebar (My Subjects / Assessments / Evaluations /
     Groups / Certificates / Profile) compact so the nav items sit close
     together instead of leaving a large blank gap above and between them. */
  .app-course-list #learner-course-sidebar {
    margin-top: 0 !important;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
  }

  .app-course-list #learner-course-sidebar > .programme-icon-link {
    margin-bottom: 0.4rem;
  }

  .orcaa-sidebar-variant.orcaa-sidebar-container {
    margin-top: 26px !important;
    margin-left: -15px !important;
  }
}

@media (max-width: 767.98px) {
  .home-section {
    margin-top: 0 !important;
    top: 60px !important;
  }

  .home-section.admin-home-layout {
    top: 60px !important;
  }

  body.admin-home-tablet-stable .home-section.admin-home-layout {
    top: 72px !important;
  }
}

/* Login role selection */
.login-role-selection-page {
    --role-primary: var(--primary-color, #2563eb);
    --role-navbar-bg: var(
        --profile-menu-bg-color,
        var(--navbar-bg-color, var(--primary-color, #2563eb))
    );
    --role-navbar-text: var(--topnav-text, var(--profile-menu-text-color, #fff));
    --role-ink: #182033;
    --role-muted: #667085;
    --role-line: #d8dee8;
    --role-bg: #f6f8fb;
    min-height: 100vh;
    margin: 0;
    color: var(--role-ink);
    background: var(--role-bg);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-role-selection-page .role-topbar {
    background: var(--role-navbar-bg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    color: var(--role-navbar-text);
    min-height: 68px;
    width: 100%;
}

.login-role-selection-page .role-topbar-inner {
    align-items: center;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin: 0 auto;
    max-width: none;
    min-height: 68px;
    padding: 10px 20px;
    width: 100%;
}

.login-role-selection-page .role-topbar-brand {
    align-items: center;
    display: inline-flex;
    gap: 12px;
    min-width: 0;
    font-size: 0.98rem;
    font-weight: 800;
    letter-spacing: 0;
}

.login-role-selection-page .role-topbar-brand span {
    color: inherit;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.login-role-selection-page .role-topbar-logo {
    background: #ffffff;
    border-radius: 8px;
    height: 42px;
    max-width: 132px;
    object-fit: contain;
    padding: 5px 8px;
}

.login-role-selection-page .role-logout-form {
    margin: 0;
}

.login-role-selection-page .role-logout-button {
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(255, 255, 255, 0.75);
    border-radius: 8px;
    color: var(--role-primary);
    display: inline-flex;
    gap: 8px;
    font-size: 0.9rem;
    font-weight: 800;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
}

.login-role-selection-page .role-logout-button:hover,
.login-role-selection-page .role-logout-button:focus {
    background: #ffffff;
    border-color: #ffffff;
    color: color-mix(in srgb, var(--role-primary) 82%, #000 18%);
}

.login-role-selection-page .role-shell {
    min-height: calc(100vh - 68px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

.login-role-selection-page .role-panel {
    width: min(100%, 520px);
    background: #ffffff;
    border: 1px solid var(--role-line);
    border-radius: 8px;
    padding: 28px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
}

.login-role-selection-page .role-logo {
    width: 136px;
    max-height: 58px;
    object-fit: contain;
}

.login-role-selection-page .role-option {
    display: block;
    border: 1px solid var(--role-line);
    border-radius: 8px;
    padding: 14px 16px;
    cursor: pointer;
    transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.login-role-selection-page .role-option:hover,
.login-role-selection-page .role-option:has(input:checked) {
    border-color: var(--role-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--role-primary) 16%, transparent);
}

.login-role-selection-page .role-option input {
    width: 18px;
    height: 18px;
    accent-color: var(--role-primary);
}

.login-role-selection-page .role-icon {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--role-primary);
    background: color-mix(in srgb, var(--role-primary) 11%, #fff 89%);
    flex: 0 0 auto;
}

.login-role-selection-page .role-muted {
    color: var(--role-muted);
}

.login-role-selection-page .role-submit {
    min-height: 44px;
    border-radius: 8px;
    background: var(--role-primary);
    border-color: var(--role-primary);
    color: var(--btn-outline-primary-text, #fff);
    font-weight: 700;
}

.login-role-selection-page .role-submit:hover,
.login-role-selection-page .role-submit:focus {
    background: color-mix(in srgb, var(--role-primary) 86%, #000 14%);
    border-color: color-mix(in srgb, var(--role-primary) 86%, #000 14%);
    color: var(--btn-outline-primary-hover-text, #fff);
}

@media (max-width: 575.98px) {
    .login-role-selection-page .role-topbar-inner {
        padding: 10px 14px;
    }

    .login-role-selection-page .role-topbar-logo {
        max-width: 104px;
    }

    .login-role-selection-page .role-logout-button span {
        display: none;
    }

    .login-role-selection-page .role-logout-button {
        min-width: 40px;
        padding: 0;
    }

    .login-role-selection-page .role-panel {
        padding: 22px;
    }
}

/* Dashboard landing page styles. Keep selectors scoped to admin-dashboard classes. */
/* Match the shell's vertical offset to Assessments/System Management/Practicals
   (margin-top: -7px on their #app / .programme-content-shell). The previous
   0.55rem (positive) sat ~14px lower than those other admin-home shells. The
   767.98px-and-below media query below still overrides this back to 0.55rem,
   same as the Assessments/Practicals mobile behaviour.
   Note: the fixed .app-topnav bar is 77px tall (--topnav-height) and sits at
   z-index:1040, above this shell. .home-section contributes top:72px (see
   the compact-navbar block further down) + its own base 15px padding-top,
   i.e. 87px before this margin is applied. Margin-top past -10px pulls the
   shell's rendered top above the navbar's 77px bottom edge, so any further
   negative value just tucks that much more of the shell behind the opaque
   navbar instead of visibly closing the gap -- it looks "stuck" because the
   navbar is clipping it, not because the margin stopped working. */
.admin-dashboard-shell {
    position: relative;
    margin-top: -14px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    padding-bottom: 0.5rem;
    background: linear-gradient(180deg, rgba(248, 249, 253, 0.8) 0%, rgba(248, 249, 253, 0.96) 100%);
    box-sizing: border-box;
}

/* Keep the mentor dashboard at the full width already available beside the
   sidebar. The content area itself supplies the sidebar offset; adding a
   second shell margin creates the unwanted left/right card gap. */
@media (min-width: 768px) {
    body.mentor-dashboard-standalone-page .admin-dashboard-shell {
        width: 100%;
        max-width: 100%;
        margin-top: 7px !important;
    }
}

.admin-dashboard-stage {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0.2rem !important;
    padding-right: 0.2rem !important;
    box-sizing: border-box;
}

/* Keep the dashboard cards close to the content shell, with one narrow gutter
   matching the compact programme/course management panels. */
body.admin-dashboard-standalone-page .admin-dashboard-stage.me-2 {
    margin-right: 0 !important;
}

@media (max-width: 767.98px) {
    .admin-dashboard-shell {
        margin-top: 0.55rem !important;
        padding-left: 0;
        padding-right: 0;
    }
}

@media (min-width: 1200px) {
    body.admin-dashboard-standalone-page .admin-dashboard-shell {
        width: 100%;
        max-width: 100%;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    body.admin-dashboard-standalone-page .admin-dashboard-stage > .row {
        --bs-gutter-x: 0.75rem;
    }
}

.admin-dashboard-card {
    border: 1px solid #e5e8f2;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.035);
    overflow: hidden;
}


.admin-dashboard-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1rem 0.92rem 1rem;
    border-bottom: 1px solid #edf0f6;
}

.admin-dashboard-card-head-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.admin-dashboard-drag {
    color: #c8cbd8;
    font-size: 1.05rem;
    flex: none;
}

.admin-dashboard-title-wrap {
    min-width: 0;
}

.admin-dashboard-title {
    margin: 0;
    color: #10132a;
    font-size: 1rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

.admin-dashboard-info {
    margin-left: 0.35rem;
    color: #5b4fe8;
    font-size: 0.72rem;
    font-weight: 700;
}

.admin-dashboard-card-body {
    padding: 1rem;
}

.admin-dashboard-icon {
    width: 2rem;
    height: 2rem;
    border-radius: 0.55rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    font-size: 0.9rem;
}

.admin-dashboard-icon-img {
    width: 1.15rem;
    height: 1.15rem;
    object-fit: contain;
}

.admin-dashboard-chip-purple { background: #6c5ce7; color: #ffffff; }
.admin-dashboard-chip-coral { background: #f0528a; color: #ffffff; }
.admin-dashboard-chip-blue { background: #5b6ee1; color: #ffffff; }
.admin-dashboard-chip-green { background: #1fbf75; color: #ffffff; }
.admin-dashboard-chip-amber { background: #f39a2b; color: #ffffff; }
.admin-dashboard-chip-slate { background: #9aa0b2; color: #ffffff; }
.admin-dashboard-chip-white { background: #ffffff; color: #16214d; border: 1px solid #eef0f6; }

.admin-dashboard-modules-note {
    margin: 0 0 0.9rem;
    color: #56607a;
    font-size: 0.95rem;
    line-height: 1.6;
}

.admin-dashboard-modules-grid,
.admin-dashboard-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 1.35rem;
}

.admin-dashboard-module-link,
.admin-dashboard-action-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: inherit;
    text-decoration: none;
    min-width: 0;
}

.admin-dashboard-module-link {
    padding: 0.85rem 0 0.9rem;
    border-bottom: 1px solid #edf0f6;
}

.admin-dashboard-module-link:hover,
.admin-dashboard-module-link:focus-visible,
.admin-dashboard-action-link:hover,
.admin-dashboard-action-link:focus-visible,
.mentor-dashboard-programme-link:hover,
.mentor-dashboard-programme-link:focus-visible {
    background: #fafbff;
    border-radius: 0.7rem;
}

.admin-dashboard-module-copy,
.admin-dashboard-action-copy {
    min-width: 0;
}

.admin-dashboard-module-label,
.admin-dashboard-action-label {
    display: block;
    color: #16214d;
    font-size: 0.96rem;
    font-weight: 600;
    line-height: 1.35;
}

.admin-dashboard-action-meta {
    display: block;
    color: #6b7287;
    font-size: 0.75rem;
    line-height: 1.35;
    margin-top: 0.1rem;
}

@media (min-width: 768px) {
    .admin-dashboard-module-link:nth-last-child(-n+2),
    .admin-dashboard-action-link:nth-last-child(-n+2) {
        border-bottom: 0;
    }
}

@media (max-width: 767.98px) {
    .admin-dashboard-modules-grid,
    .admin-dashboard-actions-grid {
        grid-template-columns: 1fr;
    }

    .admin-dashboard-seat-stat-grid {
        grid-template-columns: 1fr;
    }

    .admin-dashboard-module-link:last-child,
    .admin-dashboard-action-link:last-child {
        border-bottom: 0;
    }

}

/* Mentor dashboard mobile shell: match the full-width, overflow-safe shell
   used by Course Insights while leaving the desktop dashboard geometry intact. */
@media (min-width: 768px) {
    /* Keep the dashboard cards close to the mentor sidebar, using the same
       small outer gutter that remains at the right edge. */
    body.mentor-dashboard-standalone-page .home-section {
        left: 120px !important;
        width: calc(100% - 120px) !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        box-sizing: border-box;
    }
}

@media (max-width: 767.98px) {
    body.mentor-dashboard-standalone-page {
        overflow-x: hidden !important;
    }

    body.mentor-dashboard-standalone-page .home-section,
    body.mentor-dashboard-standalone-page .home-section.admin-home-layout,
    body.mentor-dashboard-standalone-page .home-section.mx-4 {
        left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
        box-sizing: border-box;
    }

    body.mentor-dashboard-standalone-page .admin-dashboard-shell {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0;
        margin: 0.55rem auto 0 !important;
        padding: 0.75rem 0.75rem calc(5.5rem + env(safe-area-inset-bottom)) !important;
        border-radius: 1rem;
        overflow-x: hidden !important;
        box-sizing: border-box;
    }

    body.mentor-dashboard-standalone-page .admin-dashboard-stage {
        width: 100%;
        max-width: 100%;
        min-width: 0;
        padding-left: 0 !important;
        padding-right: 0 !important;
        overflow-x: hidden;
    }

    body.mentor-dashboard-standalone-page .admin-dashboard-stage > .row,
    body.mentor-dashboard-standalone-page .admin-dashboard-card {
        min-width: 0;
        max-width: 100%;
    }

    body.mentor-dashboard-standalone-page .admin-dashboard-stage > .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    body.mentor-dashboard-standalone-page .admin-dashboard-card {
        overflow: hidden;
    }

    body.mentor-dashboard-standalone-page .admin-dashboard-module-label,
    body.mentor-dashboard-standalone-page .admin-dashboard-title,
    body.mentor-dashboard-standalone-page .mentor-dashboard-programme-name {
        overflow-wrap: anywhere;
    }
}

/* Mentor dashboard: locked module tile + "My Mentees" / "My programmes" cards.
   Layout (flex, gap, truncation) is handled by Bootstrap utility classes in
   the template; only page-specific styling lives here. */
.admin-dashboard-module-link.is-locked {
    opacity: .6;
    cursor: not-allowed;
}

.admin-dashboard-module-link.is-locked .admin-dashboard-icon {
    background: linear-gradient(135deg, var(--primary-color, #8F469B), var(--secondary-color, #494C9E));
    color: #fff;
    border-color: transparent;
}

.mentor-dashboard-mentees-stat-value {
    font-size: 1.6rem;
}

.mentor-dashboard-programme-link {
    padding: 0.85rem 0;
    border-bottom: 1px solid #edf0f6;
    color: #16214d;
}

.mentor-dashboard-programme-link .admin-dashboard-icon {
    width: 30px;
    height: 30px;
}

.mentor-dashboard-programme-name {
    min-width: 0;
    font-size: 0.94rem;
}

.admin-dashboard-summary-illustration {
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 0.65rem;
    background: #ffffff;
    color: #6c5ce7;
    border: 1px solid #eef0f6;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin: 0 auto 0.95rem;
    box-shadow: inset 0 0 0 1px rgba(108, 92, 231, 0.08);
}

.admin-dashboard-summary-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.95rem 1.5rem;
}

.admin-dashboard-summary-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    min-width: 0;
}

.admin-dashboard-summary-icon,
.admin-dashboard-attention-icon {
    width: 2.45rem;
    height: 2.45rem;
    border-radius: 0.7rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    font-size: 1rem;
}

.admin-dashboard-summary-copy-block {
    min-width: 0;
}

.admin-dashboard-summary-value {
    display: block;
    color: #10132a;
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.admin-dashboard-summary-label {
    display: block;
    color: #67708a;
    font-size: 0.92rem;
    line-height: 1.2;
    margin-top: 0.12rem;
}

.admin-dashboard-tone-lavender { background: #eeecff; color: #7663ea; }
.admin-dashboard-tone-rose { background: #fde8ee; color: #ef6f95; }
.admin-dashboard-tone-indigo { background: #e9edff; color: #6274e6; }
.admin-dashboard-tone-sky { background: #e7f1ff; color: #6da5ff; }
.admin-dashboard-tone-amber { background: #fff1db; color: #f29f2d; }
.admin-dashboard-tone-mint { background: #e3f7ed; color: #1faf72; }

.admin-dashboard-summary-icon.admin-dashboard-tone-lavender,
.admin-dashboard-attention-icon.admin-dashboard-tone-lavender,
.admin-dashboard-empty-icon.admin-dashboard-tone-lavender { background: #ffffff; color: #7663ea; border: 1px solid #eef0f6; }
.admin-dashboard-summary-icon.admin-dashboard-tone-rose,
.admin-dashboard-attention-icon.admin-dashboard-tone-rose,
.admin-dashboard-empty-icon.admin-dashboard-tone-rose { background: #ffffff; color: #ef6f95; border: 1px solid #eef0f6; }
.admin-dashboard-summary-icon.admin-dashboard-tone-indigo,
.admin-dashboard-attention-icon.admin-dashboard-tone-indigo,
.admin-dashboard-empty-icon.admin-dashboard-tone-indigo { background: #ffffff; color: #6274e6; border: 1px solid #eef0f6; }
.admin-dashboard-summary-icon.admin-dashboard-tone-sky,
.admin-dashboard-attention-icon.admin-dashboard-tone-sky,
.admin-dashboard-empty-icon.admin-dashboard-tone-sky { background: #ffffff; color: #6da5ff; border: 1px solid #eef0f6; }
.admin-dashboard-summary-icon.admin-dashboard-tone-amber,
.admin-dashboard-attention-icon.admin-dashboard-tone-amber,
.admin-dashboard-empty-icon.admin-dashboard-tone-amber { background: #ffffff; color: #f29f2d; border: 1px solid #eef0f6; }
.admin-dashboard-summary-icon.admin-dashboard-tone-mint,
.admin-dashboard-attention-icon.admin-dashboard-tone-mint,
.admin-dashboard-empty-icon.admin-dashboard-tone-mint { background: #ffffff; color: #1faf72; border: 1px solid #eef0f6; }

.admin-dashboard-summary-copy {
    margin: 0 auto;
    max-width: 26rem;
    color: #4f5569;
    font-size: 0.98rem;
    line-height: 1.7;
    text-align: center;
}

.admin-dashboard-summary-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 1.3rem;
}

.admin-dashboard-primary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.75rem 1.1rem;
    border-radius: 0.6rem;
    background: #6f4ce6;
    color: #ffffff;
    text-decoration: none;
    font-weight: 700;
    box-shadow: 0 10px 20px rgba(111, 76, 230, 0.22);
}

.admin-dashboard-primary-btn:hover,
.admin-dashboard-primary-btn:focus-visible {
    background: #5c3fd0;
    color: #ffffff;
}

.admin-dashboard-secondary-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    padding: 0.75rem 1.1rem;
    border-radius: 0.6rem;
    background: #f5f7ff;
    border: 1px solid #e1e6fb;
    color: #3d36b5;
    text-decoration: none;
    font-weight: 700;
}

.admin-dashboard-secondary-btn:hover,
.admin-dashboard-secondary-btn:focus-visible {
    background: #edf1ff;
    color: #2f269f;
}

.admin-dashboard-news-item {
    padding: 0.1rem 0 1rem;
    border-bottom: 1px solid #edf0f6;
}

.admin-dashboard-news-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.admin-dashboard-news-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #7a8197;
    font-size: 0.84rem;
    margin-bottom: 0.45rem;
}

.admin-dashboard-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.12rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 800;
    line-height: 1.2;
}

.admin-dashboard-badge-new {
    background: #ece5ff;
    color: #5b4fe8;
}

.admin-dashboard-badge-improved {
    background: #e7f6ec;
    color: #1b8e54;
}

.admin-dashboard-news-title {
    margin: 0 0 0.2rem;
    color: #3e2eb7;
    font-size: 0.98rem;
    font-weight: 800;
    line-height: 1.35;
}

.admin-dashboard-news-copy {
    margin: 0;
    color: #4f5569;
    font-size: 0.93rem;
    line-height: 1.55;
}

.admin-dashboard-summary-shell {
    display: flex;
    flex-direction: column;
    min-height: 100%;
}

.admin-dashboard-summary-body {
    padding: 1.2rem 1rem 1.4rem;
}

.admin-dashboard-summary-body-empty {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: center;
    min-height: 18rem;
}

.admin-dashboard-summary-body-metrics {
    display: flex;
    flex: 1;
    flex-direction: column;
    justify-content: flex-start;
    min-height: 18rem;
}

.admin-dashboard-news-body {
    padding-top: 1rem;
}

.admin-dashboard-ai-row {
    align-items: stretch;
}

.admin-dashboard-equal-column {
    display: flex;
}

.admin-dashboard-row-card,
.admin-dashboard-usage-shell {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.admin-dashboard-row-card,
.admin-dashboard-usage-summary-height {
    min-height: 23rem;
}

.admin-dashboard-usage-summary-height .admin-dashboard-usage-body {
    padding-top: 0.8rem;
}

.admin-dashboard-usage-summary-height .admin-dashboard-usage-metric {
    font-size: 2.1rem;
}

.admin-dashboard-usage-summary-height .admin-dashboard-usage-subtitle {
    margin: 0.25rem 0 0.45rem;
    font-size: 0.88rem;
    line-height: 1.35;
}

.admin-dashboard-usage-summary-height .admin-dashboard-usage-chart {
    height: 6rem;
}

.admin-dashboard-usage-summary-height .admin-dashboard-ai-breakdown {
    margin-top: 0.5rem;
}

.admin-dashboard-usage-summary-height .admin-dashboard-ai-breakdown-item {
    padding: 0.42rem 0;
}

.admin-dashboard-usage-summary-height .admin-dashboard-ai-breakdown-label,
.admin-dashboard-usage-summary-height .admin-dashboard-ai-breakdown-count {
    font-size: 0.86rem;
}

.admin-dashboard-row-card .admin-dashboard-card-body {
    flex: 1;
    min-height: 0;
    overflow: auto;
}

.admin-dashboard-row-card .admin-dashboard-news-meta {
    margin-bottom: 0.3rem;
}

.admin-dashboard-row-card .admin-dashboard-news-title {
    font-size: 0.92rem;
}

.admin-dashboard-row-card .admin-dashboard-news-copy {
    font-size: 0.84rem;
    line-height: 1.42;
}

.admin-dashboard-row-card .admin-dashboard-attention-item {
    padding: 0.7rem 0;
}

.admin-dashboard-row-card .admin-dashboard-attention-label {
    font-size: 0.9rem;
}

.admin-dashboard-row-card .admin-dashboard-empty-state {
    min-height: 10rem;
}

@media (max-width: 767.98px) {
    .admin-dashboard-row-card,
    .admin-dashboard-usage-summary-height {
        min-height: 0;
    }
}

.admin-dashboard-actions-hint {
    margin: 0 0 0.9rem;
    color: #56607a;
    font-size: 0.95rem;
    line-height: 1.6;
}

.admin-dashboard-module-link .admin-dashboard-icon,
.admin-dashboard-action-link .admin-dashboard-icon {
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.45) inset;
}

.admin-dashboard-attention-list {
    display: flex;
    flex-direction: column;
}

.admin-dashboard-attention-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #edf0f6;
}

.admin-dashboard-attention-item:last-child {
    border-bottom: 0;
    padding-bottom: 0.25rem;
}

.admin-dashboard-attention-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 0;
}

.admin-dashboard-attention-text {
    min-width: 0;
}

.admin-dashboard-attention-label {
    margin: 0;
    color: #10132a;
    font-size: 0.98rem;
    font-weight: 600;
    line-height: 1.35;
}

.admin-dashboard-attention-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.1rem;
    padding: 0.28rem 0.72rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 800;
    line-height: 1;
    flex: none;
}

.admin-dashboard-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.85rem;
    min-height: 14.5rem;
    text-align: center;
}

.admin-dashboard-empty-icon {
    width: 3rem;
    height: 3rem;
    border-radius: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: none;
    font-size: 1.15rem;
}

.admin-dashboard-empty-copy {
    margin: 0;
    max-width: 24rem;
    color: #4f5569;
    font-size: 0.96rem;
    line-height: 1.65;
}

.admin-dashboard-usage-body,
.admin-dashboard-seat-body {
    padding-top: 1rem;
}

.admin-dashboard-usage-metric {
    color: #10132a;
    font-size: 2.75rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.03em;
}

.admin-dashboard-usage-subtitle {
    margin: 0.45rem 0 1rem;
    color: #6b7287;
    font-size: 0.95rem;
    line-height: 1.5;
}

.admin-dashboard-usage-chart {
    width: 100%;
    height: auto;
    display: block;
    overflow: visible;
}

.admin-dashboard-usage-axis {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.35rem;
    color: #8a90a3;
    font-size: 0.72rem;
}

.admin-dashboard-usage-axis span {
    flex: 1;
    text-align: center;
}

.admin-dashboard-ai-breakdown {
    margin-top: 0.95rem;
    border-top: 1px solid #edf0f6;
}

.admin-dashboard-ai-breakdown-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.82rem 0;
    border-bottom: 1px solid #edf0f6;
}

.admin-dashboard-ai-breakdown-item:last-child {
    border-bottom: 0;
    padding-bottom: 0.2rem;
}

.admin-dashboard-ai-breakdown-left {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    min-width: 0;
}

.admin-dashboard-ai-dot,
.admin-dashboard-seat-legend-swatch {
    width: 0.72rem;
    height: 0.72rem;
    border-radius: 999px;
    display: inline-flex;
    flex: none;
}

.admin-dashboard-seat-swatch-default,
.admin-dashboard-seat-swatch-0 {
    background: #6c5ce7;
}

.admin-dashboard-seat-swatch-1 {
    background: #f0528a;
}

.admin-dashboard-seat-swatch-2 {
    background: #1fbf75;
}

.admin-dashboard-seat-swatch-3 {
    background: #f39a2b;
}

.admin-dashboard-seat-swatch-4 {
    background: #5b6ee1;
}

.admin-dashboard-seat-swatch-5 {
    background: #9aa0b2;
}

.admin-dashboard-ai-breakdown-label {
    margin: 0;
    color: #10132a;
    font-size: 0.96rem;
    font-weight: 600;
    line-height: 1.35;
}

.admin-dashboard-ai-breakdown-count {
    color: #6b7287;
    font-size: 0.95rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}

.admin-dashboard-seat-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.95rem 1.25rem;
}

.admin-dashboard-seat-stat-label {
    margin: 0 0 0.25rem;
    color: #7c8499;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.35;
}

.admin-dashboard-seat-stat-value {
    margin: 0;
    color: #10132a;
    font-size: 1.8rem;
    font-weight: 800;
    line-height: 1.05;
    letter-spacing: -0.02em;
}

.admin-dashboard-seat-stat-meta {
    margin: 0.18rem 0 0;
    color: #16a46f;
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.35;
}

.admin-dashboard-seat-chart-wrap {
    margin-top: 1rem;
}

.admin-dashboard-seat-svg {
    width: 100%;
    height: auto;
    display: block;
    overflow: visible;
}

.admin-dashboard-seat-axis {
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
    margin-top: 0.35rem;
    color: #8a90a3;
    font-size: 0.72rem;
}

.admin-dashboard-seat-axis span {
    flex: 1;
    text-align: center;
}

.admin-dashboard-seat-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem 1rem;
    margin-top: 0.85rem;
}

.admin-dashboard-seat-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    color: #44506d;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.35;
}

.admin-dashboard-seat-table {
    margin-top: 1rem;
    border-top: 1px solid #edf0f6;
}

.admin-dashboard-seat-table-head,
.admin-dashboard-seat-table-row {
    display: grid;
    grid-template-columns: minmax(0, 1.8fr) minmax(0, 0.7fr) minmax(0, 0.8fr) minmax(0, 0.9fr);
    gap: 0.75rem;
    align-items: start;
}

.admin-dashboard-seat-table-head {
    padding: 0.85rem 0 0.7rem;
    color: #7c8499;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.admin-dashboard-seat-table-row {
    padding: 0.82rem 0;
    border-top: 1px solid #edf0f6;
}

.admin-dashboard-seat-plan {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    min-width: 0;
}

.admin-dashboard-seat-plan-copy {
    min-width: 0;
}

.admin-dashboard-seat-plan-name {
    margin: 0;
    color: #10132a;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.35;
}

.admin-dashboard-seat-plan-meta {
    margin: 0.15rem 0 0;
    color: #6b7287;
    font-size: 0.8rem;
    line-height: 1.35;
}

.admin-dashboard-seat-cell {
    min-width: 0;
}

.admin-dashboard-seat-value {
    display: block;
    color: #10132a;
    font-size: 0.96rem;
    font-weight: 800;
    line-height: 1.25;
}

.admin-dashboard-seat-muted {
    display: block;
    color: #6b7287;
    font-size: 0.78rem;
    margin-top: 0.12rem;
    line-height: 1.35;
}

.admin-dashboard-seat-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1rem;
}

.admin-dashboard-seat-empty {
    min-height: 18rem;
}

/* Compact density overrides: shrink the dashboard so its cards fit within
   one viewport height on common laptop screens without scrolling. */
.admin-dashboard-stage .row.g-3,
.admin-dashboard-stage .row.g-xl-4 {
    --bs-gutter-x: 0.6rem;
    --bs-gutter-y: 0.6rem;
}

.admin-dashboard-stage .row.mb-4 {
    margin-bottom: 0.6rem !important;
}

/* Course Insights uses Bootstrap gap-3 (1rem) between cards. Apply the
   same spacing to the mentor dashboard card rows. */
body.mentor-dashboard-standalone-page .admin-dashboard-stage > .row {
    --bs-gutter-x: 1rem;
    --bs-gutter-y: 1rem;
}

.admin-dashboard-card-head {
    padding: 0.6rem 0.75rem 0.55rem 0.75rem;
}

.admin-dashboard-card-body {
    padding: 0.65rem 0.75rem;
}

/* Keep assessment tables consistent with the Users table header treatment. */
body.assessment-management-standalone-page table thead th,
body.assessment-management-standalone-page table thead td {
    background: var(--table-header-color, var(--primary-color)) !important;
    color: #fff !important;
    font-weight: 600 !important;
}

.admin-dashboard-title {
    font-size: 0.86rem;
}

.admin-dashboard-icon {
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 0.45rem;
    font-size: 0.75rem;
}

.admin-dashboard-icon-img {
    width: 0.95rem;
    height: 0.95rem;
}

.admin-dashboard-modules-note {
    margin: 0 0 0.4rem;
    font-size: 0.8rem;
}

.admin-dashboard-module-link {
    padding: 0.4rem 0 0.45rem;
    gap: 0.55rem;
}

.admin-dashboard-module-label,
.admin-dashboard-action-label {
    font-size: 0.82rem;
}

.admin-dashboard-summary-grid {
    gap: 0.5rem 1rem;
}

.admin-dashboard-summary-icon,
.admin-dashboard-attention-icon {
    width: 1.85rem;
    height: 1.85rem;
    border-radius: 0.55rem;
    font-size: 0.82rem;
}

.admin-dashboard-summary-value {
    font-size: 1.05rem;
}

.admin-dashboard-summary-label {
    font-size: 0.76rem;
}

.admin-dashboard-summary-body {
    padding: 0.6rem 0.75rem 0.7rem;
}

.admin-dashboard-summary-body-empty,
.admin-dashboard-summary-body-metrics {
    min-height: 0;
}

.admin-dashboard-row-card,
.admin-dashboard-usage-summary-height {
    min-height: 0;
}

.admin-dashboard-usage-summary-height .admin-dashboard-usage-metric {
    font-size: 1.5rem;
}

.admin-dashboard-usage-summary-height .admin-dashboard-usage-subtitle {
    margin: 0.15rem 0 0.3rem;
    font-size: 0.76rem;
}

.admin-dashboard-usage-summary-height .admin-dashboard-usage-chart {
    height: 3.6rem;
}

.admin-dashboard-usage-summary-height .admin-dashboard-ai-breakdown-item {
    padding: 0.28rem 0;
}

.admin-dashboard-usage-summary-height .admin-dashboard-ai-breakdown-label,
.admin-dashboard-usage-summary-height .admin-dashboard-ai-breakdown-count {
    font-size: 0.74rem;
}

.admin-dashboard-usage-body,
.admin-dashboard-seat-body {
    padding-top: 0.55rem;
}

.admin-dashboard-usage-metric {
    font-size: 1.7rem;
}

.admin-dashboard-usage-subtitle {
    margin: 0.25rem 0 0.5rem;
    font-size: 0.78rem;
}

.admin-dashboard-row-card .admin-dashboard-attention-item {
    padding: 0.4rem 0;
}

.admin-dashboard-row-card .admin-dashboard-attention-label {
    font-size: 0.78rem;
}

.admin-dashboard-row-card .admin-dashboard-empty-state {
    min-height: 0;
    padding: 0.5rem 0;
}

.admin-dashboard-row-card .admin-dashboard-news-title {
    font-size: 0.8rem;
}

.admin-dashboard-row-card .admin-dashboard-news-copy {
    font-size: 0.74rem;
    line-height: 1.35;
}

.admin-dashboard-attention-item {
    gap: 0.6rem;
    padding: 0.4rem 0;
}

.admin-dashboard-attention-label {
    font-size: 0.82rem;
}

.admin-dashboard-attention-count {
    min-width: 1.7rem;
    padding: 0.18rem 0.55rem;
    font-size: 0.72rem;
}

.admin-dashboard-empty-state {
    gap: 0.5rem;
    min-height: 0;
    padding: 0.5rem 0;
}

.admin-dashboard-empty-icon {
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 0.65rem;
    font-size: 0.9rem;
}

.admin-dashboard-empty-copy {
    font-size: 0.78rem;
}

.admin-dashboard-news-item {
    padding: 0.1rem 0 0.5rem;
}

.admin-dashboard-news-body {
    padding-top: 0.5rem;
}

.admin-dashboard-news-meta {
    margin-bottom: 0.25rem;
    font-size: 0.72rem;
}

.admin-dashboard-news-title {
    font-size: 0.84rem;
}

.admin-dashboard-news-copy {
    font-size: 0.78rem;
    line-height: 1.35;
}

.admin-dashboard-badge {
    padding: 0.08rem 0.5rem;
    font-size: 0.62rem;
}

.admin-dashboard-ai-breakdown {
    margin-top: 0.5rem;
}

.admin-dashboard-ai-breakdown-item {
    padding: 0.4rem 0;
}

.admin-dashboard-ai-breakdown-label {
    font-size: 0.8rem;
}

.admin-dashboard-ai-breakdown-count {
    font-size: 0.78rem;
}

.admin-dashboard-seat-stat-grid {
    gap: 0.5rem 1rem;
}

.admin-dashboard-seat-stat-label {
    font-size: 0.76rem;
}

.admin-dashboard-seat-stat-value {
    font-size: 1.3rem;
}

.admin-dashboard-seat-stat-meta {
    font-size: 0.72rem;
}

.admin-dashboard-seat-chart-wrap {
    margin-top: 0.5rem;
}

.admin-dashboard-seat-legend {
    margin-top: 0.5rem;
}

.admin-dashboard-seat-legend-item {
    font-size: 0.74rem;
}

.admin-dashboard-seat-table {
    margin-top: 0.5rem;
}

.admin-dashboard-seat-table-head {
    padding: 0.45rem 0 0.35rem;
    font-size: 0.64rem;
}

.admin-dashboard-seat-table-row {
    padding: 0.4rem 0;
}

.admin-dashboard-seat-plan-name {
    font-size: 0.82rem;
}

.admin-dashboard-seat-plan-meta {
    font-size: 0.72rem;
}

.admin-dashboard-seat-value {
    font-size: 0.82rem;
}

.admin-dashboard-seat-muted {
    font-size: 0.7rem;
}

.admin-dashboard-seat-actions {
    margin-top: 0.5rem;
}

.admin-dashboard-primary-btn,
.admin-dashboard-secondary-btn {
    padding: 0.5rem 0.85rem;
    font-size: 0.82rem;
}

.admin-dashboard-seat-empty {
    min-height: 0;
    padding: 0.5rem 0;
}

.admin-dashboard-summary-illustration {
    width: 2rem;
    height: 2rem;
    font-size: 0.95rem;
    margin: 0 auto 0.5rem;
}

.admin-dashboard-summary-copy {
    font-size: 0.8rem;
    line-height: 1.45;
}

.kubiki-get-app-btn {
  align-items: center;
  background: #ffffff !important;
  border: 0 !important;
  border-radius: 999px !important;
  color: #350a70 !important;
  display: inline-flex;
  font-size: 0.82rem;
  gap: 0.3rem;
  min-height: 2.25rem;
  padding: 0.35rem 0.9rem !important;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.12);
  white-space: nowrap;
}

.kubiki-get-app-btn:hover,
.kubiki-get-app-btn:focus {
  background: #f7f2ff !important;
  color: #2f0a66 !important;
}

.kubiki-get-app-btn .bi {
  font-size: 0.95rem;
  line-height: 1;
  color: #350a70 !important;
  opacity: 1 !important;
}

.kubiki-app-icon {
  flex: 0 0 auto;
}

.kubiki-app-label-mobile {
  display: none;
}

.kubiki-app-chooser .btn {
  border-radius: 0.9rem;
}

.kubiki-app-chooser .btn.disabled,
.kubiki-app-chooser .btn:disabled {
  opacity: 0.55;
  pointer-events: none;
}

.kubiki-floating-launcher {
  position: fixed;
  right: calc(1rem + env(safe-area-inset-right, 0px));
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  /* Pre-existing bug, not specific to any one dropdown: .app-topnav sets
     z-index: 1040 !important (see its own comment on that rule) to clear
     .sidebar, which makes it -- not any number set inside it -- the thing
     compared against this launcher. At 1045 this button silently won that
     comparison and sat on top of every topnav dropdown (notification panel,
     profile menu, etc.), not just the one that happened to get noticed.
     Keeping this below 1040 fixes all of them at once. */
  z-index: 1030;
}

/* On the lesson content page this fixed bubble sits directly over the
   Previous/Complete & Next controls and can't be dragged out of the way,
   so it ends up blocking the page's primary action. Hide it here instead. */
body.curriculum-view-content-page .kubiki-floating-launcher {
  display: none;
}

.kubiki-floating-launcher__btn {
  align-items: center;
  border: 0;
  border-radius: 999px;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.24);
  display: inline-flex;
  gap: 0.55rem;
  min-height: 3rem;
  padding: 0.75rem 1rem;
  background: linear-gradient(135deg, #ffffff 0%, #f7f0ff 100%);
  color: #350a70;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.kubiki-floating-launcher__btn:hover,
.kubiki-floating-launcher__btn:focus {
  background: linear-gradient(135deg, #ffffff 0%, #efe2ff 100%);
  color: #2f0a66;
}

.kubiki-floating-launcher__btn .kubiki-floating-launcher__icon {
  align-items: center;
  background: #350a70;
  border-radius: 999px;
  color: #ffffff;
  display: inline-flex;
  height: 2rem;
  justify-content: center;
  width: 2rem;
  font-size: 1.05rem;
  flex: 0 0 auto;
}

.kubiki-floating-launcher__label {
  font-size: 0.9rem;
  line-height: 1;
  white-space: nowrap;
}

@media (max-width: 767.98px) {
  .kubiki-floating-launcher {
    right: calc(0.85rem + env(safe-area-inset-right, 0px));
    /* Keep the floating launcher clear of the fixed mobile navigation so
       taps near the navigation cannot activate the launcher accidentally. */
    bottom: calc(4.85rem + 1.25rem + env(safe-area-inset-bottom, 0px));
  }

  .kubiki-floating-launcher__btn {
    min-height: 2.75rem;
    padding: 0.6rem 0.85rem;
  }

  .kubiki-floating-launcher__label {
    font-size: 0.82rem;
  }

  .kubiki-get-app-btn {
    align-items: center !important;
    gap: 0 !important;
    justify-content: center !important;
    min-height: 1.85rem !important;
    padding: 0.22rem 0.34rem !important;
    width: 4.15rem;
    min-width: 4.15rem;
    font-size: 0.58rem;
    line-height: 1;
  }

  .kubiki-get-app-btn .bi {
    font-size: 1.08rem;
    margin: 0 !important;
    color: #350a70 !important;
  }

  .kubiki-app-label-desktop {
    display: none;
  }

  .kubiki-app-label-mobile {
    display: inline;
    font-size: 0.58rem;
    line-height: 1;
  }
}
/* Individual Skills Audit competency-gap analysis.
   Pill shape reused from .sr-tier-badge/.sr-scope-pill, filter bar/inputs
   reused from .sr-filter-bar/.sr-filter-field select (see merged selectors
   above) — only the parts unique to this section are declared here. */
.skills-reports-page .sr-analysis-section {
  margin: 16px 0;
  padding: 1rem;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #fff;
}
.skills-reports-page .sr-analysis-section h3 {
  margin: 0 0 .75rem;
  color: var(--primary-color);
  font-size: 1rem;
  font-weight: 700;
}
.skills-reports-page .sr-analysis-summary {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: center;
  margin-bottom: .75rem;
}

.skills-reports-page .sr-ai-analysis {
  margin: 12px 0 16px;
  padding: 14px 16px;
  border-left: 4px solid var(--primary-color);
  border-radius: 6px;
  background: #f7f4fc;
  color: #344054;
}

.skills-reports-page .sr-ai-analysis h4 {
  margin: 0 0 6px;
  color: var(--primary-color);
}

.skills-reports-page .sr-ai-analysis p {
  margin: 0;
  line-height: 1.55;
}

.skills-reports-page .sr-ai-analysis .sr-ai-next-action {
  margin-top: 7px;
  font-weight: 600;
}
.skills-reports-page .sr-analysis-message {
  flex: 1 0 100%;
  margin: 0 0 .25rem;
  color: #344054;
}
.skills-reports-page .sr-analysis-chip {
  background: #f1f5f9;
  color: #475569;
}
.skills-reports-page .sr-analysis-table-wrap {
  overflow-x: auto;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  margin-bottom: .75rem;
}
.skills-reports-page .sr-analysis-table {
  width: 100%;
  border-collapse: collapse;
  font-size: .75rem;
  margin-bottom: 0;
}
.skills-reports-page .sr-analysis-table th,
.skills-reports-page .sr-analysis-table td {
  padding: 10px 16px;
  border-bottom: 1px solid #eaecf0;
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}
.skills-reports-page .sr-analysis-table th {
  background: var(--primary-color);
  color: #fff;
  font-weight: 600;
}
.skills-reports-page .sr-analysis-status {
  font-weight: 700;
}
.skills-reports-page .sr-analysis-status--confirmed_gap {
  color: #b42318;
}
.skills-reports-page .sr-analysis-status--no_gap {
  color: #027a48;
}
.skills-reports-page .sr-analysis-status--insufficient_evidence,
.skills-reports-page .sr-analysis-status--assessment_interrupted {
  color: #b54708;
}
.skills-reports-page .sr-analysis-admin-note {
  margin: .75rem 0 0;
  color: #667085;
  font-size: .75rem;
}
@media (max-width: 767px) {
  .skills-reports-page .sr-analysis-section {
    margin: 8px 0;
    padding: .75rem;
  }
  .skills-reports-page .sr-analysis-filters select {
    width: 100%;
  }
}

/* Regenerate/Save step panel on the AI-generated/extracted question review
   screen (manage_ai_assessment_questions.html), and the equivalent "done
   adding questions" panel on the manual question editor
   (manage_assessment_questions.html). Both reuse
   .programme-recruitment-template-browser-head (programme_management_content.html)
   directly in the HTML instead of duplicating it here -- these rules only
   add what that pattern doesn't already cover: wrapping long copy next to
   one or more stacked actions instead of one. */
.ai-review-step-panel,
.assessment-review-step-panel {
  flex-wrap: wrap;
}
.ai-review-step-panel-copy,
.assessment-review-step-panel-copy {
  flex: 1 1 auto;
}
.ai-review-step-panel-actions,
.assessment-review-step-panel-actions {
  align-items: center;
  display: flex;
  flex-shrink: 0;
  gap: 0.5rem;
}

/* Moved out of an inline <style> block in _manage_assessment_body.html.
   Keeps the Upload Rubric / Remark Progress modals (and their backdrops)
   stacked above whatever modal opened them, since Bootstrap only staggers
   z-index for modals it opens itself, not ones opened from inside another. */
#upload_rubric_modal,
#remark_progress_modal {
  z-index: 2000 !important;
}
#upload_rubric_modal .modal-dialog,
#remark_progress_modal .modal-dialog {
  z-index: 2001 !important;
}
.modal-backdrop.modal-stack-fixed {
  z-index: 1999 !important;
}

/* Moved out of an inline style="display:none;" in
   _learner_assessment_table.html. Hides the "Created" helper column
   (a hidden sort key for the DataTable) before DataTables' own
   columnDefs visibility kicks in, so it never flashes visible. */
.learner-assessment-created-column {
  display: none;
}

/* progress_reporting_tool/manage_team.html — reskin to match the rest of
   the platform: purple header bar, purple table headers with zebra rows,
   and pill-style pagination. Everything below is scoped under
   .manage-team-page so it only touches this page. */

/* Card container: white background, rounded corners, soft shadow. */
.manage-team-page.card {
  background: #fff;
  border: none;
  border-radius: 12px;
  box-shadow: 0 6px 24px rgba(20, 10, 40, 0.08);
  overflow: hidden;
}

/* Give Manage Team the same shell hierarchy as Course Insights: one white
   rounded page shell, a compact title row, and a bordered inner panel. */
.manage-team-insights-shell {
  width: 100%;
  max-width: 100%;
  margin-top: 7px;
  padding: 18px 14px 16px;
  background: var(--pm-surface, #fff);
  border-radius: 24px;
  box-shadow: 0 10px 28px rgba(29, 21, 61, 0.1);
  box-sizing: border-box;
}

.manage-team-insights-shell .manage-team-page.card {
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-shadow: none;
}

.manage-team-insights-shell .manage-team-header-card {
  margin-top: 0 !important;
  overflow: visible;
}

.manage-team-insights-shell .manage-team-header-bar {
  padding: 0 0 10px;
  background: transparent;
  color: var(--pm-ink, #252932);
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}

.manage-team-insights-shell .manage-team-header-title,
.manage-team-insights-shell .manage-team-header-title #team_name_value {
  color: var(--pm-ink, #252932);
  font-size: 18px;
}

.manage-team-insights-shell .manage-team-back-btn {
  background: var(--pm-accent, var(--primary-color));
  color: #fff;
  box-shadow: none;
}

.manage-team-insights-shell .manage-team-back-btn:hover,
.manage-team-insights-shell .manage-team-back-btn:focus {
  background: var(--pm-accent-hover, var(--primary-color));
  color: #fff;
}

.manage-team-insights-shell .manage-team-header-card > .card-body {
  padding: 0;
}

.manage-team-insights-shell .manage-team-content-card {
  margin-top: 1rem !important;
  margin-bottom: 0;
  border: 1px solid var(--pm-border, var(--primary-color));
  border-radius: 20px;
  overflow: hidden;
}

@media (min-width: 768px) {
  /* Remove only the main card's mx-3 left gutter and return that 1rem to
     its width, expanding toward the sidebar while preserving the right edge. */
  .manage-team-page.card.mx-3 {
    margin-left: 0 !important;
    width: auto;
  }
}

.manage-team-page.card > .card-body {
  padding: 1.75rem;
}

/* Header bar: primary-color background, white bold title on the left,
   the "Back" action button on the right. */
.manage-team-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  background: var(--primary-color);
  color: #fff;
  padding: 1.25rem 1.75rem;
}
.manage-team-header-title {
  margin: 0;
  color: #fff;
  font-weight: 700;
  font-size: 1.15rem;
}
.manage-team-header-title,
.manage-team-header-title #team_name_value {
  color: #fff;
}
.manage-team-back-btn {
  background: #fff;
  border: none;
  color: var(--primary-color);
  font-weight: 700;
  padding: 0.5rem 1.25rem;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}
.manage-team-back-btn:hover,
.manage-team-back-btn:focus {
  background: #f2ecfb;
  color: var(--primary-color);
}

/* .team-actions-anchor is a position:relative wrapper around just the
   "Team actions" button (not the whole card-body), so .team-actions-panel
   can be position:absolute against it: anchored to the button's own
   bottom-right corner (top: 100% = the button's height, right: 0) rather
   than pushing the table/tabs below it down the page like an in-flow
   block would. */
.team-actions-anchor {
  position: relative;
  width: fit-content;
  margin-left: auto;
}

/* Vertical context-menu-style list, one row per action, icon +
   left-aligned label, no button chrome, light gray hover -- instead of a
   wrapped row of colored pill buttons.

   Bootstrap-first: layout/spacing/color utilities that Bootstrap covers
   (d-flex, flex-column, align-items-center, w-100, bg-transparent,
   border-0, text-start, text-decoration-none, flex-shrink-0, flex-grow-0,
   text-center, flex-fill) live as classes on the elements in
   manage_team.html. Only what Bootstrap 5.0.2 (the version this page
   loads -- verified live, its fw-semibold/rounded-3/overflow-y-auto
   utilities don't compute the values below) has no utility for stays
   here: gap at this exact rem value, this border-radius, the CSS-variable
   color/font tokens, this font-weight, and this padding.

   display: flex and background: transparent stay custom rather than
   moving to d-flex/bg-transparent utility classes, for the same reason in
   both cases: Bootstrap's utilities all carry !important, which beats a
   pseudo-class rule regardless of specificity or source order.
     - display: three of these rows also carry a toggled d-none for
       conditional visibility; a coexisting d-flex would permanently win
       over d-none (it's defined after d-none in Bootstrap's stylesheet)
       and the row would never actually hide.
     - background: :hover/:focus below need to change the background;
       bg-transparent's !important would permanently lock it transparent
       and the hover highlight would never show (caught by testing this
       live with CSS.forcePseudoState, not just eyeballing the diff).
   Plain, non-!important declarations here have neither problem: d-none
   and :hover both still win the normal, unimportant way. */
.team-actions-menu-item {
  display: flex;
  background: transparent;
  gap: 0.65rem;
  border-radius: 0.5rem;
  color: var(--pm-ink, #252932);
  font-size: 0.8rem;
  font-weight: 600;
  padding: 11px 12px;
}
.team-actions-menu-item:hover,
.team-actions-menu-item:focus {
  background: #f1f1f4;
  color: var(--pm-ink, #252932);
}
.team-actions-menu-item-icon {
  width: 1.1rem;
  color: var(--primary-color);
  font-size: 0.95rem;
}
.team-actions-menu-item-spinner {
  color: var(--primary-color);
}

/* Compact trigger button for .team-actions-panel below. Unscoped (not
   limited to .manage-team-insights-shell) so progress_reporting_tool/
   internCharts/'s per-document-row "Manage" popup can reuse the exact same
   look instead of duplicating these declarations under a new class name. */
.team-actions-toggle {
  align-items: center;
  background: var(--btn-outline-primary-bg, var(--primary-color));
  border: 1px solid var(--btn-outline-primary-border, var(--primary-color));
  border-radius: 6px;
  color: var(--btn-outline-primary-text, #fff);
  display: flex;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  justify-content: center;
  gap: 0.6rem;
  min-height: 30px;
  padding: 5px 10px;
  text-align: left;
  width: fit-content;
}

/* Floats over the page (table/tabs below are never pushed down): absolute
   against .team-actions-anchor, docked under the button's bottom-right
   corner. Fixed width instead of stretching to the container, capped
   height with its own scrollbar once the action list runs long.

   Bootstrap-first: position-absolute, end-0, bg-white and border-0 (all
   covered exactly) are classes on the element in manage_team.html. The
   rest has no Bootstrap 5.0.2 utility: an arbitrary top offset, a z-index
   this high, this exact width/max-width, max-height at all, per-axis
   overflow-y (only the combined overflow-auto exists in this version, and
   it would also add an unwanted overflow-x), this border-radius, this
   specific box-shadow recipe, and this padding.

   Also unscoped for the same reason as .team-actions-toggle above -- reused
   as-is by internCharts/'s per-document-row "Manage" popup. */
.team-actions-panel {
  top: calc(100% + 6px);
  /* Was z-index: 40 -- the same value as .programme-learner-manage-dropdown
     (the row-level "Manage Learner" toggle's own wrapper, in this same
     file), and lower than .programme-learner-row-menu's z-index: 99999
     !important once that row's menu is actually open. At the tied value,
     the table (later in the DOM than this panel) painted on top regardless
     of which was open, which is what let its buttons cover this panel
     instead of the other way around. Matches (and slightly exceeds) that
     99999 so this panel wins against both states. */
  z-index: 100000 !important;
  width: 240px;
  max-width: calc(100vw - 2rem);
  max-height: min(60vh, 420px);
  overflow-y: auto;
  border-radius: 0.8rem;
  box-shadow: 0 0.85rem 2rem rgba(15, 23, 42, 0.16);
  padding: 10px;
}

@media (max-width: 767.98px) {
  .team-actions-toggle {
    min-height: 30px;
  }
}

/* Table header: primary-color background, white uppercase bold text,
   rounded corners on the first/last header cell. */
.manage-team-content-card table thead th {
  background: var(--primary-color) !important;
  color: #fff !important;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.4px;
  border: none !important;
}
.manage-team-content-card table thead tr th:first-child {
  border-top-left-radius: 10px;
  border-bottom-left-radius: 10px;
}
.manage-team-content-card table thead tr th:last-child {
  border-top-right-radius: 10px;
  border-bottom-right-radius: 10px;
}

/* Table rows: white background, light zebra striping, subtle purple
   hover highlight. Set via Bootstrap's own table CSS variables (the
   mechanism its .table-striped/.table cell rules read from) so it wins
   regardless of stylesheet order, plus a direct, !important hover rule
   since these tables don't carry the .table-hover class Bootstrap's
   own hover variable depends on. */
.manage-team-content-card table.data-table,
.manage-team-content-card table.table-striped {
  --bs-table-bg: #fff;
  --bs-table-striped-bg: #faf9fc;
  --bs-table-striped-color: inherit;
  --bs-table-hover-bg: #ede7f9;
  --bs-table-hover-color: inherit;
}
.manage-team-content-card table.data-table tbody tr,
.manage-team-content-card table.table-striped tbody tr {
  background-color: #fff;
}
.manage-team-content-card table.data-table tbody tr:nth-of-type(odd),
.manage-team-content-card table.table-striped tbody tr:nth-of-type(odd) {
  background-color: #faf9fc;
}
.manage-team-content-card table.data-table tbody tr:hover,
.manage-team-content-card table.table-striped tbody tr:hover,
.manage-team-content-card table.data-table tbody tr:hover > *,
.manage-team-content-card table.table-striped tbody tr:hover > * {
  background-color: #ede7f9 !important;
}

/* Pagination: rounded square buttons, white background, light border;
   active page filled with primary-color and white text. Shared by
   manage_team.html's content card and every page using the
   learner-assessments-page scope (My Assessments, My Practicals). */
.manage-team-content-card .dataTables_paginate .paginate_button,
.learner-assessments-page .dataTables_paginate .paginate_button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  min-height: 2rem;
  margin-left: 0.25rem;
  padding: 0 0.5rem;
  background: #fff;
  border: 1px solid #e1dcea;
  border-radius: 0.4rem;
  color: #493a5c !important;
}
.manage-team-content-card .dataTables_paginate .paginate_button.current,
.manage-team-content-card .dataTables_paginate .paginate_button.current:hover,
.learner-assessments-page .dataTables_paginate .paginate_button.current,
.learner-assessments-page .dataTables_paginate .paginate_button.current:hover {
  background: var(--primary-color);
  border-color: var(--primary-color);
  color: #fff !important;
}
.manage-team-content-card .dataTables_paginate .paginate_button:hover,
.learner-assessments-page .dataTables_paginate .paginate_button:hover {
  background: #ede7f9;
  border-color: #e1dcea;
  color: #493a5c !important;
}
.manage-team-content-card .dataTables_paginate .paginate_button.disabled,
.manage-team-content-card .dataTables_paginate .paginate_button.disabled:hover,
.learner-assessments-page .dataTables_paginate .paginate_button.disabled,
.learner-assessments-page .dataTables_paginate .paginate_button.disabled:hover {
  background: #fff;
  color: #b7aec7 !important;
  cursor: default;
}

/* Assign-course modal (#view_courses, manage_team.html): course cards match
   the teacher "My Subjects" card design (.learner-home-subject-card /
   .teacher-subject-image, ~line 12656) -- a full-width top image, then
   eyebrow/title/description with the actions pinned to the card's bottom --
   instead of the old cramped three-column row layout that needed its own
   grid-hack overrides just to survive a phone width. Bootstrap's own
   col-12/col-sm-6/col-lg-4 grid on the card wrapper (manage_team.html
   #course_card_clone) already stacks it correctly at every width, so no
   separate mobile rules are needed here. */
#view_courses .course_card {
  border: 0;
  border-radius: 18px;
  box-shadow: 0 10px 28px rgba(29, 21, 61, 0.08);
  overflow: hidden;
}

#view_courses .course_card .course_img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  background: #f3f1f6;
}

#view_courses .course_card .card-body {
  padding: 1rem 1.1rem 1.1rem;
}

#view_courses .course_card .course_name {
  font-size: 0.95rem;
}

/* Active Courses is the tab a mentor scans most -- the full course
   description reads as clutter there, so only this tab hides it (More
   Courses / Added to cart, where a mentor is actually deciding whether to
   add something new, still show it). */
#view_courses #active-course-tab .course_overview {
  display: none;
}

@media (max-width: 767.98px) {
  body:has(.manage-team-page) {
    overflow-x: hidden;
  }

  body:has(.manage-team-page) .home-section:not(.admin-home-layout) {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
    padding-bottom: calc(8rem + env(safe-area-inset-bottom)) !important;
    box-sizing: border-box;
  }

  .manage-team-page.card,
  .manage-team-page.card.mx-3 {
    width: 100%;
    max-width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box;
  }

  .manage-team-header-card {
    margin-top: 0.75rem !important;
  }

  .manage-team-header-bar {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem;
  }

  .manage-team-header-title {
    width: 100%;
    font-size: 1rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .manage-team-back-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    align-self: flex-start;
    width: min(9rem, 100%);
    min-height: 40px;
  }

  .manage-team-page.card > .card-body {
    min-width: 0;
    padding: 0.75rem;
  }

  .team-actions-toolbar {
    display: flex !important;
    flex-direction: column;
    width: 100%;
  }

  .team-actions-menu-item {
    justify-content: flex-start;
    width: 100%;
    max-width: 100%;
    min-height: 42px;
    margin: 0 !important;
    font-size: 0.72rem;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
    box-sizing: border-box;
  }

  .team-actions-toolbar > .d-none {
    display: none !important;
  }

  .manage-team-content-card {
    margin-top: 1rem !important;
  }

  .manage-team-content-card nav {
    width: 100%;
    min-width: 0;
  }

  .manage-team-content-card #nav-tab {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    width: 100%;
    max-width: 100%;
    padding-bottom: 0.35rem;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .manage-team-content-card #nav-tab .nav-link {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 0.55rem 0.75rem;
    white-space: nowrap;
  }

  .manage-team-content-card .tab-content,
  .manage-team-content-card .tab-pane,
  .manage-team-content-card .dataTables_wrapper {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .manage-team-content-card .tab-pane > h5 + .btn,
  .manage-team-content-card .tab-pane > button:not(.nav-link) {
    width: 100%;
    min-height: 40px;
    margin-bottom: 0.75rem;
    white-space: normal;
  }

  .manage-team-content-card .dataTables_length,
  .manage-team-content-card .dataTables_filter {
    width: 100%;
    margin: 0 0 0.65rem;
    text-align: left;
  }

  .manage-team-content-card .dataTables_filter label {
    display: grid;
    gap: 0.35rem;
    width: 100%;
  }

  .manage-team-content-card .dataTables_filter input {
    width: 100%;
    max-width: none;
    min-height: 38px;
    margin-left: 0 !important;
  }

  .manage-team-content-card .dataTables_wrapper > .row:nth-child(2),
  .manage-team-content-card .dataTables_wrapper > .row:nth-child(2) > div {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  .manage-team-content-card .dataTables_wrapper > .row:nth-child(2) > div {
    overflow-x: auto;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .manage-team-content-card table.data-table,
  .manage-team-content-card table.table-striped {
    width: max-content !important;
    min-width: 620px;
  }

  .manage-team-content-card table th,
  .manage-team-content-card table td {
    padding: 0.65rem 0.75rem !important;
    font-size: 0.7rem;
    white-space: nowrap;
  }

  .manage-team-content-card .programme-learner-manage-toggle,
  .manage-team-content-card table .btn {
    width: auto;
    min-width: 92px;
    max-width: none;
    min-height: 36px;
    justify-content: center;
    white-space: nowrap;
  }

  .manage-team-content-card .dataTables_info,
  .manage-team-content-card .dataTables_paginate {
    float: none;
    width: 100%;
    margin-top: 0.75rem;
    text-align: center;
    white-space: normal;
  }

  body:has(.manage-team-page) .modal-dialog,
  body:has(.manage-team-page) .modal-dialog.modal-lg,
  body:has(.manage-team-page) .modal-dialog.modal-xl {
    width: calc(100% - 1rem);
    max-width: none;
    margin: 0.5rem auto;
  }

  body:has(.manage-team-page) .modal-content {
    max-height: calc(100dvh - 1rem);
    border-radius: 0.85rem;
    overflow: hidden;
  }

  body:has(.manage-team-page) .modal-header,
  body:has(.manage-team-page) .modal-body,
  body:has(.manage-team-page) .modal-footer {
    padding: 0.75rem;
  }

  body:has(.manage-team-page) .modal-body {
    min-width: 0;
    overflow-x: auto;
    overflow-y: auto;
  }

  body:has(.manage-team-page) .modal-body table {
    width: max-content;
    min-width: 560px;
  }

  body:has(.manage-team-page) .modal-footer {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.5rem;
  }

  body:has(.manage-team-page) .modal-footer .btn,
  body:has(.manage-team-page) .modal-body > .btn,
  body:has(.manage-team-page) .modal-body > a.btn {
    width: 100%;
    min-height: 40px;
    margin: 0 !important;
    white-space: normal;
  }

  #QR_code .qr-modal-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
  }

  #QR_code .qr-modal-actions .btn {
    flex: 0 1 auto;
    width: auto;
    max-width: 100%;
    min-height: 40px;
    margin: 0 !important;
    padding-inline: 0.9rem;
    white-space: normal;
  }

  #assign_member .modal-body {
    width: 100%;
    padding: 0.75rem;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  #assign_member #assign_members_table_wrapper,
  #assign_member #assign_members_table_wrapper > .row,
  #assign_member #assign_members_table_wrapper > .row > [class*="col-"] {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin-left: 0;
    margin-right: 0;
  }

  #assign_member #assign_members_table_wrapper > .row > [class*="col-"] {
    padding-left: 0;
    padding-right: 0;
  }

  #assign_member .dataTables_length,
  #assign_member .dataTables_filter {
    float: none;
    width: 100%;
    margin: 0 0 0.75rem;
    text-align: left;
  }

  #assign_member .dataTables_length label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    margin: 0;
  }

  #assign_member .dataTables_length select {
    flex: 0 0 5rem;
    width: 5rem;
    min-height: 38px;
  }

  #assign_member .dataTables_filter label {
    display: grid;
    gap: 0.35rem;
    width: 100%;
    margin: 0;
  }

  #assign_member .dataTables_filter input,
  #assign_member .dataTables_filter input[type="search"] {
    width: 100%;
    max-width: 100%;
    min-height: 40px;
    margin: 0 !important;
    box-sizing: border-box;
  }

  #assign_member #assign_members_table,
  #assign_member #assign_members_table tbody,
  #assign_member #assign_members_table tr,
  #assign_member #assign_members_table td {
    display: block;
    width: 100% !important;
    min-width: 0;
    box-sizing: border-box;
  }

  #assign_member #assign_members_table {
    min-width: 0;
    border-collapse: separate;
  }

  #assign_member #assign_members_table thead {
    display: none;
  }

  #assign_member #assign_members_table tbody tr {
    margin-bottom: 0.65rem;
    padding: 0.4rem 0.65rem;
    border: 1px solid #e5e1ee;
    border-radius: 0.65rem;
    background: #fff;
  }

  #assign_member #assign_members_table tbody td {
    display: grid;
    grid-template-columns: minmax(6.5rem, 40%) minmax(0, 1fr);
    align-items: center;
    gap: 0.5rem;
    min-height: 38px;
    padding: 0.4rem 0 !important;
    border: 0;
    border-bottom: 1px solid #eeeaf3;
    text-align: right;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  #assign_member #assign_members_table tbody td:last-child {
    border-bottom: 0;
  }

  #assign_member #assign_members_table tbody td::before {
    content: attr(data-label);
    font-weight: 700;
    text-align: left;
  }

  #assign_member #assign_members_table tbody td.dataTables_empty {
    display: block;
    padding: 1rem 0 !important;
    border: 0;
    text-align: center;
  }

  #assign_member #assign_members_table tbody td.dataTables_empty::before {
    content: none;
  }

  #assign_member .dataTables_info,
  #assign_member .dataTables_paginate {
    float: none;
    width: 100%;
    margin-top: 0.75rem;
    text-align: center;
    white-space: normal;
  }

  #assign_member .dataTables_paginate .pagination {
    justify-content: center;
    flex-wrap: wrap;
  }

  #assign_member .assign-member-actions {
    display: flex;
    justify-content: center;
    width: 100%;
  }

  #assign_member .assign-member-actions .btn {
    width: min(9rem, 100%);
    min-height: 40px;
    margin-top: 0.75rem !important;
  }

  #view_courses .modal-header {
    gap: 0.75rem;
  }

  #view_courses .modal-title {
    min-width: 0;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  #view_courses .modal-header .fa-times {
    display: inline-flex;
    flex: 0 0 40px;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: -0.5rem;
    cursor: pointer;
  }

  #view_courses .modal-body {
    width: 100%;
    padding: 0.75rem;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  #view_courses .nav-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.25rem;
    width: 100%;
    max-width: 100%;
    padding-bottom: 0.25rem;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  #view_courses .nav-tabs .nav-item {
    flex: 0 0 auto;
  }

  #view_courses .nav-tabs .nav-link {
    min-height: 40px;
    padding: 0.55rem 0.7rem;
    font-size: 0.72rem;
    white-space: nowrap;
  }

  #view_courses #course-tab-content,
  #view_courses #course-tab-content .tab-pane,
  #view_courses #course-tab-content .card-body,
  #view_courses .active_course_row,
  #view_courses .more_course_row,
  #view_courses .added_to_cart_course_row {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  #view_courses #course-tab-content > .tab-pane > .card-body {
    padding: 0.75rem 0;
  }

  #view_courses .active_course_row,
  #view_courses .more_course_row,
  #view_courses .added_to_cart_course_row {
    margin-right: 0;
    margin-left: 0;
  }

  #view_courses .course_card .course_name,
  #view_courses .course_card .course_overview {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  #view_courses .course_card .view_course,
  #view_courses .course_card .assign_course_btn,
  #view_courses .course_card .view_learner_progress {
    min-height: 38px;
    white-space: normal;
  }

}

/* Course progress matrix modal — paper/analytics-report treatment.
   Keep the report layout available on desktop; only its compact overrides
   below belong to the mobile media query. */
  #view_learner_progress .modal-dialog { max-width: 1180px; }

  #view_learner_progress .modal-content {
    overflow: hidden;
    background-color: #eeeadd;
    background-image: radial-gradient(circle, #ddd7c1 1px, transparent 1px);
    background-size: 18px 18px;
    border: 0;
    border-radius: 2px;
    color: #1c2620;
  }

  #view_learner_progress .course-progress-modal-header {
    display: flex;
    align-items: flex-start;
    gap: 1.6rem;
    padding: 2rem 2.6rem .9rem;
    background: transparent;
    color: #1c2620;
    border-bottom: 0;
  }

  #view_learner_progress .course-progress-heading { min-width: 0; }

  #view_learner_progress .course-progress-eyebrow {
    display: flex;
    align-items: center;
    margin-bottom: .55rem;
    color: #4d5c50;
    font-family: 'Courier New', monospace;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-transform: uppercase;
  }

  #view_learner_progress .course-progress-eyebrow::before {
    display: inline-block;
    width: .5rem;
    height: .5rem;
    margin-right: .6rem;
    border-radius: 50%;
    background: #a63b2c;
    content: '';
  }

  #view_learner_progress .course-progress-modal-header .modal-title {
    margin: 0;
    color: #14201a;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 2.15rem;
    font-weight: 700;
    line-height: 1.1;
  }

  #view_learner_progress .course-progress-subtitle {
    margin: .5rem 0 0;
    color: #5c6355;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: .95rem;
    font-style: italic;
  }

  #view_learner_progress .course-progress-stats {
    display: flex;
    align-items: stretch;
    flex-shrink: 0;
    margin-left: auto;
    color: #1c2620;
  }

  #view_learner_progress .course-progress-stats > div {
    min-width: 6.4rem;
    padding: 0 1rem;
    border-left: 1px solid #d0cab3;
    text-align: center;
  }

  #view_learner_progress .course-progress-stats > div:first-child {
    border-left: 0;
  }

  #view_learner_progress .course-progress-stat-value,
  #view_learner_progress .course-progress-stats small {
    display: block;
  }

  #view_learner_progress .course-progress-stat-value {
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 1.7rem;
    font-weight: 700;
  }

  #view_learner_progress .course-progress-stats small {
    margin-top: .1rem;
    color: #5c6355;
    font-family: 'Courier New', monospace;
    font-size: .6rem;
    letter-spacing: .08em;
    text-transform: uppercase;
  }

  #view_learner_progress .modal-header > .fa-times {
    margin-left: 1.4rem;
    color: #5c6355;
    cursor: pointer;
  }

  #view_learner_progress .modal-body {
    padding-top: 0;
  }

  #view_learner_progress .course-progress-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 1.1rem;
    align-items: flex-end;
    margin: 1rem 2.6rem 1.1rem;
    padding: 1.2rem 1.4rem;
    background: #f5f2e7;
    border: 1px solid #d3cdb6;
    border-radius: 2px;
  }

  #view_learner_progress .course-progress-field {
    display: flex;
    flex: 1 1 11rem;
    flex-direction: column;
    gap: .4rem;
    min-width: 9rem;
  }

  #view_learner_progress .course-progress-field-search {
    flex: 2 1 16rem;
  }

  #view_learner_progress .course-progress-field label {
    margin: 0;
    color: #5c6355;
    font-family: 'Courier New', monospace;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
  }

  #view_learner_progress .course-progress-field-unlabeled {
    justify-content: flex-end;
  }

  #view_learner_progress .course-progress-filter-bar .form-control {
    height: 2.7rem;
    background: #fdfcf7;
    border: 1px solid #d3cdb6;
    border-radius: 0;
    color: #1c2620;
    font-size: .88rem;
  }

  #view_learner_progress .course-progress-filter-bar .form-control:focus {
    box-shadow: none;
    border-color: #4d5c50;
  }

  #view_learner_progress .course-progress-view-toggle {
    display: flex;
    flex: 0 0 auto;
    align-self: flex-end;
    height: 2.7rem;
    background: #fdfcf7;
    border: 1px solid #d3cdb6;
  }

  #view_learner_progress .course-progress-toggle-btn {
    padding: 0 1.1rem;
    background: transparent;
    color: #1c2620;
    border: 0;
    font-family: 'Courier New', monospace;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
  }

  #view_learner_progress .course-progress-toggle-btn + .course-progress-toggle-btn {
    border-left: 1px solid #d3cdb6;
  }

  #view_learner_progress .course-progress-toggle-btn.active {
    background: #1c2620;
    color: #f3efe1;
  }

  #view_learner_progress .course-progress-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1.2rem;
    margin: 0 2.6rem 1.4rem;
    color: #4d5c50;
    font-size: .78rem;
  }

  #view_learner_progress .course-progress-legend span {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
  }

  #view_learner_progress .status-swatch {
    display: inline-block;
    width: .62rem;
    height: .62rem;
  }

  #view_learner_progress .status-done { background: #4f6a3d; }
  #view_learner_progress .status-progress { background: #b9832c; }
  #view_learner_progress .status-stalled { background: #a23b2e; }
  #view_learner_progress .status-not-started { background: #b6b090; }

  #view_learner_progress .tab-content {
    padding: 0 2.6rem 2rem;
  }

  #view_learner_progress .course_progress_matrix,
  #view_learner_progress .course_progress_matrix_mentors {
    overflow-x: auto;
    background: #f5f2e7;
    border: 1px solid #d3cdb6;
    border-radius: 0;
  }

  #view_learner_progress .course_progress_matrix table,
  #view_learner_progress .course_progress_matrix_mentors table {
    min-width: 1050px;
    margin-bottom: 0;
    background: #f5f2e7;
    border-collapse: collapse;
  }

  #view_learner_progress .course_progress_matrix thead th,
  #view_learner_progress .course_progress_matrix_mentors thead th {
    padding: .7rem .9rem;
    background: #f5f2e7 !important;
    color: #1c2620 !important;
    border-bottom: 1px solid #d3cdb6 !important;
    font-size: .78rem;
    text-align: left;
    vertical-align: middle;
  }

  #view_learner_progress .course_progress_matrix thead tr:first-child th,
  #view_learner_progress .course_progress_matrix_mentors thead tr:first-child th {
    padding-top: .9rem;
    padding-bottom: .5rem;
    background: #ebe7d8 !important;
    color: #4d5c50 !important;
    font-family: 'Courier New', monospace;
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
  }

  #view_learner_progress .course_progress_matrix thead tr:nth-child(2) th,
  #view_learner_progress .course_progress_matrix_mentors thead tr:nth-child(2) th {
    padding-top: .65rem;
    padding-bottom: .9rem;
  }

  #view_learner_progress .progress-lesson-title {
    display: block;
    color: #1c2620;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: .88rem;
    font-weight: 700;
    line-height: 1.25;
  }

  #view_learner_progress .progress-lesson-code {
    display: block;
    margin-top: .3rem;
    color: #8b8770;
    font-family: 'Courier New', monospace;
    font-size: .64rem;
    font-weight: 400;
    letter-spacing: .04em;
    text-transform: uppercase;
  }

  #view_learner_progress .course_progress_matrix tbody td,
  #view_learner_progress .course_progress_matrix_mentors tbody td,
  #view_learner_progress .course_progress_matrix tbody th,
  #view_learner_progress .course_progress_matrix_mentors tbody th {
    padding: .75rem .9rem;
    background: #f5f2e7;
    color: #1c2620;
    border-bottom: 1px solid #e2ddc9;
    font-size: .82rem;
    font-weight: 400;
    text-align: left;
    vertical-align: middle;
  }

  #view_learner_progress .course_progress_matrix tbody tr:hover td,
  #view_learner_progress .course_progress_matrix tbody tr:hover th,
  #view_learner_progress .course_progress_matrix_mentors tbody tr:hover td,
  #view_learner_progress .course_progress_matrix_mentors tbody tr:hover th {
    background: #efeadb;
  }

  #view_learner_progress .progress-learner-cell {
    display: flex;
    align-items: center;
    gap: .75rem;
  }

  #view_learner_progress .progress-avatar {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    background: #3f5c3a;
    color: #f3efe1;
    border-radius: 50%;
    font-family: 'Courier New', monospace;
    font-size: .72rem;
    font-weight: 700;
  }

  #view_learner_progress .progress-avatar-1,
  #view_learner_progress .progress-avatar-2,
  #view_learner_progress .progress-avatar-3,
  #view_learner_progress .progress-avatar-4 {
    background: #3f5c3a;
  }

  #view_learner_progress .progress-learner-detail {
    display: flex;
    flex-direction: column;
    gap: .15rem;
  }

  #view_learner_progress .progress-learner-name {
    color: #1c2620;
    font-family: Georgia, 'Times New Roman', serif;
    font-weight: 700;
  }

  #view_learner_progress .progress-learner-activity {
    color: #7f806f;
    font-size: .7rem;
  }

  #view_learner_progress .progress-overall-cell {
    min-width: 10rem;
    white-space: nowrap;
  }

  #view_learner_progress .progress-bar-track {
    display: inline-block;
    width: 5.5rem;
    height: .45rem;
    margin-right: .45rem;
    overflow: hidden;
    vertical-align: middle;
    background: #ded9c8;
    border: 1px solid #c7c1ad;
    border-radius: 999px;
  }

  #view_learner_progress .progress-bar-fill {
    display: block;
    height: 100%;
    background: #4f6a3d;
    border-radius: inherit;
  }

  #view_learner_progress .progress-bar-value {
    color: #4d5c50;
    font-family: 'Courier New', monospace;
    font-size: .7rem;
  }

  #view_learner_progress .status-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .3rem .7rem;
    background: #e2ddc9;
    color: #33362b;
    border-radius: 999px;
    font-size: .72rem;
    font-weight: 600;
    white-space: nowrap;
  }

  #view_learner_progress .status-pill-done {
    background: #e2ddc9;
    color: #33362b;
  }

  #view_learner_progress .status-pill-progress {
    background: #f1dcae;
    color: #8a5c17;
  }

  #view_learner_progress .status-pill-stalled {
    background: #f2dcd7;
    color: #832c20;
  }

  #view_learner_progress .status-pill-empty {
    background: transparent;
    color: #9a9679;
    padding-left: 0;
  }

  #view_learner_progress .dataTables_filter,
  #view_learner_progress .dataTables_length,
  #view_learner_progress .dataTables_info,
  #view_learner_progress .dataTables_paginate {
    display: none !important;
  }

  @media (max-width: 720px) {
    #view_learner_progress .course-progress-modal-header {
      flex-wrap: wrap;
      padding: 1.4rem 1.2rem .8rem;
    }
    #view_learner_progress .course-progress-modal-header .modal-title { font-size: 1.6rem; }
    #view_learner_progress .course-progress-stats { width: 100%; margin-left: 0; }
    #view_learner_progress .course-progress-stats > div { flex: 1; min-width: 0; padding: 0 .5rem; }
    #view_learner_progress .course-progress-filter-bar { margin: 1rem 1.2rem; align-items: stretch; }
    #view_learner_progress .course-progress-field { flex: 1 1 100%; }
    #view_learner_progress .course-progress-view-toggle { align-self: stretch; }
    #view_learner_progress .course-progress-legend { margin: 0 1.2rem 1.2rem; }
    #view_learner_progress .tab-content { padding: 0 1.2rem 1.5rem; }
  }

  @media (max-width: 767.98px) {
  body:has(.manage-team-page) .modal-body .form-control,
  body:has(.manage-team-page) .modal-body .form-select,
  body:has(.manage-team-page) .modal-body select,
  body:has(.manage-team-page) .modal-body textarea {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  .manage-team-content-card #nav-members > h5 + #activate-learners-button {
    display: flex;
    width: min(11rem, 100%);
    min-height: 36px;
    margin: 0 auto 0.85rem;
    padding: 0.4rem 0.75rem;
    font-size: 0.68rem;
    justify-content: center;
  }

  .manage-team-content-card #nav-members .dataTables_wrapper > .row:nth-child(2) > div {
    overflow: visible;
  }

  .manage-team-content-card #nav-members table.data-table,
  .manage-team-content-card #nav-members table.data-table tbody,
  .manage-team-content-card #nav-members table.data-table tr,
  .manage-team-content-card #nav-members table.data-table td {
    display: block;
    width: 100% !important;
  }

  .manage-team-content-card #nav-members table.data-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
  }

  .manage-team-content-card #nav-members table.data-table thead {
    display: none;
  }

  .manage-team-content-card #nav-members table.data-table tbody {
    display: grid;
    gap: 0.7rem;
  }

  .manage-team-content-card #nav-members table.data-table tbody tr {
    padding: 0.45rem 0.7rem;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 0.7rem;
    background: #fff;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.05);
    overflow: visible;
  }

  .manage-team-content-card #nav-members table.data-table tbody td {
    display: grid;
    grid-template-columns: minmax(7rem, 42%) minmax(0, 1fr);
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
    min-height: 40px;
    padding: 0.5rem 0 !important;
    border: 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.07);
    background: #fff !important;
    text-align: right;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .manage-team-content-card #nav-members table.data-table tbody td:last-child {
    border-bottom: 0;
  }

  .manage-team-content-card #nav-members table.data-table tbody td::before {
    content: attr(data-label);
    color: #64748b;
    font-size: 0.64rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
    text-transform: uppercase;
  }

  .manage-team-content-card #nav-members table.data-table tbody td.dataTables_empty {
    display: block;
    padding: 1rem !important;
    text-align: center;
  }

  .manage-team-content-card #nav-members table.data-table tbody td.dataTables_empty::before {
    content: none;
  }

  .manage-team-content-card #nav-members table.data-table td .btn,
  .manage-team-content-card #nav-members .programme-learner-manage-toggle {
    width: min(8.5rem, 100%);
    min-width: 0;
    min-height: 34px;
    margin-left: auto;
    padding: 0.35rem 0.6rem !important;
    font-size: 0.65rem;
  }

  .manage-team-content-card #nav-team-admin .dataTables_wrapper > .row:nth-child(2) > div {
    overflow: visible;
  }

  .manage-team-content-card #nav-team-admin table.manage-team-mobile-card-table,
  .manage-team-content-card #nav-team-admin table.manage-team-mobile-card-table tbody,
  .manage-team-content-card #nav-team-admin table.manage-team-mobile-card-table tr,
  .manage-team-content-card #nav-team-admin table.manage-team-mobile-card-table td,
  .manage-team-content-card #nav-mentor table.manage-team-mobile-card-table,
  .manage-team-content-card #nav-mentor table.manage-team-mobile-card-table tbody,
  .manage-team-content-card #nav-mentor table.manage-team-mobile-card-table tr,
  .manage-team-content-card #nav-mentor table.manage-team-mobile-card-table td {
    display: block;
    width: 100% !important;
  }

  .manage-team-content-card #nav-team-admin table.manage-team-mobile-card-table,
  .manage-team-content-card #nav-mentor table.manage-team-mobile-card-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0;
  }

  .manage-team-content-card #nav-team-admin table.manage-team-mobile-card-table thead,
  .manage-team-content-card #nav-mentor table.manage-team-mobile-card-table thead {
    display: none;
  }

  .manage-team-content-card #nav-team-admin table.manage-team-mobile-card-table tbody,
  .manage-team-content-card #nav-mentor table.manage-team-mobile-card-table tbody {
    display: grid;
    gap: 0.7rem;
  }

  .manage-team-content-card #nav-team-admin table.manage-team-mobile-card-table tbody tr,
  .manage-team-content-card #nav-mentor table.manage-team-mobile-card-table tbody tr {
    padding: 0.45rem 0.7rem;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 0.7rem;
    background: #fff;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.05);
    overflow: visible;
  }

  .manage-team-content-card #nav-team-admin table.manage-team-mobile-card-table tbody td,
  .manage-team-content-card #nav-mentor table.manage-team-mobile-card-table tbody td {
    display: grid !important;
    grid-template-columns: minmax(7rem, 42%) minmax(0, 1fr);
    align-items: center;
    gap: 0.6rem;
    min-width: 0;
    min-height: 40px;
    padding: 0.5rem 0 !important;
    border: 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.07);
    background: #fff !important;
    text-align: right;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .manage-team-content-card #nav-team-admin table.manage-team-mobile-card-table tbody td:last-child,
  .manage-team-content-card #nav-mentor table.manage-team-mobile-card-table tbody td:last-child {
    border-bottom: 0;
  }

  .manage-team-content-card #nav-team-admin table.manage-team-mobile-card-table tbody td::before,
  .manage-team-content-card #nav-mentor table.manage-team-mobile-card-table tbody td::before {
    content: attr(data-label);
    color: #64748b;
    font-size: 0.64rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
    text-transform: uppercase;
  }

  .manage-team-content-card #nav-team-admin table.manage-team-mobile-card-table td[data-label="Action"] {
    grid-template-columns: 1fr;
  }

  .manage-team-content-card #nav-team-admin table.manage-team-mobile-card-table td[data-label="Action"]::before {
    margin-bottom: 0.15rem;
  }

  .manage-team-content-card #nav-team-admin table.manage-team-mobile-card-table td[data-label="Action"] .btn {
    width: 100%;
    min-width: 0;
    min-height: 34px;
    margin: 0 0 0.35rem !important;
    white-space: normal;
  }

  .manage-team-content-card #nav-team-admin table.manage-team-mobile-card-table td[data-label="Action"] .btn:last-child {
    margin-bottom: 0 !important;
  }

  .manage-team-content-card #nav-mentor_ratings #mentor_ratings_filter_form > .d-flex {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.7rem;
    width: 100%;
  }

  .manage-team-content-card #nav-mentor_ratings #mentor_ratings_filter_form > .d-flex > div,
  .manage-team-content-card #nav-mentor_ratings #mentor_ratings_filter_form > .d-flex > .mx-3 {
    width: 100%;
    margin: 0 !important;
  }

  .manage-team-content-card #nav-mentor_ratings #mentor_ratings_filter_form .form-select,
  .manage-team-content-card #nav-mentor_ratings #mentor_ratings_filter_form #submit {
    width: 100%;
    min-height: 40px;
    margin: 0.25rem 0 0 !important;
  }

  .manage-team-content-card #nav-mentor_ratings .rate-guide-table {
    display: block;
    width: 100% !important;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .manage-team-content-card #nav-mentor_ratings .rate-guide-table thead,
  .manage-team-content-card #nav-mentor_ratings .rate-guide-table tbody {
    display: table;
    width: 500px;
    table-layout: fixed;
  }

  .manage-team-content-card #nav-mentor_ratings #departmentFilter {
    margin-inline: 0;
  }

  .manage-team-content-card #nav-mentor_ratings #departmentFilter > div {
    width: 100%;
    padding-inline: 0;
  }

  .manage-team-content-card #nav-mentor_ratings #departmentFilter .btn {
    width: min(12rem, 100%);
    min-height: 36px;
    margin-inline: auto;
    white-space: normal;
  }

  .manage-team-content-card #nav-mentor_ratings .table-responsive {
    width: 100%;
    max-width: 100%;
    margin-top: 1rem !important;
    overflow-x: auto;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .manage-team-content-card #nav-mentor_ratings #marksheetTable {
    display: block;
    width: 100% !important;
    min-width: 0;
    border: 0;
  }

  .manage-team-content-card #nav-mentor_ratings #marksheetTable thead {
    display: none;
  }

  .manage-team-content-card #nav-mentor_ratings #marksheetTable tbody {
    display: grid;
    gap: 0.7rem;
    width: 100%;
  }

  .manage-team-content-card #nav-mentor_ratings #marksheetTable tbody tr {
    display: block;
    width: 100%;
    padding: 0.45rem 0.7rem;
    border: 1px solid rgba(15, 23, 42, 0.1);
    border-radius: 0.7rem;
    background: #fff;
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.05);
    overflow: hidden;
  }

  .manage-team-content-card #nav-mentor_ratings #marksheetTable tbody td {
    display: grid;
    grid-template-columns: minmax(7rem, 42%) minmax(0, 1fr);
    align-items: start;
    gap: 0.6rem;
    width: 100% !important;
    min-width: 0;
    min-height: 40px;
    padding: 0.5rem 0 !important;
    border: 0;
    border-bottom: 1px solid rgba(15, 23, 42, 0.07);
    background: #fff !important;
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  .manage-team-content-card #nav-mentor_ratings #marksheetTable tbody td:last-child {
    border-bottom: 0;
  }

  .manage-team-content-card #nav-mentor_ratings #marksheetTable tbody td::before {
    content: attr(data-label);
    color: #64748b;
    font-size: 0.64rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
    text-transform: uppercase;
  }

  .manage-team-content-card #nav-mentor_ratings #marksheetTable .mark_class,
  .manage-team-content-card #nav-mentor_ratings #marksheetTable .rating_comment {
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
    margin: 0 !important;
    box-sizing: border-box;
  }

  .manage-team-content-card #nav-mentor_ratings #marksheetTable .rating_comment {
    min-height: 4.5rem;
    resize: vertical;
  }

  .manage-team-content-card .dataTables_wrapper > .row:first-child {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
    width: 100%;
    margin: 0 0 0.85rem;
  }

  .manage-team-content-card .dataTables_wrapper > .row:first-child > div {
    width: 100%;
    max-width: 100%;
    padding: 0;
  }

  .manage-team-content-card .dataTables_length label {
    display: inline-flex !important;
    align-items: center;
    gap: 0.45rem;
    max-width: 100%;
    margin: 0;
    white-space: normal;
  }

  .manage-team-content-card .dataTables_length select {
    flex: 0 0 4.5rem;
    width: 4.5rem !important;
    min-height: 38px;
    margin: 0 !important;
  }

  .manage-team-content-card .dataTables_filter label {
    display: block !important;
    width: 100%;
    max-width: 100%;
    margin: 0;
    text-align: left;
  }

  .manage-team-content-card .dataTables_filter input,
  .manage-team-content-card .dataTables_filter input[type="search"] {
    display: block;
    width: 100% !important;
    max-width: 100% !important;
    min-height: 40px;
    margin: 0.35rem 0 0 !important;
    box-sizing: border-box;
  }
}

/* assessment_management/learner_view_assessment.html (My Assessments) and
   skill_management/job_role_user_task.html (My Practicals) both use the
   learner-assessments-page wrapper class - the Practicals page reuses it
   on purpose instead of duplicating this styling under its own class.
   Assessments' "Tests" and "Course Assessment" tabs also both render the
   same _learner_assessment_table.html partial (#program_table /
   #subject_assessment_table), so this single rule updates every table
   under this scope at once. Uses the same theme-driven gradient as the
   standard header card, with the primary color as its fallback. */
.learner-assessments-page table.data-table thead.table-header-card th {
  background: var(--bg-card-purple, var(--primary-color)) !important;
  color: #fff !important;
  border: none !important;
  font-weight: 700;
  letter-spacing: 0.025em;
}
.learner-assessments-page table.data-table thead.table-header-card tr th:first-child {
  border-top-left-radius: 20px;
  border-bottom-left-radius: 20px;
}
.learner-assessments-page table.data-table thead.table-header-card tr th:last-child {
  border-top-right-radius: 20px;
  border-bottom-right-radius: 20px;
}

.learner-assessments-standard-header-page table.data-table thead.table-header-card th {
  background-color: var(--primary-color) !important;
  background-image: none !important;
  background: var(--primary-color) !important;
}

.learner-assessments-standard-header-page table.data-table thead.table-header-card tr th:first-child {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

.learner-assessments-standard-header-page table.data-table thead.table-header-card tr th:last-child {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

.learner-assessments-standard-header-page #program_table thead.table-header-card th,
.learner-assessments-standard-header-page #subject_assessment_table thead.table-header-card th {
  background: var(--primary-color) !important;
}

.learner-assessments-standard-header-page #program_table thead.table-header-card tr th:first-child,
.learner-assessments-standard-header-page #subject_assessment_table thead.table-header-card tr th:first-child {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

.learner-assessments-standard-header-page #program_table thead.table-header-card tr th:last-child,
.learner-assessments-standard-header-page #subject_assessment_table thead.table-header-card tr th:last-child {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

/* Assessment Overview uses the same flat table-header treatment as the
   learner table in Programme Management, with the solid tenant primary
   color. This prevents the shared theme gradient and pill corners from
   bleeding into the header. */
#assessment_overview_table {
  border-collapse: separate;
  border-spacing: 0;
}

#assessment_overview_table thead.table-header-card th {
  background: var(--primary-color) !important;
  background-image: none !important;
  color: #fff !important;
  border: none !important;
}

#assessment_overview_table thead.table-header-card tr th:first-child {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

#assessment_overview_table thead.table-header-card tr th:last-child {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

/* Keep the overview table inside its card shell.  A shared dropdown rule
   later in this stylesheet makes table-responsive overflow visible, which
   lets this wide table spill past the card instead of exposing its scrollbar. */
@media (min-width: 768px) {
  #programme-assessments-analysis-pane .card,
  #programme-assessments-analysis-pane .card-body,
  #programme-assessments-analysis-pane .dataTables_wrapper,
  #programme-assessments-analysis-pane .learner-assessments-table-responsive {
    min-width: 0;
    max-width: 100%;
  }

  #programme-assessments-analysis-pane .learner-assessments-table-responsive {
    width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  #programme-assessments-analysis-pane #assessment_overview_table {
    min-width: 1100px;
  }
}

body.practicals-management-standalone-page #task_management .learner-assessments-page table.data-table thead.table-header-card tr th:first-child {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

body.practicals-management-standalone-page #task_management .learner-assessments-page table.data-table thead.table-header-card tr th:last-child {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

body.practicals-management-standalone-page .learner-assessments-page table.code-challenges-table.data-table thead.table-header-card tr th:first-child {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

body.practicals-management-standalone-page .learner-assessments-page table.code-challenges-table.data-table thead.table-header-card th {
  background: var(--primary-color) !important;
}

body.practicals-management-standalone-page .learner-assessments-page table.code-challenges-table.data-table thead.table-header-card tr th:last-child {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

body.practicals-management-standalone-page .learner-assessments-page table.practicals-roster-table.data-table thead.table-header-card th {
  background: var(--primary-color) !important;
}

body.practicals-management-standalone-page .learner-assessments-page table.practicals-roster-table.data-table thead.table-header-card tr th:first-child {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

body.practicals-management-standalone-page .learner-assessments-page table.practicals-roster-table.data-table thead.table-header-card tr th:last-child {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

body.practicals-management-standalone-page #practicals-analysis-panel .learner-assessments-page table.data-table thead.table-header-card th {
  background: var(--primary-color) !important;
}

body.practicals-management-standalone-page #practicals-analysis-panel .learner-assessments-page table.data-table thead.table-header-card tr th:first-child {
  border-top-left-radius: 0 !important;
  border-bottom-left-radius: 0 !important;
}

body.practicals-management-standalone-page #practicals-analysis-panel .learner-assessments-page table.data-table thead.table-header-card tr th:last-child {
  border-top-right-radius: 0 !important;
  border-bottom-right-radius: 0 !important;
}

/* Table rows: white background, light zebra striping, subtle purple
   hover highlight - same treatment as manage_team.html's content card. */
.learner-assessments-page table.data-table {
  --bs-table-bg: #fff;
  --bs-table-striped-bg: #faf9fc;
  --bs-table-striped-color: inherit;
  --bs-table-hover-bg: #ede7f9;
  --bs-table-hover-color: inherit;
}
.learner-assessments-page table.data-table tbody tr {
  background-color: #fff;
}
.learner-assessments-page table.data-table tbody tr:nth-of-type(odd) {
  background-color: #faf9fc;
}
.learner-assessments-page table.data-table tbody tr:hover,
.learner-assessments-page table.data-table tbody tr:hover > * {
  background-color: #ede7f9 !important;
}

/* Keep the empty learner evaluations state readable instead of disabled-looking. */
.learner-assessments-page table#learner_evaluations_table tbody tr,
.learner-assessments-page table#learner_evaluations_table tbody td.dataTables_empty {
  background-color: #fff !important;
  color: #777083 !important;
  opacity: 1 !important;
}

@media (max-width: 767.98px) {
  body.learner-mobile-bootstrap-ui .learner-assessments-page .learner-assessments-table-shell,
  body.learner-mobile-layout .learner-assessments-page .learner-assessments-table-shell,
  body.learner-mobile-bootstrap-ui .learner-assessments-page .learner-assessments-table-responsive,
  body.learner-mobile-layout .learner-assessments-page .learner-assessments-table-responsive,
  body.learner-mobile-bootstrap-ui .learner-assessments-page .dataTables_wrapper,
  body.learner-mobile-layout .learner-assessments-page .dataTables_wrapper {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
    overflow-y: visible !important;
  }

  .learner-assessments-page .learner-assessments-bottom-scroll {
    display: none !important;
  }

  body.learner-mobile-bootstrap-ui .learner-assessments-page table.data-table,
  body.learner-mobile-layout .learner-assessments-page table.data-table,
  .learner-assessments-page table.data-table tbody {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
  }

  .learner-assessments-page table.data-table thead {
    display: none;
  }

  .learner-assessments-page table.data-table tbody tr {
    position: relative;
    display: block;
    width: calc(100% - .75rem);
    max-width: calc(100% - .75rem);
    margin: 0 auto .7rem;
    padding: 2.7rem 0 0;
    box-sizing: border-box;
    overflow: hidden;
    background: #fff !important;
    border: 1px solid #e7e2ef;
    border-left: 4px solid var(--primary-color);
    border-radius: .85rem;
    box-shadow: 0 .2rem .65rem rgba(45, 27, 78, .08);
  }

  .learner-assessments-page table.data-table tbody tr:last-child {
    margin-bottom: 0;
  }

  .learner-assessments-page table.data-table tbody td {
    display: grid;
    grid-template-columns: minmax(4.8rem, 35%) minmax(0, 1fr);
    gap: .65rem;
    width: 100% !important;
    padding: .5rem 0 !important;
    border: 0 !important;
    border-bottom: 1px solid #f0edf4 !important;
    background: transparent !important;
    color: #524b5d;
    font-size: .72rem;
    line-height: 1.4;
    text-align: right;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }

  body.learner-mobile-bootstrap-ui .learner-assessments-page table.data-table tbody td:last-child,
  body.learner-mobile-layout .learner-assessments-page table.data-table tbody td:last-child {
    width: 100% !important;
    min-width: 0 !important;
  }

  .learner-assessments-page table.data-table tbody td::before {
    content: attr(data-label);
    color: #777083;
    font-size: .64rem;
    font-weight: 700;
    letter-spacing: .03em;
    text-align: left;
    text-transform: uppercase;
  }

  .learner-assessments-page table.data-table tbody td[data-label="#"] {
    position: absolute;
    top: .75rem;
    left: .9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem !important;
    height: 1.35rem !important;
    min-width: 1.35rem !important;
    min-height: 1.35rem !important;
    max-width: 1.35rem !important;
    max-height: 1.35rem !important;
    aspect-ratio: 1 / 1;
    box-sizing: border-box;
    flex: 0 0 1.35rem;
    line-height: 1;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 50% !important;
    background: var(--primary-color) !important;
    color: #fff;
  }

  .learner-assessments-page table.data-table tbody td[data-label="#"]::before,
  .learner-assessments-page table.data-table tbody td[data-label="Assessment"]::before {
    content: none;
  }

  .learner-assessments-page table.data-table tbody td[data-label="Assessment"] {
    position: absolute;
    top: .6rem;
    left: 2.75rem;
    right: auto;
    display: block;
    width: auto !important;
    max-width: calc(100% - 3.65rem);
    padding: .2rem 0 .55rem !important;
    color: #2f2141;
    font-size: .84rem;
    font-weight: 700;
    text-align: left !important;
  }

  .learner-assessments-page table.data-table tbody td[data-label="Created"] {
    display: none !important;
  }

  /* The row itself reserves 2.7rem of top padding for the absolutely
     positioned "#" badge and title that real data rows float above their
     grid cells -- the empty-state row has neither, so left unreset that
     padding alone accounts for the oversized gap above the message. */
  .learner-assessments-page table.data-table tbody tr:has(td.dataTables_empty),
  .learner-assessments-page table.data-table tbody tr:has(td.dt-empty) {
    padding-top: 0;
  }

  /* DataTables 2.x (the version vendored in this repo) renders the "No
     data available in table" cell as class="dt-empty", not the old 1.x
     "dataTables_empty" this rule was written against -- that selector
     never matched, so the cell fell through to the generic tbody td
     mobile-card rule above (grid layout with a reserved label column,
     text-align:right, a data-label ::before pseudo-element), which is
     exactly the lopsided spacing this was meant to prevent. */
  .learner-assessments-page table.data-table tbody td.dataTables_empty,
  .learner-assessments-page table.data-table tbody td.dt-empty {
    position: static;
    display: block;
    width: 100% !important;
    padding: 1.5rem .5rem !important;
    border: 0 !important;
    text-align: center;
  }

  .learner-assessments-page table.data-table tbody td.dataTables_empty::before,
  .learner-assessments-page table.data-table tbody td.dt-empty::before {
    content: none;
  }

  .learner-assessments-page table.data-table tbody td[data-label="Actions"] {
    align-items: center;
    border-bottom: 0 !important;
  }

  .learner-assessments-page table.data-table tbody td[data-label="Actions"] > * {
    justify-self: end;
  }
}

/* skill_management/submit_tasks_answer.html - the subtask banner, its
   status pill, and the Feedback conversation card header all read
   var(--primary-color) so they share one consistent color instead of
   each hardcoding its own (the banner was Bootstrap's own bg-primary
   blue before this). */
.subtask-answer-page .subtask-answer-header {
  background: var(--primary-color);
  color: #fff;
}
.subtask-answer-page .subtask-status-pill {
  color: var(--primary-color);
  font-weight: 600;
}

/* Feedback conversation modal - centered dialog, Facebook-style threaded
   comments (admin's original feedback is the parent, replies are indented
   children with a connector line), reply composer pinned in the footer.
   Bootstrap 5 doesn't relocate .modal elements in the DOM, so scoping
   under .subtask-answer-page (like everything else on this page) is safe. */
.subtask-answer-page .feedback-modal-content {
  border: none;
  border-radius: 0.6rem;
  overflow: hidden;
}
.subtask-answer-page .feedback-modal-header {
  background: var(--primary-color);
  padding: 0.85rem 1.25rem;
  border-bottom: none;
}
.subtask-answer-page .feedback-header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--primary-color);
  flex: 0 0 auto;
}
.subtask-answer-page .feedback-modal-body {
  padding: 1.1rem 1.25rem;
  background: #fff;
}

/* Threaded comments */
.subtask-answer-page .feedback-comment {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}
.subtask-answer-page .feedback-comment-body {
  flex: 1 1 auto;
  min-width: 0;
}
.subtask-answer-page .feedback-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--primary-color);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  flex: 0 0 auto;
}
.subtask-answer-page .feedback-avatar-sm {
  width: 1.75rem;
  height: 1.75rem;
  font-size: 0.62rem;
}
.subtask-answer-page .feedback-comment-bubble {
  background: #f0eff3;
  border-radius: 0.9rem;
  padding: 0.55rem 0.9rem;
  display: inline-block;
  max-width: 100%;
}
.subtask-answer-page .feedback-comment-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: #26212e;
  margin-bottom: 0.1rem;
}
.subtask-answer-page .feedback-comment-text {
  font-size: 0.78rem;
  color: #33313f;
  white-space: pre-wrap;
  word-break: break-word;
}
.subtask-answer-page .feedback-comment-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.3rem 0 0 0.9rem;
}
.subtask-answer-page .feedback-timestamp {
  font-size: 0.65rem;
  color: #8b8697;
}
.subtask-answer-page .feedback-reply-link {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--primary-color);
  text-decoration: none;
}
.subtask-answer-page .feedback-reply-link:hover {
  text-decoration: underline;
}

/* Child replies: indented under the parent with a vertical connector line,
   smaller avatars, no repeated Reply link. */
.subtask-answer-page .feedback-replies {
  margin-top: 0.75rem;
  margin-left: 1.15rem;
  padding-left: 1rem;
  border-left: 2px solid #e5e1ee;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Reply composer, pinned at the bottom of the modal */
.subtask-answer-page .feedback-modal-footer {
  background: #fff;
  border-top: 1px solid #ece9f2;
  padding: 0.85rem 1.25rem;
  display: block;
}
.subtask-answer-page .feedback-reply-composer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.subtask-answer-page .feedback-reply-input {
  font-size: 0.78rem;
  border-radius: 999px;
  padding: 0.5rem 1rem;
}
.subtask-answer-page .feedback-send-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: none;
  background: var(--primary-color);
  color: #fff;
  flex: 0 0 auto;
}
.subtask-answer-page .feedback-send-btn:disabled {
  background: #d8d4e3;
  color: #a39cb5;
  cursor: not-allowed;
}
.subtask-answer-page .feedback-reply-hint {
  display: block;
  margin: 0.4rem 0 0 2.75rem;
  font-size: 0.65rem;
}

/* On phones, the parent avatar + gap + child indent + child avatar + gap
   were eating ~107px before a child comment's bubble even started,
   leaving very little width for the actual reply text. Tighten the
   spacing (not the layout) so more of the screen goes to the message. */
@media (max-width: 767.98px) {
  .subtask-answer-page .feedback-modal-body {
    padding: 0.85rem;
  }
  .subtask-answer-page .feedback-avatar {
    width: 2rem;
    height: 2rem;
  }
  .subtask-answer-page .feedback-avatar-sm {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.58rem;
  }
  .subtask-answer-page .feedback-replies {
    margin-left: 0.6rem;
    padding-left: 0.65rem;
  }
  .subtask-answer-page .feedback-comment-meta {
    margin-left: 0.6rem;
  }
  .subtask-answer-page .feedback-modal-footer {
    padding: 0.65rem 0.85rem;
  }
  .subtask-answer-page .feedback-reply-hint {
    margin-left: 2.35rem;
  }
}
/* Course Insights mobile layout. */
@media (max-width: 767.98px) {
  body.course-insights-page {
    overflow-x: hidden !important;
  }

  body.course-insights-page #course-insights-app.programme-content-ui,
  body.course-insights-page #course-insights-app .programme-content-shell {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    margin-left: auto !important;
    margin-right: auto !important;
    box-sizing: border-box;
  }

  body.course-insights-page #course-insights-app .programme-content-shell {
    padding: 0.75rem 0.6rem calc(5.5rem + env(safe-area-inset-bottom)) !important;
    border-radius: 1rem;
    overflow-x: hidden !important;
  }

  body.course-insights-page #course-insights-app .programme-content-topbar {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
  }

  body.course-insights-page #course-insights-app .programme-content-title {
    min-width: 0;
    font-size: 1.1rem;
  }

  body.course-insights-page #course-insights-app .programme-content-topbar .btn {
    flex: 0 0 auto;
    padding: 0.4rem 0.65rem;
    border-radius: 0.65rem;
    font-size: 0.72rem;
    white-space: nowrap;
  }

  body.course-insights-page #course-insights-panel.programme-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 0;
    margin: 0 !important;
    padding: 0.85rem 0.7rem 0 !important;
    border-radius: 1rem;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  body.course-insights-page #course-insights-panel .programme-filter-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.75rem;
    width: 100%;
    margin: 0 0 1rem;
    padding: 0;
  }

  body.course-insights-page #course-insights-panel .programme-filter-row > div,
  body.course-insights-page #course-insights-panel .programme-filter-select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  body.course-insights-page #course-insights-panel .programme-filter-select {
    height: 2.5rem;
    border-radius: 0.7rem;
    padding-right: 2.2rem;
    font-size: 0.8rem;
    text-overflow: ellipsis;
  }

  body.course-insights-page #course-insights-panel .programme-panel-title {
    margin-bottom: 0.75rem;
    font-size: 1.05rem;
  }

  body.course-insights-page #course-insights-panel .programme-content-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.85rem;
    width: 100%;
    max-width: 100%;
    margin: 0 0 1rem;
    padding: 0 0 0.3rem;
    overflow-x: visible;
    overflow-y: hidden;
}

/* Reuse the Course Insights mobile shell geometry for mentor course pages. */
@media (max-width: 767.98px) {
  body.teacher-program-subjects-page {
    overflow-x: hidden !important;
  }

  body.teacher-program-subjects-page .home-section:not(.admin-home-layout),
  body.teacher-program-subjects-page .home-section.mx-4 {
    left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box;
  }

  body.teacher-program-subjects-page .teacher-program-subjects-shell {
    width: calc(100% - 0.75rem) !important;
    max-width: calc(100% - 0.75rem) !important;
    min-width: 0;
    margin-left: 0.75rem !important;
    margin-right: 0 !important;
    padding: 0.75rem 0.6rem calc(5.5rem + env(safe-area-inset-bottom)) !important;
    padding-left: 1rem !important;
    border-radius: 1rem;
    overflow-x: hidden !important;
    box-sizing: border-box;
  }

  body.teacher-program-subjects-page .teacher-programmes-back-link {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.15;
    gap: 0.08rem;
    white-space: nowrap;
  }
}

  body.course-insights-page #course-insights-panel .programme-content-tabs > li {
    flex: 0 0 auto;
  }

  body.course-insights-page #course-insights-panel .programme-content-tab {
    padding: 0.35rem 0 0.45rem;
    font-size: 0.78rem;
    white-space: nowrap;
  }

  body.course-insights-page #course-insights-panel .programme-search-row {
    justify-content: flex-start;
    width: 100%;
    min-height: 0;
    padding: 0.65rem 0 0.85rem;
  }

  body.course-insights-page #course-insights-panel .programme-page-size-form {
    width: 100%;
    gap: 0.45rem;
    font-size: 0.72rem;
  }

  body.course-insights-page #course-insights-panel .programme-page-size-select {
    min-width: 4rem;
    width: 4rem;
    font-size: 0.75rem;
  }

  body.course-insights-page #course-insights-panel .programme-table-wrapper {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0.75rem 0 0;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  body.course-insights-page #course-insights-feed,
  body.course-insights-page #course-insights-feed > * {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  body.course-insights-page #course-insights-feed .course-insight-card .card-body {
    padding: 0.8rem !important;
    overflow-wrap: anywhere;
  }

  body.course-insights-page #course-insights-feed .alert {
    margin: 0;
    padding: 0.8rem;
    font-size: 0.72rem;
    overflow-wrap: anywhere;
  }

  body.course-insights-page #course-insights-pagination.programme-pagination {
    flex-direction: column;
    align-items: stretch;
    gap: 0.65rem;
    width: 100%;
    padding: 0.9rem 0 1rem;
    font-size: 0.7rem;
  }

  body.course-insights-page #course-insights-pagination .programme-pagination-actions {
    justify-content: space-between;
    width: 100%;
  }

  body.course-insights-page #course-insights-pagination .programme-pagination-link {
    flex: 1 1 0;
    padding: 0.5rem 0.7rem;
    text-align: center;
  }
}

.sm-table-swipe-hint {
  display: none;
}

/* Skills Audit: keep management controls usable on phone-sized viewports. */
@media (max-width: 576px) {
  body.programme-management-content-page #programme-evaluations-panel {
    overflow: hidden;
  }

  body.programme-management-content-page #programme-evaluations-panel .nav-l1 {
    gap: 0;
    padding-inline: 8px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  body.programme-management-content-page #programme-evaluations-panel .nav-l1 > li {
    flex: 0 0 auto;
  }

  body.programme-management-content-page #programme-evaluations-panel .nav-l1 .programme-content-tab {
    padding: 11px 10px;
    font-size: 12px;
  }

  body.programme-management-content-page #programme-evaluations-panel .nav-l2-wrap {
    padding: 12px 10px 0;
  }

  body.programme-management-content-page #programme-evaluations-panel .nav-l2 {
    gap: 7px;
    padding-bottom: 12px;
  }

  body.programme-management-content-page #programme-evaluations-panel .nav-l2 .nav-link {
    flex: 1 1 calc(50% - 4px);
    min-width: 0;
    padding: 7px 8px;
    text-align: center;
    white-space: normal;
  }

  body.programme-management-content-page #programme-evaluations-panel #sm-sub-tabs-content.tab-content,
  body.programme-management-content-page #programme-evaluations-panel #programme-skills-evaluations-pane,
  body.programme-management-content-page #programme-evaluations-panel #programme-evaluations-overview-pane {
    padding: 14px 10px;
  }

  body.programme-management-content-page #programme-skills-management-pane .sm-btn-create {
    width: 100%;
    min-height: 40px;
    justify-content: center;
    white-space: nowrap;
  }

  body.programme-management-content-page #programme-skills-management-pane > .nav-l2-wrap + .tab-content .tab-pane > .btn:not(.d-none),
  body.programme-management-content-page #programme-skills-evaluations-pane #programme-create-evaluation-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    width: 100%;
    min-height: 40px;
    margin-right: 0 !important;
    white-space: nowrap;
  }

  body.programme-management-content-page #programme-skills-evaluations-pane > .d-flex.justify-content-between {
    align-items: stretch !important;
    flex-direction: column;
  }

  body.programme-management-content-page #programme-skills-management-pane .dataTables_wrapper .row {
    row-gap: 10px;
  }

  body.programme-management-content-page #programme-skills-management-pane .dataTables_length,
  body.programme-management-content-page #programme-skills-management-pane .dataTables_filter {
    width: 100%;
    margin: 0;
    text-align: left;
  }

  body.programme-management-content-page #programme-skills-management-pane .dataTables_filter label {
    display: grid;
    gap: 5px;
    width: 100%;
  }

  body.programme-management-content-page #programme-skills-management-pane .dataTables_filter input {
    width: 100%;
    max-width: none;
    min-height: 38px;
    margin-left: 0;
  }

  body.programme-management-content-page #programme-skills-management-pane .table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  body.programme-management-content-page #programme-evaluations-panel .sm-table-swipe-hint {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    margin: 2px 0 7px;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
  }

  body.programme-management-content-page #programme-evaluations-panel .sm-table-swipe-hint i {
    color: var(--primary-color);
    font-size: 13px;
  }

  body.programme-management-content-page #programme-evaluations-panel .sm-swipe-table {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    overscroll-behavior-x: contain;
    scroll-behavior: smooth;
    touch-action: pan-x pan-y;
    scrollbar-width: thin;
    scrollbar-color: var(--primary-color) #e2e8f0;
    -webkit-overflow-scrolling: touch;
  }

  body.programme-management-content-page #programme-evaluations-panel .sm-swipe-table::-webkit-scrollbar {
    height: 6px;
  }

  body.programme-management-content-page #programme-evaluations-panel .sm-swipe-table::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 999px;
  }

  body.programme-management-content-page #programme-evaluations-panel .sm-swipe-table::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 999px;
  }

  body.programme-management-content-page #programme-skills-management-pane .dataTables_wrapper {
    width: 100%;
    min-width: 0;
  }

  body.programme-management-content-page #programme-skills-management-pane table.dataTable {
    width: max-content !important;
    min-width: 100%;
  }

  body.programme-management-content-page #sm-mainskill-cat-table th:first-child,
  body.programme-management-content-page #sm-mainskill-cat-table td:first-child {
    min-width: 190px;
  }

  body.programme-management-content-page #programme-skills-management-pane th.col-action,
  body.programme-management-content-page #programme-skills-management-pane td.col-action {
    position: static;
    min-width: 105px;
  }

  body.programme-management-content-page #programme-skills-management-pane .sm-action-btns,
  body.programme-management-content-page #programme-skills-evaluations-pane .sm-eval-action-btns {
    flex-wrap: nowrap;
  }

  body.programme-management-content-page #programme-skills-management-pane .sm-btn,
  body.programme-management-content-page #programme-skills-evaluations-pane .sm-eval-btn {
    min-height: 36px;
    justify-content: center;
    white-space: nowrap;
  }

  body.programme-management-content-page #programme-skills-management-pane .sm-row-manage-btn {
    flex: 0 0 auto;
    width: auto !important;
    min-width: 78px !important;
    max-width: none !important;
    padding: 7px 12px !important;
    overflow: visible;
  }

  body.programme-management-content-page #programme-skills-management-pane td.col-action .sm-action-btns {
    width: max-content;
    min-width: 78px;
  }

  /* Present hierarchy tables as labelled cards instead of cropped desktop rows. */
  body.programme-management-content-page #programme-skills-management-pane table.dataTable {
    display: block;
    width: 100% !important;
    min-width: 0;
    border: 0;
  }

  body.programme-management-content-page #programme-skills-management-pane table.dataTable thead {
    display: none;
  }

  body.programme-management-content-page #programme-skills-management-pane table.dataTable tbody {
    display: grid;
    gap: 10px;
    width: 100%;
  }

  body.programme-management-content-page #programme-skills-management-pane table.dataTable tbody tr {
    display: block;
    width: 100%;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
  }

  body.programme-management-content-page #programme-skills-management-pane table.dataTable tbody td {
    display: grid;
    grid-template-columns: minmax(105px, 42%) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 43px;
    padding: 9px 10px !important;
    border: 0;
    border-bottom: 1px solid #e7eaf0;
    background: #fff !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    box-sizing: border-box;
  }

  body.programme-management-content-page #programme-skills-management-pane table.dataTable tbody td:last-child {
    border-bottom: 0;
  }

  body.programme-management-content-page #programme-skills-management-pane table.dataTable tbody td::before {
    content: attr(data-label);
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.25;
    text-transform: uppercase;
  }

  body.programme-management-content-page #sm-mainskill-cat-table tbody td:nth-child(1)::before {
    content: "Mainskill Category";
  }

  body.programme-management-content-page #sm-subskill-table tbody td:nth-child(1)::before {
    content: "Subskill";
  }

  body.programme-management-content-page #sm-subskill-table tbody td:nth-child(2)::before,
  body.programme-management-content-page #sm-mainskill-table tbody td:nth-child(4)::before,
  body.programme-management-content-page #sm-specialization-table tbody td:nth-child(2)::before {
    content: "Criteria";
  }

  body.programme-management-content-page #sm-mainskill-table tbody td:nth-child(1)::before {
    content: "Mainskill";
  }

  body.programme-management-content-page #sm-mainskill-table tbody td:nth-child(2)::before {
    content: "Category";
  }

  body.programme-management-content-page #sm-mainskill-table tbody td:nth-child(3)::before {
    content: "Active for All";
  }

  body.programme-management-content-page #sm-mainskill-table tbody td:nth-child(5)::before {
    content: "Assigned Subskill";
  }

  body.programme-management-content-page #sm-specialization-table tbody td:nth-child(1)::before {
    content: "Specialization";
  }

  body.programme-management-content-page #sm-specialization-table tbody td:nth-child(3)::before {
    content: "Assigned Mainskill";
  }

  body.programme-management-content-page #sm-mainskill-cat-table tbody td:nth-child(2)::before,
  body.programme-management-content-page #sm-subskill-table tbody td:nth-child(3)::before,
  body.programme-management-content-page #sm-mainskill-table tbody td:nth-child(6)::before,
  body.programme-management-content-page #sm-specialization-table tbody td:nth-child(4)::before {
    content: "Action";
  }

  body.programme-management-content-page #programme-skills-management-pane table.dataTable tbody td.dataTables_empty {
    display: block;
    text-align: center;
  }

  body.programme-management-content-page #programme-skills-management-pane table.dataTable tbody td.dataTables_empty::before {
    content: none;
  }

  body.programme-management-content-page #programme-skills-management-pane .sm-mcat-name-cell,
  body.programme-management-content-page #programme-skills-management-pane .sm-criteria-pills {
    min-width: 0;
  }

  body.programme-management-content-page #programme-skills-management-pane .dataTables_info,
  body.programme-management-content-page #programme-skills-management-pane .dataTables_paginate {
    float: none;
    width: 100%;
    margin-top: 10px;
    text-align: center;
  }

  body.programme-management-content-page #programme-skills-evaluations-pane .sm-eval-banner,
  body.programme-management-content-page #programme-evaluations-hierarchy-pane .sm-eval-banner {
    padding: 10px;
  }

  body.programme-management-content-page #programme-skills-evaluations-pane .table-responsive {
    width: 100%;
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  body.programme-management-content-page #programme-skills-evaluations-table {
    width: max-content;
    min-width: 1120px;
  }

  body.programme-management-content-page #programme-skills-evaluations-table th.col-action,
  body.programme-management-content-page #programme-skills-evaluations-table td.col-action {
    position: static;
    min-width: 120px;
  }

  body.programme-management-content-page #programme-skills-evaluations-pane .table-responsive {
    overflow: visible !important;
  }

  body.programme-management-content-page #programme-skills-evaluations-table {
    display: block;
    width: 100% !important;
    min-width: 0;
    border: 0;
  }

  body.programme-management-content-page #programme-skills-evaluations-table thead {
    display: none;
  }

  body.programme-management-content-page #programme-skills-evaluations-table tbody {
    display: grid;
    gap: 10px;
    width: 100%;
  }

  body.programme-management-content-page #programme-skills-evaluations-table tbody tr {
    display: block;
    width: 100%;
    border: 1px solid var(--border-strong);
    border-radius: 10px;
    background: #fff;
    overflow: hidden;
  }

  body.programme-management-content-page #programme-skills-evaluations-table tbody td {
    display: grid;
    grid-template-columns: minmax(95px, 38%) minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    width: 100% !important;
    min-width: 0 !important;
    min-height: 43px;
    padding: 9px 10px !important;
    border: 0;
    border-bottom: 1px solid #e7eaf0;
    background: #fff !important;
    text-align: left !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
    box-sizing: border-box;
  }

  body.programme-management-content-page #programme-skills-evaluations-table tbody td:last-child {
    border-bottom: 0;
  }

  body.programme-management-content-page #programme-skills-evaluations-table tbody td::before {
    color: #64748b;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.04em;
    line-height: 1.25;
    text-transform: uppercase;
  }

  body.programme-management-content-page #programme-skills-evaluations-table tbody td:nth-child(1)::before { content: "Evaluation"; }
  body.programme-management-content-page #programme-skills-evaluations-table tbody td:nth-child(2)::before { content: "Evaluating"; }
  body.programme-management-content-page #programme-skills-evaluations-table tbody td:nth-child(3)::before { content: "Assignments"; }
  body.programme-management-content-page #programme-skills-evaluations-table tbody td:nth-child(4)::before { content: "Learners"; }
  body.programme-management-content-page #programme-skills-evaluations-table tbody td:nth-child(5)::before { content: "Type"; }
  body.programme-management-content-page #programme-skills-evaluations-table tbody td:nth-child(6)::before { content: "Start Date"; }
  body.programme-management-content-page #programme-skills-evaluations-table tbody td:nth-child(7)::before { content: "End Date"; }
  body.programme-management-content-page #programme-skills-evaluations-table tbody td:nth-child(8)::before { content: "Iteration"; }
  body.programme-management-content-page #programme-skills-evaluations-table tbody td:nth-child(9)::before { content: "Status"; }
  body.programme-management-content-page #programme-skills-evaluations-table tbody td:nth-child(10)::before { content: "Action"; }

  body.programme-management-content-page #programme-skills-evaluations-table tbody td[colspan] {
    display: block;
    text-align: center !important;
  }

  body.programme-management-content-page #programme-skills-evaluations-table tbody td[colspan]::before {
    content: none;
  }

  body.programme-management-content-page #programme-skills-evaluations-pane .sm-eval-action-btns {
    justify-content: flex-start;
    width: max-content;
    min-width: 88px;
  }

  body.programme-management-content-page #programme-skills-evaluations-pane .sm-eval-btn,
  body.programme-management-content-page #programme-skills-evaluations-pane .sm-eval-btn-manage {
    flex: 0 0 auto;
    width: auto !important;
    min-width: 88px !important;
    max-width: none !important;
    min-height: 36px;
    padding: 7px 12px !important;
    justify-content: center;
    white-space: nowrap;
  }

  body.programme-management-content-page #programme-skills-evaluations-summary {
    width: 100%;
    min-width: 0;
    padding-inline: 2px;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  body.programme-management-content-page #programme-evaluations-hierarchy-pane {
    padding: 14px 10px;
  }

  body.programme-management-content-page #programme-evaluations-hierarchy-pane #evaluation_management,
  body.programme-management-content-page #programme-evaluations-hierarchy-pane #evaluation_management > .card {
    width: 100%;
    min-width: 0;
  }

  body.programme-management-content-page #programme-evaluations-hierarchy-pane .card-header {
    margin-bottom: 12px !important;
    padding: 10px 12px;
  }

  body.programme-management-content-page #programme-evaluations-hierarchy-pane #evaluation_status_tab {
    flex-wrap: nowrap !important;
    justify-content: flex-start !important;
    gap: 6px;
    width: 100%;
    margin-top: 0 !important;
    padding: 0 8px 8px;
    overflow-x: auto;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  body.programme-management-content-page #programme-evaluations-hierarchy-pane #evaluation_status_tab .nav-item {
    flex: 0 0 auto;
  }

  body.programme-management-content-page #programme-evaluations-hierarchy-pane #evaluation_status_tab .nav-link {
    min-height: 36px;
    padding: 7px 11px;
    font-size: 11px;
    white-space: nowrap;
  }

  body.programme-management-content-page #programme-evaluations-hierarchy-pane .card-body {
    min-width: 0;
    overflow-x: auto;
  }

  body.programme-management-content-page #programme-evaluations-actions .btn {
    width: 100%;
    min-height: 40px;
    white-space: normal;
  }
}

@media (max-width: 991.98px) {
  body > .pipeline-step-actions-menu-mobile-portal.show {
    position: fixed !important;
    top: auto !important;
    right: 0.75rem !important;
    bottom: calc(4.75rem + env(safe-area-inset-bottom)) !important;
    left: 0.75rem !important;
    transform: none !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    max-height: min(70dvh, 30rem);
    margin: 0 !important;
    padding: 0.45rem;
    border-radius: 0.8rem;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    box-sizing: border-box;
    z-index: 1300 !important;
    -webkit-overflow-scrolling: touch;
  }

  body > .pipeline-step-actions-menu-mobile-portal.show .pipeline-step-action-btn {
    display: flex;
    align-items: center;
    width: 100% !important;
    min-width: 0;
    min-height: 2.65rem;
    padding: 0.6rem 0.7rem;
    font-size: 0.75rem;
    line-height: 1.25;
    text-align: left;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }
}

/* Keep the open recruitment Actions menu inside the visible mobile viewport. */
@media (max-width: 991.98px) {
  body.applicants-management-standalone-page #recruitment-process-tab:has(.pipeline-step-actions-menu.show),
  body.applicants-management-standalone-page #recruitment-process-tab:has(.pipeline-step-actions-menu.show) > .modal-body,
  body.applicants-management-standalone-page #recruitment-process-tab:has(.pipeline-step-actions-menu.show) .recruitment-pipeline-canvas,
  body.applicants-management-standalone-page #recruitment-process-tab:has(.pipeline-step-actions-menu.show) .recruitment-pipeline-groups,
  body.applicants-management-standalone-page #recruitment-process-tab:has(.pipeline-step-actions-menu.show) .recruitment-pipeline-group,
  body.applicants-management-standalone-page #recruitment-process-tab:has(.pipeline-step-actions-menu.show) .recruitment-pipeline-lane,
  body.applicants-management-standalone-page #recruitment-process-tab:has(.pipeline-step-actions-menu.show) .step-item,
  body.applicants-management-standalone-page #recruitment-process-tab:has(.pipeline-step-actions-menu.show) .recruitment-pipeline-step-card,
  body.applicants-management-standalone-page #recruitment-process-tab:has(.pipeline-step-actions-menu.show) .step-card-shell {
    overflow: visible !important;
  }

  body.applicants-management-standalone-page #recruitment-process-tab .pipeline-step-actions-menu.show {
    position: fixed !important;
    top: auto !important;
    right: 0.75rem !important;
    bottom: calc(4.75rem + env(safe-area-inset-bottom)) !important;
    left: 0.75rem !important;
    inset-inline: 0.75rem !important;
    transform: none !important;
    translate: none !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    max-height: min(70dvh, 30rem);
    margin: 0 !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    box-sizing: border-box;
    z-index: 1200 !important;
    -webkit-overflow-scrolling: touch;
  }

  body.applicants-management-standalone-page #recruitment-process-tab .pipeline-step-actions-menu.show .pipeline-step-action-btn {
    display: flex;
    align-items: center;
    width: 100% !important;
    max-width: 100%;
    min-width: 0;
    min-height: 2.65rem;
    padding: 0.6rem 0.7rem;
    font-size: 0.75rem;
    line-height: 1.25;
    text-align: left;
    white-space: normal !important;
    overflow-wrap: anywhere;
    box-sizing: border-box;
  }
}

/* Recruitment step actions use a phone-width menu instead of overflowing the card. */
@media (max-width: 767.98px) {
  body.applicants-management-standalone-page #recruitment-process-tab .step_actions {
    right: 0.42rem;
    left: auto;
    max-width: calc(100% - 0.84rem);
  }

  body.applicants-management-standalone-page #recruitment-process-tab .pipeline-step-actions-menu-btn {
    min-width: 5.4rem;
    min-height: 1.8rem;
    justify-content: center;
    padding: 0.3rem 0.5rem;
    font-size: 0.65rem;
    white-space: nowrap;
  }

  body.applicants-management-standalone-page #recruitment-process-tab .pipeline-step-actions-menu {
    --bs-dropdown-min-width: 0;
    position: fixed !important;
    inset: auto 0.75rem calc(4.75rem + env(safe-area-inset-bottom)) 0.75rem !important;
    transform: none !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    max-height: calc(100dvh - 9rem);
    margin: 0 !important;
    padding: 0.45rem;
    border-radius: 0.8rem;
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 1095;
    -webkit-overflow-scrolling: touch;
  }

  body.applicants-management-standalone-page #recruitment-process-tab .pipeline-step-actions-menu .step-action-item {
    display: block;
    width: 100%;
    min-width: 0;
  }

  body.applicants-management-standalone-page #recruitment-process-tab .pipeline-step-actions-menu .pipeline-step-action-btn {
    width: 100%;
    min-width: 0;
    min-height: 2.5rem;
    padding: 0.55rem 0.65rem;
    font-size: 0.72rem;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* Recruitment process: keep the phone viewport fluid and confine wide data to the table. */
@media (max-width: 767.98px) {
  body.applicants-management-standalone-page #recruitment-process-tab,
  body.applicants-management-standalone-page #recruitment-process-tab > .modal-body,
  body.applicants-management-standalone-page #recruitment-process-tab .recruitment-pipeline-canvas,
  body.applicants-management-standalone-page #recruitment-process-tab .recruitment-pipeline-groups,
  body.applicants-management-standalone-page #recruitment-process-tab .recruitment-pipeline-group {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  body.applicants-management-standalone-page #recruitment-process-tab {
    overflow-x: hidden;
  }

  body.applicants-management-standalone-page #recruitment-process-tab > .modal-body {
    padding-right: 0.45rem !important;
    padding-left: 0.45rem !important;
  }

  body.applicants-management-standalone-page #recruitment-process-tab .recruitment-pipeline-builder-header {
    align-items: stretch;
    gap: 0.6rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0.7rem;
    border-radius: 0.8rem;
    box-sizing: border-box;
  }

  body.applicants-management-standalone-page #recruitment-process-tab .recruitment-pipeline-programme-label {
    margin: 0 !important;
    font-size: 0.78rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  body.applicants-management-standalone-page #recruitment-process-tab .recruitment-pipeline-actions,
  body.applicants-management-standalone-page #recruitment-process-tab .recruitment-pipeline-actions > *,
  body.applicants-management-standalone-page #recruitment-process-tab #add_process_container_btn {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  body.applicants-management-standalone-page #recruitment-process-tab #add_process_container_btn {
    justify-content: center;
    min-height: 2.35rem;
  }

  body.applicants-management-standalone-page #recruitment-process-tab .recruitment-pipeline-canvas {
    padding: 0.5rem !important;
    border-radius: 0.8rem;
    overflow-x: hidden;
  }

  body.applicants-management-standalone-page #recruitment-process-tab .recruitment-pipeline-lane {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding-left: 0.65rem;
    overflow: visible;
    box-sizing: border-box;
  }

  body.applicants-management-standalone-page #recruitment-process-tab .recruitment-pipeline-lane .step-item,
  body.applicants-management-standalone-page #recruitment-process-tab .recruitment-pipeline-step-card,
  body.applicants-management-standalone-page #recruitment-process-tab .step-card-shell {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  body.applicants-management-standalone-page #recruitment-process-tab .step-monitoring-board,
  body.applicants-management-standalone-page #recruitment-process-tab .step-monitoring-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  body.applicants-management-standalone-page #recruitment-process-tab .step-monitoring-board {
    padding: 0.4rem;
    border-radius: 0.75rem;
  }

  body.applicants-management-standalone-page #recruitment-process-tab .step-monitoring-panel {
    padding: 0.65rem 0.5rem 0.75rem;
  }

  body.applicants-management-standalone-page #recruitment-process-tab .step-monitoring-panel-header,
  body.applicants-management-standalone-page #recruitment-process-tab .step-monitoring-toolbar,
  body.applicants-management-standalone-page #recruitment-process-tab .step-monitoring-filters {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  body.applicants-management-standalone-page #recruitment-process-tab .step-monitoring-toolbar input,
  body.applicants-management-standalone-page #recruitment-process-tab .step-monitoring-toolbar select,
  body.applicants-management-standalone-page #recruitment-process-tab .step-monitoring-toolbar .btn,
  body.applicants-management-standalone-page #recruitment-process-tab .step-monitoring-filters > * {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    box-sizing: border-box;
  }

  body.applicants-management-standalone-page #recruitment-process-tab .step-monitoring-info-alert {
    padding: 0.6rem;
    font-size: 0.68rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  body.applicants-management-standalone-page #recruitment-process-tab .step-monitoring-table-shell {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: scroll !important;
    overflow-y: hidden;
    scrollbar-width: auto;
    scrollbar-color: #7556c8 #e9e4f6;
    -webkit-overflow-scrolling: touch;
  }

  body.applicants-management-standalone-page #recruitment-process-tab .step-monitoring-table-shell::before {
    content: "\2190  Swipe table to see more \2192";
    display: block;
    position: sticky;
    left: 0;
    width: max-content;
    margin: 0 0 0.35rem auto;
    color: #766a8c;
    font-size: 0.62rem;
    white-space: nowrap;
  }

  body.applicants-management-standalone-page #recruitment-process-tab .step-monitoring-table {
    width: max-content;
    min-width: 58rem;
    margin-bottom: 0.35rem;
  }

  body.applicants-management-standalone-page #recruitment-process-tab .step-monitoring-table-shell::-webkit-scrollbar {
    height: 0.55rem;
  }

  body.applicants-management-standalone-page #recruitment-process-tab .step-monitoring-table-shell::-webkit-scrollbar-track {
    background: #e9e4f6;
    border-radius: 999px;
  }

  body.applicants-management-standalone-page #recruitment-process-tab .step-monitoring-table-shell::-webkit-scrollbar-thumb {
    background: #7556c8;
    border-radius: 999px;
  }
}

/* Add/Edit Recruitment Advert modal on phones. */
@media (max-width: 767.98px) {
  body.programme-management-content-page #programme-recruitment-modal {
    padding: 0 !important;
    overflow-x: hidden;
  }

  body.programme-management-content-page #programme-recruitment-modal .modal-dialog {
    width: calc(100vw - 1rem);
    max-width: calc(100vw - 1rem);
    height: calc(100dvh - 1rem);
    min-height: 0;
    margin: 0.5rem auto;
  }

  body.programme-management-content-page #programme-recruitment-modal .modal-content {
    width: 100%;
    max-width: 100%;
    max-height: calc(100dvh - 1rem);
    min-height: 0;
    border-radius: 1rem;
    overflow: hidden;
  }

  body.programme-management-content-page #programme-recruitment-modal .modal-header {
    flex: 0 0 auto;
    gap: 0.65rem;
    padding: 0.75rem;
  }

  body.programme-management-content-page #programme-recruitment-modal .modal-title {
    min-width: 0;
    font-size: 0.85rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  body.programme-management-content-page #programme-recruitment-modal .btn-close {
    flex: 0 0 auto;
    margin: 0;
  }

  body.programme-management-content-page #programme-recruitment-form {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: hidden;
  }

  body.programme-management-content-page #programme-recruitment-modal .programme-create-modal-scroll-body {
    flex: 1 1 auto;
    width: 100%;
    max-width: 100%;
    min-height: 0;
    padding: 0.8rem;
    overflow-x: hidden;
    overflow-y: auto;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
  }

  body.programme-management-content-page #programme-recruitment-modal .row {
    --bs-gutter-x: 0;
    --bs-gutter-y: 0.75rem;
    width: 100%;
    max-width: 100%;
    margin: 0;
  }

  body.programme-management-content-page #programme-recruitment-modal .row > [class*="col-"] {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding-left: 0;
    padding-right: 0;
  }

  body.programme-management-content-page #programme-recruitment-modal .form-control,
  body.programme-management-content-page #programme-recruitment-modal .form-select,
  body.programme-management-content-page #programme-recruitment-modal textarea {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 2.45rem;
    padding: 0.5rem 0.65rem;
    border-radius: 0.65rem;
    font-size: 0.75rem;
    box-sizing: border-box;
  }

  body.programme-management-content-page #programme-recruitment-modal .labels {
    display: block;
    margin-bottom: 0.3rem;
    font-size: 0.7rem;
    line-height: 1.25;
  }

  body.programme-management-content-page #programme-recruitment-modal .ck.ck-editor,
  body.programme-management-content-page #programme-recruitment-modal .ck-editor__main,
  body.programme-management-content-page #programme-recruitment-modal .ck-editor__editable {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  body.programme-management-content-page #programme-recruitment-modal .ck-toolbar,
  body.programme-management-content-page #programme-recruitment-modal .ck-toolbar__items {
    max-width: 100%;
    flex-wrap: wrap !important;
  }

  body.programme-management-content-page #programme-recruitment-modal .ck-editor__editable_inline {
    min-height: 8rem;
    max-height: 13rem;
    overflow-y: auto;
  }

  body.programme-management-content-page #programme-recruitment-modal .modal-footer {
    display: grid;
    flex: 0 0 auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.6rem !important;
    width: 100%;
    margin: 0;
    padding: 0.7rem 0.8rem calc(0.8rem + env(safe-area-inset-bottom));
    border-top: 1px solid #e5e7eb !important;
    background: #fff;
    box-sizing: border-box;
  }

  body.programme-management-content-page #programme-recruitment-modal .modal-footer .btn {
    width: 100%;
    min-width: 0;
    min-height: 2.4rem;
    margin: 0;
    padding: 0.45rem 0.6rem;
    font-size: 0.72rem;
    white-space: normal;
  }
}

/* Recruitment advert card and controls on phones. */
@media (max-width: 767.98px) {
  body.programme-management-content-page #programme-recruitment-panel,
  body.programme-management-content-page #programme-recruitment-section,
  body.programme-management-content-page #programme-recruitment-section > .programme-table-card,
  body.programme-management-content-page #programme-recruitment-adverts-card,
  body.programme-management-content-page #programme-recruitment-adverts-list {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box;
  }

  body.programme-management-content-page #programme-recruitment-panel {
    padding-left: 0.35rem !important;
    padding-right: 0.35rem !important;
    overflow-x: hidden;
  }

  body.programme-management-content-page #programme-recruitment-section > .programme-table-card {
    border-radius: 0.8rem;
    overflow: visible;
  }

  body.programme-management-content-page #programme-recruitment-section .programme-table-header {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0.7rem;
    border-radius: 0.8rem 0.8rem 0 0;
    box-sizing: border-box;
  }

  body.programme-management-content-page #programme-recruitment-section .programme-table-heading {
    width: 100%;
    max-width: 100%;
    margin-bottom: 0.65rem;
    font-size: 0.78rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  body.programme-management-content-page #programme-recruitment-section .programme-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.55rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  body.programme-management-content-page #programme-recruitment-toggle-wrapper {
    display: flex;
    align-items: center;
    min-width: 0;
    margin: 0;
  }

  body.programme-management-content-page #programme-recruitment-toggle-wrapper .form-check-label {
    min-width: 0;
    font-size: 0.64rem;
    line-height: 1.2;
    white-space: normal;
  }

  body.programme-management-content-page #programme-recruitment-add-advert-btn {
    min-width: 0;
    margin: 0;
    padding: 0.4rem 0.65rem;
    border-radius: 0.5rem;
    font-size: 0.65rem;
    white-space: nowrap;
  }

  body.programme-management-content-page #programme-recruitment-adverts-card {
    padding: 0.55rem 0 !important;
    overflow: visible !important;
  }

  body.programme-management-content-page #programme-recruitment-adverts-list.programme-recruitment-adverts-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0.75rem;
  }

  body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0.55rem;
    border-radius: 0.8rem;
    overflow: visible !important;
    box-sizing: border-box;
  }

  body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-media {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 5.5rem;
    border-radius: 0.65rem;
    box-sizing: border-box;
  }

  body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-body,
  body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-content,
  body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-actions {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
  }

  body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-preview-content {
    overflow-wrap: anywhere;
  }

  body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-manage-dropdown,
  body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-manage-toggle {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0;
  }

  body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-manage-toggle {
    min-height: 2.35rem;
    padding: 0.45rem 0.65rem;
    font-size: 0.68rem;
    white-space: normal;
  }

  body.programme-management-content-page #programme-recruitment-adverts-card .programme-recruitment-manage-dropdown .dropdown-menu {
    position: fixed !important;
    inset: auto 1rem calc(5rem + env(safe-area-inset-bottom)) 1rem !important;
    transform: none !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: none !important;
    max-height: calc(100dvh - 10rem);
    overflow-x: hidden;
    overflow-y: auto;
    z-index: 1065;
    -webkit-overflow-scrolling: touch;
  }
}

/* Programme learner controls: compact, contained action card on phones. */
@media (max-width: 767.98px) {
  body.programme-management-content-page #programme-learners-panel {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    overflow-x: hidden;
  }

  body.programme-management-content-page #programme-learners-panel > .programme-filter-row {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.55rem;
    width: 100%;
    max-width: 100%;
    margin-bottom: 0.6rem;
    padding: 0;
  }

  body.programme-management-content-page #programme-learners-panel > .programme-filter-row label {
    flex: 0 0 auto;
    font-size: 0.7rem;
    white-space: nowrap;
  }

  body.programme-management-content-page #programme-learners-panel > .programme-filter-row .programme-filter-select {
    flex: 1 1 auto;
    width: auto;
    max-width: 100%;
    min-width: 0;
    height: 2.2rem;
    font-size: 0.72rem;
  }

  body.programme-management-content-page #programme-learners-panel > .programme-table-card {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border-radius: 0.8rem;
    overflow: visible;
    box-sizing: border-box;
  }

  body.programme-management-content-page #programme-learners-panel .programme-table-header {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    padding: 0.7rem;
    border-radius: 0.8rem 0.8rem 0 0;
    box-sizing: border-box;
  }

  body.programme-management-content-page #programme-learners-panel .programme-table-heading {
    width: 100%;
    max-width: 100%;
    margin-bottom: 0.65rem;
    font-size: 0.78rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  body.programme-management-content-page #programme-learners-panel .programme-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  body.programme-management-content-page #programme-learners-panel .programme-actions > *,
  body.programme-management-content-page #programme-learners-panel .programme-actions .programme-learner-actions-dropdown {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    margin: 0;
  }

  body.programme-management-content-page #programme-learners-panel .programme-actions > .btn,
  body.programme-management-content-page #programme-learners-panel .programme-actions .programme-learner-actions-dropdown > .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 2.35rem;
    margin: 0;
    padding: 0.42rem 0.35rem;
    border-radius: 0.55rem;
    font-size: 0.64rem;
    line-height: 1.2;
    white-space: normal;
    overflow-wrap: anywhere;
    box-sizing: border-box;
  }

  body.programme-management-content-page #programme-learners-panel .programme-actions > :last-child:nth-child(odd) {
    grid-column: 1 / -1;
  }

  body.programme-management-content-page #programme-learners-panel .programme-learner-actions-menu {
    position: fixed !important;
    inset: auto 1rem calc(5rem + env(safe-area-inset-bottom)) 1rem !important;
    transform: none !important;
    width: auto;
    max-width: none;
    max-height: calc(100dvh - 10rem);
    margin: 0 !important;
    padding: 0.35rem;
    border-radius: 0.7rem;
    overflow-x: hidden;
    overflow-y: auto;
    font-size: 0.72rem;
    z-index: 1065;
    -webkit-overflow-scrolling: touch;
  }

  body.programme-management-content-page #programme-learners-panel .programme-learner-actions-menu .dropdown-item {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 2.25rem;
    padding: 0.5rem 0.6rem;
    border-radius: 0.45rem;
    font-size: 0.7rem;
    line-height: 1.25;
    white-space: normal;
    overflow-wrap: anywhere;
  }
}

/* skill_management/practicals_management.html - "Learners & Submissions"
   roster + drill-down inside the Submissions card accordion. The roster
   table itself is wrapped in .learner-assessments-page (see that rule
   earlier in this file) to get the var(--primary-color) purple header for
   free, and the completion rings reuse the existing global
   .skill-progress-circle-modern component -- nothing new needed for either.
   Everything below is new layout for the parts that don't have an
   existing rule to reuse. */
.practicals-learners-panel .practicals-ring {
  width: 2.5rem;
  height: 2.5rem;
}
.practicals-learners-panel .practicals-ring .skill-percentage {
  font-size: 0.62rem;
}

/* Roster table's Action column: without this, the right-aligned column
   sits flush against the table's own edge (Bootstrap's default cell
   padding is symmetric, so a right-aligned column doesn't get the same
   breathing room a left-aligned one gets from its own text). Give it the
   same gutter the outer .card-body already gives every other column,
   and keep the button centered regardless of row height (e.g. multi-line
   status badges elsewhere in the row). */
.practicals-learners-panel .practicals-roster-table th:last-child,
.practicals-learners-panel .practicals-roster-table td:last-child {
  padding-right: 1.5rem;
  vertical-align: middle;
}
@media (max-width: 767.98px) {
  .practicals-learners-panel .practicals-roster-table th:last-child,
  .practicals-learners-panel .practicals-roster-table td:last-child {
    padding-right: 0.85rem;
  }
}
/* Breadcrumb above the drill-down view */
.practicals-learners-panel .practicals-breadcrumb {
  font-size: 0.75rem;
}
.practicals-learners-panel .practicals-breadcrumb a {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
}
.practicals-learners-panel .practicals-breadcrumb a:hover {
  text-decoration: underline;
}

/* Learner drill-down table: task rows are shaded group headers (ring +
   name/subtitle in the first cell, status badge in the second, no action),
   subtask rows sit directly underneath, indented, with their own status
   badge and a right-aligned "Manage" button (hidden when nothing was
   submitted yet - see the v-if in the template). */
.practicals-learners-panel .practicals-detail-table td {
  vertical-align: middle;
}
/* Action column: without this, the right-aligned "Manage" column sits
   flush against the table's own edge (same fix as the roster table's
   Action column above). */
.practicals-learners-panel .practicals-detail-table th:last-child,
.practicals-learners-panel .practicals-detail-table td:last-child {
  padding-right: 1.5rem;
}
@media (max-width: 767.98px) {
  .practicals-learners-panel .practicals-detail-table th:last-child,
  .practicals-learners-panel .practicals-detail-table td:last-child {
    padding-right: 0.85rem;
  }
}
.practicals-learners-panel .practicals-task-group-row td {
  background: #faf9fc;
  border-top: 1px solid #ece9f2;
}
.practicals-learners-panel .practicals-subtask-table-row td {
  border-top: none;
}
.practicals-learners-panel .practicals-ring-sm {
  width: 1.9rem;
  height: 1.9rem;
  margin: 0;
  flex: 0 0 auto;
}
.practicals-learners-panel .practicals-ring-sm .skill-percentage {
  font-size: 0.52rem;
}
.practicals-learners-panel .practicals-subtask-indent {
  padding-left: 2.65rem;
}
.practicals-learners-panel .practicals-subtask-code {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.75rem;
  height: 1.5rem;
  padding: 0 0.35rem;
  border-radius: 0.35rem;
  background: #eef0fb;
  color: var(--primary-color);
  font-size: 0.65rem;
  font-weight: 700;
  flex: 0 0 auto;
}
.practicals-learners-panel .practicals-actions-btn {
  flex: 0 0 auto;
}

/* Action chooser modal: two clickable option rows, icon + bold title +
   muted subtitle -- no existing popup/dropdown in this codebase has this
   two-line row shape, so it's built fresh here. */
.practicals-learners-panel .practicals-chooser-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  padding: 0.75rem 0.9rem;
  margin-bottom: 0.6rem;
  border: 1px solid #ece9f2;
  border-radius: 0.6rem;
  background: #fff;
  text-align: left;
  cursor: pointer;
}
.practicals-learners-panel .practicals-chooser-option:last-child {
  margin-bottom: 0;
}
.practicals-learners-panel .practicals-chooser-option:hover {
  border-color: var(--primary-color);
  background: #faf9fc;
}
.practicals-learners-panel .practicals-chooser-option-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: #f0eff3;
  color: var(--primary-color);
  font-size: 1rem;
  flex: 0 0 auto;
}

/* Swap-to-other-modal link in the Review/Feedback modal headers */
.practicals-learners-panel .practicals-swap-link {
  text-decoration: none;
}
.practicals-learners-panel .practicals-swap-link:hover {
  text-decoration: underline;
}

/* Review Submission modal's answer display */
.practicals-learners-panel .practicals-review-answer {
  padding: 0.75rem;
  background: #faf9fc;
  border-radius: 0.5rem;
}

/* Feedback conversation modal - same Facebook-style threaded-comment
   treatment as the learner-side #feedbackModal on submit_tasks_answer.html
   (.subtask-answer-page .feedback-*), duplicated here under this page's
   own scope prefix per this codebase's page-scoped CSS convention (no
   shared/base feedback styling exists to lean on instead). */
.practicals-learners-panel .feedback-modal-content {
  border: none;
  border-radius: 0.6rem;
  overflow: hidden;
}
.practicals-learners-panel .feedback-modal-header {
  background: var(--primary-color);
  padding: 0.85rem 1.25rem;
  border-bottom: none;
}
.practicals-learners-panel .feedback-header-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: var(--primary-color);
  flex: 0 0 auto;
}
.practicals-learners-panel .feedback-modal-body {
  padding: 1.1rem 1.25rem;
  background: #fff;
}

.practicals-learners-panel .feedback-comment {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}
.practicals-learners-panel .feedback-comment-body {
  flex: 1 1 auto;
  min-width: 0;
}
.practicals-learners-panel .feedback-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--primary-color);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  flex: 0 0 auto;
}
.practicals-learners-panel .feedback-avatar-sm {
  width: 1.75rem;
  height: 1.75rem;
  font-size: 0.62rem;
}
.practicals-learners-panel .feedback-comment-bubble {
  background: #f0eff3;
  border-radius: 0.9rem;
  padding: 0.55rem 0.9rem;
  display: inline-block;
  max-width: 100%;
}
.practicals-learners-panel .feedback-comment-name {
  font-size: 0.75rem;
  font-weight: 700;
  color: #26212e;
  margin-bottom: 0.1rem;
}
.practicals-learners-panel .feedback-comment-text {
  font-size: 0.78rem;
  color: #33313f;
  white-space: pre-wrap;
  word-break: break-word;
}
.practicals-learners-panel .feedback-comment-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0.3rem 0 0 0.9rem;
}
.practicals-learners-panel .feedback-timestamp {
  font-size: 0.65rem;
  color: #8b8697;
}

.practicals-learners-panel .feedback-replies {
  margin-top: 0.75rem;
  margin-left: 1.15rem;
  padding-left: 1rem;
  border-left: 2px solid #e5e1ee;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.practicals-learners-panel .feedback-modal-footer {
  background: #fff;
  border-top: 1px solid #ece9f2;
  padding: 0.85rem 1.25rem;
  display: block;
}
.practicals-learners-panel .feedback-reply-composer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.practicals-learners-panel .feedback-reply-input {
  font-size: 0.78rem;
  border-radius: 999px;
  padding: 0.5rem 1rem;
}
.practicals-learners-panel .feedback-send-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  border: none;
  background: var(--primary-color);
  color: #fff;
  flex: 0 0 auto;
}
.practicals-learners-panel .feedback-send-btn:disabled {
  background: #d8d4e3;
  color: #a39cb5;
  cursor: not-allowed;
}
.practicals-learners-panel .feedback-reply-hint {
  display: block;
  margin: 0.4rem 0 0 2.75rem;
  font-size: 0.65rem;
}

@media (max-width: 767.98px) {
  .practicals-learners-panel .feedback-modal-body {
    padding: 0.85rem;
  }
  .practicals-learners-panel .feedback-avatar {
    width: 2rem;
    height: 2rem;
  }
  .practicals-learners-panel .feedback-avatar-sm {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.58rem;
  }
  .practicals-learners-panel .feedback-replies {
    margin-left: 0.6rem;
    padding-left: 0.65rem;
  }
  .practicals-learners-panel .feedback-comment-meta {
    margin-left: 0.6rem;
  }
  .practicals-learners-panel .feedback-modal-footer {
    padding: 0.65rem 0.85rem;
  }
  .practicals-learners-panel .feedback-reply-hint {
    margin-left: 2.35rem;
  }
  .practicals-learners-panel .practicals-subtask-indent {
    padding-left: 1.25rem;
  }
  .practicals-learners-panel .practicals-ring-sm {
    width: 1.6rem;
    height: 1.6rem;
  }
}

/* My Attendance page (templates/attendance_management/my_attendance.html) */
.my-attendance-page {
  background: #f5f6fd;
}
.my-attendance-shell {
  --att-purple: #301676;
  --att-border: #e1e2ec;
  width: auto;
  margin-right: 1.5rem;
  margin-left: 1.5rem;
  padding-right: 0;
  padding-left: 0;
  padding-top: 0;
  color: #292641;
}

/* My Practicals (job_role_user_task.html): the desktop hero, tabs and
   content card reuse the shared .learner-assessments-page spacing, which
   leaves a visible gap on this page. Zero it out here instead of touching
   the shared rules, which other pages rely on. */
@media (min-width: 768px) {
  body.learner-practicals-page .learner-assessments-desktop-hero {
    margin-bottom: 0 !important;
  }

  body.learner-practicals-page .learner-assessments-tabs {
    margin-top: 0 !important;
  }
}

/* My Practicals: task cards replace the wide DataTable on phones. */
@media (max-width: 767.98px) {
  body.learner-practicals-page .home-section.mx-4 {
    left: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
  }

  body.learner-practicals-page #user-tasks-app,
  body.learner-practicals-page #user-tasks-app > .mobile-learner-home,
  body.learner-practicals-page #user-tasks-app > .learner-assessments-page {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box;
  }

  body.learner-mobile-bootstrap-ui .learner-practicals-mobile-home .mobile-learner-hero,
  body.learner-mobile-layout .learner-practicals-mobile-home .mobile-learner-hero {
    top: var(--learner-mobile-fixed-top) !important;
    margin-top: 0 !important;
    border-top: 0 !important;
  }

  body.learner-practicals-page .learner-assessments-page.card-margin-top {
    /* The mobile-home wrapper already reserves the fixed hero's height, so
       only a small content gap is needed here. The page container is the
       parent of #user-tasks-app, not its child. */
    margin-top: 0.35rem !important;
  }

  /* .academic-page's shared padding-top (1.75rem, main_system_index.css
     ~line 12366) is only zeroed for desktop (min-width: 768px, ~line
     33686). On phones it stacks on top of the margin-top above and the
     mobile-hero's own height reservation, pushing the tabs well below
     where the fixed hero actually ends. Zero it here too, scoped to this
     page only. */
  body.learner-practicals-page .learner-assessments-page.academic-page {
    padding-top: 0 !important;
  }

  #user-tasks-app .learner-assessments-page .tab-content {
    padding: 0 !important;
    margin: 0 !important;
  }

  /* The practicals page places the tab-content wrapper outside
     #user-tasks-app. Keep the empty-state card inset on the right by the
     same amount as the page's left gutter on narrow screens. */
  body.learner-practicals-page .learner-assessments-page > .tab-content {
    padding-right: 0.75rem !important;
    margin-right: 0 !important;
  }

  #user-tasks-app .learner-assessments-page .tab-content > .card {
    padding: 1rem 0.75rem !important;
    border-radius: 1rem;
  }

  /* practical_management/me/ (learner_home.html) reuses this same
     body.learner-practicals-page shell, but its #pm-root markup merges
     .tab-content and .card into one element (<div class="tab-content card
     p-3">) instead of nesting a separate .card per tab-pane like
     #user-tasks-app above. So only the outer margin needs zeroing here --
     zeroing padding too, like the #user-tasks-app rule does, would also
     strip the card's own p-3 content padding. */
  #pm-root .learner-assessments-tabs {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  #pm-root .tab-content {
    margin-top: 0 !important;
  }

  /* Inset the outer card so its start and end remain visible against the
     phone viewport. The tab strip stays full width above it. */
  body.learner-practicals-page #pm-root > .tab-content {
    width: calc(100% - 1.5rem) !important;
    margin-left: 0.75rem !important;
    margin-right: 0.75rem !important;
  }

  /* Keep the tab bar aligned with the inset outer card below it. */
  body.learner-practicals-page #pm-root > .learner-tabs-scroller {
    width: calc(100% - 1.5rem) !important;
    margin-left: 0.75rem !important;
    margin-right: 0.75rem !important;
  }

  /* Keep the dotted empty state inset evenly within the outer card. */
  body.learner-practicals-page #pm-root .pm-empty {
    box-sizing: border-box;
    margin-right: 0.75rem;
    width: calc(100% - 0.75rem);
  }

  /* practical_management/me/ (learner_home.html) used to carry its own
     mobile hero card (a .mobile-learner-hero fixed to the top of the
     viewport, reserved for via the block above and the padding-top: 0 rule
     further up); that markup has since been removed from the template
     entirely, so the tabs need no reserved space above them any more. */

  .learner-practical-cards {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.8rem;
    margin-top: 0.75rem;
  }

  .learner-practical-card {
    min-width: 0;
    padding: 0.9rem;
    background: #fff;
    border: 1px solid #ece8f3;
    border-left: 4px solid var(--primary-color);
    border-radius: 0.85rem;
    box-shadow: 0 0.2rem 0.65rem rgba(45, 27, 78, 0.08);
  }

  .learner-practical-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.65rem;
  }

  .learner-practical-card-header h3 {
    min-width: 0;
    margin: 0;
    color: #2e2140;
    font-size: 0.9rem;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  .learner-practical-status {
    flex: 0 0 auto;
    max-width: 48%;
    padding: 0.2rem 0.5rem;
    border-radius: 999px;
    background: #eee9f8;
    color: var(--primary-color);
    font-size: 0.62rem;
    font-weight: 700;
    line-height: 1.25;
    text-align: center;
    overflow-wrap: anywhere;
  }

  .learner-practical-status.is-completed {
    background: #dcf6e8;
    color: #177245;
  }

  .learner-practical-status.is-overdue {
    background: #fde8e8;
    color: #b42318;
  }

  .learner-practical-description {
    margin: 0.65rem 0;
    color: #686170;
    font-size: 0.72rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
  }

  .learner-practical-dates {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    margin: 0 0 0.75rem;
  }

  .learner-practical-dates > div {
    min-width: 0;
    padding: 0.5rem 0.6rem;
    background: #faf9fc;
    border-radius: 0.55rem;
  }

  .learner-practical-dates dt {
    margin-bottom: 0.12rem;
    color: #8b8492;
    font-size: 0.58rem;
    font-weight: 600;
    text-transform: uppercase;
  }

  .learner-practical-dates dd {
    margin: 0;
    color: #342b3e;
    font-size: 0.69rem;
    font-weight: 600;
  }

  .learner-practical-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }

  #user-tasks-app .learner-practical-actions .btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 2.1rem;
  }

  .learner-practical-empty {
    padding: 1.75rem 1rem;
    color: #797181;
    text-align: center;
    background: #faf9fc;
    border: 1px dashed #d9d2e4;
    border-radius: 0.85rem;
  }

  .learner-practical-empty i {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
    font-size: 1.4rem;
  }

  .learner-practical-empty.code-challenges-empty {
    color: var(--primary-color);
  }
}
.my-attendance-shell.card-margin-top {
  margin-top: -7px !important;
}

/* Keep the Code Challenges empty state centred on desktop as well as mobile.
   Flex layout/centering/width come from Bootstrap utility classes
   (d-flex flex-column align-items-center justify-content-center w-100
   text-center) on the element itself; only the custom sizing stays here. */
body.learner-practicals-page #learner-challenges-app .code-challenges-empty {
  min-height: 8rem;
  padding: 1.75rem 1rem;
}
.attendance-hero.teacher-curriculum-hero {
  width: 100%;
  min-height: 104px;
  margin-bottom: 0 !important;
  padding: 1.1rem 1.25rem 1.4rem;
  border-radius: 24px;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 22px;
  overflow: hidden;
}
.attendance-hero-top {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.attendance-hero h1 {
  font-size: 1.26rem;
  font-weight: 700;
  margin: 0 0 .25rem;
}
.attendance-hero p:last-child,
.attendance-hero .attendance-eyebrow {
  font-size: .76rem;
}
.attendance-hero .attendance-eyebrow {
  display: inline-block;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--primary-color) !important;
  background: #fff;
  border: 1.5px solid var(--primary-color);
  border-radius: 999px;
  padding: 3px 12px;
  text-shadow: none !important;
}
.attendance-hero-copy {
  flex: 1 1 220px;
  min-width: 220px;
  overflow-wrap: break-word;
}
.attendance-hero-register,
.attendance-hero-empty {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  align-self: center;
  flex: 0 0 auto;
}
.attendance-hero-register {
  width: fit-content;
  max-width: 100%;
}
.attendance-hero-empty {
  text-align: center;
}
.attendance-hero-empty i {
  font-size: 18px;
  color: #fff;
}
.attendance-hero-empty h2 {
  font-size: 11px;
  margin: 6px 0 2px;
  color: #fff;
  font-weight: 800;
}
.attendance-hero-empty p {
  color: rgba(255, 255, 255, .8);
  font-size: 10px;
}
.attendance-program-picker {
  margin-bottom: 7px;
}
.attendance-field-label {
  font-size: 9px;
  font-weight: 800;
  color: rgba(255, 255, 255, .75);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.attendance-program-select {
  max-width: 200px;
  margin-top: 2px;
  border-radius: 6px;
  font-size: 11px;
  background: rgba(255, 255, 255, .95);
  border: none;
}
.attendance-clock-row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}
.attendance-clock-copy {
  min-width: 0;
}
.attendance-live-clock {
  display: block;
  font-size: 14px;
  line-height: 1.1;
  font-weight: 700;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.attendance-date {
  font-size: 9px;
  color: rgba(255, 255, 255, .78);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin: 2px 0 4px;
}
.attendance-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  padding: 3px 8px;
  border-radius: 20px;
  font-size: 10px;
  font-weight: 700;
  background: rgba(255, 255, 255, .92);
}
.attendance-status i {
  font-size: 6px;
}
.attendance-status.neutral { color: #667083; }
.attendance-status.present { color: #149e56; }
.attendance-status.late { color: #c98709; }
.attendance-status.partial { color: #6042a7; }
.attendance-status.absent { color: #dc4545; }
.attendance-location-message {
  display: block;
  max-width: 420px;
  min-height: 24px;
  line-height: 1.35;
  padding: 4px 8px;
  border-radius: 7px;
  background: #fff !important;
  border: 1px solid #cdeed9;
  font-size: 10px;
  font-weight: 700;
  white-space: normal;
  overflow: visible;
}
/* The shared .teacher-curriculum-hero component (reused by this page's hero
   banner) forces every <p> inside it to white text via ".teacher-curriculum-hero p"
   with !important. That selector (one class + one element) beats a bare
   ".attendance-location-message" (one class) on specificity, so the badge's
   own color lost even though it also used !important, leaving white-on-white
   text. Scoping with the wrapper class matches the hero rule's specificity
   class-for-class and wins on source order (this rule loads after it). */
.attendance-location-check .attendance-location-message {
  color: #0b7a41 !important;
  text-shadow: none !important;
}
/* Pin the highlight colors for this badge explicitly: selecting its text
   was rendering as bold white-on-blue with no visible gap from the badge's
   own background, which read as illegible depending on the browser/OS
   selection theme. This guarantees a readable pairing regardless of that. */
.attendance-location-message::selection {
  background: #0b7a41;
  color: #fff;
}
.attendance-location-message i {
  margin-right: 4px;
  color: inherit;
}
.attendance-actions {
  display: flex;
  gap: 6px;
  margin-top: 7px;
  flex-wrap: wrap;
}
.attendance-actions-outside {
  margin-top: 14px;
}
.attendance-actions-outside .btn-outline-primary:disabled {
  opacity: 1;
  background-color: #c9c9d4;
  border-color: #c9c9d4;
  color: #6b6b78;
  cursor: not-allowed;
}
.attendance-feedback {
  min-height: 28px;
  margin: 8px 4px 0;
  font-size: 13px;
  font-weight: 650;
}
.attendance-feedback.error { color: #bd3030; }
.attendance-feedback.success { color: #16804a; }
.attendance-history-section {
  margin-top: 26px;
}
.attendance-history-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}
.attendance-history-heading h2 {
  font-size: 23px;
  color: var(--att-purple);
  font-weight: 800;
  margin: 0;
}
.attendance-history-heading-left {
  display: flex;
  align-items: end;
  gap: 14px;
  flex-wrap: wrap;
}
.attendance-history-heading-left .attendance-actions-outside {
  margin-top: 0;
}
.attendance-history-tools {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}
.attendance-history-tools select { width: 130px; }
.attendance-history-tools select.attendance-filter-year { width: 105px; }
.attendance-history-tools select.attendance-filter-month { width: 140px; }
.attendance-history-tools select.attendance-filter-week { width: 110px; }
.attendance-history-tools .form-select {
  height: 34px;
  border-radius: 8px;
  border-color: #d5d7e2;
  font-size: .8rem;
}
/* Mirrors the "N per page" left / "Search" right layout every other
   DataTables-driven listing page (My Assessments, My Evaluations, etc.)
   uses, even though this table's rows are rendered by custom JS rather
   than a real DataTable instance. */
.attendance-table-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: .75rem;
}
.attendance-table-toolbar .dataTables_length,
.attendance-table-toolbar .dataTables_filter {
  margin-bottom: 0;
}
.attendance-table-toolbar #attendance-page-size { width: auto; }
.attendance-table-toolbar #attendance-search { width: 220px; }
.attendance-table-wrap {
  overflow: auto;
  border-radius: 18px;
  border: 1px solid #eaebf2;
  box-shadow: 0 2px 5px rgba(43, 22, 104, .06);
}
.attendance-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  font-size: .84rem;
}
.attendance-table th {
  background: var(--primary-color);
  color: #fff;
  padding: 10px 16px;
  font-size: .84rem;
  text-align: left;
}
.attendance-table td {
  padding: 10px 16px;
  border-bottom: 1px solid #e7e8ef;
  font-size: .84rem;
  color: #373351;
}

.my-attendance-standard-header-page .attendance-table-wrap {
  border-radius: 0 !important;
  box-shadow: none;
}

.my-attendance-standard-header-page .attendance-table th {
  background: var(--primary-color) !important;
  border-radius: 0 !important;
}

.my-attendance-standard-header-page .attendance-table thead th:first-child,
.my-attendance-standard-header-page .attendance-table thead th:last-child {
  border-radius: 0 !important;
}
.attendance-table tbody tr:last-child td { border-bottom: 0; }
.attendance-table tbody tr:nth-child(even) { background: #fafaff; }
.attendance-record-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 750;
  text-transform: capitalize;
}
.attendance-record-status:before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: currentColor;
}
.attendance-record-status.present { color: #149e56; }
.attendance-record-status.late { color: #c98709; }
.attendance-record-status.partial { color: #6042a7; }
.attendance-record-status.absent { color: #dc4545; }
.attendance-empty {
  text-align: center !important;
  color: #7b7788 !important;
  padding: 34px !important;
}
.attendance-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 7px;
}
.attendance-result-count {
  font-size: 15px;
  color: #687087;
}
.attendance-pagination {
  display: flex;
  gap: 8px;
}
.attendance-page-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  min-height: 2rem;
  padding: 0 0.5rem;
  border: 1px solid #e1dcea;
  border-radius: 0.4rem;
  background: #fff;
  color: #493a5c;
}
.attendance-page-button:hover:not(:disabled):not(.active) {
  background: #ede7f9;
  border-color: #e1dcea;
  color: #493a5c;
}
.attendance-page-button.active {
  background: var(--att-purple);
  border-color: var(--att-purple);
  color: #fff;
}
.attendance-page-button:disabled {
  background: #fff;
  border-color: #e1dcea;
  color: #b7aec7;
  cursor: default;
  opacity: 1;
}
.attendance-location-message.checking { background: #f2f0f8 !important; border-color: #ded7ee; color: #4a3f66 !important; }
.attendance-location-message.blocked { background: #fde9e9 !important; border-color: #f5c6c6; color: #b42a2a !important; }
.attendance-location-check {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 10px;
  width: 540px;
  max-width: 100%;
  min-height: 24px;
  flex-wrap: nowrap;
}
.attendance-check-location-btn {
  flex: 0 0 auto;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
  font-size: 10px;
  font-weight: 700;
  pointer-events: auto;
  text-decoration: underline;
}
.attendance-check-location-btn i { margin-right: 3px; }
.attendance-check-location-btn:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.attendance-check-location-btn:disabled { opacity: .55; cursor: wait; }

@media (max-width: 767px) {
  body.my-attendance-page .home-section.mx-4 {
    width: 100% !important;
    max-width: 100% !important;
    left: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: .5rem;
    padding-right: 0;
    box-sizing: border-box;
  }
  main.my-attendance-shell {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding: 0 0 4.5rem !important;
    box-sizing: border-box;
  }
  main.my-attendance-shell.card-margin-top { margin-top: 0 !important; }
  .attendance-hero.teacher-curriculum-hero {
    min-height: 0;
    height: auto !important;
    padding: .75rem .9rem .85rem;
    gap: 10px;
  }
  .attendance-hero h1 { font-size: 1.1rem; }
  .attendance-hero-top {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 10px;
  }
  .attendance-hero-copy {
    flex: 0 0 auto;
    min-width: 0;
  }
  .attendance-hero-register,
  .attendance-hero-empty {
    padding: 0;
    width: 100%;
    align-self: stretch;
  }
  .attendance-status { margin-top: 5px; }
  .attendance-location-check {
    align-items: stretch;
    flex-direction: column;
    gap: 6px;
    width: 100%;
  }
  .attendance-location-message { max-width: 100%; }
  .attendance-check-location-btn {
    align-self: flex-start;
    min-height: 30px;
    padding: 5px 8px;
  }
  .attendance-feedback:empty { display: none; }
  .attendance-history-section { margin-top: 14px; }
  .attendance-actions {
    width: 100%;
    margin-top: 10px;
  }
  .attendance-history-heading {
    align-items: stretch;
    flex-direction: column;
  }
  .attendance-history-tools {
    flex-direction: column;
    align-items: stretch;
    gap: 9px;
  }
  .attendance-history-tools select {
    width: 100%;
  }
  .attendance-table-toolbar {
    flex-direction: column;
    align-items: stretch;
    gap: 9px;
  }
  .attendance-table-toolbar #attendance-page-size,
  .attendance-table-toolbar #attendance-search {
    width: 100%;
  }
  .attendance-table-footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .attendance-pagination { align-self: flex-end; }

  /* Card layout instead of a horizontally-scrolled table on mobile. */
  .attendance-table-wrap {
    overflow: visible;
    border: none;
    box-shadow: none;
    border-radius: 0;
  }
  .attendance-table {
    min-width: 0;
    width: 100%;
    border-collapse: collapse;
    display: block;
  }
  .attendance-table thead { display: none; }
  .attendance-table tbody { display: block; }
  .attendance-table tbody tr {
    display: block;
    background: #fff;
    border: 1px solid #eaebf2;
    border-radius: 14px;
    box-shadow: 0 2px 5px rgba(43, 22, 104, .06);
    padding: 2px 14px;
    margin-bottom: 12px;
  }
  .attendance-table tbody tr:nth-child(even) { background: #fff; }
  .attendance-table tbody tr:last-child { margin-bottom: 0; }
  .attendance-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 0;
    border-bottom: 1px solid #f0f1f6;
    font-size: .82rem;
    text-align: right;
  }
  .attendance-table tbody tr td:last-child { border-bottom: 0; }
  .attendance-table td::before {
    content: attr(data-label);
    font-weight: 700;
    color: #6b6580;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .03em;
    text-align: left;
  }
  .attendance-table td[data-label="#"] { display: none; }
  .attendance-table td.attendance-empty {
    display: block;
    text-align: center;
    border-bottom: 0;
  }
  .attendance-table td.attendance-empty::before { content: none; }
}

/* Attendance management (formerly attendance_management/static/css/attendance_management.css) */
.attendance-location-policy {
  border-left: 4px solid #4c3a8c !important;
}

.attendance-location-list {
  display: grid;
  gap: 0.75rem;
}

.attendance-location-item {
  width: 100%;
  padding: 0.875rem;
  border: 1px solid #d7d9e3;
  border-radius: 0.75rem;
  background: #fff;
  color: #232336;
  text-align: left;
}

.attendance-location-item:hover,
.attendance-location-item.active {
  border-color: #4c3a8c;
  background: #f7f5fc;
}

.attendance-location-item-meta {
  color: #6b7280;
  font-size: 0.75rem;
}

/* The site-wide unscoped .btn-outline-secondary rule paints every outline
   button with --secondary-color, which made Delete look like just another
   purple action next to Edit instead of a distinct, red destructive one. */
.attendance-location-item-actions .btn-outline-danger {
  background-color: #dc3545;
  border-color: #dc3545;
  color: #fff;
}
.attendance-location-item-actions .btn-outline-danger:hover,
.attendance-location-item-actions .btn-outline-danger:focus {
  background-color: #b02a37;
  border-color: #b02a37;
  color: #fff;
}
.attendance-google-map-shell { position: relative; overflow: hidden; border: 1px solid #d7d9e3; border-radius: .75rem; background: #eeeaf9; }
.attendance-google-map { width: 100%; height: 260px; }
.attendance-map-status { position: absolute; left: .65rem; bottom: .65rem; max-width: calc(100% - 1.3rem); padding: .38rem .65rem; border-radius: .4rem; background: rgba(255,255,255,.94); color: #5b6072; font-size: .68rem; box-shadow: 0 1px 5px rgba(31,25,52,.12); }
.attendance-map-status:empty { display: none; }

.attendance-location-status {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: #e7f8ee;
  color: #1f7a45;
  font-size: 0.7rem;
  font-weight: 700;
}

.attendance-location-status.inactive {
  background: #f1f1f4;
  color: #6b7280;
}
.attendance-radius-output { min-width: 4rem; padding: 0.3rem 0.45rem; border-radius: 0.45rem; background: #eeeaf9; color: #4c3a8c; font-size: 0.75rem; font-weight: 700; text-align: center; }

/* Unified "New attendance rule" modal */
.attendance-rule-modal .modal-header { border-bottom: 1px solid #eceaf2; }
.attendance-rule-section { padding: 1rem 0; border-bottom: 1px solid #eceaf2; }
.attendance-rule-section:first-child { padding-top: 0; }
.attendance-rule-section:last-of-type { border-bottom: 0; padding-bottom: .5rem; }
.attendance-rule-section-heading { display: flex; align-items: center; gap: .6rem; margin-bottom: .9rem; }
.attendance-rule-step-badge { display: inline-flex; align-items: center; justify-content: center; width: 1.5rem; height: 1.5rem; flex: 0 0 1.5rem; border-radius: 50%; background: #eeeaf9; color: #4c3a8c; font-size: .72rem; font-weight: 800; }
.attendance-address-search { position: relative; }
.attendance-address-search > i { position: absolute; top: 50%; left: .65rem; transform: translateY(-50%); color: #9c94b8; font-size: .75rem; pointer-events: none; }
.attendance-address-search input { padding-left: 1.85rem; }
.attendance-rule-slider-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: .35rem; }
.attendance-rule-slider-value { padding: .2rem .55rem; border-radius: .45rem; background: #eeeaf9; color: #4c3a8c; font-size: .75rem; font-weight: 700; }
.attendance-rule-slider.form-range { accent-color: #4c3a8c; }
.attendance-rule-slider-caption { display: flex; align-items: center; justify-content: space-between; margin-top: .3rem; color: #9c94b8; font-size: .65rem; }
.attendance-rule-preset-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; margin-top: .85rem; }
.attendance-rule-preset { display: flex; flex-direction: column; gap: .15rem; padding: .55rem .7rem; border: 1px solid #d7d9e3; border-radius: .6rem; background: #fff; text-align: left; transition: border-color .15s, background .15s, box-shadow .15s; }
.attendance-rule-preset:hover { border-color: #b9acd9; }
.attendance-rule-preset.active { border-color: #4c3a8c; background: #f7f5fc; box-shadow: 0 0 0 .14rem rgba(76,58,140,.14); }
.attendance-rule-preset-title { color: #232336; font-size: .78rem; font-weight: 700; }
.attendance-rule-preset.active .attendance-rule-preset-title { color: #4c3a8c; }
.attendance-rule-preset-desc { color: #9c94b8; font-size: .65rem; }
.attendance-day-picker { display: flex; flex-wrap: wrap; gap: .4rem; }
.attendance-day-pill { min-width: 3rem; padding: .4rem .3rem; border: 1px solid #d7d9e3; border-radius: 999px; background: #fff; color: #6b7280; font-size: .72rem; font-weight: 700; text-align: center; transition: border-color .15s, background .15s, color .15s; }
.attendance-day-pill:hover { border-color: #b9acd9; }
.attendance-day-pill.active { border-color: #4c3a8c; background: linear-gradient(135deg,#6046ad,#432b91); color: #fff; box-shadow: 0 3px 8px rgba(67,43,145,.22); }
.attendance-rule-summary { margin-top: 1rem; padding: .85rem 1rem; border: 1px solid #d9f0e2; border-radius: .7rem; background: #f2fbf6; }
.attendance-rule-summary-heading { margin-bottom: .3rem; color: #1f7a45; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; }
.attendance-rule-summary-heading i { margin-right: .1rem; }
.attendance-rule-summary p { color: #1f5c38; line-height: 1.5; }

@media (max-width: 767.98px) {
  .attendance-view-tabs { flex-wrap: wrap; }
  .attendance-view-tab { flex: 0 1 auto; justify-content: center; padding-inline: .85rem; }
  .attendance-location-tab-link { width: auto; margin-left: 0; }
}
.attendance-view-tabs {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
  margin: 0 0 1rem !important;
  padding: 0 !important;
  border: 0;
  border-bottom: 1px solid #d9d9d9 !important;
  border-radius: 0;
  background: transparent;
}

.attendance-view-tab {
  display: flex;
  align-items: center;
  gap: .4rem;
  min-height: 46px;
  padding: 10px 10px 8px !important;
  border: 0 !important;
  border-bottom: 2px solid transparent !important;
  border-radius: 0 !important;
  background: transparent !important;
  color: #111827 !important;
  text-align: left;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.2;
  transition: color .16s, border-color .16s;
}

.attendance-view-tab:hover { color: var(--primary-color, #7627a8) !important; }
.attendance-view-tab.active { background: transparent !important; border-bottom-color: var(--primary-color, #7627a8) !important; color: #111827 !important; font-weight: 400; box-shadow: none; transform: none; }
.attendance-view-tab:focus { outline: none; }
.attendance-view-tab:focus-visible { outline: 2px solid #8c79cc; outline-offset: 2px; }
.attendance-view-tab strong, .attendance-view-tab small { display: block; }
.attendance-view-tab > span:nth-child(2) { min-width: 0; }
.attendance-tab-count { margin-left: .35rem; padding: .12rem .4rem; border-radius: 999px; background: #edf0f5; color: #64748b; font-size: .58rem; font-weight: 700; white-space: nowrap; }
.attendance-view-tab.active .attendance-tab-count { background: #edf0f5; color: #64748b; }
.attendance-view-tab small { margin-top: 0.1rem; opacity: 0.7; font-size: 0.7rem; }
.attendance-view-tab em { padding: 0.12rem 0.35rem; border-radius: 999px; background: #eeeaf9; color: #4c3a8c; font-size: 0.55rem; font-style: normal; }
.attendance-tab-icon { display: grid; place-items: center; width: 2.2rem; height: 2.2rem; flex: 0 0 2.2rem; border-radius: 0.6rem; background: rgba(255, 255, 255, 0.12); }
.attendance-view-tab.active .attendance-tab-icon { background: #eeeaf9; color: #4c3a8c; }
.attendance-inline-export { color: #4c3a8c; font-size: 0.75rem; font-weight: 700; text-decoration: none; }
.attendance-self-service-intro { display: flex; align-items: center; gap: 0.8rem; padding: 1rem 1.1rem; border-radius: 0.85rem; background: #f7f5fc; color: #201934; }
.attendance-self-service-intro .attendance-tab-icon { background: #4c3a8c; color: #fff; }
.attendance-self-service-intro p { color: #6b7280; font-size: 0.78rem; }
.attendance-status-select { border: 0; border-radius: 999px; font-weight: 700; }
.attendance-status-select.status-present { background: #e7f8ee; color: #1f7a45; }
.attendance-status-select.status-late { background: #fdf1e0; color: #b76505; }
.attendance-status-select.status-partial { background: #eeeaf9; color: #4c3a8c; }
.attendance-status-select.status-absent { background: #fbe9e9; color: #bd3636; }
.attendance-export-dialog .modal-dialog { width: min(34rem, calc(100vw - 2rem)); max-width: 34rem; margin: 1rem auto; }
.attendance-export-dialog .attendance-export-modal { display: flex !important; flex-direction: column !important; width: 100% !important; max-height: calc(100vh - 2rem) !important; min-height: 0 !important; overflow: hidden !important; border: 0; border-radius: .75rem !important; background: #fff; box-shadow: 0 18px 60px rgba(15,23,42,.2); }
.attendance-export-dialog .modal-header { flex: 0 0 auto !important; align-items: flex-start; padding: .85rem 1rem; border-bottom: 0; }
.attendance-export-dialog .modal-header .btn-close { flex: 0 0 auto; margin: 0; }
.attendance-export-subtitle { margin-top: .2rem; color: rgba(255,255,255,.82); font-size: .68rem; line-height: 1.35; }
.attendance-export-dialog .modal-body { position: static !important; flex: 1 1 auto !important; min-height: 0 !important; padding: 1rem !important; overflow-x: hidden !important; overflow-y: auto !important; }
.attendance-export-dialog .modal-footer { position: static !important; inset: auto !important; display: flex !important; flex: 0 0 auto !important; align-items: center !important; justify-content: flex-end !important; width: 100% !important; margin: 0 !important; padding: .75rem 1rem !important; border-top: 1px solid #eceaf2 !important; background: #fff !important; transform: none !important; }
.attendance-export-dialog .modal-footer > * { margin: 0 !important; }
.attendance-export-dialog .modal-footer > * + * { margin-left: .5rem !important; }
.attendance-export-formats { display: grid; gap: 0.55rem; }
.attendance-export-formats input { position: absolute; opacity: 0; pointer-events: none; }
.attendance-export-formats span { display: flex; align-items: center; gap: 0.6rem; padding: 0.7rem 0.8rem; border: 1px solid #d7d9e3; border-radius: 0.65rem; cursor: pointer; }
.attendance-export-formats input:checked + span { border-color: #4c3a8c; background: #f7f5fc; color: #4c3a8c; font-weight: 700; }
.attendance-inline-workspace { width: 100%; min-height: 24rem; border-radius: .9rem; background: transparent; }
.attendance-inline-workspace > #program-attendance-page { width: 100%; padding: 0; }
body.programme-management-content-page #programme-attendance-panel { overflow: visible; padding: .7rem .8rem .85rem; border: 1px solid #e7e3f0 !important; border-radius: 1rem; background: #fff; box-shadow: 0 8px 28px rgba(31,25,52,.06); }
body.programme-management-content-page #programme-attendance-panel > .programme-panel-title { margin: 0 0 .85rem; color: #1d192d; font-size: 1.15rem; font-weight: 800; }
.attendance-inline-workspace #program-attendance-page > .modal-body { padding: 1.05rem !important; border-radius: .85rem; background: #fff; }
.attendance-inline-workspace .attendance-dashboard-shell { padding-top: 0; }
.attendance-inline-workspace .attendance-table-card + .d-flex { padding: .75rem .1rem 0; }
.attendance-inline-workspace .attendance-table-card + .d-flex .btn { border-color: #d9d5e6; color: #503aa0; }
.attendance-inline-workspace .attendance-table-card + .d-flex .form-select { border-color: #d9d5e6; border-radius: .45rem; }

.attendance-location-tab-link { position: static; margin-left: 0; padding: 10px 10px 8px !important; border: 0 !important; border-bottom: 2px solid transparent !important; border-radius: 0 !important; background: transparent !important; color: #111827 !important; font-size: 14px; font-weight: 400; line-height: 1.2; transition: color .16s, border-color .16s; }
.attendance-location-tab-link:hover,
.attendance-location-tab-link.active { border-bottom-color: var(--primary-color, #7627a8) !important; background: transparent !important; color: #111827 !important; box-shadow: none; transform: none; }
.attendance-location-tab-link:hover { color: var(--primary-color, #7627a8) !important; }
.attendance-location-tab-link:focus-visible { outline: 2px solid #8c79cc; outline-offset: 2px; }
.attendance-policy-grid { display: grid; grid-template-columns: 1fr; align-items: end; gap: .85rem; }
.attendance-policy-grid .form-label { margin-bottom: .3rem; color: #48425a; font-weight: 700; }
.attendance-policy-save { display: flex; align-items: end; }
.attendance-dashboard-shell { padding-top: .4rem; }
.attendance-filter-card { padding: 1.25rem 1.4rem; border: 1px solid #ebe8f3; border-radius: .9rem; background: #fff; box-shadow: 0 5px 18px rgba(31,25,52,.055); }
.attendance-filter-grid { display: grid; grid-template-columns: 170px 170px 170px 170px 1fr; align-items: end; gap: 1.1rem; }
.attendance-control { height: 2.45rem; border-color: #d9d8e3; border-radius: .55rem; background-color: #fff; font-size: .8rem; transition: border-color .15s, box-shadow .15s; }
.attendance-control:focus { border-color: #806bc2; box-shadow: 0 0 0 .18rem rgba(106,79,176,.12); }
.attendance-refresh-cell { display: flex; justify-content: flex-end; }
.attendance-refresh-btn { min-width: 6rem; height: 2.4rem; border: 0; border-radius: .55rem; background: linear-gradient(135deg,#6046ad,#432b91); color: #fff; font-size: .78rem; font-weight: 700; box-shadow: 0 4px 10px rgba(67,43,145,.18); transition: transform .15s, box-shadow .15s; }
.attendance-refresh-btn:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(67,43,145,.24); }
.attendance-admin-summary-grid { display: grid !important; grid-template-columns: repeat(5,minmax(0,1fr)) !important; gap: .85rem !important; }
.attendance-admin-summary-grid .attendance-summary-card { min-height: 5.4rem; padding: 1rem 1.15rem !important; border: 1px solid #eeecf4 !important; border-left: 4px solid #d7d9e3 !important; border-radius: .8rem !important; background: linear-gradient(145deg,#fff,#fdfcff); box-shadow: 0 4px 14px rgba(31,25,52,.05); transition: transform .15s, box-shadow .15s; }
.attendance-admin-summary-grid .attendance-summary-card:hover { transform: translateY(-2px); box-shadow: 0 7px 18px rgba(31,25,52,.08); }
.attendance-admin-summary-grid .attendance-summary-card-present { border-left-color: #1f9d55 !important; }
.attendance-admin-summary-grid .attendance-summary-card-late { border-left-color: #e1840b !important; }
.attendance-admin-summary-grid .attendance-summary-card-partial { border-left-color: #6a4fb0 !important; }
.attendance-admin-summary-grid .attendance-summary-card-absent { border-left-color: #dc4b52 !important; }
.attendance-admin-summary-grid .attendance-summary-card-rate { border-left-color: #39266f !important; }
.attendance-admin-summary-content { display: block !important; }
.attendance-admin-summary-label { margin-bottom: .5rem; color: #52566a; font-size: .72rem; }
.attendance-admin-summary-label .summary-dot { display: none; }
.attendance-admin-summary-grid .summary-value { color: #19162c; font-size: 1.45rem !important; line-height: 1; }
.attendance-table-card { overflow: hidden; border: 1px solid #ebe8f3; border-radius: .9rem; background: #fff; box-shadow: 0 5px 18px rgba(31,25,52,.055); }
.attendance-table-toolbar { display: flex; align-items: end; justify-content: flex-start; flex-wrap: nowrap; min-height: 3.5rem; padding: .75rem 1.15rem; background: #fff; gap: .65rem; }
.attendance-table-toolbar h6 { color: #201d30; font-size: .95rem; font-weight: 750; }
.attendance-table-filters { display: grid; grid-template-columns: 8rem 12rem 12rem auto; align-items: end; gap: .6rem; flex: 0 1 auto; width: auto; }
.attendance-table-filters .form-label { display: block; }
.attendance-table-filters .attendance-control { min-height: 2.15rem; font-size: .75rem; }
.attendance-table-filters .attendance-refresh-btn { min-height: 2.15rem; height: 2.15rem; }
.attendance-table-actions { display: flex; align-items: center; gap: .55rem; flex: 0 0 auto; order: 2; }
.attendance-table-toolbar h6 { margin: 0 0 .55rem auto !important; order: 3; white-space: nowrap; }
.attendance-rows-control { display: inline-flex; align-items: center; gap: .35rem; margin: 0; color: #687087; font-size: .7rem; white-space: nowrap; }
.attendance-rows-control select { min-width: 3.7rem; height: 2.15rem; padding: .3rem 1.5rem .3rem .5rem; border: 1px solid #d9d8e3; border-radius: .5rem; background-color: #fff; color: #352b50; font-size: .72rem; }
.attendance-bulk-actions { display: flex; align-items: center; gap: .4rem; }
.attendance-bulk-btn { display: inline-flex; align-items: center; gap: .3rem; min-height: 2.15rem; padding: .4rem .62rem; border: 1px solid; border-radius: .5rem; background: #fff; font-size: .68rem; font-weight: 700; white-space: nowrap; }
.attendance-bulk-btn.present { border-color: #8fd4ae; color: #16824a; }
.attendance-bulk-btn.present:hover { background: #e7f8ee; }
.attendance-bulk-btn.absent { border-color: #efafb4; color: #c73d46; }
.attendance-bulk-btn.absent:hover { background: #fbe9e9; }
.attendance-bulk-btn:disabled { cursor: wait; opacity: .55; }
.attendance-table-search { width: 13.8rem; padding: .55rem .8rem; border: 1px solid #d9d8e3; border-radius: .55rem; background: #fbfbfd; font-size: .75rem; outline: none; transition: border-color .15s, box-shadow .15s, background .15s; }
.attendance-table-search:focus { border-color: #806bc2; background: #fff; box-shadow: 0 0 0 .18rem rgba(106,79,176,.10); }
.attendance-table-export-btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; min-height: 2.15rem; padding: .45rem .75rem; border: 1px solid #4c3a8c; border-radius: .5rem; background: #fff; color: #4c3a8c; font-size: .72rem; font-weight: 700; white-space: nowrap; transition: background .15s, color .15s, box-shadow .15s; }
.attendance-table-export-btn:hover { background: #4c3a8c; color: #fff; box-shadow: 0 4px 10px rgba(76,58,140,.18); }
.attendance-table-card > .table-responsive { margin: 0 1.15rem; border: 1px solid #f0edf5; border-radius: 0; }
.attendance-table-card .dt-container { padding: 0 1.15rem 1rem; }
.attendance-table-card .dt-layout-row { align-items: center; gap: .75rem; margin-top: .75rem; color: #687087; font-size: .72rem; }
.attendance-table-card .dt-length select, .attendance-table-card .dt-search input { min-height: 2rem; border: 1px solid #d9d8e3; border-radius: .5rem; background: #fff; font-size: .72rem; }
.attendance-table-card .dt-search input { margin-left: .35rem; padding: .35rem .6rem; }
.attendance-table-card .dt-paging .dt-paging-button { min-width: 2rem; min-height: 2rem; margin-left: .25rem; padding: .3rem .55rem; border: 1px solid #d9d8e3; border-radius: .45rem; background: #fff; color: #4c3a8c !important; font-size: .72rem; }
.attendance-table-card .dt-paging .dt-paging-button.current { background: #4c3a8c; color: #fff !important; }
.attendance-data-table { margin: 0; background: #fff; }
.attendance-data-table thead th { padding: .9rem 1rem !important; border: 0 !important; background: var(--primary-color, #36006f) !important; color: #fff !important; font-size: .82rem !important; font-weight: 800; vertical-align: middle; white-space: nowrap; }
.attendance-data-table tbody td { padding: 1.35rem 1rem !important; border: 0; color: #667085; font-size: .86rem; line-height: 1.4; vertical-align: middle; }
.attendance-data-table tbody tr { background: #fff; border-bottom: 1px solid #f2f0f6; }
.attendance-data-table tbody tr:last-child { border-bottom: 0; }
.attendance-data-table tbody tr:hover { background: #fbfaff; }
.attendance-table-card > .d-flex { min-height: 4.5rem; margin: 0 !important; padding: 1rem 1.15rem; background: #fff; }
.attendance-status-pill { display: inline-flex; align-items: center; gap: .35rem; padding: .28rem .65rem; border-radius: 999px; font-size: .68rem; font-weight: 600; }
.attendance-status-pill i { width: .32rem; height: .32rem; border-radius: 50%; background: currentColor; }
.attendance-status-pill.status-present { background: #e6f8ee; color: #15934d; }
.attendance-status-pill.status-late { background: #fff0dc; color: #d87500; }
.attendance-status-pill.status-partial { background: #eeeaf9; color: #6045a8; }
.attendance-status-pill.status-absent { background: #fbe7e9; color: #d9434b; }
.attendance-view-link { border: 0; background: transparent; color: #3b237f; font-size: .72rem; }
.attendance-row-mark { display: flex; align-items: center; gap: .35rem; }
.attendance-row-status { width: 6.25rem; min-height: 1.9rem; padding: .25rem .5rem; border: 1px solid #d9d5e6; border-radius: 999px; background: #fff; color: #352b50; font-size: .68rem; }
.attendance-mark-btn { min-height: 1.9rem; padding: .25rem .65rem; border: 0; border-radius: 999px; background: #4c3a8c; color: #fff; font-size: .68rem; font-weight: 700; }
.attendance-mark-btn:disabled { opacity: .6; }

/* Compact spacing for the inline programme-card presentation. */
.attendance-inline-workspace #program-attendance-page > .modal-body { padding: .65rem !important; }
.attendance-inline-workspace .attendance-view-tabs { margin-bottom: .7rem !important; }
.attendance-inline-workspace .attendance-dashboard-shell { padding-top: 0; }
.attendance-inline-workspace .attendance-filter-card { margin-bottom: .7rem !important; padding: .75rem .9rem; }
.attendance-inline-workspace .attendance-filter-grid { gap: .7rem; }
.attendance-inline-workspace .attendance-filter-card .form-label { margin-bottom: .2rem !important; font-size: .68rem !important; }
.attendance-inline-workspace .attendance-control { height: 2.15rem; font-size: .76rem; }
.attendance-inline-workspace .attendance-refresh-btn { height: 2.15rem; min-width: 5.5rem; }
.attendance-inline-workspace .attendance-admin-summary-grid { gap: .6rem !important; margin-bottom: .7rem !important; }
.attendance-inline-workspace .attendance-admin-summary-grid .attendance-summary-card { min-height: 4rem; padding: .62rem .8rem !important; }
.attendance-inline-workspace .attendance-admin-summary-label { margin-bottom: .25rem; font-size: .66rem; }
.attendance-inline-workspace .attendance-admin-summary-grid .summary-value { font-size: 1.15rem !important; }
.attendance-inline-workspace .attendance-table-toolbar { min-height: 3.15rem; padding: .58rem .9rem; }
.attendance-inline-workspace .attendance-table-search { padding-block: .43rem; }
.attendance-inline-workspace .attendance-data-table thead th { padding: .9rem 1rem !important; }
.attendance-inline-workspace .attendance-data-table tbody td { padding: 1.35rem 1rem !important; }
.attendance-inline-workspace .attendance-table-card + .d-flex { margin-top: 0 !important; padding: .35rem .1rem 0; }
.attendance-inline-workspace .attendance-table-card tbody tr:only-child td { height: 3.1rem; }

@media (max-width: 767.98px) {
  .attendance-filter-grid { grid-template-columns: 1fr; }
  .attendance-refresh-cell { justify-content: stretch; }
  .attendance-refresh-btn { width: 100%; }
  .attendance-admin-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)) !important; }
  .attendance-table-toolbar { align-items: stretch; flex-direction: column; gap: .75rem; }
  .attendance-table-filters { grid-template-columns: 1fr; width: 100%; }
  .attendance-table-filters .attendance-refresh-btn { width: 100%; }
  .attendance-table-actions { align-items: stretch; flex-direction: column; }
  .attendance-rows-control { justify-content: space-between; }
  .attendance-rows-control select { flex: 1; }
  .attendance-bulk-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .attendance-table-search { width: 100%; }
  .attendance-table-export-btn { width: 100%; }
  .attendance-table-card > .table-responsive { margin: 0; border-left: 0; border-right: 0; }
  .attendance-inline-workspace .attendance-data-table tbody td { padding: .75rem !important; }
}

/* Video upload progress dialog (content_creator/static/js/viewCourseCurriculum.js) -
   card markup lives in the <template id="video-upload-progress-template"> defined in
   course_view_template.html and curriculum_content.html. */
.video-upload-progress-popup {
  border-radius: 24px !important;
  padding: 0 !important;
  overflow: hidden !important;
  background: linear-gradient(180deg, #fff 0%, color-mix(in srgb, var(--primary-color) 4%, #fff 96%) 100%) !important;
  box-shadow: 0 24px 80px color-mix(in srgb, var(--primary-color) 35%, transparent) !important;
}

.video-upload-progress-popup .swal2-title {
  margin-top: 0.5rem !important;
  color: color-mix(in srgb, var(--primary-color) 70%, #000 30%) !important;
  font-weight: 800 !important;
  letter-spacing: -0.02em !important;
}

.video-upload-progress-container {
  margin: 0 !important;
  padding: 0 1.25rem 1.5rem !important;
}

.video-upload-progress-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-width: min(100%, 520px);
  padding: 0.25rem 0 0.5rem;
}

.video-upload-progress-ring {
  width: 96px;
  height: 96px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary-color) 8%, transparent), 0 10px 20px color-mix(in srgb, var(--primary-color) 12%, transparent);
  flex: 0 0 auto;
  background: conic-gradient(var(--primary-color) 0deg, var(--primary-color) var(--video-upload-ring-angle, 12deg), color-mix(in srgb, var(--primary-color) 12%, transparent) var(--video-upload-ring-angle, 12deg) 360deg);
}

.video-upload-progress-ring.is-done {
  background: conic-gradient(#1a8f4c 0deg, #1a8f4c var(--video-upload-ring-angle, 360deg), color-mix(in srgb, var(--primary-color) 12%, transparent) var(--video-upload-ring-angle, 360deg) 360deg);
}

.video-upload-progress-ring-inner {
  width: 70px;
  height: 70px;
  border-radius: 999px;
  background: #fff;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.video-upload-progress-value {
  font-size: 1.2rem;
  font-weight: 800;
  color: color-mix(in srgb, var(--primary-color) 75%, #000 25%);
}

.video-upload-progress-check {
  font-size: 1.8rem;
  font-weight: 800;
  color: #1a8f4c;
  display: none;
}

.video-upload-progress-ring.is-done .video-upload-progress-check {
  display: inline;
}

.video-upload-progress-ring.is-done .video-upload-progress-value {
  display: none;
}

.video-upload-progress-copy {
  flex: 1 1 auto;
  text-align: left;
}

.video-upload-progress-status {
  font-size: 1.05rem;
  font-weight: 700;
  color: color-mix(in srgb, var(--primary-color) 80%, #000 20%);
  margin-bottom: 0.35rem;
}

.video-upload-progress-stage-line {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  margin-bottom: 0.85rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary-color) 8%, transparent);
  color: color-mix(in srgb, var(--primary-color) 75%, #000 25%);
  font-size: 0.85rem;
  font-weight: 700;
}

.video-upload-progress-message {
  color: #6b5a57;
  line-height: 1.45;
  margin-bottom: 0.9rem;
}

.video-upload-progress-bar {
  width: 100%;
  height: 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--primary-color) 9%, transparent);
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.08);
}

.video-upload-progress-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--primary-color) 0%, color-mix(in srgb, var(--primary-color) 55%, #fff 45%) 100%);
  transition: width 420ms ease;
  box-shadow: 0 0 18px color-mix(in srgb, var(--primary-color) 30%, transparent);
  width: var(--video-upload-bar-width, 12%);
}

.video-upload-progress-bar-fill.is-done {
  background: linear-gradient(90deg, #1a8f4c 0%, #2ecc71 100%);
}

.video-upload-progress-footnote {
  margin-top: 0.7rem;
  font-size: 0.9rem;
  color: #8e7b77;
}

@media (max-width: 576px) {
  .video-upload-progress-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    min-width: 0;
  }

  .video-upload-progress-copy {
    text-align: center;
  }
}

/* "Require manual release" / "Save to library" toggles on every assessment
   creation form (_manage_assessment_body.html's Add Assessment + Upload
   content modals, curriculum_content.html's Add Assessment modal,
   ai_prompt_popup_form.html's AI Generated Assessment + Extract Question
   Paper modals). Deliberately plain rows, no highlight container -- label
   left, switch right, helper caption below in smaller/regular-weight text. */
.assessment-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding-left: 0;
}
.assessment-toggle-row .form-check-input {
  margin-left: 0;
  flex-shrink: 0;
}
.assessment-toggle-helper {
  font-size: .7rem;
  margin-top: .15rem;
}

/* write_code_challenge_standalone.html: learner-facing solve screen for a
   standalone (Program/individual/Team-assigned) code challenge. */
.standalone-track-badge {
  background-color: #ede9fe;
  color: #6d28d9;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
}
.standalone-info-card .nav-tabs {
  padding: 0.5rem 0.75rem 0;
  border-bottom-color: #e9ecef;
}
.standalone-info-card .nav-tabs .nav-link {
  font-size: 0.8rem;
  color: #6c757d;
  border: none;
  border-bottom: 2px solid transparent;
}
.standalone-info-card .nav-tabs .nav-link.active {
  color: #6d28d9;
  border-bottom-color: #6d28d9;
  background: transparent;
}
.standalone-info-pane {
  font-size: 0.85rem;
  color: #495057;
  white-space: pre-line;
}
.standalone-editor-shell {
  background: #0d1117;
  border-radius: 0.75rem;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 320px;
}
.standalone-editor-filebar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.9rem;
  background: #161b22;
  border-bottom: 1px solid #22283a;
}
.standalone-editor-dots {
  display: inline-flex;
  gap: 0.3rem;
}
.standalone-editor-dots span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #3a4152;
  display: inline-block;
}
.standalone-editor-filename {
  color: #8b93a7;
  font-size: 0.75rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
.standalone-run-btn {
  background: #ede9fe;
  color: #6d28d9;
  font-size: 0.75rem;
  font-weight: 600;
  border: none;
}
.standalone-reset-btn {
  background: transparent;
  color: #8b93a7;
  border: 1px solid #2c3345;
  font-size: 0.75rem;
}
.standalone-editor-textarea {
  flex: 1 1 auto;
  min-height: 260px;
  background: #0d1117;
  color: #e6edf3;
  border: none;
  outline: none;
  resize: vertical;
  padding: 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.85rem;
  line-height: 1.5;
}
.standalone-preview-shell {
  border: 1px solid #e9ecef;
  border-radius: 0.75rem;
  overflow: hidden;
  background: #fff;
}
.standalone-preview-tabs {
  border-bottom: 1px solid #e9ecef;
  padding: 0.4rem 0.75rem 0;
}
.standalone-preview-tabs .nav-link {
  font-size: 0.8rem;
  color: #6c757d;
  border: none;
  border-bottom: 2px solid transparent;
}
.standalone-preview-tabs .nav-link.active {
  color: #6d28d9;
  border-bottom-color: #6d28d9;
  background: transparent;
}
.standalone-preview-body {
  min-height: 220px;
}
.standalone-preview-iframe {
  width: 100%;
  min-height: 220px;
  border: none;
}
.standalone-console-panel {
  min-height: 220px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.8rem;
}
.standalone-console-line {
  padding: 0.2rem 0.75rem;
  border-bottom: 1px solid #f1f3f5;
}
.standalone-console-error {
  color: #dc3545;
}
.standalone-console-warn {
  color: #b8860b;
}

/* Keep the learner code challenge usable on phones without changing the
   shared mobile shell used by the other learner pages. */
@media (max-width: 767.98px) {
  body.learner-code-challenge-page {
    overflow-x: hidden !important;
  }

  body.learner-code-challenge-page .home-section,
  body.learner-code-challenge-page .home-section.mx-4,
  body.learner-code-challenge-page .sidebar.active ~ .home-section {
    left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.learner-code-challenge-page #app.standalone-challenge-page {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0.75rem 0.75rem 7rem !important;
    box-sizing: border-box !important;
  }

  body.learner-code-challenge-page #app.standalone-challenge-page > .card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    padding: 0.75rem !important;
    box-sizing: border-box !important;
  }

  body.learner-code-challenge-page .standalone-challenge-page h4 {
    font-size: 1.1rem;
    line-height: 1.25;
    overflow-wrap: anywhere;
  }

  body.learner-code-challenge-page .standalone-challenge-page .alert {
    font-size: 0.8rem;
    overflow-wrap: anywhere;
  }

  body.learner-code-challenge-page .standalone-challenge-page .row {
    --bs-gutter-x: 0;
    --bs-gutter-y: 0.85rem;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body.learner-code-challenge-page .standalone-challenge-page [class*="col-"] {
    min-width: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.learner-code-challenge-page .standalone-info-card .nav-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  body.learner-code-challenge-page .standalone-info-card .nav-tabs::-webkit-scrollbar {
    display: none;
  }

  body.learner-code-challenge-page .standalone-info-card .nav-link {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 0.72rem;
    padding: 0.45rem 0.5rem;
  }

  body.learner-code-challenge-page .standalone-info-pane {
    font-size: 0.8rem;
    overflow-wrap: anywhere;
  }

  body.learner-code-challenge-page .standalone-editor-filebar {
    flex-wrap: wrap;
    gap: 0.4rem;
    padding: 0.5rem;
  }

  body.learner-code-challenge-page .standalone-editor-filename {
    flex: 1 1 5rem;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.learner-code-challenge-page .standalone-editor-filebar .ms-auto {
    width: 100%;
    margin-left: 0 !important;
  }

  body.learner-code-challenge-page .standalone-editor-filebar .ms-auto .btn {
    flex: 1 1 0;
    min-height: 2rem;
  }

  body.learner-code-challenge-page .standalone-editor-textarea {
    min-height: 14rem;
    padding: 0.75rem;
    font-size: 0.75rem;
  }

  body.learner-code-challenge-page .standalone-preview-body,
  body.learner-code-challenge-page .standalone-preview-iframe,
  body.learner-code-challenge-page .standalone-console-panel {
    min-height: 12rem;
  }

  body.learner-code-challenge-page .standalone-challenge-page > .card > .row + .d-flex {
    align-items: stretch !important;
  }

  body.learner-code-challenge-page .standalone-challenge-page > .card > .row + .d-flex p,
  body.learner-code-challenge-page .standalone-challenge-page > .card > .row + .d-flex .btn {
    width: 100%;
  }

  body.learner-code-challenge-page .standalone-challenge-page > .card > .row + .d-flex p {
    font-size: 0.72rem;
  }
}

/* write_code_challenge.html: admin/teacher grading panel -- rubric rating
   scale (red -> orange -> yellow -> yellow-green -> green). */
.rubric-grading-card .rating-btn {
  flex: 1 1 0;
  border: 1px solid #dee2e6;
  background: #fff;
  color: #495057;
}
.rubric-grading-card .rating-btn-1.active { background-color: #ef4444; border-color: #ef4444; color: #fff; }
.rubric-grading-card .rating-btn-2.active { background-color: #f97316; border-color: #f97316; color: #fff; }
.rubric-grading-card .rating-btn-3.active { background-color: #eab308; border-color: #eab308; color: #fff; }
.rubric-grading-card .rating-btn-4.active { background-color: #a3c93a; border-color: #a3c93a; color: #fff; }
.rubric-grading-card .rating-btn-5.active { background-color: #22c55e; border-color: #22c55e; color: #fff; }
.rubric-grading-card .weighted-score-bar {
  background-color: #f3e8ff;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
}
.rubric-legend-badge {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  color: #fff;
  margin: 0 auto;
}
.rubric-legend-badge.rating-btn-1 { background-color: #ef4444; }
.rubric-legend-badge.rating-btn-2 { background-color: #f97316; }
.rubric-legend-badge.rating-btn-3 { background-color: #eab308; }
.rubric-legend-badge.rating-btn-4 { background-color: #a3c93a; }
.rubric-legend-badge.rating-btn-5 { background-color: #22c55e; }

/* write_code_challenge_standalone.html: Self-check tab's "not checked yet" bullet. */
.standalone-selfcheck-unchecked-icon {
  font-size: 0.5rem;
}

/* job_role_user_task.html ("My Practicals"): a more compact variant of the
   shared .program-tree-card look, scoped to this class only so the
   Programs/Subprograms tree elsewhere is unaffected. */
.task-tree-card .card-body {
  padding: 0.55rem 0.85rem;
}
.task-tree-card .program-tree-card-icon {
  width: 1.9rem;
  height: 1.9rem;
  font-size: 1rem;
  border-radius: 0.5rem;
}
.task-tree-card .program-tree-card-meta {
  font-size: 0.75rem;
}

/* ==========================================================================
   Build Report page (progress_reporting_tool/dynamicReport.html)
   Moved here from a page-local dynamic_report.css at the user's request, so
   it now loads as part of the shared site-wide stylesheet instead of only
   on this one page. Superseded the old hardcoded-blue .dynamic-report-page
   Choices.js rules that used to live further up this file (search this
   file's history if you need the #0d6efd version) - everything below is
   brand-color-aware via var(--report-brand), which follows each tenant's
   --primary-color instead of being hardcoded to Bootstrap blue.
   ========================================================================== */
[v-cloak] {
    display: none !important;
}
.dynamic-report-builder {
    --report-border: #e2e8f0;
    --report-muted: #64748b;
    --report-soft: #f8fafc;
    --report-brand: var(--primary-color, #0d6efd);
    --report-brand-soft: color-mix(in srgb, var(--report-brand) 10%, #ffffff 90%);
    --report-brand-muted: color-mix(in srgb, var(--report-brand) 18%, #ffffff 82%);
    --report-brand-strong: color-mix(in srgb, var(--report-brand) 86%, #000000 14%);
}
.report-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: .75rem;
}
.report-summary-item {
    position: relative;
    border: 1px solid var(--report-border);
    border-radius: 10px;
    background: #fff;
    padding: .8rem .95rem .8rem 1.1rem;
    overflow: hidden;
    transition: box-shadow .15s ease, border-color .15s ease;
}
.report-summary-item::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--report-brand);
    opacity: .55;
}
.report-summary-item:hover {
    border-color: color-mix(in srgb, var(--report-brand) 35%, var(--report-border) 65%);
    box-shadow: 0 6px 16px -10px rgba(15, 23, 42, .25);
}
.report-summary-label {
    display: block;
    color: var(--report-muted);
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    line-height: 1.1;
}
.report-summary-value {
    display: block;
    color: #0f172a;
    font-weight: 700;
    font-size: 1.05rem;
    line-height: 1.2;
    margin-top: .3rem;
}
.report-presets {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.report-preset-btn,
.report-link-btn {
    border: 1px solid var(--report-border);
    background: #fff;
    color: #1f2937;
    border-radius: 8px;
    font-size: .78rem;
    font-weight: 600;
    padding: .45rem .7rem;
    line-height: 1.1;
}
.report-preset-btn:hover,
.report-link-btn:hover {
    border-color: var(--report-brand);
    color: var(--report-brand);
    background: var(--report-brand-soft);
}
.field-group-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}
.field-group-panel {
    border: 1px solid var(--report-border);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    transition: box-shadow .15s ease, border-color .15s ease;
}
.field-group-panel:hover {
    border-color: color-mix(in srgb, var(--report-brand) 35%, var(--report-border) 65%);
    box-shadow: 0 6px 18px -8px rgba(15, 23, 42, .12);
}
.field-group-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: .75rem;
    padding: .9rem 1.1rem;
    border-bottom: 1px solid var(--report-border);
    background: linear-gradient(180deg, var(--report-soft), #ffffff);
}
.field-group-title {
    font-weight: 700;
    color: #111827;
    font-size: .96rem;
    margin: 0;
}
.field-group-description {
    color: var(--report-muted);
    font-size: .72rem;
    margin: .15rem 0 0;
    line-height: 1.25;
}
.field-group-actions {
    display: flex;
    gap: .35rem;
    flex-shrink: 0;
}
.field-group-subfilter {
    padding: .75rem 1.1rem .5rem;
    border-bottom: 1px solid var(--report-border);
    background: var(--report-soft);
}
.field-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .3rem .5rem;
    padding: .75rem .75rem .85rem;
}
.field-list .form-check {
    min-width: 0;
    margin-bottom: 0;
    padding: .3rem .5rem .3rem 1.75rem;
    border-radius: 6px;
    transition: background-color .12s ease;
}
.field-list .form-check:hover {
    background: var(--report-soft);
}
.field-list .form-check-label {
    font-size: .85rem;
    line-height: 1.25;
    word-break: normal;
}
.dynamic-report-builder .report-listbox {
    min-height: 4.5rem;
    height: auto;
    padding: .25rem .4rem;
    font-size: .92rem;
}
.dynamic-report-builder .report-listbox option {
    padding: .1rem .3rem;
}
/* Comes after the rule above on purpose - subfilters inside a card
   (Teams/Assessment/etc.) are a secondary, narrow picker, not the
   primary Programmes selector, so they don't need as much height. */
.field-group-subfilter .report-listbox {
    min-height: 2.6rem;
}
.dynamic-report-page .field-group-subfilter .choices__inner {
    min-height: 2.6rem;
    padding: .3rem .7rem;
}
.dynamic-report-page .choices {
    width: 100%;
    margin-bottom: 0;
}
.dynamic-report-page .choices__inner {
    min-height: 3.1rem;
    border: 1px solid #d6d8e3;
    border-radius: 12px;
    padding: .55rem .9rem;
    background: #fff;
    font-size: 1rem;
    box-shadow: none;
}
.dynamic-report-page .choices.is-focused .choices__inner,
.dynamic-report-page .choices.is-open .choices__inner {
    border-color: var(--report-brand);
    box-shadow: 0 0 0 3px rgba(156, 72, 180, .14);
}
.dynamic-report-page .choices__list--dropdown,
.dynamic-report-page .choices__list[aria-expanded] {
    border: 1px solid #d6d8e3;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .12);
    margin-top: -1px;
    max-height: 18rem;
    overflow-y: auto;
}
.dynamic-report-page .choices__list--dropdown .choices__item,
.dynamic-report-page .choices__list[aria-expanded] .choices__item {
    padding: .8rem 1rem;
    font-size: 1rem;
    line-height: 1.3;
    color: #2b2f36;
}
.dynamic-report-page .choices__list--dropdown .choices__item--selectable.is-highlighted,
.dynamic-report-page .choices__list--dropdown .choices__item--selectable.is-selected,
.dynamic-report-page .choices__list[aria-expanded] .choices__item--selectable.is-highlighted,
.dynamic-report-page .choices__list[aria-expanded] .choices__item--selectable.is-selected {
    background: var(--report-brand, #0d6efd) !important;
    color: #fff !important;
}
.dynamic-report-page .choices__placeholder {
    color: #6b7280;
    opacity: 1;
}
/* The generic (non-.dynamic-report-page) .choices__list--multiple rule
   earlier in this file hardcodes Bootstrap blue with !important, which
   would otherwise win over anything brand-color-aware for this page's
   selected-item chips. */
.dynamic-report-page .choices__list--multiple .choices__item {
    background-color: var(--report-brand, #0d6efd) !important;
    border-color: var(--report-brand, #0d6efd) !important;
    color: #fff !important;
    font-weight: 600 !important;
    word-break: normal;
}
.dynamic-report-page .choices__list--multiple .choices__item.is-highlighted {
    background-color: color-mix(in srgb, var(--report-brand, #0d6efd) 85%, #000000 15%) !important;
    border-color: color-mix(in srgb, var(--report-brand, #0d6efd) 85%, #000000 15%) !important;
    color: #fff !important;
}
.selected-fields-preview {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    min-height: 1.65rem;
}
.selected-field-chip {
    border-radius: 999px;
    background: var(--report-brand-soft);
    color: var(--report-brand-strong);
    border: 1px solid color-mix(in srgb, var(--report-brand) 22%, transparent);
    font-size: .74rem;
    font-weight: 600;
    padding: .3rem .65rem;
    line-height: 1.1;
}
.dynamic-report-builder .form-check-input {
    accent-color: var(--report-brand);
    width: 1.05em;
    height: 1.05em;
    cursor: pointer;
}
.dynamic-report-builder .form-check-input:checked {
    background-color: var(--report-brand);
    border-color: var(--report-brand);
}
.dynamic-report-builder .form-control:focus,
.dynamic-report-builder .form-select:focus {
    border-color: var(--report-brand);
    box-shadow: 0 0 0 .18rem var(--report-brand-muted);
}
.dynamic-report-builder h5.fw-semibold,
.dynamic-report-builder h4.fw-bold {
    position: relative;
    padding-left: .9rem;
    color: #0f172a;
}
.dynamic-report-builder h5.fw-semibold {
    font-size: 1.05rem;
}
.dynamic-report-builder h4.fw-bold {
    font-size: 1.4rem;
}
.dynamic-report-builder h5.fw-semibold::before,
.dynamic-report-builder h4.fw-bold::before {
    content: "";
    position: absolute;
    left: 0;
    top: .15rem;
    bottom: .15rem;
    width: 4px;
    border-radius: 999px;
    background: var(--report-brand);
}
.configure-report-modal {
    border: none;
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 30px 70px -20px rgba(15, 23, 42, .35);
}
.configure-report-modal-header {
    background: var(--primary-color, #6f2da8);
    border-bottom: none;
    padding: 1.1rem 1.5rem;
    align-items: flex-start;
}
.configure-report-modal-header .modal-title {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--modal-header-text, #fff);
}
.configure-report-modal-subtitle {
    margin: .2rem 0 0;
    font-size: .8rem;
    color: var(--modal-header-text, #fff);
    opacity: .85;
}
.configure-report-modal .modal-body {
    padding: 1.5rem;
}
.configure-report-modal .modal-footer {
    padding: .9rem 1.5rem;
    border-top: 1px solid var(--report-border);
    background: #fff;
    gap: .5rem;
}
/* Rendered inside a SweetAlert (see renderExcelPreview in dynamic_report.js),
   not this page's own DOM tree at build time, so these have to be
   broad/global rather than scoped under .dynamic-report-builder. */
.preview-sheet-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
}
.preview-sheet-tab-btn {
    border: 1px solid var(--report-border);
    background: #fff;
    color: #1f2937;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    padding: .3rem .8rem;
}
.preview-sheet-tab-btn.active {
    border-color: var(--report-brand);
    color: var(--report-brand);
    background: var(--report-brand-soft);
}
.preview-sheet-scroll {
    max-height: 60vh;
    overflow: auto;
    border: 1px solid var(--report-border);
    border-radius: 8px;
    text-align: left;
}
.preview-sheet-scroll table {
    border-collapse: collapse;
    width: max-content;
    min-width: 100%;
    font-size: .78rem;
}
.preview-sheet-scroll table td,
.preview-sheet-scroll table th {
    border: 1px solid var(--report-border);
    padding: .35rem .6rem;
    white-space: nowrap;
}
.preview-sheet-scroll table tr:first-child {
    position: sticky;
    top: 0;
    background: var(--report-soft);
    font-weight: 600;
    z-index: 1;
}
@media (max-width: 992px) {
    .report-summary-grid,
    .field-group-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
@media (max-width: 576px) {
    .report-summary-grid,
    .field-group-grid,
    .field-list {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Self-registration link modal (admin_dashboard.html + the shared
   registration/_org_self_registration_settings_form.html partial it loads
   via fetch).

   No font-family/font-size rules here on purpose, unlike an earlier version
   of this block that forced Arial 14px: the real site-wide type is Poppins,
   set unconditionally via `* { font-family: "Poppins", sans-serif; }` near
   the top of this file, and every .btn is separately pinned (!important) to
   12px Poppins / 999px pill radius by the "Platform-wide button
   standardization" rule just below that same `*` rule. Forcing a different
   font/size here just fought both of those and made this modal look
   inconsistent with every other modal in the app (e.g. Add Assessment) -
   removing the override was the actual fix. That button-standardization
   rule explicitly leaves color/variant alone, though, which is a real gap
   for .btn-outline-warning/.btn-outline-danger here - kept those below.

   Labels/paragraph text here were also rendering a washed-out grey instead
   of near-black - couldn't pin down a single source for that one the way
   the Poppins rule explained the font (checked :root, client_theme.css,
   .modal-body, a generic label/.form-label rule - nothing conclusive), so
   this sets it explicitly to Bootstrap 5's own standard body-color instead
   of chasing it further. .text-muted intro copy is left alone - staying
   grey there is correct, it's the same class used for secondary text
   throughout the app. */
#selfRegistrationModal .modal-body .form-label,
#selfRegistrationModal .modal-body p:not(.text-muted) {
    color: #212529;
}
#selfRegistrationModal .modal-body .btn-primary {
    background-color: var(--primary-color, #6f2da8);
    border-color: var(--primary-color, #6f2da8);
    color: #fff;
}
#selfRegistrationModal .modal-body .btn-primary:hover,
#selfRegistrationModal .modal-body .btn-primary:focus {
    filter: brightness(0.92);
    background-color: var(--primary-color, #6f2da8);
    border-color: var(--primary-color, #6f2da8);
    color: #fff;
}
#selfRegistrationModal .modal-body .btn-outline-warning {
    background-color: transparent;
    border-color: #e0a800;
    color: #a67300;
}
#selfRegistrationModal .modal-body .btn-outline-warning:hover,
#selfRegistrationModal .modal-body .btn-outline-warning:focus {
    background-color: #e0a800;
    border-color: #e0a800;
    color: #fff;
}
#selfRegistrationModal .modal-body .btn-outline-danger {
    background-color: transparent;
    border-color: #dc3545;
    color: #dc3545;
}
#selfRegistrationModal .modal-body .btn-outline-danger:hover,
#selfRegistrationModal .modal-body .btn-outline-danger:focus {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #fff;
}
/* Shared horizontal tab treatment.  Keep tab bars flat and consistent across
   the platform while leaving vertical navigation/pills (including sidebars)
   untouched. */
.nav-tabs,
.nav[role="tablist"]:not(.flex-column) {
    align-items: stretch;
    border-top: 0 !important;
    border-bottom: 1px solid #d9d9d9 !important;
    border-radius: 0 !important;
    gap: 0;
    justify-content: flex-start;
    padding: 0 !important;
    background: transparent !important;
}

.nav-tabs > .nav-item,
.nav[role="tablist"]:not(.flex-column) > .nav-item {
    margin: 0 !important;
}

.nav-tabs .nav-link,
.nav[role="tablist"]:not(.flex-column) .nav-link {
    align-items: center;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 2px solid transparent !important;
    border-radius: 0 !important;
    color: #111827 !important;
    display: inline-flex;
    font-size: 14px;
    font-weight: 400;
    justify-content: center;
    line-height: 1.2;
    margin: 0 !important;
    min-height: 46px;
    padding: 10px 10px 8px !important;
    white-space: nowrap;
}

.nav-tabs .nav-link:hover,
.nav-tabs .nav-link:focus-visible,
.nav[role="tablist"]:not(.flex-column) .nav-link:hover,
.nav[role="tablist"]:not(.flex-column) .nav-link:focus-visible {
    color: var(--primary-color, #7627a8) !important;
}

.nav-tabs .nav-link.active,
.nav-tabs .nav-item.show .nav-link,
.nav[role="tablist"]:not(.flex-column) .nav-link.active,
.nav[role="tablist"]:not(.flex-column) .show > .nav-link {
    background: transparent !important;
    border-bottom-color: var(--primary-color, #7627a8) !important;
    color: #111827 !important;
}

@media (max-width: 576px) {
    .nav-tabs .nav-link,
    .nav[role="tablist"]:not(.flex-column) .nav-link {
        font-size: 13px;
        min-height: 42px;
        padding: 9px 8px 7px !important;
        white-space: normal;
    }
}
/* ==========================================================================
   "Add Course" / "Edit Course" modals — course_management programme view
   (#admin_home_add_course_modal) and view_course_curriculums (#editCourseModal).
   Both carry .course-metadata-modal so they share one treatment: a roomier
   dialog than the default programme-standard-modal, fields a step smaller than
   their labels, and a full-width thumbnail preview after a file is chosen.
   ========================================================================== */
.course-metadata-modal.programme-standard-modal .modal-dialog,
.course-metadata-modal.programme-modal-standard .modal-dialog {
  max-width: min(820px, calc(100vw - 1.5rem)) !important;
  width: min(820px, calc(100vw - 1.5rem)) !important;
}

/* On the standalone Add Course page the form partial is wrapped in its own
   card; inside the modal that nested card is just visual noise. */
.course-metadata-modal [data-add-course-mode] > .card {
  border: 0 !important;
  box-shadow: none !important;
  margin-bottom: 0 !important;
}
.course-metadata-modal [data-add-course-mode] > .card > .card-body {
  padding: 0 !important;
}

/* Labels stay at the standard modal size; the inputs the user types into sit
   one step smaller so the label outside always reads as the stronger text. */
.course-metadata-modal.programme-standard-modal .form-label,
.course-metadata-modal.programme-standard-modal label.form-label,
.course-metadata-modal.programme-standard-modal form label,
.course-metadata-modal.programme-modal-standard .form-label,
.course-metadata-modal.programme-modal-standard label.form-label,
.course-metadata-modal.programme-modal-standard form label {
  font-size: 0.82rem !important;
  font-weight: 600;
  color: #1f2937 !important;
}
.course-metadata-modal.programme-standard-modal .form-control,
.course-metadata-modal.programme-standard-modal .form-select,
.course-metadata-modal.programme-standard-modal select,
.course-metadata-modal.programme-standard-modal textarea,
.course-metadata-modal.programme-standard-modal .input-group-text,
.course-metadata-modal.programme-modal-standard .form-control,
.course-metadata-modal.programme-modal-standard .form-select,
.course-metadata-modal.programme-modal-standard select,
.course-metadata-modal.programme-modal-standard textarea,
.course-metadata-modal.programme-modal-standard .input-group-text {
  font-size: 0.72rem !important;
}

/* Keep the "Course Metadata" card heading distinct from the field labels. */
.course-metadata-modal.programme-standard-modal .card h6,
.course-metadata-modal.programme-standard-modal .border.rounded h6,
.course-metadata-modal.programme-modal-standard .card h6,
.course-metadata-modal.programme-modal-standard .border.rounded h6 {
  font-size: 0.8rem !important;
  font-weight: 700;
}

/* Final phone layout corrections for the shared AIC One shell. */
@media (max-width: 767.98px) {
  /* The shared shell uses .mx-4 on the content section. On a phone that
     margin is added to a full-width section, shifting the question card right
     and making its right edge overflow the viewport. */
  body.question-paper-mobile-layout .home-section.mx-4 {
    left: 0 !important;
    width: 100% !important;
    max-width: 100vw !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box;
  }

  body.question-paper-mobile-layout .question-paper-page {
    width: 100% !important;
    max-width: 100vw !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
    box-sizing: border-box;
  }

  body.question-paper-mobile-layout .question-paper-page > .card-body {
    width: 100% !important;
    max-width: 34rem;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.question-paper-mobile-layout .question-paper-page .question-row {
    width: 100%;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body.question-paper-mobile-layout .question-paper-page .question-row > .col {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body.question-paper-mobile-layout .question-paper-page .question-row .card {
    width: 100%;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  /* Keep the fixed header above the mobile bottom navigation so its drawers
     can cover the complete phone viewport. */
  .profile-menu.app-topnav {
    z-index: 1060 !important;
    width: 100vw !important;
    max-width: 100vw !important;
  }

  body.theme-aic1 .app-topnav__row {
    display: flex !important;
    flex-wrap: nowrap;
    min-width: 0;
    width: 100%;
  }

  body.theme-aic1 .app-topnav__brand {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
  }

  body.theme-aic1 .app-topnav__brand-copy {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }

  body.theme-aic1 .app-topnav__greeting {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
  }

  body.theme-aic1 .app-topnav__greeting-title,
  body.theme-aic1 .app-topnav__greeting-day,
  body.theme-aic1 .app-topnav__greeting-time {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  body.theme-aic1 .app-topnav__actions {
    flex: 0 0 auto;
    min-width: 0;
    gap: 0.2rem;
  }

  body.theme-aic1 .app-topnav__profile-dropdown {
    margin-left: 0;
    padding-left: 0.15rem;
    border-left: 0;
  }

  body.theme-aic1 .app-topnav__profile-name,
  body.theme-aic1 .app-topnav__profile-trigger .chevron {
    display: none !important;
  }

  body.theme-aic1 .app-topnav__profile-trigger {
    width: 34px;
    min-width: 34px;
    height: 34px;
    justify-content: center;
    padding: 0.1rem;
  }

  body.theme-aic1 .app-topnav__profile-trigger .app-topnav__avatar {
    width: 30px;
    height: 30px;
  }

  .app-topnav__actions > button.cart-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    min-width: 30px;
    height: 30px;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0 !important;
    line-height: 1;
  }

  .app-topnav__actions > button.cart-btn .bx-cart {
    margin: 0 !important;
    font-size: 0.95rem !important;
    line-height: 1;
  }

  .app-topnav__actions > button.cart-btn .badge {
    font-size: 0.5rem !important;
    line-height: 1;
    margin-left: 0.1rem;
    padding: 0.12rem 0.2rem;
  }

  /* The learner home already has a fixed hero and bottom navigation. Keep its
     content lane at the viewport width and prevent Bootstrap gutters from
     creating a second horizontal overflow. */
  body.learner-mobile-bootstrap-ui .mobile-learner-home,
  body.learner-mobile-bootstrap-ui .mobile-learner-section,
  body.learner-mobile-bootstrap-ui .mobile-course-list,
  body.learner-homepage-layout .mobile-learner-home,
  body.learner-homepage-layout .mobile-learner-section {
    width: 100% !important;
    max-width: 100vw !important;
    box-sizing: border-box;
  }

  body.learner-mobile-bootstrap-ui .mobile-course-card,
  body.learner-homepage-layout .mobile-course-card {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
  }

/* Course actions > Edit Course uses the compact metadata-only form from the
   programme cards screen. Give it a dedicated layout so it matches the
   designed two-column admin modal rather than the broader add-course shell. */
#course_action_modal.course-action-edit-modal .modal-dialog {
  max-width: min(740px, calc(100vw - 2rem)) !important;
  width: min(740px, calc(100vw - 2rem)) !important;
}

#course_action_modal.course-action-edit-modal,
#course_action_modal.course-action-edit-modal .modal-content,
#course_action_modal.course-action-edit-modal .modal-content * {
  font-family: "Poppins", sans-serif;
}

#course_action_modal.course-action-edit-modal .modal-content {
  font-size: 12px;
}

#course_action_modal.course-action-edit-modal .modal-content {
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.18);
}

#course_action_modal .course-action-edit-modal-header {
  padding: 1rem 1.3rem;
  background: #8d49a6 !important;
  border-bottom: 0;
}

#course_action_modal .course-action-edit-modal-header > .modal-title-standard {
  font-size: 1.05rem !important;
  font-weight: 700;
  letter-spacing: -0.01em;
}

#course_action_modal .course-action-edit-modal-header .btn-close {
  opacity: 1;
  transform: scale(1.05);
}

#course_action_modal .course-action-edit-modal-body {
  padding: 1.35rem 1.55rem 1rem;
  background: #ffffff;
}

#course_action_modal .course-action-edit-form,
#course_action_modal .course-action-edit-stack {
  width: 100%;
}

#course_action_modal .course-action-edit-stack {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

#course_action_modal .course-action-edit-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

#course_action_modal .course-action-edit-form .form-label {
  margin-bottom: 0;
  font-size: 12px !important;
  font-weight: 700;
  color: #0f172a !important;
}

#course_action_modal .course-action-edit-form .form-control {
  min-height: 1px;
  height: 2.05rem;
  padding: 0.36rem 0.7rem;
  border: 1px solid #cfd7e6;
  border-radius: 0.8rem;
  background: #ffffff;
  box-shadow: none;
  font-size: 12px !important;
  color: #1f2937;
}

#course_action_modal .course-action-edit-form .form-control:focus {
  border-color: #8d49a6;
  box-shadow: 0 0 0 0.18rem rgba(141, 73, 166, 0.12);
}

#course_action_modal .course-action-metadata-panel {
  padding: 0.95rem 1rem 0.4rem;
  border: 1px solid #edf1f7;
  border-radius: 1rem;
  background: #f8fafc;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

#course_action_modal .course-action-metadata-title {
  margin: 0 0 0.8rem;
  color: #0f172a;
  font-size: 0.96rem !important;
  font-weight: 700;
}

#course_action_modal .course-action-edit-modal-footer {
  padding: 0 1.55rem 1rem;
  gap: 0.5rem;
  background: #ffffff;
}

#course_action_modal .course-action-edit-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

#course_action_modal .course-action-edit-radio,
#course_action_modal .course-action-edit-option-row {
  align-items: center;
  display: flex;
  gap: 0.35rem;
}

#course_action_modal .course-action-edit-radio {
  color: #0f172a;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
}

#course_action_modal .course-action-edit-option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

#course_action_modal .course-action-edit-option-card {
  min-height: 76px;
  padding: 1rem;
  border-radius: 1rem;
  background: #f8fafc;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

#course_action_modal .course-action-edit-option-row {
  justify-content: space-between;
}

#course_action_modal .course-action-edit-option-row .form-check-input {
  width: 2rem !important;
  height: 1rem !important;
  margin: 0;
  cursor: pointer;
  background-color: #ffffff;
  border-color: #b8bdc5;
}

#course_action_modal .course-action-edit-option-row .form-check-input:checked {
  background-color: #1479ff;
  border-color: #1479ff;
}

#course_action_modal .course-action-edit-cpd-details {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.7rem;
}

#course_action_modal .course-action-edit-cpd-empty {
  color: #64748b;
  font-size: 11px;
  margin-top: 0.85rem;
  text-align: center;
}

#course_action_modal .course-action-edit-image-preview {
  border: 1px dashed rgba(143, 70, 155, 0.4);
  border-radius: 8px;
  margin-top: 0.5rem;
  padding: 0.5rem;
  background: #faf6fb;
}

#course_action_modal .course-action-edit-image-preview img {
  display: block;
  max-height: 120px;
  max-width: 100%;
  object-fit: contain;
}

#course_action_modal .course-action-edit-cancel-btn,
#course_action_modal .course-action-edit-save-btn {
  min-width: 0;
  padding: 0.38rem 0.8rem;
  border-radius: 0.55rem;
  font-size: 0.82rem;
  font-weight: 600;
}

#course_action_modal .course-action-edit-cancel-btn {
  border: 1px solid var(--secondary-color);
  background: var(--secondary-color);
  color: #ffffff;
}

#course_action_modal .course-action-edit-save-btn {
  border: 1px solid var(--secondary-color);
  background: var(--secondary-color);
  color: #ffffff;
}

#course_action_modal .course-action-edit-cancel-btn:hover,
#course_action_modal .course-action-edit-cancel-btn:focus-visible,
#course_action_modal .course-action-edit-save-btn:hover,
#course_action_modal .course-action-edit-save-btn:focus-visible {
  color: #ffffff;
  filter: brightness(0.97);
}

@media (max-width: 767.98px) {
  #course_action_modal.course-action-edit-modal .modal-dialog {
    max-width: calc(100vw - 1rem) !important;
    width: calc(100vw - 1rem) !important;
    margin: 0.5rem auto;
  }

  #course_action_modal .course-action-edit-modal-body {
    padding: 1rem;
  }

  #course_action_modal .course-action-metadata-panel {
    padding: 0.9rem 0.85rem 0.35rem;
  }

  #course_action_modal .course-action-edit-modal-footer {
    padding: 0 1rem 1rem;
  }

  #course_action_modal .course-action-edit-option-grid {
    grid-template-columns: 1fr;
  }
}

} /* end @media (max-width: 767.98px) opened at "Final phone layout corrections" -- see note below */

/* QA 18 Sep (Q44): the phone-only block above had lost its closing brace, so
   this Course Progress section (and everything after it, up to the stray
   brace near the end of the file) only applied below 768px. Desktop fell
   back to the older beige/serif "paper" treatment. The block is closed
   here and reopened after this section, so ONLY the Course Progress rules
   change scope; the rest keeps its current (phone-only) behaviour. */
/* -------------------------------------------------------------------------
   Course progress matrix: modern grouped-column UI.
   The JS strips utility columns and keeps only learner + lesson columns, so
   these overrides focus on that exact table structure.
   ------------------------------------------------------------------------- */
#view_learner_progress .modal-dialog {
  max-width: min(1340px, calc(100vw - 1rem));
}

#view_learner_progress .modal-content {
  background: #f6f7fc;
  background-image: none;
  border: 0;
  border-radius: 1.5rem;
  box-shadow: 0 26px 70px rgba(36, 27, 79, 0.16);
  color: #1b1f3b;
}

#view_learner_progress .course-progress-modal-header {
  gap: 2rem;
  padding: 1.8rem 2.75rem 1rem;
}

#view_learner_progress .course-progress-eyebrow {
  color: #7b7f9d;
  font-family: "Poppins", sans-serif;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
}

#view_learner_progress .course-progress-eyebrow::before {
  background: #6f3cc3;
}

#view_learner_progress .course-progress-modal-header .modal-title {
  color: #171b3a;
  font-family: "Poppins", sans-serif;
  font-size: 2rem;
  font-weight: 700;
}

#view_learner_progress .course-progress-subtitle {
  color: #6b7092;
  font-family: "Poppins", sans-serif;
  font-size: 1rem;
  font-style: normal;
}

#view_learner_progress .course-progress-stats > div {
  border-left-color: #e5e6f3;
}

#view_learner_progress .course-progress-stat-value {
  color: #171b3a;
  font-family: "Poppins", sans-serif;
  font-size: 2rem;
}

#view_learner_progress .course-progress-stats small {
  color: #6b7092;
  font-family: "Poppins", sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

#view_learner_progress .modal-header > .fa-times {
  color: #7d80a3;
}

#view_learner_progress .course-progress-filter-bar {
  align-items: center;
  margin: 0.85rem 2.75rem 1.3rem;
  padding: 1rem 1.35rem;
  background: #ffffff;
  border: 1px solid #e5e6f3;
  border-radius: 1.35rem;
  box-shadow: 0 10px 30px rgba(68, 52, 134, 0.06);
}

#view_learner_progress .course-progress-field label {
  color: #7b7f9d;
  font-family: "Poppins", sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

#view_learner_progress .course-progress-filter-bar .form-control {
  height: 2.8rem;
  background: #ffffff;
  border: 1px solid #dfe2f1;
  border-radius: 0.9rem;
  color: #262b49;
  font-size: 0.9rem;
}

#view_learner_progress .course-progress-filter-bar .form-control:focus {
  border-color: #8d7ff0;
  box-shadow: 0 0 0 0.18rem rgba(111, 60, 195, 0.12);
}

#view_learner_progress .course-progress-view-toggle {
  align-self: stretch;
  height: auto;
  padding: 0.2rem;
  background: #efedf8;
  border: 0;
  border-radius: 1rem;
  box-shadow: inset 0 0 0 1px rgba(111, 60, 195, 0.05);
}

#view_learner_progress .course-progress-toggle-btn {
  min-width: 8.5rem;
  min-height: 3rem;
  border-radius: 0.85rem;
  color: #6d6f8d;
  font-family: "Poppins", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

#view_learner_progress .course-progress-toggle-btn + .course-progress-toggle-btn {
  border-left: 0;
}

#view_learner_progress .course-progress-toggle-btn.active {
  background: #ffffff;
  color: #371b88;
  box-shadow: 0 4px 14px rgba(55, 27, 136, 0.12);
}

#view_learner_progress .course-progress-legend {
  gap: 1.6rem;
  margin: 0 2.75rem 1.2rem;
  color: #6d708c;
  font-size: 0.86rem;
}

#view_learner_progress .status-swatch {
  border-radius: 0.25rem;
}

#view_learner_progress .status-done { background: #157a4d; }
#view_learner_progress .status-progress { background: #c48109; }
#view_learner_progress .status-stalled { background: #ac2f66; }
#view_learner_progress .status-not-started { background: #b6b8ca; }

#view_learner_progress .tab-content {
  padding: 0 2.75rem 2rem;
}

#view_learner_progress .course_progress_matrix,
#view_learner_progress .course_progress_matrix_mentors {
  max-height: 520px;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  background: #ffffff;
  border: 1px solid #e4e6f2;
  border-radius: 1.55rem;
}

#view_learner_progress .course_progress_matrix .dataTables_wrapper,
#view_learner_progress .course_progress_matrix_mentors .dataTables_wrapper {
  padding: 0;
}

#view_learner_progress .course_progress_matrix table,
#view_learner_progress .course_progress_matrix_mentors table {
  min-width: 1080px;
  width: max-content !important;
  background: #ffffff;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: fixed !important;
}

#view_learner_progress .course_progress_matrix thead tr:nth-child(2) th,
#view_learner_progress .course_progress_matrix tbody td,
#view_learner_progress .course_progress_matrix tbody th,
#view_learner_progress .course_progress_matrix_mentors thead tr:nth-child(2) th,
#view_learner_progress .course_progress_matrix_mentors tbody td,
#view_learner_progress .course_progress_matrix_mentors tbody th {
  width: 21rem;
  min-width: 21rem;
  max-width: 21rem;
}

#view_learner_progress .course_progress_matrix thead tr:nth-child(2) th:first-child,
#view_learner_progress .course_progress_matrix tbody th:first-child,
#view_learner_progress .course_progress_matrix_mentors thead tr:nth-child(2) th:first-child,
#view_learner_progress .course_progress_matrix_mentors tbody th:first-child {
  width: 17rem;
  min-width: 17rem;
  max-width: 17rem;
}

#view_learner_progress .course_progress_matrix thead th,
#view_learner_progress .course_progress_matrix_mentors thead th {
  padding: 0.95rem 1.15rem;
  background: #ffffff !important;
  color: #1d2143 !important;
  border-bottom: 1px solid #e5e7f2 !important;
  font-size: 0.84rem;
  text-align: left;
  vertical-align: middle;
}

#view_learner_progress .course_progress_matrix thead tr:first-child th,
#view_learner_progress .course_progress_matrix_mentors thead tr:first-child th {
  background: #f7f5fd !important;
  color: #3f248f !important;
  font-family: "Poppins", sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

#view_learner_progress .course_progress_matrix thead tr:first-child th.progress-header-corner,
#view_learner_progress .course_progress_matrix_mentors thead tr:first-child th.progress-header-corner {
  background: #ffffff !important;
  border-right: 1px solid #e5e7f2 !important;
  border-top-left-radius: 1.55rem;
}

#view_learner_progress .course_progress_matrix thead tr:first-child th:last-child,
#view_learner_progress .course_progress_matrix_mentors thead tr:first-child th:last-child {
  border-top-right-radius: 1.55rem;
}

#view_learner_progress .progress-module-header {
  font-size: 0.76rem !important;
  font-weight: 700 !important;
}

#view_learner_progress .progress-learner-column-head {
  min-width: 17rem;
  width: 17rem;
  color: #1d2143 !important;
  font-family: "Poppins", sans-serif;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
}

#view_learner_progress .progress-content-column-head {
  min-width: 21rem;
}

#view_learner_progress .progress-overall-column-head {
  color: #1d2143 !important;
  font-family: "Poppins", sans-serif;
  font-size: 0.92rem !important;
  font-weight: 700 !important;
}

#view_learner_progress .progress-lesson-title {
  color: #13183a;
  font-family: "Poppins", sans-serif;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.4;
}

#view_learner_progress .progress-lesson-code {
  margin-top: 0.3rem;
  color: #7f84a3;
  font-family: "Poppins", sans-serif;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

#view_learner_progress .course_progress_matrix tbody td,
#view_learner_progress .course_progress_matrix_mentors tbody td,
#view_learner_progress .course_progress_matrix tbody th,
#view_learner_progress .course_progress_matrix_mentors tbody th {
  padding: 1.15rem 1.15rem;
  background: #ffffff;
  color: #1d2143;
  border-bottom: 1px solid #eceef6;
  font-size: 0.86rem;
  vertical-align: middle;
}

#view_learner_progress .course_progress_matrix tbody tr:hover td,
#view_learner_progress .course_progress_matrix tbody tr:hover th,
#view_learner_progress .course_progress_matrix_mentors tbody tr:hover td,
#view_learner_progress .course_progress_matrix_mentors tbody tr:hover th {
  background: #fbfaff;
}

#view_learner_progress .course_progress_matrix tbody th,
#view_learner_progress .course_progress_matrix_mentors tbody th {
  min-width: 17rem;
  width: 17rem;
  border-right: 1px solid #eceef6;
}

#view_learner_progress .progress-learner-cell {
  gap: 1rem;
}

#view_learner_progress .progress-avatar {
  width: 2.65rem;
  height: 2.65rem;
  background: #efe7ff;
  color: #4a2d9d;
  font-family: "Poppins", sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
}

#view_learner_progress .progress-avatar-1,
#view_learner_progress .progress-avatar-2,
#view_learner_progress .progress-avatar-3,
#view_learner_progress .progress-avatar-4 {
  background: #efe7ff;
}

#view_learner_progress .progress-learner-name {
  color: #12173b;
  font-family: "Poppins", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
}

#view_learner_progress .progress-learner-activity {
  color: #6f7497;
  font-size: 0.72rem;
}

#view_learner_progress .progress-overall-cell {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

#view_learner_progress .progress-bar-track {
  position: relative;
  flex: 1 1 auto;
  height: 0.5rem;
  border-radius: 999px;
  background: #eceef6;
  overflow: hidden;
}

#view_learner_progress .progress-bar-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: #514ca9;
}

/* Tiered by completion percentage so the bar reads the same way as the
   Done/In progress/Stalled/Not started legend at a glance. */
#view_learner_progress .progress-bar-fill-done { background: #157a4d; }
#view_learner_progress .progress-bar-fill-progress { background: #c48109; }
#view_learner_progress .progress-bar-fill-stalled { background: #ac2f66; }
#view_learner_progress .progress-bar-fill-neutral { background: #b6b8ca; }

#view_learner_progress .progress-bar-value {
  flex: 0 0 auto;
  color: #1d2143;
  font-family: "Poppins", sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
}

#view_learner_progress .progress-bar-value-done { color: #157a4d; }
#view_learner_progress .progress-bar-value-progress { color: #c48109; }
#view_learner_progress .progress-bar-value-stalled { color: #ac2f66; }
#view_learner_progress .progress-bar-value-neutral { color: #7f84a3; }

#view_learner_progress .status-pill {
  padding: 0.42rem 0.95rem;
  border-radius: 0.8rem;
  font-family: "Poppins", sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
}

#view_learner_progress .status-pill-done {
  background: #e6f6ee;
  color: #14794c;
}

#view_learner_progress .status-pill-progress {
  background: #fff0d8;
  color: #bf7d0d;
}

#view_learner_progress .status-pill-stalled {
  background: #fde5ef;
  color: #ac2f66;
}

#view_learner_progress .status-pill-empty {
  padding: 0;
  background: transparent;
  color: #b3b6c8;
}

#view_learner_progress .dataTables_info,
#view_learner_progress .dataTables_paginate,
#view_learner_progress .dataTables_length,
#view_learner_progress .dataTables_filter {
  display: none !important;
}

@media (max-width: 767.98px) {
  #view_learner_progress .course-progress-modal-header {
    padding: 1.25rem 1rem 0.75rem;
  }

  #view_learner_progress .course-progress-filter-bar {
    margin-left: 1rem;
    margin-right: 1rem;
    padding: 0.9rem;
  }

  #view_learner_progress .course-progress-legend {
    margin-left: 1rem;
    margin-right: 1rem;
  }

  #view_learner_progress .tab-content {
    padding: 0 1rem 1.25rem;
  }

  #view_learner_progress .course-progress-view-toggle {
    width: 100%;
  }

  #view_learner_progress .course-progress-toggle-btn {
    flex: 1 1 50%;
    min-width: 0;
  }
}

/* Reopened: see the QA 18 Sep (Q44) note above the Course Progress section. */
@media (max-width: 767.98px) {


/* -------------------------------------------------------------------------
   Standard system table

   Most management/list tables use Bootstrap's .table.table-striped pattern.
   Keep their visual language consistent: purple heading row, generous cell
   spacing, quiet zebra rows, and predictable action alignment.
   ------------------------------------------------------------------------- */
.table.table-striped {
  --bs-table-striped-bg: #f1f1f1;
  --bs-table-striped-color: #111827;
  --bs-table-hover-bg: #ececf0;
  --bs-table-hover-color: #111827;
  border-collapse: separate;
  border-spacing: 0;
  color: #111827;
  font-family: "Poppins", sans-serif;
}

.table.table-striped > thead > tr > th {
  background-color: var(--primary-color, #8f469b) !important;
  border: 0 !important;
  color: #fff !important;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.25;
  padding: 0.8rem 0.85rem;
  white-space: nowrap;
  vertical-align: middle;
}

.table.table-striped > tbody > tr > * {
  border: 0 !important;
  font-size: 0.88rem;
  line-height: 1.35;
  padding: 0.8rem 0.85rem;
  vertical-align: middle;
}

.table.table-striped > tbody > tr:nth-of-type(odd) > * {
  background-color: #f1f1f1 !important;
}

.table.table-striped > tbody > tr:nth-of-type(even) > * {
  background-color: #fff !important;
}

.table.table-striped > tbody > tr:hover > * {
  background-color: #ececf0 !important;
}

.table.table-striped > tbody > tr > td:first-child {
  font-weight: 600;
}

.table.table-striped > tbody > tr > td .btn {
  border-radius: 0.55rem;
  font-weight: 600;
  white-space: nowrap;
}

/* Standard curriculum actions. These controls are rendered by both the
   legacy course curriculum page and the newer subject curriculum page, so
   keep their visual treatment in one shared rule. */
.course-view-curriculum-page .teacher-curriculum-hero .btn-outline-primary,
.course-view-curriculum-page .curriculum-manage-button,
.teacher-subject-curriculum-page .curriculum-action-btn--primary {
  align-items: center;
  background: var(--btn-outline-primary-bg, var(--primary-color)) !important;
  border: 0 !important;
  border-radius: 0.375rem !important;
  color: var(--btn-outline-primary-text, #fff) !important;
  display: inline-flex;
  font-size: 0.72rem !important;
  font-weight: 700;
  justify-content: center;
  line-height: 1.2;
  min-height: 2rem;
  padding: 0.4rem 0.85rem !important;
  white-space: nowrap;
}

.course-view-curriculum-page .teacher-curriculum-hero .btn-outline-primary:hover,
.course-view-curriculum-page .teacher-curriculum-hero .btn-outline-primary:focus-visible,
.course-view-curriculum-page .curriculum-manage-button:hover,
.course-view-curriculum-page .curriculum-manage-button:focus-visible,
.teacher-subject-curriculum-page .curriculum-action-btn--primary:hover,
.teacher-subject-curriculum-page .curriculum-action-btn--primary:focus-visible {
  background: var(--btn-outline-primary-hover-bg, var(--secondary-color)) !important;
  border-color: transparent !important;
  color: var(--btn-outline-primary-hover-text, #fff) !important;
}

/* ==========================================================================
   admin_operation/teacher_course_curriculum  +  content_creator/curriculum_content
   --------------------------------------------------------------------------
   Every action button on these two pages -- card actions, hero/header
   buttons, toolbars AND the modals -- renders as the house-standard
   btn-outline-primary btn-sm text-xxs, with NO hover colour shift and no
   icons. Delete (danger) / success buttons keep their own colours; the
   modal close (x), the .nav-link term tabs and .btn-link text buttons are
   left alone.

   Scoped by the page container class .teacher-subject-curriculum-page (used
   by both templates) plus body.curriculum-content-layout, because
   curriculum_content's modals render outside that container. Placed after
   the shared .curriculum-action-* rules above; the long :not() chain keeps
   the specificity above every earlier `!important` :hover rule so the base
   declaration also wins on hover/focus/active (helped by transition:none).
   ========================================================================== */
.teacher-subject-curriculum-page .btn:not(.btn-close):not(.nav-link):not(.btn-link):not(.btn-danger):not(.btn-outline-danger):not(.btn-success):not(.btn-outline-success):not(.btn-gray):not(.mobile-week-pill):not(.btn-learner-progress):not(.schedule-duration-option):not(.mobile-back-btn),
body.curriculum-content-layout .btn:not(.btn-close):not(.nav-link):not(.btn-link):not(.btn-danger):not(.btn-outline-danger):not(.btn-success):not(.btn-outline-success):not(.btn-gray):not(.mobile-week-pill):not(.btn-learner-progress):not(.schedule-duration-option):not(.mobile-back-btn),
#curriculum-assessments-modal .btn:not(.btn-close):not(.btn-danger):not(.btn-outline-danger):not(.btn-success) {
  background: var(--btn-outline-primary-bg, var(--secondary-color, #494c9e)) !important;
  background-image: none !important;
  border: 1px solid var(--btn-outline-primary-border, var(--primary-color, #8f469b)) !important;
  color: var(--btn-outline-primary-text, #fff) !important;
  box-shadow: none !important;
  border-radius: 0.375rem !important;
  font-size: 10px !important;
  font-weight: 600 !important;
  line-height: 1.4 !important;
  padding: 0.25rem 0.5rem !important;
  min-height: 0 !important;
  min-width: 0 !important;
  text-transform: none !important;
  filter: none !important;
  transition: none !important;
}

/* No icons inside those buttons (the class stays in the markup, the glyph
   just doesn't render). Icon-only buttons get a text label in the markup. */
.teacher-subject-curriculum-page .btn:not(.btn-close) > i,
.teacher-subject-curriculum-page .btn:not(.btn-close) > svg,
body.curriculum-content-layout .btn:not(.btn-close) > i,
body.curriculum-content-layout .btn:not(.btn-close) > svg {
  display: none !important;
}

.teacher-subject-curriculum-page .curriculum-lock-chip,
.course-view-curriculum-page .curriculum-lock-chip {
  align-items: center;
  background: transparent !important;
  border: 0 !important;
  border-radius: 999px !important;
  color: var(--primary-color, var(--btn-color, #6f42c1)) !important;
  cursor: default;
  display: inline-flex;
  font-size: 0.72rem !important;
  font-weight: 700;
  justify-content: center;
  line-height: 1.2;
  min-height: 0;
  min-width: 0 !important;
  padding: 0.15rem 0 !important;
  pointer-events: none;
  white-space: nowrap;
}

/* job_role_user_task.html ("Learner Practicals"): kill the gap between the
   purple hero banner, the Tasks/Code Challenges tabs, and the content card
   below them. Placed last and double-scoped to body.learner-practicals-page
   so it outranks (and survives future edits to) the shared
   .learner-assessments-page spacing rules earlier in this file, at every
   breakpoint. */
body.learner-practicals-page.learner-practicals-page .learner-assessments-desktop-hero,
body.learner-practicals-page.learner-practicals-page .learner-assessments-desktop-hero .teacher-curriculum-hero {
  margin-bottom: 0 !important;
}
body.learner-practicals-page.learner-practicals-page .learner-assessments-tabs {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}
body.learner-practicals-page.learner-practicals-page .tab-content {
  margin-top: 0 !important;
  padding-top: 0 !important;
}
body.learner-practicals-page.learner-practicals-page .tab-content > .tab-pane > .card {
  margin-top: 0 !important;
}
body.org-self-registration-standalone-page .input-group > .btn:last-child {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/* Keep duplicate review focused on the records that need a decision. */
.programme-content-ui.programme-duplicate-review-active #programme-people-table thead,
.programme-content-ui.programme-duplicate-review-active #programme-people-table tbody > tr:not(.programme-duplicate-detail-row) {
  display: none !important;
}

.programme-content-ui.programme-duplicate-review-active #programme-people-table tbody > tr.programme-duplicate-detail-row {
  display: table-row !important;
}

.programme-content-ui.programme-duplicate-review-active .programme-pagination[data-person-type="learners"] {
  display: none !important;
}

/* Keep assessment action controls reachable when the table is wider than its card.
   Desktop/tablet only: below 768px, assessment_management.css turns each row into
   a stacked label/value card instead of a table, and this unguarded min-width used
   to force that card to stay 1100px wide -- pushing every value off the edge of the
   phone screen so seeing them required scrolling the "card" sideways. */
@media (min-width: 768px) {
  #management_assessment_app [id$="_table_wrapper"] .dataTables_scroll,
  #management_assessment_app [id$="_table_wrapper"] .dataTables_scrollBody {
    max-width: 100%;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
  }

  /* DataTables' scrollX mode (used here so the row-action buttons stay
     reachable on narrow cards) wraps the header/body in
     dataTables_scrollHeadInner / dataTables_scrollBody, each sized by JS at
     init time. With autoWidth:false these regularly end up narrower than
     the card, leaving a blank gap collecting on one side instead of the
     table filling the available width -- force both the header/body inner
     tables to fill their wrapper. */
  #management_assessment_app [id$="_table_wrapper"] .dataTables_scrollHeadInner,
  #management_assessment_app [id$="_table_wrapper"] .dataTables_scrollHeadInner table,
  #management_assessment_app [id$="_table_wrapper"] .dataTables_scrollBody table {
    width: 100% !important;
  }

  #management_assessment_app [id$="_table_wrapper"] table.dataTable {
    min-width: 1100px;
  }

  #management_assessment_app [id$="_table_wrapper"] table.dataTable th:last-child,
  #management_assessment_app [id$="_table_wrapper"] table.dataTable td:last-child {
    min-width: 170px;
    white-space: nowrap;
  }
}

/* Keep the Add Curriculum actions visually consistent despite inherited utility classes. */
#add_curriculum_popup .btn {
  font-weight: 600 !important;
}

/* Use one readable type scale across every assessment/course assignment modal.
   0.95rem is the site's .text-xs size; the earlier 0.84rem read as tiny in
   these extra-wide (modal-xl) dialogs, and missed the footer note, the
   dropdown options and the title, so sizes within one modal disagreed. */
#course_assign_programme,
.assessment-assign-modal,
#assign_schedule_popup,
#assign_skills_popup {
  font-size: 0.95rem;
}

#course_assign_programme .modal-title,
.assessment-assign-modal .modal-title,
#assign_schedule_popup .modal-title,
#assign_skills_popup .modal-title {
  font-size: 1.05rem !important;
}

#course_assign_programme .text-xs,
#course_assign_programme .text-xxs,
#course_assign_programme .labels,
#course_assign_programme label,
#course_assign_programme .btn,
#course_assign_programme .form-control,
#course_assign_programme .form-select,
#course_assign_programme th,
#course_assign_programme td,
.assessment-assign-modal .text-xs,
.assessment-assign-modal .text-xxs,
.assessment-assign-modal .labels,
.assessment-assign-modal label,
.assessment-assign-modal .btn,
.assessment-assign-modal .form-control,
.assessment-assign-modal .form-select,
.assessment-assign-modal th,
.assessment-assign-modal td,
#assign_schedule_popup .text-xs,
#assign_schedule_popup .text-xxs,
#assign_schedule_popup .labels,
#assign_schedule_popup label,
#assign_schedule_popup .btn,
#assign_schedule_popup .form-control,
#assign_schedule_popup .form-select,
#assign_schedule_popup th,
#assign_schedule_popup td,
#assign_skills_popup .text-xs,
#assign_skills_popup .text-xxs,
#assign_skills_popup .labels,
#assign_skills_popup label,
#assign_skills_popup .btn,
#assign_skills_popup .form-control,
#assign_skills_popup .form-select,
#assign_skills_popup th,
#assign_skills_popup td,
#course_assign_programme small,
#course_assign_programme option,
.assessment-assign-modal small,
.assessment-assign-modal option,
#assign_schedule_popup small,
#assign_schedule_popup option,
#assign_skills_popup small,
#assign_skills_popup option {
  font-size: 0.95rem !important;
  line-height: 1.4;
}

/* Fit assignment metadata and automation controls in the modal without a horizontal scrollbar. */
.assessment-assign-modal .assign-assessment-table-shell .table-responsive,
.assessment-assign-modal .assign-assessment-table-shell .dataTables_scrollBody {
  overflow-x: hidden !important;
}

.assessment-assign-modal .assign-assessment-table-shell table {
  min-width: 100% !important;
  width: 100% !important;
  table-layout: fixed;
}

.assessment-assign-modal .assign-assessment-table-shell table th,
.assessment-assign-modal .assign-assessment-table-shell table td {
  white-space: normal !important;
  overflow-wrap: anywhere;
  vertical-align: middle;
}

.assessment-assign-modal .assign-assessment-table-shell table th:nth-child(1),
.assessment-assign-modal .assign-assessment-table-shell table td:nth-child(1) {
  width: 18%;
}

.assessment-assign-modal .assign-assessment-table-shell table th:nth-child(2),
.assessment-assign-modal .assign-assessment-table-shell table td:nth-child(2) {
  width: 14%;
}

/* Start Date / End Date hold a native datetime-local input, which has a wider
   intrinsic minimum size than most cell content - too narrow here and it
   overflows into the Action column next to it instead of shrinking. */
.assessment-assign-modal .assign-assessment-table-shell table th:nth-child(3),
.assessment-assign-modal .assign-assessment-table-shell table td:nth-child(3),
.assessment-assign-modal .assign-assessment-table-shell table th:nth-child(4),
.assessment-assign-modal .assign-assessment-table-shell table td:nth-child(4) {
  width: 18%;
}

.assessment-assign-modal .assign-assessment-table-shell table th:nth-child(5),
.assessment-assign-modal .assign-assessment-table-shell table td:nth-child(5) {
  width: 14%;
}

.assessment-assign-modal .assign-assessment-table-shell table th:nth-child(6),
.assessment-assign-modal .assign-assessment-table-shell table td:nth-child(6) {
  width: 18%;
}

.assessment-assign-modal .assign-assessment-table-shell .assign_switch,
.assessment-assign-modal .assign-assessment-table-shell .form-check {
  flex-wrap: wrap;
  white-space: normal;
  margin-right: 0 !important;
}

/* Belt-and-suspenders alongside the widened Start/End Date columns above:
   never let the native datetime-local control size itself past its cell. */
.assessment-assign-modal .assign-assessment-table-shell input[type="datetime-local"] {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Keep curriculum actions on the ORCAA palette after the shared Bootstrap
   styles load. The controls intentionally remain text-only. */
.teacher-subject-curriculum-page .curriculum-action-btn--primary,
.teacher-subject-curriculum-page .curriculum-action-btn--secondary {
  background: var(--primary-color) !important;
  border-color: var(--primary-color) !important;
  color: #fff !important;
}

.teacher-subject-curriculum-page .curriculum-action-btn--primary:hover,
.teacher-subject-curriculum-page .curriculum-action-btn--primary:focus-visible,
.teacher-subject-curriculum-page .curriculum-action-btn--secondary:hover,
.teacher-subject-curriculum-page .curriculum-action-btn--secondary:focus-visible {
  background: var(--secondary-color) !important;
  border-color: var(--secondary-color) !important;
  color: #fff !important;
}

/* Keep assessment assignment modals compact instead of stretching to the viewport. */
.assessment-assign-modal .modal-dialog {
  height: auto !important;
  max-height: calc(100dvh - 2rem) !important;
}

.assessment-assign-modal .modal-content {
  max-height: calc(100dvh - 2rem) !important;
}

.assessment-assign-modal .modal-content > .modal-body {
  display: block !important;
  max-height: calc(100dvh - 8rem) !important;
  overflow-y: scroll !important;
  overflow-x: hidden !important;
  padding: 0.75rem 1rem !important;
  scrollbar-gutter: stable;
}

.assessment-assign-modal .modal-content > .modal-body > .card-body {
  padding: 0 !important;
}

.assessment-assign-modal .modal-content > .modal-body > .card-body .mb-3.col.mt-3 {
  margin-top: 0 !important;
}

.assessment-assign-modal .assign-assessment-table-shell {
  margin-top: 0 !important;
}

.assessment-assign-modal .modal-content > .modal-body::-webkit-scrollbar {
  width: 10px;
}

.assessment-assign-modal .modal-content > .modal-body::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.assessment-assign-modal .modal-content > .modal-body::-webkit-scrollbar-thumb {
  background: var(--primary-color, #7627a8);
  border-radius: 999px;
}

.assessment-assign-modal .assign-assessment-table-shell,
.assessment-assign-modal .assign-assessment-table-shell > .card-body,
.assessment-assign-modal .assign-assessment-table-shell > .col,
.assessment-assign-modal .assign-assessment-table-shell > .table-responsive {
  flex: 0 0 auto !important;
}

.assessment-assign-modal .assign-assessment-table-shell .table-responsive {
  max-height: none !important;
  overflow: auto !important;
}

/* Organisation self-registration form: compact reference-style card layout. */
#selfRegistrationModal .modal-dialog {
  width: min(560px, calc(100vw - 2rem));
  max-width: 560px;
}

#selfRegistrationModal .modal-content {
  overflow: hidden;
  border: 1px solid #dfe3ea;
  border-radius: 0.85rem;
  background: #fff;
  box-shadow: 0 14px 36px rgba(16, 42, 67, 0.16);
}

#selfRegistrationModal .modal-header {
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 0;
  /* Purple comes from .bg-outline-primary on the header element itself now -
     this used to hardcode white here, which (being an ID selector) beat that
     class regardless of what was added to the markup. */
}

#selfRegistrationModal .modal-title {
  font-size: 1.3rem;
  font-weight: 700;
  /* Color comes from .text-white on the markup now, for the same reason. */
}

#selfRegistrationModal .modal-header .btn-close {
  margin: 0 0 0 auto;
  opacity: 1;
}

#selfRegistrationModal .modal-body {
  padding: 0.55rem 2.25rem 1.75rem;
  color: #102a43;
}

.org-self-reg-form,
.org-self-reg-fields {
  width: 100%;
}

.org-self-reg-intro {
  margin: 0 0 1.65rem;
  color: #52606d;
  font-size: 0.78rem;
  line-height: 1.55;
}

.org-self-reg-intro strong {
  color: #102a43;
  font-weight: 700;
}

.org-self-reg-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.org-self-reg-grid-top {
  /* The two fields inside already carry their own margin-bottom (see
     .org-self-reg-field below) - grid items don't collapse margins with
     their container, so adding one here on top of that just doubled the
     gap before the next field instead of matching the rest of the form. */
  margin-bottom: 0;
}

.org-self-reg-field {
  min-width: 0;
  margin-bottom: 1.35rem;
}

.org-self-reg-field .form-label {
  display: block;
  margin-bottom: 0.42rem;
  color: #102a43 !important;
  font-size: 0.75rem !important;
  font-weight: 600;
  line-height: 1.25;
}

.org-self-reg-field .form-label span {
  color: #52606d;
  font-weight: 400;
}

.org-self-reg-field .form-control,
.org-self-reg-field .form-select {
  min-height: 2.55rem;
  border: 1px solid #d7dce5;
  border-radius: 0.55rem;
  background-color: #fcfcfd;
  color: #102a43;
  font-size: 0.78rem !important;
  line-height: 1.35;
  box-shadow: none;
}

.org-self-reg-field .form-control:focus,
.org-self-reg-field .form-select:focus {
  border-color: var(--primary-color, #7627a8);
  box-shadow: 0 0 0 0.18rem rgba(118, 39, 168, 0.14);
}

.org-self-reg-field .form-select:disabled {
  background-color: #eef0f3;
  color: #8a94a6;
  border-color: #e1e5eb;
  cursor: not-allowed;
}

.org-self-reg-field textarea.form-control {
  min-height: 5rem;
  resize: vertical;
}

.org-self-reg-help {
  display: block;
  margin-top: 0.35rem;
  color: #52606d;
  font-size: 0.7rem;
  line-height: 1.35;
}

.org-self-reg-status {
  display: flex;
  align-items: center;
  gap: 0.38rem;
  margin: 0.1rem 0 1rem;
  color: #52606d;
  font-size: 0.72rem;
}

.org-self-reg-status-dot {
  width: 0.38rem;
  height: 0.38rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #b7bec9;
}

.org-self-reg-status-dot.is-enabled {
  background: #198754;
}

.org-self-reg-status.is-enabled {
  color: #198754;
}

.org-self-reg-share-link {
  margin: 1.1rem 0 1rem;
  padding: 0.9rem 1rem;
  border: 1px solid color-mix(in srgb, var(--primary-color, #7627a8) 22%, #d7dce5 78%);
  border-radius: 0.6rem;
  background: color-mix(in srgb, var(--primary-color, #7627a8) 6%, #fff 94%);
}

.org-self-reg-share-link-title {
  margin: 0 0 0.55rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--primary-color, #7627a8);
}

.org-self-reg-share-link .input-group .btn {
  min-width: 4.25rem;
  border-color: var(--primary-color, #7627a8);
  color: var(--primary-color, #7627a8);
}

.org-self-reg-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.org-self-reg-actions-secondary {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.org-self-reg-form .btn,
.org-self-reg-submit {
  min-height: 2.55rem;
  border-radius: 0.55rem !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
}

/* Scoped to this form (not a modal ID) so it holds regardless of whether the
   partial is rendered inside the dashboard modal or the standalone page. */
.org-self-reg-form .btn-primary {
  background-color: var(--primary-color, #36006f);
  border-color: var(--primary-color, #36006f);
}

.org-self-reg-form .btn-primary:hover,
.org-self-reg-form .btn-primary:focus {
  filter: brightness(0.92);
  background-color: var(--primary-color, #36006f);
  border-color: var(--primary-color, #36006f);
}

/* Rotate/Disable use ORCAA purple like every other button on this form -
   !important because something in this stylesheet's cascade (not yet
   isolated) was forcing Bootstrap's default filled red/plain-text look
   through the earlier non-!important version of this rule. */
.org-self-reg-form .btn-outline-warning,
.org-self-reg-form .btn-outline-danger {
  background-color: transparent !important;
  border-color: var(--primary-color, #36006f) !important;
  color: var(--primary-color, #36006f) !important;
}
.org-self-reg-form .btn-outline-warning:hover,
.org-self-reg-form .btn-outline-warning:focus,
.org-self-reg-form .btn-outline-danger:hover,
.org-self-reg-form .btn-outline-danger:focus {
  background-color: var(--primary-color, #36006f) !important;
  border-color: var(--primary-color, #36006f) !important;
  color: #fff !important;
}

.org-self-reg-submit {
  width: 100%;
}

.org-self-reg-empty {
  margin: 0;
  color: #52606d;
  font-size: 0.78rem;
}

.org-self-reg-error {
  margin-bottom: 1rem;
  font-size: 0.75rem;
}

body.org-self-registration-standalone-page .self-reg-card {
  max-width: 560px;
  margin: 2rem auto;
  padding: 2rem 2.25rem;
  border: 1px solid #dfe3ea;
  border-radius: 0.85rem;
  box-shadow: 0 14px 36px rgba(16, 42, 67, 0.1);
}

body.org-self-registration-standalone-page .self-reg-card > h4 {
  margin-bottom: 0.35rem !important;
  color: #102a43;
  font-size: 1.3rem;
  font-weight: 700;
}

@media (max-width: 576px) {
  #selfRegistrationModal .modal-dialog {
    width: calc(100vw - 1rem);
  }

  #selfRegistrationModal .modal-header,
  #selfRegistrationModal .modal-body,
  body.org-self-registration-standalone-page .self-reg-card {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }

  .org-self-reg-grid,
  .org-self-reg-actions {
    grid-template-columns: 1fr;
  }
}

/* Final mobile shell override: keep the active drawer above every fixed control. */
@media (max-width: 767.98px) {
  .profile-menu.app-topnav {
    z-index: 1060 !important;
  }

  body.theme-aic1 .app-topnav__row {
    display: flex !important;
    grid-template-columns: none !important;
  }

  body.theme-aic1 .app-topnav__profile-name,
  body.theme-aic1 .app-topnav__profile-trigger .chevron {
    display: none !important;
  }

  body.theme-aic1 .app-topnav__profile-dropdown {
    margin-left: 0 !important;
    padding-left: 0.15rem !important;
    border-left: 0 !important;
  }

  .app-topnav__actions > button.cart-btn {
    width: 30px !important;
    min-width: 30px !important;
    height: 30px !important;
    margin: 0 !important;
    padding: 0 !important;
    font-size: 0 !important;
  }

  .app-topnav__actions > button.cart-btn .bx-cart {
    font-size: 0.95rem !important;
  }
}
}

/* Thumbnail preview: fill the width of the upload area so the chosen image is
   clearly visible instead of a tiny file-name chip. */
.course-thumbnail-preview {
  position: relative;
  border: 1px dashed rgba(143, 70, 155, 0.4);
  border-radius: 8px;
  padding: 0.5rem;
  background-color: #faf6fb;
}
.course-thumbnail-preview-img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: contain;
  border-radius: 6px;
}
/* "x" to cancel a freshly chosen file, top-right of the preview. */
.course-thumbnail-preview-clear {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background-color: rgba(15, 23, 42, 0.62);
  color: #fff;
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.15s ease;
}
.course-thumbnail-preview-clear:hover,
.course-thumbnail-preview-clear:focus-visible {
  background-color: rgba(15, 23, 42, 0.85);
  outline: none;
}

/* Keep learner profile activity rows aligned on small screens. Long status or
   description text must not shrink the icon column. */
@media (max-width: 767.98px) {
  body.learner-mobile-layout .learner-activity-profile .learner-activity-item {
    display: block !important;
    margin-left: 0.55rem !important;
    margin-right: 0.55rem !important;
    padding: 0.8rem 0.65rem !important;
  }

  body.learner-mobile-layout .learner-activity-profile .learner-activity-header {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    width: 100%;
    min-width: 0;
    gap: 0.65rem;
    row-gap: 0.35rem;
  }

  body.learner-mobile-layout .learner-activity-profile .activity-icon {
    display: inline-flex !important;
    flex: 0 0 2.5rem !important;
    width: 2.5rem !important;
    min-width: 2.5rem !important;
    height: 2.5rem !important;
    min-height: 2.5rem !important;
    margin-right: 0 !important;
    border-radius: 0.65rem !important;
    font-size: 1rem !important;
    line-height: 1 !important;
    box-sizing: border-box;
  }

  body.learner-mobile-layout .learner-activity-profile .activity-icon i {
    display: block;
    width: 1rem;
    height: 1rem;
    font-size: 1rem !important;
    line-height: 1 !important;
  }

  /* min-width used to be 0, which let this column get squeezed down by the
     percent/Manage/chevron siblings until "Attendance" itself no longer fit
     -- overflow-wrap: anywhere then broke mid-word ("Attendanc" / "e") to
     avoid overflowing. The floor only needs to fit the single longest word
     ("Attendance"/"present"/"records") -- 9.5rem (enough for the whole
     two-word title on one line) forced the wrap-fitting calculation to
     immediately size this column as the widest thing on the row, pushing
     the percent/Manage/chevron group onto two extra lines by themselves
     even when they'd have fit fine next to a wrapped two-line title. 4.5rem
     still guarantees no mid-word break, letting the header (flex-wrap: wrap
     above) only drop the trailing siblings when genuinely out of room. */
  body.learner-mobile-layout .learner-activity-profile .learner-activity-header > .flex-fill,
  body.learner-mobile-layout .learner-activity-profile .learner-activity-header > .d-flex.flex-fill {
    flex: 1 1 auto !important;
    min-width: 4.5rem !important;
  }

  body.learner-mobile-layout .learner-activity-profile .learner-activity-header > .flex-fill .fw-semibold,
  body.learner-mobile-layout .learner-activity-profile .learner-activity-header > .d-flex.flex-fill .fw-semibold,
  body.learner-mobile-layout .learner-activity-profile .learner-activity-header .small.text-muted {
    min-width: 0;
    overflow-wrap: break-word;
  }

  body.learner-mobile-layout .learner-activity-profile .learner-activity-header .assessment-status-text {
    flex: 0 0 auto;
    margin-left: auto !important;
    max-width: 8rem;
    margin-right: 0 !important;
    text-align: right;
    white-space: nowrap;
  }

  body.learner-mobile-layout .learner-activity-profile .learner-activity-header > .btn {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  body.learner-mobile-layout .learner-activity-profile .learner-activity-header > .bi-chevron-down,
  body.learner-mobile-layout .learner-activity-profile .learner-activity-header > .bi-chevron-right {
    flex: 0 0 1rem;
    margin-left: auto !important;
    width: 1rem;
    min-width: 1rem;
    text-align: center;
  }

  body.learner-mobile-layout .learner-activity-profile .learner-media-row {
    gap: 0.65rem;
  }

  body.learner-mobile-layout .learner-activity-profile .learner-media-row-content {
    min-width: 0;
  }

  body.learner-mobile-layout .learner-activity-profile .learner-media-row-content .text-xs {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  body.learner-mobile-layout .learner-activity-profile .learner-media-row-actions {
    flex: 0 0 auto;
  }

  body.learner-mobile-layout .learner-activity-profile .learner-media-row-actions .btn {
    white-space: nowrap;
  }

  body.learner-mobile-layout .learner-activity-profile .learner-assessment-row > div:first-child {
    flex: 1 1 auto !important;
    min-width: 0 !important;
  }

  body.learner-mobile-layout .learner-activity-profile .learner-assessment-row > div:last-child {
    flex: 0 0 4.25rem !important;
    width: 4.25rem !important;
    min-width: 4.25rem !important;
  }

body.learner-mobile-layout .learner-activity-profile .learner-assessment-row > div:last-child .btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 4.25rem !important;
    min-width: 4.25rem !important;
    max-width: 4.25rem !important;
    padding-left: 0.4rem !important;
    padding-right: 0.4rem !important;
    white-space: nowrap !important;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Collapsed cards point right; expanded cards point down. */
.learner-activity-profile .learner-activity-header .bi-chevron-down {
  transform: rotate(-90deg);
  transition: transform 0.2s ease;
}

.learner-activity-profile .learner-activity-header .bi-chevron-down.is-open {
  transform: rotate(0deg);
}

.learner-activity-profile .learner-activity-header > [aria-expanded="true"] .bi-chevron-down,
.learner-activity-profile .learner-activity-header[aria-expanded="true"] > .bi-chevron-down {
  transform: rotate(0deg);
}

/* Reflow the compliance tree on phones so rule content and status controls do
   not compete for the same narrow horizontal space. */
@media (max-width: 767.98px) {
  body.learner-mobile-layout .learner-profile-page,
  body.learner-mobile-layout .learner-profile-page * {
    box-sizing: border-box;
  }

  body.learner-mobile-layout .learner-profile-page {
    max-width: 100%;
    overflow-x: hidden;
    padding-bottom: 5rem !important;
  }

  body.learner-mobile-layout .learner-profile-page .learner-assessment-item-list {
    margin-left: 0.75rem !important;
    padding-left: 0.75rem !important;
  }

  body.learner-mobile-layout .learner-profile-page .learner-assessment-item {
    width: 100%;
    max-width: 100%;
    padding: 0.75rem !important;
    overflow: visible;
  }

  body.learner-mobile-layout .learner-profile-page .learner-assessment-item > .d-flex {
    display: flex !important;
    align-items: flex-start !important;
    width: 100%;
    min-width: 0;
  }

  body.learner-mobile-layout .learner-profile-page .learner-assessment-item > .d-flex > .flex-grow-1 {
    min-width: 0 !important;
  }

  body.learner-mobile-layout .learner-profile-page .compliance-check-row {
    display: grid !important;
    grid-template-columns: 1.75rem minmax(0, 1fr);
    align-items: start !important;
    gap: 0.55rem;
    width: 100%;
    min-width: 0;
    padding: 0.7rem 0.65rem !important;
  }

  body.learner-mobile-layout .learner-profile-page .compliance-check-icon {
    grid-column: 1;
    grid-row: 1;
    width: 1.75rem;
    height: 1.75rem;
  }

  body.learner-mobile-layout .learner-profile-page .compliance-check-body {
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    min-width: 0;
  }

  body.learner-mobile-layout .learner-profile-page .compliance-check-label {
    display: block;
    min-width: 0;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  body.learner-mobile-layout .learner-profile-page .compliance-check-source {
    display: block;
    margin: 0.15rem 0 0;
    line-height: 1.3;
    overflow-wrap: anywhere;
  }

  body.learner-mobile-layout .learner-profile-page .compliance-check-chip {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    margin-top: 0.1rem;
  }

  body.learner-mobile-layout .learner-profile-page .compliance-check-body .form-control,
  body.learner-mobile-layout .learner-profile-page .compliance-check-body .form-select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
  }

  body.learner-mobile-layout .learner-profile-page .compliance-check-body .row > [class*="col-"] {
    width: 100%;
    flex: 0 0 100%;
  }

  body.learner-mobile-layout .learner-profile-page .compliance-check-values {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.2rem;
  }
}

/* Compact the desktop action cluster so the platform switcher sits closer to
   the message, cart, and notification controls. */
@media (min-width: 768px) {
  .app-topnav__actions {
    gap: 0.35rem;
  }

  .app-topnav .notification-bell-wrap {
    padding-right: 0.5rem;
    margin-right: 0;
  }

  .app-topnav__actions > .vr.mx-1 {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }
}

/* Keep learner sidebar items evenly sized and let longer labels wrap instead
   of being clipped by the shared active-item width rule. */
@media (min-width: 768px) {
  .app-course-list #learner-course-sidebar {
    align-items: center;
    gap: 0.35rem;
    padding: 0.75rem 0.3rem;
  }

  .app-course-list #learner-course-sidebar > .programme-icon-link {
    align-items: center;
    box-sizing: border-box;
    flex: 0 0 calc(100% - 0.6rem);
    gap: 0.25rem;
    justify-content: flex-start;
    margin: 0 auto 0.35rem !important;
    max-width: calc(100% - 0.6rem) !important;
    min-height: 4.5rem;
    min-width: 0 !important;
    padding: 0.45rem 0.25rem !important;
    width: calc(100% - 0.6rem) !important;
    white-space: normal !important;
  }

  .app-course-list #learner-course-sidebar > .programme-icon-link.active {
    flex-basis: calc(100% - 0.6rem);
    max-width: calc(100% - 0.6rem) !important;
    min-height: 4.5rem;
    width: calc(100% - 0.6rem) !important;
  }

  .app-course-list #learner-course-sidebar .programme-icon-circle {
    flex: 0 0 2.35rem;
    height: 2.35rem;
    margin-bottom: 0 !important;
    width: 2.35rem;
  }

  .app-course-list #learner-course-sidebar .programme-icon-label {
    display: block;
    line-height: 1.15;
    max-width: 100%;
    overflow-wrap: anywhere;
    text-align: center;
    white-space: normal !important;
  }
}

/* Keep learner document actions uniform. Content-sized buttons made labels
   such as "Download" wrap differently from "View" and "Replace". */
.learner-activity-profile .learner-doc-row .learner-assessment-icon {
  flex: 0 0 2.5rem;
  font-size: 1.15rem;
  height: 2.5rem;
  width: 2.5rem;
}

.learner-activity-profile .learner-doc-row > .d-flex:last-child {
  flex: 0 0 auto;
  gap: 0.35rem !important;
}

.learner-activity-profile .learner-doc-row > .d-flex:last-child .btn {
  align-items: center;
  box-sizing: border-box;
  display: inline-flex;
  flex: 0 0 4rem;
  justify-content: center;
  line-height: 1.1;
  max-width: 4rem;
  min-height: 2rem;
  min-width: 4rem;
  overflow: hidden;
  padding: 0.25rem !important;
  text-overflow: ellipsis;
  white-space: nowrap !important;
}

/* Keep the two management pages aligned on large screens. Reporting should
   use the same available width as Programme Management instead of centring a
   narrower max-width card with large empty side gutters. */
@media (min-width: 1200px) {
  body.dynamic-report-standalone-page .dynamic-report-page {
    width: 100% !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body.dynamic-report-standalone-page .report-builder-card-wrapper {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
  }

  body.programme-management-standalone-page:not(.programme-management-content-page) .home-section.admin-home-layout,
  body.programme-management-standalone-page:not(.programme-management-content-page) #app.programme-management-app-shell,
  body.programme-management-standalone-page:not(.programme-management-content-page) #status_tabContent,
  body.programme-management-standalone-page:not(.programme-management-content-page) #status_tabContent > .card,
  body.programme-management-standalone-page:not(.programme-management-content-page) #admin-content-area {
    height: auto !important;
    min-height: 0 !important;
  }
}

@media (max-width: 767.98px) {
  /* Give document/media metadata the full card width on phones. Keeping the
     action group beside the content leaves only a few pixels for filenames,
     which makes them render one character per line. */
  .learner-activity-profile .learner-doc-row,
  .learner-activity-profile .learner-media-row {
    align-items: stretch !important;
    flex-direction: column !important;
    gap: 0.65rem !important;
  }

  .learner-activity-profile .learner-doc-row > .d-flex:first-child,
  .learner-activity-profile .learner-media-row > .learner-media-row-content {
    flex: 0 0 auto !important;
    min-width: 0 !important;
    width: 100% !important;
  }

  .learner-activity-profile .learner-doc-row .learner-doc-name,
  .learner-activity-profile .learner-doc-row .learner-doc-meta,
  .learner-activity-profile .learner-media-row-content > .text-xs {
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    overflow-wrap: anywhere;
    white-space: normal !important;
    word-break: normal;
  }

  .learner-activity-profile .learner-doc-row > .d-flex:last-child,
  .learner-activity-profile .learner-media-row > .learner-media-row-actions {
    align-self: flex-start !important;
    display: flex !important;
    flex: 0 0 auto !important;
    flex-wrap: wrap !important;
    gap: 0.3rem !important;
    justify-content: flex-start !important;
    margin-left: 2.95rem !important;
    width: calc(100% - 2.95rem) !important;
  }

  .learner-activity-profile .learner-doc-row {
    align-items: flex-start !important;
  }

  .learner-activity-profile .learner-doc-row > .d-flex:first-child {
    flex: 1 1 auto;
    min-width: 0;
  }

  .learner-activity-profile .learner-doc-row > .d-flex:last-child {
    align-self: flex-start !important;
  }

  .learner-activity-profile .learner-doc-row > .d-flex:last-child .btn {
    flex-basis: 3.8rem;
    font-size: 0.64rem !important;
    max-width: 3.8rem;
    min-width: 3.8rem;
    padding-left: 0.2rem !important;
    padding-right: 0.2rem !important;
  }
}

/* Keep assignment status labels visually identical even when their text
   changes between "Added to cart" and "Assigned". */
#course_assign_programme table .assign_switch .active-label,
#course_assign_programme table .assign_switch .deactivated-label {
  display: inline-block;
  font-size: 0.95rem !important;
  font-weight: 500 !important;
  line-height: 1.35 !important;
  margin: 0 !important;
  white-space: nowrap;
}

/* Keep the learner attendance summary readable in the current mobile shell.
   The older rules target learner-mobile-layout, while this page now uses
   learner-mobile-bootstrap-ui. */
@media (max-width: 767.98px) {
  body.learner-mobile-bootstrap-ui .learner-activity-profile .learner-activity-item {
    display: block !important;
    margin-left: 0.55rem !important;
    margin-right: 0.55rem !important;
    padding: 0.65rem !important;
  }

  body.learner-mobile-bootstrap-ui .learner-activity-profile .learner-activity-header {
    align-items: center !important;
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.45rem !important;
    min-width: 0;
    row-gap: 0.35rem !important;
    width: 100%;
  }

  body.learner-mobile-bootstrap-ui .learner-activity-profile .learner-activity-header > .activity-icon {
    flex: 0 0 2.5rem !important;
    height: 2.5rem !important;
    margin-right: 0 !important;
    min-width: 2.5rem !important;
    width: 2.5rem !important;
  }

  body.learner-mobile-bootstrap-ui .learner-activity-profile .learner-activity-header > .flex-fill,
  body.learner-mobile-bootstrap-ui .learner-activity-profile .learner-activity-header > .d-flex.flex-fill {
    flex: 1 1 auto !important;
    min-width: 5rem !important;
  }

  body.learner-mobile-bootstrap-ui .learner-activity-profile .learner-activity-header > .flex-fill .fw-semibold,
  body.learner-mobile-bootstrap-ui .learner-activity-profile .learner-activity-header > .flex-fill .small.text-muted,
  body.learner-mobile-bootstrap-ui .learner-activity-profile .learner-activity-header > .d-flex.flex-fill .fw-semibold,
  body.learner-mobile-bootstrap-ui .learner-activity-profile .learner-activity-header > .d-flex.flex-fill .small.text-muted {
    min-width: 0;
    overflow-wrap: break-word;
  }

  body.learner-mobile-bootstrap-ui .learner-activity-profile .learner-activity-header > .assessment-status-text {
    flex: 0 0 auto !important;
    margin-left: auto !important;
    max-width: 5rem;
    text-align: right;
    white-space: nowrap;
  }

  /* Keep Compliance and Evaluations summaries aligned with the compact
     Learner Assessments response on narrow screens. */
  body.learner-mobile-bootstrap-ui .learner-activity-profile .learner-compliance-item .learner-activity-header > .flex-fill,
  body.learner-mobile-bootstrap-ui .learner-activity-profile .learner-evaluations-item .learner-activity-header > .flex-fill {
    overflow-wrap: anywhere;
  }

  body.learner-mobile-bootstrap-ui .learner-activity-profile .learner-compliance-item .learner-activity-header .small.text-muted,
  body.learner-mobile-bootstrap-ui .learner-activity-profile .learner-evaluations-item .learner-activity-header .small.text-muted {
    line-height: 1.35;
  }

  body.learner-mobile-bootstrap-ui .learner-activity-profile .learner-activity-header > .btn {
    flex: 0 0 auto !important;
    margin-left: 2.95rem !important;
    margin-right: auto !important;
    white-space: nowrap;
  }

  body.learner-mobile-bootstrap-ui .learner-activity-profile .learner-activity-header > .bi-chevron-down,
  body.learner-mobile-bootstrap-ui .learner-activity-profile .learner-activity-header > .bi-chevron-right {
    flex: 0 0 1rem !important;
    margin-left: auto !important;
    min-width: 1rem;
    text-align: center;
  }

}

/* Keep the AI assessment choice actions visually consistent. SweetAlert's
   deny button does not inherit the shared confirm/cancel button sizing, and
   content-sized labels make the three controls appear uneven. */
.swal2-container .swal-compact-popup .swal2-actions > .swal2-confirm,
.swal2-container .swal-compact-popup .swal2-actions > .swal2-deny,
.swal2-container .swal-compact-popup .swal2-actions > .swal2-cancel {
  align-items: center !important;
  background-color: var(--btn-outline-primary-bg, var(--secondary-color)) !important;
  background-image: none !important;
  border: 1px solid transparent !important;
  border-radius: 0.375rem !important;
  box-sizing: border-box;
  display: inline-flex !important;
  flex: 0 0 9rem;
  font-family: inherit !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  height: auto;
  justify-content: center !important;
  line-height: 1.2 !important;
  min-height: 2rem !important;
  min-width: 9rem !important;
  padding: 0.45rem 0.9rem !important;
  box-shadow: none !important;
  white-space: nowrap !important;
}

.swal2-container .swal-compact-popup .swal2-actions > .swal2-confirm:hover,
.swal2-container .swal-compact-popup .swal2-actions > .swal2-confirm:focus,
.swal2-container .swal-compact-popup .swal2-actions > .swal2-confirm:active,
.swal2-container .swal-compact-popup .swal2-actions > .swal2-deny:hover,
.swal2-container .swal-compact-popup .swal2-actions > .swal2-deny:focus,
.swal2-container .swal-compact-popup .swal2-actions > .swal2-deny:active,
.swal2-container .swal-compact-popup .swal2-actions > .swal2-cancel:hover,
.swal2-container .swal-compact-popup .swal2-actions > .swal2-cancel:focus,
.swal2-container .swal-compact-popup .swal2-actions > .swal2-cancel:active {
  background-color: var(--btn-outline-primary-hover-bg, var(--secondary-color)) !important;
  background-image: none !important;
  color: var(--btn-outline-primary-hover-text, #fff) !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

/* Final mobile learner-sidebar alignment. Several legacy sidebar rules use
   different padding and height values, which can lift the menu into the
   viewport edge and clip the active item. */
@media (max-width: 767.98px) {
  body.learner-mobile-bootstrap-ui .sidebar.sidebar-md .orcaa-sidebar-container,
  body.learner-mobile-bootstrap-ui .sidebar.sidebar-md .orcaa-sidebar {
    box-sizing: border-box;
    height: auto !important;
    max-height: none !important;
  }

  body.learner-mobile-bootstrap-ui .sidebar.sidebar-md .orcaa-sidebar-container {
    overflow-x: auto !important;
    overflow-y: hidden !important;
    padding: 0 0 env(safe-area-inset-bottom, 0px) !important;
  }

  body.learner-mobile-bootstrap-ui .sidebar.sidebar-md .orcaa-sidebar {
    align-items: stretch;
    margin: 0 !important;
    padding: 0.25rem 0 !important;
  }

  body.learner-mobile-bootstrap-ui .sidebar.sidebar-md .orcaa-sidebar #learner-course-sidebar {
    align-items: stretch !important;
    box-sizing: border-box;
    gap: 0.25rem !important;
    margin: 0 !important;
    padding: 0.15rem 0.3rem !important;
  }

  body.learner-mobile-bootstrap-ui .sidebar.sidebar-md .orcaa-sidebar #learner-course-sidebar > .programme-icon-link,
  body.learner-mobile-bootstrap-ui .sidebar.sidebar-md .orcaa-sidebar #learner-course-sidebar > .programme-icon-link.active {
    align-items: center !important;
    box-sizing: border-box;
    flex: 0 0 5.5rem !important;
    height: auto !important;
    justify-content: center !important;
    margin: 0 !important;
    max-height: none !important;
    min-height: 4rem !important;
    padding: 0.25rem 0.3rem !important;
    transform: none !important;
  }

  body.learner-mobile-bootstrap-ui .sidebar.sidebar-md .orcaa-sidebar #learner-course-sidebar .programme-icon-circle {
    flex: 0 0 1.9rem !important;
    height: 1.9rem !important;
    margin: 0 0 0.1rem !important;
    width: 1.9rem !important;
  }
}
/* Learner attendance controls live on the courses landing page. */
.course-attendance-clock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  flex: 1 1 360px;
  color: #fff;
}
.course-attendance-clock-copy p { color: rgba(255,255,255,.82); }
.course-attendance-clock-copy small { display: block; margin-top: .4rem; color: #b7d9c3; }
.course-attendance-clock-location { display: flex; align-items: center; gap: .55rem; flex: 1 1 100%; font-size: .78rem; color: #d6e8dc; }
.course-attendance-clock-location > span:first-child { font-weight: 700; color: #fff; }
.course-attendance-clock-location button { border: 0; padding: 0; color: inherit; background: transparent; font-size: .72rem; }
.course-attendance-clock-actions { display: flex; gap: .75rem; flex-shrink: 0; }
.course-attendance-clock-actions .btn { min-width: 88px; }
.course-attendance-clock-feedback { flex-basis: 100%; font-size: .8rem; }
@media (max-width: 575.98px) {
  /* The 360px flex-basis is sized for the desktop hero's row layout; on a
     phone narrower than that (content-width), with no min-width: 0 on the
     chain, flex items refuse to shrink below their content and the card
     overflows horizontally instead of wrapping. */
  .course-attendance-clock { align-items: stretch; flex-direction: column; flex-basis: auto; min-width: 0; }
  .course-attendance-clock-copy p { overflow-wrap: anywhere; }
  .course-attendance-clock-location { align-items: flex-start; flex-direction: column; min-width: 0; }
  .course-attendance-clock-location > span:nth-child(2) { min-width: 0; overflow-wrap: anywhere; }
  .course-attendance-clock-actions { width: 100%; flex-wrap: wrap; }
  .course-attendance-clock-actions .btn { flex: 1 1 auto; min-width: 6.5rem; }
}

/* Keep the learner name/course identity separate from the attendance controls
   on the desktop course header. Long workplace names must not push the clock
   or action buttons into a new line. */
@media (min-width: 768px) {
  .learner-home-dashboard-page .teacher-curriculum-hero .card-body {
    align-items: center !important;
    gap: 2rem !important;
  }

  .learner-home-dashboard-page .teacher-curriculum-hero-main {
    flex: 0 1 42% !important;
    min-width: 0;
  }

  .learner-home-dashboard-page .course-attendance-clock {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "copy actions"
      "location location"
      "feedback feedback";
    align-items: center;
    column-gap: 1.25rem;
    row-gap: 0.35rem;
    flex: 1 1 58%;
    min-width: 0;
  }

  .learner-home-dashboard-page .course-attendance-clock-copy {
    grid-area: copy;
    min-width: 0;
  }

  .learner-home-dashboard-page .course-attendance-clock-copy p {
    white-space: nowrap;
  }

  .learner-home-dashboard-page .course-attendance-clock-actions {
    grid-area: actions;
    justify-content: flex-end;
    gap: 0.65rem;
  }

  .learner-home-dashboard-page .course-attendance-clock-location {
    grid-area: location;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    min-width: 0;
  }

  .learner-home-dashboard-page .course-attendance-clock-location > span:first-child {
    white-space: nowrap;
  }

  .learner-home-dashboard-page .course-attendance-clock-location > span:nth-child(2) {
    min-width: 0;
    overflow-wrap: anywhere;
    line-height: 1.25;
  }

  .learner-home-dashboard-page .course-attendance-clock-location button {
    white-space: nowrap;
  }

  .learner-home-dashboard-page .course-attendance-clock-feedback {
    grid-area: feedback;
  }
}

/* "Learner Written assessment" modal script tables -- DataTables scrollX so the
   header and body stay column-aligned and the table scrolls sideways instead of
   the responsive plugin collapsing columns. Only rules with no Bootstrap
   equivalent live here (DataTables scroll-wrapper internals, per-column
   min-widths, the brand header fill, cell padding); alignment, nowrap and
   button spacing are Bootstrap utilities applied in the markup / columnDefs.
   Covers the assessment-page modal (#view_learning_script_popup) and the
   course-curriculum one (#view_learning_script_popup_second). */
#view_learning_script_popup #learner_written_script_table,
#view_learning_script_popup #applicant_written_script_table,
#view_learning_script_popup_second #learner_written_script_table {
  border-collapse: separate;
  border-spacing: 0;
}

/* Body scrolls sideways; the cloned header/footer tables stay clipped so they
   track the body instead of showing their own scrollbar. */
#view_learning_script_popup .dt-scroll-body,
#view_learning_script_popup_second .dt-scroll-body {
  overflow-x: auto !important;
  overflow-y: auto !important;
}

#view_learning_script_popup .dt-scroll-head,
#view_learning_script_popup .dt-scroll-foot,
#view_learning_script_popup_second .dt-scroll-head,
#view_learning_script_popup_second .dt-scroll-foot {
  overflow: hidden;
}

#view_learning_script_popup #learner_written_script_table thead,
#view_learning_script_popup #applicant_written_script_table thead,
#view_learning_script_popup_second #learner_written_script_table thead {
  background: var(--primary-color) !important;
  color: #fff !important;
}

#view_learning_script_popup #learner_written_script_table > :is(thead, tbody) > tr > *,
#view_learning_script_popup #applicant_written_script_table > :is(thead, tbody) > tr > *,
#view_learning_script_popup_second #learner_written_script_table > :is(thead, tbody) > tr > * {
  padding: 0.55rem 0.6rem;
}

/* Per-column width floors (Bootstrap has no arbitrary min-width utility) so the
   table overflows its modal and scrolls rather than squashing columns. Applied
   to header and body cells alike so the scrollX header/body tables measure to
   the same width. */
#view_learning_script_popup #learner_written_script_table > :is(thead, tbody) > tr > *:nth-child(1),
#view_learning_script_popup #applicant_written_script_table > :is(thead, tbody) > tr > *:nth-child(1),
#view_learning_script_popup_second #learner_written_script_table > :is(thead, tbody) > tr > *:nth-child(1) { min-width: 44px; }

#view_learning_script_popup #learner_written_script_table > :is(thead, tbody) > tr > *:nth-child(2),
#view_learning_script_popup #applicant_written_script_table > :is(thead, tbody) > tr > *:nth-child(2),
#view_learning_script_popup_second #learner_written_script_table > :is(thead, tbody) > tr > *:nth-child(2) { min-width: 170px; }

#view_learning_script_popup #learner_written_script_table > :is(thead, tbody) > tr > *:nth-child(3),
#view_learning_script_popup #learner_written_script_table > :is(thead, tbody) > tr > *:nth-child(4),
#view_learning_script_popup #applicant_written_script_table > :is(thead, tbody) > tr > *:nth-child(3),
#view_learning_script_popup #applicant_written_script_table > :is(thead, tbody) > tr > *:nth-child(4),
#view_learning_script_popup_second #learner_written_script_table > :is(thead, tbody) > tr > *:nth-child(3),
#view_learning_script_popup_second #learner_written_script_table > :is(thead, tbody) > tr > *:nth-child(4) { min-width: 78px; }

#view_learning_script_popup #learner_written_script_table > :is(thead, tbody) > tr > *:nth-child(5),
#view_learning_script_popup #learner_written_script_table > :is(thead, tbody) > tr > *:nth-child(6),
#view_learning_script_popup #applicant_written_script_table > :is(thead, tbody) > tr > *:nth-child(5),
#view_learning_script_popup #applicant_written_script_table > :is(thead, tbody) > tr > *:nth-child(6),
#view_learning_script_popup_second #learner_written_script_table > :is(thead, tbody) > tr > *:nth-child(5),
#view_learning_script_popup_second #learner_written_script_table > :is(thead, tbody) > tr > *:nth-child(6) { min-width: 130px; }

#view_learning_script_popup #learner_written_script_table > :is(thead, tbody) > tr > *:last-child,
#view_learning_script_popup #applicant_written_script_table > :is(thead, tbody) > tr > *:last-child,
#view_learning_script_popup_second #learner_written_script_table > :is(thead, tbody) > tr > *:last-child { min-width: 240px; }

@media (max-width: 767.98px) {
  body.learner-mobile-bootstrap-ui .learner-assessments-page .dataTables_wrapper .dataTables_length,
  body.learner-mobile-layout .learner-assessments-page .dataTables_wrapper .dataTables_length,
  body.learner-mobile-bootstrap-ui .learner-assessments-page .dt-length,
  body.learner-mobile-layout .learner-assessments-page .dt-length {
    display: flex !important;
    align-items: center;
    gap: 0.45rem !important;
    width: max-content;
    max-width: 100%;
    padding: 0.35rem 0.5rem !important;
    margin: 0 0 0.5rem !important;
    border: 1px solid #e2e8f0;
    border-radius: 0.55rem;
    background: #fff;
    box-sizing: border-box;
  }

  body.learner-mobile-bootstrap-ui .learner-assessments-page .dataTables_wrapper .dataTables_length label,
  body.learner-mobile-layout .learner-assessments-page .dataTables_wrapper .dataTables_length label,
  body.learner-mobile-bootstrap-ui .learner-assessments-page .dt-length label,
  body.learner-mobile-layout .learner-assessments-page .dt-length label {
    display: inline-flex !important;
    align-items: center;
    gap: 0.45rem !important;
    margin: 0 !important;
    white-space: nowrap;
  }

  body.learner-mobile-bootstrap-ui .learner-assessments-page .dt-length select,
  body.learner-mobile-layout .learner-assessments-page .dt-length select,
  body.learner-mobile-bootstrap-ui .learner-assessments-page .dataTables_length select,
  body.learner-mobile-layout .learner-assessments-page .dataTables_length select {
    width: 4rem !important;
    min-width: 4rem !important;
    padding: 0 1.25rem 0 0.55rem !important;
    color: #334155 !important;
    background-color: #fff !important;
    text-align: left;
    text-indent: 0 !important;
    -webkit-text-fill-color: #334155 !important;
  }

  body.learner-mobile-bootstrap-ui .learner-assessments-page table.data-table tbody tr td[colspan],
  body.learner-mobile-layout .learner-assessments-page table.data-table tbody tr td[colspan] {
    display: table-cell !important;
    width: 100% !important;
    min-width: 0 !important;
    padding: 1.25rem 1rem !important;
    text-align: center !important;
    vertical-align: middle !important;
    white-space: normal !important;
  }

  /* DataTables inserts this row when My Assessments has no records. Keep the
     empty card as wide as the table instead of sizing it to the message text.
     DataTables 2.x (vendored here) renders it as class="dt-empty", not the
     old 1.x "dataTables_empty" -- match both so this doesn't silently stop
     matching again on a future DataTables upgrade. */
  body.learner-mobile-bootstrap-ui .learner-assessments-page table.data-table tbody tr:has(td.dataTables_empty),
  body.learner-mobile-layout .learner-assessments-page table.data-table tbody tr:has(td.dataTables_empty),
  body.learner-mobile-bootstrap-ui .learner-assessments-page table.data-table tbody tr:has(td.dt-empty),
  body.learner-mobile-layout .learner-assessments-page table.data-table tbody tr:has(td.dt-empty) {
    display: block !important;
    width: calc(100% - .75rem) !important;
    max-width: calc(100% - .75rem) !important;
    min-width: 0 !important;
  }

  body.learner-mobile-bootstrap-ui .learner-assessments-page table.data-table tbody tr td.dataTables_empty,
  body.learner-mobile-layout .learner-assessments-page table.data-table tbody tr td.dataTables_empty,
  body.learner-mobile-bootstrap-ui .learner-assessments-page table.data-table tbody tr td.dt-empty,
  body.learner-mobile-layout .learner-assessments-page table.data-table tbody tr td.dt-empty {
    display: block !important;
    width: 100% !important;
    min-height: 7rem;
    box-sizing: border-box;
    padding: 2.25rem 1rem !important;
    text-align: center !important;
    white-space: normal !important;
  }

}

/* =========================================================================
   Assessment governance workspace (assurance shell) -- moved in from
   assessment_management/static/css/assessment_management/governance_workspace.css
   so the admin governance workspace and learner assessment records pages
   (both loaded via indexReal.html) share this file instead of a second
   page-specific stylesheet.
   ========================================================================= */

.assurance-shell {
  --assurance-ink: #17213a;
  --assurance-muted: #657089;
  --assurance-line: #e3e8f2;
  --assurance-soft: #f5f7fb;
  /* Use the tenant's actual brand color (the same variable driving
     .btn-primary/.btn-outline-primary everywhere else) instead of a
     hardcoded purple, so the tabs/badges/kicker match the Save/Submit/
     Approve buttons on this page instead of clashing with them. */
  --assurance-primary: var(--primary-color, #5b38d1);
  color: var(--assurance-ink);
  /* Was a fixed 1680px cap, which left the leftover width between 1680px
     and the actual (wider) .home-section box empty on the right on any
     normal desktop monitor -- other near-flush shells in this file (Course
     Insights, Programme/System Management) instead cap with `calc(100% -
     small-value)` so the shell always fills its container. Do the same
     here instead of a viewport-independent pixel ceiling. */
  max-width: 100%;
  /* .assurance-shell already carries container-fluid px-3 px-lg-4, which
     stacks its own ~24px of left/right padding on top of the .home-section
     wrapper's own mx-4 margin + padding -- the same "Bootstrap gutter on
     top of wrapper padding" double-up already called out below for mobile.
     Flatten it to a single, smaller gutter at every width instead of just
     the mobile breakpoint, so the content isn't needlessly narrowed. A first
     pass trimmed this to 12px, but that still read as too wide once paired
     with the .home-section margin below -- cut further to match Course
     Insights' near-flush "don't touch either edge" shell. */
  padding-left: 6px !important;
  padding-right: 6px !important;
}

/* The shared .card-margin-top utility (main_system_index.css ~line 33591)
   defaults to 1.5rem, leaving a large gap above the hero card on this page.
   Pull it up to the same -7px convention used by other .card-margin-top
   consumers (learner homepage, teacher curriculum, learner assessments),
   scoped by id so learner_assessment_records.html's own
   .assurance-shell.card-margin-top is unaffected. */
#assessment-assurance-workspace.card-margin-top {
  margin-top: -7px !important;
}

/* Unlike every other standalone admin page (Programme/Course/System
   Management, Assessment Templates, Course Insights, ...), the governance
   workspace's body class list never picked up a page-specific selector that
   trims .home-section's own Bootstrap mx-4 margin (1.5rem/24px each side),
   so that margin stacks on top of .assurance-shell's padding above and reads
   as a much wider gutter than Course Insights' near-flush shell. Trim it to
   the same near-zero amount Course Insights' own .programme-content-ui uses
   -- scoped with :has() (same technique already used for
   #learner-assessment-records below) so no other page's margin moves. */
@media (min-width: 768px) {
  .home-section.mx-4:has(#assessment-assurance-workspace) {
    margin-left: 0.05rem !important;
    margin-right: 0.05rem !important;
  }

  /* .home-section's own un-inset base offsets (left: 75px; width:
     calc(100% - 99px); padding: 15px) assume a narrower sidebar than the
     one actually rendered -- the same 126px sidebar offset already used
     for Course Insights, view-programme-main-page, etc. Unlike those
     pages, width isn't given its own extra px reserve here: the visible
     gutter is carried entirely by padding-left/right below, split evenly
     so both edges land at the same ~20px (padding 13px + the 0.05rem
     margin above + .assurance-shell's own 6px padding), inside the
     16-24px target range, instead of Course Insights' narrower/uneven
     split (its width reserve alone made its right gutter wider than its
     left). */
  body:has(#assessment-assurance-workspace) .home-section:not(.admin-home-layout) {
    left: 126px;
    width: calc(100% - 126px);
    padding-left: 13px;
    padding-right: 13px;
  }
}

.assurance-hero {
  align-items: center;
  background: linear-gradient(125deg, #25134f 0%, #5431b7 58%, #7962dc 100%);
  border-radius: 22px;
  box-shadow: 0 16px 40px rgba(45, 28, 95, .18);
  color: #fff;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  overflow: hidden;
  padding: 30px 34px;
  position: relative;
}

.assurance-hero::after {
  background: rgba(255, 255, 255, .08);
  border-radius: 50%;
  content: "";
  height: 220px;
  position: absolute;
  right: -54px;
  top: -90px;
  width: 220px;
}

.assurance-eyebrow,
.assurance-kicker {
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.assurance-eyebrow { color: #d9d1ff; }
.assurance-kicker { color: var(--assurance-primary); margin: 0 0 4px; }
.assurance-title { color: #fff; font-size: clamp(1.5rem, 3vw, 2.35rem); margin: 0 0 8px; }
.assurance-subtitle { color: rgba(255, 255, 255, .82); max-width: 760px; }
.assurance-hero-actions { align-items: flex-end; display: flex; flex-direction: column; gap: 12px; position: relative; z-index: 1; }

.assurance-status {
  background: #eeeafd;
  border: 1px solid #d8cffc;
  border-radius: 999px;
  color: #41269d;
  display: inline-flex;
  font-size: .75rem;
  font-weight: 800;
  padding: 7px 12px;
  text-transform: capitalize;
}

.assurance-hero .assurance-status { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.28); color: #fff; }

/* Match the compact "My assessments" header card (.teacher-curriculum-hero
   .card-body: min-height 80px, 24px title) instead of the larger default
   assurance-hero sizing. Shared by the learner records page and the admin
   governance workspace so both assurance-shell heroes stay the same size. */
.assurance-hero-compact { min-height: 80px; padding: 20px 24px 14px; }
.assurance-hero-compact .assurance-title { font-size: 24px; margin: 0 0 4px; }
.assurance-hero-compact .assurance-subtitle { font-size: .85rem; }
.assurance-hero-compact .assurance-eyebrow { margin-bottom: 4px; }
.assurance-kpis { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 18px 0; }
.assurance-kpis article { background: #fff; border: 1px solid var(--assurance-line); border-radius: 16px; box-shadow: 0 8px 24px rgba(36, 46, 74, .06); padding: 18px 20px; }
.assurance-kpis span { color: var(--assurance-muted); display: block; font-size: .78rem; margin-bottom: 5px; }
.assurance-kpis strong { font-size: 1.35rem; }

/* Underline tab style used platform-wide (e.g. #programme-evaluations-panel
   .nav-l1 .programme-content-tab on the Programme Management / Course
   Insights pages) instead of this page's own one-off filled-pill tabs, so
   the assurance workspace's tab bar matches the rest of the platform. */
.assurance-tabs {
  background: #fff;
  border: 1px solid var(--assurance-line);
  border-radius: 16px;
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  overflow-x: auto;
  padding: 0 10px;
  scrollbar-width: thin;
}

.assurance-tabs button {
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  color: var(--assurance-muted);
  cursor: pointer;
  flex: 0 0 auto;
  font-size: .8rem;
  font-weight: 500;
  padding: 14px 12px;
  transition: color .15s, border-color .15s;
}

.assurance-tabs button:hover,
.assurance-tabs button:focus-visible { color: var(--assurance-primary); outline: 2px solid transparent; }
.assurance-tabs button.active { background: transparent; border-bottom-color: var(--assurance-primary); color: var(--assurance-primary); font-weight: 700; }

.assurance-panel {
  background: #fff;
  border: 1px solid var(--assurance-line);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(36, 46, 74, .06);
  padding: clamp(18px, 3vw, 30px);
}

.assurance-panel-heading { align-items: center; display: flex; gap: 16px; justify-content: space-between; margin-bottom: 24px; }
.assurance-panel h2 { font-size: 1.3rem; margin: 0; }
.assurance-panel h3, .assurance-card h3 { font-size: .98rem; margin: 0 0 14px; }
.assurance-panel label { color: #35405a; display: grid; font-size: .78rem; font-weight: 700; gap: 6px; }
.assurance-panel .form-control, .assurance-panel .form-select { border-color: #d8deeb; border-radius: 10px; font-size: .82rem; min-height: 40px; }
.assurance-panel .form-control:focus, .assurance-panel .form-select:focus { border-color: #886ee2; box-shadow: 0 0 0 .2rem rgba(91, 56, 209, .12); }
.form-hint { color: var(--assurance-muted); font-size: .7rem; font-weight: 500; }

.assurance-form-grid, .assurance-two-column, .assurance-three-grid { display: grid; gap: 16px; }
.assurance-form-grid, .assurance-two-column { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.assurance-three-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.assurance-span-2 { grid-column: 1 / -1; }
.assurance-section-block { border-top: 1px solid var(--assurance-line); margin-top: 24px; padding-top: 24px; }
.assurance-stack { display: grid; gap: 12px; }
.assurance-card { background: var(--assurance-soft); border: 1px solid var(--assurance-line); border-radius: 14px; display: grid; gap: 14px; padding: 18px; }
.assurance-card-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }

/* Evidence & receipts: .assurance-two-column's default grid align-items
   (stretch) pulls the shorter "Inspect learner records" card (one field) up
   to match the taller "Record verified practical competence" card (four
   fields). Since .assurance-card is itself a grid with no explicit row
   sizing, that extra height doesn't just sit at the bottom -- it gets
   distributed across every row, which is what balloons the gap above
   "Learner" and stretches the Load evidence button to roughly double a
   normal button's height. Size each card to its own content instead. */
#records-panel .assurance-two-column { align-items: start; }

/* Governance configuration: same stretch issue as above -- the Learning
   outcomes card starts with an empty/short outcome list, shorter than the
   configuration fields card beside it, and grows independently as outcomes
   are added. Neither card's height should be coupled to the other's. */
#governance-panel .assurance-two-column { align-items: start; }

/* Versioned question bank: same stretch issue as above -- "Publish an
   assessment question" (5 rows) is taller than "Search library" (3 rows),
   so the shorter card's rows were being inflated to match, ballooning the
   search input and its Search button well past the Bank title field's
   height. */
#question-bank-panel .assurance-two-column { align-items: start; }

/* Learner accommodations: the approval card only holds a handful of fields,
   so letting it span the full panel width stretches its inputs further
   than the content needs. Cap it at half the panel width instead. */
#accommodation-form { max-width: 50%; }

/* These form submit buttons are the last direct child of an .assurance-card
   grid, so they stretch to the card's full width like a layout element
   instead of sizing to their own content -- give them the same
   content-sized width every other button on this page gets from
   .assurance-action-row. */
#practical-evidence-form button[type="submit"],
#bank-create-form button[type="submit"],
#accommodation-form button[type="submit"],
#evidence-filter-form button[type="submit"] {
  justify-self: start;
  width: auto;
  padding-left: 28px;
  padding-right: 28px;
}

/* Remove outcome shouldn't stretch to the outcome card's full width like a
   card-spanning action -- size it to its content and align it to the right. */
.outcome-row .remove-outcome {
  justify-self: end;
  width: auto;
}
.assurance-check { align-content: center; align-items: center; display: flex !important; grid-auto-flow: column; justify-content: start; margin-top: 20px; }
.outcome-question-map { border: 0; display: grid; gap: 8px; margin: 0; padding: 0; }
.outcome-question-map legend { color: #35405a; font-size: .78rem; font-weight: 700; }
.outcome-question-map label { align-items: center; display: flex; flex-direction: row; font-weight: 500; }
.assurance-action-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

/* Every action button on this page was switched to .btn-outline-secondary
   (governance_workspace.html/.js), which has no dedicated :hover rule of
   its own -- the site-wide unscoped .btn-outline-secondary rule above only
   sets the resting state, so Bootstrap's own outline-button hover (a
   generic gray, not the tenant's --secondary-color) took over on hover and
   made the buttons visibly change color. Pin hover/focus/active to the
   same resting color so they no longer shift. */
.assurance-shell .btn-outline-secondary:hover,
.assurance-shell .btn-outline-secondary:focus,
.assurance-shell .btn-outline-secondary:active {
  background-color: var(--secondary-color) !important;
  border-color: var(--secondary-color) !important;
  color: #fff !important;
}
.assurance-table { font-size: .78rem; min-width: 920px; }
.assurance-table th { color: var(--assurance-muted); font-size: .7rem; text-transform: uppercase; }
/* The sitewide unscoped `thead {}` rule (main_system_index.css ~line 2779)
   forces every thead to a purple background with whitesmoke text via
   !important, and this table's own `tr.text-white` markup then forces the
   header text fully white -- on the purple background that combination
   reads as low-contrast/hard to read. Override both back to a plain,
   readable header for this table specifically instead of touching the
   global rule, which other pages may still depend on. */
.assurance-table thead,
.assurance-table thead tr.text-white {
  background: var(--assurance-soft) !important;
  color: var(--assurance-ink) !important;
}
.assurance-table thead th {
  color: var(--assurance-muted) !important;
}
.question-copy { color: var(--assurance-muted); display: block; font-weight: 400; margin-top: 3px; max-width: 310px; }
.assurance-empty { color: var(--assurance-muted); padding: 28px !important; text-align: center; }
.assurance-meta { color: var(--assurance-muted); display: flex; flex-wrap: wrap; font-size: .74rem; gap: 12px; }
.assurance-row { align-items: flex-start; background: #fff; border: 1px solid var(--assurance-line); border-radius: 13px; display: flex; gap: 16px; justify-content: space-between; padding: 16px; }
.assurance-row-main { min-width: 0; }
.assurance-row-title { font-size: .9rem; font-weight: 800; margin-bottom: 5px; }
.assurance-row-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 7px; }
.assurance-reasons { color: #8a341d; font-size: .75rem; margin: 8px 0 0; padding-left: 18px; }
.assurance-code { background: #eef1f7; border-radius: 7px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .72rem; max-width: 100%; overflow-wrap: anywhere; padding: 3px 6px; white-space: pre-wrap; }

.assurance-dialog { border: 0; border-radius: 18px; box-shadow: 0 24px 70px rgba(19, 25, 45, .25); color: var(--assurance-ink); max-height: 88vh; max-width: min(920px, calc(100vw - 30px)); overflow: auto; padding: 24px; width: 100%; }
.assurance-dialog::backdrop { background: rgba(16, 20, 35, .58); }
.assurance-dialog label { color: #35405a; display: grid; font-size: .78rem; font-weight: 700; gap: 6px; margin-bottom: 14px; }
/* The receipt/appeal dialogs inject bare <h2>/<p> markup with no size of
   their own, so they fell back to Bootstrap's ~2rem headings and 1rem body
   text -- far larger than the panels behind them. Use the panel scale. */
.assurance-dialog { font-size: .82rem; }
.assurance-dialog h2 { font-size: 1.3rem; font-weight: 700; margin: 0 0 12px; }
.assurance-dialog form + h2, .assurance-dialog #learner-appeal-form h2 { margin-top: 20px; }
.assurance-dialog p, .assurance-dialog .alert { font-size: .82rem; }
.assurance-dialog .text-sm { font-size: .78rem; }
.assurance-dialog .assurance-card { gap: 6px; padding: 14px 16px; }
.assurance-dialog .assurance-card strong { font-size: .86rem; }
.assurance-dialog .btn { font-size: .8rem; }
.dialog-close-row { display: flex; justify-content: flex-end; }
.assurance-answer { border-top: 1px solid var(--assurance-line); padding: 14px 0; }
.assurance-answer:first-of-type { border-top: 0; }
.assurance-answer blockquote { background: var(--assurance-soft); border-left: 3px solid #a994eb; margin: 8px 0; padding: 10px 12px; white-space: pre-wrap; }
.assurance-receipt-grid { display: grid; gap: 10px 18px; grid-template-columns: minmax(110px, 160px) minmax(0, 1fr); }
.assurance-receipt-grid dt, .assurance-receipt-grid dd { margin: 0; }
.assurance-receipt-grid code { overflow-wrap: anywhere; }

@media (max-width: 991.98px) {
  .assurance-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 767.98px) {
  /* .assurance-shell's own padding-left/right: 12px !important now lives on
     the base rule above and applies at every width, so it doesn't need to
     be repeated here. */
  .assurance-hero { align-items: flex-start; border-radius: 16px; flex-direction: column; padding: 23px 20px; }
  .assurance-hero-actions { align-items: flex-start; }
  .assurance-kpis, .assurance-form-grid, .assurance-two-column, .assurance-three-grid { grid-template-columns: 1fr; }
  .assurance-span-2 { grid-column: auto; }
  .assurance-panel { border-radius: 14px; }
  #accommodation-form { max-width: 100%; }
  .assurance-panel-heading, .assurance-row { align-items: stretch; flex-direction: column; }
  .assurance-row-actions .btn { flex: 1 1 auto; }
  .assurance-receipt-grid { grid-template-columns: 1fr; }
}

/* My Assessment Records mobile layout -- the shared .assurance-shell rules
   above only trim padding; this page also carries Bootstrap's mx-4/px-4
   utility gutters (fixed at every width) on top of that padding, and its
   results table only had a bare .table-responsive scroll. Give it the same
   full-width, overflow-safe treatment Course Insights uses, and turn the
   results table into stacked label/value cards the way the Programme
   Management people table already does, instead of forcing sideways
   scrolling to read one row. Scoped to #learner-assessment-records only --
   the admin governance workspace shares .assurance-shell and is untouched. */
@media (max-width: 767.98px) {
  body:has(#learner-assessment-records) {
    overflow-x: hidden;
  }

  #learner-assessment-records.assurance-shell {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 0.6rem !important;
    padding-right: 0.6rem !important;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  #learner-assessment-records .table-responsive {
    overflow-x: visible;
  }

  #learner-assessment-records .learner-record-table,
  #learner-assessment-records .learner-record-table tbody,
  #learner-assessment-records .learner-record-table tr,
  #learner-assessment-records .learner-record-table td {
    display: block;
    width: 100%;
  }

  #learner-assessment-records .learner-record-table {
    min-width: 0;
    table-layout: auto;
    border-collapse: separate;
    border-spacing: 0;
  }

  #learner-assessment-records .learner-record-table thead {
    display: none;
  }

  #learner-assessment-records .learner-record-table tbody tr {
    display: block;
    margin: 0 0 12px;
    padding: 10px 12px;
    border: 1px solid var(--assurance-line);
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 8px 18px rgba(36, 46, 74, .06);
  }

  /* Label-above-value (not label-left/value-right) because several cells
     hold more than one child node (assessment name + mode subtitle, score
     + status) -- a two-column grid would only place the first value node
     next to the label and wrap the rest onto a phantom second row. */
  #learner-assessment-records .learner-record-table td {
    padding: 8px 0;
    border-bottom: 1px solid var(--assurance-line);
    text-align: left;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  #learner-assessment-records .learner-record-table td:last-child {
    border-bottom: 0;
  }

  #learner-assessment-records .learner-record-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 3px;
    color: var(--assurance-muted);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
  }

  #learner-assessment-records .learner-record-table .assurance-empty::before {
    content: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .assurance-shell *, .assurance-shell *::before, .assurance-shell *::after { scroll-behavior: auto !important; transition: none !important; }
}

/* Shared navigation clearance follows its measured height, including text zoom
   and the device safe area. Keep horizontal scrolling inside the menu. */
@media (max-width: 767.98px) {
  body .home-section.mx-4 {
    padding-bottom: calc(var(--orcaa-bottom-navigation-height, 5rem) + 1rem) !important;
    /* Legacy transition: all must not animate accessibility clearance. */
    transition-property: left, width !important;
  }

  body .sidebar.sidebar-md .orcaa-sidebar-container {
    overscroll-behavior-x: contain;
    scroll-padding-inline: 0.5rem;
    scrollbar-width: thin;
  }

  body .sidebar.sidebar-md .orcaa-sidebar-container:focus-visible,
  body .sidebar.sidebar-md a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: -2px;
  }

  body .sidebar.sidebar-md .programme-icon-label {
    overflow-wrap: anywhere;
  }

  body .home-section .hero-back,
  body .home-section .mobile-back-wrapper,
  body .home-section .mobile-back-btn {
    flex-shrink: 0;
    white-space: nowrap;
    word-break: normal;
  }
}

/* Curriculum reading uses normal flow below the already-offset page shell.
   The global learner hero is fixed and reserves the header a second time. */
@media (max-width: 767.98px) {
  body.curriculum-view-content-page:not(.cv-learning-mode) #curriculum-view-app .mobile-learner-home {
    padding-top: 0 !important;
  }

  body.curriculum-view-content-page:not(.cv-learning-mode) #curriculum-view-app .mobile-learner-hero {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
  }

  body.curriculum-view-content-page #curriculum-view-app .mobile-learner-hero-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 0.75rem;
    padding-right: 0 !important;
  }

  body.curriculum-view-content-page #curriculum-view-app .mobile-learner-hero-header > div:first-child {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  body.curriculum-view-content-page #curriculum-view-app .mobile-learner-hero .mobile-back-wrapper {
    position: static;
    white-space: nowrap;
  }
}

/* Term links reload a filtered curriculum page; do not let shared button widths
   squeeze short labels or force long term names to break inside a word. */
.curriculum-list-page .subject-performance {
  min-width: 0;
}

.curriculum-list-page .subject-performance-scroll {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}

.curriculum-list-page .subject-performance-scroll:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.curriculum-list-page .subject-performance-scroll table {
  width: 100%;
  min-width: 56rem;
}

.curriculum-list-page .subject-performance-scroll th[scope="row"] {
  min-width: 12rem;
  max-width: 24rem;
  overflow-wrap: anywhere;
}

.curriculum-list-page .learner-progress-terms .nav-link {
  width: auto;
  min-width: max-content;
  white-space: nowrap;
  word-break: normal;
  overflow-wrap: normal;
}

@media (max-width: 767.98px) {
  /* The shell already reserves the top navigation. Keep the list hero in flow
     so its height, filters and content cannot reserve that space twice. */
  body.learner-mobile-bootstrap-ui .curriculum-list-page.teacher-subject-curriculum-page {
    padding-top: 0 !important;
  }

  body.learner-mobile-bootstrap-ui .curriculum-list-page > .mobile-learner-hero {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
  }
}

/* ---- Evaluations: clear card edges ---------------------------------------
   Cards across the evaluation screens take the theme's secondary colour, as
   Practicals and the Skills Audit sheet do, so they read against the white
   page instead of vanishing into it. Bootstrap's .border-0, .border-light and
   .shadow-* utilities are !important, so the rules that replace them answer
   in kind; every rule is scoped to an evaluation screen. */
#programme-evaluations-panel,
#evaluation_management,
.skills-reports-page,
.evaluation-report-page,
.learner-evaluations-page {
  --eval-edge: var(--secondary-color, #494c9e);
  --eval-edge-soft: color-mix(in srgb, var(--secondary-color, #494c9e) 45%, #ffffff);
  --eval-line: color-mix(in srgb, var(--secondary-color, #494c9e) 22%, #ffffff);
}

/* Programme page: the overview's workflow cards and the evaluation register. */
#programme-evaluations-panel #programme-evaluations-overview-pane .card {
  border: 2px solid var(--eval-edge) !important;
  box-shadow: none !important;
}
#programme-evaluations-panel #programme-skills-evaluations-pane {
  --border-strong: var(--eval-line);
}
#programme-evaluations-panel #programme-skills-evaluations-pane .table-responsive {
  border: 2px solid var(--eval-edge);
  border-radius: .5rem;
}

/* Evaluation Management, standalone and embedded. */
#evaluation_management > .card {
  border: 2px solid var(--eval-edge) !important;
  box-shadow: none !important;
}

/* Skills Reports and the evaluation report. */
.skills-reports-page .skills-reports-card,
.evaluation-report-page .evaluation-report-table-card {
  border: 2px solid var(--eval-edge) !important;
  box-shadow: none !important;
}
.skills-reports-page .sr-tab-pane .sr-filter-bar {
  border: 2px solid var(--eval-edge-soft);
}
.evaluation-report-page .spec-card {
  border: 2px solid var(--eval-edge);
}

/* A learner's My Evaluations: the list card and the phone cards. */
.learner-evaluations-page > .tab-content > .card,
.learner-evaluations-page .learner-evaluations-mobile-list > .card {
  border: 0 !important;
  box-shadow: none !important;
}

@media (max-width: 767.98px) {
  .learner-evaluation-details-modal .modal-dialog {
    margin: .5rem;
  }

  .learner-evaluation-details-modal .modal-content {
    border-radius: .75rem;
  }

  .learner-evaluation-details-modal .modal-header,
  .learner-evaluation-details-modal .modal-body,
  .learner-evaluation-details-modal .modal-footer {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .learner-evaluation-details-modal .learner-evaluation-activity-cards {
    display: grid;
    gap: .625rem;
  }

  .learner-evaluation-details-modal .learner-evaluation-activity-card {
    padding: .75rem;
    border: 1px solid rgba(73, 76, 158, .16);
    border-radius: .625rem;
    background: #fff;
    box-shadow: 0 .125rem .45rem rgba(35, 31, 75, .07);
  }

  .learner-evaluation-details-modal .learner-evaluation-activity-card .btn {
    min-width: 5.5rem;
  }
}

/* ==========================================================================
   Write Code Challenge page theme (moved from content_creator/static/css/write_code_challenge_theme.css)
   ========================================================================== */
/* Write Code Challenge -- premium re-skin with a light/dark theme toggle.
 * Scoped entirely under #app (the page's existing Vue mount point) so it
 * cannot leak into the rest of the site. Theme state lives on
 * <html data-cc-theme> and is flipped by a small vanilla-JS snippet in the
 * template -- independent of the page's Vue app, so none of the existing
 * grading logic (v-model/@click bindings) changes. */

body.write-code-challenge-theme-page #app {
  --cc-page-bg: #f3f1fb;
  --cc-page-bg-2: #eef2ff;
  --cc-surface: #ffffff;
  --cc-surface-2: #f8f9ff;
  --cc-border: #e6e3f5;
  --cc-text: #201c33;
  --cc-text-muted: #6b6785;
  --cc-primary: #8F469B;
  --cc-secondary: #494C9E;
  --cc-accent: #6918b4;
  --cc-header-grad: linear-gradient(120deg, var(--cc-secondary), var(--cc-primary));
  --cc-good: #22c55e;
  --cc-warn: #f59e0b;
  --cc-bad: #ef4444;
  --cc-shadow: 0 10px 30px rgba(73, 43, 130, .10);
  --cc-editor-bg: #0f1424;
  --cc-editor-bg-2: #161c34;
  --cc-editor-text: #e6e9f5;
  --cc-editor-muted: #7b83a8;
  --cc-editor-border: #262c48;
  background: radial-gradient(120% 140% at 10% -10%, var(--cc-page-bg-2), var(--cc-page-bg) 55%);
  color: var(--cc-text);
  transition: background .25s ease, color .25s ease;
}

/* Keep a gutter between the sidebar card and the themed page panel; without
   it the (dark) panel ran flush against the sidebar. Only the left edge moves;
   the right edge stays where it was. */
@media (min-width: 768px) {
  body.write-code-challenge-theme-page #app {
    margin-left: 1rem;
    width: calc(100% - 1rem);
    border-radius: 12px;
  }
}

html[data-cc-theme="dark"] body.write-code-challenge-theme-page #app {
  --cc-page-bg: #0b0e1a;
  --cc-page-bg-2: #131a30;
  --cc-surface: #141a30;
  --cc-surface-2: #10152a;
  --cc-border: #262c48;
  --cc-text: #e9ecf7;
  --cc-text-muted: #9aa1c4;
  --cc-shadow: 0 10px 34px rgba(0, 0, 0, .45);
  --cc-editor-bg: #0a0e1c;
  --cc-editor-bg-2: #121834;
}

/* ---- theme toggle --------------------------------------------------------
   Layout (flex/position/rounding) is applied as Bootstrap utility classes
   directly on the markup in write_code_challenge.html; only the values
   Bootstrap has no exact match for (theme colors/vars, non-scale sizes,
   the shadow, cursor) live here. */
body.write-code-challenge-theme-page .cc-theme-toggle-wrap {
  margin-bottom: .75rem;
}
/* The toggle names the current theme. Done in CSS because Vue re-renders the
   button's text after the theme script has set it. */
html[data-cc-theme="dark"] body.write-code-challenge-theme-page .cc-theme-label-light,
html:not([data-cc-theme="dark"]) body.write-code-challenge-theme-page .cc-theme-label-dark {
  display: none;
}
/* One line under the Code/Preview tabs that runs the full width, under the
   Run Code button too. */
body.write-code-challenge-theme-page #app .cc-code-shell .cc-code-tabbar {
  border-bottom: 1px solid var(--cc-editor-border);
}
body.write-code-challenge-theme-page .cc-theme-toggle {
  border: 1px solid var(--cc-border);
  background: var(--cc-surface);
  color: var(--cc-text);
  padding: .35rem .6rem .35rem .35rem;
  font-size: .72rem;
  font-weight: 600;
  box-shadow: var(--cc-shadow);
  cursor: pointer;
}
body.write-code-challenge-theme-page .cc-theme-toggle-track {
  width: 38px;
  height: 22px;
  background: linear-gradient(90deg, #cfd3ee, #e8eaf7);
  transition: background .25s ease;
}
html[data-cc-theme="dark"] body.write-code-challenge-theme-page .cc-theme-toggle-track {
  background: linear-gradient(90deg, var(--cc-secondary), var(--cc-primary));
}
body.write-code-challenge-theme-page .cc-theme-toggle-knob {
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  font-size: 10px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .35);
  transition: transform .25s ease;
}
html[data-cc-theme="dark"] body.write-code-challenge-theme-page .cc-theme-toggle-knob { transform: translateX(16px); }

/* ---- generic surfaces ----------------------------------------------------- */
body.write-code-challenge-theme-page #app .card {
  background: var(--cc-surface) !important;
  border-color: var(--cc-border) !important;
  color: var(--cc-text);
  box-shadow: var(--cc-shadow);
}
body.write-code-challenge-theme-page #app .bg-light { background: var(--cc-surface-2) !important; }
body.write-code-challenge-theme-page #app .bg-white { background: var(--cc-surface) !important; }
body.write-code-challenge-theme-page #app .text-dark { color: var(--cc-text) !important; }
body.write-code-challenge-theme-page #app .text-muted,
body.write-code-challenge-theme-page #app .text-secondary { color: var(--cc-text-muted) !important; }
body.write-code-challenge-theme-page #app .border-light-subtle { border-color: var(--cc-border) !important; }
body.write-code-challenge-theme-page #app .list-group-item {
  background: var(--cc-surface);
  color: var(--cc-text);
  border-color: var(--cc-border);
}
body.write-code-challenge-theme-page #app .list-group-item.active {
  background: var(--cc-header-grad);
  border-color: transparent;
  color: #fff;
}
body.write-code-challenge-theme-page #app .nav-tabs { border-color: var(--cc-border); }
/* A site-wide rule paints every .nav-link #111827 with !important, which
   vanishes on the dark theme; these answer in kind so tabs stay readable in
   both themes. */
body.write-code-challenge-theme-page #app .nav-tabs .nav-link { color: var(--cc-text-muted) !important; border: none; font-weight: 600; }
body.write-code-challenge-theme-page #app .nav-tabs .nav-link:hover { color: var(--cc-text) !important; }
body.write-code-challenge-theme-page #app .nav-tabs .nav-link.active {
  color: var(--cc-text) !important;
  background: transparent;
  border-bottom: 2px solid var(--cc-primary) !important;
}

/* ---- IDE-style code pane --------------------------------------------------
   As above: flex/rounding/overflow utilities live on the markup; .cc-code-tabs
   (an unused Code/Preview tab treatment superseded by the standard .nav-tabs
   markup below) was dead CSS with no matching element anywhere, so it's
   dropped rather than converted. */
body.write-code-challenge-theme-page .cc-code-shell {
  border-radius: 14px;
  background: var(--cc-editor-bg);
  border: 1px solid var(--cc-editor-border);
  box-shadow: var(--cc-shadow);
}
body.write-code-challenge-theme-page .cc-code-titlebar {
  gap: .6rem;
  padding: .55rem .9rem;
  background: var(--cc-editor-bg-2);
  border-bottom: 1px solid var(--cc-editor-border);
}
body.write-code-challenge-theme-page .cc-code-dots { gap: 6px; }
body.write-code-challenge-theme-page .cc-code-dots span { width: 10px; height: 10px; }
body.write-code-challenge-theme-page .cc-code-dots span:nth-child(1) { background: #ff5f57; }
body.write-code-challenge-theme-page .cc-code-dots span:nth-child(2) { background: #febc2e; }
body.write-code-challenge-theme-page .cc-code-dots span:nth-child(3) { background: #28c840; }
body.write-code-challenge-theme-page .cc-code-filename {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .72rem;
  color: var(--cc-editor-muted);
}

/* The code shell is always dark (an IDE look, independent of the page's own
   light/dark theme), so its own Code/Preview tabs need their own contrast
   instead of inheriting #app's surface-based nav-tab colors. */
body.write-code-challenge-theme-page #app .cc-code-shell .nav-tabs { border-color: var(--cc-editor-border); }
body.write-code-challenge-theme-page #app .cc-code-shell .nav-tabs .nav-link { color: #c3c8e0 !important; background: transparent !important; }
body.write-code-challenge-theme-page #app .cc-code-shell .nav-tabs .nav-link.active {
  color: #fff !important;
  border-bottom-color: var(--cc-primary);
}

body.write-code-challenge-theme-page #app .code-editor-container {
  background: var(--cc-editor-bg);
  min-height: 360px;
}
body.write-code-challenge-theme-page #app .line-numbers-editor {
  background: var(--cc-editor-bg-2);
  color: var(--cc-editor-muted);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .8rem;
  line-height: 1.55;
  padding: 1rem .6rem;
}
body.write-code-challenge-theme-page #app .code-editor-container textarea {
  color: var(--cc-editor-text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .85rem;
  line-height: 1.55;
  outline: none;
  resize: none;
  caret-color: var(--cc-primary);
}
body.write-code-challenge-theme-page #app .live-preview-iframe {
  background: #fff;
  border: 1px solid var(--cc-border);
  min-height: 360px;
  border-radius: 14px;
  box-shadow: var(--cc-shadow);
}
body.write-code-challenge-theme-page .cc-code-shell .live-preview-iframe {
  border-radius: 0 0 14px 14px;
}

/* ---- rubric grading card --------------------------------------------------- */
body.write-code-challenge-theme-page #app .rubric-grading-card {
  border-radius: 16px;
  border: 1px solid var(--cc-border) !important;
}
body.write-code-challenge-theme-page #app .rubric-grading-card .card-header {
  background: var(--cc-header-grad) !important;
  border: none;
  padding: 1rem 1.1rem;
}
body.write-code-challenge-theme-page #app .rubric-grading-card .card-body { background: var(--cc-surface); padding: 1.25rem; }

body.write-code-challenge-theme-page .rubric-legend-badge {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  font-size: .72rem;
  font-weight: 700;
}
body.write-code-challenge-theme-page .rubric-legend-badge.rating-btn-1 { background: #ef4444; }
body.write-code-challenge-theme-page .rubric-legend-badge.rating-btn-2 { background: #f59e0b; }
body.write-code-challenge-theme-page .rubric-legend-badge.rating-btn-3 { background: #a3a3a3; }
body.write-code-challenge-theme-page .rubric-legend-badge.rating-btn-4 { background: #60a5fa; }
body.write-code-challenge-theme-page .rubric-legend-badge.rating-btn-5 { background: #22c55e; }

body.write-code-challenge-theme-page #app .rating-btn {
  flex: 1 1 0;
  border-radius: 10px;
  border: 1px solid var(--cc-border);
  background: var(--cc-surface-2);
  color: var(--cc-text);
  padding: .5rem 0;
  transition: transform .12s ease, box-shadow .12s ease;
}
body.write-code-challenge-theme-page #app .rating-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0, 0, 0, .12); }
body.write-code-challenge-theme-page #app .rating-btn.active {
  color: #fff;
  border-color: transparent;
}
body.write-code-challenge-theme-page #app .rating-btn.rating-btn-1.active { background: #ef4444; }
body.write-code-challenge-theme-page #app .rating-btn.rating-btn-2.active { background: #f59e0b; }
body.write-code-challenge-theme-page #app .rating-btn.rating-btn-3.active { background: #a3a3a3; }
body.write-code-challenge-theme-page #app .rating-btn.rating-btn-4.active { background: #60a5fa; }
body.write-code-challenge-theme-page #app .rating-btn.rating-btn-5.active { background: #22c55e; }

body.write-code-challenge-theme-page .weighted-score-bar {
  background: var(--cc-surface-2);
  border: 1px solid var(--cc-border);
  border-radius: 12px;
  padding: .75rem 1rem;
}

/* Learner's marked view: one card per criterion that lost marks or
   requirement the automatic check missed, under "Where to improve". */
.cc-improve-item {
  border: 1px solid #e5e7eb;
  border-left: 3px solid #f59e0b;
  border-radius: 10px;
  padding: .6rem .75rem;
}
.cc-improve-lost { color: #b45309; font-weight: 700; }
body.write-code-challenge-theme-page .cc-improve-item {
  background: var(--cc-surface-2);
  border-color: var(--cc-border);
  border-left-color: #f59e0b;
}
body.write-code-challenge-theme-page .cc-improve-lost { color: #f59e0b; }

/* ---- circular weighted-score gauge ----------------------------------------
 * --cc-score (0-100) drives the conic-gradient sweep; color comes from
 * --cc-score-color, both set inline from the existing weightedGradeScore
 * value -- no new Vue state, just a style binding on markup already there. */
body.write-code-challenge-theme-page .cc-score-gauge {
  --cc-score: 0;
  --cc-score-color: #22c55e;
  width: 56px;
  height: 56px;
  background: conic-gradient(var(--cc-score-color) calc(var(--cc-score) * 1%), var(--cc-border) 0);
}
body.write-code-challenge-theme-page .cc-score-gauge-inner {
  width: 44px;
  height: 44px;
  background: var(--cc-surface);
  font-size: .78rem;
  font-weight: 800;
  color: var(--cc-text);
}

/* ---- dark-mode-friendly Bootstrap alerts -----------------------------------
 * Bootstrap's default alert palette is tuned for a white page; left alone
 * in dark mode they'd sit as bright, washed-out rectangles. */
html[data-cc-theme="dark"] body.write-code-challenge-theme-page #app .alert-info {
  background: color-mix(in srgb, #0dcaf0 18%, var(--cc-surface));
  color: #9eeaf9;
  border-color: color-mix(in srgb, #0dcaf0 35%, transparent);
}
html[data-cc-theme="dark"] body.write-code-challenge-theme-page #app .alert-warning {
  background: color-mix(in srgb, #f59e0b 18%, var(--cc-surface));
  color: #fde68a;
  border-color: color-mix(in srgb, #f59e0b 35%, transparent);
}
html[data-cc-theme="dark"] body.write-code-challenge-theme-page #app .alert-success {
  background: color-mix(in srgb, #22c55e 18%, var(--cc-surface));
  color: #bbf7d0;
  border-color: color-mix(in srgb, #22c55e 35%, transparent);
}

/* ---- misc ------------------------------------------------------------------ */
body.write-code-challenge-theme-page #app .rubric-display-container,
body.write-code-challenge-theme-page #app .rubric-pdf-viewer,
body.write-code-challenge-theme-page #app .rubric-download-section { background: var(--cc-surface); border-color: var(--cc-border); }
body.write-code-challenge-theme-page #app .form-control {
  background: var(--cc-surface-2);
  border-color: var(--cc-border);
  color: var(--cc-text);
}
body.write-code-challenge-theme-page #app .form-control:focus {
  border-color: var(--cc-primary);
  box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--cc-primary) 20%, transparent);
}
/* learner_my_evaluations.html no longer renders a .mobile-learner-hero on
   mobile (removed from the template), so the page needs no reserved space
   above the tabs any more -- .academic-page's own small default top padding
   is enough. */

/* "View course" (curriculum_content.html) no longer renders any mobile
   back-button block at all -- the .mobile-learner-hero banner and the
   standalone .mobile-back-wrapper that replaced it were both removed from
   the template. */

/* teacher_subject_curriculum.html (e.g. /admin_operation/teacher_course_curriculum/...):
   keep the learner mobile title/subtitle as a compact card below the shell.
   The action-only hero above it is still available for teacher management
   actions; this card is the learner-facing course context. */
@media (max-width: 767.98px) {
  .teacher-subject-curriculum-page.monitoring-margin-top .mobile-curriculum-header-card {
    /* This card is part of the curriculum page flow. The shared learner shell
       fixes generic heroes below the app bar, which would place this nested
       card underneath the navigation and the curriculum shell. */
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    z-index: 1 !important;
    background: #ffffff !important;
    background-image: none !important;
    color: var(--text-color, #1f2937) !important;
    border: 1px solid rgba(73, 76, 158, 0.16) !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 0.25rem 0.8rem rgba(31, 41, 55, 0.08) !important;
    margin: 0.5rem 0.75rem 0.75rem !important;
    padding: 0.85rem 0.9rem !important;
    width: calc(100% - 1.5rem) !important;
  }

  .teacher-subject-curriculum-page.monitoring-margin-top #teacher-subject-curriculum-app {
    overflow: visible !important;
  }

  .teacher-subject-curriculum-page.monitoring-margin-top .mobile-curriculum-header-card .mobile-hello {
    color: var(--secondary-color, #494c9e) !important;
    font-weight: 700;
    letter-spacing: 0.04em;
    opacity: 1 !important;
  }

  .teacher-subject-curriculum-page.monitoring-margin-top .mobile-curriculum-header-card .mobile-program-name,
  .teacher-subject-curriculum-page.monitoring-margin-top .mobile-curriculum-header-card .mobile-program-subtitle {
    color: #1f2937 !important;
  }

  .teacher-subject-curriculum-page.monitoring-margin-top .mobile-curriculum-header-card .mobile-back-wrapper {
    top: 0.75rem !important;
    right: 0.75rem !important;
  }
}

/* Bootstrap learner shell: keep the nested curriculum context card in the
   page flow at md widths as well as on narrow screens. */
html body.learner-mobile-bootstrap-ui .teacher-subject-curriculum-page.monitoring-margin-top .mobile-curriculum-header-card {
  position: relative !important;
  top: auto !important;
  left: auto !important;
  right: auto !important;
  z-index: 1 !important;
  background: #ffffff !important;
  background-image: none !important;
  color: var(--text-color, #1f2937) !important;
  border: 1px solid rgba(73, 76, 158, 0.16) !important;
  border-radius: 0.75rem !important;
  box-shadow: 0 0.25rem 0.8rem rgba(31, 41, 55, 0.08) !important;
  margin: 0.5rem 0.75rem 0.75rem !important;
  padding: 0.85rem 0.9rem !important;
  width: calc(100% - 1.5rem) !important;
}

html body.learner-mobile-bootstrap-ui .teacher-subject-curriculum-page.monitoring-margin-top #teacher-subject-curriculum-app {
  overflow: visible !important;
}

html body.learner-mobile-bootstrap-ui .teacher-subject-curriculum-page.monitoring-margin-top .mobile-curriculum-header-card .mobile-hello {
  color: var(--secondary-color, #494c9e) !important;
  font-weight: 700;
  letter-spacing: 0.04em;
  opacity: 1 !important;
}

html body.learner-mobile-bootstrap-ui .teacher-subject-curriculum-page.monitoring-margin-top .mobile-curriculum-header-card .mobile-program-name,
html body.learner-mobile-bootstrap-ui .teacher-subject-curriculum-page.monitoring-margin-top .mobile-curriculum-header-card .mobile-program-subtitle {
  color: #1f2937 !important;
}

html body.learner-mobile-bootstrap-ui .teacher-subject-curriculum-page.monitoring-margin-top .mobile-curriculum-header-card .mobile-back-wrapper {
  top: 0.75rem !important;
  right: 0.75rem !important;
}

/* Keep cart and notification counts anchored to the outside top-right of
   their own controls. The older mobile bell rule pulled the count inward
   (right: 18px), which placed it over the bell artwork. */
.app-topnav__actions > button.cart-btn > .app-topnav__nav-count,
.app-topnav__actions #notificationDropdown > .app-topnav__nav-count {
  top: 0.05rem !important;
  right: 0.5rem !important;
  transform: none !important;
}

/* The bell artwork does not fill the whole action control, so place its
   number close to the bell while keeping it outside the glyph. */
.app-topnav__actions #notificationDropdown > .app-topnav__nav-count {
  top: 0.05rem !important;
  right: 0.75rem !important;
}

@media (max-width: 767.98px) {
  .app-topnav__actions > button.cart-btn > .app-topnav__nav-count,
  .app-topnav__actions #notificationDropdown > .app-topnav__nav-count {
    top: -0.15rem !important;
    right: -0.15rem !important;
  }

.app-topnav__actions #notificationDropdown > .app-topnav__nav-count {
  top: 0.1rem !important;
  right: 0.5rem !important;
}
}

/* Learner course cards use the tenant secondary colour for the curriculum
   action. Keep this scoped so other outline-secondary buttons are unchanged. */
body.learner-course-layout #assigned-courses .course_card .mt-auto .learner-course-view-curriculum,
body.learner-course-layout #assigned-courses .course_card .mt-auto .learner-course-view-curriculum:hover,
body.learner-course-layout #assigned-courses .course_card .mt-auto .learner-course-view-curriculum:focus,
body.learner-course-layout #assigned-courses .course_card .mt-auto .learner-course-view-curriculum:active {
  background: var(--secondary-color) !important;
  background-color: var(--secondary-color) !important;
  border-color: var(--secondary-color) !important;
  color: #fff !important;
}

/* Course Insights Gmail-style comment list. */
body.course-insights-page #course-insights-feed {
  display: block !important;
  overflow-x: auto;
  padding-bottom: .25rem;
}

body.course-insights-page .course-insight-row {
  align-items: center;
  background: #fff;
  border-bottom: 1px solid #e5eaf0;
  display: grid;
  gap: .65rem;
  grid-template-columns: 12.5rem minmax(28rem, 1fr) 4.5rem 1.25rem;
  min-width: 49rem;
  padding: .55rem .75rem;
  transition: background-color .12s ease, box-shadow .12s ease;
}

body.course-insights-page .course-insight-row.is-read {
  background: #f1f6fa;
  font-weight: 400;
}

body.course-insights-page .course-insight-row.is-unread {
  background: #fff;
  font-weight: 700;
}

body.course-insights-page .course-insight-row:hover {
  background: #eaf3fb;
  box-shadow: inset 0 1px 0 #d8e7f2, inset 0 -1px 0 #d8e7f2;
}

body.course-insights-page .course-insight-sender {
  align-items: baseline;
  display: flex;
  gap: .4rem;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

body.course-insights-page .course-insight-sender-name {
  overflow: hidden;
  text-overflow: ellipsis;
}

body.course-insights-page .course-insight-sender-role {
  color: #84919d;
  font-size: .7rem;
  font-weight: 400;
}

body.course-insights-page .course-insight-message {
  align-items: center;
  display: flex;
  gap: .45rem;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

body.course-insights-page .course-insight-type-chip {
  background: #e6eef7;
  border-radius: .25rem;
  color: #526b82;
  flex: 0 0 auto;
  font-size: .66rem;
  font-weight: 700;
  padding: .15rem .35rem;
}

body.course-insights-page .course-insight-subject {
  flex: 0 0 auto;
}

body.course-insights-page .course-insight-preview {
  color: #7d8995;
  font-weight: 400;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.course-insights-page .course-insight-expand {
  align-items: center;
  color: #718496;
  display: inline-flex;
  flex: 0 0 auto;
  justify-content: center;
}

body.course-insights-page .course-insight-expand:hover,
body.course-insights-page .course-insight-expand:focus-visible {
  color: var(--primary-color);
}

body.course-insights-page .course-insight-item {
  border-color: #e5eaf0 !important;
}

body.course-insights-page .course-insight-detail {
  padding-right: 3.5rem;
}

body.course-insights-page .course-insight-detail-comment {
  color: #253746;
  font-size: .95rem;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
}

body.course-insights-page .course-insight-time {
  color: #667481;
  font-size: .72rem;
  justify-self: end;
  white-space: nowrap;
}

/* Code-challenge learner rosters (challenge_learners.html and the Practicals
   panel). DataTables 2 right-aligns columns it detects as numeric (No.,
   Attempt) while the next column is left-aligned, and these cells had 1px
   side padding -- so "1" ran into "100.00" and read as a score of 1100.00.
   Align every column the same way and give the cells room. */
table.dataTable.challenge-roster-table > thead > tr > th,
table.dataTable.challenge-roster-table > tbody > tr > td,
table.challenge-roster-table > thead > tr > th,
table.challenge-roster-table > tbody > tr > td {
  padding: 0.5rem 0.75rem !important;
  text-align: left !important;
}

/* Learner session guard overlay. */
.learner-session-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: #fff;
  background: rgba(15, 23, 42, 0.96);
  text-align: center;
  font: 16px system-ui, sans-serif;
}

.learner-session-overlay__content {
  max-width: 480px;
}

.learner-session-overlay h2 {
  margin-bottom: 16px;
}

.learner-session-overlay p {
  line-height: 1.6;
}

/* Keep the guard hidden until learner_session_guard.js explicitly opens it. */
.learner-session-overlay[hidden] {
  display: none !important;
}
