/* Login homepage: mantiene identico il layout storico e apre il CAPTCHA in modale. */
#login.ait-home-login-compact {
    position: absolute;
    right: 60px;
    top: 2px;
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    text-align: right;
    z-index: 120;
}
#login.ait-home-login-compact form { position: relative; margin: 0; padding: 0; }
#login.ait-home-login-compact #login-table { margin: 0; }
#login.ait-home-login-compact #login-bt {
    position: absolute;
    right: -35px;
    bottom: 1px;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    cursor: pointer;
    background: url('../images/login.png') no-repeat 0 0;
}
.ait-home-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
}
.ait-login-modal { display: none; position: fixed; inset: 0; z-index: 999999; }
.ait-login-modal.is-open { display: block; }
.ait-login-modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.68); }
.ait-login-modal-card {
    position: absolute;
    top: 50%; left: 50%;
    width: 620px;
    max-width: calc(100vw - 40px);
    transform: translate(-50%, -50%);
    box-sizing: border-box;
    padding: 22px;
    border: 1px solid #f2a51a;
    border-radius: 14px;
    background: linear-gradient(180deg, #12345a 0%, #071a2e 100%);
    color: #fff;
    box-shadow: 0 22px 60px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,255,255,.12);
    text-align: center;
}
.ait-login-modal-title { color: #ffad28; font-size: 25px; font-weight: 800; }
.ait-login-modal-card p { margin: 10px 0 18px; color: #e8eef5; font-size: 16px; }
.ait-login-modal-close {
    position: absolute; top: 7px; right: 10px;
    border: 0; background: transparent; color: #fff;
    font-size: 26px; cursor: pointer;
}
.ait-home-captcha {
    display: grid;
    grid-template-columns: 190px minmax(0, 1fr) 58px;
    gap: 8px;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}
.ait-home-captcha img { width: 190px; height: 64px; border-radius: 7px; background: #fff; object-fit: cover; }
.ait-home-captcha input { height: 64px; font-size: 20px; box-sizing: border-box; border: 1px solid #9eb1c5; border-radius: 7px; text-align: center; text-transform: uppercase; font-weight: 800; letter-spacing: 2px; }
.ait-home-refresh { width: 58px; height: 64px; border: 0; border-radius: 7px; color: #fff; font-weight: 800; cursor: pointer; background: linear-gradient(#ffb942,#db6500); box-shadow: 0 3px 0 #8a3c00; }
.ait-home-submit { width: 100%; height: 52px; margin-top: 12px; border: 0; border-radius: 8px; color: #fff; font-weight: 800; cursor: pointer; background: linear-gradient(#ffb235,#e75b00); box-shadow: 0 4px 0 #8d3500; }
.ait-home-submit:disabled { opacity: .48; cursor: not-allowed; box-shadow: none; }
.ait-home-login-error { margin: 0 0 12px; padding: 8px; border-radius: 7px; background: #7e1721; color: #fff; font-size: 12px; }
.ait-home-captcha-message { min-height: 16px; margin-top: 6px; color: #ffd06b; font-size: 11px; }

.ait-home-captcha input.is-valid {
    border-color: #279b37;
    box-shadow: 0 0 0 2px rgba(39, 155, 55, 0.22);
}

.ait-home-captcha input.is-invalid {
    border-color: #cc0000;
    box-shadow: 0 0 0 2px rgba(204, 0, 0, 0.20);
}

.ait-home-captcha-message.is-valid {
    color: #7ee397;
    font-weight: 700;
}

.ait-home-captcha-message.is-invalid {
    color: #ff9b9b;
    font-weight: 700;
}

.ait-home-captcha-message.is-checking {
    color: #ffd06b;
}


@media (max-width: 680px) {
    .ait-login-modal-card {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
        overflow-y: auto;
        padding: 18px;
    }

    .ait-home-captcha {
        grid-template-columns: 1fr 58px;
    }

    .ait-home-captcha img {
        grid-column: 1 / -1;
        width: 100%;
        max-width: 260px;
        justify-self: center;
    }
}
