body {
    background-color: #f4f7f6;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.navbar {
    background-color: #ffffff;
    border-bottom: 3px solid #007bff;
}

.main-container {
    background-color: #ffffff;
    padding: 25px;
    margin-top: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.filter-bar {
    background-color: #e9ecef;
    padding: 15px;
    border-radius: 5px;
    margin-bottom: 20px;
}

/* Come da tua richiesta, non c'è l'etichetta "Filtri:" */
/* E l'etichetta per la data è "da:" */

.table th {
    background-color: #007bff;
    color: white;
    font-weight: 600;
}

.table td, .table th {
    vertical-align: middle;
}

.table-responsive {
    max-height: 65vh; /* Limita l'altezza per lo scorrimento verticale */
    overflow: auto;   /* Abilita lo scorrimento (orizzontale e verticale) quando necessario */
}

/* Colori righe in base allo stato */
.table-row-scaduta {
    background-color: #f8d7da !important; /* Rosso */
    font-weight: bold;
}

.table-row-in-scadenza {
    background-color: #fff3cd !important; /* Giallo */
}

/* Icone per le azioni */
.azione-icon {
    cursor: pointer;
    margin: 0 5px;
    font-size: 1.2rem;
}

.azione-icon.edit-icon {
    color: #ffc107;
}

.azione-icon.edit-icon[data-type="cliente"] {
    color: #0d6efd; /* Blu per modifica cliente */
}

.azione-icon.delete-icon {
    color: #dc3545;
}

.azione-icon.delete-azienda {
    color: #dc3545;
}

.azione-icon.print-icon {
    color: #6c757d; /* Grigio per stampa */
}

.azione-icon.edit-avviso-icon {
    color: #6610f2; /* Viola per modifica avviso */
}

.azione-icon.delete-avviso-icon {
    color: #fd7e14; /* Arancione per elimina avviso */
}


/* Personalizzazione richiesta: campo impostato a 150 */
.custom-width-150 {
    width: 150px !important; /* Applicato al campo targa come esempio */
}

th.sortable {
    cursor: pointer;
    position: relative;
    user-select: none;
}

th.sortable span {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8em;
    color: #ffffff;
    opacity: 0.5;
}

th.sortable.sort-asc span::after {
    content: '▲';
    opacity: 1;
}

th.sortable.sort-desc span::after {
    content: '▼';
    opacity: 1;
}

@media print {
  body > *:not(.modal-backdrop) {
    display: none;
  }
  .modal-content {
    box-shadow: none;
    border: none;
  }
  .modal-header, .modal-footer {
    display: none;
  }
  .modal-body {
    display: block !important;
  }
  .modal-dialog {
    max-width: 100% !important;
  }
}

/* Stile per l'alert personalizzato */
.custom-alert {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    padding: 20px 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 1060; /* Più alto dei modal di bootstrap */
    color: #fff;
    font-size: 1.2rem;
    font-weight: 500;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    display: flex;
    align-items: center;
    gap: 15px;
}

.custom-alert.show {
    opacity: 1;
    visibility: visible;
}

.custom-alert.alert-success {
    background-color: #28a745; /* Verde successo */
}

.custom-alert.alert-danger {
    background-color: #dc3545; /* Rosso errore */
}

.custom-alert .bi {
    font-size: 1.5rem;
}