@import url("https://api.fontshare.com/v2/css?f[]=general-sans@400,500,600,700&display=swap");

:root {
  --font-sans: "General Sans", "Avenir Next", "Segoe UI", Arial, sans-serif;
  --sidebar-bg: #234b9a;
  --surface: #ffffff;
  --row-alt: #ececec;
  --text: #151515;
  --muted: #f7f7f7;
  --accent: #ff4d22;
  --students-blue: #0069b7;
  --students-blue-dark: #0069b7;
  --students-soft: #edf2f8;
  --border: #d8d8d8;
  --shadow: 0 18px 45px rgba(16, 29, 61, 0.12);
  --sidebar-width: clamp(216px, 20vw, 300px);
  --workspace-padding-block: clamp(20px, 3.5vh, 48px);
  --workspace-padding-inline: clamp(20px, 2.5vw, 48px);
}

* {
  box-sizing: border-box;
}

html {
  font-family: var(--font-sans);
}

button,
input,
select,
textarea {
  font-family: inherit;
}

body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  font-family: var(--font-sans);
  font-size: 15px;
  color: var(--text);
  overflow-x: clip;
  background:
    radial-gradient(circle at top left, #f7f7f7, #eceef5 42%, #dde3ef 100%);
}

body[data-page="login"] {
  background:
    radial-gradient(circle at top left, #2a5bbc 0%, #17366f 38%, #0c172f 100%);
}

body:not([data-page="login"]) {
  height: 100vh;
  overflow: hidden;
}

.page-load-error {
  width: min(480px, calc(100% - 40px));
  margin: 15vh auto 0;
  padding: 32px;
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

.page-load-error h1 {
  font-size: 24px;
}

a {
  color: inherit;
  text-decoration: none;
}

.layout {
  display: grid;
  grid-template-columns: minmax(0, 335px) minmax(0, 1fr);
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
  overflow-x: clip;
  transition: grid-template-columns 180ms ease;
}

.sidebar {
  background: linear-gradient(180deg, #244f9f 0%, #1d3f84 100%);
  color: #fff;
  padding: 56px 38px 42px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
}

.sidebar-logo {
  position: absolute;
  top: 22px;
  left: 22px;
  width: 151px;
  max-height: 95px;
  object-fit: contain;
}

.avatar {
  width: 182px;
  height: 182px;
  border-radius: 50%;
  background: #fff;
  margin: 96px 0 18px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}

.profile-name {
  font-size: 1.95rem;
  line-height: 1;
  margin: 0;
  font-weight: 500;
}

.profile-role {
  margin: 6px 0 64px;
  font-size: 0.84rem;
  letter-spacing: 0.08em;
  opacity: 0.92;
}

.sidebar-logout {
  margin-top: auto;
  color: #1f4a98;
  background: #fff;
  border-color: #fff;
  box-shadow: none;
}

.sidebar-logout:hover {
  color: #163872;
  background: #f7faff;
  border-color: #f7faff;
}

.nav {
  width: 100%;
  display: grid;
  gap: 12px;
}

.nav a {
  padding: 12px 8px;
  border-radius: 18px;
  font-size: 1.08rem;
  color: rgba(255, 255, 255, 0.94);
  transition: background-color 160ms ease, transform 160ms ease;
}

.nav a:hover,
.nav a.active {
  background: rgba(255, 255, 255, 0.14);
  transform: translateX(4px);
}

.main {
  min-width: 0;
  max-width: 100%;
  overflow-x: clip;
  padding: 34px 0 18px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
}

body:not([data-page="login"]) .layout {
  height: 100vh;
  min-height: 0;
  overflow: hidden;
}

body:not([data-page="login"]) .sidebar {
  min-height: 0;
  overflow-y: auto;
}

body:not([data-page="login"]) .main {
  height: 100vh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: 0;
}

body[data-page="students"] .topbar {
  flex: 0 0 auto;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 44px 22px;
  max-width: 100%;
}

.page-title {
  margin: 0;
  font-size: var(--fs-display);
  font-weight: 500;
  letter-spacing: 0;
}

.topbar-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  max-width: 100%;
}

.create-menu {
  position: relative;
}

.create-menu-button {
  padding: 10px 18px;
  white-space: nowrap;
}

.create-menu-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 172px;
  padding: 8px;
  border-radius: 18px;
  background: #fff;
  border: 1px solid #e5eaf3;
  box-shadow: 0 18px 40px rgba(15, 24, 46, 0.16);
  z-index: 30;
}

.create-menu-dropdown button {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  font: inherit;
  cursor: pointer;
}

.create-menu-dropdown button:hover {
  background: #f5f8ff;
  color: #224a97;
}

.notification {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid #777;
  background: transparent;
}

.search {
  width: min(280px, 36vw);
  padding: 10px 16px;
  border-radius: 999px;
  border: 1.5px solid #777;
  background: #fff;
  font: inherit;
  font-size: 0.96rem;
}

.filter-select {
  min-width: 180px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 1.5px solid #777;
  background: #fff;
  font: inherit;
  font-size: 0.94rem;
  color: #20314c;
}

.table-card {
  margin: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  border-top: 1px solid rgba(0, 0, 0, 0.04);
}

body[data-page="students"] .table-card {
  flex: 1 0 240px;
  min-height: 240px;
  overflow: auto;
}

.students-table {
  width: 100%;
  min-width: 860px;
  max-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.students-table thead th {
  text-align: left;
  color: var(--accent);
  font-size: 1rem;
  font-weight: 700;
  padding: 14px 22px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

body:not([data-page="login"]) .students-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  box-shadow: 0 1px 0 rgba(15, 24, 46, 0.08);
}

.students-table tbody td {
  padding: 14px 22px;
  font-size: 0.94rem;
  overflow-wrap: anywhere;
  word-break: break-word;
  vertical-align: middle;
}

.students-table th:last-child,
.students-table td:last-child {
  width: 72px;
}

.status-cell {
  text-align: center;
  color: #666;
  font-style: italic;
}

.students-table tbody tr:nth-child(odd) {
  background: var(--row-alt);
}

.students-table tbody tr:nth-child(even) {
  background: var(--surface);
}

.programme-break-row td {
  padding: 12px 22px;
  background: #eef5ff;
  border-top: 1px solid rgba(33, 111, 245, 0.22);
  border-bottom: 1px solid rgba(33, 111, 245, 0.22);
}

.students-table .programme-break-row td:last-child {
  width: auto;
}

.programme-break-content {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.programme-break-content span {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.programme-break-content strong {
  color: #10233f;
  font-size: 0.98rem;
  font-weight: 800;
}

.programme-break-content small {
  margin-left: auto;
  color: #53657a;
  font-size: 0.84rem;
  font-weight: 700;
}

.menu-dots {
  position: relative;
  text-align: center;
  font-size: 1.55rem;
  letter-spacing: 0.18em;
}

.action-button {
  border: 0;
  background: transparent;
  color: #222;
  font-size: 1.55rem;
  letter-spacing: 0.18em;
  cursor: pointer;
}

.action-button:hover {
  color: var(--accent);
}

.student-actions {
  position: absolute;
  right: 0;
  top: calc(100% - 4px);
  min-width: 148px;
  max-width: min(220px, calc(100vw - 32px));
  padding: 8px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 24, 46, 0.16);
  border: 1px solid #e6ebf3;
  z-index: 20;
}

.student-actions button {
  width: 100%;
  border: 0;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  border-radius: 12px;
  font: inherit;
  cursor: pointer;
}

.student-actions button:hover {
  background: #f5f8ff;
  color: #224a97;
}

body:not([data-page="login"]) {
  background: #fff;
}

body:not([data-page="login"]) .layout {
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  background: #fff;
}

body:not([data-page="login"]) .layout.sidebar-collapsed {
  grid-template-columns: 92px minmax(0, 1fr);
}

body:not([data-page="login"]) .sidebar {
  background: var(--students-blue);
  border-radius: 0 24px 24px 0;
  padding: 58px 34px 34px;
  overflow-x: hidden;
}

body:not([data-page="login"]) .sidebar-logo {
  display: none;
}

.sidebar-toggle {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.sidebar-toggle:hover {
  background: #fff;
  color: var(--students-blue);
}

.sidebar-toggle-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-toggle-icon svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sidebar-toggle-expand {
  display: none;
}

body:not([data-page="login"]) .layout.sidebar-collapsed .sidebar-toggle-collapse {
  display: none;
}

body:not([data-page="login"]) .layout.sidebar-collapsed .sidebar-toggle-expand {
  display: inline-flex;
}

body:not([data-page="login"]) .avatar {
  width: 178px;
  height: 178px;
  margin: 146px 0 24px;
  box-shadow: none;
}

body:not([data-page="login"]) .profile-name {
  font-size: 2.25rem;
  font-weight: 400;
}

body:not([data-page="login"]) .profile-role {
  margin: 4px 0 74px;
  font-size: 1.22rem;
  letter-spacing: 0;
  text-transform: none;
}

body:not([data-page="login"]) .nav {
  gap: 6px;
}

body:not([data-page="login"]) .nav a {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-height: 54px;
  border-radius: 0 24px 24px 0;
  padding: 13px 20px 13px 28px;
  color: #fff;
  font-size: 1.42rem;
  font-weight: 500;
  transform: none;
}

body:not([data-page="login"]) .nav-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
}

body:not([data-page="login"]) .nav-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body:not([data-page="login"]) .nav-label {
  min-width: 0;
}

body:not([data-page="login"]) .nav a:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: none;
}

body:not([data-page="login"]) .nav a.active {
  width: calc(100% + 34px);
  margin-left: -34px;
  padding-left: 62px;
  background: #fff;
  color: var(--students-blue);
  transform: none;
}

body:not([data-page="login"]) .sidebar-logout {
  margin: 28px auto 0;
  color: var(--students-blue);
  font-weight: 600;
}

body:not([data-page="login"]) .layout.sidebar-collapsed .sidebar {
  align-items: center;
  padding-left: 18px;
  padding-right: 18px;
}

body:not([data-page="login"]) .layout.sidebar-collapsed .avatar {
  width: 46px;
  height: 46px;
  margin: 72px 0 26px;
}

body:not([data-page="login"]) .layout.sidebar-collapsed .profile-name,
body:not([data-page="login"]) .layout.sidebar-collapsed .profile-role,
body:not([data-page="login"]) .layout.sidebar-collapsed .nav-label {
  display: none;
}

body:not([data-page="login"]) .layout.sidebar-collapsed .nav a {
  grid-template-columns: 1fr;
  width: 54px;
  min-height: 54px;
  margin-left: 0;
  padding: 0;
  border-radius: 50%;
  justify-items: center;
}

body:not([data-page="login"]) .layout.sidebar-collapsed .nav a.active {
  background: #fff;
}

body:not([data-page="login"]) .layout.sidebar-collapsed .sidebar-logout {
  width: 46px;
  height: 46px;
  padding: 0;
  font-size: 0;
}

body:not([data-page="login"]) .layout.sidebar-collapsed .sidebar-logout::before {
  content: "⏻";
  font-size: 1.18rem;
}

body:not([data-page="login"]) .main {
  padding: var(--workspace-padding-block) var(--workspace-padding-inline) 24px;
  background: #fff;
  backdrop-filter: none;
  overflow-y: auto;
}

body[data-page="students"] .students-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  align-items: start;
  gap: 36px;
  padding: 0 8px 24px;
}

body:not([data-page="login"]) .page-title {
  font-size: var(--fs-display);
  line-height: 0.92;
  font-weight: 400;
  letter-spacing: 0;
}

.students-page-note {
  margin: 10px 0 0;
  color: #202020;
  font-size: var(--fs-lg);
  line-height: 1.08;
}

.students-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
  padding: 0 0 34px;
}

.student-total-card,
.student-percentage-card {
  min-height: 250px;
  border-radius: 8px;
  background: var(--students-blue);
  color: #fff;
}

.student-total-card {
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 42px 54px;
}

.student-total-card strong {
  font-size: var(--fs-hero-number);
  line-height: 0.86;
  font-weight: 400;
}

.student-total-card span {
  font-size: var(--fs-lg);
  line-height: 0.95;
}

.student-percentage-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 170px;
  align-items: center;
  gap: 24px;
  padding: 34px 44px;
}

.student-percentage-copy {
  display: grid;
  gap: 12px;
}

.student-percentage-copy strong {
  font-size: var(--fs-3xl);
  line-height: 0.9;
  font-weight: 500;
}

.student-percentage-copy span {
  max-width: 16ch;
  font-size: var(--fs-lg);
  line-height: 0.95;
  font-weight: 600;
}

.student-percentage-meter {
  width: 154px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.student-percentage-meter::after {
  content: "";
  width: 64%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--students-blue);
}

.students-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 24px;
  padding: 16px 0 18px;
}

.students-toolbar-left,
.students-filter-group {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
  flex-wrap: wrap;
}

.student-add-button {
  width: 50px;
  height: 50px;
  border: 0;
  border-radius: 999px;
  background: var(--students-blue);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  overflow: hidden;
  padding: 0 14px;
  font: inherit;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 160ms ease, color 160ms ease, gap 180ms ease, width 220ms ease;
}

.student-add-button:hover,
.student-add-button:focus-visible {
  background: #004f89;
  gap: 10px;
}

.student-add-icon {
  flex: 0 0 auto;
  font-size: 2.45rem;
  font-weight: 300;
  line-height: 0.8;
}

.student-add-label {
  display: inline-block;
  max-width: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateX(-8px);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  text-align: center;
}

.student-add-button.student-add-fallback:hover {
  width: 164px;
}

.student-add-button.student-add-fallback:hover .student-add-label {
  max-width: 110px;
  opacity: 1;
  transform: translateX(0);
  transition: max-width 180ms ease, opacity 160ms ease, transform 180ms ease;
}

body[data-page="classes"] .student-add-button.student-add-fallback:hover {
  width: 196px;
}

body[data-page="classes"] .student-add-button.student-add-fallback:hover .student-add-label {
  max-width: 140px;
}

body:not([data-page="login"]) .search {
  width: min(250px, 28vw);
  border: 0;
  background: #e8edf3;
  color: var(--students-blue);
  font-size: 1.08rem;
}

body:not([data-page="login"]) .search::placeholder {
  color: var(--students-blue);
  opacity: 0.9;
}

.students-filter-group {
  font-size: 1.05rem;
  font-weight: 600;
}

.filter-chip,
body[data-page="students"] .student-filter-value-select {
  min-width: 78px;
  border: 0;
  border-radius: 999px;
  padding: 8px 18px;
  font: inherit;
  font-weight: 700;
}

.students-filter-menu {
  position: relative;
}

.filter-chip {
  background: var(--students-blue);
  color: #fff;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.filter-chip:hover {
  background: #004f89;
  color: #fff;
}

.students-filter-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 158px;
  padding: 8px;
  border: 1px solid #e1e8f1;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 40px rgba(15, 24, 46, 0.16);
  z-index: 25;
}

.students-filter-dropdown button {
  width: 100%;
  border: 0;
  border-radius: 10px;
  padding: 10px 12px;
  background: transparent;
  color: #1f2633;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.students-filter-dropdown button:hover,
.students-filter-dropdown button.active {
  background: #edf4fb;
  color: var(--students-blue);
}

body[data-page="students"] .student-filter-value-select {
  min-width: 126px;
  background: #eef2f6;
  color: var(--students-blue);
}

body[data-page="students"] .students-table-card {
  border: 0;
  position: relative;
  isolation: isolate;
  overflow: auto;
  background: #fff;
}

body:not([data-page="login"]) .students-table {
  min-width: 940px;
  border-collapse: separate;
  border-spacing: 0 12px;
}

body:not([data-page="login"]) .students-table thead th {
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 23px 30px;
  background: #e8edf3;
  color: var(--students-blue);
  box-shadow: 0 2px 0 rgba(0, 105, 183, 0.12);
  font-size: 1.24rem;
  line-height: 1.1;
  text-transform: uppercase;
}

body:not([data-page="login"]) .students-table thead th::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -12px;
  height: 12px;
  background: #fff;
  pointer-events: none;
}

body:not([data-page="login"]) .students-table thead th:first-child {
  border-radius: 8px 0 0 8px;
  width: 110px;
}

body[data-page="students"] .students-table thead th:nth-child(3) {
  width: 120px;
}

body:not([data-page="login"]) .students-table thead th:last-child {
  width: 142px;
  border-radius: 0 8px 8px 0;
  text-align: center;
}

body:not([data-page="login"]) .students-table tbody tr {
  background: transparent;
}

body:not([data-page="login"]) .students-table tbody td {
  padding: 18px 30px;
  background: #fff;
  font-size: 1.02rem;
  line-height: 1.12;
}

body:not([data-page="login"]) .students-table tbody tr:nth-child(even) td {
  background: #f5f6f8;
}

body:not([data-page="login"]) .students-table tbody td:first-child {
  border-radius: 8px 0 0 8px;
}

body:not([data-page="login"]) .students-table tbody td:last-child {
  width: 142px;
  border-radius: 0 8px 8px 0;
  text-align: center;
}

body:not([data-page="login"]) .action-button {
  color: var(--students-blue);
  letter-spacing: 0.08em;
  transition: color 160ms ease, background-color 160ms ease;
}

body:not([data-page="login"]) .action-button:hover {
  color: #004f89;
}

body:not([data-page="login"]) .primary-button:hover,
body:not([data-page="login"]) .close-button:hover,
body:not([data-page="login"]) .secondary-button:hover:not(:disabled),
body:not([data-page="login"]) .student-actions button:hover {
  border-color: #004f89;
  background: #004f89;
  color: #fff;
}

body[data-page="students"] .students-filter-dropdown button:hover,
body[data-page="students"] .students-filter-dropdown button.active {
  background: #004f89;
  color: #fff;
}

body[data-page="classes"] {
  height: 100vh;
  overflow: hidden;
  background: #fff;
}

body[data-page="classes"] .layout {
  height: 100vh;
  min-height: 0;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  overflow: hidden;
  background: #fff;
}

body[data-page="classes"] .layout.sidebar-collapsed {
  grid-template-columns: 92px minmax(0, 1fr);
}

body[data-page="classes"] .sidebar {
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: 0 24px 24px 0;
  background: var(--students-blue);
  padding: 58px 34px 34px;
}

body[data-page="classes"] .sidebar-logo {
  display: none;
}

body[data-page="classes"] .avatar {
  width: 178px;
  height: 178px;
  margin: 146px 0 24px;
  box-shadow: none;
}

body[data-page="classes"] .profile-name {
  font-size: 2.25rem;
  font-weight: 400;
}

body[data-page="classes"] .profile-role {
  margin: 4px 0 74px;
  font-size: 1.22rem;
  letter-spacing: 0;
  text-transform: none;
}

body[data-page="classes"] .nav {
  gap: 6px;
}

body[data-page="classes"] .nav a {
  position: relative;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-height: 54px;
  border-radius: 0 24px 24px 0;
  padding: 13px 20px 13px 28px;
  color: #fff;
  font-size: 1.42rem;
  font-weight: 500;
  transform: none;
}

body[data-page="classes"] .nav-icon {
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
}

body[data-page="classes"] .nav-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body[data-page="classes"] .nav-label {
  min-width: 0;
}

body[data-page="classes"] .nav a:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: none;
}

body[data-page="classes"] .nav a.active {
  width: calc(100% + 34px);
  margin-left: -34px;
  padding-left: 62px;
  background: #fff;
  color: var(--students-blue);
  transform: none;
}

body[data-page="classes"] .sidebar-logout {
  margin: 28px auto 0;
  color: var(--students-blue);
  font-weight: 600;
}

body[data-page="classes"] .layout.sidebar-collapsed .sidebar {
  align-items: center;
  padding-left: 18px;
  padding-right: 18px;
}

body[data-page="classes"] .layout.sidebar-collapsed .avatar {
  width: 46px;
  height: 46px;
  margin: 72px 0 26px;
}

body[data-page="classes"] .layout.sidebar-collapsed .profile-name,
body[data-page="classes"] .layout.sidebar-collapsed .profile-role,
body[data-page="classes"] .layout.sidebar-collapsed .nav-label {
  display: none;
}

body[data-page="classes"] .layout.sidebar-collapsed .nav a {
  grid-template-columns: 1fr;
  width: 54px;
  min-height: 54px;
  margin-left: 0;
  padding: 0;
  border-radius: 50%;
  justify-items: center;
}

body[data-page="classes"] .layout.sidebar-collapsed .nav a.active {
  background: #fff;
}

body[data-page="classes"] .layout.sidebar-collapsed .sidebar-toggle-collapse {
  display: none;
}

body[data-page="classes"] .layout.sidebar-collapsed .sidebar-toggle-expand {
  display: inline-flex;
}

body[data-page="classes"] .layout.sidebar-collapsed .sidebar-logout {
  width: 46px;
  height: 46px;
  padding: 0;
  font-size: 0;
}

body[data-page="classes"] .layout.sidebar-collapsed .sidebar-logout::before {
  content: "Logout";
  font-size: 0.56rem;
  line-height: 1;
}

body[data-page="classes"] .main {
  height: 100vh;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: var(--workspace-padding-block) var(--workspace-padding-inline) 24px;
  background: #fff;
  backdrop-filter: none;
}

body[data-page="classes"] .students-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  align-items: start;
  gap: 36px;
  padding: 0 8px 24px;
}

body[data-page="classes"] .page-title {
  font-size: 5.8rem;
  line-height: 0.92;
  font-weight: 400;
  letter-spacing: 0;
}

body[data-page="classes"] .search {
  width: min(250px, 28vw);
  border: 0;
  background: #e8edf3;
  color: var(--students-blue);
  font-size: 1.08rem;
}

body[data-page="classes"] .search::placeholder {
  color: var(--students-blue);
  opacity: 0.9;
}

body[data-page="classes"] .student-filter-value-select {
  min-width: 126px;
  border: 0;
  border-radius: 999px;
  padding: 8px 18px;
  background: #eef2f6;
  color: var(--students-blue);
  font: inherit;
  font-weight: 700;
}

body[data-page="classes"] .create-menu-dropdown {
  left: 0;
  right: auto;
}

.organisation-toolbar {
  flex: 0 0 auto;
}

.organisation-list-screen {
  display: contents;
}

.organisation-card-grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-template-rows: repeat(2, minmax(240px, 1fr));
  grid-auto-rows: minmax(240px, 1fr);
  gap: 10px;
  align-content: start;
}

.organisation-card {
  min-width: 0;
  min-height: 240px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
  border-radius: 6px;
  background: var(--students-blue);
  color: #fff;
  padding: 28px 26px 20px;
}

.organisation-card .organisation-card-status {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid rgba(255, 255, 255, 0.96);
  border-radius: 50%;
  background: transparent;
  color: var(--students-blue);
  font-size: 0;
  line-height: 1;
}

.organisation-card-status.is-complete {
  border-color: #fff;
  background: #fff;
  box-shadow: 0 6px 16px rgba(0, 55, 100, 0.18);
}

.organisation-card-status.is-complete::before {
  width: 14px;
  height: 8px;
  content: "";
  border-left: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
  transform: rotate(-45deg) translate(1px, -1px);
}

.organisation-card-body {
  min-width: 0;
  align-self: start;
  display: grid;
  gap: 18px;
}

.organisation-card-title {
  width: fit-content;
  max-width: 100%;
  margin: 0;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.9);
  color: #fff;
  font-size: 1.58rem;
  line-height: 0.96;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.organisation-card-meta {
  display: grid;
  gap: 2px;
  color: #fff;
  font-size: 1.04rem;
  line-height: 1.06;
  font-weight: 600;
}

.organisation-card-meta span {
  overflow-wrap: anywhere;
}

.organisation-card-button {
  justify-self: end;
  min-width: 88px;
  border: 0;
  border-radius: 999px;
  padding: 8px 18px;
  background: #fff;
  color: var(--students-blue);
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease;
}

.organisation-card-button:hover,
.organisation-card-button:focus-visible {
  background: #dfefff;
  color: #004f89;
}

.organisation-card-status-message {
  grid-column: 1 / -1;
  align-self: start;
  margin: 0;
  color: #666;
  font-style: italic;
}

.organisation-pagination {
  flex: 0 0 auto;
  padding-top: 14px;
}

.organisation-detail-screen {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.organisation-detail-topbar {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
}

.organisation-breadcrumb {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #111;
  font-size: 1.7rem;
  line-height: 1.12;
  font-weight: 400;
}

.organisation-breadcrumb span,
.organisation-breadcrumb strong {
  font: inherit;
  color: inherit;
}

.organisation-breadcrumb-arrow {
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--students-blue);
}

.organisation-breadcrumb-arrow svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.organisation-breadcrumb strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.organisation-detail-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.organisation-year-form {
  display: grid;
  grid-template-columns: 110px auto;
  gap: 8px;
  align-items: center;
}

.organisation-year-form input {
  width: 100%;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  padding: 10px 12px;
  background: #f7faff;
  color: #111;
  font: inherit;
}

.organisation-year-form .form-message {
  grid-column: 1 / -1;
  font-size: 0.9rem;
}

.organisation-detail-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.organisation-detail-summary-grid div,
.organisation-payment-summary div {
  min-width: 0;
  border-radius: 8px;
  padding: 18px;
  background: var(--students-blue);
  color: #fff;
}

.organisation-detail-summary-grid span,
.organisation-payment-summary span {
  display: block;
  margin-bottom: 6px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
}

.organisation-detail-summary-grid strong,
.organisation-payment-summary strong {
  display: block;
  color: #fff;
  font-size: 1.4rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.organisation-detail-panel,
.organisation-settings-panel {
  flex: 1 1 auto;
  min-height: 0;
  border: 1px solid #dfe6f2;
  border-radius: 8px;
  padding: 22px;
  background: #fff;
  overflow: auto;
}

.organisation-settings-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.organisation-settings-panel.hidden {
  display: none !important;
}

.organisation-payment-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.organisation-payment-table-wrap {
  min-height: 0;
  overflow: auto;
}

.organisation-payment-table {
  min-width: 920px;
}

.organisation-assign-card {
  width: min(760px, 100%);
  border-radius: 18px;
}

.organisation-assign-content {
  display: grid;
  gap: 18px;
}

.organisation-assign-target {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 220px);
  gap: 14px;
  align-items: end;
}

.organisation-assign-target > div,
.organisation-assign-target label,
.organisation-assign-search {
  display: grid;
  gap: 8px;
}

.organisation-assign-target span,
.organisation-assign-search span {
  color: #5d6472;
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
}

.organisation-assign-target strong {
  color: #111;
  font-size: 1.1rem;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.organisation-assign-target select,
.organisation-assign-search input {
  width: 100%;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  padding: 12px 14px;
  background: #f7faff;
  color: #111;
  font: inherit;
}

.organisation-assign-list {
  display: grid;
  gap: 10px;
  max-height: min(42vh, 420px);
  overflow: auto;
  padding-right: 4px;
}

.organisation-assign-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #dfe6f2;
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.organisation-assign-row strong,
.organisation-assign-row span {
  display: block;
}

.organisation-assign-row strong {
  color: #111;
  font-size: 1rem;
}

.organisation-assign-row span {
  margin-top: 4px;
  color: #5d6472;
  font-size: 0.9rem;
}

.organisation-assign-row .secondary-button {
  padding: 8px 16px;
  background: var(--students-blue);
  border-color: var(--students-blue);
  color: #fff;
}

.organisation-assign-row .secondary-button:hover,
.organisation-assign-row .secondary-button:focus-visible {
  background: #004f89;
  border-color: #004f89;
}

.organisation-assign-row .secondary-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.payment-status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: #eef2f6;
  color: #334055;
  font-size: 0.84rem;
  font-weight: 700;
}

.payment-status-paid,
.payment-status-sponsored {
  background: #e4f7ea;
  color: #1b7b42;
}

.payment-status-partial {
  background: #fff2d9;
  color: #9a6400;
}

.payment-status-outstanding,
.payment-status-missing {
  background: #fde9e5;
  color: #b6462a;
}

.students-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 10px 0 0;
  color: #424242;
}

.students-pagination p {
  margin: 0;
}

.students-pagination-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.students-pagination-actions span {
  color: #202020;
  font-weight: 600;
}

.students-pagination button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.pipeline-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
  color: #20314c;
  background: #eef2f8;
  border: 1px solid #d7dfec;
  white-space: normal;
}

.pipeline-status-pill.pipeline-lead {
  color: #6f4b00;
  background: #fff4ce;
  border-color: #f0d37a;
}

.pipeline-status-pill.pipeline-enrolment {
  color: #174f7a;
  background: #dff1ff;
  border-color: #9dcdeb;
}

.pipeline-status-pill.pipeline-current {
  color: #1f5c33;
  background: #e5f6ea;
  border-color: #9fd3aa;
}

.pipeline-status-pill.pipeline-lost {
  color: #7a2424;
  background: #ffe8e8;
  border-color: #efaaaa;
}

.drilldown-panel {
  margin: 30px 44px 0;
  background: #fff;
  border-radius: 28px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
}

.panel-header h2 {
  margin: 0 0 8px;
  font-size: 1.5rem;
}

.panel-header p {
  margin: 0;
  color: #555;
  max-width: 60ch;
  line-height: 1.5;
}

.selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 16px;
}

.selection-card {
  border: 1px solid #dcdcdc;
  border-radius: 20px;
  padding: 18px;
  background: linear-gradient(180deg, #fefefe 0%, #f4f6fb 100%);
  cursor: pointer;
  text-align: left;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.selection-card:hover {
  transform: translateY(-2px);
  border-color: #9bb0de;
  box-shadow: 0 12px 30px rgba(31, 63, 132, 0.12);
}

.selection-card.is-active {
  border-color: var(--students-blue);
  box-shadow: 0 0 0 2px rgba(0, 105, 183, 0.14);
}

.selection-card strong,
.selection-card span {
  display: block;
}

.selection-card strong {
  font-size: 1rem;
  margin-bottom: 6px;
}

.selection-card span {
  color: #5e6471;
}

.secondary-button {
  border: 1px solid var(--students-blue);
  background: transparent;
  color: var(--students-blue);
  border-radius: 999px;
  padding: 10px 18px;
  font: inherit;
  cursor: pointer;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 24, 46, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 80;
}

.modal-card {
  width: min(720px, 100%);
  background: #fff;
  border-radius: 28px;
  box-shadow: 0 24px 65px rgba(10, 20, 40, 0.24);
  overflow: hidden;
}

.create-fullscreen-backdrop {
  padding: 0;
}

.student-detail-backdrop {
  padding: 0;
}

.modal-header {
  padding: 24px 28px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h2 {
  margin: 0;
  font-size: 1.5rem;
}

.close-button {
  border: 0;
  background: transparent;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  color: #666;
}

.modal-content {
  padding: 0 28px 28px;
}

.create-fullscreen-card {
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  display: flex;
  flex-direction: column;
}

.student-detail-card {
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  display: flex;
  flex-direction: column;
}

.create-fullscreen-card .modal-header {
  padding: 26px 44px 18px;
  border-bottom: 1px solid #e5eaf3;
}

.student-detail-card .modal-header {
  padding: 26px 44px 18px;
  border-bottom: 1px solid #e5eaf3;
}

.create-fullscreen-card .modal-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px 44px 40px;
}

.student-detail-card .modal-content {
  flex: 1;
  overflow-y: auto;
  padding: 28px 44px 44px;
  background: #f4f7fb;
}

.student-edit-card .modal-content {
  background: #fff;
}

.create-fullscreen-card .edit-form:not(.hidden) {
  width: min(980px, 100%);
  margin: 0 auto;
}

.student-edit-card .edit-form {
  width: 100%;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-content: start;
}

.student-edit-card .services-fieldset {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.student-record-profile {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  gap: 18px;
}

.student-detail-card .student-record-profile {
  width: 100%;
}

.student-profile-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(320px, 0.8fr);
  align-items: center;
  gap: 22px;
  padding: 28px;
  border: 1px solid #dfe6f2;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.student-profile-avatar {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #244f9f;
  color: #fff;
  font-size: 2rem;
  font-weight: 800;
}

.student-profile-heading {
  min-width: 0;
}

.student-profile-heading span {
  color: #66748a;
  font-size: 0.82rem;
  font-weight: 800;
  text-transform: uppercase;
}

.student-profile-heading h3 {
  margin: 6px 0;
  color: #17233c;
  font-size: 2rem;
  line-height: 1.15;
}

.student-profile-heading p {
  margin: 0;
  color: #536075;
  font-weight: 700;
}

.student-profile-snapshot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.student-profile-snapshot div,
.student-record-field {
  min-width: 0;
  border: 1px solid #e1e7f0;
  border-radius: 8px;
  background: #f8faff;
}

.student-profile-snapshot div {
  padding: 14px;
}

.student-profile-snapshot span,
.student-record-field span {
  display: block;
  color: #66748a;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.student-profile-snapshot strong,
.student-record-field strong {
  display: block;
  color: #1f2633;
  font-size: 0.96rem;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.student-record-section,
.student-record-profile .student-profile-expansion {
  margin: 0;
  padding: 22px;
  border: 1px solid #dfe6f2;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.student-record-section h3,
.student-record-profile .student-profile-expansion h3 {
  margin: 0 0 16px;
  color: #17233c;
  font-size: 1.08rem;
}

.student-record-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.student-record-field {
  padding: 14px;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.student-profile-expansion {
  display: grid;
  gap: 12px;
  margin-top: 20px;
}

.student-profile-expansion h3 {
  margin: 0;
  font-size: 1rem;
  color: #1f2633;
}

.student-course-expander {
  border: 1px solid #d8deea;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.student-course-expander summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.student-course-expander summary::-webkit-details-marker {
  display: none;
}

.student-course-expander summary::after {
  content: "+";
  color: #df4324;
  font-size: 1.2rem;
  font-weight: 700;
}

.student-course-expander[open] summary::after {
  content: "-";
}

.student-course-expander summary span {
  color: #db3f1f;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.student-course-expander summary strong {
  color: #536075;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.student-course-modules {
  display: grid;
  border-top: 1px solid #eceff4;
  background: #f8faff;
}

.student-course-module {
  display: grid;
  gap: 4px;
  padding: 10px 16px;
  border-bottom: 1px solid #e6ebf3;
}

.student-course-module:last-child {
  border-bottom: 0;
}

.student-course-module span {
  color: #536075;
  font-size: 0.76rem;
  font-weight: 700;
}

.student-course-module strong {
  color: #1f2633;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.35;
}

.student-course-module small {
  color: #687487;
  line-height: 1.4;
}

.detail-item {
  padding: 16px 18px;
  background: #f6f8fc;
  border-radius: 18px;
}

.detail-item span {
  display: block;
  font-size: 0.88rem;
  color: #616a78;
  margin-bottom: 6px;
}

.detail-item strong {
  display: block;
  font-size: 0.95rem;
}

.edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.edit-form label {
  display: grid;
  gap: 8px;
  color: #263247;
}

.edit-form input {
  border: 1px solid #d8deea;
  border-radius: 16px;
  padding: 12px 14px;
  font: inherit;
  background: #f8faff;
}

.edit-form select,
.edit-form textarea {
  border: 1px solid #d8deea;
  border-radius: 16px;
  padding: 12px 14px;
  font: inherit;
  background: #f8faff;
  resize: vertical;
}

.edit-form input:disabled {
  background: #eef2f8;
  color: #7a8494;
  cursor: not-allowed;
}

.full-width {
  grid-column: 1 / -1;
}

.request-student-summary {
  display: grid;
  gap: 4px;
  padding: 16px 18px;
  border: 1px solid #d8e4f2;
  border-radius: 16px;
  background: #f4f8fc;
}

.request-student-summary span,
.request-student-summary small {
  color: #647186;
  font-size: 0.88rem;
}

.request-student-summary strong {
  color: var(--students-blue);
  font-size: 1.15rem;
  line-height: 1.15;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.wizard-form {
  grid-template-columns: 1fr;
}

.wizard-progress {
  display: grid;
  gap: 18px;
  margin-bottom: 8px;
}

.wizard-progress-track {
  height: 8px;
  border-radius: 999px;
  background: #e8edf6;
  overflow: hidden;
}

.wizard-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #244f9f 0%, #ff5c30 100%);
  transition: width 180ms ease;
}

.wizard-steps {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.wizard-steps li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #687487;
  font-weight: 600;
}

.wizard-steps span {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #e8edf6;
  color: #42506a;
}

.wizard-steps li.active,
.wizard-steps li.completed {
  color: #1f4a98;
}

.wizard-steps li.active span,
.wizard-steps li.completed span {
  background: #224a97;
  color: #fff;
}

.wizard-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  min-height: 360px;
  align-content: start;
}

.wizard-section select[multiple] {
  min-height: 260px;
}

.create-review-section {
  display: block;
}

.create-review-panel {
  display: grid;
  gap: 18px;
  min-height: 360px;
  align-content: start;
}

.services-fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin: 0;
  border: 1px solid #d8deea;
  border-radius: 8px;
  padding: 18px;
  background: #fbfcff;
}

.services-fieldset legend {
  padding: 0 8px;
  color: #1f4a98;
  font-weight: 700;
}

.course-picker {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(0, 1.6fr);
  min-height: 380px;
  border: 1px solid #d8deea;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.course-picker-selected {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 14px;
  border-right: 1px solid #e2e6ee;
  padding: 20px;
  background: #fbfcff;
}

.course-picker-selected h3,
.course-picker-heading h3 {
  margin: 0;
  font-size: 1.1rem;
  color: #1f2633;
}

.course-picker-browser {
  min-width: 0;
  padding: 20px 22px;
}

.course-picker-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px 44px;
  gap: 12px;
  align-items: end;
  margin-bottom: 12px;
  color: #5f6978;
  font-weight: 700;
}

.course-options-list,
.selected-courses-list {
  display: grid;
  gap: 10px;
  align-content: start;
}

.course-options-list {
  max-height: 480px;
  overflow-y: auto;
  padding-right: 4px;
}

.course-option-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: stretch;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #efefef;
}

.course-option-row:nth-child(even) {
  background: #fff;
}

.course-option-row.selected {
  border-color: #f0a38f;
  background: #fff6f2;
}

.course-option-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 120px;
  gap: 12px;
  align-items: center;
  border: 0;
  padding: 14px;
  background: transparent;
  color: inherit;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.course-option-main strong,
.selected-course-toggle strong {
  display: block;
  color: #db3f1f;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.course-option-main small,
.selected-course-toggle small {
  display: block;
  margin-top: 5px;
  color: #667287;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.course-option-main em {
  justify-self: end;
  color: #222;
  font-style: normal;
  font-weight: 700;
  white-space: nowrap;
}

.course-add-button,
.course-remove-button {
  width: 34px;
  height: 34px;
  align-self: center;
  justify-self: center;
  border: 2px solid #df4324;
  border-radius: 50%;
  background: #fff;
  color: #df4324;
  font: inherit;
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.selected-course-item {
  border: 1px solid #cfd5df;
  border-radius: 8px;
  background: #fff;
  overflow: hidden;
}

.selected-course-item.open {
  border-color: #df4324;
}

.selected-course-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 44px;
  align-items: stretch;
}

.selected-course-toggle {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 0;
  padding: 14px;
  background: transparent;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.selected-course-icon {
  color: #df4324;
  font-size: 1.25rem;
  font-weight: 700;
}

.selected-course-modules {
  border-top: 1px solid #eceff4;
  background: #f8faff;
}

.selected-course-modules ul {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.selected-course-modules li {
  display: grid;
  gap: 4px;
  padding: 10px 14px;
  border-bottom: 1px solid #e6ebf3;
}

.selected-course-modules li:last-child {
  border-bottom: 0;
}

.selected-course-modules li span {
  color: #536075;
  font-size: 0.76rem;
  font-weight: 700;
}

.selected-course-modules li strong {
  color: #1f2633;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.35;
}

.course-picker-empty {
  margin: 0;
  border: 1px dashed #cfd5df;
  border-radius: 8px;
  padding: 16px;
  color: #657083;
  background: #fff;
}

.course-hidden-select {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.wizard-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.form-layout-backdrop {
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  background: #fff;
}

.form-layout-card {
  width: 100vw;
  height: 100vh;
  border-radius: 0;
  box-shadow: none;
  display: grid;
  grid-template-columns: clamp(260px, 26vw, 360px) minmax(0, 1fr);
  background: #fff;
  overflow: hidden;
}

.form-layout-card .modal-header {
  position: relative;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 28px;
  border-bottom: 0;
  padding: clamp(30px, 4.2vw, 54px);
  background: var(--students-blue);
  color: #fff;
  overflow-y: auto;
}

.form-layout-card .modal-header h2 {
  max-width: 11ch;
  padding-right: 42px;
  color: #fff;
  font-size: var(--fs-form-title);
  line-height: 0.95;
  font-weight: 500;
  letter-spacing: 0;
}

.form-layout-card .close-button {
  position: absolute;
  top: 22px;
  right: 22px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 1.55rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.form-layout-card .close-button:hover,
.form-layout-card .close-button:focus-visible {
  background: #fff;
  color: var(--students-blue);
}

.form-layout-card .modal-content {
  min-width: 0;
  min-height: 0;
  height: 100vh;
  flex: none;
  overflow-y: auto;
  padding: clamp(32px, 5vw, 64px);
  background: #fff;
}

.form-layout-card .edit-form:not(.hidden),
.form-layout-card .organisation-assign-content {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  align-content: start;
}

.form-layout-card .edit-form {
  gap: 18px;
}

.student-edit-card.form-layout-card .edit-form,
.student-edit-card.form-layout-card .services-fieldset {
  max-width: none;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-layout-card .wizard-progress {
  width: 100%;
  display: grid;
  gap: 18px;
  margin: 18px 0 0;
}

.form-layout-card[data-create-active="class"] .wizard-progress {
  display: none;
}

.form-layout-card .wizard-progress-track {
  height: 5px;
  background: rgba(255, 255, 255, 0.22);
}

.form-layout-card .wizard-progress-track span {
  background: #fff;
}

.form-layout-card .wizard-steps {
  grid-template-columns: 1fr;
  gap: 8px;
}

.form-layout-card .wizard-steps li {
  min-width: 0;
  border-radius: 8px;
  padding: 10px 12px;
  color: rgba(255, 255, 255, 0.72);
}

.form-layout-card .wizard-steps span {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.form-layout-card .wizard-steps li.active,
.form-layout-card .wizard-steps li.completed {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}

.form-layout-card .wizard-steps li.active span,
.form-layout-card .wizard-steps li.completed span {
  background: #fff;
  color: var(--students-blue);
}

.marks-summary-grid {
  padding: 0 44px 24px;
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 18px;
}

.mark-status-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.86rem;
  background: #fff2d9;
  color: #9a6400;
}

.mark-status-pill.captured {
  background: #e4f7ea;
  color: #1b7b42;
}

.mark-actions {
  text-align: center;
  white-space: nowrap;
}

.mark-actions .student-actions {
  font-size: var(--fs-base);
  letter-spacing: normal;
}

#marks-form .detail-item,
#marks-form :is(input:not([type="hidden"]), select) {
  background: transparent;
  border: 0;
  border-bottom: 1px solid #e1e5eb;
  border-radius: 0;
  padding: 10px 0;
  box-shadow: none;
}

#marks-form :is(input, select):disabled {
  color: #7a8494;
  cursor: not-allowed;
}

.marks-modules {
  display: grid;
  gap: 12px;
}

.marks-course {
  min-width: 0;
  border-bottom: 1px solid #e1e5eb;
}

.marks-course h3 {
  margin: 0;
}

.marks-course-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 16px 0;
  border: 0;
  background: transparent;
  color: var(--students-blue);
  text-align: left;
  cursor: pointer;
}

.marks-course-toggle svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

.marks-course-toggle[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

.marks-course-modules {
  display: grid;
  gap: 18px;
  padding: 12px 0 20px;
}

.marks-course-modules small {
  color: #616a78;
  font-size: var(--fs-sm);
}

.marks-course-modules label span small {
  display: block;
  margin-top: 4px;
}

.marks-module-field {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.marks-module-mark-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.marks-module-mark-row input {
  width: 100%;
  min-width: 0;
}

.marks-module-save {
  padding: 10px 16px;
  white-space: nowrap;
}

[data-module-mark-status][data-state="error"] {
  color: #b42318;
}

/* Keep headings readable within the shared blue side panel. */
:is(#marks-modal, #student-modal, #create-entity-modal) .modal-header {
  padding-top: 76px;
}

#marks-modal-title,
#student-modal-title,
#create-entity-title {
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding-right: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

:is(#marks-modal, #student-modal, #create-entity-modal) :is(.modal-header h2, .marks-course-toggle, label, label > span, .detail-item span, .detail-item strong) {
  font-size: var(--fs-md);
  line-height: 1.35;
  font-weight: 500;
  overflow-wrap: anywhere;
}

:is(#student-modal, #create-entity-modal) .student-record-profile {
  max-width: 1180px;
  gap: 12px;
  align-content: start;
}

:is(#student-modal, #create-entity-modal) :is(.student-record-section, .student-profile-expansion) {
  display: block;
  min-width: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid #e1e5eb;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

:is(#student-modal, #create-entity-modal) .student-section-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 0;
  color: var(--students-blue);
  font-size: var(--fs-md);
  line-height: 1.35;
  font-weight: 500;
  list-style: none;
  cursor: pointer;
  overflow-wrap: anywhere;
}

:is(#student-modal, #create-entity-modal) .student-section-toggle::-webkit-details-marker {
  display: none;
}

:is(#student-modal, #create-entity-modal) .student-section-toggle::marker {
  content: "";
}

:is(#student-modal, #create-entity-modal) .student-section-toggle svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

:is(#student-modal, #create-entity-modal) details[open] > .student-section-toggle svg {
  transform: rotate(180deg);
}

:is(#student-modal, #create-entity-modal) .student-section-content {
  padding: 12px 0 20px;
}

:is(#student-modal, #create-entity-modal) .student-course-list {
  display: grid;
  gap: 12px;
}

:is(#student-modal, #create-entity-modal) .student-record-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

:is(#student-modal, #create-entity-modal) :is(.detail-item, .student-record-field) {
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid #e1e5eb;
  border-radius: 0;
  background: transparent;
}

:is(#student-modal, #create-entity-modal) .student-record-field span {
  margin-bottom: 8px;
  color: #263247;
  font-size: var(--fs-md);
  font-weight: 500;
  text-transform: none;
}

:is(#student-modal, #create-entity-modal) .student-record-field strong {
  font-size: var(--fs-base);
  font-weight: 400;
  line-height: 1.5;
  white-space: pre-wrap;
}

:is(#student-modal, #create-entity-modal) .student-course-expander {
  border: 0;
  border-bottom: 1px solid #e1e5eb;
  border-radius: 0;
}

:is(#student-modal, #create-entity-modal) .student-course-expander summary {
  grid-template-columns: minmax(0, 1fr) auto 20px;
  padding: 16px 0;
}

:is(#student-modal, #create-entity-modal) :is(.student-section-toggle, .student-course-expander summary):focus-visible {
  outline: 3px solid #79b9e8;
  outline-offset: 3px;
}

:is(#student-modal, #create-entity-modal) .student-course-expander summary::after {
  content: none;
}

:is(#student-modal, #create-entity-modal) .student-course-expander summary span {
  color: var(--students-blue);
  font-size: var(--fs-md);
  font-weight: 500;
  text-decoration: none;
  overflow-wrap: anywhere;
}

:is(#student-modal, #create-entity-modal) .student-course-expander summary strong {
  font-size: var(--fs-sm);
  font-weight: 400;
  text-transform: none;
}

:is(#student-modal, #create-entity-modal) .student-course-expander summary svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--students-blue);
  stroke-width: 2;
}

:is(#student-modal, #create-entity-modal) .student-course-expander[open] summary svg {
  transform: rotate(180deg);
}

:is(#student-modal, #create-entity-modal) .student-course-modules {
  border: 0;
  background: transparent;
}

:is(#student-modal, #create-entity-modal) .student-course-module {
  padding: 12px 0;
  overflow-wrap: anywhere;
}

:is(#student-modal, #create-entity-modal) .student-course-module strong {
  font-size: var(--fs-md);
  font-weight: 500;
}

@media (max-width: 920px) {
  :is(#student-modal, #create-entity-modal) .student-record-grid {
    grid-template-columns: 1fr;
  }
}

#create-student-form {
  gap: 12px;
}

#create-student-form .create-form-page-title {
  width: 100%;
  margin: 0 0 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #d8dfe8;
  color: var(--students-blue);
  font-size: var(--fs-xl);
  line-height: 1.2;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.create-student-page-status {
  margin: 0;
  font-size: var(--fs-sm);
}

#create-entity-modal .wizard-steps {
  gap: 4px;
}

#create-entity-modal .wizard-steps li {
  padding: 8px;
  font-size: var(--fs-sm);
  line-height: 1.3;
}

#create-entity-modal .wizard-steps span {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
}

@media (max-width: 920px) {
  #create-entity-modal .wizard-progress {
    gap: 10px;
    margin-top: 0;
  }

  #create-entity-modal .wizard-steps {
    display: none;
  }
}

#create-student-form :is(.wizard-section, .create-review-panel) {
  min-height: 0;
}

#create-student-form :is(input, select:not(.course-hidden-select), textarea) {
  width: 100%;
  min-width: 0;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid #e1e5eb;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#create-student-form .course-picker {
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  min-height: 0;
  border: 0;
  border-radius: 0;
  overflow: visible;
}

#create-student-form :is(.course-picker-selected, .course-picker-browser) {
  padding: 0;
  border: 0;
  background: transparent;
}

#create-student-form .course-picker-heading {
  grid-template-columns: minmax(0, 1fr) auto;
}

#create-student-form :is(.course-picker h3, .request-review-section h3) {
  color: var(--students-blue);
  font-size: var(--fs-md);
  font-weight: 500;
}

#create-student-form :is(.course-option-row, .selected-course-item) {
  border: 0;
  border-bottom: 1px solid #e1e5eb;
  border-radius: 0;
  background: transparent;
}

#create-student-form .course-option-row.selected {
  background: #f4f8fc;
}

#create-student-form :is(.course-option-main, .selected-course-toggle) {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 14px 0;
}

#create-student-form :is(.course-option-main, .selected-course-toggle) strong {
  color: var(--students-blue);
  font-size: var(--fs-md);
  font-weight: 500;
  text-decoration: none;
  overflow-wrap: anywhere;
}

#create-student-form :is(.course-option-main, .selected-course-toggle) small {
  font-size: var(--fs-sm);
  font-weight: 400;
  text-transform: none;
}

#create-student-form :is(.course-add-button, .course-remove-button, .selected-course-icon) {
  color: var(--students-blue);
  border-color: var(--students-blue);
}

#create-student-form .selected-course-modules {
  background: transparent;
}

#create-student-form .selected-course-modules li {
  padding: 12px 0;
  overflow-wrap: anywhere;
}

#create-student-form .request-review-summary {
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid #e1e5eb;
  border-radius: 0;
  background: transparent;
}

.requests-list {
  padding: 0 44px 24px;
  display: grid;
  gap: 18px;
}

.request-card {
  background: #fff;
  border-radius: 24px;
  padding: 22px 24px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.request-card strong,
.request-card span {
  display: block;
}

.request-card strong {
  margin-bottom: 6px;
  font-size: 1rem;
}

.request-card span {
  color: #5d6677;
  line-height: 1.5;
}

.request-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.request-deny-button {
  border-color: #b6462a;
  color: #b6462a;
}

.request-deny-button:hover {
  background: #fff0eb;
}

.request-review-card {
  width: min(980px, 100%);
  max-height: calc(100vh - 48px);
  display: flex;
  flex-direction: column;
  border-radius: 18px;
}

.request-review-content {
  min-height: 0;
  overflow-y: auto;
  display: grid;
  gap: 20px;
}

.request-review-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 14px 16px;
  background: #f6f8fc;
  border: 1px solid #e4eaf4;
  border-radius: 12px;
}

.request-review-summary strong {
  font-size: 1.05rem;
}

.request-review-summary span {
  color: #5d6677;
}

.request-review-section {
  display: grid;
  gap: 12px;
}

.request-review-section h3 {
  margin: 0;
  font-size: 1rem;
}

.request-review-modules {
  display: grid;
  gap: 10px;
}

.request-review-module {
  padding: 14px 16px;
  background: #f6f8fc;
  border: 1px solid #e4eaf4;
  border-radius: 12px;
}

.request-review-module span,
.request-review-module strong {
  display: block;
}

.request-review-module span {
  color: #667286;
  font-size: 0.84rem;
  margin-bottom: 4px;
}

.request-review-module p {
  margin: 6px 0 0;
  color: #263247;
  line-height: 1.45;
}

.logs-toolbar {
  padding: 0 44px 24px;
  display: grid;
  gap: 12px;
}

.logs-filter-section {
  display: grid;
  gap: 8px;
}

.logs-filter-label {
  color: #5d6677;
  font-size: 0.88rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.logs-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.log-filter-button {
  border: 1px solid #d7dfef;
  background: #fff;
  color: #224a97;
  border-radius: 999px;
  padding: 9px 16px;
  font: inherit;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.log-filter-button.active,
.log-filter-button:hover {
  background: #224a97;
  color: #fff;
  border-color: #224a97;
}

.logs-filter-summary {
  margin: 0;
  color: #5d6677;
  line-height: 1.5;
}

.logs-groups {
  padding: 0 44px 24px;
  display: grid;
  gap: 18px;
}

.log-group-card {
  background: #fff;
  border-radius: 24px;
  padding: 22px 24px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 16px;
}

.log-group-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.log-group-header h2 {
  margin: 0 0 6px;
  font-size: 1.05rem;
}

.log-group-header p {
  margin: 0;
  color: #5d6677;
  line-height: 1.5;
}

.log-group-list {
  display: grid;
  gap: 18px;
}

.settings-grid {
  padding: 0 44px 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.settings-panel {
  background: #fff;
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.settings-panel h2 {
  margin: 0 0 10px;
  font-size: 1.3rem;
}

.settings-panel-text {
  margin: 0;
  color: #5d6677;
  line-height: 1.6;
}

.settings-help {
  display: grid;
  gap: 14px;
}

.settings-help-list {
  margin: 0;
  padding-left: 20px;
  color: #5d6677;
  line-height: 1.6;
  display: grid;
  gap: 10px;
}

.settings-status-list {
  display: grid;
  gap: 16px;
}

.settings-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
  gap: 14px;
}

.settings-status-card {
  background: #f6f8fc;
  border-radius: 18px;
  padding: 16px 18px;
}

.settings-status-card span,
.settings-status-card strong,
.settings-status-card small {
  display: block;
}

.settings-status-card span {
  color: #647084;
  margin-bottom: 8px;
}

.settings-status-card strong {
  font-size: 0.98rem;
  line-height: 1.4;
}

.settings-status-card small {
  margin-top: 10px;
  font-size: 0.84rem;
}

.settings-status-ok {
  color: #1b7b42;
}

.settings-status-warn {
  color: #9a6400;
}

.settings-alert-list {
  display: grid;
  gap: 12px;
}

.settings-alert-card {
  background: #fff7e8;
  border: 1px solid #efd8a5;
  border-radius: 18px;
  padding: 16px 18px;
}

.settings-alert-card strong,
.settings-alert-card span {
  display: block;
}

.settings-alert-card strong {
  margin-bottom: 6px;
}

.settings-alert-card span {
  color: #5d6677;
  line-height: 1.5;
}

.settings-user-card {
  background: #fff;
  border-radius: 24px;
  padding: 22px 24px;
  box-shadow: var(--shadow);
  display: grid;
  gap: 18px;
}

.settings-user-card.needs-attention {
  box-shadow:
    var(--shadow),
    inset 0 0 0 1px rgba(239, 166, 0, 0.42);
}

.settings-user-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.settings-user-header strong,
.settings-user-header span {
  display: block;
}

.settings-user-header strong {
  margin-bottom: 6px;
  font-size: 1rem;
}

.settings-user-header span {
  color: #5d6677;
  line-height: 1.5;
}

.settings-field {
  display: grid;
  gap: 8px;
  color: #263247;
}

.settings-field input {
  border: 1px solid #d8deea;
  border-radius: 16px;
  padding: 12px 14px;
  font: inherit;
  background: #f8faff;
}

.request-meta {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.request-chip {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: #f4f6fb;
  color: #42506a;
  font-size: 0.86rem;
}

.status-pending {
  background: #fff2d9;
  color: #9a6400;
}

.status-approved {
  background: #e4f7ea;
  color: #1b7b42;
}

.status-completed {
  background: #e9eef8;
  color: #385585;
}

.status-rejected {
  background: #fde9e5;
  color: #b6462a;
}

.status-info {
  background: #e9eef8;
  color: #385585;
}

.status-action {
  background: #e6f6ef;
  color: #1f7a46;
}

.status-warn {
  background: #fff1df;
  color: #9a6400;
}

.status-text {
  color: #666;
  font-style: italic;
}

.hidden {
  display: none !important;
}

.pagination {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 28px 44px 0;
  font-size: 1.05rem;
}

.pagination a {
  color: #444;
}

.placeholder {
  padding: 40px 44px;
}

.placeholder-card {
  background: #fff;
  border-radius: 28px;
  padding: 32px;
  box-shadow: var(--shadow);
}

.placeholder-card h2 {
  margin-top: 0;
  font-size: 2rem;
}

.placeholder-card p {
  max-width: 52ch;
  line-height: 1.6;
  color: #4a4a4a;
}

.metrics-grid {
  padding: 0 44px 24px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 18px;
}

.metric-card {
  background: #fff;
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.metric-card span {
  display: block;
  color: #647084;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.metric-card strong {
  display: block;
  font-size: 1.7rem;
}

.dashboard-organisations-section {
  padding: 0 44px 34px;
}

.dashboard-section-header {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  margin-bottom: 18px;
}

.dashboard-section-header h2 {
  margin: 0 0 8px;
  font-size: 1.4rem;
}

.dashboard-section-header p {
  margin: 0;
  color: #5f6f87;
  max-width: 58ch;
}

.dashboard-organisations-grid {
  display: block;
}

.organisation-list-card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, rgba(241, 245, 252, 0.98) 100%);
  border-radius: 28px;
  padding: 10px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(27, 62, 130, 0.08);
}

.organisation-list-header,
.organisation-list-row {
  display: grid;
  grid-template-columns: minmax(240px, 1.5fr) repeat(4, minmax(110px, 0.8fr)) 34px;
  gap: 14px;
  align-items: center;
  padding: 16px 18px;
}

.organisation-list-header {
  color: #738298;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.organisation-list-row {
  border-radius: 20px;
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.organisation-list-row:hover {
  background: rgba(234, 241, 255, 0.88);
  transform: translateY(-1px);
  box-shadow: 0 14px 32px rgba(16, 29, 61, 0.12);
}

.organisation-list-link {
  display: contents;
}

.organisation-list-primary {
  display: grid;
  gap: 8px;
}

.organisation-list-title-line {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.organisation-list-title-line strong {
  font-size: 1.08rem;
}

.organisation-list-code {
  display: inline-flex;
  align-items: center;
  padding: 7px 12px;
  border-radius: 999px;
  background: #eaf1ff;
  color: #214b98;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.organisation-list-primary p {
  margin: 0;
  color: #607088;
  line-height: 1.5;
}

.organisation-list-stat {
  display: grid;
  gap: 4px;
}

.organisation-list-stat span {
  color: #78879a;
  font-size: 0.76rem;
}

.organisation-list-stat strong {
  font-size: 1.02rem;
}

.organisation-list-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: #fff;
  color: #173b7a;
  font-size: 1rem;
  box-shadow: 0 8px 18px rgba(19, 34, 66, 0.1);
}

.insights-shell {
  margin: 28px;
  background: linear-gradient(180deg, rgba(252, 253, 255, 0.97) 0%, rgba(244, 247, 252, 0.98) 100%);
  border-radius: 34px;
  padding: 28px;
  box-shadow: 0 22px 60px rgba(17, 29, 58, 0.12);
}

.insights-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  margin-bottom: 26px;
}

.insights-back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #36578f;
  font-weight: 600;
}

.insights-back-link::before {
  content: "←";
}

.insights-topbar-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.insights-search {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: 999px;
  padding: 12px 16px;
  box-shadow: 0 10px 24px rgba(19, 34, 66, 0.08);
}

.insights-search span {
  color: #6d7c91;
  font-size: 0.88rem;
}

.insights-search input {
  border: 0;
  outline: 0;
  background: transparent;
  min-width: 220px;
  font: inherit;
}

.insights-export-button {
  margin-top: 0;
}

.insights-hero {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 24px;
  margin-bottom: 22px;
}

.insights-hero h1 {
  margin: 8px 0 10px;
  font-size: var(--fs-2xl);
  line-height: 0.95;
}

.insights-date {
  margin: 0;
  color: #68788d;
}

.insights-hero-note {
  min-width: 240px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 24px;
  padding: 18px 20px;
  box-shadow: 0 12px 30px rgba(19, 34, 66, 0.08);
  display: grid;
  gap: 10px;
}

.insights-hero-note strong {
  font-size: 0.9rem;
  color: #36578f;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.insights-hero-note span {
  color: #5b6d83;
  line-height: 1.6;
}

.insights-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
  margin-bottom: 22px;
}

.insight-stat-card {
  background: #fff;
  border-radius: 24px;
  padding: 22px;
  box-shadow: 0 16px 34px rgba(19, 34, 66, 0.09);
  display: grid;
  gap: 8px;
}

.insight-stat-card span {
  color: #738298;
}

.insight-stat-card strong {
  font-size: 2rem;
}

.insight-stat-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #6b7c91;
  font-size: 0.84rem;
}

.insight-stat-trend {
  color: #31a567;
  font-weight: 700;
}

.insights-main-grid,
.insights-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.9fr);
  gap: 20px;
  margin-bottom: 20px;
}

.insight-panel {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 28px;
  padding: 22px;
  box-shadow: 0 16px 36px rgba(19, 34, 66, 0.08);
}

.insight-panel-large {
  min-height: 360px;
}

.insight-panel-header {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 16px;
  margin-bottom: 16px;
}

.insight-panel-header h2 {
  margin: 0 0 6px;
  font-size: 1.55rem;
}

.insight-panel-header p {
  margin: 0;
  color: #738298;
  line-height: 1.5;
}

.insight-bar-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
  align-items: end;
  gap: 14px;
  min-height: 280px;
  padding-top: 18px;
}

.insight-bar-column {
  display: grid;
  align-items: end;
  gap: 10px;
}

.insight-bar {
  border-radius: 22px 22px 14px 14px;
  background: linear-gradient(180deg, #dfff45 0%, #cbe83d 100%);
  min-height: 48px;
  position: relative;
}

.insight-bar:nth-child(odd),
.insight-bar-column:nth-child(even) .insight-bar {
  background: linear-gradient(180deg, #5c96f0 0%, #4f85dd 100%);
}

.insight-bar-value {
  position: absolute;
  top: -34px;
  left: 50%;
  transform: translateX(-50%);
  background: #1c2433;
  color: #fff;
  font-size: 0.74rem;
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.insight-bar-label strong,
.insight-bar-label span {
  display: block;
  text-align: center;
}

.insight-bar-label strong {
  font-size: 0.88rem;
}

.insight-bar-label span {
  color: #738298;
  font-size: 0.78rem;
  margin-top: 4px;
}

.insight-gauge-wrap {
  display: grid;
  gap: 20px;
}

.insight-gauge {
  width: min(100%, 290px);
  aspect-ratio: 1 / 1;
  margin: 10px auto 0;
  border-radius: 50%;
  background: conic-gradient(#5b92ee 0deg, #5b92ee 180deg, #e8edf6 180deg 360deg);
  display: grid;
  place-items: center;
}

.insight-gauge-inner {
  width: 70%;
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  background: #fff;
  display: grid;
  place-items: center;
  text-align: center;
  box-shadow: inset 0 0 0 12px rgba(245, 248, 252, 0.95);
}

.insight-gauge-inner strong {
  font-size: 2rem;
}

.insight-gauge-inner span {
  color: #6f7f95;
  font-size: 0.86rem;
}

.insight-inline-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.insight-inline-card {
  background: #f2f5fb;
  border-radius: 20px;
  padding: 16px;
}

.insight-inline-card span {
  display: block;
  color: #74839a;
  margin-bottom: 8px;
}

.insight-inline-card strong {
  font-size: 1.45rem;
}

.insight-highlight-card {
  background: linear-gradient(135deg, #eff5ff 0%, #ffffff 100%);
  border-radius: 24px;
  padding: 22px;
  display: grid;
  gap: 10px;
  min-height: 180px;
}

.insight-highlight-card strong {
  font-size: 1.45rem;
}

.insight-highlight-card span {
  color: #6d7c91;
}

.insight-year-list {
  display: grid;
  gap: 12px;
}

.insight-year-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  background: #f4f7fc;
  border-radius: 18px;
  padding: 14px 16px;
}

.insight-year-copy strong,
.insight-year-copy span {
  display: block;
}

.insight-year-copy span {
  color: #6d7c91;
  margin-top: 4px;
}

.insight-year-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 8px 12px;
  border-radius: 999px;
  background: #dff24e;
  color: #213018;
  font-weight: 700;
}

.insight-students-table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: clip;
}

.insight-students-table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.insight-students-table thead th {
  text-align: left;
  color: #6f8097;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0 0 14px;
  border-bottom: 1px solid rgba(31, 56, 101, 0.08);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.insight-students-table tbody td {
  padding: 14px 0;
  border-bottom: 1px solid rgba(31, 56, 101, 0.08);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.insight-students-table tbody tr:last-child td {
  border-bottom: 0;
}

.insight-students-table small {
  color: #708098;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
}

.login-panel {
  width: min(920px, 100%);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 36px;
  padding: 42px;
  box-shadow: 0 28px 80px rgba(8, 14, 28, 0.28);
  display: grid;
  grid-template-columns: 1.1fr 0.95fr;
  gap: 32px;
}

.login-brand h1 {
  margin: 6px 0 12px;
  font-size: var(--fs-form-title);
  line-height: 0.98;
  letter-spacing: 0;
}

.login-brand p {
  color: #556070;
  line-height: 1.6;
  max-width: 36ch;
}

.eyebrow {
  margin: 0;
  color: #ff4d22;
  font-size: 0.85rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.login-form {
  display: grid;
  gap: 16px;
  align-content: start;
}

.login-form label {
  display: grid;
  gap: 8px;
  color: #263247;
  font-weight: 500;
}

.login-form input {
  border: 1px solid #d8deea;
  border-radius: 18px;
  padding: 14px 16px;
  font: inherit;
  background: #f8faff;
}

.verification-note {
  margin: 0;
  color: #556070;
  line-height: 1.5;
}

.inline-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.primary-button {
  border: 0;
  border-radius: 999px;
  padding: 14px 22px;
  font: inherit;
  font-weight: 600;
  color: #fff;
  background: var(--students-blue);
  cursor: pointer;
}

.form-message {
  min-height: 1.4em;
  margin: 0;
  color: #c1381a;
}

.form-message.success {
  color: #137a39;
  font-weight: 600;
}

.login-accounts {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.account-card {
  background: #f6f8fc;
  border-radius: 22px;
  padding: 18px;
}

.account-card strong,
.account-card span {
  display: block;
}

.account-card strong {
  margin-bottom: 6px;
}

body[data-page="login"] {
  background: #fff;
}

body[data-page="login"] .login-shell {
  place-items: stretch;
  padding: 0;
}

body[data-page="login"] .login-panel {
  width: 100%;
  min-height: 100vh;
  border-radius: 0;
  box-shadow: none;
  grid-template-columns: clamp(260px, 32vw, 420px) minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 0;
  padding: 0;
  background: #fff;
}

body[data-page="login"] .login-brand {
  grid-row: 1 / -1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(32px, 5vw, 64px);
  background: var(--students-blue);
  color: #fff;
}

body[data-page="login"] .login-brand h1,
body[data-page="login"] .login-brand p,
body[data-page="login"] .eyebrow {
  color: #fff;
}

body[data-page="login"] .login-form,
body[data-page="login"] .login-accounts {
  width: min(560px, calc(100% - 64px));
  margin-right: auto;
  margin-left: auto;
}

body[data-page="login"] .login-form {
  grid-column: 2;
  grid-row: 2;
  align-self: center;
}

body[data-page="login"] .login-form.hidden {
  display: none !important;
}

body[data-page="login"] .login-accounts {
  grid-column: 2;
  grid-row: 3;
  align-self: start;
  margin-top: 28px;
  padding-bottom: clamp(36px, 8vh, 88px);
}

@media (max-width: 920px) {
  .layout {
    grid-template-columns: 1fr;
  }

  body:not([data-page="login"]) {
    height: auto;
    min-height: 100vh;
    overflow-x: clip;
    overflow-y: auto;
  }

  body[data-page="classes"] {
    height: auto;
    min-height: 100vh;
    overflow-x: clip;
    overflow-y: auto;
  }

  body:not([data-page="login"]) .layout {
    height: auto;
    min-height: 100vh;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  body[data-page="classes"] .layout {
    height: auto;
    min-height: 100vh;
    grid-template-columns: 1fr;
    overflow: visible;
  }

  body:not([data-page="login"]) .layout.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  body[data-page="classes"] .layout.sidebar-collapsed {
    grid-template-columns: 1fr;
  }

  body:not([data-page="login"]) .main {
    height: auto;
    overflow: visible;
    padding: 32px 24px 28px;
  }

  body[data-page="classes"] .main {
    height: auto;
    overflow: visible;
    padding: 32px 24px 28px;
  }

  body[data-page="students"] .table-card {
    flex: none;
    max-height: 70vh;
  }

  .sidebar {
    align-items: flex-start;
    padding: 32px 24px;
  }

  body:not([data-page="login"]) .sidebar {
    border-radius: 0 0 24px 24px;
    align-items: flex-start;
    padding: 32px 24px;
  }

  body[data-page="classes"] .sidebar {
    border-radius: 0 0 24px 24px;
    align-items: flex-start;
    padding: 32px 24px;
  }

  body:not([data-page="login"]) .layout.sidebar-collapsed .sidebar {
    align-items: flex-start;
    padding: 32px 24px;
  }

  body[data-page="classes"] .layout.sidebar-collapsed .sidebar {
    align-items: flex-start;
    padding: 32px 24px;
  }

  body:not([data-page="login"]) .layout.sidebar-collapsed .profile-name,
  body:not([data-page="login"]) .layout.sidebar-collapsed .profile-role,
  body:not([data-page="login"]) .layout.sidebar-collapsed .nav-label {
    display: block;
  }

  body[data-page="classes"] .layout.sidebar-collapsed .profile-name,
  body[data-page="classes"] .layout.sidebar-collapsed .profile-role,
  body[data-page="classes"] .layout.sidebar-collapsed .nav-label {
    display: block;
  }

  body:not([data-page="login"]) .layout.sidebar-collapsed .nav-icon {
    display: inline-flex;
  }

  body[data-page="classes"] .layout.sidebar-collapsed .nav-icon {
    display: inline-flex;
  }

  body:not([data-page="login"]) .layout.sidebar-collapsed .avatar {
    width: 120px;
    height: 120px;
    margin-top: 16px;
  }

  body[data-page="classes"] .layout.sidebar-collapsed .avatar {
    width: 120px;
    height: 120px;
    margin-top: 16px;
  }

  body:not([data-page="login"]) .layout.sidebar-collapsed .nav a,
  body:not([data-page="login"]) .layout.sidebar-collapsed .nav a.active {
    width: auto;
    min-height: 54px;
    padding: 13px 20px 13px 28px;
    border-radius: 18px;
    grid-template-columns: 22px minmax(0, 1fr);
  }

  body[data-page="classes"] .layout.sidebar-collapsed .nav a,
  body[data-page="classes"] .layout.sidebar-collapsed .nav a.active {
    width: auto;
    min-height: 54px;
    padding: 13px 20px 13px 28px;
    border-radius: 18px;
    grid-template-columns: 22px minmax(0, 1fr);
  }

  body:not([data-page="login"]) .layout.sidebar-collapsed .sidebar-logout {
    width: auto;
    height: auto;
    padding: 10px 18px;
    font-size: inherit;
  }

  body[data-page="classes"] .layout.sidebar-collapsed .sidebar-logout {
    width: auto;
    height: auto;
    padding: 10px 18px;
    font-size: inherit;
  }

  body:not([data-page="login"]) .layout.sidebar-collapsed .sidebar-logout::before {
    content: none;
  }

  body[data-page="classes"] .layout.sidebar-collapsed .sidebar-logout::before {
    content: none;
  }

  .sidebar-logo {
    top: 18px;
    left: 20px;
    width: 126px;
    max-height: 81px;
  }

  .avatar {
    margin-top: 16px;
    width: 120px;
    height: 120px;
  }

  .profile-role {
    margin-bottom: 28px;
  }

  .nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body:not([data-page="login"]) .nav {
    grid-template-columns: 1fr;
    width: 100%;
  }

  body[data-page="classes"] .nav {
    grid-template-columns: 1fr;
    width: 100%;
  }

  body:not([data-page="login"]) .nav a.active {
    width: auto;
    margin-left: 0;
    padding-left: 28px;
    border-radius: 18px;
  }

  body[data-page="classes"] .nav a.active {
    width: auto;
    margin-left: 0;
    padding-left: 28px;
    border-radius: 18px;
  }

  .topbar {
    padding: 24px 24px 18px;
    flex-direction: column;
    align-items: flex-start;
  }

  body[data-page="students"] .students-hero,
  body[data-page="classes"] .students-hero,
  .students-summary-grid,
  .student-total-card,
  .student-percentage-card,
  .students-toolbar,
  .students-filter-group,
  .students-pagination {
    grid-template-columns: 1fr;
    flex-direction: column;
    align-items: stretch;
  }

  .student-total-card,
  .student-percentage-card {
    min-height: 180px;
    padding: 28px;
  }

  body:not([data-page="login"]) .search {
    width: min(100%, 320px);
  }

  body[data-page="classes"] .search {
    width: min(100%, 320px);
  }

  .students-toolbar-left {
    flex-wrap: wrap;
  }

  body[data-page="classes"] .page-title {
    font-size: 4rem;
  }

  .organisation-card-grid {
    flex: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(4, minmax(230px, auto));
    grid-auto-rows: minmax(230px, auto);
  }

  .organisation-card {
    min-height: 230px;
  }

  .organisation-detail-summary {
    grid-template-columns: 1fr;
  }

  .organisation-detail-topbar,
  .organisation-detail-summary-grid,
  .organisation-payment-summary {
    grid-template-columns: 1fr;
  }

  .organisation-detail-actions {
    justify-content: flex-start;
  }

  .organisation-breadcrumb {
    font-size: 1.25rem;
  }

  .organisation-assign-target,
  .organisation-assign-row,
  .organisation-year-form {
    grid-template-columns: 1fr;
  }

  .students-table thead th,
  .students-table tbody td {
    padding-left: 12px;
    padding-right: 12px;
    white-space: normal;
  }

  .pagination,
  .placeholder,
  .dashboard-organisations-section,
  .marks-summary-grid,
  .drilldown-panel,
  .settings-grid,
  .logs-toolbar,
  .logs-groups {
    padding-left: 24px;
    padding-right: 24px;
  }

  .login-panel {
    grid-template-columns: 1fr;
    padding: 28px;
  }

  .login-accounts {
    grid-template-columns: 1fr;
  }

  body[data-page="login"] .login-panel {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
    padding: 0;
  }

  body[data-page="login"] .login-brand {
    grid-row: auto;
    min-height: auto;
    padding: 30px 28px;
    justify-content: flex-start;
  }

  body[data-page="login"] .login-form,
  body[data-page="login"] .login-accounts {
    width: min(100% - 48px, 560px);
  }

  body[data-page="login"] .login-form {
    grid-column: 1;
    grid-row: auto;
    padding-top: 30px;
  }

  body[data-page="login"] .login-accounts {
    grid-column: 1;
    grid-row: auto;
    padding-bottom: 30px;
  }

  .panel-header,
  .detail-grid,
  .edit-form,
  .wizard-section,
  .services-fieldset,
  .marks-summary-grid,
  .settings-grid,
  .settings-user-header,
  .log-group-header {
    grid-template-columns: 1fr;
  }

  .settings-user-header {
    display: grid;
  }

  .log-group-header {
    display: grid;
  }

  .insights-shell {
    margin: 20px;
    padding: 22px;
  }

  .insights-topbar,
  .insights-hero,
  .dashboard-section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .insights-topbar-actions,
  .insight-inline-metrics,
  .insights-main-grid,
  .insights-bottom-grid {
    grid-template-columns: 1fr;
  }

  .organisation-list-header {
    display: none;
  }

  .organisation-list-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .organisation-list-action {
    justify-self: start;
  }

  .insights-search {
    width: 100%;
  }

  .insights-search input {
    min-width: 0;
    width: 100%;
  }

  .filter-select,
  .search {
    width: 100%;
    min-width: 0;
  }

  .create-fullscreen-card .modal-header,
  .create-fullscreen-card .modal-content {
    padding-left: 24px;
    padding-right: 24px;
  }

  .student-detail-card .modal-header,
  .student-detail-card .modal-content {
    padding-left: 24px;
    padding-right: 24px;
  }

  .form-layout-card {
    height: 100vh;
    height: 100dvh;
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .form-layout-card .modal-header {
    max-height: 38vh;
    padding: 28px 24px 22px;
  }

  .form-layout-card .modal-header h2 {
    max-width: calc(100% - 52px);
    font-size: var(--fs-form-title);
  }

  .form-layout-card .modal-content {
    height: auto;
    min-height: 0;
    padding: 28px 24px 34px;
  }

  .form-layout-card .wizard-progress {
    margin-top: 0;
  }

  .form-layout-card .wizard-steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .student-edit-card .edit-form,
  .student-edit-card .services-fieldset {
    grid-template-columns: 1fr;
  }

  .student-edit-card.form-layout-card .edit-form,
  .student-edit-card.form-layout-card .services-fieldset {
    grid-template-columns: 1fr;
  }

  .student-profile-hero {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }

  .student-profile-snapshot,
  .student-record-grid {
    grid-template-columns: 1fr;
  }

  .wizard-steps {
    grid-template-columns: 1fr;
  }

  .wizard-section {
    min-height: 0;
  }

  .course-picker {
    grid-template-columns: 1fr;
  }

  .course-picker-selected {
    border-right: 0;
    border-bottom: 1px solid #e2e6ee;
  }

  .course-picker-heading {
    grid-template-columns: minmax(0, 1fr) 80px 44px;
  }

  .course-option-main {
    grid-template-columns: minmax(0, 1fr) 80px;
  }

  .wizard-section select[multiple] {
    min-height: 210px;
  }

  .form-actions,
  .wizard-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 620px) {
  body[data-page="classes"] .page-title {
    font-size: 3rem;
  }

  .organisation-card-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(8, minmax(230px, auto));
  }
}

/* Responsive typography scale
   Uses fixed modular steps at breakpoints so text is predictable on phones,
   tablets, compact laptops, and wide laptops without viewport-based type. */
:root {
  --fs-2xs: 0.72rem;
  --fs-xs: 0.78rem;
  --fs-sm: 0.88rem;
  --fs-base: 1rem;
  --fs-md: 1.12rem;
  --fs-lg: 1.28rem;
  --fs-xl: 1.6rem;
  --fs-2xl: 2rem;
  --fs-3xl: 2.56rem;
  --fs-4xl: 3.2rem;
  --fs-display: 4.4rem;
  --fs-hero-number: 5.4rem;
  --fs-form-title: 3.4rem;
  --lh-tight: 1.04;
  --lh-title: 1.1;
  --lh-copy: 1.5;
}

@media (max-width: 620px) {
  :root {
    --fs-base: 0.94rem;
    --fs-md: 1.02rem;
    --fs-lg: 1.14rem;
    --fs-xl: 1.36rem;
    --fs-2xl: 1.68rem;
    --fs-3xl: 2rem;
    --fs-4xl: 2.36rem;
    --fs-display: 2.72rem;
    --fs-hero-number: 3.6rem;
    --fs-form-title: 2.16rem;
  }
}

@media (min-width: 621px) and (max-width: 920px) {
  :root {
    --fs-display: 3.28rem;
    --fs-hero-number: 4.24rem;
    --fs-form-title: 2.56rem;
  }
}

@media (min-width: 921px) and (max-width: 1180px) {
  :root {
    --fs-base: 0.96rem;
    --fs-md: 1.04rem;
    --fs-lg: 1.18rem;
    --fs-xl: 1.42rem;
    --fs-2xl: 1.78rem;
    --fs-3xl: 2.22rem;
    --fs-4xl: 2.78rem;
    --fs-display: 3.4rem;
    --fs-hero-number: 4.5rem;
    --fs-form-title: 2.72rem;
  }
}

@media (min-width: 1181px) and (max-width: 1366px) {
  :root {
    --fs-display: 3.92rem;
    --fs-hero-number: 5rem;
    --fs-form-title: 3rem;
  }
}

@media (min-width: 1441px) {
  :root {
    --fs-display: 4.8rem;
    --fs-hero-number: 5.9rem;
    --fs-form-title: 3.72rem;
  }
}

body {
  font-size: var(--fs-base);
  line-height: var(--lh-copy);
}

body :is(h1, h2, h3, p, a, span, strong, small, em, label, legend, li, summary, th, td, button, input, select, textarea) {
  letter-spacing: 0 !important;
  min-width: 0;
}

button,
input,
select,
textarea {
  font-size: var(--fs-base);
  line-height: 1.25;
}

.page-title,
body:not([data-page="login"]) .page-title,
body[data-page="classes"] .page-title {
  font-size: var(--fs-display);
  line-height: var(--lh-tight);
}

.students-page-note,
.panel-header h2,
.modal-header h2,
.placeholder-card h2,
.settings-panel h2,
.insights-hero h1,
.login-brand h1 {
  line-height: var(--lh-title);
}

.topbar,
.students-toolbar,
.students-filter-group,
.students-pagination,
.request-card,
.settings-panel-text,
.settings-help,
.insights-hero-note span,
.placeholder-card p {
  font-size: var(--fs-base);
  line-height: var(--lh-copy);
}

.profile-name,
body:not([data-page="login"]) .profile-name,
body[data-page="classes"] .profile-name {
  font-size: min(var(--fs-xl), 1.6rem);
  line-height: var(--lh-title);
}

/* Keep sidebar text inside its column, including long account names. */
body:not([data-page="login"]) :is(.profile-name, .profile-role, .nav-label) {
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

.profile-role,
body:not([data-page="login"]) .profile-role,
body[data-page="classes"] .profile-role,
.students-table tbody td,
.organisation-card-meta,
.organisation-assign-row span,
.detail-item strong,
.student-record-field strong,
.metric-card span,
.settings-status-card small,
.logs-filter-label,
.insights-date,
.insights-hero-note strong,
.account-card span {
  font-size: var(--fs-sm);
}

.nav a,
body:not([data-page="login"]) .nav a,
body[data-page="classes"] .nav a {
  font-size: min(var(--fs-base), 1rem);
  line-height: 1.3;
}

.search,
.filter-select,
.filter-chip,
.student-filter-value-select,
.secondary-button,
.primary-button,
.student-actions button,
.create-menu-dropdown button,
.organisation-card-button,
.organisation-assign-row .secondary-button {
  font-size: var(--fs-base);
}

.students-table thead th,
.programme-break-content strong,
.request-card strong,
.request-review-summary strong,
.settings-user-header strong,
.organisation-assign-target strong,
.account-card strong {
  font-size: var(--fs-md);
  line-height: 1.25;
}

.students-page-note,
.student-total-card span,
.student-percentage-copy span,
.organisation-breadcrumb,
.organisation-detail-summary-grid strong,
.organisation-payment-summary strong,
.metric-card strong {
  font-size: var(--fs-lg);
}

.student-total-card strong {
  font-size: var(--fs-hero-number);
  line-height: 0.92;
}

.student-percentage-copy strong {
  font-size: var(--fs-3xl);
  line-height: var(--lh-tight);
}

.organisation-card-title {
  font-size: var(--fs-xl);
  line-height: var(--lh-title);
}

.organisation-card-status,
.student-profile-heading h3,
.placeholder-card h2,
.settings-panel h2,
.insights-hero h1 {
  font-size: var(--fs-2xl);
}

.form-layout-card .modal-header h2,
body[data-page="login"] .login-brand h1 {
  font-size: var(--fs-form-title);
  line-height: var(--lh-tight);
}

.form-layout-card .modal-content {
  font-size: var(--fs-base);
}

.edit-form label,
.wizard-steps li,
.course-picker-heading,
.course-option-main,
.selected-course-toggle,
.services-fieldset legend,
.request-student-summary span,
.request-student-summary small {
  font-size: var(--fs-sm);
  line-height: 1.25;
}

.edit-form input,
.edit-form select,
.edit-form textarea,
.organisation-assign-target select,
.organisation-assign-search input,
.settings-field input,
.login-form input {
  font-size: var(--fs-base);
}

.form-message,
.status-text,
.status-cell,
.pipeline-status-pill,
.mark-status-pill,
.payment-status-pill,
.organisation-card-status-message {
  font-size: var(--fs-sm);
  line-height: 1.35;
}

.student-add-icon,
.close-button {
  font-size: var(--fs-xl);
}

.action-button,
.menu-dots {
  font-size: var(--fs-xl);
  letter-spacing: 0 !important;
}

.settings-status-card strong,
.insight-students-table,
.logs-filter-summary,
.request-review-module strong {
  font-size: var(--fs-base);
}

@media (min-width: 921px) and (max-width: 1180px) {
  body:not([data-page="login"]) .layout,
  body[data-page="classes"] .layout {
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  }

  body:not([data-page="login"]) .sidebar,
  body[data-page="classes"] .sidebar {
    padding: 48px 24px 28px;
  }

  body:not([data-page="login"]) .avatar,
  body[data-page="classes"] .avatar {
    width: 132px;
    height: 132px;
    margin: 104px 0 18px;
  }

  body:not([data-page="login"]) .main,
  body[data-page="classes"] .main {
    padding: var(--workspace-padding-block) var(--workspace-padding-inline) 24px;
  }

  body[data-page="students"] .students-hero,
  body[data-page="classes"] .students-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }

  .students-summary-grid,
  .organisation-detail-summary-grid,
  .organisation-payment-summary {
    gap: 12px;
  }

  .student-total-card,
  .student-percentage-card {
    min-height: 200px;
    padding: 28px;
  }

  .student-percentage-card {
    grid-template-columns: minmax(0, 1fr) 128px;
  }

  .student-percentage-meter {
    width: 128px;
  }

  .organisation-card-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: none;
    grid-auto-rows: minmax(210px, auto);
  }

  .organisation-card {
    min-height: 210px;
    padding: 24px 22px 18px;
  }

  .form-layout-card {
    grid-template-columns: 300px minmax(0, 1fr);
  }

  .form-layout-card .modal-header,
  .form-layout-card .modal-content {
    padding: 36px 32px;
  }

  .student-edit-card.form-layout-card .edit-form,
  .student-edit-card.form-layout-card .services-fieldset {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1181px) and (max-width: 1366px) {
  body:not([data-page="login"]) .layout,
  body[data-page="classes"] .layout {
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  }

  body:not([data-page="login"]) .main,
  body[data-page="classes"] .main {
    padding: var(--workspace-padding-block) var(--workspace-padding-inline) 24px;
  }

  body[data-page="students"] .students-hero,
  body[data-page="classes"] .students-hero {
    grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr);
  }

  .organisation-card-grid {
    grid-auto-rows: minmax(220px, 1fr);
  }

  .form-layout-card {
    grid-template-columns: 320px minmax(0, 1fr);
  }
}

@media (max-width: 920px) {
  .form-layout-card .modal-header h2 {
    font-size: var(--fs-form-title);
  }

  body[data-page="login"] .login-brand h1 {
    font-size: var(--fs-form-title);
  }
}

/* Shared content surfaces use the Students page's spacing and palette. */
body:not([data-page="login"]) .main > :not(.table-card) {
  flex-shrink: 0;
}

body:not([data-page="login"]) .topbar {
  align-items: flex-start;
  flex-wrap: wrap;
  padding: 0 8px 24px;
}

body:not([data-page="login"]) .page-title {
  max-width: 100%;
  overflow-wrap: anywhere;
}

body:not([data-page="login"]) .topbar-actions {
  width: 100%;
  padding-top: 8px;
}

body:not([data-page="login"]) :is(.placeholder, .metrics-grid, .marks-summary-grid, .requests-list, .settings-grid, .logs-toolbar, .logs-groups) {
  padding: 0 8px 24px;
}

body:not([data-page="login"]) .placeholder-card {
  padding: 0 0 24px;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  border-bottom: 1px solid var(--border);
}

body:not([data-page="login"]) .placeholder-card h2 {
  margin: 0 0 8px;
  font-size: var(--fs-lg);
  font-weight: 500;
}

body:not([data-page="login"]) .placeholder-card p {
  margin: 0;
  max-width: 72ch;
  color: #5d6677;
}

body:not([data-page="login"]) :is(.metrics-grid, .marks-summary-grid) {
  grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr));
  gap: 16px;
}

body:not([data-page="login"]) .metric-card {
  padding: 26px 24px;
  border-radius: 8px;
  background: #e8edf3;
  box-shadow: none;
}

body:not([data-page="login"]) .metric-card strong {
  font-size: var(--fs-2xl);
  font-weight: 500;
  line-height: 1.15;
}

body:not([data-page="login"]) .metric-card:first-child {
  background: var(--students-blue);
  color: #fff;
}

body:not([data-page="login"]) .metric-card:first-child span {
  color: #fff;
}

body:not([data-page="login"]) .filter-select {
  min-width: 0;
  max-width: 100%;
  border: 0;
  background: #eef2f6;
  color: var(--students-blue);
}

/* Keep long course names from expanding the filter toolbar. */
.students-filter-group .filter-select {
  max-width: min(320px, 100%);
}

body:not([data-page="login"]) .table-card {
  border: 0;
  background: #fff;
}

body[data-page="marks"] .table-card {
  flex: 1 0 280px;
  min-height: 0;
  overflow: auto;
}

body:not([data-page="login"]) :is(.settings-panel, .log-group-card) {
  padding: 22px 0;
  border-top: 1px solid var(--border);
  border-radius: 0;
  box-shadow: none;
}

body:not([data-page="login"]) .settings-panel h2 {
  font-size: var(--fs-lg);
  font-weight: 500;
}

body:not([data-page="login"]) :is(.request-card, .settings-user-card) {
  border: 1px solid #e1e5eb;
  border-radius: 8px;
  box-shadow: none;
}

body:not([data-page="login"]) .settings-user-card.needs-attention {
  border-color: #d4a64a;
}

body:not([data-page="login"]) :is(.request-card, .settings-user-header, .log-group-header) {
  flex-wrap: wrap;
}

body:not([data-page="login"]) :is(.request-card, .settings-user-card, .log-group-card, .settings-panel) {
  overflow-wrap: anywhere;
}

body:not([data-page="login"]) :is(.settings-status-card, .settings-alert-card, .request-review-summary, .request-review-module) {
  border-radius: 8px;
}

body:not([data-page="login"]) .log-filter-button {
  border-color: #e8edf3;
  color: var(--students-blue);
  background: #e8edf3;
}

body:not([data-page="login"]) .log-filter-button.active,
body:not([data-page="login"]) .log-filter-button:hover {
  background: var(--students-blue);
  border-color: var(--students-blue);
  color: #fff;
}

body:not([data-page="login"]) .settings-field input {
  max-width: 100%;
  border: 1px solid #d8dfe8;
  border-radius: 8px;
  background: #f5f6f8;
}

.primary-button:hover:not(:disabled) {
  background: #004f89;
}

:is(button, a, input, select, textarea):focus-visible {
  outline: 3px solid #79b9e8;
  outline-offset: 3px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.request-review-card {
  border-radius: 8px;
}

.request-review-card .modal-header {
  gap: 16px;
  padding: 24px 28px;
  background: var(--students-blue);
  color: #fff;
}

.request-review-card .modal-header .close-button {
  color: #fff;
}

body[data-page="login"] :is(.login-form input, .account-card) {
  border-radius: 8px;
}

/* Leave more room for navigation on laptop screens. */
@media (min-width: 921px) and (max-height: 1000px) {
  body:not([data-page="login"]) .layout:not(.sidebar-collapsed) .sidebar {
    padding-top: 64px;
    padding-bottom: 24px;
  }

  body:not([data-page="login"]) .layout:not(.sidebar-collapsed) .avatar {
    flex-shrink: 0;
    width: clamp(56px, 10vh, 100px);
    height: clamp(56px, 10vh, 100px);
    margin: 16px 0;
  }

  body:not([data-page="login"]) .layout:not(.sidebar-collapsed) .profile-role {
    margin-bottom: 24px;
  }

  body:not([data-page="login"]) .layout:not(.sidebar-collapsed) .nav a {
    min-height: 42px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  body:not([data-page="login"]) .layout:not(.sidebar-collapsed) .sidebar-logout {
    margin-top: 20px;
  }
}

@media (max-width: 920px) {
  body:not([data-page="login"]) .avatar {
    width: 120px;
    height: 120px;
    margin: 16px 0 18px;
  }

  body:not([data-page="login"]) .profile-role {
    margin-bottom: 28px;
  }

  body:not([data-page="login"]) .layout.sidebar-collapsed .nav a {
    margin-left: 0;
  }
}

@media (max-width: 620px) {
  body:not([data-page="login"]) .main {
    padding: 28px 16px;
  }

  body:not([data-page="login"]) :is(.topbar-actions, .request-actions, .inline-actions) {
    align-items: stretch;
    flex-direction: column;
  }

  body:not([data-page="login"]) :is(.search, .filter-select) {
    width: 100%;
  }

  body:not([data-page="login"]) :is(.metrics-grid, .marks-summary-grid) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  body:not([data-page="login"]) .metric-card {
    padding: 20px 16px;
  }

  body:not([data-page="login"]) .metric-card strong {
    overflow-wrap: anywhere;
  }
}

/* Desktop layouts adapt to both laptop width and available screen height. */
@media (min-width: 921px) {
  body:not([data-page="login"]),
  body:not([data-page="login"]) :is(.layout, .main) {
    height: 100dvh;
  }

  body:not([data-page="login"]) .main {
    scrollbar-gutter: stable;
  }

  .students-summary-grid {
    padding-bottom: 20px;
  }

  .student-total-card,
  .student-percentage-card {
    min-height: clamp(140px, 20vh, 200px);
    padding: clamp(18px, 2vw, 32px);
    gap: 16px;
  }

  .student-total-card {
    flex-wrap: wrap;
  }

  .student-total-card strong {
    font-size: clamp(3rem, 5vw, 5.5rem);
    overflow-wrap: anywhere;
  }

  .student-percentage-card {
    grid-template-columns: minmax(0, 1fr) clamp(80px, 8vw, 128px);
  }

  .student-percentage-meter {
    width: 100%;
  }

  .students-pagination {
    flex-wrap: wrap;
    gap: 12px;
  }

  .organisation-card-grid {
    grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
    grid-template-rows: none;
    grid-auto-rows: minmax(220px, auto);
  }

  .form-layout-card,
  .form-layout-card .modal-content {
    height: 100dvh;
  }
}

@media (min-width: 921px) and (max-width: 1600px) {
  :root {
    --fs-display: clamp(2.5rem, 4vw, 4rem);
  }

  body:not([data-page="login"]) .students-table {
    min-width: 760px;
  }

  body[data-page="marks"] .students-table {
    min-width: 860px;
  }

  body:not([data-page="login"]) .students-table :is(th, td) {
    padding: 16px 18px;
  }

  body[data-page="students"] .students-table thead th:nth-child(3) {
    width: 90px;
  }

  body:not([data-page="login"]) .students-table :is(th, td):last-child {
    width: 110px;
  }
}

@media (min-width: 921px) and (max-width: 1366px) {
  .form-layout-card {
    grid-template-columns: clamp(240px, 25vw, 300px) minmax(0, 1fr);
  }

  .form-layout-card :is(.modal-header, .modal-content) {
    padding: 28px 24px;
  }

  .student-profile-hero {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .student-profile-snapshot {
    grid-column: 1 / -1;
  }

  .course-picker,
  .insights-main-grid,
  .insights-bottom-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .student-record-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 921px) and (max-height: 700px) {
  body:not([data-page="login"]) .layout:not(.sidebar-collapsed) .avatar {
    width: 56px;
    height: 56px;
    margin: 0 0 12px;
  }

  body:not([data-page="login"]) .profile-role {
    margin-bottom: 16px;
  }

  body:not([data-page="login"]) .topbar,
  body:not([data-page="login"]) .students-hero {
    padding-bottom: 16px;
  }
}
