body[data-app-theme="violet"] { --app-primary: #6578ef; --app-secondary: #8246a2; --app-sidebar: #35324f; --app-surface: #f3f5fa; }
body[data-app-theme="ocean"] { --app-primary: #168aad; --app-secondary: #176b87; --app-sidebar: #173b4a; --app-surface: #eff8fb; }
body[data-app-theme="emerald"] { --app-primary: #15966a; --app-secondary: #087b63; --app-sidebar: #183d34; --app-surface: #f0f8f4; }
body[data-app-theme="rose"] { --app-primary: #d94f78; --app-secondary: #ad3e7a; --app-sidebar: #472b3d; --app-surface: #fff4f7; }
body[data-app-theme="sunset"] { --app-primary: #e76f36; --app-secondary: #d94d55; --app-sidebar: #4a302c; --app-surface: #fff6f0; }
body[data-app-theme="teal"] { --app-primary: #138f91; --app-secondary: #176d83; --app-sidebar: #1c3b42; --app-surface: #eff8f7; }
body[data-app-theme="royal"] { --app-primary: #3159c9; --app-secondary: #513ca8; --app-sidebar: #222f50; --app-surface: #f1f4fc; }
body[data-app-theme="indigo"] { --app-primary: #5946b2; --app-secondary: #793e9f; --app-sidebar: #302b4b; --app-surface: #f4f2fb; }
body[data-app-theme="forest"] { --app-primary: #36734b; --app-secondary: #568846; --app-sidebar: #263b2c; --app-surface: #f2f7f0; }
body[data-app-theme="coral"] { --app-primary: #df6256; --app-secondary: #c94765; --app-sidebar: #493235; --app-surface: #fff5f2; }
body[data-app-theme="amber"] { --app-primary: #c78b12; --app-secondary: #a95e1b; --app-sidebar: #453a29; --app-surface: #fff9ed; }
body[data-app-theme="sky"] { --app-primary: #258bc2; --app-secondary: #3167bd; --app-sidebar: #213a4d; --app-surface: #f0f8fd; }
body[data-app-theme="berry"] { --app-primary: #a23d84; --app-secondary: #713eaa; --app-sidebar: #402b43; --app-surface: #fbf2f9; }
body[data-app-theme="mint"] { --app-primary: #319b88; --app-secondary: #4d9c68; --app-sidebar: #24413a; --app-surface: #f0f9f5; }
body[data-app-theme="ruby"] { --app-primary: #b9384b; --app-secondary: #8f2f5b; --app-sidebar: #432c37; --app-surface: #fff3f4; }
body[data-app-theme="aqua"] { --app-primary: #168ca6; --app-secondary: #2869a2; --app-sidebar: #203a4a; --app-surface: #eff8fa; }
body[data-app-theme="lavender"] { --app-primary: #8970ce; --app-secondary: #a455a6; --app-sidebar: #39314d; --app-surface: #f6f3fc; }
body[data-app-theme="bronze"] { --app-primary: #a36a36; --app-secondary: #815038; --app-sidebar: #40342c; --app-surface: #faf5ef; }
body[data-app-theme="slate"] { --app-primary: #52677e; --app-secondary: #40536b; --app-sidebar: #293746; --app-surface: #f2f5f8; }
body[data-app-theme="midnight"] { --app-primary: #394575; --app-secondary: #5c4b8a; --app-sidebar: #252b40; --app-surface: #f1f2f8; }

body[data-app-theme] .main-header .logo,
body[data-app-theme] .main-header .navbar,
body[data-app-theme] .main-header .logo:hover,
body[data-app-theme] .main-header .navbar .sidebar-toggle:hover,
body[data-app-theme] .super-header {
	background: linear-gradient(110deg, var(--app-primary), var(--app-secondary)) !important;
}

body[data-app-theme] .main-sidebar {
	background-color: var(--app-sidebar) !important;
}

body[data-app-theme] .sidebar-menu > li.active > a,
body[data-app-theme] .sidebar-menu > li:hover > a,
body[data-app-theme] .sidebar-menu > li.menu-open > a,
body[data-app-theme] .sidebar-menu .treeview-menu > li.active > a {
	border-left-color: var(--app-primary) !important;
}

body[data-app-theme] .sidebar-menu > li.active > a,
body[data-app-theme] .sidebar-menu > li:hover > a,
body[data-app-theme] .sidebar-menu .treeview-menu > li.active > a {
	background: rgba(255, 255, 255, .1) !important;
}

body[data-app-theme] .content-wrapper,
body[data-app-theme] .right-side {
	background-color: var(--app-surface);
}

body[data-app-theme] .content-wrapper a:not(.btn),
body[data-app-theme] .right-side a:not(.btn) {
	color: var(--app-primary);
}

body[data-app-theme] .btn-primary,
body[data-app-theme] .label-primary,
body[data-app-theme] .bg-light-blue,
body[data-app-theme] .box.box-primary {
	background-color: var(--app-primary) !important;
	border-color: var(--app-primary) !important;
}

body[data-app-theme] .box.box-primary {
	background-color: transparent !important;
	border-top-color: var(--app-primary) !important;
}

body[data-app-theme] .pagination > .active > a,
body[data-app-theme] .pagination > .active > span,
body[data-app-theme] .pagination > .active > a:hover,
body[data-app-theme] .pagination > .active > span:hover {
	background-color: var(--app-primary);
	border-color: var(--app-primary);
}

body[data-app-theme] .super-header {
	color: #fff;
}

body.superadmin-theme-page[data-app-theme] {
	background-color: var(--app-surface);
}

body.compact-login-page[data-app-theme] {
	background: linear-gradient(135deg, var(--app-primary), var(--app-secondary));
}

body.compact-login-page[data-app-theme] .login-stage .login-mark,
body.compact-login-page[data-app-theme] .login-stage .login-form .button {
	background: linear-gradient(100deg, var(--app-primary), var(--app-secondary));
}

body.compact-login-page[data-app-theme] .login-stage .login-form .input-container:focus-within {
	border-color: var(--app-primary);
	box-shadow: 0 0 0 3px rgba(101, 120, 239, .12);
}

body.compact-login-page[data-app-theme] .login-stage .login-form .rememberme-container input {
	accent-color: var(--app-primary);
}

.app-theme-picker {
	position: fixed;
	right: 18px;
	bottom: 18px;
	z-index: 100000;
	color: #31313a;
	font-family: "Open Sans", "Segoe UI", sans-serif;
}

body.compact-login-page .app-theme-picker {
	top: 16px;
	right: 18px;
	bottom: auto;
}

.app-theme-trigger {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px;
	border: 1px solid rgba(255, 255, 255, .75);
	border-radius: 24px;
	background: rgba(255, 255, 255, .94);
	box-shadow: 0 5px 18px rgba(22, 27, 48, .18);
	color: #34343a;
	font: inherit;
	font-size: 13px;
	cursor: pointer;
}

.app-theme-trigger i {
	color: var(--app-primary, #6578ef);
}

.app-theme-panel {
	position: absolute;
	right: 0;
	bottom: calc(100% + 9px);
	width: min(330px, calc(100vw - 24px));
	max-height: min(430px, calc(100vh - 80px));
	overflow-y: auto;
	padding: 16px;
	border: 1px solid #e4e5ed;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 14px 38px rgba(22, 27, 48, .24);
}

body.compact-login-page .app-theme-panel {
	top: calc(100% + 9px);
	bottom: auto;
}

.app-theme-panel[hidden] {
	display: none;
}

.app-theme-panel h2 {
	margin: 0 0 12px;
	color: #34343a;
	font-size: 16px;
	font-weight: 700;
}

.app-theme-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 7px;
}

.app-theme-choice {
	display: flex;
	align-items: center;
	gap: 9px;
	min-width: 0;
	padding: 8px;
	border: 1px solid #e8e8ee;
	border-radius: 9px;
	background: #fff;
	color: #4c4c57;
	font: inherit;
	font-size: 12px;
	text-align: left;
	cursor: pointer;
}

.app-theme-choice:hover,
.app-theme-choice.is-selected {
	border-color: var(--app-primary, #6578ef);
	background: #f7f7fc;
}

.app-theme-choice.is-selected {
	box-shadow: 0 0 0 1px var(--app-primary, #6578ef);
}

.app-theme-swatch {
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: var(--theme-swatch);
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
}

.app-theme-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.student-bottom-nav {
	display: none;
}

@media screen and (max-width: 480px) {
	.app-theme-picker {
		right: 10px;
		bottom: 10px;
	}

	body.compact-login-page .app-theme-picker {
		top: 10px;
		right: 10px;
		bottom: auto;
	}
}

@media screen and (max-width: 767px) {
	body.student-portal .student-bottom-nav {
		position: fixed;
		right: 0;
		bottom: 0;
		left: 0;
		z-index: 99990;
		display: grid;
		grid-template-columns: repeat(5, minmax(0, 1fr));
		padding: 7px 4px calc(7px + env(safe-area-inset-bottom));
		border-top: 1px solid #e5e7ee;
		background: rgba(255, 255, 255, .98);
		box-shadow: 0 -4px 16px rgba(25, 35, 55, .1);
	}

	body.student-portal .student-bottom-nav a,
	body.student-portal .student-bottom-nav-theme {
		display: flex;
		min-width: 0;
		min-height: 54px;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		gap: 3px;
		padding: 3px 2px;
		color: #687080;
		font-family: "Open Sans", "Segoe UI", sans-serif;
		font-size: 9px;
		line-height: 1.15;
		text-align: center;
		text-decoration: none;
	}

	body.student-portal .student-bottom-nav a span,
	body.student-portal .student-bottom-nav-theme span {
		display: block;
		overflow-wrap: anywhere;
	}

	body.student-portal .student-bottom-nav-theme {
		border: 0;
		background: transparent;
		cursor: pointer;
	}

	body.student-portal .student-bottom-nav a i,
	body.student-portal .student-bottom-nav-theme i {
		font-size: 17px;
	}

	body.student-portal .student-bottom-nav a.active,
	body.student-portal .student-bottom-nav a:hover,
	body.student-portal .student-bottom-nav-theme:hover,
	body.student-portal .student-bottom-nav-theme[aria-expanded="true"] {
		color: var(--app-primary, #6578ef);
	}

	body.student-portal .main-sidebar,
	body.student-portal .main-header .sidebar-toggle {
		display: none;
	}

	body.student-portal .content-wrapper {
		margin-left: 0;
		padding-bottom: 82px;
	}

	body.student-portal .main-footer {
		margin-left: 0;
		padding-bottom: 82px;
	}

	body.student-portal .app-theme-picker {
		right: 10px;
		bottom: calc(68px + env(safe-area-inset-bottom));
	}

	body.student-portal .app-theme-panel {
		position: fixed;
		right: 12px;
		bottom: calc(74px + env(safe-area-inset-bottom));
	}

	body.student-portal .app-theme-picker > .app-theme-trigger {
		display: none;
	}
}
