.dropdown-item .memu-icon {
  display: inline-block;
  vertical-align: text-top;
  margin-right: 8px;
}
.dropdown-item {
  font-size: 0.8em;
}

.dropdown-header {
  font-size: 0.8em;
}

.nav-link .memu-icon {
  display: inline-block;
  vertical-align: middle;
  margin-right: 5px;
}

/* ==========================================
   1. REGOLE COMUNI (Condivise tra Login e Index)
   ========================================== */
body {
  font-size: 13px;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f4f6f9;
  color: #333;
}

/* Overlay di caricamento AJAX */
#loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(255, 255, 255, 0.85);
  z-index: 9999;
  display: none;
  backdrop-filter: blur(2px);
}

.card-header {
  background-color: #212529;
  color: white;
  text-align: center;
  padding: 15px;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-radius: 2px 2px 0 0 !important;
}

/* Compattazione Componenti Bootstrap */
.card {
  border-radius: 2px;
  border: 1px solid #dee2e6;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}
.card-body {
  padding: 12px;
}
h5,
h6 {
  font-size: 12px;
  font-weight: bold;
  text-transform: uppercase;
  color: #495057;
}

.form-control,
.form-select,
.btn {
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 2px;
}

.table {
  font-size: 12px;
  margin-bottom: 0;
}
.table td,
.table th {
  padding: 6px 8px;
  vertical-align: middle;
}

/* ==========================================
   2. LAYOUT PAGINA INDEX (Gestione PC)
   ========================================== */
/* Applica questa classe al body della index.html */
body.layout-index {
  overflow: hidden;
  height: 100vh;
  display: flex;
  flex-direction: column;
}

.navbar-custom {
  height: 40px;
  min-height: 40px;
  padding: 0 15px;
}

.main-wrapper {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.content-area {
  flex: 1;
  padding: 15px;
  overflow-y: auto;
}

.sidebar-right {
  width: 200px;
  min-width: 200px;
  background-color: #ffffff;
  border-left: 1px solid #ccc;
  padding: 12px;
  overflow-y: auto;
}

.custom-footer {
  height: 20px;
  font-size: 11px;
  line-height: 20px;
  background-color: #212529;
  color: #adb5bd;
  padding: 0 10px;
}

/* ==========================================
   3. LAYOUT PAGINA LOGIN
   ========================================== */
/* Applica questa classe al body della login.html */
body.layout-login {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #e9ecef;
}

.login-card {
  width: 320px;
  border: none;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.login-header {
  background-color: #0d6efd;
  color: white;
  padding: 15px;
  text-align: center;
  font-weight: bold;
  border-radius: 2px 2px 0 0;
}

.agency-info {
  background-color: #f8f9fa;
  border: 1px solid #dee2e6;
  padding: 10px;
  margin-bottom: 20px;
  font-size: 11px;
  font-family: monospace;
}

/* Effetto vibrazione per errore */
.shake {
  animation: shake 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes shake {
  10%,
  90% {
    transform: translate3d(-1px, 0, 0);
  }
  20%,
  80% {
    transform: translate3d(2px, 0, 0);
  }
  30%,
  50%,
  70% {
    transform: translate3d(-4px, 0, 0);
  }
  40%,
  60% {
    transform: translate3d(4px, 0, 0);
  }
}

/* Migliora l'alert dentro la card */
#login-error {
  font-size: 0.7rem;
  padding: 0.75rem;
  margin-bottom: 1.5rem;
}

.btn-xs {
  padding: 0px 5px !important;
  font-size: 10px !important;
  line-height: 1.5;
  text-transform: uppercase;
}

/* Opzionale: se vuoi che l'input-group sia più basso del default Bootstrap */
.input-group .form-control {
  height: calc(1.5em + 0.5rem + 2px); /* Riduce leggermente l'altezza */
}

a {
  text-decoration: none;
}

/* Bottoni extra-small per ottimizzare lo spazio */
.btn-xs {
  padding: 2px 2px !important;
  font-size: 0.7rem !important;
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

/* Stile per il bottone bianco TAN */
.btn-white {
  background-color: #fff;
  border-color: #dee2e6;
}
.btn-white:hover:not(:disabled) {
  background-color: #f8f9fa;
}

/* Tooltip: opzionale, per renderli più piccoli se vuoi */
.tooltip-inner {
  font-size: 0.75rem;
  padding: 4px 8px;
}

/* Colore quando un pulsante campo è attivo ed è in attesa di click */
.btn-mappa.attivo {
  background-color: #212529 !important;
  color: #fff !important;
}

/* Evidenziazione visiva della colonna mappata nella tabella */
.colonna-mappata-nome {
  background-color: rgba(220, 53, 69, 0.15) !important;
} /* Rosso leggero */
.colonna-mappata-cognome {
  background-color: rgba(13, 110, 253, 0.15) !important;
} /* Blu leggero */
.colonna-mappata-telefono {
  background-color: rgba(25, 135, 84, 0.15) !important;
} /* Verde leggero */
