/* Prevent zoom on input focus */
input,
textarea,
select {
  font-size: 16px !important; /* Prevents zoom on iOS */
  transform: none !important;
}

html,
body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: "Roboto", Arial, sans-serif;
  overflow-x: hidden;
  background-color: #373737 !important;
}

/* Fix per dispositivi Windows con barra delle applicazioni */
@media screen and (max-height: 600px) {
  .accedi-registrati-page {
    height: calc(100vh - 65px);
  }

  .accedi-registrati-page-container {
    padding: 0px;
  }

  #accedi-page form,
  #registrati-page form {
    margin: 5px auto;
    padding: 0px 20px 20px 20px;
    gap: 15px;
  }
}

/* Fix per schermi molto piccoli */
@media screen and (max-height: 500px) {
  .accedi-registrati-page {
    height: calc(100vh - 65px);
    border-radius: 0px;
  }

  .accedi-registrati-page-container {
    padding: 0px;
  }

  #accedi-page form,
  #registrati-page form {
    margin: 5px auto;
    padding: 0px 15px 15px 15px;
    gap: 12px;
  }

  #accedi-page input,
  #registrati-page input:not(#terms),
  #registrati-page select {
    padding: 10px 12px;
    font-size: 1rem;
  }
}

.page-wrapper {
  min-height: 100vh;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.sfondo-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 110vh;
  overflow: hidden;
  z-index: 0;
}
.sfondo {
  min-width: 100%;
}

.profile-main {
  position: relative;
  height: calc(100dvh);
  max-height: calc(100dvh);
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  background: transparent;
  padding: 0px !important;
  z-index: 1;
  overflow: hidden;
  background: #ffffff;
}

.accedi-registrati-page {
  position: relative;
  width: 100%;
  max-width: 100%;
  height: calc(100dvh - 65px);
  background: rgb(255, 255, 255);
  backdrop-filter: blur(20px);
  border-radius: 0px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
  border: 0px solid orange;
  top: 65px;
}

.sfondo-login {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  min-width: 100vw;
  min-height: 100%;
  height: 100%;
  max-height: 100%;
  max-width: 100vw;
  box-sizing: border-box;
  overflow: hidden;
  border: 0px solid red;
  z-index: 0;
  filter: saturate(0.6);
}
.sfondo-login-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1;
}
.sfondo-login img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Nascondi le pagine accedi, scelta tipo account e registrati inizialmente (prima che il JS si carichi) */
#accedi-page,
#choose-account-type-page,
#registrati-page {
  display: none;
  /* Previeni lo scroll automatico del browser all'elemento con hash */
  scroll-margin-top: 65px;
  scroll-padding-top: 65px;
}

/* Schermata scelta tipo account */
.account-type-selection {
  display: flex;
  gap: 30px;
  justify-content: center;
  align-items: stretch;
  flex-wrap: wrap;
  padding: 40px 20px;
  max-width: 900px;
  margin: 0 auto;
}

.account-type-card {
  flex: 1;
  min-width: 300px;
  max-width: 400px;
  background: #ffffff;
  border-radius: 20px;
  padding: 40px 30px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: 2px solid transparent;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.account-type-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #e60000, #ff6b6b);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.account-type-card:hover::before {
  transform: scaleX(1);
}

.account-type-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
  border-color: #e60000;
}

.account-type-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, #e60000, #cc0000);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #ffffff;
  margin-bottom: 25px;
  box-shadow: 0 8px 20px rgba(230, 0, 0, 0.25);
}

.account-type-card h3 {
  font-size: 1.6rem;
  font-weight: 700;
  color: #2c3e50;
  margin-bottom: 15px;
  line-height: 1.3;
}

.account-type-card p {
  font-size: 1rem;
  color: #6c757d;
  line-height: 1.6;
  margin-bottom: 30px;
  flex-grow: 1;
}

.account-type-btn {
  width: 100%;
  padding: 14px 28px;
  background: linear-gradient(135deg, #e60000, #cc0000);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: "Roboto", sans-serif;
  box-shadow: 0 4px 15px rgba(230, 0, 0, 0.3);
}

.account-type-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(230, 0, 0, 0.4);
  background: linear-gradient(135deg, #cc0000, #b30000);
}

.account-type-btn i {
  font-size: 0.9rem;
  transition: transform 0.3s ease;
}

.account-type-btn:hover i {
  transform: translateX(4px);
}

.registrazione-contents {
  width: 100%;
  min-height: fit-content;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  overflow-y: visible;
  background-color: transparent;
  padding: 40px 20px;
  position: relative;
}

.registrazione-contents > .modern-registration-form {
  flex-shrink: 0;
  margin-bottom: 0;
}

.registrazione-contents > .btn-annulla-registrazione {
  flex-shrink: 0;
  margin-top: 30px;
  margin-bottom: 20px;
  order: 999;
}

/* Registration Hero Sections */
.registration-hero {
  min-width: 75%;
  width: auto;
  max-width: 100%;
  height: auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  margin: 0 auto 40px auto;
  padding: 0 0px 0px 40px;
  border-radius: 16px;
  /*
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2); */
  box-shadow: none;
}

/* Riduci margin-bottom per lo step 3 (abbonamento) */
.registration-hero-step3 {
  margin-bottom: 20px;
  box-shadow: none !important;
}

/* Rimuovi box-shadow per lo step 2 (fatturazione) */
.registration-hero-step2 {
  box-shadow: none !important;
}

.registration-hero-content {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 60px;
  flex-wrap: wrap;
  min-width: 0;
  width: auto;
  max-width: 100%;
  height: auto;
  box-sizing: border-box;
}

.registration-hero-text {
  flex: 1;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
}

.registration-hero-image {
  flex: 1;
  min-width: 300px;
  max-width: 500px;
  max-height: 250px;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

.registration-hero-image img {
  width: 100%;
  height: 100%;
  max-height: 350px;
  object-fit: cover;
  display: block;
}

.registration-title {
  font-size: 2.5rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 12px 0;
  line-height: 1.2;
}

.registration-subtitle {
  font-size: 1.2rem;
  color: #666;
  margin: 0 0 22px 0;
  line-height: 1.6;
}

.registration-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 1.05rem;
  color: #333;
}

.feature-item i {
  font-size: 1.3rem;
  color: #e60000;
  width: 24px;
  text-align: center;
}

/* Entrambi i blocchi hanno testo a sinistra e foto a destra */
.registration-hero-content {
  flex-direction: row;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .registration-hero {
    margin-bottom: 30px;
    padding: 0 10px;
  }

  .registration-hero-content {
    flex-direction: column;
    gap: 30px;
  }

  .registration-hero-content {
    flex-direction: column;
  }

  .registration-hero-image {
    display: none !important;
  }

  .registration-title {
    font-size: 1.8rem;
  }

  .registration-subtitle {
    font-size: 1rem;
  }

  .feature-item {
    font-size: 0.95rem;
  }
}

.accedi-registrati-page-header {
  display: none;
}

h2 {
  text-align: center;
  margin: 0;
  font-size: 20px;
  font-weight: 400;
  color: #000000;
}

.accedi-registrati {
  display: none;
}

.accedi-registrati button {
  width: 25%;
  margin: auto;
  padding: 12px 0;
  font-size: 18px;
  font-weight: 400;
  border: 0.5px solid #e1e1e1;
  border-radius: 10px;
  background: #1a8dff;
  cursor: pointer;
  transition:
    background 0.1s,
    transform 0.1s,
    box-shadow 0.1s;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #fff;
}
.accedi-registrati button:hover {
  background: #0080f0;
  transform: scale(1.01);
}
.accedi-registrati button:active {
  transform: scale(0.99);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}
.accedi-registrati button b {
  margin-left: 5px;
}

/* --- FORM LOGIN/REGISTRAZIONE --- */

.accedi-registrati-page-container {
  position: relative;
  width: 100%;
  height: 100%;
  max-height: calc(100dvh - 65px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0px;
  box-sizing: border-box;
}
#registrati-page .accedi-registrati-page-container {
  justify-content: flex-start;
}
#accedi-page form,
#registrati-page form {
  border: none;
  box-sizing: border-box;
  padding: 0px 30px 30px 30px;
  max-width: fit-content;
  width: 100%;
  min-height: 0;
  height: auto;
  margin: 0px auto 0px auto;
  border-radius: 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: transparent;
  box-shadow: none;
  position: relative;
  overflow: visible;
}
#registrati-page form {
  margin: 0px auto 10px auto !important;
}

/* Riduci spazio tra terms e reCAPTCHA */
#registrati-page form .g-recaptcha {
  margin-top: 0px;
  margin-bottom: 0;
  position: relative;
  z-index: 1;
  min-height: 78px; /* Altezza minima del widget reCAPTCHA */
}
#accediForm h3 {
  color: #000000;
  font-size: 1.18rem;
  font-weight: 700;
  margin: 20px 0 12px 0;
  text-align: center;
}
#accedi-page input,
#registrati-page input:not(#terms),
#registrati-page select {
  width: 100%;
  padding: 13px 16px;
  font-size: 1.08rem;
  border: none;
  border-bottom: 2px solid #e1e4e8;
  border-radius: 0px;
  background: transparent;
  margin: 0;
  transition:
    border 0.2s,
    box-shadow 0.2s;
  box-sizing: border-box;
  min-width: 300px;
}
#accedi-page input:not(#terms):focus,
#registrati-page input:not(#terms):focus,
#registrati-page select:focus {
  border-bottom-color: #1a8dff;
  outline: none;
  box-shadow: none;
}
#registrati-page select {
  height: 44px;
  font-size: 1.08rem;
  background: transparent;
}

/* --- STEP REGISTRAZIONE --- */
.registrazione-uno,
.registrazione-due {
  background: #fff;
  border-radius: 12px;
  padding: 24px 0 10px 0;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.registrazione-tre,
.registrazione-quattro {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  background: #fff;
  border-radius: 12px;
  padding: 24px 0 10px 0;
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
}

/* --- GRIGLIA INPUT DUE COLONNE --- */
.formato-uno,
.formato-due {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 24px;
  width: 100%;
}
@media (max-width: 700px) {
  .formato-uno,
  .formato-due {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}
.formato-uno input:not(#terms),
.formato-uno select,
.formato-due input:not(#terms) {
  width: 100%;
  min-width: 0;
  margin: 0;
  border: none;
  border-bottom: 2px solid #e1e4e8;
  border-radius: 0px;
  background: transparent;
}

/* Stile specifico per il select "Seleziona il tipo di account" */
select[name="tipo_account"] {
  width: 100%;
  min-width: 0;
  margin: 0;
  border: none;
  border-bottom: 2px solid #e1e4e8;
  background: transparent;
  padding: 12px 30px 12px 0;
  font-size: 16px;
  color: #a1a1a1;
  transition: border-color 0.3s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  cursor: pointer;
  position: relative;
}

select[name="tipo_account"]:focus {
  outline: none;
  border-bottom-color: #e60000;
}

select[name="tipo_account"]:hover {
  border-bottom-color: #ccc;
}

/* Freccia personalizzata per il select */
select[name="tipo_account"] {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 0px center;
  background-size: 16px;
  padding-right: 24px;
}

select[name="tipo_account"]:focus {
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23e60000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
}

/* --- TERMS --- */
.terms {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  margin: 20px auto 0px auto;
  padding: 0;
  box-sizing: border-box;
}
.terms-text {
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  text-align: center;
}
.terms label {
  font-size: 1rem;
  color: #383838;
  font-weight: 500;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  white-space: nowrap;
  text-align: center;
}
.terms input[type="checkbox"] {
  accent-color: #1a8dff;
  min-width: 18px;
  width: 18px !important;
  max-width: 18px !important;
  min-height: 18px !important;
  margin: 0 auto !important;
  padding: 0;
}

/* --- BUTTONS --- */
.btn-annulla-registrazione {
  width: fit-content !important;
  padding-right: 15px !important;
  padding-left: 15px !important;
  margin: 0 auto !important;
}
.btn-annulla-registrazione:hover {
  background-color: #e60000 !important;
  color: #fff !important;
}
#accedi-page button:not(.scopri-di-piu-btn-abbonamento):not(.abbonamento-btn),
#registrati-page
  button:not(.scopri-di-piu-btn-abbonamento):not(.abbonamento-btn),
.continua-step1-btn,
.continua-due-btn,
.salva-metodo-btn,
.paypal-btn,
.registrazione-btn {
  width: 100%;
  padding: 12px 0;
  border-radius: 20px;
  font-size: 1.08rem;
  font-weight: 600;
  border: 1px solid #e1e4e8;
  background: #ffffff;
  color: #393939;
  margin: 10px 0 0 0;
  box-shadow: 0 2px 10px rgba(26, 141, 255, 0.07);
  cursor: pointer;
  transition:
    background 0.18s,
    box-shadow 0.18s,
    transform 0.12s;
  text-align: center;
}
#accedi-page
  button:not(.scopri-di-piu-btn-abbonamento):not(.abbonamento-btn):hover,
#registrati-page
  button:not(.scopri-di-piu-btn-abbonamento):not(.abbonamento-btn):hover,
.continua-step1-btn:hover,
.continua-due-btn:hover,
.salva-metodo-btn:hover,
.paypal-btn:hover,
.registrazione-btn:hover {
  background: #0080f0;
  box-shadow: 0 4px 16px rgba(26, 141, 255, 0.13);
  transform: translateY(-2px);
  color: #fff;
}
#accedi-page
  button:not(.scopri-di-piu-btn-abbonamento):not(.abbonamento-btn):active,
#registrati-page
  button:not(.scopri-di-piu-btn-abbonamento):not(.abbonamento-btn):active,
.continua-step1-btn:active,
.continua-due-btn:active,
.salva-metodo-btn:active,
.paypal-btn:active,
.registrazione-btn:active {
  background: #0056b3;
  transform: scale(0.98);
}
#accedi-page button p,
#registrati-page button p,
.continua-step1-btn p,
.continua-due-btn p,
.salva-metodo-btn p,
.paypal-btn p,
.registrazione-btn p {
  margin: 0 auto;
  text-align: center;
}
.seleziona-metodo-btn {
  text-align: center !important;
  align-items: center !important;
  justify-content: center !important;
  display: flex !important;
  flex-direction: column !important;
  padding: 12px !important;
  width: fit-content !important;
}
.registrazione-btn {
  text-align: center !important;
  align-items: center !important;
  justify-content: center !important;
  flex-direction: column !important;
  padding: 12px !important;
}

/* --- BACK ARROW --- */
.back-arrow {
  display: flex;
  align-items: center;
  gap: 8px;
  background-color: #ffffff;
  border-radius: 20px;
  border: 1px solid #e1e1e1;
  box-shadow: 0 2px 8px rgba(26, 141, 255, 0.07);
  padding: 10px 15px;
  color: #232323;
  font-size: 1.08rem;
  font-weight: 500;
  cursor: pointer;
  margin: 0px auto 0 auto;
  width: fit-content;
  transition: color 0.18s;
  user-select: none;
}
.back-arrow-due,
.back-arrow-tre,
.back-arrow-quattro {
  position: absolute;
  top: 25px;
  left: 25px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: #232323;
  font-size: 1.08rem;
  font-weight: 500;
  cursor: pointer;
  margin: 0px auto 0 auto;
  transition: color 0.18s;
  user-select: none;
  padding: 0;
  border: none !important;
}
.back-arrow:hover,
.back-arrow-due:hover,
.back-arrow-tre:hover,
.back-arrow-quattro:hover {
  color: #0077ff;
  transform: translateX(-4px) scale(1.04);
}
.back-arrow i,
.back-arrow-due i,
.back-arrow-tre i,
.back-arrow-quattro i {
  font-size: 1.1em;
  transition:
    color 0.2s,
    transform 0.2s;
}

/* --- STEP TITLES --- */
#registrati-page h3,
.registrazione-tre h3,
.registrazione-quattro h3 {
  color: #000000;
  font-size: 1.18rem;
  font-weight: 700;
  margin: 20px 0 30px 0;
  text-align: center;
}

/* --- ABBONAMENTI (UNIFORME CON ACCOUNT) --- */
.abbonamenti-grid {
  display: flex;
  flex-direction: row;
  gap: 20px;
  justify-content: center;
  align-items: stretch;
  margin: 30px 0 0 0;
  overflow-x: visible !important;
  overflow-y: visible !important;
  padding: 0px 0;
}
.abbonamento-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
  width: 270px;
  min-width: 220px;
  max-width: 100%;
  padding: 28px 22px 22px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  transition:
    box-shadow 0.2s,
    transform 0.2s;
  position: relative;
  overflow: visible;
  cursor: pointer;
}
.abbonamento-card.gratis {
  background: #fff;
  border: 2px solid #919191;
}
.abbonamento-card.plus {
  background: #fff;
  border: 2px solid #1a8dff;
}
.abbonamento-card.premium {
  background: #fff;
  border: 2px solid #e60000;
}
.abbonamento-card.prime {
  background: #fff;
  border: 2px solid #9333ea;
}
.abbonamento-card:hover .scopri-di-piu-btn-abbonamento {
  display: block;
  transition: all 0.3s ease;
}
/* Badge "Scopri di più" per abbonamenti - nascosto su desktop, visibile solo su mobile */
.abbonamento-card .scopri-di-piu-btn-abbonamento {
  display: none;
  position: absolute;
  top: 10px;
  right: 10px;
  color: white;
  padding: 6px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  border: none;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
}

.abbonamento-card .scopri-di-piu-btn-abbonamento.plus {
  background: rgba(26, 141, 255, 0.9);
}
.abbonamento-card .scopri-di-piu-btn-abbonamento.premium {
  background: rgba(230, 0, 0, 0.9);
}
.abbonamento-card .scopri-di-piu-btn-abbonamento.prime {
  background: rgba(147, 51, 234, 0.9);
}
.abbonamento-card .scopri-di-piu-btn-abbonamento:hover {
  opacity: 0.9;
  transform: scale(1.05);
}

@media (max-width: 768px) {
  .abbonamento-card .scopri-di-piu-btn-abbonamento {
    display: block;
    padding: 4px 8px;
  }
}

/* Badge "Il più scelto" per Premium */
.premium-popular-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: transparent;
  color: #e60000;
  font-size: 14px;
  font-weight: 700;
  padding: 6px 10px;
  box-shadow: none;
  text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.2);
  z-index: 10;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Selected state: check bianco in cerchio verde in alto a destra sulla card */
.abbonamento-card.selected {
  position: relative;
}

.abbonamento-card.selected::before {
  display: flex;
  align-items: center;
  justify-content: center;
  content: "\f00c";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 12px;
  color: white;
  position: absolute;
  top: -12px;
  right: 0px;
  width: 24px;
  height: 24px;
  background: linear-gradient(135deg, #00bc16, #009912);
  border-radius: 50%;
  box-shadow: 0 2px 8px rgba(0, 188, 22, 0.4);
  z-index: 11;
}

.abbonamento-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
}
.abbonamento-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 12px;
}
.abbonamento-header i {
  font-size: 2.2rem;
  margin-bottom: 6px;
}
.abbonamento-card.gratis .abbonamento-header i {
  color: #919191;
}
.abbonamento-card.plus .abbonamento-header i {
  color: #1a8dff;
}
.abbonamento-card.premium .abbonamento-header i {
  color: #e60000;
}
.abbonamento-card.prime .abbonamento-header i {
  color: #9333ea;
}
.abbonamento-header h4 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
  color: #000000;
}
.abbonamento-body ul {
  list-style: none;
  padding: 0;
  margin: 0 0 10px 0;
  text-align: left;
}
.abbonamento-body li {
  font-size: 1rem;
  color: #000000;
  margin-bottom: 6px;
  padding-left: 0;
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Icona chevron-up verde per i benefits inclusi (pro) */
.abbonamento-body li::before {
  content: "\f077";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: #00ab3f; /* Verde per il chevron-up */
  background: transparent;
  font-size: 15px;
  width: auto;
  height: auto;
  border: none;
  filter: none;
  min-height: auto;
  box-sizing: border-box;
  margin-right: 8px;
  flex-shrink: 0;
}

/* Icona chevron-down rosso per i benefits non inclusi (contro) */
.abbonamento-body li.not-included::before {
  content: "\f078";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  color: #d70000; /* Rosso per il chevron-down */
  background: transparent;
  font-size: 15px;
  width: auto;
  height: auto;
  border: none;
  filter: none;
  min-height: auto;
  box-sizing: border-box;
}
.abbonamento-btn {
  color: #ffffff !important;
  border: 2px solid;
  border-radius: 20px;
  padding: 10px 22px;
  font-size: 1rem;
  font-weight: 600;
  margin-top: 10px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: transparent;
}

/* Stili specifici per i bottoni di ogni abbonamento */
.abbonamento-card.gratis .abbonamento-btn {
  border-color: #919191;
  color: #ffffff !important;
  background: #919191;
}

.abbonamento-card.plus .abbonamento-btn {
  border-color: #1a8dff;
  color: #ffffff !important ;
  background: #1a8dff;
}

.abbonamento-card.premium .abbonamento-btn {
  border-color: #e60000;
  color: #ffffff !important;
  background: #e60000;
}

.abbonamento-card.prime .abbonamento-btn {
  border-color: #9333ea;
  color: #ffffff !important;
  background: #9333ea;
}

.abbonamento-card .abbonamento-btn.selected {
  color: #ffffff !important;
  border-color: transparent !important;
  cursor: pointer !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.abbonamento-card.gratis .abbonamento-btn.selected {
  background: #666666 !important;
}

.abbonamento-card.plus .abbonamento-btn.selected {
  background: #1a8dff !important;
}

.abbonamento-card.premium .abbonamento-btn.selected {
  background: #e60000 !important;
}

.abbonamento-card.prime .abbonamento-btn.selected {
  background: #9333ea !important;
}
.abbonamento-card.gratis .btn-seleziona-abbonamento {
  color: #919191;
}
.abbonamento-card.plus .btn-seleziona-abbonamento {
  color: #1a8dff;
}
.abbonamento-card.premium .btn-seleziona-abbonamento {
  color: #e60000;
}
.abbonamento-card.prime .btn-seleziona-abbonamento {
  color: #9333ea;
}
.abbonamento-prezzo {
  font-size: 25px;
  font-weight: 800;
  margin: 8px 0 10px 0;
  text-align: center;
  letter-spacing: -1px;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.5);
  border: 2px solid;
  /* Layout flex per supportare prezzi con sconto */
  display: flex;
  flex-direction: row;
  align-items: baseline;
  gap: 4px;
  justify-content: center;
}

.abbonamento-card.gratis .abbonamento-prezzo {
  color: #868686;
  border-color: #919191;
}

.abbonamento-card.plus .abbonamento-prezzo {
  color: #1a8dff;
  border-color: #1a8dff;
}

.abbonamento-card.premium .abbonamento-prezzo {
  color: #e60000;
  border-color: #e60000;
}

.abbonamento-card.prime .abbonamento-prezzo {
  color: #9333ea;
  border-color: #9333ea;
}

/* Wrapper prezzo con badge sconto: posizione per il sale-badge in alto a destra */
.abbonamento-prezzo-with-badge {
  position: relative;
}

/* Sale badge: solo "X mesi", in alto a destra rispetto al prezzo */
.abbonamento-prezzo .sale-badge {
  position: absolute;
  top: -8px;
  right: -15px;
  background: linear-gradient(135deg, #00bc16, #009912);
  color: white;
  padding: 4px 10px;
  border-radius: 50px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.2px;
  z-index: 20;
  box-shadow: 0 1px 4px rgba(0, 188, 22, 0.3);
  white-space: nowrap;
}

/* Stili per sistema offerte (fallback se sale-badge fuori da abbonamento-prezzo) */

.original-price-strikethrough {
  text-decoration: line-through;
  color: #999;
  font-size: 0.85em;
  font-weight: 400;
  margin-right: 8px;
}

.sale-price-highlight {
  font-weight: 700;
  font-size: 1.1em;
}

/* Colori dei prezzi scontati in base alla card */
.abbonamento-card.gratis .sale-price-highlight {
  color: #919191;
}

.abbonamento-card.plus .sale-price-highlight {
  color: #1a8dff;
}

.abbonamento-card.premium .sale-price-highlight {
  color: #e60000;
}

.abbonamento-card.prime .sale-price-highlight {
  color: #9333ea;
}

.price-interval {
  color: inherit;
  font-size: 0.75em;
  margin-left: 4px;
  font-weight: 600;
}

/* Applica font-size ridotto anche quando price-interval è dentro abbonamento-prezzo (prezzi normali) */
.abbonamento-prezzo .price-interval {
  font-size: 0.75em;
  font-weight: 600;
}

.abbonamento-prezzo .original-price-strikethrough {
  text-align: center;
}

/* Wrapper per mantenere insieme prezzo scontato e "/mese" sulla stessa riga */
.sale-price-wrapper {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
  gap: 2px;
}

.abbonamento-card.gratis .abbonamento-btn:hover {
  background: #555555 !important;
  border-color: #555555 !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.abbonamento-card.plus .abbonamento-btn:hover {
  background: #036cdd !important;
  border-color: #036cdd !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.abbonamento-card.premium .abbonamento-btn:hover {
  background: #b00000 !important;
  border-color: #b00000 !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.abbonamento-card.prime .abbonamento-btn:hover {
  background: #7c3aed !important;
  border-color: #7c3aed !important;
  color: #ffffff !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.abbonamento-card.gratis .abbonamento-btn.selected:hover {
  background: #555555 !important;
  color: #ffffff !important;
  border-color: transparent !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.abbonamento-card.plus .abbonamento-btn.selected:hover {
  background: #036cdd !important;
  color: #ffffff !important;
  border-color: transparent !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.abbonamento-card.premium .abbonamento-btn.selected:hover {
  background: #b00000 !important;
  color: #ffffff !important;
  border-color: transparent !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.abbonamento-card.prime .abbonamento-btn.selected:hover {
  background: #7c3aed !important;
  color: #ffffff !important;
  border-color: transparent !important;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.abbonamento-card.gratis .btn-seleziona-abbonamento:hover {
  color: #ffffff;
}
.abbonamento-card.plus .btn-seleziona-abbonamento:hover {
  color: #ffffff;
}
.abbonamento-card.premium .btn-seleziona-abbonamento:hover {
  color: #ffffff;
}
.abbonamento-card.prime .btn-seleziona-abbonamento:hover {
  color: #ffffff;
}
/* --- STEP BUTTONS LAYOUT --- */
.step-btns {
  display: flex;
  flex-direction: row;
  justify-content: flex-end;
  align-items: center;
  gap: 16px;
  width: 100%;
  margin-top: 30px;
}
.step-btns button {
  width: fit-content !important;
  min-width: 90px;
  padding: 12px 18px !important;
  margin: 0 !important;
  font-size: 1.08rem;
  font-weight: 600;
  border-radius: 8px;
  border: none;
  background: #1a8dff;
  color: #fff;
  box-shadow: 0 2px 8px rgba(26, 141, 255, 0.07);
  cursor: pointer;
  transition:
    background 0.18s,
    box-shadow 0.18s,
    transform 0.12s;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.step-btns button:hover {
  background: #0080f0;
  box-shadow: 0 4px 16px rgba(26, 141, 255, 0.13);
  transform: translateY(-2px);
}
.step-btns button:active {
  background: #0056b3;
  transform: scale(0.98);
}
/* Indietro a sinistra, continua/registrati/metodo a destra */
.step-btns .btn-back-1,
.step-btns .btn-back-2 {
  order: 1;
  margin-right: auto !important;
}

/* Nascondi bottone Indietro nello step 2 (fatturazione) */
.step.step-2 .btn-back-1 {
  display: none !important;
}
.step-btns .btn-continua-1,
.step-btns .btn-continua-2,
.step-btns .btn-registrati-utente,
.step-btns .btn-registrati-impresa,
.step-btns .btn-metodo-pagamento {
  order: 2;
}

.step-btns .btn-continua-2 {
  margin-left: auto !important;
  margin-right: 0 !important;
}

/* Posizionamento assoluto per i bottoni step 1 per non spostare il reCAPTCHA */
.step.step-1 .step-btns {
  position: relative;
  min-height: 50px;
  margin-top: 10px;
}

.step.step-1 .step-btns .btn-continua-1,
.step.step-1 .step-btns .btn-registrati-utente {
  position: absolute;
  right: 0;
  top: 0;
  z-index: 10;
}

/* Override per i bottoni moderni nello step 1 */
.step.step-1 .modern-step-btns {
  margin-top: 32px !important;
  padding-top: 24px !important;
  border-top: 1px solid #e9ecef !important;
  position: relative !important;
  min-height: auto !important;
  justify-content: flex-end !important;
}

.step.step-1 .modern-step-btns .btn-continua-1,
.step.step-1 .modern-step-btns .btn-registrati-utente {
  position: static !important;
  left: auto !important;
  top: auto !important;
  margin-left: auto !important;
}

#saveStripeMethodModalBtn {
  background: #1a8dff !important;
  color: #fff !important;
  border: none;
  border-radius: 8px;
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 600;
  margin: 20px auto 0 auto !important;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(26, 141, 255, 0.07);
  transition:
    background 0.18s,
    box-shadow 0.18s,
    transform 0.12s;
  text-align: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content !important;
}
#saveStripeMethodModalBtn:hover {
  background: #0c6ec2 !important;
  box-shadow: 0 4px 16px rgba(26, 141, 255, 0.13);
  transform: translateY(-2px);
}
#saveStripeMethodModalBtn:active {
  background: #0056b3 !important;
  transform: scale(0.98);
}

/* Modern Auth Section Styles */
.auth-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0px 40px;
  max-height: 100%;
  max-width: 800px;
  margin: 40px auto 0px auto;
  z-index: 1000;
}

.auth-header {
  text-align: center;
  margin-bottom: 20px;
}

.auth-logo {
  width: 60px;
  height: 60px;
  background: linear-gradient(135deg, #e60000, #b00000);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 20px auto 0px auto;
  box-shadow: 0 15px 35px rgba(47, 47, 47, 0.3);
  animation: logoFloat 3s ease-in-out infinite;
}

.auth-logo i {
  font-size: 1.8rem;
  color: white;
}

@keyframes logoFloat {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

.auth-header h2 {
  font-size: 2.2rem;
  font-weight: 700;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
  margin-top: 10px;
  margin-bottom: 5px;
  opacity: 1 !important;
  z-index: 1000;
}

.auth-header p {
  font-size: 1.3rem;
  color: #ffffff;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
  margin: 0 auto 20px auto;
  line-height: 1.6;
}

.auth-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  width: 100%;
  max-width: 600px;
  margin-bottom: 50px;
}

.auth-card {
  background: white;
  border-radius: 20px;
  padding: 20px 30px;
  text-align: center;
  box-shadow: 0 0px 20px rgba(0, 0, 0, 0.1);
  border: 1px solid rgba(230, 0, 0, 0.1);
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.auth-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(90deg, #e60000, #b00000);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.auth-card:hover::before {
  transform: scaleX(1);
}

.auth-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 0px 30px rgba(34, 34, 34, 0.15);
}

.card-icon {
  width: 70px;
  height: 70px;
  background: linear-gradient(
    135deg,
    rgba(230, 0, 0, 0.1),
    rgba(176, 0, 0, 0.1)
  );
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0px;
  transition: all 0.3s ease;
}

.auth-card:hover .card-icon {
  transform: scale(1.1);
  background: linear-gradient(
    135deg,
    rgba(230, 0, 0, 0.2),
    rgba(176, 0, 0, 0.2)
  );
}

.card-icon i {
  font-size: 1.8rem;
  color: #e60000;
}

.auth-card h3 {
  font-size: 1.4rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 10px;
}

.auth-card p {
  color: #666;
  line-height: 1.5;
  margin-bottom: 25px;
  font-size: 0.95rem;
}

.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px 25px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.login-btn {
  background: linear-gradient(135deg, #1a8dff, #0080f0);
  color: white;
}

.register-btn {
  background: linear-gradient(135deg, #e60000, #b00000);
  color: white;
}

.auth-btn::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.2),
    transparent
  );
  transition: left 0.5s ease;
}

.auth-btn:hover::before {
  left: 100%;
}

.auth-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.auth-btn i {
  font-size: 0.9rem;
  transition: transform 0.3s ease;
}

.auth-btn:hover i {
  transform: translateX(5px);
}

.auth-features {
  display: flex;
  gap: 40px;
  justify-content: center;
  flex-wrap: wrap;
}

.feature {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  background: rgba(239, 180, 180, 0.227);
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
  border-radius: 25px;
  border: 1px solid rgba(230, 0, 0, 0.1);
  transition: all 0.3s ease;
}

.feature:hover {
  background: rgba(230, 0, 0, 0.1);
  transform: translateY(-2px);
}

.feature i {
  color: #e60000;
  font-size: 1.1rem;
}

.feature span {
  color: #ffffff;
  text-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
  font-size: 0.9rem;
  font-weight: 500;
}

/* Responsive Design */
@media (max-width: 768px) {
  .auth-container {
    padding: 40px 20px;
  }

  .auth-header h2 {
    font-size: 2rem;
  }

  .auth-options {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .auth-card {
    padding: 30px 20px;
  }

  .auth-features {
    gap: 20px;
  }

  .feature {
    padding: 10px 15px;
  }

  /* Schermata scelta tipo account - Mobile */
  #choose-account-type-page {
    max-width: 100vw !important;
    width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    position: relative !important;
  }

  #choose-account-type-page .accedi-registrati-page-container {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 0 20px 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
  }

  .account-type-selection {
    flex-direction: column;
    gap: 20px;
    padding: 30px 15px;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 auto !important;
  }

  .account-type-card {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    padding: 30px 15px !important;
    box-sizing: border-box !important;
  }

  .account-type-icon {
    width: 70px;
    height: 70px;
    font-size: 2rem;
    margin-bottom: 20px;
  }

  .account-type-card h3 {
    font-size: 1.4rem;
    margin-bottom: 12px;
  }

  .account-type-card p {
    font-size: 0.95rem;
    margin-bottom: 25px;
  }

  .account-type-btn {
    padding: 12px 24px;
    font-size: 0.95rem;
  }
}

@media (max-width: 480px) {
  .auth-header h2 {
    font-size: 2rem;
  }

  .auth-logo {
    width: 60px;
    height: 60px;
  }

  .auth-logo i {
    font-size: 1.5rem;
  }

  .card-icon {
    width: 50px;
    height: 50px;
  }

  .card-icon i {
    font-size: 1.3rem;
  }

  /* Schermata scelta tipo account - Schermi molto piccoli */
  #choose-account-type-page .account-type-selection {
    padding: 20px 10px !important;
  }

  #choose-account-type-page .account-type-card {
    padding: 25px 12px !important;
    gap: 0px !important;
  }
}

.login-card .card-icon {
  background: linear-gradient(
    135deg,
    rgba(26, 141, 255, 0.1),
    rgba(0, 128, 240, 0.1)
  );
}

.login-card .card-icon i {
  color: #1a8dff;
}

.login-card:hover .card-icon {
  background: linear-gradient(
    135deg,
    rgba(26, 141, 255, 0.2),
    rgba(0, 128, 240, 0.2)
  );
}

.login-card::before {
  background: linear-gradient(90deg, #1a8dff, #0080f0);
}

/* --- LOADING SPINNER --- */
.loading-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 1s ease-in-out infinite;
  margin-right: 8px;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.btn-loading {
  pointer-events: none;
  opacity: 0.8;
}

.btn-loading .loading-spinner {
  display: inline-block;
}

.btn-loading:not(.btn-loading) .loading-spinner {
  display: none;
}

/* ===== MOBILE OPTIMIZATIONS ===== */
@media (max-width: 768px) {
  footer {
    display: none !important;
  }
  body,
  html {
    overflow: hidden !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    box-sizing: border-box !important;
    min-height: 100dvh !important;
    justify-content: flex-start !important;
    position: fixed !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  .page-wrapper {
    overflow: hidden !important;
    min-height: 100dvh !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    box-sizing: border-box !important;
    justify-content: flex-start !important;
    margin: 0 !important;
    max-width: 100% !important;
  }
  /* Layout principale mobile */
  .profile-main {
    height: calc(100dvh) !important;
    max-height: calc(100dvh) !important;
    padding: 0 !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
  }

  .accedi-registrati-page {
    height: auto !important;
    min-height: calc(100dvh - 65px) !important;
    max-height: calc(100dvh - 65px) !important;
    border-radius: 0 !important;
    padding: 0px 15px 0px 15px !important;
    justify-content: flex-start !important;
    align-items: flex-start !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    margin-bottom: 0px !important;
    -webkit-overflow-scrolling: touch !important;
    box-sizing: border-box !important;
    max-width: 100% !important;
    margin: 0 !important;
  }
  .sfondo-login img {
    width: 100% !important;
    min-width: 100% !important;
    max-width: 100% !important;
    left: 0% !important;
    max-height: 100% !important;
    height: 100% !important;
  }
  #registrati-page {
    max-width: 100vw !important;
    width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    position: relative !important;
  }
  .accedi-registrati-page-container {
    height: calc(100dvh) !important;
    max-height: calc(100dvh) !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    -webkit-overflow-scrolling: touch !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 !important;
  }
  #choose-account-type-page {
    max-width: 100vw !important;
    width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    position: relative !important;
  }

  #choose-account-type-page .accedi-registrati-page-container {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  #choose-account-type-page .account-type-selection {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  #choose-account-type-page .account-type-card {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    gap: 0px !important;
    box-sizing: border-box !important;
  }
  .account-type-icon {
    margin-bottom: 0px !important;
    height: 60px !important;
    width: 60px !important;
  }
  .account-type-card h3 {
    margin-top: 20px !important;
    margin-bottom: 0px !important;
  }
  .account-type-card p {
    margin-top: 0px !important;
    margin-bottom: 20px !important;
  }

  /* Container auth mobile */
  .auth-container {
    padding: 0 !important;
    gap: 20px !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
  }

  /* Header mobile */
  .auth-header {
    padding: 10px 0 0px 0 !important;
    margin-bottom: 20px !important;
    text-align: center !important;
  }

  .auth-header h2 {
    font-size: 2rem !important;
    margin-bottom: 0px !important;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.8) !important;
  }

  .auth-header p {
    font-size: 1rem !important;
    margin-bottom: 0px !important;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.8) !important;
  }

  .auth-logo {
    width: 50px !important;
    height: 50px !important;
    margin-bottom: 0px !important;
  }

  .auth-logo i {
    font-size: 1.3rem !important;
  }

  /* Cards mobile */
  .auth-options {
    padding: 0px !important;
    gap: 20px !important;
    margin-bottom: 0px !important;
  }

  .auth-card {
    padding: 20px 15px !important;
    border-radius: 20px !important;
    margin-bottom: 15px !important;
    width: 80% !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
  }
  .auth-card:hover {
    transform: translateY(-3px) !important;
  }

  .card-icon {
    width: 45px !important;
    height: 45px !important;
    margin-bottom: 10px !important;
  }

  .card-icon i {
    font-size: 1.2rem !important;
  }

  .auth-options .auth-card h3 {
    font-size: 1.3rem !important;
    line-height: 1 !important;
    margin-top: 0px !important;
    margin-bottom: 20px !important;
  }

  .auth-options .auth-card p {
    display: none !important;
    font-size: 1.1rem !important;
    line-height: 1 !important;
    margin-bottom: 14px !important;
    margin-top: 10px !important;
  }

  /* Riduci spazio tra testo e bottoni */
  .auth-options .auth-card .auth-btn {
    margin-top: 15px !important;
  }

  /* Riduci spazio tra paragrafi e elementi successivi */
  .auth-card p + .btn,
  .auth-card p + .auth-features {
    margin-top: 8px !important;
  }

  /* Riduci spazio tra features e bottoni */
  .auth-features + .btn {
    margin-top: 8px !important;
  }

  /* Bottoni mobile */
  .auth-card .btn {
    padding: 12px 20px !important;
    font-size: 0.95rem !important;
    border-radius: 8px !important;
    min-height: 44px !important;
    width: 100% !important;
  }

  /* Features mobile */
  .auth-features {
    display: none !important;
    gap: 12px !important;
    margin-top: 15px !important;
    flex-wrap: wrap !important;
  }

  .feature {
    padding: 8px 12px !important;
    font-size: 0.85rem !important;
    border-radius: 6px !important;
    flex: 1 1 auto !important;
    min-width: 120px !important;
  }

  .feature i {
    font-size: 0.9rem !important;
    margin-right: 6px !important;
  }

  /* Form mobile */
  .auth-form {
    padding: 20px 15px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .form-group {
    margin-top: 0px !important;
    margin-bottom: 0px !important;
    gap: 0px !important;
  }

  .form-group label {
    font-size: 0.9rem !important;
    margin-bottom: 6px !important;
  }

  .form-group input,
  .form-group select {
    padding: 12px 15px !important;
    font-size: 16px !important; /* Evita zoom automatico su mobile */
    border: none !important;
    border-bottom: 2px solid #e1e4e8 !important;
    border-radius: 0px !important;
    background: transparent !important;
    min-height: 44px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  /* Fix per select su mobile - evita che il testo sia tagliato */
  #registrati-page select,
  .formato-uno select,
  .formato-due select {
    height: 48px !important;
    min-height: 48px !important;
    padding: 14px 16px !important;
    font-size: 16px !important; /* Evita zoom automatico su mobile */
    line-height: 1.4 !important;
    display: flex !important;
    align-items: center !important;
  }

  .form-group input:focus,
  .form-group select:focus {
    outline: none !important;
    border-bottom-color: #1a8dff !important;
    box-shadow: none !important;
  }

  /* Bottoni form mobile */
  .form-buttons {
    gap: 10px !important;
    margin-top: 20px !important;
    flex-direction: column !important;
  }

  .form-buttons .btn {
    padding: 12px 20px !important;
    font-size: 0.95rem !important;
    min-height: 44px !important;
    border-radius: 8px !important;
    width: 100% !important;
  }

  /* Link mobile */
  .auth-links {
    margin-top: 15px !important;
    gap: 10px !important;
    flex-direction: column !important;
    align-items: center !important;
  }

  .auth-links a {
    font-size: 0.9rem !important;
    padding: 8px 12px !important;
    width: 100% !important;
    text-align: center !important;
  }

  /* Divider mobile */
  .auth-divider {
    margin: 20px 0 !important;
    padding: 0 15px !important;
  }

  .auth-divider span {
    font-size: 0.9rem !important;
    padding: 0 15px !important;
  }

  /* Social buttons mobile */
  .social-buttons {
    gap: 10px !important;
    margin-top: 15px !important;
    flex-direction: column !important;
  }

  .social-btn {
    padding: 12px 20px !important;
    font-size: 0.9rem !important;
    min-height: 44px !important;
    border-radius: 8px !important;
    width: 100% !important;
  }

  .social-btn i {
    font-size: 1.1rem !important;
    margin-right: 8px !important;
  }

  /* Form di registrazione mobile */
  .registrazione-contents {
    overflow-y: visible !important;
    min-height: fit-content !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 0px !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
  }
  .registration-hero {
    padding: 10px !important;
    border-radius: 0px 0px 20px 20px !important;
  }

  #registerForm {
    height: auto !important;
    min-height: fit-content !important;
    max-height: fit-content !important;
    padding-bottom: 20px !important;
    -webkit-overflow-scrolling: touch !important;
  }

  /* Step del form mobile */
  .step {
    margin-bottom: 0px !important;
  }

  /* Bottoni step mobile */
  .step-btns {
    margin-top: 20px !important;
    padding-bottom: 20px !important;
  }

  /* Terms mobile */
  .terms-checkbox {
    margin-top: 5px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  .terms-checkbox label {
    font-size: 0.85rem !important;
    line-height: 1.4 !important;
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important;
    width: 100% !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
  }

  .terms-checkbox input[type="checkbox"] {
    margin: 0 !important;
    flex-shrink: 0 !important;
    margin-top: 2px !important;
  }

  /* Error messages mobile */
  .error-message {
    padding: 10px 12px !important;
    font-size: 0.85rem !important;
    border-radius: 6px !important;
    margin-bottom: 15px !important;
  }

  /* Success messages mobile */
  .success-message {
    padding: 10px 12px !important;
    font-size: 0.85rem !important;
    border-radius: 6px !important;
    margin-bottom: 15px !important;
  }

  /* Terms checkbox mobile - ottimizzazione layout */
  .terms {
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 10px !important;
    width: 100% !important;
  }

  /* Selettori alternativi */
  div.terms {
    max-width: 100% !important;
    width: 100% !important;
  }

  /* Selettore per il label dentro terms */
  .terms label {
    display: flex !important;
    align-items: flex-start !important;
    gap: 8px !important;
    width: 100% !important;
    word-wrap: break-word !important;
    overflow-wrap: break-word !important;
    font-size: 0.85rem !important;
    line-height: 1.4 !important;
    box-sizing: border-box !important;
  }

  /* Checkbox dentro il label */
  .terms label input[type="checkbox"] {
    margin: 0 !important;
    flex-shrink: 0 !important;
    margin-top: 2px !important;
  }

  /* Link dentro il label */
  .terms label a {
    margin: 0 2px !important;
    word-break: break-word !important;
  }
}

/* Extra small devices */
@media (max-width: 480px) {
  .profile-main {
    padding: 0 !important;
  }

  .accedi-registrati-page {
    padding: 0px 10px 0px 10px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }
  #choose-account-type-page {
    max-width: 100vw !important;
    width: 100vw !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
    position: relative !important;
  }

  #choose-account-type-page .accedi-registrati-page-container {
    max-width: 100% !important;
    width: 100% !important;
    padding: 0 0px 20px 0px !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    overflow-x: hidden !important;
  }

  #choose-account-type-page .account-type-selection {
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  #choose-account-type-page .account-type-card {
    min-width: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-sizing: border-box !important;
    gap: 0px !important;
  }

  .auth-container {
    gap: 15px !important;
  }

  .auth-header h2 {
    font-size: 2rem !important;
  }

  .auth-logo {
    width: 45px !important;
    height: 45px !important;
  }

  .auth-logo i {
    font-size: 1.2rem !important;
  }

  .auth-card {
    padding: 15px 12px !important;
  }

  .card-icon {
    width: 40px !important;
    height: 40px !important;
  }

  .card-icon i {
    font-size: 1.1rem !important;
  }

  .auth-card h3 {
    font-size: 1.2rem !important;
  }

  .auth-card p {
    font-size: 0.85rem !important;
  }

  .auth-card .btn {
    padding: 10px 16px !important;
    font-size: 0.9rem !important;
    margin-top: 6px !important;
  }

  /* Riduci ulteriormente gli spazi su schermi piccoli */
  .auth-options .auth-card p {
    margin-bottom: 6px !important;
  }

  .auth-card p + .btn,
  .auth-card p + .auth-features {
    margin-top: 6px !important;
  }

  .auth-features + .btn {
    margin-top: 6px !important;
  }

  .form-group input,
  .form-group select {
    padding: 10px 12px !important;
    font-size: 16px !important; /* Evita zoom automatico su mobile */
    border: none !important;
    border-bottom: 2px solid #e1e4e8 !important;
    border-radius: 0px !important;
    background: transparent !important;
  }

  /* Stili mobile per il modal Recupera password */
  #forgotPasswordModal {
    padding: 0px !important;
  }

  #forgotPasswordModal .modal-content {
    max-width: 80vw !important;
    width: 80vw !important;
    margin: 0 auto !important;
    border-radius: 12px !important;
    padding: 20px 15px !important;
    max-height: 90vh !important;
    overflow-y: auto !important;
  }

  #forgotPasswordModal h2 {
    font-size: 1.4rem !important;
    margin-bottom: 15px !important;
    text-align: center !important;
  }

  #forgotPasswordModal p {
    font-size: 0.95rem !important;
    line-height: 1.4 !important;
    margin-bottom: 20px !important;
    text-align: center !important;
  }

  #forgotPasswordModal .form-group {
    margin-bottom: 20px !important;
  }

  #forgotPasswordModal label {
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    margin-bottom: 8px !important;
    display: block !important;
  }

  #forgotPasswordModal input[type="email"] {
    width: 100% !important;
    padding: 12px 15px !important;
    font-size: 1rem !important;
    border: none !important;
    border-bottom: 2px solid #e1e4e8 !important;
    border-radius: 0px !important;
    background: transparent !important;
    box-sizing: border-box !important;
  }

  #forgotPasswordModal input[type="email"]:focus {
    outline: none !important;
    border-bottom-color: #1a8dff !important;
  }

  #forgotPasswordModal button {
    width: 100% !important;
    padding: 12px 20px !important;
    font-size: 1rem !important;
    font-weight: 600 !important;
    border: none !important;
    border-radius: 8px !important;
    background: #1a8dff !important;
    color: white !important;
    cursor: pointer !important;
    transition: background 0.2s ease !important;
  }

  #forgotPasswordModal button:hover {
    background: #0080f0 !important;
  }

  #forgotPasswordModal .close {
    font-size: 1.5rem !important;
    top: 10px !important;
    right: 15px !important;
    color: #666 !important;
  }

  #forgotPasswordModal #forgot-password-success,
  #forgotPasswordModal #forgot-password-error {
    font-size: 0.9rem !important;
    margin-top: 15px !important;
    padding: 10px !important;
    border-radius: 6px !important;
    text-align: center !important;
  }

  #forgotPasswordModal #forgot-password-success {
    background-color: #d4edda !important;
    border: 1px solid #c3e6cb !important;
    color: #155724 !important;
  }

  #forgotPasswordModal #forgot-password-error {
    background-color: #f8d7da !important;
    border: 1px solid #f5c6cb !important;
    color: #721c24 !important;
  }

  .form-buttons .btn {
    padding: 10px 16px !important;
    font-size: 0.9rem !important;
  }

  .social-btn {
    padding: 10px 16px !important;
    font-size: 0.85rem !important;
  }

  /* Terms checkbox extra small */
  .terms {
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 8px !important;
    width: 100% !important;
  }

  .terms label {
    font-size: 0.8rem !important;
    line-height: 1.3 !important;
    gap: 6px !important;
  }

  .terms label input[type="checkbox"] {
    margin-top: 1px !important;
  }

  .formato-uno .terms a {
    margin: 0px !important;
  }

  .terms-checkbox label {
    font-size: 0.8rem !important;
    line-height: 1.3 !important;
    gap: 6px !important;
  }

  .terms-checkbox input[type="checkbox"] {
    margin-top: 1px !important;
  }

  /* Form registrazione schermi piccoli */
  .registrazione-contents {
    padding-bottom: 20px !important;
  }

  .step {
    margin-bottom: 15px !important;
  }

  .step-btns {
    margin-top: 15px !important;
    padding-bottom: 15px !important;
  }
  .abbonamenti-grid {
    flex-direction: column !important;
  }
}

/* Landscape orientation on mobile */
@media (max-width: 768px) and (orientation: landscape) {
  .profile-main {
    height: calc(100dvh) !important;
    max-height: calc(100dvh) !important;
  }

  .accedi-registrati-page {
    min-height: calc(100dvh - 65px) !important;
    padding: 0px 10px 0px 10px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
  }

  .auth-container {
    padding: 0 !important;
  }

  .auth-header {
    padding: 10px 0 !important;
    margin-bottom: 0 !important;
  }

  .auth-header h2 {
    font-size: 2rem !important;
  }

  /* Terms checkbox landscape */
  .terms {
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 8px !important;
    width: 100% !important;
  }

  .terms label {
    font-size: 0.85rem !important;
    line-height: 1.3 !important;
    gap: 6px !important;
  }
}

/* Opzioni di pagamento */
.payment-options {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 20px;
}

.payment-option {
  border: 2px solid #e0e0e0;
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.payment-option:hover {
  border-color: #d0d0d0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.payment-option.selected {
  border-color: #e60000;
  box-shadow: 0 0 0 3px rgba(230, 0, 0, 0.1);
}

.option-selector {
  display: flex;
  align-items: center;
  padding: 16px 20px;
  cursor: pointer;
  background: #f8f9fa;
  transition: background-color 0.3s ease;
}

.payment-option.selected .option-selector {
  background: rgba(230, 0, 0, 0.05);
}

.option-radio {
  width: 20px;
  height: 20px;
  border: 2px solid #ccc;
  border-radius: 50%;
  margin-right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
}

.payment-option.selected .option-radio {
  border-color: #e60000;
}

.radio-circle {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: transparent;
  transition: all 0.3s ease;
}

.payment-option.selected .radio-circle {
  background: #e60000;
}

.option-label {
  display: flex;
  align-items: center;
  font-weight: 500;
  color: #333;
  font-size: 1rem;
}

.option-label i {
  margin-right: 12px;
  color: #666;
  font-size: 1.1rem;
}

.option-content {
  display: none;
  padding: 20px;
  background: white;
  border-top: 1px solid #e0e0e0;
}

.payment-option.selected .option-content {
  display: block;
}

/* Responsive per mobile */
@media (max-width: 768px) {
  .payment-options {
    gap: 12px;
  }

  .option-selector {
    padding: 14px 16px;
  }

  .option-content {
    padding: 16px;
  }

  .option-label {
    font-size: 0.95rem;
  }
}

/* === STILI VALIDAZIONE STEP 1 === */

/* Feedback validazione email - Modal assoluto */
.email-validation-feedback {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  z-index: 1000;
  margin-top: 4px;
  font-size: 0.85em;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.email-validation-feedback i {
  font-size: 0.9em;
}

.email-validation-feedback span {
  font-weight: 500;
}

/* Feedback validazione telefono - Modal assoluto */
.phone-validation-feedback {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  z-index: 1000;
  margin-top: 4px;
  font-size: 0.85em;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.phone-validation-feedback i {
  font-size: 0.9em;
}

.phone-validation-feedback span {
  font-weight: 500;
}

/* Feedback validazione password - Modal assoluto */
.password-validation-feedback {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  z-index: 1000;
  margin-top: 4px;
  font-size: 0.85em;
  padding: 12px 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

/* Feedback validazione conferma password - Modal assoluto */
.confirm-password-validation-feedback {
  position: absolute;
  top: 100%;
  left: 0%;
  width: 100%;
  z-index: 1000;
  margin-top: 4px;
  font-size: 0.85em;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transition: all 0.3s ease;
  backdrop-filter: blur(10px);
}

.confirm-password-validation-feedback i {
  font-size: 0.9em;
}

.confirm-password-validation-feedback span {
  font-weight: 500;
}

/* Indicatore forza password */
.password-strength-indicator {
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.password-strength-label {
  font-weight: 500;
  color: #333;
  font-size: 0.9em;
}

.password-strength-level {
  font-weight: 600;
  text-transform: capitalize;
  font-size: 0.9em;
}

.password-strength-bar {
  flex: 1;
  height: 4px;
  background: #e0e0e0;
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.password-strength-fill {
  height: 100%;
  transition: all 0.3s ease;
  border-radius: 2px;
}

/* Colori forza password */
.password-strength-weak {
  background-color: #e60000;
  width: 33%;
}

.password-strength-medium {
  background-color: #ffa502;
  width: 66%;
}

.password-strength-strong {
  background-color: #1ca21c;
  width: 100%;
}

/* Lista errori password */
.password-error-list {
  color: #e60000;
  margin-bottom: 6px;
}

.password-error-item {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
  font-size: 0.8em;
}

.password-error-item i {
  font-size: 0.8em;
  flex-shrink: 0;
}

/* Lista suggerimenti password */
.password-suggestion-list {
  color: #ffa502;
  font-size: 0.8em;
  margin-bottom: 6px;
}

.password-suggestion-item {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 3px;
  font-size: 0.8em;
}

.password-suggestion-item i {
  font-size: 0.8em;
  flex-shrink: 0;
}

/* Messaggio successo password */
.password-success-message {
  color: #1ca21c;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  font-size: 0.9em;
}

.password-success-message i {
  font-size: 0.9em;
}

/* Animazioni per feedback */
.email-validation-feedback,
.phone-validation-feedback,
.password-validation-feedback,
.confirm-password-validation-feedback {
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Assicura che i contenitori degli input abbiano position relative */
input[name="email"],
input[name="telefono"],
input[name="password"] {
  position: relative;
}

/* Evita che il feedback interferisca con il layout */
.email-validation-feedback,
.phone-validation-feedback,
.password-validation-feedback,
.confirm-password-validation-feedback {
  pointer-events: none; /* Non interferisce con i click */
  max-width: 100%;
  word-wrap: break-word;
}

/* Responsive per validazione */
@media (max-width: 768px) {
  /* Stili mobile per i feedback di validazione esistenti */
  .phone-validation-feedback,
  .password-validation-feedback,
  .confirm-password-validation-feedback,
  .current-password-validation-feedback,
  .email-validation-feedback {
    position: static !important;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    margin-top: 5px !important;
    margin-bottom: 15px !important;
    padding: 8px 12px !important;
    font-size: 0.8rem !important;
    background-color: #f8f9fa !important;
    border: 1px solid #e9ecef !important;
    border-radius: 4px !important;
    line-height: 1.3 !important;
    box-sizing: border-box !important;
    z-index: auto !important;
    transform: none !important;
    clear: both !important;
  }

  /* Stili specifici per i suggerimenti di password */

  .password-validation-feedback::before {
    content: "🔒 " !important;
    margin-right: 4px !important;
  }

  /* Stili per telefono */

  .phone-validation-feedback::before {
    content: "📱 " !important;
    margin-right: 4px !important;
  }

  /* Stili per conferma password */

  .confirm-password-validation-feedback::before {
    content: "🔐 " !important;
    margin-right: 4px !important;
  }

  /* Stili per password attuale */

  .current-password-validation-feedback::before {
    content: "🔑 " !important;
    margin-right: 4px !important;
  }

  /* Aumenta la dimensione del testo specifico "Usa almeno 12 caratteri" */
  .password-validation-feedback span {
    font-size: 0.8rem !important;
  }

  .password-validation-feedback span:contains("12 caratteri"),
  .password-validation-feedback span[data-suggestion*="12 caratteri"] {
    font-size: 0.8rem !important;
    font-weight: 500 !important;
  }

  .password-strength-indicator {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }

  .password-strength-bar {
    width: 100%;
  }
}

/* Stili per campi con errore - usando classi JavaScript */
input[name="email"].email-invalid,
input[name="telefono"].phone-invalid,
input[name="password"].password-invalid,
input[name="conferma_password"].confirm-password-invalid {
  border-color: #e60000 !important;
  box-shadow: 0 0 0 2px rgba(230, 0, 0, 0.1) !important;
}

/* Stili per campi validi - usando classi JavaScript */
input[name="email"].email-valid,
input[name="telefono"].phone-valid,
input[name="password"].password-valid,
input[name="conferma_password"].confirm-password-valid {
  border-color: #1ca21c !important;
  box-shadow: 0 0 0 2px rgba(28, 162, 28, 0.1) !important;
}

/* ============================================
   MODERN REGISTRATION FLOW STYLES
   ============================================ */

/* Barra di progresso per flusso impresa */
.registration-progress-bar {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 30px 40px 20px 40px;
  background: linear-gradient(135deg, #ffffff 0%, #ffffff 100%);
  position: relative;
  z-index: 10;
}

.progress-bar-container {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
}

.progress-steps {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  z-index: 2;
}

.progress-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex: 1;
  position: relative;
}

.progress-step-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #ffffff;
  border: 3px solid #e1e4e8;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 3;
}

.progress-step-number {
  font-size: 1.1rem;
  font-weight: 600;
  color: #6c757d;
  transition: all 0.3s ease;
}

.progress-step-check {
  position: absolute;
  opacity: 0;
  transform: scale(0);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  color: #ffffff;
  font-size: 1.2rem;
}

.progress-step.active .progress-step-circle {
  border-color: #1a8dff;
  background: #1a8dff;
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(26, 141, 255, 0.3);
}

.progress-step.active .progress-step-number {
  color: #ffffff;
}

.progress-step.completed .progress-step-circle {
  border-color: #1ca21c;
  background: #1ca21c;
  transform: scale(1);
}

.progress-step.completed .progress-step-number {
  opacity: 0;
}

.progress-step.completed .progress-step-check {
  opacity: 1;
  transform: scale(1);
}

.progress-step-label {
  margin-top: 12px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #6c757d;
  text-align: center;
  transition: color 0.3s ease;
}

.progress-step.active .progress-step-label {
  color: #1a8dff;
  font-weight: 600;
}

.progress-step.completed .progress-step-label {
  color: #1ca21c;
}

.progress-line {
  flex: 1;
  height: 3px;
  background: #e1e4e8;
  margin: 0 10px;
  position: relative;
  overflow: hidden;
  transition: background 0.3s ease;
}

.progress-line::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #1a8dff, #1ca21c);
  transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.progress-step.completed + .progress-line::after {
  width: 100%;
}

.progress-bar-fill {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, #1a8dff, #1ca21c);
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

/* Hero sections moderne */
.registration-hero {
  width: 100%;
  max-width: 80%;
  margin: 0 auto 20px auto;
  padding: 40px 30px;
  text-align: center;
  animation: fadeInUp 0.6s ease-out;
}

.hero-content-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.hero-icon {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: linear-gradient(135deg, #1a8dff, #1a73e8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: #ffffff;
  box-shadow: 0 8px 24px rgba(26, 141, 255, 0.25);
  animation: scaleIn 0.5s ease-out 0.2s both;
}

.hero-title {
  font-size: 2rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0;
  line-height: 1.3;
}

.hero-subtitle {
  font-size: 1.1rem;
  color: #6c757d;
  margin: 0;
  line-height: 1.6;
  max-width: 100%;
}

/* Form moderno */
.modern-registration-form {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
  animation: fadeInUp 0.6s ease-out 0.2s both;
  position: relative;
  z-index: 1;
  overflow: visible;
}

.step-modern {
  animation: slideIn 0.5s ease-out;
}

.modern-registration-form .step-header {
  margin-bottom: 30px;
  margin-top: 0px;
  padding: 0px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  text-align: center;
}

.modern-registration-form .step-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 !important;
}

.modern-registration-form .step-description {
  font-size: 1rem;
  color: #6c757d;
  margin: 0 !important;
  line-height: 1.5;
}

.step-content {
  width: 100%;
}

.modern-form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 24px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.form-group label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 4px;
  margin-left: 10px;
}

.modern-form-grid input {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  border: 2px solid #e1e4e8;
  border-radius: 10px;
  background: #ffffff;
  transition: all 0.3s ease;
  font-family: "Roboto", sans-serif;
  box-sizing: border-box;
}

.modern-form-grid input:focus {
  outline: none;
  border-color: #1a8dff;
  box-shadow: 0 0 0 4px rgba(26, 141, 255, 0.1);
  transform: translateY(-1px);
}

.modern-form-grid input::placeholder {
  color: #adb5bd;
}

.modern-terms {
  margin: 24px 0;
  padding: 20px;
  background: #f8f9fa;
  border-radius: 10px;
  border: 1px solid #e9ecef;
}

.terms-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
  user-select: none;
}

.terms-label input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin: 0;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 2px;
}

.terms-text {
  font-size: 0.9rem;
  color: #495057;
  line-height: 1.5;
}

.terms-text a {
  color: #1a8dff;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
  margin-left: 3px;
  margin-right: 3px;
}

.terms-text a:hover {
  color: #1a73e8;
  text-decoration: underline;
}

/* Bottoni moderni */
.modern-step-btns {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid #e9ecef;
}

.btn-primary,
.btn-secondary,
.btn-link {
  padding: 14px 28px;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: "Roboto", sans-serif;
  text-decoration: none;
}

.btn-primary {
  background: linear-gradient(135deg, #1a8dff, #1a73e8);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(26, 141, 255, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(26, 141, 255, 0.4);
  background: linear-gradient(135deg, #1a73e8, #1557b0);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: #ffffff;
  color: #495057;
  border: 2px solid #e1e4e8;
}

.btn-secondary:hover {
  background: #f8f9fa;
  border-color: #adb5bd;
  transform: translateY(-1px);
}

.btn-link {
  background: transparent;
  color: #6c757d;
  padding: 14px 16px;
}

.btn-link:hover {
  color: #495057;
  background: #f8f9fa;
}

.btn-annulla-registrazione {
  margin: 30px auto 0 auto;
  display: block;
  width: fit-content;
  max-width: 700px;
  position: relative;
  z-index: 1;
  clear: both;
}

/* Animazioni */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.step-modern.entering {
  animation: slideIn 0.5s ease-out;
}

.step-modern.exiting {
  animation: slideOut 0.4s ease-in;
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(-30px);
  }
}

/* Responsive */
@media (max-width: 768px) {
  .registration-progress-bar {
    padding: 20px 20px 15px 20px;
  }

  .progress-step-circle {
    width: 40px;
    height: 40px;
  }

  .progress-step-number {
    font-size: 0.95rem;
  }

  .progress-step-label {
    font-size: 0.75rem;
    margin-top: 8px;
  }

  .modern-registration-form {
    padding: 24px 20px;
    border-radius: 12px;
    max-width: 100%;
  }
  .form-group.professione {
    margin-bottom: 20px !important;
  }

  .formato-due .modern-form-grid {
    margin-top: 10px !important;
  }

  .modern-form-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .modern-form-grid input {
    font-size: 16px !important; /* Evita zoom automatico su mobile */
  }

  .hero-title {
    font-size: 1.5rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .step-title {
    font-size: 1.5rem;
  }

  .step-description {
    font-size: 0.95rem;
  }

  .modern-step-btns {
    flex-direction: column;
    gap: 12px;
    margin-top: 24px;
    padding-top: 20px;
  }

  .modern-step-btns .btn-primary,
  .modern-step-btns .btn-secondary,
  .modern-step-btns .btn-link {
    width: 100%;
  }

  .registration-hero {
    padding: 30px 20px;
    margin-bottom: 30px;
  }

  .hero-content-wrapper {
    gap: 16px;
  }

  .hero-icon {
    width: 70px;
    height: 70px;
    font-size: 2.2rem;
  }

  .modern-terms {
    padding: 16px;
  }

  .terms-text {
    font-size: 0.85rem;
  }

  .btn-annulla-registrazione {
    width: 100%;
    max-width: 100%;
    margin: 20px auto;
    padding: 12px 20px;
  }

  /* Override per step 1 su mobile */
  .step.step-1 .modern-step-btns {
    justify-content: stretch !important;
  }

  .step.step-1 .modern-step-btns .btn-registrati-utente {
    width: 100% !important;
    margin-left: 0 !important;
  }
}

@media (max-width: 480px) {
  .registration-hero {
    padding: 30px 20px;
  }

  .hero-icon {
    width: 60px;
    height: 60px;
    font-size: 2rem;
  }

  .modern-registration-form {
    padding: 20px 16px;
  }

  .modern-form-grid input {
    font-size: 16px !important; /* Evita zoom automatico su mobile */
  }

  .step-title {
    font-size: 1.3rem;
  }

  .step-description {
    font-size: 0.9rem;
  }

  .registration-progress-bar {
    padding: 15px 15px 10px 15px;
  }

  .progress-step-circle {
    width: 35px;
    height: 35px;
  }

  .progress-step-number {
    font-size: 0.85rem;
  }

  .progress-step-label {
    font-size: 0.7rem;
    margin-top: 6px;
  }

  .modern-step-btns {
    margin-top: 24px;
    padding-top: 20px;
  }

  .btn-primary,
  .btn-secondary,
  .btn-link {
    padding: 12px 20px;
    font-size: 0.95rem;
  }
}

/* Compatibilità con stili esistenti */
.step-modern .formato-uno,
.step-modern .formato-due {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}

@media (max-width: 700px) {
  .step-modern .formato-uno,
  .step-modern .formato-due {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* Assicura che gli step moderni abbiano display corretto */
.step-modern {
  display: block;
}

.step-modern[style*="display: none"] {
  display: none !important;
}

/* Stili per reCAPTCHA nel form moderno */
.modern-registration-form .g-recaptcha {
  margin: 24px 0;
  display: flex;
  justify-content: center;
}

/* Responsive per reCAPTCHA su mobile */
@media (max-width: 768px) {
  .modern-registration-form .g-recaptcha {
    margin: 20px 0;
    transform: scale(0.9);
    transform-origin: center;
  }
}

@media (max-width: 480px) {
  .modern-registration-form .g-recaptcha {
    margin: 16px 0;
    transform: scale(0.85);
  }
}

/* Assicura che il pulsante Annulla sia sempre visibile e posizionato correttamente */
.registrazione-contents {
  position: relative;
}

.registrazione-contents .btn-annulla-registrazione {
  position: relative !important;
  display: block !important;
  width: fit-content !important;
  max-width: 700px !important;
  margin: 30px auto 20px auto !important;
  z-index: 10 !important;
  clear: both !important;
}

/* Modal stripe */
@media (max-width: 768px) {
  #stripe-modal .modal-content {
    width: 90% !important;
    max-width: 90% !important;
    padding: 0px !important;
  }
  #stripe-modal .modal-content .close {
    top: 10px !important;
    right: 10px !important;
  }
  .payment-summary-modal .summary-modal-content {
    width: 95% !important;
    max-width: 95% !important;
    padding: 15px !important;
  }
  .payment-summary-modal .summary-modal-content .summary-modal-header {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 10px !important;
    text-align: left !important;
  }
  .payment-summary-modal .summary-modal-content .summary-modal-header h2 {
    width: 100% !important;
  }
  .payment-summary-modal .summary-modal-content .summary-modal-header div {
    width: 100% !important;
  }
}
