/* ============================================================
   auth.css — Login & Registrazione, layout premium "split-screen"
   Carica DOPO style.css. Scoped a body.auth-page.
   Tipografia IBM Plex Sans (mood "financial / tycoon").
   Icone via nav_icon() (SVG line, niente emoji).
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

/* ── Reset del layout centrato di base ────────────────────── */
body.auth-page {
    --auth-radius: 14px;
    --auth-panel: #0b0f14;
    font-family: 'IBM Plex Sans', 'Inter', system-ui, sans-serif;
    display: block;            /* annulla il flex centrato di .auth-page */
    padding: 0;
    background: var(--bg);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Shell a due colonne ──────────────────────────────────── */
.auth-shell {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    min-height: 100vh;
}

/* ============================================================
   COLONNA SINISTRA — pannello brand
   ============================================================ */
.auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 3rem 3.5rem;
    overflow: hidden;
    background:
        linear-gradient(160deg, rgba(11,15,20,.86) 0%, rgba(11,15,20,.93) 55%, rgba(6,9,12,.97) 100%),
        url('../img/hero-stadium.jpg') center 28% / cover no-repeat;
    border-right: 1px solid var(--border);
}
/* griglia tattica decorativa */
.auth-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(48,54,61,.28) 1px, transparent 1px),
        linear-gradient(90deg, rgba(48,54,61,.28) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 75% 70% at 35% 35%, #000 25%, transparent 100%);
}
/* alone verde */
.auth-brand::after {
    content: '';
    position: absolute;
    top: -18%; left: 8%;
    width: 560px; height: 560px;
    background: radial-gradient(ellipse, rgba(0,200,83,.12) 0%, transparent 65%);
    pointer-events: none;
}
.auth-brand > * { position: relative; z-index: 1; }

/* logo */
.auth-brand-logo {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: -.02em;
    color: var(--text);
}
.auth-brand-logo .logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px; height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(0,200,83,.28), rgba(0,200,83,.08));
    border: 1px solid rgba(0,200,83,.35);
    color: var(--accent);
}
.auth-brand-logo .logo-accent { color: var(--accent); }

/* corpo centrale */
.auth-brand-body {
    margin-top: auto;
    margin-bottom: auto;
    padding: 2.5rem 0;
    max-width: 460px;
}
.auth-brand-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: rgba(0,200,83,.08);
    border: 1px solid rgba(0,200,83,.25);
    border-radius: 100px;
    padding: .3rem .85rem;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1.5rem;
}
.auth-brand-eyebrow .dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 8px var(--accent);
    animation: auth-pulse 2s ease-in-out infinite;
}
@keyframes auth-pulse { 0%,100% { opacity: 1; } 50% { opacity: .45; } }

.auth-brand-title {
    font-size: clamp(2rem, 3.2vw, 2.85rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.035em;
    color: var(--text);
    margin-bottom: 1rem;
}
.auth-brand-title em { font-style: normal; color: var(--accent); }
.auth-brand-sub {
    font-size: 1rem;
    line-height: 1.65;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

/* feature list con icone SVG */
.auth-feats { display: flex; flex-direction: column; gap: 1rem; }
.auth-feat { display: flex; align-items: flex-start; gap: .85rem; }
.auth-feat-ico {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: 10px;
    background: rgba(0,200,83,.1);
    border: 1px solid rgba(0,200,83,.22);
    color: var(--accent);
}
.auth-feat-txt b {
    display: block;
    font-size: .9rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: .1rem;
}
.auth-feat-txt span {
    font-size: .82rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* proof bar in basso */
.auth-brand-proof {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--border);
}
.auth-proof-item strong {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -.03em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.auth-proof-item strong span { color: var(--accent); }
.auth-proof-item small {
    font-size: .72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
}

/* ============================================================
   COLONNA DESTRA — area form
   ============================================================ */
.auth-main {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.5rem;
    background:
        radial-gradient(ellipse 90% 60% at 50% -10%, rgba(0,200,83,.06) 0%, transparent 60%),
        var(--bg);
}
.auth-card {
    width: 100%;
    max-width: 430px;
}

/* logo compatto (mostrato solo su mobile, quando il brand panel sparisce) */
.auth-mobile-logo {
    display: none;
    align-items: center;
    gap: .6rem;
    justify-content: center;
    margin-bottom: 1.75rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
}
.auth-mobile-logo .logo-mark {
    display: inline-flex; align-items: center; justify-content: center;
    width: 34px; height: 34px; border-radius: 9px;
    background: linear-gradient(135deg, rgba(0,200,83,.28), rgba(0,200,83,.08));
    border: 1px solid rgba(0,200,83,.35); color: var(--accent);
}
.auth-mobile-logo .logo-accent { color: var(--accent); }

.auth-head { margin-bottom: 1.75rem; }
.auth-head h2 {
    font-size: 1.55rem;
    font-weight: 700;
    letter-spacing: -.03em;
    color: var(--text);
    margin-bottom: .35rem;
}
.auth-head p {
    font-size: .92rem;
    color: var(--text-muted);
}
.auth-head p a { font-weight: 600; }

/* ── Form: override premium dei controlli ─────────────────── */
.auth-page .form-group { margin-bottom: 1.05rem; }
.auth-page .form-label {
    text-transform: none;
    letter-spacing: 0;
    font-size: .84rem;
    font-weight: 600;
    color: var(--text);
    opacity: .92;
}
.auth-page .form-control {
    padding: .72rem .9rem;
    background: var(--bg-input);
    border-radius: 9px;
    font-family: inherit;
    font-size: .92rem;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.auth-page .form-control:hover:not(:focus) { border-color: #3a4757; }
.auth-page .form-control:focus {
    background: #1a2029;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* input con icona a sinistra */
.auth-field { position: relative; }
.auth-field .auth-field-ico {
    position: absolute;
    left: .8rem; top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    transition: color .18s ease;
    display: inline-flex;
}
.auth-field .form-control { padding-left: 2.6rem; }
.auth-field:focus-within .auth-field-ico { color: var(--accent); }

/* toggle mostra/nascondi password */
.auth-field .auth-eye {
    position: absolute;
    right: .55rem; top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px; height: 32px;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 7px;
    transition: color .15s ease, background .15s ease;
}
.auth-field .auth-eye:hover { color: var(--text); background: rgba(255,255,255,.05); }
.auth-field .form-control.has-eye { padding-right: 2.8rem; }

/* riga "ricordami / password dimenticata" */
.auth-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: -.15rem 0 1.15rem;
    font-size: .82rem;
}
.auth-check {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}
.auth-check input {
    width: 16px; height: 16px;
    accent-color: var(--accent);
    cursor: pointer;
}

/* bottone submit premium */
.auth-page .btn-block {
    margin-top: .35rem;
    padding: .82rem 1.5rem;
    font-size: .95rem;
    font-weight: 700;
    border-radius: 10px;
}
.auth-page .btn-primary {
    background: linear-gradient(135deg, #00d35a 0%, #00a846 100%);
    box-shadow: 0 8px 22px -10px var(--accent-glow);
}
.auth-page .btn-primary:hover:not(:disabled) {
    filter: brightness(1.05);
    box-shadow: 0 12px 28px -10px rgba(0,200,83,.55);
    transform: translateY(-1px);
}

/* separatore */
.auth-sep {
    display: flex;
    align-items: center;
    gap: .9rem;
    margin: 1.5rem 0;
    color: var(--text-muted);
    font-size: .74rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}
.auth-sep::before, .auth-sep::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* nota di sicurezza */
.auth-secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .45rem;
    margin-top: 1.5rem;
    font-size: .76rem;
    color: var(--text-muted);
}
.auth-secure svg { color: var(--accent); }

/* alert: bordo a sinistra */
.auth-page .alert { border-left: 3px solid currentColor; border-radius: 9px; }
.auth-page .alert-error   { color: var(--error); }
.auth-page .alert-success { color: var(--success); }

/* password strength: leggermente più ricca */
.auth-page .strength-bar { height: 5px; border-radius: 3px; }
.auth-page .strength-label { font-weight: 600; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 920px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-brand { display: none; }
    .auth-main { min-height: 100vh; padding: 2.5rem 1.25rem; }
    .auth-mobile-logo { display: inline-flex; }
}
@media (max-width: 460px) {
    .auth-main { padding: 1.75rem 1rem; }
    .auth-head h2 { font-size: 1.4rem; }
}

/* ── Reduced motion ───────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .auth-brand-eyebrow .dot { animation: none; }
    .auth-page .btn-primary:hover:not(:disabled) { transform: none; }
}
