/**
 * UPL site-wide layout + dark mode (light mode = existing theme CSS)
 */

/* ── Sticky footer (public site) ───────────────────────────────────── */
/*
 * Body is the flex column (min viewport height). page-wraper grows with content.
 * Footer uses margin-top:auto inside page-wraper so it sits at the bottom when
 * content is short, and flows naturally after content when the page is tall.
 */
html {
	height: auto;
	min-height: 100%;
}

body {
	min-height: 100vh;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	margin: 0;
	overflow-x: hidden;
	overflow-y: auto;
}

#loader {
	position: fixed;
	z-index: 999999;
	background: #ccffff url(/images/loader.gif?v=ball) no-repeat center center;
	background-size: 200px 200px;
}

/* Football loader only — scale the ball gif on smaller screens (no separate loader-small file) */
@media (max-width: 991.98px) {
	#loader {
		background-image: url(/images/loader.gif?v=ball) !important;
		background-size: 150px 150px !important;
		background-repeat: no-repeat !important;
		background-position: center center !important;
	}
}

@media (max-width: 575.98px) {
	#loader {
		background-size: 112px 112px !important;
	}
}

body > .page-wraper {
	flex: 1 0 auto;
	display: flex;
	flex-direction: column;
	width: 100%;
	min-height: 0 !important;
	height: auto !important;
	max-height: none !important;
	overflow: visible !important;
}

.page-wraper .site-header {
	flex-shrink: 0;
}

.page-wraper .page-content {
	flex: 1 0 auto;
	width: 100%;
}

.page-wraper .site-footer,
.page-wraper footer.site-footer,
.page-wraper #footer {
	flex: 0 0 auto;
	margin-top: auto;
	width: 100%;
	position: relative !important;
	clear: both;
	visibility: visible !important;
	opacity: 1 !important;
	transform: none !important;
}

/* icon-bx-wraper.style-1: theme CSS gaps img icons only — FA <i> icons need the same */
.icon-bx-wraper.style-1 .icon-media > i {
	flex: 0 0 50px;
	margin-right: 14px;
	text-align: center;
	line-height: 1;
}

/* Bell + badges + theme — single horizontal row in header */
.upl-header-actions {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: flex-end;
	gap: 0.45rem;
}

.upl-header-badges .upl-user-badges {
	margin-left: 0;
	gap: 0.2rem;
}

.upl-header-badges .upl-user-badge__img {
	width: 28px;
	height: 28px;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.35));
}

/* Mobile slide-out menu — profile + role badges */
.upl-nav-mobile-profile {
	display: none;
}

@media (max-width: 991.98px) {
	.upl-nav-mobile-profile {
		display: block;
		padding: 0 20px 16px;
		border-bottom: 1px solid rgba(0, 51, 102, 0.1);
		margin-bottom: 0.35rem;
	}

	.upl-nav-mobile-profile__link {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;
		text-decoration: none;
		color: inherit;
	}

	.upl-nav-mobile-profile__name {
		font-size: 1.05rem;
		font-weight: 700;
		color: var(--secondary, #003366);
		line-height: 1.2;
	}

	.upl-nav-mobile-profile__badges .upl-user-badges {
		margin-left: 0;
		gap: 0.75rem;
	}
}

[data-theme="dark"] .upl-nav-mobile-profile {
	border-bottom-color: var(--border-color);
}

[data-theme="dark"] .upl-nav-mobile-profile__name {
	color: #e6edf3;
}

.upl-header-bell .btn {
	min-width: 2rem;
	min-height: 2rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.upl-header-logout {
	white-space: nowrap;
	padding: 0.35rem 0.85rem;
}

/* Light mode — header text/icons dark blue (avoid white-on-white) */
[data-theme="light"] .site-header .header-nav .nav > li > a,
html:not([data-theme="dark"]) .site-header .header-nav .nav > li > a {
	color: #003366;
}

[data-theme="light"] .site-header .header-nav .nav > li > a:hover,
html:not([data-theme="dark"]) .site-header .header-nav .nav > li > a:hover {
	color: #006699;
}

[data-theme="light"] .site-header .sub-menu li a,
html:not([data-theme="dark"]) .site-header .sub-menu li a {
	color: #003366;
}

[data-theme="light"] .site-header .extra-nav .btn.text-white,
[data-theme="light"] .site-header .upl-header-logout,
[data-theme="light"] .site-header .upl-header-bell .btn,
html:not([data-theme="dark"]) .site-header .extra-nav .btn.text-white,
html:not([data-theme="dark"]) .site-header .upl-header-logout,
html:not([data-theme="dark"]) .site-header .upl-header-bell .btn {
	color: #003366 !important;
}

[data-theme="light"] .site-header .btn-outline-primary.text-white,
html:not([data-theme="dark"]) .site-header .btn-outline-primary.text-white {
	color: #003366 !important;
	border-color: #003366;
}

[data-theme="light"] .site-header .btn-outline-primary.text-white:hover,
html:not([data-theme="dark"]) .site-header .btn-outline-primary.text-white:hover {
	color: #fff !important;
	background-color: #003366;
	border-color: #003366;
}

[data-theme="light"] .site-header .navbar-toggler span,
html:not([data-theme="dark"]) .site-header .navbar-toggler span {
	background: #003366;
}

[data-theme="light"] .upl-theme-split__disc,
html:not([data-theme="dark"]) .upl-theme-split__disc {
	border-color: rgba(0, 51, 102, 0.45);
	box-shadow: 0 2px 8px rgba(0, 51, 102, 0.12);
}

/* Sticky header — theme base CSS forces #212529 on .text-white; restore readable colours */
[data-theme="dark"] .site-header.header-transparent .sticky-header.is-fixed .header-nav .nav > li > a {
	color: #e6edf3 !important;
}

[data-theme="dark"] .site-header.header-transparent .sticky-header.is-fixed .extra-nav .btn.text-white,
[data-theme="dark"] .site-header.header-transparent .sticky-header.is-fixed .upl-header-bell .btn,
[data-theme="dark"] .site-header.header-transparent .sticky-header.is-fixed .upl-header-bell .btn i,
[data-theme="dark"] .site-header.header-transparent .sticky-header.is-fixed .upl-header-logout,
[data-theme="dark"] .site-header.header-transparent .sticky-header.is-fixed .btn-outline-primary.text-white {
	color: #fff !important;
	border-color: rgba(255, 255, 255, 0.65);
}

[data-theme="dark"] .site-header.header-transparent .sticky-header.is-fixed .btn-outline-primary.text-white:hover {
	color: #003366 !important;
	background-color: #fff;
	border-color: #fff;
}

[data-theme="light"] .site-header.header-transparent .sticky-header.is-fixed .header-nav .nav > li > a,
html:not([data-theme="dark"]) .site-header.header-transparent .sticky-header.is-fixed .header-nav .nav > li > a {
	color: #003366 !important;
}

[data-theme="light"] .site-header.header-transparent .sticky-header.is-fixed .extra-nav .btn.text-white,
[data-theme="light"] .site-header.header-transparent .sticky-header.is-fixed .upl-header-bell .btn,
[data-theme="light"] .site-header.header-transparent .sticky-header.is-fixed .upl-header-bell .btn i,
[data-theme="light"] .site-header.header-transparent .sticky-header.is-fixed .upl-header-logout,
html:not([data-theme="dark"]) .site-header.header-transparent .sticky-header.is-fixed .extra-nav .btn.text-white,
html:not([data-theme="dark"]) .site-header.header-transparent .sticky-header.is-fixed .upl-header-bell .btn,
html:not([data-theme="dark"]) .site-header.header-transparent .sticky-header.is-fixed .upl-header-bell .btn i,
html:not([data-theme="dark"]) .site-header.header-transparent .sticky-header.is-fixed .upl-header-logout {
	color: #003366 !important;
}

/* Desktop: main NAV menu on one row, vertically centred in the header bar */
@media (min-width: 992px) {
	.site-header .sticky-header.navbar-expand-lg .main-bar > .container,
	.site-header .main-bar-wraper.navbar-expand-lg .main-bar > .container {
		display: flex;
		align-items: center;
		justify-content: flex-start;
		flex-wrap: nowrap;
		column-gap: 0.5rem;
		width: 100%;
		min-height: var(--header-height, 80px);
	}

	.site-header .main-bar > .container::after {
		display: none;
	}

	.site-header .logo-header {
		float: none;
		flex: 0 0 auto;
		align-self: center;
	}

	.site-header .navbar-toggler {
		display: none;
	}

	.site-header .extra-nav {
		float: none;
		flex: 0 0 auto;
		order: 3;
		margin-left: auto;
		height: auto;
		align-self: center;
		display: flex;
		align-items: center;
		padding-left: 0.75rem;
	}

	.site-header .extra-nav .extra-cell {
		align-items: center;
	}

	.site-header,
	.site-header .main-bar,
	.site-header .main-bar > .container,
	.site-header #navbarNavDropdown.header-nav,
	.site-header .header-nav.navbar-collapse,
	.site-header .header-nav .nav,
	.site-header .header-nav .nav > li {
		overflow: visible !important;
	}

	.site-header #navbarNavDropdown.header-nav,
	.site-header .header-nav.navbar-collapse {
		flex: 1 1 auto;
		min-width: 0;
		float: none !important;
		display: flex !important;
		align-items: center !important;
		justify-content: flex-start !important;
		position: static !important;
		width: auto !important;
		height: auto !important;
		padding: 0 0 0 0.5rem !important;
		margin: 0 !important;
		order: 2;
	}

	.site-header .header-nav > .logo-header.mostion {
		display: none !important;
	}

	.site-header .header-nav > ul.nav,
	.site-header .header-nav ul.nav.navbar-nav {
		float: none !important;
		display: flex !important;
		flex-direction: row !important;
		flex-wrap: nowrap !important;
		align-items: center !important;
		justify-content: flex-start !important;
		gap: 0 0.25rem;
		margin: 0 !important;
		padding: 0 !important;
		width: auto !important;
		max-width: none !important;
		font-size: 0;
		vertical-align: middle;
	}

	.site-header .header-nav .nav > li {
		display: block !important;
		position: relative !important;
		flex: 0 0 auto !important;
		float: none !important;
		width: auto !important;
		white-space: nowrap;
	}

	/* Theme toggle lives in extra-nav on desktop — keep mobile-only row out of the nav bar */
	.site-header .header-nav .nav > li.upl-nav-theme-item {
		display: none !important;
	}

	/* Flex on <li> breaks absolute submenu placement — anchor below bar, menu under link */
	.site-header .header-nav .nav > li > .sub-menu,
	.site-header .header-nav .nav > li > .mega-menu {
		top: 100% !important;
		left: 0 !important;
		margin-top: 0 !important;
		z-index: 10001;
	}

	.site-header .header-nav .nav > li:hover > .sub-menu,
	.site-header .header-nav .nav > li:hover > .mega-menu,
	.site-header .header-nav .nav > li.open > .sub-menu,
	.site-header .header-nav .nav > li.open > .mega-menu {
		margin-top: 0 !important;
	}

	.site-header .header-nav .nav > li > a {
		display: inline-flex !important;
		align-items: center !important;
		white-space: nowrap;
		padding: 0 0.65rem !important;
		height: var(--header-height, 80px) !important;
		line-height: 1 !important;
		font-size: 15px !important;
	}

	.site-header.header-transparent .header-nav .nav > li > a {
		color: #fff;
	}

	[data-theme="light"] .site-header.header-transparent .header-nav .nav > li > a,
	html:not([data-theme="dark"]) .site-header.header-transparent .header-nav .nav > li > a {
		color: #003366;
	}
}

/* ── Split-circle theme toggle (nav) ─────────────────────────────── */
.upl-theme-toggle--split {
	display: inline-flex;
	align-items: center;
}

.upl-theme-split {
	position: relative;
	display: inline-flex;
	align-items: center;
	margin: 0;
	cursor: pointer;
}

.upl-theme-split__disc {
	display: grid;
	grid-template-columns: 1fr 1fr;
	width: 2.35rem;
	height: 2.35rem;
	border-radius: 50%;
	overflow: hidden;
	border: 2px solid rgba(255, 255, 255, 0.55);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.upl-theme-split__half {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 0.62rem;
	line-height: 1;
	transition: opacity 0.2s ease, filter 0.2s ease;
}

.upl-theme-split__half--sun {
	background: linear-gradient(135deg, #ffe082 0%, #ffb300 100%);
	color: #5d4037;
}

.upl-theme-split__half--moon {
	background: linear-gradient(135deg, #1a2744 0%, #0d1117 100%);
	color: #7ec8e3;
}

.upl-theme-toggle.is-light .upl-theme-split__half--sun {
	opacity: 1;
	filter: none;
}

.upl-theme-toggle.is-light .upl-theme-split__half--moon {
	opacity: 0.45;
	filter: saturate(0.6);
}

.upl-theme-toggle.is-dark .upl-theme-split__half--moon {
	opacity: 1;
	filter: none;
}

.upl-theme-toggle.is-dark .upl-theme-split__half--sun {
	opacity: 0.45;
	filter: saturate(0.6);
}

.upl-theme-split:hover .upl-theme-split__disc {
	border-color: rgba(255, 255, 255, 0.85);
	box-shadow: 0 0 0 2px rgba(102, 204, 255, 0.25);
}

/* ── Pill theme switch (sidebar + legacy) ─────────────────────── */
.upl-theme-toggle--sidebar .upl-theme-switch-track {
	width: 3rem;
}

/* Mobile slide-out menu — dark mode row */
.upl-nav-theme-item {
	display: none !important;
}

@media (max-width: 991.98px) {
	.site-header .header-nav .nav > li.upl-nav-theme-item,
	.upl-nav-theme-item {
		display: block !important;
		list-style: none;
		border-top: 1px solid rgba(0, 51, 102, 0.12);
	}

	.upl-nav-theme-row {
		display: flex;
		align-items: center;
		justify-content: space-between;
		padding: 14px 20px;
		gap: 1rem;
	}

	.upl-nav-theme-label {
		font-size: 15px;
		font-weight: 500;
		color: var(--secondary, #003366);
	}

	.upl-nav-theme-item .upl-theme-toggle--menu {
		padding: 0 !important;
		border: none !important;
		flex-shrink: 0;
	}

	.upl-nav-theme-item .upl-theme-toggle--menu .d-flex {
		justify-content: flex-end !important;
	}
}

[data-theme="dark"] .upl-nav-theme-label {
	color: #c9d1d9;
}

[data-theme="dark"] .upl-nav-theme-item {
	border-top-color: var(--border-color);
}

.upl-theme-toggle--nav:not(.upl-theme-toggle--split),
.upl-theme-toggle--sidebar .d-flex {
	display: flex;
	align-items: center;
	gap: 0.45rem;
}

.upl-theme-switch,
.upl-login-switch {
	position: relative;
	display: inline-flex;
	align-items: center;
	margin: 0;
	cursor: pointer;
}

.upl-theme-switch-input,
.upl-login-switch-input {
	position: absolute;
	opacity: 0;
	width: 0;
	height: 0;
	pointer-events: none;
}

.upl-theme-switch-track,
.upl-login-switch-track {
	display: block;
	width: 2.85rem;
	height: 1.4rem;
	background: rgba(255, 255, 255, 0.3);
	border-radius: 999px;
	border: 1px solid rgba(255, 255, 255, 0.55);
	position: relative;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.upl-theme-switch-input:checked + .upl-theme-switch-track,
.upl-login-switch-input:checked + .upl-login-switch-track {
	background: rgba(20, 40, 70, 0.85);
	border-color: rgba(126, 200, 227, 0.7);
}

.upl-theme-switch-thumb,
.upl-login-switch-thumb {
	position: absolute;
	top: 50%;
	left: 3px;
	transform: translateY(-50%);
	width: 1.15rem;
	height: 1.15rem;
	background: #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
	transition: left 0.22s ease;
}

.upl-theme-switch-input:checked + .upl-theme-switch-track .upl-theme-switch-thumb,
.upl-login-switch-input:checked + .upl-login-switch-track .upl-login-switch-thumb {
	left: calc(100% - 1.15rem - 3px);
}

.upl-theme-thumb-icon {
	font-size: 0.6rem;
	line-height: 1;
	color: #e6a817;
	pointer-events: none;
}

.upl-theme-switch-input:checked + .upl-theme-switch-track .upl-theme-thumb-icon {
	color: #7ec8e3;
}

.upl-theme-icon {
	font-size: 0.8rem;
	color: rgba(255, 255, 255, 0.45);
	transition: color 0.2s ease, opacity 0.2s ease;
	pointer-events: none;
}

.upl-theme-toggle.is-light .upl-theme-icon--sun,
.upl-theme-toggle.is-dark .upl-theme-icon--moon {
	color: rgba(255, 255, 255, 0.95);
}

.upl-theme-toggle--sidebar .upl-theme-switch-track {
	background: rgba(255, 255, 255, 0.2);
}

/*
 * Admin: Dezign sets `#main-wrapper { overflow: hidden }` and hides native scrollbars on `body`,
 * which traps tall dashboards — restore normal document scrolling and undo JS-injected min-heights.
 */
html[data-upl-admin="1"] {
	height: auto !important;
	overflow-x: hidden;
	overflow-y: scroll !important;
	scrollbar-gutter: stable;
}

html[data-upl-admin="1"] body {
	overflow-x: hidden !important;
	overflow-y: auto !important;
	min-height: 100vh !important;
	height: auto !important;
	display: block !important;
}

html[data-upl-admin="1"] #main-wrapper {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	overflow-x: hidden !important;
	overflow-y: visible !important;
	height: auto !important;
	max-height: none !important;
}

html[data-upl-admin="1"] .content-body {
	flex: 1 0 auto;
	min-height: 0 !important;
}

html[data-upl-admin="1"] .footer.out-footer {
	margin-top: auto !important;
	flex-shrink: 0;
}

/* ── Dark mode (public) — overrides CSS variables from style.css ─── */
[data-theme="dark"] {
	--primary: #5eb8e8;
	--secondary: #8ecae6;
	--primary-hover: #7ec8e3;
	--primary-dark: #2a6f94;
	--body-color: #b8c5d6;
	--border-color: #3d4f66;
	--body-bg: #0d1117;
	--grey: #161b22;
	--input-bg: #1c2330;
	--card-bg: #161b22;
	--title: #7ec8e3;
	--body-img: none;
	--bs-body-bg: #0d1117;
	--bs-body-color: #c9d1d9;
	--bs-border-color: #30363d;
	--bs-card-bg: #161b22;
}

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

[data-theme="dark"] .page-wraper {
	background-color: var(--body-bg);
}

[data-theme="dark"] .card,
[data-theme="dark"] .profile-card,
[data-theme="dark"] .widget,
[data-theme="dark"] .modal-content,
[data-theme="dark"] .dropdown-menu {
	background-color: var(--card-bg) !important;
	color: var(--body-color);
	border-color: var(--border-color) !important;
}

/* Footer: columns stay transparent (don’t paint grey panels over footer artwork) */
.site-footer.style-1 .widget,
footer.site-footer .widget,
.site-footer.style-1 .widget-post-bx .widget-post,
.site-footer.style-1 .dz-info {
	background: transparent !important;
	background-color: transparent !important;
	border: none !important;
	box-shadow: none !important;
}

[data-theme="dark"] footer.site-footer .widget,
[data-theme="dark"] .site-footer.style-1 .widget,
[data-theme="dark"] .site-footer.style-1 .widget-post-bx .widget-post {
	background-color: transparent !important;
	border-color: transparent !important;
	box-shadow: none !important;
}

/* Footer Members list — lines up with Other Links */
/* Compact public footer */
.upl-footer-compact.site-footer.style-1 .footer-top {
	padding: 2.75rem 0 1.5rem !important;
}

.upl-footer-compact.site-footer.style-1 > .bg-shape1 {
	display: none;
}

.upl-footer-compact.site-footer.style-1 .upl-footer-logo-widget.widget_about {
	max-width: none;
	margin-right: 0;
	margin-bottom: 0;
}

.upl-footer-compact.site-footer.style-1 .footer-logo {
	margin-bottom: 0;
}

.upl-footer-compact.site-footer.style-1 .footer-logo.upl-footer-mark img {
	width: 120px;
	height: 120px;
	max-width: none;
	object-fit: contain;
}

.upl-footer-compact.site-footer.style-1 .widget-title {
	font-size: 0.95rem;
	margin-bottom: 0.55rem;
}

.upl-footer-compact.site-footer.style-1 .widget_services ul li {
	margin-bottom: 0.2rem;
}

.upl-footer-compact.site-footer.style-1 .widget_services ul li a {
	font-size: 0.88rem;
}

.site-footer.style-1 .upl-footer-brand-centre {
	max-width: 42rem;
	margin: 0 auto 1rem;
	padding: 0 0.5rem;
}

.site-footer.style-1 .upl-footer-platform-definition {
	font-weight: 500;
	line-height: 1.5;
	font-size: 0.92rem;
	margin-bottom: 0.35rem;
	color: rgba(255, 255, 255, 0.92);
}

.site-footer.style-1 .upl-footer-contact {
	margin: 0;
}

.site-footer.style-1 .upl-footer-contact a {
	font-size: 0.95rem;
	font-weight: 600;
	text-decoration: none;
	color: #fff;
	word-break: break-word;
}

.site-footer.style-1 .upl-footer-contact a:hover {
	text-decoration: underline;
}

.site-footer.style-1 .upl-footer-community-hint {
	font-size: 0.78rem;
	opacity: 0.75;
	margin: 0;
	line-height: 1.3;
}

.site-footer.style-1 .upl-footer-hub li a {
	font-weight: 500;
}

.site-footer.style-1 .upl-footer-stats-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.15rem 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-footer.style-1 .upl-footer-stats-grid li {
	margin: 0;
}

.site-footer.style-1 .upl-footer-stats-grid li span {
	font-size: 0.88rem;
}

.site-footer.style-1 .upl-footer-members ul li span {
	color: inherit;
}

.site-footer.style-1 .upl-footer-members .upl-footer-online span {
	color: var(--primary, #5b9cff);
}

[data-theme="dark"] .table {
	--bs-table-bg: var(--card-bg);
	--bs-table-color: var(--body-color);
	--bs-table-border-color: var(--border-color);
}

[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select,
[data-theme="dark"] input:not([type="checkbox"]):not([type="radio"]),
[data-theme="dark"] textarea,
[data-theme="dark"] select {
	background-color: var(--input-bg) !important;
	border-color: var(--border-color) !important;
	color: #e6edf3 !important;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6,
[data-theme="dark"] .h1,
[data-theme="dark"] .h2,
[data-theme="dark"] .h3,
[data-theme="dark"] .h4,
[data-theme="dark"] .h5,
[data-theme="dark"] .h6 {
	color: var(--title);
}

[data-theme="dark"] .text-muted {
	color: #8b949e !important;
}

[data-theme="dark"] .site-header .header-nav .nav > li > a {
	color: #e6edf3;
}

[data-theme="dark"] .site-header .sub-menu {
	background: #161b22;
	border-color: var(--border-color);
}

[data-theme="dark"] .site-header .sub-menu li a {
	color: #c9d1d9;
}

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

[data-theme="dark"] #loader {
	background-color: #0d1117 !important;
}

[data-theme="dark"] .site-footer.style-1 .footer-top {
	background-color: #161b22;
}

[data-theme="dark"] .site-footer.style-1 .footer-bottom {
	background-color: #0d1117;
}

[data-theme="dark"] .site-footer.style-1 .widget-title,
[data-theme="dark"] .site-footer.style-1 p,
[data-theme="dark"] .site-footer.style-1 a,
[data-theme="dark"] .site-footer.style-1 .copyright-text {
	color: #c9d1d9;
}

[data-theme="dark"] .btn-light {
	background-color: #21262d;
	border-color: #30363d;
	color: #e6edf3;
}

[data-theme="dark"] .list-group-item {
	background-color: var(--card-bg);
	border-color: var(--border-color);
	color: var(--body-color);
}

/* Profile + shared content sections (bg-light / white stat cards) */
[data-theme="dark"] .bg-light,
[data-theme="dark"] .content-inner.bg-light {
	--bs-bg-opacity: 1;
	background-color: var(--body-bg) !important;
	color: var(--body-color);
}

[data-theme="dark"] .bg-white {
	--bs-bg-opacity: 1;
	background-color: var(--card-bg) !important;
	color: var(--body-color);
}

[data-theme="dark"] .icon-bx-wraper.style-1,
[data-theme="dark"] .icon-bx-wraper.style-3 {
	background-color: var(--card-bg) !important;
	background: var(--card-bg) !important;
	border: 1px solid var(--border-color);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
	color: var(--body-color);
}

[data-theme="dark"] .icon-bx-wraper.style-1:hover {
	background-color: #1a2430 !important;
	transform: translateY(-8px);
}

[data-theme="dark"] .icon-bx-wraper.style-1 .title,
[data-theme="dark"] .icon-bx-wraper.style-3 .title,
[data-theme="dark"] .icon-bx-wraper.style-1 .amount,
[data-theme="dark"] .icon-bx-wraper.style-1 .icon-content p,
[data-theme="dark"] .icon-bx-wraper.style-3 .icon-content p {
	color: var(--body-color);
}

[data-theme="dark"] .icon-bx-wraper.style-1 .icon-media .icon-info span,
[data-theme="dark"] .icon-bx-wraper.style-1 .icon-content .price li span,
[data-theme="dark"] .icon-bx-wraper.style-3 .icon-content p {
	color: #8b949e;
}

/* Home Competition / Community cards (style-2) — default uses bright --secondary in dark mode */
[data-theme="dark"] .icon-bx-wraper.style-2 {
	background-color: var(--card-bg) !important;
	background: var(--card-bg) !important;
	border: 1px solid var(--border-color);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
	color: var(--body-color);
}

[data-theme="dark"] .icon-bx-wraper.style-2:hover {
	background-color: #1a2430 !important;
	transform: translateY(-8px);
}

[data-theme="dark"] .icon-bx-wraper.style-2 .title {
	color: #e6edf3;
}

[data-theme="dark"] .icon-bx-wraper.style-2 .icon-content p {
	color: #b8c5d6;
}

[data-theme="dark"] .icon-bx-wraper.style-2 .icon-content p strong {
	color: #f0f6fc;
}

[data-theme="dark"] .fixture-card,
[data-theme="dark"] .fixture-card.bg-white {
	background-color: var(--card-bg) !important;
	border-color: var(--border-color) !important;
}

[data-theme="dark"] .fixture-card .team-name {
	color: #e6edf3 !important;
}

[data-theme="dark"] .fixture-card .fixture-date {
	color: var(--title) !important;
}

[data-theme="dark"] .fixture-card .fixture-time {
	color: #8b949e !important;
}

[data-theme="dark"] .fixture-card .badge.bg-light,
[data-theme="dark"] .fixture-card .badge.bg-light.text-dark {
	background-color: var(--input-bg) !important;
	color: var(--body-color) !important;
}

[data-theme="dark"] .table-light,
[data-theme="dark"] thead.table-light {
	--bs-table-bg: var(--input-bg);
	--bs-table-color: var(--body-color);
	--bs-table-border-color: var(--border-color);
}

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

[data-theme="dark"] .page-content .section-head .title,
[data-theme="dark"] .page-content .section-head p {
	color: var(--body-color);
}

[data-theme="dark"] .page-content .section-head .title .text-primary {
	color: var(--title) !important;
}

[data-theme="dark"] #profileEditFields .profile-section {
	border-color: var(--border-color) !important;
}

[data-theme="dark"] .select2-container--default .select2-selection--single {
	background-color: var(--input-bg) !important;
	border-color: var(--border-color) !important;
	color: #e6edf3;
}

[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered {
	color: #e6edf3 !important;
}

[data-theme="dark"] .select2-dropdown {
	background-color: var(--card-bg);
	border-color: var(--border-color);
}

[data-theme="dark"] .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
	background-color: var(--primary-dark);
}

/* Profile page — hero, stats band, lower panels, footer */
[data-theme="dark"] .upl-profile-page .upl-profile-hero {
	background: linear-gradient(145deg, #0a2538 0%, #0f1724 42%, #0d1117 100%) !important;
}

[data-theme="dark"] .upl-profile-page .upl-profile-hero .upl-profile-hero-stat {
	background: rgba(255, 255, 255, 0.07) !important;
	border-color: rgba(126, 200, 227, 0.22) !important;
}

[data-theme="dark"] .upl-profile-page .upl-profile-hero .bg-shape1,
[data-theme="dark"] .upl-profile-page .upl-profile-hero .bg-shape3 {
	opacity: 0.06 !important;
}

[data-theme="dark"] .upl-profile-page .bg-primary-light,
[data-theme="dark"] .upl-profile-page .content-inner.bg-light,
[data-theme="dark"] .upl-profile-page .upl-profile-lower {
	background-color: var(--body-bg) !important;
	color: var(--body-color);
}

[data-theme="dark"] .upl-profile-page .icon-bx-wraper.style-1 .icon-content .price li span {
	color: #8b949e;
}

[data-theme="dark"] .upl-profile-page .card-header {
	background-color: var(--input-bg) !important;
	border-bottom-color: var(--border-color) !important;
	color: var(--body-color);
}

[data-theme="dark"] .upl-profile-page .card-header .card-title {
	color: var(--title);
}

[data-theme="dark"] .upl-profile-page .table-striped > tbody > tr:nth-of-type(odd) > * {
	--bs-table-bg-type: rgba(94, 184, 232, 0.06);
	color: var(--body-color);
}

[data-theme="dark"] .upl-profile-page .upl-profile-trophy-card {
	background-color: var(--input-bg) !important;
	border: 1px solid var(--border-color);
}

/* Trophy hover zoom + click enlarge (home + profile) */
.upl-trophy-zoom-trigger {
	cursor: zoom-in;
	transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease;
}
.upl-trophy-zoom-trigger:focus-visible {
	outline: 2px solid #66ccff;
	outline-offset: 3px;
}
.upl-home-trophy.upl-trophy-zoom-trigger:hover {
	transform: translateY(-5px);
	box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
	border-color: rgba(212, 175, 55, 0.42);
}
.upl-home-trophy__img-wrap {
	overflow: hidden;
}
.upl-trophy-zoom-trigger .upl-home-trophy__img,
.upl-trophy-zoom-trigger .upl-trophy-img {
	transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
	transform-origin: center bottom;
}
.upl-trophy-zoom-trigger:hover .upl-home-trophy__img,
.upl-trophy-zoom-trigger:hover .upl-trophy-img,
.upl-trophy-zoom-trigger:focus-visible .upl-home-trophy__img,
.upl-trophy-zoom-trigger:focus-visible .upl-trophy-img {
	transform: scale(1.18);
}
.upl-profile-trophy-card.upl-trophy-zoom-trigger:hover {
	transform: translateY(-4px);
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.12);
}
.upl-profile-trophy-card .card-body {
	overflow: hidden;
}
.upl-profile-trophy-card .upl-trophy-img {
	max-height: 96px;
	width: auto;
	object-fit: contain;
}

/* Home trophy showcase — dark cards in dark mode, white in light (see index.php) */
[data-theme="dark"] .upl-home-trophies {
	background: linear-gradient(180deg, rgba(8, 12, 22, 0.35) 0%, transparent 100%);
}

[data-theme="dark"] .upl-home-trophy {
	background: rgba(6, 10, 18, 0.72);
	border: 1px solid rgba(212, 175, 55, 0.18);
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

[data-theme="dark"] .upl-home-trophy__title {
	color: var(--body-color);
}

[data-theme="dark"] .upl-home-trophy__img {
	filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.55));
}

.upl-trophy-zoom-modal__stage {
	min-height: 220px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0.5rem 0;
}
.upl-trophy-zoom-modal__img {
	max-width: 100%;
	max-height: min(62vh, 420px);
	width: auto;
	height: auto;
	object-fit: contain;
	filter: drop-shadow(0 12px 28px rgba(0, 0, 0, 0.25));
}
.upl-profile-hero-trophies__icons img {
	transition: transform 0.25s ease;
}
.upl-profile-hero-trophies__link:hover .upl-profile-hero-trophies__icons img {
	transform: scale(1.12);
}

[data-theme="dark"] .upl-profile-page .fixture-card .vs-text {
	background: linear-gradient(135deg, #2a6f94, #0d1117) !important;
}

[data-theme="dark"] .site-footer.style-1 .footer-top.background-luminosity {
	background-image: none !important;
	background-blend-mode: normal !important;
	background-color: #161b22 !important;
}

[data-theme="dark"] .site-footer.style-1 .footer-top.background-luminosity:before {
	background-color: #161b22;
	opacity: 1;
}

[data-theme="dark"] .site-footer.style-1 .footer-bottom {
	background-color: #0d1117 !important;
}

/* ── Admin panel: template hides body scrollbars; show them again on /admin ─ */
html[data-upl-admin="1"] body {
	-ms-overflow-style: auto !important;
	scrollbar-width: thin !important;
	scrollbar-gutter: stable;
}

html[data-upl-admin="1"] body::-webkit-scrollbar {
	display: block !important;
	width: 11px;
}

html[data-upl-admin="1"] body::-webkit-scrollbar-track {
	background: rgba(15, 23, 42, 0.06);
}

html[data-upl-admin="1"] body::-webkit-scrollbar-thumb {
	background: rgba(100, 116, 139, 0.5);
	border-radius: 8px;
	border: 2px solid transparent;
	background-clip: padding-box;
}

html[data-upl-admin="1"][data-theme="dark"] body::-webkit-scrollbar-track {
	background: rgba(0, 0, 0, 0.25);
}

html[data-upl-admin="1"][data-theme="dark"] body::-webkit-scrollbar-thumb {
	background: rgba(148, 163, 184, 0.45);
}

/* HSCharts hosts on secondary admin pages (users, teams, fixtures, match-stats) */
html[data-upl-admin="1"] .upl-admin-chart-host {
	min-height: 280px;
	width: 100%;
}

/* Homepage section decorations (shape2 controller etc.) */
.upl-home-page .section-wrapper1,
.upl-home-page .section-wrapper2 {
	position: relative;
	overflow: hidden;
}

.upl-home-page .upl-section-deco {
	position: absolute;
	width: 72px;
	max-width: 72px;
	height: auto;
	pointer-events: none;
	user-select: none;
	opacity: 0.22;
	z-index: 0;
	animation: aniRotate 10s infinite linear;
}

.upl-home-page .section-wrapper1 .upl-section-deco--1 {
	bottom: 12%;
	left: 5%;
}

.upl-home-page .section-wrapper2 .upl-section-deco--2 {
	right: 3%;
	top: 22%;
}

[data-theme="dark"] .upl-home-page .upl-section-deco {
	opacity: 0.08;
}

@media (max-width: 1480px) {
	.upl-home-page .upl-section-deco {
		display: none;
	}
}

[data-theme="dark"] .upl-home-page .section-wrapper1:after {
	background-color: transparent;
}

/* Homepage standings wrapper (template hardcodes white on .form-wrapper-box.style-1) */
[data-theme="dark"] .form-wrapper-box.style-1 {
	background-color: var(--card-bg, #161b22) !important;
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4) !important;
}

[data-theme="dark"] .form-wrapper-box.style-1 .section-head p {
	color: rgba(255, 255, 255, 0.68);
}

[data-theme="dark"] .form-wrapper-box.style-1 .dataTables_wrapper .dataTables_length,
[data-theme="dark"] .form-wrapper-box.style-1 .dataTables_wrapper .dataTables_filter,
[data-theme="dark"] .form-wrapper-box.style-1 .dataTables_wrapper .dataTables_info,
[data-theme="dark"] .form-wrapper-box.style-1 .dataTables_wrapper .dataTables_length label,
[data-theme="dark"] .form-wrapper-box.style-1 .dataTables_wrapper .dataTables_filter label {
	color: rgba(255, 255, 255, 0.88) !important;
}

[data-theme="dark"] .form-wrapper-box.style-1 .dataTables_wrapper .dataTables_length select,
[data-theme="dark"] .form-wrapper-box.style-1 .dataTables_wrapper .dataTables_filter input[type="search"],
[data-theme="dark"] .form-wrapper-box.style-1 .dataTables_wrapper .dataTables_filter input[type="text"] {
	background: var(--input-bg, #1c2330) !important;
	border: 1px solid var(--border-color, #3d4f66) !important;
	color: #e6edf3 !important;
}

/* VIP membership badge (profile, roster, etc.) */
.upl-user-badges {
	display: inline-flex;
	align-items: center;
	gap: 0.28em;
	vertical-align: middle;
	margin-left: 0.35em;
}
.upl-user-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}
.upl-user-badge__img--vip {
	width: 1.05em;
	height: 1.05em;
	object-fit: contain;
	vertical-align: middle;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.25));
}
.upl-user-badge__img {
	width: 1.15em;
	height: 1.15em;
	object-fit: contain;
	vertical-align: middle;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}
.upl-user-badge--sm .upl-user-badge__img {
	width: 16px;
	height: 16px;
}
.upl-user-badge--md .upl-user-badge__img {
	width: 18px;
	height: 18px;
}
.upl-user-badge--lg .upl-user-badge__img {
	width: 22px;
	height: 22px;
}
.upl-user-badge--xl .upl-user-badge__img {
	width: 40px;
	height: 40px;
}
.upl-user-badge--lg .upl-user-badge__img--vip,
.upl-user-badge--xl .upl-user-badge__img--vip {
	width: inherit;
	height: inherit;
}

/* Mobile menu badges — must come after --lg/--xl sizes (those were winning the cascade) */
@media (max-width: 991.98px) {
	.upl-nav-mobile-profile__badges .upl-user-badge--lg .upl-user-badge__img,
	.upl-nav-mobile-profile__badges .upl-user-badge--xl .upl-user-badge__img,
	.upl-nav-mobile-profile__badges .upl-user-badge__img {
		width: 108px !important;
		height: 108px !important;
		max-width: none;
		object-fit: contain;
		filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
	}
}

.upl-header-user {
	display: none;
}
.upl-roster-player .upl-user-badges {
	margin-left: 0.35rem;
}
.upl-vip-badge {
	font-size: 0.42em;
	vertical-align: middle;
	margin-left: 0.4em;
	letter-spacing: 0.02em;
}
.upl-vip-badge--sm {
	font-size: 0.72rem;
	margin-left: 0.25em;
}
h1 .upl-vip-badge {
	font-size: 0.38em;
}

/* Cookie consent banner */
.upl-cookie-consent {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 10050;
	padding: 0.85rem 1rem;
	background: var(--card-bg, #fff);
	border-top: 1px solid rgba(0, 51, 102, 0.15);
	box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.12);
}
[data-theme="dark"] .upl-cookie-consent {
	background: #1a2332;
	border-top-color: rgba(255, 255, 255, 0.1);
}
.upl-cookie-consent__inner {
	max-width: 1100px;
	margin: 0 auto;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem 1rem;
}
.upl-cookie-consent__text {
	margin: 0;
	font-size: 0.88rem;
	line-height: 1.45;
	color: var(--bs-body-color, #333);
	flex: 1 1 280px;
}
.upl-cookie-consent__text a {
	text-decoration: underline;
}
.upl-cookie-consent__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	flex-shrink: 0;
}
