1import{j as e,A as h,m as i}from"./animations-DXJ-Doyp.js";import{r as a,u as Ye}from"./vendor-D9bcxwOD.js";import{s as d}from"./index-z92xQmuz.js";import{c as u,U as w,A as q,q as E,a3 as je,aa as We,a5 as Xe,s as Ge,x as Je,E as g,ab as Qe,Y as v,a8 as ye,a9 as Ne,e as ve,T as ke,p as ee,X as j,$ as Ce,P as Ze,o as es,m as ss,n as ts}from"./ui-BA8uQMoM.js";import"./supabase-DqVKLG7f.js";const rs=l=>{if(!l)return{name:"",status:"",sports:""};const m=l.match(/^([^(]+)\(([^)]+)\)$/);if(!m)return{name:l.trim(),status:"",sports:""};const y=m[1].trim(),N=m[2].trim();if(N.startsWith("Already Paid")){const f=N.split("-"),M=f[1]?f[1].trim():"";return{name:y,status:"Already Paid",sports:M}}return{name:y,status:N,sports:""}};function cs(){const[l,m]=a.useState("admins"),[y,N]=a.useState(!0),[f,M]=a.useState([]),[H,_e]=a.useState([]),[se,Ae]=a.useState([]),[Se,x]=a.useState(!0),[Pe,Re]=a.useState(null),[z,Te]=a.useState(null),[k,De]=a.useState(""),[B,$e]=a.useState("All"),[C,Ue]=a.useState(""),[O,Le]=a.useState("All"),[Fe,V]=a.useState(!1),[qe,I]=a.use
1State(!1),[_,K]=a.useState(null),[te,A]=a.useState({show:!1,players:[]}),[re,p]=a.useState(null),[o,ae]=a.useState(null),[Ee,S]=a.useState(!1),[Y,le]=a.useState(null),[Me,He]=a.useState({}),[W,ie]=a.useState(""),[X,oe]=a.useState(""),[P,ne]=a.useState(""),[G,ce]=a.useState(""),[b,J]=a.useState({show:!1,message:"",type:"success"}),c=(s,t="success")=>{J({show:!0,message:s,type:t}),setTimeout(()=>J({show:!1,message:"",type:"success"}),4e3)},[R,Q]=a.useState({show:!1,title:"Confirm Action",message:"",onConfirm:null}),Z=(s,t,r="Confirm Action")=>{Q({show:!0,title:r,message:s,onConfirm:()=>{t(),Q(n=>({...n,show:!1}))}})},T=Ye();a.useEffect(()=>{ze()},[]),a.useEffect(()=>{z&&de()},[z,l]);const ze=async()=>{const{data:{user:s}}=await d.auth.getUser();if(!s){T("/admin/login");return}Re(s);const{data:t}=await d.from("admins").select("*").eq("user_id",s.id).maybeSingle();t?t.role!=="super_admin"?T("/admin/dashboard"):Te(t):(await d.auth.signOut(),T("/admin/login"))},de=async()=>{x(!0),l==="admins"?await D():l==="registrations"?await xe():l==="accommodations"&&await me(),x(!1)},D=async()=>{try{const{data:s,error:t}=await d.from("admins").select("*").order("name",{ascending:!0});if(t)throw t;Ae(s||[])}catch{c("Failed to load admin list","error")}},xe=async()=>{try{const{data:s,error:t}=await d.from("registrations").select("*").order("created_at",{ascending:!1});if(t)throw t;M(s||[])}catch{c("Failed to load teams registrations","error")}},me=async()=>{try{const{data:s,error:t}=await d.from("accommodation_requests").select("*").order("created_at",{ascending:!1});if(t)throw t;_e(s||[])}catch{c("Failed to load hostel requests","error")}},pe=async(s,t)=>{try{const{data:r,error:n}=await d.storage.from("captain-docs").list();if(n||!r)return null;const L=s?.toLowerCase().replace(/\s+/g,"_")||"",Ke=t?.toLowerCase().replace(/\s+/g,"_")||"",we=r.find(F=>F.name.includes(`${L}_${Ke}_payment`)||F.name.includes("_payment_"));if(we){const{data:{publicUrl:F}}=d.storage.from("captain-docs").getPublicUrl(we.name);return F}}catch{}return null},Be=async s=>{if(s.preventDefault(),!W.trim()||!X.trim()||!P.trim()){c("Please fill all fields","error");return}x(!0);try{const{data:t,error:r}=await d.rpc("create_admin_user",{admin_email:W.trim(),admin_password:X.trim(),admin_name:P.trim()});if(r)throw r;c(`Admin profile created for ${P}!`,"success"),V(!1),ie(""),oe(""),ne(""),D()}catch(t){c(`Creation failed: ${t.message}`,"error")}finally{x(!1)}},Oe=async s=>{if(s.preventDefault(),!G.trim()){c("Password cannot be empty","error");return}x(!0);try{const{error:t}=await d.rpc("update_admin_password_force",{target_user_id:_.user_id,new_password:G.trim()});if(t)throw t;c(`Password updated for ${_.name}!`,"success"),I(!1),ce(""),K(null),D()}catch(t){c(`Password update failed: ${t.message}`,"error")}finally{x(!1)}},Ve=(s,t)=>{Z(`Are you sure you want to permanently delete admin "${t}"? They will lose access immediately.`,async()=>{x(!0);try{const{error:r}=await d.rpc("delete_admin_user",{target_user_id:s});if(r)throw r;c(`Admin "${t}" deleted successfully`,"success"),D()}catch(r){c(`Failed to delete admin: ${r.message}`,"error")}finally{x(!1)}},"Delete Admin Account")},he=(s,t)=>{Z(`Are you sure you want to permanently delete the team "${t}"? This will delete all member records and payment history.`,async()=>{x(!0);try{const{error:r}=await d.from("registrations").delete().eq("id",s);if(r)throw r;c(`Team "${t}" deleted.`,"success"),xe()}catch{c("Failed to delete team.","error")}finally{x(!1)}},"Delete Registration")},be=(s,t)=>{Z(`Are you sure you want to delete the accommodation request for team "${t}"? This cannot be undone.`,async()=>{x(!0);try{const{error:r}=await d.from("accommodation_requests").delete().eq("id",s);if(r)throw r;c("Accommodation booking deleted.","success"),me()}catch{c("Failed to delete request.","error")}finally{x(!1)}},"Delete Accommodation Booking")},ue=async()=>{await d.auth.signOut(),T("/admin/login")},Ie=s=>{He(t=>({...t,[s]:!t[s]}))},$=f.filter(s=>{const t=(s.team_name||"").toLowerCase().includes(k.toLowerCase())||(s.college_name||"").toLowerCase().includes(k.toLowerCase())||(s.captain_name||"").toLowerCase().includes(k.toLowerCase()),r=B==="All"||s.sport===B;return t&&r}),U=H.filter(s=>{const t=(s.team_name||"").toLowerCase().includes(C.toLowerCase())||(s.college_name||"").toLowerCase().includes(C.toLowerCase())||(s.captain_name||"").toLowerCase().includes(C.toLowerCase()),r=O==="All"||s.sport===O;return t&&r}),ge=s=>{if(!s)return null;const{data:t}
1=d.storage.from("accommodation-payments").getPublicUrl(s);return t?.publicUrl},fe=Array.from(new Set([...f.map(s=>s.sport),...H.map(s=>s.sport)].filter(Boolean)));return Se&&se.length===0&&f.length===0&&H.length===0?e.jsxs("div",{className:"min-h-screen bg-[#04010a] flex flex-col items-center justify-center",children:[e.jsxs("div",{className:"relative mb-6",children:[e.jsx("div",{className:"w-16 h-16 border-4 border-purple-500/20 border-t-purple-500 rounded-full animate-spin"}),e.jsx(u,{className:"w-6 h-6 text-purple-400 absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 animate-pulse"})]}),e.jsx("p",{className:"text-gray-400 font-semibold tracking-wider text-xs uppercase animate-pulse",children:"Loading Super Admin Terminal..."})]}):e.jsxs("div",{className:"min-h-screen bg-[#04010a] text-white flex overflow-hidden font-body relative",children:[e.jsx("div",{className:"absolute inset-0 bg-gradient-to-tr from-purple-900/10 via-transparent to-rose-900/5 pointer-events-none"}),e.jsx(h,{children:y&&e.jsxs(i.div,{initial:{width:0,opacity:0},animate:{width:280,opacity:1},exit:{width:0,opacity:0},className:"hidden md:flex h-screen bg-black/40 backdrop-blur-2xl border-r border-white/[0.04] flex-col flex-shrink-0 z-30 overflow-hidden",children:[e.jsxs("div",{className:"p-6 border-b border-white/[0.04] flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl bg-gradient-to-br from-rose-500/20 to-purple-500/20 border border-rose-400/20 flex items-center justify-center shadow-lg shadow-rose-500/10",children:e.jsx(u,{className:"w-5 h-5 text-rose-400"})}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-lg font-display font-black tracking-widest bg-clip-text text-transparent bg-gradient-to-r from-rose-300 via-purple-300 to-indigo-300",children:"DAKSHA"}),e.jsx("p",{className:"text-[9px] text-rose-400/70 font-semibold tracking-widest uppercase",children:"Super Admin"})]})]}),e.jsx("div",{className:"flex-1 px-4 py-6 space-y-2 overflow-y-auto",children:[{id:"admins",label:"Admin Accounts",icon:u},{id:"registrations",label:"Registrations",icon:w},{id:"accommodations",label:"Hostel Bookings",icon:q}].map(s=>{const t=s.icon,r=l===s.id;return e.jsxs("button",{onClick:()=>m(s.id),className:`w-full flex items-center gap-3.5 px-4 py-3.5 rounded-xl border text-sm font-bold transition-all duration-300 ${r?"bg-rose-500/10 border-rose-500/20 text-rose-300 shadow-lg shadow-rose-500/5":"bg-transparent border-transparent text-gray-400 hover:text-white hover:bg-white/[0.02]"}`,children:[e.jsx(t,{className:`w-4.5 h-4.5 ${r?"text-rose-400":"text-gray-500"}`}),e.jsx("span",{children:s.label})]},s.id)})}),e.jsxs("div",{className:"p-4 border-t border-white/[0.04] bg-black/20",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-4",children:[e.jsx("div",{className:"w-9 h-9 bg-rose-500/10 rounded-lg flex items-center justify-center border border-rose-500/20",children:e.jsx(E,{className:"w-4 h-4 text-rose-400"})}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-wider font-semibold",children:"Logged Super"}),e.jsx("p",{className:"text-xs font-bold text-white truncate",children:z?.name})]})]}),e.jsxs(i.button,{whileHover:{scale:1.02},whileTap:{scale:.98},onClick:ue,className:"w-full py-2.5 bg-rose-500/5 hover:bg-rose-500/10 text-rose-400 rounded-xl border border-rose-500/20 text-xs font-bold transition-colors flex items-center justify-center gap-2",children:[e.jsx(je,{className:"w-3.5 h-3.5"})," Logout Session"]})]})]})}),e.jsxs("div",{className:"flex-1 flex flex-col h-screen overflow-hidden",children:[e.jsxs("header",{className:"bg-[#07040d]/90 backdrop-blur-md border-b border-white/[0.06] px-4 sm:px-6 flex items-center justify-between z-10 gap-2 h-16 md:h-20",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx("button",{onClick:()=>N(!y),className:"hidden md:flex p-2.5 bg-white/[0.02] hover:bg-white/[0.04] border border-white/[0.06] rounded-xl text-gray-400 hover:text-white transition-all flex-shrink-0 items-center justify-center",children:e.jsx(We,{className:"w-4 h-4 text-rose-400"})}),e.jsxs("div",{className:"flex items-center gap-2 md:hidden",children:[e.jsx("div",{className:"w-8 h-8 rounded-xl bg-gradient-to-br from-rose-500/30 to-purple-500/20 border border-rose-400/25 flex items-center justify-center",children:e.jsx(u,{className:"w-4 h-4 text-rose-400"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"text-sm font-black tracking-widest bg-clip-text text-transparent bg-gradient-to-r from-rose-300 to-purple-300",children:"DAKSHA"}),e.jsx("p",{className:"text-[8px] text-rose-400/60 font-semibold tracking-widest uppercase -mt-0.5",children:"Super Admin"})]})]}),e.jsxs("div",{className:"hidden md:block min-w-0",children:[e.jsx("h2",{className:"text-base font-black tracking-wide uppercase text-white truncate",children:l==="admins"?"Admin Management":l==="registrations"?"Sports Registrations":"Accommodation Requests"}),e.jsx("p",{className:"text-[10px] text-gray-500 uppercase tracking-widest",children:"Daksha Control Deck"})]})]}),e.jsxs("div",{className:"flex items-center gap-2 flex-shrink-0",children:[e.jsx("span",{className:"text-[10px] font-bold text-gray-400 uppercase tracking-wider md:hidden",children:l==="admins"?"Admins":l==="registrations"?"Teams":"Hostel"}),e.jsxs(i.button,{whileHover:{scale:1.02},whileTap:{scale:.98},onClick:de,className:"p-2 sm:px-4 sm:py-2 bg-rose-600/80 hover:bg-rose-600 text-white text-xs font-bold rounded-xl transition-all flex items-center gap-2 shadow-lg shadow-rose-500/10 border border-rose-500/30",title:"Reload Data",children:[e.jsx(Xe,{className:"w-3.5 h-3.5"}),e.jsx("span",{className:"hidden sm:inline",children:"Reload"})]})]})]}),e.jsxs("main",{className:"flex-1 overflow-y-auto p-4 sm:p-6 pb-28 md:pb-6 space-y-5",children:[l==="admins"&&e.jsxs(i.div,{initial:{opacity:0,y:10}
1,animate:{opacity:1,y:0},className:"space-y-6",children:[e.jsxs("div",{className:"bg-white/[0.01] border border-white/[0.04] p-4 sm:p-5 rounded-2xl flex flex-col sm:flex-row sm:items-center justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm sm:text-base font-bold text-white",children:"Console Operators"}),e.jsx("p",{className:"text-gray-500 text-[11px] sm:text-xs mt-0.5",children:"Below are the credentials of staff allowed to approve/reject entries."})]}),e.jsxs("button",{onClick:()=>V(!0),className:"w-full sm:w-auto px-4 py-2.5 sm:py-2 bg-gradient-to-r from-rose-600 to-purple-600 hover:from-rose-700 hover:to-purple-700 text-white text-xs font-bold rounded-xl transition-all flex items-center justify-center gap-2 shadow-md",children:[e.jsx(Ge,{className:"w-3.5 h-3.5"})," Register Staff Profile"]})]}),e.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6",children:se.map(s=>{const t=Me[s.user_id],r=s.user_id===Pe?.id;return e.jsxs(i.div,{whileHover:{y:-3},className:"bg-white/[0.01] border border-white/[0.04] p-5 rounded-2xl flex flex-col justify-between space-y-5 shadow-lg relative overflow-hidden",children:[e.jsx("div",{className:"absolute top-0 right-0 w-20 h-20 bg-gradient-to-br from-rose-500/5 to-transparent blur-xl rounded-full"}),e.jsx("div",{className:"flex items-start justify-between",children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-10 h-10 rounded-xl bg-rose-500/10 border border-rose-500/20 flex items-center justify-center text-rose-400 font-black text-sm",children:s.name?s.name.substring(0,2).toUpperCase():"AD"}),e.jsxs("div",{children:[e.jsxs("h4",{className:"text-sm font-bold text-white flex items-center gap-1.5",children:[s.name,r&&e.jsx("span",{className:"text-[9px] bg-white/10 px-1.5 py-0.5 rounded text-gray-400",children:"You"})]}),e.jsx("p",{className:"text-xs text-gray-500 font-mono mt-0.5",children:s.email})]})]})}),e.jsxs("div",{className:"space-y-2.5 pt-2 border-t border-white/[0.03]",children:[e.jsxs("div",{className:"flex justify-between items-center text-xs",children:[e.jsx("span",{className:"text-gray-500",children:"Privileges:"}),e.jsx("span",{className:`px-2 py-0.5 rounded text-[10px] font-bold ${s.role==="super_admin"?"bg-rose-500/10 text-rose-400 border border-rose-500/15":"bg-blue-500/10 text-blue-400 border border-blue-500/15"}`,children:s.role==="super_admin"?"ð¡ï¸ Super Admin":"ð¤ Regular Admin"})]}),e.jsxs("div",{className:"flex justify-between items-center text-xs",children:[e.jsx("span",{className:"text-gray-500",children:"Access Key:"}),e.jsxs("div",{className:"flex items-center gap-1.5 font-mono",children:[e.jsx("span",{className:"text-rose-300 font-bold",children:t?s.password_plain||"Not Recorded":"â¢â¢â¢â¢â¢â¢â¢â¢"}),e.jsx("button",{onClick:()=>Ie(s.user_id),className:"text-gray-500 hover:text-white p-0.5",children:t?e.jsx(Je,{className:"w-3.5 h-3.5"}):e.jsx(g,{className:"w-3.5 h-3.5"})})]})]})]}),e.jsxs("div",{className:"flex gap-2 pt-2",children:[e.jsxs("button",{onClick:()=>{K(s),I(!0)},className:"flex-1 py-2 bg-white/[0.02] hover:bg-white/[0.06] border border-white/[0.05] rounded-xl text-xs font-bold text-gray-300 hover:text-white transition-all text-center flex items-center justify-center gap-1.5 min-h-[44px]",children:[e.jsx(Qe,{className:"w-3 h-3 text-purple-400"})," Password"]}),!r&&e.jsx("button",{onClick:()=>Ve(s.user_id,s.name),className:"py-2 px-3.5 bg-rose-500/10 hover:bg-rose-500/20 border border-rose-500/20 rounded-xl text-xs font-bold text-rose-400 hover:text-rose-300 transition-all flex items-center justify-center min-h-[44px]",title:"Delete Admin Account",children:e.jsx(v,{className:"w-3.5 h-3.5"})})]})]},s.user_id)})})]}),l==="registrations"&&e.jsxs(i.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"space-y-6",children:[e.jsxs("div",{className:"bg-white/[0.01] border border-white/[0.04] p-4 rounded-2xl flex flex-col gap-3",children:[e.jsxs("div",{className:"relative w-full",children:[e.jsx(ye,{className:"w-4 h-4 text-gray-500 absolute top-1/2 left-4 -translate-y-1/2"}),e.jsx("input",{type:"text",value:k,onChange:s=>De(s.target.value),placeholder:"Search teams, college, captain...",className:"w-full pl-11 pr-4 py-3 bg-white/[0.02] border border-white/[0.06] rounded-xl text-xs placeholder-gray-500 focus:outline-none focus:border-purple-500/40 text-white"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ne,{className:"w-3.5 h-3.5 text-gray-500 flex-shrink-0"}),e.jsxs("div",{className:"relative flex-1",children:[e.jsxs("select",{value:B,onChange:s=>$e(s.target.value),className:"w-full px-3 py-2.5 pr-9 bg-white/[0.02] border border-white/[0.06] rounded-xl text-xs text-white appearance-none cursor-pointer focus:outline-none focus:border-purple-500/40",children:[e.jsx("option",{value:"All",className:"bg-[#0f0518]",children:"All Sports"}),fe.map(s=>e.jsx("option",{value:s,className:"bg-[#0f0518]",children:s},s))]}),e.jsx(ve,{className:"w-3.5 h-3.5 text-gray-500 rotate-90 absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none"})]}),e.jsxs("span",{className:"text-[10px] text-gray-500 font-mono flex-shrink-0 bg-white/[0.03] px-2 py-1.5 rounded-lg border border-white/[0.04]",children:[$.length," results"]})]})]}),e.jsxs("div",{className:"bg-white/[0.01] border border-white/[0.04] rounded-2xl overflow-hidden shadow-xl",children:[e.jsx("div",{className:"hidden md:block overflow-x-auto",children:e.jsxs("table",{className:"w-full text-left border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-white/[0.02] border-b border-white/[0.04] text-[10px] font-bold text-rose-300 uppercase tracking-widest",children:[e.jsx("th",{className:"px-6 py-4",children:"Team Details"}),e.jsx("th",{className:"px-6 py-4",children:"College Name"}),e.jsx("th",{className:"px-6 py-4",children:"Selected Sport"}),e.jsx("th",{className:"px-6 py-4 font-mono text-center",children:"Regist. Status"}),e.jsx("th",{className:"px-6 py-4 text-center",children:"Actions"})]})}),e.jsx("tbody",{className:"divide-y divide-white/[0.02] text-xs",children:$.map(s=>e.jsxs("tr",{className:"hover:bg-white/[0.01] transition-colors",children:[e.jsxs("td",{className:"px-6 py-4",children:[e.jsx("span",{className:"font-bold text-white text-sm",children:s.team_name}),e.jsxs("div",{className:"text-[10px] text-gray-500 mt-0.5",children:["Cap: ",s.captain_name," (",s.captain_mobile,")"]})]}),e.jsx("td",{className:"px-6 py-4 text-gray-300",children:s.college_name}),e.jsx("td",{className:"px-6 py-4",children:e.jsx("span",{className:"px-2 py-0.5 rounded bg-purple-500/10 border border-purple-500/15 text-purple-300 font-semibold",children:s.sport})}),e.jsx("td",{className:"px-6 py-4 text-center",children:e.jsx("span",{className:`px-2 py-0.5 rounded font-bold text-[10px] ${s.registration_status==="Approved"?"bg-emerald-500/10 text-emerald-400":"bg-yellow-500/10 text-yellow-400"}`,children:s.registration_status||"Pending"})}),e.jsx("td",{className:"px-6 py-4",children:e.jsxs("div",{className:"flex items-center justify-center gap-2",children:[e.jsx("button",{onClick:async()=>{let t=s.payment_screenshot_url;t||(t=await pe(s.college_name,s.sport)),le(t),ae(s),S(!0)},className:"px-2.5 py-1.5 bg-purple-500/10 hover:bg-purple-500/20 border border-purple-500/20 text-purple-300 hover:text-purple-200 text-xs font-bold rounded-lg transition-all",children:"View Details"}),e.jsx("button",{onClick:()=>he(s.id,s.team_name),className:"p-1.5 bg-rose-500/10 hover:bg-rose-500/20 border border-rose-500/20 rounded-lg text-rose-400 transition-all",title:"Delete Registry Record",children:e.jsx(v,{className:"w-3.5 h-3.5"})})]})})]},s.id))})]})}),e.jsx("div",{className:"block md:hidden divide-y divide-white/[0.03]",children:$.map((s,t)=>e.jsxs(i.div,{initial:{opacity:0,y:8}
1,animate:{opacity:1,y:0},transition:{delay:t*.04},className:"p-4 hover:bg-white/[0.01] transition-colors",children:[e.jsxs("div",{className:"flex items-start gap-3 mb-3",children:[e.jsx("div",{className:"w-9 h-9 rounded-xl bg-purple-500/10 border border-purple-500/20 flex items-center justify-center flex-shrink-0 mt-0.5",children:e.jsx(ke,{className:"w-4 h-4 text-purple-400"})}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("h4",{className:"text-sm font-black text-white leading-tight",children:s.team_name}),e.jsx("p",{className:"text-[10px] text-gray-400 mt-0.5 truncate",children:s.college_name})]}),e.jsx("span",{className:`flex-shrink-0 px-2 py-0.5 rounded-full text-[9px] font-black uppercase tracking-wider border ${s.registration_status==="Approved"?"bg-emerald-500/10 text-emerald-400 border-emerald-500/20":s.registration_status==="Rejected"?"bg-rose-500/10 text-rose-400 border-rose-500/20":"bg-amber-500/10 text-amber-400 border-amber-500/20"}`,children:s.registration_status==="Approved"?"â Approved":s.registration_status==="Rejected"?"â Rejected":"â³ Pending"})]})})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 mb-3 ml-12",children:[e.jsxs("div",{className:"bg-white/[0.02] rounded-xl p-2.5 border border-white/[0.03]",children:[e.jsx("p",{className:"text-[8px] text-gray-600 uppercase tracking-wider font-bold mb-0.5",children:"Sport"}),e.jsx("p",{className:"text-[11px] font-bold text-purple-300",children:s.sport||"â"})]}),e.jsxs("div",{className:"bg-white/[0.02] rounded-xl p-2.5 border border-white/[0.03]",children:[e.jsx("p",{className:"text-[8px] text-gray-600 uppercase tracking-wider font-bold mb-0.5",children:"Captain"}),e.jsx("p",{className:"text-[11px] font-bold text-gray-200 truncate",children:s.captain_name||"â"})]}),e.jsxs("div",{className:"bg-white/[0.02] rounded-xl p-2.5 border border-white/[0.03] col-span-2",children:[e.jsx("p",{className:"text-[8px] text-gray-600 uppercase tracking-wider font-bold mb-0.5",children:"Contact"}),e.jsx("p",{className:"text-[11px] font-mono font-bold text-rose-300",children:s.captain_mobile||"â"})]})]}),e.jsxs("div",{className:"flex gap-2 ml-12",children:[e.jsxs("button",{onClick:async()=>{let r=s.payment_screenshot_url;r||(r=await pe(s.college_name,s.sport)),le(r),ae(s),S(!0)},className:"flex-1 py-2.5 bg-purple-500/10 hover:bg-purple-500/20 active:scale-[0.98] border border-purple-500/20 text-purple-300 text-xs font-bold rounded-xl transition-all flex items-center justify-center gap-1.5",children:[e.jsx(g,{className:"w-3.5 h-3.5"})," View Details"]}),e.jsx("button",{onClick:()=>he(s.id,s.team_name),className:"py-2.5 px-4 bg-rose-500/5 hover:bg-rose-500/15 active:scale-[0.98] border border-rose-500/15 rounded-xl text-rose-400 hover:text-rose-300 transition-all flex items-center justify-center gap-1.5",title:"Delete Record",children:e.jsx(v,{className:"w-3.5 h-3.5"})})]})]},s.id))}),$.length===0&&e.jsxs("div",{className:"text-center py-16 text-gray-500",children:[e.jsx(ke,{className:"w-12 h-12 mx-auto text-gray-700 mb-3"}),e.jsx("p",{className:"text-sm",children:"No registration records match your filter."})]})]})]}),l==="accommodations"&&e.jsxs(i.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},className:"space-y-6",children:[e.jsxs("div",{className:"bg-white/[0.01] border border-white/[0.04] p-4 rounded-2xl flex flex-col gap-3",children:[e.jsxs("div",{className:"relative w-full",children:[e.jsx(ye,{className:"w-4 h-4 text-gray-500 absolute top-1/2 left-4 -translate-y-1/2"}),e.jsx("input",{type:"text",value:C,onChange:s=>Ue(s.target.value),placeholder:"Search by team, college, captain...",className:"w-full pl-11 pr-4 py-3 bg-white/[0.02] border border-white/[0.06] rounded-xl text-xs placeholder-gray-500 focus:outline-none focus:border-blue-500/40 text-white"})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ne,{className:"w-3.5 h-3.5 text-gray-500 flex-shrink-0"}),e.jsxs("div",{className:"relative flex-1",children:[e.jsxs("select",{value:O,onChange:s=>Le(s.target.value),className:"w-full px-3 py-2.5 pr-9 bg-white/[0.02] border border-white/[0.06] rounded-xl text-xs text-white appearance-none cursor-pointer focus:outline-none focus:border-blue-500/40",children:[e.jsx("option",{value:"All",className:"bg-[#0f0518]",children:"All Sports"}),fe.map(s=>e.jsx("option",{value:s,className:"bg-[#0f0518]",children:s},s))]}),e.jsx(ve,{className:"w-3.5 h-3.5 text-gray-500 rotate-90 absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none"})]}),e.jsxs("span",{className:"text-[10px] text-gray-500 font-mono flex-shrink-0 bg-white/[0.03] px-2 py-1.5 rounded-lg border border-white/[0.04]",children:[U.length," results"]})]})]}),e.jsxs("div",{className:"bg-white/[0.01] border border-white/[0.04] rounded-2xl overflow-hidden shadow-xl",children:[e.jsx("div",{className:"hidden md:block overflow-x-auto",children:e.jsxs("table",{className:"w-full text-left border-collapse",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"bg-white/[0.02] border-b border-white/[0.04] text-[10px] font-bold text-rose-300 uppercase tracking-widest",children:[e.jsx("th",{className:"px-6 py-4",children:"Request Team"}),e.jsx("th",{className:"px-6 py-4",children:"College Name"}),e.jsx("th",{className:"px-6 py-4",children:"Sport"}),e.jsx("th",{className:"px-6 py-4",children:"Roster Count"}),e.jsx("th",{className:"px-6 py-4",children:"UTR Number"}),e.jsx("th",{className:"px-6 py-4 font-mono text-center",children:"Status"}),e.jsx("th",{className:"px-6 py-4 text-center",children:"Actions"})]})}),e.jsx("tbody",{className:"divide-y divide-white/[0.02] text-xs",children:U.map(s=>{const t=ge(s.payment_screenshot_url);return e.jsxs("tr",{className:"hover:bg-white/[0.01] transition-colors",children:[e.jsxs("td",{className:"px-6 py-4",children:[e.jsx("span",{className:"font-bold text-white text-sm",children:s.team_name}),e.jsxs("div",{className:"text-[10px] text-gray-500 mt-0.5",children:["Cap: ",s.captain_name]})]}),e.jsx("td",{className:"px-6 py-4 text-gray-300",children:s.college_name}),e.jsx("td",{className:"px-6 py-4 text-xs text-gray-300",children:e.jsx("span",{className:"px-2 py-0.5 rounded-full bg-rose-500/10 text-rose-300 border border-rose-500/15 font-bold",children:s.sport||"â"})}),e.jsx("td",{className:"px-6 py-4",children:e.jsxs("button",{onClick:()=>A({show:!0,players:s.selected_players||[]}),className:"px-2.5 py-1 bg-purple-500/10 border border-purple-500/20 hover:bg-purple-500/20 text-[10px] text-purple-300 font-bold rounded-lg flex items-center gap-1.5",children:[e.jsx(w,{className:"w-3 h-3"})," ",s.total_persons," Persons"]})}),e.jsx("td",{className:"px-6 py-4 font-mono font-bold text-rose-300",children:e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsx(ee,{className:"w-3.5 h-3.5 text-gray-600"}),s.utr_number]})}),e.jsx("td",{className:"px-6 py-4 text-center",children:e.jsx("span",{className:`px-2 py-0.5 rounded font-bold text-[10px] uppercase ${s.status==="approved"?"bg-emerald-500/10 text-emerald-400":"bg-yellow-500/10 text-yellow-400"}`,children:s.status})}),e.jsx("td",{className:"px-6 py-4",children:e.jsxs("div",{className:"flex items-center justify-center gap-2",children:[t&&e.jsx("button",{onClick:()=>p(t),className:"p-1.5 bg-purple-500/10 hover:bg-purple-500/20 border border-purple-500/25 rounded-lg text-purple-300",title:"View Bill Screen",children:e.jsx(g,{className:"w-3.5 h-3.5"})}),e.jsx("button",{onClick:()=>be(s.id,s.team_name),className:"p-1.5 bg-rose-500/10 hover:bg-rose-500/20 border border-rose-500/20 rounded-lg text-rose-400 transition-all",title:"Delete Hostel Booking Record",children:e.jsx(v,{className:"w-3.5 h-3.5"})})]})})]},s.id)})})]})}),e.jsx("div",{className:"block md:hidden divide-y divide-white/[0.03]",children:U.map((s,t)=>{const r=ge(s.payment_screenshot_url),n=s.status==="approved";return e.jsxs(i.div,{initial:{opacity:0,y:8}
1,animate:{opacity:1,y:0},transition:{delay:t*.04},className:"p-4 hover:bg-white/[0.01] transition-colors",children:[e.jsxs("div",{className:"flex items-start gap-3 mb-3",children:[e.jsx("div",{className:`w-9 h-9 rounded-xl flex items-center justify-center flex-shrink-0 mt-0.5 ${n?"bg-emerald-500/10 border border-emerald-500/20":"bg-amber-500/10 border border-amber-500/20"}`,children:e.jsx(q,{className:`w-4 h-4 ${n?"text-emerald-400":"text-amber-400"}`})}),e.jsx("div",{className:"flex-1 min-w-0",children:e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("h4",{className:"text-sm font-black text-white leading-tight",children:s.team_name}),e.jsx("p",{className:"text-[10px] text-gray-400 mt-0.5 truncate",children:s.college_name})]}),e.jsx("span",{className:`flex-shrink-0 px-2 py-0.5 rounded-full text-[9px] font-black uppercase tracking-wider border ${n?"bg-emerald-500/10 text-emerald-400 border-emerald-500/20":"bg-amber-500/10 text-amber-400 border-amber-500/20"}`,children:n?"â Approved":"â³ Pending"})]})})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 mb-3 ml-12",children:[e.jsxs("div",{className:"bg-white/[0.02] rounded-xl p-2.5 border border-white/[0.03]",children:[e.jsx("p",{className:"text-[8px] text-gray-600 uppercase tracking-wider font-bold mb-0.5",children:"Captain"}),e.jsx("p",{className:"text-[11px] font-bold text-gray-200 truncate",children:s.captain_name||"â"})]}),e.jsxs("div",{className:"bg-white/[0.02] rounded-xl p-2.5 border border-white/[0.03]",children:[e.jsx("p",{className:"text-[8px] text-gray-600 uppercase tracking-wider font-bold mb-0.5",children:"Sport"}),e.jsx("span",{className:"text-[11px] font-bold text-rose-300 truncate",children:s.sport||"â"})]}),e.jsxs("div",{className:"bg-white/[0.02] rounded-xl p-2.5 border border-white/[0.03]",children:[e.jsx("p",{className:"text-[8px] text-gray-600 uppercase tracking-wider font-bold mb-0.5",children:"Persons"}),e.jsxs("button",{onClick:()=>A({show:!0,players:s.selected_players||[]}),className:"text-[11px] font-black text-blue-300 flex items-center gap-1 hover:text-blue-200 transition-colors",children:[e.jsx(w,{className:"w-3 h-3"}),s.total_persons," people"]})]}),e.jsxs("div",{className:"bg-white/[0.02] rounded-xl p-2.5 border border-white/[0.03]",children:[e.jsx("p",{className:"text-[8px] text-gray-600 uppercase tracking-wider font-bold mb-0.5",children:"UTR / Transaction No."}),e.jsxs("p",{className:"text-[11px] font-mono font-bold text-rose-300 flex items-center gap-1 truncate",children:[e.jsx(ee,{className:"w-3 h-3 text-gray-500 flex-shrink-0"}),e.jsx("span",{className:"truncate",children:s.utr_number||"Not provided"})]})]})]}),e.jsxs("div",{className:"flex gap-2 ml-12",children:[r?e.jsxs("button",{onClick:()=>p(r),className:"flex-1 py-2.5 bg-blue-500/10 hover:bg-blue-500/20 active:scale-[0.98] border border-blue-500/20 text-blue-300 text-xs font-bold rounded-xl transition-all flex items-center justify-center gap-1.5",children:[e.jsx(g,{className:"w-3.5 h-3.5"})," View Receipt"]}):e.jsx("div",{className:"flex-1 py-2.5 bg-white/[0.01] border border-white/[0.03] text-gray-600 text-[10px] rounded-xl flex items-center justify-center",children:"No Receipt"}),e.jsx("button",{onClick:()=>be(s.id,s.team_name),className:"py-2.5 px-4 bg-rose-500/5 hover:bg-rose-500/15 active:scale-[0.98] border border-rose-500/15 rounded-xl text-rose-400 hover:text-rose-300 transition-all flex items-center justify-center",title:"Delete",children:e.jsx(v,{className:"w-3.5 h-3.5"})})]})]},s.id)})}),U.length===0&&e.jsxs("div",{className:"text-center py-16 text-gray-500",children:[e.jsx(q,{className:"w-12 h-12 mx-auto text-gray-700 mb-3"}),e.jsx("p",{className:"text-sm",children:"No accommodation requests match your search."})]})]})]})]}),e.jsxs("nav",{className:"fixed bottom-0 left-0 right-0 md:hidden z-40",children:[e.jsx("div",{className:"absolute inset-0 bg-[#07040d]/95 backdrop-blur-xl border-t border-white/[0.08]"}),e.jsxs("div",{className:"relative flex items-center justify-around px-2 py-1 safe-area-inset-bottom",children:[e.jsxs("button",{onClick:()=>m("admins"),className:`flex flex-col items-center gap-0.5 px-4 py-2.5 rounded-2xl transition-all duration-200 min-w-[60px] ${l==="admins"?"bg-rose-500/15 text-rose-400":"text-gray-500 hover:text-gray-300"}`,children:[e.jsx(u,{className:`w-5 h-5 transition-transform duration-200 ${l==="admins"?"scale-110":""}`}),e.jsx("span",{className:"text-[9px] font-bold tracking-wider up
1percase",children:"Admins"}),l==="admins"&&e.jsx("span",{className:"w-1 h-1 bg-rose-400 rounded-full"})]}),e.jsxs("button",{onClick:()=>m("registrations"),className:`flex flex-col items-center gap-0.5 px-4 py-2.5 rounded-2xl transition-all duration-200 min-w-[60px] ${l==="registrations"?"bg-purple-500/15 text-purple-400":"text-gray-500 hover:text-gray-300"}`,children:[e.jsx(w,{className:`w-5 h-5 transition-transform duration-200 ${l==="registrations"?"scale-110":""}`}),e.jsx("span",{className:"text-[9px] font-bold tracking-wider uppercase",children:"Teams"}),l==="registrations"&&e.jsx("span",{className:"w-1 h-1 bg-purple-400 rounded-full"})]}),e.jsxs("button",{onClick:()=>m("accommodations"),className:`flex flex-col items-center gap-0.5 px-4 py-2.5 rounded-2xl transition-all duration-200 min-w-[60px] ${l==="accommodations"?"bg-blue-500/15 text-blue-400":"text-gray-500 hover:text-gray-300"}`,children:[e.jsx(q,{className:`w-5 h-5 transition-transform duration-200 ${l==="accommodations"?"scale-110":""}`}),e.jsx("span",{className:"text-[9px] font-bold tracking-wider uppercase",children:"Hostel"}),l==="accommodations"&&e.jsx("span",{className:"w-1 h-1 bg-blue-400 rounded-full"})]}),e.jsx("div",{className:"w-px h-8 bg-white/[0.06] mx-1"}),e.jsxs("button",{onClick:ue,className:"flex flex-col items-center gap-0.5 px-3 py-2.5 rounded-2xl transition-all duration-200 text-gray-500 hover:text-rose-400 hover:bg-rose-500/10 min-w-[52px]",children:[e.jsx(je,{className:"w-5 h-5"}),e.jsx("span",{className:"text-[9px] font-bold tracking-wider uppercase",children:"Exit"})]})]})]})]}),e.jsx(h,{children:Fe&&e.jsx(i.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/80 backdrop-blur-sm",children:e.jsxs(i.div,{initial:{scale:.95,opacity:0,y:30},animate:{scale:1,opacity:1,y:0},exit:{scale:.95,opacity:0,y:30},className:"bg-[#0a0a14] border border-white/[0.08] max-w-md w-full rounded-3xl shadow-2xl p-6 relative",onClick:s=>s.stopPropagation(),children:[e.jsxs("div",{className:"flex justify-between items-center mb-5",children:[e.jsxs("h3",{className:"text-lg font-bold text-white flex items-center gap-2",children:[e.jsx(u,{className:"w-5 h-5 text-rose-400"})," Register New Admin"]}),e.jsx("button",{type:"button",onClick:()=>V(!1),className:"p-2 bg-white/[0.04] border border-white/[0.06] rounded-xl text-gray-400 hover:text-white",children:e.jsx(j,{className:"w-4 h-4"})})]}),e.jsxs("form",{onSubmit:Be,className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-gray-400 font-semibold mb-1 block",children:"Full Name *"}),e.jsx("input",{type:"text",required:!0,value:P,onChange:s=>ne(s.target.value),className:"w-full px-4 py-3 bg-white/[0.02] border border-white/[0.06] focus:border-rose-500/50 rounded-xl text-sm text-white placeholder-gray-600 focus:outline-none",placeholder:"e.g. Rahul Sharma"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-gray-400 font-semibold mb-1 block",children:"Email Address *"}),e.jsx("input",{type:"email",required:!0,value:W,onChange:s=>ie(s.target.value),className:"w-full px-4 py-3 bg-white/[0.02] border border-white/[0.06] focus:border-rose-500/50 rounded-xl text-sm text-white placeholder-gray-600 focus:outline-none",placeholder:"e.g. [email protected]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-gray-400 font-semibold mb-1 block",children:"Password *"}),e.jsx("input",{type:"text",required:!0,value:X,onChange:s=>oe(s.target.value),className:"w-full px-4 py-3 bg-white/[0.02] border border-white/[0.06] focus:border-rose-500/50 rounded-xl text-sm text-white placeholder-gray-600 focus:outline-none",placeholder:"At least 6 characters"})]}),e.jsx(i.button,{whileHover:{scale:1.02},whileTap:{scale:.98},type:"submit",className:"w-full py-3.5 bg-gradient-to-r from-rose-600 to-purple-600 hover:from-rose-750 hover:to-purple-750 border border-rose-500/30 text-white font-bold text-sm rounded-xl transition-all flex items-center justify-center gap-2 shadow-lg shadow-rose-500/10",children:"Create Admin Profile"})]})]})})}),e.jsx(h,{children:qe&&e.jsx(i.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/80 backdrop-blur-sm",children:e.jsxs(i.div,{initial:{scale:.95,opacity:0,y:30},animate:{scale:1,opacity:1,y:0},exit:{scale:.95,opacity:0,y:30},className:"bg-[#0a0a14] border border-white/[0.08] max-w-sm w-full rounded-3xl shadow-2xl p-6 relative",onClick:s=>s.stopPropagation(),children:[e.jsxs("div",{className:"flex justify-between items-center mb-5",children:[e.jsxs("h3",{className:"text-lg font-bold text-white flex items-center gap-2",children:[e.jsx(u,{className:"w-5 h-5 text-rose-400"})," Change Password"]}),e.jsx("button",{type:"button",onClick:()=>{I(!1),K(null)},className:"p-2 bg-white/[0.04] border border-white/[0.06] rounded-xl text-gray-400 hover:text-white",children:e.jsx(j,{className:"w-4 h-4"})})]}),e.jsxs("form",{onSubmit:Oe,className:"space-y-4",children:[e.jsxs("div",{className:"bg-white/[0.02] border border-white/[0.04] p-3.5 rounded-xl text-xs",children:[e.jsx("p",{className:"text-gray-500",children:"Updating credentials for:"}),e.jsx("p",{className:"text-white font-bold mt-1 text-sm",children:_?.name}),e.jsx("p",{className:"text-rose-400 font-semibold font-mono mt-0.5",children:_?.email})]}),e.jsxs("div",{children:[e.jsx("label",{className:"text-xs text-gray-400 font-semibold mb-1 block",children:"New Password *"}),e.jsx("input",{type:"text",required:!0,value:G,onChange:s=>ce(s.target.value),className:"w-full px-4 py-3 bg-white/[0.02] border border-white/[0.06] focus:border-rose-500/50 rounded-xl text-sm text-white placeholder-gray-600 focus:outline-none",placeholder:"Enter new password"})]}),e.jsx(i.button,{whileHover:{scale:1.02},whileTap:{scale:.98},type:"submit",className:"w-full py-3.5 bg-gradient-to-r from-rose-600 to-purple-600 hover:from-rose-750 hover:to-purple-750 border border-rose-500/30 text-white font-bold text-sm rounded-xl transition-all flex items-center justify-center gap-2 shadow-lg",children:"Update Password"})]})]})})}),e.jsx(h,{children:te.show&&e.jsx(i.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},className:"fixed inset-0 bg-black/80 backdrop-blur-sm flex items-center justify-center z-50 p-4",onClick:()=>A({show:!1,players:[]}),children:e.jsxs(i.div,{className:"bg-[#0a0a14] border border-white/[0.08] rounded-3xl p-6 max-w-md w-full shadow-2xl relative",onClick:s=>s.stopPropagation(),children:[e.jsxs("div",{className:"flex justify-between items-center mb-6",children:[e.jsxs("h3",{className:"text-lg font-bold text-white flex items-center gap-2",children:[e.jsx(w,{className:"w-5 h-5 text-rose-400"})," Accommodation Bookings"]}),e.jsx("button",{onClick:()=>A({show:!1,players:[]}),className:"p-2 bg-white/[0.04] border border-white/[0.06] rounded-xl text-gray-400 hover:text-white",children:e.jsx(j,{className:"w-4 h-4"})})]}),e.jsx("div",{className:"space-y-3.5 max-h-96 overflow-y-auto pr-1",children:te.players.map((s,t)=>{const{name:r,status:n,sports:L}=rs(s);return e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-center justify-between gap-3 p-3 bg-white/[0.02] border border-white/[0.04] rounded-xl hover:bg-white/[0.04] transition-all",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"w-8 h-8 rounded-full bg-gradient-to-br from-rose-500/20 to-purple-500/20 flex items-center justify-center border border-rose-500/10",children:e.jsx(E,{className:"w-4 h-4 text-rose-400"})}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold text-white",children:r}),e.jsxs("p",{className:"text-[10px] text-gray-500",children:["Participant #",t+1]}),n==="Already Paid"&&L&&e.jsxs("p",{className:"text-[10px] text-rose-400 font-semibold mt-0.5",children:["ð Registered in: ",L]})]})]}),e.jsx("div",{className:"flex items-center justify-end",children:n==="Already Paid"?e.jsx("span",{className:"px-2 py-0.5 rounded-md text-[9px] font-black bg-emerald-500/20 text-emerald-400 border border-emerald-500/30",children:"â Already Paid"}):n==="Cash"?e.jsx("span",{className:"px-2 py-0.5 rounded-md text-[9px] font-black bg-emerald-500/20 text-emerald-400 border border-emerald-500/30",children:"ðµ Cash"}):n==="UPI"?e.jsx("span",{className:"px-2 py-0.5 rounded-md text-[9px] font-black bg-purple-500/20 text-purple-400 border border-purple-500/30",children:"ð± UPI"}):n?e.jsx("span",{className:"px-2 py-0.5 rounded-md text-[9px] font-black bg-blue-500/20 text-blue-400 border border-blue-500/30",children:n}):null})]},t)})})]})})}),e.jsx(h,{children:re&&e.jsxs(i.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[100] flex items-center justify-center p-4 bg-black/95 backdrop-blur-md",onClick:()=>p(null),children:[e.jsx("button",{onClick:()=>p(null),className:"absolute top-6 right-6 p-3 bg-white/10 hover:bg-white/20 border border-white/10 text-white rounded-full transition-all",children:e.jsx(j,{className:"w-6 h-6"})}),e.jsx(i.img,{initial:{scale:.95},animate:{scale:1},exit:{scale:.95},src:re,alt:"High resolution view",className:"max-h-[90vh] max-w-full object-contain rounded-xl shadow-2xl",onClick:s=>s.stopPropagation()})]})}),e.jsx(h,{children:R.show&&e.jsx(i.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-[110] flex items-center justify-center p-4 bg-black/85 backdrop-blur-sm",children:e.jsxs(i.div,{initial:{scale:.95,opacity:0,y:30},animate:{scale:1,opacity:1,y:0},exit:{scale:.95,opacity:0,y:30},className:"bg-[#0a0a14] border border-white/[0.08] max-w-sm w-full rounded-3xl shadow-2xl p-6 relative overflow-hidden",onClick:s=>s.stopPropagation(),children:[e.jsx("div",{className:"absolute top-0 right-0 w-32 h-32 bg-gradient-to-br from-rose-500/5 to-transparent blur-2xl rounded-full"}),e.jsxs("div",{className:"flex flex-col items-center text-center space-y-4",children:[e.jsx("div",{className:"w-12 h-12 rounded-full bg-rose-500/10 border border-rose-500/20 flex items-center justify-center",children:e.jsx(Ce,{className:"w-6 h-6 text-rose-400"})}),e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("h3",{className:"text-lg font-bold text-white font-display",children:R.title}),e.jsx("p",{className:"text-xs text-gray-400 leading-relaxed px-2",children:R.message})]}),e.jsxs("div",{className:"flex items-center gap-3 w-full pt-2",children:[e.jsx("button",{type:"button",onClick:()=>Q(s=>({...s,show:!1})),className:"flex-1 py-2.5 bg-white/[0.03] hover:bg-white/[0.06] border border-white/[0.06] text-gray-300 hover:text-white rounded-xl text-xs font-bold transition-colors",children:"Cancel"}),e.jsx("button",{type:"button",onClick:R.onConfirm,className:"flex-1 py-2.5 bg-rose-650 hover:bg-rose-700 text-white rounded-xl text-xs font-bold transition-colors shadow-lg shadow-rose-500/10",children:"Yes, Proceed"})]})]})]})})}),e.jsx(h,{children:Ee&&o&&e.jsx(i.div,{initial:{opacity:0}
1,animate:{opacity:1},exit:{opacity:0},className:"fixed inset-0 z-50 flex items-center justify-center p-4 bg-black/85 backdrop-blur-sm",onClick:()=>S(!1),children:e.jsxs(i.div,{initial:{scale:.95,opacity:0,y:30},animate:{scale:1,opacity:1,y:0},exit:{scale:.95,opacity:0,y:30},className:"bg-[#0a0a14] border border-white/[0.08] max-w-4xl w-full max-h-[90vh] overflow-y-auto rounded-3xl shadow-2xl relative",onClick:s=>s.stopPropagation(),children:[e.jsxs("div",{className:"sticky top-0 bg-[#0a0a14]/95 backdrop-blur-md px-8 py-6 border-b border-white/[0.06] flex justify-between items-center z-10",children:[e.jsxs("div",{children:[e.jsx("span",{className:"px-2.5 py-1 text-[10px] font-bold rounded-full bg-purple-500/10 border border-purple-500/20 text-purple-300 uppercase tracking-wider",children:o.sport}),e.jsx("h2",{className:"text-2xl font-black text-white mt-2 leading-tight",children:o.team_name}),e.jsx("p",{className:"text-sm text-gray-400 mt-1",children:o.college_name})]}),e.jsx("button",{onClick:()=>S(!1),className:"p-2.5 bg-white/[0.04] border border-white/[0.06] rounded-xl text-gray-400 hover:text-white transition-colors",children:e.jsx(j,{className:"w-5 h-5"})})]}),e.jsxs("div",{className:"p-8 space-y-8",children:[e.jsxs("div",{className:"p-6 rounded-2xl bg-gradient-to-r from-purple-500/5 to-rose-500/5 border border-purple-500/10",children:[e.jsxs("h3",{className:"text-sm font-bold uppercase text-purple-400 tracking-wider mb-4 flex items-center gap-2",children:[e.jsx(E,{className:"w-4 h-4"})," Captain Profile"]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"bg-black/30 border border-white/[0.04] p-4 rounded-xl",children:[e.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Full Name"}),e.jsx("p",{className:"text-sm font-bold text-white",children:o.captain_name})]}),e.jsxs("div",{className:"bg-black/30 border border-white/[0.04] p-4 rounded-xl",children:[e.jsx("p",{className:"text-xs text-gray-500 mb-1",children:"Mobile Number"}),e.jsxs("p",{className:"text-sm font-bold text-white flex items-center gap-2",children:[e.jsx(Ze,{className:"w-4 h-4 text-purple-400"})," ",o.captain_mobile]})]})]}),e.jsxs("div",{className:"mt-6 space-y-3",children:[e.jsx("p",{className:"text-xs text-gray-400 font-semibold",children:"Verification Documents"}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"bg-black/30 border border-white/[0.04] p-4 rounded-xl flex flex-col justify-between h-48",children:[e.jsx("p",{className:"text-xs text-gray-500",children:"Aadhaar Card"}),o.captain_aadhaar_url?e.jsxs("div",{className:"relative group rounded-lg overflow-hidden h-32 border border-white/[0.06] mt-2 bg-black/40",children:[e.jsx("img",{src:o.captain_aadhaar_url,alt:"Aadhaar",className:"w-full h-full object-cover"}),e.jsx("div",{className:"absolute inset-0 bg-black/60 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",children:e.jsxs("button",{onClick:()=>p(o.captain_aadhaar_url),className:"px-3 py-1.5 bg-white text-black font-bold text-xs rounded-lg flex items-center gap-1",children:[e.jsx(g,{className:"w-3.5 h-3.5"})," Expand"]})})]}):e.jsx("div",{className:"h-32 rounded-lg bg-white/[0.02] border border-dashed border-white/10 flex items-center justify-center text-xs text-gray-600 mt-2",children:"Not uploaded"})]}),e.jsxs("div",{className:"bg-black/30 border border-white/[0.04] p-4 rounded-xl flex flex-col justify-between h-48",children:[e.jsx("p",{className:"text-xs text-gray-500",children:"College ID Card"}),o.captain_college_id_url?e.jsxs("div",{className:"relative group rounded-lg overflow-hidden h-32 border border-white/[0.06] mt-2 bg-black/40",children:[e.jsx("img",{src:o.captain_college_id_url,alt:"College ID",className:"w-full h-full object-cover"}),e.jsx("div",{className:"absolute inset-0 bg-black/60 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",children:e.jsxs("button",{onClick:()=>p(o.captain_college_id_url),className:"px-3 py-1.5 bg-white text-black font-bold text-xs rounded-lg flex items-center gap-1",children:[e.jsx(g,{className:"w-3.5 h-3.5"})," Expand"]})})]}):e.jsx("div",{className:"h-32 rounded-lg bg-white/[0.02] border border-dashed border-white/10 flex items-center justify-center text-xs text-gray-600 mt-2",children:"Not uploaded"})]})]})]})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsxs("h3",{className:"text-sm font-bold uppercase text-rose-450 tracking-wider flex items-center gap-2",children:[e.jsx(w,{className:"w-4 h-4 animate-pulse"})," Team Roster (",(o.players?.length||0)+1," Total)"]}),o.players&&o.players.length>0?e.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:o.players.map((s,t)=>e.jsxs("div",{className:"p-4 bg-[#0d0d1a] border border-white/[0.04] rounded-xl flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsxs("p",{className:"text-sm font-bold text-white flex items-center gap-2",children:[e.jsx(E,{className:"w-3.5 h-3.5 text-gray-500"})," ",s.name||s]}),e.jsxs("p",{className:"text-[10px] text-gray-500 mt-0.5",children:["Player Member #",t+1]})]}),e.jsx("div",{className:"flex gap-2",children:o.players_docs?.filter(r=>r.name===s.name).map((r,n)=>e.jsxs("button",{onClick:()=>p(r.url),className:"px-2 py-1.5 bg-white/[0.02] border border-white/[0.06] hover:bg-purple-500/20 hover:border-purple-500/30 text-[10px] font-bold rounded-lg transition-colors text-purple-300 flex items-center gap-1",children:[e.jsx(es,{className:"w-3 h-3"}),r.type==="aadhaar"?"Aadhaar":"ID"]},n))})]},t))}):e.jsx("p",{className:"text-sm text-gray-600",children:"No additional players in the roster."})]}),Y&&e.jsxs("div",{className:"p-6 rounded-2xl bg-gradient-to-r from-yellow-500/5 to-amber-500/5 border border-yellow-500/10",children:[e.jsxs("h3",{className:"text-sm font-bold uppercase text-yellow-500 tracking-wider mb-4 flex items-center gap-2",children:[e.jsx(ee,{className:"w-4 h-4"})," Registration Payment Bill"]}),e.jsxs("div",{className:"relative group rounded-xl overflow-hidden max-h-80 border border-white/[0.08] bg-black/50",children:[e.jsx("img",{src:Y,alt:"Bill",className:"w-full max-h-80 object-contain mx-auto"}),e.jsx("div",{className:"absolute inset-0 bg-black/60 flex items-center justify-center opacity-0 group-hover:opacity-100 transition-opacity",children:e.jsxs("button",{onClick:()=>p(Y),className:"px-4 py-2 bg-white text-black font-bold text-sm rounded-lg flex items-center gap-1",children:[e.jsx(g,{className:"w-4 h-4"})," Expand Full Bill"]})})]})]})]})]})})}),e.jsx(h,{children:b.show&&e.jsxs(i.div,{initial:{opacity:0,y:50,scale:.95}
1,animate:{opacity:1,y:0,scale:1},exit:{opacity:0,y:20,scale:.95},className:"fixed bottom-6 right-6 z-[120] max-w-sm w-full p-4 rounded-2xl bg-[#0a0a14] border border-white/[0.08] shadow-2xl flex items-center gap-3 overflow-hidden",children:[b.type==="success"?e.jsx("div",{className:"w-8 h-8 rounded-lg bg-emerald-500/15 border border-emerald-500/20 flex items-center justify-center flex-shrink-0",children:e.jsx(ss,{className:"w-4 h-4 text-emerald-400"})}):b.type==="error"?e.jsx("div",{className:"w-8 h-8 rounded-lg bg-rose-500/15 border border-rose-500/20 flex items-center justify-center flex-shrink-0",children:e.jsx(ts,{className:"w-4 h-4 text-rose-400"})}):e.jsx("div",{className:"w-8 h-8 rounded-lg bg-blue-500/15 border border-blue-500/20 flex items-center justify-center flex-shrink-0",children:e.jsx(Ce,{className:"w-4 h-4 text-blue-400"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-[9px] text-gray-500 uppercase tracking-widest font-bold font-display",children:b.type==="success"?"Success":b.type==="error"?"Failed":"Notification"}),e.jsx("p",{className:"text-xs font-semibold text-white truncate mt-0.5",children:b.message})]}),e.jsx("button",{onClick:()=>J({...b,show:!1}),className:"p-1 bg-white/[0.03] hover:bg-white/[0.06] border border-white/[0.04] rounded-lg text-gray-500 hover:text-white",children:e.jsx(j,{className:"w-3 h-3"})})]})})]})}export{cs as default};
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.