/* Here, the content of the common custom CSS defined into Home - Setup - Display - CSS*/
/* ————————————————————————————————
   ECONVERSOSTUDIO — Layout definitivo Dolibarr
   (Preventivi + Progetti con intestazione fissa)
———————————————————————————————— */

/* === PREVENTIVI === (comm/propal/list.php) */
body[data-page="comm/propal/list"] table.liste {
  table-layout: fixed !important;
  width: 100% !important;
  border-collapse: collapse !important;
}
body[data-page="comm/propal/list"] table.liste th,
body[data-page="comm/propal/list"] table.liste td {
  box-sizing: border-box !important;
  vertical-align: top !important;
  padding: 4px 6px !important;
}

/* Intestazione fissa (sticky header) */
body[data-page="comm/propal/list"] table.liste thead th {
  position: sticky !important;
  top: 0 !important;
  background-color: #f5f5f5 !important;
  z-index: 2 !important;
  box-shadow: 0 2px 3px rgba(0,0,0,0.05);
}

/* Larghezze colonne Preventivi */
body[data-page="comm/propal/list"] table.liste th:nth-child(1),
body[data-page="comm/propal/list"] table.liste td:nth-child(1) {
  width: 120px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
body[data-page="comm/propal/list"] table.liste th:nth-child(2),
body[data-page="comm/propal/list"] table.liste td:nth-child(2) {
  width: 150px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
body[data-page="comm/propal/list"] table.liste th:nth-child(3),
body[data-page="comm/propal/list"] table.liste td:nth-child(3) {
  width: 220px !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}
/* Nota pubblica larga */
body[data-page="comm/propal/list"] table.liste th:nth-child(8),
body[data-page="comm/propal/list"] table.liste td:nth-child(8) {
  width: 36% !important;
  white-space: normal !important;
  overflow: visible !important;
}

/* === PROGETTI === (projet/list.php) */
body[data-page="projet/list"] table.liste {
  table-layout: auto !important; /* libero, evita sovrapposizioni */
  width: 100% !important;
}
body[data-page="projet/list"] table.liste th,
body[data-page="projet/list"] table.liste td {
  padding: 4px 6px !important;
  vertical-align: top !important;
}

/* Intestazione fissa anche qui */
body[data-page="projet/list"] table.liste thead th {
  position: sticky !important;
  top: 0 !important;
  background-color: #f5f5f5 !important;
  z-index: 2 !important;
  box-shadow: 0 2px 3px rgba(0,0,0,0.05);
}

/* Regole generali di armonizzazione */
div#id-right table.liste tr:nth-child(even) {
  background-color: #fafafa !important;
}
div#id-right table.liste tr:hover {
  background-color: #eef3ff !important;
}
div#id-right table.liste th {
  font-weight: 600 !important;
  color: #333 !important;
}