/* Theme */
:root {
	--mw-bg: #f6f7fb;
	--mw-card-bg: #ffffff;
	--mw-text: #1f2937;
	--mw-muted: #6b7280;
	--mw-border: rgba(0,0,0,0.06);
	--mw-shadow: 0 8px 30px rgba(0,0,0,0.08);
	--mw-shadow-hover: 0 16px 40px rgba(0,0,0,0.12);
	--mw-radius: 16px;
}

html, body {
	height: 100%;
	margin: 0;
	overflow-x: hidden;
	max-width: 100vw;
}

body {
	display: flex;
	flex-direction: column;
	background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
	color: var(--mw-text);
	font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* Index page specific background */
body.index-page {
	background: linear-gradient(180deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
}

/* Capture page specific background - Winterland Theme */
body.capture-page {
	background: linear-gradient(180deg, #e0f2fe 0%, #bae6fd 25%, #93c5fd 50%, #dbeafe 75%, #f0f9ff 100%);
	height: 100vh;
	overflow: hidden;
	position: relative;
}

body.capture-page::before {
	content: '';
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-image: 
		radial-gradient(circle at 20% 50%, rgba(255, 255, 255, 0.3) 0%, transparent 50%),
		radial-gradient(circle at 80% 80%, rgba(255, 255, 255, 0.2) 0%, transparent 50%),
		radial-gradient(circle at 40% 20%, rgba(255, 255, 255, 0.25) 0%, transparent 50%);
	pointer-events: none;
	z-index: 0;
}

body.capture-page footer {
	flex-shrink: 0;
	background: #ffffff;
	border-top: 1px solid rgba(0,0,0,0.1);
}

.capture-main {
	flex: 1 1 auto;
	overflow-y: auto;
	overflow-x: hidden;
	min-height: 0;
	max-height: calc(100vh - 145px); /* Account for header (~80px) and footer (~80px) */
	position: relative;
	z-index: 1;
}

/* Winterland background with snowflakes */
.winterland-bg {
	position: relative;
	background: 
		linear-gradient(180deg, rgba(224, 242, 254, 0.95) 0%, rgba(186, 230, 253, 0.95) 20%, rgba(147, 197, 253, 0.95) 40%, rgba(219, 234, 254, 0.95) 60%, rgba(240, 249, 255, 0.95) 80%, rgba(255, 255, 255, 0.95) 100%),
		url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="400" height="400" viewBox="0 0 400 400"><defs><pattern id="snow" x="0" y="0" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="rgba(255,255,255,0.3)"/><circle cx="75" cy="75" r="1" fill="rgba(255,255,255,0.2)"/><circle cx="50" cy="10" r="0.8" fill="rgba(255,255,255,0.25)"/><circle cx="10" cy="60" r="0.9" fill="rgba(255,255,255,0.2)"/><circle cx="90" cy="40" r="1.1" fill="rgba(255,255,255,0.3)"/></pattern></defs><rect width="400" height="400" fill="url(%23snow)"/></svg>');
	background-size: cover, 200px 200px;
	background-position: center, 0 0;
	overflow: visible;
}

.winterland-bg::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-image: 
		radial-gradient(circle at 15% 30%, rgba(255, 255, 255, 0.4) 0%, transparent 40%),
		radial-gradient(circle at 85% 70%, rgba(255, 255, 255, 0.3) 0%, transparent 40%),
		radial-gradient(circle at 50% 10%, rgba(255, 255, 255, 0.35) 0%, transparent 40%),
		radial-gradient(circle at 25% 80%, rgba(255, 255, 255, 0.25) 0%, transparent 40%),
		radial-gradient(circle at 75% 40%, rgba(255, 255, 255, 0.3) 0%, transparent 40%);
	pointer-events: none;
	z-index: 0;
	animation: winterShimmer 8s ease-in-out infinite;
}

/* Snowflakes animation */
.snowflakes {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100vh;
	pointer-events: none;
	z-index: 0;
	overflow: visible;
}

.snowflake {
	position: absolute;
	top: -50px;
	color: rgba(255, 255, 255, 1);
	font-size: 1.5em;
	font-family: Arial, sans-serif;
	animation: snowfall linear infinite;
	pointer-events: none;
	font-weight: bold;
}

/* Faster snowflake animations - reduced duration by 40-50% */
.snowflake:nth-child(1) {
	left: 5%;
	animation-duration: 8s;
	animation-delay: 0s;
	font-size: 1.2em;
}

.snowflake:nth-child(2) {
	left: 10%;
	animation-duration: 10s;
	animation-delay: 0.5s;
	font-size: 1.5em;
}

.snowflake:nth-child(3) {
	left: 15%;
	animation-duration: 11s;
	animation-delay: 1s;
	font-size: 1.3em;
}

.snowflake:nth-child(4) {
	left: 20%;
	animation-duration: 9s;
	animation-delay: 1.5s;
	font-size: 1.4em;
}

.snowflake:nth-child(5) {
	left: 25%;
	animation-duration: 10s;
	animation-delay: 0.2s;
	font-size: 1.6em;
}

.snowflake:nth-child(6) {
	left: 30%;
	animation-duration: 9s;
	animation-delay: 1.2s;
	font-size: 1.2em;
}

.snowflake:nth-child(7) {
	left: 35%;
	animation-duration: 12s;
	animation-delay: 0.8s;
	font-size: 1.5em;
}

.snowflake:nth-child(8) {
	left: 40%;
	animation-duration: 10s;
	animation-delay: 0.4s;
	font-size: 1.3em;
}

.snowflake:nth-child(9) {
	left: 45%;
	animation-duration: 9s;
	animation-delay: 1.1s;
	font-size: 1.4em;
}

.snowflake:nth-child(10) {
	left: 50%;
	animation-duration: 11s;
	animation-delay: 0.6s;
	font-size: 1.1em;
}

.snowflake:nth-child(11) {
	left: 55%;
	animation-duration: 9s;
	animation-delay: 1.8s;
	font-size: 1.5em;
}

.snowflake:nth-child(12) {
	left: 60%;
	animation-duration: 10s;
	animation-delay: 0.15s;
	font-size: 1.3em;
}

.snowflake:nth-child(13) {
	left: 65%;
	animation-duration: 8s;
	animation-delay: 0.9s;
	font-size: 1.2em;
}

.snowflake:nth-child(14) {
	left: 70%;
	animation-duration: 11s;
	animation-delay: 0.3s;
	font-size: 1.4em;
}

.snowflake:nth-child(15) {
	left: 75%;
	animation-duration: 9s;
	animation-delay: 1.4s;
	font-size: 1.6em;
}

.snowflake:nth-child(16) {
	left: 80%;
	animation-duration: 10s;
	animation-delay: 0.7s;
	font-size: 1.3em;
}

.snowflake:nth-child(17) {
	left: 85%;
	animation-duration: 8s;
	animation-delay: 1.3s;
	font-size: 1.5em;
}

.snowflake:nth-child(18) {
	left: 90%;
	animation-duration: 11s;
	animation-delay: 0.5s;
	font-size: 1.2em;
}

.snowflake:nth-child(19) {
	left: 95%;
	animation-duration: 9s;
	animation-delay: 1.6s;
	font-size: 1.4em;
}

.snowflake:nth-child(20) {
	left: 7%;
	animation-duration: 10s;
	animation-delay: 0.8s;
	font-size: 1.3em;
}

.snowflake:nth-child(21) {
	left: 17%;
	animation-duration: 8s;
	animation-delay: 1.7s;
	font-size: 1.1em;
}

.snowflake:nth-child(22) {
	left: 27%;
	animation-duration: 11s;
	animation-delay: 0.4s;
	font-size: 1.5em;
}

.snowflake:nth-child(23) {
	left: 37%;
	animation-duration: 9s;
	animation-delay: 1.2s;
	font-size: 1.2em;
}

.snowflake:nth-child(24) {
	left: 47%;
	animation-duration: 10s;
	animation-delay: 0.6s;
	font-size: 1.4em;
}

.snowflake:nth-child(25) {
	left: 57%;
	animation-duration: 8s;
	animation-delay: 1.5s;
	font-size: 1.3em;
}

.snowflake:nth-child(26) {
	left: 67%;
	animation-duration: 11s;
	animation-delay: 0.2s;
	font-size: 1.6em;
}

.snowflake:nth-child(27) {
	left: 77%;
	animation-duration: 9s;
	animation-delay: 1.0s;
	font-size: 1.2em;
}

.snowflake:nth-child(28) {
	left: 87%;
	animation-duration: 10s;
	animation-delay: 0.9s;
	font-size: 1.4em;
}

.snowflake:nth-child(29) {
	left: 97%;
	animation-duration: 8s;
	animation-delay: 1.3s;
	font-size: 1.3em;
}

.snowflake:nth-child(30) {
	left: 3%;
	animation-duration: 11s;
	animation-delay: 0.7s;
	font-size: 1.5em;
}

@keyframes winterShimmer {
	0%, 100% {
		opacity: 1;
		transform: translateY(0);
	}
	50% {
		opacity: 0.8;
		transform: translateY(-10px);
	}
}

@keyframes snowfall {
	0% {
		transform: translateY(-100px) translateX(0) rotate(0deg);
		opacity: 0;
	}
	5% {
		opacity: 1;
	}
	50% {
		transform: translateX(50px) rotate(180deg);
		opacity: 1;
	}
	95% {
		opacity: 1;
	}
	100% {
		transform: translateY(calc(100vh + 200px)) translateX(100px) rotate(360deg);
		opacity: 0;
	}
}

header.navbar,
nav.navbar {
	flex-shrink: 0;
	height: auto; /* Let Bootstrap handle it */
}

main.container,
main.container-fluid {
	flex: 1 0 auto; /* Takes remaining height automatically */
	min-height: 0; /* prevents overflow issues */
	overflow-y: auto; /* Allow scrolling if content is too long */
}

/* Index page - remove horizontal padding for full width gallery */
body.index-page main.container-fluid {
	padding-left: 0 !important;
	padding-right: 0 !important;
}

footer {
	flex-shrink: 0;
	border-top: 1px solid var(--mw-border);
	background: #fff;
	padding: 1rem;
	text-align: center;
	margin-top: auto; /* Push footer to bottom */
}

/*main.container,*/
/*main.container-fluid {*/
/*	min-height: calc(100vh - 72px);*/
/*}*/

/* Navbar glass look */
.navbar {
    backdrop-filter: saturate(180%) blur(8px);
    border-bottom: 1px solid var(--mw-border);
    position: sticky;
    top: 0;
    z-index: 2000;
}

/* Ensure dropdown overlays cards/images */
.dropdown-menu { z-index: 2050; }

/* Gallery */
.gallery-grid {
	max-width: 100%;
	margin-left: auto;
	margin-right: auto;
	padding-left: 0.5rem;
	padding-right: 0.5rem;
}
.gallery-grid .row {
	margin-left: auto;
	margin-right: auto;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	width: 100%;
}
.gallery-grid .grid-item {
	margin: 0 0.1rem;
	box-sizing: border-box;
	padding: 0;
}

/* 7 images per row layout - maximum width usage */
.col-7-images {
	flex: 0 0 auto;
	width: calc((100% - 1.4rem) / 7); /* 7 items with minimal 0.1rem margin each side = 1.4rem total */
	max-width: calc((100% - 1.4rem) / 7);
}

/* Responsive adjustments for 7 images layout */
@media (max-width: 1400px) {
	.col-7-images {
		width: calc((100% - 1.2rem) / 6); /* 6 per row */
		max-width: calc((100% - 1.2rem) / 6);
	}
}

@media (max-width: 1200px) {
	.col-7-images {
		width: calc((100% - 1rem) / 5); /* 5 per row */
		max-width: calc((100% - 1rem) / 5);
	}
}

@media (max-width: 992px) {
	.col-7-images {
		width: calc((100% - 0.8rem) / 4); /* 4 per row */
		max-width: calc((100% - 0.8rem) / 4);
	}
}

@media (max-width: 768px) {
	.col-7-images {
		width: calc((100% - 0.6rem) / 3); /* 3 per row */
		max-width: calc((100% - 0.6rem) / 3);
	}
}

@media (max-width: 576px) {
	.col-7-images {
		width: calc((100% - 0.4rem) / 2); /* 2 per row */
		max-width: calc((100% - 0.4rem) / 2);
	}
}

.card {
	border-radius: var(--mw-radius);
	border: 1px solid var(--mw-border);
	background: var(--mw-card-bg);
	box-shadow: var(--mw-shadow);
	transition: transform 180ms ease, box-shadow 180ms ease;
	position: relative;
	overflow: hidden;
	width: 100%;
}

/* Enhanced card hover effect for gallery */
.gallery-grid .card {
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
	border: 2px solid rgba(255, 255, 255, 0.8);
	padding: 2px;
	margin: 0;
	width: 100%;
	max-width: 100%;
	position: relative;
	transition: none; /* No transform/scale transitions on hover */
}

/* Overlay for dull effect on hover */
.gallery-grid .image-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0);
	transition: background 0.3s ease;
	z-index: 3;
	pointer-events: none;
	border-radius: calc(var(--mw-radius) - 1px);
}

/* Dull overlay effect on hover - no popup/transform, just overlay */
.gallery-grid .card:hover .image-card::before {
	background: rgba(0, 0, 0, 0.4);
}

/* Additional dim effect on image itself */
.gallery-grid .card:hover .card-img {
	filter: brightness(0.7);
}

.cardAdmin {
	border-radius: var(--mw-radius);
	border: 1px solid var(--mw-border);
	background: var(--mw-card-bg);
	box-shadow: var(--mw-shadow);
	position: relative;
}

/* Admin page specific - cardAdmin padding */
.admin-page .cardAdmin {
	padding-bottom: 1rem !important;
}

/* Card hover moved to gallery specific section */
.card-img {
	width: 100%;
	height: auto;
	object-fit: cover;
	border-radius: calc(var(--mw-radius) - 1px);
	opacity: 0;
	transform: scale(0.98);
	filter: blur(2px);
	transition: opacity 400ms ease, transform 400ms ease, filter 400ms ease, brightness 0.3s ease;
	position: relative;
	z-index: 2;
	display: block;
	vertical-align: top;
}
.card-img.loaded { 
	opacity: 1; 
	transform: scale(1); 
	filter: blur(0); 
}

/* Skeleton loader for image cards */
.image-card {
	position: relative;
	background: #f3f4f6;
	padding: 0;
	display: block;
	width: 100%;
	line-height: 0;
}

.image-card.loading {
	min-height: 200px;
}

.image-card .card-img {
	width: 100%;
	height: auto;
	display: block;
	object-fit: cover;
	vertical-align: top;
}

.skeleton-loader {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, #f3f4f6 25%, #e5e7eb 50%, #f3f4f6 75%);
	background-size: 200% 100%;
	animation: skeleton-loading 1.5s ease-in-out infinite;
	z-index: 1;
	border-radius: var(--mw-radius);
}

.image-card .card-img.loaded ~ .skeleton-loader,
.image-card:not(.loading) .skeleton-loader {
	opacity: 0;
	transition: opacity 300ms ease;
	pointer-events: none;
}

@keyframes skeleton-loading {
	0% {
		background-position: 200% 0;
	}
	100% {
		background-position: -200% 0;
	}
}

/* Per-card spinner while image loads - removed, using skeleton instead */
.card.loading::after {
	display: none;
}

@keyframes mw-spin { to { transform: rotate(360deg); } }

/* Gallery overlay loader while layout initializes */
.grid-overlay-wrap { position: relative; }
.grid-overlay-loader {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	width: 100vw;
	height: 100vh;
	background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(255,255,255,0.85));
	backdrop-filter: blur(4px);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9999;
	opacity: 1;
	transition: opacity 500ms ease, visibility 500ms ease;
}
.grid-overlay-loader.hidden { 
	opacity: 0; 
	pointer-events: none;
	visibility: hidden;
}
.grid-overlay-loader .loader-content {
	text-align: center;
}
.grid-overlay-loader .spinner {
	display: none;
}
.grid-overlay-loader .loading-text {
	font-size: 1.25rem;
	color: #4b5563;
	margin: 0;
}
.grid-overlay-loader .loading-dots {
	display: inline-block;
	margin-left: 3px;
}
.grid-overlay-loader .loading-dots span {
	display: inline-block;
	opacity: 0.3;
	animation: loading-dot 1.2s ease-in-out infinite;
	font-weight: bold;
}
.grid-overlay-loader .loading-dots span:nth-child(1) {
	animation-delay: 0s;
}
.grid-overlay-loader .loading-dots span:nth-child(2) {
	animation-delay: 0.2s;
}
.grid-overlay-loader .loading-dots span:nth-child(3) {
	animation-delay: 0.4s;
}
@keyframes loading-dot {
	0% {
		opacity: 0.3;
		transform: translateY(0px);
	}
	50% {
		opacity: 1;
		transform: translateY(-8px);
	}
	100% {
		opacity: 0.3;
		transform: translateY(0px);
	}
}
.card-body .card-title {
	font-weight: 600;
}
.card-body .small { color: var(--mw-muted); }

/* QR Floating */
.qr-floating {
	position: fixed;
	left: 20px;
	bottom: 20px;
	z-index: 1050;
	text-decoration: none;
	background: linear-gradient(135deg, #ffffff, #f8fafc);
	border-radius: 20px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(99, 102, 241, 0.1);
	padding: 16px;
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	border: 2px solid rgba(99, 102, 241, 0.2);
	transition: all 0.3s ease;
	animation: qrFloat 3s ease-in-out infinite;
	backdrop-filter: blur(10px);
}

.qr-floating:hover {
	transform: translateY(-5px) scale(1.05);
	box-shadow: 0 15px 50px rgba(99, 102, 241, 0.3), 0 0 0 3px rgba(99, 102, 241, 0.1);
	border-color: rgba(99, 102, 241, 0.4);
	background: linear-gradient(135deg, #ffffff, #f0f4ff);
}

.qr-badge {
	position: absolute;
	top: -8px;
	right: -8px;
	width: 32px;
	height: 32px;
	background: linear-gradient(135deg, #6366f1, #8b5cf6);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: white;
	box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
	animation: qrPulse 2s ease-in-out infinite;
}

.qr-image-wrapper {
	position: relative;
	border-radius: 12px;
	overflow: hidden;
	background: white;
	padding: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	transition: transform 0.3s ease;
}

.qr-floating:hover .qr-image-wrapper {
	transform: scale(1.02);
}

.qr-image-wrapper img {
	display: block;
	border-radius: 8px;
	width: 160px;
	height: 160px;
}

.qr-caption {
	font-size: 11px;
	font-weight: 600;
	color: #4b5563;
	margin-top: 10px;
	display: flex;
	align-items: center;
	text-align: center;
	letter-spacing: 0.3px;
}

.qr-floating:hover .qr-caption {
	color: #6366f1;
}

@keyframes qrFloat {
	0%, 100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-10px);
	}
}

@keyframes qrPulse {
	0%, 100% {
		transform: scale(1);
		opacity: 1;
	}
	50% {
		transform: scale(1.1);
		opacity: 0.9;
	}
}

/* Index page admin button hover */
.index-admin-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0,0,0,0.25) !important;
	background: #ffffff !important;
}

/* Language Switcher */
.lang-switcher {
	position: relative;
	background: rgba(255,255,255,0.2);
	border-radius: 12px;
	padding: 0.25rem;
	backdrop-filter: blur(10px);
	border: 1px solid rgba(255,255,255,0.3);
}

.lang-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4rem;
	padding: 0.5rem 1rem;
	border-radius: 8px;
	text-decoration: none;
	color: rgba(255,255,255,0.8);
	font-weight: 500;
	font-size: 0.875rem;
	transition: all 0.3s ease;
	cursor: pointer;
	min-width: 65px;
}

.lang-btn.active {
	background: rgba(255,255,255,0.3);
	color: #ffffff;
	font-weight: 600;
}

.lang-btn:hover {
	background: rgba(255,255,255,0.35) !important;
	color: #ffffff !important;
	transform: scale(1.05);
}

.lang-flag {
	font-size: 1rem;
	line-height: 1;
}

.lang-text {
	font-size: 0.875rem;
	letter-spacing: 0.5px;
}

.nav-lang-switcher {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-shrink: 0;
}

.nav-lang-switcher .lang-switcher {
	display: inline-flex;
	align-items: center;
	gap: 0.2rem;
}

.nav-lang-switcher .lang-btn {
	padding: 0.25rem 0.4rem;
	font-size: 0.7rem;
	min-width: 36px;
}

.nav-lang-switcher .lang-text {
	font-size: 0.7rem;
}

@media (max-width: 576px) {
	.nav-lang-switcher {
		gap: 0.5rem;
	}

	.nav-lang-switcher .lang-btn {
		padding: 0.2rem 0.35rem;
		min-width: 32px;
	}

	.nav-lang-switcher .lang-text {
		font-size: 0.65rem;
	}
}

@media (min-width: 768px) {
	.nav-lang-switcher .lang-switcher {
		gap: 0.5rem;
	}

	.nav-lang-switcher .lang-btn {
		padding: 0.4rem 0.6rem;
		font-size: 0.875rem;
		min-width: 48px;
	}

	.nav-lang-switcher .lang-text {
		font-size: 0.875rem;
	}
}

/* For capture page with different background */
body:not(.index-page) .lang-switcher {
	background: rgba(255,255,255,0.9) !important;
	border: 1px solid rgba(0,0,0,0.1) !important;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

body:not(.index-page) .lang-btn {
	color: #6b7280 !important;
}

body:not(.index-page) .lang-btn.active {
	background: linear-gradient(135deg, #6366f1, #8b5cf6) !important;
	color: #ffffff !important;
}

body:not(.index-page) .lang-btn:hover {
	background: rgba(99, 102, 241, 0.1) !important;
	color: #6366f1 !important;
}

body:not(.index-page) .lang-btn.active:hover {
	background: linear-gradient(135deg, #7c3aed, #9f7aea) !important;
	color: #ffffff !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
	.qr-floating {
		left: 16px;
		bottom: 16px;
		padding: 12px;
	}
	
	.qr-image-wrapper img {
		width: 120px;
		height: 120px;
	}
	
	.qr-caption {
		font-size: 10px;
	}
	
	.qr-badge {
		width: 28px;
		height: 28px;
		top: -6px;
		right: -6px;
	}
	
	.index-page main .display-5 {
		font-size: 2rem !important;
	}
}

/* Capture form */
.container .card.shadow-sm {
	border-radius: var(--mw-radius);
	box-shadow: var(--mw-shadow);
}

/* Responsive adjustments for capture page */
@media (max-width: 768px) {
	main.container-fluid {
		padding-left: 0.75rem;
		padding-right: 0.75rem;
	}
	
	.card-body {
		padding: 1rem;
	}
}
.form-control:focus, .btn:focus {
	box-shadow: 0 0 0 0.2rem rgba(99,102,241,.15);
}
.btn-primary {
	background: linear-gradient(135deg, #6366f1, #8b5cf6);
	border: none;
}
.btn-primary:hover {
	filter: brightness(1.05);
}

/* Admin page styling */
body.admin-page {
	background: linear-gradient(180deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
}

.admin-sidebar {
	background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
	border-right: 1px solid rgba(0,0,0,0.1);
	box-shadow: 2px 0 10px rgba(0,0,0,0.05);
	overflow-x: hidden;
	overflow-y: auto;
	flex-shrink: 0;
}

.sidebar-header {
	border-bottom: 1px solid rgba(0,0,0,0.1);
	background: rgba(255,255,255,0.8);
}

.sidebar-nav {
	padding: 0.5rem;
}

.nav-item {
	display: flex;
	align-items: center;
	padding: 0.75rem 1rem;
	margin: 0.25rem 0;
	border-radius: 10px;
	color: #6b7280;
	text-decoration: none;
	font-weight: 500;
	transition: all 0.3s ease;
}

.nav-item:hover {
	background: rgba(102, 126, 234, 0.1);
	color: #667eea;
	transform: translateX(4px);
}

.nav-item.active {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: #ffffff;
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.admin-header {
	backdrop-filter: blur(10px);
}

body.admin-page {
	overflow-x: hidden;
}

body.admin-page > div.d-flex {
	overflow-x: hidden;
}

/* Admin table */
table.dataTable tbody tr {
	transition: background-color 0.2s ease;
}

table.dataTable tbody tr:hover {
	background-color: rgba(102, 126, 234, 0.05) !important;
	/* Removed transform scale to prevent UI disturbance */
}

/* Exclude action column from hover effect */
table.dataTable tbody tr:hover td:last-child {
	background-color: transparent !important;
}

/* Prevent dropdown from being affected by row hover */
table.dataTable tbody tr .dropdown {
	position: relative;
	z-index: 1000;
	pointer-events: auto;
}

table.dataTable tbody tr .dropdown-menu {
	z-index: 1050;
	position: absolute;
	pointer-events: auto;
}

table.dataTable tbody tr:hover .dropdown {
	z-index: 1051;
}

/* Ensure dropdown button stays fixed */
table.dataTable tbody tr .dropdown-toggle {
	pointer-events: auto;
	position: relative;
	z-index: 1001;
}

/* Ensure action buttons work even in rows with hide class or other styling */
table.dataTable tbody tr .action-buttons-wrapper,
table.dataTable tbody tr .action-btn {
	position: relative;
	z-index: 1001 !important;
	pointer-events: auto !important;
}

/* Override any potential pointer-events: none on rows */
table.dataTable tbody tr[class*="hide"] .action-buttons-wrapper,
table.dataTable tbody tr[class*="hide"] .action-btn {
	pointer-events: auto !important;
	z-index: 1001 !important;
}

.admin-footer {
	position: relative;
	z-index: 1;
	margin-top: auto;
}

.admin-footer a:hover {
	color: #667eea !important;
}

/* Admin dropdown styling */
.admin-page .dropdown-menu {
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	box-shadow: 0 10px 40px rgba(0,0,0,0.15);
	padding: 0.5rem;
	margin-top: 0.5rem;
}

.admin-page .dropdown-item {
	border-radius: 8px;
	padding: 0.5rem 1rem;
	transition: all 0.2s ease;
}

.admin-page .dropdown-item:hover {
	background: rgba(102, 126, 234, 0.1);
	color: #667eea;
}

.admin-page .dropdown-item.text-danger:hover {
	background: rgba(239, 68, 68, 0.1);
	color: #dc2626;
}

.admin-page .dropdown-toggle::after {
	margin-left: 0.5rem;
}

.admin-page .btn-outline-secondary {
	background: #ffffff !important;
	border-color: #e5e7eb !important;
	color: #374151 !important;
}

.admin-page .btn-outline-secondary:hover {
	background: #f9fafb !important;
	border-color: #d1d5db !important;
	color: #1f2937 !important;
}

.table-container {
	overflow-y: auto;
}

/* Login page styling */
body.login-page {
	background: linear-gradient(180deg, #ffffff 0%, #f8fafc 50%, #f1f5f9 100%);
	overflow-x: hidden;
}

.login-container {
	padding: 2rem 1rem;
}

.login-card {
	animation: fadeInUp 0.5s ease;
}

.login-header {
	backdrop-filter: blur(10px);
}

.input-wrapper {
	position: relative;
}

.input-icon {
	position: absolute;
	left: 0.875rem;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
	z-index: 1;
}

.login-input:focus {
	border-color: #667eea !important;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1) !important;
}

.login-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5) !important;
}

.login-btn:active {
	transform: translateY(0);
}

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Admin page specific - table container should use flexbox */
.admin-page .cardAdmin .table-container {
	height: 100%;
	margin-bottom: 0;
}

/* Sticky pagination for DataTable */
.admin-page .table-container {
	display: flex;
	flex-direction: column;
	position: relative;
	overflow-x: auto !important;
	overflow-y: auto;
	min-width: 0;
}

.admin-page .dataTables_wrapper {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
	min-width: 0;
	width: 100%;
}

.dataTables_scroll {
	width: 100%;
	overflow-x: auto !important;
}

.dataTables_scrollBody {
	max-height: calc(100vh - 400px);
	overflow-y: auto !important;
	overflow-x: auto !important;
}

.dataTables_wrapper table {
	width: 100% !important;
	max-width: 100%;
	min-width: 800px;
}

.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
	margin-bottom: 1rem;
}

.dataTables_wrapper .row:last-child {
	position: relative;
	background: #ffffff;
	z-index: 10;
	margin: 0;
	padding: 1rem 0;
	border-top: 1px solid #f1f5f9;
	box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
	flex-shrink: 0;
	min-width: 800px;
}

.dataTables_wrapper .dataTables_info {
	padding: 0.5rem 0;
	color: #6b7280;
	font-size: 0.9rem;
}

.dataTables_wrapper .dataTables_paginate {
	margin: 0;
}

.dataTables_wrapper .dataTables_paginate .pagination {
	margin: 0;
	justify-content: center;
}

.dataTables_wrapper .dataTables_paginate .page-link {
	color: #667eea;
	border-color: #e5e7eb;
	padding: 0.5rem 0.75rem;
	transition: all 0.3s ease;
}

.dataTables_wrapper .dataTables_paginate .page-link:hover {
	background-color: rgba(102, 126, 234, 0.1);
	border-color: #667eea;
	color: #667eea;
}

.dataTables_wrapper .dataTables_paginate .page-item.active .page-link {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border-color: #667eea;
	color: #ffffff;
}

