body {
  background-color: #003a66; /* blu pagina leggermente pił chiaro */
  color: yellow;
  font-family: Arial, sans-serif;
  text-align: center;
  margin: 0;
  padding: 0;
}

.title-container {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
}

.icons img {
  width: 22px;
  margin: 0 3px;
}

h1 {
  font-size: 24px;
  font-weight: bold;
  margin: 0 15px;
  color: yellow;
}

hr {
  border: none;
  height: 3px;
  background-color: orange;
  width: 90%;
  margin: 10px auto;
}

.buttons {
  margin: 15px;
}

button {
  background-color: #004080;
  color: yellow;
  border: 2px solid orange;
  padding: 8px 16px;
  margin: 4px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
  font-size: 13px;
}

button:hover {
  background-color: #0055aa;
}

.table-section {
  width: 95%;
  margin: 0 auto 40px auto;
  background-color: #004d00; /* verde scuro */
  border: 2px solid yellow;
  border-radius: 10px;
  padding: 8px;
}

.table-section h2 {
  color: yellow;
  font-size: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}

.table-section h2 img {
  width: 20px;
}

.table-divider {
  height: 3px;
  background-color: orange;
  width: 100%;
  margin: 5px 0;
}

.table-filters {
  display: flex;
  flex-direction: column;
  margin-bottom: 5px;
}

.filter-headers {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 2px;
  flex-wrap: wrap;
}

.filter-headers span {
  flex: 1 1 10%;
  min-width: 60px;
  font-size: 10px;
  color: white;
  font-weight: normal;
  text-align: center;
}

.filter-inputs {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}

.filter-inputs input {
  background-color: #0000cc;
  color: white;
  font-weight: normal;
  border: 1px solid white;
  border-radius: 5px;
  padding: 2px;
  font-size: 10px;
  text-align: center;
  flex: 1 1 10%;
  min-width: 60px;
}

.filter-inputs button {
  background-color: #004080;
  color: yellow;
  border: 2px solid orange;
  border-radius: 5px;
  padding: 4px 8px;
  cursor: pointer;
  font-size: 10px;
  font-weight: bold;
}

.filter-inputs button:hover {
  background-color: #0055aa;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 5px;
  table-layout: fixed;
}

th, td {
  border: 1px solid yellow;
  padding: 3px;
  font-size: 10px;
  text-align: center;
  vertical-align: middle;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background-color: #004d00; /* verde scuro uniforme */
}

th {
  background-color: #006600; /* verde pił scuro per intestazioni */
  font-weight: bold;
}

/* Gestione larghezze colonne principali */
th:nth-child(1), td:nth-child(1) { width: 10%; } /* Tipo Collezione */
th:nth-child(2), td:nth-child(2) { width: 22%; } /* Descrizione */
th:nth-child(3), td:nth-child(3) { width: 10%; } /* Condizione */
th:nth-child(4), td:nth-child(4) { width: 10%; } /* Materiale */
th:nth-child(5), td:nth-child(5) { width: 10%; } /* Provenienza */
th:nth-child(6), td:nth-child(6) { width: 9%; }  /* Data */
th:nth-child(7), td:nth-child(7) { width: 10%; } /* Luogo */
th:nth-child(8), td:nth-child(8) { width: 9%; }  /* Note */
th:nth-child(9), td:nth-child(9),
th:nth-child(10), td:nth-child(10) { width: 5%; } /* Info + Elimina */

/* Campi input principali */
td input {
  display: block;
  margin: 0 auto;
  width: 90%;
  background-color: #0000cc; /* blu elettrico */
  color: white; /* testo bianco */
  font-weight: normal; /* non in grassetto */
  border: 1px solid white;
  border-radius: 5px;
  text-align: center;
  font-size: 11px;
  padding: 2px;
  box-sizing: border-box;
}

/* Colonne Info ed Elimina principali */
td:nth-child(9), td:nth-child(10) {
  background-color: #004d00; /* verde scuro */
  border: 1px solid yellow;
  text-align: center;
  vertical-align: middle;
}

/* Icone info ed elimina principali */
.delete-btn, .info-btn {
  font-size: 16px;
  background: none;
  border: none;
  cursor: pointer;
  color: yellow;
}

.delete-btn:hover, .info-btn:hover {
  color: red;
  transform: scale(1.15);
  transition: 0.2s;
}

#row-count {
  margin-top: 5px;
  font-size: 11px;
  color: white;
  font-weight: bold;
  text-align: left;
}

/* Tabella secondaria Tipi */
.secondary-table {
  background-color: #004d00;
  border: 2px solid yellow;
  border-radius: 10px;
  padding: 8px;
}

.secondary-table table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.secondary-table th, .secondary-table td {
  border: 1px solid yellow;
  padding: 3px;
  font-size: 10px;
  text-align: center;
  vertical-align: middle;
  background-color: #004d00;
}

.secondary-table th {
  background-color: #006600;
  font-weight: bold;
}

.secondary-table td input {
  display: block;
  margin: 0 auto;
  width: 90%;
  background-color: #0000cc;
  color: white;
  font-weight: normal;
  border: 1px solid white;
  border-radius: 5px;
  text-align: center;
  font-size: 11px;
  padding: 2px;
  box-sizing: border-box;
}

.secondary-table td:nth-child(3) {
  width: 10%;
}

.table-input {
  display: block;
  margin: 0 auto;
  width: 90%;
  background-color: #0000cc; /* blu elettrico */
  color: white;
  font-weight: normal;
  border: 1px solid white;
  border-radius: 5px;
  text-align: center;
  font-size: 11px;
  padding: 2px;
  box-sizing: border-box;
}
/* Select del campo "Tipo collezione" nella tabella principale */
td select {
  display: block;
  margin: 0 auto;
  width: 90%;
  background-color: #0000cc; /* stesso blu degli input */
  color: white;
  font-weight: normal;
  border: 1px solid white;
  border-radius: 5px;
  text-align: center;
  text-align-last: center; /* centra anche il testo selezionato */
  font-size: 9px; /* ridotto per stare nella colonna */
  padding: 2px;
  box-sizing: border-box;
}
/* Layout delle due tabelle secondarie affiancate */
.secondary-tables-container {
  display: flex;
  justify-content: center;
  gap: 20px;
  width: 95%;
  margin: 0 auto 40px auto;
}

/* Entrambe le tabelle secondarie */
#sezione-tipi, #sezione-condizioni {
  width: 45%;
}