{"id":9536,"date":"2025-12-10T11:05:59","date_gmt":"2025-12-10T10:05:59","guid":{"rendered":"https:\/\/mental.mindvise.de\/panou-de-control\/"},"modified":"2026-01-19T12:57:44","modified_gmt":"2026-01-19T11:57:44","slug":"panou-de-control","status":"publish","type":"page","link":"https:\/\/mental.mindvise.de\/ro\/","title":{"rendered":"Panou de control"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"9536\" class=\"elementor elementor-9536 elementor-9327\" data-elementor-post-type=\"page\">\n\t\t\t\t<div class=\"elementor-element elementor-element-6ec4565 e-flex e-con-boxed e-con e-parent\" data-id=\"6ec4565\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-6fff75b elementor-widget elementor-widget-shortcode\" data-id=\"6fff75b\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"shortcode.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<div class=\"elementor-shortcode\"><div class=\"mhp-container mhp-landing-page\">\n            <!-- Video-Hintergrund - nur auf Login-Seite (nicht eingeloggt) -->\n            <div id=\"mhp-video-background\" style=\"position: fixed !important; top: 0 !important; left: 0 !important; width: 100vw !important; height: 100vh !important; min-width: 100vw !important; min-height: 100vh !important; z-index: -1 !important; overflow: hidden !important; pointer-events: none !important; display: block !important; visibility: visible !important; opacity: 1 !important;\">\n                <video id=\"mhp-background-video\" autoplay muted loop playsinline preload=\"auto\" style=\"position: absolute !important; top: 0 !important; left: 0 !important; width: 100% !important; height: 100% !important; min-width: 100% !important; min-height: 100% !important; object-fit: cover !important; object-position: center !important; pointer-events: none !important; display: block !important; visibility: visible !important; opacity: 1 !important; transition: opacity 1s ease-in-out;\">\n                    <source src=\"https:\/\/mental.mindvise.de\/ro\/wp-content\/uploads\/2026\/01\/mindvise-back.mp4\" type=\"video\/mp4\">\n                    <!-- Fallback-Bild wird \u00fcber CSS background-image angezeigt -->\n                <\/video>\n            <\/div>\n            <script>\n            (function() {\n                var video = document.getElementById(\"mhp-background-video\");\n                var videoContainer = document.getElementById(\"mhp-video-background\");\n                \n                \/\/ Video-Liste: Nur das Standard-Video f\u00fcr Mitarbeiter-Dashboard\n                var videoSources = [\n                    \"https:\/\/mental.mindvise.de\/ro\/wp-content\/uploads\/2026\/01\/mindvise-back.mp4\"\n                ];\n                \n                function playVideo() {\n                    if (video && videoContainer) {\n                        \/\/ Setze das Standard-Video\n                        var source = video.querySelector(\"source\");\n                        if (source && videoSources.length > 0) {\n                            source.src = videoSources[0];\n                            video.load();\n                        }\n                        \n                        videoContainer.style.display = \"block\";\n                        videoContainer.style.visibility = \"visible\";\n                        videoContainer.style.opacity = \"1\";\n                        video.style.display = \"block\";\n                        video.style.visibility = \"visible\";\n                        video.style.opacity = \"1\";\n                        \n                        var tryPlay = function() {\n                            video.play().catch(function(e) { \n                                console.log(\"Video autoplay failed:\", e); \n                            });\n                        };\n                        \n                        video.addEventListener(\"loadedmetadata\", tryPlay, { once: true });\n                        video.addEventListener(\"loadeddata\", tryPlay, { once: true });\n                        video.addEventListener(\"canplay\", tryPlay, { once: true });\n                        \n                        if (video.readyState >= 2) {\n                            tryPlay();\n                        } else {\n                            video.load();\n                        }\n                        \n                        setTimeout(function() {\n                            if (video.paused) {\n                                tryPlay();\n                            }\n                        }, 500);\n                    }\n                }\n                \n                \/\/ Initiales Video abspielen\n                playVideo();\n            })();\n            <\/script>\n            \n            <!-- Mindvise Logo (oben links) -->\n            <div id=\"mhp-logo-header\" class=\"mhp-logo-header mhp-landing-logo\">\n                <a href=\"https:\/\/mindvise.de\" target=\"_blank\" rel=\"noopener\">\n                    <img decoding=\"async\" src=\"https:\/\/mental.mindvise.de\/ro\/wp-content\/uploads\/logo_mindvise.png\" alt=\"Mindvise\" class=\"mhp-logo-img\">\n                <\/a>\n            <\/div>\n            \n            <!-- Sprachumschalter (oben rechts) -->\n            <div class=\"mhp-landing-language-switcher\" style=\"position: fixed; top: 20px; right: 20px; z-index: 10001; pointer-events: auto;\">\n                \n<div\n\t class=\"wpml-ls-statics-shortcode_actions wpml-ls wpml-ls-legacy-dropdown js-wpml-ls-legacy-dropdown\">\n\t<ul role=\"menu\">\n\n\t\t<li role=\"none\" tabindex=\"0\" class=\"wpml-ls-slot-shortcode_actions wpml-ls-item wpml-ls-item-ro wpml-ls-current-language wpml-ls-item-legacy-dropdown\">\n\t\t\t<a href=\"#\" class=\"js-wpml-ls-item-toggle wpml-ls-item-toggle\" role=\"menuitem\" title=\"Switch to Rom\u00e2n\u0103\">\n                                                    <img decoding=\"async\"\n            class=\"wpml-ls-flag\"\n            src=\"https:\/\/mental.mindvise.de\/wp-content\/plugins\/sitepress-multilingual-cms\/res\/flags\/ro.svg\"\n            alt=\"Rom\u00e2n\u0103\"\n            width=18\n            height=12\n    \/><\/a>\n\n\t\t\t<ul class=\"wpml-ls-sub-menu\" role=\"menu\">\n\t\t\t\t\n\t\t\t\t\t<li class=\"wpml-ls-slot-shortcode_actions wpml-ls-item wpml-ls-item-en wpml-ls-first-item\" role=\"none\">\n\t\t\t\t\t\t<a href=\"https:\/\/mental.mindvise.de\/en\/\" class=\"wpml-ls-link\" role=\"menuitem\" aria-label=\"Switch to Englez\u0103\" title=\"Switch to Englez\u0103\">\n                                                                <img decoding=\"async\"\n            class=\"wpml-ls-flag\"\n            src=\"https:\/\/mental.mindvise.de\/wp-content\/plugins\/sitepress-multilingual-cms\/res\/flags\/en.svg\"\n            alt=\"Englez\u0103\"\n            width=18\n            height=12\n    \/><\/a>\n\t\t\t\t\t<\/li>\n\n\t\t\t\t\n\t\t\t\t\t<li class=\"wpml-ls-slot-shortcode_actions wpml-ls-item wpml-ls-item-de\" role=\"none\">\n\t\t\t\t\t\t<a href=\"https:\/\/mental.mindvise.de\/\" class=\"wpml-ls-link\" role=\"menuitem\" aria-label=\"Switch to German\u0103\" title=\"Switch to German\u0103\">\n                                                                <img decoding=\"async\"\n            class=\"wpml-ls-flag\"\n            src=\"https:\/\/mental.mindvise.de\/wp-content\/plugins\/sitepress-multilingual-cms\/res\/flags\/de.svg\"\n            alt=\"German\u0103\"\n            width=18\n            height=12\n    \/><\/a>\n\t\t\t\t\t<\/li>\n\n\t\t\t\t\n\t\t\t\t\t<li class=\"wpml-ls-slot-shortcode_actions wpml-ls-item wpml-ls-item-cs\" role=\"none\">\n\t\t\t\t\t\t<a href=\"https:\/\/mental.mindvise.de\/cs\/\" class=\"wpml-ls-link\" role=\"menuitem\" aria-label=\"Switch to Ceh\u0103\" title=\"Switch to Ceh\u0103\">\n                                                                <img decoding=\"async\"\n            class=\"wpml-ls-flag\"\n            src=\"https:\/\/mental.mindvise.de\/wp-content\/plugins\/sitepress-multilingual-cms\/res\/flags\/cs.svg\"\n            alt=\"Ceh\u0103\"\n            width=18\n            height=12\n    \/><\/a>\n\t\t\t\t\t<\/li>\n\n\t\t\t\t\n\t\t\t\t\t<li class=\"wpml-ls-slot-shortcode_actions wpml-ls-item wpml-ls-item-nl\" role=\"none\">\n\t\t\t\t\t\t<a href=\"https:\/\/mental.mindvise.de\/nl\/\" class=\"wpml-ls-link\" role=\"menuitem\" aria-label=\"Switch to Olanez\u0103\" title=\"Switch to Olanez\u0103\">\n                                                                <img decoding=\"async\"\n            class=\"wpml-ls-flag\"\n            src=\"https:\/\/mental.mindvise.de\/wp-content\/plugins\/sitepress-multilingual-cms\/res\/flags\/nl.svg\"\n            alt=\"Olanez\u0103\"\n            width=18\n            height=12\n    \/><\/a>\n\t\t\t\t\t<\/li>\n\n\t\t\t\t\n\t\t\t\t\t<li class=\"wpml-ls-slot-shortcode_actions wpml-ls-item wpml-ls-item-fr\" role=\"none\">\n\t\t\t\t\t\t<a href=\"https:\/\/mental.mindvise.de\/fr\/\" class=\"wpml-ls-link\" role=\"menuitem\" aria-label=\"Switch to Francez\u0103\" title=\"Switch to Francez\u0103\">\n                                                                <img decoding=\"async\"\n            class=\"wpml-ls-flag\"\n            src=\"https:\/\/mental.mindvise.de\/wp-content\/plugins\/sitepress-multilingual-cms\/res\/flags\/fr.svg\"\n            alt=\"Francez\u0103\"\n            width=18\n            height=12\n    \/><\/a>\n\t\t\t\t\t<\/li>\n\n\t\t\t\t\n\t\t\t\t\t<li class=\"wpml-ls-slot-shortcode_actions wpml-ls-item wpml-ls-item-it\" role=\"none\">\n\t\t\t\t\t\t<a href=\"https:\/\/mental.mindvise.de\/it\/\" class=\"wpml-ls-link\" role=\"menuitem\" aria-label=\"Switch to Italian\u0103\" title=\"Switch to Italian\u0103\">\n                                                                <img decoding=\"async\"\n            class=\"wpml-ls-flag\"\n            src=\"https:\/\/mental.mindvise.de\/wp-content\/plugins\/sitepress-multilingual-cms\/res\/flags\/it.svg\"\n            alt=\"Italian\u0103\"\n            width=18\n            height=12\n    \/><\/a>\n\t\t\t\t\t<\/li>\n\n\t\t\t\t\n\t\t\t\t\t<li class=\"wpml-ls-slot-shortcode_actions wpml-ls-item wpml-ls-item-pl\" role=\"none\">\n\t\t\t\t\t\t<a href=\"https:\/\/mental.mindvise.de\/pl\/\" class=\"wpml-ls-link\" role=\"menuitem\" aria-label=\"Switch to Polonez\u0103\" title=\"Switch to Polonez\u0103\">\n                                                                <img decoding=\"async\"\n            class=\"wpml-ls-flag\"\n            src=\"https:\/\/mental.mindvise.de\/wp-content\/plugins\/sitepress-multilingual-cms\/res\/flags\/pl.svg\"\n            alt=\"Polonez\u0103\"\n            width=18\n            height=12\n    \/><\/a>\n\t\t\t\t\t<\/li>\n\n\t\t\t\t\n\t\t\t\t\t<li class=\"wpml-ls-slot-shortcode_actions wpml-ls-item wpml-ls-item-pt-pt\" role=\"none\">\n\t\t\t\t\t\t<a href=\"https:\/\/mental.mindvise.de\/pt-pt\/\" class=\"wpml-ls-link\" role=\"menuitem\" aria-label=\"Switch to Portughez\u0103 (Portugalia)\" title=\"Switch to Portughez\u0103 (Portugalia)\">\n                                                                <img decoding=\"async\"\n            class=\"wpml-ls-flag\"\n            src=\"https:\/\/mental.mindvise.de\/wp-content\/plugins\/sitepress-multilingual-cms\/res\/flags\/pt-pt.svg\"\n            alt=\"Portughez\u0103 (Portugalia)\"\n            width=18\n            height=12\n    \/><\/a>\n\t\t\t\t\t<\/li>\n\n\t\t\t\t\n\t\t\t\t\t<li class=\"wpml-ls-slot-shortcode_actions wpml-ls-item wpml-ls-item-es\" role=\"none\">\n\t\t\t\t\t\t<a href=\"https:\/\/mental.mindvise.de\/es\/\" class=\"wpml-ls-link\" role=\"menuitem\" aria-label=\"Switch to Spaniol\u0103\" title=\"Switch to Spaniol\u0103\">\n                                                                <img decoding=\"async\"\n            class=\"wpml-ls-flag\"\n            src=\"https:\/\/mental.mindvise.de\/wp-content\/plugins\/sitepress-multilingual-cms\/res\/flags\/es.svg\"\n            alt=\"Spaniol\u0103\"\n            width=18\n            height=12\n    \/><\/a>\n\t\t\t\t\t<\/li>\n\n\t\t\t\t\n\t\t\t\t\t<li class=\"wpml-ls-slot-shortcode_actions wpml-ls-item wpml-ls-item-tr wpml-ls-last-item\" role=\"none\">\n\t\t\t\t\t\t<a href=\"https:\/\/mental.mindvise.de\/tr\/\" class=\"wpml-ls-link\" role=\"menuitem\" aria-label=\"Switch to Turc\u0103\" title=\"Switch to Turc\u0103\">\n                                                                <img decoding=\"async\"\n            class=\"wpml-ls-flag\"\n            src=\"https:\/\/mental.mindvise.de\/wp-content\/plugins\/sitepress-multilingual-cms\/res\/flags\/tr.svg\"\n            alt=\"Turc\u0103\"\n            width=18\n            height=12\n    \/><\/a>\n\t\t\t\t\t<\/li>\n\n\t\t\t\t\t\t\t<\/ul>\n\n\t\t<\/li>\n\n\t<\/ul>\n<\/div>\n\n            <\/div>\n            \n            <!-- Businesscode-Login (direkt sichtbar, keine Landing-Page mehr) -->\n            <div id=\"mhp-businesscode-login-section\" class=\"mhp-landing-section\">\n                <div class=\"mhp-card mhp-login-card\">\n                    <h2 class=\"mhp-login-title\">Autentificare angajat<\/h2>\n                    <p class=\"mhp-login-subtitle\">Mit Businesscode &amp; Firmenpasswort oder mit pers\u00f6nlicher ID &amp; pers\u00f6nlichem Passwort\n                     <span class=\"mhp-login-hint-trigger\" id=\"mhp-login-hint-trigger\" role=\"button\" tabindex=\"0\" aria-label=\"Info\" aria-expanded=\"false\" aria-controls=\"mhp-login-hint-text\" title=\"Info\" style=\"cursor:pointer; display:inline-flex; align-items:center; justify-content:center; width:1.15em; height:1.15em; border-radius:50%; background:#6b7280; color:#fff; font-size:0.7rem; font-weight:bold; margin-left:6px; vertical-align:middle; line-height:1;\">i<\/span>\n                    <\/p>\n                    <div id=\"mhp-login-hint-text\" class=\"mhp-login-hint\" style=\"display:none; font-size: 0.9rem; color: #6b7280; margin: 0.5rem 0 1rem 0; line-height: 1.4; padding: 8px 12px; background: #f3f4f6; border-radius: 6px;\">Entweder Businesscode &amp; Firmenpasswort (vom Arbeitgeber) oder pers\u00f6nliche ID &amp; pers\u00f6nliches Passwort (aus Ihrer Anmeldung).<\/div>\n                    \n                    <!-- Tabs -->\n                    <div class=\"mhp-login-tabs\">\n                        <button type=\"button\" class=\"mhp-login-tab active\" data-tab=\"credentials\">\n                            <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><rect x=\"3\" y=\"11\" width=\"18\" height=\"11\" rx=\"2\" ry=\"2\"><\/rect><path d=\"m7 11V7a5 5 0 0 1 10 0v4\"><\/path><\/svg>\n                            Autentificare angajat\n                        <\/button>\n                        <button type=\"button\" class=\"mhp-login-tab mhp-qr-tab-mobile\" data-tab=\"qrcode\">\n                            <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><rect x=\"3\" y=\"3\" width=\"7\" height=\"7\"><\/rect><rect x=\"14\" y=\"3\" width=\"7\" height=\"7\"><\/rect><rect x=\"14\" y=\"14\" width=\"7\" height=\"7\"><\/rect><rect x=\"3\" y=\"14\" width=\"7\" height=\"7\"><\/rect><\/svg>\n                            QR-Code\n                        <\/button>\n                    <\/div>\n                    \n                    <!-- Login Form Tab -->\n                    <div class=\"mhp-login-tab-content active\" id=\"mhp-tab-credentials\">\n                        <form id=\"mhp-businesscode-login-form\" class=\"mhp-login-form\">\n                            <input type=\"hidden\" name=\"redirect_url\" value=\"https:\/\/mental.mindvise.de\/ro\/wp-json\/wp\/v2\/pages\/9536\">\n                            <input type=\"hidden\" name=\"nonce\" value=\"378ce5b161\">\n                            \n                            <div class=\"mhp-form-group\">\n                                <label for=\"mhp-bc-login\">Businesscode oder pers\u00f6nliche ID<\/label>\n                                <input type=\"text\" id=\"mhp-bc-login\" name=\"businesscode\" class=\"mhp-input\" placeholder=\"z.B. firma123 oder MH-XXXX-XXXX\" required autocomplete=\"username\">\n                            <\/div>\n                            \n                            <div class=\"mhp-form-group\">\n                                <label for=\"mhp-bc-password\">Parol\u0103<\/label>\n                                <input type=\"password\" id=\"mhp-bc-password\" name=\"password\" class=\"mhp-input\" placeholder=\"Parola dumneavoastr\u0103\" required autocomplete=\"current-password\" autocapitalize=\"off\" autocorrect=\"off\" spellcheck=\"false\">\n                            <\/div>\n                            \n                            <div id=\"mhp-login-error\" class=\"mhp-error\" style=\"display:none;\"><\/div>\n                            \n                            <button type=\"submit\" class=\"mhp-btn mhp-btn-primary mhp-btn-full\" id=\"mhp-businesscode-login-btn\">Autentificare<\/button>\n                        <\/form>\n                    <\/div>\n                    \n                    <!-- QR Code Tab -->\n                    <div class=\"mhp-login-tab-content\" id=\"mhp-tab-qrcode\" style=\"display:none;\">\n                        <div class=\"mhp-qr-section\">\n                            <p class=\"mhp-qr-info\">Scana\u021bi codul QR din e-mailul de invita\u021bie<\/p>\n                            \n                            <div id=\"mhp-qr-scanner-container\" class=\"mhp-qr-container\" style=\"display:none;\">\n                                <video id=\"mhp-qr-video\" class=\"mhp-qr-video\"><\/video>\n                                <div class=\"mhp-qr-overlay\">\n                                    <div class=\"mhp-qr-frame\"><\/div>\n                                <\/div>\n                            <\/div>\n                            \n                            <button type=\"button\" id=\"mhp-start-qr-scanner\" class=\"mhp-btn mhp-btn-secondary mhp-btn-full\">\n                                <svg width=\"20\" height=\"20\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\"><path d=\"M23 19a2 2 0 0 1-2 2H3a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h4l2-3h6l2 3h4a2 2 0 0 1 2 2z\"><\/path><circle cx=\"12\" cy=\"13\" r=\"4\"><\/circle><\/svg>\n                                <span id=\"mhp-qr-btn-text\">Porni\u021bi scanerul de coduri QR<\/span>\n                            <\/button>\n                            \n                            <div id=\"mhp-qr-error\" class=\"mhp-error\" style=\"display:none;\"><\/div>\n                            <div id=\"mhp-qr-success\" class=\"mhp-success\" style=\"display:none;\"><\/div>\n                        <\/div>\n                    <\/div>\n                    \n                    <p class=\"mhp-login-contact\">Pentru \u00eentreb\u0103ri, v\u0103 rug\u0103m s\u0103 contacta\u021bi departamentul de resurse umane sau mental@mindvise.de<\/p>\n                <\/div>\n            <\/div>\n            \n            <!-- Login-Links unter dem Login-Container -->\n            <div class=\"mhp-login-links\" style=\"text-align: center; margin-top: 24px; font-size: 14px; display: flex; flex-direction: column; gap: 8px; align-items: center; width: 100%; max-width: 420px;\">\n                <a href=\"https:\/\/mental.mindvise.de\/ro\/p-login\/\" style=\"color: #A58C84; text-decoration: underline;\">Psychologen Login<\/a>\n                <a href=\"https:\/\/mental.mindvise.de\/ro\/hr-login\/\" style=\"color: #A58C84; text-decoration: underline;\">HR Dashboard<\/a>\n            <\/div>\n            \n            <!-- Participant-ID-Login\/Registrierung (wird nach Businesscode-Login angezeigt) -->\n            <div id=\"mhp-id-login-section\" class=\"mhp-landing-section\" style=\"display:none;\">\n                <!-- Wird dynamisch von JavaScript gef\u00fcllt -->\n            <\/div>\n        <\/div>\n        <script>\n        (function($) {\n            \/\/ Setze Klasse auf body f\u00fcr Hintergrund-Styling\n            $('body, html').addClass('mhp-landing-page-active');\n            \n            var qrScanner = null;\n            var isScanning = false;\n\n            \/\/ Tab switching\n            $(\".mhp-login-tab\").on(\"click\", function() {\n                var tab = $(this).data(\"tab\");\n                $(\".mhp-login-tab\").removeClass(\"active\");\n                $(this).addClass(\"active\");\n                $(\".mhp-login-tab-content\").hide();\n                $(\"#mhp-tab-\" + tab).show();\n\n                \/\/ Stop scanner when switching away\n                if (tab !== \"qrcode\" && isScanning) {\n                    stopQRScanner();\n                }\n            });\n\n            \/\/ Info-Icon: Hint-Text ein- und ausblenden\n            $(\"#mhp-login-hint-trigger\").on(\"click\", function() {\n                var $hint = $(\"#mhp-login-hint-text\");\n                $hint.toggle();\n                $(this).attr(\"aria-expanded\", $hint.is(\":visible\"));\n            }).on(\"keydown\", function(e) {\n                if (e.key === \"Enter\" || e.key === \" \") {\n                    e.preventDefault();\n                    $(this).trigger(\"click\");\n                }\n            });\n\n            \/\/ Login Form Submit\n            $(\"#mhp-businesscode-login-form\").on(\"submit\", function(e) {\n                e.preventDefault();\n                var $form = $(this);\n                var $btn = $form.find(\"button[type=submit], #mhp-businesscode-login-btn\");\n                var $error = $(\"#mhp-login-error\");\n                var originalBtnText = $btn.text() || \"' . $login_btn_text . '\";\n\n                $btn.prop(\"disabled\", true).text(\"...\");\n                $error.hide();\n\n                var loginValue = ($(\"#mhp-bc-login\").val() || \"\").trim().toUpperCase();\n                var isParticipantId = \/^(MH|FK)-[A-Z0-9]{4}-[A-Z0-9]{4}$\/.test(loginValue);\n                var ajaxUrl = (typeof mhp_ajax !== \"undefined\" && mhp_ajax.ajax_url) ? mhp_ajax.ajax_url : \"' . $ajax_url . '\";\n                var postData = {\n                    password: $(\"#mhp-bc-password\").val(),\n                    redirect_url: $form.find(\"[name=redirect_url]\").val(),\n                    nonce: $form.find(\"[name=nonce]\").val()\n                };\n                if (isParticipantId) {\n                    postData.action = \"mhp_login_with_participant_id\";\n                    postData.participant_id = loginValue;\n                } else {\n                    postData.action = \"mhp_businesscode_login\";\n                    postData.businesscode = ($(\"#mhp-bc-login\").val() || \"\").trim();\n                }\n                \n                $.ajax({\n                    url: ajaxUrl,\n                    type: \"POST\",\n                    dataType: \"json\",\n                    data: postData,\n                    success: function(response) {\n                        if (response.success) {\n                            \/\/ WICHTIG F\u00dcR APP: Nach Businesscode-Login immer zur App-Version weiterleiten\n                            \/\/ Die App-Version zeigt dann automatisch das pers\u00f6nliche ID Login-Formular\n                            \/\/ Pr\u00fcfe ob wir in einer App sind (App-Tab vorhanden)\n                            var isApp = jQuery(\".mhp-app-tab-start\").length > 0 || jQuery(\".mhp-app-tab\").length > 0;\n                            \n                            if (isApp) {\n                                \/\/ App-Version: Weiterleitung zur App-Version (render_app_tab_start)\n                                \/\/ Die App-Version zeigt dann automatisch das pers\u00f6nliche ID Login-Formular\n                                window.location.href = response.data.redirect_url || window.location.href.split('?')[0];\n                            } else {\n                                \/\/ Browser-Version: Pr\u00fcfe ob Participant ID Login erforderlich ist\n                                if (response.data.requires_participant_id) {\n                                    \/\/ Nach Businesscode-Login: Seite neu laden f\u00fcr Schritt 2 (Participant-ID)\n                                    window.location.reload();\n                                } else {\n                                    \/\/ Nach Login mit Pers\u00f6nlicher ID: Reload damit Dashboard mit gesetzter ID geladen wird\n                                    window.location.reload();\n                                }\n                            }\n                        } else {\n                            $error.text(response.data.message || \"' . $error_credentials_msg . '\").show();\n                            $btn.prop(\"disabled\", false).text(originalBtnText);\n                        }\n                    },\n                    error: function(xhr, status, error) {\n                        console.error(\"Businesscode Login Error:\", status, error, xhr);\n                        console.error(\"Response Text:\", xhr.responseText);\n                        console.error(\"Status Code:\", xhr.status);\n                        var errorMsg = \"Verbindungsfehler. Bitte versuchen Sie es erneut.\";\n                        if (xhr.status === 0) {\n                            errorMsg = \"Netzwerkfehler. Bitte pr\u00fcfen Sie Ihre Internetverbindung.\";\n                        } else if (xhr.status === 403) {\n                            errorMsg = \"Zugriff verweigert. Bitte laden Sie die Seite neu.\";\n                        } else if (xhr.status === 404) {\n                            errorMsg = \"AJAX-Endpunkt nicht gefunden. Bitte laden Sie die Seite neu.\";\n                        } else if (xhr.status >= 500) {\n                            errorMsg = \"Serverfehler. Bitte versuchen Sie es sp\u00e4ter erneut.\";\n                        } else if (xhr.responseText) {\n                            \/\/ Versuche Fehlermeldung aus Response zu extrahieren\n                            try {\n                                var response = JSON.parse(xhr.responseText);\n                                if (response.data && response.data.message) {\n                                    errorMsg = response.data.message;\n                                } else if (response.message) {\n                                    errorMsg = response.message;\n                                }\n                            } catch(e) {\n                                \/\/ Response ist kein JSON, verwende Standard-Fehlermeldung\n                                console.error(\"Could not parse error response:\", e);\n                            }\n                        }\n                        $error.text(errorMsg).show();\n                        $btn.prop(\"disabled\", false).text(originalBtnText);\n                    }\n                });\n            });\n\n            \/\/ QR Scanner\n            $(\"#mhp-start-qr-scanner\").on(\"click\", function() {\n                if (isScanning) {\n                    stopQRScanner();\n                } else {\n                    startQRScanner();\n                }\n            });\n\n            function startQRScanner() {\n                var $container = $(\"#mhp-qr-scanner-container\");\n                var $video = document.getElementById(\"mhp-qr-video\");\n                var $error = $(\"#mhp-qr-error\");\n                var $btnText = $(\"#mhp-qr-btn-text\");\n\n                $error.hide();\n\n                \/\/ Load jsQR library if not loaded\n                if (typeof jsQR === \"undefined\") {\n                    var script = document.createElement(\"script\");\n                    script.src = \"https:\/\/cdn.jsdelivr.net\/npm\/jsqr@1.4.0\/dist\/jsQR.min.js\";\n                    script.onload = function() { initScanner(); };\n                    document.head.appendChild(script);\n                } else {\n                    initScanner();\n                }\n\n                function initScanner() {\n                    navigator.mediaDevices.getUserMedia({\n                        video: { facingMode: \"environment\" }\n                    }).then(function(stream) {\n                        $video.srcObject = stream;\n                        $video.play();\n                        $container.show();\n                        $btnText.text(\"' . $qr_stop_text . '\");\n                        isScanning = true;\n                        scanQRCode();\n                    }).catch(function(err) {\n                        $error.text(\"' . $error_camera_msg . '\").show();\n                        console.error(\"Camera error:\", err);\n                    });\n                }\n            }\n\n            function scanQRCode() {\n                var $video = document.getElementById(\"mhp-qr-video\");\n                var canvas = document.createElement(\"canvas\");\n                var ctx = canvas.getContext(\"2d\");\n\n                function tick() {\n                    if (!isScanning) return;\n\n                    if ($video.readyState === $video.HAVE_ENOUGH_DATA) {\n                        canvas.width = $video.videoWidth;\n                        canvas.height = $video.videoHeight;\n                        ctx.drawImage($video, 0, 0, canvas.width, canvas.height);\n\n                        var imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);\n                        var code = jsQR(imageData.data, imageData.width, imageData.height);\n\n                        if (code) {\n                            handleQRCode(code.data);\n                            return;\n                        }\n                    }\n                    requestAnimationFrame(tick);\n                }\n                tick();\n            }\n\n            function handleQRCode(data) {\n                stopQRScanner();\n                $(\"#mhp-qr-success\").text(\"QR-Code erkannt! Wird verarbeitet...\").show();\n\n                \/\/ Versuche URL zu extrahieren oder direkt zu verwenden\n                if (data.startsWith(\"http\")) {\n                    window.location.href = data;\n                } else {\n                    \/\/ Versuche als businesscode:password zu parsen\n                    var parts = data.split(\":\");\n                    if (parts.length >= 2) {\n                        $(\"#mhp-bc-login\").val(parts[0]);\n                        $(\"#mhp-bc-password\").val(parts[1]);\n                        $(\".mhp-login-tab[data-tab=credentials]\").click();\n                        $(\"#mhp-businesscode-login-form\").submit();\n                    } else {\n                        \/\/ Nur businesscode\n                        $(\"#mhp-bc-login\").val(data);\n                        $(\".mhp-login-tab[data-tab=credentials]\").click();\n                        $(\"#mhp-bc-login\").focus();\n                    }\n                }\n            }\n\n            function stopQRScanner() {\n                var $video = document.getElementById(\"mhp-qr-video\");\n                if ($video && $video.srcObject) {\n                    $video.srcObject.getTracks().forEach(function(track) {\n                        track.stop();\n                    });\n                }\n                $(\"#mhp-qr-scanner-container\").hide();\n                $(\"#mhp-qr-btn-text\").text(\"' . $qr_btn_text . '\");\n                isScanning = false;\n            }\n\n            \/\/ Funktion: Zeige Participant ID Login (zweiter Schritt) - DEAKTIVIERT\n            \/\/ Diese Funktion wird nicht mehr verwendet, da wir die neue Landing-Page haben\n            \/\/ Stattdessen wird die Seite neu geladen, damit die neue Landing-Page angezeigt wird\n            window.showParticipantIdLogin = function(businesscode) {\n                \/\/ DEAKTIVIERT: Seite neu laden, damit die neue Landing-Page angezeigt wird\n                window.location.reload();\n                return;\n                \n                \/\/ ALTER CODE (nicht mehr verwendet):\n                \/\/ Verstecke Businesscode-Login Formular\n                $(\"#mhp-tab-credentials\").hide();\n                $(\"#mhp-tab-qrcode\").hide();\n                $(\".mhp-login-tabs\").hide();\n                \n                \/\/ Erstelle Tabs f\u00fcr Participant ID Login\/Register\n                var tabsHtml = \"<div class=\\\"mhp-login-tabs\\\" style=\\\"display: flex; gap: 8px; margin-bottom: 20px;\\\">\" +\n                    \"<button type=\\\"button\\\" class=\\\"mhp-login-tab active\\\" data-tab=\\\"participant-login\\\">Ich habe eine ID<\/button>\" +\n                    \"<button type=\\\"button\\\" class=\\\"mhp-login-tab\\\" data-tab=\\\"participant-register\\\">Neue ID erstellen<\/button>\" +\n                    \"<\/div>\";\n                \n                \/\/ Login Tab\n                var loginTabHtml = \"<div class=\\\"mhp-login-tab-content active\\\" id=\\\"mhp-tab-participant-login\\\">\" +\n                    \"<h3 style=\\\"margin-bottom: 20px;\\\">Schritt 2: Pers\u00f6nliche ID <span style=\\\"font-size: 0.7em; color: #999; font-weight: normal;\\\">v2.1<\/span><\/h3>\" +\n                    \"<p style=\\\"margin-bottom: 20px; color: #666;\\\">Bitte geben Sie Ihre pers\u00f6nliche ID und Ihr Passwort ein.<\/p>\" +\n                    \"<div id=\\\"mhp-participant-passkey-section\\\" class=\\\"mhp-passkey-section\\\" style=\\\"margin-bottom: 20px;\\\">\" +\n                    \"<button type=\\\"button\\\" id=\\\"mhp-participant-passkey-btn\\\" class=\\\"mhp-btn mhp-btn-passkey\\\" style=\\\"width: 100%;\\\">\" +\n                    \"<svg width=\\\"20\\\" height=\\\"20\\\" viewBox=\\\"0 0 24 24\\\" fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-width=\\\"2\\\">\" +\n                    \"<path d=\\\"M12 2a5 5 0 0 1 5 5v3a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2V7a5 5 0 0 1 5-5z\\\"\/>\" +\n                    \"<circle cx=\\\"12\\\" cy=\\\"14\\\" r=\\\"1\\\"\/>\" +\n                    \"<\/svg>\" +\n                    \"Mit Passkey anmelden\" +\n                    \"<\/button>\" +\n                    \"<p class=\\\"mhp-passkey-hint\\\" style=\\\"text-align: center; margin-top: 8px; color: #666; font-size: 14px;\\\">Schnell & sicher - Ihre ID wird automatisch erkannt<\/p>\" +\n                    \"<div class=\\\"mhp-divider\\\" style=\\\"margin: 20px 0;\\\"><span>oder<\/span><\/div>\" +\n                    \"<\/div>\" +\n                    \"<div class=\\\"mhp-form-group\\\">\" +\n                    \"<label for=\\\"mhp-participant-id-input\\\">Ihre pers\u00f6nliche ID:<\/label>\" +\n                    \"<input type=\\\"text\\\" id=\\\"mhp-participant-id-input\\\" class=\\\"mhp-input\\\" placeholder=\\\"MH-XXXX-XXXX\\\" maxlength=\\\"12\\\">\" +\n                    \"<\/div>\" +\n                    \"<div class=\\\"mhp-form-group\\\">\" +\n                    \"<label for=\\\"mhp-participant-password\\\">Passwort:<\/label>\" +\n                    \"<input type=\\\"password\\\" id=\\\"mhp-participant-password\\\" class=\\\"mhp-input\\\" placeholder=\\\"Ihr Passwort\\\" required autocomplete=\\\"current-password\\\" autocapitalize=\\\"off\\\" autocorrect=\\\"off\\\" spellcheck=\\\"false\\\">\" +\n                    \"<\/div>\" +\n                    \"<div id=\\\"mhp-participant-error\\\" class=\\\"mhp-error\\\" style=\\\"display:none;\\\"><\/div>\" +\n                    \"<button type=\\\"button\\\" id=\\\"mhp-participant-login-btn\\\" class=\\\"mhp-btn mhp-btn-primary mhp-btn-full\\\">Anmelden<\/button>\" +\n                    \"<\/div>\";\n                \n                \/\/ Register Tab\n                var registerTabHtml = \"<div class=\\\"mhp-login-tab-content\\\" id=\\\"mhp-tab-participant-register\\\" style=\\\"display: none;\\\">\" +\n                    \"<h3 style=\\\"margin-bottom: 20px;\\\">Schritt 2: Neue pers\u00f6nliche ID erstellen <span style=\\\"font-size: 0.7em; color: #999; font-weight: normal;\\\">v2.1<\/span><\/h3>\" +\n                    \"<div class=\\\"mhp-info-box\\\" style=\\\"background: #f0f9ff; border-left: 4px solid #3b82f6; padding: 1rem; margin-bottom: 1.5rem; border-radius: 4px;\\\">\" +\n                    \"<strong>Was passiert mit meinen Daten?<\/strong>\" +\n                    \"<ul style=\\\"margin: 8px 0 0 0; padding-left: 20px; color: #1e40af; font-size: 0.9rem; line-height: 1.6;\\\">\" +\n                    \"<li>Ihre Antworten werden mit einer anonymen ID verkn\u00fcpft<\/li>\" +\n                    \"<li>Niemand au\u00dfer Ihnen kann Ihre individuellen Daten einsehen<\/li>\" +\n                    \"<li>Ihr Arbeitgeber sieht nur aggregierte Durchschnittswerte<\/li>\" +\n                    \"<li>Sie k\u00f6nnen alle Daten jederzeit vollst\u00e4ndig l\u00f6schen<\/li>\" +\n                    \"<\/ul>\" +\n                    \"<\/div>\" +\n                    \"<div class=\\\"mhp-form-group mhp-email-optional\\\">\" +\n                    \"<label for=\\\"mhp-participant-register-email\\\">Email-Adresse <span class=\\\"mhp-optional-badge\\\" style=\\\"background: #e5e7eb; color: #6b7280; padding: 2px 8px; border-radius: 4px; font-size: 12px;\\\">(optional)<\/span><\/label>\" +\n                    \"<input type=\\\"email\\\" id=\\\"mhp-participant-register-email\\\" class=\\\"mhp-input\\\" placeholder=\\\"ihre.email@beispiel.de\\\" autocomplete=\\\"email\\\">\" +\n                    \"<div class=\\\"mhp-email-info\\\" style=\\\"margin-top: 8px;\\\">\" +\n                    \"<p class=\\\"mhp-form-hint\\\" style=\\\"font-size: 13px; color: #6b7280; margin: 4px 0;\\\"><strong>Mit Email:<\/strong> Sie erhalten Ihre ID per Email und k\u00f6nnen sie bei Verlust wiederherstellen.<\/p>\" +\n                    \"<p class=\\\"mhp-form-hint\\\" style=\\\"font-size: 13px; color: #6b7280; margin: 4px 0;\\\"><strong>Ohne Email:<\/strong> Maximale Anonymit\u00e4t, aber ID muss selbst gespeichert werden.<\/p>\" +\n                    \"<\/div>\" +\n                    \"<\/div>\" +\n                    \"<div class=\\\"mhp-form-group mhp-password-section\\\">\" +\n                    \"<label for=\\\"mhp-participant-register-password\\\">Passwort <span class=\\\"mhp-optional-badge\\\" style=\\\"background: #e5e7eb; color: #6b7280; padding: 2px 8px; border-radius: 4px; font-size: 12px;\\\">(empfohlen)<\/span><\/label>\" +\n                    \"<div class=\\\"mhp-password-input-group\\\" style=\\\"display: flex; gap: 8px;\\\">\" +\n                    \"<input type=\\\"password\\\" id=\\\"mhp-participant-register-password\\\" class=\\\"mhp-input\\\" placeholder=\\\"Mindestens 8 Zeichen\\\" minlength=\\\"8\\\" style=\\\"flex: 1;\\\" autocomplete=\\\"new-password\\\" autocapitalize=\\\"off\\\" autocorrect=\\\"off\\\" spellcheck=\\\"false\\\">\" +\n                    \"<button type=\\\"button\\\" id=\\\"mhp-participant-generate-password\\\" class=\\\"mhp-btn mhp-btn-small mhp-btn-secondary\\\" style=\\\"white-space: nowrap;\\\">Generieren<\/button>\" +\n                    \"<\/div>\" +\n                    \"<div class=\\\"mhp-form-hint\\\" style=\\\"font-size: 13px; color: #6b7280; margin-top: 4px;\\\">Ein starkes Passwort sch\u00fctzt Ihre ID vor unbefugtem Zugriff.<\/div>\" +\n                    \"<\/div>\" +\n                    \"<div class=\\\"mhp-form-group mhp-password-section\\\" id=\\\"mhp-participant-password-confirm-group\\\" style=\\\"display: none;\\\">\" +\n                    \"<label for=\\\"mhp-participant-register-password-confirm\\\">Passwort best\u00e4tigen<\/label>\" +\n                    \"<input type=\\\"password\\\" id=\\\"mhp-participant-register-password-confirm\\\" class=\\\"mhp-input\\\" placeholder=\\\"Passwort wiederholen\\\" autocomplete=\\\"new-password\\\" autocapitalize=\\\"off\\\" autocorrect=\\\"off\\\" spellcheck=\\\"false\\\">\" +\n                    \"<\/div>\" +\n                    \"<div class=\\\"mhp-consent-box\\\" style=\\\"margin: 20px 0;\\\">\" +\n                    \"<label class=\\\"mhp-checkbox-label\\\" style=\\\"display: flex; align-items: flex-start; gap: 8px; cursor: pointer;\\\">\" +\n                    \"<input type=\\\"checkbox\\\" id=\\\"mhp-participant-consent-checkbox\\\" style=\\\"margin-top: 4px; cursor: pointer;\\\">\" +\n                    \"<span style=\\\"font-size: 14px; color: #3D4E60; line-height: 1.5;\\\">Ich stimme zu, dass meine Umfrageantworten mit meiner pers\u00f6nlichen ID verkn\u00fcpft werden, um meinen Verlauf zu verfolgen und personalisierte Empfehlungen zu erhalten. Ich kann diese Einwilligung jederzeit widerrufen und meine Daten l\u00f6schen.<\/span>\" +\n                    \"<\/label>\" +\n                    \"<\/div>\" +\n                    \"<div id=\\\"mhp-participant-register-error\\\" class=\\\"mhp-error\\\" style=\\\"display:none;\\\"><\/div>\" +\n                    \"<button type=\\\"button\\\" id=\\\"mhp-participant-register-btn\\\" class=\\\"mhp-btn mhp-btn-primary mhp-btn-full\\\" disabled>Neue ID erstellen<\/button>\" +\n                    \"<\/div>\";\n                \n                \/\/ Alles zusammenf\u00fcgen\n                var participantIdForm = tabsHtml + loginTabHtml + registerTabHtml;\n                \n                $(\".mhp-login-card\").append(participantIdForm);\n                \n                \/\/ Businesscode in data-Attribut speichern f\u00fcr Registrierung\n                $(\".mhp-login-card\").attr(\"data-businesscode\", businesscode);\n                \n                \/\/ Tab-Switching Handler\n                $(\".mhp-login-tabs .mhp-login-tab\").on(\"click\", function() {\n                    var tab = $(this).data(\"tab\");\n                    $(\".mhp-login-tabs .mhp-login-tab\").removeClass(\"active\");\n                    $(this).addClass(\"active\");\n                    $(\".mhp-login-tab-content\").hide();\n                    $(\"#mhp-tab-\" + tab).show();\n                });\n                \n                \/\/ Passkey-Support pr\u00fcfen\n                if (!window.PublicKeyCredential) {\n                    $(\"#mhp-participant-passkey-section\").hide();\n                }\n                \n                \/\/ Passkey Login Handler - verwendet existierende MHP.loginWithPasskey Funktion\n                \/\/ WICHTIG: Event-Delegation verwenden f\u00fcr WebView-Kompatibilit\u00e4t\n                \/\/ Entferne alte Handler falls vorhanden\n                $(document).off(\"click\", \"#mhp-participant-passkey-btn\");\n                $(document).on(\"click\", \"#mhp-participant-passkey-btn\", async function() {\n                    \/\/ Sicherstellen dass jQuery verf\u00fcgbar ist\n                    if (typeof jQuery === \"undefined\" && typeof $ === \"undefined\") {\n                        console.error(\"MHP: jQuery not available\");\n                        return;\n                    }\n                    \n                    var $btn = $(this);\n                    var $error = $(\"#mhp-participant-error\");\n                    \n                    \/\/ Sicherstellen dass Button existiert\n                    if (!$btn || $btn.length === 0) {\n                        console.error(\"MHP: Passkey button not found\");\n                        return;\n                    }\n                    \n                    $btn.prop(\"disabled\", true).html(\"<svg width=\\\"20\\\" height=\\\"20\\\" viewBox=\\\"0 0 24 24\\\" fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-width=\\\"2\\\" class=\\\"mhp-spin\\\"><circle cx=\\\"12\\\" cy=\\\"12\\\" r=\\\"10\\\"\/><path d=\\\"M12 6v6l4 2\\\"\/><\/svg> Passkey wird \u00fcberpr\u00fcft...\");\n                    if ($error && $error.length > 0) {\n                        $error.hide();\n                    }\n                    \n                    try {\n                        \/\/ Verwende existierende loginWithPasskey Funktion (wenn verf\u00fcgbar)\n                        if (typeof MHP !== \"undefined\" && typeof MHP.loginWithPasskey === \"function\") {\n                            const result = await MHP.loginWithPasskey(\"\", businesscode);\n                            \n                            if (result.success) {\n                                \/\/ Participant ID in Session speichern (f\u00fcr App-Version)\n                                if (result.participant_id) {\n                                    \/\/ Session via AJAX setzen\n                                    $.ajax({\n                                        url: \"' . $ajax_url . '\",\n                                        type: \"POST\",\n                                        data: {\n                                            action: \"mhp_set_participant_session\",\n                                            participant_id: result.participant_id,\n                                            nonce: \"' . $ajax_nonce . '\"\n                                        }\n                                    });\n                                }\n                                \/\/ WICHTIG: Auf derselben Seite bleiben\n                                var redirectUrl = window.mhp_redirect_url || window.location.href;\n                                redirectUrl = redirectUrl.split(\"?\")[0];\n                                window.location.href = redirectUrl;\n                            } else {\n                                $error.text(result.message || \"Passkey-Anmeldung fehlgeschlagen.\").show();\n                                $btn.prop(\"disabled\", false).html(\"<svg width=\\\"20\\\" height=\\\"20\\\" viewBox=\\\"0 0 24 24\\\" fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-width=\\\"2\\\"><path d=\\\"M12 2a5 5 0 0 1 5 5v3a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2V7a5 5 0 0 1 5-5z\\\"\/><circle cx=\\\"12\\\" cy=\\\"14\\\" r=\\\"1\\\"\/><\/svg> Mit Passkey anmelden\");\n                            }\n                        } else {\n                            \/\/ Fallback: Direkter AJAX-Call zu WebAuthn\n                            const startResponse = await $.ajax({\n                                url: \"' . $ajax_url . '\",\n                                type: \"POST\",\n                                data: {\n                                    action: \"mhp_webauthn_login_start\",\n                                    participant_id: \"\",\n                                    businesscode: businesscode,\n                                    nonce: \"' . $ajax_nonce . '\"\n                                }\n                            });\n                            \n                            if (!startResponse.success) {\n                                throw new Error(startResponse.data?.message || \"Fehler beim Starten der Passkey-Anmeldung\");\n                            }\n                            \n                            const options = startResponse.data.options;\n                            const challengeKey = startResponse.data.challenge_key;\n                            \n                            \/\/ WebAuthn API aufrufen\n                            const credential = await navigator.credentials.get({\n                                publicKey: {\n                                    challenge: Uint8Array.from(atob(options.challenge.replace(\/-\/g, \"+\").replace(\/_\/g, \"\/\")), c => c.charCodeAt(0)),\n                                    timeout: options.timeout,\n                                    rpId: options.rpId,\n                                    userVerification: options.userVerification,\n                                    allowCredentials: options.allowCredentials ? options.allowCredentials.map(cred => ({\n                                        type: cred.type,\n                                        id: Uint8Array.from(atob(cred.id.replace(\/-\/g, \"+\").replace(\/_\/g, \"\/\")), c => c.charCodeAt(0)),\n                                        transports: cred.transports\n                                    })) : undefined\n                                }\n                            });\n                            \n                            \/\/ Login abschlie\u00dfen\n                            const finishResponse = await $.ajax({\n                                url: \"' . $ajax_url . '\",\n                                type: \"POST\",\n                                data: {\n                                    action: \"mhp_webauthn_login_finish\",\n                                    challenge_key: challengeKey,\n                                    credential: JSON.stringify({\n                                        id: credential.id,\n                                        rawId: btoa(String.fromCharCode(...new Uint8Array(credential.rawId))),\n                                        response: {\n                                            clientDataJSON: btoa(String.fromCharCode(...new Uint8Array(credential.response.clientDataJSON))),\n                                            authenticatorData: btoa(String.fromCharCode(...new Uint8Array(credential.response.authenticatorData))),\n                                            signature: btoa(String.fromCharCode(...new Uint8Array(credential.response.signature))),\n                                            userHandle: credential.response.userHandle ? btoa(String.fromCharCode(...new Uint8Array(credential.response.userHandle))) : null\n                                        },\n                                        type: credential.type\n                                    }),\n                                    nonce: \"' . $ajax_nonce . '\"\n                                }\n                            });\n                            \n                            if (finishResponse.success) {\n                                \/\/ Participant ID in Session speichern (f\u00fcr App-Version)\n                                if (finishResponse.data.participant_id) {\n                                    \/\/ Session via AJAX setzen\n                                    $.ajax({\n                                        url: \"' . $ajax_url . '\",\n                                        type: \"POST\",\n                                        data: {\n                                            action: \"mhp_set_participant_session\",\n                                            participant_id: finishResponse.data.participant_id,\n                                            nonce: \"' . $ajax_nonce . '\"\n                                        }\n                                    });\n                                }\n                                \/\/ WICHTIG: Auf derselben Seite bleiben\n                                var redirectUrl = window.mhp_redirect_url || window.location.href;\n                                redirectUrl = redirectUrl.split(\"?\")[0];\n                                window.location.href = redirectUrl;\n                            } else {\n                                throw new Error(finishResponse.data?.message || \"Passkey-Verifizierung fehlgeschlagen\");\n                            }\n                        }\n                    } catch (error) {\n                        console.error(\"Passkey login error:\", error);\n                        if ($error && $error.length > 0) {\n                            $error.text(error.message || \"Passkey-Anmeldung fehlgeschlagen.\").show();\n                        }\n                        if ($btn && $btn.length > 0) {\n                            $btn.prop(\"disabled\", false).html(\"<svg width=\\\"20\\\" height=\\\"20\\\" viewBox=\\\"0 0 24 24\\\" fill=\\\"none\\\" stroke=\\\"currentColor\\\" stroke-width=\\\"2\\\"><path d=\\\"M12 2a5 5 0 0 1 5 5v3a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2v-5a2 2 0 0 1 2-2V7a5 5 0 0 1 5-5z\\\"\/><circle cx=\\\"12\\\" cy=\\\"14\\\" r=\\\"1\\\"\/><\/svg> Mit Passkey anmelden\");\n                        }\n                    }\n                });\n                \n                \/\/ Participant ID Login Handler (mit Passwort)\n                $(\"#mhp-participant-login-btn\").on(\"click\", function() {\n                    var participantId = $(\"#mhp-participant-id-input\").val().trim().toUpperCase();\n                    var password = $(\"#mhp-participant-password\").val();\n                    var $error = $(\"#mhp-participant-error\");\n                    var $btn = $(this);\n                    \n                    if (!participantId) {\n                        $error.text(\"Bitte geben Sie eine pers\u00f6nliche ID ein.\").show();\n                        return;\n                    }\n                    \n                    if (!participantId.match(\/^MH-[A-Z0-9]{4}-[A-Z0-9]{4}$\/)) {\n                        $error.text(\"Bitte geben Sie eine g\u00fcltige pers\u00f6nliche ID ein (Format: MH-XXXX-XXXX)\").show();\n                        return;\n                    }\n                    \n                    if (!password) {\n                        $error.text(\"Bitte geben Sie Ihr Passwort ein.\").show();\n                        return;\n                    }\n                    \n                    $btn.prop(\"disabled\", true).text(\"...\");\n                    $error.hide();\n                    \n                    \/\/ Verifiziere Participant ID\n                    $.ajax({\n                        url: \"' . $ajax_url . '\",\n                        type: \"POST\",\n                        data: {\n                            action: \"mhp_verify_participant\",\n                            participant_id: participantId,\n                            password: password,\n                            dashboard_type: \"employee\",\n                            nonce: \"' . $ajax_nonce . '\"\n                        },\n                        success: function(response) {\n                            if (response.success) {\n                                \/\/ Participant ID in Session speichern (nicht in User Meta!)\n                                \/\/ Cookie wird bereits von ajax_verify_participant gesetzt\n                                \/\/ WICHTIG: Auf derselben Seite bleiben - verwende gespeicherte redirect_url oder aktuelle Seite\n                                var redirectUrl = window.mhp_redirect_url || window.location.href;\n                                \/\/ Entferne m\u00f6gliche Query-Parameter die den Login-Status beeinflussen k\u00f6nnten\n                                redirectUrl = redirectUrl.split(\"?\")[0];\n                                window.location.href = redirectUrl;\n                            } else {\n                                $error.text(response.data.message || \"Ung\u00fcltige pers\u00f6nliche ID oder Passwort.\").show();\n                                $btn.prop(\"disabled\", false).text(\"Anmelden\");\n                            }\n                        },\n                        error: function() {\n                            $error.text(\"Verbindungsfehler. Bitte versuchen Sie es erneut.\").show();\n                            $btn.prop(\"disabled\", false).text(\"Anmelden\");\n                        }\n                    });\n                });\n                \n                \/\/ Passwort-Feld Toggle f\u00fcr Registrierung\n                $(\"#mhp-participant-register-password\").on(\"input\", function() {\n                    var password = $(this).val();\n                    if (password.length > 0) {\n                        $(\"#mhp-participant-password-confirm-group\").show();\n                    } else {\n                        $(\"#mhp-participant-password-confirm-group\").hide();\n                    }\n                });\n                \n                \/\/ Consent Checkbox Handler\n                $(\"#mhp-participant-consent-checkbox\").on(\"change\", function() {\n                    $(\"#mhp-participant-register-btn\").prop(\"disabled\", !$(this).is(\":checked\"));\n                });\n                \n                \/\/ Passwort generieren Button\n                $(\"#mhp-participant-generate-password\").on(\"click\", function() {\n                    var chars = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*\";\n                    var password = \"\";\n                    for (var i = 0; i < 16; i++) {\n                        password += chars.charAt(Math.floor(Math.random() * chars.length));\n                    }\n                    $(\"#mhp-participant-register-password\").val(password);\n                    $(\"#mhp-participant-register-password-confirm\").val(password);\n                    $(\"#mhp-participant-password-confirm-group\").show();\n                });\n                \n                \/\/ Registrierung Handler - Event-Delegation f\u00fcr WebView-Kompatibilit\u00e4t\n                $(document).off(\"click\", \"#mhp-participant-register-btn\");\n                $(document).on(\"click\", \"#mhp-participant-register-btn\", function() {\n                    \/\/ Sicherstellen dass jQuery verf\u00fcgbar ist\n                    if (typeof jQuery === \"undefined\" && typeof $ === \"undefined\") {\n                        console.error(\"MHP: jQuery not available\");\n                        return;\n                    }\n                    \n                    var $btn = $(this);\n                    var $error = $(\"#mhp-participant-register-error\");\n                    \n                    \/\/ Sicherstellen dass Button existiert\n                    if (!$btn || $btn.length === 0) {\n                        console.error(\"MHP: Register button not found\");\n                        return;\n                    }\n                    var email = $(\"#mhp-participant-register-email\").val().trim();\n                    var password = $(\"#mhp-participant-register-password\").val();\n                    var passwordConfirm = $(\"#mhp-participant-register-password-confirm\").val();\n                    \/\/ Businesscode wird vom Server aus dem eingeloggten User geholt (kein Hash n\u00f6tig)\n                    \n                    \/\/ Validierung\n                    if (password && password.length < 8) {\n                        if ($error && $error.length > 0) {\n                            $error.text(\"Das Passwort muss mindestens 8 Zeichen lang sein.\").show();\n                        }\n                        return;\n                    }\n                    if (password && password !== passwordConfirm) {\n                        if ($error && $error.length > 0) {\n                            $error.text(\"Die Passw\u00f6rter stimmen nicht \u00fcberein.\").show();\n                        }\n                        return;\n                    }\n                    \n                    if ($btn && $btn.length > 0) {\n                        $btn.prop(\"disabled\", true).text(\"...\");\n                    }\n                    if ($error && $error.length > 0) {\n                        $error.hide();\n                    }\n                    \n                    $.ajax({\n                        url: \"' . $ajax_url . '\",\n                        type: \"POST\",\n                        data: {\n                            action: \"mhp_create_participant\",\n                            nonce: \"' . $ajax_nonce . '\",\n                            email: email,\n                            password: password,\n                            password_confirm: passwordConfirm\n                        },\n                        success: function(response) {\n                            if (response.success) {\n                                \/\/ Participant ID in Session speichern\n                                var participantId = response.data.participant_id;\n                                $.ajax({\n                                    url: \"' . $ajax_url . '\",\n                                    type: \"POST\",\n                                    data: {\n                                        action: \"mhp_set_participant_session\",\n                                        participant_id: participantId,\n                                        nonce: \"' . $ajax_nonce . '\"\n                                    }\n                                });\n                                \n                                \/\/ Weiterleitung\n                                var redirectUrl = window.mhp_redirect_url || window.location.href;\n                                redirectUrl = redirectUrl.split(\"?\")[0];\n                                window.location.href = redirectUrl;\n                            } else {\n                                if ($error && $error.length > 0) {\n                                    $error.text(response.data.message || \"Fehler beim Erstellen der ID\").show();\n                                }\n                                if ($btn && $btn.length > 0) {\n                                    $btn.prop(\"disabled\", false).text(\"Neue ID erstellen\");\n                                }\n                            }\n                        },\n                        error: function() {\n                            if ($error && $error.length > 0) {\n                                $error.text(\"Verbindungsfehler. Bitte versuchen Sie es erneut.\").show();\n                            }\n                            if ($btn && $btn.length > 0) {\n                                $btn.prop(\"disabled\", false).text(\"Neue ID erstellen\");\n                            }\n                        }\n                    });\n                });\n            }\n            \n            \/\/ Neue Funktionen f\u00fcr vereinfachte Landing-Page\n            window.mhpShowBookingOnly = function() {\n                $(\".mhp-landing-options\").hide();\n                $(\"#mhp-booking-only-section\").fadeIn();\n                \n                \/\/ Warte bis Bookly-Formular geladen ist, dann:\n                \/\/ 1. E-Mail-Feld leeren (aber sichtbar lassen)\n                \/\/ 2. Participant-ID ausblenden\n                \/\/ 3. Telefonnummer bleibt sichtbar (wird nicht ausgeblendet)\n                \/\/ 4. Name-Feld readonly setzen (wenn eingeloggt)\n                \/\/ 5. Hybrid Contingent mit Consent initialisieren\n                const initBookingOnlyForm = function() {\n                    const $bookingForm = $('#mhp-bookly-booking-only .bookly-form');\n                    \n                    if ($bookingForm.length > 0) {\n                        \/\/ E-Mail-Feld leeren (aber NICHT ausblenden)\n                        const $emailField = $bookingForm.find('input[type=\"email\"], input[name*=\"email\"], .bookly-js-user-email');\n                        if ($emailField.length > 0) {\n                            $emailField.val('');\n                            $emailField.attr('autocomplete', 'off');\n                            $emailField.attr('placeholder', 'Ihre E-Mail-Adresse');\n                        }\n                        \n                        \/\/ Participant-ID ausblenden (Custom Field und Hidden Inputs)\n                        $bookingForm.find('input[name*=\"[19574]\"], input[name*=\"participant\"], input[name=\"mhp_participant_id\"]').closest('.bookly-form-group, .form-group, tr, div').hide();\n                        $bookingForm.find('label:contains(\"Participant ID\"), label:contains(\"ID\")').closest('.bookly-form-group, .form-group, tr, div').hide();\n                        \n                        \/\/ Name-Feld readonly setzen (wenn eingeloggt)\n                        const isLoggedIn = document.body.classList.contains('logged-in');\n                        if (isLoggedIn) {\n                            const nameInput = $bookingForm.find('input.bookly-js-full-name')[0];\n                            if (nameInput && !nameInput.hasAttribute('readonly')) {\n                                nameInput.setAttribute('readonly', 'true');\n                                \n                                \/\/ Watch f\u00fcr dynamische \u00c4nderungen\n                                const nameWatcher = new MutationObserver(function() {\n                                    if (!nameInput.hasAttribute('readonly')) {\n                                        nameInput.setAttribute('readonly', 'true');\n                                    }\n                                });\n                                \n                                nameWatcher.observe(nameInput, {\n                                    attributes: true,\n                                    attributeFilter: ['readonly']\n                                });\n                            }\n                        }\n                    }\n                };\n                \n                \/\/ Sofort versuchen\n                setTimeout(initBookingOnlyForm, 500);\n                \n                \/\/ MutationObserver f\u00fcr dynamisch geladenes Formular\n                const observer = new MutationObserver(function(mutations) {\n                    mutations.forEach(function(mutation) {\n                        if (mutation.addedNodes.length) {\n                            setTimeout(initBookingOnlyForm, 200);\n                        }\n                    });\n                });\n                \n                const bookingSection = document.getElementById('mhp-bookly-booking-only');\n                if (bookingSection) {\n                    observer.observe(bookingSection, {\n                        childList: true,\n                        subtree: true\n                    });\n                }\n                \n                \/\/ Auch bei Bookly-Events\n                $(document).on('bookly.render bookly.step', function() {\n                    setTimeout(initBookingOnlyForm, 300);\n                });\n                \n                \/\/ Hybrid Contingent mit Consent initialisieren (nur f\u00fcr dieses Formular)\n                setTimeout(function() {\n                    initBookingOnlyHybridContingent();\n                }, 1000);\n            };\n            \n            \/\/ Hybrid Contingent mit Consent - NUR f\u00fcr \"Nur Beratung buchen\" Formular\n            function initBookingOnlyHybridContingent() {\n                const bookingForm = document.querySelector('#mhp-bookly-booking-only .bookly-form');\n                if (!bookingForm) {\n                    return;\n                }\n                \n                const isLoggedIn = document.body.classList.contains('logged-in');\n                if (!isLoggedIn) {\n                    return;\n                }\n                \n                \/\/ Pr\u00fcfe ob mvHrHybridContingent verf\u00fcgbar ist\n                if (typeof window.mvHrHybridContingent === 'undefined') {\n                    return;\n                }\n                \n                try {\n                    const hybridContingentChecker = new HybridContingentWithConsent(bookingForm);\n                    \n                    \/\/ NEU: Bookly Step Listener f\u00fcr Reset nach erfolgreicher Buchung\n                    setupBooklyResetAfterBooking(bookingForm, hybridContingentChecker);\n                } catch (error) {\n                    console.error('MHP: Fehler beim Initialisieren des Hybrid Contingent Checkers:', error);\n                }\n            }\n            \n            \/\/ NEU: Funktion zum Zur\u00fccksetzen der Felder nach Buchung\n            function resetFieldsAfterBooking(bookingForm, hybridContingentChecker) {\n                console.log('[MHP] ===== RESET NACH BUCHUNG START =====');\n                \n                \/\/ 1. Email-Feld leeren\n                const emailInput = bookingForm.querySelector('input.bookly-js-user-email');\n                if (emailInput) {\n                    const oldValue = emailInput.value;\n                    emailInput.value = '';\n                    console.log('[MHP] \u2713 Email-Feld geleert:', oldValue, '\u2192 \"\"');\n                }\n                \n                \/\/ 2. Telefon-Feld ausblenden\n                const phoneInput = bookingForm.querySelector('.bookly-js-user-phone-input');\n                if (phoneInput) {\n                    const group = phoneInput.closest('.bookly-form-group');\n                    if (group) {\n                        group.style.setProperty('display', 'none', 'important');\n                        console.log('[MHP] \u2713 Telefon-Feld ausgeblendet');\n                    }\n                }\n                \n                \/\/ 3. Kontingent-Checker zur\u00fccksetzen\n                if (hybridContingentChecker) {\n                    try {\n                        hybridContingentChecker.resetToMonthlyBudgetState();\n                        console.log('[MHP] \u2713 Kontingent-Checker zur\u00fcckgesetzt');\n                    } catch (error) {\n                        console.error('[MHP] \u2717 Fehler beim Reset des Kontingent-Checkers:', error);\n                    }\n                }\n                \n                console.log('[MHP] ===== RESET NACH BUCHUNG ENDE =====');\n            }\n            \n            \/\/ NEU: Bookly Step Event Listener Setup\n            function setupBooklyResetAfterBooking(bookingForm, hybridContingentChecker) {\n                let bookingCompleted = false;\n                \n                const handleBooklyStep = function(e, step) {\n                    \/\/ Step aus verschiedenen Quellen extrahieren\n                    if (!step && e && e.detail && e.detail.step) {\n                        step = e.detail.step;\n                    }\n                    if (!step && e && e.originalEvent && e.originalEvent.detail && e.originalEvent.detail.step) {\n                        step = e.originalEvent.detail.step;\n                    }\n                    \n                    console.log('[MHP] Bookly Step erkannt:', step);\n                    \n                    if (step === 'done' || step === 'complete') {\n                        if (bookingCompleted) {\n                            return; \/\/ Bereits behandelt\n                        }\n                        \n                        bookingCompleted = true;\n                        console.log('[MHP] Buchung abgeschlossen - Reset wird ausgef\u00fchrt');\n                        \n                        \/\/ Reset nach 500ms\n                        setTimeout(function() {\n                            resetFieldsAfterBooking(bookingForm, hybridContingentChecker);\n                        }, 500);\n                        \n                        \/\/ Sicherheitshalber nochmal nach 2 Sekunden\n                        setTimeout(function() {\n                            resetFieldsAfterBooking(bookingForm, hybridContingentChecker);\n                        }, 2000);\n                    }\n                };\n                \n                \/\/ Methode 1: jQuery Event Listeners\n                if (typeof jQuery !== 'undefined') {\n                    jQuery(document).on('bookly.step', handleBooklyStep);\n                    jQuery(window).on('bookly.step', handleBooklyStep);\n                    console.log('[MHP] jQuery Event Listener f\u00fcr Reset registriert');\n                }\n                \n                \/\/ Methode 2: Native Event Listeners\n                try {\n                    document.addEventListener('bookly.step', handleBooklyStep);\n                    window.addEventListener('bookly.step', handleBooklyStep);\n                    console.log('[MHP] Native Event Listener f\u00fcr Reset registriert');\n                } catch (error) {\n                    console.error('[MHP] Fehler beim Native Event Listener:', error);\n                }\n                \n                \/\/ Methode 3: Polling-Fallback\n                let lastFormState = '';\n                const pollInterval = setInterval(function() {\n                    if (!bookingForm) {\n                        clearInterval(pollInterval);\n                        return;\n                    }\n                    \n                    \/\/ Pr\u00fcfe auf \"Done\" oder \"Complete\" Indikatoren\n                    const doneIndicators = [\n                        '.bookly-step-done',\n                        '.bookly-done',\n                        '.bookly-complete-step',\n                        '[class*=\"bookly-done\"]',\n                        '[data-step=\"done\"]',\n                        '[data-step=\"complete\"]',\n                        '.bookly-success-message'\n                    ];\n                    \n                    let isDone = false;\n                    for (let i = 0; i < doneIndicators.length; i++) {\n                        if (bookingForm.querySelector(doneIndicators[i])) {\n                            isDone = true;\n                            break;\n                        }\n                    }\n                    \n                    \/\/ Auch nach Text suchen\n                    const formText = bookingForm.textContent || '';\n                    if (formText.indexOf('erfolgreich') !== -1 || \n                        formText.indexOf('success') !== -1 || \n                        formText.indexOf('best\u00e4tigt') !== -1 ||\n                        formText.indexOf('confirmed') !== -1) {\n                        isDone = true;\n                    }\n                    \n                    const currentState = isDone ? 'done' : 'active';\n                    \n                    if (currentState === 'done' && lastFormState !== 'done' && !bookingCompleted) {\n                        console.log('[MHP] Buchung \u00fcber Polling erkannt - Reset wird ausgef\u00fchrt');\n                        lastFormState = 'done';\n                        bookingCompleted = true;\n                        \n                        setTimeout(function() {\n                            resetFieldsAfterBooking(bookingForm, hybridContingentChecker);\n                        }, 500);\n                        \n                        setTimeout(function() {\n                            resetFieldsAfterBooking(bookingForm, hybridContingentChecker);\n                        }, 2000);\n                    } else if (currentState === 'active') {\n                        lastFormState = 'active';\n                    }\n                }, 1000);\n                \n                \/\/ Stoppe Polling nach 5 Minuten\n                setTimeout(function() {\n                    clearInterval(pollInterval);\n                    console.log('[MHP] Polling gestoppt');\n                }, 300000);\n                \n                console.log('[MHP] Bookly Step Listener + Polling Fallback f\u00fcr Reset registriert');\n            }\n            \n            \/\/ Hybrid Contingent Klasse (nur f\u00fcr \"Nur Beratung buchen\" Formular)\n            class HybridContingentWithConsent {\n                constructor(booklyForm) {\n                    this.booklyForm = booklyForm;\n                    this.currentEmail = '';\n                    this.emailInput = null;\n                    this.isFormBlocked = false;\n                    this.blockReason = null;\n                    this.emailTimeout = null;\n                    this.consentGiven = false;\n                    this.mode = null;\n                    \n                    if (typeof window.mvHrHybridContingent === 'undefined') {\n                        return;\n                    }\n                    \n                    this.mode = window.mvHrHybridContingent.mode || 'disabled';\n                    this.init();\n                }\n                \n                init() {\n                    try {\n                        if (this.mode === 'user_limit') {\n                            this.showUserLimitConsent();\n                        } else {\n                            this.checkMonthlyBudgetFirst();\n                            this.findEmailInput();\n                            this.setupEmailMonitoring();\n                        }\n                    } catch (error) {\n                        console.error('MHP: Fehler in HybridContingentWithConsent.init():', error);\n                    }\n                }\n                \n                showUserLimitConsent() {\n                    this.booklyForm.style.display = 'none';\n                    \n                    const limit = window.mvHrHybridContingent.userLimit || 3;\n                    const periodKey = (window.mvHrHybridContingent.userLimitPeriod === 'year' || window.mvHrHybridContingent.userLimitPeriod === 'Jahr') ? 'year' : 'month';\n                    const currentLang = document.documentElement.lang.substring(0, 2) || 'de';\n                    const translations = {\n                        de: {\n                            consent_title: 'Beratungskontingent',\n                            consent_text: 'Ihr Unternehmen stellt Ihnen <strong style=\"color: #6b4e47;\">{limit} kostenfreie Beratungsgespr\u00e4che<\/strong> pro {period} zur Verf\u00fcgung.',\n                            consent_info: 'Weitere Termine \u00fcber das Kontingent hinaus k\u00f6nnen auf eigene Rechnung gebucht werden. Melden Sie sich in diesem Fall an <a href=\"mailto:mental@mindvise.de\" style=\"color: #BA918A; text-decoration: none; border-bottom: 1px solid #BA918A; font-weight: 500;\">mental@mindvise.de<\/a>',\n                            consent_checkbox: 'Ich habe die Information zur Kenntnis genommen',\n                            consent_button: 'Zur Terminbuchung \u2192',\n                            month: 'Monat',\n                            year: 'Jahr'\n                        },\n                        en: {\n                            consent_title: 'Counseling Contingent',\n                            consent_text: 'Your company provides you with <strong style=\"color: #6b4e47;\">{limit} free counseling sessions<\/strong> per {period}.',\n                            consent_info: 'Additional appointments beyond the contingent can be booked at your own expense. In this case, please contact <a href=\"mailto:mental@mindvise.de\" style=\"color: #BA918A; text-decoration: none; border-bottom: 1px solid #BA918A; font-weight: 500;\">mental@mindvise.de<\/a>',\n                            consent_checkbox: 'I have acknowledged this information',\n                            consent_button: 'Proceed to booking \u2192',\n                            month: 'month',\n                            year: 'year'\n                        }\n                    };\n                    \n                    const t = function(key) {\n                        return translations[currentLang]?.[key] || translations['de'][key] || key;\n                    };\n                    \n                    const zeitraum = t(periodKey);\n                    \n                    if (!document.querySelector('link[href*=\"Roboto+Slab\"]')) {\n                        const link = document.createElement('link');\n                        link.href = 'https:\/\/fonts.googleapis.com\/css2?family=Roboto+Slab:wght@300;400;500;600&display=swap';\n                        link.rel = 'stylesheet';\n                        document.head.appendChild(link);\n                    }\n                    \n                    const consentDiv = document.createElement('div');\n                    consentDiv.className = 'mv-user-limit-consent';\n                    consentDiv.innerHTML = `\n                        <div style=\"\n                            max-width: 600px;\n                            margin: 30px auto;\n                            background: linear-gradient(135deg, #f5f2f0 0%, #ede7e3 100%);\n                            border: 1px solid #d4c5be;\n                            border-radius: 12px;\n                            box-shadow: 0 3px 12px rgba(186, 145, 138, 0.15);\n                            overflow: hidden;\n                        \">\n                            <div style=\"\n                                background: linear-gradient(135deg, #BA918A 0%, #a8807a 100%);\n                                color: white;\n                                padding: 30px;\n                                text-align: center;\n                            \">\n                                <h2 style=\"\n                                    margin: 0;\n                                    font-size: 24px;\n                                    font-weight: 500;\n                                    font-family: 'Roboto Slab', Georgia, serif;\n                                    letter-spacing: 0.3px;\n                                \">${t('consent_title')}<\/h2>\n                            <\/div>\n                            \n                            <div style=\"padding: 30px; background: #fff;\">\n                                <p style=\"\n                                    font-size: 16px;\n                                    line-height: 1.7;\n                                    color: #5d4e47;\n                                    margin-bottom: 20px;\n                                    font-family: 'Roboto Slab', Georgia, serif;\n                                \">\n                                    ${t('consent_text').replace('{limit}', limit).replace('{period}', zeitraum)}\n                                <\/p>\n                                \n                                <p style=\"\n                                    font-size: 14px;\n                                    line-height: 1.7;\n                                    color: #5d4e47;\n                                    background: linear-gradient(135deg, #f5f2f0 0%, #ede7e3 100%);\n                                    padding: 18px;\n                                    border-radius: 8px;\n                                    border-left: 4px solid #BA918A;\n                                    margin-bottom: 25px;\n                                    font-family: 'Roboto Slab', Georgia, serif;\n                                \">\n                                    ${t('consent_info')}\n                                <\/p>\n                                \n                                <label style=\"\n                                    display: flex;\n                                    align-items: flex-start;\n                                    gap: 12px;\n                                    margin-bottom: 20px;\n                                    cursor: pointer;\n                                    font-size: 14px;\n                                    line-height: 1.6;\n                                    color: #5d4e47;\n                                    font-family: 'Roboto Slab', Georgia, serif;\n                                \">\n                                    <input type=\"checkbox\" id=\"mv-consent-checkbox\" style=\"\n                                        margin-top: 3px;\n                                        width: 20px;\n                                        height: 20px;\n                                        cursor: pointer;\n                                        accent-color: #BA918A;\n                                    \">\n                                    <span>${t('consent_checkbox')}<\/span>\n                                <\/label>\n                                \n                                <button id=\"mv-consent-button\" disabled style=\"\n                                    width: 100%;\n                                    padding: 16px;\n                                    background: linear-gradient(135deg, #BA918A 0%, #a8807a 100%);\n                                    color: white;\n                                    border: none;\n                                    border-radius: 8px;\n                                    font-size: 16px;\n                                    font-weight: 500;\n                                    cursor: not-allowed;\n                                    opacity: 0.5;\n                                    transition: all 0.3s;\n                                    font-family: 'Roboto Slab', Georgia, serif;\n                                    letter-spacing: 0.3px;\n                                \">${t('consent_button')}<\/button>\n                            <\/div>\n                        <\/div>\n                    `;\n                    \n                    this.booklyForm.parentNode.insertBefore(consentDiv, this.booklyForm);\n                    \n                    const checkbox = document.getElementById('mv-consent-checkbox');\n                    const button = document.getElementById('mv-consent-button');\n                    const self = this;\n                    \n                    if (checkbox && button) {\n                        button.addEventListener('mouseenter', function() {\n                            if (!this.disabled) {\n                                this.style.transform = 'translateY(-2px)';\n                                this.style.boxShadow = '0 4px 12px rgba(186, 145, 138, 0.4)';\n                            }\n                        });\n                        \n                        button.addEventListener('mouseleave', function() {\n                            this.style.transform = 'translateY(0)';\n                            this.style.boxShadow = 'none';\n                        });\n                        \n                        checkbox.addEventListener('change', function() {\n                            if (checkbox.checked) {\n                                button.disabled = false;\n                                button.style.cursor = 'pointer';\n                                button.style.opacity = '1';\n                            } else {\n                                button.disabled = true;\n                                button.style.cursor = 'not-allowed';\n                                button.style.opacity = '0.5';\n                            }\n                        });\n                        \n                        button.addEventListener('click', function() {\n                            if (checkbox.checked) {\n                                self.consentGiven = true;\n                                consentDiv.remove();\n                                self.booklyForm.style.display = '';\n                                \n                                self.checkMonthlyBudgetFirst();\n                                self.findEmailInput();\n                                self.setupEmailMonitoring();\n                            }\n                        });\n                    }\n                }\n                \n                checkMonthlyBudgetFirst() {\n                    if (this.mode !== 'monthly_budget') {\n                        return;\n                    }\n                    \n                    if (window.mvHrHybridContingent.budgetExceeded) {\n                        const currentLang = document.documentElement.lang.substring(0, 2) || 'de';\n                        const title = currentLang === 'en' ? 'Monthly Budget Reached' : 'Monatsbudget erreicht';\n                        this.blockForm('budget', window.mvHrHybridContingent.budgetMessage, title);\n                    }\n                }\n                \n                findEmailInput() {\n                    const selectors = [\n                        'input[type=\"email\"]',\n                        'input[name=\"email\"]', \n                        'input.bookly-js-user-email',\n                        'input[name=\"user_email\"]',\n                        'input[id*=\"email\"]'\n                    ];\n                    \n                    for (const selector of selectors) {\n                        const input = this.booklyForm.querySelector(selector);\n                        if (input) {\n                            this.emailInput = input;\n                            break;\n                        }\n                    }\n                }\n                \n                setupEmailMonitoring() {\n                    if (!this.emailInput) {\n                        return;\n                    }\n                    \n                    if (this.mode === 'monthly_budget' && window.mvHrHybridContingent.budgetExceeded) {\n                        return;\n                    }\n                    \n                    try {\n                        this.emailInput.addEventListener('input', (e) => this.handleEmailInput(e));\n                        this.emailInput.addEventListener('change', (e) => this.handleEmailInput(e));\n                        this.emailInput.addEventListener('blur', (e) => this.handleEmailInput(e));\n                        \n                        if (this.emailInput.value.trim()) {\n                            this.handleEmailInput({ target: this.emailInput });\n                        }\n                    } catch (error) {\n                        console.error('MHP: Fehler beim Setup Email Monitoring:', error);\n                    }\n                }\n                \n                handleEmailInput(event) {\n                    const email = event.target.value.trim();\n                    \n                    try {\n                        clearTimeout(this.emailTimeout);\n                        this.emailTimeout = setTimeout(() => {\n                            this.checkHybridContingent(email);\n                        }, 500);\n                    } catch (error) {\n                        console.error('MHP: Fehler in handleEmailInput:', error);\n                    }\n                }\n                \n                checkHybridContingent(email) {\n                    if (!email || !this.isValidEmail(email)) {\n                        this.resetToMonthlyBudgetState();\n                        return;\n                    }\n                    \n                    if (email === this.currentEmail) {\n                        return;\n                    }\n                    \n                    try {\n                        const contingentResult = window.mvHrHybridContingent.checkContingent(email);\n                        this.currentEmail = email;\n                        \n                        if (!contingentResult.canBook) {\n                            const currentLang = document.documentElement.lang.substring(0, 2) || 'de';\n                            let title = currentLang === 'en' ? 'Contingent Not Available' : 'Kontingent nicht verf\u00fcgbar';\n                            switch(contingentResult.reason) {\n                                case 'budget':\n                                    title = currentLang === 'en' ? 'Monthly Budget Reached' : 'Monatsbudget erreicht';\n                                    break;\n                                case 'user_limit':\n                                    title = currentLang === 'en' ? 'Your Personal Contingent Reached' : 'Ihr pers\u00f6nliches Kontingent erreicht';\n                                    break;\n                            }\n                            this.blockForm(contingentResult.reason, contingentResult.message, title);\n                        } else {\n                            this.unblockForm();\n                        }\n                        \n                    } catch (error) {\n                        this.resetToMonthlyBudgetState();\n                    }\n                }\n                \n                blockForm(reason, message, title) {\n                    if (this.isFormBlocked && this.blockReason === reason) {\n                        return;\n                    }\n                    \n                    this.hideFormWithMessage(message, title);\n                    this.isFormBlocked = true;\n                    this.blockReason = reason;\n                }\n                \n                unblockForm() {\n                    if (!this.isFormBlocked) {\n                        return;\n                    }\n                    \n                    this.showForm();\n                    this.isFormBlocked = false;\n                    this.blockReason = null;\n                }\n                \n                resetToMonthlyBudgetState() {\n                    this.currentEmail = '';\n                    \n                    if (this.mode === 'monthly_budget' && window.mvHrHybridContingent && window.mvHrHybridContingent.budgetExceeded) {\n                        const currentLang = document.documentElement.lang.substring(0, 2) || 'de';\n                        const title = currentLang === 'en' ? 'Monthly Budget Reached' : 'Monatsbudget erreicht';\n                        this.blockForm('budget', window.mvHrHybridContingent.budgetMessage, title);\n                    } else {\n                        this.unblockForm();\n                    }\n                }\n                \n                hideFormWithMessage(message, title) {\n                    this.booklyForm.style.display = 'none';\n                    \n                    if (!document.querySelector('link[href*=\"Roboto+Slab\"]')) {\n                        const link = document.createElement('link');\n                        link.href = 'https:\/\/fonts.googleapis.com\/css2?family=Roboto+Slab:wght@300;400;500;600&display=swap';\n                        link.rel = 'stylesheet';\n                        document.head.appendChild(link);\n                    }\n                    \n                    this.removeMessage();\n                    \n                    const messageDiv = document.createElement('div');\n                    messageDiv.className = 'mv-hybrid-warning-message';\n                    messageDiv.innerHTML = `\n                        <div style=\"\n                            background: linear-gradient(135deg, #f5f2f0 0%, #ede7e3 100%);\n                            border: 1px solid #d4c5be;\n                            border-left: 4px solid #BA918A;\n                            padding: 32px;\n                            border-radius: 12px;\n                            margin: 24px 0;\n                            font-family: 'Roboto Slab', Georgia, serif;\n                            box-shadow: 0 3px 12px rgba(186, 145, 138, 0.15);\n                            max-width: 600px;\n                        \">\n                            <div style=\"display: flex; align-items: flex-start; gap: 20px;\">\n                                <div style=\"\n                                    background: #BA918A;\n                                    color: white;\n                                    border-radius: 50%;\n                                    width: 32px;\n                                    height: 32px;\n                                    display: flex;\n                                    align-items: center;\n                                    justify-content: center;\n                                    font-size: 16px;\n                                    font-weight: 600;\n                                    flex-shrink: 0;\n                                    margin-top: 4px;\n                                \">i<\/div>\n                                \n                                <div style=\"flex: 1;\">\n                                    <h3 style=\"\n                                        color: #6b4e47;\n                                        margin: 0 0 16px 0;\n                                        font-size: 20px;\n                                        font-weight: 500;\n                                        font-family: 'Roboto Slab', Georgia, serif;\n                                        line-height: 1.3;\n                                    \">${this.escapeHtml(title)}<\/h3>\n                                    \n                                    <div style=\"\n                                        color: #5d4e47;\n                                        line-height: 1.7;\n                                        font-family: 'Roboto Slab', Georgia, serif;\n                                        font-size: 16px;\n                                        white-space: pre-line;\n                                    \">${this.escapeHtml(message || (document.documentElement.lang.substring(0, 2) === 'en' ? 'The counseling contingent is currently not available.' : 'Das Beratungskontingent ist derzeit nicht verf\u00fcgbar.'))}<\/div>\n                                <\/div>\n                            <\/div>\n                        <\/div>\n                    `;\n                    \n                    this.booklyForm.parentNode.insertBefore(messageDiv, this.booklyForm);\n                }\n                \n                showForm() {\n                    this.booklyForm.style.display = '';\n                    this.removeMessage();\n                }\n                \n                removeMessage() {\n                    const existingMessage = document.querySelector('.mv-hybrid-warning-message');\n                    if (existingMessage) {\n                        existingMessage.remove();\n                    }\n                    const consentMessage = document.querySelector('.mv-user-limit-consent');\n                    if (consentMessage) {\n                        consentMessage.remove();\n                    }\n                }\n                \n                isValidEmail(email) {\n                    return \/^[^\\s@]+@[^\\s@]+\\.[^\\s@]+$\/.test(email);\n                }\n                \n                escapeHtml(text) {\n                    const div = document.createElement('div');\n                    div.textContent = text;\n                    return div.innerHTML;\n                }\n            }\n            \n            window.mhpShowIdLogin = function() {\n                $(\".mhp-landing-options\").hide();\n                $(\"#mhp-businesscode-login-section\").fadeIn();\n            };\n            \n            window.mhpShowIdCreate = function() {\n                $(\".mhp-landing-options\").hide();\n                $(\"#mhp-businesscode-login-section\").fadeIn();\n                \/\/ Nach Businesscode-Login wird automatisch die ID-Registrierung angezeigt\n            };\n        })(jQuery);\n        <\/script><\/div>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"elementor_canvas","meta":{"_acf_changed":false,"footnotes":""},"class_list":["post-9536","page","type-page","status-publish","hentry"],"acf":[],"_links":{"self":[{"href":"https:\/\/mental.mindvise.de\/ro\/wp-json\/wp\/v2\/pages\/9536","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mental.mindvise.de\/ro\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/mental.mindvise.de\/ro\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/mental.mindvise.de\/ro\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/mental.mindvise.de\/ro\/wp-json\/wp\/v2\/comments?post=9536"}],"version-history":[{"count":3,"href":"https:\/\/mental.mindvise.de\/ro\/wp-json\/wp\/v2\/pages\/9536\/revisions"}],"predecessor-version":[{"id":9556,"href":"https:\/\/mental.mindvise.de\/ro\/wp-json\/wp\/v2\/pages\/9536\/revisions\/9556"}],"wp:attachment":[{"href":"https:\/\/mental.mindvise.de\/ro\/wp-json\/wp\/v2\/media?parent=9536"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}