/* =====================================================================
   AreaPubblica.css — pagine senza layout (Layout = null):
   login, registrazione, verifica OTP, esito registrazione.

   Uso:   <body class="area-pubblica area-aziende">   oppure   area-candidati
   Card:  .login-card            login            (840 px)
          .login-card.larga      registrazione    (1000 px)
          .login-card.stretta    OTP ed esito     (820 px)

   La palette è quella della login (gradiente chiaro). Il gradiente scuro
   (#0a2540/#0c4a6e, #1e1a4a/#312580) resta SOLO alla sidebar dei layout
   interni: non va copiato qui.

   Il nome .login-card non è casuale: ".card" è già una classe di
   Bootstrap/AdminLTE (flex-direction: column) e impilava il pannello laterale.
   ===================================================================== */

/* ── Palette per area ── */
body.area-aziende {
    --accent: #0ea5e9;
    --accent-dark: #0284c7;
    --accent-light: #e0f2fe;
    --side-from: #0369a1;
    --side-to: #0891b2;
}

body.area-candidati {
    --accent: #6366f1;
    --accent-dark: #4338ca;
    --accent-light: #eef2ff;
    --side-from: #4f46e5;
    --side-to: #7c3aed;
}

body.area-pubblica {
    --ok: #16a34a;
    --ok-light: #dcfce7;
    --ko: #ef4444;
    --ko-light: #fee2e2;
}

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

/* ── Pagina: card al centro, footer sotto ── */
body.area-pubblica {
    margin: 0;
    min-height: 100vh;
    font-family: 'DM Sans', sans-serif;
    background: #eaecf2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
}

/* ── Card ── */
.login-card {
    display: flex;
    flex-direction: row;
    width: 100%;
    max-width: 840px;
    min-height: 520px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,.13);
    animation: ap-up .45s ease both;
}

    .login-card.larga {
        max-width: 1000px;
        min-height: 600px;
    }

    .login-card.stretta {
        max-width: 820px;
        min-height: 460px;
    }

@keyframes ap-up {
    from {
        opacity: 0;
        transform: translateY(18px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Pannello laterale ── */
.side-panel {
    flex: 0 0 290px;
    background: linear-gradient(155deg, var(--side-from) 0%, var(--side-to) 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    padding: 48px 34px;
    position: relative;
    overflow: hidden;
}

.login-card.stretta .side-panel {
    flex-basis: 260px;
    padding: 48px 32px;
}

/* esito negativo */
.side-panel.ko {
    background: linear-gradient(155deg, #b91c1c 0%, #7f1d1d 100%);
}

    .side-panel::before,
    .side-panel::after {
        content: '';
        position: absolute;
        border-radius: 50%;
        pointer-events: none;
    }

    .side-panel::before {
        top: -50px;
        left: -50px;
        width: 160px;
        height: 160px;
        background: rgba(255,255,255,.07);
    }

    .side-panel::after {
        bottom: -60px;
        right: -60px;
        width: 200px;
        height: 200px;
        background: rgba(255,255,255,.06);
    }

.side-icon {
    width: 62px;
    height: 62px;
    border-radius: 15px;
    background: rgba(255,255,255,.18);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 22px;
    position: relative;
    z-index: 1;
}

    .side-icon i {
        font-size: 25px;
        color: #fff;
    }

.side-title {
    font-family: 'Sora', sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin-bottom: 10px;
    line-height: 1.25;
    position: relative;
    z-index: 1;
}

.login-card.stretta .side-title {
    font-size: 20px;
}

.side-desc {
    font-size: 13px;
    color: rgba(255,255,255,.72);
    line-height: 1.6;
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

    .side-desc:last-child {
        margin-bottom: 0;
    }

.side-badges {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    position: relative;
    z-index: 1;
}

.badge-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    background: rgba(255,255,255,.13);
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 10px;
    padding: 11px 14px;
}

    .badge-row i {
        font-size: 13px;
        color: rgba(255,255,255,.9);
        flex-shrink: 0;
        margin-top: 2px;
    }

    .badge-row span {
        font-size: 12.5px;
        color: rgba(255,255,255,.85);
        line-height: 1.4;
    }

/* ── Pannello del form ── */
.form-panel,
.content-panel {
    flex: 1;
    min-width: 0;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 46px 46px;
}

.login-card.larga .form-panel {
    padding: 40px 46px;
}

/* esito: contenuto centrato */
.content-panel {
    align-items: center;
    text-align: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 24px;
}

    .brand img {
        height: 30px;
        width: auto;
    }

    .brand span {
        font-weight: 700;
        font-size: 13.5px;
        color: #4b5563;
        letter-spacing: -.2px;
    }

    /* login: logo più grande */
    .brand.grande img {
        height: 48px;
    }

    .brand.grande span {
        font-size: 15px;
    }

.form-title {
    font-family: 'Sora', sans-serif;
    font-size: 21px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 4px;
    line-height: 1.25;
}

.form-sub {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.55;
    margin: 0 0 22px;
}

    .form-sub strong {
        color: #111827;
    }

/* ── Campi ── */
.field {
    margin-bottom: 15px;
}

    .field label {
        display: block;
        font-size: 13px;
        font-weight: 600;
        color: #374151;
        margin-bottom: 5px;
    }

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

    .input-wrap i.ico {
        position: absolute;
        left: 13px;
        color: #d1d5db;
        font-size: 13px;
        pointer-events: none;
        transition: color .2s;
    }

    .input-wrap:focus-within i.ico {
        color: var(--accent);
    }

    .input-wrap input {
        width: 100%;
        height: 46px;
        border: 1.5px solid #e5e7eb;
        border-radius: 10px;
        padding: 0 40px 0 37px;
        font-family: 'DM Sans', sans-serif;
        font-size: 14px;
        color: #111827;
        background: #fafafa;
        outline: none;
        transition: border-color .2s, box-shadow .2s, background .2s;
    }

        .input-wrap input:focus {
            border-color: var(--accent);
            background: #fff;
            box-shadow: 0 0 0 3px var(--accent-light);
        }

.eye-btn {
    position: absolute;
    right: 10px;
    background: none;
    border: none;
    cursor: pointer;
    color: #9ca3af;
    padding: 5px;
    border-radius: 6px;
    font-size: 13px;
    transition: color .2s;
}

    .eye-btn:hover {
        color: var(--accent);
    }

.val-msg {
    font-size: 12px;
    color: #ef4444;
    margin-top: 4px;
}

.forgot-row {
    text-align: right;
    margin: -4px 0 18px;
}

    .forgot-row a {
        font-size: 12px;
        font-weight: 600;
        color: var(--accent-dark);
        text-decoration: none;
    }

        .forgot-row a:hover {
            text-decoration: underline;
        }

/* ── Bottone principale ── */
.btn-submit {
    width: 100%;
    height: 47px;
    border: none;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    font-family: 'DM Sans', sans-serif;
    font-size: 14.5px;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: background .2s, transform .1s;
    margin-bottom: 10px;
}

    .btn-submit:hover {
        background: var(--accent-dark);
        transform: translateY(-1px);
    }

    .btn-submit:disabled {
        background: #d1d5db;
        cursor: not-allowed;
        transform: none;
    }

/* ── Social (colori di marca, non l'accento del portale) ── */
.divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 13px 0;
}

    .divider span {
        flex: 1;
        border-top: 1px solid #f0f0f0;
    }

    .divider small {
        font-size: 11px;
        color: #c4c8d0;
    }

.btn-social {
    width: 100%;
    height: 45px;
    border-radius: 10px;
    border: 1.5px solid #dadce0;
    background: #fff;
    color: #3c4043;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    transition: background .2s, border-color .2s, box-shadow .2s, opacity .2s;
}

    .btn-social + .btn-social {
        margin-top: 10px;
    }

    .btn-social:hover {
        background: #f8f9fa;
        border-color: #d2d5d9;
        color: #3c4043;
        text-decoration: none;
        box-shadow: 0 1px 3px rgba(60,64,67,.15);
    }

    .btn-social svg {
        width: 18px;
        height: 18px;
        flex-shrink: 0;
    }

    .btn-social .fa-linkedin-in {
        font-size: 17px;
        flex-shrink: 0;
        color: #0A66C2;
    }

    /* registrazione: spenti finché termini e privacy non sono spuntati */
    .btn-social.spento {
        opacity: .45;
        pointer-events: none;
    }

.social-nota {
    font-size: 11.5px;
    color: #9ca3af;
    text-align: center;
    margin: 8px 0 0;
}

/* ── Errori ── */
.val-summary {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 9px;
    padding: 10px 14px;
    margin-bottom: 14px;
}

    .val-summary ul {
        margin: 0;
        padding-left: 16px;
    }

    .val-summary li {
        font-size: 12.5px;
        color: #dc2626;
    }

    /* il riepilogo vuoto non deve occupare spazio */
    .val-summary.validation-summary-valid {
        display: none;
    }

/* errore di ritorno dal provider esterno (login) */
.val-esterno {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 9px;
    padding: 11px 14px;
    margin-bottom: 16px;
    font-size: 12.5px;
    color: #dc2626;
    line-height: 1.5;
}

    .val-esterno i {
        margin-top: 2px;
        flex-shrink: 0;
    }

/* ── Striscia in fondo (registrati / accedi) ── */
.register-strip {
    margin-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    background: var(--accent-light);
    border-radius: 11px;
    border: 1px solid rgba(0,0,0,.05);
}

    .register-strip p {
        margin: 0;
        font-size: 13px;
        color: #374151;
    }

    .register-strip a {
        flex-shrink: 0;
        background: var(--accent);
        color: #fff;
        text-decoration: none;
        font-size: 13px;
        font-weight: 700;
        padding: 8px 16px;
        border-radius: 8px;
        white-space: nowrap;
        transition: background .2s;
    }

        .register-strip a:hover {
            background: var(--accent-dark);
            color: #fff;
        }

/* ── Termini e privacy ── */
.terms-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 4px 0 6px;
    font-size: 12.5px;
    font-weight: 400;
    color: #374151;
    line-height: 1.5;
    cursor: pointer;
}

    .terms-check input {
        width: 17px;
        height: 17px;
        margin-top: 1px;
        accent-color: var(--accent);
        flex-shrink: 0;
        cursor: pointer;
    }

    .terms-check a,
    .privacy-consent a {
        color: var(--accent-dark);
        font-weight: 600;
    }

.privacy-consent {
    font-size: 12px;
    color: #6b7280;
    line-height: 1.5;
    margin: 4px 0 14px;
}

/* ── OTP ── */
.otp-row {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
    justify-content: flex-start;
}

.otp-digit {
    flex: 1;
    height: 48px;
    max-width: 48px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-family: 'Sora', sans-serif;
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    color: #111827;
    background: #fafafa;
    outline: none;
    transition: border-color .2s, box-shadow .2s, background .2s;
    caret-color: transparent;
}

    .otp-digit:focus {
        border-color: var(--accent);
        background: #fff;
        box-shadow: 0 0 0 3px var(--accent-light);
    }

    .otp-digit.filled {
        border-color: var(--accent);
        background: var(--accent-light);
    }

/* nascosto: il valore reale lo compone il JS */
#Codice {
    display: none;
}

.otp-error {
    margin: 0 0 16px;
    min-height: 18px;
}

#otpForm .btn-submit {
    margin-bottom: 18px;
}

.resend-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #6b7280;
}

#resendBtn {
    background: none;
    border: none;
    color: var(--accent-dark);
    font-weight: 700;
    cursor: pointer;
    font-size: 13px;
    padding: 0;
}

    #resendBtn:disabled {
        color: #9ca3af;
        cursor: not-allowed;
    }

#countdown {
    font-size: 12px;
    color: #9ca3af;
}

.back-link {
    margin-top: 20px;
    font-size: 13px;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 6px;
}

    .back-link a {
        color: var(--accent-dark);
        font-weight: 600;
        text-decoration: none;
    }

        .back-link a:hover {
            text-decoration: underline;
        }

/* ── Esito registrazione ── */
.status-ico {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin-bottom: 22px;
}

    .status-ico.ok {
        background: var(--ok-light);
        color: var(--ok);
    }

    .status-ico.ko {
        background: var(--ko-light);
        color: var(--ko);
    }

.status-title {
    font-family: 'Sora', sans-serif;
    font-size: 23px;
    font-weight: 800;
    color: #111827;
    margin: 0 0 10px;
}

.status-sub {
    font-size: 14px;
    color: #6b7280;
    line-height: 1.6;
    margin: 0 0 30px;
    max-width: 360px;
}

.btn-login {
    width: 100%;
    max-width: 320px;
    height: 47px;
    border-radius: 10px;
    background: var(--accent);
    color: #fff;
    font-family: 'DM Sans', sans-serif;
    font-size: 14.5px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    transition: background .2s, transform .1s;
}

    .btn-login:hover {
        background: var(--accent-dark);
        transform: translateY(-1px);
        color: #fff;
        text-decoration: none;
    }

.btn-retry {
    margin-top: 16px;
    font-size: 13px;
    color: var(--accent-dark);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

    .btn-retry:hover {
        text-decoration: underline;
    }

/* ── iPad verticale e sotto: via il pannello laterale ── */
@media (max-width: 760px) {
    .side-panel {
        display: none;
    }

    .form-panel,
    .content-panel,
    .login-card.larga .form-panel {
        padding: 36px 26px;
    }

    .login-card,
    .login-card.larga,
    .login-card.stretta {
        min-height: 0;
    }
}

/* ── Telefono ── */
@media (max-width: 575.98px) {
    body.area-pubblica {
        padding: 16px 10px;
    }

    .form-panel,
    .content-panel,
    .login-card.larga .form-panel {
        padding: 28px 18px;
    }

    /* nome e cognome uno sotto l'altro */
    .name-row {
        flex-direction: column;
        gap: 0 !important;
    }

    .register-strip {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
    }

        .register-strip a {
            white-space: normal;
        }

    /* niente zoom automatico su iPhone */
    .input-wrap input {
        font-size: 16px;
    }

    /* le sei caselle si dividono la riga */
    .otp-row {
        gap: 6px;
    }

    .otp-digit {
        max-width: none;
        min-width: 0;
        height: 52px;
    }

    .resend-row {
        flex-wrap: wrap;
    }
}

