/* CRM Styles - Modern & Creative Design */
/* Main CSS from the original CRM system with modern enhancements */

/* ============================================
   MODERN SIDEBAR MENU STYLES
   ============================================ */

/* Sidebar Wrapper */
.crm-sidebar-wrapper {
	position: relative;
	width: 320px;
	min-width: 320px;
	float: left;
	height: 100vh;
	z-index: 100;
}

/* Sidebar Container - Part of Body Layout */
.colonna_menu {
	position: relative;
	width: 100% !important;
	min-width: 100% !important;
	float: none;
	height: 100vh;
	transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), min-width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	z-index: 100;
	display: block !important;
	visibility: visible !important;
	opacity: 1 !important;
}

/* Modern Sidebar Container - Brand colors: #1E4499, #0061aa, #ffed00, #EBDE11 */
#mySidemenu.modern-sidebar {
	width: 100%;
	height: 100vh;
	position: relative;
	background: linear-gradient(180deg, #1E4499 0%, #0061aa 50%, #1E4499 100%);
	overflow-x: hidden;
	overflow-y: auto;
	box-shadow: 4px 0 30px rgba(0, 0, 0, 0.4);
	display: flex;
	flex-direction: column;
}


#mySidemenu.modern-sidebar::-webkit-scrollbar {
	width: 6px;
}

#mySidemenu.modern-sidebar::-webkit-scrollbar-track {
	background: rgba(255, 255, 255, 0.08);
}

#mySidemenu.modern-sidebar::-webkit-scrollbar-thumb {
	background: rgba(255, 237, 0, 0.4);
	border-radius: 3px;
}

#mySidemenu.modern-sidebar::-webkit-scrollbar-thumb:hover {
	background: #EBDE11;
}

/* Modern Menu List */
#mySidemenu .sidebar-menu.modern-menu {
	list-style: none;
	padding: 10px 0;
	margin: 0;
	flex: 1;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
}

#mySidemenu .sidebar-menu.modern-menu li {
	margin: 0;
	padding: 0;
}

/* Add spacing between first-level child li elements only */
#mySidemenu .sidebar-menu.modern-menu > li {
	margin-bottom: 12px;
}

#mySidemenu .sidebar-menu.modern-menu > li:last-child {
	margin-bottom: 0;
}

/* Menu Items */
.menu-item {
	position: relative;
	margin: 0 12px 0 12px;
}

/* Home menu item - special styling */
.menu-item:first-child {
	margin-top: 12px;
}

.menu-link {
	padding: 14px 16px;
	text-decoration: none;
	font-size: 17px;
	color: #1E4499;
	display: flex;
	align-items: center;
	gap: 12px;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	border-radius: 10px;
	position: relative;
	overflow: hidden;
	font-weight: 500;
	letter-spacing: 0.3px;
	background: rgba(255, 237, 0, 0.7);
}

.menu-link::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
	transition: left 0.5s ease;
}

.menu-link:hover::before {
	left: 100%;
}

.menu-link:hover:not(.menu-link-clienti):not(.menu-link-prodotti):not(.menu-link-vendite):not(.menu-link-analisi):not(.menu-link-primary):not(.menu-link-logout) {
	background: rgba(255, 237, 0, 0.5);
	color: #1E4499;
	transform: translateX(4px);
	box-shadow: 0 2px 8px rgba(255, 237, 0, 0.3);
}

/* Override any global a:focus or tab:focus styles */
a.menu-link:focus,
a.menu-link:focus-visible {
	outline: none !important;
	background: inherit !important;
	color: inherit !important;
}

/* Remove default focus outline and maintain colors */
.menu-link:focus {
	outline: none !important;
	background: inherit !important;
}

.menu-link:focus-visible {
	outline: 2px solid rgba(255, 237, 0, 0.6);
	outline-offset: 2px;
}

.menu-link-primary {
	background: linear-gradient(135deg, rgba(255, 237, 0, 0.9) 0%, rgba(235, 222, 17, 0.9) 100%);
	border: 2px solid rgba(30, 68, 153, 0.4);
	border-radius: 12px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	padding: 16px 18px;
	font-weight: 600;
	color: #1E4499;
}

.menu-link-primary:hover {
	background: linear-gradient(135deg, #ffed00 0%, #EBDE11 100%);
	border-color: #1E4499;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
	transform: translateX(0) translateY(-2px);
	color: #1E4499;
}

.menu-link-primary .menu-icon {
	color: #1E4499;
	font-size: 22px;
}

.menu-link-primary .menu-text {
	font-size: 18px;
	letter-spacing: 0.5px;
}

.menu-link-warning {
	background: linear-gradient(135deg, rgba(255, 127, 0, 0.2) 0%, rgba(255, 165, 0, 0.2) 100%);
	border-left: 3px solid #ff7f00;
}

.menu-link-warning:hover {
	background: linear-gradient(135deg, rgba(255, 127, 0, 0.3) 0%, rgba(255, 165, 0, 0.3) 100%);
}

/* Colorful Menu Items - Clienti - Yellow background */
.menu-link-clienti {
	background: linear-gradient(45deg, rgba(255, 237, 0, 0.75) 0%, rgba(235, 222, 17, 0.8) 50%, rgba(255, 237, 0, 0.75) 100%);
	border-left: 4px solid #0061aa;
	border-radius: 8px 0 0 8px;
	box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.05);
	color: #1E4499;
}

.menu-link-clienti:hover,
.menu-link-clienti:focus,
a.menu-link-clienti:focus {
	background: linear-gradient(45deg, #ffed00 0%, #EBDE11 50%, #ffed00 100%) !important;
	border-left-color: #1E4499 !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
	color: #1E4499 !important;
}

.menu-link-clienti:focus-visible,
a.menu-link-clienti:focus-visible {
	outline: 2px solid rgba(255, 237, 0, 0.6) !important;
	outline-offset: 2px;
}

.menu-link-clienti .menu-icon {
	color: #1E4499;
}

.menu-link-clienti:hover .menu-icon {
	color: #0061aa;
	transform: scale(1.15);
}

.menu-link-clienti .menu-arrow {
	color: rgba(30, 68, 153, 0.8);
}

.menu-link-clienti.active .menu-arrow {
	color: #1E4499;
}

/* Colorful Menu Items - Prodotti - Yellow background */
.menu-link-prodotti {
	background: linear-gradient(180deg, rgba(255, 237, 0, 0.75) 0%, rgba(235, 222, 17, 0.8) 100%);
	border-left: 4px solid #1E4499;
	border-radius: 8px 0 0 8px;
	box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.05);
	color: #1E4499;
}

.menu-link-prodotti:hover,
.menu-link-prodotti:focus,
a.menu-link-prodotti:focus {
	background: linear-gradient(180deg, #ffed00 0%, #EBDE11 100%) !important;
	border-left-color: #1E4499 !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
	color: #1E4499 !important;
}

.menu-link-prodotti:focus-visible,
a.menu-link-prodotti:focus-visible {
	outline: 2px solid rgba(255, 237, 0, 0.6) !important;
	outline-offset: 2px;
}

.menu-link-prodotti .menu-icon {
	color: #1E4499;
}

.menu-link-prodotti:hover .menu-icon {
	color: #0061aa;
	transform: scale(1.15);
}

.menu-link-prodotti .menu-arrow {
	color: rgba(30, 68, 153, 0.8);
}

.menu-link-prodotti.active .menu-arrow {
	color: #1E4499;
}

/* Colorful Menu Items - Vendite - Yellow background */
.menu-link-vendite {
	background: radial-gradient(circle at left center, rgba(255, 237, 0, 0.75) 0%, rgba(235, 222, 17, 0.8) 70%, rgba(255, 237, 0, 0.75) 100%);
	border-left: 4px solid #0061aa;
	border-radius: 8px 0 0 8px;
	box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.05);
	color: #1E4499;
}

.menu-link-vendite:hover,
.menu-link-vendite:focus,
a.menu-link-vendite:focus {
	background: radial-gradient(circle at left center, #ffed00 0%, #EBDE11 70%, #ffed00 100%) !important;
	border-left-color: #1E4499 !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
	color: #1E4499 !important;
}

.menu-link-vendite:focus-visible,
a.menu-link-vendite:focus-visible {
	outline: 2px solid rgba(255, 237, 0, 0.6) !important;
	outline-offset: 2px;
}

.menu-link-vendite .menu-icon {
	color: #1E4499;
}

.menu-link-vendite:hover .menu-icon {
	color: #0061aa;
	transform: scale(1.15);
}

.menu-link-vendite .menu-arrow {
	color: rgba(30, 68, 153, 0.8);
}

.menu-link-vendite.active .menu-arrow {
	color: #1E4499;
}

/* Colorful Menu Items - Analisi - Yellow background */
.menu-link-analisi {
	background: linear-gradient(90deg, rgba(255, 237, 0, 0.75) 0%, rgba(235, 222, 17, 0.8) 30%, rgba(255, 237, 0, 0.75) 60%, rgba(235, 222, 17, 0.8) 100%);
	border-left: 4px solid #1E4499;
	border-radius: 8px 0 0 8px;
	box-shadow: inset 0 0 20px rgba(0, 0, 0, 0.05);
	color: #1E4499;
}

.menu-link-analisi:hover,
.menu-link-analisi:focus,
a.menu-link-analisi:focus {
	background: linear-gradient(90deg, #ffed00 0%, #EBDE11 30%, #ffed00 60%, #EBDE11 100%) !important;
	border-left-color: #1E4499 !important;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
	color: #1E4499 !important;
}

.menu-link-analisi:focus-visible,
a.menu-link-analisi:focus-visible {
	outline: 2px solid rgba(255, 237, 0, 0.6) !important;
	outline-offset: 2px;
}

.menu-link-analisi .menu-icon {
	color: #1E4499;
}

.menu-link-analisi:hover .menu-icon {
	color: #0061aa;
	transform: scale(1.15);
}

.menu-link-analisi .menu-arrow {
	color: rgba(30, 68, 153, 0.8);
}

.menu-link-analisi.active .menu-arrow {
	color: #1E4499;
}

.menu-link-logout {
	background: linear-gradient(135deg, rgba(239, 68, 68, 0.4) 0%, rgba(220, 38, 38, 0.4) 100%);
	border: 2px solid rgba(239, 68, 68, 0.5);
	border-radius: 12px;
	box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
	padding: 16px 18px;
	font-weight: 600;
	margin-top: auto;
}

.menu-link-logout:hover {
	background: linear-gradient(135deg, rgba(239, 68, 68, 0.5) 0%, rgba(220, 38, 38, 0.5) 100%);
	border-color: rgba(239, 68, 68, 0.7);
	box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
	transform: translateX(0) translateY(-2px);
}

.menu-link-logout .menu-icon {
	color: #fff;
	font-size: 22px;
}

.menu-link-logout .menu-text {
	font-size: 18px;
	letter-spacing: 0.5px;
	color: #fff;
}

.menu-item-logout {
	margin-top: auto;
	padding-top: 20px;
	border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.menu-icon {
	width: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	color: #1E4499;
	transition: all 0.3s ease;
}

.menu-link:hover .menu-icon {
	color: #0061aa;
	transform: scale(1.1);
}

.menu-text {
	flex: 1;
}

.menu-arrow {
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	color: rgba(30, 68, 153, 0.8);
	font-size: 14px;
}

.menu-arrow i {
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.menu-item-has-children.active .menu-arrow {
	transform: rotate(90deg);
	color: #1E4499;
}

.menu-badge {
	width: 6px;
	height: 6px;
	background: #1E4499;
	border-radius: 50%;
	opacity: 0;
	transition: opacity 0.3s ease;
}

/* Submenu Styles */
.treeview-menu.submenu {
	list-style: none;
	padding: 0;
	margin: 0;
	background: rgba(0, 0, 0, 0.2);
	border-left: 2px solid rgba(255, 237, 0, 0.4);
	margin-left: 12px;
	margin-top: 4px;
	border-radius: 0 8px 8px 0;
	overflow: hidden;
	animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
	from {
		opacity: 0;
		max-height: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		max-height: 1000px;
		transform: translateY(0);
	}
}

.submenu-item {
	position: relative;
}

.submenu-link {
	padding: 12px 16px 12px 40px;
	text-decoration: none;
	font-size: 16px;
	color: #cbd5e1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	transition: all 0.3s ease;
	border-radius: 6px;
	margin: 2px 8px;
	font-weight: 400;
}

.submenu-link:hover {
	background: rgba(255, 255, 255, 0.1);
	color: #fff;
	padding-left: 44px;
}

.submenu-text {
	flex: 1;
}

.submenu-arrow {
	transition: transform 0.3s ease;
	color: rgba(30, 68, 153, 0.7);
	font-size: 13px;
}

.submenu-item-has-children.active .submenu-arrow {
	transform: rotate(90deg);
	color: #ffed00;
}

/* Level 2 Submenu */
.submenu-level-2 {
	background: rgba(0, 0, 0, 0.3);
	border-left: 2px solid rgba(0, 97, 170, 0.4);
	margin-left: 20px;
}

.submenu-level-2 .submenu-link {
	padding-left: 56px;
	font-size: 15px;
	color: #94a3b8;
}

.submenu-level-2 .submenu-link:hover {
	padding-left: 60px;
	color: #e2e8f0;
}

/* Active State - Only for non-colorful main menu items (not submenus) */
.menu-link.active:not(.menu-link-clienti):not(.menu-link-prodotti):not(.menu-link-vendite):not(.menu-link-analisi):not(.menu-link-primary):not(.menu-link-logout) {
	background: linear-gradient(135deg, #ffed00 0%, #EBDE11 100%);
	color: #1E4499;
	border-left: 3px solid #1E4499;
}

.submenu-link.active {
	background: rgba(255, 255, 255, 0.12);
	color: #fff;
	border-left: 3px solid rgba(255, 237, 0, 0.6);
}

/* Active state for colorful menu items - maintain their colors */
.menu-link-clienti.active {
	background: linear-gradient(45deg, #ffed00 0%, #EBDE11 50%, #ffed00 100%);
	border-left-color: #1E4499;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	color: #1E4499;
}

.menu-link-prodotti.active {
	background: linear-gradient(180deg, #ffed00 0%, #EBDE11 100%);
	border-left-color: #1E4499;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	color: #1E4499;
}

.menu-link-vendite.active {
	background: radial-gradient(circle at left center, #ffed00 0%, #EBDE11 70%, #ffed00 100%);
	border-left-color: #1E4499;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	color: #1E4499;
}

.menu-link-analisi.active {
	background: linear-gradient(90deg, #ffed00 0%, #EBDE11 30%, #ffed00 60%, #EBDE11 100%);
	border-left-color: #1E4499;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
	color: #1E4499;
}

/* Legacy Support - Keep old classes working */
#mySidemenu .sidebar-menu {
	list-style: none;
	padding: 0;
	margin: 0;
}

#mySidemenu .sidebar-menu li {
	margin: 0;
	padding: 0;
}

#mySidemenu .sidebar-menu a {
	text-decoration: none;
	transition: 0.3s;
}

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

#mySidemenu .sidebar-menu .treeview-menu a {
	font-size: 16px;
}

#mySidemenu .sidebar-menu .treeview-menu .treeview-menu a {
	font-size: 15px;
}

#mySidemenu .sidebar-menu .pull-right-container {
	float: right;
}

#mySidemenu .sidebar-menu .fa-angle-left {
	transition: transform 0.3s;
}

/* Page Content Wrapper - Adjusts when sidebar is collapsed */
body.has-crm-sidebar,
body:has(.colonna_menu) {
	display: flex;
	flex-direction: row;
	min-height: 100vh;
}

/* Fallback for browsers without :has() support */
body .colonna_menu ~ * {
	flex: 1;
	width: calc(100% - 320px);
	transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	min-width: 0;
}

body.has-crm-sidebar .elementor-page,
body.has-crm-sidebar .elementor-location-header,
body.has-crm-sidebar .elementor-location-footer,
body.has-crm-sidebar main,
body.has-crm-sidebar #main,
body.has-crm-sidebar .site-main {
	flex: 1;
	width: calc(100% - 320px);
	transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	min-width: 0;
}


/* Responsive Design */
@media (max-width: 768px) {
	.colonna_menu {
		position: fixed;
		left: 0;
		top: 0;
		z-index: 9999;
		width: 280px;
		min-width: 280px;
	}
	
	
	body.has-crm-sidebar .elementor-page {
		width: 100%;
	}
}

/* ============================================
   CRM HOMEPAGE MODERN DESIGN
   ============================================ */

/* Welcome Card - Branding blue */
.crm-welcome-card {
	background: linear-gradient(135deg, #1E4499 0%, #0061aa 100%);
	border-radius: 16px;
	padding: 30px;
	box-shadow: 0 8px 24px rgba(30, 68, 153, 0.4);
	margin-bottom: 30px;
}

.welcome-content {
	display: flex;
	align-items: center;
	gap: 24px;
	flex-wrap: wrap;
}

.welcome-logo {
	margin-left: auto;
	flex-shrink: 0;
}

.welcome-logo a,
.welcome-logo img {
	display: block;
	max-height: 80px;
	width: auto;
}

.welcome-logo img {
	height: auto;
	vertical-align: middle;
}

.welcome-avatar {
	width: 70px;
	height: 70px;
	background: rgba(255, 255, 255, 0.2);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 38px;
	color: #fff;
	backdrop-filter: blur(10px);
}

.welcome-text {
	flex: 1;
	min-width: 200px;
}

.welcome-title {
	color: #fff;
	font-size: 30px;
	font-weight: 700;
	margin: 0 0 8px 0;
	letter-spacing: 0.5px;
}

.welcome-subtitle {
	color: rgba(255, 255, 255, 0.9);
	font-size: 17px;
	margin: 0;
}

.welcome-subtitle i {
	margin-right: 8px;
}

.welcome-actions {
	display: flex;
	gap: 12px;
}

.btn-quick-action {
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
	padding: 12px 24px;
	border-radius: 8px;
	text-decoration: none;
	font-weight: 600;
	transition: all 0.3s ease;
	backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-quick-action:hover {
	background: rgba(255, 255, 255, 0.3);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
	color: #fff;
	text-decoration: none;
}

.btn-quick-action i {
	margin-right: 8px;
}

/* Stat Cards */
.crm-stat-card {
	background: #fff;
	border-radius: 12px;
	padding: 24px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	margin-bottom: 20px;
	display: flex;
	align-items: center;
	gap: 20px;
	position: relative;
	overflow: hidden;
}

.crm-stat-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 4px;
	height: 100%;
	transition: width 0.3s ease;
}

.crm-stat-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.crm-stat-card:hover::before {
	width: 100%;
	opacity: 0.1;
}

.stat-card-primary::before {
	background: linear-gradient(180deg, #3b82f6 0%, #0ea5e9 100%);
}

.stat-card-success::before {
	background: linear-gradient(180deg, #22c55e 0%, #10b981 100%);
}

.stat-card-info::before {
	background: linear-gradient(180deg, #06b6d4 0%, #0891b2 100%);
}

.stat-card-warning::before {
	background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
}

.stat-icon {
	width: 60px;
	height: 60px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 30px;
	color: #fff;
	flex-shrink: 0;
}

.stat-card-primary .stat-icon {
	background: linear-gradient(135deg, #3b82f6 0%, #0ea5e9 100%);
}

.stat-card-success .stat-icon {
	background: linear-gradient(135deg, #22c55e 0%, #10b981 100%);
}

.stat-card-info .stat-icon {
	background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
}

.stat-card-warning .stat-icon {
	background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.stat-content {
	flex: 1;
}

.stat-title {
	font-size: 20px;
	font-weight: 600;
	color: #1e293b;
	margin: 0 0 8px 0;
}

.stat-actions {
	margin-top: 8px;
}

.stat-link {
	color: #64748b;
	text-decoration: none;
	font-size: 16px;
	font-weight: 500;
	transition: all 0.3s ease;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.stat-link:hover {
	color: #3b82f6;
	text-decoration: none;
	transform: translateX(4px);
}

.stat-link i {
	font-size: 14px;
}

/* Modern Panel */
.crm-panel-modern {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	margin-bottom: 20px;
	overflow: hidden;
}

.panel-header {
	background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
	padding: 20px 24px;
	border-bottom: 1px solid #e2e8f0;
}

.panel-header h4 {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	color: #1e293b;
	display: flex;
	align-items: center;
	gap: 10px;
}

.panel-header i {
	color: #667eea;
}

.panel-body {
	padding: 24px;
}

/* Quick Actions Grid */
.quick-actions-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
}

.quick-action-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
	border-radius: 12px;
	text-decoration: none;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	border: 2px solid transparent;
}

.quick-action-item:hover {
	transform: translateY(-4px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
	text-decoration: none;
	border-color: rgba(102, 126, 234, 0.3);
}

.action-icon {
	width: 56px;
	height: 56px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 26px;
	color: #fff;
	margin-bottom: 12px;
	transition: transform 0.3s ease;
}

.quick-action-item:hover .action-icon {
	transform: scale(1.1) rotate(5deg);
}

.action-icon-blue {
	background: linear-gradient(135deg, #3b82f6 0%, #0ea5e9 100%);
}

.action-icon-green {
	background: linear-gradient(135deg, #22c55e 0%, #10b981 100%);
}

.action-icon-purple {
	background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
}

.action-icon-orange {
	background: linear-gradient(135deg, #f97316 0%, #fb923c 100%);
}

.action-text {
	color: #1e293b;
	font-weight: 600;
	font-size: 16px;
	text-align: center;
}

/* Communications List */
.communications-list {
	min-height: 100px;
}

.no-communications {
	color: #94a3b8;
	text-align: center;
	padding: 40px 20px;
	margin: 0;
	font-style: italic;
}

/* Smooth Transitions for All Interactive Elements */
* {
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Additional Modern Enhancements */
.menu-item::after {
	content: '';
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 3px;
	height: 0;
	background: linear-gradient(180deg, #667eea 0%, #764ba2 100%);
	border-radius: 0 3px 3px 0;
	transition: height 0.3s ease;
}

.menu-item:hover::after {
	height: 60%;
}

.menu-link-primary::after {
	height: 60%;
}

/* Search/Filter Enhancement (if needed in future) */
.sidebar-search {
	padding: 16px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-search input {
	width: 100%;
	padding: 10px 16px;
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 8px;
	color: #fff;
	font-size: 16px;
	transition: all 0.3s ease;
}

.sidebar-search input:focus {
	outline: none;
	background: rgba(255, 255, 255, 0.15);
	border-color: #ffed00;
	box-shadow: 0 0 0 3px rgba(255, 237, 0, 0.25);
}

.sidebar-search input::placeholder {
	color: rgba(255, 255, 255, 0.5);
}

/* ============================================
   MODERN CLIENTI PAGE STYLES
   ============================================ */

/* Page Header */
.crm-page-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 30px 0 20px;
	margin-bottom: 10px;
	border-bottom: 2px solid #e8ecf0;
}

.crm-page-header .page-title {
	margin: 0;
	font-size: 34px;
	font-weight: 700;
	color: #1a1f3a;
	display: flex;
	align-items: center;
	gap: 12px;
}

.crm-page-header .page-title i {
	color: #3b82f6;
	font-size: 38px;
}

.crm-page-header .page-title .client-name {
	color: #3b82f6;
	font-weight: 600;
}

.crm-page-header .page-actions {
	display: flex;
	gap: 12px;
}

/* Modern Buttons */
.btn-modern {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 24px;
	border: none;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	text-decoration: none;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-modern:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	text-decoration: none;
}

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

.btn-primary-modern {
	background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
	color: #fff;
}

.btn-primary-modern:hover {
	background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
	color: #fff;
}

.btn-secondary-modern {
	background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
	color: #fff;
}

.btn-secondary-modern:hover {
	background: linear-gradient(135deg, #4b5563 0%, #374151 100%);
	color: #fff;
}

.btn-success-modern {
	background: linear-gradient(135deg, #10b981 0%, #059669 100%);
	color: #fff;
}

.btn-success-modern:hover {
	background: linear-gradient(135deg, #059669 0%, #047857 100%);
	color: #fff;
}

.btn-info-modern {
	background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
	color: #fff;
}

.btn-info-modern:hover {
	background: linear-gradient(135deg, #0891b2 0%, #0e7490 100%);
	color: #fff;
}

.btn-warning-modern {
	background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
	color: #fff;
}

.btn-warning-modern:hover {
	background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
	color: #fff;
}

.btn-danger-modern {
	background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
	color: #fff;
}

.btn-danger-modern:hover {
	background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
	color: #fff;
}

/* Modern Panel */
.crm-panel-modern {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	overflow: hidden;
	margin-bottom: 24px;
	border: 1px solid #e8ecf0;
}

.crm-panel-modern .panel-header {
	background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
	padding: 20px 24px;
	border-bottom: 2px solid #e8ecf0;
}

.crm-panel-modern .panel-header h4 {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	color: #1a1f3a;
	display: flex;
	align-items: center;
	gap: 10px;
}

.crm-panel-modern .panel-header h4 i {
	color: #3b82f6;
	font-size: 22px;
}

.crm-panel-modern .panel-body {
	padding: 24px;
}

/* Tabella Provvigioni section - branding blue header */
#tabella-provvigioni-section .crm-panel-modern .panel-header {
	background: linear-gradient(135deg, #1E4499 0%, #0061aa 100%);
	border-bottom-color: rgba(255, 255, 255, 0.2);
}

#tabella-provvigioni-section .crm-panel-modern .panel-header h4 {
	color: #fff;
}

#tabella-provvigioni-section .crm-panel-modern .panel-header h4 i {
	color: #ffed00;
}

/* Result Badge */
.result-badge {
	display: inline-block;
	background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
	color: #fff;
	padding: 4px 12px;
	border-radius: 12px;
	font-size: 16px;
	font-weight: 600;
	margin-left: 8px;
	box-shadow: 0 2px 6px rgba(59, 130, 246, 0.3);
}

/* Modern Search Form */
.modern-search-form .form-group {
	margin-bottom: 20px;
}

.modern-search-form label {
	display: block;
	margin-bottom: 8px;
	font-size: 15px;
	font-weight: 600;
	color: #475569;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.modern-search-form .form-control {
	width: 100%;
	padding: 12px 16px;
	border: 2px solid #e2e8f0;
	border-radius: 8px;
	font-size: 16px;
	color: #1a1f3a;
	background: #fff;
	transition: all 0.3s ease;
}

.modern-search-form .form-control:focus {
	outline: none;
	border-color: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
	background: #fafbfc;
}

.modern-search-form .form-control::placeholder {
	color: #94a3b8;
}

/* Modern Table */
.modern-table-wrapper {
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid #e8ecf0;
}

.table-modern {
	width: 100%;
	margin: 0;
	border-collapse: separate;
	border-spacing: 0;
	background: #fff;
}

.table-modern thead {
	background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.table-modern thead th {
	padding: 16px 20px;
	font-size: 15px;
	font-weight: 700;
	color: #1a1f3a;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border-bottom: 2px solid #e8ecf0;
	white-space: nowrap;
	position: sticky;
	top: 0;
	z-index: 10;
}

.table-modern thead th.th-id {
	width: 80px;
	text-align: center;
}

.table-modern thead th.th-actions {
	width: 300px;
	text-align: center;
}

.table-modern tbody tr {
	transition: all 0.2s ease;
	border-bottom: 1px solid #f1f5f9;
}

.table-modern tbody tr:hover {
	background: #f8fafc;
	transform: scale(1.001);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.table-modern tbody td {
	padding: 16px 20px;
	font-size: 16px;
	color: #475569;
	vertical-align: middle;
}

.table-modern tbody td:first-child {
	font-weight: 600;
	color: #3b82f6;
	/* text-align: center; */
}

.table-modern tbody td strong {
	color: #1a1f3a;
	font-weight: 600;
}

/* Action Buttons */
.td-actions {
	min-width: 300px;
	text-align: center;
}

.action-buttons {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.btn-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 8px 14px;
	border-radius: 8px;
	text-decoration: none;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	font-size: 15px;
	font-weight: 600;
	white-space: nowrap;
}

.btn-action:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
	text-decoration: none;
}

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

.btn-action i {
	font-size: 16px;
	flex-shrink: 0;
}

.btn-action span {
	line-height: 1;
}

.btn-action-view {
	background: linear-gradient(135deg, #10b981 0%, #059669 100%);
	color: #fff;
}

.btn-action-view:hover {
	background: linear-gradient(135deg, #059669 0%, #047857 100%);
	color: #fff;
}

.btn-action-edit {
	background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
	color: #fff;
}

.btn-action-edit:hover {
	background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
	color: #fff;
}

.btn-action-list {
	background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
	color: #fff;
}

.btn-action-list:hover {
	background: linear-gradient(135deg, #7c3aed 0%, #6d28d9 100%);
	color: #fff;
}

.btn-action-add {
	background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
	color: #fff;
}

.btn-action-add:hover {
	background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
	color: #fff;
}

.btn-action-delete {
	background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
	color: #fff;
}

.btn-action-delete:hover {
	background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
	color: #fff;
}

/* Field Display Styles */
.field-group-modern {
	margin-bottom: 0;
}

.field-label-modern {
	display: block;
	font-size: 15px;
	font-weight: 700;
	color: #475569;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	margin-bottom: 8px;
}

.field-value-modern {
	background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
	padding: 14px 18px;
	border: 2px solid #e2e8f0;
	border-radius: 8px;
	min-height: 44px;
	font-size: 16px;
	color: #1a1f3a;
	line-height: 1.6;
	transition: all 0.3s ease;
}

.field-value-modern:hover {
	border-color: #cbd5e1;
	background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
}

.field-value-modern a {
	color: #3b82f6;
	text-decoration: none;
	font-weight: 600;
	transition: color 0.2s ease;
}

.field-value-modern a:hover {
	color: #2563eb;
	text-decoration: underline;
}

/* Action Buttons Page */
.action-buttons-page {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: flex-start;
}

/* ACF Form Fields Styling */
.crm-cliente-nuovo-page .acf-fields {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
}

.crm-cliente-nuovo-page .acf-field {
	margin-bottom: 20px;
}

.crm-cliente-nuovo-page .acf-label {
	margin-bottom: 8px;
}

.crm-cliente-nuovo-page .acf-label label {
	font-size: 15px;
	font-weight: 700;
	color: #475569;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.crm-cliente-nuovo-page .acf-input input[type="text"],
.crm-cliente-nuovo-page .acf-input input[type="email"],
.crm-cliente-nuovo-page .acf-input input[type="tel"],
.crm-cliente-nuovo-page .acf-input input[type="url"],
.crm-cliente-nuovo-page .acf-input input[type="number"],
.crm-cliente-nuovo-page .acf-input select,
.crm-cliente-nuovo-page .acf-input textarea {
	width: 100%;
	padding: 12px 16px;
	border: 2px solid #e2e8f0;
	border-radius: 8px;
	font-size: 16px;
	color: #1a1f3a;
	background: #fff;
	transition: all 0.3s ease;
}

.crm-cliente-nuovo-page .acf-input input:focus,
.crm-cliente-nuovo-page .acf-input select:focus,
.crm-cliente-nuovo-page .acf-input textarea:focus {
	outline: none;
	border-color: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
	background: #fafbfc;
}

.crm-cliente-nuovo-page .acf-input textarea {
	min-height: 100px;
	resize: vertical;
}

/* ACF Form Fields Styling - Prodotto Page */
.crm-prodotto-nuovo-page .acf-fields {
	display: flex;
	flex-wrap: wrap;
	gap: 0;
}

.crm-prodotto-nuovo-page .acf-field {
	margin-bottom: 20px;
}

.crm-prodotto-nuovo-page .acf-label {
	margin-bottom: 8px;
}

.crm-prodotto-nuovo-page .acf-label label {
	font-size: 15px;
	font-weight: 700;
	color: #475569;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.crm-prodotto-nuovo-page .acf-input input[type="text"],
.crm-prodotto-nuovo-page .acf-input input[type="email"],
.crm-prodotto-nuovo-page .acf-input input[type="tel"],
.crm-prodotto-nuovo-page .acf-input input[type="url"],
.crm-prodotto-nuovo-page .acf-input input[type="number"],
.crm-prodotto-nuovo-page .acf-input input[type="date"],
.crm-prodotto-nuovo-page .acf-input select,
.crm-prodotto-nuovo-page .acf-input textarea {
	width: 100%;
	padding: 12px 16px;
	border: 2px solid #e2e8f0;
	border-radius: 8px;
	font-size: 16px;
	color: #1a1f3a;
	background: #fff;
	transition: all 0.3s ease;
}

.crm-prodotto-nuovo-page .acf-input input:focus,
.crm-prodotto-nuovo-page .acf-input select:focus,
.crm-prodotto-nuovo-page .acf-input textarea:focus {
	outline: none;
	border-color: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
	background: #fafbfc;
}

.crm-prodotto-nuovo-page .acf-input textarea {
	min-height: 100px;
	resize: vertical;
}

/* Compact File Fields - Appealing Layout */
.crm-contract-nuovo-page .file-field-compact {
	margin-bottom: 0;
	padding: 8px;
	background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
	border: 1px solid #e2e8f0;
	border-radius: 6px;
	transition: all 0.3s ease;
}

.crm-contract-nuovo-page .file-field-compact:hover {
	background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
	border-color: #cbd5e1;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
	transform: translateY(-1px);
}

.crm-contract-nuovo-page .file-field-label {
	display: block;
	font-weight: 700;
	font-size: 12px;
	margin-bottom: 6px;
	color: #3b82f6;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	position: relative;
	padding-left: 16px;
}

.crm-contract-nuovo-page .file-field-label::before {
	content: '\f07b';
	font-family: 'FontAwesome';
	position: absolute;
	left: 0;
	top: 0;
	color: #3b82f6;
	font-size: 13px;
}

.crm-contract-nuovo-page .file-field-input .acf-field {
	margin-bottom: 0;
}

.crm-contract-nuovo-page .file-field-input .acf-label {
	display: none !important;
}

.crm-contract-nuovo-page .file-field-input .acf-input input,
.crm-contract-nuovo-page .file-field-input .acf-input select,
.crm-contract-nuovo-page .file-field-input .acf-input textarea {
	padding: 8px 10px;
	font-size: 14px;
	min-height: 36px;
	width: 100%;
	border: 2px solid #e2e8f0;
	border-radius: 6px;
	background: #fff;
	transition: all 0.3s ease;
}

.crm-contract-nuovo-page .file-field-input .acf-input input:focus,
.crm-contract-nuovo-page .file-field-input .acf-input select:focus,
.crm-contract-nuovo-page .file-field-input .acf-input textarea:focus {
	outline: none;
	border-color: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
	background: #fafbfc;
}

.crm-contract-nuovo-page .file-field-input .acf-input textarea {
	min-height: 50px;
	max-height: 70px;
	resize: vertical;
}

/* Style file upload buttons - Light grey, less prominent */
.crm-contract-nuovo-page .file-field-input .acf-file-uploader .acf-button {
	background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
	color: #475569;
	border: 1px solid #cbd5e1;
	padding: 8px 16px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.crm-contract-nuovo-page .file-field-input .acf-file-uploader .acf-button:hover {
	background: linear-gradient(135deg, #e2e8f0 0%, #cbd5e1 100%);
	color: #334155;
	border-color: #94a3b8;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	transform: translateY(-1px);
}

/* Hide file name and file size in file upload sections */
.crm-contract-nuovo-page .file-field-input .acf-file-uploader .file-info,
.crm-contract-nuovo-page .file-field-input .acf-file-uploader .file-name,
.crm-contract-nuovo-page .file-field-input .acf-file-uploader .file-size,
.crm-contract-nuovo-page .file-field-input .acf-file-uploader .file-mime,
.crm-contract-nuovo-page .file-field-input .acf-file-uploader .file-icon,
.crm-contract-nuovo-page .file-field-input .acf-file-uploader .file-name a,
.crm-contract-nuovo-page .file-field-input .acf-file-uploader .file-size span,
.crm-contract-nuovo-page .file-field-input .acf-file-uploader .file-mime span,
.crm-contract-nuovo-page .file-field-input .acf-file-uploader .file-icon img,
.crm-contract-nuovo-page .file-field-input .acf-file-uploader .file-icon:before {
	display: none !important;
}

/* Hide file details in ACF file fields */
.crm-contract-nuovo-page .file-field-input .acf-file-uploader .file-wrap .file-info,
.crm-contract-nuovo-page .file-field-input .acf-file-uploader .file-wrap .file-name,
.crm-contract-nuovo-page .file-field-input .acf-file-uploader .file-wrap .file-size,
.crm-contract-nuovo-page .file-field-input .acf-file-uploader .file-wrap .file-mime {
	display: none !important;
}

/* Show only the upload button/input */
.crm-contract-nuovo-page .file-field-input .acf-file-uploader .acf-button,
.crm-contract-nuovo-page .file-field-input .acf-file-uploader input[type="file"],
.crm-contract-nuovo-page .file-field-input .acf-file-uploader .acf-actions {
	display: block !important;
}

/* Style basic file uploader (simple file input - no modal) */
.crm-contract-nuovo-page .file-field-input .acf-basic-uploader {
	display: block;
	width: 100%;
}

.crm-contract-nuovo-page .file-field-input .acf-basic-uploader input[type="file"] {
	width: 100%;
	padding: 8px 12px;
	font-size: 15px;
	border: 2px solid #cbd5e1;
	border-radius: 8px;
	background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
	color: #475569;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.crm-contract-nuovo-page .file-field-input .acf-basic-uploader input[type="file"]:hover {
	background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
	border-color: #94a3b8;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
	transform: translateY(-1px);
}

.crm-contract-nuovo-page .file-field-input .acf-basic-uploader input[type="file"]:focus {
	outline: none;
	border-color: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
	background: #fff;
}

/* Hide the media library uploader completely when using basic mode */
.crm-contract-nuovo-page .file-field-input .acf-file-uploader[data-uploader="wp"] {
	display: none !important;
}

.crm-contract-nuovo-page .file-field-input .acf-file-uploader[data-uploader="basic"] {
	display: block !important;
}

/* Inline File Sections */
.crm-contract-nuovo-page .row > div > .crm-panel-modern {
	display: flex;
	flex-direction: column;
}

.crm-contract-nuovo-page .row > div > .crm-panel-modern .panel-body {
	flex: 1;
	display: flex;
	flex-direction: column;
}

.crm-contract-nuovo-page .row > div > .crm-panel-modern .panel-body .form-group {
	flex: 1;
}

.crm-contract-nuovo-page .row > div > .crm-panel-modern .table-modern {
	margin-bottom: 0;
}

/* PDA Section - Inline Fields */
.crm-contract-nuovo-page .crm-panel-modern .acf-field textarea {
	min-height: 60px !important;
	max-height: 80px !important;
	resize: vertical;
}

.crm-contract-nuovo-page .crm-panel-modern .acf-field[data-type="textarea"] textarea,
.crm-contract-nuovo-page .crm-panel-modern .acf-field[data-type="wysiwyg"] textarea {
	min-height: 60px !important;
	max-height: 80px !important;
}

/* Equal Height Product Sections */
.crm-contract-nuovo-page .row {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
}

.crm-contract-nuovo-page .row > .col-sm-12.col-md-4 {
	display: flex;
	flex-direction: column;
}

.crm-contract-nuovo-page .row > .col-sm-12.col-md-4 > .crm-panel-modern {
	display: flex;
	flex-direction: column;
	flex: 1;
}

.crm-contract-nuovo-page .row > .col-sm-12.col-md-4 > .crm-panel-modern .panel-body {
	flex: 1;
	display: flex;
	flex-direction: column;
}

.crm-contract-nuovo-page .row > .col-sm-12.col-md-4 > .crm-panel-modern .panel-body .form-group {
	flex: 1;
}

/* Responsive adjustments for inline sections */
@media (max-width: 768px) {
	.crm-contract-nuovo-page .row > div {
		margin-bottom: 20px !important;
	}
	
	.crm-contract-nuovo-page .row {
		display: block;
	}
	
	.crm-contract-nuovo-page .row > .col-sm-12.col-md-4 {
		display: block;
	}
}

/* CRM Tabs */
.crm-tabs-nav {
	display: flex;
	gap: 8px;
	margin-bottom: 24px;
	border-bottom: 2px solid #e8ecf0;
	padding-bottom: 0;
}

.crm-tab-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 20px;
	background: transparent;
	border: none;
	border-bottom: 3px solid transparent;
	color: #64748b;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	position: relative;
	bottom: -2px;
}

.crm-tab-btn:hover {
	color: #3b82f6;
	background: rgba(59, 130, 246, 0.05);
}

.crm-tab-btn.active {
	color: #3b82f6;
	border-bottom-color: #3b82f6;
	background: rgba(59, 130, 246, 0.05);
}

.crm-tab-btn i {
	font-size: 18px;
}

.crm-tabs-content {
	position: relative;
}

.crm-tab-pane {
	display: none;
	animation: fadeIn 0.3s ease;
}

.crm-tab-pane.active {
	display: block;
}

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

/* Modern Notices */
.crm-notice-wrapper {
	margin: 20px 0;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	clear: both;
	position: relative;
}

.crm-notice {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 20px;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	font-size: 16px;
	font-weight: 500;
	line-height: 1.5;
	animation: slideInDown 0.3s ease-out;
	width: 100%;
	box-sizing: border-box;
}

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

.crm-notice i {
	font-size: 22px;
	flex-shrink: 0;
}

.crm-notice p {
	margin: 0;
	flex: 1;
}

.crm-notice-success {
	background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
	border-left: 4px solid #10b981;
	color: #065f46;
}

.crm-notice-success i {
	color: #10b981;
}

.crm-notice-error {
	background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
	border-left: 4px solid #ef4444;
	color: #991b1b;
}

.crm-notice-error i {
	color: #ef4444;
}

.crm-notice-info {
	background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
	border-left: 4px solid #3b82f6;
	color: #1e40af;
}

.crm-notice-info i {
	color: #3b82f6;
}

.crm-notice-warning {
	background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
	border-left: 4px solid #f59e0b;
	color: #92400e;
}

.crm-notice-warning i {
	color: #f59e0b;
}

/* Override WordPress default notice styles */
.crm-page .notice {
	display: none !important;
}

.crm-page .notice.is-dismissible {
	display: none !important;
}

/* Modern Pagination */
.pagination-wrapper-modern {
	margin-top: 30px;
	text-align: center;
	padding: 20px 0;
}

.pagination-wrapper-modern ul {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 0;
	margin: 0;
	list-style: none;
	flex-wrap: wrap;
	justify-content: center;
}

.pagination-wrapper-modern li {
	display: inline-block;
	margin: 0;
}

.pagination-wrapper-modern li a,
.pagination-wrapper-modern li span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 8px 12px;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	text-decoration: none;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pagination-wrapper-modern li a {
	background: #fff;
	color: #3b82f6;
	border: 2px solid #e2e8f0;
}

.pagination-wrapper-modern li a:hover {
	background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
	color: #fff;
	border-color: #3b82f6;
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(59, 130, 246, 0.3);
	text-decoration: none;
}

.pagination-wrapper-modern li span.current {
	background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
	color: #fff;
	border: 2px solid #3b82f6;
	cursor: default;
	box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
}

.pagination-wrapper-modern li span.dots {
	background: transparent;
	border: none;
	color: #64748b;
	box-shadow: none;
	cursor: default;
}

.pagination-wrapper-modern li span.dots:hover {
	background: transparent;
	color: #64748b;
	transform: none;
}

/* No Results */
.no-results {
	text-align: center;
	padding: 60px 20px;
	color: #94a3b8;
}

.no-results i {
	font-size: 66px;
	margin-bottom: 16px;
	opacity: 0.5;
}

.no-results p {
	font-size: 18px;
	margin: 0;
	color: #64748b;
}

/* Responsive */
@media (max-width: 768px) {
	.crm-page-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
	}

	.crm-page-header .page-title {
		font-size: 26px;
	}

	.modern-table-wrapper {
		overflow-x: auto;
	}

	.table-modern {
		min-width: 800px;
	}

	.action-buttons {
		flex-direction: column;
		width: 100%;
	}

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

	.td-actions {
		min-width: 200px;
	}

	.action-buttons-page {
		flex-direction: column;
	}

	.action-buttons-page .btn-modern {
		width: 100%;
		justify-content: center;
	}
}

/* ============================================
   CRM IMPORT FORM STYLES
   ============================================ */

.crm-import-form {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
	background: #fff;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.crm-import-form h2 {
	margin-top: 0;
	margin-bottom: 20px;
	color: #1a1f3a;
	font-size: 30px;
	font-weight: 600;
}

.crm-import-form h3 {
	margin-top: 0;
	margin-bottom: 15px;
	color: #1a1f3a;
	font-size: 22px;
	font-weight: 600;
}

.crm-import-step {
	margin-bottom: 30px;
	padding: 20px;
	background: #f8f9fa;
	border-radius: 6px;
	border-left: 4px solid #4a90e2;
}

.crm-import-message {
	padding: 15px 20px;
	margin-bottom: 20px;
	border-radius: 6px;
	border-left: 4px solid;
}

.crm-import-message.crm-success {
	background: #d4edda;
	border-left-color: #28a745;
	color: #155724;
}

.crm-import-message.crm-error {
	background: #f8d7da;
	border-left-color: #dc3545;
	color: #721c24;
}

.crm-form-field {
	margin-bottom: 20px;
}

.crm-form-field label {
	display: block;
	margin-bottom: 8px;
	font-weight: 600;
	color: #333;
}

.crm-form-field input[type="file"] {
	width: 100%;
	padding: 10px;
	border: 2px dashed #ddd;
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.3s;
}

.crm-form-field input[type="file"]:hover {
	border-color: #4a90e2;
}

.crm-form-field .description {
	margin-top: 5px;
	font-size: 15px;
	color: #666;
	font-style: italic;
}

.crm-submit-button {
	background: #4a90e2;
	color: #fff;
	border: none;
	padding: 12px 30px;
	border-radius: 6px;
	font-size: 18px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.3s;
}

.crm-submit-button:hover {
	background: #357abd;
}

.crm-submit-button:disabled {
	background: #ccc;
	cursor: not-allowed;
}

.crm-btn-cancel {
	display: inline-block;
	margin-left: 10px;
	padding: 12px 30px;
	background: #6c757d;
	color: #fff;
	text-decoration: none;
	border-radius: 6px;
	font-size: 18px;
	font-weight: 600;
	transition: background 0.3s;
}

.crm-btn-cancel:hover {
	background: #5a6268;
	color: #fff;
	text-decoration: none;
}

.crm-sample-data-notice {
	padding: 12px 15px;
	margin-bottom: 20px;
	background: #e7f3ff;
	border-left: 4px solid #4a90e2;
	border-radius: 4px;
	color: #004085;
}

.crm-mapping-table-wrapper {
	overflow-x: auto;
	margin-bottom: 20px;
}

.crm-mapping-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
	border-radius: 6px;
	overflow: hidden;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.crm-mapping-table thead {
	background: #1a1f3a;
	color: #fff;
}

.crm-mapping-table th {
	padding: 15px;
	text-align: left;
	font-weight: 600;
	font-size: 16px;
}

.crm-mapping-table th.crm-sample-header {
	background: #2a3f5a;
	text-align: center;
	font-size: 14px;
}

.crm-mapping-table tbody tr {
	border-bottom: 1px solid #e9ecef;
	transition: background 0.2s;
}

.crm-mapping-table tbody tr:hover {
	background: #f8f9fa;
}

.crm-mapping-table tbody tr:last-child {
	border-bottom: none;
}

.crm-mapping-table td {
	padding: 15px;
	vertical-align: top;
}

.crm-mapping-table td strong {
	color: #1a1f3a;
	font-weight: 600;
}

.crm-sample-cell {
	font-size: 15px;
	color: #666;
	max-width: 200px;
	word-wrap: break-word;
}

.crm-sample-cell .crm-empty-sample {
	color: #999;
	font-style: italic;
}

.crm-field-select {
	width: 100%;
	min-width: 250px;
	padding: 8px 12px;
	border: 2px solid #ddd;
	border-radius: 4px;
	font-size: 16px;
	background: #fff;
	cursor: pointer;
	transition: border-color 0.3s;
}

.crm-field-select:focus {
	outline: none;
	border-color: #4a90e2;
	box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.1);
}

@media (max-width: 768px) {
	.crm-mapping-table-wrapper {
		overflow-x: scroll;
	}
	
	.crm-mapping-table {
		min-width: 800px;
	}
	
	.crm-sample-cell {
		max-width: 150px;
		font-size: 14px;
	}
}

/* Report pages (mia_analisi, analisi_agente, area-manager-analysis, analisi_sub_agente): date inputs non-clickable via CSS only */
.crm-mia-analisi-page .crm-report-date-input,
.crm-report-agente-page .crm-report-date-input,
.crm-report-sub-agente-page .crm-report-date-input {
	pointer-events: none;
	cursor: not-allowed;
}

/* ============================================
   PROVA DI PAGAMENTO PAGE - correct display
   ============================================ */
.crm-prova-pagamento-page {
	width: 100%;
	max-width: none;
	padding: 24px 20px 40px;
	box-sizing: border-box;
}

.crm-prova-pagamento-page .container-fluid {
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 0;
}

.crm-prova-pagamento-page .row {
	display: flex;
	flex-wrap: wrap;
	margin-left: -15px;
	margin-right: -15px;
}

.crm-prova-pagamento-page .row > [class*="col-"] {
	padding-left: 15px;
	padding-right: 15px;
	box-sizing: border-box;
}

.crm-prova-pagamento-page .crm-page-header {
	margin-bottom: 0;
}

.crm-prova-pagamento-page .crm-panel-modern .panel-body .form-group {
	margin-bottom: 18px;
}

.crm-prova-pagamento-page .crm-panel-modern .panel-body .form-group label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	color: #1e293b;
}

.crm-prova-pagamento-page .crm-panel-modern .panel-body .form-control {
	display: block;
	width: 100%;
	padding: 10px 14px;
	font-size: 16px;
	line-height: 1.5;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	box-sizing: border-box;
}

.crm-prova-pagamento-page .crm-panel-modern .panel-body .form-control:focus {
	border-color: #667eea;
	outline: 0;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.crm-prova-pagamento-page .btn-modern.btn-primary-modern {
	margin-top: 8px;
}

/* Ensure shortcode wrapper isn't constrained by Elementor section/column */
.elementor-section .elementor-widget-shortcode .crm-prova-pagamento-page,
.elementor-column-wrap .crm-prova-pagamento-page {
	width: 100% !important;
	max-width: none !important;
}
