/* ==========================================================================
   STILE LOGIN V3 - FIX MANI
   ========================================================================== */

.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: #f0f2f5;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Avatar nel cerchio */
.avatar-wrapper {
    position: relative;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: #fff;
    border: 6px solid #fff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);
    margin-bottom: -60px;
    z-index: 100;
    overflow: hidden;
    pointer-events: none;
}

.avatar-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
}

.face-img {
    z-index: 10;
}

.pupils-img {
    z-index: 20;
    transition: transform 0.15s ease-out;
}

/* MANI - REGOLE INDIPENDENTI */
.hand-img {
    z-index: 30;
    opacity: 0;
    /* Nascoste di default */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.2s;
}

/* Posizione di partenza (Sotto il cerchio) */
#hand-l {
    transform: translateY(100%);
}

#hand-r {
    transform: translateX(20px) translateY(100%);
}

/* 20px a dx su PC */

/* POSIZIONE ATTIVA (Quando clicchi sulla password) */
#hand-l.active {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

#hand-r.active {
    opacity: 1 !important;
    transform: translateX(20px) translateY(0) !important;
}

/* Card e Form */
.login-card {
    background: white;
    padding: 85px 35px 40px;
    border-radius: 32px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
    width: 100%;
    text-align: center;
}

.login-card, .login-card *, .login-card *::before, .login-card *::after { box-sizing: border-box; }

.login-card input {
    width: 100%;
    padding: 18px;
    margin: 12px 0;
    border: 2px solid #edf2f7;
    border-radius: 16px;
    font-size: 16px;
    outline: none;
    background: #fdfdfd;
}

.btn-login {
    width: 100%;
    padding: 18px;
    background: #ec8300;
    color: white;
    border: none;
    border-radius: 16px;
    font-weight: 700;
    cursor: pointer;
    text-transform: uppercase;
    margin-top: 15px;
}

/* FIX PER SMARTPHONE */
@media (max-width: 480px) {
    .avatar-wrapper {
        width: 150px;
        height: 150px;
    }

    /* Riducendo lo spostamento della mano destra per non farla uscire dal cerchio piccolo */
    #hand-r {
        transform: translateX(5px) translateY(100%);
    }

    #hand-r.active {
        transform: translateX(5px) translateY(0) !important;
    }
}
/* ---------- v8 ---------- */
body.login-page-body { margin: 0; font-family: Inter, system-ui, sans-serif; }
.login-card form { margin: 0; }
.login-title { margin: 0 0 6px; font-size: 20px; }
.login-sub { margin: 0 0 18px; color: #666; font-size: 14px; }
.login-alert { padding: 11px 14px; border-radius: 12px; margin-bottom: 10px; font-size: 14px; text-align: left; }
.login-alert.err { background: #fee2e2; color: #991b1b; }
.login-alert.ok { background: #dcfce7; color: #166534; }
.login-link { display: inline-block; margin-top: 16px; color: #6b7280; font-size: 14px; text-decoration: none; }
.login-link:hover { color: #ec8300; }
.login-foot { color: #9ca3af; font-size: 12px; margin-top: 18px; }
.login-about { max-width: 420px; margin: 22px auto 0; text-align: center; color: #4b5563; font-size: 13.5px; line-height: 1.55; }
.login-about h1 { font-size: 17px; margin: 0 0 6px; color: #1f2937; }
.login-about p { margin: 0 0 8px; }
.login-legal a { color: #b45f00; }
.agency-btn { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px; margin-bottom: 10px; border-radius: 14px; border: 2px solid #edf2f7; background: #fff; text-align: left; cursor: pointer; font: inherit; }
.agency-btn:hover { border-color: #ec8300; }
.agency-btn small { display: block; color: #ec8300; font-size: 12px; }
.agency-ico { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%; background: #f1f5f9; display: grid; place-items: center; overflow: hidden; font-weight: 800; color: #ec8300; }
.agency-ico img { width: 100%; height: 100%; object-fit: contain; padding: 5px; }

/* colonna dell'accesso + presentazione */
.login-col { width: 100%; display: flex; flex-direction: column; align-items: center; }
.login-lead { font-size: 15px; color: #1f2937; }
.login-punti { list-style: none; padding: 0; margin: 14px 0; text-align: left; display: grid; gap: 9px; }
.login-punti li { position: relative; padding-left: 18px; }
.login-punti li::before { content: ""; position: absolute; left: 0; top: .55em; width: 8px; height: 8px; border-radius: 50%; background: #ec8300; }
.login-punti strong { color: #1f2937; display: block; font-size: 14px; }
.login-nota { color: #6b7280; font-size: 12.5px; }
@media (min-width: 900px) {
    .login-container.duo { max-width: 940px; display: grid; grid-template-columns: 400px 1fr; column-gap: 64px; align-items: center; }
    .login-container.duo .login-about { margin: 60px 0 0; text-align: left; max-width: 440px; font-size: 14px; }
    .login-container.duo .login-about h1 { font-size: 26px; letter-spacing: -.01em; margin-bottom: 8px; }
    .login-container.duo .login-foot { grid-column: 1 / -1; text-align: center; }
}
