/* Loaded only by login/iscriviti/activation outside GISA.
   Keep legacy styles intact for GISA and the other public flows. */
body {
    display: block;
    min-height: 100vh;
    /* background: #f3f5f9; */
    color: #3f4b5b !important;
    font-family: "Open Sans", "Helvetica Neue", sans-serif;
}

.dama-auth,
.dama-auth input,
.dama-auth button,
.dama-auth .ui-widget {
    font-family: "Open Sans", "Helvetica Neue", sans-serif;
}

.dama-auth a:focus-visible,
.dama-auth button:focus-visible,
.dama-auth input[type="checkbox"]:focus-visible {
    outline: 2px solid #4076bd;
    outline-offset: 3px;
}

.dama-auth input[type="checkbox"] {
    accent-color: #4076bd;
    vertical-align: middle;
}

/* Login: retain the centered form and the existing controls. */
#home.dama-auth-login {
    min-height: 100vh;
    padding: 40px 20px;
    /* background: #f3f5f9; */
}

.dama-auth-login .panelLogin {
    display: block;
    max-width: 460px;
    padding: 36px 40px 24px;
    background: #fff;
    border: 1px solid #e1e7ef;
    border-top: 4px solid #5298f2;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(54, 65, 80, 0.08);
    color: #3f4b5b;
}

.dama-auth-login #f > div:first-of-type {
    margin-bottom: 28px !important;
}

.dama-auth-login #f > div:first-of-type img {
    max-width: 100%;
    height: auto;
}

.dama-auth-login .enter {
    margin-bottom: 24px !important;
}

.dama-auth-login h3 {
    margin: 0;
    color: #364150;
    font-size: 24px;
    font-weight: 600;
    font-family: inherit;
}

.dama-auth-login input.form-control,
.dama-auth-register #home input.ui-inputfield.ui-inputtext {
    box-sizing: border-box;
    width: 100%;
    min-height: 46px;
    padding: 12px 14px !important;
    border: 1px solid #dce3ec !important;
    border-radius: 8px;
    background: #f7f9fc !important;
    color: #364150;
    font-size: 14px;
    box-shadow: none;
}

.dama-auth-login input.form-control:focus,
.dama-auth-register #home input.ui-inputfield.ui-inputtext:focus {
    border-color: #5298f2 !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(82, 152, 242, 0.15);
}

.dama-auth input::placeholder {
    color: #68788d;
    opacity: 1;
}

.dama-auth-login .item.passgroup {
    display: block;
    width: 100%;
    margin-bottom: 20px;
}

.dama-auth-login .item.passgroup .form-control {
    padding-right: 48px !important;
    border-radius: 8px;
}

.dama-auth-login .toggle-password {
    position: absolute;
    top: 1px;
    right: 1px;
    bottom: 1px;
    width: 44px;
    margin: 0;
    cursor: pointer;
}

.dama-auth-login .field_icon {
    justify-content: center;
    width: 100%;
    margin: 0;
    padding: 0;
    border-radius: 0 8px 8px 0;
    background: transparent;
    color: #68788d;
    font-size: 16px;
}

.dama-auth-login .group_btn {
    gap: 12px;
    margin-bottom: 24px !important;
    padding: 0;
    color: #5c6a7c;
    font-size: 13px;
}

.dama-auth-login #forgot_pass_link,
.dama-auth-login .create_account a,
.dama-auth-register .auth-account a,
.dama-auth-register .auth-consent a {
    color: #356aad !important;
}

.dama-auth-login .btn.signin.si_blue,
.dama-auth-register #salva_prof.signup.si_blue {
    width: 100%;
    min-height: 46px;
    padding: 10px 16px !important;
    border: 1px solid #4076bd;
    border-radius: 8px;
    background: #4076bd;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-shadow: none;
    box-shadow: none;
}

.dama-auth-login .btn.signin.si_blue:hover,
.dama-auth-register #salva_prof.signup.si_blue:hover {
    border-color: #315f9c;
    background: #315f9c !important;
}

.dama-auth-login #f > .create_account {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e9edf3;
    font-size: 13px;
    line-height: 1.7;
}

.dama-auth-login #recupera_form .create_account {
    margin-top: 0 !important;
}

.dama-auth-login .loginInfoMessage,
.dama-auth-login .errorMessage {
    margin: 0 0 20px;
    padding: 12px 14px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.5;
    text-align: left;
    overflow-wrap: anywhere;
}

.dama-auth-login .errorMessage {
    border-left: 3px solid #d9534f;
    background: #fff0f0;
    color: #a12b2b;
}

/* Activation: reuse the login card, with readable labels and instructions. */
.dama-auth-activation .logo {
    margin-bottom: 28px !important;
}

.dama-auth-activation .inputcontent .ui-outputlabel {
    display: block;
    margin: 0 0 6px;
    color: #3f4b5b;
    font-size: 13px;
    font-weight: 600;
}

.dama-auth-activation .reset-message {
    color: #5c6a7c;
}

.dama-auth-activation .login-return {
    color: #356aad;
    font-size: 13px;
}

.dama-auth-activation input.form-control.ui-state-error {
    border-color: #d9534f !important;
}

/* Registration: retain the PrimeFaces grid, profiles and form order. */
.dama-auth-register.container {
    width: 100%;
    max-width: 960px;
    padding: 40px 24px 24px;
}

.dama-auth-register h2 {
    margin: 0 auto 28px;
    max-width: 640px;
    /* color: #364150; */
    font-size: 26px;
    font-weight: 600;
    line-height: 1.4;
}
#risultato h2{color: #364150;}

.dama-auth-register #choice .ui-panelgrid {
    width: 100%;
}

.dama-auth-register #choice .ui-panelgrid-content {
    border: 0;
    background: transparent;
}

.dama-auth-register #choice .ui-panelgrid-cell {
    padding: 10px;
}

.dama-auth-register .squareContainer {
    width: 100%;
    min-height: 278px;
    padding: 24px;
    border: 1px solid #e1e7ef;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(54, 65, 80, 0.04);
}

.dama-auth-register .squareContainer:hover,
.dama-auth-register .squareContainer:focus-within {
    border-color: #9cc7fe;
    box-shadow: 0 6px 20px rgba(54, 65, 80, 0.08);
}

.dama-auth-register .soft-square-img {
    width: 100%;
    height: 104px;
    border-radius: 8px;
}

.dama-auth-register .soft-square-img img {
    width: 200px;
    max-width: 100%;
    height: auto;
}

.dama-auth-register .squareContainer h3 {
    color: #364150;
    font-family: inherit;
    font-size: 18px;
    font-weight: 600;
}

.dama-auth-register .squareContainer p {
    min-height: 44px;
    color: #5c6a7c;
    font-size: 14px;
    line-height: 1.6;
}

.dama-auth-register .squareContainer a {
    color: #356aad;
}

.dama-auth-register #home {
    box-sizing: border-box;
    width: 100%;
    max-width: 480px;
    margin: 28px auto 0;
    padding: 28px 32px;
    border: 1px solid #e1e7ef;
    border-top: 4px solid #5298f2;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 8px 28px rgba(54, 65, 80, 0.08);
}

.dama-auth-register #home > div {
    width: 100%;
}

.dama-auth-register #home img {
    box-sizing: border-box;
    max-width: 100%;
    height: auto;
    margin-top: 0 !important;
    padding: 16px;
    border-radius: 8px;
    background: #364150;
}

.dama-auth-register #home .item {
    margin-bottom: 14px;
    text-align: left;
}

.dama-auth-register #home input.ui-state-error {
    border-color: #d9534f !important;
}

.dama-auth-register .auth-consent {
    display: block;
    text-align: left;
    font-size: 13px;
    line-height: 1.7;
}

.dama-auth-register .auth-consent,
.dama-auth-register .auth-consent span,
.dama-auth-register .auth-account {
    color: #5c6a7c !important;
}

.dama-auth-register .auth-account {
    margin-top: 24px !important;
    font-size: 13px;
}

.dama-auth-register .footer {
    margin: 36px 0 0;
    padding-top: 24px;
    border-top: 1px solid #dce3ec;
    color: #68788d;
    font-size: 12px;
    line-height: 1.7;
}

.dama-auth-register .footer .privacy_link {
    flex-wrap: wrap;
    gap: 8px 20px;
    margin-top: 0;
}

.dama-auth-register .footer a {
    color: #5c6a7c;
}

@media (max-width: 640px) {
    #home.dama-auth-login {
        padding: 24px 16px;
    }

    .dama-auth-login .panelLogin {
        padding: 28px 24px 20px;
    }

    .dama-auth-register.container {
        padding: 28px 16px 20px;
    }

    .dama-auth-register h2 {
        font-size: 22px;
    }

    .dama-auth-register #choice .ui-panelgrid-cell {
        padding: 8px 0;
    }

    .dama-auth-register .squareContainer {
        min-height: 0;
        padding: 20px;
    }

    .dama-auth-register #home {
        padding: 24px;
    }
}
