/* ===== VARIABLES & RESET ===== */
:root {
	--primary-red: #b01717;
	--primary-white: #ffffff;
	--secondary-red: #8b0000;
	--light-red: #ffe5e5;
	--dark-red: #5a0f0f;
	--gray-light: #f8f9fa;
	--gray-medium: #e9ecef;
	--gray-dark: #343a40;
	--success: #28a745;
	--info: #17a2b8;
	--warning: #ffc107;
	--danger: #dc3545;
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
	background-color: var(--gray-light);
	color: var(--gray-dark);
	line-height: 1.6;
}

/* ===== TYPOGRAPHY ===== */
.text-stroke-red {
	color: var(--primary-white);
	text-shadow: 1px 1px 0 var(--primary-red), -1px -1px 0 var(--primary-red),
		1px -1px 0 var(--primary-red), -1px 1px 0 var(--primary-red);
}

.text-stroke-white {
	color: var(--primary-red);
	text-shadow: 1px 1px 0 var(--primary-white), -1px -1px 0 var(--primary-white),
		1px -1px 0 var(--primary-white), -1px 1px 0 var(--primary-white);
}

.text-amber {
	font-size: 1rem;
	color: var(--gray-dark) !important;
	font-weight: bold;
	text-shadow: 1px 1px 0 var(--primary-white), -1px -1px 0 var(--primary-white),
		1px -1px 0 var(--primary-white), -1px 1px 0 var(--primary-white);
}

/* ===== LAYOUT COMPONENTS ===== */
.header-container {
	background: linear-gradient(
		135deg,
		var(--primary-red) 0%,
		var(--dark-red) 100%
	);
	color: var(--primary-white);
	padding: 15px 0;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.welcome-card {
	background-color: rgba(255, 255, 255, 0.9);
	border-radius: 10px;
	padding: 20px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
	text-align: center;
	border-left: 5px solid var(--primary-red);
}

.user-controls {
	display: flex;
	justify-content: flex-end;
	align-items: center;
}

.admin-pic {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 2px solid var(--primary-white);
	margin-right: 10px;
}

.logo-hut {
	max-width: 100%;
	height: auto;
	filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

/* ===== SIDEBAR MENU ===== */
.sidebar {
	background-color: var(--primary-white);
	box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
	height: 150vh;
	/*overflow-y: auto;*/
	transition: all 0.3s ease;
}

.sidebar-brand {
	padding: 20px 15px;
	text-align: center;
	border-bottom: 1px solid var(--gray-medium);
	background-color: var(--primary-red);
	color: var(--primary-white);
}

.sidebar-menu {
	list-style: none;
	padding: 0;
	margin: 0;
}

.sidebar-divider {
	padding: 10px 15px;
	font-size: 0.8rem;
	font-weight: 600;
	color: var(--gray-dark);
	text-transform: uppercase;
	letter-spacing: 1px;
	border-bottom: 1px solid var(--gray-medium);
}

.sidebar-item {
	position: relative;
}

.sidebar-link {
	display: flex;
	align-items: center;
	padding: 12px 15px;
	color: var(--gray-dark);
	text-decoration: none;
	transition: all 0.3s ease;
	border-left: 3px solid transparent;
}

.sidebar-link:hover,
.sidebar-link.active {
	background-color: var(--light-red);
	color: var(--primary-red);
	border-left-color: var(--primary-red);
}

.sidebar-icon {
	margin-right: 10px;
	font-size: 1.2rem;
	width: 20px;
	text-align: center;
}

.sidebar-dropdown {
	list-style: none;
	padding-left: 30px;
	background-color: var(--gray-light);
	display: none;
}

.sidebar-dropdown.show {
	display: block;
}

.sidebar-dropdown .sidebar-link {
	padding: 8px 15px;
	font-size: 0.9rem;
}

/* ===== MAIN CONTENT ===== */
.main-content {
	padding: 20px;
	background-color: var(--gray-light);
	min-height: calc(100vh - 120px);
}

.content-header {
	margin-bottom: 20px;
	padding-bottom: 10px;
	border-bottom: 1px solid var(--gray-medium);
}

.content-title {
	color: var(--primary-red);
	font-weight: 600;
	font-size: x-large !important;
}

/* ===== CARDS & DASHBOARD ===== */
.dashboard-card {
	background-color: var(--primary-white);
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	margin-bottom: 20px;
	overflow: hidden;
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.dashboard-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card-header {
	background-color: var(--primary-red);
	color: var(--primary-white);
	padding: 15px 20px;
	font-weight: 600;
}

.card-body {
	padding: 20px;
}

/* ==== CUSTOMS ==== */
.isi {
	height: 100vh !important;
}
.dropdown-menu {
	z-index: 1050 !important; /* Pastikan di atas elemen lain */
}

.dropdown-toggle::after {
	display: inline-block;
	margin-left: 0.255em;
	vertical-align: 0.255em;
	content: "";
	border-top: 0.3em solid;
	border-right: 0.3em solid transparent;
	border-bottom: 0;
	border-left: 0.3em solid transparent;
}

/* ===== TABLES ===== */
.table-modern {
	width: 100%;
	border-collapse: collapse;
}

.table-modern th {
	background-color: var(--primary-red);
	color: var(--primary-white);
	padding: 12px 15px;
	text-align: left;
	font-weight: 600;
}

.table-modern td {
	padding: 12px 15px;
	border-bottom: 1px solid var(--gray-medium);
	font-size: small !important;
}

.table-modern tr:nth-child(even) {
	background-color: var(--gray-light);
}

.table-modern tr:hover {
	background-color: var(--light-red);
}

/* ===== BUTTONS ===== */
.btn-primary-red {
	background-color: var(--primary-red);
	border-color: var(--primary-red);
	color: var(--primary-white);
}

.btn-primary-red:hover {
	background-color: var(--dark-red);
	border-color: var(--dark-red);
	color: var(--primary-white);
}

.btn-outline-red {
	border-color: var(--primary-red);
	color: var(--primary-red);
}

.btn-outline-red:hover {
	background-color: var(--primary-red);
	color: var(--primary-white);
}

/* ===== FOOTER ===== */
.footer {
	background-color: var(--gray-dark);
	color: var(--primary-white);
	padding: 20px 0;
	text-align: center;
}

.footer-links {
	list-style: none;
	padding: 0;
	margin: 10px 0;
	display: flex;
	justify-content: center;
}

.footer-links li {
	margin: 0 10px;
}

.footer-links a {
	color: var(--primary-white);
	font-size: 1.2rem;
	transition: color 0.3s ease;
}

.footer-links a:hover {
	color: var(--light-red);
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
	.sidebar {
		position: fixed;
		top: 0;
		left: -280px;
		width: 280px;
		z-index: 1000;
	}

	.sidebar.show {
		left: 0;
	}

	.main-content {
		margin-left: 0;
	}

	.user-controls {
		justify-content: center;
		margin-top: 15px;
	}

	.welcome-card {
		margin-bottom: 15px;
	}
}

/* ===== NOTIFICATIONS & ALERTS ===== */
.notification-badge {
	position: absolute;
	top: -5px;
	right: -5px;
	background-color: var(--danger);
	color: var(--primary-white);
	border-radius: 50%;
	width: 20px;
	height: 20px;
	font-size: 0.7rem;
	display: flex;
	align-items: center;
	justify-content: center;
}

.alert-custom {
	border-radius: 8px;
	border-left: 5px solid;
	padding: 15px;
	margin-bottom: 15px;
}

.alert-info-custom {
	background-color: rgba(23, 162, 184, 0.1);
	border-left-color: var(--info);
	color: var(--info);
}

.alert-warning-custom {
	background-color: rgba(255, 193, 7, 0.1);
	border-left-color: var(--warning);
	color: var(--warning);
}

/* ===== CHARTS ===== */
.chart-container {
	position: relative;
	height: 300px;
	width: 100%;
}

/* ===== UTILITY CLASSES ===== */
.bg-red-gradient {
	background: linear-gradient(
		135deg,
		var(--primary-red) 0%,
		var(--dark-red) 100%
	);
}

.text-red {
	color: var(--primary-red) !important;
}

.border-red {
	border-color: var(--primary-red) !important;
}

.shadow-custom {
	box-shadow: 0 4px 6px rgba(176, 23, 23, 0.1);
}

.search-input {
	background-color: #b01717 !important;
	color: rgb(255, 255, 255) !important;
	border: (--bs-border-width) solid grey var(--bs-border-color) !important;
}

.highlight {
	background-color: #fff3cd !important;
	border-left: 4px solid #ffc107 !important;
}

#searchInput:not(:focus) {
	background-color: #b01717 !important;
	color: #ffffff; /* opsional, agar teks tetap terlihat */
	border-color: #850303;
	box-shadow: none;
}

/* Saat input TIDAK FOCUS */
#searchInput:focus {
	background-color: #ffffff !important;
	border-color: initial;
	box-shadow: 0 0 0 0.25rem rgba(253, 253, 253, 0.25);
	color: #000; /* opsional */
}

#no-results {
	background-color: #ffffff;
}
/* ===== FORM STYLES ===== */
.form-modern {
	background-color: var(--primary-white);
	border-radius: 10px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	padding: 25px;
	margin-bottom: 20px;
}

.form-modern .form-label {
	font-weight: 600;
	color: var(--primary-red);
	margin-bottom: 8px;
}

.form-modern .form-control,
.form-modern .form-select {
	border: 2px solid var(--gray-medium);
	border-radius: 8px;
	padding: 10px 15px;
	transition: all 0.3s ease;
}

.form-modern .form-control:focus,
.form-modern .form-select:focus {
	border-color: var(--primary-red);
	box-shadow: 0 0 0 0.2rem rgba(176, 23, 23, 0.25);
}

.form-modern .input-group-text {
	background-color: var(--primary-red);
	border: 2px solid var(--primary-red);
	color: var(--primary-white);
	border-radius: 8px;
}

/* ===== TABLE STYLES ===== */
.table-modern {
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.table-modern thead th {
	background: linear-gradient(
		135deg,
		var(--primary-red) 0%,
		var(--dark-red) 100%
	);
	color: var(--primary-white);
	font-weight: 600;
	padding: 15px;
	border: none;
	text-align: center;
}

.table-modern tbody td {
	padding: 12px 15px;
	vertical-align: middle;
	border-bottom: 1px solid var(--gray-medium);
}

.table-modern tbody tr:nth-child(even) {
	background-color: var(--gray-light);
}

.table-modern tbody tr:hover {
	background-color: var(--light-red);
}

/* ===== BUTTON STYLES ===== */
.btn-modern {
	padding: 10px 25px;
	border-radius: 8px;
	font-weight: 600;
	transition: all 0.3s ease;
	border: 2px solid transparent;
}

.btn-primary-modern {
	background: linear-gradient(
		135deg,
		var(--primary-red) 0%,
		var(--dark-red) 100%
	);
	border-color: var(--primary-red);
	color: var(--primary-white);
}

.btn-primary-modern:hover {
	background: linear-gradient(
		135deg,
		var(--dark-red) 0%,
		var(--primary-red) 100%
	);
	border-color: var(--dark-red);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(176, 23, 23, 0.3);
}

.btn-danger-modern {
	background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
	border-color: #dc3545;
	color: var(--primary-white);
}

.btn-danger-modern:hover {
	background: linear-gradient(135deg, #c82333 0%, #dc3545 100%);
	border-color: #c82333;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
}

/* ===== CARD STYLES ===== */
.card-modern {
	border: none;
	border-radius: 12px;
	box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
	overflow: hidden;
}

.card-header-modern {
	background: linear-gradient(
		135deg,
		var(--primary-red) 0%,
		var(--dark-red) 100%
	);
	color: var(--primary-white);
	padding: 20px;
	border-bottom: none;
}

.card-header-modern h3 {
	margin: 0;
	font-weight: 700;
	font-size: 1.4rem;
}

.card-body-modern {
	padding: 25px;
}

/* ===== POPUP STYLES ===== */
.popup-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(5px);
	z-index: 1040;
	display: none;
}

.popup-container {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: var(--primary-white);
	border-radius: 12px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
	z-index: 1050;
	min-width: 400px;
	max-width: 90%;
	display: none;
}

.popup-header {
	background: linear-gradient(
		135deg,
		var(--primary-red) 0%,
		var(--dark-red) 100%
	);
	color: var(--primary-white);
	padding: 20px;
	border-radius: 12px 12px 0 0;
	border-bottom: none;
}

.popup-header h4 {
	margin: 0;
	font-weight: 600;
}

.popup-body {
	padding: 25px;
}

/* ===== BADGE STYLES ===== */
.badge-modern {
	padding: 8px 15px;
	border-radius: 20px;
	font-weight: 600;
	font-size: 0.85rem;
}

.badge-success-modern {
	background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
	color: var(--primary-white);
}

.badge-warning-modern {
	background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
	color: var(--primary-white);
}

/* ===== FLATPICKR CUSTOM STYLES ===== */
.flatpickr-input {
	background-color: var(--primary-white) !important;
	border: 2px solid var(--gray-medium) !important;
	border-radius: 8px !important;
	padding: 10px 15px !important;
	height: 37.3334px !important;
}

.flatpickr-calendar {
	border-radius: 12px !important;
	box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
	border: none !important;
}

.flatpickr-day.selected {
	background: var(--primary-red) !important;
	border-color: var(--primary-red) !important;
}

.flatpickr-day.today {
	border-color: var(--primary-red) !important;
}

.flatpickr-day:hover {
	background: var(--light-red) !important;
	border-color: var(--primary-red) !important;
}

/* ===== ACTION BUTTONS ===== */
.btn-action {
	padding: 6px 12px;
	border-radius: 6px;
	border: none;
	transition: all 0.3s ease;
	margin: 0 2px;
}

.btn-edit {
	background: linear-gradient(135deg, #17a2b8 0%, #138496 100%);
	color: var(--primary-white);
}

.btn-edit:hover {
	background: linear-gradient(135deg, #138496 0%, #17a2b8 100%);
	transform: translateY(-2px);
}

.btn-delete {
	background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
	color: var(--primary-white);
}

.btn-delete:hover {
	background: linear-gradient(135deg, #c82333 0%, #dc3545 100%);
	transform: translateY(-2px);
}

.calendar-ico {
	margin-left: -5px !important;
	z-index: 100 !important;
}
.select2-container--default .select2-selection--single {
	height: 35px !important;
}
/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 768px) {
	.form-modern {
		padding: 15px;
	}

	.popup-container {
		min-width: 90%;
		margin: 20px;
	}

	.btn-modern {
		padding: 8px 20px;
		font-size: 0.9rem;
	}
}
input[readonly] {
	background-color: #fed7d7; /* kuning */
}

input:disabled {
	background-color: #e9ecef; /* abu */
}

/* ========= CSS untuk scroll tabel ========= */
.table-scroll-container {
	max-height: 90vh;
	/* Tinggi maksimal tabel */
	overflow-y: auto;
	/* Scroll vertikal */
	overflow-x: auto;
	/* Scroll horizontal jika diperlukan */
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	margin-bottom: 15px;
}

.table-scroll-container table {
	margin-bottom: 0;
	width: 100%;
}

.table-scroll-container thead th {
	position: sticky;
	top: 0;
	background-color: #b01717;
	color: white;
	z-index: 10;
	border-bottom: 2px solid #8b0000;
}

.table-scroll-container tbody tr:last-child td {
	border-bottom: none;
}

/* Custom scrollbar styling */
.table-scroll-container::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}

.table-scroll-container::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 4px;
}

.table-scroll-container::-webkit-scrollbar-thumb {
	background: #b01717;
	border-radius: 4px;
}

.table-scroll-container::-webkit-scrollbar-thumb:hover {
	background: #8b0000;
}

/* Untuk tabel header yang fixed */
.fixed-header {
	position: sticky;
	top: 0;
	background-color: #b01717;
	color: white;
	z-index: 100;
}

/* ==== FOOTER STYLES ==== */
.login-footer {
	position: fixed;
	bottom: 0;
	left: 0;
	width: 100%;
	background: linear-gradient(
		90deg,
		rgba(0, 0, 0, 0.8) 0%,
		rgba(176, 23, 23, 0.8) 50%,
		rgba(0, 0, 0, 0.8) 100%
	);
	backdrop-filter: blur(10px);
	padding: 12px 0; /* Diperkecil sedikit */
	border-top: 3px solid rgba(255, 215, 0, 0.3);
	z-index: 100;
}

.footer-container {
	width: 100%;
	max-width: 100%; /* Pastikan lebar penuh */
	margin: 0;
	padding: 0 40px; /* Tambahkan padding samping lebih besar */
	box-sizing: border-box;
}

.footer-content {
	display: flex;
	justify-content: space-between; /* Ini yang penting */
	align-items: center;
	flex-wrap: wrap;
	gap: 15px;
	width: 100%; /* Pastikan lebar 100% */
}

.footer-left {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1; /* Biarkan mengambil ruang yang tersedia */
}

.footer-right {
	display: flex;
	align-items: center;
	gap: 15px;
	flex-shrink: 0; /* Jangan mengecil */
	margin-left: auto; /* Dorong ke kanan */
}

/* Copyright Text */
.copyright-text {
	color: white;
	font-size: 0.85rem;
	margin: 0;
	white-space: nowrap; /* Cegah wrap */
}

.copyright-text a {
	color: #ffd700;
	text-decoration: none;
	transition: color 0.3s ease;
}

.copyright-text a:hover {
	color: white;
	text-decoration: underline;
}

/* Logo SIAP */
.logo-siap-footer {
	height: 20px;
	vertical-align: middle;
	margin: 0 5px;
	filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
}

/* Developer Info */
.developer-info {
	display: flex;
	align-items: center;
	gap: 8px;
	color: white;
	font-size: 0.85rem;
	white-space: nowrap; /* Cegah wrap */
}

.developer-icons {
	display: flex;
	align-items: center;
	gap: 5px;
}

.icon-dev {
	width: 18px;
	height: 18px;
}

.icon-stroke {
	width: 35px;
	height: 22px;
	vertical-align: middle;
	filter: drop-shadow(1px 0 0 #ffffff) drop-shadow(-1px 0 0 #ffffff)
		drop-shadow(0 1px 0 #ffffff) drop-shadow(0 -1px 0 #ffffff);
}

/* Social Links */
.social-links {
	display: flex;
	gap: 10px;
	align-items: center;
}

.social-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	background: rgba(255, 255, 255, 0.1);
	border-radius: 50%;
	text-decoration: none;
	transition: all 0.3s ease;
}

.social-link:hover {
	background: #b01717;
	transform: translateY(-2px);
}

.social-link img {
	width: 16px;
	height: 16px;
}

/* Version Badge */
.version-badge {
	background: linear-gradient(135deg, #ffd700 0%, #ffa500 100%);
	color: #8b0000;
	padding: 3px 10px;
	border-radius: 20px;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.5px;
	margin-left: 10px;
}
