/* =====================================
   ROOT & GENERAL STYLES (Light + Dark)
   ===================================== */
:root {
	--primary-color: #129ae8;
	--primary-dark: #1565C0;
	--light-bg: #e6edf3;
	--white: #ffffff;
	--text-dark: #333333;
	--text-light: #666666;
	--border-color: #e0e0e0;
	--shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.1);
	--shadow-md: 0 4px 12px rgba(0, 0, 0, 0.15);
	--shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.2);

	/* Component tokens */
	--card-bg: #ffffff;
	--section-bg: #ffffff;
	--input-bg: #ffffff;
	--hover-bg: #f4f9fd;
	--muted-bg: #f0f0f0;
	--scrollbar-track: #f5f5f5;
	--gradient-purple: linear-gradient(90deg, #8a5cf6 0%, #2b1de0 100%);
	--gradient-purple-135: linear-gradient(135deg, #8a5cf6 0%, #2b1de0 100%);
	--color-accent-teal: #1e9c8c;

	/* Extra component tokens */
	--surface-1: #ffffff;      /* card / section bg */
	--surface-2: #f8f9fa;      /* subtle bg */
	--surface-3: #eef5fb;      /* active tab bg */
	--hero-blue: #129ae8;
	--hero-orange: #f5a623;
	--hero-orange-hover: #e0951a;
	--hero-green: #1e9c8c;
	--hero-green-hover: #178577;
	--hero-blue-btn: #2b8fe3;
	--hero-blue-btn-hover: #1f7bc9;
	--hero-purple-grad: linear-gradient(135deg, #8a5cf6 0%, #2b1de0 100%);
	--color-success: #4caf50;
	--color-danger: #ef3b2d;
	--color-success-soft: #e8f6f8;
	--color-success-border: #c6e9ec;
	--color-pass: #2f9e3f;
	--color-fail: #e03b3b;
}

/* =====================================
   DARK MODE
   ===================================== */
html[data-theme="dark"] {
	--primary-color: #29a8f0;
	--primary-dark: #4db8ff;
	--light-bg: #0f1419;
	--white: #1a2129;
	--text-dark: #e6edf3;
	--text-light: #9aa7b2;
	--border-color: #2b3540;
	--shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.45);
	--shadow-md: 0 4px 12px rgba(0, 0, 0, 0.55);
	--shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.65);

	--card-bg: #1a2129;
	--section-bg: #1a2129;
	--input-bg: #232c36;
	--hover-bg: #232f3a;
	--muted-bg: #232c36;
	--scrollbar-track: #0f1419;
	--gradient-purple: linear-gradient(90deg, #6d4bd4 0%, #1e14b0 100%);
	--gradient-purple-135: linear-gradient(135deg, #6d4bd4 0%, #1e14b0 100%);
	--color-accent-teal: #2bc4ae;
	
	--surface-1: #1a2129;
	--surface-2: #232c36;
	--surface-3: #1e3a52;
	--hero-blue: #1a6fa8;
	--hero-orange: #d9941e;
	--hero-orange-hover: #c08617;
	--hero-green: #178577;
	--hero-green-hover: #136b60;
	--hero-blue-btn: #1f7bc9;
	--hero-blue-btn-hover: #196a8d;
	--hero-purple-grad: linear-gradient(135deg, #6d4bd4 0%, #1e14b0 100%);
	--color-success: #43a047;
	--color-danger: #e53935;
	--color-success-soft: #1c3336;
	--color-success-border: #2a4a4e;
	--color-pass: #4caf50;
	--color-fail: #ef5350;


	color-scheme: dark;
}

body {
	background-color: var(--light-bg);
	background-image: url(/assets/img/background/body-bg47.png);
	color: var(--text-dark);
	font-family: 'Hind Siliguri', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
	line-height: 1.6;
	margin: 0;
	padding: 0;
	transition: background-color 0.25s ease, color 0.25s ease;
}

/* Smooth theme transition for common surfaces */
.card,
.offcanvas,
.offcanvas-body,
.topic-test-list,
.topic-test-row,
.live-exam-body,
.live-exam-card,
.recent-qb-card,
.qb-category-card,
.course-card,
.lecture-card,
.premium-bar,
.today-history-card,
.today-history-content,
.modal-content,
.side-menu-link,
.promo-carousel {
	transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
/* =====================================
   DARK MODE — Bootstrap utility overrides
   ===================================== */
/* light mode: the page background used by most main areas */
html:not([data-theme="dark"]) .bg-light {
    background-color: var(--light-bg) !important;
}

html[data-theme="dark"] .bg-light {
    background-color: var(--light-bg) !important;
}

html[data-theme="dark"] .bg-white {
    background-color: var(--surface-1) !important;
}

html[data-theme="dark"] .text-muted {
    color: var(--text-light) !important;
}

html[data-theme="dark"] .text-dark {
    color: var(--text-dark) !important;
}

html[data-theme="dark"] .border-top,
html[data-theme="dark"] .border-bottom,
html[data-theme="dark"] .border {
    border-color: var(--border-color) !important;
}

html[data-theme="dark"] .table {
    color: var(--text-dark);
    border-color: var(--border-color);
}

html[data-theme="dark"] .form-control,
html[data-theme="dark"] .form-select {
    background-color: var(--input-bg);
    color: var(--text-dark);
    border-color: var(--border-color);
}

html[data-theme="dark"] .form-control:focus,
html[data-theme="dark"] .form-select:focus {
    background-color: var(--input-bg);
    color: var(--text-dark);
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(41, 168, 240, 0.25);
}

/* Smooth transition on common surfaces */
.card,
.tab-pane,
.tab-content,
.list-group-item,
.table,
.form-control,
.form-select {
    transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.app-wrapper {
	max-width: 1280px;
    margin: 0 auto;
}

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



/* =====================================
   HEADER STYLES
   ===================================== */
.navbar-header {
	background: var(--primary-color);
	position: sticky;
	top: 0;
	z-index: 900;
}

.navbar-header .navbar-title {
	font-size: 1.25rem;
}

/* header icon buttons: centre the icon in the button */
.navbar-header .btn-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	text-decoration: none;
}
.navbar-header .btn-link:hover,
.navbar-header .btn-link:focus {
	text-decoration: none;
}
.navbar-header .btn-link .material-symbols-outlined {
	text-decoration: none;
	display: block;
	line-height: 1;
}

/* page title: one line, ellipsis when it does not fit */
.navbar-header #navbar-title {
	flex: 1 1 0;
	min-width: 0;
	padding: 0 12px;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.navbar-header .btn-link {
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.navbar-header .btn-link:hover {
	transform: scale(1.1);
	opacity: 0.8;
}

.navbar-header .btn-link:active {
	transform: scale(0.95);
}

/* =====================================
   MAIN CONTENT
   ===================================== */
.main-content {
	background-color: var(--light-bg);
	min-height: calc(100vh - 80px);
}

/* Scrollable content for mobile/tablet */
/* Mobile/tablet: header on top, bottom nav at the bottom, only the middle scrolls */
@media (max-width: 1023px) {
	.swappable-content {
		display: grid;
		grid-template-rows: auto minmax(0, 1fr) auto;
		/* a single column that never grows past the screen: a long nowrap title would otherwise widen the whole page */
		grid-template-columns: minmax(0, 1fr);
		height: 100vh;
		height: 100dvh;
		overflow: hidden;
	}
	.navbar-header { grid-row: 1; position: relative; }
	.swappable-content > main,
	.swappable-content > .main-content {
		grid-row: 2;
		overflow-y: auto;
		overflow-x: hidden;
		min-height: 0;
		max-height: none;
		-webkit-overflow-scrolling: touch;
	}
	/* in the grid's last row, so it takes its own space instead of covering the content
	   (needs the extra specificity: the base .bottom-nav rule below is position: fixed) */
	.swappable-content > .bottom-nav {
		position: relative;
		grid-row: 3;
		bottom: auto;
	}
	body { padding-bottom: 0; }
}

/* =====================================
   FEATURE CARD STYLES
   ===================================== */
.img_btn {
    height: 100px;
}
.img_btn img {
    width: 35px;
    height: auto;
}
.img_btn span {
    line-height: 1.3;
    text-align: center;
    font-size: 14px;
    margin-top: 5px;
}

/* =====================================
   RESPONSIVE DESIGN
   ===================================== */

/* Tablet (768px and up) */
@media (min-width: 768px) {
    .img_btn {
        height: 125px;
    }
	.img_btn img {
        width: 55px;
    }
    .img_btn span {
        font-size: 16px;
    }
}

/* Desktop (1024px and up) */
@media (min-width: 1024px) {
	.app-wrapper {
		box-shadow: 0 4px 12px 0 rgba(0,0,0, 0.07), 0 2px 4px rgba(0,0,0, 0.05);
	}
}

/* Mobile (below 480px) */
@media (max-width: 479px) {
	.navbar-header .material-symbols-outlined {
		font-size: 24px !important;
	}
}

/* =====================================
   UTILITY OVERRIDES
   ===================================== */
.bg-primary {
	background-color: var(--primary-color) !important;
}

.text-white {
	color: var(--white);
}

.container-fluid {
	max-width: 100%;
}

/* =====================================
   SCROLLBAR STYLING (Optional)
   ===================================== */
::-webkit-scrollbar {
	width: 8px;
}

::-webkit-scrollbar-track {
	background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
	background: var(--primary-color);
	border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
	background: var(--primary-dark);
}

/* =====================================
   BOTTOM NAVIGATION STYLES
   ===================================== */
.bottom-nav {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background-color: var(--white);
	box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.1);
	z-index: 999;
	border-radius: 0;
}

.nav-items {
	display: flex;
	justify-content: space-around;
	align-items: center;
	padding: 0.5rem 0;
	list-style: none;
	margin: 0;
}

.nav-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	color: var(--text-light);
	transition: all 0.3s ease;
	flex: 1;
	text-align: center;
}

.nav-item.active,
.nav-item:hover {
	color: var(--primary-color);
}

.nav-item-icon {
	font-size: 24px !important;
	margin-bottom: 0.25rem;
	display: flex;
	align-items: center;
	justify-content: center;
}

.nav-item-label {
	font-size: 0.7rem;
	font-weight: 600;
	white-space: nowrap;
}


@media (max-width: 479px) {
	

}

@media (min-width: 768px) {
	
	.nav-item-icon {
		margin-bottom: 0.35rem;
	}
}

/* =====================================
   OFFCANVAS SIDE MENU STYLES
   ===================================== */
.offcanvas {
	width: 280px;
	max-width: 90vw;
	background-color: var(--card-bg);
	color: var(--text-dark);
	transition: transform 0.35s ease-in-out, opacity 0.25s ease-in-out;
	transform: translateX(-100%);
}

.offcanvas.show,
.offcanvas.showing {
	transform: translateX(0);
}

.offcanvas.hiding {
	transform: translateX(-100%);
}

.offcanvas.offcanvas-end {
	transform: translateX(100%);
}

.offcanvas.offcanvas-end.show,
.offcanvas.offcanvas-end.showing {
	transform: translateX(0);
}

.offcanvas.offcanvas-end.hiding {
	transform: translateX(100%);
}

.offcanvas-header {
	background-color: var(--primary-color);
	color: var(--white);
	border-bottom: 1px solid var(--border-color);
}

.offcanvas-header .offcanvas-title {
	font-weight: 700;
	font-size: 1.25rem;
	color: var(--white);
}

.offcanvas-header .btn-close {
	filter: brightness(0) invert(1);
}

.side-menu-logo {
	padding: 1rem;
	border-bottom: 1px solid var(--border-color);
	text-align: center;
}

.side-menu-logo img {
	max-width: 100%;
	height: auto;
}

.side-menu-items {
	list-style: none;
	margin: 0;
	padding: 0;
	flex: 1;
}

.side-menu-items li {
	border-bottom: 1px solid var(--border-color);
}

.side-menu-items li:last-child {
	border-bottom: none;
}

.side-menu-link {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem 1rem;
	text-decoration: none;
	color: var(--text-dark);
	transition: all 0.3s ease;
	font-weight: 500;
	font-size: 0.95rem;
}

.side-menu-icon {
	font-size: 20px !important;
	flex-shrink: 0;
	color: var(--text-light);
}

.side-menu-text {
	flex: 1;
}

.side-menu-link:hover {
	background-color: rgba(30, 136, 229, 0.1);
	color: var(--primary-color);
	padding-left: 1.25rem;
}

.side-menu-link.active {
	background-color: #d3e8f7;
	color: var(--primary-color);
	border-left: 4px solid var(--primary-color);
	padding-left: calc(1rem - 4px);
}

.side-menu-link.active .side-menu-icon {
	color: var(--primary-color);
}

.promo-text {
	font-size: 0.8rem;
	color: var(--text-dark);
	font-weight: 500;
	margin: 0 0 0.75rem;
	line-height: 1.3;
}

.offcanvas-body { background-color: var(--card-bg); }
.side-menu-items li { border-bottom: 1px solid var(--border-color); }
.side-menu-link { color: var(--text-dark); }
.side-menu-link:hover { background-color: var(--hover-bg); color: var(--primary-color); }
.side-menu-link.active { background-color: rgba(18, 154, 232, 0.15); color: var(--primary-color); border-left: 4px solid var(--primary-color); }
.promo-text { color: var(--text-dark); }

/* MAIN CONTENT */
.main-content { background-color: var(--light-bg); }

/* FEATURE CARD */
.img_btn span { color: var(--text-dark); }

/* FEATURE GRID CARD */
.card { background-color: var(--card-bg); color: var(--text-dark); border-color: var(--border-color); }

/* SECTION TITLE */
.section-title { color: var(--text-dark); }
.section-title-link { color: var(--text-dark); }

/* LIVE EXAM */
.live-exam-header { background: var(--gradient-purple); color: #fff; }
.live-exam-body { background-color: var(--card-bg); }
.live-exam-card { background-color: var(--card-bg); border: 1px solid var(--border-color); }
.live-exam-title { color: var(--primary-color); }
.live-exam-day { color: var(--text-dark); }

/* COURSE PLAN */
.course-card { background: var(--card-bg); }

/* TODAY IN HISTORY */
.today-history-card { background: var(--card-bg); }
.today-history-badge { background: var(--gradient-purple-135); color: #fff; }
.today-history-content { background: var(--card-bg); }
.today-history-date { background: var(--muted-bg); color: var(--text-dark); }
.today-history-more { color: var(--primary-color); }
.today-history-text { color: var(--text-light); }

/* LECTURE SHEET */
.lecture-card { background: var(--card-bg); }

/* QUESTION BANK */
.recent-qb-card { background: var(--card-bg); }
.recent-qb-title { color: var(--text-dark); }
.recent-qb-subtitle { color: var(--text-light); }
.qb-category-card { background: var(--card-bg); }
.qb-category-title { color: var(--text-dark); }
.qb-category-count { background: var(--muted-bg); color: var(--text-light); }

/* TOPIC TEST */
.topic-test-list { background: var(--card-bg); }
.topic-test-list-head { background: var(--gradient-purple); color: #fff; }
.topic-test-row { border-bottom: 1px solid var(--border-color); }
.topic-test-row:hover { background: var(--hover-bg); }

/* PREMIUM BAR */
.premium-bar { color: #fff; }
html[data-theme="dark"] .premium-bar { filter: brightness(.85); }

/* TOPIC TEST MODAL */
.topic-test-modal { background: var(--card-bg); }
.topic-test-body { background: var(--card-bg); }
.topic-test-item { color: var(--text-dark); background: var(--surface-1); }
.topic-test-item:hover { background: var(--surface-1); }
.topic-test-label { color: var(--text-dark); }

/* MODAL */
.modal-content { background-color: var(--card-bg); color: var(--text-dark); }

/* HERO / BLUE BANNER in home.php (style attr) */
/* (নিচে home.php-তে inline style ঠিক করা হয়েছে) */

/* SCROLLBAR */
::-webkit-scrollbar-track { background: var(--scrollbar-track); }
::-webkit-scrollbar-thumb { background: var(--primary-color); }

/* PROMO CAROUSEL */
.promo-carousel { background: var(--card-bg); }
.promo-indicators button { background-color: var(--border-color); }
.promo-indicators button.active { background-color: var(--primary-color); }


/* Desktop Display - Keep offcanvas visible */
@media (min-width: 1024px) {
	/* Hide menu toggle button on desktop */
	.menu-icon-toggle, .bottom-nav {
		display: none !important;
	}

	/* Show offcanvas as sidebar */
	.offcanvas {
		position: static;
		width: 256px !important;
		height: 100vh;
		border-right: 1px solid var(--border-color) !important;
		max-width: none;
		transform: none !important;
		visibility: visible !important;
		background-color: var(--white);
		overflow-y: auto;
	}

	.offcanvas-backdrop {
		display: none !important;
	}

	.offcanvas-header {
		display: none;
	}

	.offcanvas-body {
		padding: 0 !important;
		display: flex;
		flex-direction: column;
	}

	.side-menu-logo {
		flex-shrink: 0;
	}

	.side-menu-items {
		flex: 1;
	}

	.side-menu-link {
		padding: 0.6rem 0.9rem;
		font-size: 0.85rem;
	}

	.app-dl {
		flex-shrink: 0;
	}

	/* Adjust layout for sidebar */
	.app-wrapper {
		display: flex;
		height: 100vh;
		overflow: hidden;
	}

	.swappable-content {
		display: grid;
		grid-template-rows: auto minmax(0, 1fr) auto;
		/* a single column that never grows past the screen: a long nowrap title would otherwise widen the whole page */
		grid-template-columns: minmax(0, 1fr);
		flex: 1;
		overflow: hidden;
	}

	body {
		padding-bottom: 0;
	}

	.navbar-header {
		grid-row: 1;
		position: relative;
		z-index: 100;
	}

	#sideMenu {
		width: 256px;
		order: -1;
		overflow-y: auto;
	}

	.main-content,
	.swappable-content > main {
		grid-row: 2;
		overflow-y: auto;
		overflow-x: hidden;
		min-height: 0;
	}

	.bottom-nav {
		grid-row: 3;
		border-radius: 0;
		box-shadow: none;
		border-top: 1px solid var(--border-color);
		z-index: 100;
	}
}

/* =====================================
   PROMO BANNER CAROUSEL
   ===================================== */
.promo-card {
	background: linear-gradient(120deg, #fdf3e2 0%, #fbe3c6 100%);
	border-radius: 16px;
	box-shadow: var(--shadow-sm);
	display: flex;
	align-items: center;
}

.promo-card-alt {
	background: linear-gradient(120deg, #e2f0fd 0%, #c6def4 100%);
}

.promo-content .promo-text {
	font-weight: 700;
	font-size: 1.1rem;
	color: #b35a1f;
	line-height: 1.3;
}

.promo-badge-number {
	font-size: 1.4rem;
	font-weight: 800;
	color: #d9480f;
}

.promo-badge-free {
	background-color: #e8402c;
	color: var(--white);
	font-weight: 700;
	padding: 0.15rem 0.6rem;
	border-radius: 6px;
	font-size: 0.9rem;
}

.promo-badge-text {
	font-weight: 700;
	color: #333;
}

.promo-cta {
	display: inline-flex;
	align-items: center;
	gap: 0.25rem;
	background-color: var(--white);
	color: var(--text-dark);
	font-weight: 600;
	font-size: 0.85rem;
	padding: 0.5rem 0.9rem;
	border-radius: 8px;
	text-decoration: none;
	box-shadow: var(--shadow-sm);
}

.promo-indicators {
	position: static;
	margin: 0.75rem 0 0;
}

.promo-indicators button {
	background-color: var(--border-color);
	width: 8px;
	height: 8px;
	border-radius: 50%;
	opacity: 1;
}

.promo-indicators button.active {
	background-color: var(--primary-color);
	width: 20px;
	border-radius: 4px;
}

/* =====================================
   LIVE EXAM SECTION
   ===================================== */
.live-exam-section {
	border-radius: 16px;
	overflow: hidden;
	box-shadow: var(--shadow-sm);
}

.live-exam-header {
	background: linear-gradient(90deg, #7b2ff7 0%, #5b6ee8 100%);
	color: var(--white);
	font-weight: 700;
	padding: 0.9rem 1.25rem;
	font-size: 1.05rem;
}

.live-exam-body {
	background-color: var(--white);
	padding: 1rem;
}

.live-exam-scroll {
	display: flex;
	gap: 0.75rem;
	overflow-x: auto;
	padding-bottom: 0.5rem;
	scrollbar-width: thin;
}

.live-exam-card {
	flex: 0 0 auto;
	width: 240px;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	border: 1px solid var(--border-color);
	border-radius: 12px;
	padding: 0.75rem;
}

.live-exam-icon {
	width: 44px;
	height: 44px;
	flex-shrink: 0;
	border-radius: 10px;
	background-color: rgba(30, 136, 229, 0.1);
	display: flex;
	align-items: center;
	justify-content: center;
}

.live-exam-icon .material-symbols-outlined {
	color: var(--primary-color);
	font-size: 26px;
}

.live-exam-title {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--text-dark);
	margin: 0;
	line-height: 1.3;
}

.live-exam-day {
	font-size: 0.8rem;
	color: var(--text-light);
	margin: 0.15rem 0 0;
}

.live-exam-cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	background-color: #f5820b;
	color: var(--white);
	font-weight: 700;
	padding: 0.75rem;
	border-radius: 10px;
	text-decoration: none;
	margin-top: 0.75rem;
}

/* =====================================
   COURSE PLAN SECTION
   ===================================== */
.section-title {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-weight: 700;
	font-size: 1.05rem;
	color: var(--text-dark);
	margin-bottom: 0.75rem;
}

.section-title-link {
	color: var(--text-dark);
	display: flex;
	align-items: center;
}

.course-scroll {
	display: flex;
	gap: 0.75rem;
	overflow-x: auto;
	padding-bottom: 0.5rem;
	scrollbar-width: thin;
}

.course-card {
	flex: 0 0 auto;
	height: 120px;
	border-radius: 14px;
	position: relative;
	display: flex;
	align-items: center !important;
	box-shadow: var(--shadow-sm);
}

.course-card-teal {
	background: linear-gradient(135deg, #0f766e 0%, #134e4a 100%);
}

.course-card-purple {
	background: linear-gradient(135deg, #6d28d9 0%, #312e81 100%);
}

.course-card-overlay {
	padding: 0.75rem;
	width: 100%;
}

.course-card-title {
	color: var(--white);
	font-weight: 600;
	font-size: 0.85rem;
	line-height: 1.3;
	margin: 0;
}

/* Responsive tweaks for new sections */
@media (min-width: 768px) {
	.promo-text {
		font-size: 1.3rem;
	}

	.live-exam-card {
		width: 280px;
	}
}


/* =====================================
   GLOBAL TOP LOADING BAR (htmx)
   ===================================== */
#top-progress {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	z-index: 2000;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.25s ease;
}
#top-progress.on { opacity: 1; }
#top-progress .top-progress-bar {
	height: 100%;
	transform-origin: 0 50%;
	transform: scaleX(0);
	transition: transform 0.3s ease;
	/* warm orange: stands out against the blue/purple header */
	background: linear-gradient(90deg, #ffc107, #ff9800, #ff5722);
	border-radius: 0 3px 3px 0;
	box-shadow: 0 0 10px rgba(255, 152, 0, 0.8);
}
@media (prefers-reduced-motion: reduce) {
	#top-progress .top-progress-bar { transition: none; }
}

/* =====================================
   CARD SHADOW (all cards)
   .card and the MCQ cards share one shadow, in every state (a plain card keeps it on hover). !important beats Bootstrap's .shadow-sm. A component that wants a different
   hover shadow must declare it with !important; its :hover selector is more specific, so it wins.
   ===================================== */
.card,
.sol-mcq,
.qp-mcq {
	box-shadow: 0 4px 12px rgba(0, 0, 0, .10) !important;
}


/* =====================================
   APP DOWNLOAD CARD (side menu)
   ===================================== */
.app-dl {
	position: relative;
	overflow: hidden;
	margin: 0.9rem;
	padding: 1rem;
	border-radius: 16px;
	color: #fff;
	background: linear-gradient(135deg, #129ae8 0%, #4b79cf 55%, #a24bcf 100%);
	box-shadow: 0 8px 20px rgba(43, 80, 160, 0.28);
}
.app-dl-glow {
	position: absolute;
	right: -40px;
	top: -50px;
	width: 140px;
	height: 140px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0) 70%);
	pointer-events: none;
}
.app-dl-head { position: relative; display: flex; align-items: center; gap: 0.7rem; margin-bottom: 0.9rem; }
.app-dl-icon {
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.2);
	-webkit-backdrop-filter: blur(6px);
	backdrop-filter: blur(6px);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}
.app-dl-icon .material-symbols-outlined { font-size: 26px !important; color: #fff; }
.app-dl-title { font-weight: 700; font-size: 0.95rem; line-height: 1.2; }
.app-dl-text { font-size: 0.75rem; opacity: 0.9; line-height: 1.3; margin-top: 2px; }
.app-dl-stores { position: relative; display: flex; flex-direction: column; gap: 0.5rem; }
.app-dl-store {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.5rem 0.75rem;
	border-radius: 10px;
	background: #0b1620;
	color: #fff;
	border: 1px solid rgba(255, 255, 255, 0.18);
	text-align: left;
	transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}
.app-dl-store:hover { transform: translateY(-2px); background: #000; color: #fff; box-shadow: 0 6px 14px rgba(0, 0, 0, 0.35); }
.app-dl-store:active { transform: scale(0.97); }
.app-dl-store svg { flex: 0 0 auto; }
.app-dl-store span { display: flex; flex-direction: column; line-height: 1.1; }
.app-dl-store small { font-size: 0.6rem; letter-spacing: 0.04em; opacity: 0.8; text-transform: uppercase; }
.app-dl-store b { font-size: 0.95rem; font-weight: 600; }
.app-dl-soon { opacity: 0.6; cursor: default; }
.app-dl-soon:hover { transform: none; background: #0b1620; box-shadow: none; }
@media (prefers-reduced-motion: no-preference) {
	.app-dl-icon { animation: app-dl-bob 3s ease-in-out infinite; }
	@keyframes app-dl-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
}

/* =====================================
   WOW MOTION (all pages)
   Lists built by JavaScript get the .wow-item class from app.js (see "wowMotion"), so every
   page rises in with a stagger without touching the page itself. Switched off for visitors who
   prefer reduced motion. A page can still give its own look to a list item: its own animation /
   hover rules are declared later or are more specific.
   ===================================== */
@media (prefers-reduced-motion: no-preference) {

	/* page and title */
	.swappable-content > main { animation: wow-fade .45s ease backwards; }
	.navbar-header #navbar-title { animation: wow-title .5s cubic-bezier(.2, .8, .2, 1) backwards; }

	/* list items (class added by app.js) */
	.wow-item {
		animation: wow-item-in .55s cubic-bezier(.2, .8, .2, 1) backwards;
		animation-delay: calc(var(--wow-i, 0) * 55ms);
	}
	.wow-item .card,
	.wow-item > button,
	.wow-item > a {
		transition: transform .22s cubic-bezier(.2, .8, .2, 1), box-shadow .22s ease, background-color .2s ease;
	}
	.wow-item .card:hover {
		transform: translateY(-3px);
		box-shadow: 0 10px 22px rgba(18, 90, 160, .18) !important;
	}
	.wow-item .card:active { transform: scale(.98); }
	.wow-item .card .material-symbols-outlined,
	.wow-item .card img {
		transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
	}
	.wow-item .card:hover .material-symbols-outlined { transform: scale(1.18) rotate(-6deg); }
	.wow-item .card:hover img { transform: scale(1.06); }

	/* tab panels fade in when switched */
	.tab-content > .tab-pane.show.active { animation: wow-tab-in .4s ease; }

	/* dialogs spring open */
	.modal.fade .modal-dialog {
		transform: scale(.88) translateY(24px);
		opacity: 0;
		transition: transform .35s cubic-bezier(.34, 1.56, .64, 1), opacity .22s ease;
	}
	.modal.show .modal-dialog { transform: none; opacity: 1; }

	/* buttons: lift on hover, press on click */
	.btn:not(.btn-link):not(:disabled) {
		transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
	}
	.btn:not(.btn-link):not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(0, 0, 0, .15); }
	.btn:not(.btn-link):not(:disabled):active { transform: scale(.97); box-shadow: none; }

	@keyframes wow-fade    { from { opacity: 0; } to { opacity: 1; } }
	@keyframes wow-title   { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
	@keyframes wow-tab-in  { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
	@keyframes wow-item-in { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
}

/* =====================================
   WOW MOTION: static page content (all pages except /game; a few pages opt out with data-wow="off"
   because they have their own motion: home, course plan pages, quiz play, exam)
   Direct children of <main> rise in one after another, and cards one or two levels down do the same.
   Lists built by JavaScript are handled by the .wow-item rules above, so they are left out here.
   ===================================== */
@media (prefers-reduced-motion: no-preference) {

	.swappable-content > main:not([data-wow="off"]) > *:not(.modal):not(.offcanvas):not(#progress):not(script):not(style):not([hidden]):not([data-htmx-clear]):not([id^="items"]):not(.d-none) { animation: wow-block-in .6s cubic-bezier(.2, .8, .2, 1) backwards; }
	.swappable-content > main:not([data-wow="off"]) > *:not(.modal):not(.offcanvas):not(#progress):not(script):not(style):not([hidden]):not([data-htmx-clear]):not([id^="items"]):not(.d-none):nth-child(1) { animation-delay: 0.12s; }
	.swappable-content > main:not([data-wow="off"]) > *:not(.modal):not(.offcanvas):not(#progress):not(script):not(style):not([hidden]):not([data-htmx-clear]):not([id^="items"]):not(.d-none):nth-child(2) { animation-delay: 0.19s; }
	.swappable-content > main:not([data-wow="off"]) > *:not(.modal):not(.offcanvas):not(#progress):not(script):not(style):not([hidden]):not([data-htmx-clear]):not([id^="items"]):not(.d-none):nth-child(3) { animation-delay: 0.26s; }
	.swappable-content > main:not([data-wow="off"]) > *:not(.modal):not(.offcanvas):not(#progress):not(script):not(style):not([hidden]):not([data-htmx-clear]):not([id^="items"]):not(.d-none):nth-child(4) { animation-delay: 0.33s; }
	.swappable-content > main:not([data-wow="off"]) > *:not(.modal):not(.offcanvas):not(#progress):not(script):not(style):not([hidden]):not([data-htmx-clear]):not([id^="items"]):not(.d-none):nth-child(5) { animation-delay: 0.40s; }
	.swappable-content > main:not([data-wow="off"]) > *:not(.modal):not(.offcanvas):not(#progress):not(script):not(style):not([hidden]):not([data-htmx-clear]):not([id^="items"]):not(.d-none):nth-child(6) { animation-delay: 0.47s; }
	.swappable-content > main:not([data-wow="off"]) > *:not(.modal):not(.offcanvas):not(#progress):not(script):not(style):not([hidden]):not([data-htmx-clear]):not([id^="items"]):not(.d-none):nth-child(7) { animation-delay: 0.54s; }
	.swappable-content > main:not([data-wow="off"]) > *:not(.modal):not(.offcanvas):not(#progress):not(script):not(style):not([hidden]):not([data-htmx-clear]):not([id^="items"]):not(.d-none):nth-child(8) { animation-delay: 0.61s; }
	.swappable-content > main:not([data-wow="off"]) > *:not(.modal):not(.offcanvas):not(#progress):not(script):not(style):not([hidden]):not([data-htmx-clear]):not([id^="items"]):not(.d-none):nth-child(n+9) { animation-delay: .65s; }
	.swappable-content > main:not([data-wow="off"]) > *:not([data-htmx-clear]):not([id^="items"]) > .card,
	.swappable-content > main:not([data-wow="off"]) > *:not([data-htmx-clear]):not([id^="items"]) > *:not([data-htmx-clear]):not([id^="items"]) > .card { animation: wow-block-in .6s cubic-bezier(.2, .8, .2, 1) backwards; }
	.swappable-content > main:not([data-wow="off"]) > *:not([data-htmx-clear]):not([id^="items"]) > .card:nth-child(1),
	.swappable-content > main:not([data-wow="off"]) > *:not([data-htmx-clear]):not([id^="items"]) > *:not([data-htmx-clear]):not([id^="items"]) > .card:nth-child(1) { animation-delay: 0.20s; }
	.swappable-content > main:not([data-wow="off"]) > *:not([data-htmx-clear]):not([id^="items"]) > .card:nth-child(2),
	.swappable-content > main:not([data-wow="off"]) > *:not([data-htmx-clear]):not([id^="items"]) > *:not([data-htmx-clear]):not([id^="items"]) > .card:nth-child(2) { animation-delay: 0.28s; }
	.swappable-content > main:not([data-wow="off"]) > *:not([data-htmx-clear]):not([id^="items"]) > .card:nth-child(3),
	.swappable-content > main:not([data-wow="off"]) > *:not([data-htmx-clear]):not([id^="items"]) > *:not([data-htmx-clear]):not([id^="items"]) > .card:nth-child(3) { animation-delay: 0.36s; }
	.swappable-content > main:not([data-wow="off"]) > *:not([data-htmx-clear]):not([id^="items"]) > .card:nth-child(4),
	.swappable-content > main:not([data-wow="off"]) > *:not([data-htmx-clear]):not([id^="items"]) > *:not([data-htmx-clear]):not([id^="items"]) > .card:nth-child(4) { animation-delay: 0.44s; }
	.swappable-content > main:not([data-wow="off"]) > *:not([data-htmx-clear]):not([id^="items"]) > .card:nth-child(5),
	.swappable-content > main:not([data-wow="off"]) > *:not([data-htmx-clear]):not([id^="items"]) > *:not([data-htmx-clear]):not([id^="items"]) > .card:nth-child(5) { animation-delay: 0.52s; }
	.swappable-content > main:not([data-wow="off"]) > *:not([data-htmx-clear]):not([id^="items"]) > .card:nth-child(6),
	.swappable-content > main:not([data-wow="off"]) > *:not([data-htmx-clear]):not([id^="items"]) > *:not([data-htmx-clear]):not([id^="items"]) > .card:nth-child(6) { animation-delay: 0.60s; }
	.swappable-content > main:not([data-wow="off"]) > *:not([data-htmx-clear]):not([id^="items"]) > .card:nth-child(7),
	.swappable-content > main:not([data-wow="off"]) > *:not([data-htmx-clear]):not([id^="items"]) > *:not([data-htmx-clear]):not([id^="items"]) > .card:nth-child(7) { animation-delay: 0.68s; }
	.swappable-content > main:not([data-wow="off"]) > *:not([data-htmx-clear]):not([id^="items"]) > .card:nth-child(8),
	.swappable-content > main:not([data-wow="off"]) > *:not([data-htmx-clear]):not([id^="items"]) > *:not([data-htmx-clear]):not([id^="items"]) > .card:nth-child(8) { animation-delay: 0.76s; }

	/* clickable cards (a card inside a link) lift on hover */
	a > .card, a.card { transition: transform .22s cubic-bezier(.2, .8, .2, 1), box-shadow .22s ease; }
	a:hover > .card, a.card:hover { transform: translateY(-3px); box-shadow: 0 10px 22px rgba(18, 90, 160, .18) !important; }
	a:active > .card, a.card:active { transform: scale(.98); }

	/* inputs glow when focused */
	.form-control, .form-select { transition: box-shadow .2s ease, border-color .2s ease, background-color .2s ease; }
	.form-control:focus, .form-select:focus { box-shadow: 0 0 0 3px rgba(18, 154, 232, .22); }

	/* side menu: items slide in when it opens */
	.offcanvas.show .side-menu-items li { animation: wow-slide-in .4s cubic-bezier(.2, .8, .2, 1) backwards; }
	.offcanvas.show .side-menu-items li:nth-child(1) { animation-delay: 0.08s; }
	.offcanvas.show .side-menu-items li:nth-child(2) { animation-delay: 0.12s; }
	.offcanvas.show .side-menu-items li:nth-child(3) { animation-delay: 0.16s; }
	.offcanvas.show .side-menu-items li:nth-child(4) { animation-delay: 0.20s; }
	.offcanvas.show .side-menu-items li:nth-child(5) { animation-delay: 0.24s; }
	.offcanvas.show .side-menu-items li:nth-child(6) { animation-delay: 0.28s; }
	.offcanvas.show .side-menu-items li:nth-child(7) { animation-delay: 0.32s; }
	.offcanvas.show .side-menu-items li:nth-child(8) { animation-delay: 0.36s; }
	.offcanvas.show .side-menu-items li:nth-child(9) { animation-delay: 0.40s; }
	.offcanvas.show .side-menu-items li:nth-child(10) { animation-delay: 0.44s; }
	.offcanvas.show .side-menu-items li:nth-child(11) { animation-delay: 0.48s; }
	.offcanvas.show .side-menu-items li:nth-child(12) { animation-delay: 0.52s; }

	/* bottom nav: the active icon pops, hover bounces */
	.nav-item.active .nav-item-icon { animation: wow-pop-in .5s cubic-bezier(.34, 1.56, .64, 1); }
	.nav-item:hover .nav-item-icon { transform: translateY(-3px); }
	.nav-item-icon { transition: transform .2s cubic-bezier(.34, 1.56, .64, 1); }

	/* profile picture: a soft ring that keeps pulsing */
	.pf-avatar { animation: wow-ring 2.6s ease-out infinite; border-radius: 50%; }

	/* leaderboard hero: drifting gradient */
	.lb-hero-card { background-size: 200% 200%; animation: wow-hero-shift 9s ease-in-out infinite; }

	/* premium / gold plan badge */
	.sp-gold-icon { animation: wow-bob 2.8s ease-in-out infinite; }

	@keyframes wow-block-in   { from { opacity: 0; transform: translateY(22px) scale(.98); } to { opacity: 1; transform: none; } }
	@keyframes wow-slide-in   { from { opacity: 0; transform: translateX(-20px); } to { opacity: 1; transform: none; } }
	@keyframes wow-pop-in     { 0% { transform: scale(.4); } 70% { transform: scale(1.25); } 100% { transform: scale(1); } }
	@keyframes wow-bob        { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
	@keyframes wow-hero-shift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
	@keyframes wow-ring {
		0%   { box-shadow: 0 0 0 0 rgba(18, 154, 232, .45); }
		70%  { box-shadow: 0 0 0 12px rgba(18, 154, 232, 0); }
		100% { box-shadow: 0 0 0 0 rgba(18, 154, 232, 0); }
	}
}


/* =====================================
   WOW MOTION: header (shared header + home header)
   ===================================== */
@media (prefers-reduced-motion: no-preference) {
	.navbar-header { overflow: hidden; }
	/* a soft light sweeps across the bar every few seconds */
	.navbar-header::after {
		content: '';
		position: absolute;
		inset: 0;
		background: linear-gradient(105deg, rgba(255, 255, 255, 0) 35%, rgba(255, 255, 255, .22) 50%, rgba(255, 255, 255, 0) 65%);
		transform: translateX(-100%);
		animation: wow-header-shine 8s ease-in-out 1.2s infinite;
		pointer-events: none;
	}

	/* back arrow leans left, theme icon spins, the bell rings now and then */
	.navbar-back .material-symbols-outlined,
	.navbar-header .theme-toggle .material-symbols-outlined {
		transition: transform .35s cubic-bezier(.34, 1.56, .64, 1);
	}
	.navbar-back:hover .material-symbols-outlined { transform: translateX(-5px); }
	.navbar-header .theme-toggle:hover .material-symbols-outlined { transform: rotate(180deg); }
	.navbar-header [aria-label="নোটিফিকেশন"] .material-symbols-outlined {
		transform-origin: 50% 0;
		animation: wow-bell 7s ease-in-out 2s infinite;
	}

	@keyframes wow-header-shine { 0%, 55% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
	@keyframes wow-bell {
		0%, 14%, 100% { transform: rotate(0); }
		2%  { transform: rotate(16deg); }
		4%  { transform: rotate(-14deg); }
		6%  { transform: rotate(10deg); }
		8%  { transform: rotate(-7deg); }
		10% { transform: rotate(4deg); }
		12% { transform: rotate(-2deg); }
	}
}

/* =====================================
   QUIZ PAGES BACKGROUND (levels + categories)
   ===================================== */
/* page background: soft sky gradient, colour glows and a faint doodle pattern ---------- */
.quiz-bg {
    background-color: #e6f1fb;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cg fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' opacity='.8'%3E%3Ccircle cx='30' cy='40' r='9'/%3E%3Cpath d='M120 30l6 12 13 2-10 9 3 13-12-7-12 7 3-13-10-9 13-2z'/%3E%3Cpath d='M150 120h18M159 111v18'/%3E%3Cpath d='M20 112q10-12 20 0t20 0'/%3E%3Cpath d='M92 150l10 10M102 150l-10 10'/%3E%3C/g%3E%3Ccircle cx='62' cy='146' r='4' fill='white' opacity='.8'/%3E%3Ccircle cx='96' cy='84' r='3' fill='white' opacity='.8'/%3E%3C/svg%3E"),
        radial-gradient(circle at 10% 6%, rgba(255, 213, 79, .40) 0, rgba(255, 213, 79, 0) 38%),
        radial-gradient(circle at 94% 28%, rgba(162, 75, 207, .20) 0, rgba(162, 75, 207, 0) 44%),
        radial-gradient(circle at 6% 62%, rgba(41, 169, 225, .26) 0, rgba(41, 169, 225, 0) 46%),
        radial-gradient(circle at 94% 92%, rgba(60, 207, 127, .24) 0, rgba(60, 207, 127, 0) 42%),
        linear-gradient(180deg, #dff0fd 0%, #ece6f8 55%, #e4f5e9 100%);
    background-size: 180px 180px, auto, auto, auto, auto, auto;
    background-attachment: local;
}
html[data-theme="dark"] .quiz-bg {
    background-color: #0f1b2d;
    background-image:
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cg fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' opacity='.1'%3E%3Ccircle cx='30' cy='40' r='9'/%3E%3Cpath d='M120 30l6 12 13 2-10 9 3 13-12-7-12 7 3-13-10-9 13-2z'/%3E%3Cpath d='M150 120h18M159 111v18'/%3E%3Cpath d='M20 112q10-12 20 0t20 0'/%3E%3Cpath d='M92 150l10 10M102 150l-10 10'/%3E%3C/g%3E%3Ccircle cx='62' cy='146' r='4' fill='white' opacity='.1'/%3E%3Ccircle cx='96' cy='84' r='3' fill='white' opacity='.1'/%3E%3C/svg%3E"),
        radial-gradient(circle at 10% 6%, rgba(255, 213, 79, .10) 0, rgba(255, 213, 79, 0) 38%),
        radial-gradient(circle at 94% 28%, rgba(162, 75, 207, .22) 0, rgba(162, 75, 207, 0) 44%),
        radial-gradient(circle at 6% 62%, rgba(41, 169, 225, .20) 0, rgba(41, 169, 225, 0) 46%),
        radial-gradient(circle at 94% 92%, rgba(60, 207, 127, .14) 0, rgba(60, 207, 127, 0) 42%),
        linear-gradient(180deg, #0f1b2d 0%, #181540 55%, #0f2a24 100%);
}

/* =====================================
   PDF VIEWER (full screen modal) header: primary colour, like the page header
   ===================================== */
.pdf-viewer-header {
	background: var(--primary-color);
	color: #fff;
	border-bottom: 0;
}
.pdf-viewer-header .modal-title {
	color: #fff;
}
.pdf-viewer-loading {
	background: linear-gradient(90deg, #e9ecef 25%, #f4f6f8 50%, #e9ecef 75%);
	background-size: 200% 100%;
	animation: pdf-viewer-shimmer 1.4s ease-in-out infinite;
}
html[data-theme="dark"] .pdf-viewer-loading {
	background: linear-gradient(90deg, #2a2f36 25%, #353b43 50%, #2a2f36 75%);
	background-size: 200% 100%;
}
@keyframes pdf-viewer-shimmer {
	0% { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}
@media (prefers-reduced-motion: reduce) { .pdf-viewer-loading { animation: none; } }

/* =====================================
   SIDE MENU (grouped links, profile card)
   ===================================== */
.side-menu-logo { padding: .75rem 1rem; }
.side-menu-logo img { max-height: 44px; width: auto; }

/* profile card */
.sm-user {
	display: flex;
	align-items: center;
	gap: .7rem;
	margin: .75rem .75rem .25rem;
	padding: .65rem .75rem;
	border-radius: 14px;
	text-decoration: none;
	color: var(--text-dark);
	background: rgba(18, 154, 232, .10);
	transition: background-color .2s ease, transform .2s ease;
}
.sm-user:hover { background: rgba(18, 154, 232, .18); color: var(--text-dark); }
.sm-user:active { transform: scale(.98); }
.sm-user-avatar { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; flex: 0 0 44px; background: #fff; border: 2px solid var(--primary-color); }
.sm-user-info { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; line-height: 1.25; }
.sm-user-name { font-weight: 700; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-user-badge { font-size: .72rem; color: var(--text-light); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sm-user-badge.is-premium { color: #b7791f; font-weight: 600; }
html[data-theme="dark"] .sm-user-badge.is-premium { color: #f6c453; }
.sm-user-go { color: var(--text-light); font-size: 20px !important; }

/* guest */
.sm-guest { padding: .75rem .75rem .25rem; }
.sm-login-btn { background: var(--primary-color); color: #fff; font-weight: 600; border-radius: 12px; display: flex; align-items: center; justify-content: center; gap: .4rem; }
.sm-login-btn:hover { background: var(--primary-dark); color: #fff; }

/* lists */
.side-menu-items { flex: 0 0 auto; padding: .35rem .5rem; }
.side-menu-items li,
.side-menu-items li:last-child { border-bottom: 0; }
.side-menu-heading {
	padding: .85rem .75rem .3rem;
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .04em;
	color: var(--text-light);
}
.side-menu-link { border-radius: 10px; padding: .55rem .75rem; margin: 1px 0; border-left: 0; }
.side-menu-link:hover { padding-left: .75rem; }
.side-menu-link.active {
	padding-left: .75rem;
	border-left: 0;
	font-weight: 700;
	background-color: rgba(18, 154, 232, .15);
	color: var(--primary-color);
}
.side-menu-link.active .side-menu-icon { color: var(--primary-color); }
.side-menu-ext { font-size: 16px !important; color: var(--text-light); }
.side-menu-foot { border-top: 1px solid var(--border-color); margin-top: .25rem; padding-top: .5rem; }

/* the menu scrolls, the app download card stays fixed at the bottom */
#sideMenu .offcanvas-body { overflow: hidden; min-height: 0; }
.side-menu-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; }
#sideMenu .app-dl { flex: 0 0 auto; margin: .5rem .9rem .9rem; }

/* ===== disable text selection site-wide (inputs stay selectable so people can type/edit) ===== */
html, body, body * {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}
input, textarea, [contenteditable="true"], [contenteditable="true"] * {
    -webkit-user-select: text;
    user-select: text;
}
