/**
 * ═══════════════════════════════════════════════════════════════
 * FACILE MOBILITÀ - DESIGN SYSTEM v2.0
 * Premium UI/UX by Tony's Vision
 * ═══════════════════════════════════════════════════════════════
 */

/* ============================================================
   🌐 GLOBAL STYLES
   ============================================================ */
html {
    scroll-behavior: smooth;
}

/* ============================================================
   🎨 COLOR PALETTE - Facile Mobilità Brand (UFFICIALE)
   Estratta dal logo: Verde Turchese + Blu Navy
   ============================================================ */
:root {
    /* Primary - Teal Green (frecce logo) */
    --fm-primary-50: #E6FAF7;
    --fm-primary-100: #CCF5EF;
    --fm-primary-200: #99EBDF;
    --fm-primary-300: #66E0CF;
    --fm-primary-400: #33D6BF;
    --fm-primary-500: #1DD3B0;
    --fm-primary-600: #17A98D;
    --fm-primary-700: #117F6A;
    --fm-primary-800: #0C5446;
    --fm-primary-900: #062A23;
    
    /* Secondary - Navy Blue (testo logo) */
    --fm-secondary-50: #E8ECF1;
    --fm-secondary-100: #D1D9E3;
    --fm-secondary-200: #A3B3C7;
    --fm-secondary-300: #758DAB;
    --fm-secondary-400: #47678F;
    --fm-secondary-500: #1A2B4A;
    --fm-secondary-600: #15223B;
    --fm-secondary-700: #101A2C;
    --fm-secondary-800: #0A111E;
    --fm-secondary-900: #05090F;
    
    /* Success - Electric Green */
    --fm-success-400: #34D399;
    --fm-success-500: #10B981;
    --fm-success-600: #059669;
    
    /* Warning - Premium Amber */
    --fm-warning-400: #FBBF24;
    --fm-warning-500: #F59E0B;
    --fm-warning-600: #D97706;
    
    /* Danger - Alert Red */
    --fm-danger-400: #F87171;
    --fm-danger-500: #EF4444;
    --fm-danger-600: #DC2626;
    
    /* Neutral - Sophisticated Slate */
    --fm-neutral-50: #F8FAFC;
    --fm-neutral-100: #F1F5F9;
    --fm-neutral-200: #E2E8F0;
    --fm-neutral-300: #CBD5E1;
    --fm-neutral-400: #94A3B8;
    --fm-neutral-500: #64748B;
    --fm-neutral-600: #475569;
    --fm-neutral-700: #334155;
    --fm-neutral-800: #1E293B;
    --fm-neutral-900: #0F172A;
    
    /* Gradients - Facile Mobilità Brand (Verde Turchese + Blu Navy) */
    --fm-gradient-primary: linear-gradient(135deg, #1DD3B0 0%, #17A98D 100%);
    --fm-gradient-secondary: linear-gradient(135deg, #1A2B4A 0%, #15223B 100%);
    --fm-gradient-success: linear-gradient(135deg, #10B981 0%, #059669 100%);
    --fm-gradient-hero: linear-gradient(135deg, #1DD3B0 0%, #1A2B4A 50%, #1DD3B0 100%);
    --fm-gradient-premium: linear-gradient(135deg, #1DD3B0 0%, #17A98D 50%, #1A2B4A 100%);
    
    /* Shadows - Layered Depth */
    --fm-shadow-xs: 0 1px 2px rgba(15, 23, 42, 0.04);
    --fm-shadow-sm: 0 2px 4px rgba(15, 23, 42, 0.06);
    --fm-shadow-md: 0 4px 12px rgba(15, 23, 42, 0.08);
    --fm-shadow-lg: 0 8px 24px rgba(15, 23, 42, 0.1);
    --fm-shadow-xl: 0 16px 48px rgba(15, 23, 42, 0.12);
    --fm-shadow-2xl: 0 24px 64px rgba(15, 23, 42, 0.15);
    
    /* Glass Effect */
    --fm-glass-bg: rgba(255, 255, 255, 0.7);
    --fm-glass-border: rgba(255, 255, 255, 0.18);
    --fm-glass-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
    
    /* Brand Motion Pattern (frecce dal logo - Verde Turchese) */
    --fm-arrow-pattern: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 10 L30 10 L40 30 L30 50 L10 50 L20 30 Z' fill='%231DD3B0' opacity='0.03'/%3E%3C/svg%3E");
    
    /* Spacing System (4px base) */
    --fm-space-1: 4px;
    --fm-space-2: 8px;
    --fm-space-3: 12px;
    --fm-space-4: 16px;
    --fm-space-5: 20px;
    --fm-space-6: 24px;
    --fm-space-8: 32px;
    --fm-space-10: 40px;
    --fm-space-12: 48px;
    --fm-space-16: 64px;
    --fm-space-20: 80px;
    
    /* Border Radius */
    --fm-radius-sm: 6px;
    --fm-radius-md: 10px;
    --fm-radius-lg: 16px;
    --fm-radius-xl: 24px;
    --fm-radius-full: 9999px;
    
    /* Typography Scale */
    --fm-text-xs: 12px;
    --fm-text-sm: 13px;
    --fm-text-base: 14px;
    --fm-text-md: 16px;
    --fm-text-lg: 18px;
    --fm-text-xl: 20px;
    --fm-text-2xl: 24px;
    --fm-text-3xl: 32px;
    --fm-text-4xl: 40px;
    --fm-text-5xl: 48px;
    
    /* Transitions */
    --fm-transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --fm-transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --fm-transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);
    --fm-transition-smooth: 500ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* ============================================================
   📐 LAYOUT BASE (sidebar + topbar)
   ============================================================ */
* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #F8FAFC;
    color: #1E293B;
    width: 100%;
    overflow-x: hidden;
}
.layout-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
}
.fm-sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 240px;
    height: 100vh;
    background: #1A2B4A;
    color: #fff;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    transition: width 0.3s ease, transform 0.3s ease;
}

/* Sidebar Collapsed State */
.fm-sidebar.collapsed {
    width: 60px;
    overflow-y: auto;
    overflow-x: visible;
}

.fm-sidebar.collapsed .sidebar-title,
.fm-sidebar.collapsed .sidebar-menu-label,
.fm-sidebar.collapsed .sidebar-menu-arrow,
.fm-sidebar.collapsed .sidebar-user-info,
.fm-sidebar.collapsed .sidebar-link > span {
    display: none !important;
}

/* Ma mostra le label dentro i submenu popup */
.fm-sidebar.collapsed .sidebar-submenu .sidebar-submenu-link span,
.fm-sidebar.collapsed .sidebar-submenu a span {
    display: inline !important;
    white-space: nowrap;
}

.fm-sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: 12px 8px;
}

.fm-sidebar.collapsed .sidebar-logo {
    margin: 0;
}

.fm-sidebar.collapsed .sidebar-submenu {
    position: fixed !important;
    left: 60px !important;
    top: auto !important;
    min-width: 220px;
    background: #1A2B4A !important;
    border: 1px solid rgba(29, 211, 176, 0.3);
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    z-index: 3001 !important;
    padding: 0;
    margin: 0;
    margin-left: 0;
    max-height: none;
}

.fm-sidebar.collapsed .sidebar-submenu-header {
    display: flex !important;
    gap: 10px;
    align-items: center;
    padding: 12px;
    background: rgba(29, 211, 176, 0.1);
    border-bottom: 1px solid rgba(29, 211, 176, 0.2);
    border-radius: 8px 8px 0 0;
    color: #1DD3B0;
    font-weight: 600;
    font-size: 14px;
}

.fm-sidebar.collapsed .sidebar-submenu-header svg {
    width: 18px;
    height: 18px;
    stroke: #1DD3B0;
}

.fm-sidebar.collapsed .sidebar-submenu a {
    display: flex !important;
    gap: 8px;
    align-items: center;
    padding: 8px 12px 8px 44px;
    margin: 4px 8px;
    color: rgba(255,255,255,0.85) !important;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
    transition: all 0.15s;
    pointer-events: auto !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.fm-sidebar.collapsed .sidebar-submenu a:hover {
    background: rgba(29, 211, 176, 0.15);
    color: white;
}

.fm-sidebar.collapsed .sidebar-submenu a svg {
    width: 16px;
    height: 16px;
    display: inline-block !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.fm-sidebar.collapsed .sidebar-menu-group {
    position: relative;
}


.fm-sidebar.collapsed .sidebar-submenu {
    display: none;
    transition: none !important;
}

/* Mostra submenu quando ha classe collapsed-open (gestito da JS) */
.fm-sidebar.collapsed .sidebar-submenu.collapsed-open {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
}

.fm-sidebar.collapsed .sidebar-menu-group:hover,
.fm-sidebar.collapsed .sidebar-submenu:hover {
    pointer-events: auto;
}

.fm-sidebar.collapsed .sidebar-submenu a {
    pointer-events: auto !important;
    cursor: pointer;
}

.fm-sidebar.collapsed .sidebar-menu-toggle,
.fm-sidebar.collapsed .sidebar-link {
    justify-content: center;
    padding: 12px;
    position: relative;
    margin: 2px 0;
}

.fm-sidebar.collapsed .sidebar-menu-icon {
    margin: 0 auto;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fm-sidebar.collapsed .sidebar-menu-icon svg {
    width: 20px;
    height: 20px;
}

.fm-sidebar.collapsed .sidebar-menu-toggle > svg,
.fm-sidebar.collapsed .sidebar-link > svg {
    margin: 0 auto;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Tooltip for collapsed sidebar */
.fm-sidebar.collapsed .sidebar-menu-toggle::after,
.fm-sidebar.collapsed .sidebar-link::after,
.fm-sidebar.collapsed .sidebar-logout::after {
    content: attr(data-label);
    position: fixed;
    left: 68px;
    background: #1A2B4A;
    color: white;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 2999;
    border: 1px solid rgba(29, 211, 176, 0.2);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    margin-left: 8px;
}

.fm-sidebar.collapsed .sidebar-menu-toggle:hover::after,
.fm-sidebar.collapsed .sidebar-link:hover::after,
.fm-sidebar.collapsed .sidebar-logout:hover::after {
    opacity: 1;
}

/* Nascondi tooltip per menu con submenu (nome già in header popup) */
.fm-sidebar.collapsed .sidebar-menu-toggle::after {
    display: none !important;
}

.fm-sidebar.collapsed .sidebar-logout {
    position: relative;
}

.fm-sidebar.collapsed .sidebar-footer {
    flex-direction: column;
    gap: 12px;
    align-items: center;
    padding: 16px 8px;
}

.fm-sidebar.collapsed .sidebar-user {
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.fm-sidebar.collapsed .sidebar-user-avatar {
    margin: 0;
    width: 36px;
    height: 36px;
    font-size: 16px;
}

.fm-sidebar.collapsed .sidebar-logout {
    width: 36px;
    height: 36px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
}

.fm-sidebar.collapsed .sidebar-logout svg {
    width: 18px;
    height: 18px;
}

/* Toggle Button */
.sidebar-toggle-btn {
    position: absolute;
    top: 16px;
    right: -12px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #1DD3B0;
    border: 2px solid #1A2B4A;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.sidebar-toggle-btn:hover {
    background: #17A98D;
    transform: scale(1.1);
}

.sidebar-toggle-btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.fm-sidebar.collapsed .sidebar-toggle-btn svg {
    transform: rotate(180deg);
}
.sidebar-header {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 10px;
}
.sidebar-logo,
.sidebar-logo img {
    height: 32px;
    width: auto;
    display: block;
    max-width: 100%;
    object-fit: contain;
}
.sidebar-title {
    font-size: 15px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    color: #fff;
    letter-spacing: -0.3px;
}
.sidebar-nav {
    padding: 8px 10px 16px 10px;
    flex: 1;
    overflow-y: auto;
}
.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}
.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 3px;
}
.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.25);
}
.sidebar-section-title {
    font-size: 10px;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin: 12px 0 4px 6px;
}
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    border-radius: 6px;
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.15s ease;
    margin-bottom: 2px;
}
.sidebar-link:hover {
    background: rgba(29,211,176,0.1);
    color: #fff;
}
.sidebar-link.active {
    background: linear-gradient(135deg, #1DD3B0, #17A98D);
    color: #fff;
    box-shadow: 0 2px 8px rgba(29,211,176,0.25);
    font-weight: 600;
}
.sidebar-icon {
    width: 18px;
    height: 18px;
    color: inherit;
}
.sidebar-footer {
    margin-top: auto;
    padding: 12px;
    border-top: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.15);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}
.sidebar-footer::after,
.sidebar-footer::before,
.fm-sidebar > *:last-child::after,
.fm-sidebar > svg:not(.sidebar-logout svg),
.fm-sidebar > img:not(.sidebar-logo):not(.sidebar-logo img) {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}
/* Assicura che SVG dentro sidebar-logout siano sempre visibili */
.sidebar-logout svg,
.sidebar-logout svg use {
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}
.sidebar-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, #1DD3B0, #17A98D);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 13px;
    color: #fff;
}
.sidebar-user-info {
    flex: 1;
    min-width: 0;
}
.sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.sidebar-user-role {
    font-size: 11px;
    color: rgba(255,255,255,0.55);
    text-transform: capitalize;
}
.sidebar-logout {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(29, 211, 176, 0.1);
    border: 1px solid rgba(29, 211, 176, 0.2);
    transition: all 0.15s ease;
    flex-shrink: 0;
    text-decoration: none;
}
.sidebar-logout:hover {
    background: rgba(239, 68, 68, 0.12);
    border-color: rgba(239, 68, 68, 0.3);
    transform: translateY(-1px);
}
.sidebar-logout svg {
    width: 18px !important;
    height: 18px !important;
    stroke: #1DD3B0 !important;
    stroke-width: 2 !important;
    fill: none !important;
    color: #1DD3B0 !important;
    transition: all 0.15s ease !important;
    display: inline-block !important;
    visibility: visible !important;
    opacity: 1 !important;
}
.sidebar-logout:hover svg {
    stroke: #EF4444 !important;
    color: #EF4444 !important;
}
.main-content {
    margin-left: 240px !important;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
    transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex: 1;
    min-width: 0;
}

.main-content.sidebar-collapsed {
    margin-left: 60px !important;
}

.content-wrapper {
    padding: 20px;
    flex: 1;
    width: 100%;
}
/* ============================================================
   🔝 TOPBAR PREMIUM - Facile Mobilità (HubSpot-style)
   ============================================================ */
.fm-topbar {
    position: sticky;
    top: 0;
    z-index: 2500;
    background: white;
    backdrop-filter: blur(8px);
    border-bottom: 1px solid #E5E7EB;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    height: 56px;
}
.topbar-left {
    flex: 1;
    display: flex;
    align-items: baseline;
    gap: 12px;
}
.topbar-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    letter-spacing: -0.3px;
    line-height: 1.2;
    margin: 0;
}
.topbar-breadcrumb {
    display: flex;
    align-items: baseline;
    gap: 8px;
    font-size: 13px;
    color: #6B7280;
}
.topbar-breadcrumb a {
    color: #1DD3B0;
    text-decoration: none;
    font-weight: 500;
}
.topbar-breadcrumb a:hover {
    text-decoration: underline;
}
.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
}
@media (max-width: 1024px) {
    .fm-sidebar { transform: translateX(-100%); }
    .main-content { margin-left: 0; }
}
/* ============================================================
   🔤 TYPOGRAPHY - Inter Font System
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: var(--fm-text-base);
    line-height: 1.6;
    color: var(--fm-neutral-900);
    background: var(--fm-neutral-50);
    background-image: var(--fm-arrow-pattern);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ============================================================
   🧱 LAYOUT COMPONENTS
   ============================================================ */

/* Container System */
.fm-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--fm-space-6);
}

.fm-container-fluid {
    width: 100%;
    padding: 0 var(--fm-space-6);
}

/* ============================================================
   🎭 HEADER - Glassmorphism Premium
   ============================================================ */
.fm-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--fm-glass-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--fm-glass-border);
    box-shadow: var(--fm-glass-shadow);
    transition: all var(--fm-transition-base);
}

.fm-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--fm-space-4) var(--fm-space-6);
    max-width: 100%;
}

.fm-header-title {
    display: flex;
    align-items: center;
    gap: var(--fm-space-3);
}

.fm-header-title h1 {
    font-size: var(--fm-text-2xl);
    font-weight: 700;
    color: var(--fm-neutral-900);
    letter-spacing: -0.02em;
}

.fm-header-subtitle {
    color: var(--fm-neutral-500);
    font-size: var(--fm-text-sm);
    margin-top: var(--fm-space-1);
}

.fm-header-actions {
    display: flex;
    gap: var(--fm-space-3);
    align-items: center;
}

/* ============================================================
   🔘 BUTTONS - Multi-variant System
   ============================================================ */
.fm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 0 14px;
    height: 36px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.15s ease;
    white-space: nowrap;
    user-select: none;
}

.fm-btn svg {
    width: 16px;
    height: 16px;
}

.fm-btn:hover {
    transform: translateY(-1px);
}

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

.fm-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* Button Primary - HubSpot Style */
.fm-btn-primary {
    background: linear-gradient(135deg, #1DD3B0, #17A98D);
    color: white;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    height: 36px;
    padding: 0 16px;
    font-size: 13px;
}

.fm-btn-primary:hover {
    background: linear-gradient(135deg, #17A98D, #138B75);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

/* Button Secondary - HubSpot Style */
.fm-btn-secondary {
    background: white;
    color: #374151;
    border: 1px solid #D1D5DB;
    height: 36px;
    padding: 0 16px;
    font-size: 13px;
}

.fm-btn-secondary:hover {
    background: #F9FAFB;
    border-color: #9CA3AF;
    transform: translateY(-1px);
}

/* Button Success */
.fm-btn-success {
    background: var(--fm-gradient-success);
    color: white;
    box-shadow: var(--fm-shadow-sm);
}

.fm-btn-success:hover {
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.25);
}

/* Button Danger */
.fm-btn-danger {
    background: var(--fm-danger-500);
    color: white;
}

.fm-btn-danger:hover {
    background: var(--fm-danger-600);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.25);
}

/* Button Ghost */
.fm-btn-ghost {
    background: transparent;
    color: var(--fm-neutral-600);
}

.fm-btn-ghost:hover {
    background: var(--fm-neutral-100);
    transform: none;
    box-shadow: none;
}

/* Button Sizes */
.fm-btn-sm {
    padding: var(--fm-space-2) var(--fm-space-4);
    font-size: var(--fm-text-xs);
}

.fm-btn-lg {
    padding: var(--fm-space-4) var(--fm-space-6);
    font-size: var(--fm-text-md);
}

.fm-btn-xl {
    padding: var(--fm-space-5) var(--fm-space-8);
    font-size: var(--fm-text-lg);
    border-radius: var(--fm-radius-lg);
}

/* ============================================================
   🎴 CARDS - HubSpot/LinkedIn Style
   ============================================================ */
.fm-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    border: 1px solid #E5E7EB;
    transition: all 0.15s ease;
    overflow: hidden;
}

.fm-card:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
    border-color: #D1D5DB;
}

.fm-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid #F3F4F6;
    background: white;
}

.fm-card-title {
    font-size: 15px;
    font-weight: 600;
    color: #1F2937;
    display: flex;
    align-items: center;
    gap: 8px;
}

.fm-card-body {
    padding: 20px;
}

.fm-card-footer {
    padding: 12px 20px;
    border-top: 1px solid #F3F4F6;
    background: #F9FAFB;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Card Variants */
.fm-card-flat {
    box-shadow: none;
    border: 1px solid var(--fm-neutral-200);
}

.fm-card-elevated {
    box-shadow: var(--fm-shadow-lg);
}

.fm-card-glass {
    background: var(--fm-glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--fm-glass-border);
}

/* KPI Cards - HubSpot Compact Stats */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.kpi-card {
    background: white;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    border: 1px solid #E5E7EB;
    transition: all 0.15s ease;
    position: relative;
    overflow: hidden;
}

.kpi-card:hover {
    border-color: #1DD3B0;
    box-shadow: 0 2px 4px rgba(29, 211, 176, 0.1);
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(135deg, #1DD3B0, #17A98D);
}

.kpi-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.kpi-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: linear-gradient(135deg, #1DD3B0, #17A98D);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

.kpi-icon svg {
    width: 16px;
    height: 16px;
}

.kpi-icon-secondary {
    background: linear-gradient(135deg, #6366F1, #4F46E5);
}

.kpi-icon-warning {
    background: linear-gradient(135deg, #F59E0B, #D97706);
}

.kpi-icon-success {
    background: linear-gradient(135deg, #10B981, #059669);
}

.kpi-value {
    font-size: 24px;
    font-weight: 700;
    color: #1F2937;
    line-height: 1;
    margin-bottom: 4px;
}

.kpi-label {
    font-size: 12px;
    color: #6B7280;
    font-weight: 500;
    line-height: 1.3;
}

.kpi-trend {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.kpi-trend-up {
    background: #D1FAE5;
    color: #059669;
}

.kpi-trend-down {
    background: #FEE2E2;
    color: #DC2626;
}

/* Stats Mini Cards - Compact HubSpot Style */
.stats-mini-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.stat-mini-card {
    background: white;
    border-radius: 8px;
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    border: 1px solid #E5E7EB;
    transition: all 0.15s ease;
}

.stat-mini-card:hover {
    border-color: #D1D5DB;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

.stat-mini-icon {
    width: 36px;
    height: 36px;
    border-radius: 6px;
    background: linear-gradient(135deg, #1DD3B0, #17A98D);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.stat-mini-icon svg {
    width: 18px;
    height: 18px;
}

.stat-mini-content {
    flex: 1;
    min-width: 0;
}

.stat-mini-value {
    font-size: 20px;
    font-weight: 700;
    color: #1F2937;
    line-height: 1;
    margin-bottom: 3px;
}

.stat-mini-label {
    font-size: 12px;
    color: #6B7280;
    font-weight: 500;
}

/* ============================================================
   📋 FORMS - HubSpot/LinkedIn Style
   ============================================================ */
.fm-form-group {
    margin-bottom: 16px;
}

.fm-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 6px;
}

.fm-label-required::after {
    content: '*';
    color: var(--fm-danger-500);
    margin-left: var(--fm-space-1);
}

.fm-input,
.fm-select,
.fm-textarea {
    width: 100%;
    padding: 8px 12px;
    font-size: 14px;
    font-family: inherit;
    color: #1F2937;
    background: white;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    transition: all 0.15s ease;
    outline: none;
    height: 38px;
}

.fm-select {
    cursor: pointer;
}

.fm-textarea {
    height: auto;
    min-height: 80px;
    resize: vertical;
}

.fm-input:hover,
.fm-select:hover,
.fm-textarea:hover {
    border-color: #9CA3AF;
}

.fm-input:focus,
.fm-select:focus,
.fm-textarea:focus {
    border-color: #1DD3B0;
    box-shadow: 0 0 0 3px rgba(29, 211, 176, 0.1);
}

.fm-input::placeholder {
    color: #9CA3AF;
}

.fm-input-error {
    border-color: var(--fm-danger-500);
}

.fm-input-error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.fm-help-text {
    font-size: var(--fm-text-xs);
    color: var(--fm-neutral-500);
    margin-top: var(--fm-space-2);
}

.fm-error-text {
    font-size: var(--fm-text-xs);
    color: var(--fm-danger-500);
    margin-top: var(--fm-space-2);
    display: flex;
    align-items: center;
    gap: var(--fm-space-1);
}

/* ============================================================
   📊 TABLES - HubSpot/LinkedIn Compact Style
   ============================================================ */
.fm-table-container {
    background: white;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
    overflow: hidden;
}

.fm-table {
    width: 100%;
    border-collapse: collapse;
}

.fm-table thead {
    background: #F9FAFB;
    border-bottom: 1px solid #E5E7EB;
}

.fm-table thead th {
    padding: 10px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: #6B7280;
    text-transform: none;
    letter-spacing: 0;
}

.fm-table tbody tr {
    border-bottom: 1px solid #F3F4F6;
    transition: all 0.15s ease;
}

.fm-table tbody tr:hover {
    background: #F9FAFB;
}

.fm-table tbody td {
    padding: 12px 16px;
    font-size: 14px;
    color: #374151;
}

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

/* Table Actions */
.fm-table-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Table Empty State */
.fm-table-empty {
    text-align: center !important;
    padding: 40px !important;
    color: #94A3B8;
}

.fm-empty-icon {
    margin: 0 auto 16px;
    opacity: 0.5;
}

.fm-empty-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #64748B;
}

.fm-empty-subtitle {
    font-size: 14px;
    color: #94A3B8;
}

/* ============================================================
   🏷️ BADGES & STATUS
   ============================================================ */
.fm-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    font-size: 11px;
    font-weight: 600;
    border-radius: 4px;
    white-space: nowrap;
    line-height: 1.2;
}

.fm-badge-primary {
    background: var(--fm-primary-100);
    color: var(--fm-primary-700);
}

.fm-badge-success {
    background: var(--fm-success-100);
    color: var(--fm-success-700);
}

.fm-badge-warning {
    background: var(--fm-warning-100);
    color: var(--fm-warning-700);
}

.fm-badge-danger {
    background: var(--fm-danger-100);
    color: var(--fm-danger-700);
}

.fm-badge-neutral {
    background: var(--fm-neutral-200);
    color: var(--fm-neutral-700);
}

/* Status Dot */
.fm-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
}

.fm-status-dot-success {
    background: var(--fm-success-500);
}

.fm-status-dot-warning {
    background: var(--fm-warning-500);
}

.fm-status-dot-danger {
    background: var(--fm-danger-500);
}

/* ============================================================
   🔔 NOTIFICATIONS & TOASTS
   ============================================================ */
.fm-toast {
    position: fixed;
    bottom: var(--fm-space-6);
    right: var(--fm-space-6);
    min-width: 320px;
    max-width: 480px;
    background: white;
    border-radius: var(--fm-radius-lg);
    box-shadow: var(--fm-shadow-xl);
    border: 1px solid var(--fm-neutral-200);
    padding: var(--fm-space-4);
    display: none;
    animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 9999;
}

.fm-toast.show {
    display: flex;
    gap: var(--fm-space-3);
    align-items: flex-start;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.fm-toast-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fm-toast-success .fm-toast-icon {
    background: var(--fm-success-100);
    color: var(--fm-success-600);
}

.fm-toast-error .fm-toast-icon {
    background: var(--fm-danger-100);
    color: var(--fm-danger-600);
}

.fm-toast-warning .fm-toast-icon {
    background: var(--fm-warning-100);
    color: var(--fm-warning-600);
}

.fm-toast-content {
    flex: 1;
}

.fm-toast-title {
    font-weight: 600;
    font-size: var(--fm-text-sm);
    color: var(--fm-neutral-900);
    margin-bottom: var(--fm-space-1);
}

.fm-toast-message {
    font-size: var(--fm-text-xs);
    color: var(--fm-neutral-600);
}

/* ============================================================
   ⏳ LOADING STATES
   ============================================================ */
.fm-loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: var(--fm-space-8);
    border-radius: var(--fm-radius-lg);
    box-shadow: var(--fm-shadow-2xl);
    display: none;
    z-index: 9999;
}

.fm-loading.active {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--fm-space-4);
}

.fm-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--fm-neutral-200);
    border-top-color: var(--fm-primary-500);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* SIDEBAR: CSS unificato più in alto nel file (righe 147-255) - Non servono duplicati */

.fm-loading-text {
    font-size: var(--fm-text-sm);
    color: var(--fm-neutral-600);
}

/* ============================================================
   📱 RESPONSIVE UTILITIES
   ============================================================ */
@media (max-width: 768px) {
    .fm-header-content {
        flex-direction: column;
        gap: var(--fm-space-4);
    }
    
    .fm-header-actions {
        width: 100%;
        justify-content: center;
    }
    
    .fm-table-container {
        overflow-x: auto;
    }
    
    .fm-btn {
        width: 100%;
    }
}

/* ============================================================
   ✨ MICRO-INTERACTIONS
   ============================================================ */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

.fm-animate-fade-in {
    animation: fadeIn var(--fm-transition-base);
}

.fm-animate-slide-up {
    animation: slideUp var(--fm-transition-smooth);
}

/* ============================================================
   🎯 UTILITY CLASSES
   ============================================================ */
.fm-text-center { text-align: center; }
.fm-text-right { text-align: right; }
.fm-text-left { text-align: left; }

.fm-flex { display: flex; }
.fm-flex-col { flex-direction: column; }
.fm-flex-wrap { flex-wrap: wrap; }
.fm-items-center { align-items: center; }
.fm-justify-between { justify-content: space-between; }
.fm-justify-center { justify-content: center; }
.fm-gap-2 { gap: var(--fm-space-2); }
.fm-gap-3 { gap: var(--fm-space-3); }
.fm-gap-4 { gap: var(--fm-space-4); }
.fm-gap-6 { gap: var(--fm-space-6); }

.fm-mt-2 { margin-top: var(--fm-space-2); }
.fm-mt-4 { margin-top: var(--fm-space-4); }
.fm-mt-6 { margin-top: var(--fm-space-6); }
.fm-mb-2 { margin-bottom: var(--fm-space-2); }
.fm-mb-4 { margin-bottom: var(--fm-space-4); }
.fm-mb-6 { margin-bottom: var(--fm-space-6); }

.fm-p-4 { padding: var(--fm-space-4); }
.fm-p-6 { padding: var(--fm-space-6); }
.fm-p-8 { padding: var(--fm-space-8); }

.fm-w-full { width: 100%; }
.fm-h-full { height: 100%; }

.fm-hidden { display: none; }
.fm-visible { display: block; }

/* ============================================================
   🌐 ACCESSIBILITY
   ============================================================ */
.fm-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

*:focus-visible {
    outline: 2px solid var(--fm-primary-500);
    outline-offset: 2px;
}

/* ============================================================
   🎨 PRINT STYLES
   ============================================================ */
@media print {
    .fm-header,
    .fm-btn,
    .fm-toast {
        display: none !important;
    }
    
    .fm-card {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* ============================================================
   🔝 TOPBAR ENHANCEMENTS - Premium Style
   ============================================================ */

/* Search Bar Premium */
.topbar-search {
    position: relative;
    display: flex;
    align-items: center;
    max-width: 420px;
    flex: 1;
}

.topbar-search-icon {
    position: absolute;
    left: 18px;
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    color: #94a3b8;
    pointer-events: none;
    z-index: 1;
}

.topbar-search-input {
    width: 100%;
    height: 44px;
    padding: 0 20px 0 48px;
    border: 1.5px solid rgba(226, 232, 240, 0.8);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(8px);
    color: #1e293b;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.topbar-search-input:focus {
    outline: none;
    border-color: #1DD3B0;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(29, 211, 176, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
    transform: translateY(-1px);
}

.topbar-search-input::placeholder {
    color: #94a3b8;
    font-weight: 400;
}

/* Icon Button Premium */
.topbar-icon-btn {
    position: relative;
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255, 255, 255, 0.6);
    border: 1.5px solid rgba(226, 232, 240, 0.6);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.topbar-icon-btn:hover {
    background: #ffffff;
    border-color: #1DD3B0;
    color: #1DD3B0;
    box-shadow: 0 4px 12px rgba(29, 211, 176, 0.1);
    transform: translateY(-1px);
}

.topbar-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: white;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 7px;
    border-radius: 999px;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
    border: 2px solid #ffffff;
}

/* User Menu Premium */
.topbar-user-menu {
    position: relative;
}

.topbar-user-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    height: 44px;
    padding: 4px 14px 4px 4px;
    border: 1.5px solid rgba(226, 232, 240, 0.6);
    background: rgba(255, 255, 255, 0.6);
    backdrop-filter: blur(8px);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.topbar-user-btn:hover {
    border-color: #1DD3B0;
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(29, 211, 176, 0.1);
    transform: translateY(-1px);
}

.topbar-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #1DD3B0 0%, #17A98D 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 2px 8px rgba(29, 211, 176, 0.2);
}

.topbar-user-name {
    font-weight: 600;
    font-size: 14px;
    color: #1e293b;
    white-space: nowrap;
}

.topbar-chevron {
    color: #94a3b8;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    width: 16px;
    height: 16px;
}

.topbar-user-btn:hover .topbar-chevron {
    color: #1DD3B0;
    transform: rotate(180deg);
}

/* Dropdown Premium */
.topbar-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 300px;
    background: #ffffff;
    border: 1.5px solid rgba(226, 232, 240, 0.8);
    border-radius: 16px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08), 0 4px 12px rgba(0, 0, 0, 0.04);
    backdrop-filter: blur(12px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-16px) scale(0.96);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 3000;
    overflow: hidden;
}

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

.topbar-dropdown-header {
    padding: 20px 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-bottom: 1.5px solid rgba(226, 232, 240, 0.6);
}

.topbar-dropdown-name {
    font-weight: 700;
    font-size: 16px;
    color: #1A2B4A;
    margin-bottom: 4px;
    letter-spacing: -0.3px;
}

.topbar-dropdown-email {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
}

.topbar-dropdown-divider {
    height: 1.5px;
    background: linear-gradient(90deg, transparent, rgba(226, 232, 240, 0.8), transparent);
    margin: 8px 0;
}

.topbar-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 24px;
    color: #475569;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.topbar-dropdown-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: #1DD3B0;
    transform: scaleY(0);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.topbar-dropdown-item:hover {
    background: linear-gradient(90deg, rgba(29, 211, 176, 0.05), transparent);
    color: #1DD3B0;
    padding-left: 28px;
}

.topbar-dropdown-item:hover::before {
    transform: scaleY(1);
}

.topbar-dropdown-item.text-danger {
    color: #DC2626;
}

.topbar-dropdown-item.text-danger::before {
    background: #EF4444;
}

.topbar-dropdown-item.text-danger:hover {
    background: linear-gradient(90deg, rgba(239, 68, 68, 0.05), transparent);
    color: #EF4444;
}

.topbar-dropdown-item svg {
    color: currentColor;
    width: 18px;
    height: 18px;
}

/* Breadcrumb Premium */
.topbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
    font-size: 13px;
}

.breadcrumb-link {
    color: #64748b;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 2px 6px;
    border-radius: 6px;
}

.breadcrumb-link:hover {
    color: #1DD3B0;
    background: rgba(29, 211, 176, 0.08);
}

.breadcrumb-separator {
    color: #cbd5e1;
    font-weight: 400;
}

.breadcrumb-current {
    color: #1e293b;
    font-weight: 600;
    padding: 2px 6px;
}

/* ============================================================
   🧭 PUBLIC NAVBAR PREMIUM
   ============================================================ */
.fm-navbar-public {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: var(--fm-secondary-500);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transition: all var(--fm-transition-base);
}

.fm-navbar-public.transparent {
    background: rgba(26, 43, 74, 0.1);
    backdrop-filter: blur(8px);
    box-shadow: none;
}

.fm-navbar-public.transparent.scrolled {
    background: rgba(26, 43, 74, 0.98);
    backdrop-filter: blur(16px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
}

.navbar-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--fm-space-8);
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    transition: opacity var(--fm-transition-fast);
}

.navbar-brand:hover {
    opacity: 0.9;
}

.navbar-logo {
    height: 48px;
    width: auto;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
}

.navbar-title {
    font-size: 22px;
    font-weight: 800;
    color: white;
    letter-spacing: -0.5px;
}

.navbar-menu {
    display: flex;
    align-items: center;
    gap: var(--fm-space-8);
}

.navbar-link {
    position: relative;
    color: rgba(255, 255, 255, 0.95);
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.3px;
    padding: 8px 4px;
    transition: all var(--fm-transition-fast);
}

.navbar-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--fm-primary-400);
    border-radius: 3px;
    transition: width var(--fm-transition-fast);
}

.navbar-link:hover {
    color: white;
}

.navbar-link:hover::after {
    width: 100%;
}

.navbar-btn-outline {
    padding: 12px 28px;
    border: 2px solid rgba(255, 255, 255, 0.9);
    border-radius: var(--fm-radius-xl);
    color: white;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: all var(--fm-transition-fast);
    backdrop-filter: blur(8px);
}

.navbar-btn-outline:hover {
    background: white;
    color: var(--fm-secondary-500);
    border-color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 255, 255, 0.3);
}

.navbar-btn-primary {
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--fm-primary-500), var(--fm-primary-600));
    border: none;
    border-radius: var(--fm-radius-xl);
    color: white;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: all var(--fm-transition-fast);
    box-shadow: 0 6px 20px rgba(29, 211, 176, 0.4);
}

.navbar-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(29, 211, 176, 0.6);
}

/* Mobile Toggle Premium */
.navbar-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    cursor: pointer;
    padding: 12px;
    border-radius: var(--fm-radius-lg);
    backdrop-filter: blur(8px);
    transition: all var(--fm-transition-fast);
}

.navbar-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.navbar-toggle span {
    width: 28px;
    height: 3px;
    background: white;
    border-radius: 3px;
    transition: all var(--fm-transition-base);
}

.navbar-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(9px, 9px);
}

.navbar-toggle.active span:nth-child(2) {
    opacity: 0;
}

.navbar-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

/* Mobile Styles Premium */
@media (max-width: 1024px) {
    .navbar-container {
        padding: 0 var(--fm-space-6);
    }
    
    .navbar-menu {
        gap: var(--fm-space-6);
    }
    
    .navbar-link {
        font-size: 14px;
    }
    
    .navbar-btn-outline,
    .navbar-btn-primary {
        padding: 10px 24px;
        font-size: 14px;
    }
}

@media (max-width: 768px) {
    .navbar-container {
        height: 70px;
        padding: 0 var(--fm-space-5);
    }
    
    .navbar-logo {
        height: 40px;
    }
    
    .navbar-title {
        font-size: 18px;
    }
    
    .navbar-toggle {
        display: flex;
    }
    
    .navbar-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--fm-secondary-500);
        backdrop-filter: blur(16px);
        flex-direction: column;
        padding: var(--fm-space-8);
        gap: var(--fm-space-5);
        transform: translateX(-100%);
        transition: transform var(--fm-transition-base);
        box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
    
    .navbar-menu.show {
        transform: translateX(0);
    }
    
    .navbar-link {
        width: 100%;
        text-align: center;
        padding: 16px;
        font-size: 16px;
        border-radius: var(--fm-radius-lg);
        background: rgba(255, 255, 255, 0.05);
    }
    
    .navbar-link::after {
        display: none;
    }
    
    .navbar-link:hover {
        background: rgba(29, 211, 176, 0.15);
    }
    
    .navbar-btn-outline,
    .navbar-btn-primary {
        width: 100%;
        text-align: center;
        display: block;
        padding: 16px;
        font-size: 16px;
    }
}

/* ============================================================
   🦶 FOOTER
   ============================================================ */
.fm-footer {
    background: #F9FAFB;
    color: #6B7280;
    padding: 16px 20px;
    padding-left: calc(240px + 20px) !important;
    margin-top: auto;
    margin-left: 0 !important;
    border-top: 1px solid #E5E7EB;
    font-size: 12px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.footer-content {
    max-width: 100%;
    margin: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--fm-space-4);
}

.footer-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-copyright {
    font-size: 14px;
    margin: 0;
}

.footer-copyright strong {
    color: var(--fm-primary-400);
    font-weight: 700;
}

.footer-version {
    font-size: 12px;
    color: var(--fm-secondary-500);
    margin: 0;
}

.footer-right {
    display: flex;
    align-items: center;
    gap: var(--fm-space-4);
}

.footer-link {
    color: var(--fm-secondary-400);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color var(--fm-transition-fast);
}

.footer-link:hover {
    color: var(--fm-primary-400);
}

.footer-divider {
    color: var(--fm-secondary-600);
}

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-left {
        align-items: center;
    }
    
    .footer-right {
        flex-wrap: wrap;
        justify-content: center;
    }
}

/* ============================================================
   📊 DASHBOARD LAYOUT v2.0
   ============================================================ */
.fm-dashboard-layout {
    display: flex;
    min-height: 100vh;
    background: var(--fm-bg-primary);
}

.fm-main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-left: 240px !important; /* Allineato con .main-content */
    overflow-x: hidden;
    transition: margin-left 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.fm-main-content.sidebar-collapsed {
    margin-left: 60px !important;
}

.fm-content-wrapper {
    flex: 1;
    padding: var(--fm-space-8);
}

/* Welcome Card */
.fm-welcome-card {
    background: linear-gradient(135deg, var(--fm-primary-500), var(--fm-secondary-500));
    color: white;
    padding: var(--fm-space-8);
    border-radius: var(--fm-radius-2xl);
    margin-bottom: var(--fm-space-8);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--fm-shadow-lg);
}

.welcome-title {
    font-size: 32px;
    font-weight: 800;
    margin: 0 0 8px 0;
}

.welcome-subtitle {
    font-size: 16px;
    opacity: 0.9;
    margin: 0;
}

.welcome-date {
    font-size: 14px;
    font-weight: 600;
    opacity: 0.8;
    text-transform: uppercase;
}

/* Section Title */
.section-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--fm-secondary-800);
    margin-bottom: var(--fm-space-4);
}

/* Quick Actions */
.quick-actions-section {
    margin-bottom: var(--fm-space-8);
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--fm-space-4);
}

.quick-action-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: var(--fm-space-3);
    padding: var(--fm-space-6);
    background: white;
    border: 2px solid var(--fm-secondary-100);
    border-radius: var(--fm-radius-xl);
    text-decoration: none;
    color: var(--fm-secondary-700);
    font-weight: 600;
    font-size: 14px;
    transition: all var(--fm-transition-base);
    text-align: center;
}

.quick-action-card svg {
    color: var(--fm-primary-500);
    transition: transform var(--fm-transition-base);
}

.quick-action-card:hover {
    border-color: var(--fm-primary-500);
    background: var(--fm-primary-50);
    transform: translateY(-4px);
    box-shadow: var(--fm-shadow-lg);
}

.quick-action-card:hover svg {
    transform: scale(1.1);
}

/* Two Column Layout */
.dashboard-two-col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: var(--fm-space-6);
    margin-top: var(--fm-space-8);
}

/* Activity Card */
.activity-card {
    background: white;
    border-radius: var(--fm-radius-xl);
    box-shadow: var(--fm-shadow-md);
    overflow: hidden;
}

.activity-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--fm-space-6);
    border-bottom: 1px solid var(--fm-secondary-100);
}

.activity-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--fm-secondary-800);
    margin: 0;
}

.activity-link {
    color: var(--fm-primary-600);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: color var(--fm-transition-fast);
}

.activity-link:hover {
    color: var(--fm-primary-700);
}

.activity-list {
    padding: var(--fm-space-4);
}

.activity-item {
    display: flex;
    gap: var(--fm-space-4);
    padding: var(--fm-space-4);
    border-radius: var(--fm-radius-lg);
    transition: background var(--fm-transition-fast);
}

.activity-item:hover {
    background: var(--fm-primary-50);
}

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--fm-radius-lg);
    background: var(--fm-secondary-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--fm-secondary-600);
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-name {
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.activity-name a {
    color: var(--fm-secondary-800);
    text-decoration: none;
    transition: color var(--fm-transition-fast);
}

.activity-name a:hover {
    color: var(--fm-primary-600);
}

.activity-meta {
    font-size: 12px;
    color: var(--fm-secondary-500);
    display: flex;
    align-items: center;
    gap: 8px;
}

.activity-badge {
    padding: 2px 8px;
    border-radius: var(--fm-radius-sm);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
}

.activity-badge.status-open {
    background: var(--fm-primary-100);
    color: var(--fm-primary-700);
}

.activity-badge.status-active {
    background: var(--fm-success-100);
    color: var(--fm-success-700);
}

.activity-badge.status-pending {
    background: var(--fm-warning-100);
    color: var(--fm-warning-700);
}

.activity-empty {
    text-align: center;
    padding: var(--fm-space-8);
    color: var(--fm-secondary-400);
    font-size: 14px;
}

/* Responsive Dashboard */
@media (max-width: 1024px) {
    .fm-main-content {
        margin-left: 0;
    }
    
    .fm-sidebar {
        transform: translateX(-100%);
        position: fixed;
    }
    
    .dashboard-two-col {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .fm-welcome-card {
        flex-direction: column;
        text-align: center;
        gap: var(--fm-space-4);
    }
    
    .welcome-title {
        font-size: 24px;
    }
    
    .kpi-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ============================================================
   📊 PAGE HEADERS & ACTIONS
   ============================================================ */
.page-header-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--fm-space-3);
    margin-bottom: var(--fm-space-6);
}

/* Stats Bar */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--fm-space-4);
    margin-bottom: var(--fm-space-6);
}

.stat-card {
    background: white;
    border-radius: var(--fm-radius-xl);
    padding: var(--fm-space-5);
    box-shadow: var(--fm-shadow-md);
    display: flex;
    gap: var(--fm-space-4);
    align-items: center;
}

.stat-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--fm-radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.stat-content {
    flex: 1;
}

.stat-value {
    font-size: 32px;
    font-weight: 800;
    color: var(--fm-secondary-800);
    line-height: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--fm-secondary-500);
    margin-top: 4px;
    font-weight: 600;
}

/* ============================================================
   🔍 FILTERS
   ============================================================ */
.filters-card {
    margin-bottom: var(--fm-space-6);
}

.filters-form {
    padding: var(--fm-space-6);
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: var(--fm-space-4);
    margin-bottom: var(--fm-space-5);
}

.filters-actions {
    display: flex;
    gap: var(--fm-space-3);
}

/* ============================================================
   📋 TABLES v2.0
   ============================================================ */
.table-card {
    overflow: hidden;
}

.fm-table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.fm-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.fm-table thead {
    background: var(--fm-secondary-50);
}

.fm-table th {
    padding: 16px 20px;
    text-align: left;
    font-size: 12px;
    font-weight: 700;
    color: var(--fm-secondary-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--fm-secondary-200);
}

.fm-table th.text-right {
    text-align: right;
}

.fm-table td {
    padding: 16px 20px;
    border-bottom: 1px solid var(--fm-secondary-100);
    color: var(--fm-secondary-700);
}

.fm-table td.text-right {
    text-align: right;
}

.fm-table td.text-center {
    text-align: center;
}

.fm-table tbody tr {
    transition: background var(--fm-transition-fast);
}

.fm-table tbody tr:hover {
    background: var(--fm-primary-50);
}

.fm-table .empty-state {
    padding: var(--fm-space-10) var(--fm-space-6);
    text-align: center;
    color: var(--fm-secondary-400);
}

.fm-table .empty-state p {
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

/* Table Cell Styles */
.vehicle-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.vehicle-name {
    font-weight: 600;
    color: var(--fm-secondary-800);
}

.vehicle-version {
    font-size: 12px;
    color: var(--fm-secondary-500);
}

.user-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--fm-radius-full);
    background: linear-gradient(135deg, var(--fm-primary-500), var(--fm-secondary-500));
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    flex-shrink: 0;
}

.text-primary {
    color: var(--fm-primary-600);
}

.text-muted {
    color: var(--fm-secondary-400);
}

/* ============================================================
   🏷️ BADGES v2.0
   ============================================================ */
.fm-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--fm-radius-full);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.fm-badge-primary {
    background: var(--fm-primary-100);
    color: var(--fm-primary-700);
}

.fm-badge-secondary {
    background: var(--fm-secondary-100);
    color: var(--fm-secondary-700);
}

.fm-badge-success {
    background: var(--fm-success-100);
    color: var(--fm-success-700);
}

.fm-badge-warning {
    background: var(--fm-warning-100);
    color: var(--fm-warning-700);
}

.fm-badge-danger {
    background: var(--fm-danger-100);
    color: var(--fm-danger-700);
}

.fm-badge-neutral {
    background: var(--fm-neutral-100);
    color: var(--fm-neutral-700);
}

/* Badge Icons */
.fm-badge svg {
    margin-right: 4px;
}

/* ============================================================
   📄 CARDS v2.0
   ============================================================ */
.fm-card {
    background: white;
    border-radius: var(--fm-radius-xl);
    box-shadow: var(--fm-shadow-md);
    overflow: hidden;
}

.card-header {
    padding: var(--fm-space-6);
    border-bottom: 1px solid var(--fm-secondary-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--fm-secondary-800);
    margin: 0;
}

.card-body {
    padding: var(--fm-space-6);
}

.card-footer {
    padding: var(--fm-space-4) var(--fm-space-6);
    background: var(--fm-secondary-50);
    border-top: 1px solid var(--fm-secondary-100);
}

/* ============================================================
   📝 FORMS v2.0
   ============================================================ */
.fm-form-group {
    margin-bottom: var(--fm-space-5);
}

.fm-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--fm-secondary-700);
    margin-bottom: 8px;
}

.fm-label-required::after {
    content: '*';
    color: var(--fm-danger-500);
    margin-left: 4px;
}

.fm-input,
.fm-select,
.fm-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--fm-secondary-200);
    border-radius: var(--fm-radius-lg);
    font-size: 14px;
    font-family: var(--fm-font-primary);
    color: var(--fm-secondary-800);
    background: white;
    transition: all var(--fm-transition-fast);
}

.fm-input:focus,
.fm-select:focus,
.fm-textarea:focus {
    outline: none;
    border-color: var(--fm-primary-500);
    box-shadow: 0 0 0 3px var(--fm-primary-50);
}

.fm-input::placeholder,
.fm-textarea::placeholder {
    color: var(--fm-secondary-400);
}

.fm-textarea {
    min-height: 120px;
    resize: vertical;
}

.fm-select {
    cursor: pointer;
}

.fm-form-error {
    color: var(--fm-danger-600);
    font-size: 12px;
    margin-top: 6px;
}

.fm-form-help {
    color: var(--fm-secondary-500);
    font-size: 12px;
    margin-top: 6px;
}

/* ============================================================
   🔘 BUTTONS v2.0
   ============================================================ */
.fm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: var(--fm-radius-lg);
    font-size: 14px;
    font-weight: 600;
    font-family: var(--fm-font-primary);
    text-decoration: none;
    cursor: pointer;
    transition: all var(--fm-transition-fast);
    white-space: nowrap;
}

.fm-btn-primary {
    background: linear-gradient(135deg, var(--fm-primary-500), var(--fm-primary-600));
    color: white;
    box-shadow: 0 4px 12px rgba(29, 211, 176, 0.3);
}

.fm-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(29, 211, 176, 0.4);
}

.fm-btn-secondary {
    background: var(--fm-secondary-500);
    color: white;
    box-shadow: 0 4px 12px rgba(26, 43, 74, 0.2);
}

.fm-btn-secondary:hover {
    background: var(--fm-secondary-600);
    transform: translateY(-2px);
}

.fm-btn-ghost {
    background: transparent;
    color: var(--fm-secondary-700);
    border: 1px solid var(--fm-secondary-200);
}

.fm-btn-ghost:hover {
    background: var(--fm-secondary-50);
    border-color: var(--fm-secondary-300);
}

.fm-btn-danger {
    background: var(--fm-danger-500);
    color: white;
}

.fm-btn-danger:hover {
    background: var(--fm-danger-600);
}

.fm-btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.fm-btn-lg {
    padding: 16px 32px;
    font-size: 16px;
}

.fm-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ============================================================
   📝 FORM LAYOUTS
   ============================================================ */
.form-layout {
    display: flex;
    flex-direction: column;
    gap: var(--fm-space-6);
}

.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--fm-space-5);
}

.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--fm-space-5);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--fm-space-3);
    padding: var(--fm-space-6);
    background: white;
    border-radius: var(--fm-radius-xl);
    box-shadow: var(--fm-shadow-md);
}

@media (max-width: 768px) {
    .form-grid-2,
    .form-grid-3 {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column-reverse;
    }
    
    .form-actions .fm-btn {
        width: 100%;
    }
}

/* ============================================================
   ⚠️ ALERTS
   ============================================================ */
.fm-alert {
    display: flex;
    gap: var(--fm-space-4);
    padding: var(--fm-space-5);
    border-radius: var(--fm-radius-xl);
    margin-bottom: var(--fm-space-6);
    border: 1px solid transparent;
}

.fm-alert svg {
    flex-shrink: 0;
}

.fm-alert ul {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.fm-alert li {
    margin-bottom: 4px;
}

.fm-alert-success {
    background: var(--fm-success-50);
    color: var(--fm-success-800);
    border-color: var(--fm-success-200);
}

.fm-alert-success svg {
    color: var(--fm-success-600);
}

.fm-alert-danger {
    background: var(--fm-danger-50);
    color: var(--fm-danger-800);
    border-color: var(--fm-danger-200);
}

.fm-alert-danger svg {
    color: var(--fm-danger-600);
}

.fm-alert-warning {
    background: var(--fm-warning-50);
    color: var(--fm-warning-800);
    border-color: var(--fm-warning-200);
}

.fm-alert-warning svg {
    color: var(--fm-warning-600);
}

.fm-alert-info {
    background: var(--fm-primary-50);
    color: var(--fm-primary-800);
    border-color: var(--fm-primary-200);
}

.fm-alert-info svg {
    color: var(--fm-primary-600);
}

/* ============================================================
   📱 RESPONSIVE UTILITIES
   ============================================================ */
@media (max-width: 768px) {
    .stats-bar {
        grid-template-columns: 1fr;
    }
    
    .filters-grid {
        grid-template-columns: 1fr;
    }
    
    .page-header-actions {
        flex-direction: column;
    }
    
    .fm-table {
        font-size: 12px;
    }
    
    .fm-table th,
    .fm-table td {
        padding: 12px;
    }
}

/* ============================================================
   📊 PIPELINE NEGOZIAZIONI - Kanban Board Premium
   ============================================================ */
.pipeline-board {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
    scroll-behavior: smooth;
}

.pipeline-column {
    flex: 0 0 320px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 4px 16px rgba(0, 0, 0, 0.04);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 200px);
    border: 1.5px solid rgba(226, 232, 240, 0.6);
}

.column-header {
    padding: 18px 20px;
    border-bottom: 3px solid;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(248, 250, 252, 0.8), #ffffff);
}

.column-count {
    background: rgba(0, 0, 0, 0.08);
    padding: 5px 12px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 700;
    min-width: 28px;
    text-align: center;
}

.column-cards {
    flex: 1;
    overflow-y: auto;
    padding: 14px;
    background: #f8fafc;
}

.column-cards.drag-over {
    background: rgba(29, 211, 176, 0.05);
    border: 2px dashed #1DD3B0;
    border-radius: 8px;
}

.negotiation-card {
    background: #ffffff;
    border: 1.5px solid rgba(226, 232, 240, 0.8);
    border-left: 4px solid;
    border-radius: 12px;
    padding: 14px;
    margin-bottom: 12px;
    cursor: grab;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.negotiation-card:active {
    cursor: grabbing;
}

.negotiation-card.dragging {
    opacity: 0.5;
    transform: rotate(2deg) scale(1.02);
}

.negotiation-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
    border-color: rgba(29, 211, 176, 0.3);
}

.card-header {
    font-weight: 700;
    font-size: 15px;
    margin-bottom: 10px;
    color: #1A2B4A;
    line-height: 1.3;
}

.card-meta {
    font-size: 13px;
    color: #64748B;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-meta svg {
    flex-shrink: 0;
    opacity: 0.6;
}

.card-dealer {
    font-size: 13px;
    color: #1DD3B0;
    font-weight: 600;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(226, 232, 240, 0.6);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-dealer svg {
    flex-shrink: 0;
}

.pipeline-empty {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
    opacity: 0.6;
}

.pipeline-empty svg {
    margin-bottom: 12px;
}

.pipeline-empty p {
    font-size: 13px;
    font-weight: 500;
}

/* Toast Notifications for Pipeline */
.fm-toast {
    position: fixed;
    top: 100px;
    right: 24px;
    padding: 16px 24px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    animation: slideInRight 0.3s ease;
}

.fm-toast-success {
    background: linear-gradient(135deg, #10B981, #059669);
    color: white;
}

.fm-toast-error {
    background: linear-gradient(135deg, #EF4444, #DC2626);
    color: white;
}

@keyframes slideInRight {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Scrollbar custom per pipeline */
.column-cards::-webkit-scrollbar {
    width: 8px;
}

.column-cards::-webkit-scrollbar-track {
    background: rgba(226, 232, 240, 0.3);
    border-radius: 4px;
}

.column-cards::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.3);
    border-radius: 4px;
}

.column-cards::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.5);
}

.pipeline-board::-webkit-scrollbar {
    height: 8px;
}

.pipeline-board::-webkit-scrollbar-track {
    background: rgba(226, 232, 240, 0.3);
    border-radius: 4px;
}

.pipeline-board::-webkit-scrollbar-thumb {
    background: rgba(100, 116, 139, 0.3);
    border-radius: 4px;
}

.pipeline-board::-webkit-scrollbar-thumb:hover {
    background: rgba(100, 116, 139, 0.5);
}

/* ============================================================
   📋 TABLE ENHANCEMENTS - Catalog & Lists
   ============================================================ */
.fm-table-vehicle {
    display: flex;
    align-items: center;
    gap: 10px;
}

.fm-table-icon {
    color: #64748b;
    flex-shrink: 0;
}

.fm-table-text-muted {
    color: #94a3b8;
    font-size: 14px;
}

.fm-table-price {
    color: #1DD3B0;
    font-size: 15px;
    font-weight: 700;
}

.fm-btn-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: #1DD3B0;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.fm-btn-link:hover {
    background: rgba(29, 211, 176, 0.1);
    transform: translateX(2px);
}

.fm-btn-link svg {
    width: 16px;
    height: 16px;
}

/* Card Header Enhancements */
.fm-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 28px;
    border-bottom: 1.5px solid rgba(226, 232, 240, 0.8);
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
}

.fm-card-title {
    font-size: 20px;
    font-weight: 700;
    color: #1A2B4A;
    margin: 0;
    letter-spacing: -0.3px;
}

/* Button Size Variations */
.fm-btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

.fm-btn-primary {
    background: linear-gradient(135deg, #1DD3B0, #17A98D);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.fm-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(29, 211, 176, 0.3);
}

.fm-btn-primary svg {
    width: 18px;
    height: 18px;
}

/* ============================================================
   📋 TABLE ENHANCEMENTS - Catalog & Lists
   ============================================================ */
.fm-table-vehicle { display: flex; align-items: center; gap: 10px; }
.fm-table-icon { color: #64748b; flex-shrink: 0; }
.fm-table-text-muted { color: #94a3b8; font-size: 14px; }
.fm-table-price { color: #1DD3B0; font-size: 15px; font-weight: 700; }
.fm-btn-link { display: inline-flex; align-items: center; gap: 6px; color: #1DD3B0; text-decoration: none; font-weight: 600; font-size: 14px; padding: 6px 12px; border-radius: 8px; transition: all 0.2s ease; }
.fm-btn-link:hover { background: rgba(29, 211, 176, 0.1); transform: translateX(2px); }
.fm-btn-link svg { width: 16px; height: 16px; }
.fm-card-header { display: flex; justify-content: space-between; align-items: center; padding: 24px 28px; border-bottom: 1.5px solid rgba(226, 232, 240, 0.8); background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%); }
.fm-card-title { font-size: 20px; font-weight: 700; color: #1A2B4A; margin: 0; letter-spacing: -0.3px; }
.fm-btn-sm { padding: 8px 16px; font-size: 13px; }
.fm-btn-primary { background: linear-gradient(135deg, #1DD3B0, #17A98D); color: white; border: none; padding: 10px 20px; border-radius: 10px; font-weight: 600; font-size: 14px; cursor: pointer; transition: all 0.2s ease; display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.fm-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(29, 211, 176, 0.3); }
.fm-btn-primary svg { width: 18px; height: 18px; }

/* Table Client & Date Styles */
.fm-table-client { display: flex; align-items: flex-start; gap: 10px; }
.fm-table-date { color: #64748b; font-size: 14px; font-weight: 500; }
.fm-badge-info { background: #DBEAFE; color: #2563EB; }
.fm-badge-warning { background: #FEF3C7; color: #D97706; }


/* ============================================================
   🔍 FILTERS PREMIUM STYLES
   ============================================================ */
.fm-card-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #1A2B4A;
    font-size: 18px;
    font-weight: 700;
}

.fm-card-header-title svg {
    color: #1DD3B0;
}

.fm-card-header-title h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
}

.fm-filters-form {
    padding: 24px 28px;
}

.fm-filters-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

@media (max-width: 768px) {
    .fm-filters-row {
        grid-template-columns: 1fr;
    }
}

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

.fm-filter-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fm-filter-label svg {
    width: 16px;
    height: 16px;
    color: #94a3b8;
}

.fm-filters-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    padding-top: 8px;
}

.fm-active-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f0fdfa 0%, #ecfdf5 100%);
    border-radius: 12px;
    margin-top: 20px;
    border: 1.5px solid rgba(29, 211, 176, 0.15);
}

.fm-active-filters-label {
    font-size: 13px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.fm-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: white;
    border: 1.5px solid rgba(29, 211, 176, 0.3);
    border-radius: 20px;
    font-size: 13px;
    color: #334155;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.fm-filter-tag strong {
    color: #1DD3B0;
    font-weight: 700;
}

.fm-filter-tag-remove {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #fee2e2;
    color: #ef4444;
    border-radius: 50%;
    text-decoration: none;
    font-weight: 700;
    font-size: 14px;
    line-height: 1;
    transition: all 0.2s ease;
}

.fm-filter-tag-remove:hover {
    background: #ef4444;
    color: white;
    transform: scale(1.1);
}

/* ============================================================
   📂 HIERARCHICAL SIDEBAR MENU - Macro Menu + Submenu
   ============================================================ */

/* Sidebar Menu Group (contiene toggle + submenu) */
.sidebar-menu-group {
    margin-bottom: 4px;
}

/* Macro Menu Toggle Button */
.sidebar-menu-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 12px 16px;
    background: transparent;
    border: none;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.sidebar-menu-toggle:hover {
    background: rgba(29, 211, 176, 0.15);
    color: #1DD3B0;
}

.sidebar-menu-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-menu-icon svg {
    width: 20px;
    height: 20px;
}

.sidebar-menu-label {
    flex: 1;
}

.sidebar-menu-arrow {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.sidebar-menu-arrow.rotated {
    transform: rotate(90deg);
}

/* Submenu Container */
.sidebar-submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    padding-left: 0;
}

.sidebar-submenu.open {
    max-height: 500px;
    opacity: 1;
    margin-top: 4px;
    margin-bottom: 8px;
}

/* Nascondi header quando sidebar non è collapsed */
.sidebar-submenu-header {
    display: none;
}

/* Submenu Links */
.sidebar-submenu-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px 10px 48px;
    color: rgba(255, 255, 255, 0.75);
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 10px;
    margin-bottom: 2px;
    transition: all 0.2s ease;
    position: relative;
}

.sidebar-submenu-link::before {
    content: '';
    position: absolute;
    left: 32px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 4px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    transition: all 0.2s ease;
}

.sidebar-submenu-link:hover {
    background: rgba(29, 211, 176, 0.1);
    color: #1DD3B0;
    padding-left: 50px;
}

.sidebar-submenu-link:hover::before {
    background: #1DD3B0;
    width: 6px;
    height: 6px;
}

.sidebar-submenu-link.active {
    background: rgba(29, 211, 176, 0.15);
    color: #1DD3B0;
    font-weight: 600;
}

.sidebar-submenu-link.active::before {
    background: #1DD3B0;
    width: 6px;
    height: 6px;
}

.sidebar-submenu-link svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* Badge in sidebar */
.sidebar-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 8px;
    margin-left: auto;
    background: linear-gradient(135deg, #8B5CF6, #7C3AED);
    color: white;
    font-size: 9px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(139, 92, 246, 0.3);
}

/* Link Diretto (senza submenu) */
.sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: rgba(255, 255, 255, 0.85);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border-radius: 12px;
    margin-bottom: 4px;
    transition: all 0.2s ease;
}

.sidebar-link:hover {
    background: rgba(29, 211, 176, 0.15);
    color: #1DD3B0;
}

.sidebar-link.active {
    background: linear-gradient(135deg, rgba(29, 211, 176, 0.2), rgba(29, 211, 176, 0.1));
    color: #1DD3B0;
    box-shadow: inset 3px 0 0 #1DD3B0;
}

.sidebar-link svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}


/* ============================================================
   🚗 NEGOTIATION VIEW PREMIUM STYLES
   ============================================================ */

/* Header Negoziazione Premium */
.negotiation-header-card {
    background: linear-gradient(135deg, #1DD3B0 0%, #17A98D 50%, #1A2B4A 100%);
    border-radius: 16px;
    padding: 28px 32px;
    margin-bottom: 24px;
    box-shadow: 0 8px 24px rgba(29, 211, 176, 0.2);
}

.negotiation-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
}

.negotiation-vehicle-info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.negotiation-vehicle-icon {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.negotiation-vehicle-title {
    font-size: 28px;
    font-weight: 700;
    color: white;
    margin: 0 0 6px 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.negotiation-vehicle-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: rgba(255, 255, 255, 0.9);
}

.negotiation-vehicle-meta .meta-separator {
    opacity: 0.5;
}

.negotiation-code {
    font-family: 'Monaco', 'Courier New', monospace;
    background: rgba(255, 255, 255, 0.15);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
}

.negotiation-header-status {
    flex-shrink: 0;
}

.negotiation-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    backdrop-filter: blur(10px);
}

.negotiation-status-badge svg {
    width: 16px;
    height: 16px;
}

/* Tabs Premium */
.fm-tabs-premium {
    margin-bottom: 24px;
}

.fm-tabs-nav-premium {
    display: flex;
    gap: 8px;
    background: white;
    padding: 8px;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    overflow-x: auto;
}

.fm-tab-premium {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: #64748b;
    text-decoration: none;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.fm-tab-premium svg {
    width: 18px;
    height: 18px;
}

.fm-tab-premium:hover {
    background: rgba(29, 211, 176, 0.1);
    color: #1DD3B0;
}

.fm-tab-premium.active {
    background: linear-gradient(135deg, #1DD3B0, #17A98D);
    color: white;
    box-shadow: 0 4px 12px rgba(29, 211, 176, 0.3);
}

/* Detail Grid Premium */
.fm-detail-grid-premium {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    padding: 24px;
}

.fm-detail-item-premium {
    display: flex;
    gap: 14px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.fm-detail-item-premium:hover {
    border-color: #1DD3B0;
    background: #f0fdfa;
}

.fm-detail-item-premium.fm-detail-highlight {
    background: linear-gradient(135deg, #f0fdfa 0%, #ecfdf5 100%);
    border: 2px solid rgba(29, 211, 176, 0.3);
}

.fm-detail-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #1DD3B0, #17A98D);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    flex-shrink: 0;
}

.fm-detail-label {
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
    display: block;
}

.fm-detail-value {
    font-size: 15px;
    font-weight: 600;
    color: #1e293b;
}

.fm-detail-value-large {
    font-size: 20px;
    font-weight: 700;
}

.fm-detail-value-success {
    color: #10b981;
}

.fm-detail-description-section {
    margin-top: 24px;
    padding: 24px;
    background: #f8fafc;
    border-radius: 12px;
    border-left: 4px solid #1DD3B0;
}

.fm-detail-description-section .fm-detail-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    margin-bottom: 12px;
}

.fm-detail-description-content {
    font-size: 15px;
    line-height: 1.7;
    color: #475569;
}

/* Timeline Premium */
.fm-timeline-premium {
    padding: 24px;
}

.fm-timeline-item-premium {
    display: flex;
    gap: 20px;
    position: relative;
    padding-bottom: 28px;
}

.fm-timeline-item-premium:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 7px;
    top: 24px;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, #1DD3B0 0%, #e2e8f0 100%);
}

.fm-timeline-marker-premium {
    width: 16px;
    height: 16px;
    background: #1DD3B0;
    border-radius: 50%;
    border: 3px solid white;
    box-shadow: 0 0 0 2px #1DD3B0, 0 2px 8px rgba(29, 211, 176, 0.3);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

.fm-timeline-content-premium {
    flex: 1;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
}

.fm-timeline-header-premium {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 8px;
}

.fm-timeline-header-premium strong {
    color: #1e293b;
    font-size: 15px;
    font-weight: 600;
}

.fm-timeline-date-premium {
    font-size: 13px;
    color: #94a3b8;
    font-weight: 500;
}

.fm-timeline-body-premium {
    font-size: 14px;
    line-height: 1.6;
    color: #64748b;
}

/* Action Card */
.fm-action-card {
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border: 2px solid #e2e8f0;
}

.fm-action-form {
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.fm-checkbox-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
}

.fm-checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.fm-action-buttons {
    display: flex;
    gap: 12px;
}

/* Empty State */
.fm-empty-state {
    text-align: center;
    padding: 60px 20px;
}

.fm-empty-state svg {
    color: #cbd5e1;
    margin-bottom: 16px;
}

.fm-empty-title {
    font-size: 18px;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 8px;
}

.fm-empty-text {
    font-size: 14px;
    color: #94a3b8;
}

/* Back Button Container */
.fm-back-button-container {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 2px solid #e2e8f0;
}

/* Success Button */
.fm-btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.fm-btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.fm-btn-success svg {
    width: 18px;
    height: 18px;
}

/* Link Primary */
.fm-link-primary {
    color: #1DD3B0;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.2s ease;
}

.fm-link-primary:hover {
    color: #17A98D;
    text-decoration: underline;
}

/* Text Muted */
.text-muted {
    color: #94a3b8;
    font-style: italic;
}

@media (max-width: 768px) {
    .negotiation-header-content {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .fm-tabs-nav-premium {
        flex-wrap: nowrap;
        overflow-x: auto;
    }
    
    .fm-detail-grid-premium {
        grid-template-columns: 1fr;
    }
    
    .fm-action-form {
        flex-direction: column;
        align-items: stretch;
    }
    
    .fm-action-buttons {
        flex-direction: column;
    }
}


/* ============================================================
   🎯 LEAD PIPELINE BOARD STYLES
   ============================================================ */
.leads-board {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 20px;
    min-height: 600px;
}

.leads-board .pipeline-column {
    min-width: 320px;
    flex-shrink: 0;
}

.lead-card {
    background: white;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 12px;
    border-left: 4px solid #1DD3B0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    cursor: move;
    transition: all 0.2s ease;
}

.lead-card:hover {
    box-shadow: 0 8px 20px rgba(29, 211, 176, 0.15);
    transform: translateY(-2px);
}

.lead-card[dragging="true"] {
    opacity: 0.5;
    transform: rotate(2deg);
}

.lead-card .card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12px;
}

.lead-card .card-title {
    font-size: 16px;
    font-weight: 600;
    color: #1A2B4A;
    margin: 0;
}

.lead-card .card-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 6px;
    background: rgba(29, 211, 176, 0.1);
    color: #1DD3B0;
}

.lead-card .card-meta {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 8px;
}

.lead-card .meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #64748b;
}

.lead-card .meta-item svg {
    width: 14px;
    height: 14px;
    color: #94a3b8;
    flex-shrink: 0;
}

.lead-card .card-dealer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: linear-gradient(135deg, #F8FAFC, #F1F5F9);
    border-radius: 8px;
    font-size: 12px;
    color: #475569;
    margin-top: 8px;
}

.lead-card .card-dealer svg {
    width: 14px;
    height: 14px;
    color: #1DD3B0;
}

.lead-card .card-footer {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(226, 232, 240, 0.5);
}

.lead-card .card-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}

.leads-column-cards {
    min-height: 400px;
    padding: 12px;
    background: rgba(248, 250, 252, 0.3);
    border-radius: 12px;
    transition: background 0.2s ease;
}

.leads-column-cards:empty::before {
    content: 'Nessun lead';
    display: block;
    text-align: center;
    color: #cbd5e1;
    font-size: 14px;
    padding: 40px 0;
}

/* Lead card animations */
@keyframes leadCardSlideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.lead-card {
    animation: leadCardSlideIn 0.3s ease-out;
}

/* Drag feedback */
.leads-column-cards.drag-over {
    background: rgba(29, 211, 176, 0.08);
    border: 2px dashed #1DD3B0;
}

/* Responsive Lead Board */
@media (max-width: 768px) {
    .leads-board {
        flex-direction: column;
    }
    
    .leads-board .pipeline-column {
        min-width: 100%;
    }
}

/* ============================================================
   🎨 UTILITY CLASSES - HubSpot/LinkedIn Style
   ============================================================ */

/* Layout */
.grid { display: grid; }
.grid-cols-1 { grid-template-columns: repeat(1, minmax(0, 1fr)); }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (min-width: 768px) {
    .md\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .md\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
    .lg\:grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .lg\:grid-cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .lg\:grid-cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.flex { display: flex; }
.inline-flex { display: inline-flex; }
.block { display: block; }
.inline-block { display: inline-block; }
.hidden { display: none; }

.flex-col { flex-direction: column; }
.flex-row { flex-direction: row; }
.flex-wrap { flex-wrap: wrap; }
.items-start { align-items: flex-start; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.justify-start { justify-content: flex-start; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.justify-between { justify-content: space-between; }

/* Gaps */
.gap-1 { gap: 4px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.gap-4 { gap: 16px; }
.gap-5 { gap: 20px; }
.gap-6 { gap: 24px; }
.gap-8 { gap: 32px; }

/* Spacing */
.space-y-1 > * + * { margin-top: 4px; }
.space-y-2 > * + * { margin-top: 8px; }
.space-y-3 > * + * { margin-top: 12px; }
.space-y-4 > * + * { margin-top: 16px; }
.space-y-5 > * + * { margin-top: 20px; }
.space-y-6 > * + * { margin-top: 24px; }
.space-x-2 > * + * { margin-left: 8px; }
.space-x-3 > * + * { margin-left: 12px; }
.space-x-4 > * + * { margin-left: 16px; }

/* Width & Height */
.w-full { width: 100%; }
.w-auto { width: auto; }
.w-4 { width: 16px; }
.w-5 { width: 20px; }
.w-6 { width: 24px; }
.w-7 { width: 28px; }
.w-8 { width: 32px; }
.w-10 { width: 40px; }
.w-12 { width: 48px; }
.w-14 { width: 56px; }
.w-16 { width: 64px; }
.w-20 { width: 80px; }

.h-4 { height: 16px; }
.h-5 { height: 20px; }
.h-6 { height: 24px; }
.h-7 { height: 28px; }
.h-8 { height: 32px; }
.h-10 { height: 40px; }
.h-12 { height: 48px; }
.h-14 { height: 56px; }
.h-16 { height: 64px; }
.h-20 { height: 80px; }

/* Padding */
.p-0 { padding: 0; }
.p-1 { padding: 4px; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }
.p-6 { padding: 24px; }
.p-8 { padding: 32px; }

.px-2 { padding-left: 8px; padding-right: 8px; }
.px-3 { padding-left: 12px; padding-right: 12px; }
.px-4 { padding-left: 16px; padding-right: 16px; }
.px-5 { padding-left: 20px; padding-right: 20px; }
.px-6 { padding-left: 24px; padding-right: 24px; }
.px-8 { padding-left: 32px; padding-right: 32px; }

.py-1 { padding-top: 4px; padding-bottom: 4px; }
.py-2 { padding-top: 8px; padding-bottom: 8px; }
.py-3 { padding-top: 12px; padding-bottom: 12px; }
.py-4 { padding-top: 16px; padding-bottom: 16px; }
.py-5 { padding-top: 20px; padding-bottom: 20px; }
.py-6 { padding-top: 24px; padding-bottom: 24px; }

/* Margin */
.m-0 { margin: 0; }
.m-1 { margin: 4px; }
.m-2 { margin: 8px; }
.m-3 { margin: 12px; }
.m-4 { margin: 16px; }
.m-6 { margin: 24px; }

.mx-auto { margin-left: auto; margin-right: auto; }

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-6 { margin-top: 24px; }
.mt-8 { margin-top: 32px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }
.mb-6 { margin-bottom: 24px; }
.mb-8 { margin-bottom: 32px; }

.ml-2 { margin-left: 8px; }
.ml-3 { margin-left: 12px; }
.mr-2 { margin-right: 8px; }
.mr-3 { margin-right: 12px; }

/* Border Radius */
.rounded { border-radius: 4px; }
.rounded-md { border-radius: 6px; }
.rounded-lg { border-radius: 8px; }
.rounded-xl { border-radius: 12px; }
.rounded-2xl { border-radius: 16px; }
.rounded-full { border-radius: 9999px; }

/* Border */
.border { border: 1px solid #E5E7EB; }
.border-2 { border: 2px solid #E5E7EB; }
.border-t { border-top: 1px solid #E5E7EB; }
.border-b { border-bottom: 1px solid #E5E7EB; }
.border-l { border-left: 1px solid #E5E7EB; }
.border-r { border-right: 1px solid #E5E7EB; }
.border-l-4 { border-left: 4px solid; }

.border-gray-200 { border-color: #E5E7EB; }
.border-gray-300 { border-color: #D1D5DB; }
.border-gray-900 { border-color: #1F2937; }
.border-teal-100 { border-color: #CCFBF1; }
.border-teal-500 { border-color: #14B8A6; }
.border-red-500 { border-color: #EF4444; }
.border-white\/30 { border-color: rgba(255, 255, 255, 0.3); }

/* Background Colors */
.bg-white { background-color: white; }
.bg-gray-50 { background-color: #F9FAFB; }
.bg-gray-100 { background-color: #F3F4F6; }
.bg-red-50 { background-color: #FEF2F2; }
.bg-teal-50 { background-color: #F0FDFA; }
.bg-blue-50 { background-color: #EFF6FF; }

.bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-stops)); }
.bg-gradient-to-br { background-image: linear-gradient(to bottom right, var(--tw-gradient-stops)); }
.from-teal-500 { --tw-gradient-from: #14B8A6; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(20, 184, 166, 0)); }
.from-teal-50 { --tw-gradient-from: #F0FDFA; --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(240, 253, 250, 0)); }
.to-blue-600 { --tw-gradient-to: #2563EB; }
.to-white { --tw-gradient-to: #FFFFFF; }

.bg-white\/20 { background-color: rgba(255, 255, 255, 0.2); }
.bg-white\/30 { background-color: rgba(255, 255, 255, 0.3); }

/* Text Colors */
.text-white { color: white; }
.text-gray-500 { color: #6B7280; }
.text-gray-600 { color: #4B5563; }
.text-gray-700 { color: #374151; }
.text-gray-800 { color: #1F2937; }
.text-gray-900 { color: #1F2937; }
.text-teal-50 { color: #F0FDFA; }
.text-teal-100 { color: #CCFBF1; }
.text-teal-600 { color: #0D9488; }
.text-teal-900 { color: #134E4A; }
.text-red-600 { color: #DC2626; }
.text-red-800 { color: #991B1B; }

/* Font Sizes */
.text-xs { font-size: 12px; line-height: 1.3; }
.text-sm { font-size: 13px; line-height: 1.4; }
.text-base { font-size: 14px; line-height: 1.5; }
.text-lg { font-size: 16px; line-height: 1.5; }
.text-xl { font-size: 20px; line-height: 1.3; }
.text-2xl { font-size: 24px; line-height: 1.2; }
.text-3xl { font-size: 30px; line-height: 1.2; }

/* Font Weight */
.font-normal { font-weight: 400; }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }

/* Text Alignment */
.text-left { text-align: left; }
.text-center { text-align: center; }
.text-right { text-align: right; }

/* Letter Spacing */
.tracking-tight { letter-spacing: -0.025em; }
.tracking-normal { letter-spacing: 0; }
.tracking-wide { letter-spacing: 0.025em; }
.tracking-wider { letter-spacing: 0.05em; }

/* Shadows */
.shadow { box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1); }
.shadow-md { box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); }
.shadow-lg { box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); }
.shadow-xl { box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1); }

/* Backdrop */
.backdrop-blur { backdrop-filter: blur(12px); }

/* Transitions */
.transition { transition: all 0.15s ease; }
.transition-all { transition: all 0.15s ease; }
.transition-colors { transition: color 0.15s ease, background-color 0.15s ease; }

/* Hover States */
.hover\:bg-gray-50:hover { background-color: #F9FAFB; }
.hover\:bg-gray-100:hover { background-color: #F3F4F6; }
.hover\:bg-white\/30:hover { background-color: rgba(255, 255, 255, 0.3); }
.hover\:text-teal-600:hover { color: #0D9488; }
.hover\:border-teal-500:hover { border-color: #14B8A6; }

/* Focus States */
.focus\:outline-none:focus { outline: 2px solid transparent; outline-offset: 2px; }
.focus\:ring-2:focus { box-shadow: 0 0 0 3px rgba(29, 211, 176, 0.1); }
.focus\:ring-teal-500:focus { --tw-ring-color: #14B8A6; }
.focus\:border-teal-500:focus { border-color: #14B8A6; }

/* Cursor */
.cursor-pointer { cursor: pointer; }
.cursor-not-allowed { cursor: not-allowed; }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-x-auto { overflow-x: auto; }
.overflow-y-auto { overflow-y: auto; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }
.sticky { position: sticky; }

/* Z-Index */
.z-10 { z-index: 10; }
.z-20 { z-index: 20; }
.z-30 { z-index: 30; }
.z-40 { z-index: 40; }
.z-50 { z-index: 50; }

/* Opacity */
.opacity-0 { opacity: 0; }
.opacity-50 { opacity: 0.5; }
.opacity-75 { opacity: 0.75; }
.opacity-100 { opacity: 1; }
