        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }
		
		
hr {
    border: 0;
    height: 1px;
    background: #1e8449;
    background-image: linear-gradient(to right, #eee, #1e8449, #eee);
    margin-top: 20px;
    margin-bottom: 20px;
}

        .container {
            display: grid;
            grid-template-columns: 330px 1fr 330px;
            gap: 0;
            padding: 0;
            width: 100%;
            height: calc(100vh - 267px);
            margin-bottom: 0;
			    margin-bottom: -13px;
    border-bottom: 2px solid #116534;
        }
        .sidebar {
            background: white;
            border-radius: 0;
            padding: 8px;
            box-shadow: 2px 0 8px rgba(0,0,0,0.1);
            height: 100%;
            overflow-y: auto;
        }
        .sidebar h2 {
            font-size: 15px;
            margin-bottom: 10px;
            color: #313131;
            border-bottom: 3px solid #27ae60;
            padding-bottom: 10px;
        }
        .filter-group {
            margin-bottom: 10px;
        }
        .filter-group label {
            display: block;
            font-size: 10px;
            font-weight: 700;
            margin-bottom: 2px;
            color: #555;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        select, input[type="range"], input[type="number"] {
            width: 100%;
            padding: 5px 5px;
            border: 2px solid #e0e0e0;
            border-radius: 6px;
            font-size: 11px;
            font-family: inherit;
            transition: all 0.3s;
        }
        select:focus, input:focus {
            outline: none;
            border-color: #27ae60;
            box-shadow: 0 0 0 3px rgba(39, 174, 96, 0.1);
        }
        .filter-info {
            font-size: 12px;
            color: #999;
            margin-top: 4px;
            font-style: italic;
        }
        .stats-box {
            background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%);
            color: white;
            padding: 15px;
            border-radius: 8px;
            margin-bottom: 15px;
            border-left: 4px solid #fff;
        }
        .stat-row {
            display: flex;
            justify-content: space-between;
            margin-bottom: 10px;
            font-size: 13px;
        }
        .stat-value {
            font-weight: 700;
            font-size: 14px;
        }
        .button-group {
            display: flex;
            gap: 10px;
            margin-top: 15px;
        }
		
	
        button {
            flex: 0;
            padding: 11px;
            background: #27ae60;
            color: white;
            border: none;
            border-radius: 6px;
            font-weight: 600;
            cursor: pointer;
            font-size: 13px;
            transition: all 0.3s;
        }
        button:hover { transform: translateY(-2px);
            /*background: #1e8449;
            box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);*/
        }
        button.secondary {
            background: #95a5a6;
        }
        button.secondary:hover {
            background: #7f8c8d;
        }
        .sidebar-right {
            background: white;
            border-radius: 0;
            padding: 8px;
            box-shadow: -2px 0 8px rgba(0,0,0,0.1);
            height: 100%;
            overflow-y: auto;
			    overflow-x: hidden;
        }
        .main {
            display: flex;
            flex-direction: column;
            height: 100%;
        }
        #map {
            width: 100%;
            height: 100%;
            border-radius: 0;
            background: white;
        }
        .map-container {
            flex: 1;
            display: flex;
            height: 100%;
            position: relative;
        }
		
        .charts-container {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }
        .chart-box {
            background: #f9f9f9;
            padding: 15px;
            border-radius: 8px;
            border: 1px solid #e0e0e0;
        }
        .chart-box-full {
            /* Grafico a larghezza piena nella sidebar */
        }
        .chart-box h3 {
            font-size: 14px;
            margin-bottom: 12px;
            color: #313131;
            border-bottom: 2px solid #27ae60;
            padding-bottom: 8px;
        }
        .chart-wrapper {
            position: relative;
            height: 250px;
            width: 100%;
        }
        .details-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: 15px;
        }
        .detail-item {
            padding: 12px;
            background: #f9f9f9;
            border-radius: 6px;
            border-left: 4px solid #27ae60;
        }
        .detail-label {
            font-size: 11px;
            color: #888;
            font-weight: 700;
            margin-bottom: 5px;
            text-transform: uppercase;
            letter-spacing: 0.3px;
        }
        .detail-value {
            font-size: 14px;
            color: #333;
            word-break: break-word;
            font-weight: 500;
        }
        .environmental-stats-section {
            grid-column: 1/-1;
            background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
            color: white;
            padding: 15px;
            border-radius: 6px;
            border-left: 4px solid #fff;
            margin-top: 15px;
        }
        .environmental-stats-section .detail-label {
            color: rgba(255, 255, 255, 0.8);
        }
        .environmental-stats-section .detail-value {
            color: white;
            font-weight: 600;
        }
        .stat-section {
            margin-bottom: 12px;
            padding-bottom: 12px;
            border-bottom: 1px solid rgba(255,255,255,0.2);
        }
        .stat-section:last-child {
            border-bottom: none;
            margin-bottom: 0;
            padding-bottom: 0;
        }
        .stat-section-row {
            display: flex;
            justify-content: space-between;
            align-items: center;
        }
        .stat-section-row .detail-label {
            display: inline;
            margin: 0;
            text-transform: uppercase;
            font-size: 10px;
        }
        .stat-section-row .detail-value {
            display: inline;
            font-size: 13px;
        }
        .legend {
            background: white;
            padding: 15px;
            border-radius: 8px;
            font-size: 12px;
            margin-bottom: 20px;
            border: 1px solid #e0e0e0;
			display: none;
        }
        .legend h4 {
            color: #313131;
            margin-bottom: 10px;
            font-size: 13px;
        }
        /* Legenda CPC sulla mappa */
        .leaflet-control-legend {
            background: rgba(255, 255, 255, 0.8);
            padding: 12px;
            border-radius: 6px;
            font-size: 12px;
            box-shadow: 0 2px 8px rgba(0,0,0,0.15);
            border: 2px solid rgba(49, 49, 49, 0.1); margin-bottom: 40px!important;
        }
        .leaflet-control-legend h4 {
            color: #313131;
            margin: 0 0 8px 0;
            font-size: 13px;
            font-weight: 700;
            border-bottom: 2px solid #313131;
            padding-bottom: 5px;
			
        }
		
        /* Modale Info */
        .header-right {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-right: 50px;
        }
        .info-icon {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background: rgba(255, 255, 255, 0.2);
            border: 2px solid white;
            color: white;
            font-size: 22px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: all 0.3s;
            flex-shrink: 0;
        }
        .info-icon:hover {
            background: rgba(255, 255, 255, 0.4);
            transform: scale(1.1);
        }
        .modal-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.6);
            z-index: 10001;
            animation: fadeIn 0.3s ease;
        }
        .modal-overlay.active {
            display: flex;
            align-items: center;
            justify-content: center;
            overflow-y: auto;
        }
        body.modal-open {
            overflow: hidden;
        }
        @keyframes fadeIn {
            from {
                opacity: 0;
            }
            to {
                opacity: 1;
            }
        }
        .modal {
            background: white;
            border-radius: 12px;
            max-width: 700px;
            width: 95%;
            max-height: 90vh;
            overflow-y: auto;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
            animation: slideUp 0.3s ease;
        }
        .modal-tree-details {
            max-width: 900px;
            width: 95%;
            max-height: 90vh;
        }
        @keyframes slideUp {
            from {
                transform: translateY(50px);
                opacity: 0;
            }
            to {
                transform: translateY(0);
                opacity: 1;
            }
        }
        .modal-header {
            background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%);
            color: white;
            padding: 25px 15px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            border-radius: 12px 12px 0 0;
        }
        .modal-header h2 {
            margin: 0;
            font-size: 24px;
            flex: 1;
        }
        .modal-close {
            background: none;
            border: none;
            color: white;
            font-size: 28px;
            cursor: pointer;
            width: 40px;
            height: 40px;
            padding: 0;
            display: flex;
            align-items: center;
            justify-content: right;
            transition: transform 0.2s;
            flex-shrink: 0;
        }
       .modal-close:hover {
            /* transform: rotate(90deg);			*/
			color: #ff9900;
        }
        .modal-body {
            padding: 30px;
        }
        .modal-section {
            margin-bottom: 25px;
        }
        .modal-section:last-child {
            margin-bottom: 0;
        }
        .modal-section h3 {
            color: #27ae60;
            font-size: 18px;
            margin-bottom: 12px;
            display: flex;
            align-items: center;
            gap: 8px;
        }
        .modal-section p {
            color: #555;
            line-height: 1.6;
            font-size: 14px;
            margin-bottom: 8px;
        }
        .modal-section ul {
            margin-left: 20px;
            color: #555;
            font-size: 14px;
            line-height: 1.8;
        }
        .modal-section li {
            margin-bottom: 6px;
        }
        .feature-list {
            display: flex;
            flex-direction: column;
            gap: 12px;
        }
        .feature-item {
            display: flex;
            gap: 12px;
            align-items: flex-start;
        }
        .feature-icon {
            color: #27ae60;
            font-size: 18px;
            flex-shrink: 0;
            margin-top: 2px;
        }
        .feature-text {
            color: #555;
            font-size: 14px;
            line-height: 1.5;
        }
        .legend-item {
            margin-bottom: 10px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .legend-color {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            border: 2px solid white;
            box-shadow: 0 0 3px rgba(0,0,0,0.2);
            flex-shrink: 0;
        }
        .info-banner {
            background: #e8f5e9;
            border-left: 4px solid #27ae60;
            padding: 12px;
            border-radius: 6px;
            font-size: 12px;
            color: #2e7d32;
            margin-bottom: 15px;
        }
        .selected-tree-banner {
            background: #fff3e0;
            border-left: 4px solid #ff9800;
            padding: 12px;
            border-radius: 6px;
            font-size: 12px;
            color: #e65100;
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            gap: 10px;
            animation: slideIn 0.3s ease;
        }
        @keyframes slideIn {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }
		
@media (min-width: 1920px) and (max-width: 1920px) and (min-height: 1080px) {
	    /* Stili specifici per risoluzione 1920x1080 */
            .container {height: calc(100vh - 285px) !important;}
			}
		
@media (min-width: 1280px) and (max-width: 1280px) and (min-height: 1024px) {
            .container { height: calc(100vh - 285px) !important;}
			}
				
@media (min-width: 1366px) and (max-width: 1366px) and (min-height: 768px) {
            .container { height: calc(100vh - 285px) !important;}
			}		
		
        /* ============================================
           OTTIMIZZAZIONE PER TABLET APPLE E MONITOR 1280x1024
           ============================================ */

        /* iPad Pro 12.9" landscape: 1366x1024 e monitor 1280x1024 */
        @media (min-width: 1201px) and (max-width: 1400px) {
            .container {
                grid-template-columns: 280px 1fr 280px;
				height: calc(100vh - 0px);
				            }
            .sidebar, .sidebar-right {
                padding: 6px;
            }
            .sidebar h2, .sidebar-right h2 {
                font-size: 14px;
                margin-bottom: 8px;
            }
            .filter-group {
                margin-bottom: 8px;
            }
            .filter-group label {
                font-size: 10px;
            }
            select, input[type="range"], input[type="number"] {
                padding: 4px;
                font-size: 11px;
            }
            .stats-box {
                padding: 12px;
                margin-bottom: 12px;
            }
            .stat-row {
                font-size: 12px;
            }
            .stat-value {
                font-size: 13px;
            }
            .chart-box {
                padding: 12px;
            }
            .chart-box h3 {
                font-size: 13px;
                margin-bottom: 10px;
            }
        }

        /* iPad Air landscape: 1180x820 e iPad Pro 11" landscape: 1194x834 */
        @media (min-width: 1025px) and (max-width: 1200px) {
            .container {
                grid-template-columns: 260px 1fr 260px;
				height: calc(100vh - 285px);
            }
            .sidebar, .sidebar-right {
                padding: 5px;
            }
            .sidebar h2, .sidebar-right h2 {
                font-size: 13px;
                margin-bottom: 6px;
                padding-bottom: 6px;
            }
            .filter-group {
                margin-bottom: 7px;
            }
            .filter-group label {
                font-size: 9px;
                margin-bottom: 2px;
            }
            select, input[type="range"], input[type="number"] {
                padding: 3px;
                font-size: 10px;
            }
            .stats-box {
                padding: 10px;
                margin-bottom: 10px;
            }
            .stat-row {
                font-size: 11px;
                margin-bottom: 8px;
            }
            .stat-value {
                font-size: 12px;
            }
            .chart-box {
                padding: 10px;
                gap: 15px;
            }
            .chart-box h3 {
                font-size: 12px;
                margin-bottom: 8px;
                padding-bottom: 6px;
            }
            button {
                padding: 9px;
                font-size: 12px;
            }
			
			nav a {        font-size: 0.76rem;
        gap: 0.25rem;
        padding: 1rem 0.2rem; }

			nav a.active {
				color: #ff9900 !important;
				border-bottom-color: #ff9900 !important;
			}
        }

        /* iPad Mini landscape: 1024x768 e iPad standard landscape: 1024x768 */
        @media (min-width: 901px) and (max-width: 1024px) {
            header h2 {
                font-size: 16px;
            }
            header p {
                font-size: 12px;
            }
            .container {
                grid-template-columns: 240px 1fr 240px;
				height: calc(100vh - 270px);
            }
            .sidebar, .sidebar-right {
                padding: 4px;
            }
            .sidebar h2, .sidebar-right h2 {
                font-size: 12px;
                margin-bottom: 5px;
                padding-bottom: 5px;
            }
            .filter-group {
                margin-bottom: 6px;
            }
            .filter-group label {
                font-size: 9px;
                margin-bottom: 1px;
            }
            select, input[type="range"], input[type="number"] {
                padding: 3px;
                font-size: 10px;
            }
            .filter-info {
                font-size: 10px;
            }
            .stats-box {
                padding: 8px;
                margin-bottom: 8px;
            }
            .stat-row {
                font-size: 10px;
                margin-bottom: 6px;
            }
            .stat-value {
                font-size: 11px;
            }
            .chart-box {
                padding: 8px;
                gap: 12px;
            }
            .chart-box h3 {
                font-size: 11px;
                margin-bottom: 6px;
                padding-bottom: 5px;
            }
            .chart-wrapper {
                height: 200px;
            }
            button {
                padding: 8px;
                font-size: 11px;
            }
            .info-banner {
                padding: 8px;
                font-size: 10px;
            }
			nav a {font-size: 0.75rem; gap: 0.1rem;
    padding: 1rem 0.2rem;}

			nav a.active {
				color: #ff9900 !important;
				border-bottom-color: #ff9900 !important;
			}

	.project-banner h2 {
    font-size: 1rem; }
        }

        /* Breakpoint per risoluzioni inferiori - nasconde sidebar destra */
        @media (max-width: 900px) {
            .sidebar-right {
                display: none;
            }
        }
        @media (max-width: 1000px) {
            .container {
                grid-template-columns: 1fr;
                height: auto;
                gap: 0;
            }
            .sidebar, .sidebar-right {
                height: auto;
                max-height: none;
                border-radius: 0;
                box-shadow: 0 2px 8px rgba(0,0,0,0.1);
            }
            .sidebar-right {
                display: block;
            }
            .main {
                height: 500px;
            }
            #map {
                height: 100%;
            }
        }
        @media (max-width: 768px) {
            .container {
                padding: 0;
                gap: 0;
            }
            .main {
                height: 400px;
            }
            .modal-tree-details {
                max-width: 95%;
                width: 95%;
                max-height: 85vh;
            }
        }
        .no-data {
            padding: 40px;
            text-align: center;
            color: #999;
            font-size: 14px;
        }
        /* Pulsante Home mappa */
		.leaflet-bar a {color: #313131 !important;}
		
        .leaflet-control-home {
            background: white;
            border: 1px solid rgba(0,0,0,0.15);
            border-radius: 4px;
            width: 30px;
            height: 30px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-size: 16px;
            color: #333;
            transition: all 0.3s;
            box-shadow: 0 1px 5px rgba(0,0,0,0.15);
        }
        .leaflet-control-home:hover {
            background: #27ae60;
            color: white;
           /* border-color: #27ae60;*/
        }
        .leaflet-control-home i {
            pointer-events: none;
        }
        /* Stili personalizzati per popup mappa */
        .leaflet-popup-content-wrapper {
            border-radius: 8px;
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }
        .leaflet-popup-content {
            margin: 0;
            padding: 0;
        }
        .custom-popup .leaflet-popup-content-wrapper {
                padding: 5px 0px 5px 0px;
        }
        .custom-popup button:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(39, 174, 96, 0.4);
        }

        /* Stili personalizzati per tooltip mappa */
        .custom-tooltip {
            background: rgba(39, 174, 96, 0.95);
            border: 2px solid #1e8449;
            border-radius: 6px;
            color: white;
            font-size: 12px;
            font-weight: 600;
            padding: 6px 10px;
            box-shadow: 0 3px 10px rgba(0,0,0,0.3);
            white-space: nowrap;
        }
        .custom-tooltip::before {
            border-top-color: rgba(39, 174, 96, 0.95);
        }

        /* Timbro DEMO */
     /*   .demo-stamp {
            position: absolute;
            background-color: #e74c3c;
            color: white;
            font-weight: 700;
            font-size: 12px;
            padding: 10px 10px;
            transform: rotate(-30deg);
            z-index: 10000;
            box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
            border: 1px solid #c0392b;
            letter-spacing: 3px;
            opacity: 0.9;
        }

        .demo-stamp-header {
            top: 15px;
            right: 50%;
        }

        .demo-stamp-footer {
            position: relative;
            display: inline-block;
            margin: 10px 80%;
        }*/
		
		    .back-to-top {
        position: fixed;
        bottom: 120px;
        right: 30px;
        width: 50px;
        height: 50px;
        background: linear-gradient(135deg, #27ae60 0%, #1e8449 100%);
        color: white !important;
        border: none;
        border-radius: 50%;
        cursor: pointer;
        font-size: 20px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        z-index: 9999;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .back-to-top.show {
        opacity: 1;
        visibility: visible;
    }

    .back-to-top:hover {
        background: #ff9900 !important;
        transform: translateY(-5px);
        box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
    }

    .back-to-top:active {
        transform: translateY(-2px);
    }

    .back-to-top i {
        color: white !important;
    }

    @media (max-width: 768px) {
        .back-to-top {
            bottom: 20px;
            right: 20px;
            width: 45px;
            height: 45px;
            font-size: 18px;
        }
    }

    /* Tavole Grid - Four Column Layout */
    .tavole-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
        margin-top: 30px;
        padding: 20px 0;
    }

    .tavola-card {
        background: white;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        overflow: hidden;
        transition: all 0.3s ease;
        border: 1px solid #e0e0e0;
    }

    .tavola-card:hover {
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
    }

    .tavola-image-link {
        display: block;
        text-decoration: none;
    }

    .tavola-image {
        width: 100%;
        height: 250px;
        overflow: hidden;
        background: #f5f5f5;
        position: relative;
    }

    .tavola-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.3s ease;
    }

    .image-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(39, 174, 96, 0.35);
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .image-overlay i {
        color: white;
        font-size: 48px;
        transform: scale(0.8);
        transition: transform 0.3s ease;
    }

    .tavola-card:hover .tavola-image img {
        transform: scale(1.1);
    }

    .tavola-card:hover .image-overlay {
        opacity: 1;
    }

    .tavola-card:hover .image-overlay i {
        transform: scale(1);
    }

    .tavola-info {
        padding: 20px;
    }

    .tavola-info p {
        color: #666;
        font-size: 12px;
        margin-bottom: 5px;
        margin-top: 0;
    }

    .tavola-info h3 {
        color: #313131;
        font-size: 18px;
        margin-bottom: 15px;
        margin-top: 0;
        font-weight: 600;
    }

    .btn-download {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 10px 20px;
        background: #27ae60;
        color: white;
        text-decoration: none;
        border-radius: 6px;
        font-size: 14px;
        font-weight: 600;
        transition: all 0.3s ease;
    }

    .btn-download:hover {
        background: #1e8449;
        /*transform: translateY(-2px);*/
        box-shadow: 0 4px 12px rgba(39, 174, 96, 0.3);
    }

    .btn-download i {
        font-size: 16px;
    }

    /* Responsive Layout */
    @media (max-width: 1400px) {
        .tavole-grid {
            grid-template-columns: repeat(3, 1fr);
            gap: 25px;
        }
    }

    @media (max-width: 1024px) {
        .tavole-grid {
            grid-template-columns: repeat(2, 1fr);
            gap: 20px;
        }

        .tavola-image {
            height: 220px;
        }
    }

    @media (max-width: 768px) {
        .tavole-grid {
            grid-template-columns: 1fr;
            gap: 20px;
        }

        .tavola-image {
            height: 200px;
        }

        .tavola-info {
            padding: 15px;
        }

        .image-overlay i {
            font-size: 40px;
        }
    }
