/* Shell and SPM page chrome, aligned with the SPM design canvas.
   SPU palette only: red #e21937 leads; no maroon surfaces, gradients or serif display type. */
body.spu-experience { --brand: #e21937; --brand-anchor: #e21937; --brand-wash: #fbf6ee; --spu-deep: #e21937; --spu-night: #e21937; }

/* Sign-in: SPU red panel, Montserrat, red action (was a maroon gradient with a serif heading). */
body.spu-experience .lg-brand, .lg-brand { background: #e21937 !important; }
body.spu-experience .lg-grid, body.spu-experience .lg-motif { display: none; }
body.spu-experience .lg-inner h1 { font-family: Montserrat, Arial, sans-serif; font-weight: 600; }
body.spu-experience .lg-inner h1::before { content: 'Sol Plaatje University'; letter-spacing: 0; font: 600 14px/1.5 Montserrat, Arial, sans-serif; color: #ffffff; text-transform: none; }
body.spu-experience .lg-inner p, body.spu-experience .lg-chip { color: #ffffff; }
body.spu-experience .lg-head h2, .lg-head h2 { font-family: Montserrat, Arial, sans-serif !important; font-weight: 600 !important; color: #3d3838; }
body.spu-experience .lg-submit, .lg-submit { background: #e21937 !important; border-color: #e21937 !important; color: #ffffff; }
body.spu-experience .lg-submit:hover { filter: none; background: #b5122c !important; }
body.spu-experience .lg-submit:focus-visible { outline: 2px solid #3d3838; }
body.spu-experience .lg-form-side, body.spu-experience .spu-login, body.spu-experience.login-view { background: #ffffff; }
body.spu-experience .lg-field { background: #ffffff; border-color: #e2e2e2; }

/* Sidebar: plain-case captions, no letter-spaced uppercase labels. */
body.spu-experience .sidebar { background: #e21937; }
body.spu-experience .brand-wordmark span, body.spu-experience .nav-caption { text-transform: none; letter-spacing: 0; }
body.spu-experience .nav-caption { font-size: 12px; opacity: 1; color: #ffffff; }
body.spu-experience .nav-button.active { background: #ffffff; color: #e21937; box-shadow: none; }

/* Header actions: SPU red export, quiet icon buttons. */
body.spu-experience .export-button { background: #e21937; border-color: #e21937; color: #ffffff; }
body.spu-experience .export-button:hover { background: #b5122c; border-color: #b5122c; }

/* SPM page chrome as the canvas draws it: underlined section tabs, a Guide link and a full-screen icon,
   and filter pills that open the full filter form. */
body.spu-experience .spmc-shell .spm-toolbar { background: transparent; border: 0; border-bottom: 1px solid #e2e2e2; border-radius: 0; box-shadow: none; padding: 0; flex-direction: row; flex-wrap: wrap; justify-content: flex-start; align-items: flex-end; column-gap: 24px; }
body.spu-experience .spmc-shell .spm-tabs { margin: 0; min-width: 0; max-width: 100%; overflow-x: auto; }
body.spu-experience .spmc-shell .spm-toolbar-tools { margin-left: auto; }
body.spu-experience .spmc-shell .spm-tabs { gap: 28px; }
body.spu-experience .spmc-shell .spm-tabs button { padding: 6px 0 10px; font: 600 15px Montserrat, Arial, sans-serif; color: #3d3838; display: inline-flex; align-items: center; gap: 6px; background: none; border: 0; border-radius: 0; box-shadow: none; }
body.spu-experience .spmc-shell .spm-tabs button::after { left: 0; right: 0; }
body.spu-experience .spmc-shell .spm-tabs button[aria-pressed=true] { color: #e21937; }
body.spu-experience .spmc-shell .spm-tabs button[aria-pressed=true]::after { background: #e21937; }
body.spu-experience .spmc-shell .spm-tabs button:disabled { color: #666; }
body.spu-experience .spmc-shell .spm-tabs small { font: 400 12px Arial, sans-serif; color: #666; margin-left: 0; }
body.spu-experience .spmc-shell .spm-toolbar-tools { gap: 14px; padding: 0 0 8px; }
body.spu-experience .spmc-shell .spm-resources { display: flex; }
body.spu-experience .spmc-shell .spm-resources > summary { border: 0; background: none; padding: 0; color: #3d3838; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
body.spu-experience .spmc-shell .spmc-iconbtn { border: 0; background: none; padding: 0; color: #3d3838; display: inline-flex; cursor: pointer; }
body.spu-experience .spmc-shell .spm-cohort { border: 0; background: transparent; box-shadow: none; position: relative; margin-top: 16px; }
body.spu-experience .spmc-shell .spm-cohort > summary { display: flex; flex-wrap: wrap; gap: 8px; padding: 0; align-items: center; }
body.spu-experience .spmc-fpill { height: 34px; padding: 0 12px 0 14px; box-sizing: border-box; border: 1px solid #e2e2e2; border-radius: 17px; background: #ffffff; font-size: 13px; display: inline-flex; align-items: center; gap: 6px; color: #3d3838; }
body.spu-experience .spmc-fpill.is-set { border-color: #3d3838; }
body.spu-experience .spmc-fpill > span { color: #666; }
body.spu-experience .spmc-fpill.is-more { border-style: dashed; border-color: #bbbbbb; padding: 0 14px; }
body.spu-experience .spmc-shell .spm-cohort[open] > summary .spmc-fpill.is-more { border-style: solid; border-color: #3d3838; }
body.spu-experience .spmc-shell .spm-cohort > form { position: absolute; left: 0; top: 44px; z-index: 25; width: min(960px, 100%); box-sizing: border-box; padding: 20px 22px; background: #ffffff; border: 1px solid #3d3838; border-radius: 8px; }
body.spu-experience .spmc-shell .spm-cohort > form .primary-button { background: #e21937; border-color: #e21937; }

/* On SPM the canvas header line under the title carries the dates. */
body.spu-experience:has(.spm-workspace) #freshness { display: none; }

/* The canvas filter row: pills on the left, the breadcrumb on the right. */
body.spu-experience .spmc-filterrow { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 16px; position: relative; }
body.spu-experience .spmc-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
body.spu-experience .spmc-shell .spmc-filterrow .spm-cohort { margin-top: 0; position: static; }
body.spu-experience .spmc-crumb { display: flex; align-items: center; gap: 8px; font-size: 13px; min-height: 34px; flex-wrap: wrap; min-width: 0; max-width: 100%; }
body.spu-experience .spmc-crumb > span[aria-hidden] { color: #666; }
body.spu-experience .spmc-crumbbtn { border: 0; background: none; padding: 0; color: #b5122c; font: inherit; font-weight: 400; text-decoration: underline; cursor: pointer; }
body.spu-experience .spmc-crumbbtn.is-here, body.spu-experience .spmc-crumb strong { color: #3d3838; font-weight: 700; text-decoration: none; }
body.spu-experience .spmc-crumb .is-prog { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.spu-experience .spmc-crumbclear { margin-left: 4px; width: 24px; height: 24px; padding: 0; border: 1px solid #e2e2e2; border-radius: 12px; background: #ffffff; color: #3d3838; display: flex; align-items: center; justify-content: center; cursor: pointer; }
body.spu-experience .spmc-fcheck { gap: 8px; padding: 0 12px; height: 36px; } /* a label on the canvas, so its border adds 2px */
body.spu-experience .spmc-fcheck i { width: 16px; height: 16px; box-sizing: border-box; border: 1px solid #3d3838; border-radius: 3px; display: inline-flex; align-items: center; justify-content: center; color: transparent; }
body.spu-experience .spmc-fcheck i.is-on { background: #e21937; border-color: #e21937; color: #ffffff; }
body.spu-experience .spmc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Student monitoring's list of students, as the canvas draws it (approved advisors only). */
body.spu-experience .spmc-students-list { padding: 8px clamp(16px, 3.4vw, 48px) 44px; display: flex; flex-direction: column; gap: 16px; }
body.spu-experience .spmc-sl-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; border-top: 1px solid #e2e2e2; padding-top: 32px; }
body.spu-experience .spmc-sl-head h2 { margin: 0; font: 600 22px Montserrat, Arial, sans-serif; color: #3d3838; }
body.spu-experience .spmc-sl-head p { margin: 4px 0 0; font-size: 13px; color: #666; }
body.spu-experience .spmc-sl-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
body.spu-experience .spmc-sl-tabs { display: flex; border: 1px solid #3d3838; border-radius: 18px; overflow: hidden; }
body.spu-experience .spmc-sl-tabs button { height: 34px; padding: 0 14px; border: 0; background: #ffffff; color: #3d3838; font-size: 13px; font-weight: 700; cursor: pointer; }
body.spu-experience .spmc-sl-tabs button[aria-pressed=true] { background: #3d3838; color: #ffffff; }
body.spu-experience .spmc-sl-search { display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px; box-sizing: border-box; border: 1px solid #e2e2e2; border-radius: 8px; background: #ffffff; color: #666; font-size: 13px; position: relative; }
body.spu-experience .spmc-sl-toggle { height: 34px; padding: 0 14px; border: 1px solid #3d3838; border-radius: 18px; background: #ffffff; color: #3d3838; font-size: 13px; font-weight: 700; cursor: pointer; }
body.spu-experience .spmc-sl-toggle[aria-pressed=true] { background: #3d3838; color: #ffffff; }
body.spu-experience .spmc-sl-none { color: #666; }
body.spu-experience .spmc-sl-table td[data-column=support] { white-space: normal; min-width: 150px; }
body.spu-experience .spmc-sl-search input { border: 0; outline: 0; background: none; width: 210px; font-size: 13px; color: #3d3838; padding: 0; }
body.spu-experience .spmc-sl-download { height: 34px; padding: 0 14px; border: 0; border-radius: 8px; background: #e21937; color: #ffffff; font-size: 13px; font-weight: 700; display: flex; align-items: center; gap: 6px; cursor: pointer; }
body.spu-experience .spmc-sl-download:disabled { opacity: .5; cursor: default; }
body.spu-experience .spmc-sl-table { overflow-x: auto; }
body.spu-experience .spmc-sl-table table { width: 100%; border-collapse: collapse; font-size: 13px; }
body.spu-experience .spmc-sl-table th { padding: 8px 10px; border-bottom: 1px solid #3d3838; font-size: 12px; font-weight: 700; color: #666; white-space: nowrap; text-align: left; background: #ffffff; }
body.spu-experience .spmc-sl-table td { padding: 11px 10px; border-bottom: 1px solid #eeeeee; white-space: nowrap; text-align: left; color: #3d3838; background: #ffffff; }
body.spu-experience .spmc-sl-table .is-num { text-align: right; }
body.spu-experience .spmc-sl-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; font-size: 12px; color: #666; }
body.spu-experience .spmc-sl-pages { display: inline-flex; gap: 8px; }
body.spu-experience .spmc-sl-pages button { height: 28px; padding: 0 12px; border: 1px solid #e2e2e2; border-radius: 8px; background: #ffffff; color: #3d3838; font-size: 12px; cursor: pointer; }
body.spu-experience .spmc-sl-pages button:disabled { opacity: .5; cursor: default; }



/* The canvas shell around SPM: sidebar, header and page edges as the canvas draws them. */
@media (min-width: 801px) {
  body.spu-experience:has(.spm-workspace) .sidebar { width: 232px; padding: 24px 16px 20px; gap: 28px; }
  body.spu-experience:has(.spm-workspace):not(.login-view) .app { margin-left: 232px; padding: 0 48px 22px; }
}
@media (max-width: 800px) { body.spu-experience:has(.spm-workspace) .sidebar { padding: 24px 16px 20px; gap: 28px; } }
body.spu-experience:has(.spm-workspace) .sidebar .brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; margin: 0; }
body.spu-experience:has(.spm-workspace) .sidebar .brand-top { flex: 0 0 auto; width: 48px; height: 48px; padding: 0; border-radius: 8px; background: #ffffff; display: flex; align-items: center; justify-content: center; }
body.spu-experience:has(.spm-workspace) .sidebar .brand-top img { width: 40px; height: 40px; object-fit: contain; margin: 0; }
body.spu-experience:has(.spm-workspace) .sidebar .sidebar-toggle { display: none; }
body.spu-experience:has(.spm-workspace) .sidebar .brand-wordmark { display: block; margin: 0; font: 600 15px/1.25 Montserrat, Arial, sans-serif; color: #ffffff; }
body.spu-experience:has(.spm-workspace) .sidebar .brand-wordmark span, body.spu-experience:has(.spm-workspace) .sidebar .brand-wordmark strong { display: inline; font: inherit; color: inherit; letter-spacing: 0; text-transform: none; opacity: 1; }
body.spu-experience:has(.spm-workspace) .sidebar .brand-wordmark span::after { content: ' '; }
body.spu-experience:has(.spm-workspace) .sidebar .page-search { display: flex; align-items: center; gap: 10px; width: 100%; margin: 0; padding: 10px 12px; border: 1px solid #ffffff; border-radius: 8px; background: transparent; color: #ffffff; font-size: 14px; }
body.spu-experience:has(.spm-workspace) .sidebar .page-search span { flex: 1; text-align: left; }
body.spu-experience:has(.spm-workspace) .sidebar .page-search kbd { font: 700 12px Arial, sans-serif; padding: 2px 6px; border: 0; border-radius: 4px; background: #ffffff; color: #b5122c; }
body.spu-experience:has(.spm-workspace) .sidebar .nav-caption { display: none; }
body.spu-experience:has(.spm-workspace) .sidebar .nav { gap: 2px; margin: 0; }
body.spu-experience:has(.spm-workspace) .sidebar .nav-button { gap: 12px; padding: 10px 12px; border-radius: 8px; font-size: 14px; }
body.spu-experience:has(.spm-workspace) .sidebar .nav-button.active { background: #ffffff; color: #b5122c; font-weight: 700; line-height: 1.3; }
body.spu-experience:has(.spm-workspace) .sidebar .sidebar-footer { margin-top: auto; padding: 16px 8px 0; border-top: 1px solid #ffffff; gap: 14px; }
body.spu-experience:has(.spm-workspace) .sidebar .sidebar-avatar { width: 36px; height: 36px; background: #ffffff; color: #b5122c; font: 700 13px Montserrat, Arial, sans-serif; }
body.spu-experience:has(.spm-workspace) .sidebar .sidebar-user span:not(.sidebar-avatar) { font-size: 12px; color: #ffffff; opacity: 1; }

body.spu-experience:has(.spm-workspace) .workspace-bar { height: 26px; min-height: 0; box-sizing: content-box; padding: 20px 0 0; border-bottom: 0; font-size: 12px; line-height: 1.5; }
body.spu-experience:has(.spm-workspace) #density-toggle { line-height: 1.5; }
/* As the canvas: breadcrumb parts 8px apart with a grey "/", and Guide 8px above the tab rule. */
body.spu-experience:has(.spm-workspace) .workspace-bar > span { display: inline-flex; align-items: center; gap: 8px; }
body.spu-experience:has(.spm-workspace) .workspace-bar i { margin: 0; color: #666; }
body.spu-experience:has(.spm-workspace) .topbar { padding: 16px 0 0; align-items: end; }
body.spu-experience:has(.spm-workspace) #page-subtitle { margin-top: 6px; font-size: 13px; line-height: 1.5; color: #666; }
body.spu-experience:has(.spm-workspace) #filters { margin-bottom: 16px; }
body.spu-experience .spmc-shell .spm-tabs button { line-height: 1.5; }
body.spu-experience:has(.spm-workspace) #user-pill { display: none; }
body.spu-experience:has(.spm-workspace) #page-title { font: 600 28px/1.2 Montserrat, Arial, sans-serif; color: #e21937; }
body.spu-experience:has(.spm-workspace) #density-toggle { font-size: 12px; padding: 4px 0; color: #b5122c; }
body.spu-experience:has(.spm-workspace) .top-actions { gap: 8px; }
body.spu-experience:has(.spm-workspace) .top-actions .icon-button { width: 38px; height: 38px; border: 1px solid #e2e2e2; border-radius: 8px; background: #ffffff; color: #3d3838; box-shadow: none; }
body.spu-experience:has(.spm-workspace) .alerts-badge { display: none; }
body.spu-experience:has(.spm-workspace) .top-actions .export-button { height: 38px; padding: 0 16px; border-radius: 8px; font: 700 14px Arial, "Helvetica Neue", sans-serif; gap: 8px; }
body.spu-experience .spmc-shell .spm-tabs button:disabled { color: #666; opacity: 1; }

/* The canvas sections run edge to edge under the filter row. */
body.spu-experience .spm-workspace.spmc-shell { gap: 0; }
body.spu-experience .spmc-shell .spmc-filterrow { margin-top: 15px; }
body.spu-experience .spm-workspace .spmc-profiles, body.spu-experience .spm-workspace .spmc-assess, body.spu-experience .spm-workspace .spmc-students { margin: 20px -48px 0; }
body.spu-experience .spm-workspace .spmc-students-list { margin: 0 -48px; }

/* Header alerts: governed counts behind the bell. */
body.spu-experience .alerts-wrap { position: relative; display: inline-flex; }
body.spu-experience .alerts-wrap .icon-button { position: relative; }
body.spu-experience .alerts-badge { position: absolute; top: -7px; right: -7px; min-width: 20px; height: 20px; padding: 0 5px; box-sizing: border-box; border-radius: 10px; background: #e21937; color: #ffffff; font: 700 11px/20px Arial, sans-serif; text-align: center; }
body.spu-experience .alerts-pop { position: absolute; top: 48px; right: 0; z-index: 30; width: 340px; padding: 16px 18px; box-sizing: border-box; background: #ffffff; border: 1px solid #3d3838; border-radius: 8px; display: flex; flex-direction: column; gap: 12px; text-align: left; font: 13px/1.45 Arial, sans-serif; color: #3d3838; }
body.spu-experience .alerts-pop[hidden] { display: none; }
body.spu-experience .alerts-title { margin: 0; font: 600 15px Montserrat, Arial, sans-serif; }
body.spu-experience .alerts-item { display: grid; grid-template-columns: 48px minmax(0, 1fr); column-gap: 12px; align-items: baseline; padding-top: 12px; border-top: 1px solid #eeeeee; }
body.spu-experience .alerts-item:nth-of-type(1) { padding-top: 0; border-top: 0; }
body.spu-experience .alerts-item strong { font: 700 26px/1 Montserrat, Arial, sans-serif; color: #e21937; }
body.spu-experience .alerts-item + .alerts-item strong { color: #3d3838; }

/* The canvas draws SPM on white. */
body.spu-experience:has(.spm-workspace), body.spu-experience:has(.spm-workspace) main.app, body.spu-experience:has(.spm-workspace) .content { background: #ffffff; }

/* The filter pills wrap at 800px, as the canvas; on phones they wrap inside the 16px gutters. */
body.spu-experience .spmc-filters { min-width: 0; max-width: min(800px, 100%); }
body.spu-experience .spmc-shell .spmc-filterrow .spm-cohort { min-width: 0; max-width: 100%; }
@media (max-width: 800px) {
  body.spu-experience:has(.spm-workspace):not(.login-view) .app { padding: 0 16px 22px; }
  body.spu-experience .spm-workspace .spmc-profiles, body.spu-experience .spm-workspace .spmc-assess, body.spu-experience .spm-workspace .spmc-students { margin: 20px -16px 0; }
  body.spu-experience .spm-workspace .spmc-students-list { margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
  body.spu-experience .spmc-crumb .is-prog { max-width: calc(100vw - 150px) !important; }
}

/* Phones: one-line breadcrumb, a smaller title, tabs that scroll on one line, Guide and full screen under them. */
@media (max-width: 560px) {
  body.spu-experience:has(.spm-workspace) .workspace-bar { padding-top: 14px; height: auto; gap: 10px; }
  body.spu-experience:has(.spm-workspace) .workspace-bar > span { display: block; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  body.spu-experience:has(.spm-workspace) .workspace-bar > div { flex: none; }
  body.spu-experience:has(.spm-workspace) .topbar { padding-top: 12px; gap: 14px; }
  body.spu-experience:has(.spm-workspace) #page-title { font-size: 24px; }
  body.spu-experience .spmc-shell .spm-toolbar { flex-direction: column; align-items: stretch; flex-wrap: nowrap; border-bottom: 0; margin-top: 4px; }
  body.spu-experience .spmc-shell .spm-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; overflow: visible; border-bottom: 1px solid #e2e2e2; }
  body.spu-experience .spmc-shell .spm-tabs button { justify-content: center; text-align: center; font-size: 13px; line-height: 1.3; white-space: normal; padding: 6px 0 10px; }
  body.spu-experience .spmc-shell .spm-tabs small { display: none; }
  body.spu-experience .spmc-shell .spm-toolbar-tools { margin-left: 0; justify-content: flex-end; padding: 10px 0 0; }
  body.spu-experience .spmc-filterrow { margin-top: 10px !important; gap: 10px; }
  body.spu-experience .spmc-crumb .is-prog { max-width: calc(100vw - 150px) !important; }
}
