@font-face {
  font-family: 'Poppins';
  src: url('../fonts/Poppins-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
}

@font-face {
  font-family: 'Poppins';
  src: url('../fonts/Poppins-SemiBold.ttf') format('truetype');
  font-weight: 600;
  font-style: normal;
}

html {
  font-size: 16px;
}

body {
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
  margin: 0;
  color: #000;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-x: hidden; /* ✅ evita scroll orizzontali e ombre troncate */
}

header {
  background-color: #ffffff;
  color: #004080;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 15px 25px;
  border-bottom: 2px solid #dcebf4;
}

header .logo {
  width: 144px;
  height: auto;
  max-height: 73px;
}

.close-btn {
  background: transparent;
  border: none;
  font-size: 1.5rem;
  color: #004080;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

main {
  flex: 1;
  background-color: #dcebf4;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  box-sizing: border-box;
  color: #0075be;
  overflow-x: hidden; /* ✅ Previene scroll orizzontale che potrebbe tagliare ombre */
}

footer {
  margin-top: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.footer-top-white {
  display: block;
  width: 100%;
  height: 20px;
  background-color: white;
  flex-shrink: 0;
}

.footer-content {
  background-color: #dcebf4;
  color: #000;
  text-align: center;
  padding: 20px 15px;
  font-size: 0.9rem;
}

.footer-content p {
  margin: 5px 0;
}

.footer-content p:first-child {
  color: #0075be;
  font-weight: 600;
  font-size: 1.2rem;
  line-height: 1.4;
}

@media (max-width: 600px) {
  html {
    font-size: 17px;
  }

  header .logo {
    width: 120px;
  }

  .footer-content p {
    font-size: 0.6rem;
  }

  .footer-content p:first-child {
    font-size: 0.8rem;
  }

  main .container {
    padding: 10px;
    text-align: center;
  }

  .close-btn {
    font-size: 2rem;
  }
}

.login-container {
  width: calc(100% - 40px); /* forza margine visivo anche se padre è stretto */
  max-width: 400px;
  margin: 60px auto;
  padding: 40px 30px;
  background-color: #ffffff;
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 117, 190, 0.2);
  color: #004080;
  text-align: center;
  box-sizing: border-box;
}



.login-container h2 {
  font-size: 1.8rem;
  color: #0075be;
  margin-bottom: 25px;
}

.form-group {
  margin-bottom: 20px;
  text-align: left;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #004080;
}

.form-input {
  width: 90%;
  padding: 10px 14px;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-family: 'Poppins', sans-serif;
  font-size: 1rem;
}

.form-button {
  background-color: #0075be;
  color: white;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 5px;
  width: 80%;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.form-button:hover {
  background-color: #005a94;
}

.form-error {
  color: red;
  margin-top: 15px;
  font-size: 0.9rem;
}

@media (max-width: 500px) {
  .login-container {
    margin: 30px 15px;
    padding: 30px 20px;
  }

  .login-container h2 {
    font-size: 1.5rem;
  }

  .form-button {
    padding: 10px 15px;
  }
}

.benemerenze-container {
  padding: 20px;
}

.benemerenze-title {
  font-size: 1.8rem;
  color: #0075be;
  font-weight: bold;
  margin-bottom: 20px;
}

.admin-container {
  text-align: center;
  padding: 50px 20px;
}

.admin-title {
  font-size: 2.2rem;
  color: #0075be;
  font-weight: 700;
  margin-bottom: 10px;
}

.admin-subtitle {
  font-size: 1.2rem;
  margin-bottom: 30px;
  color: #0075be;
}

.admin-links {
  margin-bottom: 30px;
}

.admin-link {
  display: inline-block;
  padding: 12px 25px;
  background-color: #ffffff;
  border: 2px solid #0075be;
  color: #0075be;
  font-weight: 600;
  text-decoration: none;
  border-radius: 8px;
  font-family: 'Poppins', sans-serif;
  transition: background-color 0.3s, color 0.3s;
}

.admin-link:hover {
  background-color: #0075be;
  color: #ffffff;
}

.admin-logout {
  display: inline-block;
  padding: 10px 22px;
  background-color: #0075be;
  color: #ffffff;
  font-weight: bold;
  border: none;
  border-radius: 6px;
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
  transition: background-color 0.3s ease;
}

.admin-logout:hover {
  background-color: #005b94;
}

.filters label {
  font-weight: 500;
  margin-right: 5px;
  color: #0075be;
  font-family: 'Poppins', sans-serif;
}

.filters select {
  padding: 5px 10px;
  border-radius: 5px;
  border: 1px solid #ccc;
  font-family: 'Poppins', sans-serif;
}

.ticket-welcome, .ticket-invalid {
  text-align: center;
  margin: 40px auto;
  padding: 20px;
  background: #dcebf4;
  border-radius: 8px;
  max-width: 600px;
}

.ticket-welcome h2 {
  color: #0075be;
}

.ticket-invalid h2 {
  color: red;
}

.ticket-welcome {
  max-width: 600px;
  margin: auto;
  padding: 2em;
  background-color: #f8f9fa;
  border-radius: 10px;
  font-family: "Helvetica", sans-serif;
}

.ritiro-box {
  margin: 1.5em 0;
  background-color: #e9ecef;
  padding: 1em;
  border-radius: 6px;
  font-size: 1.1em;
}

.ritiro-form {
  margin-top: 2em;
}

.select-container {
  margin-top: 0.5em;
  margin-bottom: 1.5em;
}

.form-select {
  width: 80%;
  padding: 10px 12px;
  font-size: 1em;
  line-height: 1.5;
  color: #495057;
  background-color: #fff;
  background-clip: padding-box;
  border: 1px solid #ced4da;
  border-radius: 0.375rem;
  transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' width='10' height='10' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M70 90 L100 50 H40 Z' fill='%23333'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 1rem;
}

.form-select:focus {
  border-color: #80bdff;
  outline: 0;
  box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

.update-btn {
  background-color: #0069d9;
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 5px;
  font-weight: bold;
  cursor: pointer;
}

.update-btn:hover {
  background-color: #0056b3;
}

.ringraziamento {
  margin-top: 2.5em;
  font-style: italic;
  text-align: center;
  color: #444;
}
