/* =====================================================================
   Pagine di accesso: login.aspx e recuperaPassword.aspx
   ===================================================================== */

html, body, form {
    height: 100%;
    margin: 0;
    padding: 0;
}

body.authPage {
    background: #eef1f5;
    color: #0f2747;
    font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
}

.authWrap {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 16px;
    box-sizing: border-box;
}

.authLogo {
    display: block;
    width: 300px;
    max-width: 70vw;
    height: auto;
    margin: 0 auto 44px auto;
}

.authCard {
    width: 100%;
    max-width: 480px;
    padding: 40px 48px 32px 48px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(15, 39, 71, 0.10), 0 2px 6px rgba(15, 39, 71, 0.05);
    box-sizing: border-box;
}

.authTitle {
    margin: 0 0 28px 0;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    color: #0f2747;
}

.authSubtitle {
    margin: -16px 0 24px 0;
    font-size: 14px;
    color: #64748b;
}

/* ---- Campi con icona ---- */
.authField {
    position: relative;
    margin-bottom: 18px;
}

    .authField > i {
        position: absolute;
        left: 0;
        top: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 50px;
        height: 54px;
        line-height: 1;
        font-size: 18px;
        color: #475569;
        pointer-events: none;
        z-index: 5;
    }

.authPage .authInput,
.authPage .authField .form-control {
    display: block;
    width: 100% !important;
    max-width: none !important;
    height: 54px;
    padding: 0 16px 0 50px;
    border: 1px solid #d5dbe3;
    border-radius: 10px !important;
    background: #f3f5f8;
    color: #0f172a;
    font-size: 17px;
    box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
    box-sizing: border-box;
    transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

    .authPage .authInput::placeholder,
    .authPage .authField .form-control::placeholder {
        color: #8391a5;
    }

    .authPage .authInput:focus,
    .authPage .authField .form-control:focus {
        outline: none;
        background: #ffffff;
        border-color: #F7941D;
        box-shadow: 0 0 0 3px rgba(247, 148, 29, 0.20);
    }

/* ---- Pulsante principale ---- */
.authPage .authBtn,
.authPage .authBtn:visited {
    display: block;
    width: 100% !important;
    height: 54px;
    margin: 26px 0 0 0;
    padding: 0 16px;
    border: 0;
    border-radius: 10px;
    background: #F7941D;
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    line-height: 54px;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(247, 148, 29, 0.30);
    transition: background-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

    .authPage .authBtn:hover,
    .authPage .authBtn:focus {
        background: #E8810B;
        color: #ffffff;
        text-decoration: none;
        box-shadow: 0 6px 16px rgba(247, 148, 29, 0.40);
    }

    .authPage .authBtn:active {
        transform: translateY(1px);
    }

/* ---- Link secondari ---- */
.authLinks {
    margin-top: 22px;
    text-align: center;
    font-size: 15px;
}

    .authLinks a,
    .authLinks a:visited {
        color: #0f2747;
        text-decoration: none;
    }

        .authLinks a:hover,
        .authLinks a:focus {
            color: #E8810B;
            text-decoration: underline;
        }

/* ---- Messaggi (riepilogo validazione e messaggi dal server) ---- */
.authAlert {
    margin: 4px 0 0 0;
    padding: 10px 14px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 14px;
    text-align: left;
}

    .authAlert ul {
        margin: 0;
        padding-left: 18px;
    }

.authMsg {
    display: block;
    margin-top: 18px;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    font-size: 14px;
    text-align: center;
}

    .authMsg:empty {
        display: none;
    }

/* ---- Recupero password: adatta il controllo ucRecuperoPassword (usato anche altrove) ---- */
.authRec .panel {
    width: 100% !important;
    margin: 0;
    border: 0 !important;
    background: transparent;
    box-shadow: none;
}

    .authRec .panel > br {
        display: none;
    }

.authRec .panel-heading {
    padding: 0;
    border: 0 !important;
    background: none !important;
}

.authRec .panel-title {
    margin: 0 0 10px 0;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    color: #0f2747;
}

.authRec .panel-body {
    padding: 0 !important;
}

    .authRec .panel-body > div {
        height: auto !important;
    }

.authRec .panel-footer {
    padding: 0;
    margin: 0 0 24px 0;
    border: 0;
    background: none;
    color: #64748b;
    font-size: 14px !important;
    text-align: left !important;
}

/* il footer descrittivo nel controllo sta in fondo: lo porto sotto il titolo */
.authRec .panel {
    display: flex;
    flex-direction: column;
}

.authRec .panel-heading { order: 1; }
.authRec .panel-footer { order: 2; }
.authRec .panel-body { order: 3; }

.authRec .input-group {
    position: relative;
    display: block;
    width: 100%;
    margin-bottom: 18px !important;
}

    .authRec .input-group .input-group-addon {
        position: absolute;
        left: 0;
        top: 0;
        z-index: 5;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 50px;
        height: 54px;
        padding: 0;
        border: 0;
        background: none;
        color: #475569;
        font-size: 17px;
        line-height: 1;
        transform: none;
        pointer-events: none;
    }

        .authRec .input-group .input-group-addon .glyphicon {
            top: 0;
            line-height: 1;
        }

    .authRec .input-group .form-control {
        float: none;
        display: block;
        width: 100% !important;
        max-width: none !important;
        height: 54px;
        margin: 0;
        padding: 0 16px 0 50px;
        border: 1px solid #d5dbe3;
        border-radius: 10px !important;
        background: #f3f5f8;
        color: #0f172a;
        font-size: 17px;
        font-weight: 400;
        box-shadow: inset 0 1px 2px rgba(15, 23, 42, 0.04);
        box-sizing: border-box;
    }

        .authRec .input-group .form-control::placeholder {
            color: #8391a5;
        }

        .authRec .input-group .form-control:focus {
            outline: none;
            color: #0f172a;
            background: #ffffff;
            border-color: #F7941D;
            box-shadow: 0 0 0 3px rgba(247, 148, 29, 0.20);
        }

.authRec .marginValSum {
    float: none;
    width: 100%;
    margin: 0 0 4px 0 !important;
    padding: 10px 14px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fef2f2;
    color: #b91c1c;
    font-size: 14px;
}

    .authRec .marginValSum ul {
        margin: 0;
        padding-left: 18px;
    }

.authRec .form-group {
    margin: 0 !important;
}

.authRec .controls {
    float: none;
    padding: 0;
}

    .authRec .controls br {
        display: none;
    }

.authRec a.forward,
.authRec a.forward:visited {
    display: block;
    width: 100% !important;
    height: 54px;
    margin: 26px 0 0 0;
    padding: 0 16px;
    border: 0;
    border-radius: 10px;
    background: #F7941D;
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    line-height: 54px;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(247, 148, 29, 0.30);
    transition: background-color .15s ease, box-shadow .15s ease;
}

    .authRec a.forward:hover,
    .authRec a.forward:focus {
        background: #E8810B;
        color: #ffffff;
        text-decoration: none;
        box-shadow: 0 6px 16px rgba(247, 148, 29, 0.40);
    }

.authRec span[id$="lblmsg"] {
    display: block;
    margin-top: 18px;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
    font-size: 14px !important;
    text-align: center;
}

    .authRec span[id$="lblmsg"]:empty {
        display: none;
    }

.authRec span[id$="lblmsg"] + br,
.authRec .panel + br {
    display: none;
}

/* ---- Smartphone ---- */
@media (max-width: 575px) {
    .authWrap {
        justify-content: flex-start;
        padding: 32px 16px;
    }

    .authLogo {
        width: 200px;
        margin-bottom: 28px;
    }

    .authCard {
        padding: 28px 22px 24px 22px;
        border-radius: 14px;
    }

    .authTitle,
    .authRec .panel-title {
        font-size: 26px;
    }

    .authTitle {
        margin-bottom: 22px;
    }
}
