feat: a Números tab with the production numbers the board already records

Every paid order and every move is recorded, but nobody could see the
totals. The new tab shows, for the last 7, 30 or 90 days: paid orders,
metres sold, money received, the average ticket, how many orders needed a
correction, and the median time from payment to Finalizado. A column per
day charts the metres sold (with a table under it), and a table gives each
stage's median time and what waits in it now, with the oldest order.
Test and cancelled orders stay out.

The header now has five tabs: the search box narrows first, the refresh
picker keeps its width, and the operator's e-mail moves to Sair's tooltip
on narrower screens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-10-05 12:01:03 -03:00
parent f567e6da89
commit 1b445f0459
5 changed files with 183 additions and 10 deletions

View File

@@ -51,8 +51,8 @@ input[type=file]{font-size:14px;color:var(--muted);max-width:100%}
.tabs button{display:flex;align-items:center;gap:8px;padding:0 14px;border:0;border-bottom:2px solid transparent;background:none;color:var(--muted);font-weight:600;font-size:14.5px}
.tabs button[aria-selected=true]{color:var(--tx);font-weight:700;border-bottom-color:var(--accent)}
.tabs .count{font-family:var(--mono);font-size:13.5px;color:var(--muted)}
.searchbox{position:relative;margin-left:auto}
.search{display:flex;align-items:center;gap:8px;width:380px;height:38px;padding:0 12px;border:1px solid var(--line2);border-radius:9px;background:var(--card);color:var(--faint)}
.searchbox{position:relative;margin-left:auto;flex:0 1 380px;min-width:200px}
.search{display:flex;align-items:center;gap:8px;width:100%;box-sizing:border-box;height:38px;padding:0 12px;border:1px solid var(--line2);border-radius:9px;background:var(--card);color:var(--faint)}
.search:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px rgba(255,139,43,.18)}
.search input{flex:1;min-width:0;border:0;background:transparent;height:auto;padding:0;outline:none}
.search kbd{font:inherit;font-size:12px;padding:0 6px;border:1px solid var(--line3);border-radius:5px;color:var(--faint)}
@@ -74,6 +74,8 @@ input[type=file]{font-size:14px;color:var(--muted);max-width:100%}
.tinydot::before{content:"";width:8px;height:8px;border-radius:999px;background:var(--dot,#5B6168)}
.tinydot:empty{display:none}
.who{font-size:14px;color:var(--muted);white-space:nowrap;max-width:220px;overflow:hidden;text-overflow:ellipsis}
/* With five tabs, the operator's e-mail is the first thing to give way; it stays on Sair's tooltip. */
@media (max-width:1560px){.who{display:none}}
#status{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);z-index:20;margin:0;max-width:min(640px,calc(100vw - 32px));padding:10px 16px;border-radius:10px;border:1px solid var(--line3);background:#1E2226;color:var(--tx);font-size:14px;box-shadow:0 10px 30px rgba(0,0,0,.45)}
#status:empty,#login-status:empty{display:none}
#status.error{border-color:var(--bad-line);color:var(--bad)}
@@ -222,6 +224,28 @@ main{padding:0 24px 24px}
.field select,.field input{height:38px;min-width:160px;padding:0 10px;border-radius:8px;border:1px solid var(--line3);background:var(--bg);color:var(--tx)}
.field input{min-width:110px;width:110px}
.issue input{width:320px}
.pagehead{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.statchips{display:flex;gap:8px;margin-left:auto}
.stats-note{margin:-12px 0 0;font-size:13.5px}
.kpis{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:12px}
.kpi{display:flex;flex-direction:column;gap:4px;padding:14px 16px;border:1px solid var(--line2);border-radius:12px;background:var(--card)}
.kpi span{font-size:13.5px;color:var(--muted)}
.kpi b{font-size:24px;font-weight:700;letter-spacing:-.01em;font-variant-numeric:proportional-nums}
.kpi small{font-size:13px;color:var(--faint)}
.statbox{padding:16px 18px;border:1px solid var(--line2);border-radius:12px;background:var(--card)}
.chart{position:relative}
.chart svg{display:block;width:100%;height:auto}
.chart .grid{stroke:var(--line);stroke-width:1}
.chart .tick{fill:var(--faint);font-size:12px;font-family:var(--mono)}
.chart .bar{fill:var(--accent)}
.chart .hit{fill:transparent;cursor:default}
.chart .hit:hover{fill:rgba(255,255,255,.03)}
.chart .tip{position:absolute;transform:translate(-50%,calc(-100% - 8px));pointer-events:none;padding:6px 10px;border-radius:8px;
background:var(--card2);border:1px solid var(--line3);font-size:13px;white-space:nowrap;color:var(--tx)}
.charttable{margin-top:10px;font-size:13.5px;color:var(--muted)}
.charttable summary{cursor:pointer}
.charttable table{margin-top:8px}
#stats-stages .swatch{display:inline-block;width:10px;height:10px;border-radius:3px;background:var(--c);margin-right:8px}
.grid4{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:12px}
.integration{display:flex;flex-direction:column;gap:10px;padding:16px;border-radius:12px;border:1px solid var(--line2);background:var(--card)}
.integration .head{display:flex;align-items:center;gap:8px}
@@ -237,7 +261,7 @@ table.log td{padding:10px 12px;border-bottom:1px solid #1E2226;vertical-align:to
@media (max-width:900px){
.top{flex-wrap:wrap;height:auto;padding:10px 16px;gap:10px}
.searchbox{order:5;width:100%;margin-left:0}
.searchbox{order:5;width:100%;flex-basis:100%;margin-left:0}
.search{width:100%}
.results{width:100%}
main{padding:0 16px 16px}
@@ -393,7 +417,7 @@ a.zap{display:inline-flex;align-items:center;gap:4px;vertical-align:bottom}
.card.drop-after{box-shadow:0 3px 0 0 var(--accent)}
/* "Atualizar" and how often it happens by itself, as one control. */
.refresh{display:inline-flex;align-items:stretch;border:1px solid var(--line2);border-radius:8px;overflow:hidden}
.refresh{flex-shrink:0;display:inline-flex;align-items:stretch;border:1px solid var(--line2);border-radius:8px;overflow:hidden}
.refresh .btn{border:0;border-radius:0;display:inline-flex;align-items:center;gap:6px}
.refresh select{height:36px;padding:0 28px 0 10px;border:0;border-left:1px solid var(--line2);background:transparent;color:var(--muted);font:inherit;font-size:13.5px;font-weight:600;cursor:pointer}
.refresh select{width:88px;height:36px;padding:0 24px 0 10px;border:0;border-left:1px solid var(--line2);background:transparent;color:var(--muted);font:inherit;font-size:13.5px;font-weight:600;cursor:pointer}
.refresh select option{background:var(--card);color:var(--tx)}