/* Figueredo Constrular — apuração fiscal
   concreto (fundo) · grafite (tinta) · verde-contábil (ação) · âmbar de obra (atenção) */
:root {
  --bg: #ECEEEA;
  --surface: #FFFFFF;
  --surface-2: #F5F6F3;
  --ink: #18201D;
  --muted: #5E6863;
  --line: #DADFD9;
  --line-2: #C9CFC8;
  --pri: #0E5A4A;
  --pri-2: #0A4337;
  --pri-bg: #E3EFEB;
  --amber: #B97A0C;
  --amber-bg: #FFF3D6;
  --amber-line: #F0C766;
  --red: #B4382E;
  --red-bg: #FBEAE7;
  --ok: #2F7D4F;
  --m: #0E5A4A;
  --f1: #C2621B;
  --f2: #3E6AA8;
  --display: "Archivo", "Arial Narrow", sans-serif;
  --body: "Source Sans 3", "Segoe UI", system-ui, sans-serif;
  --r: 6px;
}
* { box-sizing: border-box; }
html { scroll-padding-top: 130px; }
body { margin: 0; font: 15px/1.5 var(--body); background: var(--bg); color: var(--ink); }
h2, h3, h4 { font-family: var(--display); font-stretch: 85%; letter-spacing: .005em; margin: 0; }
h2 { font-size: 21px; font-weight: 750; }
h3 { font-size: 16px; font-weight: 700; margin-bottom: 10px; }
h4 { font-size: 15px; font-weight: 700; }
a { color: var(--pri); }
.muted { color: var(--muted); }
.nota { color: var(--muted); font-size: 13px; margin: 8px 0 0; max-width: 90ch; }
:focus-visible { outline: 2px solid var(--pri); outline-offset: 2px; }

/* ------------------------------------------------ topo */
.topo { position: sticky; top: 0; z-index: 5; background: var(--surface); border-bottom: 1px solid var(--line); }
.faixa-lojas { display: flex; height: 4px; }
.faixa-lojas span { flex: 1; }
.faixa-lojas .m { background: var(--m); } .faixa-lojas .f1 { background: var(--f1); } .faixa-lojas .f2 { background: var(--f2); }
.topo-in { display: flex; align-items: center; gap: 20px; padding: 12px 24px 8px; flex-wrap: wrap; max-width: 1440px; margin: 0 auto; }
.marca { display: flex; flex-direction: column; line-height: 1.15; }
.marca-nome { font-family: var(--display); font-stretch: 75%; font-weight: 800; font-size: 22px; text-transform: uppercase; letter-spacing: .02em; }
.marca-sub { font-size: 12.5px; color: var(--muted); }
.filtros { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-left: auto; }
.filtros label { font-size: 11.5px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }

/* carimbo: situação do mês, como carimbo em documento fiscal */
.carimbo { font-family: var(--display); font-stretch: 70%; font-weight: 800; font-size: 13px; letter-spacing: .12em; text-transform: uppercase;
  padding: 5px 12px; border: 2px solid currentColor; border-radius: 4px; box-shadow: inset 0 0 0 2px var(--surface), inset 0 0 0 3px currentColor;
  line-height: 1.2; white-space: nowrap; }
.carimbo.fechado { color: var(--ok); background: #EAF4EE; }
.carimbo.parcial { color: var(--amber); background: var(--amber-bg); }
.carimbo small { display: block; font-size: 10.5px; letter-spacing: .08em; font-weight: 700; opacity: .85; }

.abas { display: flex; gap: 2px; padding: 0 16px; overflow-x: auto; max-width: 1440px; margin: 0 auto; scrollbar-width: thin; }
.abas button { background: none; color: var(--muted); border: 0; border-radius: 0; padding: 10px 12px 9px; border-bottom: 3px solid transparent;
  white-space: nowrap; font: 600 14px var(--body); cursor: pointer; }
.abas button:hover { color: var(--ink); background: none; }
.abas button.ativa { color: var(--pri); border-bottom-color: var(--pri); }
.badge { background: var(--red); color: #fff; border-radius: 10px; padding: 0 6px; font-size: 11px; margin-left: 2px; }
.badge:empty { display: none; }

/* ------------------------------------------------ controles */
select, input[type=text], input[type=number] { font: 14px var(--body); padding: 7px 9px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); color: var(--ink); min-height: 36px; }
button { font: 600 14px var(--body); padding: 8px 14px; border-radius: var(--r); border: 1px solid var(--pri); background: var(--pri); color: #fff; cursor: pointer; min-height: 36px; }
button:hover { background: var(--pri-2); }
.btn-sec { background: var(--surface); color: var(--pri); border-color: var(--line-2); }
.btn-sec:hover { background: var(--pri-bg); }
button.peq { padding: 3px 9px; font-size: 12.5px; min-height: 0; }
button.perigo { background: var(--surface); color: var(--red); border-color: #E7B9B3; }
button.perigo:hover { background: var(--red-bg); }

/* ------------------------------------------------ estrutura */
main { padding: 20px 24px 64px; max-width: 1440px; margin: 0 auto; }
.aba { display: none; } .aba.ativa { display: block; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 18px 20px; margin-bottom: 18px; min-width: 0; }
.card > h2 + p, .card > h2 + .muted { margin: 4px 0 12px; }
.cabeca { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.loja-tit { display: flex; align-items: center; gap: 10px; }
.loja-tit::before { content: ""; width: 6px; height: 22px; border-radius: 2px; background: var(--cor, var(--pri)); }
.grid-auto { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); gap: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr)); gap: 18px; }
.grid-auto > *, .grid-2 > * { min-width: 0; }
.bloco + .bloco { margin-top: 18px; }

/* ------------------------------------------------ indicadores */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px 13px; min-width: 0; position: relative; }
.card .kpi { background: var(--surface-2); }
.kpi .r { font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.kpi .v { font-family: var(--display); font-stretch: 80%; font-weight: 750; font-size: 25px; font-variant-numeric: tabular-nums; margin-top: 2px; line-height: 1.15; overflow-wrap: anywhere; }
.kpi .s { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.kpi.destaque { box-shadow: inset 4px 0 0 var(--red); }
.kpi.bom { box-shadow: inset 4px 0 0 var(--ok); }

/* ------------------------------------------------ tabelas: sempre rolam dentro do quadro */
.tbl { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--line); border-radius: var(--r); }
.tbl.scroll { max-height: 520px; overflow-y: auto; }
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: 14px; }
th, td { padding: 7px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
th { font-size: 11.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; background: var(--surface-2);
  position: sticky; top: 0; z-index: 1; white-space: nowrap; }
td.n, th.n { text-align: right; white-space: nowrap; }
td:first-child { min-width: 140px; }
tbody tr:hover td { background: #FAFBF9; }
tr.t td { font-weight: 700; background: var(--surface-2); }
tr.s td { font-weight: 700; border-top: 2px solid var(--ink); }
tr.e td { font-style: italic; color: var(--muted); }
.neg { color: var(--red); } .pos { color: var(--ok); }
details { margin-top: 12px; }
details > summary { cursor: pointer; font-weight: 600; color: var(--pri); padding: 4px 0; }
details[open] > summary { margin-bottom: 8px; }

/* ------------------------------------------------ avisos */
.aviso { border-radius: 8px; padding: 12px 16px; margin-bottom: 16px; border: 1px solid; font-size: 14.5px; }
.aviso.alta { background: var(--red-bg); border-color: #EBC1BB; color: #6E1F18; }
.aviso.atencao { background: var(--amber-bg); border-color: var(--amber-line); color: #5E3E05; }
.aviso.info { background: var(--pri-bg); border-color: #BFD9D1; color: var(--pri-2); }

/* inconsistências e sugestões */
.lista { display: grid; gap: 10px; }
.item { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; box-shadow: inset 4px 0 0 var(--line-2); }
.item.alta { box-shadow: inset 4px 0 0 var(--red); } .item.media { box-shadow: inset 4px 0 0 var(--amber); }
.item.baixa { box-shadow: inset 4px 0 0 var(--f2); }
.item h4 { margin: 4px 0 6px; font-size: 16px; }
.item p { margin: 0; max-width: 100ch; }
.item .meta { font-size: 12.5px; color: var(--muted); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.item ul { margin: 8px 0 0; padding-left: 18px; font-size: 12.5px; color: var(--muted); font-family: Consolas, monospace; }
.item .feito-l { margin-top: 10px; display: flex; gap: 8px; align-items: center; }
.item.feito { opacity: .6; box-shadow: inset 4px 0 0 var(--ok); }
.item.feito h4 { text-decoration: line-through; }
.item .imp { margin-top: 8px; font-weight: 700; color: var(--ok); font-size: 13.5px; }
.tag { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 10px; background: #E8EBE6; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.tag.alta, .tag.p1 { background: var(--red-bg); color: var(--red); }
.tag.media, .tag.p2 { background: var(--amber-bg); color: var(--amber); }
.tag.baixa, .tag.p3 { background: #E4ECF6; color: var(--f2); }
.tag.sim { background: #E3F1E8; color: var(--ok); }

/* ------------------------------------------------ formulários */
.drop { border: 2px dashed var(--line-2); border-radius: 8px; padding: 26px; display: flex; gap: 12px; align-items: center; justify-content: center; flex-wrap: wrap; margin: 12px 0; background: var(--surface-2); }
.drop.sobre { border-color: var(--pri); background: var(--pri-bg); }
.linha { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 10px 0; }
.linha input[type=text] { flex: 1; min-width: min(100%, 280px); }
.form-desp { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr)); gap: 10px; align-items: end; }
.form-desp label { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; font-weight: 600; }
.form-desp label.check { flex-direction: row; align-items: center; gap: 8px; min-height: 36px; }
textarea { width: 100%; font: 13px/1.5 Consolas, monospace; border: 1px solid var(--line-2); border-radius: var(--r); padding: 10px; }

.chart-box { position: relative; height: 290px; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 8px; vertical-align: -1px; }
.carregando { position: fixed; inset: 0; background: rgba(236, 238, 234, .7); display: flex; align-items: center; justify-content: center; z-index: 20; }
.carregando span { background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 6px; font-weight: 600; }
.oculto { display: none !important; }

@media (max-width: 760px) {
  .topo-in { padding: 10px 16px 6px; gap: 10px; }
  .filtros { margin-left: 0; width: 100%; }
  .filtros label { flex: 1; min-width: 140px; }
  main { padding: 14px 16px 48px; }
  .card { padding: 14px; }
  .kpi .v { font-size: 21px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }

/* linha de total consolidado */
tbody tr.total td { background: #F3F5F1; border-top: 2px solid var(--line); border-bottom: 0; font-weight: 700; }
tbody tr.total:hover td { background: #F3F5F1; }

/* ------------------------------------------------ DRE gerencial */
.acoes { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
label.check { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--muted); font-weight: 600; cursor: pointer; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 0; border: 1px solid var(--line-2); border-radius: var(--r); overflow: hidden; background: var(--surface); }
.seg button { background: var(--surface); color: var(--muted); border: 0; border-right: 1px solid var(--line-2); border-radius: 0; padding: 8px 14px; font-weight: 600; min-height: 36px; }
.seg button:last-child { border-right: 0; }
.seg button:hover { background: var(--surface-2); color: var(--ink); }
.seg button.on { background: var(--c, var(--pri)); color: #fff; }
.seg.mini button.on { background: var(--ink); }
.dre-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .dre-grid { grid-template-columns: minmax(0, 1fr); } }
.dre-tab { border-top: 4px solid var(--cor, var(--pri)); }
table.dre { font-size: 14px; }
table.dre th.cod, table.dre td.cod { width: 58px; min-width: 0; color: var(--muted); font-variant-numeric: tabular-nums; }
table.dre td:nth-child(2) { min-width: 240px; }
table.dre td { vertical-align: middle; }
.dre-grupo td { font-family: var(--display); font-stretch: 85%; font-weight: 750; text-transform: uppercase; font-size: 12.5px; letter-spacing: .04em;
  background: var(--surface-2); padding-top: 10px; }
.dre-conta td:nth-child(2) { padding-left: 22px; }
.dre-total td { font-family: var(--display); font-stretch: 85%; font-weight: 800; font-size: 14.5px; border-top: 2px solid var(--ink); background: #F0F2EE; }
.dre-total.res td { font-size: 16px; border-top: 3px double var(--ink); border-bottom: 3px double var(--ink); background: var(--pri-bg); }
.dre-conta.zero td { color: #9AA39E; }
.dre-conta.excl td:nth-child(2), .dre-conta.excl td:nth-child(4) { text-decoration: line-through; color: var(--muted); }
.dre-conta .tag { text-decoration: none; margin-left: 4px; vertical-align: 1px; }
button.valor { background: none; border: 1px dashed transparent; color: inherit; font: inherit; padding: 2px 6px; min-height: 0; border-radius: 4px;
  font-variant-numeric: tabular-nums; cursor: text; }
button.valor:hover { border-color: var(--line-2); background: var(--surface); }
button.valor.mudou { background: var(--amber-bg); border-color: var(--amber-line); color: #5E3E05; font-weight: 700; }
input.ed { width: 130px; text-align: right; min-height: 28px; padding: 3px 6px; font-variant-numeric: tabular-nums; border-color: var(--pri); }
.acoes-linha { white-space: nowrap; text-align: right; width: 1%; }
.acoes-linha button { opacity: .35; }
tr:hover .acoes-linha button, .acoes-linha button:focus-visible { opacity: 1; }
.nova-conta { margin-top: 14px; padding: 14px; background: var(--surface-2); border-radius: 8px; }

/* fita de simulação — como a fita de uma calculadora de balcão */
.fita { position: sticky; top: 130px; background: #FFFEF8; border: 1px solid var(--line); border-radius: 3px; padding: 16px 16px 20px;
  font: 13px/1.45 Consolas, "Cascadia Mono", monospace; font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 0 var(--line), 0 6px 14px -10px rgba(24, 32, 29, .35);
  -webkit-mask: radial-gradient(circle at 6px 100%, transparent 5px, #000 5.5px) 0 0 / 12px 100% repeat-x; mask: radial-gradient(circle at 6px 100%, transparent 5px, #000 5.5px) 0 0 / 12px 100% repeat-x; }
.fita-tit { font-family: var(--display); font-stretch: 75%; font-weight: 800; text-transform: uppercase; letter-spacing: .14em; font-size: 12px;
  color: var(--muted); border-bottom: 1px dashed var(--line-2); padding-bottom: 8px; margin-bottom: 8px; }
.fita-l { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.fita-l span { overflow-wrap: anywhere; }
.fita-l b { white-space: nowrap; }
.fita-l.item { color: #3B4440; }
.fita-l.item b { color: #5E3E05; }
.fita-l.soma { border-top: 2px solid var(--ink); margin-top: 8px; padding-top: 8px; font-weight: 700; font-size: 14px; }
.fita-vazia { color: var(--muted); padding: 8px 0; font-family: var(--body); font-size: 13px; }
.fita-frase { font-family: var(--body); margin: 12px 0 0; font-size: 14px; }

/* memória */
.mem-l { margin-top: 6px !important; font-size: 14px; }
.item.ok { box-shadow: inset 4px 0 0 var(--ok); opacity: .8; }
.item .st { margin-left: auto; display: inline-flex; gap: 6px; align-items: center; }
.item .st select { min-height: 28px; padding: 2px 6px; font-size: 13px; }
.mem-obs { width: 100%; margin-top: 10px; font-size: 13.5px !important; }
.tag.recorr { background: #EDE7F6; color: #5B3F99; text-transform: none; letter-spacing: 0; }

/* ------------------------------------------------ impressão */
.print-only { display: none; }
@media print {
  @page { size: A4 landscape; margin: 10mm; }
  body { background: #fff; font-size: 11px; }
  .topo, #aviso, .no-print, .fita, .carregando { display: none !important; }
  main { padding: 0; max-width: none; }
  .aba:not(.ativa) { display: none !important; }
  .card { border: 0; padding: 0; margin: 0 0 8px; }
  .print-only { display: block; }
  .print-cab { display: flex; justify-content: space-between; border-bottom: 2px solid #000; padding-bottom: 4px; margin-bottom: 8px; font-size: 12px; }
  .dre-grid { display: block; }
  .tbl { overflow: visible; border: 0; }
  table.dre { font-size: 10.5px; }
  table.dre th, table.dre td { padding: 3px 6px; }
  th { position: static; }
  tr { break-inside: avoid; }
  button.valor { border: 0 !important; background: none !important; padding: 0; color: inherit !important; }
  .dre-conta .tag { display: none; }
  .nota { font-size: 9.5px; }
}
table.dre td.contab { color: #4A5C7A; background: #F4F6FA; }
.fonte h2 { font-size: 18px; }
.fonte.largo { grid-column: 1 / -1; }
@media print {
  .dre-conta.excl { display: none !important; }   /* conta excluída do gerencial não vai para o papel */
}
table.dre.comp td:nth-child(2) { min-width: 210px; }
table.dre.comp td, table.dre.comp th { padding: 6px 8px; font-size: 13px; }
table.dre.comp .ano { background: #EEF3F0; font-weight: 700; border-left: 2px solid var(--line-2); }
@media print {
  table.dre.comp td, table.dre.comp th { font-size: 7.6px; padding: 2px 3px; }
  table.dre.comp td:nth-child(2) { min-width: 0; }
}
/* coluna Gerencial: campo sempre aberto para digitar */
table.dre input.ed { width: 128px; min-height: 30px; padding: 3px 8px; text-align: right; font: inherit; font-variant-numeric: tabular-nums;
  border: 1px solid var(--line-2); border-radius: 5px; background: #fff; color: var(--ink); cursor: text; }
table.dre input.ed.neg { color: #A33A2A; }
table.dre input.ed:hover { border-color: var(--pri); }
table.dre input.ed:focus { outline: 2px solid var(--pri); outline-offset: 0; border-color: var(--pri); }
table.dre input.ed.mudou { background: var(--amber-bg); border-color: var(--amber-line); color: #5E3E05; font-weight: 700; }
table.dre td .print-only { display: none; }
.acoes-linha button { opacity: .7; }
@media print {
  table.dre input.ed { display: none !important; }
  table.dre td .print-only { display: inline !important; }
}

.peq-t { font-size: 11.5px; }
/* centro de custos */
.cc-ponto { display: inline-block; width: 10px; height: 10px; border-radius: 2px; background: var(--c); margin-right: 8px; vertical-align: 0; }
.cc-barra { width: 140px; height: 8px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.cc-barra i { display: block; height: 100%; border-radius: 4px; }
.cc-barra-th { width: 150px; }
table.cc-resumo a { color: inherit; text-decoration: none; border-bottom: 1px dotted var(--line-2); }
.cc-bloco { border-left: 4px solid var(--c); }
.cc-bloco > summary { display: flex; gap: 14px; align-items: baseline; cursor: pointer; list-style: none; flex-wrap: wrap; }
.cc-bloco > summary::before { content: "▸"; color: var(--muted); }
.cc-bloco[open] > summary::before { content: "▾"; }
.cc-tit { font-weight: 700; font-size: 16px; }
.cc-tot { font-weight: 700; font-variant-numeric: tabular-nums; margin-left: auto; }
.cc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 14px; }
.cc-grid h4 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
table.cc-mini { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.cc-mini td { padding: 5px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.cc-mini select { max-width: 190px; font-size: 12.5px; }
.cc-pessoas { margin-top: 10px; }
.cc-pessoas > summary { cursor: pointer; color: var(--pri); font-size: 13px; }
input.peq-in { width: 110px; text-align: right; }
@media screen and (max-width: 860px) { .cc-grid { grid-template-columns: 1fr; } .cc-barra-th, .cc-barra { display: none; } }
@media print { .cc-bloco { break-inside: avoid; } .cc-bloco > summary::before { content: ""; } details.cc-bloco:not([open]) > *:not(summary) { display: none; } }
table.cc-mini tfoot tr.total td { font-weight: 700; border-top: 2px solid var(--ink); border-bottom: 0; background: var(--surface-2); }
/* frota */
.fr-km { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.fr-km label { display: flex; flex-direction: column; font-size: 12px; color: var(--muted); gap: 3px; }
.fr-km input { width: 120px; text-align: right; }
.fr-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 12px; }
.fr-kpi { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; background: var(--surface); display: flex; flex-direction: column; gap: 4px; }
.fr-kpi span { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.fr-kpi b { font-size: 22px; font-variant-numeric: tabular-nums; }
.fr-kpi small { color: var(--muted); font-size: 12.5px; }
.fr-kpi.destaque { border-color: #B06A10; background: #FBF4EA; }
.fr-grid { margin-top: 0; }
.fr-grid > .card { margin: 0; }
table.fr-comp tr.fr-grupo td { font-weight: 700; background: var(--surface-2); }
span.fr-sub { padding-left: 18px; display: inline-block; }
td.fr-sub { padding-left: 24px !important; display: table-cell; }
.fr-det > summary { cursor: pointer; }
.fr-det table { margin-top: 10px; }
.fr-barras { display: flex; align-items: flex-end; gap: 10px; height: 190px; padding: 10px 4px 0; border-bottom: 1px solid var(--line-2); }
.fr-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; min-width: 0; }
.fr-pilha { width: 70%; max-width: 46px; background: #E8C99A; border-radius: 4px 4px 0 0; display: flex; align-items: flex-end; overflow: hidden; }
.fr-pilha i { display: block; width: 100%; background: #B06A10; }
.fr-col b { font-size: 12px; font-variant-numeric: tabular-nums; }
.fr-col span { font-size: 11.5px; color: var(--muted); margin-bottom: -22px; }
.fr-col.atual b { color: #B06A10; }
.fr-barras + .nota { margin-top: 30px; }
.fr-leg { display: inline-block; width: 12px; height: 10px; border-radius: 2px; vertical-align: 0; }
.fr-leg.liq { background: #B06A10; } .fr-leg.tx { background: #E8C99A; }
table.fr-ano td:first-child { min-width: 0; width: 210px; white-space: nowrap; }
@media print { .fr-kpi b { font-size: 16px; } .fr-barras { height: 120px; } details.fr-det:not([open]) > *:not(summary) { display: none; } }

.fr-sel { display: block; width: 190px; font-size: 12.5px; margin: 2px 0; }
table.fr-cam td, table.fr-cam th { white-space: nowrap; }
.fr-ativos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 4px 16px; margin-top: 8px; }
tr.fr-reserva td { color: var(--muted); background: var(--surface-2); }
table.fr-cam td.fr-tot, table.fr-cam th.fr-tot { background: #FBF4EA; font-size: 14.5px; }
table.fr-cam td.fr-tot2 { font-weight: 600; }
.fr-sel { width: 175px; }
table.fr-cam { width: 100%; table-layout: auto; font-size: 13px; }
table.fr-cam th { white-space: normal; line-height: 1.2; font-size: 11px; vertical-align: bottom; }
table.fr-cam td { white-space: nowrap; padding: 6px 6px; }
table.fr-cam td:first-child { white-space: normal; min-width: 150px; }
input.fr-km-in { width: 78px; min-height: 26px; padding: 2px 6px; text-align: right; }

/* sugestões nunca vão para o papel */
@media print { .sugestoes, #sug { display: none !important; } }

/* impressão: tabelas inteiras, total uma vez só, quadros lado a lado */
@media print {
  tfoot { display: table-row-group; }
  .cc-grid, .fr-grid { display: grid !important; grid-template-columns: 1fr 1fr !important; gap: 14px !important; }
  .fr-grid > .card { border: 1px solid #ccc !important; padding: 8px !important; }
  .fr-grid table.cc-mini td br { display: none; }
  .fr-grid table.cc-mini td .muted { margin-left: 6px; }
  .fr-grid table.cc-mini tr { break-inside: avoid; }
  table.cc-mini { width: 100%; font-size: 10px; }
  table.cc-mini td { padding: 3px 5px; }
  .cc-barra, .cc-barra-th { display: none !important; }
  .fr-kpis { grid-template-columns: repeat(6, 1fr) !important; gap: 6px; }
  .fr-kpi { padding: 6px 8px; }
  details.fr-det { display: none; }
}
@media print { .card { break-inside: auto; } .card > .cabeca, .card > h3, .card > h2 { break-after: avoid; } table.fr-cam, table.fr-ano { break-before: avoid; } .card:has(table.fr-cam) { break-before: page; } }

table.fr-ano td.fr-med, table.fr-ano th.fr-med { background: #FBF4EA; font-weight: 700; }
@media print {
  .fr-grafico { break-inside: avoid; }
  table.fr-ano { width: auto !important; }
  table.fr-ano td, table.fr-ano th { padding: 3px 7px !important; }
}
@media print {
  .fr-barras { height: 85px !important; padding-top: 4px; }
  .fr-col b { font-size: 9px; } .fr-col span { font-size: 9px; margin-bottom: -16px; }
  .fr-barras + .nota { margin-top: 18px; font-size: 8.5px; }
  table.fr-ano { font-size: 8.6px !important; }
  table.fr-ano td, table.fr-ano th { padding: 1.6px 6px !important; line-height: 1.15; }
  .fr-grafico, .card:has(table.fr-ano) { margin-bottom: 4px !important; }
}
@media print { table.fr-ano { font-size: 9.8px !important; } table.fr-ano td, table.fr-ano th { padding: 2.4px 8px !important; } }

/* Distâncias */
.dist-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin: 0 0 16px; }
.dist-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.dist-kpi span { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.dist-kpi b { font: 700 24px/1.15 var(--display, inherit); font-variant-numeric: tabular-nums; }
.dist-kpi b em { font-style: normal; font-size: 15px; color: var(--muted); margin-left: 4px; }
.dist-kpi small { color: var(--muted); font-size: 12.5px; }
.dist-kpi.van { border-color: #B9D9C4; background: #F2F9F4; } .dist-kpi.van b { color: #2F7D4F; }
.dist-grade { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .dist-grade { grid-template-columns: 1fr; } }
#distMapa { height: 620px; border-radius: 8px; border: 1px solid var(--line); background: #E8ECE6; }
.dist-ctl { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; margin-bottom: 10px; font-size: 13.5px; }
.dist-ctl label { display: flex; gap: 6px; align-items: center; }
.dist-ctl label i { width: 11px; height: 11px; border-radius: 50%; display: inline-block; }
.dist-lado h3 { margin-top: 0; }
.dist-job { margin-top: 10px; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); font-size: 13.5px; }
.dist-job.pend { background: var(--amber-bg); } .dist-job.ok { background: #EEF7F1; }
.dist-job .barra { height: 8px; background: var(--line); border-radius: 4px; margin: 6px 0 4px; overflow: hidden; }
.dist-job .barra i { display: block; height: 100%; background: #2F7D4F; transition: width .4s; }
.dist-job small { color: var(--muted); display: block; }
.dist-params { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.dist-params label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
.dist-loja span { display: inline-block; white-space: nowrap; color: #fff; font: 700 12px/1 var(--body); padding: 6px 9px; border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,.35); border: 2px solid #fff; transform: translate(-50%, -50%); cursor: grab; }
.ok { color: #2F7D4F; }
.dist-kpi.alerta { border-color: var(--amber-line); background: var(--amber-bg); }

/* Fluxo de caixa */
.flx-pasta { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-top: 10px; font-size: 13px; }
.flx-pasta label { display: flex; flex-direction: column; gap: 4px; color: var(--muted); }
.flx-pasta input[type=text] { min-width: 420px; max-width: 100%; }
.flx-duas { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; align-items: start; }
.flx-duas h4 { margin: 4px 0 10px; }
.flx-graf { height: 300px; margin-top: 14px; }
.flx-barras { display: flex; flex-direction: column; gap: 6px; }
.flx-barra { display: grid; grid-template-columns: minmax(150px, 1.2fr) 2fr auto 52px; gap: 8px; align-items: center; font-size: 13px; }
.flx-barra i { height: 12px; border-radius: 3px; display: block; min-width: 2px; }
.flx-barra b { font-variant-numeric: tabular-nums; text-align: right; } .flx-barra small { color: var(--muted); text-align: right; }
.neg { color: var(--red); }

/* ======================================================= Fluxo de caixa — tesouraria */
#fluxo { max-width: 1200px; }
.flx-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.flx-eyebrow { font-family: var(--display); font-stretch: 70%; font-weight: 800; font-size: 11.5px; letter-spacing: .2em;
  text-transform: uppercase; color: var(--pri); display: block; }
.flx-top h2 { font-size: 25px; margin-top: 1px; }
.flx-tools { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; }
.flx-tools label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700;
  display: flex; flex-direction: column; gap: 3px; }

/* inline password / warning strip */
.flx-strip { display: flex; gap: 10px 14px; align-items: center; flex-wrap: wrap; background: var(--amber-bg);
  border: 1px solid var(--amber-line); border-left-width: 4px; border-radius: 6px; padding: 9px 14px; margin-bottom: 16px;
  font-size: 13.5px; color: #5E3E05; }
.flx-strip span { color: #6b5321; }

/* HERO — deep-green treasury masthead */
.flx-hero { position: relative; overflow: hidden; border-radius: 12px; margin-bottom: 16px; padding: 22px 26px 20px; color: #EAF4EF;
  background: linear-gradient(135deg, #0F6251 0%, var(--pri-2) 100%); box-shadow: 0 1px 2px rgba(10,67,55,.18); }
.flx-hero .asof { float: right; font-size: 12.5px; color: #9FC8BA; font-weight: 600; }
.flx-hero .lab { font-size: 12px; text-transform: uppercase; letter-spacing: .13em; font-weight: 700; color: #9FC8BA; }
.flx-hero .big { font-family: var(--display); font-stretch: 88%; font-weight: 800; font-variant-numeric: tabular-nums;
  font-size: clamp(32px, 5vw, 46px); line-height: 1.02; letter-spacing: -.01em; margin: 2px 0 15px; }
.flx-liq { display: flex; height: 15px; border-radius: 4px; overflow: hidden; background: rgba(255,255,255,.12); }
.flx-liq span { display: block; min-width: 2px; }
.flx-liq .s1, .flx-leg i.s1 { background: #8BE6C6; }
.flx-liq .s2, .flx-leg i.s2 { background: #2FA47C; }
.flx-liq .s3, .flx-leg i.s3 { background: #175F49; }
.flx-leg { display: flex; gap: 10px 26px; flex-wrap: wrap; margin-top: 13px; font-size: 13px; }
.flx-leg > div { line-height: 1.3; }
.flx-leg i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; margin-right: 7px; }
.flx-leg b { font-variant-numeric: tabular-nums; font-weight: 700; margin-right: 5px; }
.flx-leg small { color: #9FC8BA; display: block; font-size: 11.5px; margin-left: 17px; }

/* timeframe band — three ledgers */
.flx-band { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }
@media (max-width: 820px) { .flx-band { grid-template-columns: 1fr; } }
.flx-col { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px 12px; border-top: 3px solid var(--line-2); }
.flx-col.now { border-top-color: var(--pri); }
.flx-col.inc { border-top-color: var(--ok); }
.flx-col.out { border-top-color: var(--red); }
.flx-col > .h { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; color: var(--muted);
  margin-bottom: 9px; display: flex; justify-content: space-between; gap: 8px; }
.flx-col > .h span { font-weight: 600; letter-spacing: .02em; text-transform: none; opacity: .85; }
.flx-big { font-family: var(--display); font-stretch: 85%; font-weight: 800; font-size: 28px; font-variant-numeric: tabular-nums;
  line-height: 1.05; margin-bottom: 11px; }
.flx-big.pos { color: var(--ok); } .flx-big.neg { color: var(--red); }
.flx-row { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 6px 0;
  border-top: 1px dashed var(--line); font-variant-numeric: tabular-nums; }
.flx-row:first-of-type { border-top: 0; }
.flx-row span { color: var(--muted); font-size: 13px; }
.flx-row b { font-weight: 700; font-size: 14.5px; }
.flx-row b.pos { color: var(--ok); } .flx-row b.neg { color: var(--red); } .flx-row b.amb { color: var(--amber); }

/* projection strip */
.flx-proj { display: grid; grid-template-columns: repeat(3, 1fr) minmax(190px, auto); background: var(--surface);
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin-bottom: 20px; }
@media (max-width: 820px) { .flx-proj { grid-template-columns: 1fr 1fr; } }
.flx-proj .cell { padding: 13px 18px; border-left: 1px solid var(--line); }
.flx-proj .cell:first-child { border-left: 0; }
.flx-proj .lab { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.flx-proj .n { font-family: var(--display); font-stretch: 85%; font-weight: 800; font-size: 22px; font-variant-numeric: tabular-nums; margin-top: 3px; }
.flx-proj .n.neg { color: var(--red); }
.flx-proj .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.flx-proj .risk { background: var(--amber-bg); border-left-color: var(--amber-line); }
.flx-proj .risk.bad { background: var(--red-bg); border-left-color: #EBC1BB; }
.flx-proj .risk .lab { color: #7a5a10; }
.flx-proj .risk.bad .n { color: #6E1F18; }

/* collapsed config */
.flx-config { margin-bottom: 18px; font-size: 13px; }
.flx-config > summary { cursor: pointer; color: var(--muted); font-weight: 600; padding: 9px 12px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: 8px; list-style: none; }
.flx-config > summary::-webkit-details-marker { display: none; }
.flx-config > summary::before { content: "⚙ "; }
.flx-config[open] > summary { border-radius: 8px 8px 0 0; }
.flx-config .row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; padding: 12px; border: 1px solid var(--line); border-top: 0; }
.flx-config .row input[type=text] { min-width: 380px; max-width: 100%; }
.flx-config .nota { padding: 0 12px 12px; margin-top: 0; }

/* refined section headings (ledger tick) scoped to the tab */
#fluxo .card > .cabeca h3, #fluxo .card > h3 { position: relative; padding-left: 13px; }
#fluxo .card > .cabeca h3::before, #fluxo .card > h3::before { content: ""; position: absolute; left: 0; top: .12em; bottom: .12em;
  width: 3px; border-radius: 2px; background: var(--pri); }
#fluxo .dist-kpi { border-radius: 10px; }
@media print { .flx-hero { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }

/* tabela mensal compacta do fluxo (todos os meses sem rolagem) */
.flx-graf.curto { height: 210px; margin-top: 4px; }
table.flx-mens { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12.5px; font-variant-numeric: tabular-nums; margin-top: 12px; }
table.flx-mens th, table.flx-mens td { padding: 4px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
table.flx-mens th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; background: var(--surface-2); }
table.flx-mens th:first-child, table.flx-mens td:first-child { width: 205px; text-align: left; }
table.flx-mens .n { text-align: right; }
table.flx-mens .tot { background: var(--surface-2); font-weight: 700; }
table.flx-mens tr.saldo td { font-weight: 700; border-bottom: 2px solid var(--ink); }
table.flx-mens tr.grupo td { font-weight: 700; padding-top: 7px; background: #FAFBF9; }
table.flx-mens tr.grupo.pos td { color: var(--ok); } table.flx-mens tr.grupo.neg td { color: var(--red); }
table.flx-mens tr.sub td:first-child { padding-left: 16px; color: var(--muted); }
table.flx-mens tr.sub.destaque td { background: #FFF8E6; } table.flx-mens tr.sub.destaque td:first-child { color: #7a5a10; font-weight: 600; }
table.flx-mens tr.res td { font-weight: 800; border-top: 2px solid var(--ink); border-bottom: 0; padding-top: 7px; }
table.flx-mens td.pos { color: var(--ok); } table.flx-mens td.neg { color: var(--red); }
@media (max-width: 1100px) { table.flx-mens { table-layout: auto; } #fluxo .card:has(table.flx-mens) { overflow-x: auto; } }
table.flx-mens tr.bloco td { background: var(--pri-bg); color: var(--pri-2); font-family: var(--display); font-stretch: 85%; font-weight: 800;
  font-size: 12px; letter-spacing: .05em; text-transform: uppercase; padding: 7px 6px 5px; border-top: 2px solid var(--pri); }
table.flx-mens tr.subtot td { font-weight: 700; border-top: 1px solid var(--line-2); }
table.flx-mens tr.res.final td { font-size: 13.5px; border-top: 3px double var(--ink); background: #F4F7F5; }
table.flx-mens tr.sub.memo td { font-style: italic; color: var(--muted); }
table.flx-mens tr.inv td { color: var(--pri-2); }
table.flx-mens tr.subtot.inv td { background: #EEF5F2; }
table.flx-mens tr.saldo.inv td { font-weight: 700; border-bottom: 1px solid var(--line-2); }

/* Inconsistências + sugestões + memória numa aba */
.inc-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.inc-chip { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line-2); border-radius: 999px; padding: 5px 12px; font-size: 13px; cursor: pointer; }
.inc-chip b { margin-left: 4px; font-variant-numeric: tabular-nums; }
.inc-chip.on { background: var(--pri); color: #fff; border-color: var(--pri); }
.item .inc-faz { margin-top: 8px; padding: 8px 10px; background: var(--pri-bg); border-radius: 6px; color: var(--pri-2); }
.inc-mem { margin-top: 18px; }
.inc-mem > summary { cursor: pointer; font-size: 14.5px; }

/* Compras · prazos de fornecedores */
.cp-sep { margin: 26px 0 10px; padding-top: 14px; border-top: 2px solid var(--line-2); }
.cp-lista { display: flex; flex-direction: column; }
.cp-item { display: grid; grid-template-columns: 34px 1fr 200px; gap: 14px; align-items: center; padding: 12px 4px; border-top: 1px solid var(--line); }
.cp-item:first-child { border-top: 0; }
.cp-rank { font-family: var(--display); font-weight: 800; font-size: 20px; color: var(--pri); text-align: center; }
.cp-nome { font-weight: 700; font-size: 15px; }
.cp-prazo { margin-top: 3px; font-size: 13.5px; }
.cp-prazo .de { color: var(--red); font-weight: 700; } .cp-prazo .para { color: var(--ok); font-weight: 800; }
.cp-arg { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.cp-val { text-align: right; font-variant-numeric: tabular-nums; }
.cp-val b { font-family: var(--display); font-stretch: 85%; font-size: 20px; color: var(--ok); display: block; }
.cp-val small { color: var(--muted); font-size: 11.5px; display: block; }
.cp-val i { display: block; height: 5px; background: #8BE6C6; border-radius: 3px; margin: 5px 0 0 auto; }
@media (max-width: 700px) { .cp-item { grid-template-columns: 28px 1fr; } .cp-val { grid-column: 2; text-align: left; } .cp-val i { margin-left: 0; } }
.cp-alerta { border-left: 4px solid var(--amber-line); background: #FFFBF0; }
.cp-alerta p { margin: 6px 0; }
.cp-duas { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 16px; align-items: start; }
.cp-dica { border-left: 4px solid var(--pri); }
table.cp-tab { table-layout: auto; }
table.cp-tab td:first-child, table.cp-tab th:first-child { width: 34px; }
table.cp-tab td:nth-child(2) { max-width: 260px; }
table.cp-tab tr.cp-neg td { background: #FFF8F6; }
.cp-cat { font-size: 12px; padding: 2px 4px; max-width: 170px; }
.dist-kpi.km { border-color: #C9D6F0; background: #F3F6FC; } .dist-kpi.km b { color: #2E4F8A; }
table.flx-proj-tab th:first-child, table.flx-proj-tab td:first-child { width: 112px; }
table.flx-proj-tab { margin-top: 10px; }

/* impressão só da projeção de caixa (botão "Imprimir projeção") */
@media print {
  body.imprimindo-proj * { visibility: hidden !important; }
  body.imprimindo-proj #flxProjCard, body.imprimindo-proj #flxProjCard * { visibility: visible !important; }
  body.imprimindo-proj #flxProjCard { position: absolute; left: 0; top: 0; width: 100%; margin: 0; border: 0; padding: 0; }
  body.imprimindo-proj #flxProjCard .no-print { display: none !important; }
  body.imprimindo-proj #flxProjCard .flx-graf { height: 240px; }
  body.imprimindo-proj table.flx-proj-tab { font-size: 10.5px; }
  body.imprimindo-proj table.flx-proj-tab td, body.imprimindo-proj table.flx-proj-tab th { padding: 3px 4px; }
  body.imprimindo-proj #flxProjCard .flx-pasta, body.imprimindo-proj #flxProjCard input { display: none !important; }
}

/* ------------------------------------------------ recebimentos (formas de pagamento) */
.rc-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.rc-live { display: inline-flex; align-items: center; gap: 6px; color: var(--pri); font-weight: 600; font-size: 13px; }
.rc-live::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); animation: rcPulso 1.2s infinite; }
@keyframes rcPulso { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .rc-live::before { animation: none; } }
.rc-hoje { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--pri); border-radius: 10px; padding: 16px 18px; margin-bottom: 14px; }
.rc-hoje-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 12px; }
.rc-hoje .lab { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; color: var(--muted); }
.rc-hoje .big { font-family: var(--display); font-stretch: 85%; font-size: 38px; font-weight: 800; line-height: 1.1; color: var(--pri-2); }
.rc-hoje small { color: var(--muted); font-size: 13px; }
.rc-hoje-lojas { display: flex; gap: 8px; flex-wrap: wrap; }
.rc-hoje-lojas button { background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; text-align: left; cursor: pointer; color: var(--ink); }
.rc-hoje-lojas button:hover { border-color: var(--pri); }
.rc-hoje-lojas span { display: block; font-size: 12px; color: var(--muted); }
.rc-hoje-lojas b { font-size: 16px; }
.rc-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; background: var(--surface-2); gap: 2px; }
.rc-bar span { display: block; height: 100%; min-width: 3px; }
.rc-leg { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 10px; font-size: 13.5px; }
.rc-leg div { display: flex; align-items: center; gap: 6px; }
.rc-leg i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.rc-leg span { color: var(--muted); }
.rc-mes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 12px; }
.rc-k { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; }
.rc-k span { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; color: var(--muted); display: block; }
.rc-k b { font-family: var(--display); font-stretch: 85%; font-size: 24px; font-weight: 750; display: block; }
.rc-k small { color: var(--muted); font-size: 12.5px; }
.rc-k.amb b { color: var(--amber); }
.rc-formas { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; }
.rc-forma { background: var(--surface); border: 1px solid var(--line); border-top: 3px solid var(--c); border-radius: 8px; padding: 10px 12px; }
.rc-forma span { font-size: 12.5px; font-weight: 700; color: var(--c); display: block; }
.rc-forma b { font-size: 17px; display: block; }
.rc-forma small { color: var(--muted); font-size: 12px; }
.rc-tab { width: 100%; border-collapse: collapse; font-size: 13px; table-layout: auto; }
.rc-tab th { font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); text-align: left; padding: 6px 6px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.rc-tab th i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; }
.rc-tab td { padding: 5px 6px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.rc-tab .n { text-align: right; font-variant-numeric: tabular-nums; }
.rc-tab td small { display: block; color: var(--muted); font-size: 11px; }
.rc-tab tr.clic { cursor: pointer; }
.rc-tab tr.clic:hover td { background: var(--pri-bg); }
.rc-tab tr.tot td { font-weight: 700; border-top: 2px solid var(--line-2); background: var(--surface-2); }
.rc-tab tr.hoje td { background: var(--pri-bg); }
.rc-tab .rc-mini { width: 70px; }
.rc-tab .rc-mini span { display: block; height: 6px; border-radius: 3px; background: var(--pri); opacity: .55; }
@media (max-width: 1100px) { .rc-tab .rc-mini { display: none; } .rc-tab { font-size: 12px; } }
@media (max-width: 820px) { .rc-mes { grid-template-columns: 1fr 1fr; } .rc-tab { display: block; overflow-x: auto; } }

/* ------------------------------------------------ expedição (quadro de cargas, rota e romaneio) */
.ex-kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 14px; }
.ex-kpis .k { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.ex-kpis .k span { font-size: 11px; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; color: var(--muted); display: block; }
.ex-kpis .k b { font-family: var(--display); font-stretch: 85%; font-size: 26px; font-weight: 800; line-height: 1.15; display: block; }
.ex-kpis .k small { color: var(--muted); font-size: 12px; }
.ex-kpis .k.fila { border-top: 3px solid var(--amber); }
.ex-kpis .k.ok b { color: var(--ok); }
.ex-kpis .k.alerta { background: var(--red-bg); border-color: #EBC4BE; }
.ex-kpis .k.alerta b { color: var(--red); }
@media (max-width: 1000px) { .ex-kpis { grid-template-columns: repeat(3, 1fr); } }

.ex-quadro { display: grid; grid-template-columns: minmax(330px, 38%) 1fr; gap: 16px; align-items: start; margin-bottom: 14px; }
@media (max-width: 1000px) { .ex-quadro { grid-template-columns: 1fr; } }
.ex-col-h { display: flex; justify-content: space-between; align-items: baseline; margin: 0 2px 8px; }
.ex-col-h h3 { margin: 0; }
.ex-col-h span { color: var(--muted); font-size: 13px; }
.ex-vazio { background: var(--surface); border: 1px dashed var(--line-2); border-radius: 10px; padding: 22px; color: var(--muted); text-align: center; }

/* fila: grupos por zona, a cor da zona marca a borda */
.ex-fila { position: sticky; top: 118px; max-height: calc(100vh - 130px); overflow-y: auto; padding-right: 4px; }
.ex-zona { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--z); border-radius: 10px; margin-bottom: 10px; overflow: hidden; }
.ex-zona-h { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 12px;
  background: color-mix(in srgb, var(--z) 12%, var(--surface)); border-bottom: 1px solid var(--line); }
.ex-zona-h label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.ex-zona-h b { font-family: var(--display); font-stretch: 88%; font-size: 15px; }
.ex-zona-h span { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
.ex-nota { display: flex; gap: 10px; padding: 8px 12px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 13px; }
.ex-nota:last-child { border-bottom: 0; }
.ex-nota:hover { background: var(--surface-2); }
.ex-nota.sel { background: color-mix(in srgb, var(--z) 10%, var(--surface)); box-shadow: inset 3px 0 0 var(--z); }
.ex-nota input { margin-top: 3px; accent-color: var(--pri); }
.ex-nota-c { flex: 1; min-width: 0; }
.ex-nota .l1, .ex-par .l1 { display: flex; gap: 8px; align-items: baseline; }
.ex-nota .l1 b, .ex-par .l1 b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; min-width: 0; }
.ex-nota .l1 .v { font-variant-numeric: tabular-nums; color: var(--muted); }
.nf { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12px; color: var(--muted); white-space: nowrap; }
.ex-nota .l2, .ex-par .l2 { opacity: .85; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-nota .l3 { color: var(--muted); font-style: italic; font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-nota .l4, .ex-par .l4 { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 3px; font-size: 12px; color: var(--muted); align-items: center; }
.tg { background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; font-size: 11.5px; color: var(--ink); }
.tg.atras { background: var(--red-bg); border-color: #EBC4BE; color: var(--red); }
.tg.aviso { background: var(--amber-bg); border-color: var(--amber-line); color: #7A5208; }
.tg.ok { background: var(--pri-bg); color: var(--pri); }
.ex-nota.atras { background: #FFF8F6; }
.ex-barra { position: sticky; bottom: 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; background: var(--pri-2); color: #fff;
  border-radius: 10px; padding: 10px 12px; box-shadow: 0 -6px 16px rgba(0,0,0,.12); }
.ex-barra span { flex: 1; }
.ex-barra select { max-width: 170px; }
.ex-barra button { background: #fff; color: var(--pri-2); border-color: #fff; font-weight: 700; }

/* carga: cabeçalho escuro de "ficha", paradas ligadas pela linha da rota */
.ex-carga { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 14px; overflow: hidden; }
.ex-carga > header { background: linear-gradient(180deg, #0F4A3D, #0A3A30); color: #E9F3EF; padding: 12px 14px; }
.ex-carga.st-saiu > header { background: linear-gradient(180deg, #2E4F7A, #233D60); }
.ex-carga.st-voltou > header { background: linear-gradient(180deg, #4F5A55, #3C4542); }
.ex-carga-t { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.ex-tag { font-family: var(--display); font-stretch: 85%; font-size: 20px; font-weight: 800; letter-spacing: .01em; }
.ex-st { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; background: rgba(255,255,255,.14); border-radius: 20px; padding: 2px 9px; }
.ex-zs { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.ex-zs span { font-size: 12px; font-weight: 700; background: var(--z); color: #fff; border-radius: 4px; padding: 1px 8px; }
.ex-carga-f { display: flex; gap: 10px; flex-wrap: wrap; margin: 10px 0 8px; }
.ex-carga-f label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #A9C9BE; display: flex; flex-direction: column; gap: 2px; }
.ex-carga-f select, .ex-carga-f input { background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.22); border-radius: 6px; padding: 5px 8px; min-width: 150px; }
.ex-carga-f select option { color: var(--ink); }
.ex-carga-n { display: flex; gap: 18px; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,.14); padding-top: 8px; }
.ex-carga-n div { display: flex; flex-direction: column; }
.ex-carga-n b { font-size: 17px; font-variant-numeric: tabular-nums; }
.ex-carga-n span { font-size: 11.5px; color: #A9C9BE; }
.ex-carga-n .peso { min-width: 150px; }
.ex-cap { display: block; height: 6px; background: rgba(255,255,255,.18); border-radius: 3px; margin: 3px 0 1px; overflow: hidden; }
.ex-cap i { display: block; height: 100%; background: #8FE0BF; }
.ex-cap i.over { background: #FF8A7A; }
.ex-rota { list-style: none; margin: 0; padding: 6px 0; }
.ex-par { position: relative; display: flex; gap: 12px; padding: 8px 14px 8px 12px; font-size: 13px; }
.ex-par::before { content: ""; position: absolute; left: 25px; top: 0; bottom: 0; width: 2px; background: var(--line-2); }
.ex-par:first-child::before { top: 50%; }
.ex-par:last-child::before { bottom: 50%; }
.ex-par .num { position: relative; z-index: 1; flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--z); color: #fff;
  display: grid; place-items: center; font-family: var(--display); font-weight: 800; font-size: 14px; box-shadow: 0 0 0 3px var(--surface); }
.ex-par.entregue .num { background: var(--ok); }
.ex-par.devolvida .num { background: var(--red); }
.ex-par-c { flex: 1; min-width: 0; }
.ex-par-a { display: flex; gap: 4px; align-items: center; }
.ex-par-a button { padding: 2px 8px; }
.ex-par:hover { background: var(--surface-2); }
.ex-carga > footer { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px 14px; border-top: 1px solid var(--line); background: var(--surface-2); }
.ex-carga > footer .ex-esp { flex: 1; }
.ex-carga > footer button.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
a.ex-a { text-decoration: none; display: inline-block; padding: 6px 12px; border: 1px solid var(--line-2); border-radius: var(--r); color: var(--ink); background: var(--surface); font-size: 13.5px; }
a.ex-a:hover { border-color: var(--pri); }
#exMapa { height: 460px; border-radius: 8px; }
.ex-pino span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; font-weight: 800; font-size: 12px; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.35); }

/* romaneio impresso */
@media print {
  body.imprimindo-rom * { visibility: hidden !important; }
  body.imprimindo-rom #exPrint, body.imprimindo-rom #exPrint * { visibility: visible !important; }
  body.imprimindo-rom #exPrint { position: absolute; left: 0; top: 0; width: 100%; }
}
.rom { font-size: 10.5px; color: #000; }
.rom-cab { display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid #000; padding-bottom: 6px; margin-bottom: 6px; }
.rom-cab strong { font-size: 15px; display: block; }
.rom-cab span { font-size: 10.5px; }
.rom-n { text-align: right; font-weight: 700; letter-spacing: .04em; }
.rom-n b { display: block; font-size: 22px; }
.rom-dados { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.rom-dados td { border: 1px solid #000; padding: 3px 6px; font-size: 9.5px; text-transform: uppercase; color: #333; }
.rom-dados td b { display: block; font-size: 11.5px; text-transform: none; color: #000; }
.rom h4 { font-size: 12px; margin: 8px 0 4px; }
.rom h4 span { font-weight: 400; font-size: 10px; }
.rom-tab { width: 100%; border-collapse: collapse; }
.rom-tab th, .rom-tab td { border: 1px solid #000; padding: 3px 5px; vertical-align: top; text-align: left; }
.rom-tab th { background: #E8E8E8; font-size: 9.5px; text-transform: uppercase; }
.rom-tab td.o { font-size: 16px; font-weight: 800; text-align: center; width: 30px; }
.rom-tab td.it { font-size: 9.5px; }
.rom-tab td.ass { width: 120px; }
.rom-tab tfoot td { font-weight: 700; background: #F2F2F2; }
.rom-tab tr { break-inside: avoid; }
.rom-ass { display: flex; gap: 30px; margin-top: 26px; }
.rom-ass div { flex: 1; border-top: 1px solid #000; text-align: center; padding-top: 3px; }
.rom-rod { margin-top: 8px; font-size: 9px; color: #444; }
.rom .marca { font-weight: 800; font-size: 8.5px; border: 1px solid #000; padding: 0 3px; margin-right: 3px; }
.ex-zsel { font-size: 11.5px; padding: 1px 4px; border-radius: 4px; }
.ex-pino.fila span { width: 14px; height: 14px; border-width: 2px; }
.ex-pino.aprox span { outline: 2px dashed #B97A0C; outline-offset: 2px; }
.rom-dados td small { display: block; font-size: 9px; text-transform: none; }

.ex-carga-t { cursor: pointer; }
.ex-seta { font-size: 14px; width: 12px; color: #A9C9BE; }
.ex-desc { font-weight: 600; color: #E9F3EF; }
.ex-resumo { font-size: 12.5px; color: #A9C9BE; font-variant-numeric: tabular-nums; }
.ex-carga.fechada > header { padding: 9px 14px; }
.ex-carga-f label.larga input { min-width: 220px; }
.ex-zsel { font-size: 11.5px; padding: 0 4px; border-radius: 4px; border: 1px solid var(--line); background: var(--surface); color: var(--muted); max-width: 140px; }
.ex-zsel.pede { border-color: var(--amber-line); background: var(--amber-bg); color: #7A5208; }
.ex-mover { font-size: 12px; padding: 2px 4px; border-radius: 6px; max-width: 120px; }
.ex-zona-h .peq { margin-left: 8px; white-space: nowrap; }

/* Expedição v3: turno da montagem, escala dos caminhões, arrastar e soltar, cargas por turno */
.ex-turnos { display: flex; align-items: stretch; gap: 0; flex-wrap: wrap; margin: 0 0 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.ex-turnos > span { font-family: var(--display); font-stretch: 70%; font-weight: 800; font-size: 11.5px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); padding: 0 14px; display: flex; align-items: center; border-right: 1px solid var(--line); }
.ex-turnos button { border: 0; border-right: 1px solid var(--line); border-radius: 0; background: transparent; color: var(--ink); padding: 9px 16px;
  font-weight: 600; display: flex; align-items: baseline; gap: 6px; }
.ex-turnos button small { color: var(--muted); font-size: 11px; font-weight: 600; }
.ex-turnos button i { font-style: normal; font-size: 11px; font-weight: 800; background: var(--pri-bg); color: var(--pri); border-radius: 10px; padding: 0 6px; }
.ex-turnos button.on { background: var(--pri); color: #fff; box-shadow: inset 0 -3px 0 var(--amber-line); }
.ex-turnos button.on small { color: #BFE3D6; }
.ex-turnos button.on i { background: rgba(255,255,255,.2); color: #fff; }
.ex-turnos button.ex-sug { margin-left: auto; border-right: 0; border-left: 1px solid var(--line); background: var(--pri-2); color: #fff; font-weight: 700; }
.ex-turnos button.ex-sug:disabled { opacity: .45; }
.btn-sec.ativo { border-color: var(--pri); background: var(--pri-bg); color: var(--pri-2); }

.ex-turno-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin: 6px 2px 8px; padding-bottom: 4px; border-bottom: 2px solid var(--ink); }
.ex-turno-h b { font-family: var(--display); font-stretch: 80%; font-weight: 800; font-size: 17px; text-transform: uppercase; letter-spacing: .05em; }
.ex-turno-h span { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.ex-turno-h.over { border-bottom-color: var(--red); }
.ex-turno-h.over span { color: var(--red); font-weight: 700; }
.ex-turno-h ~ .ex-turno-h { margin-top: 18px; }
.ex-resumo b.over, .ex-carga-n b.over { color: #FFB4A8; }

.ex-zona-h b em { font-style: normal; font-size: 11px; font-weight: 800; background: var(--z); color: #fff; border-radius: 4px; padding: 0 5px; margin-right: 6px; vertical-align: 2px; }
.ex-zona-h span i { font-style: normal; color: var(--ink); opacity: .75; }
.ex-zona-h span i.nao { color: var(--red); opacity: 1; font-weight: 700; }
.ex-zona.hoje-nao { opacity: .72; }
.ex-zona.hoje-nao:hover { opacity: 1; }
.tg.tipo { background: var(--t); border-color: var(--t); color: #fff; font-weight: 700; }

/* arrastar e soltar */
.ex-nota[draggable="true"] { cursor: grab; }
.ex-alca { cursor: grab; color: var(--muted); font-size: 16px; padding: 0 4px; user-select: none; }
.ex-par[draggable="true"] { cursor: grab; }
body.ex-arrastando .ex-carga:not(.st-saiu):not(.st-voltou) { outline: 2px dashed var(--line-2); outline-offset: -2px; }
body.ex-arrastando .ex-fila { outline: 2px dashed var(--line-2); outline-offset: 2px; border-radius: 10px; }
.ex-carga.ex-alvo { outline: 3px solid var(--amber) !important; box-shadow: 0 0 0 6px var(--amber-bg); }
.ex-fila.ex-alvo { outline: 3px solid var(--amber) !important; }
.ex-par.ex-alvo { box-shadow: inset 0 3px 0 var(--amber); background: var(--amber-bg); }
.ex-fantasma { position: fixed; top: -100px; left: -100px; background: var(--pri-2); color: #fff; font-weight: 800; padding: 6px 12px; border-radius: 6px; }
.ex-par-a button.ok { background: var(--ok); border-color: var(--ok); color: #fff; }

/* escala dos caminhões */
.ex-escala { margin-bottom: 14px; }
.ex-esc-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.ex-esc-chips span { font-size: 12px; border: 1px solid var(--line); border-radius: 20px; padding: 2px 10px; background: var(--surface-2); }
.ex-esc-chips span b { margin-left: 4px; }
.ex-esc-chips .entrega, .ex-esc-chips .munck { border-color: var(--pri); color: var(--pri-2); background: var(--pri-bg); }
table.ex-esc { width: 100%; border-collapse: collapse; font-size: 13px; }
table.ex-esc th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 6px 8px; border-bottom: 2px solid var(--line-2); }
table.ex-esc td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.ex-esc td small { display: block; color: var(--muted); font-size: 11.5px; }
table.ex-esc select, table.ex-esc input { width: 100%; min-width: 130px; font-size: 13px; padding: 4px 6px; }
table.ex-esc tr.p-reserva td { opacity: .55; }
table.ex-esc tr.p-munck td:first-child { box-shadow: inset 4px 0 0 #9C2F2F; }
table.ex-esc tr.p-ferro td:first-child { box-shadow: inset 4px 0 0 #4A5560; }
table.ex-esc tr.p-moveis td:first-child { box-shadow: inset 4px 0 0 #7A4E2D; }
table.ex-esc tr.p-entrega td:first-child { box-shadow: inset 4px 0 0 var(--pri); }
@media (max-width: 700px) { .ex-turnos button.ex-sug { margin-left: 0; width: 100%; border-left: 0; border-top: 1px solid var(--line); } }
.tabela-rolagem { overflow-x: auto; }

/* Expedição v4: etiquetas uniformes (a .aviso global é um quadro grande), cabeçalho da rota em 2 linhas, turno de entrega */
.ex-nota .tg, .ex-par .tg { display: inline-flex; align-items: center; height: 19px; line-height: 1; margin: 0; padding: 0 6px;
  border-radius: 4px; font-size: 11.5px; font-weight: 600; white-space: nowrap; border-width: 1px; }
.tg.ent { background: var(--surface); border-color: var(--line-2); color: var(--ink); }
.tg.ent.agora { background: var(--pri-bg); border-color: #BFD9D1; color: var(--pri-2); }
.tg.ent.atras { background: var(--red-bg); border-color: #EBC4BE; color: var(--red); }
.tg.ent.depois { background: var(--surface-2); color: var(--muted); border-style: dashed; }
.ex-nota.depois { opacity: .5; }
.ex-nota.depois:hover { opacity: .9; }
.ex-zona.sem-agora .ex-zona-h { opacity: .7; }
.ex-zona-h { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; align-items: center; }
.ex-zona-h label { min-width: 0; }
.ex-zona-h label b { line-height: 1.2; }
.ex-zona-h > .peq { margin-left: 0; grid-column: 2; grid-row: 1; }
.ex-zona-m { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; padding-left: 24px; font-size: 12.5px; }
.ex-zona-m span { color: var(--muted); white-space: normal; }
.ex-zona-m span b { color: var(--ink); }
.ex-zona-m i { font-style: normal; font-size: 11.5px; font-weight: 700; color: var(--ink); background: var(--surface-2); border: 1px solid var(--line); border-radius: 4px; padding: 0 6px; }
.ex-zona-m i.nao { color: var(--red); background: var(--red-bg); border-color: #EBC4BE; }
.ex-antigas { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.ex-zs span.ex-alerta { background: #FFB4A8; color: #5A140D; }
/* coluna das cargas não estoura a tela (item de grid encolhe; campos quebram linha) */
.ex-quadro > section { min-width: 0; }
.ex-carga-f label { min-width: 0; flex: 1 1 150px; }
.ex-carga-f label.larga { flex: 2 1 220px; }
.ex-carga-f select, .ex-carga-f input { min-width: 0; width: 100%; }
.ex-carga-f label.larga input { min-width: 0; }
.ex-par-c .l2 { white-space: normal; }
/* lista Balcão (notas sem frete acima de R$ 300) */
.ex-balcao { background: var(--surface); border: 1px dashed var(--line-2); border-radius: 10px; margin: 6px 0 10px; font-size: 13px; }
.ex-balcao summary { cursor: pointer; padding: 9px 12px; font-weight: 700; }
.ex-balcao summary small { display: block; font-weight: 400; color: var(--muted); font-size: 12px; }
.ex-balcao-l { display: grid; grid-template-columns: auto 1fr auto auto; gap: 2px 8px; align-items: center; padding: 6px 12px; border-top: 1px solid var(--line); }
.ex-balcao-l b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-balcao-l > span:nth-of-type(2) { grid-column: 1 / 3; color: var(--muted); font-size: 12px; }
.ex-balcao-l .v { grid-row: 1; grid-column: 3; font-variant-numeric: tabular-nums; }
.ex-balcao-l button { grid-row: 1 / 3; grid-column: 4; }
/* fluxo: saldo andando do último extrato até hoje */
.flx-rola { margin-top: 10px; font-size: 13.5px; color: #CFE6DD; line-height: 1.5; }
.flx-rola b { color: #fff; }
.flx-rola b.pos { color: #9BE3BF; } .flx-rola b.neg { color: #FFB4A8; }
.flx-rola small { display: block; color: #9DBFB2; font-size: 12px; }

/* expedição: posição pelo ponto de referência (entre a rua e o "só bairro") e camadas do mapa */
.tg.ref { background: #EEF3FA; border-color: #C9D6EA; color: #2D4A75; }
#exMapa .leaflet-control-layers { font-size: 12.5px; border-radius: 6px; }

/* expedição: conferir alfinetes (paradas sem casa/rua, uma a uma no satélite) */
.ex-conf { border: 1px solid var(--amber-line); background: var(--amber-bg); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; display: grid; gap: 4px; }
.ex-conf-t { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.ex-conf-e { font-size: 13.5px; }
.ex-conf-r { font-style: italic; color: var(--muted); font-size: 13px; }
.ex-conf-a { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.ex-conf-a .muted { flex: 1; min-width: 220px; font-size: 12.5px; }
#exMapa.conferindo { cursor: crosshair; outline: 3px solid var(--amber-line); }
.ex-pino.ex-pino-conf span { width: 34px; height: 34px; line-height: 34px; font-size: 18px; background: #C2410C !important;
  box-shadow: 0 0 0 6px rgba(194, 65, 12, .25); }

/* ------------------------------------------------------------ Formação de preços */
.prc-param { display: flex; gap: 14px; flex-wrap: wrap; margin: 4px 0 14px; }
.prc-param label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; color: var(--muted); text-transform: uppercase;
  letter-spacing: .06em; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; min-width: 200px; flex: 1 1 200px; }
.prc-param small { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 12px; }
.prc-in { display: inline-flex; align-items: center; gap: 6px; font-size: 18px; color: var(--ink); font-weight: 700; text-transform: none; }
.prc-in input { width: 96px; font-size: 18px; font-weight: 700; text-align: right; }
.prc-formula { border-left: 4px solid var(--pri); background: var(--pri-bg); border-radius: 0 8px 8px 0; padding: 10px 14px; margin-bottom: 16px; display: grid; gap: 6px; font-size: 14px; }
.prc-chips { display: flex; gap: 6px; flex-wrap: wrap; }
.prc-chips span { background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; padding: 2px 10px; font-size: 12.5px; }
.prc-chips .prc-chip-alvo { border-color: var(--pri); color: var(--pri); font-weight: 700; }
.prc-kpis { margin-bottom: 0; }
.prc-barra { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.prc-busca { flex: 1 1 240px; min-width: 0; }
.prc-tbl { max-height: 70vh; overflow-y: auto; }
.prc-tbl thead th { position: sticky; top: 0; z-index: 1; }
.prc-tbl td:first-child { min-width: 260px; }
.prc-tbl input.prc-conc { width: 92px; border-color: var(--line-2); }
.prc-tbl input.prc-conc:focus { border-color: var(--pri); }
.prc-baixo { color: var(--amber); }
@media (max-width: 640px) {
  .prc-param label { min-width: 100%; }
}

/* impressos: logo da Figueredo na folha de rota */
.rom-logo { display: block; height: 34px; width: auto; margin-bottom: 4px; }
.prc-marca { max-width: 260px; }
.prc-marca-td { white-space: nowrap; font-size: 13px; }
.prc-marca-res { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: baseline; background: var(--pri-bg); border-radius: 8px; padding: 8px 12px; margin-bottom: 10px; font-size: 13.5px; }
.prc-ed-marca { padding: 0 6px; min-height: 22px; font-size: 12px; margin-left: 2px; }
.prc-bal-msg { font-size: 14.5px; margin: 6px 0 12px; max-width: 110ch; }
.prc-bal-tab td:first-child { min-width: 260px; }
.prc-chk span { display: inline-flex; gap: 8px; align-items: center; font-size: 14px; color: var(--ink); text-transform: none; letter-spacing: 0; font-weight: 600; }
.prc-ir { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.prc-ir h3 { margin: 0 0 4px; }
.prc-pmz-aviso { margin: 12px 0 0; }
tr.prc-pmz td { background: #FBECEA; }
tr.prc-pmz td:first-child { box-shadow: inset 4px 0 0 var(--red); }
.prc-erp { font-size: 14px; color: var(--ink); text-transform: none; letter-spacing: 0; font-weight: 600; }
.ex-esc .ex-pesomax { white-space: nowrap; }
.ex-esc .ex-pesomax input { width: 90px; text-align: right; }

.ex-nota .nf.pv, .ex-par .nf.pv { background: #FFF1D6; color: #8A5A00; border: 1px solid #E8C27A; }
.ex-pv-end { cursor: pointer; font: inherit; }

/* Expedição · janela "Baixas do ERP" */
.ex-baixas { width: min(980px, calc(100vw - 32px)); max-height: 86vh; border: 1px solid var(--line-2); border-radius: var(--r);
  padding: 0; background: var(--surface); color: var(--ink); }
.ex-baixas::backdrop { background: rgba(24, 32, 29, .45); }
.ex-baixas .topo { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px;
  border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--surface); }
.ex-baixas .topo b { font-family: var(--display); font-size: 18px; }
.ex-baixas .topo small { display: block; color: var(--muted); }
.ex-baixas .como { margin: 10px 18px; color: var(--muted); font-size: 14px; }
.ex-baixas details { margin: 8px 18px; border: 1px solid var(--line); border-left: 4px solid var(--line-2); border-radius: var(--r); }
.ex-baixas details.ok { border-left-color: var(--ok); }
.ex-baixas details.aviso { border-left-color: var(--amber); }
.ex-baixas details.alerta { border-left-color: var(--red); }
.ex-baixas summary { cursor: pointer; padding: 8px 12px; }
.ex-baixas table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ex-baixas th, .ex-baixas td { text-align: left; padding: 4px 12px; border-top: 1px solid var(--line); }
.ex-baixas th { color: var(--muted); font-weight: 600; }
.ex-baixas .vazio { margin: 0; padding: 4px 12px 10px; color: var(--muted); }
.ex-baixas details:last-child { margin-bottom: 18px; }

/* Expedição · cargas que saíram pelo ERP (realizado), separadas do plano do sistema */
.ex-erp-real { margin: 6px 0 14px; border: 1px dashed var(--line-2); border-radius: var(--r); padding: 4px 10px; background: var(--surface-2); }
.ex-erp-real > summary { cursor: pointer; padding: 6px 0; color: var(--ink); }
.ex-erp-real > summary small { color: var(--muted); margin-left: 6px; }

/* Expedição · plano do ERP agora (cargas abertas na Alocação de Carga) × plano do sistema */
.ex-erp-box { margin: 4px 0 14px; padding: 10px 12px; border: 1px solid var(--line-2); border-radius: var(--r); background: var(--surface); }
.ex-erp-box > .t { font-family: var(--display); font-size: 16px; margin-bottom: 6px; }
.ex-erp-box > .t small { font-family: var(--body); font-size: 12px; color: var(--muted); margin-left: 6px; }
.ex-erp-plano { border-left: 4px solid var(--ok); padding: 4px 10px; margin: 6px 0; background: var(--surface-2); border-radius: var(--r); }
.ex-erp-plano.ruim { border-left-color: var(--red); }
.ex-erp-plano > summary { cursor: pointer; padding: 4px 0; }
.ex-erp-plano > summary small { display: block; color: var(--muted); margin-left: 16px; }
.ex-erp-c { border-top: 1px solid var(--line); padding: 6px 0; font-size: 13px; }
.ex-erp-c.fim { opacity: .65; }
.ex-erp-c .h { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.ex-erp-c .h > span:not(.tg) { color: var(--muted); }
.ex-erp-c ol { margin: 4px 0 0; padding-left: 22px; }
.ex-erp-c li small { color: var(--muted); }

/* Expedição · quadro Atrasadas clicável e janela de atrasadas */
.ex-kpis .k.clicavel { cursor: pointer; }
.ex-kpis .k.clicavel:hover { box-shadow: 0 0 0 2px var(--red) inset; }
.ex-baixas table.ex-atr { margin: 8px 0 16px; }
.ex-baixas table.ex-atr td { vertical-align: top; padding: 6px 12px; }
.ex-baixas table.ex-atr td small { color: var(--muted); }
.ex-baixas table.ex-atr td.acoes { white-space: nowrap; }
.ex-baixas table.ex-atr td.acoes select { margin-left: 6px; max-width: 200px; }
.ex-zs .ex-alerta.junta { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-line); }

/* Expedição · saldo de entrega fracionada e janela de itens */
.nf.pv.saldo { background: var(--pri-bg); color: var(--pri); border-color: var(--pri); }
#ex-itens .ex-it-q { width: 90px; }
#ex-itens td small a, #ex-itens td a { color: var(--pri); }

/* Expedição · janela "Caminhões no turno" (rastreador Khronos): turno de 4h do motorista */
.btn-sec.ex-rast-alerta { border-color: var(--red); }
.btn-sec.ex-rast-alerta i { font-style: normal; color: var(--red); font-weight: 600; margin-left: 4px; }
.ex-rast-dlg { width: min(1180px, calc(100vw - 32px)); }
.ex-rast-dlg section { margin: 6px 18px 16px; }
.ex-rast-dlg h3 { font-family: var(--display); font-size: 17px; margin: 8px 0 2px; }
.ex-rast-dlg h3 small { font-family: var(--body); font-size: 12px; color: var(--muted); font-weight: 400; margin-left: 6px; }
.ex-rr { margin: 0 0 8px; font-size: 14px; }
.ex-rr .neg { color: var(--red); }
.ex-rcs { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 10px; }
.ex-rc { border: 1px solid var(--line); border-left: 4px solid var(--ok); border-radius: var(--r); padding: 10px 12px; background: var(--surface); color: var(--ink); }
.ex-rc.rc-ruim { border-left-color: var(--red); }
.ex-rc.rc-viva { border-left-color: var(--amber); }
.ex-rc header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.ex-rc header b { font-family: var(--display); font-size: 16px; }
.ex-rc header span:not(.tg) { color: var(--muted); font-size: 13px; }
.ex-rc header .tg { margin-left: auto; }
.ex-rc p { margin: 22px 0 6px; font-size: 13.5px; line-height: 1.45; }
.ex-rb { position: relative; height: 10px; border-radius: 5px; background: var(--surface-2); margin: 4px 0 0; }
.ex-rb i { position: absolute; top: 0; height: 100%; border-radius: 5px; }
.ex-rb i.car, .ex-rast-dlg .lg.car { background: #b9bfbb; }
.ex-rb i.rua, .ex-rast-dlg .lg.rua { background: #3b6fb6; }
.ex-rb i.rua.viva { background: repeating-linear-gradient(45deg, #3b6fb6 0 6px, #6f97cf 6px 12px); }
.ex-rb i.passou, .ex-rast-dlg .lg.passou { background: var(--red); }
.ex-rb .lim { position: absolute; top: -3px; height: 16px; width: 2px; background: var(--ink); }
.ex-rb span { position: absolute; top: 13px; font-size: 10.5px; color: var(--muted); }
.ex-rb .t0 { left: 0; }
.ex-rb .t1 { transform: translateX(-50%); }
.ex-rast-dlg .lg { display: inline-block; width: 18px; height: 8px; border-radius: 4px; vertical-align: middle; margin: 0 2px; }
.ex-baixas table.ex-atr td.acoes button.sec { background: var(--surface-2); color: var(--ink); border: 1px solid var(--line-2); margin-right: 6px; }

.ex-juntas { padding: 8px 14px 10px; font-size: 12.5px; color: #e8f1ec; opacity: .92; border-top: 1px solid rgba(255,255,255,.12); }
.ex-juntas div + div { margin-top: 3px; }

/* conferência diária com o ERP */
.ex-conf { margin: 4px 0 10px; padding: 8px 12px; border: 1px solid var(--line-2); border-left: 4px solid #2e7d4f; border-radius: var(--r); background: var(--surface); }
.ex-conf.erro { border-left-color: #c0392b; }
.ex-conf summary { cursor: pointer; font-size: 14px; }
.ex-conf-c { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; margin-top: 8px; }
.ex-conf-t ul { list-style: none; margin: 4px 0 0; padding: 0; font-size: 13px; }
.ex-conf-t li { margin: 3px 0; }
.ex-conf-t li small { display: inline; color: var(--muted); margin: 0; }
.ex-conf-t li[title] { cursor: help; }
.ex-turnos .ex-filtro { display: flex; margin-left: 12px; border-left: 1px solid var(--line); }
.ex-turnos .ex-filtro button { font-size: 13px; padding: 9px 12px; }
.ex-turnos .ex-filtro button.nao i { background: #fbe3df; color: #c0392b; }
.ex-conf-t li.ok { color: #2e7d4f; } .ex-conf-t li.erro { color: #c0392b; } .ex-conf-t li.av { color: #a86a00; }
.ex-conf-ok { color: #2e7d4f; font-size: 12px; } .ex-conf-erro { color: #c0392b; font-size: 12px; font-weight: 600; }
.ex-conf-h { margin-top: 8px; font-size: 12px; color: var(--muted); }
.ex-conf-h .ok { color: #2e7d4f; } .ex-conf-h .erro { color: #c0392b; }

/* janela Atrasadas: botões lado a lado (18/11/2026: estavam empilhados) */
.ex-baixas .topo > div:last-child { display: flex; gap: 8px; flex-shrink: 0; white-space: nowrap; }
.ex-baixas .topo small b { font-family: var(--body); font-size: inherit; }
#ex-atrasadas { width: min(1180px, calc(100vw - 32px)); }
.ex-baixas table.ex-atr td.acoes { display: flex; gap: 6px; align-items: center; flex-wrap: nowrap; }
.ex-baixas table.ex-atr td.acoes button, .ex-baixas table.ex-atr td.acoes select { width: auto; margin: 0; flex: 0 0 auto; }
.ex-baixas table.ex-atr td.acoes select { max-width: 170px; }

/* pacote da contabilidade */
.pk-ach { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.pk-ach > li { padding: 8px 12px; border-radius: 6px; background: var(--surface-2); box-shadow: inset 3px 0 0 var(--line); font-size: 14px; }
.pk-ach > li.pk-erro { box-shadow: inset 3px 0 0 var(--red); background: var(--red-bg); }
.pk-ach > li.pk-aviso { box-shadow: inset 3px 0 0 var(--amber); background: var(--amber-bg); }
.pk-ach > li.pk-ok { box-shadow: inset 3px 0 0 var(--ok); }
.pk-ach details { margin-top: 6px; }
.pk-det { margin: 4px 0 0; padding-left: 18px; font-size: 12.5px; font-family: Consolas, monospace; color: var(--muted); max-height: 320px; overflow: auto; }
.pk-res { display: flex; gap: 10px; flex-wrap: wrap; }
.pk-res-i { display: flex; gap: 8px; align-items: center; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; text-decoration: none; color: inherit; }
.pk-res-i.pk-erro { border-color: var(--red); } .pk-res-i.pk-aviso { border-color: var(--amber); }
.pk-loja { margin: 16px 0 0; font-size: 15px; }
.pk-arqs { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.pk-arqs a { font-size: 13px; padding: 3px 10px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; }
.pk-up { cursor: pointer; }
.kpi.pk-k-erro .v { color: var(--red); }
.pk-ger { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 10px; }
.pk-ger > li { padding: 10px 12px; background: var(--surface-2); border-radius: 6px; }
.pk-ger-v { display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 13px; margin-top: 4px; }
.pk-erp { margin-top: 14px; padding: 12px 14px; border: 1px dashed var(--line); border-radius: 8px; font-size: 14px; }
.pk-erp ul { margin: 6px 0; padding-left: 20px; }

/* simulação de lucro (DRE - Formação CMV) */
.sim-t td:first-child { white-space: nowrap; }
.sim-t td.n { white-space: nowrap; }
.sim-cel { padding: 2px 6px !important; }
.sim-in { width: 128px; text-align: right; font: inherit; padding: 3px 6px; border: 1px solid var(--borda, #ccc); border-radius: 4px; background: var(--fundo, #fff); color: inherit; }
.sim-in.sim-pct { width: 70px; }
.sim-in.sim-ed { background: #fff2cc; border-color: #d6a400; color: #000; }
.sim-x { margin-left: 3px; padding: 0 5px; font-size: 12px; line-height: 18px; background: transparent; color: #b07800; border: 1px solid #d6a400; border-radius: 4px; cursor: pointer; }
.sim-tot td { font-weight: 600; border-top: 1px solid var(--borda, #ccc); }
.sim-vazio td { height: 6px; padding: 0 !important; border: 0 !important; }
.sim-ref td { font-size: 12px; color: var(--muted, #777); font-style: italic; }
.sim-p { font-size: 11px; font-weight: 400; }

/* ------------------------------------------------ usuários (botão no topo, login) */
.usuario-topo { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.usuario-topo .quem { font-size: 13px; color: var(--muted); }
.janela { position: fixed; inset: 0; z-index: 50; background: rgba(24, 32, 29, .45); display: flex; align-items: flex-start;
  justify-content: center; padding: 32px 16px; overflow-y: auto; }
.janela-in { background: var(--surface); border-radius: 10px; width: 100%; max-width: 1040px; padding: 20px 22px 18px; }
.janela-topo { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
body.sem-rolagem { overflow: hidden; }
.tu-grade { display: grid; grid-template-columns: minmax(0, 340px) minmax(0, 1fr); gap: 22px; }
.tu-lista-topo, .tu-abas-topo { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.tu-lista-topo h3, .tu-abas-topo h4 { margin: 0; }
.tu-item { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; width: 100%; text-align: left; margin-bottom: 6px;
  background: var(--surface-2); color: var(--ink); border: 1px solid var(--line); min-height: 0; padding: 9px 12px; font-weight: 400; }
.tu-item:hover { background: var(--pri-bg); }
.tu-item.sel { border-color: var(--pri); background: var(--pri-bg); box-shadow: inset 3px 0 0 var(--pri); }
.tu-item.inativo { opacity: .6; }
.tu-nome { font-weight: 700; } .tu-nome small { font-weight: 400; color: var(--muted); margin-left: 4px; }
.tu-det { font-size: 12.5px; color: var(--muted); }
.tu-form { border-left: 1px solid var(--line); padding-left: 22px; }
.tu-campos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.tu-campos label { display: flex; flex-direction: column; gap: 4px; font-size: 11.5px; font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: .06em; }
.tu-campos input { font: 15px var(--body); padding: 8px 10px; border: 1px solid var(--line-2); border-radius: var(--r); min-width: 0; }
.tu-campos input:disabled { background: var(--surface-2); color: var(--muted); }
.tu-flags { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 14px; }
label.chk { display: flex; align-items: center; gap: 7px; font-size: 14px; cursor: pointer; }
label.chk input { width: 17px; height: 17px; accent-color: var(--pri); margin: 0; }
.tu-abas { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px 14px; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--surface-2); margin-bottom: 14px; }
.tu-abas.desligado { opacity: .45; pointer-events: none; }
.tu-acoes { display: flex; justify-content: space-between; gap: 10px; }
.tu-log { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 10px; }
.tu-log summary { cursor: pointer; font-weight: 600; color: var(--pri); }
.tu-log > div { max-height: 280px; overflow: auto; margin-top: 8px; }
@media (max-width: 800px) {
  .tu-grade { grid-template-columns: 1fr; }
  .tu-form { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); padding-top: 14px; }
  .tu-campos, .tu-abas { grid-template-columns: 1fr 1fr; }
}
.janela-peq { max-width: 420px; }
.tu-campos-1 { grid-template-columns: 1fr; }
.senha-box { position: relative; display: flex; }
.senha-box input { flex: 1; min-width: 0; padding-right: 78px !important; }
.senha-olho { position: absolute; right: 5px; top: 50%; transform: translateY(-50%); min-height: 0; padding: 4px 9px;
  font-size: 12.5px; font-weight: 600; text-transform: none; letter-spacing: 0; background: var(--surface-2); color: var(--pri);
  border: 1px solid var(--line-2); }
.senha-olho:hover { background: var(--pri-bg); }
