:root {
  --pmx-student-font: "Noto Sans Lao", sans-serif;
  --pmx-student-sidebar: #0b1220;
  --pmx-student-sidebar-top: #10225f;
  --pmx-student-border: #e2e8f0;
  --pmx-student-text: #0f172a;
  --pmx-student-muted: #64748b;
  --pmx-student-accent: #2563eb;
  --pmx-student-cyan: #22d3ee;
}

html, body, button, input, select, textarea, .navbar, .dropdown-menu, #sidebar, .main-content, .wrap-content, .table {
  font-family: var(--pmx-student-font) !important;
  letter-spacing: 0 !important;
}

body, .main-content, .wrap-content {
  color: var(--pmx-student-text);
  font-size: 14.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.pmx-student-header.navbar {
  height: 72px !important;
  background: rgba(255, 255, 255, 0.96) !important;
  border: 0 !important;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08) !important;
  backdrop-filter: blur(12px);
}

.pmx-student-header .navbar-header,
.pmx-student-header .pmx-header-brandbar,
.pmx-student-header .navbar-collapse {
  min-height: 72px !important;
  background: transparent !important;
  border-color: var(--pmx-student-border) !important;
}

.pmx-student-header .navbar-header a,
.pmx-student-header .navbar-collapse a {
  line-height: normal !important;
}

.pmx-student-header .pmx-brand {
  display: inline-flex !important;
  align-items: center !important;
  gap: 11px;
  height: 72px !important;
  padding: 0 18px !important;
  color: var(--pmx-student-text) !important;
}

.pmx-student-header .pmx-brand-mark,
#sidebar.pmx-student-sidebar .pmx-sidebar-logo {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 42px !important;
  height: 42px !important;
  border-radius: 12px !important;
  background: linear-gradient(135deg, var(--pmx-student-accent), #14b8a6) !important;
  color: #ffffff !important;
  font-weight: 900 !important;
}

.pmx-brand-copy, .pmx-user-meta {
  display: flex !important;
  flex-direction: column !important;
  min-width: 0;
}

.pmx-brand-copy strong {
  color: var(--pmx-student-text) !important;
  font-size: 18px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
}

.pmx-brand-copy small,
.pmx-user-meta small,
.pmx-header-title span {
  color: var(--pmx-student-muted) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1.2 !important;
  text-transform: uppercase;
}

.pmx-header-title {
  float: left !important;
  min-height: 72px !important;
  padding: 15px 0 0 8px !important;
}

.pmx-header-title span,
.pmx-header-title strong {
  display: block !important;
}

.pmx-header-title strong,
.pmx-user-meta strong {
  overflow: hidden !important;
  color: var(--pmx-student-text) !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  line-height: 1.35 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

.pmx-user-nav.navbar-right {
  margin-right: 10px !important;
}

.pmx-current-user > .pmx-user-toggle,
.navbar .navbar-right > li.current-user > a.pmx-user-toggle {
  display: flex !important;
  align-items: center !important;
  gap: 11px;
  min-height: 52px !important;
  margin-top: 10px !important;
  padding: 6px 10px !important;
  border: 1px solid var(--pmx-student-border) !important;
  border-radius: 16px !important;
  background: #ffffff !important;
  color: var(--pmx-student-text) !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.07) !important;
}

.pmx-user-avatar {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 38px !important;
  height: 38px !important;
  flex: 0 0 38px !important;
  border-radius: 12px !important;
  background: #eff6ff !important;
  color: var(--pmx-student-accent) !important;
  font-size: 17px !important;
}

.pmx-user-dropdown.dropdown-menu {
  min-width: 230px !important;
  margin-top: 10px !important;
  padding: 8px !important;
  border: 1px solid var(--pmx-student-border) !important;
  border-radius: 14px !important;
  background: #ffffff !important;
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.16) !important;
}

.pmx-user-dropdown.dropdown-menu > li > a {
  display: flex !important;
  align-items: center !important;
  gap: 10px;
  padding: 10px 12px !important;
  border-radius: 10px !important;
  color: #334155 !important;
  font-weight: 800 !important;
}

.pmx-user-dropdown.dropdown-menu > li > a:hover {
  background: #f1f5f9 !important;
  color: var(--pmx-student-accent) !important;
}

.pmx-cache-refresh {
  float: right !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 7px;
  min-height: 40px !important;
  margin: 16px 10px 0 0 !important;
  padding: 0 13px !important;
  border: 1px solid #dbeafe !important;
  border-radius: 12px !important;
  background: #eff6ff !important;
  color: var(--pmx-student-accent) !important;
  font-size: 13px !important;
  font-weight: 900 !important;
  line-height: 1 !important;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.1) !important;
}

.pmx-cache-refresh:hover,
.pmx-cache-refresh:focus {
  background: var(--pmx-student-accent) !important;
  color: #ffffff !important;
  outline: none !important;
}

.pmx-cache-refresh.is-loading i {
  animation: pmxStudentCacheSpin 700ms linear infinite;
}

@keyframes pmxStudentCacheSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.pmx-cache-refresh-mobile {
  display: none !important;
}

#sidebar.pmx-student-sidebar {
  background: linear-gradient(180deg, var(--pmx-student-sidebar-top) 0%, #111827 58%, var(--pmx-student-sidebar) 100%) !important;
  border-right: 0 !important;
  color: #ffffff !important;
}

#sidebar.pmx-student-sidebar:before,
#sidebar.pmx-student-sidebar nav {
  border-right: 0 !important;
}

#sidebar.pmx-student-sidebar .sidebar-container {
  padding: 12px 12px 14px !important;
}

#sidebar.pmx-student-sidebar .pmx-sidebar-nav {
  display: flex !important;
  flex-direction: column !important;
  min-height: 100% !important;
}

#sidebar.pmx-student-sidebar .pmx-sidebar-profile {
  display: flex !important;
  align-items: center !important;
  gap: 12px;
  margin: 0 0 12px !important;
  padding: 12px !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 8px !important;
  background: rgba(255, 255, 255, 0.06) !important;
}

#sidebar.pmx-student-sidebar .pmx-sidebar-logo {
  width: 38px !important;
  height: 38px !important;
  border-radius: 8px !important;
  box-shadow: none !important;
}

#sidebar.pmx-student-sidebar .pmx-sidebar-profile span,
#sidebar.pmx-student-sidebar .pmx-sidebar-profile strong,
#sidebar.pmx-student-sidebar .navbar-title,
#sidebar.pmx-student-sidebar .pmx-nav-title,
#sidebar.pmx-student-sidebar .item-inner .title,
#sidebar.pmx-student-sidebar > div nav > ul > li > a,
#sidebar.pmx-student-sidebar > div nav > ul li > a {
  color: #ffffff !important;
  opacity: 1 !important;
}

#sidebar.pmx-student-sidebar .pmx-sidebar-profile span {
  color: #bfdbfe !important;
  font-size: 10px !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
}

#sidebar.pmx-student-sidebar .pmx-sidebar-profile strong {
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1.35 !important;
}

#sidebar.pmx-student-sidebar .navbar-title,
#sidebar.pmx-student-sidebar .pmx-nav-title {
  margin: 12px 8px 5px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: #e0f2fe !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  line-height: 1.4 !important;
  text-transform: uppercase !important;
}

#sidebar.pmx-student-sidebar .pmx-nav-title-account,
#sidebar.pmx-student-sidebar .pmx-nav-title-secondary {
  margin-top: 14px !important;
}

#sidebar.pmx-student-sidebar > div nav > ul,
#sidebar.pmx-student-sidebar .pmx-nav-menu,
#sidebar.pmx-student-sidebar .main-navigation-menu {
  margin: 0 0 8px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#sidebar.pmx-student-sidebar > div nav > ul > li,
#sidebar.pmx-student-sidebar > div nav > ul li {
  margin: 2px 0 !important;
  background: transparent !important;
}

#sidebar.pmx-student-sidebar > div nav > ul > li > a,
#sidebar.pmx-student-sidebar > div nav > ul li > a {
  display: block !important;
  min-height: 42px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid transparent !important;
  border-radius: 8px !important;
  background: transparent !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

#sidebar.pmx-student-sidebar > div nav > ul > li > a:hover,
#sidebar.pmx-student-sidebar > div nav > ul > li.active > a {
  border-color: rgba(96, 165, 250, 0.35) !important;
  background: rgba(59, 130, 246, 0.2) !important;
  color: #ffffff !important;
}

#sidebar.pmx-student-sidebar > div nav > ul > li.active > a {
  border-left-color: var(--pmx-student-cyan) !important;
  box-shadow: inset 3px 0 0 var(--pmx-student-cyan) !important;
}

#sidebar.pmx-student-sidebar .item-content {
  display: flex !important;
  align-items: center !important;
  min-height: 42px !important;
  width: 100% !important;
}

#sidebar.pmx-student-sidebar .item-content .item-media {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 38px !important;
  min-width: 38px !important;
  padding: 0 !important;
  color: #38bdf8 !important;
}

#sidebar.pmx-student-sidebar .item-content .item-inner {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px;
  min-width: 0;
  padding: 0 10px 0 0 !important;
  border: 0 !important;
}

#sidebar.pmx-student-sidebar .item-inner .title {
  font-size: 14px !important;
  font-weight: 800 !important;
  line-height: 1.45 !important;
  white-space: normal !important;
}

#sidebar.pmx-student-sidebar .pmx-menu-badge,
#sidebar.pmx-student-sidebar .badge-danger {
  padding: 3px 7px !important;
  border-radius: 999px !important;
  background: #ef4444 !important;
  color: #ffffff !important;
  font-size: 10px !important;
  font-weight: 900 !important;
}

#sidebar.pmx-student-sidebar .pmx-sidebar-bottom {
  margin-top: 0 !important;
  padding-top: 10px !important;
}

#sidebar.pmx-student-sidebar .pmx-sidebar-bottom .pmx-sidebar-logout {
  display: block !important;
  min-height: 44px !important;
  border: 1px solid rgba(248, 113, 113, 0.55) !important;
  border-radius: 8px !important;
  background: #dc2626 !important;
  color: #ffffff !important;
  box-shadow: 0 12px 24px rgba(220, 38, 38, 0.26) !important;
}

#sidebar.pmx-student-sidebar .pmx-sidebar-bottom .pmx-sidebar-logout .item-media,
#sidebar.pmx-student-sidebar .pmx-sidebar-bottom .pmx-sidebar-logout i,
#sidebar.pmx-student-sidebar .pmx-sidebar-bottom .pmx-sidebar-logout .title {
  color: #ffffff !important;
}

#sidebar.pmx-student-sidebar .pmx-sidebar-bottom .pmx-sidebar-logout:hover {
  background: #b91c1c !important;
}

@media (min-width: 992px) {
  .pmx-student-header .navbar-header {
    width: 260px !important;
  }

  .pmx-student-header .navbar-collapse {
    margin-left: 260px !important;
    height: 72px !important;
  }

  #sidebar.pmx-student-sidebar {
    margin-top: 72px !important;
  }

  .app-sidebar-fixed #sidebar.pmx-student-sidebar {
    top: 72px !important;
  }

  .app-sidebar-closed #sidebar.pmx-student-sidebar {
    width: 260px !important;
  }

  .app-sidebar-closed .pmx-student-header .navbar-header {
    width: 260px !important;
  }

  .app-sidebar-closed .pmx-student-header .navbar-collapse,
  .app-sidebar-closed .main-content,
  .app-sidebar-closed footer,
  #app.app-sidebar-closed > footer {
    margin-left: 260px !important;
  }

  .pmx-cache-refresh-desktop {
    display: inline-flex !important;
  }
}

@media (max-width: 991px) {
  .pmx-student-header.navbar {
    position: fixed !important;
  }

  .pmx-student-header .pmx-header-brandbar {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
  }

  .pmx-student-header .sidebar-mobile-toggler {
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    width: 42px !important;
    height: 42px !important;
    margin: 15px 8px !important;
    padding: 0 !important;
    border: 1px solid var(--pmx-student-border) !important;
    border-radius: 12px !important;
    background: #ffffff !important;
    color: var(--pmx-student-accent) !important;
    box-shadow: none !important;
  }

  .pmx-student-header .navbar .navbar-header .sidebar-mobile-toggler > i,
  .pmx-student-header .sidebar-mobile-toggler > i {
    position: static !important;
    z-index: auto !important;
  }

  .pmx-student-header .pmx-brand {
    flex: 1 1 auto !important;
    min-width: 0 !important;
    padding-left: 6px !important;
  }

  .pmx-student-header .navbar-collapse {
    display: none !important;
  }

  .pmx-cache-refresh-desktop {
    display: none !important;
  }

  .pmx-cache-refresh-mobile {
    display: inline-flex !important;
    width: 42px !important;
    min-width: 42px !important;
    height: 42px !important;
    min-height: 42px !important;
    margin: 0 10px 0 0 !important;
    padding: 0 !important;
    border-radius: 12px !important;
    box-shadow: none !important;
  }

  .pmx-cache-refresh-mobile span {
    display: none !important;
  }

  #sidebar.pmx-student-sidebar {
    width: 280px !important;
    min-height: 0 !important;
    transform: translate3d(-280px, 0, 0) !important;
    box-shadow: none !important;
    filter: none !important;
  }

  .app-slide-off #sidebar.pmx-student-sidebar {
    transform: translate3d(0, 0, 0) !important;
    box-shadow: none !important;
  }

  #app.app-slide-off > .app-content,
  #app.app-slide-off > footer,
  .app-slide-off .navbar,
  .app-slide-off .main-content {
    box-shadow: none !important;
    filter: none !important;
  }

  .main-content {
    padding-top: 72px !important;
  }
}

@media (max-width: 480px) {
  .pmx-brand-copy small,
  .pmx-header-title {
    display: none !important;
  }

  .pmx-brand-copy strong {
    font-size: 16px !important;
  }
}
/* Student shell compact header/sidebar spacing */
.pmx-student-header.navbar {
  height: 62px !important;
}

.pmx-student-header .navbar-header,
.pmx-student-header .pmx-header-brandbar,
.pmx-student-header .navbar-collapse {
  min-height: 62px !important;
}

.pmx-student-header .pmx-brand {
  height: 62px !important;
  padding: 0 16px !important;
}

.pmx-student-header .pmx-brand-mark {
  width: 38px !important;
  height: 38px !important;
  border-radius: 10px !important;
}

.pmx-brand-copy strong {
  font-size: 17px !important;
}

.pmx-brand-copy small {
  font-size: 10px !important;
}

.pmx-header-title {
  min-height: 62px !important;
  padding-top: 11px !important;
}

.pmx-current-user > .pmx-user-toggle,
.navbar .navbar-right > li.current-user > a.pmx-user-toggle {
  min-height: 46px !important;
  margin-top: 8px !important;
}

.pmx-user-avatar {
  width: 34px !important;
  height: 34px !important;
  flex-basis: 34px !important;
}

.pmx-cache-refresh {
  min-height: 36px !important;
  margin-top: 13px !important;
}

@media (min-width: 992px) {
  .pmx-student-header .navbar-collapse {
    height: 62px !important;
  }

  #sidebar.pmx-student-sidebar {
    margin-top: 62px !important;
  }

  .app-sidebar-fixed #sidebar.pmx-student-sidebar {
    top: 62px !important;
  }
}

#sidebar.pmx-student-sidebar .sidebar-container {
  padding-top: 10px !important;
}

#sidebar.pmx-student-sidebar .pmx-sidebar-profile {
  margin-bottom: 9px !important;
  padding: 10px 11px !important;
}

#sidebar.pmx-student-sidebar .pmx-sidebar-logo {
  width: 34px !important;
  height: 34px !important;
}

#sidebar.pmx-student-sidebar .navbar-title,
#sidebar.pmx-student-sidebar .pmx-nav-title {
  margin: 9px 8px 4px !important;
}

#sidebar.pmx-student-sidebar .pmx-nav-title-account,
#sidebar.pmx-student-sidebar .pmx-nav-title-secondary {
  margin-top: 11px !important;
}

#sidebar.pmx-student-sidebar > div nav > ul,
#sidebar.pmx-student-sidebar .pmx-nav-menu,
#sidebar.pmx-student-sidebar .main-navigation-menu {
  margin-bottom: 6px !important;
}

@media (max-width: 991px) {
  .pmx-student-header .sidebar-mobile-toggler,
  .pmx-cache-refresh-mobile {
    width: 38px !important;
    min-width: 38px !important;
    height: 38px !important;
    min-height: 38px !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }

  .main-content {
    padding-top: 62px !important;
  }
}

/* Student sidebar top alignment: remove excessive blank space */
@media (min-width: 992px) {
  #sidebar.pmx-student-sidebar {
    margin-top: 0 !important;
    padding-top: 0 !important;
  }

  .app-sidebar-fixed #sidebar.pmx-student-sidebar {
    top: 62px !important;
  }

  .app-navbar-fixed #sidebar.pmx-student-sidebar {
    margin-top: 0 !important;
  }
}

#sidebar.pmx-student-sidebar .sidebar-container {
  padding-top: 8px !important;
}

#sidebar.pmx-student-sidebar .pmx-sidebar-profile {
  margin-top: 0 !important;
  margin-bottom: 8px !important;
}

#sidebar.pmx-student-sidebar .pmx-sidebar-nav {
  padding-top: 0 !important;
}

#sidebar.pmx-student-sidebar .navbar-title:first-of-type,
#sidebar.pmx-student-sidebar .pmx-nav-title:first-of-type {
  margin-top: 8px !important;
}

/* PMX student fixed header alignment */
:root {
  --pmx-student-fixed-header-height: 62px;
  --pmx-student-fixed-sidebar-width: 260px;
}

body #app .pmx-student-header.navbar,
body #app > .app-content > .pmx-student-header.navbar {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  height: var(--pmx-student-fixed-header-height) !important;
  min-height: var(--pmx-student-fixed-header-height) !important;
  margin: 0 !important;
  z-index: 1060 !important;
}

body #app > .app-content {
  padding-top: var(--pmx-student-fixed-header-height) !important;
}

body #app .main-content {
  margin-top: 0 !important;
  padding-top: 10px !important;
}

@media (min-width: 992px) {
  body #app #sidebar.pmx-student-sidebar,
  body.app-sidebar-fixed #app #sidebar.pmx-student-sidebar,
  body.app-navbar-fixed #app #sidebar.pmx-student-sidebar {
    top: var(--pmx-student-fixed-header-height) !important;
    margin-top: 0 !important;
  }

  body #app .pmx-student-header .navbar-header {
    width: var(--pmx-student-fixed-sidebar-width) !important;
  }

  body #app .pmx-student-header .navbar-collapse {
    margin-left: var(--pmx-student-fixed-sidebar-width) !important;
    height: var(--pmx-student-fixed-header-height) !important;
  }
}

@media (max-width: 991px) {
  body #app > .app-content {
    padding-top: var(--pmx-student-fixed-header-height) !important;
  }

  body #app .pmx-student-header.navbar {
    left: 0 !important;
  }

  body #app .main-content {
    padding-top: 8px !important;
  }
}
/* PMX student fixed header compact content spacing */
body.app-navbar-fixed,
body.app-navbar-fixed.app-sidebar-fixed {
  padding-top: 0 !important;
}

body #app > .app-content {
  padding-top: var(--pmx-student-fixed-header-height) !important;
}

body #app .main-content {
  margin-top: 0 !important;
  padding-top: 12px !important;
}

body #app .main-content .wrap-content.container,
body #app .main-content > .container {
  padding-top: 0 !important;
}

body #app .page-header,
body #app .pmx-page-hero,
body #app .dashboard-hero {
  margin-top: 0 !important;
}

@media (min-width: 992px) {
  body #app #sidebar.pmx-student-sidebar,
  body.app-navbar-fixed #app #sidebar.pmx-student-sidebar,
  body.app-sidebar-fixed #app #sidebar.pmx-student-sidebar {
    top: var(--pmx-student-fixed-header-height) !important;
    margin-top: 0 !important;
  }
}

@media (max-width: 991px) {
  body #app .main-content {
    padding-top: 10px !important;
  }
}
/* Keep fixed header spacing on content only, not the whole app-content. */
body #app > .app-content {
  padding-top: 0 !important;
}

body #app .main-content {
  padding-top: calc(var(--pmx-student-fixed-header-height) + 10px) !important;
  margin-top: 0 !important;
}

@media (max-width: 991px) {
  body #app .main-content {
    padding-top: calc(var(--pmx-student-fixed-header-height) + 8px) !important;
  }
}
/* Tighten fixed-header top gap for student pages. */
body #app > .app-content {
  padding-top: 0 !important;
}

body #app .main-content,
body.app-navbar-fixed #app .main-content,
body.app-sidebar-fixed #app .main-content {
  margin-top: 0 !important;
  padding-top: calc(var(--pmx-student-fixed-header-height) + 6px) !important;
}

body #app .main-content .wrap-content.container,
body #app .main-content > .container,
body #app .wrap-content.container {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

body #app .main-content .page-header,
body #app .main-content .pmx-page-hero,
body #app .main-content .dashboard-hero,
body #app .main-content [class*="hero"]:first-child {
  margin-top: 0 !important;
}

@media (max-width: 991px) {
  body #app .main-content,
  body.app-navbar-fixed #app .main-content,
  body.app-sidebar-fixed #app .main-content {
    padding-top: calc(var(--pmx-student-fixed-header-height) + 4px) !important;
  }
}
/* Final top-gap correction: content should sit close under the fixed header. */
body #app > .app-content {
  padding-top: 0 !important;
}

body #app .main-content,
body.app-navbar-fixed #app .main-content,
body.app-sidebar-fixed #app .main-content {
  margin-top: 0 !important;
  padding-top: 8px !important;
}

body #app .main-content .wrap-content.container,
body #app .main-content > .container,
body #app .wrap-content.container {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

@media (max-width: 991px) {
  body #app .main-content,
  body.app-navbar-fixed #app .main-content,
  body.app-sidebar-fixed #app .main-content {
    padding-top: 6px !important;
  }
}
/* Mobile viewport fix: content must not be clipped by the slide sidebar shell. */
@media (max-width: 991px) {
  html,
  body,
  #app,
  body #app > .app-content,
  body #app .main-content,
  body #app .wrap-content {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  body #app > .app-content,
  body #app.app-slide-off > .app-content {
    position: relative !important;
    left: 0 !important;
    right: auto !important;
    transform: none !important;
    -webkit-transform: none !important;
    box-shadow: none !important;
  }

  body #app.app-slide-off > .app-content::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 1040;
    background: rgba(15, 23, 42, 0.32);
    pointer-events: none;
  }

  body #app .main-content {
    margin-left: 0 !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body #app .main-content .wrap-content.container,
  body #app .main-content > .container,
  body #app .wrap-content.container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 12px !important;
    padding-right: 12px !important;
  }

  body #app .page-header,
  body #app .pmx-page-hero,
  body #app .dashboard-hero,
  body #app .panel,
  body #app .card,
  body #app .recent-students,
  body #app .stats-grid,
  body #app .row {
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body #app .row {
    overflow-x: hidden !important;
  }
}
/* Mobile hard clamp: prevent right-side clipping on student pages. */
@media (max-width: 767px) {
  html,
  body {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  body #app,
  body #app > .app-content,
  body #app .main-content,
  body #app .wrap-content,
  body #app .wrap-content.container,
  body #app .main-content > .container {
    width: 100vw !important;
    max-width: 100vw !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    left: 0 !important;
    right: auto !important;
    transform: none !important;
    -webkit-transform: none !important;
    box-sizing: border-box !important;
  }

  body #app > .app-content,
  body #app.app-slide-off > .app-content {
    position: relative !important;
    overflow: visible !important;
  }

  body #app .main-content .wrap-content.container,
  body #app .main-content > .container,
  body #app .wrap-content.container {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  body #app .row {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body #app [class*="col-"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body #app .panel,
  body #app .card,
  body #app .well,
  body #app .tabbable,
  body #app .tab-content,
  body #app .tab-pane,
  body #app form,
  body #app .form-group,
  body #app .form-control,
  body #app select,
  body #app input,
  body #app textarea,
  body #app .page-header,
  body #app .pmx-page-hero,
  body #app .dashboard-hero {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }

  body #app .tabbable,
  body #app .tab-content,
  body #app .panel,
  body #app .card {
    overflow: visible !important;
  }

  body #app .nav-tabs {
    display: flex !important;
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    white-space: nowrap !important;
    -webkit-overflow-scrolling: touch;
  }

  body #app .nav-tabs > li {
    flex: 0 0 auto !important;
  }
}
/* Mobile final correction: use parent width instead of 100vw so content is not clipped. */
@media (max-width: 767px) {
  html,
  body,
  #app {
    width: 100% !important;
    max-width: 100% !important;
    overflow-x: hidden !important;
  }

  body #app > .app-content,
  body #app.app-slide-off > .app-content,
  body #app .main-content,
  body #app .wrap-content,
  body #app .wrap-content.container,
  body #app .main-content > .container {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    transform: none !important;
    -webkit-transform: none !important;
    box-sizing: border-box !important;
  }

  body #app > .app-content,
  body #app .main-content {
    overflow-x: hidden !important;
  }

  body #app .main-content {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  body #app .main-content .wrap-content.container,
  body #app .main-content > .container,
  body #app .wrap-content.container {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body #app .row {
    width: auto !important;
    max-width: none !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  body #app [class*="col-"] {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  body #app .page-header,
  body #app .pmx-page-hero,
  body #app .dashboard-hero,
  body #app .panel,
  body #app .card,
  body #app .well,
  body #app .tabbable,
  body #app .tab-content,
  body #app .tab-pane,
  body #app form,
  body #app .form-group,
  body #app .alert,
  body #app .stats-grid,
  body #app .recent-students {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    box-sizing: border-box !important;
    overflow-wrap: anywhere;
  }

  body #app .table-responsive,
  body #app .nav-tabs {
    max-width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    -webkit-overflow-scrolling: touch;
  }

  body #app table {
    max-width: none !important;
  }
}
/* Mobile fixed-header overlap fix: content starts below the 62px student header. */
@media (max-width: 767px) {
  body #app > .app-content,
  body #app.app-slide-off > .app-content {
    padding-top: 0 !important;
  }

  body #app .main-content,
  body.app-navbar-fixed #app .main-content,
  body.app-sidebar-fixed #app .main-content {
    margin-top: 0 !important;
    padding-top: calc(var(--pmx-student-fixed-header-height) + 6px) !important;
  }

  body #app .main-content .wrap-content.container,
  body #app .main-content > .container,
  body #app .wrap-content.container {
    padding-top: 0 !important;
  }

  body #app .page-header-custom,
  body #app .page-header,
  body #app .pmx-page-hero,
  body #app .dashboard-hero {
    margin-top: 0 !important;
  }
}
/* Student mobile sidebar must overlay content, not sit behind or beside it. */
@media (max-width: 991px) {
  body #app #sidebar.pmx-student-sidebar {
    position: fixed !important;
    top: var(--pmx-student-fixed-header-height) !important;
    left: 0 !important;
    bottom: 0 !important;
    width: min(82vw, 286px) !important;
    height: calc(100vh - var(--pmx-student-fixed-header-height)) !important;
    max-height: calc(100vh - var(--pmx-student-fixed-header-height)) !important;
    margin: 0 !important;
    z-index: 1055 !important;
    transform: translate3d(-105%, 0, 0) !important;
    -webkit-transform: translate3d(-105%, 0, 0) !important;
    transition: transform 220ms ease !important;
    box-shadow: 18px 0 40px rgba(15, 23, 42, 0.28) !important;
    overflow: hidden !important;
  }

  body #app.app-slide-off #sidebar.pmx-student-sidebar,
  body.app-slide-off #app #sidebar.pmx-student-sidebar {
    transform: translate3d(0, 0, 0) !important;
    -webkit-transform: translate3d(0, 0, 0) !important;
  }

  body #app #sidebar.pmx-student-sidebar .sidebar-container {
    height: 100% !important;
    max-height: 100% !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch;
  }

  body #app > .app-content,
  body #app.app-slide-off > .app-content {
    position: relative !important;
    z-index: 1 !important;
    transform: none !important;
    -webkit-transform: none !important;
    margin-left: 0 !important;
  }

  body #app.app-slide-off > .app-content::before {
    content: '';
    position: fixed;
    top: var(--pmx-student-fixed-header-height);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1045;
    background: rgba(15, 23, 42, 0.34);
    pointer-events: none;
  }

  body #app .pmx-student-header.navbar {
    z-index: 1060 !important;
  }
}
/* Keep the mobile menu in natural flow and inside the visible viewport. */
@media (max-width: 991px) {
  body #app #sidebar.pmx-student-sidebar {
    height: calc(100dvh - var(--pmx-student-fixed-header-height)) !important;
    max-height: calc(100dvh - var(--pmx-student-fixed-header-height)) !important;
  }

  body #app #sidebar.pmx-student-sidebar .sidebar-container {
    box-sizing: border-box !important;
    padding-bottom: max(14px, env(safe-area-inset-bottom)) !important;
  }

  body #app #sidebar.pmx-student-sidebar .pmx-sidebar-nav {
    min-height: 0 !important;
  }

  body #app #sidebar.pmx-student-sidebar .pmx-sidebar-nav > * {
    flex-shrink: 0;
  }

  body #app #sidebar.pmx-student-sidebar .pmx-sidebar-bottom {
    padding-top: 4px !important;
  }
}
/* Shared typography for all student push notification dialogs. */
.swal2-popup.pmx-push-dialog {
  font-family: var(--pmx-student-font) !important;
}

.swal2-popup.pmx-push-dialog .swal2-title {
  font-size: 20px !important;
  line-height: 1.5 !important;
}

.swal2-popup.pmx-push-dialog .swal2-html-container {
  font-size: 14px !important;
  line-height: 1.7 !important;
}

.swal2-popup.pmx-push-dialog .swal2-actions button {
  font-family: inherit !important;
  font-size: 14px !important;
  min-height: 44px;
}

@media (max-width: 767px) {
  .swal2-popup.pmx-push-dialog .swal2-title {
    font-size: 18px !important;
  }

  .swal2-popup.pmx-push-dialog .swal2-html-container {
    font-size: 13px !important;
  }

  .swal2-popup.pmx-push-dialog .swal2-actions button {
    font-size: 13px !important;
  }
}
/* Scale the complete icon, including success/error details, proportionally. */
.swal2-popup.pmx-push-dialog .swal2-icon {
  font-size: 10px !important;
  margin: 20px auto 8px !important;
}

.swal2-popup.pmx-push-dialog .swal2-title {
  padding-top: 8px !important;
}

.swal2-popup.pmx-push-dialog .swal2-html-container {
  margin-top: 12px !important;
}

.swal2-popup.pmx-push-dialog .swal2-actions {
  margin-top: 18px !important;
}
.pmx-pwa-install {
  margin: 0 0 24px;
  padding: 16px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
  color: #334155;
}
.pmx-pwa-install[hidden], .pmx-pwa-install button[hidden] { display: none !important; }
.pmx-pwa-install h2 { margin: 0 0 8px; font-size: 16px; line-height: 1.6; font-weight: 700; color: #1e40af; }
.pmx-pwa-install p { font-size: 13px; line-height: 1.8; overflow-wrap: anywhere; }
.pmx-pwa-install button { min-height: 44px; white-space: normal; }
/* Native scrolling avoids legacy wheel/touch interception across browsers. */
body #app #sidebar.pmx-student-sidebar {
  position: fixed !important;
  top: var(--pmx-student-fixed-header-height, 62px) !important;
  bottom: 0 !important;
  margin-top: 0 !important;
  height: calc(100vh - var(--pmx-student-fixed-header-height, 62px)) !important;
  max-height: calc(100vh - var(--pmx-student-fixed-header-height, 62px)) !important;
  overflow: hidden !important;
}
@supports (height: 100dvh) {
  body #app #sidebar.pmx-student-sidebar {
    height: calc(100dvh - var(--pmx-student-fixed-header-height, 62px)) !important;
    max-height: calc(100dvh - var(--pmx-student-fixed-header-height, 62px)) !important;
  }
}
body #app #sidebar.pmx-student-sidebar > .pmx-native-sidebar-scroll {
  position: relative !important;
  top: auto !important;
  bottom: auto !important;
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
  box-sizing: border-box !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y pinch-zoom;
  padding-bottom: 24px !important;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px)) !important;
  scrollbar-width: thin;
  scrollbar-color: #7890c5 #101c36;
}
body #app #sidebar.pmx-student-sidebar .pmx-sidebar-nav {
  display: block !important;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}
.pmx-native-sidebar-scroll::-webkit-scrollbar { width: 7px; }
.pmx-native-sidebar-scroll::-webkit-scrollbar-thumb { background: #7890c5; border-radius: 8px; }
.pmx-native-sidebar-scroll:focus-visible { outline: 2px solid #38bdf8; outline-offset: -2px; }
/* One scroll owner: the visible sidebar itself, never a clipped inner panel. */
body #app #sidebar.pmx-student-sidebar {
  box-sizing: border-box !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y pinch-zoom;
  scrollbar-width: thin;
  scrollbar-color: #7890c5 #101c36;
}
body #app #sidebar.pmx-student-sidebar > .pmx-native-sidebar-scroll {
  height: auto !important;
  max-height: none !important;
  min-height: 100% !important;
  overflow: visible !important;
  padding-bottom: 40px !important;
  padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px)) !important;
}
body #app #sidebar.pmx-student-sidebar .pmx-sidebar-bottom {
  position: static !important;
  float: none !important;
  clear: both;
  margin-bottom: 0 !important;
  padding-top: 16px !important;
}
body #app #sidebar.pmx-student-sidebar .pmx-sidebar-logout {
  min-height: 48px !important;
}
body #app #sidebar.pmx-student-sidebar::-webkit-scrollbar { width: 7px; }
body #app #sidebar.pmx-student-sidebar::-webkit-scrollbar-thumb { background: #7890c5; border-radius: 8px; }
/* Keep logout outside the scrolling menu so it is always reachable. */
body #app #sidebar.pmx-student-sidebar {
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
body #app #sidebar.pmx-student-sidebar > .pmx-native-sidebar-scroll {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  height: auto !important;
  max-height: 100% !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding-bottom: 20px !important;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}
body #app #sidebar.pmx-student-sidebar > .pmx-sidebar-bottom {
  flex: 0 0 auto !important;
  height: auto !important;
  min-height: 0 !important;
  box-sizing: border-box !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 12px !important;
  padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)) !important;
  background: #0b1220 !important;
  border-top: 1px solid rgba(255,255,255,.15);
}
body #app #sidebar.pmx-student-sidebar > .pmx-sidebar-bottom .pmx-sidebar-logout {
  display: flex !important;
  align-items: center;
  justify-content: center;
  min-height: 48px !important;
}
/* Reserve a fixed footer slot even when legacy sidebar flex rules are loaded. */
body #app #sidebar.pmx-student-sidebar {
  display: block !important;
}
body #app #sidebar.pmx-student-sidebar > .pmx-native-sidebar-scroll {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 80px !important;
  bottom: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}
body #app #sidebar.pmx-student-sidebar > .pmx-sidebar-bottom {
  display: block !important;
  position: absolute !important;
  top: auto !important;
  bottom: 0 !important;
  left: 0 !important;
  right: 0 !important;
  height: 80px !important;
  height: calc(80px + env(safe-area-inset-bottom, 0px)) !important;
  min-height: 80px !important;
  z-index: 2;
  visibility: visible !important;
}
body #app #sidebar.pmx-student-sidebar > .pmx-sidebar-bottom .pmx-sidebar-logout {
  width: 100%;
  height: 48px !important;
  padding: 8px 12px !important;
  box-sizing: border-box;
  color: #fff !important;
  background: #dc2626 !important;
}
/* Use the existing school logo without cropping or a letter-badge background. */
.pmx-student-header .pmx-brand-mark.pmx-brand-image {
  object-fit: contain;
  flex-shrink: 0;
  background: transparent !important;
  border-radius: 0 !important;
}

/* Equal mobile header controls, with an 8px space between them. */
@media (max-width: 991px) {
  .pmx-student-header .pmx-student-push-mobile,
  .pmx-student-header .pmx-cache-refresh-mobile {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    align-self: center !important;
    flex: 0 0 46px !important;
    width: 46px !important;
    min-width: 46px !important;
    height: 46px !important;
    min-height: 46px !important;
    box-sizing: border-box !important;
    padding: 0 !important;
    margin: 0 !important;
    border-radius: 12px !important;
  }
  .pmx-student-header .pmx-student-push-mobile {
    margin-right: 8px !important;
  }
  .pmx-student-header .pmx-cache-refresh-mobile {
    margin-right: 10px !important;
  }
  .pmx-student-header .pmx-student-push-mobile .pmx-student-push-copy {
    display: none !important;
  }
  .pmx-student-header .pmx-cache-refresh-mobile > i,
  .pmx-student-header .pmx-student-push-mobile .pmx-student-push-icon > i {
    font-size: 20px !important;
  }
}
