/* login.css — standalone, light/premium */

:root{
  --bg0:#f7f8fb;
  --bg1:#ffffff;
  --ink:#0f172a;
  --muted:#64748b;
  --line:#e7eaf0;
  --shadow: 0 18px 60px rgba(15, 23, 42, .12);
  --shadow2: 0 10px 25px rgba(15, 23, 42, .08);
  --radius: 22px;
  --radius2: 14px;

  --primary:#111827;
  --primary2:#0b1220;
  --accent:#2563eb;

  --danger:#ef4444;
  --ok:#16a34a;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
  color: var(--ink);
  background:
    radial-gradient(1200px 800px at 20% 10%, rgba(37,99,235,.10), transparent 60%),
    radial-gradient(900px 700px at 80% 20%, rgba(15,23,42,.10), transparent 60%),
    linear-gradient(180deg, var(--bg0), #fff 60%);
}

/* Top bar */
.login-top{
  position: sticky;
  top:0;
  z-index: 5;
  backdrop-filter: blur(12px);
  background: rgba(255,255,255,.75);
  border-bottom: 1px solid rgba(231,234,240,.8);
}
.login-top-inner{
  max-width: 980px;
  margin: 0 auto;
  padding: 16px 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.brand{
  display:flex;
  align-items:center;
  gap:12px;
  text-decoration:none;
  color:inherit;
}
.brand-mark{
  width:42px;height:42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #111827, #334155);
  box-shadow: 0 10px 30px rgba(17,24,39,.25);
  display:grid;
  place-items:center;
  color:#fff;
  font-weight:900;
  letter-spacing:.5px;
}
.brand-text{
  display:flex;
  flex-direction:column;
  line-height:1.05;
}
.brand-text .t1{
  font-weight:900;
  letter-spacing:.6px;
}
.brand-text .t2{
  font-size:12px;
  color: var(--muted);
  margin-top:3px;
}
/* tag in alto a destra nella topbar (es. "Area Riservata" / "Registrazione") */
.login-top-tag{
  color: var(--muted);
  font-weight:700;
  font-size:13px;
}

/* Page shell */
.login-shell{
  min-height: calc(100vh - 76px);
  display:flex;
  justify-content:center;
  align-items: flex-start;
  padding: 28px 18px 44px;
}

.login-grid{
  width:100%;
  max-width: 980px;
  display:grid;
  grid-template-columns: 1fr;
    gap: 12px;
  align-items: start;
}

/* Left info panel */
.login-hero{
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(17,24,39,.92), rgba(17,24,39,.75));
  color:#fff;
  padding: 26px;
  box-shadow: var(--shadow);
  position: relative;
  overflow:hidden;
}
.login-hero:before{
  content:"";
  position:absolute; inset:-40px;
  background:
    radial-gradient(400px 280px at 25% 20%, rgba(37,99,235,.35), transparent 55%),
    radial-gradient(360px 260px at 75% 35%, rgba(255,255,255,.14), transparent 55%);
  transform: rotate(10deg);
}
.login-hero > *{ position:relative; }
.hero-kicker{
  display:inline-flex;
  gap:8px;
  align-items:center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.18);
  font-size: 13px;
}
.hero-title{
  margin: 16px 0 8px;
  font-size: 34px;
  letter-spacing:-.6px;
  line-height:1.05;
}
.hero-sub{
  margin:0;
  color: rgba(255,255,255,.80);
  line-height:1.45;
}
.hero-points{
  margin: 18px 0 0;
  padding:0;
  list-style:none;
  display:grid;
  gap:10px;
}
.hero-points li{
  display:flex;
  gap:10px;
  align-items:flex-start;
  color: rgba(255,255,255,.86);
}
.hero-dot{
  width:10px;height:10px;
  margin-top:6px;
  border-radius: 999px;
  background: rgba(37,99,235,.95);
  box-shadow: 0 0 0 4px rgba(37,99,235,.20);
}

/* Card */
.login-card{
  border-radius: var(--radius);
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(231,234,240,.9);
  box-shadow: var(--shadow2);
  padding: 22px;
}
.card-head{
  margin-bottom: 14px;
}
.card-eyebrow{
  font-size: 12px;
  color: var(--muted);
  letter-spacing:.22em;
  font-weight:800;
}
.card-title{
  margin: 8px 0 6px;
  font-size: 26px;
  letter-spacing:-.3px;
}
.card-sub{
  margin:0;
  color: var(--muted);
  line-height:1.45;
}

/* Alerts */
.auth-alert{
  border-radius: 16px;
  padding: 12px 14px;
  margin: 14px 0;
  border: 1px solid var(--line);
  background: #fff;
}
.auth-alert ul{ margin:0; padding-left: 18px; }
.auth-alert-success{
  border-color: rgba(22,163,74,.20);
  background: rgba(22,163,74,.06);
}
.auth-alert-error{
  border-color: rgba(239,68,68,.22);
  background: rgba(239,68,68,.06);
}

/* Form */
.form-row{ margin: 12px 0; }
.auth-label{
  display:block;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 6px;
  font-weight: 700;
}
.auth-input{
  width:100%;
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  outline:none;
  font-size: 16px; /* evita l’auto-zoom su iOS */
  transition: box-shadow .15s ease, border-color .15s ease, transform .08s ease;
}
.auth-input:focus{
  border-color: rgba(37,99,235,.45);
  box-shadow: 0 0 0 4px rgba(37,99,235,.12);
}
.auth-input::placeholder{ color: #9aa4b2; }

.row-split{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top: 8px;
}
.auth-forgot a{
  color: var(--accent);
  text-decoration:none;
  font-weight:700;
  font-size: 13px;
}
.auth-forgot a:hover{ text-decoration: underline; }

.auth-submit{
  width:100%;
  margin-top: 10px;
  padding: 12px 14px;
  border:none;
  border-radius: 16px;
  cursor:pointer;
  font-weight: 900;
  letter-spacing:.2px;
  color:#fff;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  box-shadow: 0 14px 35px rgba(17,24,39,.20);
  transition: transform .08s ease, box-shadow .15s ease, filter .15s ease;
}
.auth-submit:hover{ filter: brightness(1.03); }
.auth-submit:active{ transform: translateY(1px); }

.auth-helper{
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 14px;
}
.auth-helper a{
  color: var(--accent);
  font-weight:800;
  text-decoration:none;
}
.auth-helper a:hover{ text-decoration:underline; }

.auth-note{
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  color: var(--muted);
  font-size: 13px;
  line-height:1.45;
}
.auth-note a{ color: var(--accent); font-weight:800; text-decoration:none; }
.auth-note a:hover{ text-decoration:underline; }

.info-i{
  display:inline-grid;
  place-items:center;
  width: 18px; height:18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  font-weight: 900;
  margin: 0 4px;
  cursor:pointer;
}

/* Popup */
.popup-overlay{
  position: fixed;
  inset:0;
  background: rgba(15,23,42,.50);
  backdrop-filter: blur(6px);
  display:none;
  z-index: 999;
  padding: 18px;
}
.popup-box{
  max-width: 520px;
  margin: 8vh auto 0;
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(231,234,240,.9);
  border-radius: 22px;
  box-shadow: var(--shadow);
  padding: 18px 18px 16px;
}
.popup-box h2{
  margin:0 0 8px;
  letter-spacing:-.2px;
}
.popup-box p{ margin: 8px 0 0; color: var(--muted); line-height:1.45; }

/* Buttons used by your existing markup */
.btn-bonus-confirm,
.btn-bonus-cancel{
  padding: 11px 14px;
  border-radius: 14px;
  cursor:pointer;
  font-weight: 900;
  border: 1px solid var(--line);
  background: #fff;
}
.btn-bonus-confirm{
  border:none;
  color:#fff;
  background: linear-gradient(135deg, var(--primary), var(--primary2));
  box-shadow: 0 12px 28px rgba(17,24,39,.20);
}
.btn-bonus-cancel{
  color: var(--ink);
  background: #fff;
}
.btn-bonus-confirm:active,
.btn-bonus-cancel:active{ transform: translateY(1px); }

/* Small footer under grid (optional) */
.login-foot{
  max-width:980px;
  margin: 14px auto 0;
  padding: 0 18px;
  color: var(--muted);
  font-size: 12px;
  text-align:center;
}

/* popup: deve poter scrollare */
#privacyPopup.popup-overlay {
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* se la privacy html contiene un box interno (es. .popup-box), rendilo scrollabile */
#privacyPopup .popup-box,
#privacyPopup .popup-content {
  max-height: 85vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* ===== Privacy popup: close button sexy (senza sapere l'HTML esatto) ===== */

/* se dentro privacy.php hai un bottone con onclick="chiudiPrivacyPopup()" */
#privacyPopup button[onclick*="chiudiPrivacyPopup"],
#privacyPopup a[onclick*="chiudiPrivacyPopup"]{
  display:flex;                 /* così lo centriamo facile */
  width: fit-content;
  margin: 18px auto 0;          /* STACCO sopra + centrato */
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 12px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 900;
  cursor: pointer;
  text-decoration:none;
  box-shadow: 0 10px 22px rgba(15,23,42,.08);
  transition: transform .08s ease, filter .15s ease, box-shadow .15s ease;
}

#privacyPopup button[onclick*="chiudiPrivacyPopup"]:hover,
#privacyPopup a[onclick*="chiudiPrivacyPopup"]:hover{
  filter: brightness(1.02);
  box-shadow: 0 14px 30px rgba(15,23,42,.12);
}

#privacyPopup button[onclick*="chiudiPrivacyPopup"]:active,
#privacyPopup a[onclick*="chiudiPrivacyPopup"]:active{
  transform: translateY(1px);
}

/* OTP (row + button "Verifica") */
.auth-ghost-row{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap: wrap;
}

.auth-ghost-btn{
  border-radius: 999px;
  border: 1px solid rgba(15,23,42,.18);
  background: rgba(15,23,42,.06);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  padding: 10px 14px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform .08s ease, filter .15s ease, box-shadow .15s ease, background .15s ease, border-color .15s ease;
}

.auth-ghost-btn:hover{
  background: rgba(37,99,235,.10);
  border-color: rgba(37,99,235,.28);
  box-shadow: 0 10px 22px rgba(15,23,42,.08);
  filter: brightness(1.02);
}

.auth-ghost-btn:active{
  transform: translateY(1px);
}

.otp-status{
  font-size: 13px;
  color: var(--muted);
  font-weight: 800;
}