/* PREMIUM MODERN STYLESHEET - PLO System */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
	--primary: #991b1b;
	--primary-hover: #7f1d1d;
	--primary-light: #fef2f2;
	--accent: #2563eb;
	--accent-hover: #1d4ed8;
	--success: #059669;
	--danger: #dc2626;
	--warning: #d97706;
	
	--bg-body: #f8fafc;
	--card-bg: rgba(255, 255, 255, 0.92);
	--card-border: rgba(226, 232, 240, 0.8);
	
	--text-main: #0f172a;
	--text-muted: #475569;
	--text-light: #94a3b8;
	
	--radius-sm: 6px;
	--radius-md: 12px;
	--radius-lg: 20px;
	
	--shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.02);
	--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -1px rgba(0, 0, 0, 0.04);
	--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
	--transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
	
	--input-bg: #ffffff;
	--table-row-bg: #ffffff;
	--controls-bg: rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] {
	--bg-body: #0b0f19;
	--card-bg: rgba(20, 26, 45, 0.92);
	--card-border: rgba(51, 65, 85, 0.4);
	
	--text-main: #f8fafc;
	--text-muted: #cbd5e1;
	--text-light: #64748b;
	
	--primary-light: #2d0a0a;
	--input-bg: #1e293b;
	--table-row-bg: #111827;
	--controls-bg: rgba(15, 23, 42, 0.9);
}

/* Campaign logo background for darkmode compatibility */
[data-theme="dark"] img[src$="iloveyudark.png"] {
	background-color: #ffffff !important;
	padding: 5px 8px;
	border-radius: var(--radius-sm);
}

/* Base resets & updates */
* {
	box-sizing: border-box;
}

html {
  margin: 0;
  padding: 0;
}

body {
	min-height: 100vh;
	font-family: 'Outfit', sans-serif !important;
	background: var(--bg-body) !important;
	color: var(--text-main);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
	display: flex;
	flex-direction: column;	
}

.main-content {
  flex: 1;
  margin-top:-30px !important;
}

h1, h2, h3, h4, h5, h6, b, th {
	font-weight: 600;
}

/* Transparent container structure */
.container, .container-fluid {
	padding-top: 20px;
	padding-bottom: 20px;
}

/* Card glassmorphism wrapper */
.card-glass {
	background: var(--card-bg);
	backdrop-filter: blur(10px);
	border: 1px solid var(--card-border);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-md);
	padding: 24px;
	margin-bottom: 24px;
	transition: var(--transition);
}

.card-glass:hover {
	box-shadow: var(--shadow-lg);
}

/* Inputs & Form styling */
input[type="text"], 
input[type="password"], 
select, 
textarea {
	width: 100%;
	padding: 10px 16px;
	font-size: 14px;
	border-radius: var(--radius-sm);
	border: 1px solid var(--card-border);
	background-color: var(--input-bg) !important;
	color: var(--text-main) !important;
	transition: var(--transition);
	outline: none;
}

input[type="text"]:focus, 
input[type="password"]:focus, 
select:focus, 
textarea:focus {
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(153, 27, 27, 0.15);
}

/* Custom Buttons styling */
input[type="submit"],
input[type="button"],
.btn-modern {
	background-color: var(--primary);
	color: #ffffff;
	border: none;
	padding: 10px 24px;
	font-size: 14px;
	font-weight: 500;
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition: var(--transition);
	box-shadow: var(--shadow-sm);
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

input[type="submit"]:hover,
input[type="button"]:hover,
.btn-modern:hover {
	background-color: var(--primary-hover);
	transform: translateY(-1px);
	box-shadow: var(--shadow-md);
}

input[type="submit"]:active,
input[type="button"]:active,
.btn-modern:active {
	transform: translateY(0);
}

/* Table styling updates */
table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	border-radius: var(--radius-md);
	overflow: hidden;
	border: 1px solid var(--card-border);
	box-shadow: var(--shadow-sm);
	margin-bottom: 24px;
}

th {
	background: var(--primary) !important;
	color: #ffffff !important;
	font-size: 14px;
	font-weight: 600;
	padding: 14px 16px !important;
	border-bottom: 2px solid var(--primary-hover) !important;
}

td {
	padding: 12px 16px !important;
	font-size: 14px !important;
	background: var(--table-row-bg) !important;
	border-bottom: 1px solid var(--card-border) !important;
	color: var(--text-main) !important;
}

tr:last-child td {
	border-bottom: none !important;
}

tr:hover td {
	background-color: var(--primary-light) !important;
	color: var(--primary) !important;
	cursor: pointer;
}

/* Tomb / Voter Card Grid - 4 Columns on desktop */
#thumbnails, .tomb-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr) !important;
	gap: 20px !important;
	padding: 10px 0 !important;
}

@media (max-width: 1200px) {
	#thumbnails, .tomb-grid {
		grid-template-columns: repeat(3, 1fr) !important;
	}
}

@media (max-width: 768px) {
	#thumbnails, .tomb-grid {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

@media (max-width: 480px) {
	#thumbnails, .tomb-grid {
		grid-template-columns: 1fr !important;
	}
}

/* Hide legacy clearing/spacing divs in the grid */
#thumbnails .tomb[style*="transparent"],
.tomb-grid .tomb[style*="transparent"],
#thumbnails .tomb[style*="border:0"],
.tomb-grid .tomb[style*="border:0"],
#thumbnails .tomb[style*="border: 0"],
.tomb-grid .tomb[style*="border: 0"],
#thumbnails #hr,
.tomb-grid #hr,
#thumbnails div[style*="padding:"],
.tomb-grid div[style*="padding:"],
#thumbnails div[style*="99.3%"],
.tomb-grid div[style*="99.3%"],
#thumbnails div[style*="width: 99.3%"],
.tomb-grid div[style*="width: 99.3%"] {
	--card-border: rgba(51, 65, 85, 0.4);
	
	--text-main: #f8fafc;
	--text-muted: #cbd5e1;
	--text-light: #64748b;
	
	--primary-light: #2d0a0a;
	--input-bg: #1e293b;
	--table-row-bg: #111827;
	--controls-bg: rgba(15, 23, 42, 0.9);
}

/* Campaign logo background for darkmode compatibility */
[data-theme="dark"] img[src$="iloveyudark.png"] {
	background-color: #ffffff !important;
	padding: 5px 8px;
	border-radius: var(--radius-sm);
}

/* Base resets & updates */
* {
	box-sizing: border-box;
}

body {
	font-family: 'Outfit', sans-serif !important;
	background: var(--bg-body) !important;
	color: var(--text-main);
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, b, th {
	font-weight: 600;
}

/* Transparent container structure */
.container, .container-fluid {
	padding-top: 20px;
	padding-bottom: 20px;
}

/* Card glassmorphism wrapper */
.card-glass {
	background: var(--card-bg);
	backdrop-filter: blur(10px);
	border: 1px solid var(--card-border);
	border-radius: var(--radius-md);
	box-shadow: var(--shadow-md);
	padding: 24px;
	margin-bottom: 24px;
	transition: var(--transition);
}

.card-glass:hover {
	box-shadow: var(--shadow-lg);
}

/* Inputs & Form styling */
input[type="text"], 
input[type="password"], 
select, 
textarea {
	width: 100%;
	padding: 10px 16px;
	font-size: 14px;
	border-radius: var(--radius-sm);
	border: 1px solid var(--card-border);
	background-color: var(--input-bg) !important;
	color: var(--text-main) !important;
	transition: var(--transition);
	outline: none;
}

input[type="text"]:focus, 
input[type="password"]:focus, 
select:focus, 
textarea:focus {
	border-color: var(--primary);
	box-shadow: 0 0 0 3px rgba(153, 27, 27, 0.15);
}

/* Custom Buttons styling */
input[type="submit"],
input[type="button"],
.btn-modern {
	background-color: var(--primary);
	color: #ffffff;
	border: none;
	padding: 10px 24px;
	font-size: 14px;
	font-weight: 500;
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition: var(--transition);
	box-shadow: var(--shadow-sm);
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

input[type="submit"]:hover,
input[type="button"]:hover,
.btn-modern:hover {
	background-color: var(--primary-hover);
	transform: translateY(-1px);
	box-shadow: var(--shadow-md);
}

input[type="submit"]:active,
input[type="button"]:active,
.btn-modern:active {
	transform: translateY(0);
}

/* Table styling updates */
table {
	width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	border-radius: var(--radius-md);
	overflow: hidden;
	border: 1px solid var(--card-border);
	box-shadow: var(--shadow-sm);
	margin-bottom: 24px;
}

th {
	background: var(--primary) !important;
	color: #ffffff !important;
	font-size: 14px;
	font-weight: 600;
	padding: 14px 16px !important;
	border-bottom: 2px solid var(--primary-hover) !important;
}

td {
	padding: 12px 16px !important;
	font-size: 14px !important;
	background: var(--table-row-bg) !important;
	border-bottom: 1px solid var(--card-border) !important;
	color: var(--text-main) !important;
}

tr:last-child td {
	border-bottom: none !important;
}

tr:hover td {
	background-color: var(--primary-light) !important;
	color: var(--primary) !important;
	cursor: pointer;
}

/* Tomb / Voter Card Grid - 4 Columns on desktop */
#thumbnails, .tomb-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr) !important;
	gap: 20px !important;
	padding: 10px 0 !important;
}

@media (max-width: 1200px) {
	#thumbnails, .tomb-grid {
		grid-template-columns: repeat(3, 1fr) !important;
	}
}

@media (max-width: 768px) {
	#thumbnails, .tomb-grid {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

@media (max-width: 480px) {
	#thumbnails, .tomb-grid {
		grid-template-columns: 1fr !important;
	}
}

/* Hide legacy clearing/spacing divs in the grid */
#thumbnails .tomb[style*="transparent"],
.tomb-grid .tomb[style*="transparent"],
#thumbnails .tomb[style*="border:0"],
.tomb-grid .tomb[style*="border:0"],
#thumbnails .tomb[style*="border: 0"],
.tomb-grid .tomb[style*="border: 0"],
#thumbnails #hr,
.tomb-grid #hr,
#thumbnails div[style*="padding:"],
.tomb-grid div[style*="padding:"],
#thumbnails div[style*="99.3%"],
.tomb-grid div[style*="99.3%"],
#thumbnails div[style*="width: 99.3%"],
.tomb-grid div[style*="width: 99.3%"] {
	display: none !important;
}

.tomb {
	overflow: visible !important;
	position: relative !important;
	display: flex;
	flex-direction: column;
	background: var(--card-bg) !important;
	border: 1px solid var(--card-border) !important;
	border-radius: var(--radius-md) !important;
	padding: 16px !important;
	box-shadow: var(--shadow-sm) !important;
	transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
	width: 100% !important;
}

.tomb:hover {
	transform: translateY(-8px) scale(1.02) !important;
	box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12) !important;
	border-color: var(--primary) !important;
}

/* Modern Hover Actions for Tomb Cards Controls */
#thumbnails .tomb [id^="div_controls_"],
.tomb-grid .tomb [id^="div_controls_"],
.tomb .tomb-controls,
#thumbnails .tomb [id^="div_browse_"],
.tomb-grid .tomb [id^="div_browse_"] {
	position: absolute !important;
	bottom: 12px !important;
	left: 16px !important;
	right: 16px !important;
	display: flex !important;
	gap: 8px !important;
	background: var(--controls-bg) !important;
	backdrop-filter: blur(8px) !important;
	-webkit-backdrop-filter: blur(8px) !important;
	border-radius: var(--radius-sm) !important;
	padding: 6px !important;
	box-shadow: var(--shadow-md) !important;
	opacity: 0 !important;
	visibility: visible !important; /* Override inline hidden state */
	transform: translateY(10px) !important;
	transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
	pointer-events: none !important;
	z-index: 10 !important;
}

/* Hover active state for controls */
#thumbnails .tomb:hover [id^="div_controls_"],
.tomb-grid .tomb:hover [id^="div_controls_"],
.tomb:hover .tomb-controls,
#thumbnails .tomb:hover [id^="div_browse_"],
.tomb-grid .tomb:hover [id^="div_browse_"] {
	opacity: 1 !important;
	transform: translateY(0) !important;
	pointer-events: auto !important;
}

.tomb img:not([style*="width:"]):not([style*="width :"]) {
	width: 100% !important;
	height: 200px !important;
	object-fit: cover !important;
	border-radius: var(--radius-sm) !important;
	margin-bottom: 12px;
	transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.tomb:hover img:not([style*="width:"]):not([style*="width :"]) {
	transform: scale(1.03) !important;
}

/* Slide Container styling updates */
#slidecontainer {
	display: flex;
	transition: transform 0.5s ease-in-out;
}

.slider-wrapper {
	border: 6px solid var(--primary);
	border-radius: var(--radius-md);
	overflow: hidden;
	box-shadow: var(--shadow-lg);
	max-width: 100%;
}

/* Top control header & sticky controls below fixed navbar (60px) */
#t_controls,
#d_controls,
.controls,
#trcontrols-card,
.sticky-controls,
.controls-header {
	position: sticky !important;
	top: 60px !important;
	z-index: 990 !important;
	background: var(--controls-bg) !important;
	backdrop-filter: blur(12px) !important;
	-webkit-backdrop-filter: blur(12px) !important;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12) !important;
	border-bottom: 1px solid var(--card-border) !important;
	border-radius: var(--radius-md) !important;
	padding: 16px 16px 0 16px;
	margin-bottom: 20px;
	transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease !important;
}

[data-theme="dark"] #t_controls,
[data-theme="dark"] #d_controls,
[data-theme="dark"] .controls,
[data-theme="dark"] #trcontrols-card,
[data-theme="dark"] .sticky-controls,
[data-theme="dark"] .controls-header {
	background: rgba(15, 23, 42, 0.95) !important;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4) !important;
}


/* Alert Styling */
.alert-custom {
	background-color: #fee2e2;
	border: 1px solid #fecaca;
	color: #991b1b;
	padding: 12px 16px;
	border-radius: var(--radius-sm);
	margin-bottom: 16px;
	font-weight: 500;
}

/* Utility layout classes */
.flex-center {
	display: flex;
	align-items: center;
	justify-content: center;
}

.space-y-4 > * + * {
	margin-top: 16px;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}
::-webkit-scrollbar-track {
	background: #f1f5f9;
}
::-webkit-scrollbar-thumb {
	background: #cbd5e1;
	border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
	background: #94a3b8;
}

.status-indicator {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
}

.status-dot {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	display: inline-block;
}

.status-dot.blue {
	background-color: #3b82f6 !important;
	box-shadow: 0 0 8px rgba(59, 130, 246, 0.6);
}

.status-dot.green {
	background-color: #10b981 !important;
	box-shadow: 0 0 8px rgba(16, 185, 129, 0.6);
}

.status-dot.orange {
	background-color: #f97316 !important;
	box-shadow: 0 0 8px rgba(249, 115, 22, 0.6);
}

.status-dot.red {
	background-color: #ef4444 !important;
	box-shadow: 0 0 8px rgba(239, 68, 68, 0.6);
}

/* Container width standardizer - overrides inline style="width:1000px" to match mcelist.php Bootstrap container */
div[style*="width:1000px" i],
div[style*="width: 1000px" i],
table[style*="width:1000px" i],
table[style*="width: 1000px" i] {
	width: 100% !important;
	max-width: 1320px !important;
	margin-left: auto !important;
	margin-right: auto !important;
	padding-left: 1.5rem !important;
	padding-right: 1.5rem !important;
}

/* Card Photo Container & Change Photo Hover Action */
.tomb-img-container {
	position: relative;
	width: 100%;
	height: 200px;
	overflow: hidden;
	border-radius: var(--radius-sm);
	cursor: pointer;
}
.tomb-img-container img {
	width: 100% !important;
	height: 100% !important;
	object-fit: cover !important;
	transition: transform 0.4s ease;
}
.tomb-img-container:hover img {
	transform: scale(1.05);
}
.tomb-img-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	color: #ffffff;
	opacity: 0;
	transition: opacity 0.3s ease;
	font-weight: 600;
	font-size: 13px;
	border-radius: var(--radius-sm);
	gap: 6px;
}
.tomb-img-container:hover .tomb-img-overlay {
	opacity: 1;
}
.tomb-img-overlay i {
	font-size: 20px;
}

/* ==========================================
   GLOBAL PRINT STYLES (@media print)
   Excludes menu, t_controls, footer, buttons, etc.
   ========================================== */
@media print {
	/* Hide Navigation Menu & Top Header Spacers */
	#cssmenu-wrapper,
	#cssmenu-container,
	#cssmenu,
	nav,
	.theme-toggle-btn,
	.menu-toggle-btn,
	.header-right-controls,
	div[style*="margin-top: 80px"],
	div[style*="margin-top:80px"],
	div[style*="margin-top: 60px"],
	div[style*="margin-top:60px"] {
		display: none !important;
	}

	/* Hide Controls, Search Forms, & Filters */
	#t_controls,
	#d_controls,
	.controls,
	#trcontrols-card,
	.sticky-controls,
	.controls-header,
	#searchForm,
	.sr-filter-row,
	.sr-hero,
	.kpi-grid,
	.charts-row,
	.no-print,
	.hid-column,
	#spacer,
	.spacer,
	.pagination-wrapper,
	.page-btn,
	#form,
	#print,
	.del {
		display: none !important;
	}

	/* Hide Form Controls, Search Inputs & Action Buttons */
	button,
	.btn,
	input[type="button"],
	input[type="submit"],
	input[type="reset"],
	input[type="text"],
	select,
	.btn-close {
		display: none !important;
	}

	/* Hide Footer & Copyright Bars */
	footer,
	.footer,
	.site-footer,
	.footer-copyright,
	div[style*="McJim Cyberworks"],
	div[style*="mcjim-server.com"] {
		display: none !important;
	}

	/* Page & Container Resets for Clean Print Layout */
	html, body {
		background: #ffffff !important;
		color: #000000 !important;
		margin: 0 !important;
		padding: 0 !important;
		box-shadow: none !important;
		min-height: auto !important;
		-webkit-print-color-adjust: exact !important;
		print-color-adjust: exact !important;
	}

	.main-content {
		margin-top: 0 !important;
		padding-top: 0 !important;
	}

	.container,
	.container-fluid,
	.card-glass {
		background: transparent !important;
		backdrop-filter: none !important;
		border: none !important;
		box-shadow: none !important;
		padding: 0 !important;
		margin: 0 !important;
		width: 100% !important;
		max-width: 100% !important;
	}

	/* Force Printable Containers Visible */
	#grid,
	#header-print,
	#header,
	#toprint,
	#other,
	.receipt-card {
		display: block !important;
		width: 100% !important;
		margin: 0 auto !important;
	}

	/* Table Print Styling */
	table {
		width: 100% !important;
		border-collapse: collapse !important;
		background: #ffffff !important;
		color: #000000 !important;
		box-shadow: none !important;
	}

	th, td {
		color: #000000 !important;
		border-color: #000000 !important;
	}
}


/* ── Summaryreport premium styles ── */
.sr-hero {
	background: linear-gradient(135deg, #7f1d1d 0%, #1e1b4b 60%, #0f172a 100%);
	border-radius: 20px;
	padding: 32px 36px;
	margin-bottom: 28px;
	position: relative;
	overflow: hidden;
}
.sr-hero::before {
	content: '';
	position: absolute;
	top: -60px; right: -60px;
	width: 240px; height: 240px;
	border-radius: 50%;
	background: rgba(255,255,255,0.04);
}
.sr-hero::after {
	content: '';
	position: absolute;
	bottom: -80px; left: -40px;
	width: 300px; height: 300px;
	border-radius: 50%;
	background: rgba(255,255,255,0.03);
}
.sr-hero-title {
	font-size: 26px;
	font-weight: 800;
	color: #fff;
	letter-spacing: 0.5px;
	margin-bottom: 4px;
}
.sr-hero-sub {
	color: rgba(255,255,255,0.6);
	font-size: 13px;
	font-weight: 400;
}
.sr-filter-row {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 20px;
}
.sr-filter-row select {
	background: rgba(255,255,255,0.12) !important;
	border: 1px solid rgba(255,255,255,0.25) !important;
	color: #fff !important;
	border-radius: 10px !important;
	padding: 10px 16px !important;
	font-size: 13px !important;
	min-width: 200px;
	cursor: pointer;
}
.sr-filter-row select option { color: #000; }
.sr-btn {
	padding: 10px 20px;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 600;
	border: none;
	cursor: pointer;
	transition: all 0.2s;
}
.sr-btn-print {
	background: rgba(255,255,255,0.18);
	color: #fff;
}
.sr-btn-print:hover { background: rgba(255,255,255,0.28); }

/* KPI Cards */
.kpi-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 16px;
	margin-bottom: 28px;
}
.kpi-card {
	background: var(--card-bg);
	border: 1px solid var(--card-border);
	border-radius: 16px;
	padding: 20px 18px;
	position: relative;
	overflow: hidden;
	transition: transform 0.2s, box-shadow 0.2s;
}
.kpi-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 12px 32px rgba(0,0,0,0.2);
}
.kpi-card .kpi-icon {
	width: 42px; height: 42px;
	border-radius: 12px;
	display: flex; align-items: center; justify-content: center;
	font-size: 18px;
	margin-bottom: 12px;
}
.kpi-card .kpi-val {
	font-size: 26px;
	font-weight: 800;
	line-height: 1;
	margin-bottom: 4px;
}
.kpi-card .kpi-label {
	font-size: 11px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.8px;
	color: var(--text-muted);
}
.kpi-card .kpi-badge {
	position: absolute;
	top: 14px; right: 14px;
	font-size: 10px;
	padding: 3px 8px;
	border-radius: 20px;
	font-weight: 700;
}
.kpi-voters  { border-top: 3px solid #3b82f6; }
.kpi-trv     { border-top: 3px solid #8b5cf6; }
.kpi-mce     { border-top: 3px solid #dc2626; }
.kpi-bce     { border-top: 3px solid #f59e0b; }
.kpi-pl      { border-top: 3px solid #10b981; }
.kpi-hl      { border-top: 3px solid #06b6d4; }
.kpi-members { border-top: 3px solid #ec4899; }
.kpi-sol     { border-top: 3px solid #6366f1; }

/* Charts row */
.charts-row {
	display: grid;
	grid-template-columns: 1fr 2fr;
	gap: 20px;
	margin-bottom: 28px;
}

@media (max-width: 900px) { .charts-row { grid-template-columns: 1fr; } }
.chart-card {
	background: var(--card-bg);
	border: 1px solid var(--card-border);
	border-radius: 16px;
	padding: 24px;
}
.chart-card h6 {
	font-size: 13px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	color: var(--text-muted);
	margin-bottom: 20px;
}

/* Data Table */
.sr-table-wrap {
	background: var(--card-bg);
	border: 1px solid var(--card-border);
	border-radius: 16px;
	overflow: hidden;
	margin-bottom: 28px;
}
.sr-table-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 24px;
	border-bottom: 1px solid var(--card-border);
}
.sr-table-header h6 {
	font-size: 14px;
	font-weight: 700;
	margin: 0;
}
.sr-table { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.sr-table thead th {
	background: linear-gradient(90deg, #7f1d1d, #991b1b);
	color: #fff;
	padding: 12px 10px;
	text-align: center;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	white-space: nowrap;
	border: none !important;
}
.sr-table thead th:first-child { text-align: center; border-radius: 0; }
.sr-table tbody tr:hover td { background: rgba(127,29,29,0.08) !important; }
.sr-table tbody td {
	padding: 10px 10px;
	text-align: center;
	border-bottom: 1px solid var(--card-border);
	color: var(--text-main);
	background: var(--table-row-bg);
}
.sr-table tbody td:nth-child(2) { text-align: left; font-weight: 600; }
.sr-table tfoot td {
	padding: 12px 10px;
	text-align: center;
	font-weight: 800;
	font-size: 13px;
	background: rgba(127,29,29,0.15);
	border-top: 2px solid #991b1b;
	color: var(--text-main);
}
.badge-tr {
	background: linear-gradient(135deg, #10b981, #059669);
	color: #fff;
	padding: 4px 10px;
	border-radius: 20px;
	font-size: 10px;
	font-weight: 700;
}
.badge-tnr {
	background: linear-gradient(135deg, #ef4444, #dc2626);
	color: #fff;
	padding: 4px 10px;
	border-radius: 20px;
	font-size: 10px;
	font-weight: 700;
}
.progress-bar-wrap {
	background: rgba(255,255,255,0.1);
	border-radius: 4px;
	height: 5px;
	margin-top: 3px;
	overflow: hidden;
	min-width: 50px;
}
.progress-bar-fill {
	height: 100%;
	border-radius: 4px;
	background: linear-gradient(90deg, #10b981, #3b82f6);
}
.legend-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 8px;
	padding: 16px 24px;
	border-top: 1px solid var(--card-border);
}
.legend-item {
	display: flex; align-items: center; gap: 8px;
	font-size: 11px; color: var(--text-muted);
}
.legend-dot {
	width: 10px; height: 10px;
	border-radius: 3px; flex-shrink: 0;
}
@media print {
	.sr-hero, nav, #d_controls, .charts-row, .kpi-grid { display: none !important; }
	.sr-table-wrap { border: none; border-radius: 0; }
	.sr-table thead th { background: #991b1b !important; -webkit-print-color-adjust: exact; }
}

/* Custom styling for pagination and print spacing */
.pagination-wrapper {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 16px;
}

.page-btn {
	background: var(--input-bg) !important;
	border: 1px solid var(--card-border) !important;
	padding: 6px 12px;
	border-radius: var(--radius-sm);
	cursor: pointer;
	font-size: 13px;
	text-transform: capitalize;
	transition: var(--transition);
	color: var(--text-main) !important;
	text-decoration: none;
}

.page-btn:hover {
	background: var(--primary-light) !important;
	color: var(--primary) !important;
	border-color: var(--primary) !important;
}

.page-btn.disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.backup-card {
	transition: all 0.3s ease;
	border: none;
	border-radius: 15px;
	box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.backup-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.console-window {
	background: #1e1e24;
	border-radius: 12px;
	box-shadow: 0 8px 24px rgba(0,0,0,0.2);
	font-family: 'Courier New', Courier, monospace;
	color: #39ff14;
	padding: 20px;
	text-align: left;
	margin: 20px auto;
}
.console-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 1px solid #333;
	padding-bottom: 10px;
	margin-bottom: 15px;
}
.console-dots span {
	display: inline-block;
	width: 12px;
	height: 12px;
	border-radius: 50%;
	margin-right: 6px;
}
.dot-red { background: #ff5f56; }
.dot-yellow { background: #ffbd2e; }
.dot-green { background: #27c93f; }
