/* Reset e base */
* {
  box-sizing: border-box;
}

body {
  font-family: Arial, sans-serif;
  background: #f0f2f5;
  margin: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 60px; /* spazio per navbar fissa */
}

/* Navbar fissa e centrata */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: #333;
  z-index: 1000;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.navbar-container {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 10px 20px;
}

.navbar .brand {
  font-size: 1.8em;
  font-weight: bold;
  color: #ffd700;
  text-decoration: none;
  text-shadow: 1px 1px 2px black;
}

/* Login container */
.login-container {
  background: white;
  padding: 30px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
  width: 100%;
  max-width: 350px;
}

/* Titolo login */
.brand-title {
  font-size: 2em;
  font-weight: bold;
  color: #ffd700;
  text-shadow: 1px 1px 2px black;
  text-align: center;
  margin-bottom: 20px;
}

/* Etichette e input */
label {
  display: block;
  margin-top: 10px;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 4px;
  font-size: 16px; /* evita zoom su mobile */
}

/* Password con icona */
.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-right: 40px;
}

.toggle-password {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 18px;
}

/* Messaggio di errore lato client */
#error-message {
  margin-top: 10px;
  color: red;
  font-size: 14px;
}

/* Messaggio di errore login */
.login-error {
  margin-top: 10px;
  padding: 10px;
  background-color: #ffe0e0;
  color: #b30000;
  border: 1px solid #b30000;
  border-radius: 4px;
  font-size: 14px;
  text-align: center;
}

/* Bottone login */
input[type="submit"] {
  width: 100%;
  padding: 10px;
  margin-top: 20px;
  background-color: #333; /* stesso colore della navbar */
  color: #ffd700;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  text-shadow: 1px 1px 1px black;
  font-size: 16px;
}

input[type="submit"]:hover {
  background-color: #444;
}

/* Responsive */
@media (max-width: 480px) {
  .navbar-container {
    padding: 10px;
  }

  .login-container {
    padding: 20px;
  }

  .brand-title {
    font-size: 1.6em;
  }

  .navbar .brand {
    font-size: 1.5em;
  }
}
