/* ============================================================
   SOMEMAI.COM – Auth CSS  (FIXED v3)
   ============================================================ */

/* Il body deve poter scorrere su mobile */
body {
  overflow-y: auto !important;
  overflow-x: hidden;
  /* Abilita momentum scroll su iOS */
  -webkit-overflow-scrolling: touch;
}

.auth-page {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  min-height: 100vh;
  /* Padding bottom generoso per evitare che la tastiera copra i bottoni */
  padding: 24px 24px 60px;
  position: relative;
  /* Overflow sul contenitore: auto, non hidden */
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
}

/* Background fisso — rimane dietro, non blocca lo scroll */
.auth-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}
.auth-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.25;
}
.auth-orb.orb1 { width: 400px; height: 400px; background: var(--accent); top: -100px; right: -100px; }
.auth-orb.orb2 { width: 350px; height: 350px; background: var(--accent2); bottom: -80px; left: -80px; }

/* Card: margin:auto 0 per centrare quando c'è spazio, altrimenti scorre */
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
  box-shadow: 0 24px 64px rgba(0,0,0,0.5);
  margin: auto 0;
}

.auth-logo {
  display: block;
  font-family: 'Syne', sans-serif;
  font-weight: 800;
  font-size: 1.3rem;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 28px;
}
.auth-logo span { opacity: 0.5; }
.auth-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 6px;
  letter-spacing: -0.03em;
}
.auth-sub { font-size: 0.85rem; color: var(--muted); margin-bottom: 24px; }
.auth-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.auth-check { display: flex; align-items: center; gap: 6px; font-size: 0.82rem; color: var(--muted); cursor: pointer; }
.auth-link { color: var(--accent); font-size: 0.82rem; transition: opacity 0.2s; }
.auth-link:hover { opacity: 0.7; }
.auth-footer { text-align: center; font-size: 0.82rem; color: var(--muted); margin-top: 20px; }

/* ---- MOBILE ---- */
@media (max-width: 480px) {
  .auth-page {
    padding: 16px 16px 80px;
    align-items: flex-start;
  }
  .auth-card {
    padding: 28px 20px;
    border-radius: 14px;
    /* Resetta margin auto: su mobile la card va dall'alto */
    margin: 0;
  }
  .auth-title { font-size: 1.25rem; }
  /* Orb molto ridotti su mobile: non pesano sulla perf */
  .auth-orb.orb1 { width: 160px; height: 160px; opacity: 0.15; }
  .auth-orb.orb2 { width: 140px; height: 140px; opacity: 0.15; }
}
