From 0e247e6b4ce3589e395c213d94af2d9a605cd034 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cau=C3=AA=20Faleiros?= Date: Fri, 13 Nov 2026 16:22:01 -0300 Subject: [PATCH] =?UTF-8?q?feat:=20new=20layout=20phase=20C,=20Cota=C3=A7?= =?UTF-8?q?=C3=B5es=20as=20on=20the=20canvas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Roadmap Novo Layout, phase C (canvas C1, C2): list rows with thumb, product line, total and expiry; the "Tudo revisado" empty state with one action to the quotes waiting for payment; the open quote with header, total, facts in three columns, notes, Originais and the footer actions. "Pedido pago fora do site" is now a dialog from the footer. Nothing removed; the e-mail stays in the header. Built by Bobina. Co-Authored-By: Claude Opus 5.5 (1M context) --- web/kanban-quotes.js | 116 +++++++++++++++++++++++++++---------------- web/kanban.css | 79 ++++++++++++++++++----------- 2 files changed, 124 insertions(+), 71 deletions(-) diff --git a/web/kanban-quotes.js b/web/kanban-quotes.js index 8a8f849..b9b0499 100644 --- a/web/kanban-quotes.js +++ b/web/kanban-quotes.js @@ -1,6 +1,7 @@ /* Kanban DTF: the Cotações tab. The quotes list, the review panel, approval, a test order and an order paid outside the site. Loaded after kanban.js, - which defines api, absorb, node, button, money, metres, say, ask, load, may, + which defines api, absorb, node, button, dialogHost, formDialog, money, metres, + say, ask, load, may, $, ago, shortAgo, svgIcon, IC, iconButton, badge, gradePill, lowestGrade, productLine, productName, sheetSize, buyer, docKind, cnpj, copyButton, paymentBadge, freightWeight, whatsappLink, artBox, itemPreview, itemNote, @@ -89,10 +90,10 @@ function renderQuotes(){ const name=node('b',who.title);name.title=who.mail||who.title; // A quote from the last ten minutes carries a dot: someone just ordered. if(Date.now()-new Date(q.created_at)<600000){const dot=node('span',undefined,'newdot');dot.title='Chegou agora';name.prepend(dot);} - first.append(name,node('span',q.approved?money(q.approved.total_cents):metres(quoteMetres(q)),'qm')); + first.append(name); const second=node('span',undefined,'qline sub'); - const what=node('span');what.append(gradePill(lowestGrade(items)),' '+productLine(items)+', '+(q.draft.destination?q.draft.destination.city+'/'+q.draft.destination.state:'Retirada')); - second.append(what,node('span',(quoteKind==='approved'?quoteExpiry(q):null)||shortAgo(q.created_at))); + const what=node('span');what.append(gradePill(lowestGrade(items)),' '+productLine(items)+' · '+(q.draft.destination?q.draft.destination.city+'/'+q.draft.destination.state:'Retirada')); + second.append(what); main.append(first,second); const warn=quoteWarning(q); if(warn){const w=node('span',undefined,'qwarn'+(warn[0]==='bad'?' bad':''));w.append(svgIcon(IC.alert,'i s'),node('span',warn[1]));main.append(w);} @@ -100,12 +101,25 @@ function renderQuotes(){ // Approved by the Site is the rule; only a person's review is worth a word. if(pay||q.approved&&!q.auto_approved){const line=node('span',undefined,'qpay'); if(pay)line.append(pay);if(q.approved&&!q.auto_approved)line.append(badge('Revisada pela equipe',''));main.append(line);} - b.append(artBox(items,'qthumb'),main); + const side=node('span',undefined,'qside'); + side.append(node('b',q.approved?money(q.approved.total_cents):metres(quoteMetres(q)),'qm'), + node('span',(quoteKind==='approved'?quoteExpiry(q):null)||shortAgo(q.created_at),'qt')); + b.append(artBox(items,'qthumb'),main,side); b.onclick=()=>{currentQuote=q;$('tab-quotes').classList.toggle('reviewing',PHONE.matches);renderQuotes();};return b; }); const filtered=quoteQuery||quoteProduct||quoteLayout||quoteFlag; - if(!list.length)list.push(node('p',filtered?'Nenhuma cotação com esses filtros.': - quoteKind==='pending'?'Nenhuma cotação para revisar.':'Nenhuma cotação aprovada aguardando pagamento.','empty pad')); + if(!list.length){ + if(filtered)list.push(node('p','Nenhuma cotação com esses filtros.','empty pad')); + else if(quoteKind==='pending'){ + const waiting=board.approved_total||0; + const action=button('Ver as '+waiting+' aguardando pagamento',async()=>{ + quoteKind='approved';quotePage=1;quoteFitting=0;currentQuote=null; + await loadQuotes(); + },'btn'); + list.push(emptyState(IC.check,'Tudo revisado', + 'Nenhuma cotação esperando revisão. '+waiting+' estão aguardando pagamento.',action)); + }else list.push(node('p','Nenhuma cotação aprovada aguardando pagamento.','empty pad')); + } $('quote-list').replaceChildren(...list); $('quote-pager').replaceChildren(...(quoteTotal?[pager({page:quotePage,size:quoteSize,total:quoteTotal,noun:'cotações',compact:true,fixedSize:true, onPage:n=>{quotePage=n;quoteFitting=0;loadQuotes().catch(e=>say(e.message,true));}})]:[])); @@ -114,9 +128,9 @@ function renderQuotes(){ $('reviews').replaceChildren(...(currentQuote?[quoteHead(currentQuote),...review(currentQuote)]:[emptyState(IC.file,'Selecione uma cotação','A revisão dela abre aqui.')])); } // A page or a pane with nothing to show: a mark, a line, and what to do. -function emptyState(d,title,text){ +function emptyState(d,title,text,action){ const box=node('div',undefined,'emptystate'),ico=node('span',undefined,'dropico');ico.append(svgIcon(d)); - box.append(ico,node('b',title),...(text?[node('span',text)]:[]));return box; + box.append(ico,node('b',title),...(text?[node('span',text)]:[]),...(action?[action]:[]));return box; } // The phone's head of a quote's page: back to the list, who, and WhatsApp. function quoteHead(quote){ @@ -127,31 +141,42 @@ function quoteHead(quote){ if(zap){const a=node('a',undefined,'mic');a.href=zap;a.target='_blank';a.rel='noopener noreferrer';a.setAttribute('aria-label','WhatsApp');a.append(svgIcon(IC.chat));h.append(a);} return h; } -const QUOTE_STATUS={pending_review:['A revisar','warn'],approved:['Aprovada, aguardando pagamento','ok'],expired:['Expirada','bad'],paid:['Paga','ok']}; +const QUOTE_STATUS={pending_review:'A revisar',approved:'Aguardando pagamento',expired:'Expirada',paid:'Paga'}; +function whatsappAction(quote){ + const zap=whatsappLink(quote.draft.customer.zap); + if(!zap)return null; + const a=node('a','Abrir conversa','btn'); + a.href=zap;a.target='_blank';a.rel='noopener noreferrer';a.title=quote.draft.customer.zap; + a.prepend(svgIcon(IC.chat,'i m')); + return a; +} function review(quote){ const head=node('div',undefined,'rhead');head.dataset.quote=quote.id; const words=node('div',undefined,'rwords'); const who=buyer(quote.draft), c=quote.draft.customer; const title=node('div',undefined,'rtitle'); - const h=node('h2',who.title);h.title=who.legal||who.title; - const [label,tone]=QUOTE_STATUS[quote.status]||[quote.status,'']; - const status=badge(label,tone);status.prepend(node('span',undefined,'dot')); - title.append(h,status); + const h=node('h2',who.title);h.title=[who.legal,who.mail].filter(Boolean).join(' · ')||who.title; + title.append(h,node('span',QUOTE_STATUS[quote.status]||quote.status,'tag')); const pay=paymentBadge(quote.payment);if(pay)title.append(pay); const meta=node('div',undefined,'rmeta'); - if(who.mail)meta.append(node('span',who.mail)); const doc=node('span');doc.append(docKind(c.cnpj)+' '+cnpj(c.cnpj),copyButton(cnpj(c.cnpj),'Copiar '+docKind(c.cnpj)));meta.append(doc); - const dest=quote.draft.destination,where=node('span');where.append(svgIcon(dest?IC.truck:IC.pin,'i s'),dest?'Entrega em '+dest.city+'/'+dest.state:'Retirada em Franca');meta.append(where); + // The e-mail stays in sight: for many customers it is the only way to tell them apart. + if(who.mail&&who.mail!==who.title)meta.append(node('span',who.mail)); + const dest=quote.draft.destination; + meta.append(node('span',dest?'Entrega em '+dest.city+'/'+dest.state:'Retirada em Franca')); meta.append(node('span','Recebida '+ago(quote.created_at)),node('span','#'+quote.id.slice(0,8),'code')); words.append(title,meta);head.append(words); if(quote.approved){const total=node('div',undefined,'qbig');total.append(node('span','Total','lbl'),node('b',money(quote.approved.total_cents)));head.append(total);} - const zap=whatsappLink(c.zap); - if(zap){const a=node('a',quote.status==='approved'?'Abrir conversa':'WhatsApp','btn');a.href=zap;a.target='_blank';a.rel='noopener noreferrer';a.title=c.zap;a.prepend(svgIcon(IC.chat,'i m'));head.append(a);} const body=node('div',undefined,'rbody'); const foot=node('div',undefined,'rfoot'); + const chat=whatsappAction(quote); + const withChat=parts=>{ + if(chat){foot.append(node('span',undefined,'sp'),chat);parts.push(foot);} + return parts; + }; if(quote.status==='pending_review'&"e.draft.items.some(item=>!LAYOUT_VERSIONS.includes(item.production?.version))){ body.append(callout(IC.alert,'Montagem antiga.','Solicite uma nova cotação ao cliente.','bad')); - return [head,body]; + return withChat([head,body]); } const count=quote.draft.items.length; if(quote.status!=='pending_review'){ @@ -165,23 +190,24 @@ function review(quote){ node('b',fr.total_cents?money(fr.total_cents):'grátis'),node('span','Total'),node('b',money(quote.approved.total_cents))); body.append(sums); } - if(quote.status==='approved'&&may('enter'))body.append(registerForm(quote)); if(quote.status==='approved'&&may('manage')){ - foot.append(discardButton(quote)); + foot.append(discardButton(quote),node('span',undefined,'sp')); // Tries the whole production flow without a payment. const test=button('Criar pedido de teste',async()=>{ if(!await ask('Criar um pedido de teste?','Ele entra em Arte recebida sem cobrar nada e não vai para o Tiny.','Criar pedido de teste'))return; const order=await api('/quotes/'+quote.id+'/test-order',{}); say('Pedido de teste #'+order.number+' criado em Arte recebida.');await load(); - },'btn right'); + },'btn'); foot.append(test); + if(chat)foot.append(chat); + if(may('enter'))foot.append(button('Pedido pago fora do site',()=>registerDialog(quote),'btn pri')); return [head,body,foot]; } - return [head,body]; + return withChat([head,body]); } if(!may('manage')){ quote.draft.items.forEach((item,index)=>body.append(quoteItem(item,null,null,index,count))); - return [head,body]; + return withChat([head,body]); } const form=node('form',undefined,'rform'); const edits=quote.draft.items.map((item,index)=>{const fields={};body.append(quoteItem(item,fields,null,index,count)); @@ -190,8 +216,8 @@ function review(quote){ const {residue_accepted_at,stroke_choice_at,...sent}=item; return ()=>({...sent,metres:fields.metres.value,grade:Number(fields.grade.value)});}); const check=node('input');check.required=true; - const submit=node('button','Aprovar cotação','btn pri lg'); - foot.append(checkbox('Arquivos, metragem e nota conferidos',check),discardButton(quote),submit); + const submit=node('button','Aprovar cotação','btn pri'); + foot.append(checkbox('Arquivos, metragem e nota conferidos',check),...(chat?[chat]:[]),discardButton(quote),submit); form.append(body,foot); form.onsubmit=async e=>{e.preventDefault();submit.disabled=true; try{const approved=await api('/quotes/'+quote.id+'/approve',{items:edits.map(fn=>fn())}); @@ -208,8 +234,7 @@ function callout(d,title,text,tone=''){ // cart on the Site, as a customer would, and registers it here. Origin and // payment start unchosen: a default would become the answer to everything. const PAID_OUTSIDE={pix:'Pix',card:'Cartão',cash:'Dinheiro',credit:'Crédito do cliente',faturado:'Faturado'}; -function registerForm(quote){ - const form=node('form',undefined,'register'); +function registerDialog(quote){ const group=(name,label,options)=>{ const g=node('div',undefined,'fgroup2');g.setAttribute('role','radiogroup');g.setAttribute('aria-label',label); const set=node('div',undefined,'fopts'); @@ -218,17 +243,17 @@ function registerForm(quote){ r.type='radio';r.name=name+'-'+quote.id;r.value=value;r.required=true;r.className='vh';l.append(r,text);set.append(l);} g.append(node('span',label,'lbl'),set);return g;}; const note=node('input');note.type='text';note.maxLength=300;note.placeholder='Observação (opcional)';note.setAttribute('aria-label','Observação');note.className='inp'; - const submit=node('button','Registrar pedido','btn pri'); - const row=node('div',undefined,'decide');row.append(note,submit); - const head=node('div');head.append(node('h4','Pago fora do site?'),node('p','Registre o pedido: ele entra em Arte recebida como os outros.','nnote')); - form.append(head,group('origin','Origem',ORIGINS),group('method','Como foi pago',PAID_OUTSIDE),row); - form.onsubmit=async e=>{e.preventDefault(); - const pick=name=>form.querySelector('input[name="'+name+'-'+quote.id+'"]:checked')?.value; - submit.disabled=true; - try{const order=await api('/quotes/'+quote.id+'/register',{origin:pick('origin'),method:pick('method'),note:note.value}); - currentQuote=null;say('Pedido #'+order.number+' registrado em Arte recebida.');await load();} - catch(error){say(error.message,true);submit.disabled=false;}}; - return form; + // The class keeps kanban.js' auto-refresh guard: the choices stay on screen. + const body=node('div',undefined,'register'); + body.append(group('origin','Origem',ORIGINS),group('method','Como foi pago',PAID_OUTSIDE),note); + const pick=(form,name)=>form.querySelector('input[name="'+name+'-'+quote.id+'"]:checked')?.value; + formDialog('Pedido pago fora do site',{host:dialogHost(),width:640, + text:'Registre o pedido: ele entra em Arte recebida como os outros.', + fields:[body],label:'Registrar pedido', + onsave:async form=>{ + const order=await api('/quotes/'+quote.id+'/register',{origin:pick(form,'origin'),method:pick(form,'method'),note:note.value}); + currentQuote=null;say('Pedido #'+order.number+' registrado em Arte recebida.');await load(); + }}); } const paidOutside=order=>order.payment?.provider==='manual'; // An unpaid quote leaves the list and can no longer be paid. @@ -236,7 +261,7 @@ function discardButton(quote){ return button('Descartar cotação',async()=>{ if(!await ask('Descartar esta cotação?','Ela sai do Kanban e o cliente não consegue mais pagá-la.','Descartar cotação',{tone:'red'}))return; await api('/quotes/'+quote.id+'/discard',{});currentQuote=null;say('Cotação descartada.');await load(); - },'btn quiet right'); + },'btn quiet'); } function quoteItem(item,fields,priced,index=0,count=1){ const box=node('section',undefined,'ritem');box.setAttribute('aria-label','Item '+(index+1)); @@ -244,14 +269,17 @@ function quoteItem(item,fields,priced,index=0,count=1){ tall.append(itemPreview(item)); const info=node('div',undefined,'iinfo'); const spec=item.production; - info.append(node('span',count>1?'Item '+(index+1)+' de '+count:'Item','lbl'),node('h3',productName(item))); + const ihead=node('div',undefined,'ihead'); + ihead.append(node('h3',productName(item))); + if(count>1)ihead.append(node('span','item '+(index+1)+' de '+count,'ilbl')); + info.append(ihead); const dl=node('dl',undefined,'dl'); const pair=(k,v)=>{if(v===null||v===undefined||v==='')return;const d=node('div');const dd=node('dd');dd.append(v);d.append(node('dt',k),dd);dl.append(d);}; pair('Folha',sheetSize(spec));pair('Peças',spec?String(spec.placements.length):null); pair('Arquivos',spec?String(spec.sources.length):null); - const g=node('span',undefined,'gradeline');g.append(gradePill(item.grade));pair('Nota da arte',g); pair('Metros cobrados',priced?metres(priced.billed_metres):null); pair('Valor do metro',priced?money(priced.unit_cents)+manualExtra(priced):null); + const g=node('span',undefined,'gradeline');g.append(gradePill(item.grade));pair('Nota da arte',g); pair('Valor',priced?money(priced.total_cents):null); info.append(dl); const notes=node('div',undefined,'inotes'); @@ -270,7 +298,9 @@ function quoteItem(item,fields,priced,index=0,count=1){ grid.append(m,gr);info.append(grid); } const links=node('div',undefined,'links'); - const originals=node('details',undefined,'originals');originals.append(node('summary','Originais ('+item.uploads.length+')')); + const originals=node('details',undefined,'originals'),summary=node('summary'); + summary.append(node('span','Originais ('+item.uploads.length+')'),svgIcon(IC.right,'i s')); + originals.append(summary); item.uploads.forEach((uid,i)=>originals.append(downloadButton('Original '+(i+1),download(uid),'btn'))); links.append(originals); info.append(links);box.append(tall,info);return box; diff --git a/web/kanban.css b/web/kanban.css index b9d6ee3..977ceeb 100644 --- a/web/kanban.css +++ b/web/kanban.css @@ -555,27 +555,28 @@ main{padding:0} never scrolls the page; the review on the right scrolls inside. */ .split{display:grid;grid-template-columns:460px minmax(0,1fr);height:calc(100vh - 72px)} .qlist{border-right:1px solid var(--ln);display:flex;flex-direction:column;min-height:0} -.qtools{display:flex;flex-direction:column;gap:12px;padding:18px 20px 14px;border-bottom:1px solid var(--ln)} +.qtools{display:flex;flex-direction:column;gap:12px;padding:20px 20px 16px;border-bottom:1px solid var(--ln)} .qtools .seg{align-self:flex-start} .qsearch{width:100%} -.toggles{display:flex;align-items:center;gap:4px;flex-wrap:wrap} -.tg{height:28px;padding:0 11px;border-radius:999px;border:1px solid var(--ln2);background:transparent;color:var(--tx2);font-size:12.5px;font-weight:550;display:inline-flex;align-items:center;gap:5px} +.toggles{display:flex;align-items:center;gap:6px;flex-wrap:wrap} +.tg{height:30px;padding:0 11px;border-radius:8px;border:1px solid var(--ln2);background:transparent;color:var(--tx2);font-size:13px;font-weight:550;display:inline-flex;align-items:center;gap:5px} .tg:hover{background:var(--sf3);color:var(--tx)} .tg.on{background:var(--ink);border-color:var(--ink);color:var(--onink)} -.qrows{flex:1;min-height:0;overflow:hidden;padding:8px;display:flex;flex-direction:column;gap:4px} -.qrow{display:grid;grid-template-columns:52px minmax(0,1fr);gap:14px;width:100%;padding:12px;border:1px solid transparent;border-radius:11px;background:transparent;text-align:left;color:inherit;align-items:start;flex:none} +.qrows{flex:1;min-height:0;overflow:hidden;padding:0;display:flex;flex-direction:column;gap:0} +.qrow{display:grid;grid-template-columns:44px minmax(0,1fr) auto;gap:12px;width:100%;padding:14px 20px;border:0;border-bottom:1px solid var(--ln);border-radius:0;background:transparent;text-align:left;color:inherit;align-items:center;flex:none} .qrow:hover{background:var(--sf2)} -.qrow.on{background:var(--sf);border-color:var(--ln2)} -.qthumb{width:52px;height:52px;border-radius:8px;padding:4px;border:0;box-shadow:inset 0 0 0 1px var(--ln);background:repeating-conic-gradient(var(--chka) 0 25%,var(--chkb) 0 50%) 0 0/8px 8px} +.qrow.on{background:var(--sf);box-shadow:inset 3px 0 0 var(--tx)} +.qthumb{width:44px;height:44px;border-radius:8px;padding:0;border:0;box-shadow:inset 0 0 0 1px var(--ln);background:repeating-conic-gradient(var(--chka) 0 25%,var(--chkb) 0 50%) 0 0/8px 8px} .qthumb.layout,.qthumb.none{background:var(--sf3)} .qmain{display:flex;flex-direction:column;gap:3px;min-width:0} .qline{display:flex;align-items:baseline;gap:10px;min-width:0} .qline>:first-child{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap} -.qline b{font-size:13.5px;font-weight:600} +.qline b{font-size:14px;font-weight:600} .qline.sub{align-items:center;color:var(--tx2);font-size:12.5px} -.qline.sub>:last-child{color:var(--tx3);white-space:nowrap} .qline .grade{height:19px;min-width:26px;font-size:11.5px;vertical-align:1px} -.qm{font-size:13.5px;font-weight:600;white-space:nowrap} +.qside{display:flex;flex-direction:column;align-items:flex-end;gap:3px;text-align:right;white-space:nowrap} +.qside .qm{font-size:14px;font-weight:650} +.qside .qt{font-size:12px;color:var(--tx3)} .qwarn{display:flex;align-items:center;gap:5px;margin-top:3px;font-size:12px;font-weight:600;color:var(--warn)} .qwarn.bad{color:var(--bad)} .qwarn span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap} @@ -587,16 +588,18 @@ main{padding:0} .rhead{display:flex;align-items:flex-start;gap:16px;padding:22px 28px 18px;border-bottom:1px solid var(--ln)} .rwords{flex:1;min-width:0} .rtitle{display:flex;align-items:center;gap:10px;flex-wrap:wrap} -.rhead h2{margin:0;font-size:22px;font-weight:650;letter-spacing:-.01em;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap} -.rmeta{display:flex;gap:6px 16px;flex-wrap:wrap;margin-top:6px;color:var(--tx2);font-size:13px} +.rhead h2{margin:0;font-size:20px;font-weight:650;letter-spacing:-.01em;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap} +.rmeta{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:6px;color:var(--tx2);font-size:13.5px} .rmeta>span{display:flex;align-items:center;gap:6px} +.rmeta>span+span::before{content:"·";color:var(--tx3)} .qbig{text-align:right;flex-shrink:0} -.qbig b{display:block;font-size:24px;font-weight:650;letter-spacing:-.02em;line-height:1.1} -.rbody{flex:1;min-height:0;overflow:auto;padding:22px 28px;display:flex;flex-direction:column;gap:22px;background:var(--sf)} +.qbig .lbl{display:block} +.qbig b{display:block;font-size:26px;font-weight:650;letter-spacing:-.02em;line-height:1.1} +.rbody{flex:1;min-height:0;overflow:auto;padding:24px 28px;display:flex;flex-direction:column;gap:22px;background:var(--bg)} .rbody>*{flex-shrink:0} -.ritem{display:grid;grid-template-columns:336px minmax(0,1fr);gap:36px;align-items:start} +.ritem{display:grid;grid-template-columns:360px minmax(0,1fr);gap:28px;align-items:start} .ritem+.ritem{padding-top:22px;border-top:1px solid var(--ln)} -.tall{width:336px;max-height:calc(100vh - 72px - 220px);min-height:320px;overflow-y:auto;border-radius:10px;box-shadow:inset 0 0 0 1px var(--ln);scrollbar-width:thin;padding:8px} +.tall{width:360px;max-height:calc(100vh - 72px - 220px);min-height:320px;overflow-y:auto;border-radius:10px;box-shadow:inset 0 0 0 1px var(--ln);scrollbar-width:thin;padding:8px} .tall .preview{display:flex;flex-direction:column;gap:8px} .tall .preview>svg{display:block;width:100%;height:auto} .tall .preview .view{display:flex;flex-direction:column;gap:6px;border-radius:8px;overflow:hidden;padding:6px;background:repeating-conic-gradient(var(--chka) 0 25%,var(--chkb) 0 50%) 0 0/14px 14px} @@ -607,19 +610,34 @@ main{padding:0} .inputs .fld input{font-size:15px;font-weight:550} .fld.warn input{border-color:var(--warn)} .fld.warn small{color:var(--warn);font-weight:600} +.ritem .ihead{display:flex;align-items:baseline;gap:10px;margin:0 0 18px} +.ritem .ihead h3{margin:0;font-size:17px;font-weight:650;letter-spacing:-.01em} +.ritem .ihead .ilbl{font-size:13px;color:var(--tx3)} +.ritem .dl{grid-template-columns:repeat(3,minmax(0,1fr))} +.ritem .links{flex-direction:column;align-items:stretch} +.ritem .originals{width:100%;padding:0;border:1px solid var(--ln);border-radius:9px;background:var(--sf2)} +.ritem .originals summary{display:flex;align-items:center;gap:10px;height:40px;padding:0 12px;font-size:13.5px;font-weight:600;cursor:pointer;list-style:none} +.ritem .originals summary::-webkit-details-marker{display:none} +.ritem .originals summary span{flex:1} +.ritem .originals summary .i{color:var(--tx2);transition:transform .2s} +.ritem .originals[open] summary .i{transform:rotate(90deg)} +.ritem .originals .btn{display:flex;width:calc(100% - 24px);margin:8px 12px 0} +.ritem .originals .btn:last-child{margin-bottom:10px} .qsums{display:grid;grid-template-columns:auto auto;justify-content:end;gap:6px 24px;font-size:13.5px;color:var(--tx2);padding-top:16px;border-top:1px solid var(--ln)} .qsums b{text-align:right;color:var(--tx);font-weight:600} .qsums b:last-child{font-size:16px} -.rfoot{display:flex;align-items:center;gap:10px;padding:16px 28px;border-top:1px solid var(--ln);background:var(--bg);flex-shrink:0} +.rfoot{display:flex;align-items:center;gap:10px;padding:14px 28px;border-top:1px solid var(--ln);background:var(--bg);flex-shrink:0} .rfoot .ckb{margin-right:auto} -.register{display:flex;flex-direction:column;gap:14px;padding:16px;border:1px solid var(--ln2);border-radius:12px} -.register h4{margin:0 0 2px;font-size:15px;font-weight:650} +.rfoot .sp{flex:1} +.register{display:contents} .fgroup2{display:grid;grid-template-columns:110px minmax(0,1fr);align-items:center;gap:10px} label.fopt{cursor:pointer;user-select:none} .fopt:has(input:checked){background:var(--ink);border-color:var(--ink);color:var(--onink)} .fopt:has(input:focus-visible){outline:2px solid var(--acc);outline-offset:2px} -.emptystate{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:60px 20px;text-align:center;color:var(--tx2);font-size:13.5px} -.emptystate b{font-size:15px;font-weight:650;color:var(--tx)} +.emptystate{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;padding:60px 20px;text-align:center;color:var(--tx2);font-size:13.5px} +.emptystate b{font-size:16px;font-weight:650;color:var(--tx)} +.emptystate>span{max-width:440px;line-height:1.5} +.emptystate .btn{margin-top:6px} .empty.pad{padding:20px 12px} /* The page bar under a list. */ .pager{display:flex;align-items:center;gap:12px;flex-wrap:wrap;padding:12px 20px;border-top:1px solid var(--ln);font-size:12.5px;color:var(--tx2)} @@ -1099,8 +1117,10 @@ select.inp{appearance:none;-webkit-appearance:none;padding-right:32px;background .mfact b{font-weight:550;text-align:right;min-width:0;overflow-wrap:anywhere} .mfacts select{margin-top:10px;height:44px;padding:0 12px;border-radius:10px;border:1px solid var(--ln2);background:var(--bg);color:var(--tx)} .rework{border-radius:12px;background:var(--sf)} - /* dialogs: sheets from the bottom */ - .modal{left:0;right:0;top:auto;bottom:0;width:auto!important;max-width:none;max-height:92vh;transform:none;border-radius:18px 18px 0 0;padding:22px 18px 18px;animation:sheetUp .4s cubic-bezier(.16,1,.3,1) both} + /* dialogs: sheets from the bottom, over a quote opened as a page */ + .scrim.hi{z-index:27} + .modal{z-index:28;left:0;right:0;top:auto;bottom:0;width:auto!important;max-width:none;max-height:92vh;transform:none;border-radius:18px 18px 0 0;padding:22px 18px 18px;animation:sheetUp .4s cubic-bezier(.16,1,.3,1) both} + .register .fopt{height:44px} .frow,.inputs{grid-template-columns:1fr} .dfoot{flex-wrap:wrap} .dfoot .btn{flex:1;height:48px} @@ -1123,23 +1143,26 @@ select.inp{appearance:none;-webkit-appearance:none;padding-right:32px;background #quote-chips{display:none} .qrows{max-height:none;overflow:visible;padding:6px 12px 12px;gap:0} .qrow{border-radius:0;border:0;border-bottom:1px solid var(--ln);padding:12px 2px} - .qrow.on{background:transparent;border-color:var(--ln)} + .qrow.on{background:transparent;border-color:var(--ln);box-shadow:none} .review{display:none} #tab-quotes.reviewing .review{display:flex;position:fixed;inset:0;z-index:25;background:var(--bg);animation:pageIn .38s cubic-bezier(.16,1,.3,1) both} .review .rhead{display:none} - .rbody{padding:12px 12px 170px;gap:10px;background:var(--bg)} + .rbody{padding:12px 12px 200px;gap:10px;background:var(--bg)} .ritem{grid-template-columns:1fr;gap:12px} .tall{width:100%;height:140px;min-height:0;max-height:none;padding:0;background:repeating-conic-gradient(var(--chka) 0 25%,var(--chkb) 0 50%) 0 0/10px 10px} .tall .preview>svg,.tall .preview .view{width:120px;margin:0 auto} - .ritem .iinfo>.lbl{display:none} - .ritem .iinfo>h3{margin:0 0 6px;font-size:16px} + .ritem .ihead{margin-bottom:12px} + .ritem .ihead h3{font-size:16px} + .ritem .originals summary{height:44px} .ritem .dl{display:flex;flex-direction:column;gap:0;padding:4px 16px;border:1px solid var(--ln);border-radius:12px;background:var(--sf)} .ritem .inputs{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-top:12px} .ritem .inputs input{height:48px;font-size:16px} .qsums{justify-content:stretch;grid-template-columns:1fr auto} .rfoot{position:fixed;left:0;right:0;bottom:0;z-index:26;display:grid;grid-template-columns:auto minmax(0,1fr);gap:10px;padding:12px 16px 18px;background:var(--top)} - .rfoot .ckb{grid-column:1/-1;margin:0} + .rfoot .ckb{grid-column:1/-1;margin:0;min-height:44px} + .rfoot .sp{display:none} .rfoot .btn{height:50px;font-size:15px} + .rfoot .btn.pri{grid-column:1/-1} .rfoot .btn.right{margin:0} .register .fgroup2{grid-template-columns:1fr} /* Pagamentos: one card per payment */