:root {
	--cosmo-blue: #202959;
	--cosmo-gold: #fdd00d;
	--primary: #202959;
	--primary-dark: #202959;
	--primary-soft: #202959;
	--ink: #202959;
	--muted: #6b7280;
	--line: #e9eaee;
	--canvas: #f6f7f9;
	--font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* {
	box-sizing: border-box;
}

body {
	background: var(--canvas);
	color: #202959;
	font-family: var(--font-sans);
}

/* Form controls don't inherit the page font by default — make them use Roboto too */
input,
button,
select,
textarea {
	font-family: inherit;
}

a {
	color: #202959;
	text-decoration: none;
}

a:hover {
	color: #202959;
	text-decoration: none;
}

.container,
.container-fluid {
	margin-left: auto;
	margin-right: auto;
	padding-left: 1rem;
	padding-right: 1rem;
	width: 100%;
}

@media (min-width: 640px) {
	.container {
		max-width: 640px;
	}
}

@media (min-width: 768px) {
	.container {
		max-width: 768px;
	}
}

@media (min-width: 1024px) {
	.container {
		max-width: 1024px;
	}
}

.row {
	display: flex;
	flex-wrap: wrap;
	margin-left: -0.75rem;
	margin-right: -0.75rem;
}

.row > [class*="col-"] {
	padding-left: 0.75rem;
	padding-right: 0.75rem;
	width: 100%;
}

.col-xs-12,
.col-sm-12,
.col-md-12,
.col-lg-12 {
	width: 100%;
}

.col-xs-10,
.col-sm-10 {
	width: 83.333333%;
}

.col-xs-6,
.col-sm-6,
.col-md-6,
.col-lg-6 {
	width: 50%;
}

.col-xs-4,
.col-sm-4,
.col-md-4,
.col-lg-4 {
	width: 33.333333%;
}

.col-xs-2,
.col-sm-2 {
	width: 16.666667%;
}

.col-sm-offset-2 {
	margin-left: 16.666667%;
}

@media (min-width: 1024px) {
	.offset-lg-4 {
		margin-left: 33.333333%;
	}
}

.text-center {
	text-align: center;
}

.mt-2 {
	margin-top: 0.5rem;
}

.mt-4 {
	margin-top: 1rem;
}

.mt-5 {
	margin-top: 1.25rem;
}

.p-2 {
	padding: 0.5rem;
}

.mb-md {
	margin-bottom: 1rem !important;
}

.rounded {
	border-radius: 0.5rem;
}

.form-group {
	margin-bottom: 1rem;
}

.form-control {
	background: #fff;
	border: 1px solid #cbd5e1;
	border-radius: 0.375rem;
	color: #202959;
	display: block;
	line-height: 1.5;
	padding: 0.5rem 0.75rem;
	width: 100%;
}

.form-control:focus {
	border-color: var(--cosmo-blue);
	box-shadow: 0 0 0 3px rgb(32 40 89 / 0.15);
	outline: none;
}

.control-label {
	font-weight: 600;
	padding-top: 0.5rem;
}

.form-check {
	align-items: center;
	display: flex;
	gap: 0.5rem;
}

.btn {
	align-items: center;
	border: 1px solid transparent;
	border-radius: 0.375rem;
	cursor: pointer;
	display: inline-flex;
	font-size: 0.875rem;
	font-weight: 600;
	justify-content: center;
	line-height: 1.25rem;
	padding: 0.5rem 0.75rem;
	text-align: center;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
	text-decoration: none;
}

.btn-sm {
	font-size: 0.75rem;
	line-height: 1rem;
	padding: 0.375rem 0.625rem;
}

.btn-block {
	display: flex;
	width: 100%;
}

.btn-primary {
	background: var(--primary);
	color: #fff;
}

.btn-primary:hover {
	background: var(--primary-dark);
	color: #fff;
}

.btn-default {
	background: #fff;
	border-color: #cbd5e1;
	color: #202959;
}

.btn-default:hover {
	background: #f1f5f9;
	color: #202959;
}

.btn-info {
	background: #202959;
	color: #fff;
}

.btn-info:hover {
	background: #202959;
	color: #fff;
}

.btn-success {
	background: #16a34a;
	color: #fff;
}

.btn-success:hover {
	background: #15803d;
	color: #fff;
}

.btn-warning {
	background: var(--cosmo-gold);
	color: #202959;
}

.btn-warning:hover {
	background: #eab308;
	color: #202959;
}

.btn-danger {
	background: #dc2626;
	color: #fff;
}

.btn-danger:hover {
	background: #b91c1c;
	color: #fff;
}

.alert {
	border: 1px solid transparent;
	border-radius: 0.5rem;
	margin-bottom: 1rem;
	padding: 0.75rem 1rem;
}

.alert-success {
	background: #dcfce7;
	border-color: #86efac;
	color: #166534;
}

.alert-danger {
	background: #fee2e2;
	border-color: #fca5a5;
	color: #991b1b;
}

.alert-info {
	background: #202959;
	border-color: #202959;
	color: #fff;
}

.panel {
	background: #fff;
	border-radius: 0.5rem;
	box-shadow: 0 1px 2px rgb(15 23 42 / 0.08);
	margin-bottom: 1rem;
}

.panel-default {
	border: 1px solid #e2e8f0;
}

.panel-heading {
	background: #202959;
	border-bottom: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 0.5rem 0.5rem 0 0;
	color: #fff;
	font-weight: 700;
	padding: 0.75rem 1rem;
}

/* Status panels (.panel-green/.panel-red/.panel-yellow) keep their own colours —
   they are defined in style.css, which loads after this file and still wins. */

/* px, not rem: Bootstrap 3 sets html{font-size:10px} (see the .page-header note
   below), so the old 1rem here rendered at 10px rather than the intended 16. */
.panel-title {
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	margin: 0;
}

.panel-body {
	padding: 1rem;
}

.table-responsive {
	overflow-x: auto;
	width: 100%;
}

.table {
	background: #fff;
	border-collapse: collapse;
	width: 100%;
}

.table th,
.table td {
	border-top: 1px solid #e2e8f0;
	padding: 0.625rem 0.75rem;
	text-align: left;
	vertical-align: top;
}

.table-bordered th,
.table-bordered td {
	border: 1px solid #e2e8f0;
}

.table-striped tbody tr:nth-child(odd) {
	background: #f8fafc;
}

.table-hover tbody tr:hover {
	background: #f6f8fa;
}

.breadcrumb {
	background: #f8fafc;
	border-radius: 0.5rem;
	display: flex;
	flex-wrap: wrap;
	list-style: none;
	margin-bottom: 1rem;
	padding: 0.75rem 1rem;
}

.breadcrumb > li {
	color: #475569;
}

.breadcrumb > .active {
	color: #202959;
	font-weight: 600;
}

/* Full-bleed navy page header.
   Bootstrap 3 sets html{font-size:10px}, so rem here is 10px-based —
   padding uses px to stay predictable.
   The negative margins that break this out of the shell's padding live in each
   style.css (lecturer and admin shells use different #page-wrapper padding).
   Defaults below suit standalone pages, which sit flush in <body> already. */
.page-header {
	background: #202959;
	border-bottom: none;
	border-radius: 0;
	color: #fff;
	font-size: 1rem;
	font-weight: 700;
	margin: 0 0 20px;
	padding: 14px 18px;
}

/* Clear the fixed .app-burger (top/left 0.75rem, mobile only) so it does not
   sit on top of the title now that the header reaches the top-left corner. */
@media (max-width: 767px) {
	.page-header {
		padding-left: 56px;
	}
}

.navbar {
	min-height: 50px;
	width: 100%;
}

.navbar-inverse {
	background: var(--cosmo-blue);
}

.navbar-fixed-top {
	left: 0;
	position: fixed;
	right: 0;
	top: 0;
	z-index: 1030;
}

.navbar-header {
	align-items: center;
	display: flex;
	min-height: 50px;
}

.navbar-brand {
	display: block;
	font-size: 1.125rem;
	font-weight: 700;
	padding: 0.9375rem;
}

.navbar-toggle {
	background: transparent;
	border: 1px solid rgb(255 255 255 / 0.35);
	border-radius: 0.375rem;
	display: none;
	margin: 0.5rem;
	padding: 0.5rem;
}

.icon-bar {
	background: #fff;
	display: block;
	height: 2px;
	margin: 4px 0;
	width: 22px;
}

.nav {
	list-style: none;
	margin: 0;
	padding-left: 0;
}

.nav > li {
	position: relative;
}

.nav > li > a {
	display: block;
	padding: 0.625rem 0.9375rem;
}

.side-nav > li > a,
.side-nav > li > ul > li > a {
	color: #cbd5e1;
}

.side-nav > li > a:hover,
.side-nav > li > a:focus,
.side-nav > li > ul > li > a:hover,
.side-nav > li > ul > li > a:focus {
	color: #fff;
}

.navbar-nav {
	margin: 0;
}

.navbar-right {
	margin-left: auto;
}

.top-nav {
	align-items: center;
	display: flex;
	justify-content: flex-end;
}

.dropdown-menu {
	background: #fff;
	border: 1px solid #e2e8f0;
	border-radius: 0.5rem;
	box-shadow: 0 10px 15px -3px rgb(15 23 42 / 0.12);
	display: none;
	min-width: 12rem;
	padding: 0.5rem 0;
	position: absolute;
	right: 0;
	top: 100%;
	z-index: 1100;
}

.dropdown-menu a {
	color: #202959;
	display: block;
	padding: 0.5rem 0.875rem;
}

.dropdown-menu a:hover {
	background: #f1f5f9;
	color: #202959;
}

.dropdown.open > .dropdown-menu,
.dropdown-menu.show {
	display: block;
}

.caret {
	border-left: 4px solid transparent;
	border-right: 4px solid transparent;
	border-top: 4px solid currentColor;
	display: inline-block;
	height: 0;
	margin-left: 4px;
	vertical-align: middle;
	width: 0;
}

/* Bootstrap-style collapse (used by welcome.php attention groups, etc.).
   Tailwind ALSO ships a `.collapse` utility (visibility: collapse) which would
   make an expanded panel invisible even though display:block — so we force
   visibility back on for the open state. */
.collapse:not(.in):not(.show) {
	display: none;
}

.collapse.in,
.collapse.show {
	display: block;
	visibility: visible !important;
}

.sr-only {
	border: 0;
	clip: rect(0, 0, 0, 0);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
}

.w-100 {
	width: 100%;
}

@media (min-width: 768px) {
	.navbar-collapse.collapse {
		display: block !important;
		height: auto !important;
	}
}

@media (max-width: 767px) {
	.navbar-header {
		justify-content: space-between;
		width: 100%;
	}

	.navbar-toggle {
		display: block;
	}

	.navbar-collapse {
		background: #202959;
		width: 100%;
	}

	.top-nav {
		justify-content: flex-start;
		width: 100%;
	}

	.col-xs-4,
	.col-xs-6,
	.col-xs-10,
	.col-xs-12 {
		width: 100%;
	}
}

/* ============================================================
   COSMO design system (sample-dashboard look)
   New class names only, so css/style.css cannot override them.
   ============================================================ */

/* --- App shell: left sidebar --- */
.app-sidebar {
	background: #fff;
	border-right: 1px solid var(--line);
	display: flex;
	flex-direction: column;
	left: 0;
	overflow-y: auto;
	padding: 1rem 0.75rem;
	position: fixed;
	top: 0;
	bottom: 0;
	transition: width 0.18s ease, padding 0.18s ease, transform 0.2s ease;
	width: 255px;
	z-index: 1040;
}

.app-brand {
	align-items: center;
	display: flex;
	gap: 0.625rem;
	padding: 0.25rem 0.5rem 1rem;
}

.app-brand img {
	flex: 0 0 auto;
	height: 34px;
	width: auto;
}

.app-brand-copy {
	min-width: 0;
}

.app-brand .app-brand-title {
	color: var(--ink);
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.1;
}

.app-brand .app-brand-sub {
	color: var(--muted);
	font-size: 0.7rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.app-nav {
	display: flex;
	flex-direction: column;
	gap: 2px;
	list-style: none;
	margin: 0;
	padding: 0.25rem 0;
}

.app-nav-link {
	align-items: center;
	border-radius: 0.5rem;
	color: #3f4658;
	cursor: pointer;
	display: flex;
	font-size: 1rem;
	font-weight: 500;
	gap: 0.75rem;
	padding: 0.55rem 0.8rem;
	position: relative;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
	width: 100%;
}

.app-nav-link > i,
.app-nav-link > .app-ico {
	color: #9aa1b1;
	flex: 0 0 1.25rem;
	font-size: 1.1rem;
	text-align: center;
}

/* Inline stroke icons: sized in px so they stay crisp and match the thin-rail look. */
svg.app-ico {
	flex: 0 0 20px;
	height: 20px;
	width: 20px;
}

.app-nav-link > .app-nav-logo {
	border-radius: 3px;
	flex: 0 0 20px;
	height: 20px;
	object-fit: cover;
	width: 20px;
}

svg.app-caret {
	height: 15px;
	width: 15px;
}

/* Hairline group separators, like the rail reference. */
.app-nav-divider {
	background: var(--line);
	border: 0;
	height: 1px;
	list-style: none;
	margin: 0.5rem 0.4rem;
}

.app-nav-link:hover {
	background: #f3f5f9;
	color: var(--ink);
}

.app-nav-link.active {
	background: var(--primary);
	color: #fff;
	font-weight: 600;
}

.app-nav-link.active > i,
.app-nav-link.active > .app-ico {
	color: #fff;
}

.app-nav-link .app-caret {
	margin-left: auto;
	pointer-events: none;
	transition: transform 0.15s ease;
}

.app-nav-link[aria-expanded="true"] .app-caret {
	transform: rotate(180deg);
}

/* Closed by default; opens only from the sidebar toggle click state. */
.app-subnav {
	list-style: none;
	margin: 2px 0 2px;
	max-height: 0;
	opacity: 0;
	overflow: hidden;
	padding: 0 0 0 2.4rem;
	pointer-events: none;
	transition: max-height 0.18s ease, opacity 0.15s ease, visibility 0s linear 0.18s;
	visibility: hidden;
}

.app-subnav.is-open {
	max-height: 320px;
	opacity: 1;
	overflow-y: auto;
	pointer-events: auto;
	transition: max-height 0.18s ease, opacity 0.15s ease;
	visibility: visible;
}

.app-subnav > li > a {
	border-radius: 0.375rem;
	color: var(--muted);
	display: block;
	font-size: 0.9rem;
	padding: 0.4rem 0.5rem;
	text-decoration: none;
}

.app-subnav > li > a:hover {
	background: #f3f5f9;
	color: var(--primary);
}

.app-sidebar-footer {
	border-top: 1px solid var(--line);
	margin-top: auto;
	padding-top: 0.75rem;
}

.app-user {
	color: var(--muted);
	font-size: 0.75rem;
	overflow: hidden;
	padding: 0.25rem 0.75rem 0.5rem;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Content offset so pages sit next to the fixed sidebar */
.app-main {
	margin-left: 255px;
	min-height: 100vh;
	padding: 1.75rem 1.75rem 3rem;
}

.app-topbar {
	display: none;
}

/* --- Cards --- */
.app-card {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 0.9rem;
	box-shadow: 0 1px 2px rgb(16 24 40 / 0.04);
	padding: 1.25rem 1.5rem;
}

.app-page-title {
	color: var(--ink);
	font-size: 1.5rem;
	font-weight: 700;
	margin: 0.25rem 0 0;
}

.app-crumb {
	color: var(--muted);
	font-size: 0.8125rem;
}

.app-crumb .sep {
	margin: 0 0.4rem;
}

.app-crumb .cur {
	color: var(--primary);
	font-weight: 600;
}

/* --- Filter pills --- */
.pill {
	border: 1px solid var(--line);
	border-radius: 999px;
	color: #3f4658;
	display: inline-flex;
	font-size: 0.8125rem;
	font-weight: 600;
	padding: 0.4rem 0.9rem;
	text-decoration: none;
	transition: all 0.15s ease;
}

.pill:hover {
	border-color: #cdd3df;
	color: var(--ink);
}

.pill.pill-active {
	background: var(--primary);
	border-color: var(--primary);
	color: #fff;
}

/* --- Badge --- */
.badge-soft {
	border-radius: 999px;
	display: inline-flex;
	font-size: 0.75rem;
	font-weight: 600;
	padding: 0.15rem 0.6rem;
}

.badge-blue   { background: var(--primary); color: #fff; }
.badge-green  { background: #e7f6ec; color: #12864a; }
.badge-amber  { background: #fef3d7; color: #a5680a; }
.badge-red    { background: #fdeaea; color: #c02626; }

/* --- Modern table look (scoped to .app-table) --- */
.app-table {
	border-collapse: separate;
	border-spacing: 0;
	width: 100%;
}

.app-table thead th {
	background: #f7f8fa;
	border-bottom: 1px solid var(--line);
	color: var(--muted);
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	padding: 0.7rem 0.85rem;
	text-align: left;
	text-transform: uppercase;
}

.app-table tbody td {
	border-bottom: 1px solid #f0f1f4;
	color: #33384a;
	font-size: 0.875rem;
	padding: 0.7rem 0.85rem;
	vertical-align: middle;
}

.app-table tbody tr:hover {
	background: #fafbfe;
}

/* Floating menu button (mobile only) */
.app-burger {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 0.5rem;
	box-shadow: 0 1px 2px rgb(16 24 40 / 0.08);
	color: var(--ink);
	cursor: pointer;
	display: none;
	font-size: 1.15rem;
	left: 0.75rem;
	line-height: 1;
	padding: 0.4rem 0.65rem;
	position: fixed;
	top: 0.75rem;
	z-index: 1050;
}

.app-sidebar-toggle {
	align-items: center;
	background: #fdd00d;
	border: 0;
	border-radius: 0.45rem;
	box-shadow: 0 1px 2px rgb(16 24 40 / 0.08);
	color: var(--ink);
	cursor: pointer;
	display: none;
	height: 30px;
	justify-content: center;
	left: 239px;
	position: fixed;
	top: 0.85rem;
	transition: left 0.18s ease, background-color 0.15s ease;
	width: 30px;
	z-index: 1051;
}

.app-sidebar-toggle:hover {
	background: #fdd00d;
}

.app-sidebar-toggle-ico {
	height: 16px;
	transition: transform 0.18s ease;
	width: 16px;
}

@media (min-width: 768px) {
	.app-sidebar-toggle {
		display: inline-flex;
	}

	/* --- Icon rail: 68px only when the user explicitly collapses it. --- */
	body.app-sidebar-collapsed .app-sidebar {
		align-items: center;
		box-shadow: 0 10px 30px rgb(16 24 40 / 0);
		overflow: hidden;
		padding: 0.75rem 0.5rem;
		transition: width 0.18s ease, padding 0.18s ease, box-shadow 0.18s ease;
		width: 68px;
	}

	/* Keep the expand control visible when the sidebar is collapsed. */
	body.app-sidebar-collapsed .app-sidebar-toggle {
		left: 52px;
		transition: left 0.18s ease, background-color 0.15s ease;
	}

	body.app-sidebar-collapsed .app-main {
		margin-left: 68px;
	}

	/* Everything below is the collapsed rail state. */
	body.app-sidebar-collapsed .app-sidebar .app-brand {
		justify-content: center;
		padding: 0.25rem 0 0.75rem;
	}

	body.app-sidebar-collapsed .app-sidebar .app-brand img {
		border-radius: 50%;
		height: 36px;
		object-fit: cover;
		width: 36px;
	}

	body.app-sidebar-collapsed .app-sidebar .app-brand-copy,
	body.app-sidebar-collapsed .app-sidebar .app-nav-text,
	body.app-sidebar-collapsed .app-sidebar .app-caret,
	body.app-sidebar-collapsed .app-sidebar .app-user,
	body.app-sidebar-collapsed .app-sidebar .app-subnav {
		display: none;
	}

	body.app-sidebar-collapsed .app-sidebar .app-nav,
	body.app-sidebar-collapsed .app-sidebar .app-sidebar-footer {
		align-items: center;
		gap: 0.35rem;
		width: 100%;
	}

	body.app-sidebar-collapsed .app-sidebar .app-sidebar-footer {
		display: flex;
		flex-direction: column;
		padding-top: 0.6rem;
	}

	body.app-sidebar-collapsed .app-sidebar .app-nav > li {
		width: 100%;
	}

	body.app-sidebar-collapsed .app-sidebar .app-nav-divider {
		margin: 0.45rem 0.75rem;
	}

	body.app-sidebar-collapsed .app-sidebar .app-nav-link {
		border-radius: 0.75rem;
		gap: 0;
		height: 44px;
		justify-content: center;
		margin: 0 auto;
		padding: 0;
		width: 44px;
	}

	body.app-sidebar-collapsed .app-sidebar .app-nav-link > i,
	body.app-sidebar-collapsed .app-sidebar .app-nav-link > .app-ico,
	body.app-sidebar-collapsed .app-sidebar .app-nav-link > .app-nav-logo {
		color: #656d7e;
		flex-basis: auto;
		margin: 0;
	}

	body.app-sidebar-collapsed .app-sidebar .app-nav-link.active > .app-ico {
		color: #fff;
	}

	body.app-sidebar-collapsed .app-sidebar-toggle-ico {
		transform: rotate(180deg);
	}
}

/* --- Mobile: collapse the sidebar --- */
@media (max-width: 767px) {
	.app-sidebar {
		transform: translateX(-100%);
		transition: transform 0.2s ease;
		box-shadow: 0 10px 30px rgb(16 24 40 / 0.18);
	}

	.app-sidebar.open {
		transform: translateX(0);
	}

	.app-main {
		margin-left: 0;
		padding: 1rem 1rem 3rem;
	}

	.app-burger {
		display: inline-flex;
	}
}

/* --- Sub-menu search filter --- */
.app-subnav-search-li {
	list-style: none;
	margin-bottom: 0.4rem;
	padding: 0;
}

.app-subnav-search {
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 0.4rem;
	color: var(--ink);
	font-size: 0.85rem;
	outline: none;
	padding: 0.35rem 0.55rem;
	width: 100%;
}

.app-subnav-search::placeholder {
	color: #9aa1b1;
}

.app-subnav-search:focus {
	border-color: var(--primary);
	box-shadow: 0 0 0 2px rgb(32 41 89 / 0.15);
}

.app-subnav-empty {
	color: #9aa1b1;
	font-size: 0.85rem;
	list-style: none;
	padding: 0.25rem 0.5rem;
}
