{"id":731,"date":"2026-04-08T13:27:21","date_gmt":"2026-04-08T17:27:21","guid":{"rendered":"https:\/\/eduverso.club\/?page_id=731"},"modified":"2026-04-09T12:32:59","modified_gmt":"2026-04-09T16:32:59","slug":"registro","status":"publish","type":"page","link":"https:\/\/eduverso.club\/?page_id=731","title":{"rendered":"REGISTRO"},"content":{"rendered":"\n<div class=\"wp-block-columns alignfull is-layout-flex wp-container-core-columns-is-layout-28f84493 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<!DOCTYPE html>\n<html lang=\"es\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <title>Eduverso &#8211; Registro de Kit<\/title>\n    <link href=\"https:\/\/fonts.googleapis.com\/css2?family=Inter:wght@400;600;700;800;900&#038;display=swap\" rel=\"stylesheet\">\n    <style>\n        :root { \n            --edv-brand-purple: #6016FC; \n            --edv-bg: #F8FAFC; \n            --edv-text-dark: #1E293B; \n            --edv-text-muted: #64748B; \n            --edv-success: #16A34A;\n            --edv-danger: #DC2626;\n        }\n        \n        body { background-color: var(--edv-bg); font-family: 'Inter', sans-serif; margin: 0; color: var(--edv-text-dark); }\n        #eduverso-registration { padding: 2rem; max-width: 1000px; margin: 0 auto; }\n\n        \/* BANNER LETI *\/\n        .leti-assistant-banner { \n            background: white; border-radius: 24px; padding: 1.5rem 2rem; display: flex; align-items: center; gap: 1.5rem; \n            box-shadow: 0 10px 25px rgba(96, 22, 252, 0.08); margin-bottom: 2rem; border: 1px solid rgba(96, 22, 252, 0.1);\n        }\n        .leti-avatar { width: 60px; height: 60px; border-radius: 18px; border: 2px solid var(--edv-brand-purple); display: flex; align-items: center; justify-content: center; background: white; }\n        .leti-avatar img { width: 80%; }\n        .leti-bubble { flex: 1; }\n\n        \/* CARD PRINCIPAL *\/\n        .auth-card { background: white; border-radius: 32px; display: grid; grid-template-columns: 1fr 1.2fr; overflow: hidden; box-shadow: 0 20px 50px rgba(0,0,0,0.04); }\n        .visual-side { background: #fdfdff; padding: 2rem; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; border-right: 1px solid #F1F5F9; }\n        .visual-side img { max-width: 85%; border-radius: 20px; }\n        \n        .form-side { padding: 3rem; }\n        .step-locked { opacity: 0.15; pointer-events: none; filter: grayscale(1); transition: 0.4s; }\n        \n        .edv-group { margin-bottom: 1.2rem; }\n        .edv-label { display: block; font-size: 0.75rem; font-weight: 800; color: var(--edv-text-muted); margin-bottom: 8px; text-transform: uppercase; }\n        .edv-input, .edv-select { width: 100%; padding: 0.9rem; border: 2px solid #E2E8F0; border-radius: 16px; font-size: 1rem; box-sizing: border-box; outline: none; }\n\n        .btn-edv { background: linear-gradient(135deg, var(--edv-brand-purple) 0%, #4a11c2 100%); color: white; border: none; padding: 1.1rem; border-radius: 18px; font-weight: 800; cursor: pointer; width: 100%; margin-top: 10px; transition: 0.3s; }\n        .btn-validate { background: var(--edv-text-dark); }\n        .btn-logout-alt { background: #FEE2E2; color: var(--edv-danger); border: none; padding: 8px 12px; border-radius: 10px; font-weight: bold; cursor: pointer; margin-top: 10px; display: none; }\n\n        .msg { padding: 14px; border-radius: 16px; font-size: 0.85rem; font-weight: 700; margin-bottom: 1.5rem; display: none; text-align: center; animation: fadeIn 0.3s; }\n        .msg-error { background: #FEE2E2; color: var(--edv-danger); }\n        .msg-success { background: #DCFCE7; color: var(--edv-success); }\n\n        @keyframes fadeIn { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: translateY(0); } }\n    <\/style>\n<\/head>\n<body>\n\n<div id=\"eduverso-registration\">\n    <header class=\"leti-assistant-banner\">\n        <div class=\"leti-avatar\"><img decoding=\"async\" src=\"https:\/\/i.ibb.co\/YT1327KF\/ROBOT.png\" alt=\"Leti\"><\/div>\n        <div class=\"leti-bubble\">\n            <h2 id=\"leti-title\" style=\"margin:0; color:var(--edv-brand-purple);\">Activaci\u00f3n de Kit<\/h2>\n            <p id=\"leti-subtitle\" style=\"margin:0; font-size:0.9rem;\">Ingresa el c\u00f3digo de tu tablero f\u00edsico para comenzar.<\/p>\n            <button id=\"btn-session-logout\" class=\"btn-logout-alt\">Cerrar sesi\u00f3n actual para usar otro c\u00f3digo<\/button>\n        <\/div>\n    <\/header>\n\n    <main class=\"auth-card\">\n        <div class=\"visual-side\">\n            <img decoding=\"async\" src=\"https:\/\/i.ibb.co\/rRXwSqHy\/tablero-kit.jpg\" alt=\"Kit Eduverso\">\n            <h3 style=\"margin-top:1.5rem; font-weight: 900; color: var(--edv-brand-purple);\">NUEVO PROYECTO<\/h3>\n            <p style=\"font-size: 0.85rem; color: var(--edv-text-muted);\">Est\u00e1s a un paso de sincronizar tu tablero.<\/p>\n        <\/div>\n\n        <div class=\"form-side\">\n            <div id=\"reg-msg\" class=\"msg\"><\/div>\n            \n            <div id=\"section-code\">\n                <div class=\"edv-group\">\n                    <label class=\"edv-label\">1. C\u00f3digo del Tablero<\/label>\n                    <input type=\"text\" id=\"board-code\" class=\"edv-input\" placeholder=\"Ej: DK01-2026\">\n                <\/div>\n                <button id=\"btn-validate-code\" class=\"btn-edv btn-validate\">VALIDAR TABLERO<\/button>\n            <\/div>\n\n            <div id=\"section-register\" class=\"step-locked\">\n                <form id=\"final-reg-form\">\n                    <div class=\"edv-group\">\n                        <label class=\"edv-label\">2. Tipo de Kit<\/label>\n                        <select id=\"kit-type\" class=\"edv-select\" required>\n                            <option value=\"Design KIT\">Design KIT<\/option>\n                            <option value=\"Scamper KIT\">Scamper KIT<\/option>\n                            <option value=\"Lean KIT\">Lean KIT<\/option>\n                        <\/select>\n                    <\/div>\n                    <div class=\"edv-group\">\n                        <label class=\"edv-label\">3. Nombre del Equipo \/ Usuario<\/label>\n                        <input type=\"text\" id=\"user-name\" class=\"edv-input\" required placeholder=\"Nombre del proyecto\">\n                    <\/div>\n                    <div class=\"edv-group\">\n                        <label class=\"edv-label\">4. Correo Electr\u00f3nico<\/label>\n                        <input type=\"email\" id=\"user-email\" class=\"edv-input\" required placeholder=\"email@ejemplo.com\">\n                    <\/div>\n                    <div class=\"edv-group\">\n                        <label class=\"edv-label\">5. Contrase\u00f1a<\/label>\n                        <input type=\"password\" id=\"user-pass\" class=\"edv-input\" required placeholder=\"M\u00ednimo 6 caracteres\">\n                    <\/div>\n                    <button type=\"submit\" class=\"btn-edv\">ACTIVAR Y EMPEZAR<\/button>\n                <\/form>\n            <\/div>\n            <p style=\"text-align:center; font-size:0.8rem; margin-top:20px;\">\u00bfYa tienes cuenta? <a href=\"https:\/\/eduverso.club\/dashboard-login\/\">Inicia sesi\u00f3n aqu\u00ed<\/a><\/p>\n        <\/div>\n    <\/main>\n<\/div>\n\n<script type=\"module\">\n    import { initializeApp } from \"https:\/\/www.gstatic.com\/firebasejs\/11.0.1\/firebase-app.js\";\n    import { getAuth, createUserWithEmailAndPassword, onAuthStateChanged, signOut } from \"https:\/\/www.gstatic.com\/firebasejs\/11.0.1\/firebase-auth.js\";\n    import { getFirestore, doc, setDoc, getDoc, updateDoc } from \"https:\/\/www.gstatic.com\/firebasejs\/11.0.1\/firebase-firestore.js\";\n\n    const firebaseConfig = {\n        apiKey: \"AIzaSyAx9tzEWcCkjncZCPKLE75nVEhs1WnERRM\",\n        authDomain: \"eduverso-lab-app.firebaseapp.com\",\n        projectId: \"eduverso-lab-app\",\n        storageBucket: \"eduverso-lab-app.firebasestorage.app\",\n        messagingSenderId: \"436116444684\",\n        appId: \"1:436116444684:web:35c20208dd71f7145bc029\"\n    };\n\n    const app = initializeApp(firebaseConfig);\n    const auth = getAuth(app);\n    const db = getFirestore(app);\n\n    const btnValidate = document.getElementById('btn-validate-code');\n    const btnLogout = document.getElementById('btn-session-logout');\n    const sectionReg = document.getElementById('section-register');\n    const msgBox = document.getElementById('reg-msg');\n\n    \/\/ --- DETECTAR SI YA EST\u00c1 LOGEADO PARA EVITAR CONFLICTOS ---\n    onAuthStateChanged(auth, async (user) => {\n        if (user) {\n            btnLogout.style.display = 'block';\n            showMsg(\"Ya tienes una sesi\u00f3n iniciada. Ci\u00e9rrala si quieres registrar un c\u00f3digo diferente.\", \"success\");\n        } else {\n            btnLogout.style.display = 'none';\n        }\n    });\n\n    btnLogout.onclick = async () => {\n        await signOut(auth);\n        location.reload();\n    };\n\n    \/\/ --- VALIDAR C\u00d3DIGO ---\n    btnValidate.onclick = async () => {\n        const code = document.getElementById('board-code').value.trim().toUpperCase();\n        if(!code) return showMsg(\"Ingresa un c\u00f3digo\", \"error\");\n\n        try {\n            const codeRef = doc(db, \"codigos_validos\", code);\n            const snap = await getDoc(codeRef);\n\n            if (snap.exists() && snap.data().estado === \"disponible\") {\n                showMsg(\"\u00a1C\u00f3digo validado! Completa los datos abajo.\", \"success\");\n                sectionReg.classList.remove('step-locked');\n                btnValidate.style.display = 'none';\n                document.getElementById('board-code').disabled = true;\n                if(snap.data().kit_tipo) document.getElementById('kit-type').value = snap.data().kit_tipo;\n            } else {\n                showMsg(\"C\u00f3digo inv\u00e1lido o ya en uso.\", \"error\");\n            }\n        } catch (e) { showMsg(\"Error de conexi\u00f3n\", \"error\"); }\n    };\n\n    \/\/ --- REGISTRO FINAL ---\n    document.getElementById('final-reg-form').onsubmit = async (e) => {\n        e.preventDefault();\n        const email = document.getElementById('user-email').value;\n        const pass = document.getElementById('user-pass').value;\n        const nombre = document.getElementById('user-name').value;\n        const kit = document.getElementById('kit-type').value;\n        const code = document.getElementById('board-code').value.toUpperCase();\n\n        try {\n            const userCred = await createUserWithEmailAndPassword(auth, email, pass);\n            const user = userCred.user;\n\n            \/\/ Crear sesi\u00f3n de juego\n            await setDoc(doc(db, 'sesiones_juego', user.uid), {\n                usuario_nombre: nombre,\n                correo_usuario: email,\n                kit_activo: kit,\n                codigo_tablero: code,\n                paso_actual: 1,\n                puntos_innovacion: 0,\n                contexto_idea: \"\" \/\/ Se llenar\u00e1 en el dashboard con Leti\n            });\n\n            \/\/ Marcar c\u00f3digo como usado\n            await updateDoc(doc(db, \"codigos_validos\", code), { estado: \"activado\" });\n\n            showMsg(\"\u00a1Registro exitoso! Entrando...\", \"success\");\n            setTimeout(() => {\n                window.location.href = \"https:\/\/eduverso.club\/dashboard-login\/\"; \n            }, 1500);\n\n        } catch (error) {\n            if(error.code === 'auth\/email-already-in-use') {\n                showMsg(\"Este correo ya est\u00e1 registrado. Usa otro o inicia sesi\u00f3n.\", \"error\");\n            } else {\n                showMsg(\"Error: \" + error.message, \"error\");\n            }\n        }\n    };\n\n    function showMsg(text, type) {\n        msgBox.innerText = text;\n        msgBox.className = `msg msg-${type}`;\n        msgBox.style.display = 'block';\n    }\n<\/script>\n<\/body>\n<\/html>\n<\/div>\n<\/div>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Eduverso &#8211; Registro de Kit Activaci\u00f3n de Kit Ingresa el c\u00f3digo de tu tablero f\u00edsico para comenzar. Cerrar sesi\u00f3n actual para usar otro c\u00f3digo NUEVO PROYECTO Est\u00e1s a un paso de sincronizar tu tablero. 1. C\u00f3digo del Tablero VALIDAR TABLERO 2. Tipo de Kit Design KITScamper KITLean KIT 3. Nombre del Equipo \/ Usuario 4. [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"elementor_header_footer","meta":{"footnotes":""},"class_list":["post-731","page","type-page","status-publish","hentry"],"jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/eduverso.club\/index.php?rest_route=\/wp\/v2\/pages\/731","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/eduverso.club\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/eduverso.club\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/eduverso.club\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/eduverso.club\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=731"}],"version-history":[{"count":13,"href":"https:\/\/eduverso.club\/index.php?rest_route=\/wp\/v2\/pages\/731\/revisions"}],"predecessor-version":[{"id":773,"href":"https:\/\/eduverso.club\/index.php?rest_route=\/wp\/v2\/pages\/731\/revisions\/773"}],"wp:attachment":[{"href":"https:\/\/eduverso.club\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=731"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}