/* ===== TOTOSCORE — pagine account (login, registrazione, reset…) ===========
   Stessa identità della landing: verde scuro + bianco, Poppins, nessuna icona
   decorativa, animazioni CSS pulite.
   ========================================================================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;800&display=swap');

:root {
    --green-950: #04231a;
    --green-900: #062a20;
    --green-800: #0a3a2c;
    --green-700: #0e4d39;
    --green-600: #12805a;
    --mint: #46e0a0;
    --white: #ffffff;
    --ink: #0b1f18;
    --muted: #5b6f66;
    --field: #f1f6f3;
    --field-border: #d6e3db;
    --danger: #c5362f;
    --danger-bg: #fdecea;
    --success: #0e7a4f;
    --success-bg: #e8f6ee;
    --radius: 16px;
    --shadow: 0 28px 70px -24px rgba(0, 0, 0, .55);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

/* niente scrollbar orizzontale dalle decorazioni; lo scroll verticale resta libero */
html { overflow-x: hidden; }

body.auth-body {
    font-family: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    color: var(--white);
    background: radial-gradient(120% 120% at 80% -10%, var(--green-700), var(--green-950) 62%);
}
/* bagliore animato + linee campo, coerenti con la landing */
body.auth-body::before {
    content: ""; position: fixed; width: 80vw; height: 80vw; max-width: 820px; max-height: 820px;
    top: -22%; left: 52%; border-radius: 50%;
    background: radial-gradient(circle, rgba(70, 224, 160, .20), transparent 62%);
    filter: blur(8px); animation: auth-glow 14s ease-in-out infinite; pointer-events: none; z-index: 0;
}
body.auth-body::after {
    content: ""; position: fixed; right: -140px; bottom: -180px; width: 460px; height: 460px;
    border: 2px solid rgba(255, 255, 255, .07); border-radius: 50%; pointer-events: none; z-index: 0;
}
@keyframes auth-glow {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: .85; }
    50% { transform: translate(-5%, 5%) scale(1.12); opacity: 1; }
}

/* ── Card ─────────────────────────────────────────────────────────────── */
.auth-card {
    position: relative; z-index: 1;
    background: var(--white);
    color: var(--ink);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 100%; max-width: 480px;
    padding: 38px 40px;
    animation: auth-in .6s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes auth-in {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── Header / wordmark ────────────────────────────────────────────────── */
.auth-header { text-align: center; margin-bottom: 26px; }
.auth-brand {
    display: inline-block; font-weight: 800; letter-spacing: .04em; font-size: 1.5rem;
    color: var(--green-900); text-decoration: none; margin-bottom: 18px;
}
.auth-brand b { color: var(--green-600); font-weight: 800; }
.auth-header h1 { font-size: 1.4rem; font-weight: 700; color: var(--green-900); margin-bottom: 6px; letter-spacing: -.01em; }
.auth-header p { color: var(--muted); font-size: .95rem; }

/* ── Google button ────────────────────────────────────────────────────── */
.btn-google {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; padding: 12px 16px;
    background: var(--white); border: 1.5px solid var(--field-border); border-radius: 10px;
    color: var(--ink); font-size: .95rem; font-weight: 600; text-decoration: none; cursor: pointer;
    transition: border-color .15s, box-shadow .15s, transform .15s;
}
.btn-google:hover { border-color: var(--green-600); box-shadow: 0 6px 18px -8px rgba(0,0,0,.25); transform: translateY(-1px); color: var(--ink); }

/* ── Divider ──────────────────────────────────────────────────────────── */
.divider { display: flex; align-items: center; gap: 12px; margin: 20px 0; color: var(--muted); font-size: .8rem; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--field-border); }

/* ── Form ─────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-group label {
    display: flex; justify-content: space-between; align-items: center;
    color: var(--green-900); font-size: .85rem; font-weight: 600; margin-bottom: 7px;
}
.form-control {
    width: 100%; padding: 12px 14px;
    background: var(--field); border: 1.5px solid var(--field-border); border-radius: 10px;
    color: var(--ink); font-size: .95rem; font-family: inherit; outline: none;
    transition: border-color .15s, box-shadow .15s, background .15s;
}
.form-control::placeholder { color: #9fb1a8; }
.form-control:focus { border-color: var(--green-600); background: var(--white); box-shadow: 0 0 0 4px rgba(18, 128, 90, .14); }
.form-control.input-validation-error { border-color: var(--danger); }

/* ── Campo password con toggle mostra/nascondi ────────────────────────── */
.password-field { position: relative; }
.password-field .form-control { padding-right: 46px; }
.password-toggle {
    position: absolute; top: 0; right: 0; height: 100%; width: 46px;
    display: flex; align-items: center; justify-content: center;
    background: none; border: none; padding: 0; cursor: pointer;
    color: var(--muted); border-radius: 0 10px 10px 0; transition: color .15s;
}
.password-toggle:hover { color: var(--green-700); }
.password-toggle:focus-visible { outline: 2px solid var(--green-600); outline-offset: -2px; }
.password-toggle svg { width: 20px; height: 20px; }
.password-toggle .icon-eye-off { display: none; }
.password-toggle.is-visible .icon-eye { display: none; }
.password-toggle.is-visible .icon-eye-off { display: block; }

/* ── Checkbox ─────────────────────────────────────────────────────────── */
.form-check { display: flex; align-items: center; gap: 8px; margin-bottom: 20px; }
.form-check-input { width: 16px; height: 16px; accent-color: var(--green-600); cursor: pointer; }
.form-check-label { color: var(--muted); font-size: .88rem; cursor: pointer; }

/* ── Primary button ───────────────────────────────────────────────────── */
.btn-primary {
    width: 100%; padding: 13px; border: none; border-radius: 999px;
    background: var(--green-700); color: var(--white);
    font-size: 1rem; font-weight: 700; font-family: inherit; cursor: pointer;
    transition: background .15s, transform .12s, box-shadow .15s; letter-spacing: .01em;
}
.btn-primary:hover { background: var(--green-600); transform: translateY(-2px); box-shadow: 0 14px 28px -12px rgba(18, 128, 90, .7); }
.btn-primary:active { transform: translateY(0); }

/* ── Links & footer ───────────────────────────────────────────────────── */
.forgot-link { color: var(--green-600); font-size: .8rem; font-weight: 500; text-decoration: none; }
.forgot-link:hover { text-decoration: underline; }
.auth-footer { text-align: center; margin-top: 22px; color: var(--muted); font-size: .9rem; }
.auth-footer a { color: var(--green-600); text-decoration: none; font-weight: 600; }
.auth-footer a:hover { text-decoration: underline; }

/* ── Validation / alert ───────────────────────────────────────────────── */
.field-error { display: block; color: var(--danger); font-size: .8rem; margin-top: 5px; }
.alert { padding: 11px 14px; border-radius: 10px; font-size: .88rem; margin-bottom: 16px; }
.alert:empty { display: none; }
.alert-danger { background: var(--danger-bg); border: 1px solid #f3c7c4; color: #8f241f; }
.alert-success { background: var(--success-bg); border: 1px solid #bfe6cf; color: #0c5c3c; }

@media (prefers-reduced-motion: reduce) {
    body.auth-body::before, .auth-card { animation: none; }
}

@media (max-width: 480px) {
    .auth-card { padding: 28px 22px; }
}
