/* Pre-emptive hiding to avoid site flicker */
		html.tinxy-app-active header:not(.tinxy-app-topbar), 
		html.tinxy-app-active footer, 
		html.tinxy-app-active #masthead, 
		html.tinxy-app-active #colophon, 
		html.tinxy-app-active .site-header, 
		html.tinxy-app-active .site-footer, 
		html.tinxy-app-active .nav-container, 
		html.tinxy-app-active #header, 
		html.tinxy-app-active #footer { 
			display: none !important; 
		}
		html.tinxy-app-active body { background: #f1f5f9 !important; }

		.dashicons {
			font-family: dashicons !important;
			display: inline-block;
			line-height: 1;
			vertical-align: middle;
		}

		.nav-item .dashicons { font-size: 18px; width: 18px; height: 18px; opacity: 1; }
		.icon-action .dashicons { font-size: 20px; width: 20px; height: 20px; color: inherit; }

		:root {
			--tinxy-primary: #6366f1;
			--tinxy-primary-soft: #6366f115;
			--tinxy-sidebar: #4f46e5;
			--tinxy-accent: #818cf8;
			--tinxy-bg: #f1f5f9;
			--tinxy-card: #ffffff;
			--tinxy-text: #1e293b;
			--tinxy-text-light: #64748b;
			--tinxy-border: #e2e8f0;
			--tinxy-success: #10b981;
			--tinxy-warning: #f59e0b;
			--tinxy-danger: #ef4444;
			--radius-lg: 16px;
			--radius-md: 12px;
			--shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
			--shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
		}

		* { box-sizing: border-box; }

				/* white-label CSS injected via wp_add_inline_style */


		.tinxy-app-frame {
			display: flex;
			background: var(--tinxy-bg);
			height: 100vh;
			width: 100vw;
			overflow: hidden;
			overflow-x: hidden;
			font-family: 'Plus Jakarta Sans', sans-serif;
			color: var(--tinxy-text);
			position: fixed;
			top: 0;
			left: 0;
			z-index: 99999;
			box-sizing: border-box;
		}
		
		/* Prevent WordPress from adding space at the top */
		html, body { margin: 0; padding: 0; }
		html.tinxy-app-active, html.tinxy-app-active body { margin: 0 !important; padding: 0 !important; overflow: hidden !important; }
		html.tinxy-app-active #wpadminbar,
		html.tinxy-app-active header:not(.tinxy-app-topbar),
		html.tinxy-app-active footer,
		html.tinxy-app-active #masthead,
		html.tinxy-app-active #colophon,
		html.tinxy-app-active .site-header,
		html.tinxy-app-active .site-footer { display: none !important; }

		/* Sidebar */
		.tinxy-app-sidebar {
			width: 280px;
			background: var(--tinxy-sidebar);
			color: white;
			display: flex;
			flex-direction: column;
			height: 100%;
			min-height: 0;
			overflow: hidden;
			transition: width 0.3s ease;
			position: relative;
			z-index: 1000300;
			flex-shrink: 0;
		}
		.tinxy-sidebar-toggle-wrap {
			display: none;
			flex-shrink: 0;
			justify-content: center;
			align-items: center;
			position: relative;
			z-index: 200;
			border-top: 1px solid rgba(255,255,255,0.08);
			padding: 10px 0 12px;
			pointer-events: auto;
		}
		.tinxy-sidebar-toggle-btn {
			position: relative;
			flex-shrink: 0;
			width: 36px;
			height: 36px;
			background: rgba(255,255,255,0.1);
			border: 1px solid rgba(255,255,255,0.18);
			color: white;
			border-radius: 10px;
			cursor: pointer;
			align-items: center;
			justify-content: center;
			z-index: 2;
			pointer-events: auto !important;
			transition: background 0.2s;
			display: none;
			padding: 0;
		}
		.tinxy-sidebar-toggle-btn:hover { background: rgba(255,255,255,0.22); }
		.tinxy-sidebar-toggle-btn .dashicons { font-size: 18px; width: 18px; height: 18px; }
		.nav-item-short-label { display: none; }
		@media (min-width: 1024px) {
			.tinxy-sidebar-toggle-wrap { display: flex; }
			.tinxy-sidebar-toggle-btn { display: flex; }
			.tinxy-app-sidebar.tinxy-sidebar-compact { width: 108px; }
			.tinxy-app-sidebar.tinxy-sidebar-compact .sidebar-header { padding: 16px 10px; }
			.tinxy-app-sidebar.tinxy-sidebar-compact .sidebar-branding {
				align-items: center;
				padding: 0;
				gap: 0;
			}
			.tinxy-app-sidebar.tinxy-sidebar-compact .sidebar-branding > *:not(.tinxy-sidebar-logo-box),
			.tinxy-app-sidebar.tinxy-sidebar-compact .sidebar-view-switcher,
			.tinxy-app-sidebar.tinxy-sidebar-compact .nav-section {
				display: none !important;
			}
			.tinxy-app-sidebar.tinxy-sidebar-compact .nav-item {
				flex-direction: column;
				align-items: center;
				justify-content: center;
				padding: 8px 4px;
				text-align: center;
				gap: 3px;
				font-size: 0;
			}
			.tinxy-app-sidebar.tinxy-sidebar-compact .nav-item > *:not(.dashicons):not(.nav-item-short-label):not(svg),
			.tinxy-app-sidebar.tinxy-sidebar-compact .nav-item > .nav-item-label,
			.tinxy-app-sidebar.tinxy-sidebar-compact .nav-item > span:not(.dashicons):not(.nav-item-short-label) {
				display: none !important;
			}
			.tinxy-app-sidebar.tinxy-sidebar-compact .nav-item > .dashicons,
			.tinxy-app-sidebar.tinxy-sidebar-compact .nav-item > .nav-item-short-label {
				font-size: 9px;
			}
			.tinxy-app-sidebar.tinxy-sidebar-compact .nav-item > .dashicons { font-size: 18px; }
			.tinxy-app-sidebar.tinxy-sidebar-compact .nav-item > .dashicons svg { width: 18px; height: 18px; }
			.tinxy-app-sidebar.tinxy-sidebar-compact .nav-item-short-label {
				display: block !important;
				font-weight: 700;
				color: rgba(255,255,255,0.85);
				line-height: 1.2;
				max-width: 96px;
				text-transform: none;
				letter-spacing: 0;
				white-space: normal;
				overflow: visible;
				text-overflow: unset;
				word-break: break-word;
				padding: 0 2px;
				font-size: 10px;
			}
			.tinxy-app-sidebar.tinxy-sidebar-compact .nav-item.active .nav-item-short-label { color: var(--tinxy-sidebar); }
			.tinxy-app-sidebar.tinxy-sidebar-compact .sidebar-nav { padding: 0 4px; }
		}
		.sidebar-header { 
			padding: 20px; 
			border-bottom: 1px solid rgba(255,255,255,0.05);
			position: relative;
			z-index: 100;
		}
		.sidebar-scrollable-content {
			flex: 1 1 auto;
			min-height: 0;
			overflow-x: hidden;
			overflow-y: auto;
			padding-bottom: 24px;
		}
		
		/* Custom Scrollbar for Sidebar */
		.sidebar-scrollable-content::-webkit-scrollbar { width: 5px; }
		.sidebar-scrollable-content::-webkit-scrollbar-track { background: transparent; }
		.sidebar-scrollable-content::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 10px; }
		.sidebar-scrollable-content::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

		.sidebar-branding { padding: 30px 20px 20px; display: flex; align-items: center; gap: 12px; }
		.logo-box { width: 32px; height: 32px; background: var(--tinxy-primary); border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 800; flex-shrink: 0; }
		.logo-text .brand { display: block; font-weight: 800; font-size: 18px; line-height: 1; color: #ffffff; text-shadow: 0 1px 2px rgba(0,0,0,0.2); }
		.logo-text .sub { font-size: 10px; color: rgba(255,255,255,0.7); text-transform: uppercase; letter-spacing: 1px; font-weight: 600; }

		/* User Dropdown in Topbar */
		.user-hover-menu { position: relative; margin-left: 10px; z-index: 6; }
		.user-avatar-pill {
			display: flex;
			align-items: center;
			gap: 8px;
			padding: 5px 12px;
			background: #f8fafc;
			border: 1px solid var(--tinxy-border);
			border-radius: 100px;
			cursor: pointer;
			transition: all 0.2s;
		}
		.user-avatar-pill:hover { background: #f1f5f9; border-color: var(--tinxy-primary); }
		.avatar-small {
			width: 24px;
			height: 24px;
			background: var(--tinxy-primary);
			color: white;
			border-radius: 50%;
			display: flex;
			align-items: center;
			justify-content: center;
			font-weight: 700;
			font-size: 11px;
		}
		.user-name-short { font-size: 12px; font-weight: 600; color: var(--tinxy-text); }
		.user-avatar-pill .dashicons-arrow-down-alt2 { font-size: 12px; width: 12px; height: 12px; color: #94a3b8; }

		.user-dropdown-card {
			position: absolute;
			top: calc(100% + 8px);
			right: 0;
			width: 240px;
			background: white;
			border-radius: 12px;
			box-shadow: 0 10px 25px rgba(0,0,0,0.1);
			display: none;
			z-index: 1000500;
			overflow: visible;
			border: 1px solid var(--tinxy-border);
		}
		.user-dropdown-card::before {
			content: "";
			position: absolute;
			top: -12px;
			left: 0;
			width: 100%;
			height: 12px;
			background: transparent;
		}
		.user-hover-menu:hover .user-dropdown-card { display: block; }
		
		.dropdown-header { padding: 12px 15px; background: #fafafa; border-bottom: 1px solid var(--tinxy-border); }
		.dropdown-header strong { display: block; font-size: 12px; color: var(--tinxy-text); line-height: 1.2; }
		.dropdown-header span { display: block; font-size: 10px; color: var(--tinxy-text-light); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

		.dropdown-divider { height: 1px; background: var(--tinxy-border); margin: 0; }
		.dropdown-item {
			display: flex;
			align-items: center;
			gap: 10px;
			padding: 10px 15px;
			color: var(--tinxy-text);
			text-decoration: none !important;
			font-size: 12px;
			font-weight: 500;
			transition: background 0.2s;
		}
		.dropdown-item:hover { background: #f8fafc; color: var(--tinxy-primary); }
		.dropdown-item.logout { color: var(--tinxy-danger) !important; }
		.dropdown-item.logout:hover { background: #fef2f2; }
		.dropdown-item .dashicons { font-size: 16px; width: 16px; height: 16px; }

		.sidebar-nav { padding: 0 15px; }
		.nav-section { font-size: 10px; text-transform: uppercase; color: rgba(255,255,255,0.5); font-weight: 700; margin: 25px 0 10px 10px; letter-spacing: 1px; display: flex; align-items: center; gap: 8px; }
		.tinxy-nav-area-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; box-shadow: 0 0 0 2px rgba(255,255,255,0.08); }
		.nav-section.tinxy-nav-area-commerciale { color: #93c5fd; }
		.nav-section.tinxy-nav-area-commerciale .tinxy-nav-area-dot { background: #3b82f6; box-shadow: 0 0 8px rgba(59,130,246,0.55); }
		.nav-section.tinxy-nav-area-operativa { color: #fdba74; }
		.nav-section.tinxy-nav-area-operativa .tinxy-nav-area-dot { background: #f97316; box-shadow: 0 0 8px rgba(249,115,22,0.55); }
		.nav-item { display: flex; align-items: center; gap: 12px; padding: 12px 15px; color: rgba(255,255,255,0.7); text-decoration: none !important; border-radius: 10px; font-weight: 600; font-size: 14px; transition: 0.2s; min-width: 0; overflow: visible; }
		.nav-item-label { flex: 1 1 auto; min-width: 0; line-height: 1.3; white-space: normal; overflow-wrap: break-word; }
		.nav-item:hover { color: #ffffff; background: rgba(255,255,255,0.15); }
		.nav-item.active { background: #ffffff !important; color: var(--tinxy-sidebar) !important; font-weight: 800; box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
		.nav-item.active.tinxy-nav-area-commerciale-item { box-shadow: inset 4px 0 0 0 #3b82f6, 0 4px 12px rgba(0,0,0,0.1); }
		.nav-item.active.tinxy-nav-area-operativa-item { box-shadow: inset 4px 0 0 0 #f97316, 0 4px 12px rgba(0,0,0,0.1); }

		.nav-item:hover .dashicons { opacity: 1; }
		.nav-item.active .dashicons { color: var(--tinxy-sidebar) !important; opacity: 1; }

		/* Main Content */
		.tinxy-app-main { flex: 1; display: flex; flex-direction: column; overflow: hidden; min-width: 0; }
		.tinxy-app-topbar { 
			height: auto; 
			min-height: 70px; 
			background: white; 
			border-bottom: 1px solid var(--tinxy-border); 
			display: flex; 
			flex-wrap: wrap;
			justify-content: flex-start; 
			align-items: center; 
			padding: 10px 20px; 
			position: sticky;
			top: 0;
			z-index: 1000100;
			gap: 12px 16px;
			pointer-events: auto;
			overflow: visible;
		}
		.tinxy-app-topbar:has(.user-hover-menu:hover),
		.tinxy-app-topbar:has(.user-hover-menu:focus-within),
		.tinxy-app-topbar:has(.topbar-notifications-wrapper:hover),
		.tinxy-app-topbar:has(.topbar-assistance-wrapper:hover) {
			z-index: 1000500;
		}
		.tinxy-app-topbar.has-customer-bar .topbar-context { flex: 0 1 220px; }
		.tinxy-app-topbar.has-customer-bar .topbar-contacts-center {
			flex: 1 1 280px;
			min-width: 0;
			margin: 0;
		}
		.topbar-actions {
			display: flex;
			align-items: center;
			gap: 10px;
			flex: 1 1 auto;
			flex-wrap: wrap;
			justify-content: flex-end;
			margin-left: auto;
			min-width: 0;
			pointer-events: auto;
			position: relative;
			z-index: 2;
		}
		.topbar-customer-actions,
		.topbar-global-actions,
		.topbar-timer-wrapper,
		.topbar-notifications-wrapper,
		.topbar-assistance-wrapper,
		.topbar-lang-wrapper {
			display: flex;
			align-items: center;
			gap: 10px;
			flex-shrink: 0;
		}
		.topbar-assistance-wrapper,
		.topbar-notifications-wrapper,
		.topbar-timer-wrapper {
			position: relative;
		}
		.topbar-lang-wrapper {
			background: var(--tinxy-bg-alt, #f1f5f9);
			border-radius: 20px;
			padding: 2px;
			border: 1px solid var(--tinxy-border);
			position: relative;
			z-index: 10001;
			pointer-events: auto;
		}
		.topbar-actions .pro-btn,
		.topbar-actions button.pro-btn {
			white-space: nowrap;
			flex-shrink: 0;
		}
		.topbar-actions button, .topbar-actions .pro-btn, .topbar-actions .icon-btn { pointer-events: auto; cursor: pointer; }
		.topbar-context { flex: 1; min-width: 200px; display: flex; flex-direction: column; justify-content: center; }
		.page-title { margin: 0; font-size: 20px; font-weight: 800; color: var(--tinxy-sidebar); line-height: 1.2; }
		.breadcrumb { font-size: 11px; color: var(--tinxy-text-light); margin-top: 4px; display: flex; align-items: center; gap: 4px; }
		.breadcrumb a { color: var(--tinxy-primary); text-decoration: none; }
		.breadcrumb .sep { margin: 0 5px; }

		.search-wrapper { position: relative; width: 160px; transition: all 0.3s; flex-shrink: 3; min-width: 120px; }
		.search-wrapper:focus-within { width: 200px; flex-shrink: 0; }
		.search-wrapper .dashicons { position: absolute; left: 10px; top: 9px; color: #94a3b8; font-size: 16px; width:16px; height:16px; }
		.search-wrapper input { width: 100% !important; padding: 6px 12px 6px 32px !important; border-radius: 10px !important; border: 1px solid var(--tinxy-border) !important; background: #f8fafc !important; font-size: 13px !important; transition: all 0.3s; }
		.search-wrapper input:focus { border-color: var(--tinxy-primary) !important; background: white !important; box-shadow: 0 0 0 3px var(--tinxy-primary-soft) !important; }

		.topbar-contacts-center { 
			display: flex; 
			gap: 15px; 
			align-items: center; 
			background: #f8fafc; 
			padding: 6px 15px; 
			border-radius: 50px; 
			border: 1px solid var(--tinxy-border);
			margin: 0 15px;
			flex-shrink: 2;
			overflow: hidden;
		}
		.top-c-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--tinxy-text); white-space: nowrap; }
		.top-c-item .dashicons { color: var(--tinxy-primary); font-size: 16px; width: 16px; height: 16px; }
		.top-c-item .val { font-weight: 600; }

		.tinxy-app-content { padding: 30px; flex: 1; overflow-y: auto; overflow-x: hidden; position: relative; min-width: 0; }

		/* Cards & Stats */
		.pro-stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-bottom: 30px; }
		.stat-card { background: white; padding: 25px; border-radius: var(--radius-md); border: 1px solid var(--tinxy-border); display: flex; align-items: center; gap: 20px; }
		.stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; }
		.stat-info .val { display: block; font-size: 24px; font-weight: 800; }
		.stat-info .lbl { font-size: 12px; font-weight: 600; color: var(--tinxy-text-light); }

		.stat-card.blue .stat-icon { background: #e0f2fe; color: #0284c7; }
		.stat-card.purple .stat-icon { background: #f3e8ff; color: #9333ea; }
		.stat-card.orange .stat-icon { background: #ffedd5; color: #ea580c; }

		/* Table Design */
		.pro-table-container { background: white; border-radius: var(--radius-md); border: 1px solid var(--tinxy-border); overflow: hidden; max-width: 100%; }
		.table-header { padding: 20px 25px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--tinxy-border); }
		.pro-table { width: 100%; border-collapse: collapse; }
		.pro-table th { background: #f8fafc; padding: 15px 25px; text-align: left; font-size: 12px; color: var(--tinxy-text-light); text-transform: uppercase; font-weight: 700; }
		.pro-table td { padding: 15px 25px; border-bottom: 1px solid var(--tinxy-border); vertical-align: middle; }
		
		/* Website links overflow fix */
		.website-link-container {
			max-width: 100%;
			overflow: hidden;
			text-overflow: ellipsis;
			white-space: nowrap;
			display: block !important;
		}
		.website-link-container a {
			max-width: 100%;
			overflow: hidden;
			text-overflow: ellipsis;
			white-space: nowrap;
			display: inline-block;
			vertical-align: middle;
		}
		
		/* Specific column sizing for Lead Gen */
		#lead-gen-results .pro-table { table-layout: fixed; width: 100%; position: relative; }
		#lead-gen-results .pro-table-container { overflow-x: auto; }

		#lead-gen-results td { 
			white-space: nowrap; 
			overflow: hidden; 
			text-overflow: ellipsis; 
		}
		#lead-gen-results td:hover {
			white-space: normal;
			overflow: visible;
			word-break: break-all;
		}

		.user-meta { display: flex; align-items: center; gap: 12px; }
		.u-pic { width: 36px; height: 36px; background: var(--tinxy-primary-soft); color: var(--tinxy-primary); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-weight: 800; }
		.u-txt .name { display: block; font-weight: 700; font-size: 14px; }
		.u-txt .comp { font-size: 12px; color: var(--tinxy-text-light); }
		.badge { padding: 4px 12px; border-radius: 20px; font-size: 11px; font-weight: 700; text-transform: uppercase; }
		.badge.success { background: #dcfce7; color: #15803d; }
		.badge.danger { background: #fee2e2; color: #b91c1c; }

		.notification-bell-btn {
			width: 44px;
			height: 44px;
			background: white !important;
			border: 1px solid var(--tinxy-border) !important;
			color: var(--tinxy-text-light) !important;
			position: relative;
			display: flex;
			align-items: center;
			justify-content: center;
			border-radius: 12px;
			transition: all 0.2s ease;
		}
		.notification-bell-btn:hover {
			background: #f8fafc !important;
			color: var(--tinxy-primary) !important;
			border-color: var(--tinxy-primary) !important;
			transform: translateY(-2px);
		}
		.notification-badge {
			position: absolute;
			top: -4px;
			right: -4px;
			padding: 3px 7px !important;
			font-size: 10px !important;
			min-width: 20px;
			height: 20px;
			display: none;
			align-items: center;
			justify-content: center;
			box-shadow: 0 2px 4px rgba(239, 68, 68, 0.3);
			border: 2px solid white;
		}
		.notifications-panel-footer {
			border-top: 1px solid var(--tinxy-border);
			padding: 8px 12px;
		}
		#tinxy-mark-all-read {
			width: 100%;
			justify-content: center;
			gap: 6px;
			font-size: 12px;
			font-weight: 600;
			color: var(--tinxy-primary) !important;
		}
		#tinxy-mark-all-read .dashicons {
			font-size: 16px;
			width: 16px;
			height: 16px;
		}
		#tinxy-mark-all-read:disabled {
			opacity: 0.45;
			cursor: default;
			pointer-events: none;
		}

		.spin { animation: spin 1s linear infinite; }
		@keyframes spin { 100% { transform: rotate(360deg); } }

		/* Detail Layout */
		.pro-detail-grid {
			display: block;
			position: relative;
			width: 100%;
		}
		.pro-detail-grid.has-icon-sidebar .pro-detail-main {
			min-width: 0;
			width: 100%;
			padding-right: 108px;
			box-sizing: border-box;
		}
		
		/* Right Icon Sidebar — next to the drawer, never painted on top of it */
		.pro-detail-icon-sidebar {
			display: flex !important;
			flex-direction: column;
			gap: 10px;
			padding: 10px 8px;
			background: white;
			border-radius: 12px;
			border: 1px solid var(--tinxy-border);
			position: fixed;
			top: 240px;
			right: 12px;
			transform: none;
			height: fit-content;
			max-height: calc(100vh - 256px);
			overflow-y: auto;
			box-shadow: var(--shadow-sm);
			z-index: 40;
			width: 92px;
			min-width: 92px;
			max-width: 92px;
			pointer-events: auto;
			visibility: visible !important;
			opacity: 1 !important;
		}
		html.tinxy-drawer-open .pro-detail-icon-sidebar {
			z-index: 1000160;
			box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
		}
		@media (min-width: 769px) {
			html.tinxy-drawer-open .pro-detail-icon-sidebar {
				z-index: 1000210;
			}
			html.tinxy-drawer-open:has(.pro-detail-icon-sidebar) .pro-drawer.open {
				right: 108px;
			}
		}
		.pro-detail-icon-sidebar .icon-action {
			width: 100%;
			min-width: 0;
			height: auto;
			min-height: 56px;
			flex-direction: column;
			gap: 4px;
			padding: 8px 4px;
		}
		.pro-detail-icon-sidebar .icon-action-label {
			display: block;
			font-size: 9px;
			font-weight: 700;
			line-height: 1.15;
			text-align: center;
			color: inherit;
			white-space: normal;
			word-break: break-word;
			overflow: visible;
			max-width: 100%;
			letter-spacing: 0.1px;
		}
		.pro-detail-icon-sidebar .icon-action.active .icon-action-label {
			color: white;
		}
		.icon-action {
			width: 40px;
			height: 40px;
			border-radius: 10px;
			border: none;
			background: #f8fafc;
			color: #64748b;
			display: flex;
			align-items: center;
			justify-content: center;
			cursor: pointer;
			transition: all 0.2s;
			position: relative;
		}
		.icon-action:hover {
			background: var(--tinxy-primary-soft);
			color: var(--tinxy-primary);
		}
		.icon-action.active {
			background: var(--tinxy-primary);
			color: white;
		}
		.icon-action .dashicons { font-size: 20px; width: 20px; height: 20px; }

		/* Side Drawers */
		.pro-drawer {
			position: fixed;
			top: 0;
			right: -500px;
			width: 500px;
			height: 100vh;
			background: white;
			box-shadow: -10px 0 30px rgba(0,0,0,0.1);
			z-index: 1000200;
			transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
			display: flex;
			flex-direction: column;
			overflow-x: hidden;
			box-sizing: border-box;
			pointer-events: none;
		}
		.pro-drawer.open {
			right: 0;
			z-index: 1000200 !important;
			pointer-events: auto;
		}
		.pro-drawer * { box-sizing: border-box; }
		.drawer-header {
			padding: 20px 25px;
			background: #f8fafc;
			border-bottom: 1px solid var(--tinxy-border);
			display: flex;
			justify-content: space-between;
			align-items: center;
		}
		.drawer-header h3 { margin: 0; font-size: 16px; color: var(--tinxy-sidebar); text-transform: uppercase; letter-spacing: 0.5px; }
		.drawer-body { flex: 1; overflow-y: auto; padding: 25px; }
		.drawer-overlay {
			position: fixed;
			top: 0;
			left: 0;
			width: 100%;
			height: 100%;
			background: rgba(15,23,42,0.4);
			z-index: 1000150;
			display: none !important;
			pointer-events: none !important;
			visibility: hidden !important;
			opacity: 0 !important;
		}
		.drawer-overlay.is-visible {
			display: block !important;
			pointer-events: auto !important;
			visibility: visible !important;
			opacity: 1 !important;
			z-index: 1000150 !important;
		}
		.pro-drawer.open {
			z-index: 1000200 !important;
		}

		.pro-card { background: white; border-radius: var(--radius-md); border: 1px solid var(--tinxy-border); margin-bottom: 25px; }
		.pro-card-header { padding: 20px 25px; border-bottom: 1px solid var(--tinxy-border); display: flex; justify-content: space-between; align-items: center; }
		.pro-card-header h4 { margin: 0; font-size: 15px; font-weight: 700; color: var(--tinxy-sidebar); text-transform: uppercase; letter-spacing: 0.5px; }
		.pro-card.highlight { border-top: 4px solid var(--tinxy-primary); }

		/* Contact Info */
		.contact-list { padding: 15px 25px 25px; }
		.c-item { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 14px; color: var(--tinxy-text); }
		.c-item:last-child { margin-bottom: 0; }
		.c-item .dashicons { color: var(--tinxy-primary); font-size: 18px; width: 18px; height: 18px; }

		/* Timeline Feed */
		.pro-timeline-feed { padding: 30px; position: relative; max-height: 650px; overflow-y: auto; scroll-behavior: smooth; }
		.pro-timeline-inner::before { content: ""; position: absolute; left: 19px; top: 20px; bottom: 20px; width: 2px; background: var(--tinxy-border); z-index: 1; }
		.feed-item { display: flex; gap: 20px; margin-bottom: 30px; position: relative; z-index: 2; }
		.feed-marker { flex-shrink: 0; width: 40px; height: 40px; z-index: 10; display: flex; justify-content: center; align-items: center; position: relative; }
		.feed-body { flex: 1; background: #f8fafc; padding: 20px; border-radius: 12px; border: 1px solid var(--tinxy-border); }
		.feed-header { display: flex; justify-content: space-between; margin-bottom: 8px; }
		.feed-type { font-size: 10px; font-weight: 800; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; background: #e2e8f0; }
		.feed-project { font-size: 11px; color: #64748b; font-weight: 600; display: flex; align-items: center; gap: 4px; border-left: 1px solid var(--tinxy-border); padding-left: 10px; }
		.feed-project .dashicons { font-size: 14px; width: 14px; height: 14px; color: var(--tinxy-primary); }
		.feed-author { font-size: 11px; color: var(--tinxy-primary); font-weight: 600; display: flex; align-items: center; gap: 4px; border-left: 1px solid var(--tinxy-border); padding-left: 10px; }
		.feed-author .dashicons { font-size: 14px; width: 14px; height: 14px; }
		.feed-time { font-size: 11px; color: var(--tinxy-text-light); border-left: 1px solid var(--tinxy-border); padding-left: 10px; }
		.delete-feed-item, .edit-feed-item { background: transparent; border: none; color: #94a3b8; cursor: pointer; padding: 0 5px; transition: 0.2s; border-left: 1px solid var(--tinxy-border); margin-left: 5px; padding-left: 10px; }
		.delete-feed-item:hover { color: var(--tinxy-danger); }
		.edit-feed-item:hover { color: var(--tinxy-primary); }
		.delete-feed-item .dashicons, .edit-feed-item .dashicons { font-size: 16px; width: 16px; height: 16px; }
		.feed-text { font-size: 13px; line-height: 1.6; overflow-wrap: anywhere; word-break: break-word; }
		.tinxy-grant-analysis-summary { max-width: 100%; }
		.tinxy-grant-analysis-preview { margin: 6px 0 10px; color: #64748b; font-size: 13px; line-height: 1.45; }
		.tinxy-grant-analysis-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
		.tinxy-grant-analysis-summary.is-compact { display: inline-block; vertical-align: top; max-width: calc(100% - 8px); }
		.tinxy-grant-analysis-summary.is-compact .tinxy-grant-analysis-preview { margin-bottom: 8px; }
		.tinxy-grant-analysis-actions a.pro-btn { text-decoration: none; display: inline-flex; align-items: center; }

		/* Item-specific Colors */
		.feed-item.chiamata .marker-dot { border-color: var(--tinxy-warning); }
		.feed-item.email .marker-dot { border-color: var(--tinxy-success); }
		.feed-item.lavoro .marker-dot { border-color: var(--tinxy-primary); }
		.feed-item.whatsapp .marker-dot { border-color: #25d366; }

		/* Forms & Inputs */
		.pro-form-lite { padding: 0; }
		.f-group { margin-bottom: 20px; }
		.f-group label { display: block; font-size: 11px; font-weight: 700; color: var(--tinxy-text-light); margin-bottom: 10px; text-transform: uppercase; letter-spacing: 0.8px; }
		.pro-form-lite select, .pro-form-lite input:not([type="checkbox"]):not([type="radio"]), .pro-form-lite textarea,
		.form-body select, .form-body input:not([type="checkbox"]):not([type="radio"]), .form-body textarea { width: 100% !important; border: 1px solid var(--tinxy-border) !important; border-radius: 10px !important; padding: 12px 15px !important; font-size: 14px !important; background: #fdfdfd !important; transition: border-color 0.2s; }
		.pro-form-lite select:focus, .pro-form-lite input:not([type="checkbox"]):not([type="radio"]):focus, .pro-form-lite textarea:focus,
		.form-body select:focus, .form-body input:not([type="checkbox"]):not([type="radio"]):focus, .form-body textarea:focus { border-color: var(--tinxy-primary) !important; outline: none; background: white !important; }
		.form-body input[type="checkbox"],
		.form-body input[type="radio"],
		.pro-form-lite input[type="checkbox"],
		.pro-form-lite input[type="radio"] {
			width: 16px !important;
			height: 16px !important;
			padding: 0 !important;
			margin: 0 !important;
			border-radius: 4px !important;
			background: #fff !important;
			flex-shrink: 0;
			accent-color: var(--tinxy-primary);
		}
		#cal_new_task_status, #task_status { background: #64748b !important; color: white !important; }
		#cal_new_task_status:focus, #task_status:focus { color: white !important; }
		.pro-btn { background: var(--tinxy-primary); color: white !important; border: none; padding: 14px 20px; border-radius: 10px; font-weight: 700; cursor: pointer; transition: 0.3s; font-size: 15px; }
		.pro-btn:hover { background: var(--tinxy-sidebar); transform: translateY(-1px); }
		.pro-btn:active { transform: translateY(0); }
		.pro-btn.block { width: 100%; display: block; }
		.pro-btn.sm { padding: 6px 12px; font-size: 12px; }

		/* Modals — :not(.is-open) beats jQuery inline display:block that was blocking all clicks */
		.pro-form-overlay:not(.is-open) {
			display: none !important;
			pointer-events: none !important;
			visibility: hidden !important;
			opacity: 0 !important;
		}
		.pro-form-overlay.is-open {
			position: fixed;
			top: 0;
			left: 0;
			width: 100%;
			height: 100%;
			background: rgba(15,23,42,0.8);
			z-index: 1001000 !important;
			display: flex !important;
			align-items: center !important;
			justify-content: center !important;
			pointer-events: auto !important;
			visibility: visible !important;
			opacity: 1 !important;
		}
		.pro-form-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(15,23,42,0.8); z-index: 1001000; display: none; align-items: center; justify-content: center; pointer-events: none; }
		.close-btn { background: transparent; border: none; font-size: 24px; color: #94a3b8; cursor: pointer; transition: 0.2s; line-height: 1; }
		.close-btn:hover { color: #ef4444; }
		.pro-form-card { background: white; border-radius: var(--radius-lg); width: 600px; max-width: 95vw; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04); position: relative; z-index: 1; pointer-events: auto; }
		.pro-form-card.small { width: 400px; max-width: 95vw; }
		.pro-form-card.tinxy-grant-analysis-card {
			width: min(920px, 96vw);
			max-height: 92vh;
			display: flex;
			flex-direction: column;
			overflow: hidden;
		}
		.tinxy-grant-analysis-card .form-header {
			display: flex;
			align-items: flex-start;
			justify-content: space-between;
			gap: 16px;
			padding: 18px 22px;
			border-bottom: 1px solid #e2e8f0;
		}
		.tinxy-grant-analysis-card .form-body {
			overflow-y: auto;
			flex: 1;
			padding: 22px 26px 28px;
			font-size: 14px;
			line-height: 1.65;
			color: #334155;
		}
		.tinxy-grant-analysis-card .form-footer {
			display: flex;
			justify-content: flex-end;
			gap: 10px;
			padding: 14px 22px;
			border-top: 1px solid #e2e8f0;
			background: #f8fafc;
		}
		
		/* Sidebar refinement */
		aside.pro-card { background: white; border: 1px solid var(--tinxy-border); border-radius: var(--radius-md); }
		aside.pro-card .pro-card-header { padding: 15px 20px; border-bottom: 1px solid #f1f5f9; background: #fcfdfe; }
		
		.pro-btn.ghost.block { width: 100%; text-align: center; justify-content: center; }

		/* Table refinements */
		.pro-table-container { box-shadow: var(--shadow-sm); }

		/* Project Nesting & Progress */
		.project-item { background: white; border: 1px solid var(--tinxy-border); border-radius: 12px; margin-bottom: 15px; overflow: hidden; }
		.project-item-header { padding: 15px; background: #f8fafc; border-bottom: 1px solid var(--tinxy-border); cursor: pointer; transition: 0.2s; }
		.project-item-header:hover { background: #f1f5f9; }
		.project-meta { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
		.project-title { font-weight: 700; color: var(--tinxy-sidebar); display: flex; align-items: center; gap: 8px; font-size: 14px; }
		.project-stats { font-size: 11px; color: var(--tinxy-text-light); font-weight: 600; }
		
		.progress-bar-container { height: 6px; background: #e2e8f0; border-radius: 3px; overflow: hidden; margin-top: 8px; }
		.progress-bar-fill { height: 100%; background: var(--tinxy-primary); transition: width 0.4s ease; }
		
		.project-tasks-nested { padding: 10px 15px 15px; background: white; display: none; }
		.project-item.expanded .project-tasks-nested { display: block; }
		
		.nested-task { display: flex; align-items: center; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f1f5f9; }
		.nested-task:last-child { border-bottom: none; }
		.nested-task-info { display: flex; align-items: center; gap: 10px; font-size: 13px; }
		.task-status-dot { width: 8px; height: 8px; border-radius: 50%; background: #94a3b8; }
		.task-status-dot.completato { background: var(--tinxy-success); }
		.task-status-dot.in_corso { background: var(--tinxy-primary); }
		.task-status-dot.in_attesa { background: var(--tinxy-warning); }
		
		.nested-task-title { font-weight: 500; color: var(--tinxy-text); }
		.nested-task-actions { display: flex; gap: 8px; }
		.btn-nest-action { background: none; border: none; padding: 4px; color: #94a3b8; cursor: pointer; transition: 0.2s; border-radius: 4px; }
		.btn-nest-action:hover { background: #f1f5f9; color: var(--tinxy-primary); }
		.pro-table td { font-size: 13px; }
		.pro-table tbody tr:hover { background-color: #fcfdfe; }
		.pro-action-btn { 
			display: inline-flex; 
			align-items: center; 
			gap: 5px; 
			padding: 8px 12px; 
			border-radius: 8px; 
			font-size: 12px; 
			font-weight: 600; 
			text-decoration: none !important;
			transition: all 0.2s;
			cursor: pointer;
		}
		.pro-action-btn:hover { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
		.contact-meta span { display: inline-flex; align-items: center; gap: 5px; color: var(--tinxy-text-light); margin-bottom: 4px; }
		.contact-meta .dashicons { font-size: 16px; width: 16px; height: 16px; color: var(--tinxy-primary); }
		.form-header { padding: 20px 25px; background: #f8fafc; border-bottom: 1px solid var(--tinxy-border); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
		.pro-form-card .form-header h3 { margin: 0; padding: 0; font-size: 16px; font-weight: 800; line-height: 1.3; color: var(--tinxy-text); }
		.form-body { padding: 25px; }
		.input-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
		.form-footer { padding: 20px 25px; background: #f8fafc; text-align: right; display: flex; justify-content: flex-end; align-items: center; gap: 10px; flex-wrap: wrap; }
		.form-footer .pro-btn { width: auto; display: inline-flex; align-items: center; justify-content: center; }
		.tinxy-check-row { display: flex; align-items: flex-start; gap: 10px; margin-top: 18px; }
		.tinxy-check-row input[type="checkbox"] { width: 16px !important; height: 16px !important; margin: 2px 0 0 !important; padding: 0 !important; flex-shrink: 0; }
		.tinxy-check-row label { display: block; margin: 0; cursor: pointer; font-size: 13px; font-weight: 600; color: #334155; text-transform: none; letter-spacing: 0; line-height: 1.4; }
		.tinxy-check-row label span { display: block; font-weight: 500; color: #64748b; margin-top: 3px; }

		/* Projects & Misc */
		.project-tags { padding: 5px 25px 25px; }
		.p-tag { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--tinxy-text); margin-bottom: 10px; background: #f1f5f9; padding: 10px 15px; border-radius: 10px; border: 1px solid var(--tinxy-border); }
		.p-tag:last-child { margin-bottom: 0; }
		.p-tag .dashicons { font-size: 16px; width: 16px; height: 16px; color: var(--tinxy-primary); }
		.empty-txt { padding: 20px 25px; color: var(--tinxy-text-light); font-size: 13px; font-style: italic; }

		.icon-btn { background: var(--tinxy-primary-soft); color: var(--tinxy-primary); border: none; width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 20px; font-weight: 700; cursor: pointer; transition: 0.2s; }
		.icon-btn:hover { background: var(--tinxy-primary); color: white; }
		.lite-input { width: 100% !important; border: 1px solid var(--tinxy-border) !important; border-radius: 10px !important; padding: 10px 12px !important; font-size: 14px !important; margin-bottom: 12px; background: #f9fafb !important; }
		.form-header.danger { background: #fef2f2; border-bottom: 1px solid #fee2e2; }

		/* Improved Checkboxes for Filters */
		.extra-filters-row { display: flex; gap: 15px; margin-top: 15px; padding: 0 10px; flex-wrap: wrap; }
		.tinxy-filter-pill {
			display: flex;
			align-items: center;
			gap: 10px;
			background: white;
			border: 1px solid var(--tinxy-border);
			padding: 8px 16px;
			border-radius: 50px;
			cursor: pointer;
			transition: 0.2s all;
			user-select: none;
			font-size: 13px;
			font-weight: 600;
			color: var(--tinxy-text-light);
			box-shadow: var(--shadow-sm);
		}
		.tinxy-filter-pill:hover { border-color: var(--tinxy-primary); background: var(--tinxy-primary-soft); color: var(--tinxy-primary); }
		.tinxy-filter-pill input[type="checkbox"] { display: none !important; }
		.tinxy-filter-pill.active {
			background: var(--tinxy-primary);
			border-color: var(--tinxy-primary);
			color: white;
			box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
		}
		.tinxy-filter-pill.active .dashicons { color: white !important; }
		.tinxy-filter-pill .dashicons { font-size: 18px; width: 18px; height: 18px; }
		.form-header.danger h3 { color: var(--tinxy-danger); }
		.pro-btn.danger { background: var(--tinxy-danger); }
		.pro-btn.ghost { background: transparent; color: var(--tinxy-text-light) !important; border: 1px solid var(--tinxy-border); }
		.pro-btn.ghost:hover { background: #f8fafc; color: var(--tinxy-text) !important; }

		.pad-25 { padding: 25px !important; }
		.no-p { padding: 0 !important; }
		.mt-10 { margin-top: 10px; }
		.text-right { text-align: right; }

		.pro-flex-grid {
			display: flex;
			gap: 30px;
			align-items: flex-start;
		}

		.pro-search-grid {
			display: grid; 
			grid-template-columns: 1.2fr 1fr 1fr 140px; 
			gap: 15px; 
			align-items: flex-end; 
			background: #f8fafc; 
			padding: 15px; 
			border-radius: 12px; 
			border: 1px solid #e2e8f0;
		}

		.pro-plans-grid {
			display: grid;
			grid-template-columns: 1fr 1fr;
			gap: 30px;
		}

		/* Autocomplete Suggestions */
		.autocomplete-suggestions {
			position: absolute;
			top: 100%;
			left: 0;
			right: 0;
			background: white;
			border: 1px solid var(--tinxy-border);
			border-radius: 0 0 10px 10px;
			box-shadow: var(--shadow-md);
			z-index: 1000;
			max-height: 250px;
			overflow-y: auto;
		}
		.suggestion-item {
			padding: 10px 15px;
			cursor: pointer;
			font-size: 13px;
			border-bottom: 1px solid #f8fafc;
			transition: background 0.2s;
		}
		.suggestion-item:hover {
			background: var(--tinxy-primary-soft);
		}
		.suggestion-item .s-name { font-weight: 700; display: block; color: var(--tinxy-text); }
		.suggestion-item .s-addr { font-size: 11px; color: var(--tinxy-text-light); }

		/* Calendar Styling */
		.fc-event {
			border: none !important;
			padding: 4px 8px !important;
			border-radius: 6px !important;
			cursor: pointer !important;
			box-shadow: 0 2px 4px rgba(0,0,0,0.05);
			transition: transform 0.2s, box-shadow 0.2s !important;
		}
		.fc-event:hover {
			transform: translateY(-1px);
			box-shadow: 0 4px 8px rgba(0,0,0,0.1) !important;
		}
		.fc-daygrid-event-dot {
			display: none !important;
		}
		.fc-event-time {
			font-weight: 800 !important;
			margin-right: 5px;
			opacity: 1 !important;
			font-size: 10px;
		}
		.fc-event-title {
			font-weight: 600 !important;
			font-size: 11px;
			white-space: nowrap;
			overflow: hidden;
			text-overflow: ellipsis;
			display: block;
			opacity: 1 !important;
		}
		.fc-event-customer {
			font-weight: 700;
			font-size: 10px;
			text-transform: uppercase;
			opacity: 1 !important;
			white-space: nowrap;
			overflow: hidden;
			text-overflow: ellipsis;
			flex: 1;
		}
		.fc-event-top-line {
			display: flex;
			align-items: center;
			gap: 5px;
			margin-bottom: 2px;
		}
		.fc-daygrid-dot-event {
			background-color: var(--tinxy-primary-soft); /* Fallback */
			color: white !important;
		}
		.fc-daygrid-dot-event .fc-event-title {
			color: white !important;
		}
		
		/* View specific tweaks */
		.fc-v-event { padding: 4px !important; }

		/* Mobile Responsiveness */
		@media (max-width: 1400px) {
			.tinxy-app-topbar.has-customer-bar .topbar-contacts-center {
				flex: 1 1 100%;
				order: 3;
				justify-content: flex-start;
			}
			.tinxy-app-topbar.has-customer-bar .topbar-actions {
				flex: 1 1 auto;
				order: 2;
			}
		}

		@media (max-width: 1400px) {
			.topbar-contacts-center { gap: 10px; padding: 6px 12px; margin: 0 10px; }
			.top-c-item .val { font-size: 11px; }
			.search-wrapper { width: 140px; }
		}

		@media (max-width: 1200px) {
			.topbar-contacts-center { display: none; }
			.topbar-actions .pro-btn span:not(.dashicons) { display: none; }
			.topbar-actions .pro-btn { padding: 8px 12px; width: auto; height: auto; }
		}

		@media (max-width: 1024px) {
			.topbar-contacts-center { display: none; }
		}

		@media (max-width: 768px) {
			.tinxy-app-sidebar {
				position: fixed;
				left: -280px;
				top: 0;
				bottom: 0;
				z-index: 1000005;
				transition: left 0.3s ease;
				box-shadow: 10px 0 30px rgba(0,0,0,0.1);
			}
			.tinxy-app-sidebar.open { left: 0; }
			#tinxy-mobile-toggle, #tinxy-mobile-close { display: flex !important; }
			
			.tinxy-app-topbar { padding: 0 10px; height: auto; min-height: 60px; gap: 5px; }
			.tinxy-app-frame.is-app { 
				top: 0 !important;
				height: 100vh !important;
			}
			.is-app .tinxy-app-topbar { 
				min-height: calc(60px + env(safe-area-inset-top)) !important; 
				padding-top: env(safe-area-inset-top) !important;
			}
			.is-app .tinxy-app-sidebar {
				padding-top: 20px !important; /* Fallback */
				padding-top: env(safe-area-inset-top) !important;
			}
			.topbar-contacts-center, .topbar-lang-wrapper, .topbar-assistance-wrapper { display: none !important; }
			.page-title { font-size: 14px; }
			.breadcrumb { display: none; }
			.search-wrapper { display: none; }
			.user-name-short { display: none; }
			.user-avatar-pill { padding: 5px; border-radius: 50%; }
			
			.topbar-context { min-width: 0; flex: 1; overflow: hidden; }
			.page-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
			
			.topbar-actions { gap: 4px; }
			.topbar-global-actions { gap: 4px; }
			.topbar-global-actions .pro-btn { font-size: 0 !important; width: 36px; height: 36px; padding: 0 !important; justify-content: center; }
			.topbar-global-actions .pro-btn .dashicons { margin-right: 0 !important; font-size: 18px; width: 18px; height: 18px; }
			
			.tinxy-app-content { padding: 15px; }
			.pro-stats-grid { grid-template-columns: 1fr; }
			.pro-flex-grid { flex-direction: column; gap: 20px; }
			.pro-search-grid { grid-template-columns: 1fr; gap: 15px; }
			.pro-plans-grid { grid-template-columns: 1fr; gap: 20px; }
			.input-row { grid-template-columns: 1fr !important; gap: 10px !important; }
			
			.pro-detail-grid.has-icon-sidebar .pro-detail-main { padding-right: 0; }
			.pro-detail-icon-sidebar {
				flex-direction: row;
				flex-wrap: wrap;
				justify-content: center;
				align-items: stretch;
				position: fixed;
				top: auto;
				bottom: 16px;
				left: 16px;
				right: 16px;
				transform: none;
				z-index: 1000210;
				margin-bottom: 0;
				width: auto;
				min-width: 0;
				max-width: none;
				box-sizing: border-box;
				padding: 10px 12px;
				gap: 8px;
			}
			.pro-detail-icon-sidebar .icon-action {
				flex: 1 1 72px;
				min-width: 72px;
				max-width: 96px;
				min-height: 58px;
			}
			.pro-detail-icon-sidebar .icon-action-label {
				font-size: 8px;
			}

			/* Timeline optimization */
			.pro-timeline-feed { padding: 15px; }
			.pro-timeline-inner::before { left: 15px; top: 16px; bottom: 16px; }
			.feed-item { gap: 15px; margin-bottom: 20px; }
			.feed-marker { width: 32px; height: 32px; }
			.feed-body { padding: 15px; }
			.feed-header { flex-direction: column; align-items: flex-start; gap: 5px; position: relative; }
			.feed-header > span, .feed-header > button { 
				border-left: none !important; 
				padding-left: 0 !important; 
				margin-left: 0 !important; 
			}
			.feed-time { color: var(--tinxy-text-light); font-size: 10px; }
			.edit-feed-item, .delete-feed-item { position: absolute; right: 0; top: 0; }
			.delete-feed-item { right: 30px; }

			.topbar-actions .pro-btn { 
				display: flex !important; 
				width: 36px; 
				height: 36px; 
				padding: 0 !important; 
				align-items: center; 
				justify-content: center; 
				font-size: 0 !important;
				margin-right: 5px !important;
			}
			.topbar-actions .pro-btn .dashicons { font-size: 18px; width: 18px; height: 18px; margin: 0; }
			.topbar-actions .notification-bell-btn { margin-right: 0; }

			.pro-table-container { overflow-x: hidden !important; padding: 10px !important; }
			.pro-table { min-width: auto !important; width: 100% !important; table-layout: fixed; }

			/* Mobile Card Layout for Tables */
			#customers-main-table, #dashboard-calls-table, #lead-list-view .pro-table, #lead-gen-results .pro-table, #ai-results .pro-table, #recent-searches-view .pro-table, #freddi-list-view .pro-table, .user-management-wrapper .pro-table,
			#customers-main-table thead, #dashboard-calls-table thead, #lead-list-view .pro-table thead, #lead-gen-results .pro-table thead, #ai-results .pro-table thead, #recent-searches-view .pro-table thead, #freddi-list-view .pro-table thead, .user-management-wrapper .pro-table thead,
			#customers-main-table tbody, #dashboard-calls-table tbody, #lead-list-view .pro-table tbody, #lead-gen-results .pro-table tbody, #ai-results .pro-table tbody, #recent-searches-view .pro-table tbody, #freddi-list-view .pro-table tbody, .user-management-wrapper .pro-table tbody,
			#customers-main-table th, #dashboard-calls-table th, #lead-list-view .pro-table th, #lead-gen-results .pro-table th, #ai-results .pro-table th, #recent-searches-view .pro-table th, #freddi-list-view .pro-table th, .user-management-wrapper .pro-table th,
			#customers-main-table td, #dashboard-calls-table td, #lead-list-view .pro-table td, #lead-gen-results .pro-table td, #ai-results .pro-table td, #recent-searches-view .pro-table td, #freddi-list-view .pro-table td, .user-management-wrapper .pro-table td,
			#customers-main-table tr, #dashboard-calls-table tr, #lead-list-view .pro-table tr, #lead-gen-results .pro-table tr, #ai-results .pro-table tr, #recent-searches-view .pro-table tr, #freddi-list-view .pro-table tr, .user-management-wrapper .pro-table tr { 
				display: block; 
			}
			#customers-main-table thead, #dashboard-calls-table thead, #lead-list-view .pro-table thead, #lead-gen-results .pro-table thead, #ai-results .pro-table thead, #recent-searches-view .pro-table thead, #freddi-list-view .pro-table thead, .user-management-wrapper .pro-table thead { display: none; }
			#customers-main-table tr, #dashboard-calls-table tr, #lead-list-view .pro-table tr, #lead-gen-results .pro-table tr, #ai-results .pro-table tr, #recent-searches-view .pro-table tr, #freddi-list-view .pro-table tr, .user-management-wrapper .pro-table tr {
				margin-bottom: 15px;
				border: 1px solid var(--tinxy-border);
				border-radius: var(--radius-md);
				background: white;
				padding: 15px;
				box-shadow: var(--shadow-sm);
				width: 100%;
				box-sizing: border-box;
			}
			#customers-main-table td, #dashboard-calls-table td, #lead-list-view .pro-table td, #lead-gen-results .pro-table td, #ai-results .pro-table td, #recent-searches-view .pro-table td, #freddi-list-view .pro-table td, .user-management-wrapper .pro-table td {
				border: none;
				padding: 8px 0;
				display: flex;
				justify-content: space-between;
				align-items: center;
				text-align: left;
				width: 100% !important;
				min-width: 0 !important;
				overflow: hidden;
			}
			.contact-meta, .u-txt { overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
			.contact-meta span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; display: block !important; }
			#customers-main-table td::before, #dashboard-calls-table td::before, #lead-list-view .pro-table td::before, #lead-gen-results .pro-table td::before, #ai-results .pro-table td::before, #recent-searches-view .pro-table td::before, #freddi-list-view .pro-table td::before, .user-management-wrapper .pro-table td::before {
				content: attr(data-label);
				font-weight: 700;
				font-size: 11px;
				color: var(--tinxy-text-light);
				text-transform: uppercase;
				flex-shrink: 0;
				margin-right: 15px;
			}
			#customers-main-table td[data-label="Cliente"]::before,
			#dashboard-calls-table td[data-label="Azienda"]::before,
			#lead-list-view .pro-table td[data-label="Azienda"]::before,
			#lead-gen-results .pro-table td[data-label="Azienda"]::before,
			#ai-results .pro-table td[data-label="Azienda"]::before,
			#freddi-list-view .pro-table td[data-label="Azienda"]::before,
			.user-management-wrapper .pro-table td[data-label="Utente"]::before { display: none; }
			
			#customers-main-table td[data-label="Cliente"],
			#dashboard-calls-table td[data-label="Azienda"],
			#lead-list-view .pro-table td[data-label="Azienda"],
			#lead-gen-results .pro-table td[data-label="Azienda"],
			#ai-results .pro-table td[data-label="Azienda"],
			#freddi-list-view .pro-table td[data-label="Azienda"],
			.user-management-wrapper .pro-table td[data-label="Utente"] { 
				border-bottom: 1px solid #f1f5f9; 
				margin-bottom: 10px; 
				padding-bottom: 15px; 
			}
			
			#customers-main-table td:first-child, #dashboard-calls-table td:first-child, #lead-list-view .pro-table td:first-child, #lead-gen-results .pro-table td:first-child, #ai-results .pro-table td:first-child, #recent-searches-view .pro-table td:first-child, #freddi-list-view .pro-table td:first-child, .user-management-wrapper .pro-table td:first-child { padding-top: 0; }
			#customers-main-table td.text-right, #dashboard-calls-table td.text-right, #lead-list-view .pro-table td.text-right, #lead-gen-results .pro-table td.text-right, #ai-results .pro-table td.text-right, #recent-searches-view .pro-table td.text-right, #freddi-list-view .pro-table td.text-right, .user-management-wrapper .pro-table td.text-right { 
				justify-content: flex-end; 
				border-top: 1px solid #f1f5f9;
				margin-top: 10px;
				padding-top: 15px;
				gap: 10px;
			}
			
			.user-meta { width: 100%; }

			/* Kanban Mobile */
			.kanban-container { height: auto !important; overflow: hidden !important; width: 100% !important; box-sizing: border-box !important; }
			.kanban-scroll { flex-direction: column; gap: 20px; overflow: visible !important; width: 100% !important; padding: 0 !important; margin: 0 !important; }
			.kanban-column { width: 100% !important; min-width: 0 !important; margin: 0 !important; }

			.sidebar-header { padding: 20px; }

			.calendar-container-inner { padding: 10px !important; }
			.fc .fc-toolbar-title { font-size: 14px !important; }
			.fc .fc-button { padding: 4px 8px !important; font-size: 12px !important; }
			.fc-header-toolbar { margin-bottom: 15px !important; }

			.hide-mobile { display: none !important; }
			#toggle-customer-filters { display: flex !important; }

			/* Stats & Insights for mobile */
			.outcome-stat-row { margin-bottom: 20px !important; }
			.outcome-stat-row > div:first-child { flex-direction: column; align-items: flex-start !important; gap: 5px; }
			
			.pro-card .form-body { padding: 15px !important; }
			.pro-card h3 { font-size: 14px !important; }
			
			.pro-card-header { 
				flex-direction: column !important; 
				align-items: flex-start !important; 
				gap: 15px !important; 
				padding: 15px 20px !important;
			}
			.pro-card-header .pro-btn { width: 100%; justify-content: center; }

			.customer-filters-sidebar { 
				display: none; 
				width: 100% !important; 
				margin-bottom: 15px !important;
			}
			.customer-filters-sidebar.open { display: block; }

			.sidebar-mobile-overlay {
				position: fixed;
				top: 0;
				left: 0;
				width: 100%;
				height: 100%;
				background: rgba(0,0,0,0.5);
				z-index: 1000004;
				display: none;
			}
		}

		/* ===== Tinxy: Area Commerciale vs Operativa ===== */
		:root {
			--tinxy-area-commerciale: #3b82f6;
			--tinxy-area-commerciale-bg: #eff6ff;
			--tinxy-area-commerciale-border: #bfdbfe;
			--tinxy-area-operativa: #f97316;
			--tinxy-area-operativa-bg: #fff7ed;
			--tinxy-area-operativa-border: #fed7aa;
		}

		/* Section header sidebar */
		.nav-section.tinxy-nav-area-commerciale,
		.nav-section.tinxy-nav-area-operativa {
			padding-left: 6px;
		}

		/* Pill badge lifecycle cliente */
		.tinxy-lifecycle-badge {
			display: inline-flex;
			align-items: center;
			gap: 6px;
			padding: 3px 10px;
			border-radius: 999px;
			font-size: 10px;
			font-weight: 800;
			text-transform: uppercase;
			letter-spacing: 0.6px;
			line-height: 1;
		}
		.tinxy-lifecycle-badge .tinxy-lifecycle-dot {
			width: 7px;
			height: 7px;
			border-radius: 50%;
			display: inline-block;
		}
		.tinxy-lifecycle-badge.is-prospect { background: #f1f5f9; color: #475569; }
		.tinxy-lifecycle-badge.is-prospect .tinxy-lifecycle-dot { background: #94a3b8; }
		.tinxy-lifecycle-badge.is-lead { background: var(--tinxy-area-commerciale-bg); color: var(--tinxy-area-commerciale); box-shadow: 0 0 0 1px var(--tinxy-area-commerciale-border) inset; }
		.tinxy-lifecycle-badge.is-lead .tinxy-lifecycle-dot { background: var(--tinxy-area-commerciale); }
		.tinxy-lifecycle-badge.is-contract { background: var(--tinxy-area-operativa-bg); color: var(--tinxy-area-operativa); box-shadow: 0 0 0 1px var(--tinxy-area-operativa-border) inset; }
		.tinxy-lifecycle-badge.is-contract .tinxy-lifecycle-dot { background: var(--tinxy-area-operativa); }
		.tinxy-lifecycle-badge.is-maintenance { background: #f0fdf4; color: #16a34a; box-shadow: 0 0 0 1px #bbf7d0 inset; }
		.tinxy-lifecycle-badge.is-maintenance .tinxy-lifecycle-dot { background: #16a34a; }

		/* Tab area coloring */
		.pro-tabs .pro-tab {
			padding: 14px 0;
			background: none;
			border: none;
			font-size: 13px;
			font-weight: 700;
			color: #64748b;
			text-transform: uppercase;
			letter-spacing: 0.5px;
			cursor: pointer;
			border-bottom: 3px solid transparent;
			transition: all 0.2s ease;
			display: inline-flex;
			align-items: center;
			gap: 8px;
		}
		.pro-tabs .pro-tab:hover { color: #1e293b; }
		.pro-tabs .pro-tab.active.tinxy-tab-commerciale { color: var(--tinxy-area-commerciale); border-bottom-color: var(--tinxy-area-commerciale); }
		.pro-tabs .pro-tab.active.tinxy-tab-operativa { color: var(--tinxy-area-operativa); border-bottom-color: var(--tinxy-area-operativa); }
		.pro-tabs .tinxy-tab-badge {
			font-size: 9px;
			padding: 2px 6px;
			border-radius: 999px;
			text-transform: none;
			letter-spacing: 0;
			font-weight: 700;
		}
		.pro-tabs .pro-tab.tinxy-tab-commerciale .tinxy-tab-badge { background: var(--tinxy-area-commerciale-bg); color: var(--tinxy-area-commerciale); }
		.pro-tabs .pro-tab.tinxy-tab-operativa .tinxy-tab-badge { background: var(--tinxy-area-operativa-bg); color: var(--tinxy-area-operativa); }
		#tinxy-customer-tabs { position: relative; z-index: 40; pointer-events: auto; }
		#tinxy-customer-tab-panels { position: relative; z-index: 1; }
		#tinxy-customer-tab-panels > .tinxy-pane { display: none; }
		#tinxy-customer-tab-panels > .tinxy-pane.is-open,
		#tinxy-customer-tab-panels > .tinxy-pane.active { display: block; }
		#tinxy-pane-quote.is-open #quote-builder-view {
			display: block !important;
		}

		/* Timeline feeds coloring */
		.feed-item.tinxy-feed-operativa .feed-marker { box-shadow: 0 0 0 3px var(--tinxy-area-operativa-bg); }
		.feed-item.tinxy-feed-commerciale .feed-marker { box-shadow: 0 0 0 3px var(--tinxy-area-commerciale-bg); }

		/* Customer detail header area hint */
		.tinxy-customer-cover-actions { display: flex; gap: 12px; flex-wrap: wrap; }
		.tinxy-cover-cta {
			padding: 10px 18px;
			border-radius: 12px;
			font-weight: 700;
			font-size: 13px;
			display: inline-flex;
			align-items: center;
			gap: 8px;
			cursor: pointer;
			border: 1px solid transparent;
			transition: transform 0.15s ease, box-shadow 0.15s ease;
		}
		.tinxy-cover-cta:hover { transform: translateY(-1px); box-shadow: 0 6px 14px rgba(15,23,42,0.08); }
		.tinxy-cover-cta.is-commerciale { background: var(--tinxy-area-commerciale-bg); color: var(--tinxy-area-commerciale); border-color: var(--tinxy-area-commerciale-border); }
		.tinxy-cover-cta.is-operativa { background: var(--tinxy-area-operativa-bg); color: var(--tinxy-area-operativa); border-color: var(--tinxy-area-operativa-border); }

		/* Area tabs (timeline globale) */
		.tinxy-area-tab { transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease; }
		.tinxy-area-tab:hover { transform: translateY(-1px); }
		.tinxy-area-tab.is-active.is-commerciale { background: var(--tinxy-area-commerciale) !important; color: #fff !important; border-color: var(--tinxy-area-commerciale) !important; }
		.tinxy-area-tab.is-active.is-operativa { background: var(--tinxy-area-operativa) !important; color: #fff !important; border-color: var(--tinxy-area-operativa) !important; }

		.pro-form-card.tinxy-cust-doc-card {
			width: min(720px, 96vw);
			max-height: 92vh;
			display: flex;
			flex-direction: column;
			overflow: hidden;
		}
		#wrapper-view-document.tinxy-cust-doc-page {
			min-height: 100%;
			padding: 0;
		}
		.tinxy-cust-doc-page-inner {
			max-width: 860px;
			margin: 0 auto;
			padding: 28px 32px 40px;
		}
		.tinxy-cust-doc-page-head {
			display: flex;
			align-items: flex-start;
			justify-content: space-between;
			gap: 16px;
			margin-bottom: 22px;
		}
		.tinxy-cust-doc-page-head h3 {
			margin: 0;
			font-size: 22px;
			font-weight: 800;
			color: #0f172a;
		}
		.tinxy-cust-doc-page-actions {
			display: flex;
			align-items: center;
			gap: 8px;
			margin-top: 18px;
			padding-top: 16px;
			border-top: 1px solid #e2e8f0;
		}
		#tinxy-cust-doc-title {
			font-size: 18px;
			font-weight: 700;
		}
		#wrapper-view-document #tinxy-cust-doc-content {
			min-height: 320px;
			font-size: 15px;
			line-height: 1.55;
		}
		.tinxy-cust-doc-card .form-header {
			align-items: flex-start;
		}
		.tinxy-cust-doc-card .form-body {
			overflow-y: auto;
			flex: 1;
		}
		.tinxy-cust-doc-subtitle {
			margin: 4px 0 0;
			font-size: 13px;
			font-weight: 600;
			color: #64748b;
		}
		.tinxy-cust-doc-empty {
			text-align: center;
			padding: 28px 16px;
			color: #64748b;
		}
		.tinxy-cust-doc-empty .dashicons {
			font-size: 32px;
			width: 32px;
			height: 32px;
			color: #cbd5e1;
			margin-bottom: 8px;
		}
		.tinxy-cust-doc-empty strong {
			display: block;
			color: #334155;
			font-size: 15px;
			margin-bottom: 6px;
		}
		.tinxy-cust-doc-empty p {
			margin: 0;
			font-size: 13px;
			line-height: 1.5;
		}
		.tinxy-cust-doc-list { display: flex; flex-direction: column; gap: 8px; }
		.tinxy-cust-doc-row {
			display: block;
			width: 100%;
			text-align: left;
			background: #f8fafc;
			border: 1px solid #e2e8f0;
			border-radius: 10px;
			padding: 12px 14px;
			cursor: pointer;
			transition: border-color 0.15s, background 0.15s;
		}
		.tinxy-cust-doc-row:hover {
			background: #fff;
			border-color: var(--tinxy-primary);
		}
		.tinxy-cust-doc-row-title {
			display: block;
			font-size: 14px;
			font-weight: 700;
			color: #1e293b;
		}
		.tinxy-cust-doc-row-meta {
			display: block;
			margin-top: 4px;
			font-size: 11px;
			font-weight: 600;
			color: #94a3b8;
		}
		.tinxy-cust-doc-row-preview {
			display: block;
			margin-top: 6px;
			font-size: 12px;
			color: #64748b;
			line-height: 1.45;
		}
		.tinxy-cust-doc-loading { color: #94a3b8; font-size: 13px; padding: 12px 0; }
		.tinxy-cust-doc-share-hint {
			margin: 0 0 10px;
			font-size: 12px;
			color: #64748b;
			line-height: 1.45;
			text-transform: none;
			letter-spacing: 0;
			font-weight: 500;
		}
		#tinxy-cust-doc-user-filter { margin-bottom: 10px !important; }
		.tinxy-cust-doc-users {
			max-height: 320px;
			overflow-y: auto;
			border: 1px solid #e2e8f0;
			border-radius: 10px;
			padding: 6px;
			background: #f8fafc;
		}
		.tinxy-cust-doc-user {
			display: flex;
			align-items: center;
			gap: 10px;
			padding: 8px 10px;
			border-radius: 8px;
			cursor: pointer;
			font-size: 13px;
			font-weight: 600;
			color: #334155;
			text-transform: none;
			letter-spacing: 0;
		}
		.tinxy-cust-doc-user:hover { background: #fff; }
		.tinxy-cust-doc-users-empty {
			padding: 10px;
			font-size: 12px;
			color: #94a3b8;
		}
		#tinxy-cust-doc-content { min-height: 180px; resize: vertical; }
		.pro-btn.tinxy-cust-doc-delete { margin-right: auto; color: #ef4444 !important; background: #fee2e2; }
		.pro-btn.tinxy-cust-doc-delete:hover { background: #fecaca; }
