import{G as y,r as n,j as e,x as i}from"./app-CPVBqm33.js";import{F as g,a as h,b,c as f,d as j}from"./index-C-3n-phi.js";import{P as k}from"./PublicLayout-0iscDYLA.js";import"./proxy-Btka435s.js";function F({status:l,canResetPassword:c}){const{data:s,setData:t,post:m,processing:d,errors:a,reset:x}=y({email:"",password:"",remember:!1}),[o,p]=n.useState(!1);n.useEffect(()=>()=>x("password"),[]);const u=r=>{r.preventDefault(),m(route("login"))};return e.jsxs(k,{title:"Acceso",children:[e.jsxs("section",{className:"bg-primary-700 text-white",children:[e.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-10",children:[e.jsx("h1",{className:"text-3xl md:text-4xl font-bold",children:"Acceso"}),e.jsx("p",{className:"text-primary-100 mt-2",children:"Inicia sesión para gestionar y consultar proyectos."})]}),e.jsx("div",{className:"h-1 w-full bg-secondary-600"})]}),e.jsx("section",{className:"max-w-xl mx-auto px-6",children:e.jsx("div",{className:"relative -mt-10",children:e.jsxs("div",{className:`mx-auto max-w-xl rounded-2xl bg-white shadow-xl border border-secondary-200 p-6 md:p-8
                          dark:bg-[#0f1115] dark:border-primary-700/40`,children:[l&&e.jsx("div",{className:"mb-4 rounded-md bg-secondary-50 px-4 py-2 text-sm font-medium text-secondary-800 dark:bg-secondary-700/20 dark:text-secondary-300",children:l}),e.jsxs("form",{onSubmit:u,className:"space-y-5",noValidate:!0,children:[e.jsxs("div",{children:[e.jsx("label",{htmlFor:"email",className:"block text-sm font-medium text-gray-700 dark:text-gray-200",children:"Correo electrónico"}),e.jsxs("div",{className:"mt-1 relative",children:[e.jsx(g,{className:"absolute left-3 top-2.5 text-gray-400 pointer-events-none"}),e.jsx("input",{id:"email",type:"email",name:"email",value:s.email,onChange:r=>t("email",r.target.value),autoComplete:"username",placeholder:"tucorreo@ejemplo.com",className:`block w-full rounded-lg border border-gray-300 pl-10 pr-3 py-2
                               focus:outline-none focus:ring-2 focus:ring-primary-600 focus:border-primary-600
                               dark:bg-[#0b0e13] dark:border-gray-700 dark:text-gray-100 dark:placeholder-gray-400`,required:!0})]}),a.email&&e.jsx("p",{className:"mt-2 text-sm text-red-600 dark:text-red-400",children:a.email})]}),e.jsxs("div",{children:[e.jsx("label",{htmlFor:"password",className:"block text-sm font-medium text-gray-700 dark:text-gray-200",children:"Contraseña"}),e.jsxs("div",{className:"mt-1 relative",children:[e.jsx(h,{className:"absolute left-3 top-2.5 text-gray-400 pointer-events-none"}),e.jsx("input",{id:"password",type:o?"text":"password",name:"password",value:s.password,onChange:r=>t("password",r.target.value),autoComplete:"current-password",placeholder:"••••••••",className:`block w-full rounded-lg border border-gray-300 pl-10 pr-10 py-2
                               focus:outline-none focus:ring-2 focus:ring-primary-600 focus:border-primary-600
                               dark:bg-[#0b0e13] dark:border-gray-700 dark:text-gray-100 dark:placeholder-gray-400`,required:!0}),e.jsx("button",{type:"button",onClick:()=>p(r=>!r),"aria-label":o?"Ocultar contraseña":"Mostrar contraseña",className:"absolute right-3 top-2.5 text-gray-400 hover:text-gray-600 dark:hover:text-gray-300",children:o?e.jsx(b,{className:"w-5 h-5"}):e.jsx(f,{className:"w-5 h-5"})})]}),a.password&&e.jsx("p",{className:"mt-2 text-sm text-red-600 dark:text-red-400",children:a.password})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("label",{className:"inline-flex items-center gap-2 select-none",children:[e.jsx("input",{type:"checkbox",name:"remember",checked:s.remember,onChange:r=>t("remember",r.target.checked),className:`h-4 w-4 rounded border-gray-300 text-primary-700
                               focus:ring-2 focus:ring-primary-600 focus:ring-offset-0
                               dark:bg-[#0b0e13] dark:border-gray-700`}),e.jsx("span",{className:"text-sm text-gray-700 dark:text-gray-300",children:"Recordarme"})]}),c&&e.jsx(i,{href:route("password.request"),className:`text-sm font-medium text-secondary-700 hover:text-secondary-800
                               dark:text-primary-200 dark:hover:text-white`,children:"¿Olvidaste tu contraseña?"})]}),e.jsx("div",{className:"pt-1",children:e.jsxs("button",{type:"submit",disabled:d,className:`w-full inline-flex items-center justify-center gap-2 rounded-lg px-4 py-2.5
                             font-semibold text-white bg-primary-700 hover:bg-primary-800
                             focus:outline-none focus:ring-2 focus:ring-primary-600
                             disabled:opacity-60 disabled:cursor-not-allowed
                             dark:bg-primary-800 dark:hover:bg-primary-700`,children:[e.jsx(j,{}),d?"Ingresando...":"Ingresar"]})}),e.jsxs("p",{className:"text-center text-sm text-gray-600 mt-1 dark:text-gray-300",children:["¿No tienes cuenta?"," ",e.jsx(i,{href:route("register"),className:`font-semibold text-secondary-700 hover:text-secondary-800
                             dark:text-primary-200 dark:hover:text-white`,children:"Solicitar acceso"})]})]})]})})})]})}export{F as default};
