/* ===== BASE ===== */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  background: #f4f6f9;
}
h2 {
  margin-top: 0;
  color: #333;
}

/* ===== LAYOUT ===== */
.page-center {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding-top: 40px;
  padding-bottom: 40px;
}
.login-box {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  width: 600px;
  max-width: 95%;
}

/* ===== FORM ===== */
.form-standard {
  width: 100%;
}
.form-row {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}
.form-row label {
  flex: 0 0 150px;
  text-align: left;
  margin-right: 10px;
}
.form-row input {
  flex: 1;
  padding: 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 14px;
  box-sizing: border-box;
}

/* Campo password con icona occhio */
.pwd-field {
  display: flex;
  align-items: center;
  flex: 1;
  position: relative;
}
.pwd-field input {
  flex: 1;
  padding-right: 35px;
}
.toggle-eye {
  position: absolute;
  right: 10px;
  cursor: pointer;
  color: #555;
  font-size: 1.3rem;   /* ?? INGROSSA ICONA */
  line-height: 1;
}

/* ===== BOTTONI ===== */
.button-row {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}
button {
  padding: 8px 16px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
}
.btn-secondary {
  background: #ff0000;
  color: #fff;
}
.btn-main {
  background: #1e3a8a;
  color: #fff;
}
.btn-small {
  background: green;
  color: #fff;
}

/* ===== OVERLAY ===== */
.overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.3);
  z-index: 9999;
  justify-content: center;
  align-items: center;
}
.overlay.show {
  display: flex;
}
.overlay-content {
  padding: 20px 30px;
  border-radius: 10px;
  text-align: center;
  min-width: 300px;
  max-width: 600px;
  background: transparent;
}
.overlay-msg {
  font-size: 16px;
  font-weight: bold;
  color: #fff;
  padding: 15px;
  border-radius: 8px;
  text-align: center;
  white-space: pre-line;
}
.overlay-msg.success {
  background: green;
}
.overlay-msg.error {
  background: #ff0000;
}

/* ===== OVERLAY CAMBIO PASSWORD ===== */
#overlay-change .overlay-content {
  background: #fff;
  padding: 30px;
  border-radius: 12px;
  width: 600px;
  max-width: 95%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  text-align: left;
}
#overlay-change h3 {
  margin-top: 0;
  margin-bottom: 20px;
  font-size: 20px;
  font-weight: bold;
  color: #333;
  text-align: center;
}

/* Layout a due colonne */
#overlay-change .two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: flex-start;
}
#overlay-change .col-left .form-row {
  display: flex;
  align-items: center;
  margin-bottom: 10px;
}
#overlay-change .col-left label {
  flex: 0 0 150px;
  text-align: left;
  margin-right: 10px;
}
#overlay-change .col-left .pwd-field {
  flex: 1;
  display: flex;
  align-items: center;
}
#overlay-change .col-right {
  font-size: 10px;
  text-align: left;
  margin-left: 70px;
}
#overlay-change .col-right span {
  display: block;
  margin-bottom: 6px;
}
#overlay-change .col-right .valid { color: green; }
#overlay-change .col-right .invalid { color: #ff0000; }

/* Bottoni overlay */
#overlay-change .button-row {
  display: flex;
  justify-content: flex-end;
  gap: 15px;
  margin-top: 20px;
}
#overlay-change .button-row button {
  min-width: 120px;
  height: 40px;
  font-weight: bold;
}