@font-face { font-family: "Inter"; font-weight: 400; font-style: normal; src: url("fonts/Inter-Regular.otf") format("opentype"); }
@font-face { font-family: "Inter"; font-weight: 500; font-style: normal; src: url("fonts/Inter-Medium.otf") format("opentype"); }
@font-face { font-family: "Inter"; font-weight: 600; font-style: normal; src: url("fonts/Inter-SemiBold.otf") format("opentype"); }
@font-face { font-family: "Inter"; font-weight: 700; font-style: normal; src: url("fonts/Inter-Bold.otf") format("opentype"); }
@font-face { font-family: "Inter"; font-weight: 800; font-style: normal; src: url("fonts/Inter-ExtraBold.otf") format("opentype"); }
:root {
  --orange: #fd8d04; --purple: #8d21e8; --blue: #0697f2; --green: #75d408;
  --ink: #0b0b0f; --ink-2: #16161d; --ink-3: #23232d;
  --bg: #f4f5f8; --card: #ffffff; --line: #e3e5ec; --text: #1c1d26; --muted: #6b6f80;
  --primary: #7a14d4; --primary-h: #6a0fbd; --danger: #c8213f; --ok: #2a7d0a; --warn: #b45300;
  --radius: 10px; --shadow: 0 1px 2px rgba(15, 15, 30, .06), 0 4px 14px rgba(15, 15, 30, .06);
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, "Noto Sans", sans-serif;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.4; overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
.hidden { display: none !important; }

.app { display: grid; grid-template-columns: 252px 1fr; height: 100vh; }

/* ---------- barra lateral ---------- */
.sidebar { background: var(--ink); color: #d9dbe6; display: flex; flex-direction: column; min-height: 0; }
.brand { display: flex; align-items: center; gap: 12px; padding: 18px 16px 14px; }
.brand img { border-radius: 50%; }
.brand strong { display: block; color: #fff; font-size: 16px; letter-spacing: .2px; }
.brand span { font-size: 12px; color: #9ea1b3; }
.stripe { display: grid; grid-template-columns: repeat(4, 1fr); height: 4px; margin: 0 16px 8px; border-radius: 4px; overflow: hidden; }
.stripe i:nth-child(1) { background: var(--orange); } .stripe i:nth-child(2) { background: var(--purple); }
.stripe i:nth-child(3) { background: var(--green); } .stripe i:nth-child(4) { background: var(--blue); }
nav { flex: 1; overflow-y: auto; padding: 4px 10px 12px; }
.nav-sec { font-size: 11px; text-transform: uppercase; letter-spacing: .09em; color: #70748a; padding: 14px 10px 6px; }
.nav-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0;
  color: #cfd2e0; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.nav-item:hover { background: var(--ink-3); color: #fff; }
.nav-item.active { background: var(--ink-3); color: #fff; box-shadow: inset 3px 0 0 var(--accent, var(--purple)); }
.nav-item .ico { width: 20px; text-align: center; font-size: 15px; }
.nav-item.soon { opacity: .45; cursor: default; }
.nav-item.soon:hover { background: none; color: #cfd2e0; }
.tag { margin-left: auto; font-size: 10px; background: var(--ink-3); color: #aab; padding: 2px 6px; border-radius: 20px; }
.side-foot { padding: 12px 16px; font-size: 11px; color: #9ea1b3; border-top: 1px solid var(--ink-3); }

/* ---------- área principal ---------- */
.main { min-width: 0; min-height: 0; display: flex; flex-direction: column; }
.view { flex: 1; min-height: 0; overflow: auto; padding: 22px 28px 28px; scroll-padding-bottom: 96px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.page-head h1 { margin: 0; font-size: 22px; letter-spacing: -.2px; }
.page-head p { margin: 2px 0 0; color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.card-pad { padding: 18px 20px; }

/* ---------- botões e campos ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: #fff; color: var(--text);
  padding: 8px 14px; border-radius: 8px; cursor: pointer; font-weight: 500; white-space: nowrap; }
.btn:hover { background: #f1f2f7; }
.btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-h); }
.btn.danger { color: var(--danger); } .btn.danger:hover { background: #fdeef1; }
.btn.small { padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:focus-visible, .nav-item:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, tr:focus-visible {
  outline: 2px solid var(--blue); outline-offset: 1px; }

label.f { display: block; }
label.f > span, .fl { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; font-weight: 500; }
label.f > span em, .fl em { color: var(--danger); font-style: normal; }
input[type=text], input[type=tel], input[type=email], input[type=date], input[type=time], input[type=search], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid #cfd2de; border-radius: 8px; background: #fff; }
input:read-only, input:disabled { background: #f3f4f8; color: var(--muted); }
textarea { resize: vertical; min-height: 64px; }
input[type=checkbox], input[type=radio] { accent-color: var(--primary); width: 16px; height: 16px; }
input.money, input.num { text-align: right; }
.check { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.radios { display: flex; gap: 16px; flex-wrap: wrap; padding: 6px 0; }
.radios label { display: flex; align-items: center; gap: 6px; cursor: pointer; }

.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px 14px; }
.s1{grid-column:span 1}.s2{grid-column:span 2}.s3{grid-column:span 3}.s4{grid-column:span 4}.s5{grid-column:span 5}
.s6{grid-column:span 6}.s7{grid-column:span 7}.s8{grid-column:span 8}.s9{grid-column:span 9}.s12{grid-column:span 12}
.sec-title { grid-column: span 12; margin: 8px 0 -2px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted);
  border-bottom: 1px solid var(--line); padding-bottom: 5px; }
.sec-title:first-child { margin-top: 0; }

/* ---------- listas / tabelas ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.toolbar .grow { flex: 1; min-width: 220px; }
.toolbar select { width: auto; min-width: 150px; }
.table-wrap { overflow: auto; max-height: calc(100vh - 230px); }
table { width: 100%; border-collapse: collapse; }
th { position: sticky; top: 0; background: #fafafc; text-align: left; font-size: 12px; color: var(--muted); font-weight: 600;
  padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; z-index: 1; }
th.r, td.r { text-align: right; font-variant-numeric: tabular-nums; }
td { padding: 9px 12px; border-bottom: 1px solid #eef0f5; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: #f6f1fd; }
tr.row-block td { background: #fde8ec; } tr.row-warn td { background: #fff3df; }
tr.stock-ok td:first-child { box-shadow: inset 4px 0 0 var(--green); }
tr.stock-low td:first-child { box-shadow: inset 4px 0 0 #f2c200; }
tr.stock-zero td:first-child { box-shadow: inset 4px 0 0 var(--danger); }
.empty { padding: 44px 20px; text-align: center; color: var(--muted); }
.count { color: var(--muted); font-size: 12px; margin-left: auto; }
.pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 20px; background: #eceef5; color: #454a5e; }
.pill.m2 { background: #e5f4ff; color: #04689f; } .pill.srv { background: #fff0dc; color: #9a5300; }
.pill.bad { background: #fde1e6; color: #a31d36; } .pill.warn { background: #fff0cf; color: #8a5a00; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--muted); padding: 10px 4px 0; flex-wrap: wrap; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* ---------- janelas ---------- */
.overlay { position: fixed; inset: 0; background: rgba(10, 10, 20, .55); display: flex; align-items: flex-start; justify-content: center;
  padding: 32px 20px; overflow: auto; z-index: 50; }
.modal { background: #fff; border-radius: 14px; width: min(980px, 100%); box-shadow: 0 20px 60px rgba(0, 0, 0, .35); display: flex; flex-direction: column; }
.modal.narrow { width: min(460px, 100%); margin-top: 12vh; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 17px; }
.modal-body { padding: 18px 20px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line); background: #fafafc; border-radius: 0 0 14px 14px; }
.x { background: none; border: 0; font-size: 22px; line-height: 1; color: var(--muted); cursor: pointer; padding: 2px 8px; border-radius: 6px; }
.x:hover { background: #eef0f5; }
.form-error { color: var(--danger); background: #fdeef1; border: 1px solid #f6c3cd; padding: 8px 12px; border-radius: 8px; margin-right: auto; max-width: 60%; }

/* ---------- precificação ---------- */
.price-box { background: #faf7ff; border: 1px solid #e6d8fa; border-radius: 10px; padding: 14px; }
.price-grid { display: grid; grid-template-columns: 120px repeat(3, 1fr); gap: 8px 12px; align-items: center; }
.price-grid .h { font-size: 12px; color: var(--muted); font-weight: 600; }
.price-grid .rowlabel { font-size: 13px; color: var(--muted); }
.hint { font-size: 12px; color: var(--muted); }
.sim { background: #f0f9ff; border: 1px solid #cfe9fb; border-radius: 10px; padding: 14px; }
.sim .result { font-size: 22px; font-weight: 700; color: #04689f; }
.faixas-table td, .faixas-table th { padding: 4px 6px; }
.faixas-table input { padding: 6px 8px; }

/* ---------- início ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi { padding: 16px 18px; border-left: 5px solid var(--c, var(--purple)); cursor: pointer; }
.kpi:hover { transform: translateY(-1px); }
.kpi b { display: block; font-size: 28px; letter-spacing: -.5px; }
.kpi span { color: var(--muted); }
.roadmap { list-style: none; margin: 0; padding: 0; }
.roadmap li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid #eef0f5; }
.roadmap li:last-child { border: 0; }
.roadmap .dot { width: 22px; height: 22px; border-radius: 50%; background: #e3e5ec; color: #fff; display: grid; place-items: center; font-size: 12px; flex: none; }
.roadmap .done .dot { background: var(--green); } .roadmap .now .dot { background: var(--orange); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.tab { border: 1px solid var(--line); background: #fff; padding: 7px 14px; border-radius: 20px; cursor: pointer; }
.tab.active { background: var(--primary); border-color: var(--primary); color: #fff; }
.chips { display: flex; flex-direction: column; gap: 6px; }
.chip-row { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.chip-row span { flex: 1; }

#toasts { position: fixed; right: 20px; bottom: 84px; pointer-events: none; display: flex; flex-direction: column; gap: 8px; z-index: 100; }
.toast { pointer-events: auto; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; box-shadow: var(--shadow); border-left: 4px solid var(--green); }
.toast.err { border-left-color: var(--danger); }
/* ---- ordens de serviço e orçamentos (etapa 2) ---- */
.pill.ok { background: #e1f5d5; color: #2b7a0b; }
.pill.sit { background: var(--c, #6b6f80); color: #fff; }
.kpis.small { grid-template-columns: repeat(auto-fit, minmax(140px, 220px)); margin-bottom: 12px; }
.kpis.small .kpi b { font-size: 22px; }
.inl { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; }
.inl input { width: auto; }
td.late { color: var(--danger); font-weight: 600; }
tr.row-cancel td { color: #9a9db0; text-decoration: line-through; }
.table-wrap.pick { max-height: 52vh; }
.table-wrap.lines { max-height: none; overflow: visible; }
fieldset.ed { border: 0; padding: 0; margin: 0; min-width: 0; }
fieldset.ed:disabled { opacity: .85; }
.cli-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 12px; border: 1px solid #cfd2de; border-radius: 8px; background: #fff; min-height: 38px; }
.cli-box.warn { background: #fff3df; border-color: #f0cf94; } .cli-box.bad { background: #fde8ec; border-color: #f2b8c3; }
.cli-empty { width: 100%; justify-content: center; border-style: dashed; color: var(--primary); font-weight: 600; }
.ltable td { vertical-align: top; }
.ltable input[type=text], .ltable select { padding: 6px 8px; }
.ln-item .cp { margin-top: 5px; font-size: 12px; color: var(--muted); }
.ln-item .sub { display: flex; gap: 6px; margin-top: 5px; } .ln-item .sub select { width: auto; } .ln-item .sub .un { width: 64px; }
.med { display: flex; align-items: center; gap: 5px; } .med input { width: 72px; }
.mtag, .mreset { display: none; } tr.manual .mtag { display: inline; color: var(--warn); font-weight: 600; } tr.manual .mreset { display: inline; }
.lnk { background: none; border: 0; color: var(--primary); cursor: pointer; padding: 0; font-size: 12px; }
.totais { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.trow { display: flex; justify-content: space-between; padding: 3px 2px; font-variant-numeric: tabular-nums; }
.trow.big { background: var(--orange); color: #fff; border-radius: 8px; padding: 8px 10px; margin: 6px 0; font-size: 17px; }
.trow.rest { color: var(--primary); font-weight: 700; }
.notice { padding: 8px 12px; border-radius: 8px; margin: 6px 0 12px; background: #fff3df; color: #8a5a00; }
.notice.bad { background: #fde8ec; color: #a31d36; }
.actbar { position: sticky; bottom: -28px; margin: 18px -28px -28px; padding: 12px 28px; background: rgba(255,255,255,.96); border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; z-index: 5; backdrop-filter: blur(4px); }
.actbar .grp { display: flex; gap: 8px; flex-wrap: wrap; }
input[type=color].cor { width: 38px; height: 30px; padding: 0; border: 1px solid #cfd2de; border-radius: 6px; background: none; cursor: pointer; }
tr.static { cursor: default; } tr.static:hover { background: #faf9fd; }
tfoot td { font-weight: 700; background: #f4f5f8; border-top: 2px solid var(--line); position: sticky; bottom: 0; }
@media print { .sidebar, #toasts { display: none; } body { overflow: visible; } }

/* ajustes 1 */
.cli-pick { display: flex; gap: 8px; } .cli-pick .cli-empty { flex: 1; width: auto; }
.cli-box .btn.small + .btn.small { margin-left: 4px; }
.custo-l { margin-top: 4px; display: flex; flex-direction: column; gap: 2px; padding: 4px 6px; background: #fff7ea; border: 1px dashed var(--orange); border-radius: 6px; }
.custo-l label { font-size: 11px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.custo-l input { width: 90px; }
.custo-box { margin-top: 10px; padding: 8px 10px; background: #fff7ea; border: 1px dashed var(--orange); border-radius: 8px; }
.ln-item .sub select[data-l=modo_preco] { max-width: 100%; }
.falta-box { margin-bottom: 14px; border-left: 4px solid var(--danger); }
.falta-box tr { cursor: pointer; }
.f input, .f select, .f textarea { min-width: 0; max-width: 100%; }
.sim .grid { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); align-items: end; }
.sim .grid > * { grid-column: auto; min-width: 0; }
.sim .result { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sim .hint { overflow-wrap: anywhere; }

/* ===== usuário no menu ===== */
.side-foot { padding: 12px 14px 14px; border-top: 1px solid rgba(255,255,255,.08); }
.side-foot .who { display: flex; align-items: center; gap: 10px; }
.side-foot .av { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--orange), var(--purple)); color: #fff; font-weight: 700; display: grid; place-items: center; flex: none; }
.side-foot .who > div strong { display: block; color: #fff; font-size: 13px; line-height: 1.2; }
.side-foot .who > div span { display: block; color: rgba(255,255,255,.55); font-size: 11.5px; }
.side-foot .who-acts { display: flex; gap: 14px; margin: 9px 0 6px 44px; }
.side-foot .lnk { background: none; border: 0; padding: 0; color: rgba(255,255,255,.7); font-size: 12px; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.side-foot .lnk:hover { color: #fff; }
.side-foot .ver { color: rgba(255,255,255,.6); font-size: 11px; margin-top: 8px; }

/* ===== painel de produção ===== */
.pb-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.pb-top h1 { margin: 0 0 4px; } .pb-top p { margin: 0; color: var(--muted); }
.pb-clock { text-align: right; } .pb-clock b { display: block; font-size: 34px; font-weight: 800; letter-spacing: -.03em; line-height: 1; font-variant-numeric: tabular-nums; }
.pb-clock span { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; margin-top: 5px; }
.live { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(117,212,8,.6); animation: pulso 2s infinite; display: inline-block; }
.live.off { background: var(--danger); animation: none; }
@keyframes pulso { 70% { box-shadow: 0 0 0 7px rgba(117,212,8,0); } 100% { box-shadow: 0 0 0 0 rgba(117,212,8,0); } }
.pb-chips { display: flex; gap: 12px; margin: 16px 0 12px; flex-wrap: wrap; }
.pb-chips .ch { background: #fff; border: 1px solid var(--line, #e4e5ec); border-radius: 12px; padding: 10px 18px; min-width: 150px; border-left: 5px solid var(--blue); }
.pb-chips .ch b { font-size: 26px; font-weight: 800; display: block; line-height: 1.1; } .pb-chips .ch span { font-size: 12px; color: var(--muted); }
.pb-chips .ch.hoje { border-left-color: var(--orange); } .pb-chips .ch.late { border-left-color: var(--danger); } .pb-chips .ch.late b { color: var(--danger); } .pb-chips .ch.ok { border-left-color: var(--green); }
.pb-tools { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.pb-tools input { flex: 1; min-width: 220px; }
.seg { display: inline-flex; background: #e9eaf1; border-radius: 9px; padding: 3px; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 7px; font: 600 13px "Inter", sans-serif; color: #50536a; cursor: pointer; }
.seg button.on { background: #fff; color: var(--ink, #14151f); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.pb-main { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; align-items: start; }
.pb-board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; padding-bottom: 6px; }
.pb .col { background: #eceef4; border-radius: 12px; padding: 10px; min-width: 0; }
.pb .col h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; margin: 2px 4px 10px; display: flex; align-items: center; gap: 8px; color: #30334a; }
.pb .col h2 i { width: 10px; height: 10px; border-radius: 3px; background: var(--c); } .pb .col h2 span { margin-left: auto; background: #fff; border-radius: 20px; padding: 1px 9px; font-size: 12px; }
.pb .cards { display: grid; gap: 10px; }
.pc { background: #fff; border-radius: 10px; border-left: 6px solid var(--c); padding: 11px 12px 10px; box-shadow: 0 1px 2px rgba(20,21,31,.08); }
.pc.atr { box-shadow: 0 0 0 2px var(--danger), 0 1px 2px rgba(20,21,31,.08); }
.pc.novo { animation: entra 1.4s ease-out 2; }
@keyframes entra { 0% { background: #fff4e0; transform: scale(1.02); } 100% { background: #fff; transform: none; } }
.pc header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; } .pc header b { font-size: 15px; font-weight: 800; }
.pc .nv { font-style: normal; background: var(--orange); color: #fff; font-size: 10px; font-weight: 800; padding: 2px 6px; border-radius: 4px; letter-spacing: .06em; }
.pc .pz { margin-left: auto; font-size: 11.5px; font-weight: 700; color: #50536a; } .pc .pz.late { color: #fff; background: var(--danger); padding: 2px 7px; border-radius: 4px; } .pc .pz.hoje { color: #a85a00; background: #fff0d9; padding: 2px 7px; border-radius: 4px; }
.pc .cl { font-size: 13px; color: #50536a; margin: 3px 0 8px; }
.pc .it { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.pc .it li { display: flex; gap: 9px; } .pc .it .q { flex: none; min-width: 34px; font-weight: 800; color: var(--c); font-size: 13px; }
.pc .it strong { font-size: 13.5px; } .pc .cp { font-size: 12px; color: #6a6d80; } .pc .md { font-size: 12px; color: var(--purple); font-weight: 700; }
.pc .nota { margin-top: 9px; background: #fff6cc; border: 1px solid #f1dc72; border-radius: 6px; padding: 6px 9px; font-size: 12.5px; white-space: pre-wrap; } .pc .nota.leve { background: #f3f4f8; border-color: #e0e2ec; }
.pc footer { display: flex; gap: 6px; margin-top: 10px; align-items: center; flex-wrap: wrap; } .pc footer .primary { margin-left: auto; }
.pb .vazio { text-align: center; color: #8b8fa5; font-size: 13px; padding: 18px 0; }
.pb-rail { display: grid; gap: 12px; } .pb-box { background: #fff; border: 1px solid #e4e5ec; border-radius: 12px; padding: 14px; }
.pb-box h3 { margin: 0 0 4px; font-size: 14px; } .pb-box .hint { margin: 0 0 8px; }
.pb-box .mt { display: grid; grid-template-columns: 1fr auto; gap: 0 8px; padding: 7px 0; border-top: 1px solid #eef0f5; font-size: 13px; }
.pb-box .mt small { grid-column: 1 / -1; color: #8b8fa5; font-size: 11.5px; } .pb-box .mt.zero b { color: var(--danger); }
@media (max-width: 1250px) { .pb-main { grid-template-columns: 1fr; } }
@media (max-width: 1100px) { .pb-board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ===== usuários ===== */
.perfis { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; } .perfis p { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.tag.p-admin { background: #efe0fc; color: #6a0fbd; } .tag.p-producao { background: #ffedd2; color: #a85a00; } .tag.p-secretaria { background: #d9f0ff; color: #05629f; }
.tag.ok { background: #e3f6d2; color: #2f7a08; } .tag.warn { background: #fff0d9; color: #a85a00; }
tr.off td { opacity: .5; } .nw { white-space: nowrap; }
.pb-main { grid-template-columns: minmax(0, 1fr) !important; }
.pb-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pb .cards { grid-template-columns: minmax(0, 1fr); }
.pc { min-width: 0; overflow: hidden; }
.pc header .pz { margin-left: 0; flex-basis: 100%; }
.pc .it > li > div { min-width: 0; overflow-wrap: anywhere; }
.pb .col h2 { white-space: nowrap; font-size: 12px; }
.pc footer .primary { flex: 1 1 100%; margin-left: 0; }

/* ---------- marca d'água e início (v0.6.2) ---------- */
.main { position: relative; }
.main::after { content: ""; position: absolute; right: 36px; bottom: 28px; width: min(34vw, 440px); aspect-ratio: 1; background: url("../assets/logo.png") center / contain no-repeat; opacity: .045; pointer-events: none; z-index: 0; }
.view { position: relative; z-index: 1; }
.hm-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 6px 0 26px; }
.hm-top h1 { margin: 0; font-size: 26px; font-weight: 600; letter-spacing: -.4px; }
.hm-top p { margin: 4px 0 0; color: var(--muted); }
.hm-top p::first-letter { text-transform: uppercase; }
.hm-emp { font-size: 11px; letter-spacing: 2.4px; text-transform: uppercase; color: var(--muted); }
.hm-metrics { display: grid; grid-template-columns: repeat(4, 1fr); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 1px 2px rgba(15, 15, 30, .04); overflow: hidden; }
.hm-m { text-align: left; background: none; border: 0; border-left: 1px solid var(--line); padding: 22px 24px 20px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; transition: background .15s; }
.hm-m:first-child { border-left: 0; }
.hm-m:hover { background: #faf9fd; }
.hm-r { display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.hm-r i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.hm-m b { font-size: 32px; font-weight: 500; letter-spacing: -1px; line-height: 1.1; color: var(--text); }
.hm-m em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.hm-cols { display: grid; grid-template-columns: 3fr 2fr; gap: 20px; margin-top: 20px; }
.hm-box { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 20px 24px 22px; }
.hm-box h2 { margin: 0 0 14px; font-size: 11px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.hm-av { list-style: none; margin: 0; padding: 0; }
.hm-av li + li { border-top: 1px solid var(--line); }
.hm-av button { width: 100%; display: flex; align-items: center; gap: 12px; padding: 11px 2px; background: none; border: 0; text-align: left; cursor: pointer; font-size: 14px; }
.hm-av button i { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.hm-av button span { flex: 1; }
.hm-av button u { text-decoration: none; color: var(--muted); font-size: 18px; }
.hm-av button:hover span { color: var(--primary); }
.hm-ok { margin: 4px 0; color: var(--muted); }
.hm-at { display: grid; gap: 8px; }
.hm-a { text-align: left; padding: 11px 14px; background: #fff; border: 1px solid var(--line); border-radius: 8px; cursor: pointer; font-weight: 500; }
.hm-a:hover { border-color: var(--primary); color: var(--primary); }
@media (max-width: 1100px) { .hm-metrics { grid-template-columns: repeat(2, 1fr); } .hm-m:nth-child(3) { border-left: 0; } .hm-m:nth-child(n+3) { border-top: 1px solid var(--line); } .hm-cols { grid-template-columns: 1fr; } }

.side-foot .ver .dev-tag { opacity: .55; }

/* ---------- menu lateral em grupos ---------- */
.nav-group { margin: 2px 0; }
.nav-head { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: none; border: 0; color: #e8e9f2; font-weight: 600;
  padding: 10px 10px; border-radius: 8px; cursor: pointer; letter-spacing: .1px; }
.nav-head:hover { background: var(--ink-3); color: #fff; }
.nav-head .ico { width: 20px; text-align: center; font-size: 15px; }
.nav-head .nav-gt { flex: 1; }
.nav-head .chev { font-size: 18px; line-height: 1; color: #70748a; transition: transform .15s ease; }
.nav-group.open > .nav-head .chev { transform: rotate(90deg); color: #fff; }
.nav-group.open > .nav-head { color: #fff; }
.nav-sub { display: none; margin: 2px 0 6px 14px; padding-left: 8px; border-left: 1px solid rgba(255,255,255,.1); }
.nav-group.open > .nav-sub { display: block; }
.nav-sub .nav-item { padding: 7px 10px; font-size: 13.5px; }
.nav-head:focus-visible { outline: 2px solid var(--purple); outline-offset: 1px; }

/* ----- resumo financeiro e análise de custeio da OS ----- */
.fincard { margin-top: 12px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.fincard h4 { margin: 0 0 10px; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.fincard h4 small { text-transform: none; letter-spacing: 0; font-weight: 400; }
.fc-tot { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.fc-tot b { font-size: 26px; font-weight: 800; }
.fc-row { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: 4px 10px; align-items: baseline; margin-bottom: 10px; font-size: 13px; }
.fc-row b { font-size: 15px; } .fc-row b.ok { color: var(--ok); } .fc-row b.warn { color: var(--warn); }
.prog { height: 8px; background: #e9ebf2; border-radius: 99px; overflow: hidden; }
.prog i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--ok)); border-radius: 99px; transition: width .3s; }
.fincard .btn.block { width: 100%; margin-top: 12px; justify-content: center; }
.fincard.custeio { border-color: #e6d9fb; }
.cu-top { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.rosca { width: 110px; height: 110px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.rosca span { width: 74px; height: 74px; border-radius: 50%; background: var(--card); display: grid; place-content: center; text-align: center; font-weight: 800; font-size: 17px; }
.rosca small { display: block; font-size: 10px; font-weight: 500; color: var(--muted); }
.leg { list-style: none; margin: 0; padding: 0; flex: 1; min-width: 190px; font-size: 13px; }
.leg li { display: grid; grid-template-columns: 12px 1fr auto 52px; gap: 8px; align-items: center; padding: 3px 0; }
.leg i { width: 10px; height: 10px; border-radius: 50%; display: block; } .leg em { font-style: normal; color: var(--muted); } .leg b { text-align: right; }
.cu-adj { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 13px; }
.cu-adj label { display: flex; gap: 6px; align-items: center; }

/* ----- menu ⋮, urgente e recebimento ----- */
.kebab { padding: 2px 9px; font-size: 18px; line-height: 1; }
.rowmenu { position: fixed; z-index: 1000; min-width: 220px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 30px rgba(15,15,30,.22); padding: 6px; display: flex; flex-direction: column; }
.rowmenu button { text-align: left; background: none; border: 0; padding: 8px 12px; border-radius: 7px; cursor: pointer; font-size: 13.5px; }
.rowmenu button:hover, .rowmenu button:focus { background: #f1ecfb; outline: none; }
.rowmenu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.pill.urg { font-weight: 800; letter-spacing: .04em; margin-top: 3px; }
tr.row-urg td:first-child { box-shadow: inset 4px 0 0 var(--danger); }
.rec-row { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-bottom: 6px; }

/* ----- produção por setor ----- */
.chips-set { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip-set { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 5px 12px; cursor: pointer; font-size: 13px; display: inline-flex; gap: 6px; align-items: center; }
.chip-set.on { background: var(--primary); border-color: var(--primary); color: #fff; } .chip-set b { background: rgba(255,255,255,.28); border-radius: 99px; padding: 0 6px; font-size: 11px; }
.chip-set:disabled { cursor: default; opacity: .8; }
.etapas { list-style: none; margin: 10px 0 0; padding: 0; font-size: 13px; } .etapas li { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; padding: 4px 0; border-bottom: 1px dashed var(--line); }
.etapas li em { font-style: normal; color: var(--muted); } .etapas li.concluida span { text-decoration: line-through; color: var(--muted); } .etapas li.em_andamento em { color: var(--orange); font-weight: 700; }
.thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0; } .th { position: relative; width: 74px; height: 74px; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: #f1f2f6; }
.th img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; } .th .x { position: absolute; top: 2px; right: 2px; border: 0; background: rgba(0,0,0,.6); color: #fff; width: 20px; height: 20px; border-radius: 50%; cursor: pointer; line-height: 1; }
label.up { cursor: pointer; }
.setores-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.stab { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 8px 14px; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; font-weight: 600; }
.stab.on { background: var(--ink-2); color: #fff; border-color: var(--ink-2); } .stab b { background: #eceef5; color: var(--text); border-radius: 99px; padding: 1px 8px; font-size: 12px; } .stab.on b { background: var(--orange); color: #fff; }
.stab i.late { background: var(--danger); color: #fff; border-radius: 99px; padding: 1px 7px; font-size: 11px; font-style: normal; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; margin-top: 10px; }
.sc { display: grid; grid-template-columns: 130px 1fr; background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--orange); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.sc.atr { border-left-color: var(--danger); background: #fff8f9; } .sc.urg { box-shadow: 0 0 0 2px var(--danger), var(--shadow); }
.sc .art { border: 0; padding: 0; background: #eef0f6; display: grid; place-items: center; cursor: zoom-in; position: relative; min-height: 130px; font-size: 12px; color: var(--muted); }
.sc .art.vazio { cursor: default; } .sc .art img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; } .sc .art em { position: absolute; right: 4px; bottom: 4px; background: rgba(0,0,0,.65); color: #fff; font-style: normal; border-radius: 99px; padding: 1px 7px; font-size: 11px; }
.sc-body { padding: 10px 12px; display: flex; flex-direction: column; gap: 6px; min-width: 0; } .sc header { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .sc footer { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: auto; } .sc footer .hint { flex: 1; }
.recado { background: #fff4d6; border: 1px solid #f0cf72; border-radius: 8px; padding: 7px 9px; font-size: 13px; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; } .recado.lido { background: #eef7e6; border-color: #bfe0a0; }
.pz.late { color: var(--danger); font-weight: 800; }
.viewer-modal { width: min(1100px, 94vw); } .v-bar { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; } .v-area { max-height: 72vh; overflow: auto; background: #1b1c22; border-radius: 8px; text-align: center; } .v-area img { max-width: none; display: block; margin: 0 auto; }

/* ----- painel inicial e funil ----- */
.hm-painel { margin: 14px 0; display: flex; flex-direction: column; gap: 14px; }
.hm-ks { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; }
.hm-k { background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--c); border-radius: var(--radius); padding: 12px 14px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; }
.hm-k span { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); } .hm-k b { font-size: 24px; } .hm-k em { font-style: normal; font-size: 12px; color: var(--muted); }
.rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; } .rank li { display: grid; grid-template-columns: 34px 1fr; gap: 8px; align-items: start; } .rank .pos { font-weight: 800; font-size: 18px; color: var(--primary); }
.rec { list-style: none; margin: 0; padding: 0; } .rec button { width: 100%; display: grid; grid-template-columns: 90px 1fr auto; gap: 8px; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line); padding: 7px 4px; cursor: pointer; } .rec button:hover { background: #f6f2fd; } .rec em { font-style: normal; font-weight: 700; }
.funil { display: grid; grid-template-columns: repeat(5, minmax(210px, 1fr)); gap: 12px; margin-top: 10px; overflow-x: auto; align-items: start; }
.fcol { background: #eef0f6; border-radius: var(--radius); padding: 10px; border-top: 4px solid var(--c); min-height: 260px; transition: background .15s; } .fcol.alvo { background: #e1d6f7; outline: 2px dashed var(--primary); }
.fcol h2 { margin: 0; font-size: 14px; display: flex; gap: 8px; align-items: center; } .fcol h2 i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); } .fcol h2 span { margin-left: auto; background: #fff; border-radius: 99px; padding: 1px 9px; font-size: 12px; }
.fsum { font-weight: 800; margin: 4px 0 8px; } .fcards { display: flex; flex-direction: column; gap: 8px; }
.fc { background: var(--card); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; display: grid; gap: 2px; box-shadow: var(--shadow); cursor: grab; } .fc[draggable] { border-left: 4px solid var(--primary); } .fc.arrasto { opacity: .4; } .fc em { font-style: normal; font-weight: 800; }

/* ----- WhatsApp dentro do sistema ----- */
.wa-wrap { display: flex; flex-direction: column; height: calc(100vh - 40px); min-height: 520px; }
.wa-bar { display: flex; gap: 10px; align-items: center; padding: 8px 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius) var(--radius) 0 0; flex-wrap: wrap; }
.wa-bar .grow { flex: 1; }
.wa-area { flex: 1; background: #111b21; border-radius: 0 0 var(--radius) var(--radius); display: grid; place-items: center; color: #8696a0; }
/* correções da varredura: espaço para a barra de ações fixa não cobrir o último campo */
.view .actbar { margin-top: 28px; }
.view:has(.actbar) { padding-bottom: 72px; }
/* painel inicial no estilo dashboard: gráfico, rosca, cartões com ícone */
.hm-dash { display: grid; grid-template-columns: 3fr 2fr; gap: 14px; }
.hm-chart { width: 100%; height: auto; display: block; } .hm-chart .gl { stroke: var(--line); stroke-dasharray: 3 4; } .hm-chart .gt { fill: var(--muted); font-size: 11px; }
.b-in { fill: #1a8f6b; } .b-out { fill: #e0475b; } .hm-chart rect:hover { opacity: .8; }
.hm-leg { display: flex; gap: 16px; justify-content: center; font-size: 12px; color: var(--muted); } .hm-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; } .hm-leg i.b-in { background: #1a8f6b; } .hm-leg i.b-out { background: #e0475b; }
.hm-donut { width: 170px; height: 170px; margin: 6px auto 12px; border-radius: 50%; background: conic-gradient(var(--cor) calc(var(--p) * 1%), #ece9f3 0); display: grid; place-items: center; }
.hm-donut > div { width: 126px; height: 126px; border-radius: 50%; background: #fff; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: inset 0 0 0 1px var(--line); }
.hm-donut b { font-size: 28px; letter-spacing: -1px; } .hm-donut span { font-size: 11px; color: var(--muted); text-align: center; max-width: 100px; }
.hm-k { transition: transform .12s, box-shadow .12s; } .hm-k:hover { transform: translateY(-2px); }
.hm-k b { font-size: 26px; letter-spacing: -.5px; } .hm-box { box-shadow: 0 1px 2px rgba(30, 20, 60, .04); }
@media (max-width: 1100px) { .hm-dash { grid-template-columns: 1fr; } }
.hm-cols { align-items: start; }
/* barra fixa com total/margem, preço por margem, aviso de estoque */
.actbar .tm { align-self: center; font-size: 14px; color: var(--muted); margin-right: auto; } .actbar .tm b { color: var(--ink); font-size: 16px; } .actbar .tm em { font-style: normal; font-weight: 600; color: var(--green); margin-left: 8px; } .actbar .tm em.neg { color: var(--danger); }
.pm-l { margin-top: 4px; font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .pm-l .pm { width: 56px; }
#estav .notice ul { margin: 6px 0 0 18px; padding: 0; font-size: 13px; } #estav .notice[hidden], #estav ul[hidden] { display: none; }
.rel-texto { margin: 12px 0; } .rel-texto p { margin: 4px 0; font-size: 14px; }
/* editor no estilo Sispeed: resumo, abas, ajustes por item, responsável */
.ed-resumo .rs-grid { display: flex; gap: 28px; align-items: flex-end; flex-wrap: wrap; } .ed-resumo .rs-grid > div span { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 2px; }
.ed-resumo .rs-grid b { font-size: 18px; } .ed-resumo b.pos { color: var(--green); } .ed-resumo b.neg { color: var(--danger); }
.ed-resumo .rs-total { margin-left: auto; text-align: right; } .ed-resumo .rs-total input { font-size: 26px; font-weight: 700; width: 200px; text-align: right; color: #1d4ed8; border: 1px solid var(--line); border-radius: 10px; padding: 4px 10px; }
.ed-resumo .rs-total .lnk { text-transform: none; letter-spacing: 0; margin-left: 8px; font-size: 12px; } .ed-resumo > .hint { margin-top: 8px; }
.ed-tabs .tabs { padding: 14px 16px 0; margin-bottom: 0; } .tabpane[hidden] { display: none; } .tabpane { padding-top: 14px; }
.aj-row { display: flex; align-items: center; gap: 4px; margin-bottom: 4px; } .aj-row span { width: 46px; font-size: 11px; color: var(--muted); } .aj-row input { width: 76px; } .aj-row select { width: 52px; padding: 4px 2px; }
.lt-in { width: 118px; text-align: right; font-weight: 700; } .base-l { text-align: right; }
.resp-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; } .resp-row select { flex: 1; min-width: 160px; }
.fluxo { display: flex; gap: 6px; align-items: center; overflow-x: auto; padding: 4px 2px 10px; margin-bottom: 6px; white-space: nowrap; } .fluxo i { color: var(--muted); font-style: normal; }
.fluxo .fx { font-size: 12px; padding: 4px 10px; border-radius: 20px; background: #f1eff7; color: var(--muted); } .fluxo .fx.done { background: #e6f6ee; color: #1a8f6b; } .fluxo .fx.now { background: var(--primary); color: #fff; font-weight: 700; }
/* revisão de design (0.13.2) */
@media (max-width: 1100px) { .hm-ks { grid-template-columns: repeat(2, 1fr); } }
body[data-tela="itens"] #tbl table td:nth-child(3) { min-width: 150px; }
@media (max-width: 1100px) { body[data-tela="itens"] #tbl th, body[data-tela="itens"] #tbl td { padding-left: 5px; padding-right: 5px; } body[data-tela="itens"] #tbl th:nth-child(-n+2), body[data-tela="itens"] #tbl td:nth-child(-n+2) { display: none; } }
body[data-tela="itens"] #tbl .badge, body[data-tela="itens"] #tbl .pill { white-space: nowrap; }
.kebab { min-height: 32px; min-width: 34px; }
.funil { scrollbar-width: thin; padding-bottom: 10px; }
.muted { color: var(--muted); }
/* painel Hoje */
.hm-hoje { background: #fff; border-radius: 14px; box-shadow: var(--shadow, 0 1px 3px rgba(0,0,0,.08)); padding: 14px 18px 8px; margin-bottom: 16px; }
.hm-hoje h2 { margin: 0 0 8px; font-size: 16px; }
.hh-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.hh-b { border-left: 4px solid var(--c, var(--purple)); padding: 2px 0 6px 12px; }
.hh-b h3 { margin: 0 0 4px; font-size: 13px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); } .hh-b h3 span { background: var(--c); color: #fff; border-radius: 10px; padding: 0 7px; margin-left: 4px; }
.hh-b ul { list-style: none; margin: 0; padding: 0; } .hh-b li { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 3px 0; font-size: 13.5px; }
.hh-b li > button:first-child { background: none; border: 0; text-align: left; cursor: pointer; font: inherit; color: inherit; padding: 2px 0; } .hh-b li > button:first-child:hover { text-decoration: underline; }
.hh-b em { color: var(--muted); font-style: normal; font-size: 12px; }
/* busca global */
.bg-btn { display: flex; align-items: center; gap: 8px; width: calc(100% - 28px); margin: 10px 14px 0; padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.06); color: #e8e6f0; cursor: pointer; font: inherit; font-size: 13.5px; }
.bg-btn:hover { background: rgba(255,255,255,.12); } .bg-btn span { flex: 1; text-align: left; } .bg-btn kbd { font-size: 11px; opacity: .7; border: 1px solid rgba(255,255,255,.25); border-radius: 5px; padding: 1px 5px; }
.bg-q { width: 100%; font-size: 16px; padding: 10px 12px; margin-bottom: 8px; }
.bg-res h3 { margin: 10px 0 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); } .bg-res ul { list-style: none; margin: 0; padding: 0; }
.bg-res li button { display: flex; width: 100%; gap: 6px; align-items: baseline; text-align: left; background: none; border: 0; border-radius: 8px; padding: 8px 10px; cursor: pointer; font: inherit; color: inherit; } .bg-res li button:hover, .bg-res li button:focus-visible { background: #f1eff7; }
.bg-res li em { margin-left: auto; font-style: normal; color: var(--muted); font-size: 12.5px; }
.qm { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; border-radius: 50%; background: #e6e1f5; color: #5b2bc9; font-size: 11px; font-weight: 700; cursor: help; margin-left: 4px; }
.hm-guia { display: flex; gap: 14px; justify-content: space-between; align-items: flex-start; background: #f3effd; border: 1px solid #ddd2f7; border-radius: 14px; padding: 12px 18px; margin-bottom: 16px; } .hm-guia ol { margin: 6px 0 0; padding-left: 20px; font-size: 13.5px; } .hm-guia li { margin: 2px 0; }
/* chat da equipe */
.chat { display: grid; grid-template-columns: 340px 1fr; height: calc(100vh - 56px); min-height: 420px; background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.ch-lista { border-right: 1px solid var(--line, #e7e4ef); display: flex; flex-direction: column; min-width: 0; }
.ch-lista header { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; gap: 6px; } .ch-lista header span { display: flex; gap: 6px; }
.ch-lista input[type=search] { margin: 0 12px 8px; }
.ch-itens { overflow-y: auto; flex: 1; }
.ch-it { display: flex; gap: 10px; width: 100%; padding: 10px 14px; border: 0; border-bottom: 1px solid #f1eff7; background: none; text-align: left; cursor: pointer; font: inherit; color: inherit; align-items: center; }
.ch-it:hover { background: #f7f5fc; } .ch-it.on { background: #efeafc; }
.ch-av { flex: none; width: 42px; height: 42px; border-radius: 50%; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 17px; } .ch-av.sm { width: 32px; height: 32px; font-size: 14px; }
.ch-tx { flex: 1; min-width: 0; } .ch-l1, .ch-l2 { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.ch-l1 b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ch-l1 time { font-size: 11.5px; color: var(--muted); flex: none; }
.ch-l2 span { color: var(--muted); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-bd { flex: none; background: #16a34a; color: #fff; border-radius: 11px; font-style: normal; font-size: 11.5px; font-weight: 700; padding: 1px 7px; }
.ch-conv { display: flex; flex-direction: column; min-width: 0; background: #efeae2; }
.ch-vazio { margin: auto; text-align: center; color: var(--muted); max-width: 340px; padding: 20px; } .ch-vazio > div { font-size: 54px; }
.ch-cab { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: #f7f5fc; border-bottom: 1px solid var(--line, #e7e4ef); } .ch-cab div { display: flex; flex-direction: column; } .ch-cab span { font-size: 12px; color: var(--muted); }
.ch-volta { display: none; border: 0; background: none; font-size: 20px; cursor: pointer; }
.ch-msgs { flex: 1; overflow-y: auto; padding: 14px 6%; display: flex; flex-direction: column; gap: 4px; }
.ch-dia { text-align: center; margin: 8px 0; } .ch-dia span { background: #fff; border-radius: 8px; font-size: 12px; padding: 3px 10px; color: var(--muted); box-shadow: 0 1px 1px rgba(0,0,0,.06); }
.ch-m { max-width: min(560px, 80%); align-self: flex-start; background: #fff; border-radius: 10px 10px 10px 2px; padding: 6px 10px 4px; box-shadow: 0 1px 1px rgba(0,0,0,.08); overflow-wrap: anywhere; line-height: 1.35; }
.ch-m.meu { align-self: flex-end; background: #d9fdd3; border-radius: 10px 10px 2px 10px; }
.ch-m time { display: block; text-align: right; font-size: 10.5px; color: var(--muted); margin-top: 2px; } .ch-au { display: block; font-size: 12.5px; }
.ch-tk { font-style: normal; margin-left: 4px; } .ch-tk.lido { color: #0ea5e9; }
.ch-m a { color: #5b2bc9; }
.ch-comp { display: flex; gap: 8px; padding: 10px 14px; background: #f7f5fc; align-items: flex-end; } .ch-comp textarea { flex: 1; resize: none; border-radius: 18px; padding: 9px 14px; max-height: 140px; font: inherit; }
.ch-pess { display: flex; flex-direction: column; gap: 4px; max-height: 360px; overflow-y: auto; } .ch-pess.sel { margin-top: 10px; }
.ch-pess button, .ch-pess label { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 0; background: none; border-radius: 10px; cursor: pointer; font: inherit; text-align: left; } .ch-pess button:hover, .ch-pess label:hover { background: #f1eff7; }
.ch-pess em { margin-left: auto; font-style: normal; color: var(--muted); font-size: 12px; } .ch-on { width: 9px; height: 9px; border-radius: 50%; background: #16a34a; }
.nav-bd { margin-left: auto; background: #16a34a; color: #fff; border-radius: 10px; font-style: normal; font-size: 11px; font-weight: 700; padding: 0 7px; }
.nav-item .nav-bd { position: absolute; right: 10px; } .nav-item { position: relative; } .nav-head.tem-aviso::after { content: ''; width: 8px; height: 8px; background: #16a34a; border-radius: 50%; margin-left: 6px; }
@media (max-width: 900px) { .chat { grid-template-columns: 1fr; } .ch-conv { display: none; } .chat.abre .ch-lista { display: none; } .chat.abre .ch-conv { display: flex; } .ch-volta { display: inline-block; } }
.ch-lista input[type=search] { width: calc(100% - 24px); box-sizing: border-box; } .ch-comp textarea { min-height: 40px; }
/* chat: anexos */
.ch-img-b { display: block; padding: 0; border: 0; background: none; cursor: zoom-in; margin-bottom: 4px; } .ch-img { display: block; max-width: 260px; max-height: 260px; min-width: 80px; min-height: 60px; border-radius: 8px; background: #e5e1ee; object-fit: cover; }
.ch-arq { display: flex; align-items: center; gap: 10px; width: 100%; min-width: 210px; padding: 8px 10px; margin-bottom: 4px; border: 1px solid rgba(0,0,0,.08); border-radius: 8px; background: rgba(0,0,0,.04); cursor: pointer; font: inherit; text-align: left; } .ch-arq > span { font-size: 26px; } .ch-arq b { display: block; overflow-wrap: anywhere; font-size: 13.5px; } .ch-arq em { font-style: normal; font-size: 11.5px; color: var(--muted); }
.ch-prev { display: flex; align-items: center; gap: 8px; padding: 6px 14px; background: #fff7e0; border-top: 1px solid #f0e2b6; font-size: 13px; } .ch-prev[hidden] { display: none; } .ch-prev b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ch-prev em { font-style: normal; color: var(--muted); margin-right: auto; }
.chat.arrasta .ch-conv { outline: 3px dashed #7c3aed; outline-offset: -8px; } .ch-full { max-width: 100%; max-height: 70vh; display: block; margin: 0 auto; border-radius: 6px; }

/* ---------- revisão de design (v0.16.1): alvos de clique, tabelas estreitas, telas de 1024 px ---------- */
:root { --alvo: 32px; }
.btn { min-height: 36px; } .btn.small { min-height: var(--alvo); }
.side-foot .lnk { min-height: var(--alvo); padding: 0 4px; display: inline-flex; align-items: center; }
.side-foot .who-acts { gap: 10px; margin: 4px 0 0 40px; }
.hh-b li > button:first-child { min-height: var(--alvo); display: inline-flex; align-items: center; gap: 6px; }
td.r, td .pill, td .badge, td.nw { white-space: nowrap; }
td:first-child { white-space: nowrap; }
@media (max-width: 1100px) {
  .app { grid-template-columns: 228px 1fr; }
  .brand { padding: 14px 12px 10px; } .brand img { width: 38px; height: 38px; }
  .view { padding: 20px 16px 24px; }
  .actbar { bottom: -24px; margin: 18px -16px -24px; padding: 12px 16px; }
  .view .actbar { margin-top: 28px; }
  td, th { padding-left: 8px; padding-right: 8px; }
}
.actbar { box-shadow: 0 -4px 14px rgba(15, 15, 30, .08); }
.seg button { min-height: var(--alvo); }
.side-foot .lnk { min-width: var(--alvo); justify-content: center; }
.rel-graf { margin-bottom: 14px; } .rel-graf h2 { margin: 0 0 10px; font-size: 15px; }
.rel-graf ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rel-graf li { display: grid; grid-template-columns: minmax(120px, 220px) 1fr 120px; gap: 10px; align-items: center; font-size: 13px; }
.rel-graf .rg-n { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rel-graf .rg-b { background: #eceef5; border-radius: 6px; height: 14px; overflow: hidden; } .rel-graf .rg-b i { display: block; height: 100%; background: var(--primary); border-radius: 6px; }
.rel-graf li b { text-align: right; font-variant-numeric: tabular-nums; }

/* precificação (v0.16.4): composição com consumo, preço pago e perda; calculadora de rolo; preço ideal */
.comp-scroll { overflow-x: auto; } .comp-table input, .comp-table select { min-width: 0; width: 100%; } .comp-table th { white-space: nowrap; }
.comp-table td:nth-child(1) { min-width: 150px; } .comp-table td:nth-child(2), .comp-table td:nth-child(3) { min-width: 132px; } .comp-table td:nth-child(n+4):nth-child(-n+8) { min-width: 78px; }
.rolo { margin: 6px 0 8px; padding: 8px 10px; background: #f3effd; border: 1px solid #ddd2f7; border-radius: 8px; font-size: 13px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.rolo input { width: 78px; padding: 5px 8px; } .rolo small { color: var(--muted); }
.pi { margin-top: 14px; padding: 12px 14px; border: 1px solid #cfe9bf; background: #f4fbee; border-radius: 10px; }
.pi-t { font-weight: 700; margin-bottom: 8px; } .pi-ok { color: var(--ok); font-weight: 600; margin-top: 4px; } .pi-baixo { color: var(--danger); font-weight: 600; margin-top: 4px; }
