/* ===========================================================
   RESET & GLOBAL
=========================================================== */
* {
	box-sizing: border-box;
}

body {
	margin: 0;
	font-family: "Segoe UI", sans-serif;
	background: #f1f5f9;
}

body.sidebar-hide .sidebar {
	width: 0;
	overflow: hidden;
}

/* ===========================================================
   LAYOUT
=========================================================== */

.app {
	display: flex;
	min-height: 100vh;
	width: 100%;
}

.main {
	flex: 1;
	display: flex;
	flex-direction: column;
	min-width: 0;
}

/* ===========================================================
   SIDEBAR
=========================================================== */

.sidebar {
	width: 260px;
	background: linear-gradient(180deg, #0f172a, #1e293b);
	color: white;
	display: flex;
	flex-direction: column;
	flex-shrink: 0;
	transition: 0.3s ease;
	z-index: 100;
}

/* Hide sidebar */
.sidebar-hide .sidebar {
	width: 0;
	overflow: hidden;
	pointer-events: none;
}

/* No sidebar mode */
/* ========== FIX MODE TANPA SIDEBAR ========== */

.no-sidebar .app {
	display: block;
}

.no-sidebar .sidebar {
	display: none !important;
}

.no-sidebar .main {
	width: 100% !important;
	margin-left: 0 !important;
}

.no-sidebar .topbar {
	width: 100% !important;
	left: 0 !important;
}

.no-sidebar .content {
	width: 100%;
}

.no-sidebar .footer {
	width: 100%;
}

/* Sidebar Header */
.sidebar-header {
	padding: 20px 15px;
	text-align: center;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Logo container (anti logo rusak) */
.sidebar-header .logo-box {
	width: 90px;
	height: 90px;
	margin: 0 auto 10px;
	background: white;
	border-radius: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

/* Logo image */
.sidebar-header .logo-kpu {
	width: 70%;
	height: 70%;
	object-fit: contain;
}

/* Brand */
.sidebar-header .title {
	font-size: 18px;
	font-weight: 700;
	margin-top: 5px;
	letter-spacing: 0.5px;
}

.sidebar-header h6 {
	font-size: 11px;
	margin: 3px 0 0;
	color: #cbd5f5;
	font-weight: 500;
	text-transform: uppercase;
}

/* MENU */
.sidebar-menu {
	list-style: none;
	padding: 10px;
	margin: 0;
}

.sidebar-menu li {
	margin-bottom: 4px;
}

.sidebar-menu a {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 14px;
	border-radius: 10px;
	color: #e5e7eb;
	text-decoration: none;
	font-size: 14px;
	transition: 0.25s;
}

.sidebar-menu a i {
	width: 20px;
	text-align: center;
}

.sidebar-menu a:hover {
	background: rgba(255, 255, 255, 0.08);
	padding-left: 18px;
}

.sidebar-menu a.active {
	background: linear-gradient(90deg, #b91c1c, #dc2626);
	color: white;
	font-weight: 600;
	box-shadow: 0 4px 12px rgba(185, 28, 28, 0.4);
}

/* MASTER */
.menu-title {
	margin: 15px 10px 8px;
	font-size: 11px;
	color: #94a3b8;
	letter-spacing: 1px;
	text-transform: uppercase;
}

.has-sub > a {
	justify-content: space-between;
}

.has-sub .arrow {
	font-size: 12px;
	transition: 0.3s;
}

/* SUBMENU */
.submenu {
	list-style: none;
	padding-left: 15px;
	margin-top: 5px;
	display: none;
	border-left: 2px solid rgba(255, 255, 255, 0.1);
}

.submenu li a {
	padding: 10px 12px;
	font-size: 13px;
	color: #cbd5f5;
}

.submenu li a:hover {
	color: white;
}

/* rotate arrow */
.has-sub.open .arrow {
	transform: rotate(180deg);
}

/* logout */
.submenu a.logout {
	color: #fca5a5;
}

/* ===========================================================
   TOPBAR
=========================================================== */

.topbar {
	position: relative;
	z-index: 200;
	height: 60px;
	background: linear-gradient(90deg, #b91c1c, #dc2626);
	color: white;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 20px;
	flex-shrink: 0;
}

.btn-toggle {
	background: rgba(255, 255, 255, 0.15);
	border: none;
	color: white;
	padding: 6px 10px;
	border-radius: 6px;
	cursor: pointer;
}

.btn-toggle:hover {
	background: rgba(255, 255, 255, 0.25);
}

.topbar-title {
	font-weight: 600;
	letter-spacing: 0.3px;
}

.topbar-user {
	font-size: 14px;
	opacity: 0.9;
}

/* ===========================================================
   CONTENT
=========================================================== */

.content {
	flex: 1;
	padding: 20px;
	overflow-y: auto;
	background: #f8fafc;
}

/* ===========================================================
   FOOTER
=========================================================== */

.footer {
	height: 40px;
	background: white;
	border-top: 1px solid #e5e7eb;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 13px;
	color: #475569;
}

.hero {
	background: linear-gradient(135deg, #c0392b, #e74c3c);
	color: white;
	padding: 80px 20px;
	border-radius: 0 0 30px 30px;
}

.card-hover {
	transition: 0.3s;
}

.card-hover:hover {
	transform: translateY(-8px);
}

.opacity-75 {
	opacity: 0.75;
}

@media print {
	body * {
		visibility: hidden !important;
	}

	.print-area,
	.print-area * {
		visibility: visible !important;
	}

	.print-area {
		position: absolute;
		top: 0;
		left: 0;
		width: 100%;
	}

	.print-center {
		width: 90%; /* lebar tabel cetak */
		margin: 0 auto; /* INI YANG MEMBUAT TENGAH */
	}

	table {
		width: 100%;
		border-collapse: collapse;
		font-size: 11px;
	}

	.no-print {
		display: none !important;
	}

	table {
		width: 100%;
		border-collapse: collapse;
		font-size: 11px;
	}

	th,
	td {
		border: 1px solid black !important;
		padding: 6px;
	}

	thead {
		background: #eee !important;
		-webkit-print-color-adjust: exact;
	}
}
