        /* ==========================================================================
           FIX CRITICO SCROLL: Ripristina lo scrolling verticale naturale
           (Sovrascrive l'overflow: hidden globale presente in style.css)
           ========================================================================== */
        html, html body, body.form-page-body {
            overflow-x: hidden !important;
            overflow-y: auto !important;
            height: auto !important;
            min-height: 100% !important;
            min-height: 100vh !important;
            min-height: 100dvh !important;
            -webkit-overflow-scrolling: touch !important;
            scroll-behavior: smooth !important;
        }

        :root, html, body, body.form-page-body {
            --font-headings: 'Signo', 'Manrope', sans-serif;
            --font-main: 'Manrope', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        }

        body.form-page-body {
            font-family: var(--font-main, 'Manrope', sans-serif);
            color: var(--grigio-testo, #2c3e50);
            background: linear-gradient(135deg, #e3f2e8 0%, #edf7f0 50%, #e0f0e5 100%);
            display: flex;
            flex-direction: column;
            position: relative;
            min-height: 100vh;
            -webkit-tap-highlight-color: transparent;
        }

        /* --- Sfondo Dinamico Tappa Selezionata con Transizione Fluida --- */
        .form-stage-backdrop-wrap {
            position: fixed;
            inset: 0;
            z-index: 0;
            pointer-events: none;
            overflow: hidden;
            opacity: 0;
            visibility: hidden;
            transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.8s ease;
        }

        .form-stage-backdrop-wrap.is-active {
            opacity: 1;
            visibility: visible;
        }

        .form-stage-backdrop-img {
            position: absolute;
            inset: -20px;
            background-size: cover;
            background-position: center center;
            background-repeat: no-repeat;
            filter: blur(1.5px) brightness(0.96) saturate(1.4);
            transform: scale(1.03);
            transition: background-image 0.5s ease-in-out;
        }

        .form-stage-backdrop-overlay {
            position: absolute;
            inset: 0;
            background: linear-gradient(180deg, rgba(235, 246, 239, 0.22) 0%, rgba(220, 240, 227, 0.38) 50%, rgba(200, 230, 212, 0.58) 100%);
        }

        /* --- Sfondo con micro-griglia radiale e blob organici fluidi (Sfondo Generico/Default) --- */
        .form-page-bg {
            position: fixed;
            inset: 0;
            z-index: 0;
            background-image: radial-gradient(rgba(46, 125, 50, 0.22) 2px, transparent 2px);
            background-size: 28px 28px;
            pointer-events: none;
            transition: opacity 0.6s ease;
        }

        .form-bg-blob {
            position: fixed;
            border-radius: 50%;
            filter: blur(65px);
            z-index: 0;
            pointer-events: none;
            animation: moveFormBlob 16s infinite alternate ease-in-out;
            transition: opacity 0.6s ease;
        }

        .form-stage-backdrop-wrap.is-active ~ .form-page-bg,
        .form-stage-backdrop-wrap.is-active ~ .form-bg-blob {
            opacity: 0;
        }
        .form-blob-1 {
            width: 580px;
            height: 580px;
            background: rgba(46, 125, 50, 0.28);
            top: -120px;
            left: -100px;
        }
        .form-blob-2 {
            width: 540px;
            height: 540px;
            background: rgba(251, 192, 45, 0.25);
            bottom: -100px;
            right: -60px;
            animation-delay: -8s;
        }

        @keyframes moveFormBlob {
            0% { transform: translate(0, 0) scale(1); }
            100% { transform: translate(60px, 70px) scale(1.08); }
        }

        /* --- Top Progress Bar interattiva --- */
        .progress-container {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 5px;
            background: rgba(46, 125, 50, 0.1);
            z-index: 2100;
        }
        .progress-bar {
            height: 100%;
            background: linear-gradient(90deg, var(--verde-main, #2e7d32), var(--accento, #fbc02d));
            width: 0%;
            transition: width 0.35s cubic-bezier(0.16, 1, 0.3, 1);
            border-top-right-radius: 4px;
            border-bottom-right-radius: 4px;
            box-shadow: 0 0 12px rgba(46, 125, 50, 0.6);
        }

        /* --- Header Form Pulito ed Uniformato --- */
        .form-header-bar {
            width: 100%;
            padding: 12px 5%;
            background: rgba(255, 255, 255, 0.95);
            backdrop-filter: blur(14px);
            -webkit-backdrop-filter: blur(14px);
            border-bottom: 1px solid rgba(46, 125, 50, 0.1);
            position: sticky;
            top: 0;
            z-index: 1000;
            display: flex;
            align-items: center;
            justify-content: space-between;
            box-shadow: 0 4px 20px rgba(0,0,0,0.03);
        }

        .brand-link-unified {
            display: flex;
            align-items: center;
            text-decoration: none;
        }
        .brand-link-unified img {
            height: 44px;
            width: auto;
            object-fit: contain;
            transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }
        .brand-link-unified:hover img {
            transform: scale(1.05);
        }

        .header-actions {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .btn-tour-nav {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 42px;
            height: 42px;
            border-radius: 50%;
            background: rgba(46, 125, 50, 0.08);
            color: var(--verde-main, #2e7d32);
            text-decoration: none;
            border: 1px solid rgba(46, 125, 50, 0.22);
            transition: all 0.25s cubic-bezier(0.175, 0.885, 0.32, 1.275);
            box-shadow: 0 2px 8px rgba(0,0,0,0.04);
            font-size: 1.05rem;
            cursor: pointer;
        }
        .btn-tour-nav:hover {
            background: var(--verde-main, #2e7d32);
            color: white;
            transform: scale(1.06);
            box-shadow: 0 4px 12px rgba(46, 125, 50, 0.25);
        }

        /* --- Contenitore Principale Form Card Glassmorphism --- */
        .form-main-container {
            max-width: 860px;
            width: 94%;
            margin: 20px auto 40px;
            background: rgba(255, 255, 255, 0.96);
            backdrop-filter: blur(24px);
            -webkit-backdrop-filter: blur(24px);
            border-radius: 24px;
            border: 1px solid rgba(255, 255, 255, 0.95);
            box-shadow: 0 16px 45px rgba(27, 94, 32, 0.08), 0 6px 18px rgba(0,0,0,0.03);
            position: relative;
            overflow: hidden;
            z-index: 10;
            transition: max-width 0.3s ease;
        }

        /* Hero superiore della Card */
        .form-card-hero {
            background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 60%, #388e3c 100%);
            padding: 24px 28px;
            color: white;
            text-align: center;
            position: relative;
            border-top-left-radius: 24px;
            border-top-right-radius: 24px;
            border-bottom-left-radius: 0;
            border-bottom-right-radius: 0;
        }
        .form-card-hero::before {
            content: '';
            position: absolute;
            top: -50px;
            right: -50px;
            width: 160px;
            height: 160px;
            border-radius: 50%;
            background: rgba(251, 192, 45, 0.15);
            filter: blur(35px);
            pointer-events: none;
        }

        .form-card-hero-content {
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 100%;
            position: relative;
            z-index: 1;
            gap: 6px;
        }

        .form-card-hero-left {
            display: flex;
            flex-direction: column;
            align-items: center;
        }

        .hero-pill-badge {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            background: rgba(255, 255, 255, 0.18);
            backdrop-filter: blur(10px);
            -webkit-backdrop-filter: blur(10px);
            border: 1px solid rgba(255, 255, 255, 0.3);
            color: var(--accento, #fbc02d);
            padding: 4px 14px;
            border-radius: 50px;
            font-size: 0.75rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 1.2px;
            margin-bottom: 8px;
        }

        .form-card-hero h1 {
            font-family: var(--font-headings, 'Signo', sans-serif);
            font-size: clamp(1.8rem, 3.2vw, 2.3rem);
            font-weight: 900;
            text-transform: uppercase;
            line-height: 1.1;
            margin: 0 0 6px;
            letter-spacing: 0.5px;
            text-shadow: 0 2px 8px rgba(0,0,0,0.12);
        }

        .form-card-hero p {
            font-size: 0.95rem;
            opacity: 0.92;
            font-weight: 300;
            max-width: 540px;
            margin: 0 auto;
            line-height: 1.35;
        }

        /* Desktop: Layout su 2 Colonne per Header Hero */
        @media (min-width: 768px) {
            .form-card-hero {
                padding: 22px 34px;
            }
            .form-card-hero-content {
                flex-direction: row;
                justify-content: space-between;
                align-items: center;
                text-align: left;
                gap: 28px;
            }
            .form-card-hero-left {
                align-items: flex-start;
                text-align: left;
                flex-shrink: 0;
            }
            .form-card-hero h1 {
                margin: 0;
                text-align: left;
            }
            .form-card-hero-right {
                flex: 1;
                display: flex;
                justify-content: flex-end;
            }
            .form-card-hero p {
                text-align: left;
                max-width: 440px;
                margin: 0;
                font-size: 0.96rem;
                line-height: 1.45;
                padding-left: 22px;
                border-left: 1.5px solid rgba(255, 255, 255, 0.22);
            }
        }

        /* --- Gestione Step Multi-Fase --- */
        .form-step-container {
            transition: opacity 0.3s ease, transform 0.3s ease;
        }
        .form-step-container.step-hidden {
            display: none !important;
        }
        .form-step-container.step-active {
            display: block !important;
            animation: fadeInStep 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards;
        }

        @keyframes fadeInStep {
            0% {
                opacity: 0;
                transform: translateY(10px);
            }
            100% {
                opacity: 1;
                transform: translateY(0);
            }
        }

        /* --- Footer Navigazione Step --- */
        .step-nav-footer {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            gap: 12px;
            margin-top: 20px;
            padding-top: 18px;
            border-top: 1px solid #edf2f7;
        }

        .btn-step-next {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            background: var(--verde-gradient, linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%));
            color: white;
            width: 100%;
            max-width: 360px;
            padding: 14px 28px;
            border-radius: 50px;
            border: none;
            font-family: var(--font-headings, 'Signo', sans-serif);
            font-weight: 900;
            font-size: 1.15rem;
            text-transform: uppercase;
            letter-spacing: 0.6px;
            cursor: pointer;
            box-shadow: 0 12px 28px rgba(46, 125, 50, 0.32);
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            position: relative;
            overflow: hidden;
        }
        .btn-step-next:hover {
            transform: translateY(-2px);
            box-shadow: 0 16px 36px rgba(46, 125, 50, 0.4);
        }
        .btn-step-next:active {
            transform: translateY(1px) scale(0.98);
        }

        .btn-step-back {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            background: transparent;
            color: #64748b;
            border: none;
            padding: 8px 18px;
            font-weight: 700;
            font-size: 0.95rem;
            cursor: pointer;
            transition: color 0.2s ease;
        }
        .btn-step-back:hover {
            color: var(--verde-scuro, #1b5e20);
            text-decoration: underline;
        }

        /* --- Corpo Form e Sezioni Visibili Compatte --- */
        .modern-form-body {
            padding: 10px 32px 30px;
        }

        /* --- Layout Desktop 2 Colonne a Larghezza Uguale per Step 1 --- */
        .step1-cards-grid {
            display: flex;
            flex-direction: column;
            gap: 16px;
            width: 100%;
        }

        @media (min-width: 992px) {
            .form-main-container {
                max-width: 1340px;
                width: 95%;
                margin: 24px auto 50px;
            }
            .modern-form-body {
                padding: 20px 40px 40px;
            }
            .step1-cards-grid {
                display: grid;
                grid-template-columns: repeat(2, minmax(0, 1fr));
                grid-template-rows: auto 1fr;
                gap: 24px;
                align-items: stretch;
                width: 100%;
            }
            #formSec1 {
                grid-column: 1;
                grid-row: 1;
                margin-bottom: 0;
            }
            #formSec3 {
                grid-column: 1;
                grid-row: 2;
                margin-bottom: 0;
            }
            #formSec2 {
                grid-column: 2;
                grid-row: 1 / span 2;
                margin-bottom: 0;
                display: flex;
                flex-direction: column;
                height: 100%;
            }
            #formSec2 .input-grid {
                flex: 1;
                align-content: space-between;
            }

            /* Step 2: Layout Desktop a 2 Colonne Paritetiche (Riepilogo + Privacy) */
            .step2-cards-grid {
                display: grid;
                grid-template-columns: repeat(2, minmax(0, 1fr));
                gap: 24px;
                align-items: stretch;
                width: 100%;
            }
            .step2-cards-grid #recapCard {
                margin: 0;
                display: flex;
                flex-direction: column;
                height: 100%;
            }
            .step2-cards-grid #recapCard .recap-grid {
                flex: 1;
                grid-template-columns: repeat(2, 1fr);
                gap: 10px 12px;
                align-content: space-between;
            }
            .step2-cards-grid #formSec4 {
                margin: 0;
                display: flex;
                flex-direction: column;
                height: 100%;
            }
            .step2-cards-grid #formSec4 .privacy-consent-group {
                flex: 1;
                display: flex;
                flex-direction: column;
                justify-content: flex-start;
                gap: 14px;
            }

            .step-nav-footer {
                flex-direction: row-reverse;
                justify-content: center;
                gap: 20px;
            }
        }

        @media (min-width: 1400px) {
            .form-main-container {
                max-width: 1420px;
                width: 95%;
            }
        }

        @media (max-width: 991px) {
            .step1-cards-grid {
                display: flex;
                flex-direction: column;
                gap: 16px;
            }
            #formSec1, #formSec2, #formSec3 {
                margin-bottom: 0;
            }
        }

        .form-section-card {
            position: relative;
            background: #ffffff;
            border-radius: 20px;
            padding: 18px 22px;
            margin-bottom: 15px;
            border: 1px solid #edf2f7;
            box-shadow: 0 3px 12px rgba(0,0,0,0.02);
            transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .form-section-card:hover {
            border-color: rgba(46, 125, 50, 0.22);
            box-shadow: 0 6px 18px rgba(46, 125, 50, 0.05);
        }
        .form-section-card:focus-within {
            border-color: var(--verde-main, #2e7d32);
            box-shadow: 0 8px 22px rgba(46, 125, 50, 0.08);
        }

        .section-header-row {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 12px;
            padding-bottom: 8px;
            border-bottom: 1.5px solid #f1f5f9;
        }
        .section-badge-icon {
            width: 34px;
            height: 34px;
            border-radius: 11px;
            background: linear-gradient(135deg, rgba(46,125,50,0.12) 0%, rgba(251,192,45,0.18) 100%);
            color: var(--verde-scuro, #1b5e20);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1rem;
            flex-shrink: 0;
            box-shadow: 0 3px 8px rgba(46, 125, 50, 0.06);
        }
        .section-heading-text {
            display: flex;
            flex-direction: column;
        }
        .section-heading-text h2 {
            font-family: var(--font-headings, 'Signo', sans-serif);
            font-size: 1.22rem;
            font-weight: 800;
            color: var(--verde-scuro, #1b5e20);
            margin: 0;
            letter-spacing: 0.2px;
            line-height: 1.2;
        }
        .section-heading-text span {
            font-size: 0.78rem;
            color: #64748b;
            margin-top: 1px;
            line-height: 1.25;
        }

        /* --- Griglia Campi Input Compatta --- */
        .input-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px 16px;
        }
        .input-full {
            grid-column: span 2;
        }

        .input-group {
            display: flex;
            flex-direction: column;
            gap: 5px;
            position: relative;
        }
        .input-group label {
            font-weight: 700;
            font-size: 0.86rem;
            color: #334155;
            display: flex;
            align-items: center;
            gap: 4px;
        }
        .input-group label span.req {
            color: #e53e3e;
            font-weight: 900;
        }
        .error-msg {
            font-size: 0.76rem;
            color: #e53e3e;
            font-weight: 700;
            display: none;
            margin-left: auto;
        }

        .input-wrapper {
            position: relative;
            width: 100%;
        }

        .field-icon {
            position: absolute;
            left: 14px;
            top: 50%;
            transform: translateY(-50%);
            color: #94a3b8;
            font-size: 0.95rem;
            transition: color 0.3s;
            pointer-events: none;
            z-index: 5;
        }

        .calendar-trigger, #openCdpBtn {
            pointer-events: auto !important;
            cursor: pointer;
            padding: 4px;
            margin-left: -4px;
            transition: all 0.2s ease;
        }

        .calendar-trigger:hover, #openCdpBtn:hover {
            color: var(--primario);
            transform: translateY(-50%) scale(1.18);
        }

        .status-icon {
            position: absolute;
            right: 14px;
            top: 50%;
            transform: translateY(-50%);
            font-size: 0.92rem;
            opacity: 0;
            transition: all 0.25s;
            pointer-events: none;
            z-index: 5;
        }

        /* Controllo standard input - compatto */
        .form-control {
            width: 100%;
            padding: 10px 14px;
            min-height: 42px;
            border-radius: 12px;
            border: 1.5px solid #e2e8f0;
            background: #f8fafc;
            font-family: var(--font-main, 'Manrope', sans-serif);
            font-size: 0.95rem;
            color: var(--grigio-testo, #2c3e50);
            transition: all 0.22s ease;
            outline: none;
            appearance: none;
        }
        .form-control.with-icon {
            padding-left: 40px;
        }
        .form-control:hover:not(:disabled) {
            border-color: #cbd5e1;
            background: #ffffff;
        }
        .form-control:focus:not(:disabled) {
            border-color: var(--verde-main, #2e7d32);
            background: #ffffff;
            box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.12);
        }
        .form-control:disabled {
            background-color: #e2e8f0;
            color: #94a3b8;
            cursor: not-allowed;
        }
        .form-control:focus ~ .field-icon {
            color: var(--verde-main, #2e7d32);
        }

        .form-control.is-valid {
            border-color: var(--verde-chiaro, #43a047);
            background: #ffffff;
            padding-right: 38px;
        }
        .form-control.is-valid ~ .field-icon {
            color: var(--verde-chiaro, #43a047);
        }
        .form-control.is-valid ~ .status-icon {
            opacity: 1;
            color: var(--verde-chiaro, #43a047);
        }
        .form-control.is-valid ~ .status-icon::before {
            content: "\f00c";
            font-family: "Font Awesome 6 Free";
            font-weight: 900;
        }

        .form-control.is-invalid {
            border-color: #e53e3e;
            background: #fff5f5;
            padding-right: 38px;
        }
        .form-control.is-invalid ~ .field-icon {
            color: #e53e3e;
        }
        .form-control.is-invalid ~ .status-icon {
            opacity: 1;
            color: #e53e3e;
        }
        .form-control.is-invalid ~ .status-icon::before {
            content: "\f071";
            font-family: "Font Awesome 6 Free";
            font-weight: 900;
        }

        /* --- Dropdown Personalizzato Eventi --- */
        .custom-select-wrapper {
            position: relative;
            width: 100%;
            user-select: none;
        }
        .custom-select-trigger {
            display: flex;
            justify-content: space-between;
            align-items: center;
            width: 100%;
            padding: 10px 14px;
            min-height: 42px;
            border-radius: 12px;
            border: 1.5px solid #e2e8f0;
            background: #f8fafc;
            cursor: pointer;
            transition: all 0.22s ease;
            outline: none;
            position: relative;
        }
        .custom-select-trigger.with-icon {
            padding-left: 40px;
        }
        .custom-select-trigger:hover {
            border-color: #cbd5e1;
            background: #ffffff;
        }
        .custom-select-trigger.active {
            border-color: var(--verde-main, #2e7d32);
            background: #ffffff;
            box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.12);
        }
        .custom-select-trigger.is-valid {
            border-color: var(--verde-chiaro, #43a047);
            background: #ffffff;
        }
        .custom-select-trigger.is-invalid-dropdown {
            border-color: #e53e3e;
            background: #fff5f5;
        }
        .custom-select-trigger .toggle-icon {
            transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            color: #64748b;
            font-size: 0.85rem;
        }
        .custom-select-trigger.active .toggle-icon {
            transform: rotate(180deg);
            color: var(--verde-main, #2e7d32);
        }

        .trigger-content {
            display: flex;
            flex-direction: column;
            align-items: flex-start;
        }
        .trigger-label {
            font-size: 0.95rem;
            color: #64748b;
            font-weight: 400;
            transition: 0.2s;
        }
        .trigger-label.selected-text {
            color: var(--verde-scuro, #1b5e20);
            font-weight: 800;
            font-size: 0.98rem;
            font-family: var(--font-headings, 'Signo', sans-serif);
        }
        .trigger-date {
            font-size: 0.76rem;
            color: var(--verde-main, #2e7d32);
            font-weight: 700;
            display: none;
            margin-top: 1px;
        }
        .trigger-content.has-value .trigger-date {
            display: flex;
            align-items: center;
            gap: 5px;
        }

        .custom-options {
            position: absolute;
            top: calc(100% + 6px);
            left: 0;
            right: 0;
            background: white;
            border-radius: 16px;
            box-shadow: 0 16px 36px rgba(0,0,0,0.16), 0 4px 12px rgba(0,0,0,0.05);
            border: 1.5px solid #cbd5e1;
            overflow: hidden;
            z-index: 9999;
            display: none;
            max-height: 300px;
            overflow-y: auto;
            overscroll-behavior: contain;
        }
        .custom-options.open {
            display: block !important;
            opacity: 1 !important;
            visibility: visible !important;
        }
        .custom-options::-webkit-scrollbar {
            width: 5px;
        }
        .custom-options::-webkit-scrollbar-thumb {
            background: #cbd5e1;
            border-radius: 10px;
        }

        .custom-option {
            padding: 11px 15px;
            display: flex;
            align-items: center;
            gap: 12px;
            cursor: pointer;
            transition: all 0.2s;
            border-bottom: 1px solid #f1f5f9;
        }
        .custom-option:last-child {
            border-bottom: none;
        }
        .custom-option:hover {
            background: var(--verde-bg, #f1f8f1);
            padding-left: 20px;
        }
        .custom-option.selected {
            background: var(--verde-bg, #f1f8f1);
            position: relative;
        }
        .custom-option.selected::before {
            content: '';
            position: absolute;
            left: 0;
            top: 0;
            bottom: 0;
            width: 4px;
            background: var(--verde-main, #2e7d32);
        }
        .opt-icon {
            width: 36px;
            height: 36px;
            border-radius: 10px;
            background: rgba(46, 125, 50, 0.1);
            color: var(--verde-main, #2e7d32);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.05rem;
            flex-shrink: 0;
        }
        .opt-details {
            display: flex;
            flex-direction: column;
        }
        .opt-title {
            font-weight: 800;
            color: var(--verde-scuro, #1b5e20);
            font-size: 0.95rem;
            line-height: 1.2;
            font-family: var(--font-headings, 'Signo', sans-serif);
        }
        .opt-date {
            font-size: 0.78rem;
            color: #64748b;
            margin-top: 2px;
            font-weight: 600;
            display: flex;
            align-items: center;
            gap: 4px;
        }

        /* --- Dropdown Comuni Ricercabile Compatto --- */
        .custom-search-select-wrapper {
            position: relative;
            width: 100%;
        }
        .search-input-container {
            position: relative;
        }
        .search-select-input {
            padding-right: 40px;
            cursor: text;
        }
        .search-input-container .toggle-icon {
            position: absolute;
            right: 14px;
            top: 50%;
            transform: translateY(-50%);
            color: #64748b;
            pointer-events: none;
            transition: 0.3s;
            z-index: 5;
            font-size: 0.9rem;
        }
        .custom-search-select-wrapper.open .toggle-icon {
            transform: translateY(-50%) rotate(180deg);
            color: var(--verde-main, #2e7d32);
        }
        .comune-option {
            padding: 10px 15px;
            cursor: pointer;
            border-bottom: 1px solid #f1f5f9;
            transition: 0.2s;
            color: var(--grigio-testo, #2c3e50);
            display: flex;
            align-items: center;
            gap: 10px;
            font-weight: 600;
            font-size: 0.92rem;
        }
        .comune-option:hover {
            background: var(--verde-bg, #f1f8f1);
            color: var(--verde-scuro, #1b5e20);
            padding-left: 20px;
        }
        .comune-option i {
            color: #94a3b8;
            font-size: 0.85rem;
            transition: 0.2s;
        }
        .comune-option:hover i {
            color: var(--verde-main, #2e7d32);
        }
        .no-results {
            padding: 14px;
            color: #64748b;
            font-style: italic;
            text-align: center;
            font-size: 0.88rem;
        }

        /* --- Custom Date Picker Popup --- */
        .date-hybrid-wrapper {
            position: relative;
        }
        .calendar-trigger {
            z-index: 10;
            cursor: pointer;
            pointer-events: auto;
            padding: 8px;
            margin-left: -8px;
        }
        .calendar-trigger:hover {
            color: var(--verde-main, #2e7d32);
        }

        .cdp-overlay {
            position: fixed;
            inset: 0;
            background: rgba(18, 28, 11, 0.45);
            backdrop-filter: blur(6px);
            -webkit-backdrop-filter: blur(6px);
            z-index: 2050;
            display: none;
            opacity: 0;
            transition: opacity 0.3s ease;
        }
        .cdp-overlay.open {
            display: flex;
            align-items: center;
            justify-content: center;
            opacity: 1;
        }
        .custom-datepicker {
            background: white;
            border-radius: 24px;
            box-shadow: 0 25px 50px rgba(0,0,0,0.22);
            width: 340px;
            max-width: 95vw;
            overflow: hidden;
            transform: scale(0.92);
            transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            display: flex;
            flex-direction: column;
            position: relative;
        }
        .cdp-overlay.open .custom-datepicker {
            transform: scale(1);
        }
        .cdp-header {
            background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
            padding: 16px 20px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            color: white;
        }
        .cdp-nav {
            background: rgba(255,255,255,0.2);
            border: none;
            width: 32px;
            height: 32px;
            border-radius: 50%;
            color: white;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: 0.2s;
        }
        .cdp-nav:hover {
            background: rgba(255,255,255,0.4);
            transform: scale(1.1);
        }
        .cdp-title {
            font-family: var(--font-headings, 'Signo', sans-serif);
            font-weight: 800;
            font-size: 1.1rem;
            cursor: pointer;
            padding: 5px 14px;
            border-radius: 10px;
            transition: 0.2s;
        }
        .cdp-title:hover {
            background: rgba(255,255,255,0.2);
        }
        .cdp-body {
            padding: 18px;
            background: white;
        }
        .cdp-weekdays {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            text-align: center;
            font-weight: 800;
            color: #94a3b8;
            font-size: 0.8rem;
            margin-bottom: 8px;
        }
        .cdp-days {
            display: grid;
            grid-template-columns: repeat(7, 1fr);
            gap: 4px;
        }
        .cdp-day {
            aspect-ratio: 1;
            display: flex;
            align-items: center;
            justify-content: center;
            border-radius: 50%;
            cursor: pointer;
            font-weight: 700;
            color: var(--grigio-testo, #2c3e50);
            font-size: 0.9rem;
            transition: 0.2s;
        }
        .cdp-day:hover:not(.empty) {
            background: var(--verde-bg, #f1f8f1);
            color: var(--verde-main, #2e7d32);
        }
        .cdp-day.selected {
            background: var(--verde-main, #2e7d32);
            color: white;
            box-shadow: 0 4px 10px rgba(46, 125, 50, 0.4);
        }
        .cdp-day.today {
            border: 2px solid var(--accento, #fbc02d);
        }
        .cdp-day.empty {
            cursor: default;
        }
        .cdp-quick-select {
            position: absolute;
            top: 64px;
            left: 0;
            right: 0;
            bottom: 0;
            background: white;
            display: flex;
            flex-direction: column;
            transform: translateY(100%);
            transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            z-index: 10;
        }
        .cdp-quick-select.open {
            transform: translateY(0);
        }
        .cdp-qs-header {
            padding: 12px 18px;
            background: #f8fafc;
            border-bottom: 1px solid #e2e8f0;
            font-weight: 800;
            color: var(--verde-scuro, #1b5e20);
            text-align: center;
            font-size: 1rem;
            font-family: var(--font-headings, 'Signo', sans-serif);
        }
        .cdp-qs-content {
            display: flex;
            flex: 1;
            overflow: hidden;
        }
        .cdp-qs-months, .cdp-qs-years {
            flex: 1;
            overflow-y: auto;
            padding: 10px;
        }
        .cdp-qs-months {
            border-right: 1px solid #f1f5f9;
        }
        .cdp-qs-item {
            padding: 10px;
            text-align: center;
            border-radius: 10px;
            cursor: pointer;
            margin-bottom: 3px;
            font-weight: 700;
            color: #64748b;
            transition: 0.2s;
            font-size: 0.9rem;
        }
        .cdp-qs-item:hover {
            background: var(--verde-bg, #f1f8f1);
            color: var(--verde-main, #2e7d32);
        }
        .cdp-qs-item.active {
            background: var(--verde-main, #2e7d32);
            color: white;
        }
        .cdp-actions {
            padding: 12px 18px;
            display: flex;
            justify-content: flex-end;
            gap: 8px;
            border-top: 1px solid #f1f5f9;
            background: white;
        }
        .cdp-btn {
            padding: 7px 18px;
            border-radius: 50px;
            font-weight: 800;
            cursor: pointer;
            border: none;
            font-size: 0.86rem;
            transition: 0.2s;
            font-family: var(--font-headings, 'Signo', sans-serif);
        }
        .cdp-btn-cancel {
            background: #f1f5f9;
            color: #64748b;
        }
        .cdp-btn-cancel:hover {
            background: #e2e8f0;
        }

        /* --- Radio Cards Interattive Profilo CV (Icone in alto su desktop) --- */
        .radio-group {
            display: grid;
            grid-template-columns: repeat(3, minmax(0, 1fr));
            gap: 10px;
            margin-top: 4px;
        }
        @media (max-width: 768px) {
            .radio-group {
                grid-template-columns: 1fr;
                gap: 8px;
            }
        }
        .radio-group.has-error {
            padding: 8px;
            border-radius: 14px;
            border: 2px dashed #e53e3e;
            background: #fff5f5;
        }
        .custom-radio {
            position: relative;
            cursor: pointer;
            display: block;
            height: 100%;
        }
        .custom-radio input {
            position: absolute;
            opacity: 0;
            cursor: pointer;
        }
        .radio-card-interactive {
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            gap: 8px;
            padding: 12px 10px;
            border: 1.5px solid #e2e8f0;
            border-radius: 14px;
            background: white;
            transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
            font-weight: 700;
            font-size: 0.86rem;
            color: #334155;
            line-height: 1.3;
            height: 100%;
            box-sizing: border-box;
        }
        @media (max-width: 768px) {
            .radio-card-interactive {
                flex-direction: row;
                text-align: left;
                padding: 10px 12px;
                gap: 10px;
            }
        }
        .custom-radio:hover .radio-card-interactive {
            border-color: #cbd5e1;
            background: #f8fafc;
            transform: translateY(-2px);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.04);
        }
        .cv-opt-icon {
            width: 36px;
            height: 36px;
            border-radius: 10px;
            background: rgba(46, 125, 50, 0.09);
            color: var(--verde-main, #2e7d32);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 1.05rem;
            flex-shrink: 0;
            transition: all 0.22s ease;
        }
        .cv-opt-text {
            flex: 1;
            font-size: 0.84rem;
            color: #334155;
            font-weight: 700;
            line-height: 1.25;
        }
        .custom-radio:hover .cv-opt-icon {
            background: rgba(46, 125, 50, 0.16);
            transform: scale(1.08);
        }
        .custom-radio input:checked ~ .radio-card-interactive {
            border-color: var(--verde-main, #2e7d32);
            background: var(--verde-bg, #f1f8f1);
            color: var(--verde-scuro, #1b5e20);
            box-shadow: 0 4px 14px rgba(46, 125, 50, 0.12);
        }
        .custom-radio input:checked ~ .radio-card-interactive .cv-opt-icon {
            background: var(--verde-main, #2e7d32);
            color: #ffffff;
            box-shadow: 0 3px 10px rgba(46, 125, 50, 0.25);
            transform: scale(1.06);
        }
        .custom-radio input:checked ~ .radio-card-interactive .cv-opt-text {
            color: var(--verde-scuro, #1b5e20);
            font-weight: 800;
        }

        /* --- Checkbox Privacy e Condizioni (Design Pulito, Standard ed Elegante) --- */
        .privacy-consent-group {
            display: flex;
            flex-direction: column;
            gap: 16px;
            margin-top: 10px;
        }

        .custom-check {
            display: flex;
            align-items: flex-start;
            gap: 12px;
            cursor: pointer;
            margin-bottom: 0;
            user-select: none;
            position: relative;
        }

        .custom-check.has-error {
            padding: 8px 10px;
            border-radius: 8px;
            border: 1.5px dashed #e53e3e !important;
            background: #fff5f5 !important;
        }

        .custom-check input {
            position: absolute;
            opacity: 0;
            cursor: pointer;
        }

        .check-box {
            width: 20px;
            height: 20px;
            min-width: 20px;
            min-height: 20px;
            flex-shrink: 0;
            border: 2px solid #cbd5e1;
            border-radius: 6px;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: all 0.2s ease;
            background: #ffffff;
            margin-top: 2px;
        }
        .check-box i {
            color: white;
            font-size: 11px;
            transform: scale(0);
            transition: transform 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }

        .check-text {
            font-size: 0.9rem;
            line-height: 1.5;
            color: #334155;
            font-weight: 500;
        }
        .check-text a {
            color: var(--verde-main, #2e7d32);
            font-weight: 700;
            text-decoration: underline;
            text-underline-offset: 2px;
        }
        .check-text a:hover {
            color: var(--verde-scuro, #1b5e20);
        }

        /* Stato Checked attivo */
        .custom-check input:checked ~ .check-box {
            background: var(--verde-main, #2e7d32);
            border-color: var(--verde-main, #2e7d32);
            box-shadow: 0 2px 6px rgba(46, 125, 50, 0.25);
        }
        .custom-check input:checked ~ .check-box i {
            transform: scale(1);
        }
        .custom-check:hover .check-box {
            border-color: var(--verde-main, #2e7d32);
        }

        /* --- CARD RIEPILOGO COMPLETA COMPATTA --- */
        .recap-card {
            background: linear-gradient(145deg, #f8faf9 0%, #edf7ed 100%);
            border: 1.5px solid rgba(46, 125, 50, 0.2);
            border-radius: 20px;
            padding: 16px 20px;
            margin-top: 5px;
            margin-bottom: 16px;
            box-shadow: 0 6px 18px rgba(46, 125, 50, 0.05);
        }
        .recap-card .section-badge-icon {
            background: var(--verde-gradient);
            color: white;
        }
        .recap-grid {
            display: grid;
            grid-template-columns: repeat(2, 1fr);
            gap: 8px 12px;
            margin-top: 8px;
        }
        .recap-item {
            background: white;
            border-radius: 12px;
            padding: 8px 12px;
            border: 1px solid #e2e8f0;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .recap-item.recap-full {
            grid-column: span 2;
        }
        .recap-icon {
            width: 30px;
            height: 30px;
            border-radius: 8px;
            background: rgba(46, 125, 50, 0.08);
            color: var(--verde-main, #2e7d32);
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.9rem;
            flex-shrink: 0;
        }
        .recap-info {
            display: flex;
            flex-direction: column;
            overflow: hidden;
        }
        .recap-label {
            font-size: 0.68rem;
            color: #64748b;
            text-transform: uppercase;
            font-weight: 800;
            letter-spacing: 0.4px;
            line-height: 1.1;
        }
        .recap-value {
            font-size: 0.9rem;
            font-weight: 700;
            color: var(--verde-scuro, #1b5e20);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            line-height: 1.3;
        }
        .recap-value.empty {
            color: #94a3b8;
            font-style: italic;
            font-weight: 500;
        }

        /* --- Footer Form con Pulsanti Iscrizione Più Compatti --- */
        .form-footer-action {
            margin-top: 18px;
            text-align: center;
            padding-top: 15px;
            border-top: 1px solid #edf2f7;
        }

        .btn-form-submit {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            background: var(--verde-gradient, linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%));
            color: white;
            width: 100%;
            max-width: 340px;
            padding: 14px 28px;
            border-radius: 50px;
            border: none;
            font-family: var(--font-headings, 'Signo', sans-serif);
            font-weight: 900;
            font-size: 1.15rem;
            text-transform: uppercase;
            letter-spacing: 0.6px;
            cursor: pointer;
            box-shadow: 0 12px 28px rgba(46, 125, 50, 0.32);
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
            position: relative;
            overflow: hidden;
            -webkit-tap-highlight-color: transparent;
        }
        .btn-form-submit::after {
            content: '';
            position: absolute;
            top: 0;
            left: -100%;
            width: 60%;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
            transform: skewX(-20deg);
            animation: btnShine 4s infinite ease-in-out;
        }
        .btn-form-submit:hover:not(:disabled) {
            transform: translateY(-2px);
            box-shadow: 0 16px 36px rgba(46, 125, 50, 0.4);
        }
        .btn-form-submit:active:not(:disabled) {
            transform: translateY(1px) scale(0.98);
        }
        .btn-form-submit:disabled {
            background: #cbd5e1;
            cursor: not-allowed;
            box-shadow: none;
            color: #94a3b8;
        }

        /* --- Stato di Successo --- */
        /* --- Stato di Successo Desktop a 2 Colonne e Mobile Card --- */
        .success-state {
            display: none;
            padding: 35px 25px 45px;
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
            width: 100%;
        }
        .success-state h2, .success-state p, .success-state div, .success-state span, .success-state label, .success-state code, .success-state button, .success-state a {
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
        }
        .success-state .fa, .success-state .fas, .success-state .far, .success-state .fab {
            font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands", "FontAwesome" !important;
        }

        .success-desktop-grid {
            display: flex;
            flex-direction: column;
            align-items: center;
            width: 100%;
            gap: 24px;
        }

        .success-left-col {
            display: flex;
            flex-direction: column;
            align-items: center;
            text-align: center;
            width: 100%;
        }

        .success-right-col {
            width: 100%;
            display: flex;
            justify-content: center;
        }

        .success-state i.fa-check-circle {
            font-size: 3.5rem;
            color: var(--verde-main, #2e7d32);
            margin-bottom: 14px;
            animation: scaleIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
        }
        .success-state h2 {
            font-family: var(--font-headings, 'Signo', sans-serif);
            font-weight: 900;
            font-size: 1.95rem;
            color: var(--verde-scuro, #1b5e20);
            margin-bottom: 10px;
            text-transform: uppercase;
            letter-spacing: -0.3px;
            line-height: 1.2;
        }
        .success-state p {
            font-size: 0.96rem;
            color: #475569;
            margin-bottom: 22px;
            max-width: 520px;
            line-height: 1.5;
            font-weight: 500;
        }

        @media (min-width: 992px) {
            .success-desktop-grid {
                display: grid;
                grid-template-columns: 1fr 1fr;
                gap: 40px;
                align-items: center;
                text-align: left;
                max-width: 1200px;
                margin: 0 auto;
            }
            .success-left-col {
                align-items: flex-start;
                text-align: left;
                padding-right: 15px;
            }
            .success-left-col h2,
            .success-left-col p {
                text-align: left;
                margin-left: 0;
                margin-right: 0;
            }
            .success-left-col .ticket-quick-actions-top {
                margin: 0 0 24px 0;
                max-width: 100%;
            }
            .success-left-col .ticket-bottom-home-wrap {
                justify-content: flex-start;
                margin-top: 0;
            }
            .success-right-col {
                justify-content: center;
            }
            .ticket-digital-card {
                margin: 0 !important;
                width: 100%;
                max-width: 460px;
            }
        }

        @keyframes scaleIn {
            0% { transform: scale(0); }
            100% { transform: scale(1); }
        }

        /* --- BIGLIETTO DIGITALE & QR CODE PARAMETRI ULTRA-MODERNO (TUTTO FONT INTER) --- */
        .ticket-digital-card {
            max-width: 440px;
            margin: 20px auto 25px;
            background: #ffffff;
            border-radius: 28px;
            border: 1px solid #e2e8f0;
            box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.08), 0 0 1px 1px rgba(0, 0, 0, 0.04);
            overflow: hidden;
            position: relative;
            text-align: left;
            font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
        }

        .ticket-top-band {
            background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
            padding: 14px 20px;
            color: #1b5e20;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1.5px solid #bbf7d0;
        }
        .ticket-brand {
            display: flex;
            align-items: center;
            gap: 12px;
        }
        .ticket-brand img {
            height: 32px;
            width: auto;
            object-fit: contain;
            filter: none;
        }
        .ticket-header-title {
            font-size: 0.88rem;
            font-weight: 800;
            letter-spacing: 0.3px;
            color: #166534;
            display: inline-flex;
            align-items: center;
            gap: 6px;
        }

        .ticket-body {
            padding: 24px 22px 16px;
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 20px;
            background: #ffffff;
        }

        .ticket-qr-section {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 10px;
            width: 100%;
        }
        .qr-box {
            padding: 12px;
            background: #ffffff;
            border-radius: 12px;
            border: 1.5px solid #e2e8f0;
            box-shadow: 0 4px 15px rgba(0,0,0,0.03);
            display: flex;
            align-items: center;
            justify-content: center;
            min-width: 220px;
            min-height: 220px;
        }
        .qr-box canvas, .qr-box svg, .qr-box img {
            margin: 0 auto;
            border-radius: 4px;
            max-width: 100%;
            height: auto;
        }
        /* Risoluzione doppio QR: se qrcode.js inserisce sia canvas che img, mostra solo uno */
        .qr-box canvas:not(:only-child) {
            display: none !important;
        }
        .qr-box canvas:only-child {
            display: block !important;
        }
        .qr-box img {
            display: block !important;
            margin: 0 auto;
        }
        .qr-note {
            font-size: 0.75rem;
            color: #64748b;
            font-weight: 600;
            letter-spacing: 0.3px;
            display: flex;
            align-items: center;
            gap: 6px;
        }
        .qr-note i {
            color: var(--verde-main);
        }

        .ticket-info-grid {
            width: 100%;
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 12px 16px;
            background: #f8fafc;
            border-radius: 20px;
            padding: 16px 18px;
            border: 1px solid #f1f5f9;
        }
        .t-info-item {
            display: flex;
            flex-direction: column;
        }
        .t-info-item.full {
            grid-column: span 2;
        }
        .t-info-item label {
            font-size: 0.65rem;
            text-transform: uppercase;
            letter-spacing: 0.8px;
            font-weight: 700;
            color: #94a3b8;
            margin-bottom: 3px;
        }
        .t-info-item span {
            font-size: 0.98rem;
            font-weight: 800;
            color: #0f172a;
            line-height: 1.25;
        }
        .t-info-item code {
            font-family: var(--font-main, 'Manrope', monospace) !important;
            font-size: 0.92rem;
            font-weight: 800;
            color: var(--verde-scuro, #1b5e20);
            background: #e2e8f0;
            padding: 3px 8px;
            border-radius: 6px;
            width: fit-content;
            letter-spacing: 0.5px;
        }

        .ticket-footer-stub {
            position: relative;
            min-height: 48px;
            background: #ffffff;
            margin-bottom: 6px;
            display: flex;
            align-items: center;
            justify-content: flex-end;
            padding: 10px 20px 8px 20px;
        }
        .ticket-divider-line {
            position: absolute;
            top: 50%;
            left: 24px;
            right: 24px;
            border-top: 2px dashed #cbd5e1;
            z-index: 1;
        }
        .ticket-notch {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            width: 22px;
            height: 22px;
            border-radius: 50%;
            background: var(--grigio-sfondo, #f8faf9);
            z-index: 2;
        }
        .ticket-notch.left {
            left: -11px;
            box-shadow: inset -2px 0 4px rgba(0,0,0,0.04);
        }
        .ticket-notch.right {
            right: -11px;
            box-shadow: inset 2px 0 4px rgba(0,0,0,0.04);
        }

        .ticket-footer-action-wrap {
            position: relative;
            z-index: 5;
            background: #ffffff;
            padding-left: 12px;
        }

        .btn-ticket-share-pill {
            display: inline-flex;
            align-items: center;
            gap: 7px;
            background: #f8fafc;
            color: #334155;
            border: 1.5px solid #cbd5e1;
            padding: 6px 16px;
            border-radius: 50px;
            font-size: 0.84rem;
            font-weight: 800;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
            font-family: var(--font-headings, 'Signo', sans-serif);
        }
        .btn-ticket-share-pill:hover {
            background: #2e7d32;
            color: #ffffff;
            border-color: #2e7d32;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(46, 125, 50, 0.25);
        }
        .btn-ticket-share-pill i {
            font-size: 0.85rem;
        }

        .ticket-bottom-home-wrap {
            margin-top: 26px;
            display: flex;
            justify-content: center;
        }

        .btn-home-return {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            background: #ffffff;
            color: #475569;
            border: 2px solid #e2e8f0;
            padding: 13px 32px;
            border-radius: 50px;
            font-weight: 800;
            font-size: 0.96rem;
            text-decoration: none;
            transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
            box-shadow: 0 4px 14px rgba(0, 0, 0, 0.04);
            font-family: var(--font-headings, 'Signo', sans-serif);
        }
        .btn-home-return:hover {
            background: #f8fafc;
            color: #1e293b;
            border-color: #cbd5e1;
            transform: translateY(-2px);
            box-shadow: 0 8px 22px rgba(0, 0, 0, 0.08);
        }
        .btn-home-return i {
            color: #16a34a;
            font-size: 0.95rem;
        }
        }

        /* --- STAMPA MIRATA DEL SOLO BIGLIETTO --- */
        @media print {
            body * {
                visibility: hidden !important;
            }
            #digitalTicketCard,
            #digitalTicketCard * {
                visibility: visible !important;
            }
            #digitalTicketCard {
                position: absolute !important;
                left: 50% !important;
                top: 20px !important;
                transform: translateX(-50%) !important;
                margin: 0 !important;
                width: 100% !important;
                max-width: 480px !important;
                border: 1.5px solid #cbd5e1 !important;
                box-shadow: none !important;
                page-break-inside: avoid !important;
            }
            .form-header-bar,
            .ticket-actions-bar,
            .form-page-bg,
            .form-bg-blob,
            .progress-container,
            .success-icon-wrap,
            .success-state h2,
            .success-state p {
                display: none !important;
            }
        }

        /* --- RESPONSIVE MOBILE ULTRA-COMPATTO ED OTTIMIZZATO PER SMARTPHONE --- */
        @media (max-width: 768px) {
            .hide-mobile { display: none !important; }

            /* Header Sticky compatto ed elegante */
            .form-header-bar {
                padding: 8px 16px;
                padding-top: max(8px, env(safe-area-inset-top, 8px));
            }
            .brand-link-unified img {
                height: 34px;
            }
            .btn-tour-nav {
                width: 38px;
                height: 38px;
                font-size: 0.95rem;
            }

            /* Container principale: edge-to-edge con spacing compatto */
            .form-main-container {
                width: 100%;
                margin: 0 auto;
                border-radius: 0;
                border: none;
                box-shadow: none;
                padding-bottom: max(30px, env(safe-area-inset-bottom, 30px));
                background: transparent;
            }

            /* Hero Card compatta per ridurre altezza iniziale */
            .form-card-hero {
                padding: 16px 14px 18px;
                border-radius: 0 0 20px 20px;
                box-shadow: 0 4px 16px rgba(27, 94, 32, 0.12);
            }
            .form-card-hero::after {
                display: none;
            }
            .hero-pill-badge {
                padding: 3px 10px;
                font-size: 0.68rem;
                letter-spacing: 0.8px;
                margin-bottom: 6px;
            }
            .form-card-hero h1 {
                font-size: 1.55rem;
                margin-bottom: 4px;
            }
            .form-card-hero p {
                font-size: 0.86rem;
                line-height: 1.3;
                opacity: 0.95;
            }

            /* Corpo del form su smartphone compatto */
            .modern-form-body {
                padding: 10px 10px 20px;
            }

            /* Card sezioni più compatte */
            .form-section-card {
                padding: 14px 12px;
                border-radius: 16px;
                margin-bottom: 10px;
                box-shadow: 0 2px 8px rgba(0,0,0,0.02);
            }

            .section-header-row {
                gap: 10px;
                margin-bottom: 10px;
                padding-bottom: 8px;
            }
            .section-badge-icon {
                width: 30px;
                height: 30px;
                border-radius: 9px;
                font-size: 0.92rem;
            }
            .section-heading-text h2 {
                font-size: 1.05rem;
                line-height: 1.15;
            }
            .section-heading-text span {
                font-size: 0.74rem;
                line-height: 1.25;
            }

            /* Griglia input singola colonna compatta */
            .input-grid {
                grid-template-columns: 1fr;
                gap: 9px;
            }
            .input-full {
                grid-column: span 1;
            }

            /* Label ottimizzati */
            .input-group {
                gap: 4px;
            }
            .input-group label {
                font-size: 0.84rem;
                margin-bottom: 2px;
            }

            /* Input e Controlli touch: 16px font per evitare auto-zoom iOS, ma altezza contenuta */
            .form-control, .custom-select-trigger, .search-select-input {
                font-size: 16px !important; /* Previene lo zoom automatico di iOS Safari */
                padding: 9px 12px;
                min-height: 42px;
                border-radius: 10px;
            }
            .form-control.with-icon, .custom-select-trigger.with-icon {
                padding-left: 38px;
            }
            .field-icon {
                font-size: 0.92rem;
                left: 12px;
            }

            /* Custom Select & Datepicker su mobile */
            .custom-options {
                position: absolute !important;
                top: calc(100% + 4px) !important;
                bottom: auto !important;
                left: 0 !important;
                right: 0 !important;
                width: 100% !important;
                border-radius: 14px !important;
                max-height: 250px !important;
                transform: none !important;
                box-shadow: 0 14px 30px rgba(0,0,0,0.18) !important;
                padding: 4px !important;
                z-index: 9999 !important;
                border: 1.5px solid #cbd5e1 !important;
                background: #ffffff !important;
                display: none !important;
                opacity: 1 !important;
                visibility: visible !important;
            }
            .custom-options.open {
                display: block !important;
                opacity: 1 !important;
                visibility: visible !important;
            }
            .custom-option {
                padding: 10px 12px;
                border-radius: 10px;
                gap: 10px;
                margin-bottom: 2px;
                background: #ffffff;
            }
            .custom-option:hover, .custom-option:active {
                padding-left: 12px;
                background: var(--verde-bg, #f1f8f1);
            }
            .opt-icon {
                width: 32px;
                height: 32px;
                font-size: 0.95rem;
                border-radius: 8px;
            }
            .opt-title {
                font-size: 0.88rem;
                line-height: 1.2;
            }
            .opt-date {
                font-size: 0.74rem;
            }

            /* Date Picker Bottom Sheet */
            .cdp-overlay {
                align-items: flex-end;
                padding: 0;
                z-index: 2200;
            }
            .custom-datepicker {
                width: 100%;
                max-width: 100%;
                border-radius: 22px 22px 0 0;
                margin: 0;
                transform: translateY(100%) scale(1);
                padding: 16px 14px max(16px, env(safe-area-inset-bottom, 16px));
                box-shadow: 0 -8px 30px rgba(0,0,0,0.22);
            }
            .cdp-overlay.open .custom-datepicker {
                transform: translateY(0) scale(1);
            }
            .cdp-days div {
                height: 36px;
                font-size: 0.88rem;
            }

            /* Radio Cards CV touch-first e compatte */
            .radio-group {
                grid-template-columns: 1fr;
                gap: 7px;
            }
            .radio-card-interactive {
                padding: 10px 12px;
                border-radius: 12px;
                font-size: 0.86rem;
                gap: 10px;
            }
            .radio-circle-pill {
                width: 18px;
                height: 18px;
            }

            /* Checkbox facili da toccare e compatte */
            .custom-check {
                gap: 10px;
                padding: 2px 0;
                margin-bottom: 8px;
            }
            .check-box {
                width: 20px;
                height: 20px;
                border-radius: 6px;
            }
            .check-text {
                font-size: 0.82rem;
                line-height: 1.35;
            }

            /* Card Riepilogo molto compatta */
            .recap-card {
                padding: 14px 12px;
                border-radius: 16px;
                margin-bottom: 12px;
            }
            .recap-grid {
                grid-template-columns: 1fr;
                gap: 7px;
            }
            .recap-item {
                padding: 8px 10px;
                border-radius: 10px;
                gap: 10px;
            }
            .recap-item.recap-full {
                grid-column: span 1;
            }
            .recap-icon {
                width: 28px;
                height: 28px;
                font-size: 0.82rem;
                border-radius: 8px;
            }
            .recap-label {
                font-size: 0.66rem;
            }
            .recap-value {
                font-size: 0.86rem;
            }

            /* Pulsante di Invio fisso o prominente a piena larghezza */
            .form-footer-action {
                padding-top: 10px;
            }
            .btn-form-submit {
                max-width: 100%;
                font-size: 1.05rem;
                padding: 13px 18px;
                border-radius: 14px;
                min-height: 46px;
                letter-spacing: 0.3px;
            }

            /* Schermata di successo & Ricevuta Biglietto Mobile Ultra-Compatta (Zero Spazi Inutili) */
            .success-state {
                padding: 14px 12px 28px;
            }
            .success-desktop-grid {
                width: 100%;
                gap: 14px;
            }
            .success-left-col {
                width: 100%;
                background: rgba(255, 255, 255, 0.94);
                backdrop-filter: blur(16px);
                -webkit-backdrop-filter: blur(16px);
                border-radius: 22px;
                border: 1px solid rgba(255, 255, 255, 0.95);
                box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
                padding: 20px 16px 18px;
                margin-bottom: 0;
            }
            .success-right-col {
                width: 100%;
                display: block;
            }
            .success-icon-wrap {
                margin-bottom: 6px;
            }
            .success-state i.fa-check-circle {
                font-size: 2.8rem;
                margin-bottom: 8px;
            }
            .success-state h2 {
                font-size: 1.45rem;
                margin-bottom: 6px;
            }
            .success-state p {
                font-size: 0.88rem;
                line-height: 1.4;
                margin-bottom: 16px;
                padding: 0;
            }

            /* Card Biglietto Digitale: larghezza 100% allineata al box superiore */
            .ticket-digital-card {
                width: 100%;
                max-width: 100%;
                margin: 0;
                border-radius: 22px;
                box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
            }
            .ticket-top-band {
                padding: 12px 14px;
            }
            .ticket-brand {
                gap: 8px;
            }
            .ticket-brand img {
                height: 28px;
            }
            .ticket-brand span {
                font-size: 0.7rem;
                letter-spacing: 0.5px;
            }
            .ticket-badge {
                font-size: 0.65rem;
                padding: 3px 8px;
            }

            .ticket-body {
                padding: 14px 12px 10px;
                gap: 12px;
            }
            .ticket-qr-section {
                gap: 6px;
            }
            .qr-box {
                padding: 8px;
                border-radius: 10px;
                min-width: 170px;
                min-height: 170px;
            }
            .qr-box canvas, .qr-box svg, .qr-box img {
                max-width: 160px !important;
                max-height: 160px !important;
                width: auto !important;
                height: auto !important;
                border-radius: 4px;
            }
            .qr-note {
                font-size: 0.7rem;
            }

            /* Griglia parametri ricevuta: 2 colonne compatte */
            .ticket-info-grid {
                padding: 10px 12px;
                gap: 8px 10px;
                border-radius: 14px;
            }
            .t-info-item label {
                font-size: 0.6rem;
                margin-bottom: 1px;
            }
            .t-info-item span {
                font-size: 0.84rem;
                line-height: 1.2;
            }
            .t-info-item code {
                font-size: 0.82rem;
                padding: 2px 6px;
            }

            .ticket-footer-stub {
                height: 18px;
                margin-bottom: 4px;
            }
            .ticket-notch {
                width: 16px;
                height: 16px;
                top: 1px;
            }
            .ticket-notch.left { left: -9px; }
            .ticket-notch.right { right: -9px; }
            .ticket-divider-line { left: 18px; right: 18px; }

            /* Pulsanti Azione Biglietto Mobile a tutta larghezza e compatti */
            .ticket-actions-bar {
                margin-top: 14px;
                gap: 8px;
                flex-direction: column;
                width: 100%;
            }
            .btn-ticket-action {
                width: 100%;
                justify-content: center;
                padding: 11px 16px;
                font-size: 0.88rem;
                border-radius: 12px;
                min-height: 44px;
            }
        }

        @media (min-width: 769px) {
            .cdp-overlay {
                background: transparent;
                backdrop-filter: none;
                -webkit-backdrop-filter: none;
                justify-content: flex-start;
                align-items: flex-start;
            }
            .custom-datepicker {
                position: absolute;
                top: calc(100% + 10px);
                left: 0;
                box-shadow: 0 20px 45px rgba(0,0,0,0.18);
                z-index: 2000;
            }
        }

        /* --- GESTIONE 2 STEP (COMPILAZIONE -> RIEPILOGO SEPARATO) --- */
        .mobile-overlay { display: none !important; }

        /* Navigazione tra Step 1 (Compilazione) e Step 2 (Riepilogo e Invio) */
        .form-step-container {
            transition: opacity 0.3s ease, transform 0.3s ease;
        }
        .form-step-container.step-hidden {
            display: none !important;
            opacity: 0;
            transform: translateY(15px);
        }
        .form-step-container.step-active {
            display: block !important;
            opacity: 1;
            transform: translateY(0);
        }

        .step-nav-footer {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 12px;
            margin-top: 24px;
            padding-top: 18px;
            border-top: 1px solid #edf2f7;
            width: 100%;
        }

        .btn-step-back {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            padding: 8px 22px;
            border-radius: 30px;
            border: 1.5px solid #cbd5e1;
            background: transparent;
            color: #64748b;
            font-family: var(--font-headings, 'Signo', sans-serif);
            font-size: 0.88rem;
            font-weight: 700;
            cursor: pointer;
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
            text-decoration: none;
        }
        .btn-step-back:hover {
            background: #f1f5f9;
            border-color: #94a3b8;
            color: #1e293b;
            transform: translateY(-1px);
        }
        .btn-step-back i {
            font-size: 0.82rem;
            transition: transform 0.2s;
        }
        .btn-step-back:hover i {
            transform: translateX(-3px);
        }

        .btn-step-next {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            background: var(--verde-gradient, linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%));
            color: white;
            width: 100%;
            max-width: 340px;
            padding: 14px 28px;
            border-radius: 50px;
            border: none;
            font-family: var(--font-headings, 'Signo', sans-serif);
            font-weight: 900;
            font-size: 1.12rem;
            text-transform: uppercase;
            letter-spacing: 0.6px;
            cursor: pointer;
            box-shadow: 0 12px 28px rgba(46, 125, 50, 0.32);
            transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        }
        .btn-step-next:hover {
            transform: translateY(-2px);
            box-shadow: 0 16px 36px rgba(46, 125, 50, 0.4);
        }
        .btn-step-next:active {
            transform: translateY(1px);
        }

        /* --- STEPPER WIZARD INDICATOR COMPATTO & LUMINOSO --- */
        .form-stepper-wrap {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 14px;
            padding: 16px 20px;
            background: #ffffff;
            border-bottom: 1px solid #edf2f7;
            position: relative;
            z-index: 5;
        }
        .form-stepper-step {
            display: flex;
            align-items: center;
            gap: 9px;
            cursor: pointer;
            padding: 6px 14px;
            border-radius: 999px;
            transition: all 0.25s ease;
            user-select: none;
        }
        .stepper-num {
            width: 32px;
            height: 32px;
            min-width: 32px;
            min-height: 32px;
            aspect-ratio: 1 / 1;
            flex-shrink: 0;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 0.88rem;
            font-weight: 900;
            background: #e2e8f0;
            color: #64748b;
            transition: all 0.25s ease;
        }
        .stepper-label {
            font-size: 0.88rem;
            font-weight: 800;
            color: #64748b;
            transition: all 0.25s ease;
        }
        .form-stepper-step.active {
            background: rgba(46, 125, 50, 0.08);
        }
        .form-stepper-step.active .stepper-num {
            background: var(--verde-main, #2e7d32);
            color: #ffffff;
            box-shadow: 0 2px 8px rgba(46, 125, 50, 0.35);
        }
        .form-stepper-step.active .stepper-label {
            color: var(--verde-main, #2e7d32);
        }
        .form-stepper-step.completed .stepper-num {
            background: #16a34a;
            color: #ffffff;
        }
        .form-stepper-step.completed .stepper-label {
            color: #16a34a;
        }
        .stepper-divider {
            width: 32px;
            height: 2px;
            background: #e2e8f0;
            border-radius: 2px;
        }
        .stepper-divider.completed {
            background: #16a34a;
        }

        /* --- CARD ANTEPRIMA TAPPA BLOCCATA CON MATITINA DI SBLOCCO --- */
        .event-locked-card {
            display: none;
            background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
            border: 2px solid #86efac;
            border-radius: 16px;
            padding: 10px 14px;
            margin-top: 4px;
            box-shadow: 0 4px 16px rgba(22, 163, 74, 0.08);
            position: relative;
            overflow: hidden;
            transition: all 0.3s ease;
        }
        .event-locked-card.show {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 14px;
        }
        .event-locked-left {
            display: flex;
            align-items: center;
            gap: 12px;
            flex: 1;
            min-width: 0;
        }
        .event-locked-img-wrap {
            width: 62px;
            height: 62px;
            border-radius: 12px;
            overflow: hidden;
            border: 2px solid #ffffff;
            box-shadow: 0 3px 10px rgba(0,0,0,0.08);
            flex-shrink: 0;
            background: #e2e8f0;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .event-locked-img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            transition: transform 0.3s ease;
        }
        .event-locked-card:hover .event-locked-img {
            transform: scale(1.06);
        }
        .event-locked-info {
            display: flex;
            flex-direction: column;
            gap: 2px;
            min-width: 0;
        }
        .event-locked-right {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            justify-content: center;
            gap: 6px;
            flex-shrink: 0;
        }
        .event-locked-tag {
            display: inline-flex;
            align-items: center;
            gap: 4px;
            font-size: 0.68rem;
            font-weight: 800;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            color: #15803d;
            background: #dcfce7;
            border: 1px solid #bbf7d0;
            padding: 2px 7px;
            border-radius: 999px;
            white-space: nowrap;
        }
        .event-locked-title {
            font-size: 1.05rem;
            font-weight: 900;
            color: #0f172a;
            line-height: 1.2;
            margin: 0;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }
        .event-locked-meta {
            display: flex;
            flex-direction: column;
            gap: 2px;
            margin-top: 2px;
            font-family: var(--font-main, 'Manrope', sans-serif) !important;
        }
        .event-locked-meta span {
            display: inline-flex;
            align-items: center;
            gap: 6px;
            font-family: var(--font-main, 'Manrope', sans-serif) !important;
            font-size: 0.88rem;
            font-weight: 600;
            color: #334155;
            line-height: 1.25;
        }
        .event-locked-meta i {
            color: var(--verde-main, #2e7d32);
            font-size: 0.88rem;
            width: 16px;
            text-align: center;
            flex-shrink: 0;
        }
        .event-locked-date,
        #eventLockedDate {
            font-family: var(--font-main, 'Manrope', sans-serif) !important;
            font-weight: 700;
            color: var(--verde-scuro, #1b5e20);
        }
        #eventLockedSede {
            font-family: var(--font-main, 'Manrope', sans-serif) !important;
            font-weight: 600;
            color: #475569;
        }
        .btn-unlock-event {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            background: #ffffff;
            border: 1.5px solid #cbd5e1;
            color: #1e293b;
            font-family: var(--font-headings, 'Signo', sans-serif);
            font-size: 0.82rem;
            font-weight: 800;
            padding: 5px 12px;
            border-radius: 10px;
            cursor: pointer;
            box-shadow: 0 2px 5px rgba(0,0,0,0.04);
            transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
            flex-shrink: 0;
            user-select: none;
        }
        .btn-unlock-event span {
            font-family: var(--font-headings, 'Signo', sans-serif);
            font-weight: 800;
            letter-spacing: 0.2px;
        }
        .btn-unlock-event:hover {
            background: #f0fdf4;
            border-color: #2e7d32;
            color: #1b5e20;
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(46, 125, 50, 0.18);
        }
        .btn-unlock-event i {
            color: #2e7d32;
            font-size: 0.92rem;
            transition: transform 0.2s ease;
        }
        .btn-unlock-event:hover i {
            transform: rotate(-10deg) scale(1.1);
        }

        .custom-select-wrapper.is-locked {
            display: none !important;
        }

        /* Testata rapida del calendario con Dropdown Mese/Anno diretti */
        .cdp-header-selects {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            flex: 1;
        }
        .cdp-select-native {
            background: #f8fafc;
            border: 1px solid #cbd5e1;
            border-radius: 8px;
            font-size: 0.82rem;
            font-weight: 800;
            color: #1e293b;
            padding: 4px 8px;
            cursor: pointer;
            outline: none;
            transition: border-color 0.2s ease;
        }
        .cdp-select-native:focus {
            border-color: #2e7d32;
        }

        /* Pulsanti extra per condivisione e calendario nel biglietto */
        .ticket-actions-bar {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            justify-content: center;
            margin-top: 18px;
        }

        @media (max-width: 640px) {
            .event-locked-card.show {
                flex-direction: column;
                align-items: stretch;
                padding: 12px;
                gap: 10px;
            }
            .event-locked-left {
                width: 100%;
                gap: 10px;
            }
            .event-locked-img-wrap {
                width: 54px;
                height: 54px;
                border-radius: 10px;
            }
            .event-locked-title {
                font-size: 0.98rem;
            }
            .event-locked-right {
                flex-direction: row;
                align-items: center;
                justify-content: flex-end;
                width: 100%;
                gap: 8px;
                padding-top: 4px;
                border-top: 1px dashed rgba(46, 125, 50, 0.15);
            }
            .event-locked-tag {
                margin-right: auto;
            }
            .form-stage-backdrop-img {
                filter: blur(0px) brightness(0.98) saturate(1.45);
            }
        }

        /* ==========================================================================
           DESKTOP WIDE REDESIGN (min-width: 1024px)
           Layout spazioso, griglie a 2/3 colonne, card espanse ed estetica premium
           ========================================================================== */
        @media (min-width: 1024px) {
            .form-main-container {
                max-width: 1340px;
                width: 95%;
                margin: 28px auto 60px;
                border-radius: 32px;
                box-shadow: 0 20px 60px rgba(27, 94, 32, 0.1), 0 8px 24px rgba(0, 0, 0, 0.04);
            }

            .form-card-hero {
                padding: 34px 44px 30px;
            }

            .form-card-hero h1 {
                font-size: 2.3rem;
            }

            .modern-form-body {
                padding: 32px 40px 40px;
            }

            .form-section-card {
                padding: 28px 32px;
                margin-bottom: 24px;
                border-radius: 24px;
            }

            .section-header-row {
                margin-bottom: 22px;
                padding-bottom: 14px;
            }

            .section-heading-text h2 {
                font-size: 1.35rem;
            }

            /* Sezione 2: Griglia Dati a 2 colonne fluide e proporzionate */
            .input-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 20px 24px;
            }

            /* Sezione 3: Radio Card CV affiancate su 3 colonne desktop */
            .radio-group {
                grid-template-columns: repeat(3, 1fr);
                gap: 16px;
            }
            .radio-card-interactive {
                flex-direction: column;
                align-items: center;
                justify-content: center;
                text-align: center;
                gap: 10px;
                padding: 18px 14px;
                min-height: 84px;
            }

            /* Step 2: Griglia Riepilogo Desktop Spaziosa ed Elegante */
            .recap-card {
                padding: 22px 24px;
                border-radius: 20px;
                margin-bottom: 0;
            }
            .step2-cards-grid .recap-grid {
                grid-template-columns: repeat(2, 1fr);
                gap: 10px 14px;
            }
            .step2-cards-grid .recap-item.recap-full {
                grid-column: span 2;
            }
            .recap-item {
                padding: 10px 14px;
                border-radius: 12px;
            }
            .recap-icon {
                width: 34px;
                height: 34px;
                font-size: 0.98rem;
                border-radius: 9px;
            }
            .recap-value {
                font-size: 0.92rem;
            }
        }

/* Obsolete mobile comune drawer removed */

/* ==========================================================================
   OTTIMIZZAZIONI SMARTPHONE: STEPPER, MODAL TAPPE, DATEPICKER, COMUNI, TICKET
   ========================================================================== */

/* 1. Stepper Responsive */
@media (max-width: 640px) {
    .form-stepper-wrap {
        padding: 12px 10px;
        gap: 8px;
    }
    .form-stepper-step {
        padding: 6px 10px;
        gap: 8px;
    }
    .stepper-num {
        width: 28px !important;
        height: 28px !important;
        min-width: 28px !important;
        min-height: 28px !important;
        aspect-ratio: 1 / 1 !important;
        flex-shrink: 0 !important;
        font-size: 0.82rem;
    }
    .stepper-label {
        font-size: 0.78rem;
    }
    .stepper-divider {
        width: 20px;
    }
}

/* 2. Datepicker Font & Styling Fix */
.cdp-header {
    font-family: var(--font-main, 'Manrope', sans-serif);
}
.cdp-header-selects select.cdp-select-native {
    font-family: var(--font-main, 'Manrope', sans-serif) !important;
    font-size: 0.88rem !important;
    font-weight: 700 !important;
    color: #1e293b !important;
    background: #ffffff !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    padding: 6px 10px !important;
    outline: none !important;
    -webkit-appearance: menulist !important;
    appearance: menulist !important;
}

/* 3. Selettore Tappe Modal / Bottom Sheet Moderno con Immagini */
.tappe-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 16px;
}
.tappe-modal-overlay.open {
    opacity: 1;
    visibility: visible;
}
.tappe-modal-sheet {
    background: #ffffff;
    width: 100%;
    max-width: 640px;
    max-height: 88vh;
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.35);
    transform: scale(0.95) translateY(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.tappe-modal-overlay.open .tappe-modal-sheet {
    transform: scale(1) translateY(0);
}
.tappe-modal-header {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #ffffff;
}
.tappe-modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-family: var(--font-headings, 'Signo', sans-serif);
    font-weight: 800;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}
.tappe-modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    transition: all 0.2s;
}
.tappe-modal-close:hover {
    background: rgba(255, 255, 255, 0.35);
}
.tappe-modal-list {
    padding: 14px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #f8faf9;
}
.tappa-card-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    padding: 10px 12px;
    cursor: pointer;
    transition: all 0.22s ease;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
}
.tappa-card-item:hover, .tappa-card-item:active {
    border-color: #2e7d32;
    background: #f0fdf4;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(46, 125, 50, 0.12);
}
.tappa-card-item.selected {
    border-color: #16a34a;
    background: #f0fdf4;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.25);
}
.tappa-card-thumb {
    width: 72px;
    height: 72px;
    min-width: 72px;
    border-radius: 12px;
    overflow: hidden;
    background: #e2e8f0;
    flex-shrink: 0;
}
.tappa-card-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.tappa-card-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}
.tappa-card-title {
    font-size: 0.98rem;
    font-weight: 800;
    color: #1b5e20;
    line-height: 1.25;
    font-family: var(--font-headings, 'Signo', sans-serif);
    margin: 0;
}
.tappa-card-meta {
    font-size: 0.8rem;
    color: #64748b;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.tappa-card-meta span {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.tappa-card-badge {
    background: rgba(46, 125, 50, 0.1);
    color: #2e7d32;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    align-self: flex-start;
}
.tappa-card-action {
    color: #2e7d32;
    font-size: 1.1rem;
    padding: 0 8px;
}

@media (max-width: 640px) {
    .tappe-modal-overlay {
        padding: 0;
        align-items: flex-end;
    }
    .tappe-modal-sheet {
        max-width: 100%;
        max-height: 90vh;
        border-radius: 24px 24px 0 0;
        transform: translateY(100%);
    }
    .tappe-modal-overlay.open .tappe-modal-sheet {
        transform: translateY(0);
    }
    .tappa-card-thumb {
        width: 62px;
        height: 62px;
        min-width: 62px;
    }
    .tappa-card-title {
        font-size: 0.92rem;
    }
}

/* Obsolete comune block 2 removed */

/* 5. Ticket Azioni Rapide in Alto - Affiancati sulla stessa riga, animati ed eleganti */
.ticket-quick-actions-top {
    display: flex;
    flex-direction: row;
    gap: 14px;
    width: 100%;
    max-width: 580px;
    margin: 0 auto 22px auto;
    justify-content: center;
    align-items: stretch;
}

.btn-ticket-quick-top {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 16px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    -webkit-tap-highlight-color: transparent;
}

/* Effetto luce shimmer che scorre al passaggio del mouse */
.btn-ticket-quick-top::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
    transform: skewX(-20deg);
    transition: left 0.6s ease;
}

.btn-ticket-quick-top:hover::before {
    left: 140%;
}

.btn-ticket-quick-top .btn-quick-icon-wrap {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.22);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    color: #ffffff;
    flex-shrink: 0;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.btn-ticket-quick-top .btn-quick-text {
    display: flex;
    flex-direction: column;
    text-align: left;
    line-height: 1.25;
    min-width: 0;
    flex: 1;
}

.btn-ticket-quick-top .btn-quick-text strong {
    font-size: 0.95rem;
    font-weight: 800;
    color: #ffffff;
    font-family: var(--font-headings, 'Signo', sans-serif);
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-ticket-quick-top .btn-quick-text small {
    font-size: 0.74rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-top: 2px;
}

.btn-ticket-quick-top .btn-quick-arrow {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.82rem;
    transition: transform 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

/* Pulsante 1: Scarica Biglietto (Verde Smeraldo) */
.btn-download-quick {
    background: linear-gradient(135deg, #15803d 0%, #16a34a 50%, #22c55e 100%);
    box-shadow: 0 8px 22px -4px rgba(22, 163, 74, 0.42), 0 2px 6px rgba(0, 0, 0, 0.08);
}

.btn-download-quick:hover {
    background: linear-gradient(135deg, #166534 0%, #15803d 50%, #16a34a 100%);
    transform: translateY(-3px);
    box-shadow: 0 14px 28px -4px rgba(22, 163, 74, 0.52), 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Pulsante 2: Google Calendar (Blu Cobalto Royal) */
.btn-gcal-quick {
    background: linear-gradient(135deg, #1e40af 0%, #2563eb 50%, #3b82f6 100%);
    box-shadow: 0 8px 22px -4px rgba(37, 99, 235, 0.42), 0 2px 6px rgba(0, 0, 0, 0.08);
}

.btn-gcal-quick:hover {
    background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 50%, #2563eb 100%);
    transform: translateY(-3px);
    box-shadow: 0 14px 28px -4px rgba(37, 99, 235, 0.52), 0 4px 10px rgba(0, 0, 0, 0.1);
}

.btn-ticket-quick-top:hover .btn-quick-icon-wrap {
    transform: scale(1.14) rotate(-6deg);
}

.btn-ticket-quick-top:hover .btn-quick-arrow {
    transform: translateX(4px);
    color: #ffffff;
}

.btn-ticket-quick-top:active {
    transform: scale(0.97) translateY(0);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

@media (max-width: 560px) {
    .ticket-quick-actions-top {
        gap: 8px;
        margin-bottom: 18px;
    }
    .btn-ticket-quick-top {
        padding: 10px 10px;
        gap: 8px;
        border-radius: 14px;
    }
    .btn-ticket-quick-top .btn-quick-icon-wrap {
        width: 34px;
        height: 34px;
        min-width: 34px;
        font-size: 0.95rem;
        border-radius: 9px;
    }
    .btn-ticket-quick-top .btn-quick-text strong {
        font-size: 0.84rem;
    }
    .btn-ticket-quick-top .btn-quick-text small {
        font-size: 0.68rem;
    }
    .btn-ticket-quick-top .btn-quick-arrow {
        display: none;
    }
}




/* ==========================================================================
   MODAL TAPPE: CENTRATO SU DESKTOP & SMARTPHONE (DIRECT BODY CHILD)
   ========================================================================== */
#customOptionsContainer {
    display: none !important;
}

.tappe-modal-overlay {
    position: fixed !important;
    inset: 0 !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    height: 100dvh !important;
    background: rgba(15, 23, 42, 0.75) !important;
    backdrop-filter: blur(8px) !important;
    -webkit-backdrop-filter: blur(8px) !important;
    z-index: 999999 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.25s ease, visibility 0.25s ease !important;
    padding: 16px !important;
    margin: 0 !important;
}

.tappe-modal-overlay.open {
    opacity: 1 !important;
    visibility: visible !important;
}

.tappe-modal-sheet {
    background: #ffffff !important;
    width: 100% !important;
    max-width: 580px !important;
    height: auto !important;
    max-height: 85vh !important;
    max-height: 85dvh !important;
    border-radius: 20px !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5) !important;
    transform: scale(0.96) !important;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1) !important;
    margin: auto !important;
}

.tappe-modal-overlay.open .tappe-modal-sheet {
    transform: scale(1) !important;
}

.tappe-modal-header {
    background: linear-gradient(135deg, #1b5e20 0%, #2e7d32 100%) !important;
    padding: 16px 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    color: #ffffff !important;
    flex-shrink: 0 !important;
}

.tappe-modal-header h3 {
    margin: 0 !important;
    font-size: 1.15rem !important;
    font-family: var(--font-headings, 'Signo', sans-serif) !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.tappe-modal-close {
    background: rgba(255, 255, 255, 0.2) !important;
    border: none !important;
    width: 34px !important;
    height: 34px !important;
    border-radius: 50% !important;
    color: #ffffff !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 1.05rem !important;
    transition: all 0.2s !important;
}

.tappe-modal-close:hover {
    background: rgba(255, 255, 255, 0.35) !important;
}

.tappe-modal-list {
    flex: 1 !important;
    padding: 14px !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 10px !important;
    background: #f8faf9 !important;
}

.tappa-card-item {
    display: flex !important;
    align-items: center !important;
    gap: 14px !important;
    background: #ffffff !important;
    border: 1.5px solid #e2e8f0 !important;
    border-radius: 14px !important;
    padding: 10px 12px !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03) !important;
    flex-shrink: 0 !important;
}

.tappa-card-item:hover, .tappa-card-item:active {
    border-color: #2e7d32 !important;
    background: #f0fdf4 !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 14px rgba(46, 125, 50, 0.12) !important;
}

.tappa-card-item.selected {
    border-color: #16a34a !important;
    background: #f0fdf4 !important;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.25) !important;
}

.tappa-card-thumb {
    width: 68px !important;
    height: 68px !important;
    min-width: 68px !important;
    border-radius: 10px !important;
    overflow: hidden !important;
    background: #e2e8f0 !important;
    flex-shrink: 0 !important;
}

.tappa-card-thumb img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}

.tappa-card-info {
    flex: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 3px !important;
    min-width: 0 !important;
}

.tappa-card-title {
    font-size: 0.96rem !important;
    font-weight: 800 !important;
    color: #1b5e20 !important;
    line-height: 1.25 !important;
    font-family: var(--font-headings, 'Signo', sans-serif) !important;
    margin: 0 !important;
}

.tappa-card-meta {
    font-size: 0.8rem !important;
    color: #64748b !important;
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px !important;
}

.tappa-card-meta span {
    display: inline-flex !important;
    align-items: center !important;
    gap: 4px !important;
}

.tappa-card-badge {
    background: rgba(46, 125, 50, 0.1) !important;
    color: #2e7d32 !important;
    padding: 2px 7px !important;
    border-radius: 999px !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    align-self: flex-start !important;
}

.tappa-card-action {
    color: #2e7d32 !important;
    font-size: 1.1rem !important;
    padding: 0 6px !important;
}


/* ==========================================================================
   DROPDOWN COMUNI: INLINE IMMEDIATAMENTE SOTTO IL CAMPO SU QUALSIASI DISPOSITIVO
   ========================================================================== */
.custom-search-select-wrapper {
    position: relative !important;
    width: 100% !important;
    z-index: 50 !important;
}

#comuneOptionsContainer {
    position: absolute !important;
    top: calc(100% + 4px) !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-height: 220px !important;
    background: #ffffff !important;
    border: 2px solid #2e7d32 !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.22) !important;
    z-index: 99999 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    display: none !important;
    transform: none !important;
    opacity: 1 !important;
    visibility: visible !important;
    padding: 6px !important;
}

#comuneOptionsContainer.open {
    display: block !important;
}

#comuneOptionsContainer::before {
    display: none !important;
}

.comune-option {
    padding: 10px 14px !important;
    border-radius: 8px !important;
    margin-bottom: 2px !important;
    cursor: pointer !important;
    color: #1e293b !important;
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
    font-weight: 600 !important;
    font-size: 0.94rem !important;
    transition: all 0.15s ease !important;
}

.comune-option:hover, .comune-option:active {
    background: #f0fdf4 !important;
    color: #166534 !important;
}

.comune-option i {
    color: #94a3b8 !important;
    font-size: 0.85rem !important;
}

.comune-option:hover i {
    color: #16a34a !important;
}

.no-results {
    padding: 14px !important;
    color: #64748b !important;
    font-style: italic !important;
    text-align: center !important;
    font-size: 0.88rem !important;
}

/* ==========================================================================
   SELF CHECK-IN BANNER & ACTIONS (biglietto.jsp) - COMPACT & UNIFIED
   ========================================================================== */
.self-checkin-container {
    background: linear-gradient(135deg, #ffffff 0%, #f0fdf4 100%);
    border: 1.5px solid #86efac;
    border-radius: 20px;
    padding: 14px 16px;
    margin: 0 auto 18px auto;
    max-width: 440px;
    box-shadow: 0 10px 25px -5px rgba(22, 101, 52, 0.1), 0 4px 6px -2px rgba(22, 101, 52, 0.05);
    position: relative;
    overflow: hidden;
    animation: fadeInCheckin 0.35s ease-out;
}

.self-checkin-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #16a34a, #22c55e, #10b981);
}

.self-checkin-compact-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
    text-align: left;
}

.checkin-compact-pulse-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: #dcfce7;
    color: #15803d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    position: relative;
}

.checkin-compact-pulse-icon::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 13px;
    border: 1.5px solid #22c55e;
    animation: pulseBorder 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
    opacity: 0.7;
}

.checkin-compact-info {
    flex: 1;
    min-width: 0;
}

.checkin-today-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #166534;
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 7px;
    border-radius: 999px;
    margin-bottom: 2px;
}

.checkin-compact-info h3 {
    font-size: 0.96rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
    line-height: 1.3;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.checkin-compact-info p {
    font-size: 0.8rem;
    color: #475569;
    margin: 1px 0 0 0;
    line-height: 1.3;
}

.self-checkin-action-box {
    margin-top: 8px;
}

.btn-self-checkin-pulse {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 16px;
    background: linear-gradient(135deg, #15803d 0%, #16a34a 100%);
    color: #ffffff;
    border: none;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 800;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    letter-spacing: 0.02em;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(22, 101, 52, 0.3);
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.btn-self-checkin-pulse:hover:not(:disabled) {
    transform: translateY(-1.5px);
    box-shadow: 0 8px 18px rgba(22, 101, 52, 0.4);
    background: linear-gradient(135deg, #166534 0%, #15803d 100%);
}

.btn-self-checkin-pulse:active:not(:disabled) {
    transform: translateY(0);
}

.btn-self-checkin-pulse:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

.btn-self-checkin-pulse .btn-checkin-icon {
    font-size: 1rem;
}

/* Stato Successo Check-In */
.self-checkin-success-box {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #ecfdf5;
    border: 1.5px solid #6ee7b7;
    border-radius: 12px;
    padding: 10px 14px;
    margin-top: 4px;
    text-align: left;
    animation: fadeInCheckin 0.3s ease;
}

.checkin-verified-icon {
    font-size: 1.8rem;
    color: #059669;
    flex-shrink: 0;
}

.checkin-verified-text h4 {
    margin: 0 0 1px 0;
    font-size: 0.94rem;
    font-weight: 800;
    color: #065f46;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.checkin-verified-text p {
    margin: 0 0 4px 0;
    font-size: 0.78rem;
    color: #047857;
}

.verified-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #059669;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 999px;
}

/* Quando la presenza è confermata: rimuove il wrapper esterno e mostra solo la card di convalida */
.self-checkin-container.is-confirmed {
    padding: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
}

.self-checkin-container.is-confirmed::before {
    display: none !important;
}

/* ==========================================================================
   MODAL AVVISO / DUPLICATO ANIMATO & INTERATTIVO (CUSTOM ALERT DIALOG)
   ========================================================================== */
.custom-alert-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-alert-overlay.show {
    display: flex;
    opacity: 1;
}

.custom-alert-card {
    background: #ffffff;
    border-radius: 28px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.8) inset;
    overflow: hidden;
    transform: scale(0.85) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    text-align: center;
}

.custom-alert-overlay.show .custom-alert-card {
    transform: scale(1) translateY(0);
}

.custom-alert-header-band {
    height: 6px;
    width: 100%;
    background: linear-gradient(90deg, #f59e0b 0%, #ef4444 50%, #e11d48 100%);
}

.custom-alert-body {
    padding: 32px 28px 24px;
}

/* Icona animata con cerchio pulsante e bouncing */
.custom-alert-icon-wrapper {
    width: 84px;
    height: 84px;
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.custom-alert-icon-wrapper.warning {
    background: #fffbeb;
    border: 3px solid #fef3c7;
    color: #d97706;
}

.custom-alert-icon-wrapper.error, .custom-alert-icon-wrapper.duplicate {
    background: #fef2f2;
    border: 3px solid #fee2e2;
    color: #e11d48;
}

.custom-alert-icon-wrapper::before {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    border: 2px dashed rgba(225, 29, 72, 0.3);
    animation: alertRingRotate 12s linear infinite;
}

.custom-alert-icon-wrapper.warning::before {
    border-color: rgba(217, 119, 6, 0.3);
}

.custom-alert-icon-inner {
    font-size: 2.3rem;
    animation: alertIconPop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both;
}

@keyframes alertIconPop {
    0% { transform: scale(0) rotate(-45deg); opacity: 0; }
    70% { transform: scale(1.2) rotate(8deg); }
    100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes alertRingRotate {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.custom-alert-title {
    font-size: 1.35rem;
    font-weight: 900;
    color: #0f172a;
    margin: 0 0 10px;
    line-height: 1.25;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.custom-alert-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 14px;
}

.custom-alert-badge.duplicate {
    background: #ffe4e6;
    color: #be123c;
    border: 1px solid #fecdd3;
}

.custom-alert-desc {
    font-size: 0.92rem;
    color: #475569;
    line-height: 1.55;
    margin: 0 0 20px;
    font-weight: 450;
}

/* Box con codice biglietto esistente se presente */
.custom-alert-ticket-pill {
    background: #f8fafc;
    border: 1.5px dashed #cbd5e1;
    border-radius: 16px;
    padding: 12px 16px;
    margin-bottom: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    text-align: left;
}

.custom-alert-ticket-pill .pill-lbl {
    font-size: 0.75rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    display: block;
}

.custom-alert-ticket-pill .pill-val {
    font-family: monospace;
    font-size: 1.05rem;
    font-weight: 900;
    color: #0f172a;
    background: #ffffff;
    padding: 2px 8px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.custom-alert-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-custom-alert-close {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #ffffff;
    border: none;
    border-radius: 16px;
    padding: 13px 28px;
    font-size: 0.92rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 10px 20px -5px rgba(15, 23, 42, 0.35);
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    justify-content: center;
}

/* ==========================================================================
   MODAL CARICAMENTO / REGISTRAZIONE IN CORSO ANIMATO (PREMIUM LOADER)
   ========================================================================== */
.custom-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(15, 23, 42, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-loading-overlay.show {
    display: flex;
    opacity: 1;
}

.custom-loading-card {
    background: #ffffff;
    border-radius: 30px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 30px 70px -15px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.9) inset;
    overflow: hidden;
    transform: scale(0.85) translateY(20px);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    text-align: center;
}

.custom-loading-overlay.show .custom-loading-card {
    transform: scale(1) translateY(0);
}

.custom-loading-header-band {
    height: 6px;
    width: 100%;
    background: linear-gradient(90deg, #16a34a 0%, #22c55e 50%, #facc15 100%);
    background-size: 200% 100%;
    animation: loadingBandFlow 2s linear infinite;
}

@keyframes loadingBandFlow {
    0% { background-position: 100% 0; }
    100% { background-position: -100% 0; }
}

.custom-loading-body {
    padding: 36px 30px 32px;
}

/* Spinner Orbitale Animato con Logo / Icona Centrale */
.custom-loading-spinner-wrap {
    position: relative;
    width: 96px;
    height: 96px;
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-loading-outer-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3.5px solid #f1f5f9;
    border-top-color: #16a34a;
    border-right-color: #22c55e;
    animation: ringSpin 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

.custom-loading-inner-ring {
    position: absolute;
    inset: 9px;
    border-radius: 50%;
    border: 2.5px dashed rgba(22, 163, 74, 0.4);
    animation: ringSpinReverse 6s linear infinite;
}

.custom-loading-center-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 2px solid #bbf7d0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #15803d;
    font-size: 1.4rem;
    box-shadow: 0 4px 12px rgba(22, 163, 74, 0.15);
    animation: iconPulse 1.8s ease-in-out infinite;
}

@keyframes ringSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes ringSpinReverse {
    0% { transform: rotate(360deg); }
    100% { transform: rotate(0deg); }
}

@keyframes iconPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.custom-loading-title {
    font-size: 1.35rem;
    font-weight: 900;
    color: #0f172a;
    margin: 0 0 8px;
    line-height: 1.25;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.custom-loading-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
    padding: 4px 14px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 16px;
}

.custom-loading-status-pill .pill-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #10b981;
    animation: dotBlink 1s infinite alternate;
}

@keyframes dotBlink {
    0% { opacity: 0.3; transform: scale(0.8); }
    100% { opacity: 1; transform: scale(1.2); }
}

.custom-loading-desc {
    font-size: 0.9rem;
    color: #64748b;
    line-height: 1.5;
    margin: 0 0 20px;
}

/* Barra di Avanzamento Dinamica */
.custom-loading-bar-track {
    width: 100%;
    height: 6px;
    background: #f1f5f9;
    border-radius: 999px;
    overflow: hidden;
    position: relative;
}

.custom-loading-bar-fill {
    height: 100%;
    width: 35%;
    background: linear-gradient(90deg, #16a34a, #22c55e, #facc15);
    border-radius: 999px;
    position: absolute;
    left: 0;
    animation: barIndeterminate 1.6s ease-in-out infinite;
}

@keyframes barIndeterminate {
    0% { left: -35%; width: 35%; }
    50% { left: 30%; width: 55%; }
    100% { left: 100%; width: 35%; }
}

/* ==========================================================================
   MIGLIORAMENTI: SUGGERIMENTI EMAIL, SLIDE-FADE, SOCIAL INVITE & PULSE
   ========================================================================== */

/* --- Dropdown Suggerimenti Domini Email --- */
.email-autocomplete-wrapper {
    position: relative;
}

.email-suggestions-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    background: #ffffff;
    border: 1.5px solid #cbd5e1;
    border-radius: 14px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.15);
    z-index: 999;
    padding: 6px;
    display: none;
    flex-direction: column;
    gap: 3px;
    max-height: 240px;
    overflow-y: auto;
    animation: fadeInDown 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.email-suggestions-dropdown.open {
    display: flex;
}

.email-suggestion-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    border-radius: 9px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #1e293b;
    font-weight: 600;
    transition: all 0.15s ease;
}

.email-suggestion-item:hover,
.email-suggestion-item.active {
    background: #f0fdf4;
    color: var(--verde-scuro, #1b5e20);
    transform: translateX(3px);
}

.email-suggestion-item .domain-badge {
    font-size: 0.76rem;
    font-weight: 700;
    color: #64748b;
    background: #f1f5f9;
    padding: 2px 8px;
    border-radius: 6px;
}

.email-suggestion-item:hover .domain-badge,
.email-suggestion-item.active .domain-badge {
    background: #dcfce7;
    color: #166534;
}

@keyframes fadeInDown {
    0% { opacity: 0; transform: translateY(-8px); }
    100% { opacity: 1; transform: translateY(0); }
}

/* --- Transizioni Fluide tra Step (Slide-Fade) --- */
.step-slide-in-right {
    animation: stepSlideInRight 0.38s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

.step-slide-in-left {
    animation: stepSlideInLeft 0.38s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
}

@keyframes stepSlideInRight {
    0% {
        opacity: 0;
        transform: translateX(32px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes stepSlideInLeft {
    0% {
        opacity: 0;
        transform: translateX(-32px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* --- Box Invita Amici WhatsApp & Telegram --- */
.ticket-invite-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1.5px solid #e2e8f0;
    border-radius: 18px;
    padding: 16px 18px;
    margin: 18px 0 20px;
    text-align: left;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
    transition: all 0.25s ease;
}

.ticket-invite-card:hover {
    border-color: #cbd5e1;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.ticket-invite-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
    font-weight: 800;
    color: #1e293b;
    font-family: var(--font-headings, 'Signo', sans-serif);
}

.ticket-invite-header i {
    color: var(--verde-main, #2e7d32);
    font-size: 1.05rem;
}

.ticket-invite-sub {
    font-size: 0.82rem;
    color: #64748b;
    margin: 4px 0 12px;
    line-height: 1.35;
}

.ticket-invite-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn-invite-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 800;
    text-decoration: none;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.btn-invite-whatsapp {
    background: #25D366;
    color: #ffffff;
}
.btn-invite-whatsapp:hover {
    background: #20bd5a;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.35);
    color: #ffffff;
}

.btn-invite-telegram {
    background: #0088cc;
    color: #ffffff;
}
.btn-invite-telegram:hover {
    background: #0077b5;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 136, 204, 0.35);
    color: #ffffff;
}




