/* Pagine di accesso (login, registrazione, reset) — si appoggia ai token di home.css (design system ESportsArena) */

.auth-shell { min-height: 100vh; min-height: 100dvh; display: grid; }
@media (min-width: 960px) { .auth-shell { grid-template-columns: minmax(420px, 1fr) minmax(480px, 1fr); } }

/* pannello brand (solo desktop) */
.auth-side {
  display: none; position: relative; overflow: hidden; isolation: isolate;
  flex-direction: column; justify-content: space-between; gap: 32px;
  padding: 32px 48px;
  background: var(--bg);
  border-right: 1px solid var(--border);
}
/* tagli diagonali come nell'hero della home */
.auth-side::before, .auth-side::after { content: ""; position: absolute; z-index: -1; top: 0; bottom: 0; }
.auth-side::before {
  right: 0; width: 70%;
  background: linear-gradient(135deg, rgba(220, 38, 38, .24), rgba(220, 38, 38, .04) 60%);
  clip-path: polygon(35% 0, 100% 0, 100% 100%, 0 100%);
}
.auth-side::after {
  left: 0; width: 40%;
  background: linear-gradient(315deg, rgba(37, 99, 235, .16), transparent 70%);
  clip-path: polygon(0 0, 100% 0, 40% 100%, 0 100%);
}
@media (min-width: 960px) { .auth-side { display: flex; } }
.auth-side h2 { font-size: clamp(40px, 4.2vw, 60px); line-height: 1.05; }
.auth-side p { color: var(--muted); font-size: 16px; margin-top: 16px; max-width: 30rem; }
.auth-points { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 8px; max-width: 26rem; }
.auth-points li {
  display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 6px 12px;
  background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--red); border-radius: var(--r);
  font-size: 14px; font-weight: 500;
}
.auth-points i { width: 20px; text-align: center; color: var(--red-text); }
.auth-side .hero-series { margin: 0; }

/* colonna form */
.auth-main {
  display: flex; flex-direction: column; align-items: center;
  padding: 0 var(--gutter) calc(24px + env(safe-area-inset-bottom));
  background: radial-gradient(70% 35% at 50% 0%, rgba(220, 38, 38, .10), transparent 70%), var(--bg);
  outline: none;
}
.auth-top {
  width: 100%; max-width: 420px; height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.auth-back {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  color: var(--muted); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .5px;
  transition: color var(--fast);
}
.auth-back:hover { color: var(--text); }
@media (min-width: 960px) {
  .auth-top { max-width: none; justify-content: flex-end; }
  .auth-top .brand { display: none; }
}
@media (max-width: 380px) { .auth-back span { display: none; } }

.auth-card { width: 100%; max-width: 420px; margin: auto 0; padding: 24px 0 32px; }
@media (min-width: 560px) {
  .auth-card {
    background: var(--surface-2); border: 1px solid rgba(220, 38, 38, .25); border-left: 3px solid var(--red);
    border-radius: var(--r); padding: 32px; box-shadow: var(--glow);
  }
}
.auth-card h1 { font-size: clamp(28px, 6vw, 36px); line-height: 1.1; }
.auth-sub { color: var(--muted); font-size: 14px; margin-top: 4px; }
.auth-head { margin-bottom: 24px; }

/* form */
.field { margin-bottom: 16px; }
.field label {
  display: block; margin-bottom: 4px;
  color: var(--text); font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .5px;
}
.input-wrap { position: relative; }
.input-wrap > i { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; font-size: 14px; }
.input-wrap input {
  width: 100%; height: 44px; padding: 6px 44px 6px 36px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border); border-radius: var(--r);
  font-family: var(--font-body); font-size: 16px; /* 16px evita lo zoom automatico su iOS */
  transition: border-color var(--fast), box-shadow var(--fast);
}
.input-wrap input::placeholder { color: #737373; }
.input-wrap input:hover { border-color: var(--red); }
.input-wrap input:focus { outline: none; border: 2px solid var(--red); padding-left: 35px; box-shadow: 0 0 0 3px rgba(220, 38, 38, .2); }
.input-wrap input:-webkit-autofill { -webkit-text-fill-color: var(--text); -webkit-box-shadow: 0 0 0 1000px var(--surface) inset; caret-color: var(--text); }
.pw-toggle {
  position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  width: 40px; height: 40px; border: 0; border-radius: var(--r); background: none;
  color: var(--muted); cursor: pointer; font-size: 15px;
  transition: color var(--fast), background var(--fast);
}
.pw-toggle:hover { color: var(--text); background: var(--surface-2); }

.field-row { display: flex; justify-content: flex-end; margin: -8px 0 16px; }
.link { color: var(--text); font-weight: 600; text-decoration: underline; text-decoration-color: rgba(248, 113, 113, .5); text-underline-offset: 3px; transition: text-decoration-color var(--fast); }
.link:hover { text-decoration-color: var(--red-text); }
.link-muted { display: inline-flex; align-items: center; min-height: 32px; color: var(--muted); font-size: 12px; font-weight: 500; transition: color var(--fast); }
.link-muted:hover { color: var(--text); }

.btn-block { width: 100%; height: 44px; font-size: 16px; }
.btn.is-loading, .btn:disabled { opacity: .3; cursor: not-allowed; box-shadow: none; pointer-events: none; }

.divider { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 11px; font-weight: 500; margin: 24px 0; text-transform: uppercase; letter-spacing: .8px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.btn-google { background: #fff; color: #1f1f1f; border-color: var(--border); }
.btn-google:hover { background: #F0F0F0; }
.btn-google img { width: 18px; height: 18px; }

.auth-switch { text-align: center; color: var(--muted); font-size: 14px; margin-top: 24px; }

/* messaggi */
.alert { display: flex; gap: 8px; align-items: flex-start; padding: 8px 12px; border-radius: var(--r); margin-bottom: 16px; font-size: 14px; font-weight: 500; }
.alert i { margin-top: 3px; }
.alert-error { background: rgba(220, 38, 38, .125); border-left: 3px solid var(--red); color: var(--red-text); }
.alert-info  { background: rgba(37, 99, 235, .125); border-left: 3px solid var(--blue); color: var(--blue-text); }

.auth-legal { color: var(--muted); font-size: 11px; text-align: center; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.auth-top .nav-tools { gap: 12px; }
