/* Importa un font da Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap");

body {
  margin: 0;
  font-size: 14px;
  font-family: Poppins, sans-serif;
  background-color: #1d2938;
  background-image: url("../assets/images/constructionsite.jpg"); /* Percorso dell'immagine */
  background-size: cover; /* Adatta l'immagine all'intero sfondo */
  background-repeat: no-repeat; /* Evita la ripetizione dell'immagine */
  background-position: center center;
  background-attachment: fixed;
}

a,
a:hover,
a:focus,
a:active,
a:visited {
  text-decoration: none;
  color: #000;
}

.home {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  grid-template-rows: 75px auto;
  grid-auto-rows: auto;
  margin: 0px;
  transition: 0.5s;
  align-items: start;
}

.topnav {
  grid-column: 1 / 5;
  grid-row: 1 / 2;
  margin: 0px;
  padding: 10px;
  display: flex;
  align-items: center;
}

.usernav {
  grid-column: 5/ 6;
  grid-row: 1 / 2;
  margin: 0px;
  padding: 10px;
  display: flex;
  flex-direction: row;
  font-weight: bold;
}

/* Contenitore del menu */
.user-menu-container {
  position: relative;
  display: inline-block;
  grid-column: 5/ 6;
  grid-row: 1 / 2;
  margin: 0px;
  padding: 10px;
  text-align: right;
  cursor: pointer;
}

/* Menu nascosto */
.user-menu {
  display: none;
  position: absolute;
  top: 100%;
  right: 5px;
  border-radius: 20px;
  width: 100%;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  z-index: 1000;
  box-shadow: 0px 0px 15px #ccc;
  padding: 10px;
  transition: opacity 0.5s ease;
  text-align: left;
}

/* Mostra il menu al passaggio del mouse */
.user-menu-container:hover .user-menu {
  display: block;
}

/* Voci del menu */
.user-menu a {
  display: block;
  padding: 10px;
  text-decoration: none;
  color: #333;
  border-radius: 15px;
  font-weight: normal;
  transition: background-color 0.5s ease;
}

.user-menu a:hover {
  background-color: #f0f0f0;
}

.content {
  height: auto;
  margin: 10px;
  padding: 10px;
  background-color: #f9fafb;
  border-radius: 20px;
}

/* Colonna sinistra */
.sx {
  grid-column: 1 / 3;
  height: 75vh; /* altezza fissa al 75% della finestra */
  padding: 10px;
  margin: 50px;
  background-color: #f9fafb;
  overflow-y: auto; /* abilita lo scroll verticale interno */
  border-radius: 20px;
}

/* Colonna destra */
.dx {
  grid-column: 3 / 7;
  height: 75vh; /* altezza fissa al 75% della finestra */
  padding: 10px;
  margin: 50px;
  background-color: #f9fafb;
  overflow-y: hidden; /* abilita lo scroll verticale interno */
  border-radius: 20px;
}

.scroll {
  height: 90%;
  overflow-y: auto;
  /* opzionale, rende lo scorrimento più fluido */
  scroll-behavior: smooth;
}

.content_login {
  grid-column: 2 / 5;
  height: auto;
  margin: 0px;
  padding: 10px;
  background-color: #f9fafb;
  border-radius: 20px;
}

.glass {
  background: rgba(
    255,
    255,
    255,
    0.2
  ); /* trasparenza per far vedere lo sfondo */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.box {
  position: relative;
  padding: 15px;
  margin: 15px;
  background-color: white;
  border: 1px solid #e4e7ec;
  border-radius: 15px;
  z-index: 2;
  line-height: 25px;
  -webkit-animation-name: fade;
  /* Safari 4.0 - 8.0 */
  -webkit-animation-duration: 2s;
  /* Safari 4.0 - 8.0 */
  animation-name: fade;
  animation-duration: 2s;
  overflow-x: auto;
  color: black;
}

.alert {
  border: 1px solid #e08638;
  background-color: #fffaec;
  color: #e08638;
}

.success {
  border: 1px solid #34b571;
  background-color: #edfdf4;
  color: #34b571;
}

.error {
  border: 1px solid #eb4d38;
  background-color: #fef3f2;
  color: #eb4d38;
}

.scheda {
  position: relative;
  display: inline-block;
  margin: 10px;
  height: 150px;
  width: 325px;
  padding: 10px;
  background-color: white;
  border: 1px solid #e4e7ec;
  border-radius: 20px;
  -webkit-animation-name: fade;
  /* Safari 4.0 - 8.0 */
  -webkit-animation-duration: 2s;
  /* Safari 4.0 - 8.0 */
  animation-name: fade;
  animation-duration: 2s;
  overflow-x: auto;
  cursor: pointer;
}

.scheda:hover {
  background-color: #f9fafb;
}

.titolo_scheda {
  color: #1d2938;
  font-weight: bold;
  font-size: 16px;
  margin: 10px;
}

.label_green {
  display: inline-block;
  margin-top: 5px;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 12px;
  background: #e5f9e7;
  color: #208020;
}

.label_gray {
  display: inline-block;
  margin-top: 5px;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 12px;
  background-color: #f2f4f7;
  color: #667084;
}

.label_red {
  display: inline-block;
  margin-top: 5px;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 12px;
  background-color: #fcf1f0;
  color: #cc3621;
}

.label_yellow {
  display: inline-block;
  margin-top: 5px;
  padding: 2px 8px;
  border-radius: 5px;
  font-size: 12px;
  background-color: #fffaec;
  color: #e08638;
}

@keyframes fade {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

.title {
  font-size: 20px;
  font-weight: bold;
  padding: 10px;
}

.subtitle {
  font-size: 16px;
  font-weight: bold;
  padding: 10px;
}

hr {
  border: 0;
  height: 1px;
  background-color: #e6e6e6;
  margin: 15px 0px 15px 0px;
}

p {
  margin: 0;
  padding: 0;
}

img {
  border: 0px;
}

fieldset {
  border: 1px solid #e6e6e6;
  background-color: whitesmoke;
  border-radius: 5px;
}

legend {
  padding: 10px;
  font-weight: bold;
  border: 1px solid #e6e6e6;
  background-color: white;
  border-radius: 5px;
}

.form-container {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr 1fr; /* default: una colonna */
}

/* Gruppo che occupa una sola colonna */
.form-group.one-column {
  grid-column: span 2; /* si estende su entrambe le colonne */
  display: flex;
  flex-direction: column;
  vertical-align: top;
}

/* Gruppo che occupa una colonna */
.form-group.two-columns {
  display: flex;
  flex-direction: column;
  vertical-align: top;
}

textarea {
  height: 100px;
  border-radius: 10px;
  padding: 0px 10px 0px 10px;
  border: 1px solid #e6e6e6;
  margin-bottom: 5px;
}

.text {
  border-radius: 10px;
  height: 40px;
  padding: 0px 10px 0px 10px;
  border: 1px solid #e6e6e6;
  margin-bottom: 5px;
}

select {
  border-radius: 10px;
  height: 40px;
  padding: 0px 10px 0px 10px;
  border: 1px solid #e6e6e6;
  margin-bottom: 5px;
}

#dropZone {
  border: 1px dashed #e6e6e6;
  border-radius: 10px;
  padding: 30px;
  text-align: center;
  margin-top: 15px;
  background: white;
  cursor: pointer;
  transition: all 0.2s ease;
}

#dropZone.dragover {
  background: #e1f0ff;
  border-color: #0056b3;
}

.result {
  font-size: 13px;
  margin-top: 3px;
}

.file-upload {
  position: relative;
  display: inline-block;
}

.file-upload input[type="file"] {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.file-upload-label {
  display: inline-block;
  padding: 10px 20px;
  background-color: #0078d4;
  color: white;
  border-radius: 5px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.file-upload-label:hover {
  background-color: #005a9e;
}

.file-name {
  margin-left: 15px;
  font-style: italic;
  color: #333;
}

#fileList {
  margin: 10px;
}

.file-item {
  display: inline-block;
  margin: 5px;
  padding: 5px;
  border-radius: 10px;
  font-size: 12px;
  border: 1px solid #34b571;
  background-color: #edfdf4;
  color: #334050;
}

button {
  background-color: #1d2938;
  border: none;
  color: #fff;
  border: 0px;
  cursor: pointer;
  transition: background-color 1s;
  border-radius: 10px;
  font-size: 14px;
  height: 45px;
  margin: 5px;
  padding: 0px 10px 0px 10px;
}

button:hover {
  background-color: #334050;
}

.button_gray {
  background-color: #dee2e9;
  color: #000;
  border: 0px;
  cursor: pointer;
  transition: background-color 1s;
  border-radius: 10px;
  font-size: 14px;
  height: 45px;
  margin: 5px;
  padding: 0px 10px 0px 10px;
}

.button_gray:hover {
  background-color: #c2c7cc;
}

.button_doc {
  cursor: pointer;
  transition: background-color 1s;
  border-radius: 25px;
  font-size: 14px;
  height: 45px;
  margin: 5px;
  padding: 0px 10px 0px 10px;
  font-weight: 600;
  min-width: 150px;
}
.button_doc:hover {
  background-color: #f9fafb;
}

.approva {
  background-color: #edfdf4;
  color: #34b571;
  border: 1px solid #34b571;
}

.rifiuta {
  background-color: #fef3f2;
  color: #eb4d38;
  border: 1px solid #eb4d38;
}

.modifica {
  background-color: #fffaec;
  color: #f49326;
  border: 1px solid #f49326;
}

.annulla {
  background-color: #dee2e9;
  color: #334050;
  border: 1px solid #334050;
}

.iconbutton {
  background-color: transparent;
  color: #000;
  border: 0px;
  cursor: pointer;
  transition: background-color 1s;
  border-radius: 10px;
  font-size: 14px;
  height: 45px;
  margin: 5px;
  padding: 0px 10px 0px 10px;
}

.iconbutton:hover {
  background-color: #dee2e9;
}

label {
  margin: 0;
  padding: 0;
  font-weight: bold;
}

table {
  width: 100%;
}

th {
  background-color: #f9fafb;
  color: #334050;
  font-size: 10px;
}

td {
  border-bottom: 1px solid #e4e7ec;
  padding: 5px;
}

tr:hover {
  background-color: #f9fafb;
  cursor: pointer;
}

.contenitore {
  display: flex;
  height: 100dvh;
  gap: 20px;
  border-radius: 20px;
}

.colonna_sx {
  flex: 1; /* Ogni div occupa metà spazio */
}

.colonna_dx {
  flex: 1; /* Ogni div occupa metà spazio */
  padding: 20px;
  border-radius: 20px;
  overflow: auto;
  background-color: #fff;
}

.scroll_wrapper {
  height: 100%;
  width: 100%;
  overflow: auto;
}

.full-frame {
  width: 100%;
  height: 95dvh;
  position: relative;
  border-radius: 20px; /* arrotonda anche l’iframe/img */
  border: none; /* per iframe */
}

.icon_svg {
  height: 20px;
  width: auto;
  vertical-align: middle;
  padding: 5px;
}

.menu_opt {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid #e6e6e6;
  border-bottom: 1px solid #e6e6e6;
  padding: 10px;
  margin-bottom: 25px;
}

.menu_opt_back {
  background-color: #f2f4f7;
  height: 50px;
  width: auto;
  border-radius: 10px;
  display: flex; /* Attiva Flexbox */
  align-items: center; /* Allinea verticalmente */
  padding: 0 5px;
}

.menu_opt_button_active {
  display: inline-block;
  background-color: white;
  width: 150px;
  height: 35px;
  line-height: 35px;
  border-radius: 10px;
  padding: 5px;
  cursor: pointer;
  margin: 0 5px 0 5px;
  box-shadow: 0px 0px 2px #f2f4f7;
  color: #101827;
  text-align: center;
  font-weight: 600;
}

.menu_opt_button {
  display: inline-block;
  position: relative;
  width: 150px;
  height: 35px;
  line-height: 35px;
  border-radius: 10px;
  padding: 5px;
  cursor: pointer;
  transition: background-color 0.5s ease;
  color: #667084;
  text-align: center;
  font-weight: 600;
}

.menu_opt_button:hover {
  display: inline-block;
  background-color: white;
  width: 150px;
  height: 35px;
  line-height: 35px;
  border-radius: 10px;
  padding: 5px;
  cursor: pointer;
  font-weight: 600;
}

.loader-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999; /* sopra tutto */
  flex-direction: column;
  text-align: center;
}

/* Loader circolare */
.loader {
  border: 8px solid #f3f3f3;
  border-top: 8px solid #3498db;
  border-radius: 50%;
  width: 60px;
  height: 60px;
  animation: spin 1s linear infinite;
}

/* Animazione rotante */
@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.modal {
  display: none;
  position: fixed;
  z-index: 999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.6);
  align-items: center; /* verticale */
  justify-content: center; /* orizzontale */
}

.modal-content {
  position: relative;
  padding: 0;
  border-radius: 20px;
  width: 90%;
  height: 90vh;
}

.modal-content iframe {
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 20px;
}

.close {
  position: absolute;
  top: 5px;
  right: 5px;
  background-color: white;
  border-radius: 10px;
  cursor: pointer;
}
