1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AdminCalendar-BLnx26_2.js","assets/index-bMFZPluE.js","assets/index-DErZ8Q0G.css","assets/classRoster-DcgYT_RM.js","assets/pricingEngine-DmHUGCKM.js","assets/educationCatalog-pqwMnMBs.js","assets/laborCostReference-CzuQcRj4.js","assets/protectedStorage-l8nXRU0Q.js","assets/holidayCalendar-CjdTLo_H.js","assets/laborAssignmentControls-PBEP3hIy.js","assets/AdminBilling-CELkrDmc.js","assets/phoneFormatting-bIoASOCT.js","assets/familyReceiptPolicy-egdKJ3_6.js","assets/AdminStudents-DnpGEbPF.js","assets/emailApi-BQfIvn0G.js","assets/siblingDetection-CHQmQ9BJ.js","assets/addressFormatting-eDBQ4TmV.js","assets/emailHtml-CNLY3Q4b.js","assets/familyProfileUpdate-DFe0h-LS.js","assets/studentProfileSummary-D5cIUZpH.js","assets/academicTracking-DV-rV9tC.js","assets/AcademyRulesContent-CQsXNIN7.js","assets/familyAgreement-Bm5j7ljB.js","assets/AdminHolidays-Bbl48uq5.js","assets/AdminMonitors-WTVZMpdK.js","assets/teacherMonthlyForecast-DGTfyxMK.js","assets/TeacherAvailabilityEditor-CzOirxAn.js","assets/candidateAvailability-DgcALE0v.js","assets/CoordinatorPanel-BMsRMtOY.js","assets/leadProvisionalFamily-DVBYHIU0.js","assets/homeTutoringProposal-BrGXMNR5.js","assets/PanelCandidatos-CNAoexPd.js","assets/localCandidatePreview-soJiaFs0.js","assets/AdminLeads-BXZxEArh.js","assets/AdminPricing-BvFYWxxn.js","assets/AdminLinksQr-0SeMx6a4.js","assets/MonitorDashboard-B2IzPnJQ.js","assets/AdminReports-5As05-_y.js","assets/AdminAcademicRadar-CO7tlU2T.js"])))=>i.map(i=>d[i]); 2import{r as d,j as e,R as v,_,s as m}from"./index-bMFZPluE.js";import{e as Oa,f as Ba}from"./educationCatalog-pqwMnMBs.js";import{v as $a,n as Fa}from"./phoneFormatting-bIoASOCT.js";import{C as Ma,A as za,L as Va}from"./laborAssignmentControls-PBEP3hIy.js";const Ua=new Set(["auditoria_email","controlled_test"]),ze=s=>Ua.has(String(s||"").trim().toLowerCase()),xt=s=>ze(s==null?void 0:s.source),Ga=v.lazy(()=>_(()=>import("./AdminCalendar-BLnx26_2.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9])).then(s=>({default:s.AdminCalendar}))),Ha=v.lazy(()=>_(()=>import("./AdminBilling-CELkrDmc.js"),__vite__mapDeps([10,1,2,4,5,3,6,11,12,8,9])).then(s=>({default:s.AdminBilling}))),Wa=v.lazy(()=>_(()=>import("./AdminStudents-DnpGEbPF.js"),__vite__mapDeps([13,1,2,14,15,16,17,5,3,4,18,11,9,8,19,20,21,22,12])).then(s=>({default:s.AdminStudents}))),Ja=v.lazy(()=>_(()=>import("./AdminHolidays-Bbl48uq5.js"),__vite__mapDeps([23,1,2])).then(s=>({default:s.AdminHolidays}))),Ya=v.lazy(()=>_(()=>import("./AdminMonitors-WTVZMpdK.js"),__vite__mapDeps([24,1,2,16,14,3,4,5,25,26,27,7,9,17]))),Qa=v.lazy(()=>_(()=>import("./CoordinatorPanel-BMsRMtOY.js"),__vite__mapDeps([28,1,2,6,4,5,15,16,9,29,11,26,27,30,22,12])).then(s=>({default:s.CoordinatorPanel}))),Ka=v.lazy(()=>_(()=>import("./PanelCandidatos-CNAoexPd.js"),__vite__mapDeps([31,1,2,14,27,17,11,32,7,5,9])).then(s=>({default:s.AdminCandidates}))),Xa=v.lazy(()=>_(()=>import("./AdminLeads-BXZxEArh.js"),__vite__mapDeps([33,1,2,29,11,18])).then(s=>({default:s.AdminLeads}))),Za=v.lazy(()=>_(()=>import("./AdminPricing-BvFYWxxn.js"),__vite__mapDeps([34,1,2,30,6,22,4,5,12])).then(s=>({default:s.AdminPricing}))),et=v.lazy(()=>_(()=>import("./AdminLinksQr-0SeMx6a4.js"),__vite__mapDeps([35,1,2])).then(s=>({default:s.AdminLinksQr}))),at=v.lazy(()=>_(()=>import("./MonitorDashboard-B2IzPnJQ.js"),__vite__mapDeps([36,1,2,28,6,4,5,15,16,9,29,11,26,27,30,22,12,0,3,7,8,25,14,20])).then(s=>({default:s.MonitorDashboard}))),tt=v.lazy(()=>_(()=>import("./AdminReports-5As05-_y.js"),__vite__mapDeps([37,1,2])).then(s=>({default:s.AdminReports}))),st=v.lazy(()=>_(()=>import("./AdminAcademicRadar-CO7tlU2T.js"),__vite__mapDeps([38,1,2,3,4,5,27,6])).then(s=>({default:s.AdminAcademicRadar}))),rt=()=>e.jsx("div",{className:"min-h-[55vh] flex items-center justify-center p-8",children:e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"w-9 h-9 border-4 border-[#16A0EB] border-t-transparent rounded-full animate-spin mx-auto"}),e.jsx("p",{className:"mt-4 text-[9px] font-black uppercase tracking-widest text-[#0C6FAE]",children:"Abriendo modulo"})]})}),nt=({onNavigate:s})=>{const b=Ma,G=[...Oa],H=[...Ba],te=[{value:"WhatsApp",label:"ð¢ WhatsApp de la Web"},{value:"Llamada",label:"ð Llamada Telefónica"},{value:"Recomendación",label:"â Recomendación"},{value:"Visita personal en la academia",label:"ð« Visita personal en la academia"}],$=["Academia Profe a 3","Profe en casa (Domicilio)","Clases Online","Por definir"],W=(a,t)=>`${String(a||"").trim()} ${String(t||"").trim()}`.trim(),J=()=>({attended_by:"",parent_first_name:"",parent_last_name:"",student_first_name:"",student_last_name:"",email:"",locality:"",province:"Granada",phone:"+34 ",origin:"WhatsApp",level:"",modality:"Academia Profe a 3",school_name:"",availability:"",notes:"",subjects:""}),F=a=>a?a.split("-").reverse().join("/"):"",P=a=>a?String(a).slice(0,5):"",[je,u]=d.useState([]),[k,se]=d.useState([]),[C,Ve]=d.useState([]),[M,ve]=d.useState([]),[Y,Ue]=d.useState([]),[re,ye]=d.useState([]),[Ge,ne]=d.useState(!1),[le,z]=d.useState([]),[He,Ne]=d.useState(!1),[oe,We]=d.useState(0),[Je,Ye]=d.useState(0),[_e,Qe]=d.useState(0),[Ke,Xe]=d.useState(0),[we,Ze]=d.useState(0),[L,ea]=d.useState(!1),[V,ke]=d.useState([]),[ie,Ce]=d.useState(!1),[ce,Ae]=d.useState(""),[U,Se]=d.useState("current_course"),[de,Q]=d.useState(5),[aa,xe]=d.useState(!1),[pe,Ee]=d.useState(0),[Re,Pe]=d.useState(!1),[r,h]=d.useState(J),[ta,Le]=d.useState([]),[sa,ra]=d.useState(0),A=a=>String(a||"").normalize("NFD").replace(/[\u0300-\u036f]/g,"").toUpperCase(),me=a=>String(a||"").trim().toLowerCase(),na=(a,t=120)=>{const n=String(a).replace(/\s+/g," ").trim();return n?n.length>t?`${n.slice(0,t).trim()}...`:n:""},T=(a,t)=>A(a).includes(A(t)),K=a=>T(String(a||""),"FALTA INJUSTIFICADA"),X=a=>T(String(a||""),"FALTA JUSTIFICADA")&&!K(a),la=a=>{const t=A(a);return t.includes(A("RECUPERACION JUSTIFICADA"))||t.includes(A("RECUPERACION PENDIENTE"))||t.includes(A("OPCIONES RECUPERACION"))||t.includes(A("RECUPERACION PROGRAMADA"))||t.includes(A("RECUPERACION CERRADA"))}
2,[Te,oa]=d.useState(0),[ue,ia]=d.useState({total:0,active:0,won:0,lost:0}),E=(()=>{const a=new Intl.DateTimeFormat("es-ES",{month:"long",year:"numeric"}).format(new Date);return a.charAt(0).toUpperCase()+a.slice(1)})(),D=new Date().getDate()>=25,[y,ca]=d.useState({monthLabel:E,completionRate:0,pendingTeachers:0,closedTeachers:0,totalTeachers:0}),da=a=>{const t=new Map;return a.forEach(n=>{const c=String((n==null?void 0:n.student_name)||"").trim();if(!c)return;const x=c.toLowerCase(),l=t.get(x)||{studentName:c,openedCount:0,closedCount:0,lastDate:"",lastNote:""},o=String((n==null?void 0:n.topic)||""),f=T(o,"RECUPERACION JUSTIFICADA")||T(o,"RECUPERACION PENDIENTE"),p=T(o,"RECUPERACION CERRADA")||T(o,"RECUPERACION PROGRAMADA");f&&(l.openedCount+=1),p&&(l.closedCount+=1),f&&!l.lastDate&&(l.lastDate=String((n==null?void 0:n.contact_date)||"")),f&&!l.lastNote&&(l.lastNote=String((n==null?void 0:n.notes)||"")),t.set(x,l)}),Array.from(t.values()).map(n=>({studentName:n.studentName,openCount:Math.max(0,n.openedCount-n.closedCount),lastDate:n.lastDate,lastNote:n.lastNote})).filter(n=>n.openCount>0).sort((n,c)=>c.openCount!==n.openCount?c.openCount-n.openCount:n.studentName.localeCompare(c.studentName,"es-ES")).slice(0,8)},xa=(a,t=new Map,n=new Map,c=new Map)=>{const x=new Map;return a.forEach(l=>{const o=String((l==null?void 0:l.student_name)||"").trim();if(!o||!X(String((l==null?void 0:l.topic)||"")))return;const f=o.toLowerCase(),p=t.get(f),Z=me((p==null?void 0:p.tutor_email)||(p==null?void 0:p.monitor_email)||""),ge=n.get(Z)||(p==null?void 0:p.tutor_email)||(p==null?void 0:p.monitor_email)||"Pendiente de definir",S=x.get(f)||{studentName:o,count:0,lastDate:"",lastNote:"",teacherName:ge,levelLabel:String((p==null?void 0:p.level)||(p==null?void 0:p.course)||"Sin nivel"),modalityLabel:String((p==null?void 0:p.modality)||"Sin modalidad"),openRecoveries:c.get(f)||0};S.count+=1,S.lastDate||(S.lastDate=String((l==null?void 0:l.contact_date)||"")),S.lastNote||(S.lastNote=String((l==null?void 0:l.notes)||"")),x.set(f,S)}),Array.from(x.values()).sort((l,o)=>o.count!==l.count?o.count-l.count:l.studentName.localeCompare(o.studentName,"es-ES")).slice(0,10)};d.useEffect(()=>{(async()=>{const t=new Date().toISOString().split("T")[0],n=`${new Date().getFullYear()}-${String(new Date().getMonth()+1).padStart(2,"0")}-01`,{data:c}=await m.from("parent_logs").select("*").gte("contact_date",b.startDate).order("created_at",{ascending:!1}).limit(3);c&&u(c);const{data:x}=await m.from("parent_logs").select("*").eq("contact_date",t).order("created_at",{ascending:!1}).limit(30);x&&Ve(x.filter(i=>K(i.topic)||X(i.topic)));const{data:l}=await m.from("teachers").select("email, name"),{data:o}=await m.from("classes").select("monitor_email").gte("class_date",b.startDate).lte("class_date",b.endDate).is("deleted_at",null),f=new Set((o||[]).map(i=>me(i.monitor_email)).filter(Boolean)),p=new Map((l||[]).filter(i=>i==null?void 0:i.email).map(i=>[me(i.email),i.name||i.email])),Z=Array.from(new Set((l||[]).map(i=>{var g;return(g=i.email)==null?void 0:g.trim().toLowerCase()}).filter(i=>!!i&&f.has(i)))),{data:ge}=await m.from("parent_logs").select("*").gte("contact_date",b.startDate).order("created_at",{ascending:!1}).limit(250),S=(ge||[]).filter(i=>la(i.topic)),qe=da(S);Ue(qe);const{data:Sa}=await m.from("parent_logs").select("*").gte("contact_date",n).order("created_at",{ascending:!1}).limit(150),he=(Sa||[]).filter(i=>X(i.topic));if(he.length>0){const i=Array.from(new Set(he.map(w=>String(w.student_name||"").trim()).filter(Boolean)));let g=new Map;if(i.length>0){const{data:w}=await m.from("students").select("name, tutor_email, monitor_email, level, course, modality").in("name",i);g=new Map((w||[]).map(N=>[String(N.name||"").trim().toLowerCase(),N]))}const O=new Map(qe.map(w=>[String(w.studentName||"").trim().toLowerCase(),Number(w.openCount||0)]));ve(xa(he,g,p,O))}else ve([]);const{data:Oe}=await m.from("teacher_schedule_feedback").select("*").eq("status","Pendiente").eq("request_kind","class_change_request").gte("created_at",`${b.startDate}T00:00:00`).order("created_at",{ascending:!1}).limit(8);Oe&&ye(Oe);const{data:Be}=await m.from("office_hours").select("*").gte("date",b.startDate).order("created_at",{ascending:!1}).limit(3);Be&&se(Be);const{data:Ea,error:Ra}=await m.from("candidates").select("source").eq("status","Pendiente");Ra||We((Ea||[]).filter(i=>!ze(i.source)).length);const{count:Pa}=await m.from("leads").select("*",{count:"exact",head:!0}).eq("status","Nuevo").gte("created_at",b.startDate);Ee(Pa||0);const[$e,Fe]=await Promise.all([m.from("academic_group_plans").select("id, pending_student_names").eq("academic_year",za).neq("status","archived").is("teacher_email",null),m.from("labor_assignment_controls").select("id",{count:"exact",head:!0}
2).eq("academic_year",Va).eq("status","pending")]);if(!$e.error){const i=$e.data||[],g=i.map(N=>String(N.id)),O=new Set;let w=g.length===0;if(g.length>0){const{data:N,error:j}=await m.from("academic_group_plan_students").select("plan_id").in("plan_id",g);j||((N||[]).forEach(ae=>O.add(String(ae.plan_id))),w=!0)}if(w){const N=i.filter(j=>O.has(String(j.id))||Array.isArray(j.pending_student_names)&&j.pending_student_names.length>0);Ye(N.length),Qe(i.length-N.length)}}Fe.error||Xe(Fe.count||0);const{count:La}=await m.from("monthly_reports").select("*",{count:"exact",head:!0}).eq("status","Pendiente").eq("month_year",E);Ze(La||0);const{data:Ta}=await m.from("monthly_reports").select("monitor_email").eq("month_year",E),Da=new Set((Ta||[]).map(i=>{var g;return(g=i.monitor_email)==null?void 0:g.trim().toLowerCase()}).filter(Boolean)),fe=Z.filter(i=>Da.has(i)).length,ee=Z.length,Ia=Math.max(ee-fe,0),qa=ee>0?Math.round(fe/ee*100):0;ca({monthLabel:E,completionRate:qa,pendingTeachers:Ia,closedTeachers:fe,totalTeachers:ee});const{data:q}=await m.from("leads").select("status, lost_reason").gte("created_at",b.startDate);if(q){const i=q.filter(j=>j.status==="Matriculado"||j.status==="Convertido a familia").length,g=q.filter(j=>j.status==="No Cierra").length,O=q.length-i-g,w=i+g>0?Math.round(i/(i+g)*100):0;oa(w),ia({total:q.length,active:O,won:i,lost:g}),ra(g);const N=q.filter(j=>j.status==="No Cierra");if(N.length>0){const j={};N.forEach(B=>{const R=B.lost_reason?B.lost_reason.trim().toUpperCase():"NO ESPECIFICADO";j[R]=(j[R]||0)+1});const ae=Object.entries(j).map(([B,R])=>({reason:B,count:R,percentage:Math.round(R/N.length*100)}));ae.sort((B,R)=>R.count-B.count),Le(ae.slice(0,3))}else Le([])}})()},[E]);const pa=async()=>{Ne(!0);const{data:a,error:t}=await m.from("teachers").select("id, email, name, status, can_capture_walkin_leads, can_create_extra_classes").order("name",{ascending:!0});if(t&&alert("No se han podido cargar los profesores para permisos: "+t.message),a){const{data:n}=await m.from("coordinator_permissions").select("*"),c=a.filter(x=>x.id&&x.email).map(x=>{const l=x.id,o=(n==null?void 0:n.find(f=>f.coordinator_id===l))||{can_validate_classes:!1,can_use_bitacora:!1,can_view_team:!1,can_view_finances:!1,can_view_students:!1,can_assign_students:!1,can_manage_calendar:!1};return{...x,uniqueId:l,permissions:{can_validate_classes:!!o.can_validate_classes,can_use_bitacora:!!o.can_use_bitacora,can_view_team:!!o.can_view_team,can_view_finances:!!o.can_view_finances,can_view_students:!!o.can_view_students,can_assign_students:!!o.can_assign_students,can_manage_calendar:!!o.can_manage_calendar}}});z(c)}Ne(!1)},ma=()=>{ne(!0),pa()},be=async a=>{Ce(!0),Ae("");let t=m.from("parent_logs").select("*").order("created_at",{ascending:!1}).limit(50);a==="current_course"?t=t.gte("contact_date",b.startDate).lte("contact_date",b.endDate):t=t.lt("contact_date",b.startDate);const{data:n,error:c}=await t;c?(ke([]),Ae("No se ha podido cargar la bitacora. Intentalo de nuevo.")):ke(n||[]),Ce(!1)},ua=()=>{L||(Se("current_course"),Q(5),be("current_course")),ea(!L)},De=a=>{Se(a),Q(5),be(a)},ba=async a=>{const{error:t}=await m.from("teacher_schedule_feedback").update({status:"Revisado",resolved_at:new Date().toISOString(),resolved_by:"Administrador"}).eq("id",a);if(t){alert("No se pudo marcar el aviso como revisado: "+t.message);return}ye(n=>n.filter(c=>c.id!==a))},ga=async a=>{a.preventDefault();const t=W(r.parent_first_name,r.parent_last_name),n=W(r.student_first_name,r.student_last_name);if(!t||!n||!r.phone.trim()||!r.locality.trim()){alert("Completa al menos nombre y apellidos del tutor, nombre y apellidos del alumno, telefono y localidad.");return}if(!r.level.trim()||!r.subjects.trim()){alert("Completa al menos el curso exacto y la asignatura principal antes de guardar la familia interesada.");return}const c=$a(r.phone,"telefono de WhatsApp");if(!c.ok){alert(c.error);return}Pe(!0);const x=[r.attended_by.trim()?r.origin==="Visita personal en la academia"?`Atendida en academia por ${r.attended_by.trim()}.`:`Registrada por ${r.attended_by.trim()}.`:null,`[Tutor nombre] ${r.parent_first_name.trim()}`,`[Tutor apellidos] ${r.parent_last_name.trim()}`,`[Alumno nombre] ${r.student_first_name.trim()}`,`[Alumno apellidos] ${r.student_last_name.trim()}`,r.school_name.trim()?`[Centro educativo] ${r.school_name.trim()}`:null,r.availability.trim()?`Horario comentado: ${r.availability.trim()}`:null,r.notes.trim()?`Observaciones: ${r.notes.trim()}
2`:null].filter(Boolean),l={attended_by:r.attended_by.trim(),parent_name:t,student_name:n,email:r.email.trim(),locality:r.locality.trim(),province:r.province.trim()||"Granada",phone:Fa(r.phone),origin:r.origin,level:r.level,modality:r.modality,school_name:r.school_name.trim(),availability:r.availability.trim(),subjects:r.subjects.trim(),subject_needed:r.subjects.trim(),notes:x.join(` 3`),status:"Nuevo"},{error:o}=await m.from("leads").insert([l]);if(o)alert("Error al registrar familia interesada: "+o.message);else{xe(!1),h(J());const{count:f}=await m.from("leads").select("*",{count:"exact",head:!0}).eq("status","Nuevo");Ee(f||0)}Pe(!1)},Ie=async(a,t,n)=>{const c=!n;z(l=>l.map(o=>o.uniqueId===a?{...o,[t]:c}:o));const{error:x}=await m.from("teachers").update({[t]:c}).eq("id",a);x&&(alert("No se ha podido guardar este permiso del profesor: "+x.message),z(l=>l.map(o=>o.uniqueId===a?{...o,[t]:n}:o)))},I=async(a,t,n)=>{const c=!n;z(l=>l.map(o=>o.uniqueId===a?{...o,permissions:{...o.permissions,[t]:c}}:o));const x=le.find(l=>l.uniqueId===a);if(x){const l={coordinator_id:a,can_validate_classes:t==="can_validate_classes"?c:!!x.permissions.can_validate_classes,can_use_bitacora:t==="can_use_bitacora"?c:!!x.permissions.can_use_bitacora,can_view_team:t==="can_view_team"?c:!!x.permissions.can_view_team,can_view_finances:t==="can_view_finances"?c:!!x.permissions.can_view_finances,can_view_students:t==="can_view_students"?c:!!x.permissions.can_view_students,can_assign_students:t==="can_assign_students"?c:!!x.permissions.can_assign_students,can_manage_calendar:t==="can_manage_calendar"?c:!!x.permissions.can_manage_calendar,updated_at:new Date().toISOString()},{error:o}=await m.from("coordinator_permissions").upsert(l);o&&(alert(`ð¨ Error de Supabase al guardar el fusible: 4`+o.message),z(f=>f.map(p=>p.uniqueId===a?{...p,permissions:{...p.permissions,[t]:n}}:p)))}},ha=()=>{if(!D){const t=`ð¢ *RECORDATORIO DE REPORTE MENSUAL* ð¢ 5 6Hola equipo ð, ya tenéis abierto el reporte mensual de ${E} en la app. 7 8Cuando tengáis claro vuestro horario del mes, id completándolo para que luego el cierre y los recibos salgan fluidos. ð 9 10¡Gracias por vuestro trabajo! ð`;window.open(`https://wa.me/?text=${encodeURIComponent(t)}`,"_blank");return}window.open(`https://wa.me/?text=${encodeURIComponent(`ð¢ *RECORDATORIO CIERRE DE MES* ð¢ 11 12Hola equipo ð, estamos revisando los informes de asistencia para generar los recibos de las familias. 13 14Aún quedan algunas sesiones sin reportar. Por favor, aseguraos de completar vuestros informes en la App antes de mañana para que todo el mund
14o cobre a tiempo y no se nos escape ninguna clase. ðð¸ 15 16¡Gracias por vuestro trabajo! ð`)}`,"_blank")},fa=y.totalTeachers===0?"Sin actividad":y.pendingTeachers===0?"Cerrado":D?"En curso":"Seguimiento",ja=y.totalTeachers===0?"bg-gray-50 border-gray-100 text-gray-500":y.pendingTeachers===0?"bg-green-50 border-green-100 text-green-600":D?"bg-orange-50 border-orange-100 text-orange-600":"bg-blue-50 border-blue-100 text-blue-600",va=D?"Profesores sin cerrar":"Profesores sin reporte",ya=y.pendingTeachers===0?"Sin pendientes":D?"ð Avisar a rezagados":"ð Enviar recordatorio",Na=y.totalTeachers===0?"* TodavÃa no hay profesorado con clases activas en este curso.":D?"* Los recibos de WhatsApp estarán listos al llegar al 100%.":`* Esto solo indica quién todavÃa no ha enviado su reporte de ${E}.`,_a=C.filter(a=>K(a.topic)),wa=C.filter(a=>X(a.topic)),ka=Y.reduce((a,t)=>a+t.openCount,0),Ca=M.reduce((a,t)=>a+Number(t.count||0),0),Aa=M.filter(a=>Number(a.openRecoveries||0)>0).length;return e.jsxs("div",{className:"p-6 pb-24 space-y-6 animate-in fade-in duration-300 relative",children:[e.jsxs("div",{className:"flex justify-between items-center mb-2",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-2xl font-black text-gray-900 leading-none",children:"Admin Dashboard"}),e.jsx("p",{className:"text-gray-500 text-sm mt-1",children:"Bienvenido de nuevo, Jefe"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("button",{onClick:()=>xe(!0),className:"bg-orange-500 text-white p-3 rounded-2xl shadow-lg shadow-orange-500/20 active:scale-95 transition-all flex items-center gap-2 font-black text-[10px] uppercase tracking-wider",children:[e.jsx("span",{children:"â¡"})," NUEVO CONTACTO"]}),e.jsxs("button",{className:"bg-white p-3 rounded-2xl shadow-sm border border-gray-100 text-xl relative hover:bg-gray-50 transition-colors",children:["ð",e.jsx("span",{className:"absolute top-2 right-2 w-2.5 h-2.5 bg-orange-500 rounded-full border-2 border-white"})]})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{className:"bg-white p-4 rounded-[24px] border border-gray-100 shadow-sm relative overflow-hidden",children:[e.jsx("p",{className:"text-[9px] font-black text-gray-400 uppercase tracking-widest mb-1",children:"En manos de Coord."}),e.jsx("p",{className:"text-2xl font-black text-orange-600",children:pe}),e.jsx("div",{className:"absolute -right-2 -bottom-2 opacity-10 text-4xl",children:"ð"})]}),e.jsxs("div",{className:"bg-white p-4 rounded-[24px] border border-gray-100 shadow-sm relative overflow-hidden",children:[e.jsx("p",{className:"text-[9px] font-black text-gray-400 uppercase tracking-widest mb-1",children:"CVs por revisar"}),e.jsx("p",{className:"text-2xl font-black text-[#1c74e9]",children:oe}),e.jsx("div",{className:"absolute -right-2 -bottom-2 opacity-10 text-4xl",children:"ð"})]})]}),e.jsxs("div",{className:"rounded-[24px] border border-blue-100 bg-blue-50/70 p-4",children:[e.jsx("p",{className:"text-[10px] font-black uppercase tracking-widest text-[#1c74e9]",children:b.label}),e.jsx("p",{className:"mt-1 text-[11px] font-bold leading-relaxed text-gray-600",children:"El panel muestra solo actividad desde el 1 de septiembre. Los datos de la prueba siguen guardados en el historico."})]}),e.jsxs("section",{className:"rounded-[28px] border border-blue-100 bg-white p-5 shadow-[0_10px_35px_rgba(12,111,174,0.08)]",children:[e.jsxs("div",{className:"mb-4",children:[e.jsx("p",{className:"text-[10px] font-black uppercase tracking-widest text-[#FC9A05]",children:"Puesta en marcha"}),e.jsx("h2",{className:"mt-1 text-xl font-black text-gray-900",children:"Prioridades del curso"}),e.jsx("p",{className:"mt-1 text-[11px] font-bold leading-relaxed text-gray-500",children:"Entra directamente en lo que hay que preparar antes de confirmar clases."})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("button",{onClick:()=>s("coordinator","group_plans"),className:"rounded-[22px] border border-blue-100 bg-blue-50/70 p-4 text-left transition-all hover:border-[#16A0EB] active:scale-95",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("span",{className:"text-2xl",children:"ð«"}),e.jsx("span",{className:"text-2xl font-black text-[#0C6FAE]",children:Je})]}),e.jsx("p",{className:"mt-3 text-[11px] font-black uppercase leading-tight tracking-wide text-gray-900",children:"Grupos sin profesor"}),e.jsx("p",{className:"mt-1 text-[9px] font-bold text-[#0C6FAE]",children:_e>0?`${_e} planes vacios a revisar`:"Abrir Plan de grupos"})]}),e.jsxs("button",{onClick:()=>s("coordinator","labor_controls"),className:"rounded-[22px] border border-orange-100 bg-orange-50/70 p-4 text-left transition-all hover:border-[#FC9A05] active:scale-95",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("span",{className:"text-2xl",children:"ð"}),e.jsx("span",{className:"text-2xl font-black text-[#D96500]",children:Ke})]}),e.jsx("p",{className:"mt-3 text-[11px] font-black uppercase leading-tight tracking-wide text-gray-900",children:"Altas y horas pen
16dientes"}),e.jsx("p",{className:"mt-1 text-[9px] font-bold text-[#D96500]",children:"Abrir control laboral"})]})]})]}),re.length>0&&e.jsxs("div",{className:"bg-amber-50 p-5 rounded-[32px] shadow-[0_10px_35px_rgba(245,158,11,0.12)] border border-amber-100 relative overflow-hidden",children:[e.jsxs("div",{className:"flex justify-between items-start gap-4 mb-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-amber-700 text-[10px] font-black uppercase tracking-widest",children:"Agenda viva"}),e.jsx("h2",{className:"text-xl font-black text-gray-900 mt-1",children:"Cambios pendientes"}),e.jsx("p",{className:"text-amber-800 text-[11px] font-bold mt-1 leading-relaxed",children:"Avisos enviados por monitores para que administracion revise y toque la agenda con control."})]}),e.jsxs("div",{className:"bg-white border border-amber-100 rounded-2xl px-4 py-3 text-right shrink-0",children:[e.jsx("p",{className:"text-[9px] font-black uppercase tracking-widest text-amber-600",children:"Pend."}),e.jsx("p",{className:"text-2xl font-black text-amber-700",children:re.length})]})]}),e.jsx("div",{className:"space-y-3",children:re.slice(0,4).map(a=>{const t=a.class_snapshot||{},n=F(a.requested_class_date),c=P(a.requested_start_time),x=P(a.requested_end_time);return e.jsxs("div",{className:"bg-white/95 border border-amber-100 rounded-[24px] p-4",children:[e.jsxs("div",{className:"flex justify-between items-start gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-sm font-black text-gray-900 leading-tight",children:a.teacher_name||a.teacher_email||"Monitor"}),e.jsx("p",{className:"text-[10px] font-black uppercase tracking-widest text-amber-700 mt-1",children:a.feedback_type})]}),e.jsx("span",{className:"bg-amber-100 text-amber-700 border border-amber-200 text-[8px] font-black uppercase px-2 py-1 rounded-lg shrink-0",children:"Pendiente"})]}),(t==null?void 0:t.class_date)&&e.jsxs("p",{className:"text-[11px] text-gray-600 font-bold mt-3 leading-relaxed",children:["Clase original: ",F(t.class_date)," ",P(t.start_time)," - ",P(t.end_time)," - ",t.subject||"Clase"," - ",t.student_name||"Sin alumnos"]}),n&&e.jsxs("p",{className:"text-[11px] text-amber-800 font-black mt-2",children:["Pide mover a: ",n," ",c," - ",x]}),e.jsx("p",{className:"text-[11px] text-gray-700 font-bold leading-relaxed mt-3 whitespace-pre-line",children:a.message}),e.jsxs("div",{className:"flex gap-2 mt-4",children:[e.jsx("button",{onClick:()=>s("calendar"),className:"flex-1 bg-[#1c74e9] text-white text-[10px] font-black uppercase tracking-widest px-3 py-2 rounded-xl active:scale-95 transition-all",children:"Abrir agenda"}),e.jsx("button",{onClick:()=>ba(a.id),className:"flex-1 bg-white text-amber-700 border border-amber-200 text-[10px] font-black uppercase tracking-widest px-3 py-2 rounded-xl active:scale-95 transition-all",children:"Marcar revisado"})]})]},a.id)})})]}),e.jsxs("div",{className:"bg-white p-6 rounded-[32px] shadow-[0_10px_40px_rgba(0,0,0,0.05)] border border-gray-100 relative overflow-hidden",children:[e.jsxs("div",{className:"flex justify-between items-start gap-4 mb-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-gray-500 text-[10px] font-black uppercase tracking-widest",children:"Control de asistencia"}),e.jsx("h2",{className:"text-2xl font-black text-gray-900 mt-1",children:"Faltas de hoy"}),e.jsx("p",{className:"text-gray-400 text-[11px] mt-1 max-w-[240px]",children:"Lo que el profesorado haya marcado hoy al cerrar clase aparece aquà para que podáis reaccionar rápido."})]}),e.jsxs("div",{className:"bg-gray-50 border border-gray-100 rounded-2xl px-4 py-3 text-right min-w-[92px]",children:[e.jsx("p",{className:"text-[9px] font-black uppercase tracking-widest text-gray-400",children:"Incidencias"}),e.jsx("p",{className:"text-2xl font-black text-gray-900",children:C.length})]})]}),e.jsxs("div",{className:"flex gap-2 flex-wrap mb-4",children:[e.jsxs("span",{className:"bg-red-50 text-red-600 border border-red-100 text-[10px] font-black uppercase px-3 py-1.5 rounded-full",children:[_a.length," injustificadas"]}),e.jsxs("span",{className:"bg-emerald-50 text-emerald-600 border border-emerald-100 text-[10px] font-black uppercase px-3 py-1.5 rounded-full",children:[wa.length," justificadas"]}),e.jsx("button",{onClick:()=>s("students"),className:"ml-auto bg-blue-50 text-[#1c74e9] border border-blue-100 text-[10px] font-black uppercase px-3 py-1.5 rounded-full hover:bg-blue-100 transition-colors",children:"Ver alumnos"})]}),C.length===0?e.jsxs("div",{className:"bg-gray-50 border border-gray-100 rounded-[24px] p-5 text-center",children:[e.jsx("p",{className:"text-[10px] font-black uppercase tracking-widest text-gray-400",children:"Sin faltas registradas hoy"}),e.jsx("p",{className:"text-[11px] text-gray-500 mt-2",children:"Si hoy se marca alguna ausencia al cerrar clase, la verás aquà automáticamente."})]}):e.jsx("div",{className:"space-y-3",children:C.map(a=>{const t=K(a.topic),n=a.created_at?new Date(a.created_at):null;return e.jsxs("div",{className:`rounded-[24px] border p-4 ${t?"bg-red-50/70 border-red-100":"bg-emerald-50/70 border-emerald-100"}`,children:[e.jsxs("div",{className:"flex justify-between items-start gap-3 mb-2",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-black text-gray-900",children:a.student_name}),e.jsx("p",{className:`text-[10px] font-black uppercase tracking-widest mt-1 ${t?"text-red-600":"text-emerald-600"}`,children:a.topic})]}),e.jsxs("div",{className:"text-right shrink-0",children:[e.jsx("p",{className:"text-[10px] font-black text-gray-500",children:a.contact_date}),e.jsx("p",{className:"text-[10px] text-gray-400",children:n?n.toLocaleTimeString("es-ES",{hour:"2-digit",minute:"2-digit"}):""})]})]}),e.jsx("div",{className:"bg-white/90 border border-white rounded-2xl p-3",children:e.jsx("p",{className:"text-[12px] text-gray-700 leading-relaxed",children:a.notes})})]},a.id)})})]}),e.jsxs("div",{className:"bg-white p-6 rounded-[32px] shadow-[0_10px_40px_rgba(0,0,0,0.05)] border border-gray-100 relative overflow-hidden",children:[e.jsxs("div",{className:"flex justify-between items-start gap-4 mb-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-gray-500 text-[10px] font-black uppercase tracking-widest",children:"Seguimiento con fam
16ilias"}),e.jsx("h2",{className:"text-2xl font-black text-gray-900 mt-1",children:"Faltas justificadas"}),e.jsx("p",{className:"text-gray-400 text-[11px] mt-1 max-w-[280px]",children:"Aqui solo se registra que la falta fue justificada. Si hay recuperacion abierta, se marca aparte para decidir huecos sin confusion."})]}),e.jsxs("div",{className:"bg-gray-50 border border-gray-100 rounded-2xl px-4 py-3 text-right min-w-[92px]",children:[e.jsx("p",{className:"text-[9px] font-black uppercase tracking-widest text-gray-400",children:"Este mes"}),e.jsx("p",{className:"text-2xl font-black text-gray-900",children:Ca})]})]}),e.jsxs("div",{className:"flex gap-2 flex-wrap mb-4",children:[e.jsxs("span",{className:"bg-emerald-50 text-emerald-700 border border-emerald-100 text-[10px] font-black uppercase px-3 py-1.5 rounded-full",children:[M.length," alumnos con seguimiento"]}),e.jsxs("span",{className:"bg-amber-50 text-amber-700 border border-amber-100 text-[10px] font-black uppercase px-3 py-1.5 rounded-full",children:[Aa," con recuperacion abierta"]}),e.jsx("button",{onClick:()=>s("academic_radar"),className:"ml-auto bg-orange-50 text-orange-600 border border-orange-100 text-[10px] font-black uppercase px-3 py-1.5 rounded-full hover:bg-orange-100 transition-colors",children:"Ver huecos"}),e.jsx("button",{onClick:()=>s("students"),className:"bg-blue-50 text-[#1c74e9] border border-blue-100 text-[10px] font-black uppercase px-3 py-1.5 rounded-full hover:bg-blue-100 transition-colors",children:"Ver alumnos"})]}),M.length===0?e.jsxs("div",{className:"bg-gray-50 border border-gray-100 rounded-[24px] p-5 text-center",children:[e.jsx("p",{className:"text-[10px] font-black uppercase tracking-widest text-gray-400",children:"Sin faltas justificadas pendientes de vista general"}),e.jsx("p",{className:"text-[11px] text-gray-500 mt-2",children:"Cuando se marque una falta justificada, aparecera aqui con el profesor asociado para decidir rapido si conviene ofrecer algun hueco."})]}):e.jsx("div",{className:"space-y-3",children:M.map(a=>{const t=Number(a.openRecoveries||0)>0;return e.jsxs("div",{className:`rounded-[24px] border p-4 ${t?"bg-amber-50/70 border-amber-100":"bg-gray-50/90 border-gray-100"}`,children:[e.jsxs("div",{className:"flex justify-between items-start gap-3",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-sm font-black text-gray-900",children:a.studentName}),e.jsxs("p",{className:"text-[10px] font-black uppercase tracking-widest mt-1 text-gray-500",children:[a.count," falta",a.count===1?"":"s"," justificada",a.count===1?"":"s"]})]}),e.jsxs("div",{className:"text-right shrink-0",children:[e.jsx("p",{className:"text-[10px] font-black text-gray-500",children:a.lastDate?a.lastDate.split("-").reverse().join("/"):""}),e.jsx("p",{className:`mt-1 text-[8px] font-black uppercase px-2 py-1 rounded-lg border ${t?"bg-amber-100 text-amber-700 border-amber-200":"bg-white text-gray-500 border-gray-200"}`,children:t?`${a.openRecoveries} pendiente${a.openRecoveries===1?"":"s"}`:"solo informativa"})]})]}),e.jsxs("div",{className:"flex gap-2 flex-wrap mt-3",children:[e.jsx("span",{className:"bg-white text-gray-800 border border-gray-200 text-[10px] font-black px-3 py-1.5 rounded-full",children:a.teacherName}),e.jsx("span",{className:"bg-white text-gray-500 border border-gray-200 text-[10px] font-black px-3 py-1.5 rounded-full",children:a.levelLabel}),e.jsx("span",{className:"bg-white text-gray-500 border border-gray-200 text-[10px] font-black px-3 py-1.5 rounded-full",children:a.modalityLabel})]}),e.jsxs("div",{className:"mt-3 bg-white/90 border border-white rounded-2xl p-3",children:[e.jsx("p",{className:"text-[9px] font-black uppercase tracking-widest text-gray-400",children:"Ultima nota"}),e.jsx("p",{className:"text-[12px] text-gray-700 leading-relaxed mt-2",title:a.lastNote||"",children:na(a.lastNote||"Falta justificada registrada. Conviene revisar si hay hueco compatible en el radar.")})]})]},a.studentName)})})]}),e.jsxs("div",{className:"bg-white p-6 rounded-[32px] shadow-[0_10px_40px_rgba(0,0,0,0.05)] border border-gray-100 relative overflow-hidden",children:[e.jsxs("div",{className:"flex justify-between items-start gap-4 mb-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-gray-500 text-[10px] font-black uppercase tracking-widest",children:"Seguimiento con fam
16ilias"}),e.jsx("h2",{className:"text-2xl font-black text-gray-900 mt-1",children:"Recuperaciones pendientes"}),e.jsx("p",{className:"text-gray-400 text-[11px] mt-1 max-w-[260px]",children:"Aqui ves al alumnado con recuperaciones por recolocar para poder ofrecerle huecos operativos dentro del mes."})]}),e.jsxs("div",{className:"bg-gray-50 border border-gray-100 rounded-2xl px-4 py-3 text-right min-w-[92px]",children:[e.jsx("p",{className:"text-[9px] font-black uppercase tracking-widest text-gray-400",children:"Pendientes"}),e.jsx("p",{className:"text-2xl font-black text-gray-900",children:ka})]})]}),e.jsxs("div",{className:"flex gap-2 flex-wrap mb-4",children:[e.jsxs("span",{className:"bg-amber-50 text-amber-700 border border-amber-100 text-[10px] font-black uppercase px-3 py-1.5 rounded-full",children:[Y.length," alumnos con seguimiento"]}),e.jsx("button",{onClick:()=>s("students"),className:"ml-auto bg-blue-50 text-[#1c74e9] border border-blue-100 text-[10px] font-black uppercase px-3 py-1.5 rounded-full hover:bg-blue-100 transition-colors",children:"Ver alumnos"})]}),Y.length===0?e.jsxs("div",{className:"bg-gray-50 border border-gray-100 rounded-[24px] p-5 text-center",children:[e.jsx("p",{className:"text-[10px] font-black uppercase tracking-widest text-gray-400",children:"Sin recuperaciones pendientes"}),e.jsx("p",{className:"text-[11px] text-gray-500 mt-2",children:"Cuando anadas una recuperacion por falta justificada, aparecera aqui hasta que quede cerrada."})]}):e.jsx("div",{className:"space-y-3",children:Y.map(a=>e.jsxs("div",{className:"rounded-[24px] border p-4 bg-amber-50/70 border-amber-100",children:[e.jsxs("div",{className:"flex justify-between items-start gap-3 mb-2",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-black text-gray-900",children:a.studentName}),e.jsxs("p",{className:"text-[10px] font-black uppercase tracking-widest mt-1 text-amber-700",children:[a.openCount," recuperacion",a.openCount===1?"":"es"," pendiente",a.openCount===1?"":"s"]})]}),e.jsx("div",{className:"text-right shrink-0",children:e.jsx("p",{className:"text-[10px] font-black text-gray-500",children:a.lastDate?a.lastDate.split("-").reverse().join("/"):""})})]}),e.jsx("div",{className:"bg-white/90 border border-white rounded-2xl p-3",children:e.jsx("p",{className:"text-[12px] text-gray-700 leading-relaxed",children:a.lastNote||"Pendiente de revisar huecos y ofrecer opciones a la familia."})})]},a.studentName))})]}),e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsxs("div",{className:"order-2 bg-gradient-to-br from-[#0C6FAE] to-[#16A0EB] p-6 rounded-[32px] shadow-2xl text-white relative overflow-hidden border border-blue-400",children:[e.jsx("div",{className:"absolute -right-4 -bottom-4 text-8xl opacity-10",children:"ð¯"}),e.jsxs("h3",{className:"font-black text-sm uppercase tracking-widest flex items-center gap-2 mb-5 relative z-10 text-white",children:[e.jsx("span",{children:"ð"})," Rendimiento Comercial"]}),e.jsxs("div",{className:"flex items-center gap-5 border-b border-white/25 pb-5 mb-5 relative z-10",children:[e.jsxs("div",{className:"relative w-16 h-16 flex items-center justify-center shrink-0",children:[e.jsxs("svg",{className:"w-full h-full transform -rotate-90",viewBox:"0 0 36 36",children:[e.jsx("path",{className:"text-[#07537E]",strokeDasharray:"100, 100",d:"M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831",fill:"none",stroke:"currentColor",strokeWidth:"3"}),e.jsx("path",{className:"text-green-500 drop-shadow-[0_0_8px_rgba(34,197,94,0.5)] transition-all duration-1000 ease-out",strokeDasharray:`${Te}, 100`,d:"M18 2.0845 a 15.9155 15.9155 0 0 1 0 31.831 a 15.9155 15.9155 0 0 1 0 -31.831",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})]}),e.jsx("div",{className:"absolute flex flex-col items-center justify-center leading-none",children:e.jsxs("span",{className:"text-sm font-black text-white",children:[Te,"%"]})})]}),e.jsxs("div",{className:"flex-1 flex justify-between",children:[e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-[9px] text-blue-100 font-bold uppercase mb-1",children:"En Juego"}),e.jsx("p",{className:"text-xl font-black text-orange-200",children:ue.active})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-[9px] text-blue-100 font-bold uppercase mb-1",children:"Ganados"}),e.jsx("p",{className:"text-xl font-black text-green-400",children:ue.won})]}),e.jsxs("div",{className:"text-center",children:[e.jsx("p",{className:"text-[9px] text-blue-100 font-bold uppercase mb-1",children:"Perdidos"}),e.jsx("p",{className:"text-xl font-black text-red-400",children:ue.lost})]})]})]}),e.jsxs("div",{className:"relative z-10",children:[e.jsxs("p",{className:"text-blue-100 text-[10px] font-black uppercase tracking-widest mb-3 flex items-center gap-1.5",children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-[#FC9A05] animate-pulse"})," Top 3 Fugas de Capital"]}),e.jsx("div",{className:"space-y-3",children:sa===0?e.jsx("div",{className:"text-center py-3 bg-white/10 rounded-2xl border border-white/20",children:e.jsx("p",{className:"text-blue-50 text-[10px] font-bold uppercase",children:"Aún no has perdido ventas ð"})}):ta.map((a,t)=>e.jsxs("div",{className:"relative",children:[e.jsxs("div",{className:"flex justify-between text-[10px] font-black mb-1.5",children:[e.jsx("span",{className:"text-white truncate pr-2",children:a.reason}),e.jsxs("span",{className:"text-blue-100",children:[a.count," (",a.percentage,"%)"]})]}),e.jsx("div",{className:"w-full bg-white/20 h-1.5 rounded-full overflow-hidden",children:e.jsx("div",{className:`h-full rounded-full transition-all duration-1000 ${t===0?"bg-red-500 shadow-[0_0_8px_rgba(239,68,68,0.5)]":t===1?"bg-orange-400":"bg-blue-400"}`,style:{width:`${a.percentage}%`}})})]},t))})]})]}),e.jsxs("div",{className:"order-1 bg-white p-6 rounded-[32px] shadow-[0_10px_40px_rgba(0,0,0,0.05)] border border-gray-100 relative overflow-hidden",children:[e.jsxs("div",{className:"flex justify-between items-start mb-4 relative z-10",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-gray-500 text-[10px] font-black uppercase tracking-widest",children:"Control de Cierre"}),e.jsx("h2",{className:"text-2xl font-black text-gray-900 mt-1",children:y.monthLabel})]}),e.jsx("span",{className:`border font-bold text-[10px] px-2 py-1 rounded-lg uppercase ${ja}`,children:fa})]}),e.jsxs("div",{className:"flex justify-between items-end mb-2 relative z-10",children:[e.jsxs("div",{children:[e.jsxs("p",{className:"text-3xl font-black text-[#1c74e9]",children:[y.completionRate,"%"]}),e.jsx("p",{className:"text-gray-400 text-[10px] font-bold uppercase tracking-widest",children:"Informes Completados"})]}),e.jsxs("div",{className:"text-right",children:[e.jsxs("p",{className:"text-gray-900 font-black text-sm",children:[y.pendingTeachers," Pendientes"]}),e.jsx("p",{className:"text-gray-400 text-[10px] font-bold uppercase",children:va})]})]}),e.jsx("div",{className:"w-full bg-gray-50 h-3 rounded-full mt-2 overflow-hidden border border-gray-100 relative z-10",children:e.jsx("div",{className:"bg-gradient-to-r from-[#1c74e9] via-blue-400 to-cyan-300 h-full rounded-full shadow-sm transition-all duration-1000",style:{width:`${y.completionRate}%`}})}),e.jsx("button",{onClick:ha,disabled:y.pendingTeachers===0,className:`w-full mt-5 py-3 rounded-2xl text-[10px] font-black uppercase tracking-widest border transition-colors flex items-center justify-center gap-2 ${y.pendingTeachers===0?"bg-gray-50 text-gray-400 border-gray-100 cursor-not-allowed":"bg-orange-50 text-orange-600 border-orange-100 hover:bg-orange-100"}`,children:e.jsx("span",{children:ya})}),e.jsx("p",{className:"text-[9px] text-gray-400 mt-4 italic relative z-10",children:Na}),e.jsx("p",{className:"hidden",children:y.totalTeachers===0?"* TodavÃa no hay profesorado con clases activas en este curso.":"* Los recibos de WhatsApp estarán listos al llegar al 100%."}),e.jsx("div",{className:"absolute -right-4 -bottom-4 w-24 h-24 bg-blue-50 rounded-full opacity-50"})]})]}),e.jsxs("button",{onClick:ua,className:`w-full p-5 rounded-[24px] font-black flex justify-between items-center transition-all ${L?"bg-orange-600 text-white shadow-lg":"bg-gradient-to-r from-orange-500 to-orange-400 text-white shadow-lg shadow-orange-500/30"}`,children:[e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-xl",children:"ð"})," ",L?"CERRAR BITÃCORA":"VER BITÃCORA GLOBAL"]}),e.jsx("span",{className:`text-2xl transition-transform ${L?"rotate-90":""}`,children:"âº"})]}),L&&e.jsxs("div",{className:"bg-white p-6 rounded-[32px] shadow-[0_10px_40px_rgba(0,0,0,0.05)] border border-gray-100 animate-in slide-in-from-top-4",children:[e.jsxs("div",{className:"mb-5",children:[e.jsxs("div",{className:"flex justify-between items-start gap-3",children:[e.jsxs("h3",{className:"text-gray-900 font-black flex items-center gap-2",children:[e.jsx("span",{children:"ð"})," Bitácora de familias"]}
16),e.jsx("span",{className:"shrink-0 text-[10px] bg-orange-50 text-orange-600 font-black uppercase px-2 py-1 rounded-md border border-orange-100",children:ie?"Cargando":`${V.length} registros`})]}),e.jsx("p",{className:"mt-2 text-[11px] leading-relaxed text-gray-500 font-medium",children:"Historial de llamadas, WhatsApp, acuerdos, faltas y recuperaciones. Sirve para saber qué se habló y qué ocurrió con cada familia."}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 mt-4 p-1.5 bg-gray-50 rounded-2xl border border-gray-100",children:[e.jsx("button",{type:"button",onClick:()=>De("current_course"),className:`px-3 py-2.5 rounded-xl text-[9px] font-black uppercase transition-all ${U==="current_course"?"bg-[#0C6FAE] text-white shadow-sm":"text-gray-500 hover:bg-white"}`,children:"Curso 2026/27"}),e.jsx("button",{type:"button",onClick:()=>De("history"),className:`px-3 py-2.5 rounded-xl text-[9px] font-black uppercase transition-all ${U==="history"?"bg-[#FC9A05] text-white shadow-sm":"text-gray-500 hover:bg-white"}`,children:"Histórico anterior"})]})]}),e.jsx("div",{className:"space-y-3",children:ie?e.jsx("div",{className:"flex justify-center py-8",children:e.jsx("div",{className:"w-6 h-6 border-4 border-orange-500 border-t-transparent rounded-full animate-spin"})}):ce?e.jsxs("div",{className:"text-center py-8 bg-red-50 rounded-2xl border border-red-100",children:[e.jsx("p",{className:"text-red-600 text-xs font-bold",children:ce}),e.jsx("button",{type:"button",onClick:()=>void be(U),className:"mt-3 px-4 py-2 rounded-xl bg-white border border-red-200 text-[9px] font-black uppercase text-red-600",children:"Reintentar"})]}):V.length===0?e.jsxs("div",{className:"text-center py-8 bg-gray-50 rounded-2xl border border-gray-100",children:[e.jsx("p",{className:"text-gray-700 text-xs font-black uppercase",children:U==="current_course"?"Sin registros en este curso":"No hay registros anteriores"}),U==="current_course"&&e.jsx("p",{className:"mt-2 text-[10px] text-gray-500 font-medium",children:"Los datos de la prueba siguen guardados en Histórico anterior."})]}):V.slice(0,de).map(a=>e.jsxs("div",{className:"bg-orange-50/50 p-4 rounded-2xl border border-orange-100 relative hover:border-orange-300 transition-colors",children:[e.jsxs("div",{className:"flex justify-between items-start mb-2",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-black text-gray-900",children:a.student_name}),e.jsx("p",{className:"text-[10px] font-bold text-orange-600 uppercase mt-0.5",children:a.topic})]}),e.jsxs("div",{className:"text-right",children:[e.jsx("p",{className:"text-[9px] font-bold text-gray-500 uppercase",children:new Date(a.created_at).toLocaleDateString()}),e.jsx("p",{className:"text-[9px] font-black text-gray-400 mt-0.5 bg-white px-2 py-0.5 rounded-md border border-gray-100",children:a.contact_date})]})]}),e.jsx("div",{className:"bg-white p-3 rounded-xl border border-orange-100/50 mt-2",children:e.jsxs("p",{className:"text-xs text-gray-700 font-medium italic",children:['"',a.notes,'"']})})]},a.id))}),!ie&&!ce&&V.length>0&&e.jsxs("div",{className:"flex gap-2 mt-4 pt-4 border-t border-gray-100",children:[de<V.length&&e.jsx("button",{type:"button",onClick:()=>Q(a=>a+5),className:"flex-1 py-3 rounded-2xl border border-[#0C6FAE]/20 bg-blue-50 text-[#0C6FAE] text-[9px] font-black uppercase",children:"Mostrar 5 más"}),de>5&&e.jsx("button",{type:"button",onClick:()=>Q(5),className:"flex-1 py-3 rounded-2xl border border-gray-200 bg-white text-gray-500 text-[9px] font-black uppercase",children:"Volver a 5"})]})]}),e.jsxs("button",{onClick:()=>s("calendar"),className:"w-full bg-gradient-to-r from-blue-600 to-blue-500 text-white p-5 rounded-[24px] font-black flex justify-between items-center shadow-lg shadow-blue-500/30 active:scale-95 transition-all",children:[e.jsxs("span",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-xl",children:"ð
"})," Gestionar Agenda"]}),e.jsx("span",{className:"text-2xl",children:">"})]}),e.jsxs("div",{className:"bg-white p-6 mt-6 rounded-[32px] shadow-[0_10px_40px_rgba(0,0,0,0.05)] border border-gray-100",children:[e.jsxs("div",{className:"flex justify-between items-center mb-4",children:[e.jsx("h3",{className:"text-gray-900 font-black",children:"Accesos Rápidos"}),e.jsxs("button",{onClick:ma,className:"text-[10px] bg-gray-100 text-gray-600 font-black uppercase px-3 py-1.5 rounded-full hover:bg-gray-200 transition-colors flex items-center gap-1 active:scale-95",children:[e.jsx("span",{children:"âï¸"})," Permisos"]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("button",{onClick:()=>s("leads"),className:"bg-white p-4 rounded-[24px] border border-orange-200 shadow-sm hover:border-orange-500 transition-all text-left flex flex-col justify-between h-32 group relative overflow-hidden active:scale-95",children:[e.jsx("div",{className:"absolute top-0 right-0 w-16 h-16 bg-orange-50 rounded-bl-full -z-10 group-hover:scale-150 transition-transform"}),e.jsxs("div",{className:"flex justify-between",children:[e.jsx("span",{className:"text-3xl group-hover:scale-110 transition-transform",children:"ð§²"}),pe>0&&e.jsxs("span",{className:"bg-orange-500 text-white text-[10px] font-black px-2 py-1 rounded-full animate-pulse shadow-sm",children:[pe," NUEVOS"]})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-orange-600 font-black text-sm uppercase tracking-widest mb-1",children:"Radar Leads"}),e.jsx("p",{className:"text-gray-400 text-[10px] font-bold leading-tight",children:"Padres de la web"})]})]}),e.jsxs("button",{onClick:()=>s("reports"),className:"bg-blue-50 p-4 rounded-2xl text-left border border-blue-100 hover:border-blue-400 hover:bg-blue-100 transition-all group relative",children:[we>0&&e.jsxs("span",{className:"absolute top-2 right-2 bg-red-500 text-white text-[8px] font-black px-2 py-0.5 rounded-full animate-bounce shadow-sm",children:[we," PEND."]}),e.jsx("div",{className:"text-2xl mb-2 group-hover:scale-110 transition-transform text-blue-600 font-black",children:"DOC"}),e.jsx("p",{className:"font-bold text-gray-900 text-sm",children:"Informes"}),e.jsx("p",{className:"text-blue-600 text-[10px] uppercase font-black",children:"Aprobacion mensual"})]}),e.jsxs("button",{onClick:()=>s("students"),className:"bg-gray-50 p-4 rounded-2xl text-left border border-gray-100 hover:border-[#1c74e9] hover:bg-blue-50 transition-all group",children:[e.jsx("div",{className:"text-2xl mb-2 group-hover:scale-110 transition-transform",children:"ð"}),e.jsx("p",{className:"font-bold text-gray-900 text-sm",children:"Alumnos"}),e.jsx("p",{className:"text-gray-500 text-[10px] uppercase font-black",children:"Tu CRM"})]}),e.jsxs("button",{onClick:()=>s("monitors"),className:"bg-orange-50 p-4 rounded-2xl text-left border border-orange-100 hover:border-orange-400 transition-all group",children:[e.jsx("div",{className:"text-2xl mb-2 group-hover:scale-110 transition-transform",children:"ð¨âð«"}),e.jsx("p",{className:"font-bold text-gray-900 text-sm",children:"Monitores"}),e.jsx("p",{className:"text-orange-500 text-[10px] uppercase font-black",children:"Tu Equipo"})]}),e.jsxs("button",{onClick:()=>s("billing"),className:"bg-gray-50 p-4 rounded-2xl text-left border border-gray-100 hover:border-green-400 hover:bg-green-50 transition-all group",children:[e.jsx("div",{className:"text-2xl mb-2 group-hover:scale-110 transition-transform",children:"ð¶"}),e.jsx("p",{className:"font-bold text-gray-900 text-sm",children:"Finanzas"}),e.jsx("p",{className:"text-gray-500 text-[10px] uppercase font-black",children:"Caja"})]}),e.jsxs("button",{onClick:()=>s("pricing"),className:"bg-emerald-50 p-4 rounded-2xl text-left border border-emerald-100 hover:border-emerald-400 hover:bg-emerald-100 transition-all group",children:[e.jsx("div",{className:"text-2xl mb-2 group-hover:scale-110 transition-transform",children:"ð"}),e.jsx("p",{className:"font-bold text-gray-900 text-sm",children:"Tarifas"}),e.jsx("p",{className:"text-emerald-600 text-[10px] uppercase font-black",children:"Precios y Links"})]}),e.jsxs("button",{onClick:()=>s("links_qr"),className:"bg-sky-50 p-4 rounded-2xl text-left border border-sky-100 hover:border-[#1c74e9] hover:bg-blue-50 transition-all group relative overflow-hidden",children:[e.jsx("div",{className:"absolute top-0 right-0 w-16 h-16 bg-white rounded-bl-full -z-10 group-hover:scale-150 transition-transform"}),e.jsx("div",{className:"text-2xl mb-2 group-hover:scale-110 transition-transform text-[#1c74e9] font-black",children:"QR"}),e.jsx("p",{className:"font-bold text-gray-900 text-sm",children:"Enlaces y QR"}),e.jsx("p",{className:"text-[#1c74e9] text-[10px] uppercase font-black",children:"Carteles y tokens"})]}),e.jsxs("button",{onClick:()=>s("candidates"),className:"bg-emerald-50 p-4 rounded-2xl text-left border border-emerald-100 hover:border-emerald-400 transition-all group relative",children:[oe>0&&e.jsxs("span",{className:"absolute top-2 right-2 bg-red-500 text-white text-[8px] font-black px-2 py-0.5 rounded-full animate-bounce shadow-sm",children:[oe," NUEVOS"]}),e.jsx("div",{className:"text-2xl mb-2 group-hover:scale-110 transition-transform",children:"ð"}),e.jsx("p",{className:"font-bold text-gray-900 text-sm",children:"Candidatos"}),e.jsx("p",{className:"text-emerald-600 text-[10px] uppercase font-black",children:"RRHH"})]}),e.jsxs("button",{onClick:()=>s("coordinator"),className:"bg-blue-50 p-4 rounded-2xl text-left border border-blue-100 hover:border-blue-400 transition-all group",children:[e.jsx("div",{className:"text-2xl mb-2 group-hover:scale-110 transition-transform",children:"ð¨âð¼"}),e.jsx("p",{className:"font-bold text-gray-900 text-sm",children:"Coordinador"}),e.jsx("p",{className:"text-blue-500 text-[10px] uppercase font-black",children:"Panel"})]}),e.jsxs("button",{onClick:()=>s("holidays"),className:"bg-purple-50 p-4 rounded-2xl text-left border border-purple-100 hover:border-purple-300 transition-all group",children:[e.jsx("div",{className:"text-2xl mb-2 group-hover:scale-110 transition-transform",children:"ðï¸"}),e.jsx("p",{className:"font-bold text-gray-900 text-sm",children:"Festivos"}),e.jsx("p",{className:"text-purple-500 text-[10px] uppercase font-black",children:"Vacaciones"})]}),e.jsxs("button",{onClick:()=>s("academic_radar"),className:"bg-orange-50 p-4 rounded-2xl text-left border border-orange-100 hover:border-orange-400 hover:bg-orange-100 transition-all group relative overflow-hidden",children:[e.jsx("div",{className:"absolute top-0 right-0 w-16 h-16 bg-blue-100 rounded-bl-full -z-10 group-hover:scale-150 transition-transform"}),e.jsx("div",{className:"text-2xl mb-2 group-hover:scale-110 transition-transform text-orange-600 font-black",children:"RAD"}),e.jsx("p",{className:"font-bold text-gray-900 text-sm",children:"Radar Academico"}),e.jsx("p",{className:"text-orange-600 text-[10px] uppercase font-black",children:"Grupos y huecos"})]})]})]}),aa&&e.jsx("div",{className:"fixed inset-0 bg-gray-900/80 backdrop-blur-sm z-[10000] p-4 flex justify-center items-center",children:e.jsx("div",{className:"bg-white w-full max-w-sm rounded-[32px] shadow-2xl animate-in zoom-in-95 overflow-hidden",children:e.jsxs("form",{onSubmit:ga,className:"p-6",children:[e.jsxs("h3",{className:"text-xl font-black text-gray-900 mb-1 flex items-center gap-2",children:[e.jsx("span",{children:"â¡"})," Familia interesada"]}),e.jsx("p",{className:"text-[10px] text-orange-500 font-bold uppercase mb-6 tracking-widest",children:"Registro interno de coordinación"}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"rounded-2xl border border-orange-100 bg-orange-50 px-4 py-3",children:[e.jsx("p",{className:"text-[10px] font-black uppercase tracking-widest text-orange-600",children:"Uso interno"}),e.jsx("p",{className:"text-[11px] text-orange-900 font-bold mt-2 leading-relaxed",children:"Este registro entra en el mismo
16seguimiento comercial que el formulario rápido de academia, pero con el estilo interno de coordinación."})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-[9px] font-black text-gray-400 uppercase tracking-widest block mb-1 ml-1",children:"Origen"}),e.jsx("select",{value:r.origin,onChange:a=>h({...r,origin:a.target.value}),className:"w-full bg-gray-50 border-gray-100 p-3 rounded-xl text-xs font-bold outline-none border focus:border-orange-500",children:te.map(a=>e.jsx("option",{value:a.value,children:a.label},a.value))})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-[9px] font-black text-gray-400 uppercase tracking-widest block mb-1 ml-1",children:"Atendida por"}),e.jsx("input",{value:r.attended_by,onChange:a=>h({...r,attended_by:a.target.value}),placeholder:"Ej: Gabriela",className:"w-full bg-gray-50 p-3 rounded-xl text-xs font-bold outline-none border border-gray-100 focus:border-orange-500"})]})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsx("input",{required:!0,placeholder:"Nombre tutor *",value:r.parent_first_name,onChange:a=>h({...r,parent_first_name:a.target.value}),className:"bg-gray-50 p-3 rounded-xl text-xs font-bold outline-none border border-gray-100 focus:border-orange-500"}),e.jsx("input",{required:!0,placeholder:"Apellidos tutor *",value:r.parent_last_name,onChange:a=>h({...r,parent_last_name:a.target.value}),className:"bg-gray-50 p-3 rounded-xl text-xs font-bold outline-none border border-gray-100 focus:border-orange-500"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsx("input",{required:!0,placeholder:"Nombre alumno *",value:r.student_first_name,onChange:a=>h({...r,student_first_name:a.target.value}),className:"bg-gray-50 p-3 rounded-xl text-xs font-bold outline-none border border-gray-100 focus:border-orange-500"}),e.jsx("input",{required:!0,placeholder:"Apellidos alumno *",value:r.student_last_name,onChange:a=>h({...r,student_last_name:a.target.value}),className:"bg-gray-50 p-3 rounded-xl text-xs font-bold outline-none border border-gray-100 focus:border-orange-500"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsx("input",{required:!0,placeholder:"Teléfono *",value:r.phone,onChange:a=>h({...r,phone:a.target.value}),className:"bg-gray-50 p-3 rounded-xl text-xs font-bold outline-none border border-gray-100 focus:border-orange-500"}),e.jsx("input",{type:"email",placeholder:"Email (opcional)",value:r.email,onChange:a=>h({...r,email:a.target.value}),className:"bg-gray-50 p-3 rounded-xl text-xs font-bold outline-none border border-gray-100 focus:border-orange-500"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsx("input",{required:!0,placeholder:"Localidad *",value:r.locality,onChange:a=>h({...r,locality:a.target.value}),className:"bg-gray-50 p-3 rounded-xl text-xs font-bold outline-none border border-gray-100 focus:border-orange-500"}),e.jsx("input",{placeholder:"Provincia",value:r.province,onChange:a=>h({...r,province:a.target.value}),className:"bg-gray-50 p-3 rounded-xl text-xs font-bold outline-none border border-gray-100 focus:border-orange-500"})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[e.jsxs("select",{value:r.level,onChange:a=>h({...r,level:a.target.value}),className:"bg-gray-50 p-3 rounded-xl text-xs font-bold outline-none border border-gray-100 focus:border-orange-500",children:[e.jsx("option",{value:"",children:"Curso exacto *"}),G.map(a=>e.jsx("option",{value:a,children:a},a))]}),e.jsx("select",{value:r.modality,onChange:a=>h({...r,modality:a.target.value}),className:"bg-gray-50 p-3 rounded-xl text-xs font-bold outline-none border border-gray-100 focus:border-orange-500",children:$.map(a=>e.jsx("option",{value:a,children:a},a))})]}),e.jsxs("select",{value:r.subjects,onChange:a=>h({...r,subjects:a.target.value}),className:"w-full bg-gray-50 p-3 rounded-xl text-xs font-bold outline-none border border-gray-100 focus:border-orange-500",children:[e.jsx("option",{value:"",children:"Asignatura principal *"}),H.map(a=>e.jsx("option",{value:a,children:a},a))]}),e.jsx("input",{value:r.school_name,onChange:a=>h({...r,school_name:a.target.value}
16),placeholder:"Colegio / instituto (opcional)",className:"w-full bg-gray-50 p-3 rounded-xl text-xs font-bold outline-none border border-gray-100 focus:border-orange-500"}),e.jsx("input",{value:r.availability,onChange:a=>h({...r,availability:a.target.value}),placeholder:"Horario comentado",className:"w-full bg-gray-50 p-3 rounded-xl text-xs font-bold outline-none border border-gray-100 focus:border-orange-500"}),e.jsx("textarea",{rows:4,placeholder:"Observación rápida",value:r.notes,onChange:a=>h({...r,notes:a.target.value}),className:"w-full bg-gray-50 p-3 rounded-xl text-xs font-bold outline-none border border-gray-100 focus:border-orange-500 resize-none"})]}),e.jsxs("div",{className:"flex gap-2 mt-6",children:[e.jsx("button",{type:"button",onClick:()=>xe(!1),className:"flex-1 py-4 text-[10px] font-black uppercase text-gray-400 bg-gray-100 rounded-2xl",children:"Cancelar"}),e.jsx("button",{type:"submit",disabled:Re,className:"flex-1 py-4 text-[10px] font-black uppercase text-white bg-orange-500 rounded-2xl shadow-lg shadow-orange-500/20 active:scale-95 transition-all",children:Re?"Guardando...":"Guardar contacto"})]})]})})}),Ge&&e.jsx("div",{className:"fixed inset-0 bg-gray-900/80 backdrop-blur-sm z-[9999] p-4 flex justify-center items-center",children:e.jsxs("div",{className:"bg-white w-full max-w-sm rounded-[32px] shadow-2xl animate-in fade-in zoom-in-95 overflow-hidden flex flex-col max-h-[90vh]",children:[e.jsxs("div",{className:"bg-gray-900 p-6 text-center relative shrink-0",children:[e.jsx("button",{onClick:()=>ne(!1),className:"absolute top-4 right-4 text-gray-400 hover:text-white font-black text-xl",children:"Ã"}),e.jsx("div",{className:"w-12 h-12 bg-white/10 rounded-full flex items-center justify-center text-2xl mx-auto mb-3 border border-white/20",children:"ðï¸"}),e.jsx("h3",{className:"text-xl font-black italic text-white mb-1",children:"Caja de Fusibles"}),e.jsx("p",{className:"text-[10px] text-gray-400 font-black uppercase tracking-widest",children:"Permisos especiales de profesores"})]}),e.jsx("div",{className:"p-6 overflow-y-auto flex-1",children:He?e.jsx("p",{className:"text-center text-gray-400 text-xs font-bold uppercase py-10",children:"Cargando fusibles..."}):le.length===0?e.jsx("p",{className:"text-center text-gray-400 text-xs font-bold uppercase py-10",children:"No hay profesores registrados."}):le.map(a=>e.jsxs("div",{className:"mb-6 last:mb-0",children:[e.jsxs("div",{className:"mb-3 border-b border-gray-100 pb-2",children:[e.jsx("p",{className:"font-black text-sm text-[#1c74e9] uppercase tracking-tight",children:a.name||a.email}),e.jsx("p",{className:"text-[9px] font-bold text-gray-400 uppercase mt-1",children:a.email})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"bg-violet-50 border border-violet-100 rounded-2xl p-3",children:e.jsxs("div",{className:"flex justify-between items-center gap-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-[11px] font-black text-violet-900",children:"Captar visitas"}),e.jsx("p",{className:"text-[8px] font-bold text-violet-600 uppercase",children:"Registrar familias interesadas"})]}),e.jsx("button",{onClick:()=>Ie(a.uniqueId,"can_capture_walkin_leads",!!a.can_capture_walkin_leads),className:`w-12 h-6 rounded-full transition-colors relative ${a.can_capture_walkin_leads?"bg-violet-500":"bg-gray-300"}`,children:e.jsx("div",{className:`w-5 h-5 bg-white rounded-full absolute top-0.5 transition-all ${a.can_capture_walkin_leads?"left-6":"left-0.5"}`})})]})}),e.jsx("div",{className:"bg-emerald-50 border border-emerald-100 rounded-2xl p-3",children:e.jsxs("div",{className:"flex justify-between items-center gap-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-[11px] font-black text-emerald-900",children:"Crear clases extra"}),e.jsx("p",{className:"text-[8px] font-bold text-emerald-600 uppercase",children:"Solo alumnos ya asignados"})]}),e.jsx("button",{onClick:()=>Ie(a.uniqueId,"can_create_extra_classes",!!a.can_create_extra_classes),className:`w-12 h-6 rounded-full transition-colors relative ${a.can_create_extra_classes?"bg-emerald-500":"bg-gray-300"}`,children:e.jsx("div",{className:`w-5 h-5 bg-white rounded-full absolute top-0.5 transition-all ${a.can_create_extra_classes?"left-6":"left-0.5"}`})})]})}),e.jsx("p",{className:"text-[9px] font-black uppercase tracking-widest text-gray-400 pt-1",children:"Permisos de coordinación puntuales"}),e.jsxs("div",{className:"flex justify-between items-center bg-gray-50 p-3 rounded-2xl border border-gray-100",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-[11px] font-black text-gray-900",children:"Bitácora Padres"}),e.jsx("p",{className:"text-[8px] font-bold text-gray-400 uppercase",children:"Anotar llamadas"})]}),e.jsx("button",{onClick:()=>I(a.uniqueId,"can_use_bitacora",a.permissions.can_use_bitacora),className:`w-12 h-6 rounded-full transition-colors relative ${a.permissions.can_use_bitacora?"bg-green-500":"bg-gray-300"}`,children:e.jsx("div",{className:`w-5 h-5 bg-white rounded-full absolute top-0.5 transition-all ${a.permissions.can_use_bitacora?"left-6":"left-0.5"}`})})]}),e.jsxs("div",{className:"flex justify-between items-center bg-gray-50 p-3 rounded-2xl border border-gray-100",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-[11px] font-black text-gray-900",children:"Validar Clases"}),e.jsx("p",{className:"text-[8px] font-bold text-gray-400 uppercase",children:"Aprobar horas profes"})]}),e.jsx("button",{onClick:()=>I(a.uniqueId,"can_validate_classes",a.permissions.can_validate_classes),className:`w-12 h-6 rounded-full transition-colors relative ${a.permissions.can_validate_classes?"bg-green-500":"bg-gray-300"}`,children:e.jsx("div",{className:`w-5 h-5 bg-white rounded-full absolute top-0.5 transition-all ${a.permissions.can_validate_classes?"left-6":"left-0.5"}`})})]}),e.jsxs("div",{className:"flex justify-between items-center bg-gray-50 p-3 rounded-2xl border border-gray-100",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-[11px] font-black text-gray-900",children:"Radar Equipo"}),e.jsx("p",{className:"text-[8px] font-bold text-gray-400 uppercase",children:"Ver contactos profes"})]}),e.jsx("button",{onClick:()=>I(a.uniqueId,"can_view_team",a.permissions.can_view_team),className:`w-12 h-6 rounded-full transition-colors relative ${a.permissions.can_view_team?"bg-green-500":"bg-gray-300"}`,children:e.jsx("div",{className:`w-5 h-5 bg-white rounded-full absolute top-0.5 transition-all ${a.permissions.can_view_team?"left-6":"left-0.5"}`})})]}),e.jsxs("div",{className:"flex justify-between items-center bg-gray-50 p-3 rounded-2xl border border-gray-100",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-[11px] font-black text-gray-900",children:"Directorio Alumnos"}),e.jsx("p",{className:"text-[8px] font-bold text-gray-400 uppercase",children:"Ver CRM de familias"})]}),e.jsx("button",{onClick:()=>I(a.uniqueId,"can_view_students",a.permissions.can_view_students),className:`w-12 h-6 rounded-full transition-colors relative ${a.permissions.can_view_students?"bg-green-500":"bg-gray-300"}`,children:e.jsx("div",{className:`w-5 h-5 bg-white rounded-full absolute top-0.5 transition-all ${a.permissions.can_view_students?"left-6":"left-0.5"}`})})]}),e.jsxs("div",{className:"flex justify-between items-center bg-gray-50 p-3 rounded-2xl border border-gray-100",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-[11px] font-black text-gray-900",children:"Asignar Profes"}),e.jsx("p",{className:"text-[8px] font-bold text-gray-400 uppercase",children:"Emparejar alumnos"})]}),e.jsx("button",{onClick:()=>I(a.uniqueId,"can_assign_students",a.permissions.can_assign_students),className:`w-12 h-6 rounded-full transition-colors relative ${a.permissions.can_assign_students?"bg-green-500":"bg-gray-300"}`,children:e.jsx("div",{className:`w-5 h-5 bg-white rounded-full absolute top-0.5 transition-all ${a.permissions.can_assign_students?"left-6":"left-0.5"}`})})]}),e.jsxs("div",{className:"flex justify-between items-center bg-gray-50 p-3 rounded-2xl border border-gray-100",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-[11px] font-black text-gray-900",children:"Agenda Centro"}),e.jsx("p",{className:"text-[8px] font-bold text-gray-400 uppercase",children:"Programar clases"})]}),e.jsx("button",{onClick:()=>I(a.uniqueId,"can_manage_calendar",a.permissions.can_manage_calendar),
16className:`w-12 h-6 rounded-full transition-colors relative ${a.permissions.can_manage_calendar?"bg-green-500":"bg-gray-300"}`,children:e.jsx("div",{className:`w-5 h-5 bg-white rounded-full absolute top-0.5 transition-all ${a.permissions.can_manage_calendar?"left-6":"left-0.5"}`})})]})]})]},a.uniqueId))}),e.jsx("div",{className:"p-4 bg-gray-50 border-t border-gray-100 shrink-0",children:e.jsx("button",{onClick:()=>ne(!1),className:"w-full bg-[#1c74e9] hover:bg-blue-700 text-white font-black py-4 rounded-2xl shadow-lg uppercase tracking-widest text-[10px] transition-all active:scale-95",children:"Guardar y Cerrar"})})]})})]})},Me=()=>{const[s,b]=d.useState("home"),[G,H]=d.useState(null),[te,$]=d.useState(null),[W,J]=d.useState("leads"),F=d.useRef(null),P=async()=>{window.confirm("¿Cerrar sesión?")&&(await m.auth.signOut(),window.location.reload())},je=k=>{$(k),b("billing")},u=(k,se)=>{k!=="billing"&&$(null),k==="coordinator"&&J(se||"leads"),b(k),window.requestAnimationFrame(()=>{var C;return(C=F.current)==null?void 0:C.scrollTo({top:0,behavior:"auto"})})};return e.jsx("div",{className:"min-h-screen bg-[#101922] flex justify-center items-center p-0 sm:p-4 font-sans selection:bg-blue-200",children:e.jsxs("div",{className:"w-full max-w-[430px] bg-[#F5F7FA] h-screen sm:h-[850px] sm:max-h-[90vh] sm:rounded-[40px] shadow-2xl overflow-hidden relative border-x border-gray-800/20 flex flex-col",children:[e.jsx("div",{className:"h-1.5 w-full bg-gradient-to-r from-[#16A0EB] to-[#FC9A05] absolute top-0 left-0 z-50"}),e.jsx("div",{ref:F,className:"flex-1 overflow-y-auto pt-2 pb-24 scrollbar-hide",children:e.jsxs(v.Suspense,{fallback:e.jsx(rt,{}),children:[s==="home"&&e.jsx(nt,{onNavigate:u}),s==="leads"&&e.jsx(Xa,{onBack:()=>u("home")}),s==="calendar"&&e.jsx(Ga,{onBack:()=>u("home")}),s==="billing"&&e.jsx(Ha,{onBack:()=>u("home"),focusStudentName:te}),s==="students"&&e.jsx(Wa,{onBack:()=>u("home"),onOpenBillingForStudent:je}),s==="holidays"&&e.jsx(Ja,{onBack:()=>u("home")}),s==="pricing"&&e.jsx(Za,{onBack:()=>u("home")}),s==="links_qr"&&e.jsx(et,{onBack:()=>u("home")}),s==="reports"&&e.jsx(tt,{onBack:()=>u("home")}),s==="academic_radar"&&e.jsx(st,{onBack:()=>u("home")}),s==="monitors"&&e.jsx(Ya,{onBack:()=>u("home"),onSpyMonitor:k=>{H(k),b("spy_monitor")}}),s==="coordinator"&&e.jsx(Qa,{onBack:()=>u("home"),adminView:!0,initialTab:W,onOpenAdminCalendar:()=>u("calendar")}),s==="candidates"&&e.jsx(Ka,{onBack:()=>u("home")}),s==="spy_monitor"&&G&&e.jsx(at,{previewEmail:G,onBack:()=>{H(null),b("monitors")}})]})}),e.jsxs("div",{className:"absolute bottom-0 left-0 w-full bg-white/90 backdrop-blur-md border-t border-gray-100 flex justify-around items-center pb-safe pt-2 px-2 z-[9000] shadow-[0_-10px_40px_rgba(0,0,0,0.05)]",children:[e.jsxs("button",{onClick:()=>u("home"),className:`flex flex-col items-center p-3 transition-colors ${s==="home"?"text-[#1c74e9]":"text-gray-400"}`,children:[e.jsx("span",{className:"text-xl mb-1",children:"ð "}),e.jsx("span",{className:"text-[9px] font-black uppercase tracking-widest",children:"Inicio"})]}),e.jsxs("button",{onClick:()=>u("calendar"),className:`flex flex-col items-center p-3 transition-colors ${s==="calendar"?"text-orange-500":"text-gray-400"}`,children:[e.jsx("span",{className:"text-xl mb-1",children:"ð
"}),e.jsx("span",{className:"text-[9px] font-black uppercase tracking-widest",children:"Agenda"})]}),e.jsxs("button",{onClick:()=>u("students"),className:`flex flex-col items-center p-3 transition-colors ${s==="students"?"text-[#1c74e9]":"text-gray-400"}`,children:[e.jsx("span",{className:"text-xl mb-1",children:"ð"}),e.jsx("span",{className:"text-[9px] font-black uppercase tracking-widest",children:"Alumnos"})]}),e.jsxs("button",{onClick:()=>{$(null),b("billing")},className:`flex flex-col items-center p-3 transition-colors ${s==="billing"?"text-green-500":"text-gray-400"}`,children:[e.jsx("span",{className:"text-xl mb-1",children:"ð¶"}),e.jsx("span",{className:"text-[9px] font-black uppercase tracking-widest",children:"Caja"})]}),e.jsxs("button",{onClick:P,className:"flex flex-col items-center p-3 text-red-400",children:[e.jsx("span",{className:"text-xl mb-1",children:"ðª"}),e.jsx("span",{className:"text-[9px] font-black uppercase tracking-widest",children:"Salir"})]})]})]})})},pt=Object.freeze(Object.defineProperty({__proto__:null,AdminShell:Me,default:Me},Symbol.toStringTag,{value:"Module"}));
16export{pt as A,xt as i};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.