/* 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);
}

/* --- 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;
}

/* 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;
}

/* 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;
}

/* 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;
}
