* {
  box-sizing: border-box;
}
.np-access {
  margin: 0;
  background: #f6f8fc;
  color: #111f3d;
  font:
    16px/1.4 Arial,
    Helvetica,
    sans-serif;
  min-height: 100svh;
  -webkit-font-smoothing: antialiased;
}
.access-header {
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px max(20px, calc((100vw - 1100px) / 2));
  border-bottom: 1px solid #d9e3f1;
  background: #fff;
}
.access-brand {
  font-size: 19px;
  font-weight: 900;
  letter-spacing: -0.065em;
  line-height: 0.9;
  text-decoration: none;
  color: inherit;
}
.back-site {
  font-size: 12px;
  font-weight: 700;
  color: inherit;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
}
.back-site span {
  color: #287ebc;
  font-size: 18px;
}
.access-main {
  min-height: calc(100svh - 70px);
  display: grid;
  align-content: center;
  justify-items: center;
  padding: 24px 16px max(24px, env(safe-area-inset-bottom));
}
.access-card {
  width: 100%;
  max-width: 420px;
  padding: 28px;
  background: #fff;
  border: 1px solid #d9e3f1;
  border-radius: 20px;
  box-shadow: 0 12px 40px #111f3d0a;
}
.access-eyebrow {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #287ebc;
  font-weight: 800;
  margin: 0 0 8px;
}
.access-heading h1 {
  font-size: 28px;
  line-height: 1.1;
  letter-spacing: -0.045em;
  margin: 0 0 9px;
}
.access-heading > p:last-child {
  font-size: 14px;
  line-height: 1.4;
  color: #64728b;
  margin: 0;
}
.access-heading {
  margin-bottom: 20px;
}
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: #edf2f9;
  padding: 4px;
  border-radius: 11px;
  gap: 4px;
  margin-bottom: 20px;
}
.tabs button {
  background: transparent;
  color: #586985;
  border: 0;
  border-radius: 8px;
  min-height: 40px;
  font:
    700 14px Arial,
    Helvetica,
    sans-serif;
  cursor: pointer;
}
.tabs button[aria-pressed="true"] {
  background: #111f3d;
  color: #fff;
  box-shadow: 0 2px 6px #111f3d15;
}
.field {
  display: block;
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 700;
}
.field input {
  display: block;
  width: 100%;
  min-width: 0;
  height: 48px;
  margin-top: 6px;
  border: 1px solid #cbd8e8;
  background: #fff;
  border-radius: 9px;
  padding: 0 13px;
  font:
    16px Arial,
    Helvetica,
    sans-serif;
  color: #111f3d;
}
.field input::placeholder {
  color: #8b96a8;
}
.field input:focus {
  border-color: #47a5e7;
  outline: 2px solid #47a5e726;
}
.primary {
  width: 100%;
  height: 48px;
  margin-top: 4px;
  border: 0;
  border-radius: 9px;
  background: #111f3d;
  color: #fff;
  font:
    700 15px Arial,
    Helvetica,
    sans-serif;
  cursor: pointer;
}
.text-button {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: 10px 0 0;
  border: 0;
  background: transparent;
  color: #276b9b;
  font:
    600 13px Arial,
    Helvetica,
    sans-serif;
  cursor: pointer;
}
button:disabled {
  opacity: 0.55;
  cursor: wait;
}
#verify input {
  text-align: center;
  letter-spacing: 0.28em;
  font-size: 21px;
}
#message {
  font-size: 12px;
  line-height: 1.4;
  color: #425570;
  background: #edf4fc;
  border-radius: 8px;
  padding: 10px;
  margin: 12px 0 0;
  overflow-wrap: anywhere;
}
#message:empty {
  display: none;
}
[hidden] {
  display: none !important;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #47a5e7;
  outline-offset: 3px;
}
@media (max-width: 600px) {
  .access-header {
    height: 64px;
    padding: 10px 18px;
  }
  .access-main {
    min-height: calc(100svh - 64px);
    padding: 16px 16px max(16px, env(safe-area-inset-bottom));
  }
  .access-card {
    padding: 22px;
    border-radius: 17px;
  }
}
@media (max-height: 700px) and (max-width: 600px) {
  .access-card {
    padding: 18px;
  }
  .access-heading {
    margin-bottom: 16px;
  }
  .access-heading h1 {
    font-size: 25px;
  }
  .tabs {
    margin-bottom: 16px;
  }
  .field {
    margin-bottom: 12px;
  }
  .access-main {
    padding-top: 12px;
    padding-bottom: 12px;
  }
}
@media (max-height: 520px) {
  .access-main {
    align-content: start;
  }
}
@media (prefers-reduced-motion: no-preference) {
  button {
    transition: background 0.15s ease;
  }
}

.remember-field {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  margin: 0 0 5px;
  font-size: 12px;
  color: #64728b;
  cursor: pointer;
}
.remember-field input {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  accent-color: #111f3d;
  margin: 0;
}

@media (max-height: 700px) and (max-width: 600px) {
  .access-header {
    height: 60px;
  }
  .access-main {
    min-height: calc(100svh - 60px);
    padding-top: 8px;
    padding-bottom: 8px;
  }
  .access-card {
    padding: 16px;
  }
  .access-heading {
    margin-bottom: 12px;
  }
  .access-heading h1 {
    font-size: 24px;
    margin-bottom: 6px;
  }
  .access-eyebrow {
    margin-bottom: 6px;
  }
  .tabs {
    margin-bottom: 14px;
  }
  .tabs button {
    min-height: 36px;
  }
  .field {
    margin-bottom: 10px;
  }
  .field input {
    height: 46px;
    margin-top: 5px;
  }
  .remember-field {
    min-height: 32px;
    margin-bottom: 2px;
  }
  .primary {
    height: 46px;
    margin-top: 2px;
  }
}

/* Mostra il collegamento alla registrazione soltanto per email inesistente. */
#register-now[hidden] {
  display: none !important;
}

/* V15: Conferma codice ed errori restano visibili, nessun avviso a scomparsa. */
#message:not(:empty) {
  display: block;
  position: relative;
  min-height: 45px;
  border-left: 4px solid #438fc8;
  padding: 13px 15px;
  font-size: 13px;
  line-height: 1.5;
}
#message[data-kind="error"] {
  background: #fff2ef;
  color: #872d23;
  border-left-color: #ca4b38;
}
#message[data-kind="success"] {
  background: #eaf6ef;
  color: #22593d;
  border-left-color: #3c9e65;
}
#register-now:not([hidden]) {
  color: #174f82;
  font-weight: 800;
  border: 1px solid #cbddec;
  background: #eff7ff;
  border-radius: 9px;
  padding: 12px;
  margin-top: 9px;
}

/* V42: scelta newsletter facoltativa, leggibile anche su mobile. */
.newsletter-optin {align-items:flex-start;gap:10px;line-height:1.5;margin:8px 0 12px;padding:12px;border:1px solid #dce7f1;border-radius:10px;background:#f7fbfe;}
.newsletter-optin input {margin-top:2px; flex:0 0 17px;}
.newsletter-optin span {flex:1;min-width:0;}
.newsletter-optin a {color:#185783;font-weight:700;}
