/*
 * VeryESG - Login e recupero password modal
 * Popup login, recupero automatico via email e richiesta manuale via P.IVA.
 */

        .login-modal {
        position: fixed;
        inset: 0;
        z-index: 30;
        display: none;
        align-items: center;
        justify-content: center;
        padding: 16px;
        background: rgba(8, 13, 32, .72);
        backdrop-filter: blur(7px);
    }

    .login-modal.is-open { display: flex; }

    .login-card {
        position: relative;
        width: min(460px, calc(100vw - 32px));
        min-height: auto;
        padding: 28px 30px 22px;
        border-radius: 22px;
        overflow: hidden;
        background: rgba(197, 200, 209, .96);
        color: var(--modal-blue);
        box-shadow: 0 24px 70px rgba(0,0,0,.35);
    }

    .login-card::after {
        content: '';
        position: absolute;
        right: -74px;
        bottom: 10px;
        width: 170px;
        height: 170px;
        border-radius: 50%;
        opacity: .72;
        background:
            radial-gradient(circle at 50% 50%, rgba(255,255,255,.78) 0 7px, transparent 8px),
            radial-gradient(circle at 50% 50%, transparent 0 15%, rgba(255,255,255,.72) 15.2% 18.2%, transparent 18.7% 100%),
            radial-gradient(circle at 50% 50%, transparent 0 30%, rgba(255,255,255,.64) 30.2% 33.5%, transparent 34% 100%),
            radial-gradient(circle at 50% 50%, transparent 0 47%, rgba(255, 238, 132, .82) 47.2% 50.2%, transparent 50.7% 100%);
        mask-image: radial-gradient(circle, transparent 0 5%, #000 5.7% 62%, transparent 63% 100%);
        pointer-events: none;
    }

    .login-close {
        position: absolute;
        top: 12px;
        right: 14px;
        width: 28px;
        height: 28px;
        border: 0;
        border-radius: 999px;
        color: #ffffff;
        background: rgba(33, 59, 143, .45);
        cursor: pointer;
        font-size: 21px;
        line-height: 1;
    }

    .login-title {
        position: relative;
        z-index: 1;
        margin: 0 0 18px;
        text-align: center;
        font-size: 26px;
        font-weight: 800;
        letter-spacing: .5px;
        color: var(--modal-blue);
    }

    .login-form {
        position: relative;
        z-index: 1;
    }

    .login-field { margin-bottom: 14px; }

    .login-field label {
        display: block;
        margin-bottom: 5px;
        font-size: 15px;
        line-height: 1.2;
        font-weight: 800;
        color: var(--modal-blue);
    }

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

    .login-field input[type="email"],
    .login-field input[type="password"],
    .login-field input[type="text"] {
        width: 100%;
        height: 43px;
        border: 0;
        border-radius: 7px;
        padding: 0 42px 0 12px;
        color: #1d2f6f;
        background: #ffffff;
        font-size: 16px;
        outline: 2px solid rgba(255,255,255,.65);
        box-shadow: inset 0 0 0 1px rgba(33,59,143,.06);
    }

    .login-field input::placeholder { color: #99a5ba; opacity: 1; }

    .toggle-password {
        position: absolute;
        right: 0;
        top: 0;
        width: 42px;
        height: 43px;
        border: 0;
        background: transparent;
        color: #163581;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .login-error {
        margin-top: 7px;
        color: #9c1d28;
        font-size: 14px;
        font-weight: 700;
    }

    .login-status {
        margin: -6px 0 18px;
        padding: 12px 15px;
        border-radius: 8px;
        background: rgba(255,255,255,.52);
        color: #17337b;
        font-weight: 700;
    }

    .login-actions {
        display: flex;
        justify-content: center;
        margin: 18px 0 12px;
    }

    .login-submit {
        min-width: 132px;
        height: 45px;
        border: 0;
        border-radius: 6px;
        background: #7e8ebf;
        color: #ffffff;
        cursor: pointer;
        font-family: inherit;
        font-size: 18px;
        font-weight: 800;
        transition: transform .16s ease, background .16s ease;
    }

    .login-submit:hover {
        background: #6f80b5;
        transform: translateY(-1px);
    }

    .login-separator {
        height: 2px;
        margin: 12px 0 16px;
        background: rgba(255,255,255,.95);
    }

    .login-links {
        position: relative;
        z-index: 1;
        display: grid;
        gap: 8px;
        justify-items: center;
        font-size: 15px;
        color: var(--modal-blue);
    }

    .login-links a {
        color: var(--modal-blue);
        text-decoration: underline;
    }

    .login-footer {
        position: relative;
        right: auto;
        bottom: auto;
        z-index: 1;
        margin-top: 18px;
        text-align: right;
        font-size: 15px;
        color: var(--modal-blue);
        font-style: italic;
        font-weight: 800;
    }

    .modal-note {
        position: relative;
        z-index: 1;
        margin: -4px 0 18px;
        color: var(--modal-blue);
        font-size: 15px;
        line-height: 1.45;
        font-weight: 600;
    }

    .modal-note strong { font-weight: 800; }

    .login-field textarea {
        width: 100%;
        min-height: 78px;
        border: 0;
        border-radius: 7px;
        padding: 10px 12px;
        color: #1d2f6f;
        background: #ffffff;
        font-family: inherit;
        font-size: 15px;
        outline: 2px solid rgba(255,255,255,.65);
        resize: vertical;
    }

    .login-field textarea::placeholder { color: #99a5ba; opacity: 1; }

    .inline-link-button {
        display: inline;
        border: 0;
        padding: 0;
        background: transparent;
        color: var(--modal-blue);
        cursor: pointer;
        font: inherit;
        text-decoration: underline;
    }

    .modal-secondary-actions {
        position: relative;
        z-index: 1;
        display: grid;
        gap: 7px;
        justify-items: center;
        margin-top: 12px;
        color: var(--modal-blue);
        font-size: 14px;
    }

    .modal-secondary-actions a,
    .modal-secondary-actions button {
        color: var(--modal-blue);
        text-decoration: underline;
    }

    .manual-hint {
        position: relative;
        z-index: 1;
        margin-top: 10px;
        padding: 10px 12px;
        border-radius: 8px;
        background: rgba(255,255,255,.40);
        color: #1d2f6f;
        font-size: 13px;
        line-height: 1.35;
        font-weight: 700;
    }

/* Responsive popup */
        @media (max-width: 1180px) {
        .main-header { gap: 18px; }
        .brand-card { min-width: 185px; height: 58px; }
        .brand-wordmark { font-size: 28px; }
        .main-nav { gap: 18px; }
        .main-nav a { font-size: 16px; }
        .btn-login, .btn-register, .btn-logout { font-size: 18px; min-height: 44px; padding-inline: 16px; }
        .header-actions { gap: 12px; }
    }

    @media (max-width: 920px) {
        .home-shell {
            background:
                linear-gradient(180deg, rgba(17, 25, 54, 0.98) 0%, rgba(17, 25, 54, 0.88) 60%, rgba(17, 25, 54, 0.96) 100%),
                var(--home-hero-background,
                    radial-gradient(circle at 75% 40%, rgba(255, 212, 0, 0.18), transparent 42%)
                );
            background-size: cover;
            background-position: center;
        }

        .main-header {
            align-items: flex-start;
            flex-wrap: wrap;
            padding: 12px 16px;
        }

        .main-nav {
            order: 3;
            width: 100%;
            overflow-x: auto;
            padding: 8px 0 2px;
        }

        .header-actions { margin-left: auto; }
        .lang-pill, .icon-link { display: none; }
        .hero-content {
            min-height: calc(100vh - 124px);
            padding: 70px 24px 90px;
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: flex-start;
        }
        .hero-title { font-size: clamp(38px, 10vw, 58px); }
        .hero-kicker { margin: 58px 0 0; }
        .dot-orbits { right: -240px; top: 190px; width: 650px; height: 650px; opacity: .45; }
        .login-card { min-height: auto; padding: 28px 30px 22px; }
    }

    @media (max-width: 560px) {
        .brand-card { min-width: 158px; height: 52px; padding-inline: 9px; }
        .brand-shield { width: 34px; height: 38px; }
        .brand-wordmark { font-size: 24px; }
        .btn-login, .btn-register, .btn-logout { font-size: 15px; min-height: 40px; padding-inline: 12px; }
        .header-actions { gap: 8px; }
        .main-nav a { white-space: nowrap; font-size: 15px; }
        .hero-title { letter-spacing: -1px; }
        .login-modal { padding: 12px; align-items: center; overflow-y: auto; }
        .login-card { border-radius: 20px; width: min(420px, calc(100vw - 24px)); padding: 26px 22px 20px; }
        .login-title { font-size: 24px; }
        .login-field label { font-size: 14px; }
        .login-field input[type="email"],
        .login-field input[type="password"],
        .login-field input[type="text"],
        .toggle-password { height: 42px; }
        .login-submit { height: 43px; min-width: 124px; font-size: 17px; }
        .login-links { font-size: 14px; }
        .login-footer { margin-top: 16px; font-size: 14px; }
    }
