/* Pagine di accesso (login, registrazione, nuova password): stesso stile di Gestione Presenze */
input[type="password"]::-ms-reveal { display: none; }
input[type="password"]::-ms-clear { display: none; }
input[type="password"]::-webkit-credentials-auto-fill-button { display: none !important; visibility: hidden; }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #1a1f2e; --card: #242b3d; --border: #333d55;
  --accent: #4a7cf7; --accent2: #2f5cf0; --text: #e2e8f0; --muted: #8a95b0;
  --error: #f56565; --success: #48bb78; --radius: 12px;
}
body {
  background: var(--bg); color: var(--text);
  font-family: 'Segoe UI', system-ui, sans-serif;
  min-height: 100vh; min-height: 100dvh;
  display: flex; align-items: center; justify-content: center;
}
.login-wrap { width: 100%; max-width: 400px; padding: 1rem; }
.login-wrap.larga { max-width: 580px; }
.logo-area { text-align: center; margin-bottom: 1rem; }
.app-logo { display: block; margin: 0 auto; width: 100%; max-width: 260px; height: auto; }
.sottotitolo { color: #fff; font-weight: 700; font-size: .92rem; margin-top: .6rem; letter-spacing: .01em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.2rem 2rem .9rem; }
.card h2 { font-size: .98rem; margin-bottom: 1rem; text-align: center; }
.card .intro { font-size: .84rem; color: var(--muted); margin-bottom: 1rem; line-height: 1.45; text-align: center; }
label { display: block; font-size: .8rem; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: .06em; margin-bottom: .4rem; }
input {
  width: 100%; padding: .7rem 1rem; background: var(--bg);
  border: 1.5px solid var(--border); border-radius: 8px; color: var(--text);
  font-size: .95rem; transition: border-color .2s;
}
input:focus { outline: none; border-color: var(--accent); }
.form-group { margin-bottom: 1.1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 2.6rem; }
.pw-eye { position: absolute; right: .6rem; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: var(--muted); padding: .2rem; display: flex; }
.hint { font-size: .74rem; color: var(--muted); margin-top: .35rem; }
.btn {
  width: 100%; padding: .8rem; background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: none; border-radius: 8px; color: #fff; font-size: 1rem; font-weight: 600;
  cursor: pointer; transition: opacity .2s, transform .1s; margin-top: .4rem;
}
.btn:hover { opacity: .9; }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.alert { padding: .7rem 1rem; border-radius: 8px; font-size: .88rem; margin-bottom: 1rem; display: none; line-height: 1.4; }
.alert-error { background: rgba(245,101,101,.15); border: 1px solid rgba(245,101,101,.4); color: #fc8181; }
.alert-success { background: rgba(72,187,120,.15); border: 1px solid rgba(72,187,120,.4); color: #68d391; }
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,.3); border-top-color: #fff; border-radius: 50%; animation: spin .6s linear infinite; vertical-align: middle; margin-right: 6px; }
@keyframes spin { to { transform: rotate(360deg); } }
.link-riga { text-align: center; margin-top: 1rem; font-size: .82rem; }
.link-riga a { color: #fff; font-weight: 700; text-decoration: none; }
.link-riga a:hover { text-decoration: underline; }
.link-sep { text-align: center; margin-top: .7rem; padding-top: .8rem; border-top: 1px solid var(--border); font-size: .82rem; color: var(--muted); }
.link-guida { text-align: center; margin-top: .6rem; font-size: .8rem; }
.link-guida a { color: #fff; text-decoration: none; display: inline-flex; align-items: center; gap: .35rem; }
.link-guida a:hover { text-decoration: underline; }
.link-sep a { color: #fff; font-weight: 700; text-decoration: none; }
.versione { text-align: center; margin-top: .9rem; font-size: .72rem; color: var(--muted); letter-spacing: .04em; }
.dev-credit { display: flex; align-items: flex-start; justify-content: center; gap: .7rem; margin-top: 1rem; }
.dev-credit span { font-size: .78rem; color: var(--muted); letter-spacing: .03em; margin-top: 9px; }
.dev-logo { display: block; width: 118px; height: auto; opacity: .95; }
@media (max-width: 600px) {
  body { align-items: flex-start; min-height: 0; }
  .login-wrap { padding-top: .8rem; padding-bottom: .2rem; }
  .card { padding: 1.1rem 1.2rem .8rem; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
}

/* Pagina pubblica dell'informativa privacy */
.login-wrap.privacy { max-width: 760px; }
.privacy-testo { text-align: justify; font-size: .86rem; line-height: 1.6; }
.privacy-testo p, .privacy-testo li { text-align: justify; font-size: .86rem; line-height: 1.6; margin-bottom: .6rem; }
.privacy-testo ul { margin: 0 0 .7rem 1.2rem; }
.privacy-testo a { color: var(--accent); }
.privacy-testo .privacy-titolo { font-size: 1.02rem; margin: 0 0 .15rem; text-align: left; }
.privacy-testo .privacy-sotto { color: var(--muted); margin-bottom: 1rem; text-align: left; }
.link-privacy { text-align: center; margin-top: .5rem; font-size: .8rem; }
.link-privacy a { color: #fff; text-decoration: none; }
.link-privacy a:hover { text-decoration: underline; }
body.pagina-lunga { align-items: flex-start; }

/* Pagina «Contattaci» per chi non ha un account */
select, textarea {
  width: 100%; padding: .7rem 1rem; background: var(--bg);
  border: 1.5px solid var(--border); border-radius: 8px; color: var(--text);
  font-size: .95rem; font-family: inherit; transition: border-color .2s;
}
select:focus, textarea:focus { outline: none; border-color: var(--accent); }
textarea { resize: vertical; min-height: 7rem; }
.trappola { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
