/* Google Fonts - Poppins */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600&display=swap");
@import url("https://unpkg.com/boxicons@2.1.2/css/boxicons.min.css");

:root {
	--timberwolf: #dad7cd;
	--sage: #a3b18a;
	--fern-green: #588157;
	--hunter-green: #3a5a40;
	--brunswick-green: #344e41;
	/* Enhance Global Styles */
	--transition-speed: 0.3s;
	--box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	--hover-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: "Poppins", sans-serif;
}

body {
	min-height: 100%;
	background: var(--timberwolf);
}

/* =============================================================================
   STATUS BADGE INDICATORS
   ============================================================================= */

/* Base status badge styling */
.status,
.status-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	padding: 0.4rem 0.9rem;
	border-radius: 20px;
	font-size: 0.85rem;
	font-weight: 600;
	text-transform: capitalize;
	letter-spacing: 0.3px;
	transition: all 0.3s ease;
	white-space: nowrap;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
	border: 1.5px solid transparent;
	position: relative;
	overflow: hidden;
}

/* Icon styling untuk status badges */
.status i,
.status-badge i {
	font-size: 1.1rem;
	line-height: 1;
	transition: transform 0.3s ease;
}

/* Hover effect untuk semua badges */
.status:hover,
.status-badge:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.status:hover i,
.status-badge:hover i {
	transform: scale(1.15) rotate(5deg);
}

/* Pulse animation untuk status badges */
@keyframes status-pulse {
	0%,
	100% {
		box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
	}
	50% {
		box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15),
			0 0 0 3px rgba(255, 255, 255, 0.3);
	}
}

/* Shine effect overlay */
.status::before,
.status-badge::before {
	content: "";
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(
		90deg,
		transparent,
		rgba(255, 255, 255, 0.3),
		transparent
	);
	transition: left 0.5s ease;
}

.status:hover::before,
.status-badge:hover::before {
	left: 100%;
}

/* ========== IN STOCK - Green Theme ========== */
.status.in-stock,
.status.in_stock,
.status-in-stock,
.status-badge.in-stock {
	background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
	color: #155724;
	border-color: #b1dfbb;
}

.status.in-stock::after,
.status.in_stock::after,
.status-in-stock::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: radial-gradient(
		circle at 30% 50%,
		rgba(21, 87, 36, 0.05) 0%,
		transparent 70%
	);
	pointer-events: none;
}

.status.in-stock:hover,
.status.in_stock:hover,
.status-in-stock:hover {
	background: linear-gradient(135deg, #c3e6cb 0%, #b1dfbb 100%);
	border-color: #28a745;
	box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
}

/* Icon color untuk in-stock */
.status.in-stock i,
.status.in_stock i,
.status-in-stock i {
	color: #28a745;
}

/* ========== LOW STOCK - Yellow/Orange Theme ========== */
.status.low-stock,
.status.low_stock,
.status-low-stock,
.status-badge.low-stock {
	background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
	color: #856404;
	border-color: #ffe08a;
	animation: status-pulse 2s infinite;
}

.status.low-stock::after,
.status.low_stock::after,
.status-low-stock::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: radial-gradient(
		circle at 30% 50%,
		rgba(133, 100, 4, 0.06) 0%,
		transparent 70%
	);
	pointer-events: none;
}

.status.low-stock:hover,
.status.low_stock:hover,
.status-low-stock:hover {
	background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
	border-color: #ffc107;
	box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
	animation: none;
}

/* Icon color untuk low-stock */
.status.low-stock i,
.status.low_stock i,
.status-low-stock i {
	color: #f39c12;
	animation: icon-warning 1.5s infinite;
}

@keyframes icon-warning {
	0%,
	100% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.2);
	}
}

.status.low-stock:hover i,
.status.low_stock:hover i,
.status-low-stock:hover i {
	animation: none;
	transform: scale(1.15) rotate(5deg);
}

/* ========== OUT OF STOCK - Red Theme ========== */
.status.out-stock,
.status.out_stock,
.status.out-of-stock,
.status-out-stock,
.status-badge.out-stock {
	background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
	color: #721c24;
	border-color: #f1aeb5;
	animation: status-pulse 1.5s infinite;
}

.status.out-stock::after,
.status.out_stock::after,
.status.out-of-stock::after,
.status-out-stock::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: radial-gradient(
		circle at 30% 50%,
		rgba(114, 28, 36, 0.08) 0%,
		transparent 70%
	);
	pointer-events: none;
}

.status.out-stock:hover,
.status.out_stock:hover,
.status.out-of-stock:hover,
.status-out-stock:hover {
	background: linear-gradient(135deg, #f5c6cb 0%, #ea868f 100%);
	border-color: #dc3545;
	box-shadow: 0 4px 12px rgba(220, 53, 69, 0.4);
	animation: none;
}

/* Icon color untuk out-stock */
.status.out-stock i,
.status.out_stock i,
.status.out-of-stock i,
.status-out-stock i {
	color: #dc3545;
	animation: icon-danger 1s infinite;
}

@keyframes icon-danger {
	0%,
	100% {
		transform: scale(1) rotate(0deg);
	}
	25% {
		transform: scale(1.1) rotate(-5deg);
	}
	75% {
		transform: scale(1.1) rotate(5deg);
	}
}

.status.out-stock:hover i,
.status.out_stock:hover i,
.status.out-of-stock:hover i,
.status-out-stock:hover i {
	animation: none;
	transform: scale(1.15) rotate(5deg);
}

/* ========== UNKNOWN/DEFAULT STATUS ========== */
.status.unknown,
.status-badge.unknown,
.status:not(.in-stock):not(.in_stock):not(.low-stock):not(.low_stock):not(
		.out-stock
	):not(.out_stock):not(.out-of-stock) {
	background: linear-gradient(135deg, #e2e3e5 0%, #d6d8db 100%);
	color: #383d41;
	border-color: #c6c8ca;
}

/* ========== STATUS BADGE SIZES ========== */
.status-badge.small {
	padding: 0.25rem 0.6rem;
	font-size: 0.75rem;
	gap: 0.25rem;
}

/* =============================================================================
   STATUS INDICATORS FOR UPDATE-STOCK PAGE
   ============================================================================= */

/* Item name cell with status indicator */
.item-name-cell {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

/* Status indicator dots */
.status-indicator {
	display: inline-block;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	flex-shrink: 0;
	position: relative;
	transition: all 0.3s ease;
}

/* In-stock indicator - Green with pulse */
.status-indicator.status-in-stock,
.status-indicator.status-in_stock {
	background-color: #4caf50;
	box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
	position: relative;
	z-index: 1;
}

.status-indicator.status-in-stock::before,
.status-indicator.status-in_stock::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background-color: #4caf50;
	animation: pulse-success 2s infinite;
	pointer-events: none;
	z-index: -1;
}

@keyframes pulse-success {
	0%,
	100% {
		opacity: 1;
		transform: translate(-50%, -50%) scale(1);
	}
	50% {
		opacity: 0;
		transform: translate(-50%, -50%) scale(1.8);
	}
}

/* Low-stock indicator - Orange with pulse */
.status-indicator.status-low-stock,
.status-indicator.status-low_stock {
	background-color: #ff9800;
	box-shadow: 0 0 0 3px rgba(255, 152, 0, 0.2);
	position: relative;
	z-index: 1;
}

.status-indicator.status-low-stock::before,
.status-indicator.status-low_stock::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background-color: #ff9800;
	animation: pulse-warning 1.5s infinite;
	pointer-events: none;
	z-index: -1;
}

@keyframes pulse-warning {
	0%,
	100% {
		opacity: 1;
		transform: translate(-50%, -50%) scale(1);
	}
	50% {
		opacity: 0;
		transform: translate(-50%, -50%) scale(2);
	}
}

/* Out-of-stock indicator - Red with urgent pulse */
.status-indicator.status-out-stock,
.status-indicator.status-out_stock,
.status-indicator.status-out-of-stock {
	background-color: #f44336;
	box-shadow: 0 0 0 3px rgba(244, 67, 54, 0.2);
	position: relative;
	z-index: 1;
}

.status-indicator.status-out-stock::before,
.status-indicator.status-out_stock::before,
.status-indicator.status-out-of-stock::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background-color: #f44336;
	animation: pulse-danger 1s infinite;
	pointer-events: none;
	z-index: -1;
}

@keyframes pulse-danger {
	0%,
	100% {
		opacity: 1;
		transform: translate(-50%, -50%) scale(1);
	}
	50% {
		opacity: 0;
		transform: translate(-50%, -50%) scale(2.2);
	}
}

/* Row highlighting based on status */
.row-status-low-stock,
.row-status-low_stock {
	background-color: rgba(255, 152, 0, 0.03);
	border-left: 3px solid #ff9800;
}

.row-status-low-stock:hover,
.row-status-low_stock:hover {
	background-color: rgba(255, 152, 0, 0.08);
}

.row-status-out-stock,
.row-status-out_stock,
.row-status-out-of-stock {
	background-color: rgba(244, 67, 54, 0.03);
	border-left: 3px solid #f44336;
}

.row-status-out-stock:hover,
.row-status-out_stock:hover,
.row-status-out-of-stock:hover {
	background-color: rgba(244, 67, 54, 0.08);
}

.row-status-in-stock,
.row-status-in_stock {
	border-left: 3px solid transparent;
}

.row-status-in-stock:hover,
.row-status-in_stock:hover {
	background-color: rgba(76, 175, 80, 0.03);
}

/* =============================================================================
   INLINE VALIDATION & CHANGE DETECTION
   ============================================================================= */

.tracked-input {
	transition: background-color 0.2s ease, border-color 0.2s ease,
		box-shadow 0.2s ease;
}

.tracked-input:focus {
	box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.25);
}

.tracked-input.input-modified {
	border-color: #2196f3 !important;
	background-color: rgba(33, 150, 243, 0.12);
}

.tracked-input.input-error {
	border-color: #e53935 !important;
	background-color: rgba(229, 57, 53, 0.15);
}

.row-modified {
	box-shadow: inset 0 0 0 2px rgba(33, 150, 243, 0.25);
}

.row-has-error {
	box-shadow: inset 0 0 0 2px rgba(229, 57, 53, 0.35);
}

.row-has-error .tracked-input.input-error {
	background-color: rgba(229, 57, 53, 0.2);
}

.btn-save-row:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	box-shadow: none;
	transform: none;
}

.btn-save-row:disabled:hover {
	transform: none;
	box-shadow: none;
}

.btn-save-row.btn-success-state {
	background: linear-gradient(90deg, #2e7d32, #388e3c);
	box-shadow: 0 8px 20px rgba(46, 125, 50, 0.25);
}

/* =============================================================================
   BULK ACTIONS TOOLBAR
   ============================================================================= */

.table-actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	margin: 1rem 0 0.5rem;
	padding: 0.75rem 1rem;
	background: rgba(52, 78, 65, 0.05);
	border-radius: 12px;
	border: 1px solid rgba(52, 78, 65, 0.08);
}

.bulk-selection {
	display: flex;
	align-items: center;
	gap: 1rem;
	flex-wrap: wrap;
}

.select-all-checkbox {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 600;
	color: var(--brunswick-green);
}

.select-all-checkbox input {
	width: 18px;
	height: 18px;
	accent-color: var(--fern-green);
}

.selected-counter {
	font-size: 0.95rem;
	color: var(--hunter-green);
}

.bulk-buttons {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	flex-wrap: wrap;
}

.btn-bulk-save,
.btn-bulk-clear {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.6rem 1.1rem;
	border-radius: 8px;
	border: none;
	font-weight: 600;
	cursor: pointer;
	transition: transform var(--transition-speed),
		box-shadow var(--transition-speed);
}

.btn-bulk-save {
	background: linear-gradient(90deg, var(--fern-green), var(--hunter-green));
	color: #fff;
	box-shadow: 0 8px 16px rgba(58, 90, 64, 0.18);
}

.btn-bulk-save:hover:not(:disabled) {
	transform: translateY(-3px);
	box-shadow: 0 10px 22px rgba(58, 90, 64, 0.25);
}

.btn-bulk-clear {
	background: rgba(244, 67, 54, 0.12);
	color: #b71c1c;
	border: 1px solid rgba(244, 67, 54, 0.25);
}

.btn-bulk-clear:hover:not(:disabled) {
	transform: translateY(-2px);
	box-shadow: 0 8px 18px rgba(183, 28, 28, 0.18);
}

.btn-bulk-save:disabled,
.btn-bulk-clear:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	transform: none;
	box-shadow: none;
}

.btn-bulk-save.btn-loading {
	background: linear-gradient(
		90deg,
		var(--hunter-green),
		var(--brunswick-green)
	);
}

.bulk-feedback {
	margin-top: 0.5rem;
	font-size: 0.95rem;
	font-weight: 500;
}

.bulk-feedback-info {
	color: var(--hunter-green);
}

.bulk-feedback-success {
	color: #1b5e20;
}

.bulk-feedback-error {
	color: #c62828;
}

.col-select {
	width: 52px;
	text-align: center;
}

.col-select input[type="checkbox"],
.row-select {
	width: 18px;
	height: 18px;
	accent-color: var(--fern-green);
}

.row-select-wrapper {
	display: flex;
	justify-content: center;
	align-items: center;
}

.row-has-error .row-select {
	accent-color: #e53935;
}

@media (max-width: 768px) {
	.table-actions {
		flex-direction: column;
		align-items: flex-start;
	}

	.bulk-buttons {
		width: 100%;
		justify-content: flex-start;
	}

	.btn-bulk-save,
	.btn-bulk-clear {
		width: 100%;
		justify-content: center;
	}
}

.status-badge.small i {
	font-size: 0.9rem;
}

.status-badge.large {
	padding: 0.6rem 1.2rem;
	font-size: 1rem;
	gap: 0.5rem;
}

.status-badge.large i {
	font-size: 1.3rem;
}

/* ========== RESPONSIVE STATUS BADGES ========== */
@media screen and (max-width: 768px) {
	.status,
	.status-badge {
		font-size: 0.8rem;
		padding: 0.35rem 0.75rem;
		gap: 0.3rem;
	}

	.status i,
	.status-badge i {
		font-size: 1rem;
	}
}

@media screen and (max-width: 480px) {
	.status,
	.status-badge {
		font-size: 0.75rem;
		padding: 0.3rem 0.65rem;
		gap: 0.25rem;
	}

	.status i,
	.status-badge i {
		font-size: 0.95rem;
	}

	/* Remove animations on mobile untuk performance */
	.status::before,
	.status-badge::before {
		display: none;
	}

	.status:hover,
	.status-badge:hover {
		transform: none;
	}
}

/* ========== PRINT STYLES ========== */
@media print {
	.status,
	.status-badge {
		border: 2px solid currentColor !important;
		box-shadow: none !important;
		background: white !important;
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}

	.status i,
	.status-badge i {
		display: none;
	}
}

/* =============================================================================
   LOADING STATES & SKELETON SCREENS
   ============================================================================= */

/* Skeleton loading animation */
@keyframes skeleton-loading {
	0% {
		background-position: 200% 0;
	}
	100% {
		background-position: -200% 0;
	}
}

.skeleton {
	background: linear-gradient(
		90deg,
		#e0e0e0 0%,
		#f0f0f0 20%,
		#e0e0e0 40%,
		#e0e0e0 100%
	);
	background-size: 200% 100%;
	animation: skeleton-loading 1.5s ease-in-out infinite;
	border-radius: 4px;
	position: relative;
	overflow: hidden;
}

.skeleton::after {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(
		90deg,
		transparent,
		rgba(255, 255, 255, 0.5),
		transparent
	);
	animation: skeleton-shimmer 2s infinite;
}

@keyframes skeleton-shimmer {
	0% {
		transform: translateX(-100%);
	}
	100% {
		transform: translateX(100%);
	}
}

/* Skeleton card untuk stats cards */
.skeleton-card {
	background: white;
	border-radius: 10px;
	padding: 1.5rem;
	box-shadow: var(--box-shadow);
	height: 120px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
}

.skeleton-card-icon {
	width: 50px;
	height: 50px;
	border-radius: 8px;
	margin-bottom: 1rem;
}

.skeleton-card-title {
	width: 60%;
	height: 16px;
	border-radius: 4px;
	margin-bottom: 0.5rem;
}

.skeleton-card-value {
	width: 40%;
	height: 32px;
	border-radius: 4px;
}

/* Skeleton table untuk recent updates */
.skeleton-table {
	background: white;
	border-radius: 10px;
	padding: 1.5rem;
	box-shadow: var(--box-shadow);
}

.skeleton-table-header {
	width: 200px;
	height: 24px;
	border-radius: 4px;
	margin-bottom: 1.5rem;
}

.skeleton-table-row {
	display: flex;
	gap: 1rem;
	padding: 1rem 0;
	border-bottom: 1px solid #f0f0f0;
}

.skeleton-table-row:last-child {
	border-bottom: none;
}

.skeleton-table-cell {
	height: 20px;
	border-radius: 4px;
	flex: 1;
}

.skeleton-table-cell.small {
	flex: 0 0 80px;
}

.skeleton-table-cell.medium {
	flex: 0 0 120px;
}

.skeleton-table-cell.large {
	flex: 0 0 200px;
}

/* Fade-in animation untuk konten yang sudah dimuat */
.fade-in {
	animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Loading container */
.loading-container {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

/* Hidden class untuk menyembunyikan skeleton saat data sudah dimuat */
.hidden {
	display: none !important;
}

/* =============================================================================
   TABLE ICONS & TOOLTIPS ENHANCEMENT
   ============================================================================= */

/* Table cell with icons */
table td[title],
table th[title] {
	cursor: help;
	position: relative;
}

/* Icon styling in table cells */
table td i.bx,
table th i.bx {
	font-size: 1.1em;
	vertical-align: middle;
	transition: color 0.3s ease, transform 0.3s ease;
}

/* Hover effect for cells with tooltips */
table td[title]:hover i.bx {
	transform: scale(1.15);
	color: var(--hunter-green) !important;
}

/* Enhanced tooltip appearance */
table td[title]::before,
table th[title]::before {
	content: attr(title);
	position: absolute;
	bottom: 100%;
	left: 50%;
	transform: translateX(-50%) translateY(-8px);
	background: rgba(0, 0, 0, 0.9);
	color: #fff;
	padding: 8px 12px;
	border-radius: 6px;
	font-size: 0.85rem;
	font-weight: 500;
	white-space: nowrap;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
	z-index: 1000;
	pointer-events: none;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
	line-height: 1.4;
}

/* Tooltip arrow */
table td[title]::after,
table th[title]::after {
	content: "";
	position: absolute;
	bottom: 100%;
	left: 50%;
	transform: translateX(-50%) translateY(0px);
	border: 6px solid transparent;
	border-top-color: rgba(0, 0, 0, 0.9);
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	z-index: 1000;
	pointer-events: none;
}

/* Show tooltip on hover */
table td[title]:hover::before,
table th[title]:hover::before {
	opacity: 1;
	visibility: visible;
	transform: translateX(-50%) translateY(-12px);
}

table td[title]:hover::after,
table th[title]:hover::after {
	opacity: 1;
	visibility: visible;
}

/* Special styling for days coverage icons based on color */
table td[data-label="Ketahanan di lapangan"] i.bx-check-shield {
	color: #28a745; /* Green for good coverage */
}

table td[data-label="Ketahanan di lapangan"] i.bx-shield {
	color: #ffc107; /* Yellow for moderate coverage */
}

table td[data-label="Ketahanan di lapangan"] i.bx-error {
	color: #ff9800; /* Orange for low coverage */
}

table td[data-label="Ketahanan di lapangan"] i.bx-error-circle {
	color: #dc3545; /* Red for critical coverage */
	animation: pulse-warning 2s infinite;
}

/* Pulse animation for critical coverage */
@keyframes pulse-warning {
	0%,
	100% {
		opacity: 1;
		transform: scale(1);
	}
	50% {
		opacity: 0.7;
		transform: scale(1.1);
	}
}

/* Icon color variations for different contexts */
table td i.bx-package {
	color: #6c757d; /* Gray for product name */
}

table td i.bx-vial {
	color: #17a2b8; /* Cyan for chemicals */
}

table td i.bx-wrench {
	color: #fd7e14; /* Orange for equipment */
}

table td i.bx-cube {
	color: #6610f2; /* Purple for materials */
}

table td i.bx-briefcase {
	color: #20c997; /* Teal for tools */
}

table td i.bx-category {
	color: #6c757d; /* Gray for default category */
}

table td i.bx-box,
table td i.bx-store {
	color: #28a745; /* Green for stock indicators */
}

table td i.bx-ruler {
	color: #007bff; /* Blue for level measurements */
}

/* Responsive tooltips on mobile */
@media screen and (max-width: 768px) {
	table td[title]::before,
	table th[title]::before {
		font-size: 0.75rem;
		padding: 6px 10px;
		max-width: 200px;
		white-space: normal;
		word-wrap: break-word;
	}

	/* Disable complex animations on mobile for performance */
	table td[title]:hover i.bx {
		transform: none;
	}

	table td i.bx-error-circle {
		animation: none;
	}
}

/* --- Sidebar layout --- */
nav {
	position: fixed;
	top: 0;
	left: 0;
	height: 70px;
	width: 100%;
	display: flex;
	align-items: center;
	background: var(--brunswick-green);
	box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
	z-index: 1000; /* Sama dengan sidebar */
}

nav .logo {
	display: flex;
	align-items: center;
	margin: 0 24px;
}

.logo .menu-icon {
	color: var(--timberwolf);
	font-size: 24px;
	margin-right: 14px;
	cursor: pointer;
}

.logo .logo-name {
	color: var(--timberwolf);
	font-size: 22px;
	font-weight: 600;
}

nav .sidebar {
	position: fixed;
	top: 0;
	left: -100%;
	height: 100%;
	width: 260px;
	padding: 20px 0;
	background-color: var(--hunter-green);
	box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
	transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
	z-index: 1000;
	overflow: hidden; /* Change from auto to hidden */
}
nav.open .sidebar {
	left: 0;
}

.sidebar .sidebar-content {
	display: flex;
	height: 100%;
	flex-direction: column;
	justify-content: space-between;
	padding: 30px 16px;
	overflow-y: auto; /* Only inner content scrollable if needed */
	scrollbar-width: none; /* Firefox */
	-ms-overflow-style: none; /* IE/Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.sidebar .sidebar-content::-webkit-scrollbar {
	display: none;
}

/* Make sure sidebar content fits better */
.sidebar-content .lists {
	max-height: calc(
		100% - 60px
	); /* Adjust based on your bottom content height */
}

.sidebar-content .list {
	list-style: none;
}

.list .nav-link {
	display: flex;
	align-items: center;
	margin: 8px 0;
	padding: 14px 12px;
	border-radius: 8px;
	text-decoration: none;
	background: transparent;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lists .nav-link:hover {
	background-color: var(--fern-green);
}

.nav-link .icon {
	margin-right: 14px;
	font-size: 20px;
	color: var(--sage);
	transition: 0.3s;
}

.nav-link .link {
	font-size: 16px;
	color: var(--timberwolf);
	font-weight: 400;
	transition: 0.3s;
}

.lists .nav-link:hover .icon,
.lists .nav-link:hover .link {
	color: #fff;
}

.overlay {
	position: fixed;
	top: 0;
	left: -100%;
	height: 100vh;
	width: 200%;
	opacity: 0;
	pointer-events: none;
	transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
	background: rgba(0, 0, 0, 0.4);
	z-index: 999; /* Sedikit lebih rendah dari sidebar */
}
nav.open ~ .overlay {
	opacity: 1;
	left: 260px;
	pointer-events: auto;
}

/* Main Container Styles */
.main-container {
	padding: 90px 20px 20px 20px;
	margin-left: 0;
	transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

nav.open ~ .main-container {
	margin-left: 260px;
}

.main-title {
	margin-bottom: 30px;
}

.main-title h2 {
	color: var(--brunswick-green);
	font-size: 28px;
	font-weight: 600;
}

/* Card Styles */
.card-container {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 20px;
	margin-bottom: 30px;
}

.card {
	background: white;
	padding: 20px;
	border-radius: 10px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	transition: transform var(--transition-speed),
		box-shadow var(--transition-speed);
	position: relative;
	overflow: hidden;
}

.card::after {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	height: 100%;
	width: 25%;
	z-index: 0;
	opacity: 0.15;
}

.card-instock::after {
	background: linear-gradient(to left, #2da544, transparent);
}

.card-lowstock::after {
	background: linear-gradient(to left, #ffa116, transparent);
}

.card-outstock::after {
	background: linear-gradient(to left, #ef4444, transparent);
}

.card-inner,
.card h3 {
	position: relative;
	z-index: 1;
}

.card-instock i,
.card-instock h3 {
	color: #2da544;
}

.card-lowstock i,
.card-lowstock h3 {
	color: #ffa116;
}

.card-outstock i,
.card-outstock h3 {
	color: #ef4444;
}

.card:hover {
	transform: translateY(-5px);
	box-shadow: var(--hover-shadow);
	cursor: pointer;
}

.card-inner {
	display: flex;
	align-items: center;
	margin-bottom: 10px;
}

.card i {
	font-size: 30px;
	margin-right: 10px;
	color: var(--hunter-green);
}

.card-title {
	color: var(--brunswick-green);
	font-size: 16px;
	font-weight: 600;
}

.card h3 {
	color: var(--fern-green);
	font-size: 24px;
	font-weight: 600;
}

/* Table Styles */
.table-container {
	background: white;
	padding: 20px;
	border-radius: 10px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	position: relative;
	z-index: 1; /* Lebih rendah dari sidebar dan nav */
}

.table-container h3 {
	color: var(--brunswick-green);
	margin-bottom: 18px;
	font-size: 20px;
	font-weight: 600;
}

/* Table base */
.table-container table {
	width: 100%;
	border-collapse: collapse;
}
.table-container th,
.table-container td {
	border-bottom: 1px solid #eee;
	padding: 12px 10px;
	text-align: left;
}

/* FIX: keep td as table-cell (not flex) */
td.actions {
	display: table-cell !important;
	white-space: nowrap;
	vertical-align: middle;
	padding: 8px 12px;
}

/* Use inner wrapper for layout */
td.actions .actions-inline {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
td.actions .action-form {
	display: inline; /* avoid block that can break borders */
	margin: 0;
}

/* Buttons */
.btn-edit,
.btn-delete {
	width: 32px;
	height: 32px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	border: 1px solid #e5e7eb;
	background: #f3faf5;
	color: #2f5c45;
	transition: all 0.2s;
}
.btn-delete {
	background: #fff5f5;
	color: #dc2626;
}
.btn-edit:hover {
	background: #2f5c45;
	color: #fff;
	border-color: #2f5c45;
}
.btn-delete:hover {
	background: #dc2626;
	color: #fff;
	border-color: #dc2626;
}

/* Optional: avoid row scale that can cause hairline gaps */
.table-container tbody tr:hover {
	transform: none;
}

tbody tr {
	transition: transform 0.2s, background-color 0.2s;
}

tbody tr:hover {
	background-color: #f8f9fa;
	transform: scale(1.01);
	box-shadow: var(--box-shadow);
}

/* Stock Update Form Styles */
.table-container input[type="number"] {
	width: 100px;
	padding: 8px;
	border: 1px solid #ddd;
	border-radius: 4px;
	text-align: center;
}

/* Hide number input spinners and optionally disable direct pointer events */
.quantity-control input[type="number"] {
	-webkit-appearance: none; /* Chrome/Safari */
	-moz-appearance: textfield; /* Firefox */
	appearance: textfield;
	/* pointer-events: none; prevent typing, rely on +/- buttons */
}

.quantity-control input[type="number"]::-webkit-inner-spin-button,
.quantity-control input[type="number"]::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.table-container .form-actions {
	margin-top: 20px;
	text-align: right;
}

.table-container .btn-submit {
	padding: 10px 20px;
	background: var(--hunter-green);
	color: white;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.3s ease;
}

/* --- Update Stock Page Enhancements --- */
.main-title .note {
	margin-top: 8px;
	display: inline-block;
	background: linear-gradient(
		90deg,
		rgba(255, 255, 255, 0.6),
		rgba(255, 255, 255, 0.4)
	);
	color: var(--brunswick-green);
	padding: 8px 12px;
	border-radius: 8px;
	font-size: 14px;
	box-shadow: var(--box-shadow);
}

.quantity-control {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.btn-qty {
	width: 34px;
	height: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	border: 1px solid #e6e6e6;
	background: #ffffff;
	color: var(--brunswick-green);
	cursor: pointer;
	transition: background 0.18s ease, transform 0.12s ease;
}

.btn-qty:hover {
	background: var(--sage);
	color: #fff;
	transform: translateY(-1px);
}

.btn-save-row {
	padding: 8px 12px;
	border-radius: 8px;
	border: none;
	background: linear-gradient(90deg, var(--fern-green), var(--hunter-green));
	color: #fff;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(58, 90, 64, 0.12);
	transition: transform var(--transition-speed),
		box-shadow var(--transition-speed);
}

.btn-save-row:hover {
	transform: translateY(-3px);
	box-shadow: var(--hover-shadow);
}

/* Table header and zebra rows */
.table-container thead th {
	background: linear-gradient(
		90deg,
		rgba(52, 78, 65, 0.06),
		rgba(83, 132, 90, 0.02)
	);
	color: var(--brunswick-green);
	font-weight: 600;
}

.table-container tbody tr:nth-child(odd) {
	background: #ffffff;
}
.table-container tbody tr:nth-child(even) {
	background: #fbfdfb;
}

/* Responsive tweaks: allow table to scroll on small screens */
@media (max-width: 900px) {
	.table-container table {
		display: block;
		overflow-x: auto;
		width: 100%;
	}
	.table-container input[type="number"] {
		width: 84px;
	}
	.main-title h2 {
		font-size: 22px;
	}
}

/* Small helper for inline note in other pages */
.note-inline {
	display: inline-block;
	font-size: 13px;
	color: #445544;
}

.table-container .btn-submit:hover {
	background: var(--brunswick-green);
}

/* Status Styles */
.status {
	padding: 6px 12px;
	border-radius: 20px;
	font-size: 14px;
	font-weight: 500;
	transition: all var(--transition-speed);
}

.status.in-stock {
	background: #e3f2e5;
	color: #2da544;
}

.status.low-stock {
	background: #fff4e5;
	color: #ffa116;
}

.status.out-stock {
	background: #fde8e8;
	color: #ef4444;
}

.status:hover {
	transform: scale(1.05);
}

/* Add Form Styles */
.form-container {
	max-width: 800px;
	margin: 20px auto;
	padding: 20px;
	background: white;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-header {
	margin-bottom: 24px;
}

.form-header h2 {
	color: var(--hunter-green);
	font-size: 24px;
	font-weight: 500;
}

.add-form {
	display: grid;
	gap: 20px;
}

.form-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.form-group label {
	color: var(--brunswick-green);
	font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 6px;
	font-size: 14px;
	transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
	outline: none;
	border-color: var(--fern-green);
}

.form-actions {
	display: flex;
	gap: 12px;
	margin-top: 24px;
}

.btn-submit,
.btn-cancel {
	padding: 10px 24px;
	border-radius: 6px;
	font-size: 14px;
	cursor: pointer;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: all 0.3s ease;
}

.btn-submit {
	background: var(--hunter-green);
	color: white;
	border: none;
}

.btn-cancel {
	background: #f5f5f5;
	color: #666;
	border: 1px solid #ddd;
}

.btn-submit:hover {
	background: var(--brunswick-green);
}

.btn-cancel:hover {
	background: #e5e5e5;
}

/* Inline per-row save button in update-stock table */
.btn-save-row {
	padding: 6px 12px;
	border-radius: 6px;
	font-size: 13px;
	cursor: pointer;
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: all var(--transition-speed);
	background: var(--hunter-green);
	color: white;
	border: none;
}

.btn-save-row:hover {
	background: var(--brunswick-green);
}

.table-container td[data-label="Aksi"] {
	text-align: center;
}

.form-group select {
	width: 100%;
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 6px;
	background: white;
	font-size: 14px;
}

.form-group select:focus {
	outline: none;
	border-color: var(--hunter-green);
	box-shadow: 0 0 0 2px rgba(64, 145, 108, 0.1);
}

/* Category filter row styles (update-stock.php) */
#filter-count improvements and responsive behaviour .filter-row {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 16px;
	flex-wrap: wrap; /* allow items to wrap on small widths */
}

.filter-row label {
	color: var(--brunswick-green);
	font-weight: 500;
	font-size: 14px;
}

#category-filter {
	padding: 8px 12px;
	font-size: 14px;
	border: 1px solid #ddd;
	border-radius: 6px;
	background: white;
	transition: border-color var(--transition-speed),
		box-shadow var(--transition-speed), transform var(--transition-speed);
	cursor: pointer;
	min-width: 0; /* allow shrinking when needed */
	flex: 0 1 220px; /* prefer 220px but allow shrinking */
	max-width: 100%;
}

#category-filter:hover {
	border-color: var(--fern-green);
}

#category-filter:focus {
	outline: none;
	border-color: var(--hunter-green);
	box-shadow: 0 4px 12px rgba(58, 90, 64, 0.06);
	transform: translateY(-1px);
}

#filter-count {
	font-size: 13px;
	color: #666;
	flex: 1 1 auto; /* take remaining space */
	text-align: right;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	margin-left: 12px;
	margin-bottom: 200px;
	min-width: 0; /* important for text-overflow inside flex */
}

/* Mobile: stack filter controls and show count on its own line */
@media screen and (max-width: 480px) {
	.filter-row {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
	}

	#category-filter {
		width: 100%;
		flex: 1 1 auto;
	}

	#filter-count {
		width: 100%;
		text-align: left;
		margin-left: 0;
		margin-top: 6px;
		white-space: normal;
		overflow: visible;
		text-overflow: clip;
	}

	/* Add extra spacing below the filter area so cards/tables don't touch it */
	.filter-row {
		margin-bottom: 18px; /* increased space on mobile */
		padding-bottom: 6px;
		border-bottom: 1px solid rgba(0, 0, 0, 0.04);
	}

	/* Ensure table container doesn't overlap when space is tight */
	.table-container {
		padding-top: 10px;
	}
}

/* Table Header Styles */
.table-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	gap: 20px;
}

.table-search {
	display: flex;
	align-items: center;
	background: #f5f5f5;
	padding: 8px 12px;
	border-radius: 6px;
	flex: 1;
}

.table-search i {
	color: var(--brunswick-green);
	margin-right: 8px;
}

.table-search input {
	border: none;
	background: none;
	outline: none;
	width: 100%;
	color: var(--brunswick-green);
}

.table-filter {
	display: flex;
	gap: 12px;
}

.table-filter select {
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 6px;
	color: var(--brunswick-green);
	background: white;
	cursor: pointer;
}

/* Table Action Buttons */
.actions {
	display: flex;
	gap: 8px;
}

.btn-edit,
.btn-delete {
	padding: 6px;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	display: flex;
	align-items: center;
}

.btn-edit {
	background: #e3f2e5;
	color: #2da544;
}

.btn-delete {
	background: #fde8e8;
	color: #ef4444;
}

.btn-edit:hover,
.btn-delete:hover {
	opacity: 0.8;
}

/* =============================================================================
   ACTIVE FILTERS & FILTER CHIPS
   ============================================================================= */

/* Active Filters Container */
.active-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem;
	padding: 1rem 1.25rem;
	background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
	border-radius: 10px;
	margin-bottom: 1.5rem;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	border: 1px solid #dee2e6;
	animation: slideInDown 0.3s ease-out;
	position: relative;
	overflow: hidden;
}

.active-filters::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(
		90deg,
		var(--fern-green),
		var(--hunter-green),
		var(--fern-green)
	);
	background-size: 200% 100%;
	animation: shimmer 3s linear infinite;
}

@keyframes shimmer {
	0% {
		background-position: -200% 0;
	}
	100% {
		background-position: 200% 0;
	}
}

@keyframes slideInDown {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Filters Label */
.filters-label {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-weight: 600;
	color: var(--brunswick-green);
	font-size: 0.9rem;
	white-space: nowrap;
	padding-right: 0.5rem;
	border-right: 2px solid #dee2e6;
	margin-right: 0.25rem;
}

.filters-label i {
	font-size: 1.1rem;
	color: var(--hunter-green);
}

/* Individual Filter Chip */
.filter-chip {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 0.75rem;
	background: white;
	border: 1.5px solid #dee2e6;
	border-radius: 25px;
	font-size: 0.875rem;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	transition: all 0.25s ease;
	animation: chipAppear 0.3s ease-out;
}

@keyframes chipAppear {
	from {
		opacity: 0;
		transform: scale(0.8);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

.filter-chip:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
	border-color: var(--fern-green);
}

.filter-chip i.bx {
	font-size: 1.1rem;
	color: var(--hunter-green);
}

.filter-chip .chip-label {
	font-weight: 600;
	color: #6c757d;
}

.filter-chip .chip-value {
	font-weight: 500;
	color: var(--brunswick-green);
	max-width: 150px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Remove Filter Button */
.filter-chip .remove-filter {
	background: none;
	border: none;
	color: #dc3545;
	cursor: pointer;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	transition: all 0.2s ease;
	margin-left: 0.25rem;
}

.filter-chip .remove-filter i {
	font-size: 1.2rem;
	transition: transform 0.2s ease;
}

.filter-chip .remove-filter:hover {
	background: #dc3545;
	color: white;
	transform: scale(1.1);
}

.filter-chip .remove-filter:hover i {
	transform: rotate(90deg);
}

.filter-chip .remove-filter:active {
	transform: scale(0.95);
}

/* Clear All Filters Button */
.clear-all-filters {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.5rem 1rem;
	background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
	color: white;
	border: none;
	border-radius: 25px;
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.25s ease;
	box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
	white-space: nowrap;
}

.clear-all-filters i {
	font-size: 1rem;
}

.clear-all-filters:hover {
	background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(220, 53, 69, 0.4);
}

.clear-all-filters:active {
	transform: translateY(0);
}

/* Chip Removal Animation */
.filter-chip.removing {
	animation: chipRemove 0.3s ease-out forwards;
}

@keyframes chipRemove {
	0% {
		opacity: 1;
		transform: scale(1);
	}
	50% {
		transform: scale(1.1) rotate(5deg);
	}
	100% {
		opacity: 0;
		transform: scale(0.8) rotate(-5deg);
	}
}

/* Active Filters Clearing Animation */
.active-filters.clearing {
	animation: filtersClear 0.3s ease-out forwards;
}

@keyframes filtersClear {
	0% {
		opacity: 1;
		transform: scale(1);
	}
	100% {
		opacity: 0;
		transform: scale(0.95);
	}
}

/* =============================================================================
   REAL-TIME SEARCH INDICATOR
   ============================================================================= */

/* Search Input Typing Indicator */
.search-box input.searching {
	border-color: var(--fern-green);
	box-shadow: 0 0 0 3px rgba(88, 129, 87, 0.1);
	transition: all 0.3s ease;
}

.search-box input.searching::placeholder {
	color: var(--hunter-green);
	font-style: italic;
}

/* Search Icon Animation saat typing */
.search-box.active i {
	animation: searchPulse 1s ease-in-out infinite;
}

@keyframes searchPulse {
	0%,
	100% {
		transform: scale(1);
		opacity: 1;
	}
	50% {
		transform: scale(1.2);
		opacity: 0.7;
	}
}

/* Table Pagination */
.table-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin-top: 20px;
}

.btn-page {
	padding: 8px 12px;
	border: 1px solid #ddd;
	background: white;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.3s ease;
	color: var(--brunswick-green);
}

.btn-page.active,
.btn-page:hover {
	background: var(--hunter-green);
	color: white;
	border-color: var(--hunter-green);
}

/* Sort Icons */
th {
	cursor: pointer;
	user-select: none;
}

th i {
	font-size: 14px;
	margin-left: 4px;
	transition: transform 0.3s ease;
}

th:hover i {
	transform: translateY(-2px);
}

/* Sortable Column Styles */
th.sortable {
	position: relative;
	cursor: pointer;
}

th.sortable a {
	color: inherit;
	text-decoration: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-right: 24px; /* Space for the sort indicator */
	width: 100%;
}

/* Sortable header styling */
.sort-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
}

.sort-link {
	display: flex;
	align-items: center;
	justify-content: center;
	color: inherit;
	text-decoration: none;
	padding: 4px;
	border-radius: 4px;
}

.sort-link:hover {
	background-color: rgba(255, 255, 255, 0.15);
}

.sort-link i {
	font-size: 18px;
}

/* Remove old unused sort styles */
th.sortable::after {
	content: none;
}

/* Active sort indicators with arrows */
th.sortable.sort-asc::after {
	content: "\ea77"; /* bx-up-arrow-alt */
	opacity: 1;
	color: var(--hunter-green);
}

th.sortable.sort-desc::after {
	content: "\ea5f"; /* bx-down-arrow-alt */
	opacity: 1;
	color: var(--hunter-green);
}

th.sortable:hover {
	background-color: rgba(255, 255, 255, 0.1);
}

th.sortable:hover::after {
	opacity: 0.9;
}

/* Make entire header cell clickable */
th.sortable a {
	display: block;
	width: 100%;
	height: 100%;
	position: absolute;
	top: 0;
	left: 0;
	padding: 12px;
	box-sizing: border-box;
	z-index: 1;
}

/* Fix table header text positioning */
th.sortable {
	padding: 0; /* Remove default padding */
	position: relative;
}

/* Ensure header content stays visible */
th.sortable span {
	position: relative;
	z-index: 0;
	pointer-events: none;
	padding: 12px 0;
	display: block;
}

/* Table sorting styles */
table th a {
	color: inherit;
	text-decoration: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

table th a:hover {
	text-decoration: underline;
}

table th i {
	font-size: 16px;
	margin-left: 4px;
}

/* Fix for mobile view with sortable columns */
@media screen and (max-width: 480px) {
	td::before {
		width: 42%; /* Wider to fit longer Indonesian labels */
	}
}

/* Alert Styles */
.alert {
	padding: 15px;
	border-radius: 6px;
	margin-bottom: 20px;
	text-align: center;
	animation: slideIn 0.3s ease-out;
}

.alert.success {
	background-color: #e3f2e5;
	color: #2da544;
	border: 1px solid #2da544;
}

.alert.error {
	background-color: #fde8e8;
	color: #ef4444;
	border: 1px solid #ef4444;
}

/* Login Page Styles */
.login-page {
	background: linear-gradient(120deg, var(--timberwolf), var(--sage));
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
}

.login-container {
	width: 100%;
	max-width: 500px;
	padding: 20px;
}

.login-form {
	background: white;
	padding: 40px;
	border-radius: 12px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
	transition: transform 0.3s, box-shadow 0.3s;
}

.login-form:hover {
	transform: translateY(-5px);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.login-form h2 {
	text-align: center;
	color: var(--brunswick-green);
	margin-bottom: 30px;
	font-size: 28px;
	font-weight: 600;
}

.input-group {
	position: relative;
	margin-bottom: 20px;
}

.input-group i {
	position: absolute;
	left: 15px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--fern-green);
	font-size: 20px;
	transition: color 0.3s;
}

.input-group input,
.input-group select {
	width: 100%;
	padding: 15px 15px 15px 50px;
	border: 2px solid #e0e0e0;
	border-radius: 8px;
	font-size: 16px;
	color: var(--brunswick-green);
	transition: border-color 0.3s, box-shadow 0.3s;
}

.input-group input:focus,
.input-group select:focus {
	outline: none;
	border-color: var(--fern-green);
	box-shadow: 0 0 0 3px rgba(88, 129, 87, 0.2);
}

.input-group input:focus + i,
.input-group select:focus + i {
	color: var(--hunter-green);
}

.btn-login {
	width: 100%;
	padding: 16px;
	margin-top: 25px;
	background: linear-gradient(
		to right,
		var(--fern-green),
		var(--hunter-green)
	);
	color: white;
	border: none;
	border-radius: 8px;
	font-size: 18px;
	font-weight: 600;
	cursor: pointer;
	transition: transform 0.3s, box-shadow 0.3s;
	box-shadow: 0 4px 15px rgba(58, 90, 64, 0.2);
}

.btn-login:hover {
	transform: translateY(-3px);
	box-shadow: 0 6px 20px rgba(58, 90, 64, 0.3);
}

.btn-login:active {
	transform: translateY(0);
}

/* Alert Styles - Improved */
.alert {
	padding: 15px;
	border-radius: 8px;
	margin-bottom: 25px;
	position: relative;
	display: flex;
	align-items: center;
	font-size: 16px;
}

.alert::before {
	font-family: "boxicons";
	margin-right: 12px;
	font-size: 24px;
}

.alert.error {
	background: #fee2e2;
	color: #b91c1c;
	border-left: 4px solid #ef4444;
}

.alert.error::before {
	content: "\ed12"; /* bx-error-circle */
}

/* Register Form Styles - Enhanced */
.register-form {
	max-width: 550px;
}

.alert.success {
	background: #dcfce7;
	color: #166534;
	border-left: 4px solid #22c55e;
}

.alert.success::before {
	content: "\e901"; /* bx-check-circle */
}

.alert a {
	color: inherit;
	text-decoration: underline;
	font-weight: 600;
	margin-left: 5px;
}

.alert a:hover {
	text-decoration: none;
}

.text-center {
	text-align: center;
	margin-top: 25px;
	color: #666;
}

.text-center a {
	color: var(--hunter-green);
	text-decoration: none;
	font-weight: 600;
	transition: color 0.3s;
}

.text-center a:hover {
	color: var(--fern-green);
	text-decoration: underline;
}

.btn-back {
	display: block;
	text-align: center;
	margin-top: 20px;
	color: var(--brunswick-green);
	text-decoration: none;
	font-weight: 500;
	transition: color 0.3s;
}

.btn-back:hover {
	color: var(--fern-green);
	text-decoration: underline;
}

/* =============================================================================
   COLUMN VISIBILITY TOGGLE
   ============================================================================= */

/* Column Visibility Control Container */
.column-visibility-control {
	position: relative;
	display: inline-block;
}

/* Column Toggle Button */
.btn-column-toggle {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.6rem 1rem;
	background: linear-gradient(
		135deg,
		var(--hunter-green) 0%,
		var(--fern-green) 100%
	);
	color: white;
	border: none;
	border-radius: 8px;
	font-size: 0.9rem;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	white-space: nowrap;
}

.btn-column-toggle i {
	font-size: 1.2rem;
}

.btn-column-toggle:hover {
	background: linear-gradient(135deg, var(--fern-green) 0%, var(--sage) 100%);
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-column-toggle:active {
	transform: translateY(0);
}

/* Column Dropdown */
.column-dropdown {
	position: absolute;
	top: calc(100% + 0.5rem);
	right: 0;
	min-width: 280px;
	background: white;
	border-radius: 10px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-10px);
	transition: all 0.3s ease;
	z-index: 1000;
	border: 1px solid #e0e0e0;
}

.column-dropdown.show {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.column-dropdown.resetting {
	animation: resetPulse 0.3s ease;
}

@keyframes resetPulse {
	0%,
	100% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.05);
	}
}

/* Dropdown Header */
.dropdown-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1rem 1.25rem;
	border-bottom: 2px solid #f0f0f0;
	background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
	border-radius: 10px 10px 0 0;
}

.dropdown-header span {
	font-weight: 700;
	font-size: 0.95rem;
	color: var(--brunswick-green);
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.dropdown-header span::before {
	content: "";
	width: 4px;
	height: 16px;
	background: var(--hunter-green);
	border-radius: 2px;
}

/* Reset Button */
.btn-reset-columns {
	background: none;
	border: none;
	color: #6c757d;
	cursor: pointer;
	padding: 0.4rem;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 6px;
	transition: all 0.2s ease;
}

.btn-reset-columns i {
	font-size: 1.3rem;
}

.btn-reset-columns:hover {
	background: #f0f0f0;
	color: var(--hunter-green);
	transform: rotate(180deg);
}

.btn-reset-columns:active {
	transform: rotate(180deg) scale(0.9);
}

/* Dropdown Body */
.dropdown-body {
	padding: 0.75rem 0;
	max-height: 400px;
	overflow-y: auto;
}

.dropdown-body::-webkit-scrollbar {
	width: 6px;
}

.dropdown-body::-webkit-scrollbar-track {
	background: #f0f0f0;
	border-radius: 3px;
}

.dropdown-body::-webkit-scrollbar-thumb {
	background: var(--sage);
	border-radius: 3px;
}

.dropdown-body::-webkit-scrollbar-thumb:hover {
	background: var(--hunter-green);
}

/* Column Checkbox */
.column-checkbox {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.75rem 1.25rem;
	cursor: pointer;
	transition: all 0.2s ease;
	user-select: none;
	position: relative;
}

.column-checkbox:hover {
	background: #f8f9fa;
}

.column-checkbox.essential {
	cursor: not-allowed;
	opacity: 0.7;
	background: #fafafa;
}

.column-checkbox.toggled {
	animation: checkboxToggle 0.3s ease;
}

@keyframes checkboxToggle {
	0%,
	100% {
		background: transparent;
	}
	50% {
		background: #e8f5e9;
	}
}

/* Custom Checkbox Styling */
.column-checkbox input[type="checkbox"] {
	appearance: none;
	width: 20px;
	height: 20px;
	border: 2px solid #dee2e6;
	border-radius: 5px;
	cursor: pointer;
	position: relative;
	transition: all 0.3s ease;
	flex-shrink: 0;
}

.column-checkbox input[type="checkbox"]:hover {
	border-color: var(--fern-green);
	box-shadow: 0 0 0 3px rgba(88, 129, 87, 0.1);
}

.column-checkbox input[type="checkbox"]:checked {
	background: var(--hunter-green);
	border-color: var(--hunter-green);
}

.column-checkbox input[type="checkbox"]:checked::after {
	content: "✓";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: white;
	font-size: 14px;
	font-weight: bold;
}

.column-checkbox input[type="checkbox"]:disabled {
	cursor: not-allowed;
	opacity: 0.5;
	background: #e9ecef;
	border-color: #ced4da;
}

/* Checkbox Label */
.checkbox-label {
	flex: 1;
	font-size: 0.9rem;
	color: var(--brunswick-green);
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.checkbox-label i {
	font-size: 1rem;
	color: #6c757d;
}

.column-checkbox small {
	font-size: 0.75rem;
	color: #6c757d;
	font-style: italic;
	margin-left: 0.5rem;
}

/* Hidden Column State */
.column-hidden {
	display: none !important;
}

/* Empty State (when all columns hidden) */
.table-container table tbody tr:not(:has(td:not(.column-hidden))) {
	display: none;
}

/* =============================================================================
   RESPONSIVE: FILTER CHIPS (Mobile)
   ============================================================================= */
@media screen and (max-width: 768px) {
	/* Active Filters Container - Mobile */
	.active-filters {
		flex-direction: column;
		align-items: stretch;
		gap: 0.5rem;
		padding: 0.75rem;
	}

	/* Filters Label - Mobile */
	.filters-label {
		border-right: none;
		border-bottom: 2px solid #dee2e6;
		padding-bottom: 0.5rem;
		margin-bottom: 0.25rem;
		justify-content: center;
	}

	/* Filter Chips Wrapper for Mobile */
	.active-filters .filter-chip,
	.active-filters .clear-all-filters {
		width: 100%;
		justify-content: space-between;
	}

	.filter-chip .chip-value {
		max-width: none;
		flex: 1;
		text-align: right;
	}

	/* Clear All Button - Full Width on Mobile */
	.clear-all-filters {
		justify-content: center;
		margin-top: 0.25rem;
	}
}

@media screen and (max-width: 480px) {
	/* Extra Small Devices */
	.active-filters {
		padding: 0.5rem;
	}

	.filter-chip {
		font-size: 0.8rem;
		padding: 0.4rem 0.6rem;
	}

	.filters-label {
		font-size: 0.85rem;
	}

	.clear-all-filters {
		font-size: 0.8rem;
		padding: 0.4rem 0.75rem;
	}

	/* Column Visibility - Mobile */
	.btn-column-toggle span {
		display: none; /* Hide text, show only icon */
	}

	.column-dropdown {
		right: auto;
		left: 0;
		min-width: calc(100vw - 2rem);
		max-width: 320px;
	}
}

/* =============================================================================
   RESPONSIVE: COLUMN VISIBILITY (Tablet & Mobile)
   ============================================================================= */
@media screen and (max-width: 768px) {
	.column-visibility-control {
		order: -1; /* Move to start on mobile */
	}

	.table-header {
		flex-wrap: wrap;
	}

	.btn-column-toggle {
		font-size: 0.85rem;
		padding: 0.5rem 0.85rem;
	}

	.column-dropdown {
		min-width: 260px;
	}

	.dropdown-header {
		padding: 0.85rem 1rem;
	}

	.column-checkbox {
		padding: 0.65rem 1rem;
	}
}

/* Responsive adjustments for login/register */
@media screen and (max-width: 576px) {
	.login-container {
		padding: 15px;
	}

	.login-form {
		padding: 25px 20px;
	}

	.login-form h2 {
		font-size: 24px;
		margin-bottom: 20px;
	}

	.input-group input,
	.input-group select {
		padding: 12px 12px 12px 45px;
		font-size: 15px;
	}

	.btn-login {
		padding: 14px;
		font-size: 16px;
	}
}

/* Table Filter Styles */
.table-filters {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 20px;
	margin-bottom: 20px;
}

.search-box {
	display: flex;
	align-items: center;
	background: #f5f5f5;
	padding: 8px 12px;
	border-radius: 6px;
	flex: 1;
}

.search-box i {
	color: var(--brunswick-green);
	margin-right: 8px;
}

.search-box input {
	border: none;
	background: none;
	outline: none;
	width: 100%;
}

.filter-group {
	display: flex;
	gap: 10px;
}

.filter-group select {
	padding: 8px 12px;
	border: 1px solid #ddd;
	border-radius: 6px;
	background: white;
}

.btn-filter {
	padding: 8px 16px;
	background: var(--hunter-green);
	color: white;
	border: none;
	border-radius: 6px;
	cursor: pointer;
}

.btn-filter:hover {
	background: var(--brunswick-green);
}

.no-data {
	text-align: center;
	color: #666;
	padding: 20px;
}

/* =============================================================================
   EMPTY STATE STYLES - Enhanced UX
   ============================================================================= */

.empty-state-cell {
	padding: 0 !important;
	border: none !important;
	background: transparent !important;
}

.empty-state {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 4rem 2rem;
	text-align: center;
	background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
	border-radius: 12px;
	margin: 1rem;
	border: 2px dashed #dee2e6;
	min-height: 400px;
	animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.empty-state-icon {
	font-size: 6rem;
	color: #adb5bd;
	margin-bottom: 1.5rem;
	animation: float 3s ease-in-out infinite;
}

@keyframes float {
	0%,
	100% {
		transform: translateY(0px);
	}
	50% {
		transform: translateY(-15px);
	}
}

.empty-state-icon i {
	display: block;
	line-height: 1;
}

.empty-state-title {
	font-size: 1.75rem;
	font-weight: 600;
	color: #495057;
	margin-bottom: 0.75rem;
	letter-spacing: -0.5px;
}

.empty-state-description {
	font-size: 1rem;
	color: #6c757d;
	line-height: 1.6;
	margin-bottom: 2rem;
	max-width: 500px;
}

.empty-state-actions {
	display: flex;
	gap: 1rem;
	flex-wrap: wrap;
	justify-content: center;
	margin-bottom: 2rem;
}

.empty-state-actions .btn-add,
.empty-state-actions .btn-secondary {
	padding: 0.875rem 1.75rem;
	font-size: 1rem;
	font-weight: 500;
	border-radius: 8px;
	transition: all 0.3s ease;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.empty-state-actions .btn-add.btn-lg {
	padding: 1.125rem 2.25rem;
	font-size: 1.125rem;
	box-shadow: 0 6px 12px rgba(88, 129, 87, 0.3);
}

.empty-state-actions .btn-add:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 16px rgba(88, 129, 87, 0.4);
}

.empty-state-actions .btn-secondary {
	background: white;
	color: #495057;
	border: 2px solid #dee2e6;
}

.empty-state-actions .btn-secondary:hover {
	background: #f8f9fa;
	border-color: #adb5bd;
	transform: translateY(-2px);
	box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.empty-state-help {
	max-width: 600px;
	margin-top: 1.5rem;
	padding: 1.25rem;
	background: white;
	border-radius: 8px;
	border-left: 4px solid var(--sage);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.help-text {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	text-align: left;
	font-size: 0.9rem;
	color: #495057;
	line-height: 1.6;
	margin: 0;
}

.help-text i {
	font-size: 1.5rem;
	color: var(--sage);
	flex-shrink: 0;
	margin-top: 0.1rem;
}

.help-text strong {
	color: var(--hunter-green);
	font-weight: 600;
}

/* Responsive empty state */
@media (max-width: 768px) {
	.empty-state {
		padding: 3rem 1.5rem;
		min-height: 350px;
		margin: 0.5rem;
	}

	.empty-state-icon {
		font-size: 4.5rem;
		margin-bottom: 1rem;
	}

	.empty-state-title {
		font-size: 1.5rem;
	}

	.empty-state-description {
		font-size: 0.95rem;
		margin-bottom: 1.5rem;
	}

	.empty-state-actions {
		flex-direction: column;
		width: 100%;
		gap: 0.75rem;
	}

	.empty-state-actions .btn-add,
	.empty-state-actions .btn-secondary {
		width: 100%;
		justify-content: center;
	}

	.help-text {
		font-size: 0.85rem;
	}
}

/* =============================================================================
   PAGINATION STYLES - Performance & UX Enhancement
   ============================================================================= */

.pagination-container {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1.5rem 1rem;
	margin-top: 1rem;
	background: white;
	border-radius: 8px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
	border: 1px solid #e9ecef;
}

.pagination-info {
	color: #6c757d;
	font-size: 0.9rem;
	font-weight: 500;
}

.pagination-info span {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.pagination {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.pagination-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.625rem 1rem;
	background: white;
	color: var(--hunter-green);
	border: 1.5px solid #dee2e6;
	border-radius: 6px;
	font-size: 0.9rem;
	font-weight: 500;
	text-decoration: none;
	transition: all 0.3s ease;
	cursor: pointer;
}

.pagination-btn:hover:not(.disabled) {
	background: var(--fern-green);
	color: white;
	border-color: var(--fern-green);
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(88, 129, 87, 0.2);
}

.pagination-btn.disabled {
	opacity: 0.4;
	cursor: not-allowed;
	pointer-events: none;
}

.pagination-btn i {
	font-size: 1.1rem;
	line-height: 1;
}

.pagination-numbers {
	display: flex;
	align-items: center;
	gap: 0.375rem;
}

.pagination-number {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 0.75rem;
	background: white;
	color: #495057;
	border: 1.5px solid #dee2e6;
	border-radius: 6px;
	font-size: 0.9rem;
	font-weight: 500;
	text-decoration: none;
	transition: all 0.3s ease;
	cursor: pointer;
}

.pagination-number:hover:not(.active) {
	background: #f8f9fa;
	border-color: var(--sage);
	color: var(--hunter-green);
	transform: translateY(-1px);
}

.pagination-number.active {
	background: var(--fern-green);
	color: white;
	border-color: var(--fern-green);
	box-shadow: 0 4px 8px rgba(88, 129, 87, 0.3);
	cursor: default;
	font-weight: 600;
}

.pagination-ellipsis {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	color: #adb5bd;
	font-weight: 600;
	font-size: 1rem;
	user-select: none;
}

/* Pagination animation for active page */
.pagination-number.active {
	animation: pageActive 0.3s ease;
}

@keyframes pageActive {
	0% {
		transform: scale(0.95);
		opacity: 0.8;
	}
	50% {
		transform: scale(1.05);
	}
	100% {
		transform: scale(1);
		opacity: 1;
	}
}

/* Responsive pagination */
@media (max-width: 768px) {
	.pagination-container {
		flex-direction: column;
		gap: 1rem;
		padding: 1rem;
	}

	.pagination-info {
		width: 100%;
		text-align: center;
		font-size: 0.85rem;
	}

	.pagination {
		width: 100%;
		flex-wrap: wrap;
		justify-content: center;
	}

	.pagination-btn {
		padding: 0.5rem 0.75rem;
		font-size: 0.85rem;
	}

	.pagination-btn span {
		display: none; /* Hide text on mobile, keep icons */
	}

	.pagination-btn i {
		margin: 0;
	}

	.pagination-numbers {
		gap: 0.25rem;
	}

	.pagination-number {
		min-width: 36px;
		height: 36px;
		font-size: 0.85rem;
		padding: 0 0.5rem;
	}

	.pagination-ellipsis {
		min-width: 30px;
		height: 36px;
	}
}

@media (max-width: 480px) {
	.pagination-number {
		min-width: 32px;
		height: 32px;
		font-size: 0.8rem;
	}

	/* Show only current page and adjacent pages on very small screens */
	.pagination-numbers {
		max-width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
		scrollbar-width: thin;
	}
}

/* Nav Separator Styles */
.nav-separator {
	padding: 10px 12px;
	margin: 10px 0;
	border-top: 1px solid rgba(163, 177, 138, 0.2);
	border-bottom: 1px solid rgba(163, 177, 138, 0.2);
}

.separator-text {
	color: var(--sage);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 1px;
	opacity: 0.8;
}

/* User Management Styles */
.btn-add {
	padding: 8px 16px;
	background: var(--hunter-green);
	color: white;
	border-radius: 6px;
	text-decoration: none;
	display: flex;
	align-items: center;
	gap: 8px;
}

.btn-add:hover {
	background: var(--brunswick-green);
}

.role {
	padding: 4px 8px;
	border-radius: 4px;
	font-size: 12px;
}

.role.admin {
	background: #e3f2e5;
	color: #2da544;
}

.role.staff {
	background: #e5f6ff;
	color: #0284c7;
}

.btn-toggle {
	padding: 6px 12px;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 12px;
}

.btn-toggle.active {
	background: #fde8e8;
	color: #ef4444;
}

.btn-toggle.inactive {
	background: #e3f2e5;
	color: #2da544;
}

.action-form {
	display: inline-block;
}

/* Quantity Control Styles */
.quantity-control {
	display: inline-flex;
	align-items: center;
	gap: 0;
	background: #fff;
	border-radius: 6px;
	border: 1px solid #ddd;
}

.quantity-control input[type="number"] {
	width: 60px;
	text-align: center;
	border: none;
	padding: 8px 0;
	-moz-appearance: textfield;
	appearance: textfield;
}

.quantity-control input[type="number"]::-webkit-inner-spin-button,
.quantity-control input[type="number"]::-webkit-outer-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.btn-qty {
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	background: #f5f5f5;
	cursor: pointer;
	transition: all 0.2s;
}

.btn-qty:hover {
	background: var(--hunter-green);
	color: white;
}

/* Responsive adjustments */
@media screen and (max-width: 768px) {
	.table-filters {
		flex-direction: column;
	}

	.filter-group {
		width: 100%;
		flex-wrap: wrap;
	}

	.filter-group select,
	.btn-filter {
		flex: 1;
		min-width: 150px;
	}

	.table-header {
		flex-direction: column;
		gap: 10px;
	}

	.btn-add {
		width: 100%;
		justify-content: center;
	}
}

/* Responsive Adjustments */
@media screen and (max-width: 768px) {
	.table-header {
		flex-direction: column;
	}

	.table-filter {
		width: 100%;
	}

	.table-filter select {
		flex: 1;
	}
}

/* Mobile Responsive Styles */
@media screen and (max-width: 480px) {
	/* Filter adjustments */
	.table-filters {
		flex-direction: column;
		gap: 10px;
		margin: 0 10px 15px 10px;
	}

	.search-box {
		width: 100%;
	}

	.filter-group {
		width: 100%;
		flex-wrap: wrap;
		gap: 8px;
	}

	.filter-group select {
		flex: 1;
		min-width: 140px;
	}

	.btn-filter {
		width: 100%;
	}

	/* Table container */
	.table-container {
		margin: 10px;
		padding: 15px;
		overflow-x: hidden;
	}

	/* Table responsive */
	table,
	thead,
	tbody,
	th,
	td,
	tr {
		display: block;
	}

	thead tr {
		display: none;
	}

	tr {
		margin-bottom: 15px;
		border: 1px solid #ddd;
		border-radius: 8px;
		background: white;
		box-shadow: var(--box-shadow);
	}

	td {
		border: none;
		border-bottom: 1px solid #eee;
		position: relative;
		padding-left: 50% !important;
		text-align: right;
		min-height: 40px;
		display: flex;
		align-items: center;
		justify-content: flex-end;
	}

	td:last-child {
		border-bottom: none;
	}

	td::before {
		content: attr(data-label);
		position: absolute;
		left: 10px;
		width: 45%;
		padding-right: 10px;
		white-space: nowrap;
		text-align: left;
		font-weight: 500;
		color: var(--brunswick-green);
	}

	/* Status badge adjustments */
	.status {
		margin-left: auto;
	}

	/* No data message */
	.no-data {
		text-align: center;
		padding: 20px 10px;
	}

	/* Main title adjustment */
	.main-title {
		padding: 0 15px;
		margin-bottom: 15px;
	}

	.main-title h2 {
		font-size: 22px;
	}

	/* Remove hover effects */
	tbody tr:hover {
		transform: none;
		box-shadow: var(--box-shadow);
	}
}

/* Card Loading Skeleton */
.skeleton {
	animation: pulse 1.5s infinite;
	background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
	background-size: 200% 100%;
}

@keyframes pulse {
	0% {
		background-position: 200% 0;
	}
	100% {
		background-position: -200% 0;
	}
}

/* Scrollbar Styling */
::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}

::-webkit-scrollbar-track {
	background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
	background: var(--sage);
	border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
	background: var(--hunter-green);
}

/* Responsive Font Sizes */
@media screen and (max-width: 768px) {
	body {
		font-size: 14px;
	}

	.main-title h2 {
		font-size: 24px;
	}

	.card h3 {
		font-size: 20px;
	}
}

/* Last Login Styles */
.last-login {
	font-size: 13px;
}

.last-login .timestamp,
.last-login .never-login {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 8px;
	border-radius: 4px;
	background: #f8f9fa;
}

.last-login .timestamp {
	color: #2f5c45;
	background: #e3f2e5;
}

.last-login .never-login {
	color: #dc2626;
	background: #fef2f2;
}

.last-login i {
	font-size: 16px;
}

.menu-icon-btn,
.sidebar-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border: none;
	background: transparent;
	cursor: pointer;
	color: #e4efe9;
}
.menu-icon {
	font-size: 22px;
}

/* Sidebar default closed */
nav .sidebar {
	position: fixed;
	top: 0;
	left: -260px;
	width: 260px;
	height: 100vh;
	background: var(--hunter-green);
	z-index: 1001;
	overflow-y: auto;
	transition: left 0.3s ease, transform 0.3s ease;
}
body.sidebar-open nav .sidebar,
nav.open .sidebar {
	left: 0;
}

/* Overlay: hidden on mobile per request; used only on desktop */
nav .overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.35);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.2s;
	z-index: 1000;
}

/* Desktop: show overlay and push content */
@media (min-width: 992px) {
	body {
		padding-left: 0;
	}
	body.sidebar-open {
		padding-left: 260px;
	}
	nav .overlay {
		display: block;
	}
	body.sidebar-open nav .overlay {
		opacity: 1;
		pointer-events: auto;
	}
}

/* Mobile: show sidebar full-screen in front and hide overlay */
@media (max-width: 991px) {
	nav .sidebar {
		width: 100vw;
		left: -100vw;
		transform: translateX(0);
		z-index: 2000; /* ensure it's on top */
		box-shadow: none;
	}
	nav.open .sidebar,
	body.sidebar-open nav .sidebar {
		left: 0;
	}
	/* Hide overlay entirely on mobile */
	nav .overlay {
		display: none !important;
	}
}

/* Modal styles for custom pop-up */
.custom-modal-overlay {
	position: fixed;
	z-index: 9999;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	background: rgba(0, 0, 0, 0.35);
	display: flex;
	align-items: center;
	justify-content: center;
}
.custom-modal {
	background: #fff;
	border-radius: 12px;
	box-shadow: var(--box-shadow);
	padding: 2rem 1.5rem 1.2rem 1.5rem;
	max-width: 350px;
	width: 90vw;
	text-align: center;
	position: relative;
	animation: fadeInModal 0.2s;
}
@keyframes fadeInModal {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}
.custom-modal .modal-icon {
	font-size: 2.5rem;
	display: block;
	margin-bottom: 0.5rem;
}
.custom-modal .modal-title {
	font-weight: 600;
	font-size: 1.2rem;
	margin-bottom: 0.5rem;
}
.custom-modal .modal-message {
	margin-bottom: 1.2rem;
	color: #333;
}
.custom-modal .modal-actions {
	display: flex;
	justify-content: center;
	gap: 0.7rem;
}
.custom-modal .modal-btn {
	padding: 0.5rem 1.2rem;
	border: none;
	border-radius: 6px;
	font-size: 1rem;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.2s;
}
.custom-modal .modal-btn.ok {
	background: var(--fern-green);
	color: #fff;
}
.custom-modal .modal-btn.cancel {
	background: #eee;
	color: #444;
}
.custom-modal .modal-btn.ok:hover {
	background: var(--hunter-green);
}
.custom-modal .modal-btn.cancel:hover {
	background: #ccc;
}
.custom-modal .modal-close {
	position: absolute;
	top: 0.7rem;
	right: 0.7rem;
	background: none;
	border: none;
	font-size: 1.3rem;
	color: #888;
	cursor: pointer;
	transition: color 0.2s;
}
.custom-modal .modal-close:hover {
	color: #222;
}

/* Icon color variations */
.custom-modal .modal-icon.success {
	color: var(--fern-green);
}
.custom-modal .modal-icon.error {
	color: #e74c3c;
}
.custom-modal .modal-icon.warning {
	color: #f39c12;
}

/* Last Updated Column Styling */
.last-updated-display {
	font-size: 0.9em;
	color: #666;
	font-style: italic;
}

.last-updated-display.recent {
	color: var(--fern-green);
	font-weight: 500;
}

/* Responsive styling for Last Updated column */
@media (max-width: 768px) {
	.last-updated-display {
		font-size: 0.8em;
		display: block;
		margin-top: 4px;
	}
}
