/* ==========================================================================
   User / Siswa Modern UI Stylesheet - Bilik Suara E-PEMILOS
   Designed by Deni Trisna, S.Kom (@denitrisna7)
   SMP IT Al Qudwah Musi Rawas
   ========================================================================== */

:root {
	--vote-emerald: #059669;
	--vote-emerald-dark: #047857;
	--vote-emerald-light: #10b981;
	--vote-amber: #f59e0b;
	--vote-amber-dark: #d97706;
	--vote-slate-900: #0f172a;
	--vote-slate-800: #1e293b;
	--vote-slate-700: #334155;
	--vote-slate-600: #475569;
	--vote-slate-500: #64748b;
	--vote-slate-200: #e2e8f0;
	--vote-slate-100: #f1f5f9;
	--vote-slate-50:  #f8fafc;
	--vote-card-radius: 20px;
}

body {
	font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
	background-color: #f1f5f9 !important;
	color: #1e293b !important;
	min-height: 100vh;
	margin: 0;
	padding: 0;
	-webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   STUDENT TOPBAR / NAVBAR
   ========================================================================== */
.user-modern-navbar {
	background: #ffffff !important;
	border: none !important;
	border-bottom: 1px solid #e2e8f0 !important;
	box-shadow: 0 4px 20px -3px rgba(0, 0, 0, 0.05) !important;
	margin-bottom: 24px !important;
	padding: 12px 24px !important;
	position: sticky;
	top: 0;
	z-index: 1000;
}

.user-nav-container {
	max-width: 1240px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.user-nav-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	text-decoration: none !important;
	color: #0f172a !important;
}

.user-nav-logo {
	width: 38px;
	height: 38px;
	border-radius: 10px;
	background: #ffffff;
	padding: 2px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
	object-fit: contain;
}

.user-nav-title h1 {
	margin: 0;
	font-size: 16px;
	font-weight: 800;
	color: #047857;
	letter-spacing: -0.3px;
	line-height: 1.2;
}

.user-nav-title p {
	margin: 0;
	font-size: 11px;
	color: #64748b;
	font-weight: 600;
}

.user-nav-actions {
	display: flex;
	align-items: center;
	gap: 12px;
}

.user-badge-nisn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #ecfdf5;
	border: 1px solid #a7f3d0;
	color: #065f46;
	font-size: 12px;
	font-weight: 700;
	padding: 7px 14px;
	border-radius: 9999px;
}

.btn-user-fs {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #f8fafc;
	border: 1.5px solid #cbd5e1;
	color: #475569;
	font-size: 12px;
	font-weight: 600;
	padding: 6px 12px;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s;
}
.btn-user-fs:hover {
	background: #ffffff;
	border-color: #047857;
	color: #047857;
}

.btn-user-logout {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #dc2626 !important;
	font-size: 12px;
	font-weight: 700;
	padding: 7px 14px;
	border-radius: 9999px;
	text-decoration: none !important;
	transition: all 0.2s ease;
}

.btn-user-logout:hover {
	background: #ef4444;
	border-color: #ef4444;
	color: #ffffff !important;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

/* ==========================================================================
   VOTING ROOM (BILIK SUARA)
   ========================================================================== */
.voting-container {
	max-width: 1240px;
	margin: 0 auto;
	padding: 0 16px 40px 16px;
}

/* Hero Instruction Header */
.voting-hero {
	background: linear-gradient(135deg, #064e3b 0%, #047857 60%, #059669 100%);
	border-radius: var(--vote-card-radius);
	padding: 28px 24px;
	color: #ffffff;
	text-align: center;
	margin-bottom: 30px;
	box-shadow: 0 10px 25px -5px rgba(4, 120, 87, 0.35);
	position: relative;
	overflow: hidden;
}

.voting-hero-pattern {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-image: radial-gradient(rgba(255, 255, 255, 0.1) 1.5px, transparent 1.5px);
	background-size: 24px 24px;
	pointer-events: none;
}

.voting-hero-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: rgba(245, 158, 11, 0.25);
	border: 1px solid rgba(245, 158, 11, 0.6);
	color: #fef08a;
	font-size: 12px;
	font-weight: 800;
	padding: 5px 14px;
	border-radius: 9999px;
	margin-bottom: 12px;
	letter-spacing: 0.5px;
}

.voting-hero h2 {
	margin: 0 0 8px 0;
	font-size: 24px;
	font-weight: 800;
	letter-spacing: -0.4px;
	color: #ffffff !important;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.45) !important;
}

.voting-hero p {
	margin: 0 auto;
	max-width: 680px;
	font-size: 13.5px;
	color: #ecfdf5 !important;
	line-height: 1.55;
	font-weight: 500;
	text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3) !important;
}

/* Candidate Grid */
.candidate-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 28px;
	margin-bottom: 30px;
}

/* Candidate Card */
.candidate-card {
	background: #ffffff;
	border-radius: var(--vote-card-radius);
	border: 1.5px solid #e2e8f0;
	box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.05), 0 0 0 1px rgba(0, 0, 0, 0.02);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	position: relative;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.candidate-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 20px 40px -10px rgba(4, 120, 87, 0.18), 0 0 0 1.5px #10b981;
	border-color: #10b981;
}

/* Candidate Number Pill */
.candidate-number-badge {
	position: absolute;
	top: 16px;
	left: 16px;
	z-index: 5;
	width: 52px;
	height: 52px;
	background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
	color: #ffffff;
	border-radius: 16px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	font-weight: 900;
	box-shadow: 0 8px 16px -2px rgba(217, 119, 6, 0.4);
	border: 2px solid #ffffff;
}

.candidate-number-badge .badge-label {
	font-size: 9px;
	letter-spacing: 0.5px;
	line-height: 1;
	opacity: 0.9;
}

.candidate-number-badge .badge-val {
	font-size: 20px;
	line-height: 1.1;
}

/* Candidate Photo Frame */
.candidate-photo-frame {
	position: relative;
	width: 100%;
	height: 280px;
	background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
	overflow: hidden;
}

.candidate-photo {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top center;
	transition: transform 0.4s ease;
}

.candidate-card:hover .candidate-photo {
	transform: scale(1.04);
}

.candidate-photo-gradient {
	position: absolute;
	bottom: 0;
	left: 0;
	width: 100%;
	height: 60px;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.45) 0%, transparent 100%);
}

/* Candidate Content */
.candidate-body {
	padding: 20px 22px;
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.candidate-name-box {
	text-align: center;
	margin-bottom: 16px;
}

.candidate-role {
	display: inline-block;
	font-size: 11px;
	font-weight: 800;
	color: #047857;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	background: #ecfdf5;
	padding: 3px 10px;
	border-radius: 9999px;
	margin-bottom: 6px;
}

.candidate-name {
	font-size: 18px;
	font-weight: 800;
	color: #0f172a;
	margin: 0;
	line-height: 1.35;
}

/* Visi & Misi Box */
.candidate-visimisi {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 14px;
	margin-bottom: 20px;
	font-size: 13px;
	color: #475569;
	line-height: 1.6;
	max-height: 120px;
	overflow-y: auto;
}

.candidate-visimisi-title {
	font-size: 11px;
	font-weight: 800;
	color: #047857;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 4px;
	display: flex;
	align-items: center;
	gap: 4px;
}

/* Big Vibrant Vote Button */
.btn-vote-modern {
	width: 100%;
	background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
	color: #ffffff !important;
	border: none !important;
	border-radius: 12px !important;
	padding: 14px 20px !important;
	font-size: 15px !important;
	font-weight: 800 !important;
	letter-spacing: 0.5px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	box-shadow: 0 10px 20px -3px rgba(4, 120, 87, 0.4);
	cursor: pointer;
	transition: all 0.25s ease !important;
}

.btn-vote-modern:hover {
	background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
	transform: translateY(-2px);
	box-shadow: 0 14px 25px -3px rgba(4, 120, 87, 0.55);
}

.btn-vote-modern:disabled, .btn-vote-modern.disabled {
	background: #94a3b8 !important;
	box-shadow: none !important;
	cursor: not-allowed !important;
	transform: none !important;
	opacity: 0.85;
}

/* ==========================================================================
   SUCCESS / LOGOUT SCREENS (viewlogout & validasilogout)
   ========================================================================== */
.logout-screen-wrapper {
	min-height: 85vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.logout-card-modern {
	background: #ffffff;
	border-radius: 24px;
	border: 1px solid #e2e8f0;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.12);
	max-width: 500px;
	width: 100%;
	padding: 40px 32px;
	text-align: center;
	position: relative;
	overflow: hidden;
	animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popIn {
	from { opacity: 0; transform: scale(0.9); }
	to { opacity: 1; transform: scale(1); }
}

.success-icon-badge {
	width: 84px;
	height: 84px;
	margin: 0 auto 20px auto;
	background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
	color: #059669;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 12px 24px -4px rgba(5, 150, 105, 0.3);
}

.warning-icon-badge {
	width: 84px;
	height: 84px;
	margin: 0 auto 20px auto;
	background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
	color: #d97706;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 12px 24px -4px rgba(217, 119, 6, 0.3);
}

.logout-card-modern h2 {
	margin: 0 0 10px 0;
	font-size: 22px;
	font-weight: 800;
	color: #0f172a;
}

.logout-card-modern p {
	font-size: 14px;
	color: #64748b;
	line-height: 1.6;
	margin-bottom: 24px;
}

/* Auto-redirect countdown progress bar */
.countdown-bar-container {
	width: 100%;
	height: 6px;
	background: #f1f5f9;
	border-radius: 9999px;
	overflow: hidden;
	margin-bottom: 20px;
}

.countdown-bar-fill {
	height: 100%;
	background: linear-gradient(90deg, #10b981, #047857);
	border-radius: 9999px;
	animation: countdownAnim 2.5s linear forwards;
}

@keyframes countdownAnim {
	from { width: 100%; }
	to { width: 0%; }
}

.btn-finish-logout {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: linear-gradient(135deg, #059669 0%, #047857 100%);
	color: #ffffff !important;
	font-size: 14px;
	font-weight: 700;
	padding: 12px 26px;
	border-radius: 12px;
	text-decoration: none !important;
	box-shadow: 0 8px 18px -3px rgba(5, 150, 105, 0.35);
	transition: all 0.2s;
}

.btn-finish-logout:hover {
	transform: translateY(-2px);
	box-shadow: 0 12px 22px -3px rgba(5, 150, 105, 0.5);
}

/* Mobile responsive */
@media (max-width: 600px) {
	.user-modern-navbar {
		padding: 12px 16px !important;
	}
	.user-nav-title p {
		display: none;
	}
	.candidate-grid {
		grid-template-columns: 1fr;
	}
	.voting-hero {
		padding: 20px 16px;
	}
	.voting-hero h2 {
		font-size: 20px;
	}
}

