/* RESET completo active AdminLTE */
.nav-sidebar .nav-link.active {
	background-color: transparent !important;
	box-shadow: none !important;
	color: #ffffff !important; /* <<< FONDAMENTALE */
}

/* icona coerente */
.nav-sidebar .nav-link.active .nav-icon {
	color: #ffffff !important;
}

/* Sottolineatura SOLO del testo */
.nav-sidebar .nav-link.active p {
	display: inline;
	padding-bottom: 2px;
	color: #ffffff !important; /* <<< FONDAMENTALE */
	background-image: linear-gradient(
		to right,
		rgba(255, 255, 255, 0.25),
		rgba(255, 255, 255, 0.25)
	);
	background-position: 0 100%;
	background-repeat: no-repeat;
	background-size: 100% 1px;
}

/* Evita hover invasivo */
.nav-sidebar .nav-link.active:hover {
	background-color: transparent !important;
}

/* ==========================================================================
   login page 
   ========================================================================== */
	body.login-page {
		min-height: 100vh;
		margin: 0;
		display: flex;
		align-items: center;
		justify-content: center;
		background: linear-gradient(180deg, #f4f7f2 0%, #edf2ec 45%, #e8eee8 100%);
		position: relative;
		overflow: hidden;
		font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	}
	
	body.login-page::before {
		content: "";
		position: absolute;
		inset: 0;
		background:
			radial-gradient(circle at 15% 20%, rgba(79, 143, 88, 0.08), transparent 18%),
			radial-gradient(circle at 85% 18%, rgba(47, 110, 66, 0.08), transparent 16%);
		pointer-events: none;
	}
	
	body.login-page::after {
		content: "";
		position: absolute;
		inset: 0;
		background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1440' height='1024' viewBox='0 0 1440 1024'%3E%3Cg stroke='rgba(79,143,88,0.14)' stroke-width='1' fill='none'%3E%3Cpath d='M180 250 C 290 210, 380 220, 470 280'/%3E%3Cpath d='M470 280 C 600 360, 720 350, 860 250'/%3E%3Cpath d='M860 250 C 980 170, 1090 180, 1230 250'/%3E%3Cpath d='M320 620 C 460 560, 610 565, 760 650'/%3E%3Cpath d='M760 650 C 900 730, 1060 725, 1180 640'/%3E%3Cpath d='M470 280 L 420 430'/%3E%3Cpath d='M860 250 L 800 460'/%3E%3Cpath d='M760 650 L 720 800'/%3E%3C/g%3E%3C/svg%3E");
		background-repeat: no-repeat;
		background-size: cover;
		opacity: 0.22;
		pointer-events: none;
	}
	
	.sherwood-login-wrapper {
		position: relative;
		z-index: 2;
		width: 100%;
		max-width: 430px;
		padding: 20px;
	}
	
	.sherwood-login-header {
		text-align: center;
		margin-bottom: 24px;
		animation: sherwoodFadeUp 0.7s ease-out;
	}
	
	.sherwood-login-badge {
		width: 56px;
		height: 56px;
		margin: 0 auto 16px;
		border-radius: 16px;
		border: 1px solid #d9e5d9;
		background: #ffffff;
		box-shadow: 0 8px 24px rgba(26, 45, 31, 0.06);
		display: flex;
		align-items: center;
		justify-content: center;
	}
	
	.sherwood-login-badge-dot {
		width: 26px;
		height: 26px;
		border-radius: 50%;
		background: radial-gradient(circle at 35% 35%, #cbe8a7 0%, #7ab56c 52%, #3d6b47 100%);
	}
	
	.sherwood-login-title {
		font-size: 2rem;
		font-weight: 600;
		letter-spacing: -0.02em;
		color: #263328;
		margin-bottom: 8px;
	}
	
	.sherwood-login-subtitle {
		margin: 0;
		font-size: 0.95rem;
		line-height: 1.6;
		color: #66756b;
	}
	
	.sherwood-login-card-shell {
		border-radius: 24px;
		border: 1px solid #dbe5db;
		background: #ffffff;
		box-shadow: 0 18px 50px rgba(26, 45, 31, 0.08);
		animation: sherwoodFadeUp 0.9s ease-out;
	}
	
	.sherwood-login-card {
		padding: 30px;
	}
	
	.sherwood-login-msg {
		text-align: center;
		margin-bottom: 24px;
		font-size: 0.95rem;
		color: #718076;
	}
	
	.sherwood-login-footer {
		margin-top: 22px;
		padding-top: 18px;
		border-top: 1px solid #edf2ec;
		display: flex;
		justify-content: space-between;
		font-size: 0.75rem;
		color: #93a095;
	}
	
	.sherwood-login-card .form-control {
		height: 46px;
		border-radius: 12px;
		border: 1px solid #d7e1d6;
		background: #fbfcfb;
		color: #243128;
		box-shadow: none;
		transition: all 0.2s ease;
	}
	
	.sherwood-login-card .form-control::placeholder {
		color: #9ba79d;
	}
	
	.sherwood-login-card .form-control:focus {
		border-color: #6aa56f;
		background: #ffffff;
		box-shadow: 0 0 0 0.2rem rgba(122, 181, 108, 0.12);
		color: #243128;
	}
	
	.sherwood-login-card .input-group-text {
		border-radius: 12px;
		border: 1px solid #d7e1d6;
		background: #fbfcfb;
		color: #78867b;
	}
	
	.sherwood-login-card .btn-primary,
	.sherwood-login-card button[type="submit"] {
		height: 46px;
		border-radius: 12px;
		border: 1px solid #4f8f58;
		background: #4f8f58;
		color: #ffffff;
		font-weight: 600;
		box-shadow: none;
		transition: background-color 0.2s ease, border-color 0.2s ease;
	}
	
	.sherwood-login-card .btn-primary:hover,
	.sherwood-login-card button[type="submit"]:hover {
		background: #3f7b49;
		border-color: #3f7b49;
		color: #ffffff;
	}
	
	.sherwood-login-card .btn-primary:focus,
	.sherwood-login-card button[type="submit"]:focus {
		box-shadow: 0 0 0 0.2rem rgba(79, 143, 88, 0.18);
	}
	
	.sherwood-login-card a {
		color: #4f8f58;
	}
	
	.sherwood-login-card a:hover {
		color: #2f6e42;
		text-decoration: none;
	}
	
	.alert {
		position: relative;
		z-index: 3;
		/* max-width: 430px;
		width: calc(100% - 40px); */
		margin: 0 auto 16px;
		border-radius: 12px;
	}
	
	@keyframes sherwoodFadeUp {
		from {
			opacity: 0;
			transform: translateY(14px);
		}
		to {
			opacity: 1;
			transform: translateY(0);
		}
	}
	
	@media (max-width: 576px) {
		.sherwood-login-wrapper {
			max-width: 100%;
			padding: 16px;
		}
	
		.sherwood-login-title {
			font-size: 1.7rem;
		}
	
		.sherwood-login-card {
			padding: 24px;
		}
	
		.sherwood-login-footer {
			flex-direction: column;
			gap: 6px;
			text-align: center;
		}
	}

/* ==========================================================================
   Tabelle index sticky riutilizzabili
   ========================================================================== */

.content-wrapper,
.content,
.container-fluid {
	overflow: visible;
}

.sticky-index-card,
.sticky-index-card .card-body {
	overflow: visible;
}

.sticky-index-table {
	width: 100%;
	margin-bottom: 0;
	background: #fff;
}

.sticky-index-table thead th {
	background: #fff;
	vertical-align: middle;
	white-space: nowrap;
}

.sticky-index-table td,
.sticky-index-table th {
	vertical-align: middle;
}

.sticky-index-table thead tr.sticky-row-columns th {
	position: sticky;
	top: 0;
	z-index: 1030;
	background: #fff;
	box-shadow: inset 0 -1px 0 #dee2e6;
}

.sticky-index-table thead tr.sticky-row-filters th {
	position: sticky;
	top: 48px;
	z-index: 1025;
	background: #fff;
	box-shadow: inset 0 -1px 0 #dee2e6;
}

.sticky-index-table .form-control {
	min-width: 60px;
}

.sticky-index-table .sticky-filter-actions {
	min-width: 110px;
	white-space: nowrap;
}

.sticky-index-table .sticky-actions-cell {
	min-width: 180px;
	white-space: nowrap;
}

.sticky-index-table .sticky-url-cell a {
	word-break: break-word;
}

.sticky-index-table td.text-center i {
	font-size: 14px;
}

/* Variante da usare solo se il layout ha navbar fixed */
.has-fixed-topbar .sticky-index-table thead tr.sticky-row-columns th {
	top: 57px;
}

.has-fixed-topbar .sticky-index-table thead tr.sticky-row-filters th {
	top: 105px;
}

.view-table-scroll-sm {
	max-height: 300px;
	overflow-y: auto;
	overflow-x: auto;
}

.view-table-scroll {
	max-height: 420px;
	overflow-y: auto;
	overflow-x: auto;
}

.view-table-scroll-lg {
	max-height: 600px;
	overflow-y: auto;
	overflow-x: auto;
}

.view-table-scroll-sm thead th,
.view-table-scroll thead th,
.view-table-scroll-lg thead th {
	position: sticky;
	top: 0;
	background: #fff;
	z-index: 2;
}


.product-check-green td:first-child {
	border-left: 6px solid #28a745;
}
.product-check-yellow td:first-child {
	border-left: 6px solid #f0ad4e;
}
.product-check-red td:first-child {
	border-left: 6px solid #dc3545;
}

.status-container {
	display: flex;
	flex-direction: column;
	gap: 6px;
	align-items: center;
	margin-top: 6px;
}

.status-btn {
	display: inline-block;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	cursor: pointer;
	border: 2px solid transparent;
}

.status-btn.active {
	border-color: #222;
}

.site-badge {
	display: inline-block;
	padding: 4px 8px;
	border-radius: 4px;
	color: #fff;
	margin-right: 4px;
	margin-bottom: 4px;
	white-space: wrap !important;
}

.warehouse-qty-line {
	margin-bottom: 4px;
	white-space: nowrap;
}

.warehouse-qty-input {
	width: 46px;
	display: inline-block;
	text-align: center;
	padding: 2px 4px;
	font-size: 12px;
	height: 24px;
}

.sorting-input {
	width: 50px;
	text-align: center;
	min-width: 50px !important;
}

.qty-display {
	display: inline-block;
	min-width: 22px;
	padding: 1px 4px;
	cursor: pointer;
	border-bottom: 1px dashed #999;
}

.qty-edit-input {
	width: 46px;
	display: none;
	text-align: center;
	padding: 2px 4px;
	font-size: 12px;
	height: 24px;
}

.content-fallback-box {
	min-height: 220px;
	max-height: 420px;
	overflow-y: auto;
}