(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[344],{9013:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let s=(0,r(4297).Z)("Hexagon",[["path",{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z",key:"yt0hxn"}]])},5977:function(e,t,r){"use strict";r.d(t,{Z:function(){return s}});/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let s=(0,r(4297).Z)("Lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]])},163:function(e,t,r){(window.__NEXT_P=window.__NEXT_P||[]).push(["/auth/login",function(){return r(6517)}])},6517:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return m}});var s=r(5893),n=r(7294),a=r(1664),o=r.n(a),l=r(1163),i=r(9013),c=r(4009),d=r(5977);/**
 * @license lucide-react v0.344.0 - ISC
 *
 * This source code is licensed under the ISC license.
 * See the LICENSE file in the root directory of this source tree.
 */let x=(0,r(4297).Z)("ArrowRight",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]]);var u=r(9008),h=r.n(u);function m(){let e=(0,l.useRouter)(),[t,r]=(0,n.useState)(!1),[a,u]=(0,n.useState)(""),m=async t=>{t.preventDefault(),r(!0),u("");let s=new FormData(t.currentTarget),n=s.get("username"),a=s.get("password");try{let t=await fetch("/api/v1/auth/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({username:n,password:a})}),r=await t.json();r.success?(localStorage.setItem("NEXUS_DATA_MODE","REAL"),e.push("/")):u(r.error||"Login failed")}catch(e){u("Network error. Please try again.")}finally{r(!1)}};return(0,s.jsxs)("div",{className:"min-h-screen flex items-center justify-center relative overflow-hidden bg-[#020202]",children:[(0,s.jsx)(h(),{children:(0,s.jsx)("title",{children:"NEXUS_MAT.OS"})}),(0,s.jsx)("div",{className:"absolute inset-0 bg-[url('https://grainy-gradients.vercel.app/noise.svg')] opacity-20"}),(0,s.jsx)("div",{className:"absolute top-1/2 left-1/2 -translate-x-1/2 -translate-y-1/2 w-[800px] h-[800px] bg-cyber-neon/5 rounded-full blur-[100px] pointer-events-none"}),(0,s.jsxs)("div",{className:"w-full max-w-md p-8 relative z-10",children:[(0,s.jsxs)("div",{className:"mb-10 text-center",children:[(0,s.jsxs)(o(),{href:"/",className:"inline-flex items-center gap-2 group cursor-pointer mb-6",children:[(0,s.jsx)(i.Z,{className:"text-cyber-neon w-10 h-10 group-hover:rotate-180 transition-transform duration-700"}),(0,s.jsxs)("span",{className:"text-3xl font-mono font-bold tracking-tighter text-white",children:["NEXUS_MAT",(0,s.jsx)("span",{className:"text-cyber-neon",children:".OS"})]})]}),(0,s.jsx)("h2",{className:"text-gray-400 font-mono text-sm tracking-widest",children:"IDENTITY_VERIFICATION_PROTOCOL"})]}),(0,s.jsxs)("div",{className:"bg-cyber-panel/40 backdrop-blur-md border border-white/10 p-8 rounded-lg shadow-2xl relative overflow-hidden group",children:[(0,s.jsx)("div",{className:"absolute inset-0 border border-cyber-neon/0 group-hover:border-cyber-neon/50 transition-colors duration-500 rounded-lg pointer-events-none"}),(0,s.jsxs)("form",{onSubmit:m,className:"space-y-6",children:[(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("label",{className:"text-xs font-mono text-cyber-neon",children:"USER_ID"}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("input",{name:"username",type:"text",className:"w-full bg-black/50 border border-gray-800 focus:border-cyber-neon text-white p-3 pl-10 rounded-sm outline-none transition-all font-mono",placeholder:"Enter username",required:!0}),(0,s.jsx)(c.Z,{className:"absolute left-3 top-3 text-gray-500 w-4 h-4"})]})]}),(0,s.jsxs)("div",{className:"space-y-2",children:[(0,s.jsx)("label",{className:"text-xs font-mono text-cyber-neon",children:"ACCESS_KEY"}),(0,s.jsxs)("div",{className:"relative",children:[(0,s.jsx)("input",{name:"password",type:"password",className:"w-full bg-black/50 border border-gray-800 focus:border-cyber-neon text-white p-3 pl-10 rounded-sm outline-none transition-all font-mono",placeholder:"••••••••",required:!0}),(0,s.jsx)(d.Z,{className:"absolute left-3 top-3 text-gray-500 w-4 h-4"})]})]}),a&&(0,s.jsx)("div",{className:"bg-red-900/20 border border-red-500 text-red-500 p-3 rounded text-xs font-mono",children:a}),(0,s.jsx)("button",{type:"submit",disabled:t,className:"w-full bg-cyber-neon text-black font-bold py-3 mt-4 hover:bg-white transition-colors flex items-center justify-center gap-2 font-mono uppercase tracking-wider",children:t?"AUTHENTICATING...":(0,s.jsxs)(s.Fragment,{children:["INITIATE_SESSION ",(0,s.jsx)(x,{size:16})]})})]}),(0,s.jsxs)("div",{className:"mt-6 flex justify-between items-center text-xs font-mono text-gray-500",children:[(0,s.jsx)(o(),{href:"/auth/register",className:"hover:text-cyber-neon transition-colors",children:"[ CREATE_NEW_IDENTITY ]"}),(0,s.jsx)("a",{href:"#",className:"hover:text-white transition-colors",children:"FORGOT_KEY?"})]})]}),(0,s.jsx)("div",{className:"mt-8 text-center",children:(0,s.jsxs)("p",{className:"text-[10px] text-gray-700 font-mono",children:["SECURE CONNECTION ESTABLISHED ",(0,s.jsx)("br",{}),"ENCRYPTION: AES-256-GCM"]})})]})]})}},1163:function(e,t,r){e.exports=r(3035)}},function(e){e.O(0,[605,888,774,179],function(){return e(e.s=163)}),_N_E=e.O()}]);