       @font-face {
            font-family: 'Gilroy';
            src: url('fonts/gilroy/Gilroy-Regular.ttf') format('truetype');
        }
        @font-face {
            font-family: 'Gilroy';
            src: url('fonts/gilroy/Gilroy-Bold.ttf') format('truetype');
            font-weight: bold;
        }
        @font-face {
            font-family: 'Gilroy';
            src: url('fonts/gilroy/Gilroy-Medium.ttf') format('truetype');
            font-weight: 500;
        }

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

        body {
            font-family: 'Gilroy', sans-serif;
        }

        .container {
            max-width: 1400px;
            margin: 20px auto;
            padding: 0 15px;
            overflow: hidden;
        }

        /* Calendar Layout improvements */
        .calendar-container {
            position: relative;
            border: 1px solid #ccc;
            margin: 20px 0;
            overflow: hidden;
        }


        .calendar-scroll-container {
            -webkit-overflow-scrolling: touch;
            overflow-x: auto;
            overflow-y: hidden; /* Impedisce lo scroll verticale */
            margin-left: 120px;
            position: relative;
            scrollbar-width: thin; /* Per Firefox */
            scrollbar-color: #888 #f1f1f1; /* Colore scrollbar */
            border: 1px solid #ddd; /* Aggiunge un bordo sottile per renderlo sempre visibile */
        }

        .calendar-header {
            display: flex;
            position: relative;
            background: #f5f5f5;
        }

        .plate-header {
            position: absolute;
            left: 0;
            width: 120px;
            background: #2196F3;
            color: #fff;
            padding: 5px;
            text-align: center;
            font-weight: bold;
            border-right: 1px solid #ccc;
            z-index: 900;
            height: 40px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .time-header {
            flex: 1;
            display: flex;
            position: relative;
            height: 40px;
            background: #f5f5f5;
            min-width: 1440px; /* 24 hours * 60px minimum width */
            margin-left: 120px;
        }

        .hour-marker {
            position: absolute;
            width: 1px;
            height: 100%;
            background: #ccc;
            z-index: 1;
        }

        .hour-label {
            position: absolute;
            font-size: 11px;
            top: 5px;
            margin-left: -20px;
            width: 40px;
            text-align: center;
        }

        .half-hour-marker {
            position: absolute;
            width: 1px;
            height: 50%;
            background: #eee;
            bottom: 0;
        }

        .calendar-body {
            position: relative;
            min-width: 1440px;
        }

        .vehicle-row {
            display: flex;
            border-bottom: 1px solid #eee;
            height: 50px;
            position: relative;
        }

        .calendar-wrapper {
            position: relative;
            overflow: hidden;
        }

        .plate-cell {
            position: absolute;
            left: 0;
            width: 120px;
            padding: 5px;
            background: #f8f9fa;
            border-right: 1px solid #ccc;
            text-align: center;
            line-height: 40px;
            font-weight: bold;
            z-index: 900;
            height: 50px;
            border-bottom: 1px solid #ccc;
        }

        .timeline-cell {
            flex: 1;
            position: relative;
            margin-left: 120px;
            background: linear-gradient(to right,
                #eee 0px,  /* Linea all'inizio */
                #eee 1px,  /* Spessore linea */
                transparent 1px,
                transparent calc(100% / 24)
            );
            background-size: calc(100% / 24) 100%; /* 24 colonne per le ore */
            min-width: 1440px;
        }

        /* Stile per le mezze ore */
        .half-hour-marker {
            position: absolute;
            width: 1px;
            height: 50%;
            background: #eee;
            bottom: 0;
        }

        .service-block {
            position: absolute;
            height: 40px;
            border-radius: 4px;
            color: white;
            font-size: 12px;
            padding: 4px;
            cursor: move;
            z-index: 10;
            box-sizing: border-box;
            box-shadow: 0 2px 4px rgba(0,0,0,0.2);
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
            top: 5px;
        }

        .service-block-remove {
            position: absolute;
            top: 2px;
            right: 2px;
            width: 20px;
            height: 20px;
            background-color: red;
            color: white;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-weight: bold;
            line-height: 1;
            z-index: 10;
            opacity: 0;
            /*transition: opacity 0.2s;*/
        }

        .service-block-remove {
            opacity: 1;
        }

        /* Services List Improvements */
        .services-list {
            margin-top: 20px;
            padding: 15px;
            background: #f8f9fa;
            border: 1px solid #ddd;
            border-radius: 4px;
            overflow-x: auto;
        }

        .services-header {
            display: grid;
            grid-template-columns: 60px 30px 1fr 1fr 60px 60px 100px 80px 80px 80px 30px;
            gap: 10px;
            padding: 10px;
            font-weight: bold;
            background: #e9ecef;
            border-radius: 4px;
            margin-bottom: 10px;
            position: sticky;
            top: 0;
            z-index: 10;
        }

        .service-item {
            display: grid;
            grid-template-columns: 60px 30px 1fr 1fr 60px 60px 100px 80px 80px 80px 30px;
            gap: 10px;
            padding: 10px;
            background: white;
            border: 1px solid #ddd;
            border-radius: 4px;
            margin: 5px 0;
            align-items: center;
        }

        .service-color-indicator {
            width: 20px;
            height: 20px;
            border-radius: 50%;
            margin: auto;
            border: 2px solid #fff;
            box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
        }

        .service-item.assigned {
            background-color: #2196F3;
            color: white;
        }

        .service-item.assigned a {
            color: white;
        }
    

        .service-item.assigned .service-color-indicator {
            border-color: rgba(255,255,255,0.8);
        }

        /* Navigation Improvements */
        .navigation {
            display: flex;
            justify-content: center;
            gap: 20px;
            align-items: center;
            margin: 20px 0;
            flex-wrap: wrap;
        }

        .current-date {
            font-size: 1.2em;
            font-weight: bold;
            padding: 10px 20px;
            background: white;
            border-radius: 4px;
            box-shadow: 0 1px 3px rgba(0,0,0,0.1);
        }

        button {
            padding: 8px 16px;
            background: #007bff;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            transition: background-color 0.2s;
        }

        button:hover {
            background: #0056b3;
        }

        /* Responsive Design */
        @media (max-width: 992px) {
            :root {
                --plate-width: 80px;  /* Nuova variabile per gestire la larghezza in mobile */
            }

            .container {
                padding: 10px;
                margin: 10px auto;
            }

            .fixed-column {
                width: var(--plate-width);
            }

            .plate-header {
                width: var(--plate-width);
            }

            .plate-cell {
                width: var(--plate-width);
            }

            .calendar-scroll-container {
                margin-left: var(--plate-width);
            }

            .time-header {
                margin-left: var(--plate-width);
            }

            .timeline-cell {
                margin-left: var(--plate-width);
                min-width: 1440px;
                background: linear-gradient(to right,
                    #eee 0px,
                    #eee 1px,
                    transparent 1px,
                    transparent calc(100% / 24)
                );
                background-size: calc(100% / 24) 100%;
            }

            .services-header,
            .service-item {
                grid-template-columns: 30px 1fr 1fr;
            }

            .services-header > div:nth-child(n+6):not(:last-child),
                .service-item > div:nth-child(n+6):not(:last-child) {
                 display: none;
                }

            .navigation {
                flex-direction: column;
            }

            .current-date {
                order: -1;
              /*  width: 100%;
                text-align: center;
                */
            }

            button {
                width: 100%;
            }
        }

        /* Stili per il form del nuovo servizio */
        .add-service-btn {
            background-color: #28a745;
            color: white;
            border: none;
            padding: 8px 16px;
            border-radius: 4px;
            cursor: pointer;
            transition: background-color 0.2s;
        }

        .add-service-btn:hover {
            background-color: #218838;
        }

        .service-form {
            display: flex;
            flex-direction: column;
            gap: 20px;
        }

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

        .form-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
        }

        .form-group label {
            font-weight: 500;
            color: #212529;
        }

        .form-group input {
            padding: 8px 12px;
            border: 1px solid #ced4da;
            border-radius: 4px;
            font-size: 14px;
        }

        .form-group input:focus {
            border-color: #80bdff;
            outline: 0;
            box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
        }

        .form-actions {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            margin-top: 10px;
        }

        .btn-primary {
            background-color: #007bff;
            color: white;
            border: none;
            padding: 8px 16px;
            border-radius: 4px;
            cursor: pointer;
            transition: background-color 0.2s;
        }

        .btn-primary:hover {
            background-color: #0056b3;
        }

        .btn-secondary {
            background-color: #6c757d;
            color: white;
            border: none;
            padding: 8px 16px;
            border-radius: 4px;
            cursor: pointer;
            transition: background-color 0.2s;
        }

        .btn-secondary:hover {
            background-color: #5a6268;
        }

        /* Responsive del form */
        @media (max-width: 992px) {
            .form-row {
                grid-template-columns: 1fr;
                gap: 10px;
                width:100%;
            }
            .form-group{
                width:100%;
            }
        }
        .modal {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background-color: rgba(0,0,0,0.5);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 2000;
        }

        .modal-content {
            background-color: white;
            padding: 0;
            border-radius: 8px;
            width: 90%;
            max-width: 500px;
            box-shadow: 0 4px 6px rgba(0,0,0,0.1);
        }

        .modal-header {
            padding: 15px 20px;
            background-color: #f8f9fa;
            border-bottom: 1px solid #dee2e6;
            border-radius: 8px 8px 0 0;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .modal-header h3 {
            margin: 0;
            color: #fff;
        }

        .close-modal {
            font-size: 24px;
            font-weight: bold;
            color: #6c757d;
            cursor: pointer;
            padding: 0 5px;
        }

        .close-modal:hover {
            color: #212529;
        }

        .modal-body {
            padding: 20px;
        }

        .driver-item {
            display: flex;
            align-items: center;
            padding: 10px;
            border: 1px solid #dee2e6;
            border-radius: 4px;
            margin-bottom: 10px;
            background-color: #fff;
        }

        .driver-item:last-child {
            margin-bottom: 0;
        }

        .driver-avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            background-color: #e9ecef;
            margin-right: 15px;
            display: flex;
            align-items: center;
            justify-content: center;
            color: #6c757d;
            font-weight: bold;
        }

        .driver-info {
            flex: 1;
        }

        .driver-info h4 {
            margin: 0 0 5px 0;
            color: #212529;
        }

        .driver-info p {
            margin: 0;
            color: #6c757d;
            font-size: 14px;
        }

        .no-drivers {
            text-align: center;
            padding: 20px;
            color: #6c757d;
        }

        .plate-cell {
            cursor: pointer;
            transition: background-color 0.2s;
        }

        .plate-cell:hover {
            background-color: #e9ecef;
        }
        .add-service-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.add-service-btn:hover {
    background-color: #218838;
}

.mobile-btn {
    display: none;
    padding: 8px;
}

@media (max-width: 992px) {
    .desktop-btn {
        display: none;
    }

    .mobile-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        z-index: 1000;
        box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    }
}
.services-header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.services-header-container h3 {
    margin-bottom: 0; /* Rimuove il margine inferiore per un allineamento perfetto */
}

.services-header-actions {
    display: flex;
    align-items: center;
}

.desktop-btn {
    margin-left: 15px; /* Aggiunge un po' di spazio tra il titolo e il bottone */
}

@media (max-width: 992px) {
    .indirizzo-responsive{
        margin-left: 30px;
        margin-right: 30px;
    }
    .services-header-container {
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 0px;
    }

    .services-header-container h3 {
        margin-bottom: 10px;
        text-align: center;
    }

    .services-header-actions {
        justify-content: center;
    }

    .desktop-btn {
        margin-left: 0;
        width: 100%;
    }

    .mobile-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        position: fixed;
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        border-radius: 50%;
        z-index: 1000;
        box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    }

    .resp{
        width: 100%;
    }
}
button{
    font-family: 'Gilroy';
    background-color:#2196F3;
}
input, textarea, select {
    font-family: 'Gilroy', sans-serif;
}
const additionalModalStyle = `
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    max-height: 80%;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #e9ecef;
}

.modal-header h3 {
    margin: 0;
}

.close-modal {
    cursor: pointer;
    font-size: 24px;
    color: #6c757d;
}

.modal-body {
    padding: 15px;
}

.service-actions {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
    gap: 10px;
}

.btn-primary, .btn-secondary {
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-primary {
    background-color: #007bff;
    color: white;
}

.btn-secondary {
    background-color: #6c757d;
    color: white;
}
`;

.service-item {
    cursor: pointer;
}
.pac-container {
    z-index: 10000;
}
.service-item .service-modifica {
            color:#ffbe5f;
            margin-left: 10px;
            margin-top: 5px;
            top: 125px;
        }
.service-item .service-primanota{
    color:#532e06;
    margin-left: 7px;
    margin-bottom: 5px;
        }
        .editable {
    position: relative;
    padding-right: 30px;
}

.edit-icon, .save-icon {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
}

.editable input, .editable select {
    width: 100%;
    padding: 5px;
    margin-right: 25px;
}

#drivers-list .editable {
    margin-bottom: 10px;
}

#add-driver {
    margin-top: 10px;
}
.editable, .editable-driver {
    position: relative;
    padding-right: 30px;
}

.edit-icon, .save-icon {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
}

.editable input, .editable select, .editable-driver input {
    width: 100%;
    padding: 5px;
    margin-right: 25px;
}

#drivers-list .editable-driver {
    margin-bottom: 10px;
}

#add-driver {
    margin-top: 10px;
}
.editable-passenger {
    position: relative;
    padding-right: 30px;
    margin-bottom: 10px;
}

#other-passengers-list {
    margin-bottom: 10px;
}

#add-passenger {
    margin-top: 10px;
}
/* Aggiungi questo al tuo CSS esistente */
.pac-container {
    z-index: 10000 !important;
    position: fixed !important;
    background-color: white;
    border: 1px solid #ccc;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* Assicuriamoci che il modal non copra i suggerimenti */
.modal {
    z-index: 9000;
}

.modal-content {
    position: relative;
    z-index: 9001;
}
.editable {
    position: relative;
    padding-right: 30px;
}

.edit-icon, .save-icon {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
}

.edit-icon:hover, .save-icon:hover {
    color: #333;
}

.editable input {
    width: 100%;
    padding: 5px;
    margin-right: 25px;
}

.detail-grid {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 10px;
    margin-bottom: 20px;
}

.detail-label {
    font-weight: bold;
    color: #666;
}
/* Desktop view */
.service-item {
    display: grid;
    grid-template-columns: 70px 20px 1fr 1fr 60px 60px 100px 80px 80px 80px 30px;
    gap: 5px;
    padding: 10px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    margin: 5px 0;
    align-items: center;
}

.service-item a {
    color: black;
}

.service-color-indicator {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    margin: auto;
    border: 2px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
}

.service-modifica {
    color: #ffbe5f;
    cursor: pointer;
    text-align: center;
}

.service-primanota{
    cursor: pointer;
    text-align: center;
}

/* Nascondi elementi mobile in desktop */
.mobile-details {
    display: none;
}

/* Mobile view */
@media (max-width: 992px) {
    .services-header{
        display:none;
    }
    .service-item {
        display: flex;
        align-items: center;
        padding: 15px;
        border-radius: 15px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        margin-bottom: 15px;
    }

    /* Nascondi tutti gli elementi desktop eccetto color indicator e modifica */
    .service-item > div:not(.service-color-indicator):not(.service-modifica):not(.mobile-details):not(.service-primanota) {
        display: none;
    }

    /* Mostra gli elementi mobile */
    .mobile-details {
        display: block;
        flex: 1;
        text-align: center;
        margin-right: 50px;
    }

    .service-line {
        margin: 8px 0;
        border-bottom: 1px solid #ffffff42;
    }

    .service-color-indicator {
        margin-right: 20px;
        margin-top: 3px;
    }

    .service-modifica {
        right: 20px;
        /*margin-top: -90px;*/
        position: absolute;
    }
    .create-return{
        right: 20px;
        /*margin-top: -90px;*/
        top: 160px;
        position: absolute;     
    }
    .condividi{
        right: 20px;
        /*margin-top: -90px;*/
        top: 190px;
        position: absolute;     
    }
    .service-primanota{
        right: 25px;
        top: 100px;
        position: absolute;  
    }
}

.draggable-item {
    touch-action: none;
    cursor: move;
}

.drag-helper {
    position: fixed !important;
    pointer-events: none;
}

@media (max-width: 992px) {
    .ui-draggable-dragging {
        display: block !important;
    }
    
    .dragging {
        opacity: 0.5;
    }
}
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    display: none;
    z-index: 2000;
 }
 
 .modal-content {
    position: relative;
    background-color: white;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    margin: 40px auto;
    max-height: 90vh;
    overflow-y: auto;
 }
 
 .modal-header {
    padding: 15px 20px;
    border-bottom: 1px solid #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: #1271bf;
    z-index: 1;
 }
 
 .modal-body {
    padding: 20px;
 }
 
 .service-detail-section {
    margin-bottom: 30px;
 }
 
 .detail-grid {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 15px;
    margin-top: 15px;
    min-height:40px;
 }
 .detail-grid > * {
    border-bottom: 1px solid #cccccc93; /* Bordino sottile */
    padding-bottom: 5px;          /* Spaziatura per separare il contenuto dal bordino */
}
.detail-grid > *:last-child {
   /* border-bottom: none; *//* Rimuove il bordo per l'ultima riga */
}



 .detail-label {
    font-weight: bold;
    color: #666;
    padding-right: 15px;
    align-content: center;
 }
 
 .detail-value {
    position: relative;
 }
 
 .editable {
    position: relative;
    padding-right: 30px;
    min-height: 30px;
 }
 
 .edit-icon, .save-icon {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #666;
 }
 
 .editable input, .editable select {
    width: 100%;
    padding: 5px;
    margin-right: 25px;
 }
 
 .service-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 30px;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
 }
 
 .document-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    margin-bottom: 10px;
 }
 
 .document-actions {
    display: flex;
    gap: 5px;
 }
 
 .btn-primary, .btn-secondary {
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s;
 }
 
 .btn-primary {
    background-color: #007bff;
    color: white;
 }
 
 .btn-secondary {
    background-color: #6c757d;
    color: white;
 }
 
 .btn-danger {
    background-color: #dc3545;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
 }
 
 .close-modal {
    cursor: pointer;
    font-size: 24px;
    color: #fff;
 }
 
 .editable-passenger, .editable-driver {
    position: relative;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
 }
 
 #other-passengers-list, #drivers-list {
    margin-bottom: 15px;
 }
 
 .upload-section {
    margin-top: 15px;
 }
 
 input[type="file"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #e9ecef;
    border-radius: 4px;
 }
 
 h4 {
    color: #1271bf;
    margin-bottom: 15px;
    background-color: #efecec;
    padding: 10px;
 }
 
 h5 {
    color: #666;
    margin-bottom: 10px;
 }
 .add-vehicle-icon{
    margin-left:20px;
}
 
 @media (max-width: 992px) {
    .modal-content {
        width: 95%;
        margin: 20px auto;
    }
    .add-vehicle-icon{
        margin-left:0px;
    }
 
    .detail-grid {
        grid-template-columns: 1fr;
        gap: 10px;
        min-height:40px;
    }
 
    .service-actions {
        flex-direction: column;
    }
 
    .service-actions button {
        width: 100%;
        padding: 12px;
        font-size: 16px;
    }
 }
 .driver-select-container {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

.driver-dropdown {
    flex: 1;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.editable-driver {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px;
    margin: 5px 0;
    background-color: #f8f9fa;
    border-radius: 4px;
}

.remove-driver {
    color: #dc3545;
    cursor: pointer;
}

.remove-driver:hover {
    color: #c82333;
}
.vehicle-dropdown {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}

.vehicle-dropdown:focus {
    outline: none;
    border-color: #2196f3;
}

.detail-value select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
}
/*==========*/
.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
}

.form-group.full-width {
    width: 100%;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.modal-content {
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
}

/* Stile per i campi richiesti */
label::after {
    content: '*';
    color: red;
    margin-left: 3px;
}

label:not([for="vehicleBrand"])::after,
label:not([for="vehicleModel"])::after,
label:not([for="driverEmail"])::after,
label:not([for="driverUsername"])::after,
label:not([for="driverAlias"])::after,
label:not([for="driverPhone"])::after {
    content: '';
}
/* Aggiungi questi stili CSS */
@media (max-width: 992px) {
    .modal-content {
        width: 95%;
        margin: 20px auto;
        max-height: 90vh;
        overflow-y: auto;
    }

    .form-row {
        flex-direction: column;
        gap: 10px;
        margin-bottom: 10px;
    }

    .form-group {
        width: 100%;
    }

    .select-existing {
        margin-bottom: 20px;
    }

    .form-actions {
        display: flex;
        flex-direction: column;
        gap: 10px;
    }

    .form-actions button {
        width: 100%;
        padding: 12px;
        font-size: 16px;
    }

    /* Aumenta la dimensione degli input per il touch */
    input, select, textarea {
        padding: 12px;
        font-size: 16px;
        min-height: 44px; /* Dimensione minima per target touch */
    }

    textarea {
        min-height: 80px;
    }

    /* Rendi le label più visibili */
    label {
        font-size: 14px;
        margin-bottom: 5px;
        display: block;
    }

    /* Aggiusta lo spacing del contenuto */
    .modal-body {
        padding: 15px;
    }

    .modal-header {
        padding: 15px;
    }

    /* Migliora la visibilità della X di chiusura */
    .close-modal {
        font-size: 24px;
        padding: 10px;
    }

    /* Stile per il select degli autisti esistenti */
    #existingDriverSelect {
        width: 100%;
        padding: 12px;
        font-size: 16px;
    }
}

/* Aggiungi anche questi stili generali se non li hai già */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    /*padding: 20px;*/
    box-sizing: border-box;
    z-index: 3000;
}

.modal-content {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 800px;
}

/* Stili per impedire lo scroll del body quando il modal è aperto */
body.modal-open {
    overflow: hidden;
}
.calendar-scroll-container {
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch; /* Per iOS */
}

/* Per dispositivi touch */
@media (hover: none) {
    .calendar-scroll-container {
        scroll-snap-type: x mandatory;
    }

    .timeline-cell {
        scroll-snap-align: start;
    }
}
/* Aggiungi questo nel tuo CSS, meglio se in una sezione @media per mobile */
@media (max-width: 992px) {
    .mobile-drag-handle {
        display: block !important;
        position: absolute;
        left: 10px;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
        color: #888;
        width: 30px;
        height: 30px;
        background-color: rgba(0,0,0,0.1);
        text-align: center;
        line-height: 30px;
        border-radius: 50%;
    }
    
    .service-item {
        position: relative;
        color: black;
    }
}
#servicesList{
    overflow-x: auto;
   /* height: 350px;*/
}
/* Stile generale per tutte le scrollbar */
::-webkit-scrollbar {
    width: 8px; /* Larghezza della scrollbar verticale */
    height: 8px; /* Altezza della scrollbar orizzontale */
    background: transparent; /* Sfondo trasparente */
}

/* Colore della barra di scorrimento (il "thumb") */
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0); /* Colore semi-trasparente */
    border-radius: 4px; /* Arrotondamento degli angoli */
}

/* Colore della barra al passaggio del mouse */
::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0); /* Più visibile quando si passa il mouse */
}

/* Sfondo del "track" (la parte dietro il thumb) */
::-webkit-scrollbar-track {
    background: transparent; /* Mantieni il track trasparente */
}

/* Scrollbar per Firefox */
* {
    scrollbar-width: thin; /* Riduce la larghezza */
    scrollbar-color: rgba(255, 255, 255, 0) transparent; /* Colore thumb e track */
}

.timeline-cell {
    position: relative;
    height: 100%;
}

.service-block {
    position: absolute;
    height: 50px;
    z-index: 10;
    transition: all 0.3s ease;
}

.vehicle-row {
    transition: height 0.3s ease;
}

.plate-cell {
    transition: height 0.3s ease;
}
/* ----------------------- STILE PER GRIGLIA NUOVA */

.plate-text {
    font-weight: bold;
    font-size: 1em;
}

.supplier-text {
    font-size: 0.8em;
    color: #2196f3;
    margin-top: -25px;
}
@media (max-width: 992px) {
    .supplier-text {
        font-size: 0.6em;
        color: #2196f3;
        margin-top: -25px;
    }

}

.service-item.non-grid-vehicle {
    background-color: #b38945; /* Sfondo leggermente arancione */
    border-left: 4px solid #FF9800; /* Bordo arancione per enfatizzare */
}

.service-item.non-grid-vehicle .service-color-indicator {
    background-color: #FF9800 !important; /* Colore arancione per l'indicatore */
}
.service-block.non-grid-vehicle {
    background-color: #b38945 !important; /* Colore arancione */
    opacity: 0.7; /* Leggermente trasparente */
    border-left: 3px solid #FF5722; /* Bordo rosso arancione */
}

.mobile-vehicle-btn,
.mobile-driver-btn,
.mobile-vehicle-filter-btn,
.mobile-driver-filter-btn {
    display: none;
}

@media (max-width: 992px) {
    .mobile-vehicle-btn,
    .mobile-driver-btn,
    .mobile-vehicle-filter-btn,
    .mobile-driver-filter-btn {
        display: inline-block;
    }
}
/*''''''''''''''''''''''''''''''''''*/
.preventivi-esistenti {
    margin-bottom: 2rem;
}

.section-title {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: #1271bf;
}

.preventivi-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.preventivo-item {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.preventivo-details {
    margin-bottom: 1rem;
}

.preventivo-row {
    margin-bottom: 0.5rem;
}

.label {
    font-weight: bold;
    color: #555;
    margin-right: 0.5rem;
}

.value {
    color: #333;
}

.preventivo-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.edit-preventive {
    color: #007bff;
}

.delete-preventive {
    color: #dc3545;
}

.btn-icon:hover {
    background-color: rgba(0,0,0,0.1);
}

@media (min-width: 993px) {
    .preventivi-list {
        display: table;
        width: 100%;
        border-collapse: separate;
        border-spacing: 0 0.5rem;
    }

    .preventivo-item {
        display: table-row;
    }

    .preventivo-details, .preventivo-actions {
        display: table-cell;
        vertical-align: middle;
        padding: 1rem;
    }

    .preventivo-row {
        display: inline-block;
        margin-right: 1rem;
    }
}

#preventiveListContainer {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-top: 15px;
}

#preventiveListContainer table {
    width: 100%;
    border-collapse: collapse;
}

#preventiveListContainer table thead {
    background-color: #f1f1f1;
    position: sticky;
    top: 0;
    z-index: 10;
}

#preventiveListContainer table th,
#preventiveListContainer table td {
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
    text-align: left;
}

#preventiveListContainer table th {
    font-weight: 600;
    color: #333;
}

#preventiveListContainer table tr:hover {
    background-color: #f5f5f5;
}

#preventiveListContainer .load-price-btn {
    background-color: #2196f3;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

#preventiveListContainer .load-price-btn:hover {
    background-color: #1976d2;
}

#preventiveSearchInput {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}
@media (max-width: 992px) {
    #preventiveListContainer table td {
        font-size: 0.8rem;
    }
}
/*oouoiuiuouoiuiuiouiouiouiouoiuiouoiuoiuouiuo*/
.preventivo-checkbox{
    padding: 20px;
}

.preventivi-actions-footer{
    text-align: center;
    padding: 10px;
}



.calendar-navigation {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
}

.scroll-btn {
    display: none; /* Nascosti di default su desktop */
    position: absolute;
    z-index: 1000;
    background: rgba(33, 150, 243, 0.9);
    border: none;
    color: white;
    width: 30px;
    height: 60px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.scroll-left {
    left: 0;
}

.scroll-right {
    right: 0;
}

/* Mostra i pulsanti solo su mobile */
@media (max-width: 992px) {
    .scroll-btn {
        display: flex;
        bottom: 2px;
        height: 30px;
        border-radius: 50%;
    }
    
    /* Aggiungi padding ai lati del container per non nascondere contenuto sotto i bottoni */
    .calendar-scroll-container {
        padding: 0 35px;
    }
}

/* Stili per i pulsanti quando sono disabilitati */
.scroll-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.preventive-tabs .tab-header {
    display: flex;
    border-bottom: 1px solid #ddd;
    margin-bottom: 15px;
}

.preventive-tabs .tab-button {
    flex-grow: 1;
    padding: 10px;
    background-color: #f1f1f1;
    color: #2196f3;
    border: none;
    outline: none;
    cursor: pointer;
    transition: background-color 0.3s;
}

.preventive-tabs .tab-button.active {
    background-color: #2196f3;
    color: white;
}

.preventive-tabs .tab-button:hover {
    background-color: #ddd;
    color: #2196f3;
}

.tab-pane {
    display: none;
}

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

/*------------------------ CSS SOTTOMENU ----------------*/
.desktop-menu-item:hover {
    color: #1166ac; /* Cambia colore al hover */
}

/* Dropdown */
.dropdown {
    position: relative;
}
.dropdown-toggle::after {
    /*
    content: ' ▼';
    font-size: 12px;
    text-align: right;
    */
}
.dropdown-toggle{
    color: white;
    text-decoration: none;
}

.dropdown-menu {
    display: none; /* Nasconde il menu */
    position: absolute;
    top: 100%; /* Mostra il menu sotto */
    left: 0;
    background: #2196f3;
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.dropdown-menus {
    display: none; /* Nasconde il menu */
    top: 100%; /* Mostra il menu sotto */
    left: 0;
    background: #2196f3;
    padding: 10px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    z-index: 10;
}
.dropdown-item {
    color: white;
    text-decoration: none;
    font-size: 14px;
    padding: 10px 20px;
    display: block;
    transition: background 0.1s ease;
    border-bottom: 1px solid #dddddd36;
}
.dropdown-item:hover {
    background: #1166ac; /* Sfondo al hover */
}

/* Garantire la visibilità quando viene attivato */
.side-menu .dropdown-menus[style*="display: block"] {
    display: block !important;
}
/*------------ FINE CSS SOTTOMENU ----------------------*/
.switch {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    background-color: #28a745;
    transition: .4s;
    border-radius: 34px;
    cursor: pointer;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #dc3545;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.switch-text {
    font-weight: bold;
}

.dare{
    background-color: #94e894;
    padding: 20px;
    color: #4c4c4c;
}
.avere{
    background-color: #ff9a9a;
    padding: 20px;
    color: #4c4c4c;
}

/*----------------------------------- PRIMA NOTA GENERALE--------------*/
#primaNotaGeneraleModal .modal-content {
    width: 100%;
    max-width: 1400px;
    /*margin: 20px auto;*/
    margin: 0px 0px 0px 0px;
    max-height: 100vh;
}


.new-entry-form {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.filters {
    background-color: #fff;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #dee2e6;
}

.table-responsive {
    margin-top: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    overflow-y: auto;
}

.table {
    margin-bottom: 0;
}

.table th {
    background-color: #f8f9fa;
    border-top: none;
}

.table td, .table th {
    vertical-align: middle;
    padding: 12px 15px;
}

.text-right {
    text-align: right;
}

.form-control {
    height: calc(2.5rem + 2px);
    padding: .375rem .75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 4px;
    transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}

.form-control:focus {
    color: #495057;
    background-color: #fff;
    border-color: #80bdff;
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(0,123,255,.25);
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.col-md-1, .col-md-2, .col-md-3, .col-md-4 {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

@media (min-width: 768px) {
    .col-md-1 {
        flex: 0 0 8.333333%;
        max-width: 8.333333%;
    }
    .col-md-2 {
        flex: 0 0 16.666667%;
        max-width: 16.666667%;
    }
    .col-md-3 {
        flex: 0 0 25%;
        max-width: 25%;
    }
    .col-md-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

label {
    display: inline-block;
    margin-bottom: .5rem;
    font-weight: 500;
    color: #495057;
}

.btn {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    vertical-align: middle;
    cursor: pointer;
    padding: .375rem .75rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: .25rem;
    transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}

.btn-primary {
    color: #fff;
    background-color: #007bff;
    border-color: #007bff;
}

.btn-primary:hover {
    background-color: #0069d9;
    border-color: #0062cc;
}

.btn-danger {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

.btn-sm {
    padding: .25rem .5rem;
    font-size: .875rem;
    line-height: 1.5;
    border-radius: .2rem;
    width: 100%;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.p-3 {
    padding: 1rem;
}

tfoot tr {
    background-color: #f8f9fa;
    font-weight: bold;
}

tfoot td, tfoot th {
    border-top: 2px solid #dee2e6;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(0,0,0,.05);
}

.table-hover tbody tr:hover {
    background-color: rgba(0,0,0,.075);
}
.primanota-section {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.primanota-filter-section {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.primanota-form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.primanota-form-group {
    flex: 1;
    min-width: 150px;
    margin-bottom: 10px;
}

.primanota-form-group-large {
    flex: 2;
    min-width: 200px;
}

.primanota-form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.primanota-form-group input,
.primanota-form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ced4da;
    border-radius: 4px;
    font-size: 14px;
}

.primanota-button-group {
    display: flex;
    align-items: flex-end;
    min-width: 100px;
    flex: 0 0 auto;
}

.primanota-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    width: 100%;
}

.primanota-btn:hover {
    background-color: #0056b3;
}

@media (max-width: 768px) {
    .primanota-form-row {
        flex-direction: column;
        gap: 10px;
    }

    .primanota-form-group,
    .primanota-form-group-large {
        width: 100%;
        flex: none;
    }

    .primanota-button-group {
        width: 100%;
        margin-top: 10px;
    }
}

@media (min-width: 769px) and (max-width: 1200px) {
    .primanota-form-group {
        min-width: calc(33.333% - 15px);
    }
}

.filter-option:hover {
    background-color: #f5f5f5;
}

.supplier-filter-dropdown {
    background-color: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.filter-header {
    display: flex;
    align-items: center;
    gap: 5px;
    justify-content: center;
}

#estrattoContoClientiModal .modal-content {
    width: 100%;
    max-width: 1400px;
    /*margin: 20px auto;*/
    margin: 0px 0px 0px 0px;
    max-height: 100vh;
}

.estratto-conti-filter-section {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}
