/* Caricamento del Font*/
@font-face {
  font-family: 'FiraCode';
  src: url('Fira_Code/FiraCode-VariableFont_wght.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
}

a {
  text-decoration: none;
}

/* Caratterstiche generali dello sfondo + body*/
body {
  margin: 0;
  font-family: 'FiraCode', monospace;
  background-color: #f5f5f5;
  background-image: radial-gradient(rgb(39, 39, 39) 0.063rem, transparent 0);
  background-size: 1.125rem 1.125rem;
  background-position: -1.188rem -1.188rem;
}

html {
  font-size: 1rem;
}

/* Header, comune a tutti gli header*/
header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 70px;
  padding: 0.15px 40px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.logo-container {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  min-width: fit-content;
}

/* grandezza del logo*/
header img {
  height: 40px;
}

/* Padding generale, stai attendo a questo!*/
main {
  padding-top: 6.25rem;
}

.page {
  max-width: 75rem;
  margin: 0 auto;
  padding: 2.5rem 1.25rem;
}

.icon {
  margin-right: 0.75rem;
}


#loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: rgba(255, 255, 255, 0.6);
  backdrop-filter: blur(0.313rem);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

/* Contenitore centrale verticale */
.loading-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
}

/* Logo Caligo */
.loading-logo {
  width: 18.75rem;
}

/* Testo di caricamento */
.loading-text {
  font-family: 'FiraCode', monospace;
  font-size: 1.563rem;
  color: #333;
}

/* Spinner animato */
.spinner {
  width: 3.125rem;
  height: 3.125rem;
  border: 0.375rem solid #ccc;
  border-top-color: rgb(133, 47, 209);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.mini-spinner {
  width: 1rem;
  height: 1rem;
  border: 0.125rem solid #ccc;
  border-top-color: rgb(133, 47, 209);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}



input[type="file"] {
  display: none;
}

.drop-text {
  margin-top: 0.625rem;
  margin-bottom: 0.625rem;
  font-size: 1.125rem;
  color: #555;
  justify-self: start;
  text-align: left;
  transition: all 0.3s ease;
}

.btn:hover {
  background-color: rgb(92, 30, 146);
  box-shadow: 0 0.375rem 0.75rem rgba(0, 0, 0, 0.3);
}

.drop-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.foglio {
  display: flex;
  flex-direction: column;
  background-color: white;
  box-shadow: 0 0 1.875rem rgba(0, 0, 0, 0.25);
  border-radius: 0.5rem;
  max-width: 81.25rem;
  margin: 0 auto;
  margin-bottom: 2.5rem;
  transition: all 0.3s ease;
}

.header-foglio {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
  background-color: #f4f4f4;
  position: relative;
  height: 3.75rem;
}

.manage-clients-button {
  margin-right: 0.938rem;
  font-size: 0.938rem;
  margin-bottom: 0.625rem;
  pointer-events: auto;
  border: none;
  margin-top: 0.625rem;
  padding: 0.625rem 1.25rem;
  background-color: #f5f5f5;
  color: #555;
  border-radius: 0.5rem;
  cursor: pointer;
  font-family: 'FiraCode', monospace;
  text-decoration: none;
  justify-self: start;
  text-align: left;
  transition: background-color 0.3s ease;
}

.manage-clients-button:hover {
  background-color: #d8d8d8;
  color: black;
}

.manage-clients-button .icon {
  font-size: 0.938rem;
}

.titoletto {
  font-size: 2.5rem;
  font-weight: normal;
  position: relative;
  display: inline-block;
  margin-left: 1.25rem;
  margin-top: 0.938rem;
  margin-bottom: 0.063rem;
}

/*
.titoletto::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.375rem;
  width: 50%;
  height: 0.188rem; 
  background-color: #888;
  border-radius: 0.125rem;
}
*/

.titoloSezione {
  font-size: 1.25rem;
  font-weight: normal;
}

.line-wrapper {
  display: inline-block;
  position: relative;
}

.line-wrapper::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.25rem;
  width: 100%;
  height: 0.125rem;
  background-color: #d2d2d2;
  border-radius: 0.125rem;
}

.btn {
  pointer-events: auto;
  border: none;
  margin-top: 0.625rem;
  padding: 0.625rem 1.25rem;
  background-color: rgb(133, 47, 209);
  color: white;
  font-size: 0.938rem;
  border-radius: 0.313rem;
  cursor: pointer;
  font-weight: normal;
  font-family: 'FiraCode', monospace;
  text-decoration: none;
  justify-self: start;
  text-align: left;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2);
  transition: box-shadow 0.3s ease;
}

.modifica-mail {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  background-color: white;
  max-width: 1000;
  padding: 1.875rem;
  padding-top: 0.313rem;
  padding-bottom: 0.625rem;
  justify-content: space-between;
  position: relative;
}

/*.modifica-mail::after{
  content: '';
    position: absolute;
    bottom: 0;
    left: 50%; 
  transform: translateX(-50%); 
  width: 90%; 
  height: 0.094rem;
    background-color:  #d8d8d8;
}*/

.modifica {
  width: calc(50% - 0.938rem);
}

#editamail {
  height: 21.875rem;
}

#editamail form {
  height: 100%;
}

::-webkit-scrollbar {
  -webkit-appearance: none;
  width: 10px;
}



.editable-container {
  display: flex;
  flex-direction: column;
  position: relative;
  width: 100%;
  height: 85%;
  background-color: #f5f5f5;
  border: 0.063rem solid #ccc;
  border-radius: 0.625rem;
  padding: 0.938rem;
  box-shadow: 0 0.25rem 0.625rem rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
  justify-self: center;
  align-self: center;
  overflow-y: scroll;
}

.mail-subject {
  height: 15%;
  margin-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.editable-container.subject {
  padding: 0.4rem;
}

.editable-container.subject textarea {
  display: flex;
  align-items: center;
  line-height: normal;
  padding-top: 0.2rem;
  padding-bottom: 0.2rem;
}

.editable-container textarea {
  flex: 1;
  overflow-y: auto;
  margin: 0;
  background-color: transparent;
  border: none;
  resize: none;
  font-family: inherit;
  font-size: inherit;
  padding: 0;
}


.editable-container textarea:focus {
  outline: none;
  border: none;
}

.button-holder {
  display: flex;
  justify-content: flex-end;
  margin-right: 0.7rem;
  margin-top: 0.625rem;
  gap: 0.625rem;
}

.editable-container .button-holder {
  position: absolute;
  bottom: 0.938rem;
  right: 0.938rem;
  z-index: 10;
  display: inline-flex;
  gap: 0.625rem;
  pointer-events: none;
}

.legenda {
  margin-top: 2.5rem;
  width: calc(50% - 0.938rem);
  padding: 1.25rem;
  position: relative;
  overflow: hidden;
}

.legenda-content {
  background-color: white;
  padding: 1.125rem;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #495057;
}

.placeholder-example {
  display: inline-block;
  background-color: #f1f3f4;
  color: rgb(133, 47, 209);
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-family: 'FiraCode', monospace;
  font-weight: normal;
  font-size: 0.813rem;
  border: 0.063rem solid #e1e5e9;
}

.placeholder-example:active {
  transform: scale(0.95);
  transition: transform 0.1s ease;
}

.placeholder-example:hover {
  cursor: pointer;
}

.copy-tooltip {
  position: relative;
}

.copy-tooltip::after {
  content: 'oppure clicca per copiare';
  position: absolute;
  bottom: calc(100% + 0.375rem);
  left: 50%;
  transform: translateX(-50%);
  background-color: #f5f5f5;
  color: rgb(93, 93, 93);
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 1000;
  border: 0.063rem solid #e1e5e9;
}

.copy-tooltip:hover::after {
  opacity: 1;
}

.legenda-item {
  margin-bottom: 0.75rem;
  padding: 0.75rem;
  background-color: #fefefe;
  border-left: 0.188rem solid rgb(133, 47, 209);
  border-radius: 0 0.375rem 0.375rem 0;
  transition: all 0.2s ease;
}

.legenda-item:hover {
  background-color: #f8f9ff;
  transform: translateX(0.125rem);
}

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

.legenda-description {
  margin-top: 0.5rem;
  font-size: 0.813rem;
  color: #6c757d;
  font-style: italic;
}

.drop-stuff {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: white;
  max-width: 1000;
  position: relative;

}

/*
.drop-stuff::after{
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%; 
  transform: translateX(-50%); 
  width: 90%; 
  height: 0.094rem;
  background-color:  #d8d8d8;
}*/

.drop-contenuto {
  width: 90%;
  padding: 1.25rem;
}

.drop-box {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: #f5f5f5;
  border: gray;
  border-style: dashed;
  border-width: 0.188rem;
  border-radius: 0.625rem;
  box-shadow: 0 0.25rem 0.625rem rgba(0, 0, 0, 0.1);
  box-sizing: border-box;
  justify-self: center;
  align-self: center;
  height: 8.125rem;
  width: 100%;
  transition: all 0.3s ease;
}

.drop-box.drag-over {
  background-color: #e3f2fd;
  filter: blur(0.125rem);
  transform: scale(1.05);
}

.drop-box:hover {
  cursor: pointer;
  border: rgb(133, 47, 209);
  border-style: dashed;
  border-width: 0.188rem;
}

.drop-box:hover .drop-text {
  color: black;
}

.drop-box:hover .drop-icon {
  color: rgb(133, 47, 209);
}

.drop-icon {
  color: gray;
  font-size: 2rem;
  transition: all 0.3s ease;
}

.wrapper {
  overflow: visible;
}

table {
  border-collapse: collapse;
  border-radius: 0.5rem;
  width: 100%;
  table-layout: auto;
  background-color: white;
}

.errore {
  border: 0.125rem solid #ac0202;
}

.errore td {
  background-color: #fff7f7 !important;
}

.input-wrapper {
  margin-top: 0.313rem;
  position: relative;
  display: flex;
  align-items: center;
  width: 12.5rem;
}

.input-wrapper .input-form {
  padding: 0.5rem 3.125rem 0.5rem 0.75rem;
  height: 2.5rem;
}

.errore .error-message {
  width: 10.875rem;
}

.send-button {
  position: absolute;
  right: 0.3rem;
}

.general-error {
  width: 50%;
  margin: 0 auto;
  margin-bottom: 0.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.send-button.btn-small {
  font-size: small;
  height: 2rem;
  width: 2rem;
}


.tabella th,
caption {
  text-align: start;
}

caption {
  margin-block: 0.75rem;
}

thead th:not(:first-child),
td {
  text-align: start;
}

thead {
  border-block-end: 0.125rem solid;
  background: whitesmoke;
}

tfoot {
  border-block: 0.125rem solid;
  background: whitesmoke;
}

.tabella th,
td {
  border: 0.063rem solid lightgrey;
  padding: 0.15rem 0.5rem;
  vertical-align: baseline;
}

.tabella th:first-child {
  position: static;
}

.tabella tbody th {
  background: white;
}

.tabella thead th,
tfoot th {
  background: whitesmoke;
}

.tabella thead th {
  vertical-align: bottom;
}

td:first-of-type,
:where(thead, tfoot) th:nth-child(2) {
  border-inline-start: none;
}

.tabella th:first-of-type {
  width: 10rem;
}

.tabella th:first-child::after {
  content: '';
  position: absolute;
  inset-block-start: 0;
  inset-inline-end: 0;
  width: 0.063rem;
  height: 100%;
  background: lightgrey;
}

.btn-small {
  padding: 0.375rem 0.5rem;
  font-size: 0.875rem;
  margin: 0.125rem;
  width: 2.188rem;
  height: 2.188rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-small:hover {
  transform: translateY(-0.063rem);
}

.btn-actions {
  display: grid;
  grid-template-columns: repeat(3, auto);
  gap: 0.250rem;
  justify-content: center;
}


.table {
  display: flex;
  flex-direction: column;
  background-color: white;
  max-width: 1000;
  margin: 0 0;
  padding: 1.875rem;
  padding-top: 0.313rem;
  border-radius: 0.5rem;
}

.tabella thead th {
  font-weight: normal !important;
}

.sendButton {
  display: flex;
  justify-content: center;
  width: 100%;
  margin-top: 1rem;
}

.sendButton .btn {
  width: 20%;
  padding: 12px 0;
  text-align: center;
  border-radius: 0 0 0.5rem 0.5rem;
  margin-top: 0px;
}

.tooltip-btn {
  position: relative;
}

.ultima-riga {
  border-color: white;
}

.tooltip-btn:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 1000;
  pointer-events: none;
  font-family: 'FiraCode', monospace;
  margin-bottom: 0.25rem;
}

.tooltip-btn:hover::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(0.25rem);
  border: 0.313rem solid transparent;
  border-top-color: #333;
  z-index: 1000;
  pointer-events: none;
}


.ragione-piva {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.5rem;
}

.ragione-sociale-text {
  font-weight: normal;
}

.table-img {
  border: 0.063rem solid #555;
  width: 10.625rem;
  height: auto;
}

.fixed-upload-btn {
  position: fixed;
  bottom: 1.875rem;
  right: 0.625rem;
  z-index: 1500;
  transition: all 0.3s ease;
  box-shadow: 0 0.75rem 1.563rem rgba(0, 0, 0, 0.5);
  font-size: 1rem;
}

.fixed-upload-btn:hover {
  transform: translateY(-0.125rem);
  box-shadow: 0 0.75rem 1.563rem rgba(0, 0, 0, 0.6);
}

#modal-visualize-mail.modal,
.modal-addclients.modal {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1700;
  overflow: hidden;
}

#modal-visualize-mail.modal {
  display: block;
}


#modal-visualize-mail .modal-content {
  width: 37.5rem;
  height: 31.25rem;
  max-width: 90%;
  max-height: 80%;
  overflow-y: auto;
}

.email-preview {
  text-align: left;
  margin-top: 1.25rem;
  border: 0.063rem solid #ddd;
  border-radius: 0.5rem;
  background-color: #fafafa;
  padding: 1.25rem;
  max-height: 50vh;
  overflow-y: auto;
}

.email-header {
  background-color: #f0f0f0;
  padding: 0.938rem;
  border-radius: 0.313rem;
  margin-bottom: 0.938rem;
  border-left: 0.25rem solid rgb(133, 47, 209);
}

.email-body {
  background-color: white;
  padding: 1.25rem;
  border-radius: 0.313rem;
  border: 0.063rem solid #eee;
}

.btn-send {
  display: flex;
  align-items: center;
  justify-content: center;
}


.email-body pre {
  font-family: 'FiraCode', monospace;
  font-size: 0.875rem;
  line-height: 1.6;
  white-space: pre-wrap;
  margin: 0;
  color: #333;
}

.modal-content {
  background-color: #f5f5f5;
  margin: 15% auto;
  padding: 1.25rem;
  border-radius: 0.625rem;
  width: 31.25rem;
  max-height: calc(100vh - 30%);
  text-align: center;
  z-index: 1700;
  box-shadow: 0 0.75rem 1.563rem rgba(0, 0, 0, 0.5);
  overflow: hidden;
}

#modal-visualize-mail .modal-content {
  width: 37.5rem;
  height: auto;
  max-width: 90%;
  max-height: 80vh;
  overflow: hidden;
}

.close {
  float: right;
  font-size: 1.25rem;
  cursor: pointer;
}

.input-form {
  font-size: 1rem;
  font-family: 'FiraCode', monospace;
  outline: none;
}

.notification {
  position: fixed;
  top: 1.25rem;
  right: 1.25rem;
  background-color: #4CAF50;
  color: white;
  padding: 0.938rem 1.25rem;
  border-radius: 0.313rem;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2);
  font-family: 'FiraCode', monospace;
  z-index: 2000;
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.3s ease;
}

.notification.show {
  opacity: 1;
  transform: translateX(0);
}

#corpo-pagina {
  display: grid;
  grid-template-columns: 0fr 1fr;
  position: relative;
  min-height: 37.5rem;
  transition: grid-template-columns 0.3s ease-in-out;
}

#corpo-pagina.show-form {
  grid-template-columns: 1fr 1.5fr;
}

.modifica-salvati {
  position: relative;
  overflow: hidden;
  min-width: 0;
  padding: 0 1.875rem;
  padding-top: 0.313rem;
  background-color: #f5f5f5;
  border-bottom-left-radius: 0.5rem;
  opacity: 0;
  transition: opacity 0.15s ease-in-out;
}

.chiudi-modifica {
  position: absolute;
  right: 0;
  margin-right: 1.25rem;
  margin-top: 0.438rem;
  padding: 0.313rem;
  border-radius: 50%;
  width: 0.625rem;
  height: 0.625rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.chiudi-modifica p {
  margin: 0;
  line-height: 1;
  opacity: 0.8;
  color: #333;
  font-size: 1.2rem;
}

.chiudi-modifica:hover {
  cursor: pointer;
}

.chiudi-modifica:hover p {
  color: black;
}

.disabled-input-form {
  padding: 0.125rem;
  pointer-events: none;
  font-size: 1rem;
  font-family: 'FiraCode', monospace;
  background-color: #f5f5f5;
  border: 0.063rem solid #ccc;
  border-radius: 0.25rem;
  color: #888;
  cursor: not-allowed;
  opacity: 0.7;
}

.show-form .modifica-salvati {
  opacity: 1;
  transition: opacity 0.3s ease-in-out 0.25s; 
}

.modifica-salvati form {
  padding-top: 0.938rem;
  padding-bottom: 0.938rem;
}

.input-container {
  position: relative;
  margin-bottom: 1.25rem;
}

.input-container input {
  border: 0.063rem solid #ccc;
  padding: 0.938rem 0.625rem;
  width: 100%;
  box-sizing: border-box;
  font-size: 1rem;
  border-radius: 0.25rem;
}

.input-container label {
  position: absolute;
  top: -0.5rem;
  left: 0.625rem;
  padding: 0 0.313rem;
  font-size: 0.75rem;
  z-index: 1;
  background-color: #f5f5f5;
  border-radius: 0.25rem;
  border: 0.063rem solid;
  border-image: linear-gradient(to top,
      #ccc 40%,
      #f5f5f5 60%) 1;
}

.error-input {
  position: relative;
  margin-bottom: 1.25rem;
}

.error-input input {
  border: 0.125rem solid #ac0202;
  padding: 0.938rem 0.625rem;
  width: 100%;
  box-sizing: border-box;
  font-size: 1rem;
  border-radius: 0.25rem;
}

.error-input label {
  position: absolute;
  top: -0.5rem;
  left: 0.625rem;
  padding: 0 0.313rem;
  font-size: 0.75rem;
  color: #555;
  z-index: 1;
  background-color: #f5f5f5;
  border-radius: 0.25rem;
  border: 0.063rem solid;
  border-image: linear-gradient(to top,
      #ccc 40%,
      #f5f5f5 60%) 1;
}

.error-message {
  display: flex;
  align-items: center;
  margin-top: 0.5rem;
  padding: 0.5rem 0.75rem;
  background-color: #ffeaea;
  border: 0.063rem solid #ff9999;
  border-radius: 0.25rem;
  color: #ac0202;
  font-size: 0.875rem;
}

.error-icon {
  margin-right: 0.5rem;
  font-size: 1rem;
  font-weight: normal;
}

.error-icon::before {
  content: "⚠";
  color: #ff6b6b;
}

.non-active {
  pointer-events: none;
  opacity: 0.5;
}

.no-attiva {
  opacity: 0.5;
  overflow-y: scroll;
}

.btn.non-active {
  display: none;
}

.tienibottone {
  margin-top: 0.938rem;
  text-align: center;
}

.clienti-salvati {
  padding: 4rem;
  transition: all 0.3s ease-in-out;
}

.show-form .clienti-salvati {
  padding: 1.875rem;
  padding-top: 0.313rem;
  padding-left: 0.938rem;
  border-left: 0.031rem solid #d2d2d2;
  border-bottom-right-radius: 0.5rem;
}

.titoloRicercaTab {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
}

#tableSearch {
  background-image: url('./searchicon.png');
  background-position: 0.5rem center;
  background-size: 0.8rem 0.8rem;
  background-repeat: no-repeat;
  width: 28%;
  font-size: 0.8rem;
  height: 2.4rem;
  padding-left: 1.8rem;
  font-family: 'FiraCode', monospace;
  border: 1px solid #ddd;
  margin-right: 0.5rem;
  margin-top: 0.5rem;
  outline: none;
  border-radius: 0.25rem;
  box-sizing: border-box;
}

.table-clienti {
  max-height: 60vh;
  overflow-y: auto;
  width: 100%;
  border-collapse: collapse;
  background-color: white;
  border-radius: 0.375rem;
  margin-top: 0.625rem;
  display: block;
  position: relative;
}

.table-clienti thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.table-clienti th {
  background-color: #f7f7f7;
  color: #333;
  padding: 0.5rem 0.75rem;
  text-align: left;
  font-weight: normal;
  font-size: 0.8rem;
  position: sticky;
  top: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Larghezze specifiche per ogni colonna */
.table-clienti th:nth-child(1),
/* Ragione sociale */
.table-clienti td:nth-child(1) {
  width: 25%;
}

.table-clienti th:nth-child(2),
/* P. Iva o CF */
.table-clienti td:nth-child(2) {
  width: 13%;
}

.table-clienti th:nth-child(3),
/* E-mail */
.table-clienti td:nth-child(3) {
  width: 19%;
}

.table-clienti th:nth-child(4),
/* E-mail Referente */
.table-clienti td:nth-child(4) {
  width: 19%;
}

.table-clienti th:nth-child(5) {
  width: 25%;
}

/* Ultimo Aggiornamento */
.table-clienti td:nth-child(5) {
  width: 19%;
}

.table-clienti td:nth-child(6) {
  /* Elimina (solo td) */
  width: 5%;
}

.elimina-cliente {
  width: 2rem;
}

.table-clienti tr.last-row {
  position: sticky;
  bottom: 0;
  z-index: 10;
  display: table;
  width: 100%;
}

.table-clienti .last-row td {
  background-color: white;
}

.ultimo-aggiornamento {
  text-align: left;
}

.table-clienti td {
  padding: 0.5rem 0.75rem;
  border: none;
  color: #333;
  font-size: 0.7rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.table-clienti thead,
.table-clienti tbody tr {
  display: table;
  width: 100%;
  table-layout: fixed;
}

.table-clienti tbody {
  display: block;
  max-height: calc(60vh - 3rem);
  overflow-y: auto;
  width: 100%;
}

.table-clienti tr:nth-child(even) {
  background-color: #f9f9f9;
}

.table-clienti tr:nth-child(odd) {
  background-color: white;
}

.table-clienti tr:hover {
  background-color: #e3f2fd;
  cursor: pointer;
}

.table-clienti .nome-societa {
  font-weight: normal;
}

.table-clienti .ultimo-aggiornamento {
  color: #666;
  font-size: 0.75rem;
  text-align: right;
}

.last-row {
  padding: 0.625rem;
  border: none;
}

.icon-delete {
  color: #666;
  font-size: 1rem;
  margin: 0;
}

.icon-delete:hover {
  color: #DC2626;
  cursor: pointer;
}

.clienti-salvati .btn {
  width: 100%;
  padding: 0.625rem;
  border-radius: 0.5rem;
  margin: 0;
  text-align: center;
  font-size: 1rem;
}

.tabs {
  display: flex;
  align-items: flex-end;
  position: relative;
  z-index: 2;
  height: 100%;
  overflow: hidden;
}

.tab-attiva {
  text-decoration: none;
  color: black;
  background-color: white;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
  padding: 0.3rem;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  position: relative;
  border-bottom: solid 0.063rem white;
  top: 0.063rem;
  gap: 0.313rem;

  flex-shrink: 1; 
  min-width: 3rem; 
  max-width: 15rem; 
  overflow: hidden;
}
.torna-home{
  padding: 0rem;
  margin: 0;
  cursor: pointer;
  padding: 0.125rem 0.25rem;
  font-size:1.4rem;

  flex-shrink: 0;
}
.tab-attiva-dx {
  text-decoration: none;
  color: black;
  background-color: white;
  border-right: white;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
  padding: 0.625rem;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  position: relative;
  border-bottom: solid 0.063rem white;
  top: 0.594rem;

  flex-shrink: 0; 
}

.tab-modificabile {
  display: inline-flex;
  align-items: center;
  gap: 0.125rem;
  padding: 0.125rem 0.375rem; 
  margin: 0;
  background-color: #f0f0f0;
  border-radius: 0.313rem;
  box-sizing: border-box;
  white-space: nowrap;

  flex: 1; 
  min-width: 0; 
  overflow: hidden;
}

.textarea-tab-modificabile {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: inherit;
  resize: none;
  outline: none;
  padding: 0.125rem;
  margin: 0;
  width: auto;
  min-width: 2rem;
  flex: 1;
  line-height: 1.2;
  height: 1.2em;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis; 
}
.tab-modificabile form {
  display: flex; 
  align-items: center; 
  gap: 0.25rem;
  width: 100%;

  min-width: 0; 
}


.tab-actions {
  display: flex;
  gap: 0.25rem;
  align-items: center;
  flex-direction: row;
  flex-shrink: 0;
  margin-left: auto;

  flex-shrink: 0; 
}
.tab-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: bold;
  padding: 0;
  margin: 0;
  line-height: 1;
  transition: all 0.2s ease;
}

.confirm-btn {
  color: #4CAF50;
}

.confirm-btn:hover {
  color: #45a049;
  transform: scale(1.15);
}

.cancel-btn {
  color: #dc3545;
}

.cancel-btn:hover {
  color: #c82333;
  transform: scale(1.15);
}
.nome-plico {
  padding: 0rem;
  margin: 0;
  cursor: pointer;
  transition: all 0.2s ease;
  border-radius: 0.25rem;
  padding: 0.125rem 0.25rem;

  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  flex: 1; 
  min-width: 0;
}

.tab-attiva .nome-plico:hover {
  text-decoration: underline;
  text-decoration-style: dashed ;
  background-color: #f0f0f0;
  color:#555;
}

.tab-inattiva {
  text-decoration: none;
  color: #555;
  background-color: #f5f5f5;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
  top: 0.063rem;
  padding: 0.3rem;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  text-align: center;
  position: relative;
  cursor: pointer;
  gap: 0.313rem;
  transition: background-color 0.3s ease;

  flex-shrink: 1; 
  min-width: 3rem; 
  max-width: 15rem; 
  overflow: hidden;
}

.tab-inattiva-dx {
  text-decoration: none;
  color: #555;
  background-color: #f5f5f5;
  border-top-left-radius: 0.5rem;
  border-top-right-radius: 0.5rem;
  padding: 0.688rem;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  text-align: center;
  position: relative;
  cursor: pointer;
  transition: background-color 0.3s ease;
  top: 0.553rem;

  flex-shrink: 0; 
}

.tab-inattiva-dx:hover {
  color: black;
  background-color: #c7c7c7;
}

.tab-inattiva:hover {
  color: black;
  background-color: #c7c7c7;
}

/*
.tab-inattiva::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 0.125rem; 
  height: 40%;
  background-color:  #c0c0c0;;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.tab-inattiva:hover::after {
  opacity: 0;
}
*/


.tab-attiva,
.tab-inattiva,
.tab-attiva-dx,
.tab-inattiva-dx {
  padding: 0.625rem;
  height: 2.5rem; 
  box-sizing: border-box;
  display: flex;
  align-items: center;
  position: relative;
  top: 0.063rem;
}
.chiudi-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: auto;
  font-size: 1.125rem;
  box-sizing: border-box;
  width: 0.938rem;
  height: 0.938rem;
  color: #888;
  cursor: pointer;
  transition: color 0.2s;
  transition: background-color 0.2s;
  border-radius: 50%;

  flex-shrink: 0; 
}

.chiudi-tab:hover {
  background-color: rgba(138, 138, 138, 0.7);
  color: whitesmoke;
}

.apri-nuova-tab {
  display: flex;
  color: #555;
  background-color: #f5f5f5;
  padding: 0.688rem;
  font-size: 1.188rem;
  box-sizing: border-box;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  cursor: pointer;
  border-radius: 50%;
  width: 1.75rem;
  height: 1.75rem;
  transition: background-color 0.3s ease;
  align-self: flex-end;
  margin-bottom: 0.375rem;
  margin-left: 0.313rem;
  flex-shrink: 0; 
}

.apri-nuova-tab:hover {
  color: black;
  background-color: #c7c7c7
}

:root {
  --scale-factor: 1;
  font-size: calc(16px * var(--scale-factor));
}

#modal-delete-client.modal {
  display: none;
  position: fixed;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1700;
}

.modal-delete {
  width: 28rem;
  height: auto;
  padding: 1.875rem;
  background-color: #f5f5f5;
  margin: 15% auto;
  border-radius: 0.625rem;
  box-shadow: 0 0.75rem 1.563rem rgba(0, 0, 0, 0.5);
}

.modal-title {
  font-size: 1.5rem;
  font-weight: normal;
  margin-top: 0;
  margin-bottom: 1.25rem;
  color: #333;
  text-align: left;
}

.modal-body {
  text-align: center;
  margin-bottom: 1.875rem;
}

.warning-icon {
  font-size: 3.75rem;
  color: rgba(133, 47, 209, 0.563);
  margin-bottom: 1.25rem;
}

.modal-text {
  font-size: 1rem;
  color: #333;
  margin-bottom: 0.625rem;
  line-height: 1.5;
}

.modal-text strong {
  color: rgb(133, 47, 209);
  font-weight: normal;
}

.modal-subtext {
  font-size: 0.875rem;
  color: #666;
  font-style: italic;
}

.modal-actions {
  display: flex;
  gap: 0.938rem;
  justify-content: center;
}

.modal-actions .btn {
  flex: 1;
  margin: 0;
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
}

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

.btn-cancel:hover {
  background-color: #5a6268;
  box-shadow: 0 0.375rem 0.75rem rgba(0, 0, 0, 0.3);
}

.btn-delete {
  background-color: #dc3545;
  color: white;
}

.btn-delete:hover {
  background-color: #c82333;
  box-shadow: 0 0.375rem 0.75rem rgba(0, 0, 0, 0.3);
}

.notification.error {
  background-color: #dc3545;
}

.notification.success {
  background-color: #4CAF50;
}

.chiudi-errore-container {
  position: relative;
}

.btn-chiudi-errore {
  margin: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 0.375rem 0.5rem;
  font-size: 0.875rem;
  width: 2.3rem;
  height: 2.3rem;
  background-color: rgb(133, 47, 209);
  color: white;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2);
  border-radius: 0.313rem;
  cursor: pointer;
  font-weight: normal;
  text-decoration: none;
  border: none;
  outline: none;
  transition: all 0.25s ease;
}

.btn-chiudi-errore:hover {
  background-color: rgb(92, 30, 146);
  box-shadow: 0 0.4rem 0.8rem rgba(0, 0, 0, 0.25);
  transform: translate(-50%, -50%) translateY(-0.125rem);
}

@media (min-width: 2560px) {
  :root {
    --scale-factor: 1.3;
  }
}

.login-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  min-height: 100vh;
}

.login-box {
  box-sizing: border-box;
  background-color: white;
  width: 23.75rem;
  padding: 2.5rem;
  border-radius: 0.938rem;
  box-shadow: 0 0 1.875rem rgba(0, 0, 0, 0.25);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: linear-gradient(
    to bottom,
    #c19ff0 5%,
    white 40%
  );
  
}


.intestazione-login {
  text-align: center;
}

.intestazione-login h3 {
  font-size: 1.75rem;
  color: #333;
  margin-bottom: 0.5rem;
  font-weight: normal;
}

.intestazione-login h4 {
  margin-top: 0;
  font-size: 0.875rem;
  color: #666;
  font-weight: normal;
}


.login-form-container {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}


.login-form-container label {
  font-size: 0.875rem;
  color: #333;
  font-weight: normal;
  margin-bottom: -0.75rem;
}


.login-form-container input[type="text"],
.login-form-container input[type="email"],
.login-form-container input[type="password"] {
  width: 100%;
  padding: 0.75rem 0.938rem;
  border: 0.125rem solid #e0e0e0;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-family: 'FiraCode', monospace;
  transition: all 0.3s ease;
  outline: none;
  box-sizing: border-box;
  margin-bottom: 0.313rem;
  margin-top: 0.5rem;
  background-color:#f1f1f1;
}
.login-form-container input[type="text"]:focus,
.login-form-container input[type="email"]:focus,
.login-form-container input[type="password"]:focus {
  border-color: rgb(133, 47, 209);
  box-shadow: 0 0 0 0.188rem rgba(133, 47, 209, 0.1);
}

.login-form-container input::placeholder {
  color: #999;
}


.login-form-container button {
  width: 100%;
  padding: 0.75rem;
  border: none;
  border-radius: 0.5rem;
  font-size: 0.938rem;
  font-weight: normal;
  font-family: 'FiraCode', monospace;
  cursor: pointer;
  transition: all 0.3s ease;
  margin-top: 0.313rem;
}

.login-form-container button[type="submit"] {
  background-color: rgb(133, 47, 209);
  color: white;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2);
}

.login-form-container button[type="submit"]:hover {
  background-color: rgb(92, 30, 146);
  transform: translateY(-0.125rem);
  box-shadow: 0 0.375rem 0.75rem rgba(0, 0, 0, 0.3);
}

.login-form-container button[type="submit"]:active {
  transform: translateY(0);
}

.login-form-container button:not([type="submit"]) {
  background-color: white;
  color: #555;
  border: 0.125rem solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.625rem;
}

.login-form-container button:not([type="submit"]):hover {
  background-color: #f8f8f8;
  border-color: #ccc;
  color: #333;
}

.login-form-container button:not([type="submit"]):active {
  background-color: #f0f0f0;
}
.intro-box {
  margin-top: 1.5rem;
  margin-bottom: 0;
  background-color: white;
  border-radius: 0.938rem 3.125rem;
  padding: 2.5rem;
  min-height: 12rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-areas: "left logoDoc";
  box-shadow: 0 0 1.875rem rgba(0, 0, 0, 0.15);
  padding-left: 5rem;
  transition: all 0.3s ease;
  width: 75%;
  margin-left: auto;
  margin-right: auto;
  align-self: center;
  background: linear-gradient(180deg,
      rgb(250, 247, 253),
      rgb(245, 240, 250));
}

.Titolo {
  margin-top: 0.625rem;
  margin-bottom: 0;
  font-size: 3.625rem;
  font-weight: normal;
  color: #555;
  justify-self: start;
  text-align: left;
}

.intro-content {
  grid-area: left;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.f24Logo {
  grid-area: logoDoc;
  height: 10rem;
  justify-self: center;
  align-self: center;
}

.archive {
  font-family: "Montserrat", sans-serif;
  width: 83%;
  background-color: white;
  padding: 0.7rem;
  justify-self: center;
  align-self: center;
  margin-bottom: 1.5rem;
  margin-top: 1.5rem;
}

.archive h3 {
  margin-top: 0;
  font-size: 1.6rem;
  font-weight: normal;
  color: #333;
  margin-bottom: 0.2rem;
  padding: 0;
}

.descriptions {
  margin: 0;
  padding: 0.2rem;
  font-size: 1rem;
  color: #666;
  font-style: italic;
}

.archive table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  background-color: rgb(244, 246, 248);
  border-radius: 0.5rem;
  border: 1px solid #ccc;
}

.archive table th,
.archive table td {
  border: none;
}

.archive table thead {
  border-bottom: none;
}

.archive table th {
  padding: 0.5rem;
  text-align: left;
  font-weight: bold;
  color: #555;
  font-size: 0.938rem;
  background-color: rgb(246, 247, 249);


}

.archive table tbody tr {
  border-bottom: none;
  transition: background-color 0.2s ease;
}

.archive table td {
  padding: 0.5rem;
  color: #333;
  font-size: 0.875rem;
  border: none;
}

.archive table tbody tr:last-child {
  border-bottom: none;
}

.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #999;
  font-size: 1rem;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
  opacity: 0.3;
}
.log-in {
  display: flex;
  align-items: center;
  gap: 15px; 
  padding: 10px 20px;
  margin-right: 2rem;
}

.utente-connesso {
  font-size: 14px;
  color: #333;
  font-weight: 500;
}

.logout-button {
  background-color:rgb(133, 47, 209);
  padding: 8px 16px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.logout-button:hover {
  background-color: rgb(92, 30, 146);
  box-shadow: 0 0.375rem 0.75rem rgba(0, 0, 0, 0.3);
}

.logout-button a {
  color: white;
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.btn-impossibile-inviare{
  margin-top: auto;
  margin-bottom: auto;
}
.errore-azioni{
  margin-top: auto;
  margin-bottom: auto;
}

.tooltip-wrapper {
  position: relative;
  display: inline-block;
  cursor: not-allowed;
}

.disabled-btn {
  opacity: 0.4;
  background-color: #9e9e9e;
  pointer-events: none;
}

.disabled-btn:hover {
  background-color: #9e9e9e;
  transform: none;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.2);
}

.tooltip-wrapper.tooltip-error:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  background-color: #ffeaea; 
  border: 0.063rem solid #ff9999; 
  color: #ac0202; 
  padding: 0.5rem 0.75rem;
  border-radius: 0.25rem;
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 1000;
  pointer-events: none;
  font-family: 'FiraCode', monospace;
  margin-bottom: 0.25rem;
  box-shadow: 0 0.25rem 0.5rem rgba(0, 0, 0, 0.15);
}

.tooltip-wrapper.tooltip-error:hover::before {
  content: "";
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%) translateY(0.25rem);
  border: 0.313rem solid transparent;
  border-top-color: #ff9999; 
  z-index: 1000;
  pointer-events: none;
}