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

        html, body { width: 100%; height: 100%; overflow: hidden; }

        body {
            font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
            background: #050B1A;
            color: #E8F1FF;
            min-height: 100dvh;
        }

        .bl-stage {
            --f-display: 'Orbitron', 'Inter', system-ui, sans-serif;
            --f-body: 'Space Grotesk', 'Inter', system-ui, sans-serif;
            --f-mono: 'JetBrains Mono', 'SF Mono', monospace;
            position: relative;
            width: 100%;
            height: 100dvh;
            background: #050B1A;
            overflow: hidden;
        }

        .bl-corner {
            position: absolute; width: 16px; height: 16px;
            border-color: #4DA8FF; border-style: solid; border-width: 0;
            opacity: 0.55; z-index: 5; pointer-events: none;
        }
        .bl-corner.tl { top: 14px; left: 14px; border-top-width: 1px; border-left-width: 1px; }
        .bl-corner.tr { top: 14px; right: 14px; border-top-width: 1px; border-right-width: 1px; }
        .bl-corner.bl { bottom: 14px; left: 14px; border-bottom-width: 1px; border-left-width: 1px; }
        .bl-corner.br { bottom: 14px; right: 14px; border-bottom-width: 1px; border-right-width: 1px; }

        .bl-tiles {
            position: absolute; inset: 0;
            display: grid;
            grid-template-columns: repeat(10, 1fr);
            grid-template-rows: repeat(13, 1fr);
            gap: 0;
            z-index: 3;
            pointer-events: none;
        }
        .bl-tile { background: #D4E4FF; opacity: 1; }

        .bl-content {
            position: absolute; inset: 0;
            display: flex; flex-direction: column;
            align-items: center; justify-content: center;
            padding: 70px 20px;
            z-index: 1;
        }

        .bl-logo-block {
            display: flex; flex-direction: column; align-items: center;
            gap: 14px;
            width: 100%; max-width: 420px;
            margin: 0;
            opacity: 0;
            transform: scale(1);
            transform-origin: center center;
            transition:
                opacity 1s ease 0.3s,
                transform 0.9s cubic-bezier(0.22, 1, 0.36, 1),
                margin 0.9s cubic-bezier(0.22, 1, 0.36, 1);
            will-change: transform;
        }
        .bl-stage.p-booting .bl-logo-block { opacity: 1; }

        .bl-logo-block svg {
            width: 100%; height: auto;
            display: block;
        }

        .bl-tagline {
            font-family: var(--f-display); font-weight: 400;
            font-size: 12px;
            color: #E8F1FF;
            letter-spacing: 6px;
            text-transform: uppercase;
            white-space: nowrap;
        }

        .bl-stage.p-compact .bl-logo-block {
            transform: scale(0.55);
            margin: -36px 0;
        }

        .bl-form-block {
            width: 100%; max-width: 340px;
            opacity: 0; max-height: 0;
            overflow: hidden;
            margin-top: 0;
            pointer-events: none;
            transition:
                opacity 0.55s ease,
                max-height 0.7s cubic-bezier(0.2, 0.8, 0.2, 1),
                margin-top 0.6s ease;
        }
        .bl-stage.p-form .bl-form-block {
            opacity: 1; max-height: 560px;
            margin-top: 36px;
            pointer-events: auto;
        }

        .bl-alerts { margin-bottom: 14px; }
        .bl-alert {
            padding: 10px 12px;
            font-family: var(--f-mono);
            font-size: 11px;
            letter-spacing: 1.3px;
            text-transform: uppercase;
            margin-bottom: 8px;
            border-left: 2px solid;
            border-radius: 3px;
            line-height: 1.5;
        }
        .bl-alert-err {
            background: rgba(231, 76, 60, 0.1);
            border-left-color: #E74C3C;
            color: #FF8A7C;
        }
        .bl-alert-info {
            background: rgba(77, 168, 255, 0.1);
            border-left-color: #4DA8FF;
            color: #8EC8FF;
        }

        .bl-field {
            margin-bottom: 14px;
            opacity: 0;
            transform: translateY(10px);
            transition: opacity 0.45s ease, transform 0.45s ease;
        }
        .bl-field-last { margin-bottom: 0; }
        .bl-stage.p-form .bl-field { opacity: 1; transform: translateY(0); }
        .bl-stage.p-form .bl-field-1 { transition-delay: 0.15s; }
        .bl-stage.p-form .bl-field-2 { transition-delay: 0.25s; }
        .bl-stage.p-form .bl-field-3 { transition-delay: 0.35s; }
        .bl-stage.p-form .bl-field-4 { transition-delay: 0.45s; }

        .bl-label {
            font-family: var(--f-mono); font-weight: 400;
            font-size: 10px; letter-spacing: 2.2px;
            color: #7A8FA8; text-transform: uppercase;
            margin-bottom: 7px; display: block;
        }

        .bl-input {
            width: 100%;
            background: #0E1A33;
            border: 0.5px solid #2A3D5C;
            border-radius: 4px;
            padding: 12px 14px;
            color: #E8F1FF;
            font-size: 14px;
            font-family: var(--f-body);
            outline: none;
            transition: border-color 0.15s, background 0.15s;
            letter-spacing: 0.3px;
        }
        .bl-input:focus {
            border-color: #4DA8FF;
            background: #142440;
            box-shadow: 0 0 0 3px rgba(77, 168, 255, 0.12);
        }
        .bl-input::placeholder { color: #4A6080; font-family: var(--f-body); }
        .bl-input-wrap { position: relative; }

        .bl-show {
            position: absolute; right: 14px; top: 50%;
            transform: translateY(-50%);
            color: #7A8FA8; font-size: 10px;
            font-family: var(--f-mono); letter-spacing: 1.5px;
            cursor: pointer;
            user-select: none;
        }
        .bl-show:hover { color: #4DA8FF; }

        .bl-options { display: flex; justify-content: space-between; align-items: center; }

        .bl-check {
            display: flex; align-items: center; gap: 8px;
            color: #8FA8C9; font-size: 12px; font-family: var(--f-body);
            cursor: pointer;
        }
        .bl-check-native {
            position: absolute; opacity: 0;
            width: 0; height: 0; pointer-events: none;
        }
        .bl-check-box {
            width: 14px; height: 14px;
            border: 0.5px solid #4DA8FF; border-radius: 3px;
            background: rgba(77,168,255,0.15);
            display: inline-flex; align-items: center; justify-content: center;
            transition: background 0.15s;
        }
        .bl-check-box span { width: 6px; height: 6px; background: #4DA8FF; display: block; transition: opacity 0.15s; }
        .bl-check-native:not(:checked) + .bl-check-box span { opacity: 0; }
        .bl-check-native:checked + .bl-check-box { background: rgba(77,168,255,0.3); }
        .bl-check-native:focus-visible + .bl-check-box { outline: 1px solid #4DA8FF; outline-offset: 2px; }

        .bl-forgot {
            color: #4DA8FF; font-size: 12px;
            text-decoration: none; font-family: var(--f-body);
        }
        .bl-forgot:hover { color: #6BB8FF; }

        .bl-submit {
            width: 100%;
            background: #4DA8FF; border: none; border-radius: 4px;
            padding: 14px;
            color: #050B1A;
            font-family: var(--f-display); font-weight: 500; font-size: 12px;
            letter-spacing: 4px; text-transform: uppercase;
            cursor: pointer;
            box-shadow: 0 0 18px rgba(77, 168, 255, 0.3), 0 0 32px rgba(0, 229, 255, 0.08);
            transition: background 0.15s, transform 0.1s, box-shadow 0.2s;
        }
        .bl-submit:hover {
            background: #6BB8FF;
            box-shadow: 0 0 24px rgba(77, 168, 255, 0.45), 0 0 48px rgba(0, 229, 255, 0.15);
        }
        .bl-submit:active { transform: scale(0.98); }

        .bl-telemetry-top {
            position: absolute; top: 22px; left: 24px; z-index: 4;
            display: flex; align-items: center; gap: 8px;
            color: #4DA8FF;
            font-family: var(--f-mono); font-size: 11px; letter-spacing: 1.8px;
            font-weight: 400;
        }
        .bl-telemetry-dot {
            width: 7px; height: 7px;
            background: #4DA8FF; border-radius: 50%;
            box-shadow: 0 0 8px rgba(77, 168, 255, 0.6);
            animation: blDotPulse 1.2s ease-in-out infinite;
        }
        .bl-stage.p-revealed .bl-telemetry-dot { animation: none; }
        @keyframes blDotPulse {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.25; }
        }

        .bl-telemetry-right {
            position: absolute; top: 22px; right: 24px; z-index: 4;
            color: #8FA8C9;
            font-family: var(--f-mono); font-size: 11px; letter-spacing: 1.8px;
        }
        .bl-telemetry-right b { color: #E8F1FF; font-weight: 500; }

        /* [i18n B.3] Pillole selettore lingua IT/EN
           Sostituiscono il vecchio decoro statico <b>IT</b> &middot; EN.
           Active state coerente con .bl-telemetry-right b (color #E8F1FF, weight 500). */
        .bl-lang-pill {
            background: none;
            border: none;
            padding: 0 4px;
            color: #8FA8C9;
            font-family: var(--f-mono);
            font-size: 11px;
            letter-spacing: 1.8px;
            text-transform: uppercase;
            cursor: pointer;
            transition: color 0.15s ease;
        }
        .bl-lang-pill:hover { color: #BFD3EE; }
        .bl-lang-pill.bl-lang-active { color: #E8F1FF; font-weight: 500; }
        .bl-lang-pill:disabled { cursor: wait; opacity: 0.6; }
        .bl-lang-pill:focus-visible {
            outline: 1px solid #4DA8FF;
            outline-offset: 2px;
            border-radius: 2px;
        }
        .bl-lang-sep { opacity: 0.5; padding: 0 2px; }

        .bl-footer {
            position: absolute; bottom: 18px; left: 24px; right: 24px; z-index: 4;
            display: flex; justify-content: space-between; align-items: center; gap: 12px;
            color: #8FA8C9;
            font-family: var(--f-mono); font-size: 11px; letter-spacing: 1.5px;
            font-weight: 400;
        }
        .bl-footer > span:first-child { display: flex; align-items: center; gap: 10px; }
        .bl-sec-dot {
            width: 7px; height: 7px;
            background: #4DA8FF; border-radius: 50%;
            box-shadow: 0 0 6px rgba(77, 168, 255, 0.5);
            display: inline-block; flex-shrink: 0;
        }
        .bl-timer-sep { opacity: 0.4; margin: 0 6px; }

        @media (max-width: 560px) {
            .bl-content { padding: 64px 16px; }
            .bl-logo-block { max-width: 300px; }
            .bl-form-block { max-width: 100%; }
            .bl-tagline { font-size: 11px; letter-spacing: 5px; }
            .bl-stage.p-compact .bl-logo-block {
                transform: scale(0.6);
                margin: -24px 0;
            }
            .bl-footer, .bl-telemetry-top, .bl-telemetry-right {
                font-size: 10px; letter-spacing: 1.3px;
            }
            .bl-corner { width: 12px; height: 12px; }
        }
        @media (max-width: 400px) {
            .bl-telemetry-right, .bl-footer { font-size: 9.5px; }
            .bl-label { font-size: 9.5px; }
        }

        /* Skip-intro: mostra subito lo stato finale senza animazioni */
        .bl-stage.p-skip,
        .bl-stage.p-skip *,
        .bl-stage.p-skip *::before,
        .bl-stage.p-skip *::after {
            transition: none !important;
            animation: none !important;
        }
        .bl-stage.p-skip .bl-tile { opacity: 0; }

        /* ============================================================ */
        /* [Auth-alt S4] Passkey block + divider                        */
        /* ============================================================ */
        .bl-passkey-block {
            width: 100%;
            margin-bottom: 18px;
            opacity: 0;
            transform: translateY(10px);
            transition: opacity 0.45s ease, transform 0.45s ease;
            transition-delay: 0.05s;
        }
        .bl-stage.p-form .bl-passkey-block { opacity: 1; transform: translateY(0); }

        .bl-passkey-btn {
            width: 100%;
            background: rgba(77, 168, 255, 0.08);
            border: 0.5px solid #4DA8FF;
            border-radius: 4px;
            padding: 13px;
            color: #4DA8FF;
            font-family: var(--f-display); font-weight: 500; font-size: 12px;
            letter-spacing: 3px; text-transform: uppercase;
            cursor: pointer;
            display: flex; align-items: center; justify-content: center; gap: 10px;
            transition: background 0.15s, border-color 0.15s, color 0.15s;
        }
        .bl-passkey-btn:hover {
            background: rgba(77, 168, 255, 0.18);
            color: #6BB8FF;
            border-color: #6BB8FF;
        }
        .bl-passkey-btn:disabled {
            opacity: 0.5; cursor: wait;
        }
        .bl-passkey-btn svg {
            width: 18px; height: 18px; flex-shrink: 0;
        }

        .bl-divider {
            display: flex; align-items: center; gap: 12px;
            margin: 18px 0;
            opacity: 0;
            transition: opacity 0.45s ease 0.1s;
        }
        .bl-stage.p-form .bl-divider { opacity: 1; }
        .bl-divider-line {
            flex: 1; height: 0.5px; background: #2A3D5C;
        }
        .bl-divider-text {
            font-family: var(--f-mono); font-size: 10px;
            letter-spacing: 2.2px; text-transform: uppercase;
            color: #4A6080;
        }

        /* ============================================================ */
        /* [Auth-alt S4] Stage-based visibility                         */
        /* ============================================================ */
        /* Default (stage password): form password visibile, form TOTP nascosto */
        .bl-form-totp { display: none; }

        /* Stage TOTP: form password e blocco passkey nascosti, form TOTP visibile */
        .bl-stage.stage-totp .bl-form-block { display: none; }
        .bl-stage.stage-totp .bl-passkey-block { display: none; }
        .bl-stage.stage-totp .bl-divider { display: none; }
        .bl-stage.stage-totp .bl-form-totp { display: flex; flex-direction: column; }

        /* ============================================================ */
        /* [Auth-alt S4] Step header (numero step + titolo + hint)      */
        /* ============================================================ */
        .bl-step-header {
            margin-bottom: 18px;
            opacity: 0;
            transform: translateY(10px);
            transition: opacity 0.45s ease, transform 0.45s ease;
        }
        .bl-stage.p-form .bl-step-header { opacity: 1; transform: translateY(0); }

        .bl-step-num {
            font-family: var(--f-mono); font-size: 10px;
            letter-spacing: 2.5px; color: #4DA8FF;
            text-transform: uppercase;
            margin-bottom: 6px;
        }
        .bl-step-title {
            font-family: var(--f-display); font-weight: 500;
            font-size: 16px; letter-spacing: 2px;
            color: #E8F1FF;
            text-transform: uppercase;
            margin-bottom: 6px;
        }
        .bl-step-hint {
            font-family: var(--f-body); font-size: 12px;
            color: #8FA8C9;
            line-height: 1.5;
        }

        /* ============================================================ */
        /* [Auth-alt S4] Input OTP: 6 cifre monospace centrate          */
        /* ============================================================ */
        .bl-input-otp {
            font-family: var(--f-display);
            font-size: 24px;
            text-align: center;
            letter-spacing: 0.5em;
            padding: 16px 14px;
            font-variant-numeric: tabular-nums;
        }
        .bl-input-otp::placeholder {
            color: #2A3D5C;
            letter-spacing: 0.5em;
        }

        /* ============================================================ */
        /* [Auth-alt S4] Recovery hint sotto OTP                        */
        /* ============================================================ */
        .bl-otp-recovery {
            margin-top: 18px;
            font-family: var(--f-body);
            font-size: 11.5px;
            color: #7A8FA8;
            text-align: center;
            line-height: 1.5;
            opacity: 0;
            transition: opacity 0.45s ease 0.5s;
        }
        .bl-stage.p-form .bl-otp-recovery { opacity: 1; }
        .bl-otp-recovery .bl-mono {
            font-family: var(--f-mono);
            color: #4DA8FF;
            letter-spacing: 0.5px;
        }

        /* ============================================================ */
        /* [Auth-alt S4] Mobile tweaks per OTP input                    */
        /* ============================================================ */
        @media (max-width: 560px) {
            .bl-input-otp { font-size: 20px; letter-spacing: 0.4em; }
            .bl-step-title { font-size: 14px; letter-spacing: 1.6px; }
        }
