/* ============================================================================
 * app.css — Estilo compartilhado do app profissional SupraWeb (V4)
 * Usado por todas as telas novas (/orcamentos.html, /orcamentos/NNNNN.html, ...)
 * ========================================================================== */
:root{
  --bg:#f1f5f9; --card:#fff; --line:#e2e8f0; --txt:#0f172a; --txt2:#64748b;
  --teal:#0f766e; --teal-d:#0b5b54; --teal-l:#ccfbf1;
  --sidebar:#0f172a; --sidebar-txt:#cbd5e1; --sidebar-act:#14b8a6;
}
*{ box-sizing:border-box; }
html,body{ margin:0; height:100%; }
body{ font-family:Inter,system-ui,sans-serif; background:var(--bg); color:var(--txt); }
a{ color:inherit; text-decoration:none; }

/* ── Layout: menu no TOPO, conteúdo em largura cheia ──────────────────────── */
.shell{ display:flex; flex-direction:column; min-height:100vh; }
.topnav{ background:var(--sidebar); color:var(--sidebar-txt); display:flex; align-items:center; gap:2px; padding:0 18px; height:50px; position:sticky; top:0; z-index:10; overflow-x:auto; }
.topnav .brand{ font-weight:700; font-size:16px; color:#fff; display:flex; align-items:center; gap:9px; margin-right:20px; white-space:nowrap; }
.topnav .brand .dot{ width:9px; height:9px; border-radius:3px; background:var(--sidebar-act); }
.topnav a.item{ display:flex; align-items:center; gap:7px; height:50px; padding:0 13px; font-size:14px; color:var(--sidebar-txt); cursor:pointer; border-bottom:3px solid transparent; white-space:nowrap; }
.topnav a.item:hover{ color:#fff; }
.topnav a.item.active{ color:#fff; border-bottom-color:var(--sidebar-act); }
.topnav a.item.soon{ color:#52617a; cursor:default; }
.topnav a.item.soon:hover{ color:#52617a; }

.main{ flex:1; min-width:0; display:flex; flex-direction:column; }
.topbar{ background:var(--card); border-bottom:1px solid var(--line); padding:13px 24px; display:flex; align-items:center; gap:12px; position:sticky; top:50px; z-index:5; }
.topbar h1{ font-size:18px; margin:0; font-weight:700; }
.topbar .tag{ font-size:11px; font-weight:600; color:var(--teal); background:var(--teal-l); padding:3px 9px; border-radius:999px; }
.content{ padding:20px 24px 60px; }

/* ── KPIs ─────────────────────────────────────────────────────────────────── */
.cards{ display:flex; gap:14px; flex-wrap:wrap; margin-bottom:16px; }
.kpi{ background:var(--card); border:1px solid var(--line); border-radius:12px; padding:12px 18px; min-width:150px; }
.kpi .l{ font-size:11px; color:var(--txt2); font-weight:600; text-transform:uppercase; letter-spacing:.03em; }
.kpi .v{ font-size:20px; font-weight:700; margin-top:3px; }

/* ── Tools ────────────────────────────────────────────────────────────────── */
.tools{ display:flex; gap:10px; flex-wrap:wrap; margin-bottom:14px; }
input,select{ font-family:inherit; font-size:14px; padding:9px 11px; border:1px solid #cbd5e1; border-radius:9px; background:#fff; color:var(--txt); }
input[type=search]{ min-width:260px; }

/* ── Tabela ───────────────────────────────────────────────────────────────── */
.tbl-wrap{ background:var(--card); border:1px solid var(--line); border-radius:12px; overflow:hidden; }
table{ width:100%; border-collapse:collapse; }
thead th{ background:#f8fafc; text-align:left; font-size:12px; color:var(--txt2); font-weight:600; padding:11px 12px; white-space:nowrap; border-bottom:1px solid var(--line); }
tbody td{ padding:10px 12px; border-top:1px solid var(--line); font-size:13.5px; white-space:nowrap; }
tbody tr{ cursor:pointer; }
tbody tr:hover{ background:#f1f5f9; }
.num{ text-align:right; font-variant-numeric:tabular-nums; }
.muted{ color:var(--txt2); }
.neg{ color:#dc2626; }
.badge{ font-size:11px; font-weight:600; padding:2px 8px; border-radius:999px; color:#fff; }
.foot{ margin-top:12px; font-size:12px; color:var(--txt2); }
#status{ padding:60px 0; text-align:center; color:var(--txt2); font-size:14px; }

/* ── Login overlay ────────────────────────────────────────────────────────── */
#ov{ position:fixed; inset:0; background:var(--bg); display:none; align-items:center; justify-content:center; z-index:50; }
#ov .box{ width:330px; max-width:90vw; background:#fff; border:1px solid var(--line); border-radius:14px; padding:26px; box-shadow:0 10px 40px rgba(0,0,0,.08); }
#ov h2{ margin:0 0 4px; font-size:19px; }
#ov p{ margin:0 0 18px; font-size:13px; color:var(--txt2); }
#ov input{ width:100%; margin-bottom:10px; }
#ov button{ width:100%; padding:11px; background:var(--teal); color:#fff; border:0; border-radius:9px; font-size:14px; font-weight:600; cursor:pointer; }
#ov .err{ min-height:18px; margin-top:9px; font-size:13px; color:#dc2626; }
