/* === Stile Generale === */
html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: Helvetica, Arial, sans-serif;
  background-color: #f4f7fa;
  color: #222;
  display: flex;
  flex-direction: column;
}

/* === Header e Footer === */
header {
  background-color: #004080;
  color: white;
  height: 80px;
  display: flex;
  align-items: center;
  padding: 0 20px;
}

header h1 {
  color: white;
  margin: 0;
  font-size: 2rem;
}
.modal {
  display: none;
  position: fixed;
  z-index: 999;
  padding-top: 60px;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.9);
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 80%;
  border-radius: 10px;
  box-shadow: 0 0 15px #000;
}

.close {
  position: absolute;
  top: 30px;
  right: 40px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
}



.header-inner {
  max-width: 800px;
  width: 100%;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;  /* centra orizzontalmente */
}


.logo-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo {
  height: 95px;
  width: auto;
  display: block;
  margin: 0;
  padding: 0;
}

/* Footer */
footer {
  background-color: #004080;
  color: white;
  padding: 20px;
  text-align: center;
}

footer h1 {
  margin: 0;
  font-size: 1.5rem;
}
.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 1rem;
}

.footer-logo {
  height: 60px;
  width: auto;
}


/* === Contenuto Principale === */
main {
  max-width: 800px;
  margin: 40px auto;
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  flex: 1; /* fa espandere il main per spingere il footer in basso */
}

/* === Titoli === */
h1, h2 {
  color: #004080;
}

h3 {
  font-weight: bold;
}

/* === Pulsanti principali (login / invia) === */
.secure-login-btn {
  background-color: #004080;
  color: white;
  border: none;
  padding: 14px 24px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 1.2rem;
  font-weight: bold;
  letter-spacing: 0.5px;
  transition: background-color 0.3s ease, transform 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.secure-login-btn:hover {
  background-color: #002f5d;
  transform: scale(1.02);
}

/* === Titolo h2 con linea sottostante === */
h2 {
  position: relative;
  padding-bottom: 10px;
  margin-bottom: 20px;
}

h2::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  background: #004080;
  margin-top: 8px;
}

/* === Form === */
form {
  max-width: 800px;
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  flex: 1 1 300px;
}

label {
  font-weight: 600;
  margin-bottom: 6px;
  color: #004080;
}

.input-wrapper {
  position: relative;
  margin-bottom: 0;
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="date"],
select {
  padding: 12px 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 1.2rem;
  width: 100%;
  box-sizing: border-box;
  transition: border-color 0.2s ease;
  background-color: white;
  color: #222;
  appearance: none;
}

input[type="submit"],
button[type="submit"] {
  background-color: #004080;
  color: white;
  border: none;
  padding: 14px 20px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.2rem;
  transition: background-color 0.2s ease;
  width: 100%;
}

input[type="submit"]:hover,
button[type="submit"]:hover {
  background-color: #002f5d;
}

/* === Link "Password dimenticata?" === */
.form-group a {
  margin-top: 8px;
  font-size: 0.9rem;
  color: #004080;
  text-decoration: none;
}

.form-group a:hover {
  text-decoration: underline;
}

/* === Pulsante invio dedicato === */
.btn-invia {
  background-color: #004080;
  color: white;
  border: none;
  padding: 16px 28px;
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.2s ease;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-invia:hover {
  background-color: #002f5d;
  transform: scale(1.02);
}

/* === Messaggi di errore === */
.error-message {
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 4px;
  color: #d93025;
  font-size: 0.85rem;
}

/* === Schermata Area Lavoratore === */
.main-lavoratore {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
}

.button-container {
  display: flex;
  gap: 30px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 30px;
}

.btn {
  padding: 16px 32px;
  background-color: #007BFF;
  color: white;
  text-decoration: none;
  font-size: 18px;
  border-radius: 8px;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn:hover {
  background-color: #0056b3;
  transform: scale(1.02);
}

/* === Responsive === */
@media (max-width: 600px) {
  main {
    margin: 20px;
    padding: 20px;
  }

  form {
    flex-direction: column;
    max-width: 100%;
  }

  .form-group {
    flex: 1 1 100%;
  }

  input[type="submit"],
  button[type="submit"] {
    width: 100%;
  }

  .form-group a {
    margin-top: 10px;
  }
}

/* === Messaggio di benvenuto con animazione === */
#welcome-message {
  font-size: 1.6rem;
  font-weight: bold;
  color: #004080;
  margin-bottom: 30px;
  text-align: center;
  opacity: 0;
  animation: fadeIn 1s ease-in-out forwards;
}

@keyframes fadeIn {
  to {
    opacity: 1;
  }
}






