:root {
  --dark: #1F3D2B;
  --green: #2C5234;
  --green-2: #3E6B49;
  --sage: #7FA37A;
  --sage-l: #E6EEE3;
  --gold: #C9A227;
  --gold-l: #F6EBC4;
  --cream: #F4F1EA;
  --cream-2: #F7F4EC;
  --bege: #D9D2C2; /* série de comparação nos gráficos (ano passado) */
  --line: #E6E0D4;
  --ink: #24302A;
  --muted: #56635B; /* texto de apoio: contraste ≥ 4,5 no branco, no creme e nos avisos (antes #6B7A70) */
  --good: #2C7A4B;
  --bad: #B5452B;
  /* etiquetas de prazo (redesenho, 22/11/2026): texto escuro sobre fundo claro, contraste ≥ 4,5:1 */
  --bad-l: #F9E4DE; --bad-t: #8E2F1A;
  --gold-t: #6B4E00;
  --azul-l: #E2EEF4; --azul-t: #1F4F66;
  --good-l: #E2F0E6; --good-t: #1F5E39;
  --radius-card: 14px;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(31, 61, 43, .06), 0 4px 14px rgba(31, 61, 43, .06);
  --sidebar: 252px;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
/* min-height (não height): com height: 100% a barra do topo (sticky) parava de grudar depois da primeira tela de rolagem */
html, body { margin: 0; min-height: 100%; background: var(--cream); }
body { font-size: 15px; -webkit-font-smoothing: antialiased; }
button { font: inherit; }
input, select, textarea { font: inherit; color: inherit; }
/* texto de exemplo dos campos: uma cor só, com contraste ≥ 4,5:1 no branco e no creme (o cinza do navegador dava 4,2:1) */
::placeholder { color: var(--muted); opacity: 1; }
a { color: var(--green); }

/* ---------- topo ---------- */
:root { --topo: 64px; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 20px;
  height: 64px; padding: 0 24px;
  background: var(--dark); color: #fff;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-name { font-weight: 700; font-size: 17px; letter-spacing: .2px; }
.brand-sub { font-size: 12px; color: #BFD3C1; margin-top: -2px; }
.tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; flex: 1; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  color: #fff; text-decoration: none; white-space: nowrap;
  padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: 14px;
  background: var(--green); transition: background .15s;
}
.tabs a:hover { background: var(--green-2); }
.tabs a.active { background: var(--gold); color: var(--dark); }
.topbar-right { display: flex; align-items: center; gap: 6px; }
.updated { font-size: 12px; color: #BFD3C1; text-align: right; line-height: 1.2; }
.updated b { color: #fff; font-weight: 600; display: block; }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px;
  border: 0; border-radius: 10px; background: transparent; color: #E8EFE6; cursor: pointer;
}
.icon-btn:hover { background: rgba(255,255,255,.1); }
.icon-btn.dark { color: var(--ink); }
.icon-btn.dark:hover { background: var(--cream); }
.icon-btn.spin svg { animation: spin 1s linear infinite; }
.logout-form { margin: 0; }
.script-wrap { position: relative; }
#btnScript { position: relative; }
#btnScript[hidden], .script-pop[hidden] { display: none; }
#btnScript .dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 2px var(--dark); }
#btnScript.rodando svg { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.script-pop {
  position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; width: min(340px, 92vw);
  background: #fff; color: var(--ink); border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.25); padding: 16px;
}
.script-pop h3 { margin: 0 0 4px; font-size: 15px; color: var(--dark); }
.script-pop p { margin: 0 0 12px; font-size: 13px; color: var(--muted); line-height: 1.4; }
.script-status { display: flex; gap: 10px; align-items: center; background: var(--cream-2); border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; font-size: 13px; }
.script-status .ic { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; flex: none; color: #fff; font-size: 14px; font-weight: 700; }
.script-status .ic.ok { background: var(--good); }
.script-status .ic.falhou { background: var(--bad); }
.script-status .ic.rodando, .script-status .ic.na_fila, .script-status .ic.aguardando { background: var(--gold); animation: pulse 1.2s ease-in-out infinite; }
.script-status small { display: block; color: var(--muted); font-size: 12px; }
.script-pop .btn.primary { width: 100%; padding: 10px; font-size: 13px; }
.script-pop .btn.primary:disabled { background: #9DB3A2; border-color: #9DB3A2; }
.script-log { max-height: 180px; overflow: auto; background: #1F2A23; color: #DDE8DF; font-size: 12px; padding: 8px; border-radius: 6px; white-space: pre-wrap; margin: 6px 0 0; }
.script-pop .aviso { font-size: 12px; color: var(--muted); margin-top: 10px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 80; background: var(--dark); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 13px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.loja-sel {
  height: 34px; max-width: 220px; border-radius: 999px; border: 1px solid rgba(255,255,255,.25);
  background: var(--green); color: #fff; padding: 0 12px; font-size: 13px; font-weight: 600; cursor: pointer;
}
.loja-sel option { color: var(--ink); background: #fff; }
.only-mobile { display: none; }

/* ---------- layout ---------- */
.layout { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: calc(100vh - var(--topo, 60px)); }
.sidebar {
  position: sticky; top: var(--topo, 60px); align-self: start;
  height: calc(100vh - var(--topo, 60px)); overflow-y: auto;
  background: #fff; border-right: 1px solid var(--line); padding: 14px 14px 30px;
}
.sidebar-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sidebar-head > span { font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--green); }
.link-btn { border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 12px; text-decoration: underline; padding: 4px; }
.content { padding: 20px 24px 48px; min-width: 0; }
/* moldura do redesenho: em tela larga o conteúdo e a faixa de filtros ficam numa coluna de até 1360 px, centralizada (como no protótipo) */
@media (min-width: 861px) {
  .content { max-width: 1360px; margin-inline: auto; box-sizing: border-box; }
}
.scrim { display: none; }

/* ---------- filtros ---------- */
.f-group { margin: 12px 0 0; }
.f-label { display: block; font-size: 12px; font-weight: 600; color: var(--dark); margin-bottom: 5px; }
.f-hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.f-input, .ms-btn {
  width: 100%; height: 36px; padding: 0 10px;
  border: 1px solid #DCD5C6; border-radius: 8px; background: var(--cream-2);
  font-size: 13px; outline: none;
}
/* caixa de texto: a letra do painel (não a de máquina de escrever do navegador) e altura que cresce com as linhas */
:where(textarea).f-input { height: auto; min-height: 64px; padding: 8px 10px; line-height: 1.4; resize: vertical; }
.f-input:focus, .ms-btn:focus-visible { border-color: var(--green); box-shadow: 0 0 0 3px rgba(44,82,52,.12); background: #fff; }
.f-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.f-row > * { min-width: 0; }
.f-row input[type=date] { padding: 0 6px; font-size: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.chip {
  border: 1px solid #DCD5C6; background: #fff; color: var(--ink);
  border-radius: 999px; padding: 4px 10px; font-size: 12px; cursor: pointer;
}
.chip:hover { border-color: var(--green); }
.chip.on { background: var(--green); border-color: var(--green); color: #fff; }
.f-sep { height: 1px; background: var(--line); margin: 16px 0 4px; }
.f-section { font-size: 12px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--gold); margin-top: 14px; }

/* multiselect */
.ms { position: relative; }
.ms-btn { display: flex; align-items: center; justify-content: space-between; cursor: pointer; text-align: left; color: var(--ink); }
.ms-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ms-btn .muted { color: var(--muted); }
.ms-btn::after { content: ""; border: 5px solid transparent; border-top-color: var(--muted); margin-top: 5px; margin-left: 6px; flex: none; }
.ms-pop {
  position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px);
  background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 10px 30px rgba(31,61,43,.15);
  padding: 6px; display: none; max-height: 320px; overflow: hidden; flex-direction: column;
}
.ms.open .ms-pop { display: flex; }
.ms-search { height: 32px; margin-bottom: 6px; }
.ms-actions { display: flex; justify-content: space-between; padding: 2px 4px 6px; }
.ms-list { overflow-y: auto; }
.ms-item { display: flex; gap: 8px; align-items: center; padding: 6px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.ms-item:hover { background: var(--cream-2); }
.ms-item input { accent-color: var(--green); margin: 0; }

/* ---------- conteúdo ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.page-title { font-size: 30px; line-height: 1.15; font-weight: 700; color: var(--dark); margin: 0; }
.page-sub { color: var(--muted); font-size: 15px; margin-top: 4px; }
.active-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.af { background: var(--sage-l); color: var(--dark); border-radius: 999px; padding: 3px 10px; font-size: 12px; }

.grid { display: grid; gap: 16px; }
.g-kpi { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3-2 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
.g-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.mt { margin-top: 16px; }
.section-label {
  display: flex; align-items: center; gap: 8px; margin: 26px 0 10px;
  font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--green);
}
.section-label::before { content: ""; width: 4px; height: 16px; background: var(--gold); border-radius: 2px; }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius-card);
  padding: 22px 24px; min-width: 0;
}
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.card-title { font-weight: 700; font-size: 19px; line-height: 1.25; color: var(--dark); }
.card-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.chart-box { position: relative; height: 280px; }
.chart-box.tall { height: 360px; }
.chart-box.short { height: 220px; }
.empty { color: var(--muted); text-align: center; padding: 40px 10px; font-size: 13px; }

/* ============ peças do redesenho (TS.heroi, TS.acoesNum, TS.etqPrazo, TS.linhasNum, TS.pilulaSit, TS.duasColunas, TS.cardSec) ============ */
/* decisão do dono, 22/11/2026: o visual limpo do protótipo do Início vale para o painel todo (regras em visual.md) */
.heroi { padding: 24px 28px; }
.heroi-titulo { margin: 0 0 14px; font-size: 19px; color: var(--dark); }
.heroi-cols { display: grid; grid-template-columns: minmax(0, 1.4fr); grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0; align-items: stretch; }
.heroi-col { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 0 28px; border-left: 1px solid var(--line); }
.heroi-col:first-child { padding-left: 0; border-left: 0; }
.heroi-col:last-child { padding-right: 0; }
.heroi-rot { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.heroi-num { font-size: 30px; line-height: 1.1; font-weight: 700; color: var(--dark); overflow-wrap: anywhere; }
.heroi-pri .heroi-num { font-size: 44px; line-height: 1; }
.heroi-num.pos { color: var(--good); } .heroi-num.neg { color: var(--bad); }
.heroi-sub { font-size: 15px; font-weight: 400; color: var(--muted); }
.heroi-linha { font-size: 14px; color: var(--muted); line-height: 1.4; }
.heroi-linha .pos, .heroi-linha .neg, .heroi-linha .up, .heroi-linha .down { font-weight: 600; }
.heroi-barra { position: relative; height: 12px; background: var(--sage-l); border-radius: 999px; margin: 6px 0 2px; }
.heroi-barra-ok { position: absolute; left: 0; top: 0; bottom: 0; background: var(--green); border-radius: 999px; }
.heroi-barra-marca { position: absolute; top: -5px; bottom: -5px; width: 2px; margin-left: -1px; background: var(--ink); }

.acoes-num { list-style: none; margin: 0; padding: 0; }
.acao { display: grid; grid-template-columns: 32px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.acao:first-child { padding-top: 4px; }
.acao:last-child { border-bottom: 0; padding-bottom: 0; }
.acao-n { width: 32px; height: 32px; border-radius: 50%; background: var(--dark); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.acao-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.acao-txt strong { font-size: 16px; color: var(--ink); }
.acao-txt .muted { font-size: 14px; }
.btn.acao-btn { white-space: nowrap; min-height: 44px; padding: 10px 18px; font-size: 14px; }

.etq-prazo { display: inline-block; font-size: 12px; font-weight: 700; line-height: 1.2; border-radius: 6px; padding: 4px 8px; white-space: nowrap; }
.etq-prazo.agora { background: var(--bad-l); color: var(--bad-t); }
.etq-prazo.semana { background: var(--gold-l); color: var(--gold-t); }
.etq-prazo.saber { background: var(--azul-l); color: var(--azul-t); }
.etq-prazo.ok { background: var(--good-l); color: var(--good-t); }

.linhas-num { list-style: none; margin: 0; padding: 0; }
.linhas-num li { border-top: 1px solid var(--line); }
.linhas-num li:first-child { border-top: 0; }
.linhas-num-a { display: flex; justify-content: space-between; align-items: center; gap: 12px; width: 100%; box-sizing: border-box; min-height: 44px; padding: 10px 0; background: none; border: 0; font: inherit; color: var(--ink); text-decoration: none; text-align: left; }
a.linhas-num-a, button.linhas-num-a { cursor: pointer; }
a.linhas-num-a:hover .linhas-num-r, button.linhas-num-a:hover .linhas-num-r { text-decoration: underline; }
.linhas-num-r { display: inline-flex; align-items: center; gap: 6px; font-size: 15px; min-width: 0; }
.linhas-num-v { font-size: 20px; color: var(--dark); white-space: nowrap; }
.linhas-num-v.pos { color: var(--good); } .linhas-num-v.neg { color: var(--bad); } .linhas-num-v.warn-t { color: var(--gold-t); }

.pilula-sit { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; }
.pilula-sit-b { width: 8px; height: 8px; border-radius: 50%; background: var(--good); flex: none; }
.pilula-sit.warn { color: var(--gold-t); } .pilula-sit.warn .pilula-sit-b { background: var(--gold); }
.pilula-sit.err { color: var(--bad-t); } .pilula-sit.err .pilula-sit-b { background: var(--bad); }

.tela-2col { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.tela-2col-pri, .tela-2col-lat { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

.card-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.card-sec-titulo { margin: 0; font-size: 19px; line-height: 1.25; color: var(--dark); display: inline-flex; align-items: center; gap: 6px; }
.card-sec-dir { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.card-sec-sub { font-size: 13px; color: var(--muted); }
.card-sec-link { font-size: 14px; font-weight: 600; color: var(--green); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: none; }
.card-sec-link:hover { text-decoration: underline; }

@media (max-width: 860px) {
  .heroi { padding: 18px; }
  .heroi-cols { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .heroi-col { padding: 0; border-left: 0; }
  .heroi-pri { grid-column: 1 / -1; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
  .heroi-n1 .heroi-pri { border-bottom: 0; padding-bottom: 0; }
  .heroi-pri .heroi-num { font-size: 38px; }
  .heroi-num { font-size: 20px; }
  .heroi-n2 .heroi-cols > .heroi-col:not(.heroi-pri) { grid-column: 1 / -1; }
  .acao { grid-template-columns: 28px minmax(0, 1fr) auto; gap: 12px; padding: 14px 0; }
  .acao-n { width: 28px; height: 28px; font-size: 14px; }
  .acao-txt strong { font-size: 15px; }
  .acao-txt .muted { font-size: 13px; }
  .acao-pri { grid-template-columns: 28px minmax(0, 1fr); }
  .acao-pri .btn.acao-btn { grid-column: 1 / -1; width: 100%; }
  .acao:not(.acao-pri) .btn.acao-btn { border: 0; background: none; padding: 10px 4px; min-height: 44px; }
  .acao:not(.acao-pri) .acao-btn::after { content: " ›"; }
  .tela-2col { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .tela-2col-pri, .tela-2col-lat { gap: 16px; }
  .card-sec-titulo { font-size: 18px; }
}

.kpi { position: relative; padding: 16px 18px 14px; overflow: hidden; }
/* sem barra lateral (decisão do dono, 22/11/2026): o estado está só na cor do texto da comparação (kpi-bom/kpi-ruim continuam como marca) */
.kpi::before { content: none; }
.kpi-label { font-size: 12px; color: var(--muted); }
.kpi-value { font-size: 26px; letter-spacing: -.01em; font-weight: 700; color: var(--dark); margin-top: 2px; white-space: nowrap; }
.kpi-foot { font-size: 12px; margin-top: 2px; color: var(--muted); line-height: 1.35; }
.up { color: var(--good); font-weight: 600; }
.down { color: var(--bad); font-weight: 600; }

.seg { display: inline-flex; background: var(--cream); border-radius: 999px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 5px 12px; border-radius: 999px; font-size: 12px; cursor: pointer; color: var(--ink); }
.seg button.on { background: #fff; color: var(--dark); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
/* abas que quebram em duas linhas ou mais (seg-quebra, posto por TS.sinalRolagem): canto menor, sem virar uma bolha grande */
.seg.seg-quebra { border-radius: 14px; }
.seg.seg-quebra button { border-radius: 10px; }
/* faixa que rola para o lado (abas, submenu, menu do topo): a borda com opções escondidas esmaece — sinal de que há mais */
.rola-dir { -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, #000 calc(100% - 36px), transparent); }
.rola-esq { -webkit-mask-image: linear-gradient(to left, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to left, #000 calc(100% - 36px), transparent); }
.rola-esq.rola-dir { -webkit-mask-image: linear-gradient(to right, transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(to right, transparent, #000 36px, #000 calc(100% - 36px), transparent); }

/* ---------- tabelas ---------- */
.table-wrap { overflow: auto; border-radius: 8px; border: 1px solid var(--line); max-height: 560px; }
.table-wrap.free { max-height: none; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
/* letra mínima 12 px: o <small> padrão do navegador encolhia para 10–11 px dentro de textos de 12–14 px */
small { font-size: max(12px, .833em); }
.t th {
  position: sticky; top: 0; z-index: 2;
  background: var(--green); color: #fff; font-weight: 600; font-size: 12px;
  padding: 9px 10px; text-align: right; white-space: nowrap; cursor: pointer; user-select: none;
}
.t th.l, .t td.l { text-align: left; }
.t th .arrow { opacity: .55; font-size: 10px; margin-left: 4px; }
.t th.sorted .arrow { opacity: 1; }
.t td { padding: 8px 10px; border-bottom: 1px solid #EEE9DF; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.t tbody tr:nth-child(even) td { background: var(--cream-2); }
.t tbody tr:hover td { background: #EEF3EC; }
.t tfoot td { position: sticky; bottom: 0; background: var(--sage-l); font-weight: 700; color: var(--dark); border-top: 1px solid #C9D7C5; }
.t td.sticky-col, .t th.sticky-col { position: sticky; left: 0; z-index: 1; }
.t th.sticky-col { z-index: 3; }
.t tbody td.sticky-col { background: #fff; }
.t tbody tr:nth-child(even) td.sticky-col { background: var(--cream-2); }
.t .pos { color: var(--good); }
.t .neg { color: var(--bad); }
.t .hit { color: #1F5FBF; font-weight: 600; }
.t .miss { color: var(--bad); font-weight: 600; }
.t .group-row td { background: #F1EDE3 !important; font-weight: 600; cursor: pointer; }
.t .muted { color: var(--muted); }
.t td.wrap { white-space: normal; min-width: 180px; }
.table-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.table-tools .f-input { width: 220px; height: 32px; }
.pager { display: flex; gap: 8px; align-items: center; justify-content: flex-end; margin-top: 8px; font-size: 12px; color: var(--muted); }
.btn {
  border: 1px solid var(--green); background: #fff; color: var(--green); border-radius: 10px;
  padding: 7px 14px; min-height: 36px; cursor: pointer; font-size: 13px; font-weight: 600; line-height: 1.2;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none; box-sizing: border-box;
}
.btn:hover { background: var(--sage-l); }
.btn:disabled { opacity: .4; cursor: default; }
.btn.primary { background: var(--green); color: #fff; border-color: var(--green); }
.btn.primary:hover { background: var(--dark); border-color: var(--dark); }
.btn.contorno { background: #fff; color: var(--green); border-color: var(--green); }

.notice { background: var(--gold-l); border: 1px solid #E8D79A; color: #5C4A0E; border-radius: 10px; padding: 10px 12px; font-size: 13px; margin-bottom: 14px; }
.notice.err { background: #F8E1DB; border-color: #E9B8AA; color: #7A2B18; }

/* clientes */
/* redesenho (22/11/2026): a lista de clientes é uma lista com divisórias dentro do cartão, não caixas dentro de caixa */
.cli-list { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
.cli { background: #fff; border-bottom: 1px solid var(--line); }
.cli.open { background: var(--cream-2); }
.cli-head { display: grid; grid-template-columns: minmax(0, 2.4fr) repeat(5, minmax(70px, 1fr)) 34px; gap: 10px; align-items: center; padding: 10px 12px; cursor: pointer; }
.cli-head:hover { background: var(--cream-2); }
.cli-name { font-weight: 600; color: var(--dark); white-space: normal; overflow-wrap: break-word; line-height: 1.25; }
.cli-meta { font-size: 12px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.cli-stat { text-align: right; font-variant-numeric: tabular-nums; }
.cli-stat small { display: block; font-size: 12px; color: var(--muted); }
.cli-body { border-top: 1px solid var(--line); padding: 8px 12px 12px; display: none; }
.cli.open .cli-body { display: block; }
.cli-caret { transition: transform .15s; color: var(--muted); text-align: center; }
.cli.open .cli-caret { transform: rotate(90deg); }
:root { --wpp: #0F7A40; --wpp-texto: #0D6B38; } /* verde do WhatsApp do painel: branco sobre --wpp ≥ 5:1; --wpp-texto ≥ 5,5:1 no branco e no creme */
.wpp { display: inline-flex; align-items: center; gap: 4px; color: var(--wpp-texto); text-decoration: none; font-weight: 600; font-size: 12px; min-height: 24px; cursor: pointer; }
.badge { display: inline-block; background: var(--gold-l); color: #6A5310; border-radius: 6px; padding: 1px 6px; font-size: 12px; font-weight: 600; }
.cupom { border: 1px solid var(--line); border-radius: 8px; margin-top: 8px; }
.cupom-head { display: flex; justify-content: space-between; gap: 8px; padding: 8px 10px; background: var(--cream-2); border-radius: 8px 8px 0 0; font-size: 13px; flex-wrap: wrap; }
.cupom-items { width: 100%; border-collapse: collapse; font-size: 12px; }
.cupom-items td { padding: 5px 10px; border-top: 1px solid #F0EBE0; }
.cupom-items td.r { text-align: right; white-space: nowrap; }

/* tooltip & loading */
.tooltip { position: fixed; pointer-events: none; z-index: 60; background: var(--dark); color: #fff; padding: 6px 9px; border-radius: 6px; font-size: 12px; opacity: 0; transition: opacity .1s; max-width: 280px; }
.loading { display: grid; place-items: center; min-height: 50vh; color: var(--muted); text-align: center; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--green); animation: spin .9s linear infinite; margin: 0 auto 12px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- responsivo ---------- */
@media (max-width: 1100px) {
  .g-3-2, .g-2-1 { grid-template-columns: 1fr; }
  .brand { min-width: 0; }
}
@media (max-width: 860px) {
  .only-mobile { display: inline-grid; }
  .layout { grid-template-columns: 1fr; }
  .sidebar {
    position: fixed; z-index: 50; top: 0; left: 0; bottom: 0; height: 100vh; width: min(320px, 88vw);
    transform: translateX(-102%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.2);
  }
  body.filters-open .sidebar { transform: none; }
  body.filters-open .scrim { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 45; }
  .g-2 { grid-template-columns: 1fr; }
  .content { padding: 14px 12px 40px; }
  .brand-sub, .updated { display: none; }
  .topbar-right { flex: 1; min-width: 0; justify-content: flex-end; }
  .loja-sel { flex: 1 1 auto; min-width: 0; max-width: none; padding: 0 10px; font-size: 14px; }
  .topbar { gap: 8px; padding: 0 12px; }
  .tabs a { padding: 7px 12px; }
  .cli-head { grid-template-columns: minmax(0, 1fr) 80px 80px 26px; }
  .cli-head .hide-sm { display: none; }
  .brand-name { font-size: 15px; }
  .brand > div { display: none; }
  .cupom-items td:last-child { display: none; }
}
@media print {
  .topbar, .sidebar { display: none; }
  .layout { display: block; }
  .card { break-inside: avoid; box-shadow: none; }
}

/* ---------- tabela em árvore (Evolução mensal) ---------- */
.t.tree th { cursor: default; }
.t.tree .tree-cell { display: inline-flex; align-items: center; gap: 8px; }
.t.tree td.tree-l.n1 { padding-left: 30px; }
.t.tree td.tree-l.n2 { padding-left: 54px; font-weight: 400; color: var(--ink); }
.t.tree tr.lv0 td, .t.tree tr.lv0 td.sticky-col { font-weight: 700; color: var(--dark); background: #F1EDE3; }
.t.tree tr.lv1 td, .t.tree tr.lv1 td.sticky-col { font-weight: 600; background: #fff; }
.t.tree tr.lv2 td, .t.tree tr.lv2 td.sticky-col { background: var(--cream-2); font-size: 12.5px; }
.t.tree tbody tr:hover td { background: #EEF3EC; }
.tree-btn {
  width: 22px; height: 22px; flex: none; border-radius: 6px; border: 1px solid #C9D7C5; background: #fff;
  color: var(--green); font-weight: 700; font-size: 15px; line-height: 1; cursor: pointer; padding: 0;
}
.tree-btn:hover { background: var(--green); color: #fff; border-color: var(--green); }
.tree-sp { width: 22px; flex: none; }
#filtros select.f-input { min-width: 0; flex: 1; }

/* ---------- apresentação (dados fictícios) ---------- */
.demo-bar { background: #FFF6D8; color: #5A4A12; border-bottom: 1px solid #EAD9A0; padding: 8px 20px; font-size: 13px; line-height: 1.4; }
.demo-bar b { color: #3E330C; }
@media (max-width: 860px) { .demo-bar { padding: 6px 12px; font-size: 12px; } }

/* combos Ano / Mês */
.f-row.anomes label { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.f-row.anomes label > span { font-size: 12px; color: var(--muted); }
#filtros .f-row.anomes select.f-input { flex: none; width: 100%; height: 40px; padding: 0 8px; font-size: 13px; }

/* ---------- Configurações ---------- */
body.pg-config .layout { grid-template-columns: 1fr; }
body.pg-config .sidebar, body.pg-config #btnFiltros { display: none; }
.tabs a.tab-config { margin-left: 6px; }
.cfg-abas { margin: 4px 0 16px; }
.cfg-corpo { display: flex; flex-direction: column; gap: 14px; }
.cfg-barra { display: flex; gap: 8px; }
.cfg-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr)); gap: 12px; margin-top: 10px; }
.cfg-grid.c3 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.cfg-campo { display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 600; color: var(--dark); min-width: 0; }
.cfg-campo small { font-weight: 400; color: var(--muted); font-size: 12px; line-height: 1.35; }
.cfg-campo .f-input { width: 100%; height: 38px; }
.cfg-campo[hidden] { display: none; }
.cfg-check { flex-direction: row; align-items: center; gap: 8px; align-self: end; height: 38px; }
.cfg-inline { display: flex; gap: 6px; align-items: center; }
.cfg-inline .f-input { flex: 1; }
.cfg-acoes { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.btn.danger { background: var(--bad); color: #fff; border-color: var(--bad); }
.btn.ghost-danger { color: var(--bad); }
.btn.ghost-danger:hover { border-color: var(--bad); }
.toast.err { background: var(--bad); }
.cfg-loja { padding: 0; overflow: hidden; }
.cfg-loja-cab { display: flex; align-items: center; gap: 14px; width: 100%; padding: 16px 18px; background: none; border: 0; cursor: pointer; text-align: left; font: inherit; color: inherit; }
.cfg-loja-cab:hover { background: var(--cream-2); }
.cfg-loja-cab > div:first-child { flex: 1; min-width: 0; }
.cfg-loja-nome { font-size: 16px; font-weight: 700; color: var(--dark); }
.cfg-loja-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.cfg-loja-info { display: flex; flex-direction: column; align-items: flex-end; font-size: 12px; gap: 2px; }
.cfg-seta { color: var(--muted); font-size: 14px; }
.cfg-loja-corpo { display: grid; grid-template-columns: repeat(auto-fit, minmax(380px, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.cfg-bloco { padding: 16px 18px; border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); font-size: 13px; }
.cfg-bloco h3 { margin: 0 0 8px; font-size: 14px; color: var(--green); }
.cfg-bloco p { margin: 6px 0; line-height: 1.45; }
.cfg-bloco .neg { color: var(--bad); }
.cfg-bloco details { margin-top: 10px; }
.cfg-bloco summary { cursor: pointer; font-weight: 600; color: var(--dark); }
.cfg-hist { background: var(--cream-2); border-radius: 8px; padding: 10px 12px; }
.cfg-lote { margin: 10px 0; font-size: 12.5px; display: flex; flex-direction: column; gap: 6px; }
.cfg-barra-prog { height: 8px; border-radius: 99px; background: #E6E0D2; overflow: hidden; }
.cfg-barra-prog > div { height: 100%; background: var(--green); transition: width .4s; }
.cfg-metas { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 8px; }
.cfg-meta { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); font-weight: 600; }
.cfg-meta.atual span { color: var(--green); }
.cfg-meta .f-input { height: 34px; padding: 0 8px; font-size: 13px; }
.cfg-fontes { margin: 6px 0 0; padding-left: 18px; color: var(--ink); line-height: 1.7; }
.cfg-t td, .cfg-t th { font-size: 12.5px; }
.cfg-t tr.inativo td { color: var(--muted); }
.cfg-t th { cursor: default; }
.cfg-edit-row > td { background: var(--cream-2) !important; padding: 12px !important; white-space: normal; }
.cfg-user-form { margin: 0; box-shadow: none; }
.cfg-checks { display: flex; flex-wrap: wrap; gap: 6px 16px; font-weight: 400; font-size: 13px; padding: 6px 0; }
.cfg-checks label { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.cfg-perfis { display: grid; gap: 6px; font-size: 12.5px; color: var(--muted); }
.table-wrap + .cfg-perfis { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.badge { display: inline-block; padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; white-space: nowrap; background: #ECE7DB; color: var(--dark); }
.badge.ok { background: #DDEBDD; color: #22603A; }
.badge.erro { background: #F6DCD3; color: #8E321C; }
.badge.espera { background: #F3EBCF; color: #6D5814; }
.badge.rodando { background: #DCE7F5; color: #1F4E8C; }
.badge.p-admin { background: var(--dark); color: #fff; }
.badge.p-franqueado { background: #C9A227; color: #2E2610; }
.badge.p-gerente { background: #DDEBDD; color: #22603A; }
.badge.p-vendedor { background: #DCE7F5; color: #1F4E8C; }
.chip-x { border: 0; background: none; color: inherit; cursor: pointer; font-size: 14px; padding: 0 0 0 2px; line-height: 1; }
.vazio-loja { text-align: center; padding: 48px 24px; }
.vazio-loja h2 { margin: 0 0 8px; color: var(--dark); }
.vazio-loja p { color: var(--muted); margin: 0 0 18px; }
@media (max-width: 860px) {
  .cfg-loja-corpo { grid-template-columns: minmax(0, 1fr); }
  .cfg-loja-info { display: none; }
  .cfg-bloco { border-right: 0; }
}
.cfg-meta .f-input::placeholder { color: var(--muted); font-style: italic; }
.cfg-regras { grid-column: 1 / -1; }
.cfg-rt { border-collapse: collapse; font-size: 12.5px; min-width: 460px; }
.cfg-rt th, .cfg-rt td { padding: 5px 8px; text-align: left; }
.cfg-rt th { font-size: 12px; color: var(--muted); font-weight: 600; }
.cfg-rt .f-input { height: 34px; width: 110px; }
.cfg-rt.simples .c120 { display: none; }
.cfg-check-l { display: flex; align-items: center; gap: 6px; font-size: 13px; margin: 4px 0 6px; cursor: pointer; }

/* ---------- avisos, ações, minha comissão ---------- */
.notice.warn { background: #FFF1E6; border-color: #F0C9A8; color: #7A3E12; }
.acoes-pagina { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0 0; }
body.pg-minha .layout { grid-template-columns: 1fr; }
body.pg-minha .sidebar, body.pg-minha #btnFiltros { display: none; }
body.perfil-vendedor #btnScript { display: none !important; }
.minha-sel { display: flex; gap: 8px; flex-wrap: wrap; }
.minha-sel .f-input { height: 38px; min-width: 190px; }
.grid.g-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.minha-cat-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.minha-com { font-size: 18px; font-weight: 700; color: var(--green); }
.minha-com small { font-size: 12px; color: var(--muted); font-weight: 600; }
.minha-val { margin: 8px 0 10px; font-size: 13px; color: var(--ink); }
.minha-val b { font-size: 20px; color: var(--dark); }
.minha-barra { position: relative; height: 12px; border-radius: 99px; background: #ECE7DB; overflow: visible; }
.minha-barra .fill { height: 100%; border-radius: 99px; background: #C9A227; transition: width .5s; }
.minha-barra .fill.ok { background: var(--green); }
.minha-barra .marca { position: absolute; top: -4px; width: 2px; height: 20px; background: var(--dark); opacity: .55; }
.minha-barra .marca.m120 { opacity: .3; }
.minha-dica { margin-top: 10px; font-size: 12.5px; color: var(--ink); line-height: 1.45; }
.minha-dica.ok { color: var(--good); font-weight: 600; }
.minha-inds { display: grid; gap: 8px; margin-top: 6px; }
.minha-ind { display: grid; grid-template-columns: 1fr auto auto 24px; align-items: baseline; gap: 10px; padding: 8px 10px; border-radius: 8px; background: var(--cream-2); font-size: 13px; }
.minha-ind b { font-size: 15px; color: var(--dark); }
.minha-ind small { color: var(--muted); }
.minha-ind i { font-style: normal; text-align: center; color: var(--muted); }
.minha-ind.ok { background: #E6F0E6; }
.minha-ind.ok i { color: var(--good); font-weight: 700; }
.minha-obs { font-size: 12px; margin-top: 14px; }

/* ---------- impressão do fechamento ---------- */
#impressao { display: none; }
@media print {
  @page { size: A4; margin: 14mm; }
  body.imprimindo-doc > *:not(#impressao) { display: none !important; }
  body { background: #fff !important; }
  body.imprimindo-doc #impressao { display: block; font-family: Inter, Arial, sans-serif; color: #1d2b22; font-size: 11pt; }
  .imp-pag { page-break-after: always; }
  .imp-pag:last-child { page-break-after: auto; }
  .imp-cab { display: flex; justify-content: space-between; border-bottom: 2px solid #2C5234; padding-bottom: 8px; margin-bottom: 16px; font-size: 10pt; }
  .imp-marca { font-size: 16pt; font-weight: 700; color: #2C5234; }
  .imp-dir { text-align: right; }
  .imp-tit { font-weight: 700; font-size: 12pt; }
  .imp-nome { font-size: 15pt; margin: 6px 0 12px; }
  .imp-t { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
  .imp-t th, .imp-t td { padding: 6px 8px; border-bottom: 1px solid #ddd; text-align: left; }
  .imp-t th { background: #EEF3EC; font-size: 9.5pt; }
  .imp-t .r { text-align: right; }
  .imp-t .b, .imp-t tfoot td, .imp-t tr.tot td { font-weight: 700; }
  .imp-t tr.tot td { font-size: 12.5pt; border-top: 2px solid #2C5234; }
  .imp-res { width: 70%; margin-left: auto; }
  .imp-ass { display: flex; gap: 40px; margin-top: 60px; }
  .imp-ass > div { flex: 1; text-align: center; font-size: 10pt; }
  .imp-ass span { display: block; border-top: 1px solid #333; margin-bottom: 4px; }
  .imp-obs { font-size: 9pt; color: #666; margin-top: 10px; }
}

/* ---------- rede, alertas, marca ---------- */
.rede-t td.b { font-weight: 700; }
.rede-pos { display: inline-block; vertical-align: middle; width: 90px; height: 8px; border-radius: 99px; background: #ECE7DB; overflow: hidden; }
.rede-pos-fill { height: 100%; background: var(--green); }
.rede-t small { color: var(--muted); }
.alertas { margin-top: 14px; }
.alertas[hidden] { display: none; }
/* Promoção: de quando a quando é o "antes" (rodapé do cartão-herói) */
/* Cupons: espaço entre o cartão-herói e a lista */
.cup-topo { margin-bottom: 14px; }
.promo-comp { margin: 16px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13px; }
/* Resumo → Alertas e destaques (redesenho): cartão de seção, uma linha por alerta com a etiqueta de prazo em texto */
.alertas-l { list-style: none; margin: 0; padding: 0; }
.alertas-l li { display: flex; gap: 12px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 15px; line-height: 1.4; }
.alertas-l li:last-child { border-bottom: 0; padding-bottom: 0; }
.alertas-l li .etq-prazo { flex: none; min-width: 84px; text-align: center; }
.alertas-l li.grave { font-weight: 600; }
@media (max-width: 860px) { .alertas-l li { flex-direction: column; align-items: flex-start; gap: 6px; font-size: 14px; } .alertas-l li .etq-prazo { min-width: 0; } }
.brand-logo { height: 34px; max-width: 120px; object-fit: contain; border-radius: 6px; background: #fff; padding: 2px; }
.brand-mark[hidden] { display: none; }
.cfg-logo-prev { height: 56px; max-width: 200px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; padding: 4px; background: #fff; }
.cfg-msg { white-space: pre-wrap; background: var(--cream-2); border-radius: 8px; padding: 12px; font-size: 12.5px; line-height: 1.5; max-height: 420px; overflow: auto; font-family: inherit; }
.cfg-passos { margin: 6px 0; padding-left: 20px; font-size: 13px; line-height: 1.6; }
.cfg-dest { border: 1px dashed var(--line); border-radius: 8px; padding: 10px 12px; margin-top: 8px; }
@media (max-width: 860px) { .brand-logo { height: 28px; max-width: 44px; padding: 1px; } }
.cfg-bloco { min-width: 0; }
.cfg-bloco pre { white-space: pre-wrap; word-break: break-word; }
.cfg-metas { grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); }

/* ---------- mapa de calor ---------- */
.mapa-wrap { border: 0; }
.mapa-t { border-collapse: separate; border-spacing: 2px; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.mapa-t th { font-weight: 600; color: var(--muted); padding: 2px 4px; font-size: 11px; }
.mapa-t th.l { text-align: left; color: var(--dark); padding-right: 8px; }
.mapa-t td { min-width: 38px; height: 30px; text-align: center; border-radius: 5px; color: var(--dark); background: #F4F1EA; }
.mapa-t td.forte { color: #fff; font-weight: 600; }
.mapa-t td.fechado { background: repeating-linear-gradient(45deg, #F1EDE3, #F1EDE3 4px, #E6E0D2 4px, #E6E0D2 8px) !important; color: transparent; }
.mapa-t td.tot, .mapa-t th.tot { background: transparent; font-weight: 700; padding-left: 10px; min-width: 56px; }
.mapa-t.need td { font-weight: 700; }
.mapa-t td.n1 { background: #E3EDE1; }
.mapa-t td.n2 { background: #E8C766; }
.mapa-t td.n3 { background: #D9822B; color: #fff; }
.mapa-t.cob td.ok { background: #DDEBDD; }
.mapa-t.cob td.sobra { background: #DCE7F5; }
.mapa-t.cob td.falta { background: #F3D9A4; }
.mapa-t.cob td.vazio { background: #E8A08C; color: #fff; font-weight: 700; }
.mapa-leg { display: flex; gap: 12px; flex-wrap: wrap; font-size: 11.5px; margin-top: 8px; color: var(--muted); }
.mapa-leg span::before { content: ''; display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -2px; background: #ccc; }
.mapa-leg .n1::before { background: #E3EDE1; } .mapa-leg .n2::before { background: #E8C766; } .mapa-leg .n3::before { background: #D9822B; }
.mapa-leg .ok::before { background: #DDEBDD; } .mapa-leg .sobra::before { background: #DCE7F5; } .mapa-leg .falta::before { background: #F3D9A4; } .mapa-leg .vazio::before { background: #E8A08C; }
.mapa-trechos { font-size: 12.5px; line-height: 1.5; margin: 10px 0 0; }
.mapa-grid { align-items: start; }
.escala-t { border-collapse: separate; border-spacing: 3px; font-size: 12px; min-width: 760px; width: 100%; }
.escala-t th { font-size: 11.5px; color: var(--muted); font-weight: 600; padding: 4px; }
.escala-t th.l { text-align: left; color: var(--dark); white-space: nowrap; }
.escala-t td { border-radius: 6px; padding: 6px 4px; text-align: center; vertical-align: top; }
.escala-t td.trab { background: #E3EDE1; }
.escala-t td.trab b { display: block; color: var(--dark); }
.escala-t td.trab small { color: var(--muted); font-size: 10.5px; }
.escala-t td.folga { background: #F4F1EA; color: var(--muted); }
.notice.ok { background: #E6F0E6; border-color: #BFD8BF; color: #22603A; }
.op-horas { border-collapse: collapse; font-size: 13px; }
.op-horas td, .op-horas th { padding: 3px 6px; text-align: left; }
.op-horas th { font-size: 12px; color: var(--muted); }
.op-horas .f-input { height: 34px; width: 120px; }
.op-editor .cfg-check-l { margin: 0; }
.tabs a.tab-config { font-size: 17px; padding-left: 12px; padding-right: 12px; }
@media (max-width: 1280px) { .tabs a { padding-left: 12px; padding-right: 12px; } }

/* ---------- topo responsivo: o menu nunca some ----------
   Em telas menores (ou com zoom), as abas descem para uma segunda linha e rolam de lado. */
.tabs { min-width: 0; }
.topbar-right, .brand { flex-shrink: 0; }
@media (max-width: 860px) {
  :root { --topo: 104px; }
  .topbar { flex-wrap: wrap; height: auto; min-height: 60px; row-gap: 0; padding-top: 8px; padding-bottom: 8px; }
  .topbar .brand { min-width: 0; }
  .topbar-right { margin-left: auto; }
  .tabs { order: 3; flex: 1 0 100%; padding: 8px 0 0; border-top: 1px solid rgba(255,255,255,.08); margin-top: 8px; }
  .tabs a { padding: 7px 14px; }
}
/* abas que não cabem na linha do topo (muitas abas, zoom ou janela média): descem para a segunda linha */
body.tabs-2l { --topo: 104px; }
body.tabs-2l .topbar { flex-wrap: wrap; height: auto; min-height: 64px; row-gap: 0; padding-top: 8px; padding-bottom: 8px; }
body.tabs-2l .topbar .brand { min-width: 0; }
body.tabs-2l .topbar-right { margin-left: auto; }
body.tabs-2l .tabs { order: 3; flex: 1 0 100%; padding: 8px 0 0; border-top: 1px solid rgba(255,255,255,.08); margin-top: 8px; }
body.tabs-2l .tabs a { padding: 7px 14px; }
.cfg-auto { background: var(--cream-2); border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; display: grid; gap: 6px; font-size: 13px; }
.cfg-auto .cfg-inline { flex-wrap: wrap; }
.cfg-auto .f-input { height: 34px; }
.cfg-meta-dica { font-size: 12px; font-weight: 500; color: var(--muted); }
.cfg-meta-dica.auto { color: #1F4E8C; }
.cfg-meta-dica.dig { color: var(--green); font-weight: 700; }
.cfg-meta .f-input::placeholder { color: var(--muted); font-style: normal; }

/* formulário de usuário dentro da tabela: alinhado à esquerda */
.cfg-edit-row > td, .cfg-edit-row .cfg-form, .cfg-edit-row .cfg-campo, .cfg-edit-row .card-title { text-align: left; }
.cfg-edit-row .cfg-form { white-space: normal; }
.cfg-telas-resumo { font-size: 12px; margin-top: 3px; }
.cupons-t tr.lv2.fora td { opacity: .45; }
.cupons-t td.wrap { white-space: normal; min-width: 260px; }
.cupons-t .tree-cell small { font-weight: 400; }
.op-minimos { display: grid; grid-template-columns: repeat(7, minmax(52px, 1fr)); gap: 6px; max-width: 520px; }
.op-minimos label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; font-weight: 600; color: var(--muted); }
.op-minimos .f-input { height: 34px; padding: 0 6px; }
.op-pessoas { border-collapse: collapse; font-size: 12.5px; }
.op-pessoas th { font-size: 12px; color: var(--muted); text-align: left; padding: 3px 6px; }
.op-pessoas td { padding: 3px 6px; }
.op-pessoas .f-input { height: 34px; min-width: 150px; }
.op-pessoas .so-rodizio { display: none; }
.op-pessoas.rodizio .so-rodizio { display: table-cell; }
.op-pessoas.rodizio .so-5x2 { display: none; }
.op-pessoas.rodizio.e5x2 .so-5x2 { display: table-cell; }
.rod-semana { margin-top: 12px; }
.rod-tit { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--dark); margin-bottom: 6px; }
.escala-t td.folga.rod { background: #E7EEF7; color: #1F4E8C; font-weight: 600; }
.escala-t td.trab.dom { background: #D3E6D0; }
.escala-t tfoot td { font-size: 11.5px; text-align: center; padding-top: 6px; }
.escala-t tfoot td.neg { color: var(--bad); font-weight: 700; }
.rod-prob { margin: 8px 0 0; padding-left: 18px; font-size: 12.5px; color: #8E321C; line-height: 1.5; }
.rod-fixos { font-size: 12.5px; margin: 8px 0 0; }
.ferias-t { width: 100%; table-layout: fixed; }
.ferias-t th:nth-child(1) { width: 34%; } .ferias-t th:nth-child(4) { width: 58px; } .ferias-t th:nth-child(5) { width: 78px; }
.ferias-t .f-input { min-width: 0; width: 100%; padding: 0 6px; font-size: 12px; }
.ferias-t .btn { padding: 6px 8px; }
.ferias-t td.muted { font-size: 12px; }
.ferias-t tr.passada td { opacity: .6; }

.ferias-lista { display: grid; gap: 8px; }
.ferias-item { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.ferias-item.passada { opacity: .6; }
.ferias-item .fi-nome, .ferias-item .fi-rodape { grid-column: 1 / -1; }
.ferias-item .fi-rodape { display: flex; justify-content: space-between; align-items: center; font-size: 12px; }

/* ---------- feriados do mês ---------- */
.feriado-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0 12px; }
.feriado-chip { font-size: 12px; padding: 4px 10px; border-radius: 8px; background: #E7EEF7; color: #1F4E8C; display: inline-flex; align-items: center; gap: 4px; }
.feriado-chip.local { background: #F3EBCF; color: #6D5814; }
.feriado-chip.facultativo { background: #ECE7DB; color: var(--dark); }
.feriado-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }
.feriado-form[hidden] { display: none; }
.feriado-form .f-input { height: 36px; width: auto; }
.feriados-t td, .feriados-t th { text-align: center; }
.feriados-t td.l, .feriados-t th.l { text-align: left; }
.feriados-t td.b { font-weight: 700; }
.hora-in { width: 76px; height: 32px; text-align: center; padding: 0 4px; }
.hora-in.erro { border-color: var(--bad); background: #FBEDE8; }
.hora-dica { font-size: 12px; margin-top: 2px; }
.hora-dica.ok { color: var(--good); }
.hora-dica.falta { color: #A0640C; font-weight: 600; }
.feriado-rodape { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 10px; font-size: 12px; }
@media print { .imp-fer { margin-top: 6px; } .imp-sub { font-weight: 700; margin: 6px 0 4px; } }
.feriados-t tr.linha-horario td { background: var(--cream-2); font-size: 11.5px; vertical-align: top; }
.hor-cel { display: flex; flex-direction: column; align-items: center; gap: 3px; }
.hor-cel small, .hor-txt small { display: block; color: var(--muted); font-size: 10.5px; }
.hor-sel { height: 28px; font-size: 11.5px; width: 110px; padding: 0 4px; }
.hor-t { height: 28px; width: 96px; font-size: 11.5px; padding: 0 4px; }
.op-horas tr.linha-feriado td { background: var(--cream-2); border-top: 1px dashed var(--line); }
.op-horas tr.linha-feriado .cfg-check-l { display: inline-flex; margin-right: 10px; }

/* ---------- escala do mês ---------- */
.mes-sel { height: 36px; min-width: 170px; }
.mes-t { border-collapse: separate; border-spacing: 2px; font-size: 11px; font-variant-numeric: tabular-nums; }
.mes-t th { font-weight: 600; color: var(--muted); padding: 2px; text-align: center; min-width: 34px; }
.mes-t th.l { text-align: left; color: var(--dark); white-space: nowrap; padding-right: 8px; min-width: 90px; }
.mes-t th.dom { color: var(--green); }
.mes-t th.fer { color: #B5452B; }
.mes-t th.ds { font-size: 10px; }
.mes-t td { border-radius: 4px; text-align: center; padding: 3px 1px; line-height: 1.15; height: 34px; }
.mes-t td.trab { background: #E3EDE1; color: var(--dark); }
.mes-t td.trab span { display: block; }
.mes-t td.trab.fer { background: #F3EBCF; }
.mes-t td.folga { background: #F4F1EA; color: var(--muted); font-weight: 600; }
.mes-t td.folga.rod { background: #E7EEF7; color: #1F4E8C; }
.mes-t td.ferias { background: #F6DCD3; color: #8E321C; font-weight: 600; }
.mes-t td.fechado { background: repeating-linear-gradient(45deg, #F1EDE3, #F1EDE3 4px, #E6E0D2 4px, #E6E0D2 8px); color: var(--muted); }
.mes-t td.tot { font-weight: 700; background: transparent; padding: 0 6px; }
.mes-t tfoot td { height: auto; font-weight: 600; color: var(--muted); }
.mes-t tfoot td.neg { color: var(--bad); }
.mes-leg { display: flex; gap: 12px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 8px; }
.mes-leg span::before { content: ''; display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; background: transparent; }
.mes-leg .l-trab::before { background: #E3EDE1; } .mes-leg .l-folga::before { background: #F4F1EA; } .mes-leg .l-rod::before { background: #E7EEF7; }
.mes-leg .l-ferias::before { background: #F6DCD3; } .mes-leg .l-fer::before { background: #F3EBCF; }
@media print {
  .imp-escala { page: escala; }
  .imp-escala .mes-t { width: 100%; border-spacing: 1.5px; font-size: 8.5pt; }
  .imp-escala .mes-t th { min-width: 0; font-size: 7pt; padding: 1px; }
  .imp-escala .mes-t th.l { min-width: 0; font-size: 9.5pt; }
  .imp-escala .mes-t td { height: auto; padding: 5px 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .imp-escala .mes-leg span::before { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .imp-escala .mes-leg { font-size: 7.5pt; color: #444; }
  .imp-escala .imp-ass { margin-top: 26px; }
}
.mes-t td.clicavel { cursor: pointer; }
.mes-t td.clicavel:hover { outline: 2px solid #C9A227; }
.mes-t td.sel { outline: 2px solid var(--dark); }
.mes-t td.aj { box-shadow: inset 0 0 0 1.5px #C9A227; }
.mes-t td.recalc { box-shadow: inset 0 0 0 1px #9DB89A; }
.aj-barra { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin: 6px 0 10px; font-size: 12.5px; }
.aj-editor { border: 1px solid #E5D6A1; background: #FFFAEB; border-radius: 10px; padding: 12px 14px; margin-bottom: 10px; display: grid; gap: 8px; font-size: 13px; }
.aj-editor[hidden], .aj-linha[hidden] { display: none; }
.aj-tit { font-weight: 700; color: var(--dark); }
.aj-tit small { font-weight: 400; color: var(--muted); }
.aj-linha { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.aj-linha .f-input { height: 36px; width: auto; min-width: 120px; }

/* ---------- escala do mês: uma semana por bloco ---------- */
.semanas { display: grid; gap: 14px; margin-top: 10px; overflow-x: auto; }
.sem-t { border-collapse: separate; border-spacing: 3px; width: 100%; min-width: 860px; font-size: 12px; font-variant-numeric: tabular-nums; table-layout: fixed; }
.sem-t th, .sem-t td { text-align: center; }
.sem-t thead th { font-size: 11px; color: var(--muted); font-weight: 600; padding: 4px 2px; vertical-align: bottom; }
.sem-t thead th span { display: block; }
.sem-t thead th b { display: block; color: var(--dark); font-size: 12px; }
.sem-t thead th small { display: block; color: #B5452B; font-weight: 500; font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sem-t thead th.dom b { color: var(--green); }
.sem-t thead th.fer b { color: #B5452B; }
.sem-t thead th.fora b, .sem-t thead th.fora span { opacity: .35; }
.sem-t th.l { text-align: left; color: var(--dark); width: 110px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sem-t th.sem-nome { font-size: 12.5px; color: var(--dark); }
.sem-t th.sem-nome small { color: var(--muted); font-weight: 400; display: block; font-size: 11px; }
.sem-t th.tot, .sem-t td.tot { width: 64px; }
.sem-t td { border-radius: 6px; padding: 5px 2px; line-height: 1.25; }
.sem-t td b { display: block; font-weight: 600; color: var(--dark); font-size: 12px; }
.sem-t td small { display: block; color: var(--muted); font-size: 10px; }
.sem-t td.trab { background: #E3EDE1; }
.sem-t td.trab.fer { background: #F3EBCF; }
.sem-t td.folga { background: #F4F1EA; color: var(--muted); font-weight: 600; }
.sem-t td.folga.rod { background: #E7EEF7; color: #1F4E8C; }
.sem-t td.ferias { background: #F6DCD3; color: #8E321C; font-weight: 600; }
.sem-t td.fechado { background: repeating-linear-gradient(45deg, #F1EDE3, #F1EDE3 4px, #E6E0D2 4px, #E6E0D2 8px); color: var(--muted); }
.sem-t td.fora { background: transparent; }
.sem-t td.tot { font-weight: 700; color: var(--dark); background: transparent; }
.sem-t td.tot.liq { color: var(--green); }
.sem-t tfoot td { font-size: 11px; color: var(--muted); font-weight: 600; padding: 2px; }
.sem-t tfoot td.neg { color: var(--bad); }
.sem-t td.clicavel { cursor: pointer; }
.sem-t td.clicavel:hover { outline: 2px solid #C9A227; }
.sem-t td.sel { outline: 2px solid var(--dark); }
.sem-t td.aj { box-shadow: inset 0 0 0 1.5px #C9A227; }
.sem-t td.recalc { box-shadow: inset 0 0 0 1px #9DB89A; }
.sem-t.resumo { min-width: 0; width: auto; table-layout: auto; }
.sem-t.resumo td, .sem-t.resumo thead th:not(.l) { width: 96px; }
.sem-t.resumo td { background: #F4F1EA; font-weight: 600; }
@media print {
  .imp-escala .semanas { gap: 8px; overflow: visible; }
  .imp-escala .sem-t { min-width: 0; font-size: 7.5pt; border-spacing: 1.5px; page-break-inside: avoid; }
  .imp-escala .sem-t th.l { width: 70px; font-size: 7.5pt; }
  .imp-escala .sem-t th.tot, .imp-escala .sem-t td.tot { width: 44px; }
  .imp-escala .sem-t td { padding: 3px 1px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .imp-escala .sem-t td b { font-size: 7.5pt; }
  .imp-escala .sem-t td small, .imp-escala .sem-t thead th small { font-size: 6pt; }
  .imp-escala .sem-t thead th { font-size: 6.5pt; padding: 2px 1px; }
  .imp-escala .sem-t thead th b { font-size: 7.5pt; }
  .imp-escala .sem-t.resumo { max-width: none; }
}
.aj-repetir { display: grid; gap: 4px; margin: 8px 0 4px; padding-top: 8px; border-top: 1px dashed var(--line, #E2DCCF); }
.aj-repetir .btn { justify-self: start; }
.cfg-prazo { font-size: 12px; }
.cfg-meses { display: flex; flex-wrap: wrap; gap: 6px; }
.cfg-meses .chip { cursor: pointer; }
#btnSistema { position: relative; }
#btnSistema[hidden] { display: none; }
#btnSistema .sis-n { position: absolute; top: 2px; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: var(--gold); color: var(--dark); font-size: 12px; font-weight: 800; line-height: 16px; text-align: center; box-shadow: 0 0 0 2px var(--dark); }
#btnSistema .sis-n[hidden] { display: none; }
#btnSistema.rodando svg { animation: pulse 1.2s ease-in-out infinite; }
.sis-pop { width: min(400px, 94vw); }
.sis-lista { list-style: none; margin: 0 0 12px; padding: 0; max-height: 260px; overflow: auto; display: grid; gap: 6px; }
.sis-lista li { display: flex; gap: 8px; justify-content: space-between; font-size: 12.5px; line-height: 1.35; background: var(--cream-2); border-radius: 8px; padding: 7px 10px; }
.sis-lista li small { color: var(--muted); flex: none; }
.sis-pop .link-btn { font-size: 12px; }
.t.tree.multi tr.lv2 td, .t.tree.multi tr.lv2 td.sticky-col { background: #FAF8F2; font-weight: 600; font-size: 13px; }
.t.tree.multi td.tree-l.n2 { font-weight: 600; }
.t.tree td.tree-l.n3 { padding-left: 82px; font-weight: 400; color: var(--ink); }
.t.tree tr.lv3 td, .t.tree tr.lv3 td.sticky-col { background: var(--cream-2); font-size: 12.5px; }
/* ---------- expandir tabela em tela cheia ---------- */
.card-head .exp-btn { margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line, #E2DCCF); background: #fff; color: var(--green); border-radius: 8px; padding: 5px 10px; font: 600 12px/1 inherit; cursor: pointer; }
.card-head .exp-btn:hover { background: var(--cream-2); }
.card-head .exp-btn span { font-size: 12px; }
@media (max-width: 640px) { .card-head .exp-btn span { display: none; } }
body.com-camada { overflow: hidden; }
.camada-cheia { position: fixed; inset: 0; z-index: 900; background: rgba(20, 35, 24, .55); display: flex; align-items: center; padding: 1.5vh 1vw; }
.camada-cheia .card.card-cheio { position: relative; flex: 1; max-height: 100%; margin: 0; display: flex; flex-direction: column; min-height: 0; padding-top: 14px; overflow: hidden auto; }
/* tabela dentro de outro bloco (não filha direta do cartão): o cartão inteiro rola */
.card-cheio > :not(.table-wrap):not(.card-head) .table-wrap { max-height: none !important; }
.card-cheio .exp-btn { display: none; }
.card-cheio .exp-fechar { position: absolute; top: 8px; right: 10px; z-index: 3; background: var(--green); color: #fff; width: 34px; height: 34px; border-radius: 50%; font-size: 16px; }
.card-cheio > .card-head { padding-right: 48px; }
.card-cheio .table-wrap { flex: 1; min-height: 0; max-height: none !important; height: auto; }
.card-cheio .table-wrap table { font-size: 12.5px; }
.card-cheio .table-wrap th, .card-cheio .table-wrap td { padding-top: 6px; padding-bottom: 6px; }
.card-cheio table.quebra-th th { white-space: normal; line-height: 1.15; vertical-align: bottom; }
.card-cheio table.quebra-th td { padding-left: 6px; padding-right: 6px; }
.mapa-como { margin-top: 10px; font-size: 13px; color: var(--ink); background: #fff; border: 1px solid var(--line, #E2DCCF); border-radius: 10px; padding: 8px 14px; }
.mapa-como summary { cursor: pointer; font-weight: 600; color: var(--green); }
.mapa-como ol { margin: 8px 0 6px 18px; padding: 0; display: grid; gap: 4px; line-height: 1.45; }
.g-kpi > .mapa-como { grid-column: 1 / -1; }
/* últimas importações: cabe na coluna (rola só a tabela, se precisar) */
.cfg-imp { max-width: 100%; }
.cfg-imp-wrap { overflow-x: auto; max-width: 100%; margin-top: 6px; border-radius: 8px; }
.cfg-imp .cfg-t { width: 100%; font-size: 12px; }
.cfg-imp .cfg-t th, .cfg-imp .cfg-t td { padding: 5px 6px; }
.cfg-imp .cfg-t td.nw { white-space: nowrap; }
.cfg-imp .cfg-t td.quebra { white-space: normal; overflow-wrap: break-word; }
.cfg-imp .cfg-t td:nth-child(2) { min-width: 90px; }
.cfg-log { margin: 6px 0; } .cfg-log summary { cursor: pointer; font-size: 12.5px; } .cfg-log .script-log { max-height: 320px; overflow: auto; white-space: pre-wrap; font-size: 12px; }
.cfg-dica-cad { margin: 6px 0 0; font-size: 12px; }
.cfg-cad-res { margin-top: 10px; background: #E9F1E6; border: 1px solid #C9DCC3; border-radius: 10px; padding: 10px 12px; font-size: 12.5px; }
.cfg-cad-res ul { margin: 6px 0 4px 18px; padding: 0; display: grid; gap: 3px; }
.cfg-senha-pend { color: #9A6B00; }
.cfg-user-form .cfg-campo > .cfg-check { justify-content: flex-start; text-align: left; margin: 2px 0; }
/* ---------- fechamento do dia ---------- */
.fech-tools { display: flex; gap: 8px; align-items: center; margin-left: auto; flex-wrap: wrap; }
.fech-tools .fech-data { width: auto; }
.fech-tabela { overflow-x: auto; }
.fech-tabela table { width: 100%; max-width: 620px; }
.fech-nota { font-size: 12px; margin-top: 8px; }
@media print { .imp-fech table { width: 100%; font-size: 11pt; } }

/* ---------- crédito ---------- */
.content > footer.credito { margin: 28px 0 6px; padding-top: 14px; border-top: 1px solid var(--line, #E2DCCF); text-align: center; font-size: 12px; color: var(--muted); }
.content > footer.credito b { color: var(--green); font-weight: 600; }
@media print {
  #impressao::after { content: 'Desenvolvido por Rodrigo Rabadan'; display: block; margin-top: 10mm; text-align: center; font-size: 8pt; color: #8a948d; }
  .content > footer.credito { display: none; }
}
@media print { .imp-fech, .imp-fech * { -webkit-print-color-adjust: exact; print-color-adjust: exact; } }
.cfg-gmail { margin: 6px 0 12px; background: var(--cream-2); border-radius: 10px; padding: 8px 12px; font-size: 13px; line-height: 1.5; }
.cfg-gmail summary { cursor: pointer; font-weight: 600; color: var(--green); }
.cfg-gmail ol { margin: 8px 0 8px 20px; padding: 0; display: grid; gap: 6px; }
.cfg-gmail ul { margin: 4px 0 0 18px; padding: 0; display: grid; gap: 3px; }
.cfg-gmail code { background: #fff; padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.fech-modal { overflow: auto !important; max-width: 900px; margin: 0 auto !important; }
.fech-modal-topo { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding-right: 48px; margin-bottom: 10px; }
.fech-modal-topo select { width: auto; }
.fech-modal .fech-card { box-shadow: none; border: 0; padding: 0; }
/* tabela estreita (ex.: Vendas por produto ao lado do gráfico): cabe sem rolar para o lado */
.t.t-compacta { width: 100%; table-layout: fixed; font-size: 12.5px; }
.t.t-compacta th, .t.t-compacta td { padding: 7px 6px; }
.t.t-compacta th:first-child, .t.t-compacta td:first-child { width: auto; white-space: normal; overflow-wrap: break-word; padding-left: 10px; }
.t.t-compacta th:nth-child(2), .t.t-compacta td:nth-child(2) { width: 13%; }
.t.t-compacta th:nth-child(3), .t.t-compacta td:nth-child(3) { width: 15%; }
.t.t-compacta th:nth-child(4), .t.t-compacta td:nth-child(4) { width: 33%; padding-right: 10px; }
.t.t-compacta th .arrow { margin-left: 2px; }
.card-cheio .t.t-compacta { table-layout: auto; font-size: 13px; }
.cfg-form input.f-input::placeholder { color: var(--muted); font-style: italic; }
.cfg-dest-lista { list-style: none; margin: 6px 0 10px; padding: 0; display: grid; gap: 6px; }
.cfg-dest-lista li { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; background: var(--cream-2); border-radius: 8px; padding: 6px 10px; font-size: 13px; }
.cupom-items tr.taxa td { color: #8a948d; font-style: italic; }
.cli-emp { background: #E7EEF7; color: #1F4E8C; border-radius: 6px; padding: 0 6px; font-size: 12px; font-weight: 600; }
/* ---------- clientes: segmentos, ficha, ações ---------- */
.cli-segs { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 2px 0 12px; }
.cli-segs .f-label { margin: 0 4px 0 0; }
.cli-segs .chip-destaque { border-color: #C9A227; font-weight: 700; }
.cli-seg-dica { flex-basis: 100%; }
.cli-tag { border-radius: 6px; padding: 0 6px; font-size: 12px; font-weight: 600; background: #EEE9DF; color: #5b4a12; }
.cli-tag.t-sumido { background: #F6DCD3; color: #8E321C; }
.cli-tag.t-repor { background: #E3EDE1; color: #2C5234; }
.cli-tag.t-aniv { background: #F3EBCF; color: #7a5a00; }
.cli-tag.t-vip, .cli-tag.t-fiel { background: #E7EEF7; color: #1F4E8C; }
.cli-tag.t-optout { background: #F6DCD3; color: #8E321C; }
.cli-tag.t-contato { background: #E9F1E6; color: #2C5234; }
.cli-tag.t-vence { background: #F3E3F2; color: #7A2D74; }
.cli-tag.t-fixe { background: #E7EEF7; color: #1F4E8C; margin-left: 6px; }
.cli-tag.t-semfixe { background: #F6DCD3; color: #8E321C; margin-left: 6px; }
.cli-tag.t-forafixe { background: #EEE9DF; color: #5b4a12; }
.cli-tag.t-fixe-ok { background: #E3EDE1; color: #2C5234; margin-left: 6px; }
.cli-pts { color: #7A2D74; font-weight: 600; }
.cupom-aviso { background: #FDF1E7; color: #8E4A1C; border: 1px solid #F1D3BB; border-radius: 8px; padding: 6px 10px; font-size: 12px; margin: 0 0 6px; }
.cupom.cupom-div { outline: 1px solid #F1D3BB; border-radius: 8px; }
.fi-largo { grid-column: 1 / -1; }
.fi-sub { margin-top: 6px; }
.fi-tit2 { font-size: 12px; font-weight: 700; color: var(--muted); margin: 2px 0; }
.fi-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 12px; }
.fi-lista li.anulado { text-decoration: line-through; color: var(--muted); }
.fi-lista strong.pos { color: #2C5234; } .fi-lista strong.neg { color: #8E321C; }
.fx-det { margin-top: 10px; font-size: 13px; }
.fx-det summary { cursor: pointer; font-weight: 600; color: var(--green, #2C5234); }
.cli-ficha { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin: 8px 0 12px; font-size: 13px; }
.fi-bloco { background: #fff; border: 1px solid var(--line, #E2DCCF); border-radius: 10px; padding: 9px 12px 6px; display: grid; gap: 1px; align-content: start; }
.fi-tit { font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--gold-dark, #9A7B12); margin-bottom: 4px; }
.fi { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 4px 0; border-bottom: 1px dashed #EEE9DF; }
.fi:last-child { border-bottom: 0; }
.fi > span { color: var(--muted); font-size: 12px; flex: none; }
.fi > b { text-align: right; font-weight: 600; color: var(--dark); overflow-wrap: anywhere; }
.fi[title] > span { text-decoration: underline dotted; cursor: help; }
.fi .wpp { font-weight: 600; margin-left: 6px; }
.cli-acoes { display: grid; gap: 8px; margin: 4px 0 12px; }
.cli-wpp { display: grid; gap: 6px; background: #F1F7EF; border-radius: 10px; padding: 9px 11px; }
.cli-wpp select { max-width: 260px; }
.cli-msg { background: #fff; border-radius: 8px; padding: 8px 10px; font-size: 13px; white-space: pre-wrap; border: 1px solid #D5E3D1; }
.cli-botoes { flex-wrap: wrap; gap: 6px; align-items: center; }
.cli-junto { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.cli-junto li { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; border-bottom: 1px dashed #EEE9DF; padding-bottom: 4px; }
.cfg-wpp { display: grid; gap: 10px; margin: 8px 0; }
.cfg-wpp-item { display: grid; gap: 5px; }
.cfg-wpp-item textarea { min-height: 64px; font: inherit; font-size: 13px; padding: 8px; resize: vertical; }
.cli-ficha em { font-style: normal; font-weight: 600; }
.g-1-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); }
@media (max-width: 1200px) { .g-1-2 { grid-template-columns: 1fr; } }
.fi-nota { font-size: 12px; color: var(--muted); line-height: 1.35; padding: 2px 0 6px; border-bottom: 1px dashed #EEE9DF; }

/* ---------- fechamento do mês para a contabilidade ---------- */
.cont-modal { max-width: 760px !important; }
.cont-form { display: grid; gap: 10px; margin-bottom: 12px; }
.cont-campo { display: grid; gap: 4px; font-size: 13px; }
.cont-campo > span { font-weight: 600; color: var(--dark); }
.cont-campo textarea { resize: vertical; font-family: inherit; line-height: 1.45; }
.cont-campo small { font-size: 12px; }
.cont-anexo { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; background: var(--cream-2); border-radius: 10px; padding: 8px 12px; font-size: 13px; }
.cont-anexo .btn { margin-left: auto; padding: 5px 10px; font-size: 12.5px; }
.cont-anexo .neg { color: var(--bad); }
.cont-previa-tit { font-size: 12px; margin: 4px 0 6px; }
.cont-previa { background: #F3F1EC; border-radius: 12px; padding: 14px 8px; }
.cont-acoes { display: flex; gap: 8px; align-items: center; justify-content: flex-end; flex-wrap: wrap; margin-top: 12px; position: sticky; bottom: -14px; background: #fff; padding: 10px 0 4px; }
.cont-status { margin-right: auto; font-size: 13px; }
.cont-status.pos { color: #1F5FBF; } .cont-status.neg { color: var(--bad); }
/* páginas do PDF montadas fora da tela (html2canvas) — mesmo visual da impressão */
.imp-render { position: fixed; left: -12000px; top: 0; width: 794px; background: #fff; font-family: Inter, Arial, sans-serif; color: #1d2b22; font-size: 14.5px; }
.imp-render .imp-pag { width: 794px; min-height: 1123px; box-sizing: border-box; padding: 53px; background: #fff; position: relative; }
.imp-render .imp-pag::after { content: 'Desenvolvido por Rodrigo Rabadan'; position: absolute; left: 0; right: 0; bottom: 26px; text-align: center; font-size: 12px; color: #8a948d; }
.imp-render .imp-cab { display: flex; justify-content: space-between; border-bottom: 2px solid #2C5234; padding-bottom: 8px; margin-bottom: 16px; font-size: 13px; }
.imp-render .imp-marca { font-size: 21px; font-weight: 700; color: #2C5234; }
.imp-render .imp-dir { text-align: right; }
.imp-render .imp-tit { font-weight: 700; font-size: 16px; }
.imp-render .imp-nome { font-size: 20px; margin: 6px 0 12px; }
.imp-render .imp-t { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.imp-render .imp-t th, .imp-render .imp-t td { padding: 6px 8px; border-bottom: 1px solid #ddd; text-align: left; }
.imp-render .imp-t th { background: #EEF3EC; font-size: 12.5px; }
.imp-render .imp-t .r { text-align: right; }
.imp-render .imp-t .b, .imp-render .imp-t tfoot td, .imp-render .imp-t tr.tot td { font-weight: 700; }
.imp-render .imp-t tr.tot td { font-size: 16.5px; border-top: 2px solid #2C5234; }
.imp-render .imp-res { width: 70%; margin-left: auto; }
.imp-render .imp-ass { display: flex; gap: 40px; margin-top: 60px; }
.imp-render .imp-ass > div { flex: 1; text-align: center; font-size: 13px; }
.imp-render .imp-ass span { display: block; border-top: 1px solid #333; margin-bottom: 4px; }
.imp-render .imp-obs { font-size: 12px; color: #666; margin-top: 10px; }
.imp-render .imp-fer { margin-top: 6px; } .imp-render .imp-sub { font-weight: 700; margin: 6px 0 4px; }

/* ---------- estoque e margem ---------- */
.est-origem { font-size: 12.5px; margin: -4px 0 12px; }
.est-leg { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 12.5px; margin-bottom: 8px; }
.est-leg i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: -1px; }
.est-leg small { flex-basis: 100%; }
.est-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-left: auto; }
.badge.warn { background: #FBF1D3; color: #735800; }
.badge.novo { background: #DCE7F5; color: #1F4E8C; }
.badge.cinza { background: #ECEAE4; color: #6B675E; }
/* Estoque: tabela única */
.est-seg-off { opacity: .45; }
@media (max-width: 600px) { #est-tabela .est-tools .seg { display: grid; grid-template-columns: 1fr 1fr; width: 100%; } #est-tabela .est-tools .seg button { white-space: nowrap; } }
.est-busca-info { display: block; margin: 6px 0 2px; }
.est-busca-info:empty { display: none; }
.est-notas-depois { margin: 8px 0; padding: 8px 12px; border-radius: 10px; background: #EAF1FB; color: #1F3F6E; font-size: 13px; line-height: 1.4; }
.est-notas-depois:empty { display: none; }
.est-entrada { display: block; margin-top: 2px; font-size: 12px; color: #1F4E8C; font-weight: 600; white-space: normal; }
.t tbody tr.est-tem-entrada td, .t tbody tr.est-tem-entrada:nth-child(even) td { background: #F1F6FD; }
.t.t-mob tr.est-tem-entrada, .t.t-mob tbody tr.est-tem-entrada:nth-child(even) { background: #F1F6FD; }
.t.t-mob tr.est-tem-entrada td { background: transparent; }
.est-sem, .est-cfg { margin-top: 14px; }
.est-sem summary, .est-cfg summary { cursor: pointer; font-weight: 600; color: var(--green); }
.est-cfg-g { display: flex; flex-wrap: wrap; gap: 14px 24px; margin-top: 12px; }
.est-cfg-g label, .est-emb label { display: grid; gap: 4px; font-size: 13px; }
.est-cfg-g label > span, .est-emb label > span { font-weight: 600; }
.est-cfg-g label > div { display: flex; align-items: center; gap: 6px; }
.est-emb { display: grid; gap: 10px; margin-top: 6px; }
.est-emb label { grid-template-columns: 60px minmax(160px, 260px) 1fr; align-items: center; }
@media (max-width: 640px) { .est-emb label { grid-template-columns: 1fr; } }
.t.est-t { width: 100%; font-size: 12.5px; }
.t.est-t th, .t.est-t td { padding: 7px 8px; }
.t.est-t td.wrap { min-width: 210px; white-space: normal; }
.t.est-t td:not(.l) { white-space: nowrap; }
/* Estoque (revisão de 22/11): sem rolagem para o lado — o cabeçalho quebra a linha e o nome tem largura contida */
#est-tabela .t.est-t th { white-space: normal; vertical-align: bottom; max-width: 104px; }
#est-tabela .t.est-t td.wrap { min-width: 160px; max-width: 220px; }
#est-tabela .t.est-t td .est-tam { white-space: normal; max-width: 112px; margin-left: auto; }
#est-tabela .t.est-t td.l .est-tam { margin-left: 0; }
#est-tabela .t.est-t td .badge { white-space: normal; display: inline-block; max-width: 128px; text-align: left; }
.est-tam { display: block; color: var(--muted); font-size: 12px; }

.est-classes { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 8px; margin: 10px 0 8px; }
.est-classe { display: flex; flex-direction: column; justify-content: flex-start; text-align: left; border: 1px solid var(--line, #E2DCCF); background: #fff; border-radius: 10px; padding: 8px 10px; cursor: pointer; font: inherit; color: var(--ink, #1F3D2B); transition: opacity .15s, box-shadow .15s; }
.est-classe:hover { border-color: var(--cor); }
.est-classe.on { background: color-mix(in srgb, var(--cor) 10%, #fff); box-shadow: 0 0 0 2px var(--cor) inset; }
.est-classe.off { opacity: .45; }
.est-classe-tit { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.est-classe-tit i { width: 10px; height: 10px; border-radius: 50%; background: var(--cor); }
.est-classe-tit em { margin-left: auto; font-style: normal; font-weight: 700; color: var(--cor); }
.est-classe-txt { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; line-height: 1.35; }
.est-filtro { font-size: 12.5px; margin: 2px 0 6px; }
.est-tag { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: 12px; font-weight: 700; color: var(--cor); background: color-mix(in srgb, var(--cor) 12%, #fff); }
.est-dica { cursor: help; text-decoration: underline dotted; text-underline-offset: 3px; }
.t.est-t .badge[title] { cursor: help; }
.est-sug { cursor: help; padding: 1px 6px; border-radius: 6px; font-weight: 600; }
.est-sug-ok { color: #1F5FBF; }
.est-sug-baixo { color: #96381F; background: #F6DCD3; }
.est-sug-alto { color: #735800; background: #FBF1D3; }
.est-sug-sem { color: var(--muted); border: 1px dashed #C9C2B2; }
.est-prev { cursor: help; white-space: nowrap; }
.est-prev small { font-size: 12px; font-weight: 700; }
.est-prev.sobe small { color: #1F5FBF; }
.est-prev.desce small { color: #B5452B; }
.est-saz-res { font-size: 13px; margin: 2px 0 8px; }
.est-saz-g { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 14px; margin-top: 12px; }
.est-saz-l { margin: 6px 0 0 18px; padding: 0; display: grid; gap: 4px; font-size: 13px; }
.promo-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-top: 10px; }
.promo-col { border: 1px solid var(--line, #E2DCCF); border-radius: 12px; padding: 10px 12px; font-size: 13px; display: grid; gap: 3px; }
.promo-col.on { border-color: #C9A227; background: #FFFCF2; }
.promo-col-t { font-weight: 700; color: var(--green); display: flex; justify-content: space-between; }
.promo-col-t small { font-weight: 400; color: var(--muted); }
.promo-lucro { font-size: 20px; font-weight: 700; color: var(--dark); }
.promo-lucro small { font-size: 12px; font-weight: 400; color: var(--muted); }
.notice.ok-n { background: #E3EDF9; border-color: #B9CFEC; color: #1F3D6B; }
.est-kit-desc { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-left: auto; }
.est-kit-dica { font-size: 12.5px; margin-top: 8px; }

/* situação dos dados da loja */
.cfg-sit { display: grid; gap: 10px; margin: 6px 0 12px; }
.cfg-sit-l { display: grid; grid-template-columns: 26px 1fr; gap: 8px; align-items: start; }
.cfg-sit-ic { width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; }
.cfg-sit-ic.ok { background: #DDEBDD; color: #22603A; }
.cfg-sit-ic.erro { background: #F6DCD3; color: #8E321C; }
.cfg-sit-ic.rodando { background: #DCE7F5; color: #1F4E8C; }
.cfg-sit-ic.nada { background: #ECE7DB; color: #7A857D; }
.cfg-sit-t { font-size: 14px; line-height: 1.35; }
.cfg-sit-d { font-size: 12.5px; color: var(--muted); line-height: 1.4; margin-top: 2px; }
.cfg-lote.erro { border-left: 3px solid #B5452B; padding-left: 10px; }
.log-motivo { background: #F6DCD3; color: #6E2614; border-radius: 8px; padding: 8px 10px; font-size: 13px; margin: 6px 0; line-height: 1.4; }
.log-bonito .ll { white-space: pre-wrap; }
.log-bonito .ll.e { color: #FFB4A0; }
.log-bonito .ll.p { color: #F2D27A; font-weight: 700; margin-top: 4px; }
.log-bonito .ll.k { color: #A9D9A9; }
.cfg-ao-vivo { display: inline-flex; align-items: baseline; gap: 6px; color: var(--ink, #1F3D2B); font-family: ui-monospace, Menlo, monospace; font-size: 12px; }
.cfg-pulso { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #1F5FBF; animation: pulso 1.4s infinite; flex: none; transform: translateY(-1px); }
@keyframes pulso { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
.cfg-travado { display: block; color: #8A6A00; background: #FBF1D3; border-radius: 6px; padding: 5px 8px; margin-top: 3px; }

/* atualizações do painel: painel fixo (folha de baixo no celular) */
.sis-pop { position: fixed; top: 64px; right: 16px; left: auto; width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 88px); display: flex; flex-direction: column; padding: 0; overflow: hidden; }
.sis-topo { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 8px; border-bottom: 1px solid #EEE9DF; }
.sis-topo h3 { margin: 0; }
.sis-x { border: 0; background: transparent; font-size: 16px; color: var(--muted); cursor: pointer; padding: 4px 6px; }
.sis-corpo { padding: 12px 16px; overflow: auto; flex: 1; }
.sis-sec { font-size: 12px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--green); margin: 4px 0 6px; }
.sis-lista { max-height: none; overflow: visible; }
.sis-lista li { display: block; cursor: default; }
.sis-lista li.tem-det { cursor: pointer; }
.sis-l1 { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.sis-l1 b { font-size: 13px; color: var(--dark); }
.sis-det { font-size: 12px; color: var(--muted); margin-top: 3px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sis-lista li.aberto .sis-det { -webkit-line-clamp: unset; display: block; }
.sis-rec li { background: #fff; border: 1px solid #EEE9DF; }
.sis-acao { position: sticky; bottom: -12px; background: #fff; padding: 8px 0 4px; }
.sis-rodape { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 10px; font-size: 12px; color: var(--muted); padding: 8px 16px 12px; border-top: 1px solid #EEE9DF; }
@media (max-width: 640px) {
  .sis-pop { left: 8px; right: 8px; width: auto; top: auto; bottom: 8px; max-height: 82vh; border-radius: 16px; }
}

.cfg-sub { font-size: 13px; margin: 14px 0 6px; color: var(--green, #2C5234); }

/* fidelidade (FIXE) */
.fx-card { margin-bottom: 16px; }
.fx-grupo { margin-top: 12px; }
.fx-grupo-tit { font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.fx-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.cli-alcance { margin: -4px 0 10px; font-size: 12.5px; }
.heroi + .cli-alcance { margin: 8px 0 4px; }
.cli-saude { display: grid; }
.cli-saude-l { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 12px; padding: 8px 0; border-top: 1px solid var(--line); font-size: 14px; }
.cli-saude-l:first-child { border-top: 0; padding-top: 0; }
.cli-saude-l .link-btn { font-size: 13px; color: var(--green); font-weight: 600; min-height: 24px; }
.fx-stat { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 10px; background: var(--cream-2, #F6F2EA); border-left: 0; }
.fx-stat > span { font-size: 12px; color: var(--muted); }
.fx-stat > b { font-size: 24px; line-height: 1.15; color: var(--green, #2C5234); }
.fx-stat > small { font-size: 12px; color: var(--muted); line-height: 1.3; }
.fx-stat.ok { border-left: 4px solid var(--green); }
.fx-stat.alerta { border-left: 4px solid var(--bad); }
.fx-stat.alerta > b { color: var(--bad); }
.fx-dets { margin-top: 14px; border-top: 1px solid var(--line, #E2DCCF); padding-top: 4px; }
.fx-dets .fx-det { margin-top: 8px; }
.fx-det .table-wrap tbody tr { cursor: pointer; }
.cpf-link { background: none; border: 0; padding: 0; font: inherit; color: #1F4E8C; text-decoration: underline; text-underline-offset: 2px; cursor: pointer; }
.cpf-link:hover { color: #2C5234; }
.cupom.cupom-destaque { outline: 2px solid #C9A227; border-radius: 8px; }
.cli-janela { max-width: 980px !important; }
.cli-janela.dupla { max-width: 1400px !important; }
.cli-janela-cols { display: grid; gap: 18px; grid-template-columns: 1fr; }
.cli-janela.dupla .cli-janela-cols { grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .cli-janela.dupla .cli-janela-cols { grid-template-columns: 1fr; } }
.cli-janela-col { min-width: 0; }
.cli-janela-rot { display: inline-block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: #fff; background: var(--green, #2C5234); border-radius: 6px; padding: 2px 8px; margin-bottom: 6px; }
.cli-janela-cab { padding: 8px 0 10px; border-bottom: 1px solid var(--line, #E2DCCF); margin-bottom: 10px; }
.cli-janela-cab .cli-meta { margin-top: 4px; }
.fx-soltas-tit { margin: 14px 0 6px; }
.cupom.cupom-fixe .cupom-head { background: #EEF2F6; }
.cupom-rodape { font-size: 12px; color: var(--muted); padding: 6px 10px 8px; border-top: 1px dashed #E2DCCF; }
.est-tools .est-busca { width: 300px; max-width: 100%; }
.est-minres { display: block; margin: 0 0 6px; }
.script-itens { margin: 4px 0 8px; padding-left: 18px; font-size: 13px; line-height: 1.5; }
.script-escolha { display: grid; gap: 6px; margin: 4px 0 10px; }
.script-op { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border: 1px solid var(--line, #E2DCCF); border-radius: 10px; cursor: pointer; background: #fff; }
.script-op input { margin-top: 3px; accent-color: #2C5234; width: 16px; height: 16px; flex: none; }
.script-op span { display: flex; flex-direction: column; font-size: 13px; line-height: 1.3; }
.script-op small { color: var(--muted); font-size: 12px; }
.tree-var { line-height: 1.2; }
.tree-var .tree-ant { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.est-conta { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; border-bottom: 1px dashed currentColor; }
.est-conta:hover { color: #1F4E8C; }
.est-conta.neg { color: #8E321C; }
.est-kpi-click { cursor: pointer; }
.est-kpi-click:hover, .est-kpi-click:focus-visible { box-shadow: 0 0 0 2px var(--gold) inset; outline: none; }
.est-pop { position: fixed; z-index: 950; background: #fff; border: 1px solid var(--line, #E2DCCF); border-radius: 12px; box-shadow: 0 10px 30px rgba(20, 35, 24, .18); padding: 12px 14px; width: 340px; max-width: calc(100vw - 16px); font-size: 13px; }
.est-pop-tit { font-weight: 700; color: var(--green, #2C5234); margin-bottom: 8px; }
.est-pop table { width: 100%; border-collapse: collapse; }
.est-pop td { padding: 4px 0; border-bottom: 1px dashed #EEE9DF; }
.est-pop td.pct { text-align: right; color: var(--muted); font-size: 12px; padding-right: 10px; white-space: nowrap; }
.est-pop td.v { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.est-pop tr.sub td { font-weight: 600; }
.est-pop tr.tot td { font-weight: 700; border-bottom: 0; border-top: 2px solid var(--green, #2C5234); color: var(--green, #2C5234); }
.est-pop-nota { margin-top: 8px; font-size: 12px; color: var(--muted); line-height: 1.4; }
/* ajustes de estoque dentro de Configurações (coluna estreita) */
.cfg-bloco .est-cfg-g { margin-top: 6px; gap: 10px 18px; }
.cfg-bloco .est-cfg-g label > div { white-space: nowrap; }
.cfg-bloco .est-emb label { grid-template-columns: 52px 1fr; gap: 2px 8px; }
.cfg-bloco .est-emb label small { grid-column: 2; font-size: 12px; line-height: 1.3; }
.cfg-bloco .f-label { margin-top: 12px; }
.est-outros { display: grid; gap: 6px; margin-top: 6px; }
.est-outro { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 8px; border: 1px solid var(--line, #E2DCCF); border-radius: 10px; background: #fff; }
.est-outro-rem { grid-column: 1 / -1; justify-self: end; background: none; border: 0; padding: 2px 4px; font: inherit; font-size: 12px; color: #8E321C; cursor: pointer; }
.est-outro-rem:hover { text-decoration: underline; }
.est-pop tr.com-dica td:first-child { cursor: help; }
.est-pop-dicas { margin-top: 8px; padding: 8px 10px; background: var(--cream-2, #F6F2EA); border-radius: 8px; font-size: 12px; line-height: 1.45; color: #3D4A42; }
.est-pop-dicas p { margin: 0 0 6px; } .est-pop-dicas p:last-child { margin: 0; }
.est-sujo { color: #8E4A1C; font-weight: 600; }
.est-prod-btn { display: flex; gap: 6px; align-items: flex-start; background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.est-prod-nome { color: #1F4E8C; font-weight: 600; text-decoration: underline; text-decoration-style: dotted; text-underline-offset: 3px; }
.est-prod-btn:hover .est-prod-nome { text-decoration-style: solid; }
.est-seta { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; flex: none; border-radius: 5px; background: #E7EEF7; color: #1F4E8C; font-size: 12px; transition: transform .15s; margin-top: 1px; }
tr.est-aberto .est-seta { transform: rotate(90deg); background: #1F4E8C; color: #fff; }
.est-ver { color: #1F4E8C; }
tr.est-det > td { padding: 0 !important; background: #FBF9F4 !important; }
.est-det-box { position: sticky; left: 0; padding: 10px 12px 12px; box-sizing: border-box; white-space: normal; }
.est-det-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.est-det-grid .cupom { margin-top: 0; background: #fff; }
.est-det-grid .cupom-items td:last-child { display: table-cell; }
.est-det-pct { color: var(--muted); width: 52px; }
.est-det-sub td { font-weight: 600; }
.est-det-tot td { font-weight: 700; color: var(--green, #2C5234); border-top: 2px solid var(--green, #2C5234) !important; }
.est-det-tot.neg td { color: #8E321C; }
.est-det-total .cupom-head { background: #E9F1E6; }
.est-det-nota { margin-top: 8px; font-size: 12px; color: var(--muted); line-height: 1.4; }
.est-pop.est-pop-tam { width: 640px; }
.est-pop-scroll { overflow-x: auto; }
.est-pop-tam th { font-size: 12px; font-weight: 600; color: var(--muted); text-align: right; padding: 0 0 6px 8px; white-space: nowrap; border-bottom: 1px solid var(--line, #E2DCCF); }
.est-pop-tam th:first-child { text-align: left; padding-left: 0; }
.est-pop-tam td { white-space: nowrap; padding: 6px 0 6px 8px; }
.est-pop-tam td:first-child { padding-left: 0; }
.est-pop-tam td small { color: var(--muted); font-size: 12px; }
.est-pop-tam td.neg { color: #8E321C; }
.est-det-grid .cupom-items td { text-align: right; padding: 5px 10px; white-space: nowrap; }
.est-det-grid .cupom-items td:first-child { text-align: left; }
.est-det-grid .cupom-rodape { text-align: left; }
/* ponto de equilíbrio */
.est-eq-barra { position: relative; height: 12px; background: #EEE9DF; border-radius: 6px; margin: 14px 0 6px; overflow: visible; }
.est-eq-barra i { position: absolute; left: 0; top: 0; bottom: 0; background: linear-gradient(90deg, #C9A227, #2C5234); border-radius: 6px; }
.est-eq-barra em { position: absolute; top: -4px; bottom: -4px; width: 2px; background: #8E321C; }
/* simulador nos cartões por pacote */
.est-sim { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 6px 10px; border-top: 1px dashed #E2DCCF; font-size: 12px; }
.est-sim label { display: flex; align-items: center; gap: 4px; }
.est-sim-in { width: 90px; padding: 4px 6px; font-size: 12px; }
.est-sim-alvo { background: none; border: 0; padding: 0; font: inherit; font-size: 12px; color: #1F4E8C; text-decoration: underline; cursor: pointer; }
.cupom.est-simulando { outline: 2px solid #C9A227; }
.cupom.est-melhor { border-color: #2C5234; }
.est-det-1 { grid-template-columns: minmax(280px, 560px); }
.est-conta-sub { display: block; font-size: 12px; color: var(--muted); font-weight: 400; white-space: normal; }
.est-conta-card .cupom-items td:first-child { white-space: normal; }
.est-pop.est-pop-card { width: min(980px, calc(100vw - 16px)); padding: 12px; background: #FBF9F4; box-shadow: 0 10px 30px rgba(20, 35, 24, .22); border-radius: 12px; max-height: calc(100vh - 16px); overflow: auto; }
.est-pop-card .cupom { margin: 0; background: #fff; }
.est-pop-card .cupom-items td { text-align: right; padding: 5px 10px; }
.est-pop-card .cupom-items td:first-child { text-align: left; }
.est-eq-barra u { position: absolute; top: -4px; bottom: -4px; width: 0; border-left: 2px dashed #1F4E8C; }
.est-eq-leg { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.est-eq-leg i { display: inline-block; width: 12px; height: 8px; margin-right: 4px; vertical-align: middle; }
.est-eq-leg .l-v { background: linear-gradient(90deg, #C9A227, #2C5234); border-radius: 3px; }
.est-eq-leg .l-e { width: 2px; background: #8E321C; }
.est-eq-leg .l-p { width: 0; border-left: 2px dashed #1F4E8C; }
.est-det-grid .cupom-items tr[title] td:first-child { cursor: help; }
.est-det-nota { text-align: left; }
.est-det-con td { color: #1F4E8C; background: #F1F5FA; }
.est-det-con.neg td { color: #8E321C; }
.est-liq-neg { color: #8E4A1C; }
.est-det-aviso { background: #EEF4EC; border: 1px solid #CFE0CA; color: #2C5234; border-radius: 8px; padding: 8px 12px; font-size: 12.5px; margin-bottom: 10px; }
.est-det-grid { grid-template-columns: repeat(auto-fill, minmax(275px, 1fr)); }
.est-det-grid .cupom-items td:first-child { white-space: normal; }
.est-det-grid .cupom-items td { padding: 5px 8px; }
.est-det-grid .cupom-head { flex-wrap: nowrap; }
.est-det-grid .cupom-head > span:last-child { white-space: nowrap; color: var(--muted); font-size: 12px; }
/* resultado do mês (DRE) */
.dre-topo { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; margin-bottom: 10px; font-size: 13px; }
.dre-topo label { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.dre-t td, .dre-t th { white-space: nowrap; }
.dre-t tr[title] td:first-child { cursor: help; }
.dre-t tr.dre-base td { font-weight: 700; }
.dre-t tr.dre-menos td:first-child { padding-left: 18px; color: #3D4A42; }
.dre-t tr.dre-sub td { font-weight: 700; background: #F1F5FA !important; color: #1F4E8C; }
.dre-t tr.dre-tot td { font-weight: 800; background: #E9F1E6 !important; color: #2C5234; border-top: 2px solid #2C5234; }
.dre-t tr.dre-tot td.neg, .dre-t td.neg { color: #8E321C; }
.dre-t tr.dre-info td { color: var(--muted); font-size: 12px; }
.dre-memo { font-size: 12px; margin-top: 8px; }

/* ---------- Pedido ---------- */
.ped-ctl { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 28px; }
.ped-ctl-l { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.ped-ctl-g { margin-top: 0; }
.ped-ctl .cfg-acoes { margin: 0; }
.ped-mix { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px 24px; }
.ped-mix-t { font-weight: 600; font-size: 13px; margin-bottom: 6px; }
.ped-mix-b { position: relative; height: 18px; background: #F3EFE6; border-radius: 6px; overflow: hidden; }
.ped-mix-b span { position: absolute; left: 0; border-radius: 6px; }
.ped-mix-alvo { top: 0; bottom: 0; background: #D9D2C2; }
.ped-mix-ped { top: 5px; height: 8px; background: var(--green); }
.ped-mix-n { font-size: 12px; color: var(--muted); margin-top: 4px; }
.ped-q-w { display: inline-flex; align-items: center; gap: 4px; }
.ped-q-w small { color: var(--muted); }
.ped-q { width: 86px; padding: 4px 6px; text-align: right; }
.ped-t td { vertical-align: middle; }
.warn-t { color: #9A5A14; }
.ped-log { background: #F6F3EC; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; font-size: 12px; white-space: pre-wrap; max-height: 260px; overflow: auto; }
.ped-ult { margin-top: 8px; font-size: 12.5px; }
.spinner.sm { display: inline-block; width: 14px; height: 14px; border-width: 2px; margin: 0 4px -2px 0; vertical-align: middle; }
.ped-evs-card { margin-top: 12px; }
.ped-evs-card summary { cursor: pointer; font-weight: 600; }
.ped-evs { display: grid; gap: 8px; margin: 8px 0; }
.ped-ev { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ped-ev > .f-input { max-width: 220px; }
.ped-ev-c { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; }
/* submenu (menu Estoque: Estoque e margem · Pedido) */
.submenu { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: -4px 0 16px; overflow-x: auto; }
.submenu a { padding: 8px 14px; font-size: 14px; font-weight: 600; color: var(--muted); text-decoration: none; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.submenu a:hover { color: var(--green); }
.submenu a.on { color: var(--green); border-bottom-color: var(--gold, #C9A227); }
.ped-prog { margin-top: 10px; display: block; }
.ped-prog small { display: block; margin-top: 6px; opacity: .85; }
.ped-prog-b { height: 8px; background: rgba(0,0,0,.08); border-radius: 4px; margin-top: 8px; overflow: hidden; }
.ped-prog-b span { display: block; height: 100%; background: var(--green); border-radius: 4px; transition: width .4s; }
.ped-passos { margin: 4px 0 12px 18px; padding: 0; font-size: 13.5px; line-height: 1.55; }
.ped-passos li { margin: 3px 0; }
.ped-fav { display: inline-block; background: var(--green); color: #fff !important; text-decoration: none; border-radius: 8px; padding: 2px 10px; font-weight: 600; cursor: grab; }
.ped-menu { position: relative; display: inline-block; }
.ped-menu > summary { list-style: none; cursor: pointer; }
.ped-menu > summary::-webkit-details-marker { display: none; }
.ped-menu-l { position: absolute; right: 0; top: calc(100% + 6px); z-index: 50; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.14); padding: 6px; min-width: 250px; display: grid; gap: 2px; }
.ped-menu-l button { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; border: 0; background: transparent; text-align: left; padding: 8px 10px; border-radius: 8px; font: 600 13px/1.2 inherit; color: var(--ink); cursor: pointer; }
.ped-menu-l button:hover:not([disabled]) { background: var(--cream-2, #F6F3EC); }
.ped-menu-l button[disabled] { opacity: .45; cursor: default; }
.ped-menu-l button small { font-weight: 400; color: var(--muted); white-space: nowrap; }
.ped-menu-l .ped-menu-volta { border-top: 1px solid var(--line); border-radius: 0 0 8px 8px; margin-top: 4px; padding-top: 10px; color: var(--green); }
.ped-ab { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--line); background: #fff; font-size: 16px; line-height: 1; cursor: pointer; flex: none; margin-left: 2px; }
.ped-ab.poe { background: var(--green); border-color: var(--green); color: #fff; }
.ped-ab.tira { color: #9A3420; }
.ped-ab.tira:hover { background: #F8E1DB; }
.ped-cl { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.ped-cl-estrela { background: #E3EDF9; color: #1F5FBF; }
.ped-cl-volume { background: #F6EBC4; color: #7A5E0E; }
.ped-cl-joia { background: #E3EFE3; color: #2C5234; }
.ped-cl-peso { background: #F8E1DB; color: #B5452B; }
.ped-fxs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 10px; }
.ped-fx { width: auto; max-width: 260px; padding: 6px 10px; font-size: 13px; }
.ped-fx.on { border-color: var(--green); background: #EAF2EA; font-weight: 600; }
.ped-fx-limpa { padding: 5px 10px; font-size: 12.5px; }
.ped-fx-n { font-size: 12.5px; margin-left: 4px; }
.ped-t tr.ped-sai td { opacity: .25; transition: opacity .25s; }
.ped-mult { display: inline-block; font-size: 12px; font-weight: 700; color: #7A5E0E; background: #F6EBC4; border-radius: 6px; padding: 2px 6px; cursor: help; white-space: nowrap; }
.ped-cat { flex-basis: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-top: -4px; }
.ped-cat-info { font-size: 12.5px; color: var(--muted); }
.ped-cat-info b { color: var(--ink); }
.ped-cat-log { display: inline-block; margin-left: 6px; }
.ped-cat-st { flex-basis: 100%; }
.ped-cat-st .ped-prog { margin-top: 4px; }
.ped-i { margin-left: 4px; font-weight: 400; color: var(--muted); cursor: help; }
.ped-nota { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.f-input.ped-auto { color: var(--green); font-weight: 600; background: #EEF4EE; }
.ped-menu-l .ped-menu-completa { color: var(--green); border-bottom: 1px solid var(--line); border-radius: 8px 8px 0 0; margin-bottom: 4px; padding-bottom: 10px; }
.ped-t tfoot td { font-weight: 700; background: #F3EFE6; }
/* Estoque e margem (Configurações): ocupa a largura toda; outros custos em tabela por categoria */
.cfg-bloco-largo { grid-column: 1 / -1; }
.est-cat-t { font-size: 13px; }
.est-cat-t th { background: var(--cream-2, #F3EFE6); color: var(--muted); font-weight: 600; font-size: 12px; }
.est-cat-t td { padding: 4px 6px; vertical-align: middle; }
.est-cat-t .f-input { height: 32px; padding: 4px 8px; font-size: 13px; min-width: 0; }
.est-cat-t td:nth-child(1) .f-input { min-width: 170px; }
.est-cat-t td:nth-child(3) .f-input { width: 110px; }
.est-cat-t tr.est-cat-cab td { background: #EEF4EE; padding: 6px 8px; border-top: 2px solid var(--line); }
.est-cat-l { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.est-cat-l .est-cat-nome { width: 200px; font-weight: 700; color: var(--green); background: transparent; border-color: transparent; }
.est-cat-l .est-cat-nome:hover, .est-cat-l .est-cat-nome:focus { background: #fff; border-color: var(--line); }
.est-cat-tot { font-weight: 600; color: var(--ink); font-size: 12.5px; }
.est-cat-add { padding: 3px 10px; font-size: 12px; margin-left: auto; }
.est-cat-vazia td { font-size: 12px; padding: 6px 10px !important; }
.est-cat-t tfoot td { padding: 8px; background: #F6F3EC; }
.dre-t tr.dre-grupo td:first-child { padding-left: 18px; color: #3D4A42; font-weight: 600; }
.dre-t tr.dre-grupo { cursor: pointer; }
/* valor real do custo fixo no mês (DRE-MES): célula clicável, ✎ quando lançado; nome abre o histórico */
.dre-t td.dre-edit { cursor: pointer; }
.dre-t td.dre-edit:hover, .dre-t td.dre-edit:focus-visible { text-decoration: underline dotted; text-underline-offset: 3px; }
.dre-t td.dre-lanc { font-weight: 600; }
.dre-lanc-ico { color: var(--gold-t); }
.dre-fixo-nome { cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px; }
.dre-fixo-jan { max-width: 460px; width: calc(100vw - 32px); max-height: calc(100vh - 32px); overflow-y: auto; }
.dre-fixo-jan h3 { display: flex; align-items: center; gap: 6px; overflow-wrap: anywhere; }
.dre-hist-tit { margin-top: 14px; display: flex; align-items: center; gap: 6px; }
.dre-hist { width: 100%; }
.dre-hist td, .dre-hist th { white-space: nowrap; }
.dre-hist tr.dre-hist-sel td { background: var(--gold-l); font-weight: 600; }
.dre-hist tfoot td { border-top: 2px solid var(--line); }
.dre-t tr.dre-grupo:hover td { background: #F6F3EC; }
.dre-t tr.dre-filho td { font-size: 12px; color: var(--muted); }
.dre-t tr.dre-filho td:first-child { padding-left: 40px; }
.dre-seta { color: var(--muted); font-size: 12px; }
.cupom-items tr.est-det-filho td:first-child { padding-left: 14px; color: var(--muted); }
.cupom-items tr.est-det-filho td { font-size: 12px; }
/* Configurações → loja: seções em abas */
.cfg-loja-nav { padding: 6px 18px 0; border-top: 1px solid var(--line); }
.cfg-sub { margin: 0; border-bottom: 0; }
.cfg-sub-d { font-size: 12.5px; padding: 8px 2px 10px; }
.est-pont-anual { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; font-size: 12.5px; }
.est-cat-t input[type=month] { width: 150px; }
.dre-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 13px; font-weight: 600; }
.cfg-destaque { background: #F6EBC4; border-radius: 6px; transition: background .6s; padding: 2px 6px; }
/* popup "Custos da loja" (mesmo visual do Expandir) */
.camada-custos { justify-content: center; }
.camada-cheia .card.cfg-popup { max-width: 1180px; margin: 0 auto; padding: 18px 22px; overflow-y: auto; display: block; }
.cfg-popup > .card-head { padding-right: 48px; margin-bottom: 8px; }
.t.tree tr.lv0 td.tree-var.pos { color: var(--good); }
.t.tree tr.lv0 td.tree-var.neg { color: var(--bad); }
.t.tree tr.lv0 td.tree-var .tree-ant { font-weight: 400; }
.cfg-loja-info .cfg-per { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; color: var(--ink); }
.cfg-loja-info .cfg-per b { font-weight: 600; color: var(--muted); }
.cfg-per-p { width: 7px; height: 7px; border-radius: 50%; display: inline-block; background: #BBB; }
.cfg-per-p.ok { background: #2C8A4B; }
.cfg-per-p.atr { background: #D9A21B; }
.cfg-per-p.nada { background: #C9C2B4; }
/* ---------- Preços ---------- */
.prc-t td { vertical-align: middle; }
.prc-nome { font-weight: 600; color: var(--ink); text-decoration: none; }
.prc-nome:hover { color: var(--green); text-decoration: underline; }
.prc-v { display: inline-flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-end; gap: 2px 6px; }
.prc-v s { font-size: 12px; }
.prc-v small { flex-basis: 100%; text-align: right; font-size: 12px; }
.prc-badge { font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 999px; background: #EEE; color: #555; white-space: nowrap; }
.prc-badge.prc-ruim { background: #F8E1DB; color: #A8401F; }
.prc-badge.prc-bom { background: #E3EFE3; color: #22603A; }
.prc-st { font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.prc-st-a { background: #F6EBC4; color: #7A5E0E; }
.prc-st-c { background: #F8E8DB; color: #9A5A14; }
.prc-st-v { background: #E3EDF9; color: #1F5FBF; }
.prc-st-n { background: #F0EDE6; color: #8A857A; }
.prc-ver { padding: 4px 10px; font-size: 12px; }
.prc-drawer-camada { position: fixed; inset: 0; z-index: 900; background: rgba(20, 30, 24, .35); display: flex; justify-content: flex-end; }
.prc-drawer { position: relative; width: min(560px, 100%); height: 100%; margin: 0; border-radius: 16px 0 0 16px; overflow-y: auto; padding: 20px 22px 30px; animation: prc-entra .18s ease-out; }
@keyframes prc-entra { from { transform: translateX(40px); opacity: .4; } to { transform: none; opacity: 1; } }
.prc-drawer .card-title { padding-right: 44px; font-size: 18px; }
.prc-resumo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.prc-resumo div { background: #F6F3EC; border-radius: 10px; padding: 10px 12px; }
.prc-resumo small { display: block; color: var(--muted); font-size: 12px; }
.prc-resumo b { font-size: 18px; color: var(--green); }
.prc-graf { height: 240px; position: relative; }
.prc-nota { font-size: 12px; margin-top: 4px; }
.prc-sim { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.prc-sim-o { margin: 6px 0 2px; font-size: 13px; }
.prc-tl { list-style: none; margin: 6px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); }
.prc-tl-i { position: relative; padding: 0 0 14px 12px; }
.prc-tl-i::before { content: ''; position: absolute; left: -21px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: var(--gold, #C9A227); border: 2px solid #fff; }
.prc-tl-d { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.prc-tl-l { font-size: 13px; }
.prc-tl-m, .prc-tl-o { font-size: 12px; }
@media (max-width: 600px) { .prc-drawer { border-radius: 0; } }
.prc-drawer > .exp-fechar { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: #fff; border: 0; font-size: 16px; cursor: pointer; opacity: 1; }

/* Preços: composição do custo no painel lateral */
.prc-comp-w { overflow-x: auto; margin-top: 6px; border: 1px solid var(--line); border-radius: 10px; }
.prc-comp { width: 100%; border-collapse: collapse; font-size: 13px; }
.prc-comp th { background: #F6F3EC; color: var(--muted); font-weight: 600; font-size: 12px; padding: 7px 8px; text-align: right; white-space: nowrap; }
.prc-comp td { padding: 7px 8px; text-align: right; border-top: 1px solid var(--line); vertical-align: top; }
.prc-comp .l { text-align: left; }
.prc-comp td small { display: block; font-size: 12px; }
.prc-comp tfoot td { background: #FBFAF6; }
.prc-aa { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 1px; white-space: nowrap; }
.prc-aa s { font-size: 12px; }
.prc-comp td.l { min-width: 140px; }
.prc-comp td.l > div { font-weight: 600; }
@media (max-width: 600px) { .prc-comp th:nth-child(4), .prc-comp td:nth-child(4) { display: none; } .prc-comp td, .prc-comp th { padding: 6px 5px; } .prc-comp td.l { min-width: 110px; } }

/* Clientes: resgate de pontos */
.rs-topo { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
.rs-num { display: flex; flex-direction: column; align-items: center; min-width: 96px; padding: 10px 12px; border-radius: 12px; background: #EEF3EC; }
.rs-num b { font-size: 30px; color: var(--green); line-height: 1.1; }
.rs-num span { font-size: 12px; color: var(--muted); }
.rs-topo p { margin: 0; }
.rs-aviso { margin: 4px 0 8px; font-size: 12.5px; }
.fx-stat small + small { margin-top: 2px; }

/* ⓘ explicação dos cartões */
.dica-i { display: inline-flex; align-items: center; justify-content: center; width: 16px; height: 16px; margin-left: 6px; padding: 0; border-radius: 50%; border: 1px solid currentColor; background: transparent; color: var(--muted); font: italic 700 10.5px/1 Georgia, serif; cursor: help; vertical-align: 2px; opacity: .9; flex: none; position: relative; }
/* área de toque do ⓘ: o desenho continua com 16 px, o dedo acerta em 28 px (mínimo recomendado: 24 px) */
.dica-i::after { content: ''; position: absolute; inset: -6px; border-radius: 50%; }
.dica-i:hover, .dica-i:focus-visible { opacity: 1; color: var(--green); }
.dica-balao { position: fixed; z-index: 2000; max-width: min(320px, calc(100vw - 16px)); padding: 9px 12px; border-radius: 10px; background: #1F3A2A; color: #fff; font-size: 12.5px; line-height: 1.45; box-shadow: 0 6px 24px rgba(0,0,0,.18); pointer-events: none; }
/* explicação detalhada (a conta aberta, em parágrafos): respeita as quebras de linha e fica mais larga para caber na tela */
.dica-balao { white-space: pre-line; }
.dica-balao.dica-longa { max-width: min(460px, calc(100vw - 16px)); }
.cli-tag.t-premio { background: #F3E3F2; color: #7A2D74; margin-left: 6px; }
.cupom-items tr.premio td { background: #FBF5FA; }

/* Resgate de pontos: três colunas (clientes · pontos · retorno) no computador */
.rs-grupos { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.rs-grupos .fx-grupo { margin-top: 4px; }
.rs-grupos .fx-stats { grid-template-columns: 1fr; gap: 8px; }
.rs-grupos .fx-stat { padding: 10px 12px; }
.rs-grupos .fx-stat > b { font-size: 22px; }
@media (max-width: 1000px) { .rs-grupos { grid-template-columns: 1fr; } .rs-grupos .fx-stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); } }
.fx-stat > span { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.fx-stats { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.rs-conta { margin-top: 12px; font-size: 12.5px; color: var(--muted); }
.rs-conta summary { cursor: pointer; font-weight: 600; color: var(--green); }
.rs-conta ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; line-height: 1.45; }
.kpi-label { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px; }
.kpi-label .dica-i { margin-top: 1px; }

/* indicadores que abrem lista */
.fx-stat-click { cursor: pointer; transition: box-shadow .12s, transform .12s; }
.fx-stat-click:hover, .fx-stat-click:focus-visible { box-shadow: 0 0 0 2px rgba(44, 82, 52, .25); outline: none; }
.fx-stat .fx-ver { color: var(--green, #2C5234); font-weight: 600; margin-top: 2px; }
.camada-lista .cli-janela .table-wrap, .camada-lista .cli-janela table { width: 100%; }
.fi.fi-top b { white-space: nowrap; text-align: right; display: flex; flex-direction: column; align-items: flex-end; }
.fi.fi-top b small { font-weight: 400; color: var(--muted); font-size: 12px; }
.fi.fi-top span { min-width: 0; }
.kpi-vars { display: flex; flex-flow: row wrap; gap: 0 12px; }

/* janela do cliente: cabeçalho com resumo e blocos no padrão do painel */
.cli-janela-cab { padding: 2px 0 14px; }
.cj-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.cj-nome { font-size: 20px; font-weight: 700; color: var(--green, #2C5234); line-height: 1.2; }
.cj-wpp { background: var(--wpp); border-color: var(--wpp); color: #fff !important; font-weight: 700; text-decoration: none; }
.cj-wpp:hover { filter: brightness(.95); }
.cj-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-top: 12px; }
.cj-kpis > div { background: var(--cream-2, #F6F2EA); border-radius: 10px; padding: 8px 12px; border-left: 4px solid var(--gold, #C9A227); display: flex; flex-direction: column; }
.cj-kpis small { font-size: 12px; color: var(--muted); }
.cj-kpis b { font-size: 17px; color: var(--green, #2C5234); }
.cj-kpis em { font-style: normal; font-size: 12px; color: var(--muted); }
.cj-kpis .cj-pts { border-left-color: #7A2D74; }
.cj-kpis .cj-pts b { color: #7A2D74; }
.cli-janela .cli-ficha { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; }
.cli-janela .fi-bloco { background: #FBF9F4; border: 1px solid #ECE5D5; border-top: 3px solid var(--gold, #C9A227); border-radius: 12px; padding: 12px 14px 8px; }
.cli-janela .fi-tit { color: var(--green, #2C5234); font-size: 12px; }
.fi { flex-wrap: wrap; }
.fi > span { flex: 0 1 auto; }
.fi > b { margin-left: auto; overflow-wrap: break-word; }
.fi.fi-top { flex-wrap: nowrap; }
.fi.fi-top > span { flex: 1 1 0; min-width: 0; color: var(--dark); font-size: 12.5px; overflow-wrap: break-word; }

/* Campanhas */
.cp-acoes { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.cp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.cp-card { cursor: pointer; display: grid; gap: 8px; transition: box-shadow .12s, transform .12s; }
.cp-card:hover, .cp-card:focus-visible { box-shadow: 0 0 0 2px rgba(44, 82, 52, .25), var(--shadow); outline: none; }
.cp-card-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cp-card-top b { font-size: 16px; color: var(--green); }
.cp-mini { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.cp-mini > div { background: var(--cream-2); border-radius: 8px; padding: 6px 8px; display: flex; flex-direction: column; }
.cp-mini b { font-size: 17px; color: var(--green); }
.cp-mini small { font-size: 12px; color: var(--muted); }
.cp-mini .ok { background: #E9F1E6; }
.cp-barra { height: 6px; background: #EEE9DF; border-radius: 4px; overflow: hidden; }
.cp-barra span { display: block; height: 100%; background: var(--green); }
/* redesenho (22/11/2026): lista de campanhas em tabela + aba "Não enviadas" */
.cp-lin { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cp-lin > b { color: var(--dark); }
.cp-lin-tags { display: flex; gap: 6px; flex-wrap: wrap; }
.cp-lin-tags:empty { display: none; }
.cp-env { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 4px; min-width: 64px; }
.cp-barra-p { width: 64px; height: 4px; }
.cp-visao { margin: 0 0 14px; }
.cp-ne-ferr { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cp-ne-camp { max-width: 240px; }
.cp-ne-acoes { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cp-ne-link { font-weight: 700; min-height: 24px; }
.cp-ne .seg { margin-bottom: 10px; flex-wrap: wrap; }
@media (max-width: 860px) {
  .cp-ne-camp { max-width: none; flex: 1 1 100%; }
  .cp-env { align-items: flex-start; }
}
.cp-form { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.cp-grupo { display: grid; gap: 6px; }
.cp-campos { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.cp-campo { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--muted); }
.cp-campo > span { display: flex; align-items: center; gap: 4px; }
.cp-check { flex-direction: row; align-items: center; gap: 8px; min-height: 32px; }
.cp-check input[type="checkbox"] { width: 20px; height: 20px; flex: none; }
.cp-contagem .cp-comp-n { display: block; margin-top: 2px; }
.cp-quase { margin-top: 8px; font-size: 13px; }
.cp-msg { min-height: 90px; resize: vertical; font-family: inherit; }
.cp-exemplo { background: #F4F9F2; }
.cp-salvar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding-top: 4px; border-top: 1px solid var(--line); }
.cp-contagem { flex: 1; font-size: 14px; }
.cp-contagem b { font-size: 20px; color: var(--green); }
.cp-fila { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 16px; align-items: start; }
@media (max-width: 800px) { .cp-fila { grid-template-columns: 1fr; } }
.cp-fila-cli { display: grid; gap: 8px; }
.cp-fila-bts { display: grid; gap: 8px; }
.cp-enviar { background: var(--wpp) !important; border-color: var(--wpp) !important; color: #fff !important; text-align: center; font-weight: 700; padding: 12px; text-decoration: none; }
/* robô ligado nesta campanha: o envio manual continua, mas como botão secundário */
.cp-enviar.cp-enviar-sec { background: #fff !important; color: var(--wpp-texto) !important; border-color: var(--wpp) !important; }
.cp-enviar.carregando { opacity: .6; pointer-events: none; }
.danger-txt { color: #8E321C !important; }
.cp-fim { padding: 8px 0; color: var(--green); }
.cp-st { font-weight: 600; }
.cp-st.ok { color: #2C5234; }
.cp-st.neg { color: #8E321C; }
.cp-st small { font-weight: 400; color: var(--muted); }
tr.cp-enviada td { background: #EEF5EC !important; }
.cp-head { margin-top: 0; }
.cp-cel { display: block; font-size: 12px; }
.fi b.pos { color: #2C5234; } .fi b.neg { color: #8E321C; }
.cupom-fixe-linha { padding: 6px 12px; font-size: 12.5px; background: #F7F2F8; border-bottom: 1px solid var(--line); }
.cupom-fixe-linha .pos { color: #2C5234; } .cupom-fixe-linha .neg { color: #7A2D74; }
.cupom-filtro { margin: 4px 0 10px; }
.fi-lojas th { font-size: 12px; color: var(--muted); font-weight: 600; text-align: left; padding: 4px 8px; }
.fi-lojas th.r { text-align: right; }
.fi-lojas tr.nossa td { background: #EEF5EC; }
@media (max-width: 700px) { .script-pop { position: fixed; left: 8px; right: 8px; top: 64px; width: auto; max-width: none; max-height: calc(100vh - 80px); overflow-y: auto; transform: none; } }
.fi-extrato summary { cursor: pointer; font-weight: 600; color: var(--green); font-size: 12.5px; }
.fi-extrato table { margin-top: 6px; font-size: 12px; }
.fi-extrato tr.anulado td { text-decoration: line-through; color: var(--muted); }
.fi-extrato .pos { color: #2C5234; } .fi-extrato .neg { color: #7A2D74; }
.cfg-fx-emails { list-style: none; margin: 2px 0; padding: 0; display: grid; gap: 2px; }
.cfg-fx-emails li.ok { color: #2C5234; } .cfg-fx-emails li.espera { color: var(--muted); }
.cfg-per-p.rod { background: #4A7FC1; }

/* menu da conta e indicador de carregamento */
.user-btn { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); color: #fff; border-radius: 999px; padding: 4px 10px 4px 4px; cursor: pointer; font: inherit; font-size: 13px; }
.user-btn:hover { background: rgba(255,255,255,.16); }
.user-ini { width: 24px; height: 24px; border-radius: 50%; background: #C9A227; color: #1F3A2A; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; }
.user-pop { right: 0; left: auto; min-width: 190px; padding: 6px; }
.user-item { display: block; width: 100%; text-align: left; padding: 9px 12px; border-radius: 8px; background: none; border: 0; font: inherit; color: var(--dark, #1F2A22); text-decoration: none; cursor: pointer; }
.user-item:hover { background: var(--cream-2, #F6F2EA); }
.user-wrap .logout-form { margin: 0; }
@media (max-width: 700px) { .user-nome { display: none; } .user-pop { position: fixed; left: auto; right: 8px; top: 64px; } }
.updated.carregando b { opacity: .45; }
.updated.carregando::after { content: ''; display: inline-block; width: 10px; height: 10px; margin-left: 6px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -1px; }
.cfg-caixa { font-size: 12px; margin: 0 6px 0 0; white-space: nowrap; }
.user-btn.on { background: #C9A227; border-color: #C9A227; color: #1F3A2A; }
.user-btn.on .user-ini { background: #1F3A2A; color: #C9A227; }

/* Evolução mensal no celular: cada linha vira um cartão (nome em cima; Faturamento, Cupons, TKM, PMA e IPA em 5 colunas, com a variação embaixo) */
@media (max-width: 700px) {
  .t.tree { min-width: 0 !important; width: 100%; }
  .t.tree thead { display: none; }
  .t.tree tr { display: grid; grid-template-columns: minmax(0,1.5fr) minmax(0,.9fr) minmax(0,1.15fr) minmax(0,1.05fr) minmax(0,.85fr); grid-auto-flow: column; border-bottom: 1px solid var(--line, #E6E0D2); }
  .t.tree td { display: block; padding: 2px 4px !important; text-align: left; border: 0 !important; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 12px; }
  .t.tree td.tree-l, .t.tree td.sticky-col { grid-column: 1 / -1; grid-row: 1; position: static; padding: 8px 6px 4px !important; font-size: 13.5px; white-space: normal; }
  .t.tree td.tree-v { grid-row: 2; font-weight: 600; }
  .t.tree td.tree-v::before { content: attr(data-l); display: block; font-size: 12px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
  .t.tree td.tree-var, .t.tree tr > td.muted:not(.tree-l) { grid-row: 3; font-size: 12px; padding-bottom: 8px !important; }
  .t.tree .tree-var .tree-ant { font-size: 12px; }
  .t.tree td.tree-var { overflow: visible; text-overflow: clip; letter-spacing: -.01em; }
  .t.tree td.tree-l.n1 { padding-left: 18px !important; }
  .t.tree td.tree-l.n2 { padding-left: 32px !important; }
  .t.tree td.tree-l.n3 { padding-left: 46px !important; }
  .t.tree tr.lv1, .t.tree tr.lv2, .t.tree tr.lv3 { border-left: 3px solid #E6DCC2; }
  .t.tree tfoot tr td { background: #E4EEE1; }
  .t.tree .tree-btn { width: 24px; height: 24px; }
}
.dre-t td.dre-proj, .dre-t th.dre-proj { background: #FBF6E6; }
.dre-t thead th.dre-proj { background: #6E5A12; }
.dre-t tr.dre-info td { font-size: 12.5px; }
.cfg-tags { display: flex; gap: 6px; flex-wrap: wrap; margin: 6px 0 4px; }
.cfg-tags .chip { font-size: 12px; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--line, #E6E0D2); background: #F6F2EA; cursor: pointer; font-family: ui-monospace, monospace; }
.cfg-ex-assunto { font-size: 12.5px; margin-bottom: 8px; }
/* editor de horários por dia da semana */
.sem-ed { display: flex; flex-direction: column; gap: 6px; margin: 8px 0; }
.sem-dia { display: grid; grid-template-columns: 90px 1fr auto; gap: 10px; align-items: center; padding: 6px 10px; border: 1px solid var(--line, #E6E0D2); border-radius: 10px; background: #FCFAF5; }
.sem-dia.vazio { background: #F4F1EA; }
.sem-dia .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.sem-dia .chip.ultimo { background: #C9A227; color: #1F3A2A; border-color: #C9A227; }
.sem-atalhos { margin-top: 4px; flex-wrap: wrap; gap: 6px; }
@media (max-width: 700px) { .sem-dia { grid-template-columns: 1fr; gap: 4px; } }
.feriados-t .hora-in.auto { background: #EEF5EC; border-color: #CFE0CB; }
.feriados-t .hora-dica .link-btn { background: none; border: 0; padding: 0; color: #1F4E8C; text-decoration: underline; cursor: pointer; font: inherit; font-size: inherit; }
.fora-det { margin-top: 8px; } .fora-det summary { cursor: pointer; font-weight: 600; color: #1F4E8C; }
.fora-ok { margin: 6px 0 10px; font-size: 13px; }
.cls-barra { margin-top: 10px; padding: 10px 12px; border: 1px solid #C9A227; background: #FFF8E1; border-radius: 10px; font-size: 13px; }
.cfg-imp .seg { margin: 8px 0; flex-wrap: wrap; }
.hist-ops { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 8px; margin: 4px 0 6px; }
.hist-op { display: flex; gap: 10px; align-items: flex-start; padding: 9px 11px; border: 1px solid var(--line, #E6E0D2); border-radius: 10px; background: #fff; cursor: pointer; }
.hist-op input { margin-top: 3px; accent-color: #2C5234; width: 16px; height: 16px; }
.hist-op span { display: flex; flex-direction: column; } .hist-op small { color: var(--muted); font-size: 12px; }
.cfg-hist-card { padding: 10px 12px; margin-top: 8px; box-shadow: none; }
.cfg-hist-card .card-title { font-size: 13px; }
.cfg-usu-filtros { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 0 0 10px; } .cfg-usu-filtros .f-input { width: auto; min-width: 170px; }
.ped-prop { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 10px; }
.ped-prop-ins { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.ped-prop-ins label { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; }
.ped-prop small { flex-basis: 100%; }
/* pedido: prioridade dos chás e explicação de como o pedido é montado */
.ped-prio { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 8px; font-size: 12px; font-weight: 600; background: #fde8d7; color: #9a4a12; white-space: nowrap; }
.ped-como { margin-top: 12px; border-top: 1px solid var(--line, #e5e0d5); padding-top: 8px; font-size: 13px; }
.ped-como summary { cursor: pointer; font-weight: 600; color: var(--green, #2d5a3d); }
.ped-como ol { margin: 8px 0 0 18px; padding: 0; display: grid; gap: 4px; line-height: 1.45; }
/* classe oficial no Estoque e margem */
.est-cl-of { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.est-cl-sel { font-size: 12px; padding: 1px 2px; border: 1px solid var(--line, #ddd6c8); border-radius: 6px; background: transparent; max-width: 26px; cursor: pointer; color: var(--muted, #777); }
.est-cl-sel:focus, .est-cl-sel:hover { max-width: 170px; }
.est-cl-meses { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 4px 0 10px; }
.est-cl-erro { display: block; }
/* KPI: número longo encolhe para caber (container query pela largura do cartão) */
.kpi { container-type: inline-size; min-width: 0; }
.kpi-value[style*="--n"] { font-size: clamp(14px, calc((100cqi - 4px) / (var(--n) * 0.54)), 26px); }
/* clientes: aviso de cupons com CPF sem venda abre a lista */
.cli-semvenda { cursor: pointer; }
.cli-semvenda:hover { filter: brightness(0.98); }
.cli-sv { max-width: 1000px; }
.cli-sv-resumo { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 12px; }
.cli-sv-resumo > div { background: var(--bg2, #f4f0e6); border-radius: 8px; padding: 6px 10px; font-size: 13px; cursor: help; }
.ped-cl-meses { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.ped-cl-meses .seg button { padding: 4px 10px; }
/* ---------- impressão de um cartão (botão 🖨 Imprimir) ---------- */
#area-impressao { position: absolute; left: -30000px; top: 0; width: max-content; background: #fff; color: #1d2a22; font-size: 12px; }
#area-impressao.prt-medindo .table-wrap { max-height: none !important; overflow: visible !important; }
#area-impressao.prt-medindo table { width: max-content !important; }
.prt-cab { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-bottom: 2px solid #2C5234; padding-bottom: 4px; margin-bottom: 8px; font-size: 12px; color: #444; }
.prt-cab b { color: #2C5234; font-size: 13px; }
.prt-campo { font-weight: 600; }
@media print {
  body.imprimindo-cartao > *:not(#area-impressao) { display: none !important; }
  body.imprimindo-cartao { background: #fff !important; padding: 0 !important; margin: 0 !important; }
  body.imprimindo-cartao #area-impressao { position: static; left: auto; width: auto; }
  #area-impressao * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  #area-impressao .card { break-inside: auto !important; page-break-inside: auto !important; box-shadow: none !important; border: none !important; padding: 0 !important; margin: 0 !important; background: #fff !important; max-width: none !important; }
  #area-impressao .card-head { display: block; }
  #area-impressao .table-wrap { max-height: none !important; overflow: visible !important; border: none !important; }
  #area-impressao table { width: 100% !important; border-collapse: collapse; font-size: 12px; }
  #area-impressao th, #area-impressao td { position: static !important; padding: 3px 5px !important; }
  #area-impressao th .arrow { display: none; }
  #area-impressao thead { display: table-header-group; }
  #area-impressao tfoot { display: table-row-group; }
  #area-impressao tr, #area-impressao .prt-graf, #area-impressao .kpi, #area-impressao .notice, #area-impressao li { break-inside: avoid; page-break-inside: avoid; }
  #area-impressao .chart-box { height: auto !important; break-inside: avoid; }
  #area-impressao .prt-graf { display: block; width: 100%; height: auto; max-height: 175mm; object-fit: contain; margin: 6px 0; }
  #area-impressao .card-title, #area-impressao .card-sub { break-after: avoid; }
}
.prt-btn span { margin-left: 4px; }
@media (max-width: 640px) { .prt-btn span { display: none; } }
.card-head .prt-btn + .exp-btn { margin-left: 0; }
.card-cheio .prt-btn { display: inline-flex; }
/* Estoque e Margem → Site */
.site-topo { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.site-t th { white-space: normal; vertical-align: bottom; }
.site-t td.wrap { min-width: 150px; white-space: normal; }
.site-t .site-hist { display: block; margin-top: 6px; }
/* filtro "Mudou em" ao lado da busca da tabela (Produtos → Site) */
.site-busca { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin: 0 0 10px; min-width: 0; }
.site-busca .tab-busca { margin: 0; flex: 1 1 220px; }
.site-dia { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.site-dia-rot { font-weight: 600; white-space: nowrap; }
.site-dia-data { width: auto; max-width: 170px; }
.site-dia-mud { display: block; }
.site-dia-mud small { display: block; }
.site-link { color: var(--green, #2C5234); font-weight: 600; text-decoration: none; }
.site-link:hover { text-decoration: underline; }
.site-de { margin-right: 6px; font-size: 12px; }
td.site-promo { color: #9a4a12; font-weight: 600; }
td.site-dif { color: #B5452B; font-weight: 600; }
#area-impressao td.wrap, #area-impressao th.wrap { max-width: 260px; white-space: normal; }
.est-tab-fx { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 10px; }
.est-tab-g { max-width: 260px; }
/* busca da tabela (quando o cartão não a põe na barra de ferramentas) e aviso do filtro "Produto contém" */
.tab-busca { max-width: 320px; margin: 0 0 10px; }
.est-tools .tab-busca, .card-head .tab-busca { margin: 0; }
.tab-fprod { font-size: 12px; color: var(--muted, #6b6b6b); margin: 0 0 8px; background: #FFF8E1; border-radius: 6px; padding: 4px 8px; display: inline-block; }
.site-copiar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.site-resumo { white-space: pre-wrap; font-family: inherit; font-size: 12px; line-height: 1.5; background: var(--cream-2, #F6F2E9); border-radius: 8px; padding: 10px 12px; margin-top: 8px; user-select: all; }
.prc-drawer.prc-drawer-largo { width: min(900px, 96vw); }
.prc-nota-info { font-size: 12px; margin-top: 6px; }
.prc-nf-prt { float: right; margin-top: -4px; }
.f-uso { background: #FFF8E1; border-radius: 8px; padding: 8px 10px; margin-bottom: 12px; color: #6b5a2a; }
.updated.clicavel { cursor: pointer; border-radius: 8px; }
.updated.clicavel:hover { background: rgba(255,255,255,.08); }
.hist-at { max-width: 1100px; }
.hist-at-sel { max-width: 300px; margin-bottom: 10px; }
.est-ir { display: block; font-size: 12px; color: var(--green, #2C5234); text-decoration: none; margin-top: 2px; }
.est-ir:hover { text-decoration: underline; }
/* Início */
.ini-avisos { display: grid; gap: 8px; margin-top: 10px; }
.ini-aviso { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line, #E2DCCF); background: #fff; }
.ini-aviso[role=button] { cursor: pointer; }
.ini-aviso[role=button]:hover { border-color: var(--green, #2C5234); }
.ini-aviso > div { flex: 1; min-width: 0; }
.ini-aviso .muted { font-size: 12px; margin-top: 2px; }
.ini-ico { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; color: #fff; background: #9AA59D; }
.ini-erro .ini-ico { background: #B5452B; } .ini-warn .ini-ico { background: #C9A227; color: var(--dark, #1E2B22); } .ini-info .ini-ico { background: #4E7D96; } .ini-ok .ini-ico { background: #2C5234; }
.ini-ir { flex: none; font-size: 12px; font-weight: 600; color: var(--green, #2C5234); }
.ini-pend { margin-top: 10px; font-size: 12px; }
/* o ícone acompanha o título (não o meio da linha) em aviso de várias linhas; aviso que já está em "O que fazer primeiro" */
.ini-aviso { align-items: flex-start; }
.ini-aviso .ini-ico, .ini-aviso .ini-ir { margin-top: 1px; }
.ini-topo-tag { display: block; font-size: 12px; color: var(--green, #2C5234); font-weight: 600; }
.ini-notopo b { font-weight: 600; }
.ini-falhou { margin: 4px 0 8px; }
/* pedido obrigatório */
.ped-obr { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border: 1px solid var(--line, #E2DCCF); border-radius: 10px; margin-top: 8px; background: #FFFBEF; }
.ped-obr.off { background: #fff; opacity: .8; }
.ped-obr > div:first-child { flex: 1; min-width: 0; }
.ped-obr .muted { font-size: 12px; }
.ped-obr-ac { display: flex; gap: 6px; flex-wrap: wrap; }
.ped-obr-ac .btn { padding: 4px 10px; font-size: 12px; }
.ped-obr-del { color: #B5452B; }
.ped-obr-ant { margin-top: 10px; }
.ped-obr-ed { max-width: 900px; }
.ped-obr-cab { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }
.ped-obr-cab label { display: flex; flex-direction: column; gap: 4px; }
.ped-obr-cola { width: 100%; font-family: inherit; }
.ped-obr-lin { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.ped-obr-t td { vertical-align: middle; }
.ped-obr-t input[list] { min-width: 320px; }
.ped-obr-n { width: 100px; }
.ped-obr-q { white-space: nowrap; font-weight: 600; color: #8a6d12; }
@media (max-width: 640px) { .ped-obr { flex-direction: column; align-items: flex-start; } .ped-obr-cab { grid-template-columns: 1fr; } .ped-obr-t input[list] { min-width: 200px; } }
.ped-obr-aviso { background: #FFF6D6; border: 1px solid #EBD38A; border-radius: 10px; padding: 8px 12px; margin: 8px 0; font-size: 13px; color: #5c4a12; }
.ped-tag-obr { display: inline-block; margin-left: 6px; padding: 0 6px; border-radius: 8px; font-size: 12px; font-weight: 600; background: #FFF0C2; color: #7a5b00; white-space: nowrap; }
.t tr.ped-row-obr td { background: #FFFBEB !important; color: #6b5a2a; }
/* composição do pedido (obrigatório + carrinho) */
.ped-compo { margin-top: 8px; }
.ped-compo-t { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 10px; font-size: 15px; }
.ped-compo-t b { font-size: 18px; }
.ped-compo-car { color: var(--green, #2C5234); font-size: 22px !important; }
.ped-compo-op { color: var(--muted, #888); font-weight: 700; }
.ped-compo-tot b { font-size: 20px; }
.ped-compo-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: #EEE9DD; margin-top: 8px; }
.ped-compo-s.ob { background: #D4A72C; } .ped-compo-s.car { background: #2C5234; } .ped-compo-s.fora { background: #9AA59D; } .ped-compo-s.sobra { background: repeating-linear-gradient(45deg,#E8E2D3,#E8E2D3 4px,#F4F0E6 4px,#F4F0E6 8px); }
/* celular: ajustes do Pedido recolhidos numa linha de resumo */
.ped-ctl-rec > summary { cursor: pointer; list-style: none; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; min-height: 32px; padding: 4px 0; }
.ped-ctl-rec > summary::-webkit-details-marker { display: none; }
.ped-ctl-ed { color: var(--green); font-weight: 600; font-size: 13px; }
.ped-ctl-rec[open] > summary { margin-bottom: 8px; }
.ped-como-montar > summary { cursor: pointer; color: var(--green); font-weight: 600; min-height: 28px; padding: 4px 0; }
/* Composição do pedido: sem barra lateral (barra só para estado, regra de visual.md) */
.ped-pend > .notice { margin-bottom: 10px; }
.ped-pend .ped-rasc-acoes { margin-top: 6px; }
.ped-site-link { display: inline-flex; align-items: center; min-height: 28px; }
.ped-ult { border: 1px dashed var(--line, #D9D2C2); border-radius: 10px; padding: 8px 12px; background: #FAF8F3; }
.ped-ult > summary { cursor: pointer; font-size: 13px; }
.ped-ult-nota { font-size: 12px; margin: 8px 0; }
.ped-cel { margin: 8px 0; border: 1px solid var(--line, #E2DCCF); border-radius: 10px; padding: 8px 12px; background: #FAF8F3; }
.ped-cel > summary { cursor: pointer; font-weight: 600; }
.ped-cel-c p, .ped-cel-c li { font-size: 13px; line-height: 1.5; }
.ped-cel-cod { width: 100%; font-size: 12px; font-family: monospace; }
/* ---------- Pedido no celular ---------- */
.ped-cards { display: grid; gap: 10px; margin-top: 10px; }
.ped-cards-busca { width: 100%; margin-top: 8px; font-size: 16px; }
.ped-card { border: 1px solid var(--line, #E2DCCF); border-radius: 12px; padding: 12px; background: #fff; display: grid; gap: 8px; transition: opacity .25s, transform .25s; }
.ped-card.on { border-color: #9DB9A3; box-shadow: inset 4px 0 0 #2C5234; }
.ped-card.obr { background: #FFFBEB; box-shadow: inset 4px 0 0 #D4A72C; }
.ped-card.ped-sai { opacity: 0; transform: translateX(30px); }
.ped-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.ped-card-nome { font-weight: 600; font-size: 15px; line-height: 1.3; }
.ped-card-nome .est-tam { font-weight: 400; }
.ped-card-meta { font-size: 12px; color: var(--muted, #777); }
.ped-card-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: #FAF8F3; border-radius: 8px; padding: 6px 8px; }
.ped-card-nums small { display: block; font-size: 12px; color: var(--muted, #777); }
.ped-card-nums b { font-size: 14px; }
.ped-card-ped { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.ped-card-val { text-align: right; }
.ped-card-val small { display: block; font-size: 12px; color: var(--muted, #777); }
.ped-card-val b { font-size: 16px; }
.ped-card-obs { font-size: 12px; color: var(--muted, #777); }
.ped-card-obs:empty { display: none; }
.ped-q-mob { display: inline-flex; align-items: center; gap: 6px; }
.ped-q-mob .ped-q { width: 64px; height: 44px; text-align: center; font-size: 17px; padding: 0 4px; }
.ped-step { width: 44px; height: 44px; border-radius: 10px; border: 1px solid var(--line, #D9D2C2); background: #F4F0E6; font-size: 22px; font-weight: 700; color: var(--green, #2C5234); line-height: 1; }
.ped-step:active { background: #E6E0D2; }
.ped-cards-mais { width: 100%; padding: 12px; }
.ped-fx-mob { margin: 8px 0; border: 1px solid var(--line, #E2DCCF); border-radius: 10px; padding: 8px 12px; }
.ped-fx-mob > summary { cursor: pointer; font-weight: 600; font-size: 14px; }
@media (max-width: 760px) {
  /* ferramentas quebram linha (não rolam: senão o menu "Limpar" fica cortado); só as abas rolam para o lado */
  .ped-tools { flex-wrap: wrap; overflow: visible; }
  .ped-tools .seg { flex: 1 1 100%; }
  .ped-menu-l { left: 0; right: auto; min-width: min(280px, calc(100vw - 48px)); }
  .ped-menu-l button { min-height: 44px; }
  .ped-fxs { display: grid; grid-template-columns: 1fr; gap: 8px; margin-top: 8px; }
  .ped-fxs select, .ped-fxs .f-input { width: 100%; max-width: none; }
  .ped-cl-meses { margin-left: 0; }
  .ped-obr { padding: 10px; }
  .ped-obr-ac { width: 100%; }
  .ped-obr-ac .btn { flex: 1; padding: 10px; }
  .ped-compo-t { font-size: 13px; }
  .ped-compo-t b { font-size: 16px; }
  .ped-compo-car { font-size: 19px !important; }
  .ped-obr-aviso { font-size: 12px; }
}
.ped-barra { position: fixed; left: 0; right: 0; bottom: 0; z-index: 50; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px calc(10px + env(safe-area-inset-bottom)); background: #fff; border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(31, 61, 43, .08); }
.ped-barra small { display: block; font-size: 12px; color: var(--muted); }
.ped-barra b { font-size: 18px; color: var(--green, #2C5234); }
.ped-barra .btn { padding: 12px 14px; }
.com-barra { padding-bottom: 80px; }
body.com-camada .ped-barra { display: none; }
/* ---------- celular: tabelas largas viram cartões (só até 760 px; o computador não muda) ---------- */
@media (max-width: 760px) {
  .table-wrap:has(> .t-mob) { overflow: visible; max-height: none !important; border: 0; background: transparent; box-shadow: none; }
  .t.t-mob { display: block; width: 100%; min-width: 0 !important; border: 0; }
  /* só as linhas da tabela principal viram cartão (tabelas dentro de um cartão — ex.: a conta por pacote — continuam tabelas) */
  .t.t-mob > thead { display: none; }
  .t.t-mob > tbody, .t.t-mob > tfoot { display: block; }
  /* minmax(0, 1fr): a coluna encolhe; sem isso uma data, uma caixa de escolha ou um texto comprido empurrava a outra coluna para fora do cartão */
  .t.t-mob > tbody > tr, .t.t-mob > tfoot > tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 12px; padding: 10px 12px; margin: 0 0 10px; border: 1px solid var(--line, #E2DCCF); border-radius: 12px; background: #fff; }
  /* cartão fora da tela: o navegador só calcula quando chega perto (troca de tela mais rápida no celular) */
  .t.t-mob > tbody > tr { content-visibility: auto; contain-intrinsic-size: auto 180px; }
  .t.t-mob > tbody > tr:nth-child(even) { background: #fff; }
  .t.t-mob > tbody > tr > td, .t.t-mob > tfoot > tr > td { display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 1px; padding: 0 !important; border: 0 !important; text-align: left !important; white-space: normal !important; min-width: 0 !important; max-width: 100%; position: static !important; background: transparent !important; font-size: 14px; overflow-wrap: anywhere; }
  .t.t-mob > tbody > tr > td > *, .t.t-mob > tfoot > tr > td > * { max-width: 100%; min-width: 0; }
  .t.t-mob > tbody > tr > td input, .t.t-mob > tbody > tr > td select { max-width: 100%; min-width: 0; }
  .t.t-mob > tbody > tr > td::before, .t.t-mob > tfoot > tr > td::before { content: attr(data-l); font-size: 12px; font-weight: 500; color: var(--muted, #7a7a7a); text-transform: none; letter-spacing: 0; }
  .t.t-mob > tbody > tr > td:not([data-l])::before, .t.t-mob > tbody > tr > td[data-l=""]::before, .t.t-mob > tfoot > tr > td:not([data-l])::before { content: none; }
  .t.t-mob > tbody > tr > td.com-dica::before { content: none; }
  .t.t-mob > tbody > tr > td.com-dica > .mob-rot { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; color: var(--muted, #7a7a7a); }
  .t.t-mob > tbody > tr > td.mob-tit, .t.t-mob > tfoot > tr > td.mob-tit { grid-column: 1 / -1; font-size: 15px; font-weight: 600; padding-bottom: 6px !important; border-bottom: 1px solid #F0EBE0 !important; }
  .t.t-mob > tbody > tr > td.mob-tit::before { content: none; }
  .t.t-mob > tbody > tr > td[data-l=""], .t.t-mob > tbody > tr > td:not([data-l]):not(.mob-tit) { grid-column: 1 / -1; }
  .t.t-mob > tbody > tr > td:empty, .t.t-mob > tfoot > tr > td:empty { display: none; }
  .t.t-mob > tbody > tr > td[colspan] { grid-column: 1 / -1; }
  .t.t-mob > tfoot > tr { background: #F4F0E6; font-weight: 700; }
  .t.t-mob td .est-tam, .t.t-mob td small { white-space: normal; }
  /* linha aberta embaixo de um cartão (conta por pacote, deduções…): ocupa a largura toda, sem moldura de cartão */
  .t.t-mob > tbody > tr.est-det { display: block; padding: 0; border: 0; background: transparent; margin: -4px 0 12px; content-visibility: visible; }
  .t.t-mob > tbody > tr.est-det > td { display: block; }
  .t.t-mob .est-det-box { width: auto !important; max-width: 100%; }
  .t.t-mob .est-det-grid { grid-template-columns: 1fr !important; }
  .tab-ord-w { display: flex; gap: 8px; margin: 0 0 10px; }
  .tab-ord { flex: 1; font-size: 14px; }
  .tab-ord-d { min-width: 44px; font-size: 18px; }
  .tab-busca { max-width: none; width: 100%; font-size: 16px; }
  .pager { flex-wrap: wrap; gap: 8px; }
  .pager button { min-height: 40px; min-width: 44px; }
  /* geral: toque confortável e nada estreito */
  .btn, .seg button { min-height: 40px; }
  input.f-input, select.f-input { font-size: 16px; } /* sem zoom automático no iPhone */
  .card { padding: 18px; }
  .page-title { font-size: 24px; }
  .page-sub { font-size: 14px; }
  .card-title { font-size: 18px; }
  .card-sub { font-size: 13px; }
  body { font-size: 14px; }
  .btn { min-height: 44px; }
  .seg { overflow-x: auto; flex-wrap: nowrap; max-width: 100%; -webkit-overflow-scrolling: touch; }
  .seg button { flex: none; white-space: nowrap; }
  .est-tools, .site-topo { flex-wrap: wrap; gap: 8px; }
  .est-tools .est-busca { flex: 1 1 100%; max-width: none; }
  .prc-drawer, .prc-drawer.prc-drawer-largo { width: 100vw !important; max-width: 100vw; border-radius: 0; }
  .fech-modal, .card-cheio { max-width: 100vw; }
}
@media (max-width: 760px) {
  /* tabelas de grade (mapa de calor, horários, escala): rolam para o lado dentro do cartão */
  table.mapa-t, table.op-horas, table.escala-t, table.sem-t { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
}
@media (max-width: 760px) {
  /* alvos de toque pequenos ficam com pelo menos 40 px */
  .exp-btn, .icon-btn, .ped-ab, .prc-ver { min-width: 40px; min-height: 40px; }
  /* classe na Rentabilidade: etiqueta e a escolha (travar) uma embaixo da outra, sem passar do cartão */
  .est-cl-of { display: flex; flex-wrap: wrap; white-space: normal; max-width: 100%; }
  .est-cl-sel { max-width: 100% !important; width: 100%; min-width: 0; height: 36px; font-size: 14px; }
  .est-cl-res { max-width: 100%; }
  .est-cl-res .est-tam { white-space: normal; }
  .link-btn { padding: 6px 2px; }
  .ped-menu > summary { min-height: 40px; display: inline-flex; align-items: center; }
}
@media (max-width: 760px) {
  /* nada pode alargar a página: as abas (seg) rolam dentro do próprio espaço */
  .card-head, .table-tools, .est-tools, .site-topo, .page-head { flex-wrap: wrap; min-width: 0; max-width: 100%; }
  .card-head > *, .table-tools > *, .est-tools > *, .page-head > * { min-width: 0; max-width: 100%; }
  .seg { min-width: 0; max-width: 100%; }
  .card, .content, .layout { min-width: 0; max-width: 100%; }
  .content { overflow-x: clip; }
}

/* ---- Notas fiscais: abas Entrada | Saída e NF-e emitidas ---- */
.nf-abas { margin: 4px 0 6px; }
.nf-acoes { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.nf-acoes .btn { padding: 3px 8px; font-size: 12px; }
.nf-linha-cancelada td { color: var(--muted, #888); }
.nf-riscado { text-decoration: line-through; }
.nf-cancelada { background: #fbe9e6 !important; color: #a33 !important; }
.nf-dest { display: flex; flex-direction: column; gap: 2px; margin: 10px 0 6px; padding: 8px 10px; border: 1px solid var(--line, #e6e1d6); border-radius: 10px; font-size: 13px; }
.nf-dest small { font-size: 12px; color: var(--muted, #777); text-transform: uppercase; letter-spacing: .03em; }
.nf-botoes { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 10px 0 4px; }
.cli-tag.t-nfe { background: #e7eefb; color: #1F4FA0; text-decoration: none; margin-left: 6px; cursor: pointer; }
.cupons-t .cpf-link { font-size: 12px; }

/* ---- Produtos por lucro: visões de colunas (Resumo cabe na tela) ---- */
.est-lucro-ctl { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; margin-bottom: 8px; }
.est-lucro-ctl .est-cl-meses { margin: 0; }
.est-vis { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.est-cl-res { display: flex; flex-direction: column; gap: 2px; }
.est-cl-res .est-tam { white-space: nowrap; }
.est-t-lucro td.sticky-col, .est-t-lucro th.sticky-col { max-width: 210px; min-width: 160px; }
.est-vis-resumo th, .est-vis-resumo td, .est-vis-margens th, .est-vis-margens td { padding-left: 8px; padding-right: 8px; }
.est-t-lucro th { white-space: normal; vertical-align: bottom; }
/* revisão de 22/11 (sem rolagem para o lado): as outras tabelas largas da Rentabilidade quebram o cabeçalho como a de Produtos */
.est-t-larga th { white-space: normal; vertical-align: bottom; }
.est-t-larga td.sticky-col, .est-t-larga th.sticky-col { max-width: 210px; min-width: 160px; }
.est-t-lucro td.wrap:not(.sticky-col), .est-t-larga td.wrap:not(.sticky-col) { min-width: 150px; }
.est-heroi-conta { color: var(--green); font-weight: 600; font-size: 14px; text-decoration: none; padding: 6px 0; min-height: 24px; }
.est-heroi-conta:hover { text-decoration: underline; }
.prc-heroi-extra { margin-top: 16px; padding-top: 4px; border-top: 1px solid var(--line); }
.prc-heroi-extra .linhas-num { margin: 0; }
.prc-heroi-hist { margin: 10px 0 0; font-size: 13px; }
.est-vis-margens th:not(.sticky-col) { max-width: 92px; }
.est-t-lucro .est-ir { display: inline; margin-left: 4px; }

/* resultado dos testes automáticos nas novidades */
.sis-teste { display: inline-block; font-size: 12px; font-weight: 600; padding: 1px 6px; border-radius: 999px; margin-right: 6px; text-decoration: none; }
.sis-teste.t-ok { background: #e3f2e6; color: #23683a; }
.sis-teste.t-falhou { background: #fbe4e1; color: #a33; }
.sis-teste.t-testando { background: #fff3d6; color: #8a6200; }
.sis-teste.t-pulado { background: #eee; color: #666; }
.sis-nota { margin-bottom: 8px; font-size: 12.5px; }
.sis-forcar { display: block; margin: 6px auto 0; font-size: 12px; }

/* ---- Campanhas: formulário em frases, blocos que abrem e fecham, produtos escolhidos na lista ---- */
.cp-form { gap: 10px; }
.cp-nome .f-input { font-size: 15px; }
.cp-passo { display: flex; gap: 10px; align-items: flex-start; margin-top: 10px; }
.cp-passo b { display: block; font-size: 14px; color: var(--ink, #1f2a22); }
.cp-passo small { display: block; font-size: 12px; }
.cp-n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--green, #2C5234); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; }
.cp-bloco { border: 1px solid var(--line, #e6e1d6); border-radius: 10px; background: #fff; }
.cp-bloco > summary { cursor: pointer; padding: 10px 12px; display: flex; gap: 10px; align-items: baseline; list-style: none; }
.cp-bloco > summary::-webkit-details-marker { display: none; }
.cp-bloco > summary::before { content: '▸'; color: var(--muted); transition: transform .15s; }
.cp-bloco[open] > summary::before { transform: rotate(90deg); }
.cp-bloco-res { font-size: 12px; color: var(--green, #2C5234); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1; text-align: right; }
.cp-bloco-corpo { padding: 2px 12px 12px; display: grid; gap: 8px; }
.cp-linha { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; font-size: 13.5px; }
.cp-linha .f-input { width: auto; min-width: 0; }
.cp-num { width: 84px !important; text-align: center; }
.cp-linha select.f-input { max-width: 260px; }
.cp-prod { display: grid; gap: 6px; }
.cp-rot { font-size: 13.5px; display: inline-flex; gap: 4px; align-items: center; }
.cp-prod-box { display: grid; gap: 6px; }
.cp-prod-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.cp-prod-chip { display: inline-flex; align-items: center; gap: 6px; background: #e8f0e9; color: #23502f; border-radius: 999px; padding: 4px 6px 4px 10px; font-size: 12.5px; font-weight: 600; }
.cp-prod-chip.contem { background: #fff3d6; color: #7a5600; }
.cp-prod-chip button { border: 0; background: rgba(0,0,0,.08); border-radius: 50%; width: 20px; height: 20px; cursor: pointer; font-size: 12px; line-height: 1; }
.cp-prod-campo { position: relative; }
.cp-prod-busca { width: 100%; }
.cp-sug { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 4px); background: #fff; border: 1px solid var(--line, #e6e1d6); border-radius: 10px; box-shadow: 0 10px 28px rgba(0,0,0,.14); max-height: 320px; overflow: auto; padding: 4px; }
.cp-sug-it { display: flex; justify-content: space-between; gap: 10px; width: 100%; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 8px; cursor: pointer; font: inherit; font-size: 13px; }
.cp-sug-it:hover, .cp-sug-it:focus { background: #f2efe7; }
.cp-sug-it small { color: var(--muted); white-space: nowrap; }
.cp-sug-dica { display: block; padding: 6px 10px; }
.cp-sug-todos { border-top: 1px solid var(--line, #e6e1d6); margin-top: 2px; color: #7a5600; }
.cp-sug-vazio { padding: 8px 10px; font-size: 12.5px; color: var(--muted); }
.cp-msg-topo .f-input { max-width: 320px; }
.cp-dir { display: grid; gap: 12px; position: sticky; top: 110px; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.cp-esq { min-width: 0; }
.cp-resumo-fixo { display: grid; gap: 10px; }
.cp-resumo-fixo .cp-contagem { font-size: 14px; }
.cp-resumo-fixo .cp-contagem b { font-size: 24px; color: var(--green, #2C5234); margin-right: 4px; }
.cp-resumo-fixo .cp-salvar { border-top: 0; padding-top: 0; }
@media (max-width: 760px) {
  .cp-dir { position: static; }
  .cp-previa .table-wrap { max-height: none; }
  .cp-resumo-fixo { position: fixed; left: 8px; right: 76px; bottom: 8px; z-index: 40; box-shadow: 0 8px 24px rgba(0, 0, 0, .18); padding: 10px 12px; }
  .cp-resumo-fixo .cp-contagem b { font-size: 20px; }
  .cp-resumo-fixo .cp-quase { display: none; }
  .cp-form { padding-bottom: 120px; }
  .cp-num { width: 72px !important; }
  .cp-linha select.f-input { max-width: 100%; }
}

/* ---- Lista de espera ---- */
.esp-topo { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-start; justify-content: space-between; }
.esp-novo-btn { font-size: 14px; padding: 10px 16px; }
.esp-modelo { max-width: 520px; flex: 1 1 320px; background: #fff; border: 1px solid var(--line, #e6e1d6); border-radius: 10px; padding: 8px 12px; }
.esp-modelo summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.esp-modelo[open] { display: grid; gap: 6px; }
.esp-form { display: grid; gap: 12px; max-width: 720px; }
.esp-campo { display: grid; gap: 6px; }
.esp-cli-esc { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; padding: 8px 10px; background: #e8f0e9; border-radius: 10px; }
.esp-cli-novo { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; }
.esp-cli-novo small { grid-column: 1 / -1; }
.esp-aviso { width: 100%; display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: #8a6200; }
.esp-chip { padding: 3px 6px; }
.esp-chip > span { font-weight: 600; }
.esp-tem { background: #fff3d6; color: #7a5600; border-radius: 999px; padding: 1px 6px; font-size: 12px; }
.esp-erro:empty { display: none; }
.esp-abas { margin-bottom: 10px; overflow-x: auto; max-width: 100%; }
.esp-cab-painel { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.esp-cab-painel .esp-abas { margin-bottom: 0; min-width: 0; }
.esp-modo { min-width: 0; max-width: 100%; }
.esp-barra { display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.esp-pilulas { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-width: 0; }
.esp-pil { border: 1px solid var(--line, #e6e1d6); background: #faf8f3; color: var(--ink, #222); border-radius: 999px; padding: 4px 10px; font-size: 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; transition: border-color .15s, background .15s; }
.esp-pil b { font-weight: 700; opacity: .85; }
.esp-pil:hover { border-color: var(--green, #2C5234); background: #fff; }
.esp-pil.sem { border-style: dashed; color: #6b6352; }
.esp-pil.on { background: var(--green, #2C5234); border-color: var(--green, #2C5234); border-style: solid; color: #fff; }
.esp-busca { flex: 1 1 210px; max-width: 300px; min-width: 0; height: 34px; }
.esp-lista { display: grid; gap: 10px; min-width: 0; }
.esp-grupo { border: 1px solid var(--line, #e6e1d6); border-radius: 12px; background: #fff; overflow: hidden; min-width: 0; }
.esp-grupo-cab { list-style: none; cursor: pointer; padding: 9px 12px; display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 6px 12px; background: #f4f0e6; user-select: none; }
.esp-grupo-cab::-webkit-details-marker { display: none; }
.esp-grupo-cab:hover { background: #eee9dc; }
.esp-grupo-esq { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.esp-grupo-esq::before { content: "▸"; font-size: 12px; color: var(--muted, #6b7a70); transition: transform .15s; display: inline-block; }
.esp-grupo[open] > .esp-grupo-cab .esp-grupo-esq::before { transform: rotate(90deg); }
.esp-ini { width: 24px; height: 24px; border-radius: 50%; background: var(--green, #2C5234); color: #fff; font-size: 12px; font-weight: 700; display: inline-grid; place-items: center; flex: none; }
.esp-grupo-sem .esp-ini { background: #9c8c6b; }
.esp-grupo-nome { font-size: 14px; color: var(--dark, #1F3D2B); }
.esp-grupo-qtd { font-size: 12px; font-weight: 600; color: #5c5648; background: #e6e0d2; border-radius: 999px; padding: 2px 8px; white-space: nowrap; }
.esp-grupo-resumo { font-size: 12px; min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.esp-grupo-corpo { padding: 0 12px; display: grid; gap: 0; min-width: 0; }
/* redesenho (22/11/2026): itens como linhas com divisória, sem barra lateral colorida — o estado está na etiqueta (.esp-st) */
.esp-item { border: 0; border-bottom: 1px solid var(--line, #e6e1d6); border-radius: 0; padding: 12px 4px; display: grid; gap: 4px; background: #fff; min-width: 0; }
.esp-item:last-child { border-bottom: 0; }
.esp-item.esp-chegou { background: #fff; }
.esp-item.esp-nao, .esp-item.esp-canc { opacity: .8; }
.esp-linha { display: flex; justify-content: space-between; align-items: center; gap: 8px 14px; min-width: 0; }
.esp-corpo { display: grid; gap: 3px; min-width: 0; flex: 1 1 auto; }
.esp-cab { display: flex; justify-content: space-between; gap: 6px 8px; align-items: center; flex-wrap: wrap; }
.esp-cli-linha { display: flex; align-items: baseline; gap: 4px 6px; flex-wrap: wrap; min-width: 0; }
.esp-tags-dir { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.esp-nome { font-size: 14.5px; }
.esp-ficha { margin-left: 4px; font-size: 12px; }
.esp-st { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 8px; background: #eee; color: #555; white-space: nowrap; }
.esp-st.esp-chegou { background: #fff0c2; color: #7a5600; }
.esp-st.esp-esperando { background: #f0ede4; color: #6b6352; }
.esp-st.esp-avisado { background: #e3ecfa; color: #1F4FA0; }
.esp-st.esp-comprou { background: #e3f2e6; color: #23683a; }
.esp-st.esp-nao, .esp-st.esp-canc { background: #f3e3e0; color: #a33; }
.esp-meio { font-size: 13px; line-height: 1.35; overflow-wrap: anywhere; }
.esp-prod { font-weight: 600; color: var(--green, #2C5234); }
.esp-sit { font-size: 13px; }
.esp-obs { color: #6b6352; font-style: italic; }
.esp-meta { font-size: 12px; }
.esp-aviso-inline { color: #8a6200; font-weight: 500; }
.esp-vend-wrap { display: inline-flex; align-items: center; }
.esp-vend-tag { border: 1px solid #cfe0d2; background: #eef5ef; color: var(--green, #2C5234); border-radius: 999px; padding: 2px 8px; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.esp-vend-tag:hover { border-color: var(--green, #2C5234); background: #e3efe5; }
.esp-vend-tag.sem { background: #fff3d6; border-color: #e6cc8f; color: #7a5600; }
.esp-trocar-vend { font-size: 12px; padding: 0 2px; }
.esp-vend-sel { height: 26px; padding: 0 6px; font-size: 12px; width: auto; max-width: 170px; }
.esp-msg { margin-top: 4px; font-size: 13px; font-family: inherit; line-height: 1.4; }
.esp-modelo textarea { font-family: inherit; }
.esp-acoes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.esp-acoes-dir { margin-top: 0; flex: none; }
.ped-esp { background: #fff0c2 !important; color: #7a5600 !important; text-decoration: none; }
@media (max-width: 760px) {
  .esp-linha { flex-direction: column; align-items: stretch; }
  .esp-acoes-dir { margin-top: 4px; }
  .esp-acoes .btn { flex: 1 1 auto; text-align: center; min-height: 40px; }
  .esp-modelo { max-width: none; }
  .esp-busca { flex-basis: 100%; max-width: none; }
  .esp-grupo-resumo { white-space: normal; }
}
.esp-sug-gen em, .esp-chip em { font-style: normal; font-weight: 500; color: #7a5600; font-size: 12px; }
.esp-cli-novo[hidden], .esp-cli-esc[hidden] { display: none; }
.esp-dupla { grid-template-columns: minmax(160px, 1fr) 2fr; gap: 10px; }
@media (max-width: 760px) { .esp-dupla { grid-template-columns: 1fr; } }
[hidden] { display: none !important; }

/* ---- Inventário ---- */
.inv-topo { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.inv-nova-btn { font-size: 14px; padding: 10px 16px; }
.inv-lista { display: grid; gap: 8px; }
.inv-linha { display: grid; gap: 6px; text-align: left; width: 100%; background: #fff; border: 1px solid var(--line, #e6e1d6); border-radius: 10px; padding: 10px 12px; cursor: pointer; font: inherit; }
.inv-linha:hover { border-color: var(--green, #2C5234); }
.inv-linha-top { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.inv-barra { height: 8px; border-radius: 999px; background: #ece7db; overflow: hidden; }
.inv-barra i { display: block; height: 100%; background: var(--green, #2C5234); border-radius: 999px; transition: width .2s; }
.inv-st { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 8px; white-space: nowrap; background: #eee; color: #555; }
.inv-st-cont { background: #fff0c2; color: #7a5600; } .inv-st-rev { background: #e3ecfa; color: #1F4FA0; } .inv-st-ger { background: #e3ecfa; color: #1F4FA0; }
.inv-st-ok { background: #e3f2e6; color: #23683a; } .inv-st-canc { background: #f3e3e0; color: #a33; }
.inv-antigas summary { cursor: pointer; font-weight: 600; }
.inv-como ol { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; }
.inv-form { display: grid; gap: 12px; max-width: 760px; }
.inv-modos .seg { flex-wrap: wrap; }
.inv-modo-corpo { display: grid; gap: 8px; }
.inv-dupla { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.inv-previa { font-size: 14px; color: var(--green, #2C5234); min-height: 18px; }
.inv-previa b { font-size: 20px; }
.inv-check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; }
.inv-check input { margin-top: 3px; width: 18px; height: 18px; }
.inv-cab { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.inv-titulo { font-size: 17px; }
.inv-fixo { position: sticky; top: 100px; z-index: 5; display: grid; gap: 8px; padding: 10px 12px; }
.inv-prog { display: grid; gap: 4px; }
.inv-ferr { display: flex; gap: 8px; }
.inv-busca { flex: 1; }
.inv-itens { display: grid; gap: 6px; margin-top: 10px; }
.inv-grupo { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); margin: 10px 2px 2px; }
.inv-item { display: flex; gap: 10px; align-items: center; justify-content: space-between; background: #fff; border: 1px solid var(--line, #e6e1d6); border-radius: 10px; padding: 8px 10px; }
.inv-item.feito { border-color: var(--good); background: var(--good-l); } /* contado: fundo e borda (sem barra lateral, revisão de 22/11) */
.inv-item-txt { display: grid; gap: 2px; min-width: 0; }
.inv-item-txt b { font-size: 14px; }
.inv-item-qtd { display: flex; align-items: center; gap: 6px; flex: none; }
.inv-campo { position: relative; display: flex; align-items: center; }
.inv-campo span { position: absolute; right: 8px; font-size: 12px; color: var(--muted); pointer-events: none; }
.inv-qtd { width: 104px !important; text-align: right; padding-right: 28px !important; font-size: 18px !important; font-weight: 600; height: 44px; }
.inv-passo { width: 40px; height: 44px; border-radius: 10px; border: 1px solid var(--line, #e6e1d6); background: #f6f3ec; font-size: 18px; cursor: pointer; }
.inv-passo:disabled { opacity: .4; }
.inv-dif { font-size: 12px; font-weight: 700; margin-right: 6px; }
.inv-dif.ok { color: #23683a; } .inv-dif.mais { color: #1F4FA0; } .inv-dif.menos { color: #a33; }
.inv-salvo { font-size: 12px; color: var(--muted); }
.inv-salvo.ok { color: #23683a; } .inv-salvo.neg { color: #a33; }
.inv-incluir { margin-top: 12px; background: #fff; border: 1px dashed var(--line, #e6e1d6); border-radius: 10px; padding: 8px 12px; }
.inv-incluir summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.inv-rodape { position: sticky; bottom: 0; background: linear-gradient(transparent, var(--bg, #f3efe6) 30%); padding: 14px 0 6px; display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.inv-rodape .btn { min-height: 46px; padding: 0 22px; font-size: 15px; }
.inv-acoes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.inv-passos { margin-bottom: 10px; font-size: 13px; }
.inv-revfil { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.inv-camera { position: fixed; inset: 0; z-index: 100; background: #000; display: grid; place-items: center; }
.inv-video { width: 100%; height: 100%; object-fit: cover; }
.inv-mira { position: absolute; width: 70%; height: 22%; border: 3px solid #C9A227; border-radius: 12px; }
.inv-camera .btn { position: absolute; bottom: 24px; }
@media (max-width: 760px) {
  .inv-fixo { top: 0; border-radius: 0 0 12px 12px; }
  .inv-item { flex-wrap: wrap; }
  .inv-item-qtd { width: 100%; justify-content: flex-end; }
  .inv-qtd { flex: 1; width: 100% !important; min-width: 0; }
  .inv-campo { flex: 1; min-width: 0; }
  .inv-item { min-width: 0; }
  .inv-item-txt { width: 100%; }
  .inv-dupla { grid-template-columns: 1fr; }
  .inv-rodape .btn { width: 100%; }
}
.inv-zerar { display: grid; gap: 8px; }
.inv-zerar.on { border: 2px solid #e2b4ad; background: #fffaf8; }
.inv-zerar-res { font-size: 14px; color: #a33; }
.inv-zerar-grupos { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 6px; }
.inv-zerar-g { display: flex; gap: 8px; align-items: center; background: #fff; border: 1px solid var(--line, #e6e1d6); border-radius: 8px; padding: 6px 8px; font-size: 13px; }
.inv-zerar-g span { flex: 1; }
.inv-zerar-lista summary, .inv-antigas details summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.inv-envio { display: grid; gap: 6px; border: 2px solid #c8d8f2; background: #f6f9ff; }
.inv-envio-tit { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.inv-envio-sub { flex-basis: 100%; }
.inv-vivo { font-family: ui-monospace, monospace; font-size: 12px; }
.inv-log { max-height: 260px; overflow: auto; font-size: 12px; background: #1f2a22; color: #e9f2ea; padding: 8px; border-radius: 8px; white-space: pre-wrap; }
.inv-enviar { font-size: 14px; padding: 9px 18px; }
.cp-modal-bg { position: fixed; inset: 0; background: rgba(20, 30, 22, .45); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; }
/* perguntas e avisos (TS.perguntar, TS.avisar, TS.naoSalvo) ficam por cima de tudo, inclusive da ficha do cliente (camada-cheia, 900): antes o aviso abria atrás dela */
.cp-modal-bg.ts-aviso-bg { z-index: 1100; }
.cp-copiar { width: min(460px, 100%); max-height: 90vh; overflow: auto; display: grid; gap: 10px; }
.cp-copiar h3 { margin: 0; }
.cp-lojas { display: grid; gap: 4px; max-height: 50vh; overflow: auto; }
.cp-loja { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 8px; cursor: pointer; }
.cp-loja:hover { background: #f3f1ea; }
.cp-recebidas { display: grid; gap: 8px; margin: 10px 0 14px; }
.cp-recebida { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; border-left: 4px solid #1F5FBF; }
.cp-recebida > div:first-child { min-width: 0; flex: 1 1 260px; }
.cp-recebida-msg { font-size: 12.5px; margin-top: 4px; white-space: pre-line; }
.cp-recebida-acoes { display: flex; gap: 6px; flex-wrap: wrap; }
.cp-campos { display: flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; }
.cp-tag { font-family: ui-monospace, monospace; font-size: 12px; padding: 3px 8px; min-height: 28px; }
.cp-faltam { display: block; margin-top: 6px; color: #8a5a00; }
.cp-motivo { display: block; color: #8a5a00; font-size: 12px; }
.cp-variacoes { display: grid; gap: 8px; margin-top: 8px; }
.cp-var-top { display: flex; justify-content: space-between; align-items: center; }
.cp-var-acoes { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 6px 0 4px; }
.cp-hoje { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 10px; background: #eef4ec; color: #2C5234; margin-bottom: 6px; }
.cp-hoje.fim { background: #fbeee0; color: #8a5a00; }
.cp-var-txt { white-space: pre-line; }
.ped-est-vivo { display: grid; gap: 6px; margin-top: 6px; }
.ped-cat-info .neg { color: #B23B2E; }
.aviso-versao { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 300; display: flex; gap: 12px; align-items: center; background: #1f2a22; color: #fff; padding: 10px 14px; border-radius: 12px; box-shadow: 0 6px 24px rgba(0,0,0,.25); font-size: 14px; }
.nfe-topo { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.nfe-form { display: grid; gap: 12px; }
.nfe-cad { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.nfe-grade { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; }
@media (max-width: 760px) { .nfe-grade { grid-template-columns: 1fr; } }
.nfe-campo { display: grid; gap: 4px; align-content: start; min-width: 0; }
.nfe-campo > label { font-size: 12px; font-weight: 600; color: #556; }
.nfe-sug { display: grid; gap: 2px; }
.nfe-sug-i { text-align: left; background: #f6f4ee; border: 1px solid #e6e1d4; border-radius: 8px; padding: 6px 8px; cursor: pointer; }
.nfe-sug-i:hover { background: #ece8dc; }
.nfe-escolhido { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.nfe-check { display: flex; gap: 6px; align-items: center; font-size: 13px; }
.nfe-itens { display: grid; gap: 6px; }
.nfe-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto 90px auto; gap: 8px; align-items: center; padding: 6px 8px; border: 1px solid #eee8da; border-radius: 8px; }
@media (max-width: 760px) { .nfe-item { grid-template-columns: 1fr 1fr; } .nfe-item-n { grid-column: 1 / -1; } }
.nfe-num { width: 90px; }
.nfe-lin { text-align: right; }
.nfe-total { font-size: 15px; text-align: right; }
.nfe-fixos { font-size: 12px; }
.nfe-vivo { display: grid; gap: 6px; }
.nfe-ras { display: grid; gap: 6px; }
.nfe-ras-l { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 6px 0; border-bottom: 1px solid #f0ece2; }
.nfe-st { font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 10px; }
.nfe-st-fila { background: #eef3fb; color: #1F5FBF; }
.nfe-st-ok { background: #e7f3e7; color: #2C5234; }
.nfe-st-erro { background: #fbe9e7; color: #B23B2E; }
.nfe-erro { flex-basis: 100%; font-size: 12px; color: #B23B2E; }
.dev-barra { margin: 10px 0; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dev-feitas { flex-basis: 100%; display: grid; gap: 4px; }
.dev-feita { font-size: 13px; }
.dev-st { font-size: 12px; font-weight: 600; padding: 1px 8px; border-radius: 10px; }
.dev-st.ok { background: #e7f3e7; color: #2C5234; } .dev-st.erro { background: #fbe9e7; color: #B23B2E; }
.dev-form { flex-basis: 100%; display: grid; gap: 10px; border: 2px solid #e3ded2; }
.dev-itens { display: grid; gap: 6px; max-height: 50vh; overflow: auto; padding-right: 4px; }
.dev-item { border: 1px solid #eee8da; border-radius: 8px; padding: 8px; }
.dev-item-top { display: flex; gap: 8px; align-items: flex-start; cursor: pointer; }
.dev-det { display: grid; gap: 8px; margin: 8px 0 0 26px; }
.dev-linha { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.dev-num { width: 90px; }
.dev-fotos { display: flex; gap: 8px; flex-wrap: wrap; }
.dev-foto { position: relative; }
.dev-foto img { width: 110px; height: 82px; object-fit: cover; border-radius: 6px; border: 1px solid #ddd; }
.dev-foto-x { position: absolute; top: 2px; right: 2px; border: 0; background: rgba(0,0,0,.6); color: #fff; border-radius: 50%; width: 22px; height: 22px; cursor: pointer; }
.dev-dest { display: grid; gap: 6px; }
.dev-st.fila { background: #eef3fb; color: #1F5FBF; } .dev-st.canc { background: #f3e3e0; color: #a33; text-decoration: line-through; }
.dev-feita { display: grid; gap: 4px; padding: 8px 0; border-bottom: 1px solid #f0ece2; }
.dev-feita-cab { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.dev-nfe-linha { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.dev-ver-nfe { padding: 3px 10px; font-size: 12px; font-weight: 600; }
.dev-form textarea { font-family: inherit; }
.nf-dev { background: #fbeee0 !important; color: #8a5a00 !important; margin-left: 4px; }
/* vínculo NF de entrada → NF-e de saída + pop-up sobreposto */
.nf-vinculos { display: grid; gap: 6px; margin: 10px 0 6px; padding: 10px 12px; border: 1px solid #cfe0d2; border-radius: 10px; background: #f4f9f5; }
.nf-vinculos-tit { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: var(--green, #2C5234); }
.nf-vinculo-btn { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; background: #fff; border: 1px solid #d5e2d7; border-radius: 8px; padding: 8px 10px; cursor: pointer; font: inherit; transition: border-color .15s, box-shadow .15s; }
.nf-vinculo-btn:hover { border-color: var(--green, #2C5234); box-shadow: 0 2px 8px rgba(44, 82, 52, .12); }
.nf-vinculo-btn.canc { background: #fcf7f6; border-color: #ead3cf; }
.nf-vinculo-esq { display: flex; align-items: center; gap: 6px 8px; flex-wrap: wrap; min-width: 0; }
.nf-vinculo-ver { font-size: 12px; font-weight: 600; color: var(--green, #2C5234); white-space: nowrap; }
.prc-popup-camada { position: fixed; inset: 0; z-index: 960; background: rgba(15, 24, 18, .52); display: flex; align-items: center; justify-content: center; padding: 18px; }
.prc-popup { position: relative; width: min(880px, 100%); max-height: min(90vh, 860px); margin: 0; border-radius: 16px; overflow-y: auto; padding: 20px 22px 28px; box-shadow: 0 20px 52px rgba(0, 0, 0, .32); animation: prc-popup-in .16s ease-out; }
.prc-popup .card-title { padding-right: 44px; font-size: 18px; }
.prc-popup > .exp-fechar { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: #fff; border: 0; font-size: 16px; cursor: pointer; opacity: 1; }
@keyframes prc-popup-in { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
@media (max-width: 760px) {
  .prc-popup-camada { padding: 8px; align-items: flex-end; }
  .prc-popup { width: 100% !important; max-width: 100%; max-height: 92vh; border-radius: 16px 16px 12px 12px; padding: 16px; }
  .nf-vinculo-btn { flex-direction: column; align-items: flex-start; }
}

/* ---------- Estoque → Validade (lotes do chá a granel) ---------- */
.vl-badge { display: inline-block; border-radius: 6px; padding: 1px 7px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.vl-vencido { --vl: #3a3a3a; --vl-bg: #E4E2DE; }
.vl-critica { --vl: #9E2F1A; --vl-bg: #F6DCD3; }
.vl-acao { --vl: #9A5300; --vl-bg: #FBE6CC; }
.vl-atencao { --vl: #7a5a00; --vl-bg: #F6EBC4; }
.vl-ok { --vl: #2C5234; --vl-bg: #E3EDE1; }
.vl-sem { --vl: #5d6670; --vl-bg: #ECEFF2; }
.vl-badge { color: var(--vl); background: var(--vl-bg); }
.vl-kpis { grid-template-columns: repeat(auto-fit, minmax(138px, 1fr)); }
.vl-kpi { cursor: pointer; }
.vl-kpi::before { background: var(--vl); }
.vl-kpi:hover, .vl-kpi:focus-visible { box-shadow: 0 0 0 2px var(--vl-bg), var(--shadow); outline: none; }
.vl-kpi-risco::before { background: var(--bad); }
.vl-kpi .kpi-value { font-size: 20px; }
.vl-filtros { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.vl-filtros select { min-width: 200px; }
.vl-check { font-size: 13px; color: var(--muted); white-space: nowrap; cursor: pointer; }
.vl-segs { margin: 4px 0 10px; overflow-x: auto; }
.vl-dias, .vl-sub { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
/* a linha pequena embaixo do valor quebra (a tabela da Validade não pode rolar para o lado a 1100 px, mesmo com o "📣 Campanha") */
.vl-tabela .vl-sub, .vl-tabela .vl-dias { white-space: normal; }
.vl-lote { width: 120px; text-transform: uppercase; padding: 5px 8px; }
.vl-lote.vl-vazio { border-color: var(--gold); background: #FFFCF2; }
.vl-val { width: 150px; padding: 4px 8px; }
.vl-val-box { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; }
.vl-salvando { opacity: .55; }
.vl-salvo { border-color: var(--good) !important; box-shadow: 0 0 0 2px #E3EDE1; transition: box-shadow .3s; }
.vl-camp { padding: 4px 10px; font-size: 12px; white-space: nowrap; }
.vl-ajuda ul { margin: 6px 0 0; padding-left: 18px; color: var(--muted); font-size: 13px; line-height: 1.55; }
.vl-lista { list-style: none; margin: 4px 0 6px; padding: 0; display: grid; gap: 6px; }
.vl-lista li { font-size: 13px; }
.pd-vl { margin-left: 6px; cursor: help; }
@media (max-width: 760px) { .vl-lote, .vl-val { width: 100%; min-width: 0; max-width: 100%; } .vl-val-box { min-width: 0; overflow: hidden; } .vl-filtros select { min-width: 0; flex: 1; } }
.vl-saldo { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.vl-aj { color: var(--green); font-weight: 600; }
.vl-ajustar { padding: 0; font-size: 12px; }
.vl-modal { width: min(560px, 100%); max-height: 90vh; overflow: auto; }
.vl-lotes-campos { display: grid; gap: 6px; margin: 10px 0; }
.vl-lote-linha { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.vl-g-box { display: flex; align-items: center; gap: 4px; flex: none; }
.vl-g { width: 90px; text-align: right; }
.vl-soma { font-size: 13px; margin: 4px 0; }
.vl-okk { color: var(--good); font-weight: 700; }
.vl-dif { color: var(--bad); font-weight: 600; }
.vl-erro { color: var(--bad); font-size: 13px; min-height: 1em; }
.inv-item.inv-kg { flex-wrap: wrap; }
.inv-lotes { flex-basis: 100%; border-top: 1px dashed var(--line); padding-top: 6px; }
.inv-lotes[hidden] { display: none; }
.inv-porlote { padding: 0 0 0 6px; font-size: 12px; }
.vl-nota { border: 1px solid #DCE7D8; background: #F6FAF4; border-radius: 10px; padding: 10px 12px; margin: 10px 0; }
.vl-nota-tit { margin-bottom: 4px; }
.vl-falta { color: #9A5300; font-weight: 600; font-size: 13px; }
.vl-falta.ok { color: var(--good); }
.vl-nota-itens { display: grid; gap: 6px; margin-top: 8px; }
.vl-nota-item { display: grid; grid-template-columns: minmax(0, 1fr) 140px 160px; gap: 8px; align-items: end; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.vl-campo { display: grid; gap: 2px; }
.vl-campo small { color: var(--muted); font-size: 12px; }
.vl-nota-item .vl-lote, .vl-nota-item .vl-val { width: 100%; }
.prc-st.vl-pend { background: #FBE6CC; color: #9A5300; }
@media (max-width: 760px) { .vl-nota-item { grid-template-columns: 1fr 1fr; } .vl-nota-cha { grid-column: 1 / -1; } }
.vl-aviso { font-size: 13px; background: #FFF7E6; border: 1px solid #F1D9A8; border-radius: 8px; padding: 8px 10px; margin: 6px 0; }
.inv-zerar-loja { color: var(--bad); }
/* Validade: resumo com a barra das faixas (as faixas são o filtro) */
.vl-alerta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; background: #EFEDE9; border-color: #CFCAC2; color: #2f2f2f; }
/* Validade (revisão de 22/11): cartão-herói — o valor em risco e, mais larga, a coluna das faixas */
.vl-resumo .heroi-cols { grid-template-columns: minmax(220px, 1fr) minmax(0, 2.4fr); grid-auto-flow: row; }
.vl-faixas { display: grid; gap: 10px; min-width: 0; }
.vl-barra { display: flex; height: 12px; border-radius: 6px; overflow: hidden; background: var(--line); }
.vl-barra i { display: block; background: var(--vl); min-width: 3px; }
.vl-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.vl-chip { display: inline-flex; align-items: baseline; gap: 6px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 5px 12px; cursor: pointer; font-size: 12.5px; color: var(--ink); }
.vl-chip b { font-size: 13px; }
.vl-chip small { color: var(--muted); font-size: 12px; }
.vl-chip:hover { border-color: var(--vl, var(--green)); }
.vl-chip.on { background: var(--vl-bg, var(--sage-l)); border-color: var(--vl, var(--green)); box-shadow: inset 0 0 0 1px var(--vl, var(--green)); }
.vl-lista-card .vl-filtros { margin: 8px 0 10px; }
.vl-busca { flex: 1; min-width: 200px; max-width: 360px; }
.vl-valor { display: flex; flex-direction: column; align-items: flex-end; }
details.vl-ajuda summary { cursor: pointer; font-weight: 600; }
@media (max-width: 860px) { .vl-resumo .heroi-cols { grid-template-columns: 1fr; } }
/* Promoção → Para a próxima promoção */
.vl-pp { align-items: stretch; }
.vl-pp > .card { margin: 0; }
.vl-pp-lista { display: grid; gap: 6px; margin-top: 4px; }
.vl-pp-it { display: grid; grid-template-columns: 96px 1fr; gap: 8px; align-items: start; padding: 6px 0; border-bottom: 1px solid var(--line); }
.vl-pp-it:last-child { border-bottom: 0; }
.vl-pp-it .vl-badge { justify-self: start; }
.vl-pp-venc { margin-top: 8px; font-size: 12.5px; background: #EFEDE9; border-radius: 8px; padding: 6px 10px; }
.vl-pp-link { display: inline-block; margin-top: 6px; padding-left: 0; }
.vl-combo { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.vl-combo:last-child { border-bottom: 0; }
.vl-mais { color: var(--gold); font-weight: 700; }
.vl-combo-preco { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; white-space: nowrap; }
.vl-desc { font-size: 12px; font-weight: 700; color: var(--good); background: #E3EDE1; border-radius: 6px; padding: 1px 7px; }
.vl-desc.sem { color: #9A5300; background: #FBE6CC; }
/* RFM */
.cli-tag.rfm-campeao { background: #F3EBCF; color: #6b5200; }
.cli-tag.rfm-leal { background: #E3EDE1; color: #2C5234; }
.cli-tag.rfm-novo { background: #E7EEF7; color: #1F4E8C; }
.cli-tag.rfm-promissor { background: #E9F3E5; color: #3E6B49; }
.cli-tag.rfm-atencao { background: #F6EBC4; color: #7a5a00; }
.cli-tag.rfm-risco { background: #FBE6CC; color: #9A5300; }
.cli-tag.rfm-naoperder { background: #F6DCD3; color: #8E321C; }
.cli-tag.rfm-hibernando { background: #ECEFF2; color: #5d6670; }
.cli-tag.rfm-perdido { background: #E4E2DE; color: #4a4a4a; }
.cli-segs-rfm { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 8px; width: 100%; }
.cli-segs-rfm .f-label { display: inline-flex; gap: 4px; align-items: center; }
.rfm-chip { font-size: 12px; }
.rfm-grid { align-items: start; }
.rfm-t tr.rfm-linha { cursor: pointer; }
.rfm-t tr.rfm-linha:hover td { background: #EEF3EC; }
.rfm-t td.pos { color: var(--good); font-weight: 600; }
.rfm-t td.neg { color: var(--bad); font-weight: 600; }
.rfm-mov { margin-top: 10px; font-size: 13px; background: #FFF7E6; border: 1px solid #F1D9A8; border-radius: 8px; padding: 8px 10px; }
.safra-t td.safra-cel { font-weight: 600; text-align: center; }
.safra-t td.safra-vazio { text-align: center; }
/* Clientes → Hoje */
.hj-cab { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; margin-bottom: 8px; }
.hj-conta { font-size: 13px; color: var(--muted); }
.hj-conta b { color: var(--dark); font-size: 15px; }
.hj-conta .hj-risco { font-size: 13px; color: var(--bad); padding: 4px 2px; }
.hj-card .hj-resumo { margin: 0 0 10px; }
.hj-ferr { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.hj-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.hj-vend { max-width: 240px; }
.hj-lista { display: grid; gap: 8px; }
.hj-item { display: grid; grid-template-columns: minmax(220px, 1.1fr) minmax(0, 1.6fr) auto; gap: 12px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; transition: opacity .4s; }
.hj-item.hj-feito { opacity: .35; }
.hj-quem { display: grid; gap: 4px; min-width: 0; }
.hj-nome { border: 0; background: none; padding: 0; text-align: left; font-weight: 700; font-size: 14px; color: var(--dark); cursor: pointer; min-height: 28px; justify-self: start; overflow-wrap: anywhere; }
.hj-nome:hover { text-decoration: underline; }
.hj-motivos { display: flex; flex-wrap: wrap; gap: 4px; }
:root { --hj-ruim-l: #F6DCD3; --hj-ruim-t: #8E321C; --hj-aten-l: #FBE6CC; --hj-aten-t: #8A4A00; --hj-neutro-t: #5B4A12; } /* etiquetas de motivo (Clientes → Hoje) */
.hj-mot { font-size: 12px; font-weight: 600; border-radius: 6px; padding: 1px 6px; background: var(--cream); color: var(--hj-neutro-t); }
.hj-mot.hj-naoperder { background: var(--hj-ruim-l); color: var(--hj-ruim-t); }
.hj-mot.hj-risco { background: var(--hj-aten-l); color: var(--hj-aten-t); }
.hj-mot.hj-repor { background: var(--sage-l); color: var(--green); }
.hj-mot.hj-validade { background: var(--sage-l); color: var(--green-2); }
/* a mensagem: duas linhas com reticências; tocar mostra inteira */
.hj-msg { font: inherit; font-size: 12.5px; text-align: left; color: var(--muted); background: var(--cream-2); border: 0; border-block: 6px solid var(--cream-2); border-radius: 8px; padding: 0 10px; cursor: pointer; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-width: 0; overflow-wrap: anywhere; } /* a folga de cima e de baixo é borda (fora do corte): com padding, a 3ª linha aparecia pela metade */
.hj-msg.aberta { display: block; -webkit-line-clamp: unset; }
.hj-desfazer { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 60; display: flex; align-items: center; gap: 12px; background: var(--dark); color: #fff; padding: 8px 10px 8px 16px; border-radius: 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .25); font-size: 14px; max-width: calc(100vw - 96px); }
.hj-desfazer .btn { background: #fff; color: var(--dark); border-color: #fff; font-weight: 700; }
.hj-rodape { display: block; margin-top: 10px; }
@media (max-width: 860px) { .hj-item { grid-template-columns: 1fr; } }
/* NF-e: parceiro novo pelo robô */
.np-modal { width: min(640px, 100%); max-height: 92vh; overflow: auto; }
.np-grade { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 12px; margin: 10px 0; }
.np-campo > span { display: flex; gap: 4px; align-items: center; font-size: 12px; color: var(--muted); }
.np-campo[hidden] { display: none; }
.np-campo-cheio { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.np-consulta { font-size: 12px; line-height: 1.35; overflow-wrap: anywhere; }
.np-consulta.pos { color: var(--good); }
.np-consulta.neg { color: var(--bad); }
.np-consulta:empty { display: none; }
.orc-rec-info { margin-top: 6px; }
.nfe-novo-parc { padding-left: 0; margin-top: 4px; }
.nfe-parcs { display: grid; gap: 4px; margin-top: 6px; }
.nfe-parc-l { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
@media (max-width: 600px) { .np-grade { grid-template-columns: 1fr; } }
.cli-wpp a.btn.desab { opacity: .45; }
.cli-sem-estoque, .cp-estoque { background: #FBE6CC; border-color: #F1C98F; color: #6b3d00; }
.cp-sem-estoque { color: #9A5300; font-weight: 600; }
.inv-item-info { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.inv-sis { display: inline-flex; align-items: baseline; gap: 4px; font-size: 13px; color: var(--dark); background: var(--sage-l); border-radius: 6px; padding: 2px 8px; }
.inv-sis b { font-size: 15px; }
.inv-sis.zero { background: #EFEDE9; color: var(--muted); }
.inv-porlote-box { display: inline-flex; align-items: center; gap: 2px; }
.inv-zero-aviso { display: block; margin-top: 6px; }
.nfe-ras-situ { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.nfe-ras-situ .nfe-erro { font-size: 12px; max-width: 300px; white-space: normal; }
.nfe-log-modal { width: min(820px, 100%); max-height: 90vh; overflow: auto; }
.nfe-log-modal pre { max-height: 60vh; overflow: auto; }
.nfe-st-aut { background: #d9efdc; }
.nfe-emitir, .dev-emitir { padding: 4px 12px; font-size: 12px; }
.dev-emitir { margin-left: 8px; }
.inv-hist-ferr { display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; margin: 10px 0 12px; }
.inv-hist-per { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 13px; }
.inv-hist-per .f-input { width: auto; padding: 6px 8px; }
.inv-hist-ferr .search-box, .inv-hist-ferr input[type=search] { min-width: 220px; }
.inv-hist-cont { display: inline-flex; flex-direction: column; gap: 4px; align-items: flex-end; }
.inv-barra.mini { width: 80px; height: 5px; display: block; }
.nf-sinc-box { display: inline-flex; align-items: center; gap: 8px; }
.nf-sinc { white-space: nowrap; }
.nf-sinc-st { white-space: nowrap; }
/* Movimento e escala: abas */
.mapa-abas { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 14px; border-bottom: 1px solid var(--line, #e3ddcf); }
.mapa-aba-btn { background: none; border: 0; border-bottom: 3px solid transparent; padding: 9px 14px; font: inherit; font-weight: 600; color: var(--muted, #6b6b6b); cursor: pointer; margin-bottom: -1px; }
.mapa-aba-btn:hover { color: var(--green, #2C5234); }
.mapa-aba-btn.on { color: var(--green, #2C5234); border-bottom-color: var(--gold, #D4A82A); }
.mapa-resumo { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; padding: 12px 16px; border-radius: var(--radius-card, 14px); background: #fff; border: 1px solid var(--line, #e3ddcf); font-size: 15px; }
/* redesenho: sem barra lateral; a situação vai numa etiqueta em texto (TS.etqPrazo) */
.mapa-resumo .link-btn { margin-left: auto; }
.mes-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.mes-tools-esq { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.nf-sinc-logbox { margin: 4px 0 10px; }
.nf-sinc-logbox summary { cursor: pointer; font-size: 13px; color: var(--muted, #6b6b6b); }
.nf-sinc-log { margin-top: 6px; }
.vl-nota-campos { display: flex; flex-direction: column; gap: 6px; min-width: 150px; }
.vl-nota-par { display: flex; flex-direction: column; gap: 4px; }
.vl-nota-cel .vl-campo small { display: block; font-size: 12px; color: var(--muted, #6b6b6b); }
/* Créditos com a franquia */
.cf-st { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: #eee; }
.cf-ok { background: #d9efdc; color: #1f5a2b; }
.cf-aberto { background: #f3ecd8; color: #7a5b0f; }
.cf-atrasado { background: #f8dcd6; color: #9b2c1c; }
.cf-cinza { background: #ececec; color: #666; }
.cf-sel { width: auto; height: 30px; padding: 2px 6px; font-size: 12.5px; }
.cf-acoes { display: inline-flex; gap: 10px; flex-wrap: wrap; }
.cf-lista { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow: auto; margin: 8px 0; }
.cf-item { display: flex; gap: 8px; align-items: center; }
.nf-desc { color: #1f5a2b; }
.cf-sobra { color: #9b2c1c; }
.cf-conf { padding: 3px 10px; font-size: 12px; min-height: 0; }
/* Créditos: botões da nota e janela "Escolher devoluções" */
.cf-btns { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.cf-b { border: 1px solid var(--line, #d9d2c2); background: #fff; color: var(--green, #2C5234); border-radius: 8px; padding: 5px 10px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; white-space: nowrap; }
.cf-b:hover { background: #f4f1ea; }
.cf-b-ok { background: var(--green, #2C5234); color: #fff; border-color: var(--green, #2C5234); }
.cf-b-ok:hover { background: #24452b; }
.cf-b-cinza { color: #6b6b6b; }
.cf-ligar { width: min(560px, 94vw); }
.cfl-cab { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.cfl-cab h3 { margin: 0 0 2px; }
.cfl-lista { border: 1px solid var(--line, #e3ddcf); border-radius: 10px; overflow: hidden; max-height: 46vh; overflow-y: auto; }
.cfl-tit, .cfl-linha { display: grid; grid-template-columns: 28px 1fr 1fr 100px; gap: 8px; align-items: center; padding: 8px 12px; }
.cfl-tit { background: #f4f1ea; font-size: 12px; color: #6b6b6b; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.cfl-linha { border-top: 1px solid #eee8db; cursor: pointer; }
.cfl-linha:hover { background: #faf8f3; }
.cfl-linha.on { background: #eef6ef; }
.cfl-nf small { display: block; color: #6b6b6b; font-size: 12px; }
.cfl-onde { font-size: 12.5px; color: #6b6b6b; }
.cfl-valor { text-align: right; }
.cfl-soma { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 12px 0 4px; }
.cfl-soma > div { background: #f4f1ea; border-radius: 10px; padding: 8px 12px; }
.cfl-soma small { display: block; font-size: 12px; color: #6b6b6b; }
.cfl-soma.ok > div:last-child { background: #d9efdc; color: #1f5a2b; }
.cfl-soma.passou > div:last-child { background: #f8dcd6; color: #9b2c1c; }
@media (max-width: 560px) { .cfl-tit, .cfl-linha { grid-template-columns: 24px 1fr 80px; } .cfl-onde, .cfl-tit span:nth-child(3) { display: none; } .cf-btns { justify-content: flex-start; } }
/* Créditos: fila "Para resolver", menu ⋯ e resolvidas */
.cfp-lista { display: flex; flex-direction: column; gap: 0; margin-top: 10px; }
.cfp-item { display: grid; grid-template-columns: 170px 1fr auto; gap: 14px; align-items: center; border-bottom: 1px solid var(--line, #e3ddcf); padding: 14px 0; background: transparent; } /* redesenho: linha com divisória, sem caixa nem barra lateral */
.cfp-item:last-child { border-bottom: 0; }
.cfp-nota small { display: block; color: #6b6b6b; font-size: 12px; }
.cfp-desc { margin-top: 6px; }
.cfp-desc b { font-size: 18px; color: var(--green, #2C5234); }
.cfp-rot { font-size: 12px; color: #6b6b6b; margin-bottom: 4px; }
.cfp-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.cfp-chip { background: #f4f1ea; border-radius: 999px; padding: 3px 10px; font-size: 13px; }
.cfp-igual { font-size: 13px; color: #444; }
.cfp-sobra { margin-top: 4px; font-size: 12.5px; color: #9b2c1c; }
.cfp-fecha { margin-top: 4px; font-size: 12.5px; color: #1f5a2b; }
.cfp-vazio { font-size: 13.5px; color: #444; margin-bottom: 2px; }
.cfp-acoes { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.cfp-ok { color: #1f5a2b; margin: 10px 0 0; }
.cf-menu { position: relative; display: inline-block; }
.cf-mais { padding: 5px 10px; font-size: 15px; line-height: 1; }
.cf-menu-lista { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; background: #fff; border: 1px solid var(--line, #e3ddcf); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 4px; min-width: 240px; display: flex; flex-direction: column; }
.cf-menu-lista[hidden] { display: none; }
.cf-menu-lista button { background: none; border: 0; text-align: left; padding: 8px 10px; border-radius: 7px; font: inherit; font-size: 13.5px; cursor: pointer; color: #222; }
.cf-menu-lista button:hover { background: #f4f1ea; }
.cf-tab td:last-child { width: 1%; }
/* frase de lista vazia: ocupa a linha toda (sem isto, a regra "última coluna estreita" de algumas tabelas a espremia a 3 px e o texto saía uma letra por linha no celular) */
.t td.t-vazio { width: auto !important; white-space: normal; text-align: center; padding: 18px 12px; }
.cff summary { cursor: pointer; padding: 2px 0; }
.cff-lista { margin-top: 10px; display: flex; flex-direction: column; }
.cff-linha { display: grid; grid-template-columns: 200px 110px 1fr auto; gap: 10px; align-items: center; padding: 8px 4px; border-top: 1px solid #eee8db; font-size: 13.5px; }
@media (max-width: 760px) {
  .cfp-item { grid-template-columns: 1fr; }
  .cfp-acoes { justify-content: flex-start; }
  .cff-linha { grid-template-columns: 1fr auto; }
}
.cfp-item { grid-template-columns: 170px 1fr 300px; }
.cfp-acoes { display: grid; grid-template-columns: 170px 80px 40px; gap: 6px; justify-content: end; }
.cfp-b1, .cfp-b2 { width: 100%; text-align: center; }
.cfp-acoes .cf-menu, .cfp-acoes .cf-mais { width: 100%; }
@media (max-width: 760px) { .cfp-item { grid-template-columns: 1fr; } .cfp-acoes { justify-content: start; } }
/* Créditos: prêmios de fidelidade / royalties */
.cfr-topo { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.cfr-res { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0; }
.cfr-res > div { background: #f4f1ea; border-radius: 10px; padding: 8px 12px; }
.cfr-res > div.ruim { background: #f8dcd6; color: #9b2c1c; }
.cfr-res small { display: block; font-size: 12px; color: inherit; opacity: .8; }
.cfr-res b { font-size: 17px; }
.cfr-grade { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.cfr-campo { display: flex; flex-direction: column; gap: 4px; font-size: 13px; }
.cfr-campo > span { font-weight: 600; }
.cfr-info { margin: 10px 0 4px; font-size: 13px; background: #f4f1ea; border-radius: 8px; padding: 8px 10px; }
.cfr-info:empty { display: none; }
.cfr-mes { width: min(720px, 96vw); }
.cfr-lanc { margin-top: 12px; }
.cfr-lanc-l { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-top: 1px solid #eee8db; font-size: 13.5px; }
@media (max-width: 640px) { .cfr-res { grid-template-columns: 1fr 1fr; } .cfr-grade { grid-template-columns: 1fr; } }
/* Créditos: relação dos prêmios do mês */
.cfr-mes { width: min(1000px, 96vw); max-height: 92vh; overflow: auto; }
.cfm-topo-btn { display: flex; gap: 6px; }
.cfm-cab, .cfm-item { display: grid; grid-template-columns: 90px 1.2fr 1.3fr 1.3fr; gap: 12px; padding: 8px 10px; }
.cfm-cab { background: var(--green, #2C5234); color: #fff; border-radius: 8px 8px 0 0; font-size: 12px; font-weight: 600; margin-top: 8px; }
.cfm-lista { border: 1px solid var(--line, #e3ddcf); border-top: 0; border-radius: 0 0 8px 8px; }
.cfm-item { border-top: 1px solid #eee8db; font-size: 13.5px; align-items: start; }
.cfm-item:nth-child(even) { background: #faf8f3; }
.cfm-quando small, .cfm-quem small { display: block; color: #6b6b6b; font-size: 12px; }
.cfm-premio > div { display: flex; justify-content: space-between; gap: 8px; }
.cfm-tot { border-top: 1px dashed #ddd; margin-top: 3px; padding-top: 3px; }
.cfm-cupom summary { cursor: pointer; }
.cfm-itens { margin-top: 4px; font-size: 12.5px; color: #444; }
.cfm-itens > div { display: flex; justify-content: space-between; gap: 8px; }
.cfm-semcupom { color: #9a7a20; font-size: 12.5px; }
@media (max-width: 760px) { .cfm-cab { display: none; } .cfm-item { grid-template-columns: 1fr; gap: 4px; } .cfm-lista { border-top: 1px solid var(--line, #e3ddcf); border-radius: 8px; } }
.cfm-como { display: block; font-size: 12px; color: #1f5a2b; } .cfm-como.aprox { color: #9a7a20; }
/* Créditos: cobrança por e-mail */
.cfe { width: min(760px, 96vw); max-height: 92vh; overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.cfe-sec { font-weight: 700; font-size: 13px; color: var(--green, #2C5234); margin-top: 4px; }
.cfe-itens { max-height: 26vh; }
.cfe-msg { min-height: 130px; font-family: inherit; line-height: 1.45; }
.cfe-prev { border: 1px solid var(--line, #e3ddcf); border-radius: 10px; padding: 6px 10px; overflow-x: auto; background: #fff; }
.cfe-info { font-size: 12.5px; display: flex; flex-direction: column; gap: 2px; }
.cfr-btns { display: flex; gap: 8px; flex-wrap: wrap; }
/* Créditos: "Compensada em nota fiscal de entrada" (COMP-01) — janela com a busca e a tabela das notas, sem rolar para o lado */
.cfn { width: min(720px, 96vw); max-height: 92vh; overflow-x: hidden; overflow-y: auto; }
.cfn > * { min-width: 0; }
.cfn .table-wrap { max-height: none; overflow-x: hidden; }
.cfn-t td, .cfn-t th { white-space: normal; overflow-wrap: anywhere; }
.cfn-t td small.est-tam { display: block; }
.cfn-frq { margin-left: 6px; }
.cfn-escolha { font-size: 13.5px; padding: 8px 0 0; border-top: 1px solid var(--line); }
.cfn-digitar summary { cursor: pointer; font-weight: 600; color: var(--green); padding: 4px 0; }
.cfn-digitar[open] summary { margin-bottom: 6px; }
.cf-menu-lista { position: fixed; right: auto; top: 0; left: 0; z-index: 1000; min-width: 0; }
/* Orçamento */
.orc-topo { display: flex; justify-content: flex-end; }
.orc-grade { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 14px; align-items: start; }
.orc-lado { position: sticky; top: 12px; }
.orc-painel .orc-l { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; font-size: 13.5px; }
.orc-painel .orc-tot { font-size: 16px; }
.orc-painel .orc-dest b { font-size: 15px; }
.orc-painel .orc-liq b { font-size: 18px; color: var(--green, #2C5234); }
.orc-painel .orc-l.neg b { color: #b23a2b; }
.orc-painel hr { border: 0; border-top: 1px solid #eee8db; margin: 6px 0; }
.orc-acoes { display: flex; flex-direction: column; gap: 8px; }
.orc-acoes .btn { width: 100%; }
.orc-aprov { background: #d9efdc; border-color: #8fbf96; color: #1f5a2b; }
.orc-busca { position: relative; margin-bottom: 10px; }
.orc-sugs { position: absolute; left: 0; right: 0; top: 100%; z-index: 20; background: #fff; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); max-height: 50vh; overflow: auto; }
.orc-sugs:empty { display: none; }
.orc-sug { display: flex; justify-content: space-between; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid #f0ebe0; padding: 9px 12px; font: inherit; font-size: 13.5px; cursor: pointer; }
.orc-sug:hover { background: #f4f1ea; }
.orc-sug small { color: #6b6b6b; }
.orc-sug-vazio { padding: 10px 12px; }
.orc-cab, .orc-linha { display: grid; grid-template-columns: minmax(160px, 2.2fr) 70px 95px 70px 95px 85px 70px 34px; gap: 8px; align-items: center; }
.orc-cab { font-size: 12px; color: #6b6b6b; font-weight: 600; text-transform: uppercase; padding: 0 0 6px; border-bottom: 1px solid #eee8db; }
.orc-linha { padding: 8px 0; border-bottom: 1px solid #f0ebe0; font-size: 13.5px; }
.orc-prod small { display: block; font-size: 12px; }
.orc-num { padding: 6px 8px; text-align: right; }
.orc-v { text-align: right; }
.orc-x { padding: 4px 8px; }
.orc-cond { grid-template-columns: repeat(3, 1fr); }
.orc-com { align-self: end; }
@media (max-width: 1000px) { .orc-grade { grid-template-columns: 1fr; } .orc-lado { position: static; } }
@media (max-width: 700px) {
  .orc-cab { display: none; }
  .orc-linha { grid-template-columns: 1fr 1fr 1fr; }
  .orc-prod { grid-column: 1 / -1; }
  .orc-linha > span[data-r]::before { content: attr(data-r); display: block; font-size: 12px; color: #6b6b6b; }
  .orc-cond { grid-template-columns: 1fr 1fr; }
}
/* documento do orçamento (impressão) */
.orc-doc h2 { margin: 0; color: var(--green, #2C5234); }
.orc-doc-cab { display: flex; justify-content: space-between; gap: 20px; border-bottom: 3px solid var(--green, #2C5234); padding-bottom: 10px; margin-bottom: 12px; }
.orc-doc .r { text-align: right; }
.orc-doc-cli { margin-bottom: 12px; }
.orc-doc-t { width: 100%; border-collapse: collapse; }
.orc-doc-t th { background: var(--green, #2C5234); color: #fff; padding: 6px 8px; text-align: left; }
.orc-doc-t td { padding: 6px 8px; border-bottom: 1px solid #e6e0d2; }
.orc-doc-t .tot td { font-weight: 700; font-size: 15px; background: #e8efe7; }
.orc-doc-cond { margin-top: 14px; display: flex; flex-direction: column; gap: 4px; }
.nf-impacto { border: 1px solid #f0c9a8; background: #fff8f1; border-radius: 10px; padding: 10px 12px; margin-top: 10px; } .nf-impacto .f-label { margin-top: 0; color: #9a4a12; }
.nf-impacto-l { display: flex; align-items: center; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
.nf-impacto-l > div { flex: 1 1 260px; min-width: 0; }
.nf-marg-filtro { flex: 0 0 auto; }
/* item da nota cujo custo novo baixou a margem de produto à venda: fundo amarelo */
.t tbody tr.nf-marg td, .t tbody tr.nf-marg:nth-child(even) td, .t tbody tr.nf-marg:hover td { background: #FFF6CC; }
.t.t-mob tr.nf-marg, .t.t-mob tbody tr.nf-marg:nth-child(even) { background: #FFF6CC; border-color: #EBCB5B; }
.t.t-mob tr.nf-marg td { background: transparent; }
.nf-marg-info { display: block; margin-top: 4px; font-size: 12px; font-weight: 400; color: #7A5A00; line-height: 1.35; white-space: normal; }
.nf-marg-info b { color: var(--bad); }
.nf-marg-btn { background: none; border: 0; padding: 0; cursor: pointer; text-align: left; text-decoration: underline; text-underline-offset: 2px; font: inherit; font-size: 12px; color: #7A5A00; }
.nf-marg-pop .card-sub { margin-bottom: 10px; padding-right: 44px; }
.nf-marg-pop > small { display: block; margin-top: 10px; }
.nf-hist-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-align: left; cursor: pointer; }
.nf-hist-btn:hover { text-decoration: underline; }
.nf-hist-lnk { background: none; border: 0; padding: 0; font: inherit; font-size: inherit; color: var(--green, #2C5234); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.nf-hist-pop .card-sub { padding-right: 44px; margin-bottom: 10px; }
.t tbody tr.nf-hist-esta td, .t tbody tr.nf-hist-esta:nth-child(even) td { background: #EEF3EC; font-weight: 600; }
.t.t-mob tr.nf-hist-esta, .t.t-mob tbody tr.nf-hist-esta:nth-child(even) { background: #EEF3EC; }
/* Hoje: meta do dia */
.md-card { margin-bottom: 12px; }
.md-topo { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.md-num { text-align: right; }
.md-num b { display: block; font-size: 24px; color: var(--green, #2C5234); }
.md-num small { color: #6b6b6b; font-size: 12px; }
.md-barra { height: 7px; border-radius: 999px; background: #ece7db; overflow: hidden; margin-top: 6px; }
.md-barra i { display: block; height: 100%; background: var(--gold, #D4A82A); border-radius: 999px; }
.md-vends { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 16px; margin-top: 12px; }
.md-v { display: grid; grid-template-columns: 1fr auto; align-items: baseline; gap: 2px 8px; font-size: 13.5px; }
.md-v .md-barra { grid-column: 1 / -1; margin-top: 2px; }
.md-alvo small { color: #6b6b6b; }
.md-nota { display: block; margin-top: 8px; }
.md-escala { margin: 6px 0 0; font-size: 12.5px; }
/* Checklist */
.ck-dia { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.ck-editar { margin-left: auto; }
.ck-grade { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.ck-parte.ok { } /* completo: a etiqueta "✓ completo" diz (sem barra lateral, redesenho) */
.ck-topo { display: flex; justify-content: space-between; align-items: center; }
.ck-topo h2.card-title { margin: 0; }
.ck-cont { color: var(--green, #2C5234); }
.ck-lista { display: flex; flex-direction: column; margin: 10px 0; }
.ck-item { display: grid; grid-template-columns: 26px 1fr auto; gap: 8px; align-items: center; padding: 10px 4px; border-top: 1px solid #f0ebe0; cursor: pointer; font-size: 14.5px; }
.ck-item input { width: 20px; height: 20px; }
.ck-item.on .ck-txt { color: #6b6b6b; text-decoration: line-through; }
.ck-quem { color: #1f5a2b; font-size: 12px; white-space: nowrap; }
.ck-obs { min-height: 54px; }
.ck-ed { width: min(860px, 96vw); max-height: 92vh; overflow: auto; }
.ck-ed-grade { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.ck-ed-l { display: grid; grid-template-columns: 1fr auto auto; gap: 6px; margin-bottom: 6px; }
@media (max-width: 760px) { .ck-grade, .ck-ed-grade { grid-template-columns: 1fr; } }
.orc-cli-campo { margin-bottom: 0; }
.orc-cli-sugs { min-width: 280px; }
.orc-cli-info { margin-top: 8px; font-size: 13px; color: #444; }
.orc-cli-info:empty { display: none; }
.orc-salve { display: block; text-align: center; } .orc-salve:empty { display: none; } .orc-acoes .btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- IA: Pergunte ao painel, revisão do pedido, configuração ---------- */
.ia-btn { font-size: 18px; }
.ia-gaveta { display: flex; flex-direction: column; padding: 18px 18px 12px; overflow: hidden; width: min(620px, 100%); }
.ia-cab { padding-right: 44px; }
.ia-sub { font-size: 13px; margin-top: 2px; }
.ia-lista { flex: 1; min-height: 0; overflow-y: auto; padding: 10px 2px; display: flex; flex-direction: column; gap: 10px; }
.ia-rodape { display: flex; gap: 8px; align-items: flex-end; border-top: 1px solid var(--line); padding-top: 10px; }
.ia-txt { flex: 1; resize: none; min-height: 44px; max-height: 140px; font-size: 15px; }
.ia-nota { display: block; margin-top: 6px; font-size: 12px; }
.ia-msg { border-radius: 12px; padding: 10px 12px; max-width: 100%; line-height: 1.45; font-size: 14.5px; }
.ia-eu { align-self: flex-end; background: var(--green); color: #fff; max-width: 85%; white-space: pre-wrap; }
.ia-ela { align-self: stretch; background: var(--cream-2); border: 1px solid var(--line); }
.ia-erro { border-color: var(--bad); color: var(--bad); }
.ia-passos { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.ia-pensando { color: var(--muted); font-size: 13px; }
.ia-md p { margin: 0 0 8px; }
.ia-md p:last-child { margin-bottom: 0; }
.ia-md ul, .ia-md ol { margin: 0 0 8px; padding-left: 20px; }
.ia-md li { margin: 2px 0; }
.ia-md .ia-tit { font-weight: 700; color: var(--dark); }
.ia-md code { background: var(--sage-l); border-radius: 4px; padding: 0 4px; font-size: 13px; }
.ia-tab-w { overflow-x: auto; margin: 4px 0 8px; }
.ia-tab { border-collapse: collapse; font-size: 13px; width: 100%; }
.ia-tab th, .ia-tab td { border-bottom: 1px solid var(--line); padding: 4px 8px; text-align: left; white-space: nowrap; }
.ia-tab th { color: var(--muted); font-weight: 600; white-space: normal; vertical-align: bottom; }
.ia-tab td:first-child { white-space: normal; min-width: 110px; } /* nome do produto quebra a linha; números ficam inteiros */
.ia-tab td.n { text-align: right; font-variant-numeric: tabular-nums; }
.ia-graf { margin-top: 8px; background: #fff; border-radius: 10px; padding: 8px; border: 1px solid var(--line); }
.ia-graf-t { font-weight: 600; font-size: 13px; margin-bottom: 4px; }
.ia-graf-box { height: 220px; }
.ia-cli { margin-top: 8px; }
.ia-acoes { margin-top: 6px; text-align: right; }
.ia-vazio p { color: var(--muted); margin: 6px 0 10px; }
.ia-sugs { display: flex; flex-direction: column; gap: 8px; }
.ia-sug { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; cursor: pointer; font: inherit; font-size: 14px; color: var(--ink); }
.ia-sug:hover { border-color: var(--sage); background: var(--sage-l); }
.ia-aviso .notice { margin: 8px 0 0; }
@media (max-width: 600px) { .ia-gaveta { padding: 14px 12px 10px; } .ia-eu { max-width: 92%; } }
.ia-chave { margin-top: 12px; display: grid; gap: 8px; }
.ia-chave-cab { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px; }
.ia-uso { display: grid; gap: 4px; }
.ia-barra { height: 8px; background: var(--sage-l); border-radius: 6px; overflow: hidden; max-width: 420px; }
.ia-barra span { display: block; height: 100%; background: var(--green-2); }
.ia-barra span.alto { background: var(--bad); }
.ia-chave-acoes label { display: inline-flex; align-items: center; gap: 6px; }
.ia-form { margin-top: 12px; display: grid; gap: 10px; }
.ia-cks { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.ia-ck { display: inline-flex; align-items: center; gap: 4px; }
.ia-passo { margin-top: 6px; }
.ped-ia .ia-md { margin: 6px 0; }
.ped-ia-alertas { margin: 6px 0; padding-left: 4px; list-style: none; }
.ped-ia-alertas li { margin: 3px 0; }
.ped-ia-t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.ped-ia-t th, .ped-ia-t td { padding: 6px 8px; border-bottom: 1px solid var(--line); text-align: right; vertical-align: top; }
.ped-ia-t .l { text-align: left; }
.ped-ia-mot { min-width: 220px; color: var(--ink); }
.ped-ia-feito td { opacity: .65; }
/* celular: o ✨ sai do topo (não quebra o cabeçalho em duas linhas) e vira botão flutuante */
.ia-fab { display: none; }
@media (max-width: 760px) {
  #btnIA { display: none; }
  .ia-fab { display: flex; position: fixed; right: 14px; bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 60; width: 52px; height: 52px; border-radius: 50%; border: 0; align-items: center; justify-content: center;
    background: var(--green); color: #fff; font-size: 22px; box-shadow: 0 4px 14px rgba(31, 61, 43, .35); cursor: pointer; }
  body.com-ped-barra .ia-fab { bottom: calc(84px + env(safe-area-inset-bottom)); }
  body.com-camada .ia-fab { display: none; }
  /* o ✨ não cobre ação: some enquanto a pessoa rola para baixo (volta ao rolar para cima ou parar no topo) e o fim da página tem folga do tamanho dele */
  .ia-fab { transition: transform .2s, opacity .2s; }
  .ia-fab.ia-fab-some { transform: translateY(calc(100% + 24px)); opacity: 0; pointer-events: none; }
  body:has(.ia-fab) .content { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  /* links de ação no meio do texto: pelo menos 24 px de toque (o preenchimento não mexe nas linhas) */
  :where(.content) a:where(:not(.btn)) { padding-block: 5px; }
}
.ini-porque { border-left: 4px solid var(--gold); }
.ini-porque-c { color: var(--muted); }
.ini-porque-m { font-size: 16px; font-weight: 600; color: var(--dark); margin: 4px 0 10px; }
.ini-porque-i { padding: 8px 0; border-top: 1px solid var(--line); }
.ini-porque-i .ia-md { margin-top: 2px; }
.ini-porque-f { margin-top: 4px; color: var(--green); font-weight: 500; }
.ini-porque-fp { margin-top: 6px; }
.ini-porque-st { font-size: 12px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 8px 0 2px; }
.ini-porque-n { display: block; margin-top: 8px; font-size: 12px; }
.ia-cfg .ia-form { display: grid; gap: 10px; margin-top: 10px; max-width: 560px; }
.ia-cfg .ia-teto { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.ia-cfg .ia-chave-cab, .ia-cfg .ia-uso { margin: 6px 0; }
.ia-cfg .ia-chave-acoes { flex-wrap: wrap; }
.ia-hist-top { display: grid; gap: 8px; margin-bottom: 8px; }
.ia-hist { display: grid; gap: 6px; }
.ia-hist-i { display: flex; align-items: stretch; gap: 4px; background: #fff; border: 1px solid var(--line); border-radius: 10px; }
.ia-hist-i.on { border-color: var(--sage); background: var(--sage-l); }
.ia-hist-abrir { flex: 1; min-width: 0; text-align: left; background: none; border: 0; padding: 10px 12px; cursor: pointer; font: inherit; color: var(--ink); display: grid; gap: 2px; }
.ia-hist-abrir b { font-weight: 600; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.ia-hist-del { padding: 0 12px; text-decoration: none; }

/* ===== análise do dia (IA): faixa no Início + aba no ✨ + pontinho ===== */
.ini-faixa-ia { margin: 4px 0 14px; }
.ini-faixa-ia[hidden] { display: none; }
.ini-faixa-ia > .ini-faixa-tag, .ini-faixa-ia > .ini-faixa-txt { display: inline; }
.ini-faixa-btn { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer; font: inherit; color: inherit;
  background: #FFF8E1; border: 1px solid #EBCB5B; border-left: 5px solid #C9A227; border-radius: 12px; padding: 10px 14px; }
.ini-faixa-btn:hover { background: #FFF2C4; }
.ini-faixa-tag { flex: 0 0 auto; font-weight: 700; color: #7A5A00; font-size: 13px; }
.ini-faixa-txt { flex: 1 1 auto; min-width: 0; font-size: 14px; line-height: 1.35; color: var(--dark, #1E2B22);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.ini-faixa-ir { flex: 0 0 auto; font-weight: 600; color: var(--green, #2C5234); white-space: nowrap; font-size: 13px; }
@media (max-width: 600px) {
  .ini-faixa-btn { flex-wrap: wrap; gap: 4px 8px; }
  .ini-faixa-txt { flex-basis: 100%; order: 2; -webkit-line-clamp: 3; }
  .ini-faixa-ir { order: 3; }
}
.ia-abas { margin: 6px 0 8px; }
.ia-abas .seg { width: 100%; display: grid; grid-template-columns: 1fr 1fr; }
.ia-an { display: flex; flex-direction: column; gap: 10px; padding: 4px 2px 8px; }
.ia-an-m { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.35; color: var(--dark, #1E2B22); }
.ia-an-meta { display: block; margin-top: -4px; }
.ia-an-b { border: 1px solid var(--line, #E2DCCF); border-radius: 12px; background: #fff; padding: 0 14px; }
.ia-an-b > summary { cursor: pointer; padding: 12px 0; font-weight: 700; line-height: 1.35; list-style-position: inside; }
.ia-an-b[open] > summary { border-bottom: 1px solid var(--line, #E2DCCF); margin-bottom: 8px; }
.ia-an-porque { font-size: 14px; line-height: 1.5; }
.ia-an-fazer { margin: 8px 0 4px; padding: 8px 10px; border-radius: 10px; background: #EEF3EC; color: #22603A; font-size: 14px; line-height: 1.45; }
.ia-an-perg { display: inline-block; margin: 4px 0 12px; font-size: 13px; }
.ia-an-fp { border: 1px solid #F0C9A8; background: #FFF8F1; border-radius: 12px; padding: 10px 14px; }
.ia-an-fp-t { font-weight: 700; color: #9A4A12; margin-bottom: 6px; }
.ia-an-fp-i { margin-top: 6px; font-size: 14px; line-height: 1.4; }
.ia-an-vazio { padding: 18px 4px; }
.ia-an-nota { display: block; }
/* pontinho: análise do dia ainda não lida */
.ia-btn { position: relative; } /* o .ia-fab já é fixed */
.ia-btn.ia-novidade::after, .ia-fab.ia-novidade::after { content: ''; position: absolute; top: 4px; right: 4px; width: 11px; height: 11px; border-radius: 50%; background: #E0A800; box-shadow: 0 0 0 2px #fff; }

/* Preços: motivo provável da diferença entre vendas e cadastro */
.prc-tabpor { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); margin-top: 2px; }
.prc-badge.prc-neutro { background: var(--sage-l, #eef0ea); color: var(--muted); }
/* Preços: célula empilhada — valor de agora em destaque + etiqueta; "antes", data e detalhe embaixo (tabela sem rolagem para o lado) */
.prc-c { display: flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.prc-c1 { display: inline-flex; align-items: baseline; gap: 5px; }
.prc-c small { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
/* a linha de detalhe quebra em vez de alargar a tabela (fontes mais largas não podem trazer a rolagem lateral de volta) */
.t:not(.t-mob) .prc-c small { flex-wrap: wrap; justify-content: flex-end; white-space: normal; text-align: right; row-gap: 0; }
.t:not(.t-mob) td:has(> .prc-c) { white-space: normal; }
.prc-c1 { flex-wrap: wrap; justify-content: flex-end; }
.prc-t .prc-st { font-size: 12px; padding: 1px 7px; }
.t.t-mob .prc-c { align-items: flex-start; }
.t.est-t.efp-t td.wrap { min-width: 150px; }

/* Nota de entrada → Enviar para a franquia (reclamar do reajuste) */
.nf-impacto-bts { display: flex; flex-wrap: wrap; gap: 8px; }
.nf-fr-pop { max-width: 640px; width: calc(100vw - 32px); max-height: calc(100vh - 32px); overflow: auto; display: flex; flex-direction: column; gap: 10px; }
.nf-fr-campo { display: flex; flex-direction: column; gap: 4px; }
.nf-fr-campo .input { width: 100%; box-sizing: border-box; }
.nf-fr-msg { min-height: 120px; resize: vertical; font: inherit; }
.nf-fr-cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.nf-fr-todos { display: flex; align-items: center; gap: 6px; font-weight: 600; }
.nf-fr-lista { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 10px; max-height: 260px; overflow: auto; }
.nf-fr-item { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 10px; border-bottom: 1px solid var(--line); cursor: pointer; }
.nf-fr-item:last-child { border-bottom: 0; }
.nf-fr-nome { min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.nf-fr-val { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; justify-content: flex-end; white-space: nowrap; }
.nf-fr-acoes { display: flex; justify-content: flex-end; gap: 8px; }
.nf-fr-st.ok { color: var(--pos, #2C5234); font-weight: 600; }
@media (max-width: 600px) { .nf-fr-item { grid-template-columns: auto minmax(0, 1fr); } .nf-fr-val { grid-column: 2; justify-content: flex-start; } }
.nf-fr-graf { font-weight: 500; font-size: 14px; }

/* Escala → ajuste manual: atalhos (abre/meio/fecha) e resumo da jornada */
.aj-atalhos { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.aj-atalho { display: flex; flex-direction: column; align-items: flex-start; gap: 0; padding: 6px 12px; line-height: 1.2; }
.aj-atalho small { color: var(--muted); font-weight: 500; }
.aj-resumo { display: block; margin-top: 6px; }
.aj-horas { flex-wrap: wrap; }
.aj-horas > label { display: flex; align-items: center; gap: 8px; }
.fer-hor { display: block; font-weight: 500; color: var(--muted); }
.fer-hor.proprio { color: #8a5a00; }
.liq-dia { display: block; color: var(--dark, #2C5234); font-weight: 600; }

/* ⭐ Sugestões da equipe para o pedido (Estoque → Sugestões e quadro no Pedido) */
.ped-sug { background: #fff4c7; color: #7a5a00; }
.sug-busca { width: 100%; max-width: 520px; margin: 8px 0; }
.sug-res { display: grid; gap: 8px; max-width: 720px; }
.sug-prod { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; background: #fff; }
.sug-prod-cab { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.sug-prod-cab > div { min-width: 0; overflow-wrap: anywhere; }
.sug-form { display: grid; gap: 8px; margin-top: 8px; }
.sug-form textarea { width: 100%; box-sizing: border-box; }
/* caixas de texto da sugestão: a letra do painel (não a de máquina de escrever), altura que cabe duas linhas, rótulo visível */
.sug-form textarea.sug-ta { font: inherit; height: auto; min-height: 64px; resize: vertical; line-height: 1.35; }
.sug-campo { display: grid; gap: 4px; }
.sug-err:empty { display: none; }
.sug-ok { margin-top: 8px; }
.sug-aviso { margin: 0; font-size: 13px; }
.sug-lista { display: grid; gap: 10px; margin-top: 10px; }
.sug-item { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fff; display: grid; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.sug-item.novo { border-color: #e2b93b; box-shadow: 0 0 0 2px #fff4c7; }
.sug-ped-t tr.sug-ped-on td { background: #f3faf4; }
.sug-item-meta { font-size: 12px; }
.sug-item-txt { font-size: 13px; }
.sug-item-txt small { color: var(--muted); }
.sug-hist { font-size: 12px; color: var(--muted); }
.sug-hist ul { margin: 4px 0 0; padding-left: 18px; }
.sug-tirar { justify-self: start; font-size: 12px; padding: 4px 10px; }
.sug-ped-acoes { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sug-ped-btn { font-size: 12px; padding: 4px 10px; }
.sug-ped-card .seg { margin: 6px 0 8px; flex-wrap: wrap; }
.sug-ped-rec { font-weight: 400; }
.sug-ped-no { white-space: nowrap; }
/* a célula "Pedido" quebra a linha em vez de alargar a tabela (sem rolagem para o lado no computador) */
.sug-ped-t .sug-ped-acoes { display: block; }
.sug-ped-t .sug-ped-acoes .sug-ped-btn { margin: 2px 6px 2px 0; }
.sug-ped-t.est-t td.wrap { min-width: 170px; }
@media (max-width: 760px) {
  .sug-ped-t.t-mob td:last-child { grid-column: 1 / -1; }
}

/* Configurações → Usuários: telas agrupadas como no menu, regras fixas travadas */
.cfg-telas { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; font-weight: 400; min-width: 0; max-width: 100%; }
.cfg-telas-leg { margin: 0; font-size: 12px; }
.cfg-telas-g { border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px 10px; margin: 0; min-width: 0; display: grid; gap: 6px; }
.cfg-telas-g legend { font-weight: 600; font-size: 13px; padding: 0 4px; }
.cfg-tela { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 6px; font-size: 13px; cursor: pointer; min-width: 0; overflow-wrap: anywhere; }
.cfg-tela > span:first-of-type { min-width: 0; flex: 1 1 0; }
.cfg-campo:has(> .cfg-telas) { min-width: 0; max-width: 100%; }
.cfg-tela.trava { cursor: default; color: var(--muted); }
.cfg-tela input { margin: 0; align-self: center; }
.cfg-tela-pq { flex-basis: 100%; padding-left: 22px; font-size: 12px; }
.cfg-tela-pad { font-size: 12px; padding: 0 6px; }
/* celular: o formulário de usuário fica dentro da tabela (que rola para o lado); ele cabe na largura da tela e acompanha a rolagem */
@media (max-width: 760px) {
  .cfg-edit-row .cfg-user-form { position: sticky; left: 0; width: calc(100vw - 64px); max-width: calc(100vw - 64px); box-sizing: border-box; }
}
.sug-aguarda { color: #1f5f8b; }
.sug-t tr.sug-novo td { background: #fff8dc; }
.sug-motivo { display: block; font-size: 12px; }
.sug-txt { font-size: 12px; max-width: 360px; }
.sug-prod-cel { min-width: 0; }

/* cores de texto por classe (valem fora das tabelas também; regras mais específicas continuam valendo) */
.pos { color: var(--good); }
.neg { color: var(--bad); }
.muted { color: var(--muted); }
.sug-agora { white-space: nowrap; }
.cfg-voltar { margin-bottom: 12px; }
.cfg-loja-sub2 { display: block; font-size: 12px; }
.cfg-lojas-t .cfg-per { font-size: 12px; overflow-wrap: anywhere; }
@media (min-width: 761px) { .cfg-lojas-t .cfg-per { white-space: nowrap; } }

/* ---------- Configurações → loja: tela de ajustes enxuta (menu lateral + uma coluna de cartões) ---------- */
.cfg-loja-layout { display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--line); }
.cfg-loja-layout .cfg-loja-nav { border-top: 0; }
.cfg-loja-main { min-width: 0; background: var(--cream-2); padding: 18px 20px 24px; }
.cfg-sec-cab { max-width: 900px; margin: 0 0 14px; font-size: 14px; }
/* loja aberta (linguagem do redesenho): o cabeçalho da loja vira o título da área e os assuntos são os cartões — sem cartão por fora */
.cfg-loja.cfg-loja-aberta { background: transparent; border: 0; border-radius: 0; padding: 0; overflow: visible; }
.cfg-loja-aberta > .cfg-loja-cab { padding: 0 0 16px; border-bottom: 1px solid var(--line); border-radius: 0; }
.cfg-loja-aberta > .cfg-loja-cab:hover { background: none; }
.cfg-loja-aberta .cfg-loja-nome { font-size: 22px; }
.cfg-loja-aberta .cfg-loja-layout { border-top: 0; }
.cfg-loja-aberta .cfg-loja-main { background: none; padding: 16px 0 8px; }
.cfg-loja-cab .pilula-sit { margin: 0; flex: none; }
.cfg-loja-main .cfg-bloco > h3 { font-size: 18px; color: var(--dark); }
.cfg-loja-main .cfg-loja-corpo { display: flex; flex-direction: column; gap: 16px; border-top: 0; max-width: 900px; }
.cfg-loja-main .cfg-bloco { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-card, 14px); padding: 22px 24px; box-shadow: none;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); gap: 12px 16px; align-content: start; }
.cfg-loja-main .cfg-bloco > :not(label.cfg-campo):not(div.cfg-campo) { grid-column: 1 / -1; }
.cfg-loja-main .cfg-bloco > h3 { font-size: 15px; margin: 0; }
.cfg-loja-main .cfg-bloco > p { margin: -6px 0 0; color: var(--muted); }
.cfg-loja-main .cfg-bloco .cfg-acoes { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
.cfg-loja-main .cfg-bloco .cfg-campo > span { display: inline-flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.cfg-mais { font-size: 12.5px; color: var(--muted); }
.cfg-mais > summary { cursor: pointer; color: var(--green); font-weight: 600; width: max-content; }
.cfg-mais > * + * { margin-top: 6px; }
@media (min-width: 1000px) {
  .cfg-loja-layout { grid-template-columns: 210px minmax(0, 1fr); }
  .cfg-loja-layout .cfg-loja-nav { padding: 14px 10px; border-right: 1px solid var(--line); }
  .cfg-loja-aberta .cfg-loja-layout { gap: 24px; }
  .cfg-loja-aberta .cfg-loja-layout .cfg-loja-nav { padding: 16px 0 0; border-right: 0; align-self: start; position: sticky; top: calc(var(--topo, 64px) + 12px); }
  .cfg-sub.cfg-sub-v { display: flex; flex-direction: column; gap: 2px; overflow: visible; }
  .cfg-sub.cfg-sub-v a { display: block; padding: 8px 12px; border-radius: 8px; border-bottom: 0; white-space: normal; }
  .cfg-sub.cfg-sub-v a.on { background: var(--sage-l); color: var(--dark); font-weight: 600; box-shadow: inset 3px 0 0 var(--green); }
}
@media (max-width: 760px) { .cfg-loja-main { padding: 12px 10px 18px; } .cfg-loja-main .cfg-bloco { padding: 18px; } .cfg-loja-aberta .cfg-loja-main { padding: 12px 0 8px; } .cfg-loja-aberta .cfg-loja-nome { font-size: 19px; } }
.nfe-estq { display: block; font-size: 12px; font-weight: 400; }
.nfe-det-modal { width: min(820px, calc(100vw - 24px)); max-height: calc(100vh - 40px); overflow: auto; display: grid; gap: 10px; }
.nfe-det-cab { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.nfe-det-cab h3 { margin: 0; }
.nfe-det-info { font-size: 12.5px; }
.nfe-det-erro { margin: 0; overflow-wrap: anywhere; }
.nfe-det-tot { text-align: right; }

/* janelas TS.perguntar / TS.avisar (no lugar do prompt/alert do navegador) */
.ts-perg h3 { margin: 0; }
.ts-perg .chips { margin-top: 0; }
.ts-perg .chip { min-height: 32px; }
.ts-perg-campo { display: grid; gap: 4px; }
.ts-perg-msg { white-space: pre-line; overflow-wrap: anywhere; }
.ts-perg-acoes { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
/* telas que não usam a lateral de filtros (Início, Resultado): a coluna some */
body.pg-semfiltros .layout { grid-template-columns: 1fr; }
body.pg-semfiltros .sidebar, body.pg-semfiltros #btnFiltros { display: none; }
/* Início: "lembrar depois" nos avisos */
.ini-adiar { flex: none; border: 0; background: none; font: inherit; font-size: 12px; color: var(--muted); cursor: pointer; text-decoration: underline; padding: 8px 4px; min-height: 32px; }
.ini-adiar:hover { color: var(--green); }
.ini-adiados { font-size: 12px; margin-top: 2px; }
@media (max-width: 760px) {
  .ini-aviso { flex-wrap: wrap; }
  .ini-aviso > div { flex-basis: calc(100% - 40px); }
  .ini-aviso .ini-ir, .ini-aviso .ini-adiar { margin-left: 38px; }
  .ini-grupo .ini-aviso .ini-ir { margin-left: 30px; } /* alinhado ao título (ícone de 18 px + 12 px de espaço) */
  .ini-aviso .ini-adiar { margin-left: auto; order: 5; }
}
/* "Como funciona ▸": explicação longa recolhida numa frase */
.est-como { display: inline; font-size: 12px; }
.est-como[open] { display: block; margin-top: 4px; }
.est-como > summary { display: inline; cursor: pointer; color: var(--green); list-style: none; }
.est-como > summary::-webkit-details-marker { display: none; }
.est-como > p { margin: 4px 0 0; max-width: 70ch; }
.est-como > :not(summary) { color: var(--muted); }
.est-abas { display: flex; }
.est-abas .seg { max-width: 100%; }
/* Compras × vendas (Pedido e Resultado) e efeito dos reajustes (Preços) */
.cv-link { font-weight: 500; font-size: 12.5px; margin-left: 8px; }
.cv-det, .efp-det { display: block; font-weight: 400; }
.efp-fil { margin: 0 0 10px; overflow-x: auto; }
@media (max-width: 760px) { .efp-fil .seg { flex-wrap: wrap; } }

/* ⭐ Sugestões no Pedido: seletor "Classe pelos últimos 3/6/12 meses" acima da tabela */
.sug-ped-cl { display: flex; justify-content: flex-end; margin: 8px 0 4px; }

/* ---------- robô do WhatsApp (Configurações → loja → Mensagens e faixa em Campanhas) ---------- */
.zap-linha { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 12px; min-width: 0; }
.zap-linha > b { min-width: 0; }
.zap-linha .f-input.zap-num, .zap-linha .f-input.zap-hora { flex: 0 0 auto; height: 36px; }
.zap-linha .f-input.zap-hora { width: 112px; }
.zap-bts { display: flex; flex-wrap: wrap; gap: 6px; margin-left: auto; }
.zap-hoje { margin-top: 6px; font-weight: 600; color: var(--dark); overflow-wrap: anywhere; }
.zap-cfg > small, .zap-campos > small { display: block; margin-top: 4px; line-height: 1.4; }
.zap-cfg .zap-risco { margin: 10px 0 0; }
.zap-campos { margin-top: 14px; padding-top: 4px; border-top: 1px solid var(--line); }
.zap-dias { border: 0; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; min-width: 0; }
.zap-dias legend { font-weight: 700; padding: 0; margin-bottom: 4px; }
.zap-horario { border: 0; padding: 0; margin: 12px 0 0; display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; min-width: 0; }
.zap-horario legend { font-weight: 700; padding: 0; margin-bottom: 4px; }
.zap-hora-loja { margin-top: 8px; }
.zap-hora-loja[hidden], .zap-hora-proprio[hidden] { display: none; }
.zap-tab-hora { border-collapse: collapse; font-size: 14px; }
.zap-tab-hora th { text-align: left; font-weight: 600; padding: 3px 16px 3px 0; color: var(--ink); }
.zap-tab-hora td { padding: 3px 16px 3px 0; color: var(--ink); }
.zap-tab-hora td.muted { color: var(--muted); font-size: 13px; }
.zap-dia { display: inline-flex; align-items: center; gap: 4px; min-height: 32px; cursor: pointer; }
.zap-qr { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; margin-top: 12px; }
.zap-qr img { border: 1px solid var(--line); border-radius: 8px; background: #fff; max-width: 100%; height: auto; }
.zap-qr > div { min-width: 0; flex: 1 1 220px; }
.zap-codigo { flex: 0 0 auto !important; font: 700 26px/1.2 ui-monospace, Menlo, Consolas, monospace; letter-spacing: 4px; padding: 14px 18px; border: 1px dashed var(--line); border-radius: 8px; background: #fff; }
.zap-faixa { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; padding: 12px 16px; margin-bottom: 14px; font-size: 13px; }
.zap-faixa .zap-alerta { flex: 1 1 100%; margin: 0; font-size: 14px; }
.zap-faixa[hidden] { display: none; }
.zap-faixa.zap-erro { border-color: var(--bad); }
.zap-faixa-t { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; min-width: 0; }
.zap-faixa-m { display: flex; flex-direction: column; gap: 2px; flex: 1 1 260px; min-width: 0; overflow-wrap: anywhere; }
.zap-faixa-b { display: flex; flex-wrap: wrap; gap: 6px; }
.zap-opcao { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 13px; min-width: 0; }
.zap-opcao.card { padding: 12px 16px; }
.zap-opcao-t { display: flex; align-items: center; gap: 6px; flex: 1 1 100%; }
.zap-ligar { font-weight: 700; }
.zap-resumo { margin: 0; padding-left: 18px; display: grid; gap: 4px; }
.ts-conf { width: min(560px, calc(100vw - 24px)); max-height: calc(100vh - 32px); overflow-y: auto; }
.ts-conf-corpo { display: grid; gap: 10px; font-size: 14px; }
.ts-conf-corpo p { margin: 0; }
.zap-opcao .cfg-check-l { margin: 0; }
.zap-opcao small { flex: 1 1 240px; min-width: 0; }

/* campanha: período (início e término) */
.cp-periodo { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cp-periodo .f-input { width: auto; max-width: 160px; }

/* robô do WhatsApp aberto em janela a partir de Campanhas */
.zap-janela { width: min(820px, calc(100vw - 24px)); max-height: calc(100vh - 32px); overflow-y: auto; position: relative; }
.zap-janela > .exp-fechar { position: sticky; top: 0; float: right; z-index: 3; width: 34px; height: 34px; border-radius: 50%; background: var(--green); color: #fff; border: 0; font-size: 16px; cursor: pointer; opacity: 1; margin: -4px -4px 0 8px; }
.zap-janela > section, .zap-janela > .card { box-shadow: none; border: 0; padding: 0; margin: 0; }

/* ============ leiaute: cartões sem sombra, quadros com estado, texto de apoio curto ============ */
/* cartão: só a borda fina separa os blocos; janelas e gavetas (por cima da página) continuam com sombra */
.camada-cheia .card.card-cheio, .card.cp-copiar, .card.prc-drawer, .card.cfg-popup, .card.zap-janela { box-shadow: 0 16px 40px rgba(0, 0, 0, .25); }
/* quadro de número: sem barra lateral; kpi-bom/kpi-ruim só marcam o estado (a cor está no texto da comparação) */
.kpi-vars > span { white-space: nowrap; }
.kpi .dica-i { opacity: .8; }
/* ⓘ no cabeçalho verde das tabelas: branco, senão some (cinza sobre verde) */
.t th .dica-i, .t th .dica-i:hover, .t th .dica-i:focus-visible { color: #fff; opacity: .9; }
.kpi:hover .dica-i, .kpi .dica-i:hover, .kpi .dica-i:focus-visible { opacity: 1; }
/* grade de quadros no computador: quando não cabem todos numa linha, divide em linhas parecidas (nunca um quadro sozinho na de baixo).
   O clamp devolve 140px se os N cabem lado a lado (largura ≥ N×140 + espaços) e, se não cabem, a fração que limita as colunas. */
@media (min-width: 761px) {
  .g-kpi:has(> :nth-child(4):last-child) { grid-template-columns: repeat(auto-fit, minmax(clamp(140px, (608px - 100%) * 999, (100% - 16px) / 2), 1fr)); }
  .g-kpi:has(> :nth-child(5):last-child) { grid-template-columns: repeat(auto-fit, minmax(clamp(140px, (764px - 100%) * 999, (100% - 32px) / 3), 1fr)); }
  .g-kpi:has(> :nth-child(6):last-child) { grid-template-columns: repeat(auto-fit, minmax(clamp(140px, (920px - 100%) * 999, (100% - 32px) / 3), 1fr)); }
  .g-kpi:has(> :nth-child(7):last-child) { grid-template-columns: repeat(auto-fit, minmax(clamp(140px, (1076px - 100%) * 999, (100% - 48px) / 4), 1fr)); }
  .g-kpi:has(> :nth-child(8):last-child) { grid-template-columns: repeat(auto-fit, minmax(clamp(140px, (1232px - 100%) * 999, (100% - 48px) / 4), 1fr)); }
  .g-kpi:has(> :nth-child(9):last-child) { grid-template-columns: repeat(auto-fit, minmax(clamp(140px, (1388px - 100%) * 999, (100% - 64px) / 5), 1fr)); }
}
/* texto de apoio do cartão: a primeira frase à vista; o resto em "Como ler ▸" */
.card-sub { max-width: 110ch; }
.card-sub .card-como > p { margin: 2px 0 0; max-width: none; font-size: 12px; }

/* ============ Início: avisos numa lista só, agrupada por área ============ */
.ini-avisos { gap: 0; margin-top: 6px; }
.ini-grupo + .ini-grupo { margin-top: 12px; }
.ini-grupo-t { display: flex; align-items: center; gap: 8px; padding: 4px 2px 2px; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ini-grupo-t span { background: var(--cream); border-radius: 999px; padding: 0 7px; letter-spacing: 0; }
.ini-grupo .ini-aviso { border: 0; border-top: 1px solid var(--line); border-radius: 0; background: none; padding: 7px 2px; }
.ini-grupo .ini-grupo-t + .ini-aviso { border-top: 0; }
.ini-grupo .ini-aviso[role=button]:hover, .ini-grupo .ini-aviso:focus-visible { background: var(--cream-2); }
.ini-grupo .ini-ico { width: 18px; height: 18px; font-size: 12px; }
.ini-grupo .ini-aviso .muted { margin-top: 0; }
.ini-avisos > .ini-adiados { margin-top: 10px; }
/* "lembrar depois": no computador aparece ao passar o mouse ou focar a linha; no toque fica sempre à vista */
@media (hover: hover) and (min-width: 761px) {
  .ini-aviso .ini-adiar { opacity: 0; order: -1; min-height: 0; padding: 2px 4px; }
  .ini-aviso > .ini-ico { order: -3; } .ini-aviso > div { order: -2; }
  .ini-aviso:hover .ini-adiar, .ini-aviso:focus-within .ini-adiar, .ini-aviso:focus .ini-adiar { opacity: 1; }
}
@media (max-width: 760px) { .ini-grupo .ini-aviso .ini-adiar { font-size: 12px; } }

/* ============ Pedido: ajustes numa linha só; situação do estoque/catálogo numa linha discreta abaixo ============ */
.ped-ctl { display: block; padding: 14px 18px; }
.ped-ctl-linha { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px 28px; }
/* o seletor e o botão descem a altura do rótulo dos campos: tudo alinhado pela base dos campos */
.ped-ctl-linha > .ped-ctl-l, .ped-ctl-linha > .ped-ctl-salvar { padding-top: 22px; }
.ped-ctl-linha > .ped-ctl-g { gap: 12px 24px; align-items: flex-start; }
.ped-ctl-linha > .ped-ctl-l .seg, .ped-ctl-linha > .ped-ctl-salvar .btn { min-height: 36px; }
.ped-ctl-salvar { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; min-width: 0; }
.ped-ctl-salvar > span { font-size: 12px; max-width: 46ch; }
.ped-ctl-salvar > span:empty { display: none; }
.ped-ctl .ped-cat { margin-top: 12px; padding-top: 8px; border-top: 1px solid var(--line); gap: 4px 14px; }
.ped-ctl .ped-cat-info { font-size: 12px; }
.ped-cat-acoes { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ped-cat-acoes:empty { display: none; }
.ped-cat-acoes .btn { padding: 4px 10px; font-size: 12px; }
@media (max-width: 760px) {
  .ped-ctl { padding: 12px 14px; }
  .ped-ctl-linha { flex-direction: column; align-items: stretch; gap: 12px; }
  .ped-ctl-linha > .ped-ctl-l, .ped-ctl-linha > .ped-ctl-salvar { padding-top: 0; }
  .ped-ctl-salvar { margin-left: 0; justify-content: flex-start; }
  .ped-cat-acoes { margin-left: 0; flex-basis: 100%; }
  .ped-cat-acoes .btn { min-height: 32px; }
}
/* ============ cabeçalho do cartão: as ações (Compartilhar, Imprimir, Expandir) ficam juntas no canto direito ============ */
.card-head .exp-btn + .exp-btn { margin-left: 0; }
@media (min-width: 761px) { .card-head > div:first-child:not(:only-child) { flex: 1 1 260px; min-width: 0; } }

/* ============ Resultado: quadros do mês primeiro; ponto de equilíbrio numa frase + a barra ============ */
.est-eq-frase { font-size: 15px; margin: 2px 0 12px; color: var(--ink); }
.est-eq .est-eq-barra { height: 14px; margin-top: 0; }
.dre-andamento { font-size: 12px; margin: 8px 0 0; }
.dre-eq-aqui:empty { display: none; }
/* celular: quadro que sobra sozinho na última linha ocupa a largura toda */
@media (max-width: 760px) { .g-kpi > .kpi:last-child:nth-child(odd) { grid-column: 1 / -1; } }
/* ---------- filtros em faixa no topo (computador) ----------
   A coluna lateral virou uma faixa horizontal acima do conteúdo: período na faixa, o resto em "Mais filtros".
   No celular (até 860 px) nada muda: os filtros continuam na gaveta aberta pelo botão de filtros. */
.fx-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 0 14px; font: inherit; font-size: 13px; font-weight: 600; color: var(--dark); cursor: pointer; white-space: nowrap; }
.fx-btn:hover, .fx-btn[aria-expanded=true], .fx-btn.on { border-color: var(--green); }
.fx-btn:focus-visible, .fx-tag button:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
.fx-n { background: var(--green); color: #fff; border-radius: 999px; padding: 1px 7px; font-size: 12px; font-weight: 700; }
.fx-tags { display: flex; flex-wrap: wrap; gap: 6px; min-width: 0; }
.fx-tags:empty { display: none; }
.fx-tag { display: inline-flex; align-items: center; gap: 2px; max-width: 100%; background: var(--sage-l); color: var(--dark); border-radius: 999px; padding: 2px 4px 2px 10px; font-size: 12px; }
.fx-tag > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.fx-tag button { border: 0; background: none; color: inherit; cursor: pointer; width: 22px; height: 22px; border-radius: 50%; font-size: 12px; line-height: 1; padding: 0; }
.fx-tag button:hover { background: var(--green); color: #fff; }
.page-sub, .card-sub { max-width: 110ch; } /* com a largura inteira, a linha de texto não pode ficar comprida demais */
@media (min-width: 861px) {
  .layout { display: block; }
  .sidebar { position: static; height: auto; overflow: visible; display: flex; align-items: flex-start; gap: 12px; border-right: 0; border-bottom: 1px solid var(--line); padding: 8px max(24px, calc((100% - 1360px) / 2 + 24px)); } /* alinhada à coluna do conteúdo */
  body.fx-vazia .sidebar { display: none; }
  .sidebar-head { order: 2; flex: none; margin: 0; min-height: 32px; }
  .sidebar-head > span { display: none; }
  body.fx-simples .sidebar-head { display: none; }
  #filtros { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
  #filtros > .f-group { flex: 1 1 0; margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-width: 0; }
  #filtros > .f-group > .f-label { margin: 0; white-space: nowrap; display: inline-flex; align-items: center; }
  #filtros > .f-group > .chips { margin: 0; }
  #filtros > .f-group > .f-row { order: 3; display: flex; gap: 6px; }
  #filtros > .f-group > .f-row input[type=date] { width: 128px; height: 32px; }
  #filtros > .f-group > .f-input { width: 220px; height: 32px; }
  #filtros > .fx-mais { order: 2; flex: none; align-self: flex-start; margin-left: auto; position: relative; }
  #filtros > .fx-tags { order: 3; flex-basis: 100%; } /* etiquetas numa linha própria: o botão "Mais filtros" não muda de lugar */
  .fx-pop { position: absolute; z-index: 40; right: 0; top: calc(100% + 6px); width: min(520px, calc(100vw - 48px)); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 10px 30px rgba(31,61,43,.15); padding: 4px 16px 16px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; align-items: start; }
  .fx-pop.larga { width: min(760px, calc(100vw - 48px)); grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fx-pop[hidden] { display: none; }
  .fx-pop > .f-sep, .fx-pop > .f-section, .fx-pop > .f-hint { grid-column: 1 / -1; }
}

/* ===== Contas oficiais (auditoria X): comissionamento e resultado ===== */
.card-title .com-parcial { margin-left: 8px; font-weight: 600; vertical-align: middle; white-space: normal; }
.com-fora { margin: 8px 2px 0; font-size: 13px; }

/* ===== Vendas → Conferência (caixa × painel, cancelados, saúde dos dados) ===== */
.conf-abas { margin-bottom: 4px; flex-wrap: wrap; }
.conf-sub { display: block; font-weight: 400; line-height: 1.35; white-space: normal; }
.conf-t td.wrap { max-width: 420px; }
/* cabeçalho que quebra a linha: Conferência (Sobras e faltas) e Compras × vendas cabem a 1100 px sem rolar de lado */
.conf-t th, .cv-t th, .rfm-t th { white-space: normal; vertical-align: bottom; }
.conf-t .badge + .conf-sub { margin-top: 3px; }
.conf-rec { margin-left: 6px; }
.conf-nota { margin: 10px 2px 0; font-size: 13px; }
.conf-campo { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.conf-campo .f-input { height: 34px; width: auto; max-width: 320px; }
.conf-campo .conf-tol { width: 120px; }
tr.conf-conta td:first-child { box-shadow: inset 3px 0 0 var(--bad); }
@media (max-width: 760px) { .conf-t td.wrap { max-width: none; } .conf-campo, .conf-campo .f-input, .conf-campo .conf-tol { width: 100%; max-width: none; } }
/* ===== Caixa a pagar e exportação para o contador (Resultado) ===== */
.dre-abas { margin-bottom: 12px; }
.dre-topo .ap-exportar { margin-left: auto; }
.ap-topo .ap-saldo { width: 130px; }
.ap-sit { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.ap-btn { padding: 4px 10px; font-size: 12px; min-height: 32px; }
.ap-alerta { font-weight: 600; }
.est-cat-t .est-dia { width: 104px; min-width: 0; }
@media (max-width: 760px) { .dre-topo .ap-exportar { margin-left: 0; } }
/* ===== Visão do dono no Início (visaodono.js): Sua semana e Minhas lojas lado a lado ===== */
.vd-sub { display: block; color: var(--muted); font-size: 12px; font-weight: 400; white-space: normal; }
.vd-semana { margin-bottom: 16px; }
.vd-sem-t { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; cursor: pointer; padding: 4px 2px 10px; list-style: none; }
.vd-sem-t::-webkit-details-marker { display: none; }
.vd-sem-t::before { content: '▸'; color: var(--muted); font-size: 12px; }
.vd-semana[open] > .vd-sem-t::before { content: '▾'; }
.vd-sem-t .card-title { margin: 0; }
.vd-sem-p { font-size: 12px; }
.vd-acoes-card { margin-top: 12px; }
.vd-acoes-t { display: flex; align-items: center; gap: 6px; }
.vd-acoes > p { margin: 6px 0 0; }
.vd-acao { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-top: 1px solid var(--line); cursor: pointer; }
.vd-acao:first-child { border-top: 0; }
.vd-acao:hover b, .vd-acao:focus-visible b { color: var(--green); }
.vd-acao > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.vd-acao .muted { font-size: 12px; margin-top: 2px; }
.vd-acao-n { flex: none; width: 24px; height: 24px; border-radius: 50%; background: var(--sage-l); color: var(--dark); font-weight: 700; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; }
.vd-loja { border: 0; background: none; padding: 0; cursor: pointer; color: inherit; font: inherit; text-align: left; }
.vd-loja:hover b, .vd-loja:focus-visible b { color: var(--green); text-decoration: underline; }
.t.vd-t td { white-space: normal; vertical-align: top; }
.t.vd-t td .badge { white-space: nowrap; }
.dre-perdas { font-size: 12px; margin: 8px 0 0; }
.dre-perdas a { white-space: nowrap; }
@media (max-width: 760px) {
  .vd-acao { align-items: flex-start; flex-wrap: wrap; }
  .vd-acao .ini-ir { flex-basis: 100%; padding-left: 36px; }
}
/* lojas lado a lado: 8 colunas — cabeçalho e células quebram a linha em vez de alargar a tabela (fonte mais larga não pode trazer a rolagem lateral) */
.t.vd-t:not(.t-mob) th, .t.vd-t:not(.t-mob) td { white-space: normal; }
.t.vd-t:not(.t-mob) th { vertical-align: bottom; line-height: 1.2; }
.t.vd-t:not(.t-mob) td:not(:first-child), .t.vd-t:not(.t-mob) th:not(:first-child) { min-width: 0; }

/* ---------- configuração guiada da loja (guia.js) ---------- */
.guia { width: min(600px, 100%); max-height: 94vh; overflow: auto; padding: 0; display: flex; flex-direction: column; }
.guia-topo { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 18px 22px 0; }
.guia-topo h2 { margin: 0; font-size: 18px; }
.guia-topo p { margin: 2px 0 0; font-size: 13px; }
.guia-topo .guia-loja { margin-top: 6px; height: 34px; width: auto; max-width: 100%; }
.guia-x { white-space: nowrap; font-size: 13px; text-decoration: none; }
.guia-trilha { display: flex; gap: 6px; padding: 16px 22px 14px; border-bottom: 1px solid var(--line); }
.guia-p { flex: 1; min-width: 0; border: 0; background: none; padding: 0; text-align: left; cursor: pointer; color: var(--muted); }
.guia-p i { display: block; height: 4px; border-radius: 3px; background: var(--line); margin-bottom: 7px; }
.guia-p b { display: block; font-size: 12px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.guia-p span { font-size: 12px; }
.guia-p.ok i { background: var(--sage); }
.guia-p.ok span { color: var(--good); }
.guia-p.at i { background: var(--green); }
.guia-p.at b { color: var(--ink); }
.guia-p.pu i { background: var(--gold); }
.guia-p.pu span { color: #8A6D0F; }
.guia-corpo { padding: 18px 22px; display: grid; gap: 14px; }
.guia-corpo h3 { margin: 0; font-size: 16px; }
.guia-corpo h3 + p { margin: 4px 0 0; font-size: 13px; line-height: 1.45; }
.guia-g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.guia-nota { background: var(--cream-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.nfe-cfop-at { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin: 6px 0 4px; }
.nfe-cfop-at small { flex: 1 1 220px; min-width: 0; }
.nfe-cfop-vivo { display: block; margin: 2px 0 8px; }
.guia-mesmo { display: grid; gap: 8px; background: var(--gold-l); border: 1px solid #E8D79A; color: #5C4A0E; border-radius: 10px; padding: 12px; font-size: 12.5px; line-height: 1.45; }
.guia-mesmo .cfg-campo { color: var(--dark); }
.guia-confere.neg { font-weight: 600; }
.guia .notice { margin-bottom: 0; }
.guia-dif { display: grid; gap: 6px; }
.guia-como { font-size: 12.5px; }
.guia-como ol { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 4px; }
.guia-pe { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 14px 22px; border-top: 1px solid var(--line); }
.guia-pe .btn { white-space: nowrap; }
.guia-esp { flex: 1; }
.guia-pular { font-size: 13px; }
.guia-li { display: flex; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.guia-li:last-child { border-bottom: 0; }
.guia-li > div { flex: 1; min-width: 0; }
.guia-li b, .guia-li small { display: block; }
.guia-ic { width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; flex: none; }
.guia-li.ok .guia-ic { background: var(--sage-l); color: var(--good); }
.guia-li.pu .guia-ic { background: var(--gold-l); color: #8A6D0F; }
.guia-cfg { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.guia-cfg > div { flex: 1; min-width: 220px; }
@media (max-width: 720px) {
  .guia-bg { padding: 0; align-items: flex-end; }
  .guia { border-radius: 14px 14px 0 0; max-height: 96vh; }
  .guia-topo, .guia-trilha, .guia-corpo, .guia-pe { padding-left: 16px; padding-right: 16px; }
  .guia-g2 { grid-template-columns: 1fr; }
  .guia-p b { font-size: 12px; }
  .guia-p span { display: none; }
  .guia-esp { display: none; }
  .guia-pe .btn.primary { flex: 1; }
  .guia-pular { order: 9; width: 100%; text-align: center; }
  .guia-li { flex-wrap: wrap; }
  .guia-li .btn { margin-left: 38px; }
}

/* ---------- notificações e aplicativo (notificacoes.js) ---------- */
.notif { width: min(560px, 100%); max-height: 92vh; overflow: auto; display: grid; gap: 16px; }
.notif-topo { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.notif-topo h2 { margin: 0; font-size: 18px; }
.notif-sec { display: grid; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.notif-sec h3 { margin: 0; font-size: 15px; }
.notif-sec p { margin: 0; }
.notif .notice { margin-bottom: 0; }
.notif-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.notif-tipos { display: grid; gap: 6px; }
.notif-tipo { display: flex; align-items: center; }
.notif-como { font-size: 13px; }
.notif-como ul { margin: 8px 0 0; padding-left: 18px; display: grid; gap: 6px; }
.notif-lista { display: grid; gap: 8px; }
.notif-ap { display: flex; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.notif-ap > div { flex: 1; min-width: 0; }
.notif-ap b, .notif-ap small { display: block; overflow-wrap: anywhere; }
.notif-este { margin-left: 8px; font-weight: 600; }
.user-pop button.user-item { width: 100%; text-align: left; border: 0; background: none; font: inherit; cursor: pointer; }
@media (max-width: 720px) {
  .notif-bg { padding: 0; align-items: flex-end; }
  .notif { border-radius: 14px 14px 0 0; max-height: 94vh; }
  .notif-ap { flex-wrap: wrap; }
}

/* ---------- validade: pacote aberto (na lata) e pacotes fechados ---------- */
.vl-pacotes { display: grid; gap: 2px; margin-top: 3px; }
.vl-pacotes small { display: block; overflow-wrap: anywhere; }
.vl-lata { color: var(--dark); }
/* revisão de 22/11: sem rolagem para o lado — a linha do chá (lata, abertura, consumir até) quebra dentro da célula */
.vl-tabela td.wrap { white-space: normal; min-width: 220px; max-width: 380px; }
.vl-tabela th { white-space: normal; vertical-align: bottom; }
.vl-fechado { color: var(--muted); }
.vl-motivo { display: block; color: var(--dark); }
.vl-abriu-data { display: inline-block; width: auto; height: 30px; padding: 2px 6px; margin: 0 4px; }
.vl-pac { width: min(560px, 100%); max-height: 92vh; overflow: auto; display: grid; gap: 12px; }
.vl-pac-topo { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.vl-pac-topo h3, .vl-pac p { margin: 0; }
.vl-pac-lista { display: grid; }
.vl-pac-lote { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line); }
.vl-pac-cab { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.vl-pac-sit { display: grid; gap: 4px; }
.vl-pac-sit small { display: block; overflow-wrap: anywhere; }
.vl-pac-acoes { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.est-pac { display: block; padding: 0; margin-top: 2px; white-space: nowrap; }
.vl-ver-pac { padding: 0; text-align: left; justify-self: start; }
@media (max-width: 720px) { .vl-pac-bg { padding: 0; align-items: flex-end; } .vl-pac { border-radius: 14px 14px 0 0; } }
.vl-nome { border: 0; background: none; padding: 0; font: inherit; font-weight: 700; color: var(--dark); text-align: left; cursor: pointer; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.vl-nome:hover, .vl-nome:focus-visible { color: var(--green); text-decoration-color: var(--green); }
.vl-pac-est { margin-left: 8px; }
.vl-pac-vence small { display: inline; }
.vl-val-aberto { border-color: var(--gold); }

/* ---------- pedido: classe como ícone no nome, subgrupo e linha que mudou de aba ---------- */
.ped-cl-ico { display: inline-block; margin-right: 6px; cursor: help; }
.ped-sub { display: block; color: var(--muted); font-size: 12px; }
.ped-ficou { margin-left: 8px; white-space: nowrap; }

/* ---------- pedido: carrinho salvo e venda conjunta ---------- */
.ped-rasc { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.ped-rasc > div:first-child { flex: 1; min-width: 220px; }
.ped-rasc-acoes { display: flex; gap: 8px; flex-wrap: wrap; }
.ped-rasc-ok { margin: 6px 0; }
.ped-junto { display: block; }

/* ---------- validade: janela dos lotes do chá (aberto em cima, fechados embaixo) ---------- */
.vl-pac { width: min(760px, 100%); }
.vl-pac-sec { display: grid; gap: 0; border-top: 1px solid var(--line); padding-top: 12px; }
.vl-pac-sec h4 { margin: 0 0 4px; font-size: 14px; }
.vl-pac-linha { display: grid; grid-template-columns: 1.1fr .9fr 1.5fr 1.5fr 1fr auto; gap: 10px 14px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.vl-pac-linha:last-child { border-bottom: 0; }
.vl-pac-fechado { grid-template-columns: 1.1fr .9fr 1.5fr 1.5fr auto; }
.vl-pac-campo { min-width: 0; }
.vl-pac-campo > small { display: flex; align-items: center; color: var(--muted); font-size: 12px; margin-bottom: 3px; white-space: nowrap; }
.vl-pac-campo > div { min-height: 30px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.vl-pac-marca { margin-left: 6px; padding: 0 6px; border-radius: 999px; background: var(--line); color: var(--muted); font-size: 12px; font-weight: 600; }
button.vl-pac-marca { background: none; text-decoration: underline; cursor: pointer; border: 0; }
.vl-pac-data { width: 100%; max-width: 150px; height: 30px; padding: 2px 6px; }
.vl-pac-acao { display: grid; gap: 2px; justify-items: end; text-align: right; }
.vl-pac-abrir { white-space: nowrap; }
.vl-pac-vazio, .vl-pac-semnota { margin: 6px 0; }
@media (max-width: 720px) {
  .vl-pac-linha, .vl-pac-fechado { grid-template-columns: 1fr 1fr; }
  .vl-pac-acao { grid-column: 1 / -1; justify-items: stretch; text-align: left; }
  .vl-pac-abrir { width: 100%; }
}
.vl-pac-hist { border-top: 1px solid var(--line); padding-top: 10px; }
.vl-pac-hist summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.vl-pac-hist-i { grid-template-columns: 1.1fr .9fr 1.4fr 1fr 1fr; }
.vl-pac-hist-vazio { margin: 0; font-size: 12px; }
@media (max-width: 720px) { .vl-pac-hist-i { grid-template-columns: 1fr 1fr; } }
.ped-conf { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 8px 0; }
.ped-conf > div:first-child { flex: 1; min-width: 220px; }
.ped-conf-sit { margin-left: 8px; }
.ped-conf-ok { margin: 6px 0; }

/* ---------- Foto do produto (TS.foto): miniatura nas listas e janela da foto grande ---------- */
.foto-cel { display: flex; align-items: flex-start; gap: 8px; min-width: 0; }
.foto-txt { min-width: 0; flex: 1; }
.foto-mini { flex: none; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--cream-2); overflow: hidden; cursor: zoom-in; }
.foto-mini:hover, .foto-mini:focus-visible { border-color: var(--green-2); outline: 2px solid var(--sage-l); }
.foto-img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto-janela { width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 0; box-shadow: var(--shadow); }
.foto-cab { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.foto-x { border: 0; background: transparent; font-size: 18px; color: var(--muted); cursor: pointer; padding: 4px 8px; }
.foto-grande { background: var(--cream-2); display: grid; place-items: center; min-height: 220px; }
.foto-grande .foto-img { width: 100%; height: auto; max-height: 60vh; object-fit: contain; }
.foto-grande .foto-erro { visibility: hidden; }
.foto-minis { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; padding: 10px 14px 0; }
.foto-outra { width: 48px; height: 48px; padding: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--cream-2); cursor: pointer; }
.foto-outra.on { border: 2px solid var(--green); }
.foto-info { padding: 10px 14px 0; font-size: 13px; }
.foto-info small { display: block; margin-top: 2px; }
.foto-acoes { padding: 12px 14px 14px; }
@media (max-width: 860px) {
  .foto-mini { width: 52px; height: 52px; border-radius: 10px; }
}

/* Pedido: as 5 abas quebram em linhas (sem rolar para o lado), como o seletor das sugestões */
.ped-tools .seg, .ped-tools .seg button { flex-wrap: wrap; overflow-x: visible; }
.ped-tools .seg { border-radius: 18px; }
.ped-tools .seg button { flex: 0 1 auto; white-space: normal; text-align: left; }
.ped-ver-nota { margin: 8px 0 0; font-size: 12.5px; }
.ped-max { color: var(--muted); background: var(--cream); }

/* Celular: links pequenos de ação ganham altura de toque (mínimo recomendado: 24 px), sem mudar o desenho */
@media (max-width: 860px) {
  .link-btn, .est-ir, .cpf-link, .vl-nome, .prc-nome, .est-conta, .pd-vl { display: inline-block; padding-top: 5px; padding-bottom: 5px; }
  /* no Estoque o "no pedido ›" fica na linha de baixo do nome (o inline-block acima o colava: "Mug Nereidano pedido ›") */
  #est-tabela .est-ir { display: block; width: fit-content; }
  summary { padding-top: 5px; padding-bottom: 5px; }
}
/* Campanha Resumo diário (campanhas.js) e marca do robô na tela Hoje (clientes.js) */
.hj-resumo { margin: 4px 0 12px; }
.hj-robo { display: inline-flex; align-items: center; min-height: 32px; font-size: 13px; color: var(--muted); }
.cp-resumo { display: grid; gap: 12px; }
.cp-resumo-motivos { display: grid; gap: 8px; }
.cp-resumo-mot { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; display: grid; gap: 8px; }
.cp-resumo-mot.on { border-color: var(--green); }
.cp-resumo-cab { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; cursor: pointer; }
.cp-resumo-cab b { font-weight: 600; }
.cp-resumo-mot textarea { min-width: 0; width: 100%; }
/* Clientes → Conversas (conversas.js) */
.cv-sit { display: flex; align-items: center; justify-content: space-between; gap: 8px 12px; flex-wrap: wrap; margin: 4px 0 12px; }
.cv-sit small { flex: 1 1 240px; min-width: 0; }
/* a lista: itens que são botões (abrem pelo teclado), a mais recente em cima; lista de conversas mestre-detalhe é a
   exceção ao TS.table (visual.md) */
.cv-col-lista { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.cv-col-tit { display: flex; align-items: center; gap: 6px; }
.cv-busca { width: 100%; }
.cv-abas .seg { flex-wrap: wrap; }
.cv-lista { list-style: none; margin: 0 -4px; padding: 0; min-width: 0; }
.cv-lista > li + li { border-top: 1px solid var(--line); }
.cv-item { display: flex; align-items: flex-start; gap: 10px; width: 100%; min-height: 56px; padding: 10px 8px; border: 0; border-radius: 10px; background: transparent; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.cv-item:hover { background: var(--cream-2); }
.cv-item:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }
.cv-item.cv-ultima { background: var(--gold-l); box-shadow: inset 3px 0 0 var(--gold); }
.cv-item-c { display: grid; gap: 2px; min-width: 0; flex: 1; }
.cv-item-l1 { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.cv-item-nome { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cv-item-hora { flex: none; color: var(--muted); }
.cv-item-ult { display: block; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* nome nas mensagens: o cadastro da fidelidade é de outra pessoa (ex.: a esposa) — uma linha pequena embaixo do nome */
.cv-item-cad, .cv-cad { display: block; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cel-de { font-weight: 600; color: var(--dark); }
.cv-item-et { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 2px; }
.cv-vazio { padding: 16px 8px; }
.cv-mais-l { padding: 10px 8px; text-align: center; }
/* círculo com as iniciais: 5 cores fixas (a mesma para o mesmo celular) */
.cv-av { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; font-weight: 700; font-size: 14px; letter-spacing: .02em; }
.cv-av-0 { background: var(--green); color: #fff; }
.cv-av-1 { background: var(--gold); color: var(--dark); }
.cv-av-2 { background: var(--sage-l); color: var(--dark); }
.cv-av-3 { background: var(--green-2); color: #fff; }
.cv-av-4 { background: var(--bege); color: var(--dark); }
.cv-conversa { display: grid; gap: 10px; min-width: 0; }
.cv-topo { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cv-topo-c { display: grid; min-width: 0; flex: 1; }
.cv-topo .cv-nome { font-size: 17px; overflow-wrap: anywhere; }
.cv-topo-acoes { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
/* vínculo da conversa com o cliente: janela de busca */
.cv-vinc { max-width: 460px; width: calc(100vw - 32px); }
.cv-vinc .f-input { width: 100%; margin: 6px 0 8px; }
.cv-vinc-lista { list-style: none; margin: 0; padding: 0; max-height: 50vh; overflow-y: auto; border-top: 1px solid var(--line); }
.cv-vinc-lista li { border-bottom: 1px solid var(--line); }
.cv-vinc-dica { padding: 10px 2px; }
.cv-vinc-item { display: grid; gap: 2px; width: 100%; text-align: left; background: none; border: 0; padding: 10px 6px; min-height: 44px; font: inherit; color: inherit; cursor: pointer; }
.cv-vinc-item:hover, .cv-vinc-item:focus-visible { background: var(--cream-2); }
.cel-nota { display: block; margin-top: 2px; }
.cv-escolha { display: grid; place-items: center; align-content: center; gap: 6px; text-align: center; height: 100%; min-height: 240px; color: var(--muted); }
.cv-escolha b { color: var(--ink); font-size: 16px; }
.cv-escolha-ico { font-size: 34px; }
/* computador: lista e conversa lado a lado, até o pé da janela; cada coluna rola sozinha (--cv-alto vem de conversas.js) */
@media (min-width: 861px) {
  .cv-split { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 16px; height: var(--cv-alto, 70vh); min-height: 440px; }
  .cv-split > .card { margin: 0; height: 100%; min-height: 0; }
  .cv-col-lista .cv-lista { flex: 1; min-height: 0; overflow-y: auto; }
  .cv-col-lista .cv-rodape-lista { margin-top: 0; }
  .cv-split .cv-conversa { display: flex; flex-direction: column; }
  .cv-split .cv-msgs-w { flex: 1; min-height: 0; display: flex; }
  .cv-split .cv-msgs { flex: 1; max-height: none; }
}
.cv-ficha { display: flex; align-items: center; gap: 6px 8px; flex-wrap: wrap; }
/* trava "em conversa" do robô: o chip quebra a linha no celular (o .badge é nowrap) */
.cv-ficha .cv-adiada { white-space: normal; overflow-wrap: anywhere; max-width: 100%; font-weight: 600; }
.cv-msgs { display: flex; flex-direction: column; gap: 8px; max-height: 60vh; overflow-y: auto; padding: 8px; background: var(--cream-2); border: 1px solid var(--line); border-radius: 10px; }
.cv-dia { text-align: center; }
.cv-dia span { display: inline-block; font-size: 12px; color: var(--muted); background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 2px 10px; }
.cv-msg { max-width: 82%; border-radius: 12px; padding: 8px 10px; background: #fff; border: 1px solid var(--line); overflow-wrap: anywhere; }
.cv-msg.eu { align-self: flex-end; background: var(--sage-l); }
.cv-msg.robo { border-style: dashed; }
.cv-msg.ele { align-self: flex-start; }
.cv-meta { display: block; color: var(--muted); margin-bottom: 2px; }
.cv-txt { white-space: pre-wrap; }
.cv-tipo { font-size: 13px; color: var(--muted); }
/* mídia da conversa: buscada na hora do WhatsApp, só na memória da aba (decisão do dono) */
.cv-midia { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin: 6px 0 2px; max-width: 100%; }
.cv-midia-img { display: block; max-width: 100%; }
.cv-midia-img img { display: block; max-width: min(320px, 100%); max-height: 320px; border-radius: 8px; border: 1px solid var(--line); background: var(--cream-2); }
.cv-midia audio { width: min(300px, 100%); }
.cv-midia-video { max-width: min(360px, 100%); max-height: 320px; border-radius: 8px; }
.cv-midia-erro { display: block; }
.cv-midia .btn { min-height: 32px; }
.cv-rodape { margin: 0; }
.cv-priv { display: block; flex-basis: 100%; }
.cv-fone { white-space: nowrap; }
.cv-msgs-w { position: relative; }
.cv-novas { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); box-shadow: var(--shadow); }
.cv-rodape-lista { display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
.cv-rodape-lista small { flex: 1 1 220px; min-width: 0; }


/* Início (redesenho de 22/11/2026): cabeçalho com pílula, herói, ações, avisos por prazo e lateral */
.ini-cab { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 16px; flex-wrap: wrap; margin-bottom: 18px; }
.ini-cab .page-title { font-size: 30px; margin: 0; }
.ini-cab .page-sub { font-size: 15px; margin-top: 4px; }
.ini-ia-linha { display: flex; align-items: baseline; gap: 6px 10px; flex-wrap: wrap; margin: 12px 2px 0; font-size: 14px; }
.ini-ia-linha[hidden] { display: none; }
.ini-ia-linha .ini-faixa-tag { font-size: 14px; }
.ini-ia-linha .ini-ia-txt { color: var(--ink); min-width: 0; flex: 1 1 320px; }
.ini-ia-linha .link-btn { font-weight: 600; min-height: 32px; }
.ini-ia-linha .ini-faixa-btn { background: none; border: 0; border-radius: 0; padding: 4px 0; box-shadow: none; align-items: baseline; gap: 6px; min-height: 32px; }
.ini-ia-linha .ini-faixa-btn:hover { background: none; }
.ini-ia-linha .ini-faixa-btn:hover .ini-faixa-ir { text-decoration: underline; }
.ini-ia-linha .ini-faixa-txt { font-size: 14px; color: var(--ink); white-space: normal; }
.ini-corpo { margin-top: 20px; }
.ini-resumo { list-style: none; margin: 0; padding: 0; }
.ini-resumo li { display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ini-resumo li:last-child { border-bottom: 0; }
.ini-resumo .etq-prazo { justify-self: start; }
.ini-resumo-t { font-size: 15px; min-width: 0; }
.ini-resumo-ir { font-size: 14px; font-weight: 600; color: var(--green); background: none; border: 0; padding: 8px 2px; cursor: pointer; font: inherit; font-weight: 600; white-space: nowrap; min-height: 32px; }
.ini-resumo-ir:hover { text-decoration: underline; }
.ini-ver-todos { font-weight: 600; font-size: 14px; color: var(--green); background: none; border: 0; cursor: pointer; padding: 8px 0; min-height: 32px; font-family: inherit; }
.ini-ver-todos:hover { text-decoration: underline; }
.ini-todos { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.ini-todos[hidden] { display: none; }
.ini-lado .md-card { margin-bottom: 0; border-radius: 14px; box-shadow: none; padding: 22px 24px; }
.ini-lado .md-vends { grid-template-columns: minmax(0, 1fr); gap: 8px; }
.ini-lado .md-card .card-title { font-size: 19px; color: var(--dark); }
.ini-lado .md-num b { font-size: 30px; }
.ini-acoes-vazio { margin: 6px 0 0; }
@media (max-width: 860px) {
  .ini-cab .page-title { font-size: 24px; }
  .ini-cab .page-sub { font-size: 14px; }
  .ini-resumo li { grid-template-columns: minmax(0, 1fr) auto; gap: 6px 12px; }
  .ini-resumo .etq-prazo { grid-column: 1 / -1; }
  .ini-lado .md-card { padding: 18px; }
}

/* Validade: abas por tipo, outras validades da mesma linha da nota e o aviso de validade curta (→ devolução) */
.vl-abas { margin-bottom: 12px; }
.vl-nota-extra { display: flex; flex-direction: column; gap: 6px; grid-column: 1 / -1; min-width: 0; }
.vl-nota-extra:empty { display: none; }
.vl-parte { display: flex; flex-wrap: wrap; align-items: end; gap: 6px; }
.vl-parte .vl-parte-qtd { width: 72px; }
.vl-parte-x { min-height: 32px; padding: 0 6px; }
.vl-mais-val { align-self: flex-start; font-size: 13px; }
.vl-primeira { display: block; }
.vl-curta { margin: 0; padding: 8px 10px; font-size: 13px; line-height: 1.4; }
.vl-curta .vl-dev-btn { margin-top: 4px; }
.dev-obs-val { margin-top: 4px; }
/* pílula de situação clicável (Início: amarela/vermelha levam aos avisos de dados) */
button.pilula-sit-btn { font: inherit; font-size: 13px; cursor: pointer; min-height: 36px; }
button.pilula-sit-btn:hover { border-color: currentColor; }
button.pilula-sit-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
@media (max-width: 760px) { button.pilula-sit-btn { min-height: 44px; } }
.ini-grupo.ini-destaque { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 10px; transition: outline-color .3s; }
/* nota de entrada: as outras validades e o aviso ficam dentro da coluna "Lote · validade" (sem empurrar a tabela para o lado) */
.vl-nota-cel { min-width: 170px; max-width: 280px; white-space: normal; }
.vl-nota-cel .vl-nota-campos { min-width: 0; }
.vl-nota-cel .vl-curta, .vl-nota-cel .vl-parte, .vl-nota-cel .vl-primeira { white-space: normal; overflow-wrap: anywhere; }
.vl-nota-cel .vl-parte .vl-parte-val { width: 150px; }

/* 2ª passada — Estoque (23/11/2026, proposta do Figma): herói do Estoque, ações juntas no canto do cabeçalho, consulta recolhida */
.est-p2-heroi .heroi-col .linhas-num { margin-top: 4px; }
.est-p2-heroi .heroi-col .linhas-num-r { font-size: 14px; }
.est-p2-heroi .heroi-col .linhas-num-v { font-size: 17px; }
.est-p2-heroi .est-p2-ir { text-align: left; }
.est-p2-acoes { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 16px; margin-top: 10px; }
.est-p2-acoes .btn.primary { text-decoration: none; }
.card-head .est-p2-csv { margin-left: auto; flex: none; display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); background: var(--card, #fff); color: var(--green); border-radius: 8px; padding: 5px 10px; font: 600 12px/1 inherit; cursor: pointer; }
.card-head .est-p2-csv:hover { background: var(--cream-2); }
.card-head .est-p2-csv span { font-size: 12px; }
.card-head .est-p2-csv + .exp-btn, .card-head .est-p2-acoes-dir + .exp-btn { margin-left: 0; }
.est-p2-tools { margin: 0 0 10px; justify-content: flex-start; }
#est-tabela .est-minres { margin: 10px 0 0; }
.est-p2-saz-linha { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; }
.est-p2-saz-linha .est-saz-res { margin: 0; flex: 1 1 320px; min-width: 0; font-size: 14px; }
.est-p2-saz-btn { flex: none; }
.est-p2-saz-corpo { margin-top: 12px; }
@media (max-width: 640px) {
  .est-p2-acoes .btn.primary { flex: 1 1 100%; justify-content: center; text-align: center; }
  .est-p2-saz-btn { width: 100%; }
}
@media (min-width: 861px) { .est-p2-heroi .heroi-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.25fr); grid-auto-flow: row; } }
@media (max-width: 860px) { .est-p2-heroi .heroi-cols > .heroi-col { grid-column: 1 / -1; } .est-p2-heroi .heroi-cols > .heroi-col + .heroi-col:not(.heroi-pri) { padding-top: 12px; border-top: 1px solid var(--line); } .est-p2-heroi .heroi-pri { border-bottom: 0; padding-bottom: 0; } }
/* Pedido: composição no rodapé do herói; compras × teto numa linha que abre a conta */
.ped-p2-compo { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.ped-p2-compo .ped-compo { margin-top: 4px; }
.cv-p2 { border: 1px solid var(--line); border-radius: 14px; background: #fff; padding: 14px 22px; }
.cv-p2-sum { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; cursor: pointer; list-style: none; min-height: 28px; }
.cv-p2-sum::-webkit-details-marker { display: none; }
.cv-p2-tit { font-weight: 700; color: var(--dark); font-size: 15px; }
.cv-p2-res { font-size: 15px; min-width: 0; }
.cv-p2-ver { margin-left: auto; color: var(--green); font-weight: 600; font-size: 14px; }
.cv-p2-ver::after { content: ' ▸'; }
.cv-p2[open] .cv-p2-ver::after { content: ' ▾'; }
.cv-p2-sum:hover .cv-p2-ver { text-decoration: underline; }
.cv-p2-corpo { margin-top: 12px; }
.cv-p2-link { margin: 10px 0 0; font-size: 13px; }
@media (max-width: 640px) { .cv-p2 { padding: 14px 18px; } .cv-p2-ver { margin-left: 0; } }
.card-head .ped-p2-acoes { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ped-p2-tools { margin: 0 0 10px; justify-content: flex-start; }
/* Créditos com a franquia: o topo do cartão é o cabeçalho (ações + Imprimir/Expandir juntos); resumo dos prêmios em linha, sem caixas */
.card-head.cfr-topo { align-items: flex-start; }
.card-head.cfr-topo .cfr-btns { margin-left: auto; }
.cfr-p2 .cfr-res > div { background: none; border-radius: 0; border-left: 1px solid var(--line); padding: 2px 16px; }
.cfr-p2 .cfr-res > div:first-child { border-left: 0; padding-left: 0; }
.cfr-p2 .cfr-res > div.ruim { background: none; color: inherit; }
.cfr-p2 .cfr-res > div.ruim b { color: var(--bad); }
@media (max-width: 640px) { .cfr-p2 .cfr-res > div { border-left: 0; padding: 2px 0; } }
/* Inventário: "Como funciona" recolhido */
details.inv-p2-como summary { cursor: pointer; font-weight: 600; }
details.inv-p2-como ol { margin-top: 8px; }
/* 2ª passada — Clientes (23/11/2026): menos caixas e uma ação principal por bloco */
/* Hoje: os clientes são linhas com divisória dentro do cartão (não caixa dentro de caixa); o 1º, o mais importante, tem o WhatsApp cheio */
.hj-card .hj-lista { gap: 0; border-top: 1px solid var(--line); }
.hj-card .hj-item { border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: none; padding: 14px 2px; }
.hj-card .hj-item.hj-pri { background: var(--cream-2); padding-inline: 10px; border-radius: 10px; border-bottom-color: transparent; margin-bottom: 1px; }
.hj-card details.hj-rodape { margin-top: 12px; }
.hj-card details.hj-rodape p { margin: 6px 0 0; font-size: 13px; }
/* Campanhas: a situação do robô é o herói da tela (robô · enviadas hoje · não enviadas), botões no pé */
.zap-faixa.zh-box { display: block; padding: 0; gap: 0; font-size: inherit; margin-bottom: 16px; }
.zap-faixa.zh-box[hidden] { display: none; }
.zap-faixa.zh-box .zap-alerta { margin: 0 0 12px; }
.zap-faixa.zh-box.zap-erro .zh-heroi { border-color: var(--bad); }
.zh-heroi .heroi-pri .heroi-num .badge { font-size: 20px; line-height: 1.2; padding: 4px 12px; border-radius: 8px; vertical-align: middle; }
.zh-heroi .heroi-linha .badge { font-size: 12px; }
.zh-heroi .zap-faixa-hora { display: block; line-height: 1.35; }
.zh-pe { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px 12px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.zh-pe .zap-faixa-b { display: flex; flex-wrap: wrap; gap: 8px; }
.zh-pe small.neg:empty { display: none; }
.zh-ver, .esh-ir { font-weight: 600; color: var(--green); min-height: 24px; padding: 2px 0; text-align: left; }
/* Indicadores → Fidelidade: os números são linhas com divisória (sem caixa e sem barra lateral; o estado fica na cor do número) */
.fx-card .fx-stats, .card .fx-stats { gap: 0 28px; }
.fx-stats .fx-stat { background: none; border-radius: 0; border-left: 0; border-top: 1px solid var(--line); padding: 10px 2px 12px; }
.fx-stats .fx-stat.ok, .fx-stats .fx-stat.alerta { border-left: 0; }
.fx-stats .fx-stat > b { font-size: 22px; }
.fx-stats .fx-stat-click:hover, .fx-stats .fx-stat-click:focus-visible { box-shadow: none; background: var(--cream-2); }
/* Lista de espera: "+ Anotar pedido" no pé do herói; a mensagem padrão recolhida depois da lista */
.esp-kpis .esh-pe { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.esh-modelo .esp-modelo { max-width: none; }
@media (max-width: 860px) {
  .hj-card .hj-item { padding: 12px 0; }
  .hj-card .hj-item.hj-pri { padding-inline: 10px; }
  .zh-pe { justify-content: stretch; }
  .zh-pe .zap-faixa-b, .zh-pe .zap-faixa-b .btn { flex: 1 1 auto; }
  .zh-heroi .heroi-pri .heroi-num .badge { font-size: 18px; }
  .esp-kpis .esh-pe .btn { flex: 1 1 100%; }
}
/* 2ª passada — Equipe (23/11/2026): Comissionamento sem rolagem para o lado, Minha comissão e Configurações → Lojas */
:root { --eq-hit: #1F5FBF; } /* o mesmo azul de "meta batida" das tabelas (.t .hit) */
.eq-azul { color: var(--eq-hit); }
.eq-sob { display: block; font-size: max(12px, .833em); font-weight: 400; color: var(--muted); line-height: 1.35; white-space: nowrap; }
.eq-sob .hit { font-weight: 600; }
.eq-ind > span:first-child { font-weight: 600; }
.eq-ind > span.hit:first-child, .eq-ind .hit { color: var(--eq-hit); }
.eq-h-linha { display: block; }
.eq-com-t th, .eq-com-t td { vertical-align: top; }
.minha-sel { flex-wrap: nowrap; }
.minha-sel .f-input { width: auto; }
@media (max-width: 860px) {
  .minha-sel { flex-wrap: wrap; width: 100%; }
  .minha-sel .f-input { flex: 1 1 160px; min-width: 0; }
  .eq-sob { white-space: normal; }
}
/* Royalties no cartão de meia largura: cabeçalho e detalhe quebram a linha em vez de empurrar a tabela para o lado */
.eq-roy-t th, .eq-roy-t td, .eq-roy-t .eq-sob { white-space: normal; }
.eq-roy-t th, .eq-roy-t td { vertical-align: top; }
/* folga para letra mais larga (fonte do usuário): cabeçalhos e detalhes quebram a linha; o número principal não */
.eq-com-t th, .eq-eg-t th { white-space: normal; }
.eq-com-t td { white-space: normal; }
.eq-com-t td > span > :not(small), .eq-com-t td > span:not(.eq-ind) { white-space: nowrap; }
.eq-com-t .eq-sob { white-space: normal; }
@media (max-width: 1280px) { .eq-eg-roy { grid-template-columns: 1fr; } } /* gorjetas e royalties um embaixo do outro quando não cabem lado a lado */
/* 2ª passada — Vendas (23/11/2026): números de apoio como linhas dentro do herói, células com detalhe embaixo, ação no herói */
.vp2-apoio { margin-top: 18px; padding-top: 6px; border-top: 1px solid var(--line); }
.vp2-apoio .linhas-num { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 32px; }
.vp2-apoio .linhas-num li, .vp2-apoio .linhas-num li:first-child { border-top: 0; border-bottom: 1px solid var(--line); }
.vp2-apoio .linhas-num-a { align-items: center; }
.vp2-apoio .linhas-num-r { flex-direction: column; align-items: flex-start; gap: 2px; }
.vp2-rot { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.vp2-rot-t { display: inline-flex; align-items: center; gap: 6px; }
.vp2-var { font-size: max(12px, .8em); color: var(--muted); }
.vp2-var .kpi-vars { display: inline-flex; flex-wrap: wrap; gap: 0 10px; }
.vp2-apoio + .promo-comp { margin-top: 12px; border-top: 0; padding-top: 0; }
.vp2-cel { display: inline-flex; flex-direction: column; align-items: flex-end; gap: 1px; }
.vp2-cel small { white-space: normal; }
.vp2-cha { align-items: flex-start; max-width: 300px; }
.vp2-acao { margin-top: 10px; }
.vp2-conf-kpi { margin-bottom: 16px; }
@media (max-width: 1100px) { .vp2-apoio .linhas-num { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .vp2-apoio .linhas-num { grid-template-columns: 1fr; }
  .vp2-cel { align-items: flex-start; }
  .vp2-acao { width: 100%; }
}
.vp2-tree td.tree-v { white-space: nowrap; }
.vp2-tree td.tree-v .tree-var { display: block; font-weight: 400; font-size: max(12px, .8em); color: var(--muted); }
@media (max-width: 860px) {
  /* Comparativos → Evolução mensal no celular: 3 números por linha (valor, variação e o do ano anterior embaixo), sem cortar */
  .t.tree.vp2-tree tr { grid-template-columns: repeat(3, minmax(0, 1fr)); grid-auto-flow: row; }
  .t.tree.vp2-tree td.tree-v { grid-row: auto; overflow: visible; white-space: normal; padding-bottom: 6px !important; }
  .t.tree.vp2-tree td.tree-v .tree-ant { display: block; }
  /* 5 números em 3 colunas: o espaço que sobra ao lado do IPA fica da cor da linha (não um buraco branco) */
  .t.tree.vp2-tree tr.lv0 { background: #F1EDE3; }
  .t.tree.vp2-tree tr.lv1 { background: #fff; }
  .t.tree.vp2-tree tr.lv2, .t.tree.vp2-tree tr.lv3 { background: var(--cream-2); }
  .t.tree.vp2-tree tfoot tr { background: var(--sage-l); }
  /* no celular a lista é de cartões: sem rolagem interna e o Total no fim, sem ficar preso no pé (os números se sobrepunham) */
  .table-wrap:has(> .t.tree.vp2-tree) { max-height: none !important; }
  .t.tree.vp2-tree tfoot td { position: static; }
}
@media (max-width: 860px) {
  /* celular: os botões da lista (Abrir anos, Expandir tudo, busca…) numa linha própria embaixo do título;
     Imprimir e Expandir ficam juntos no canto, nunca um deles sozinho numa linha */
  .card-head > .table-tools { flex-basis: 100%; order: 5; }
}
/* Pedido → Produtos (computador): 6 colunas sem rolar para o lado a 1100 px (achado pelo teste de datas difíceis, DATA-01):
   grupo embaixo do nome, estoque e "dura" embaixo da situação, "precisa" embaixo do Pedir e a margem embaixo do preço */
.ped-t th { white-space: normal; }
.ped-t td small.est-tam { white-space: normal; }
.ped-t small.ped-grp { display: block; }
.ped-t small.ped-grp .ped-sub { display: inline; margin-left: 6px; }
.ped-t small.ped-est, .ped-t small.ped-precisa { display: block; margin-top: 3px; }
.ped-t.est-t td.wrap:not(.sticky-col) { min-width: 140px; }

/* Configurações → Erros nas telas */
.cfg-erros-t .cfg-erro-sub { display: block; margin-top: 2px; }
.cfg-erros-t .cfg-erro-novo { margin-left: 6px; }
/* Configurações → Metas e Comissão: escolher vendedores (etiquetas com ✕ + "+ Adicionar vendedor") */
.cfg-vend-sel { border: 0; padding: 0; margin: 14px 0 0; min-width: 0; }
.cfg-vend-sel legend { font-weight: 600; color: var(--dark); padding: 0; margin-bottom: 6px; }
.cfg-vend-chips { margin-bottom: 8px; }
.cfg-vend-chip { display: inline-flex; align-items: center; gap: 6px; cursor: default; }
.cfg-vend-inativo { font-weight: 400; opacity: .9; }
.cfg-vend-x { border: 0; background: transparent; color: inherit; font: inherit; cursor: pointer; padding: 0 2px; min-width: 24px; min-height: 24px; }
.cfg-vend-add { max-width: 320px; }

/* Não foi salvo (TS.naoSalvo, pedido do dono 23/11/2026): a janela de erro em destaque e o campo com problema marcado */
.ts-perg-erro { border-color: var(--bad); }
.ts-perg-erro h3 { color: var(--bad-t); }
.campo-erro, .f-input.campo-erro { border-color: var(--bad) !important; box-shadow: 0 0 0 2px var(--bad-l); }
.campo-erro-msg { display: block; color: var(--bad-t); font-weight: 600; margin-top: 4px; }
/* Campanhas: tirar um cliente à mão (pedido do dono 23/11/2026) */
.cp-tirar { white-space: nowrap; }
.cp-fora { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.cp-fora ul { list-style: none; margin: 6px 0 0; padding: 0; }
.cp-fora li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.cp-fora li span { min-width: 0; overflow-wrap: anywhere; }

/* Configurações → Usuários no celular: cada usuário é um cartão, com "Editar" ao lado do nome (antes ficava 441 px à direita, CLIQUE-VISTA-01) */
@media (max-width: 760px) {
  .cfg-t thead { display: none; }
  .cfg-t, .cfg-t tbody { display: block; }
  .cfg-t tbody > tr:not(.cfg-edit-row) { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .cfg-t tbody > tr:not(.cfg-edit-row) > td { display: block; padding: 0; border: 0; white-space: normal; min-width: 0; grid-column: 1; }
  .cfg-t tbody > tr:not(.cfg-edit-row) > td.cfg-t-acao { grid-column: 2; grid-row: 1 / span 2; align-self: start; }
  .cfg-t td[data-rot]::before { content: attr(data-rot) ': '; color: var(--muted); }
  .cfg-t tbody > tr:not(.cfg-edit-row) > td { background: transparent !important; }
  .cfg-t tbody > tr.cfg-edit-row, .cfg-t tbody > tr.cfg-edit-row > td { display: block; }
}
/* Custos da loja e despesas de um mês só (Configurações → loja → Estoque e margem e a janela "Custos da loja"):
   cabeçalho das colunas preso no topo ao rolar (pedido do dono, 23/11/2026; DESP-CAB-01).
   Computador: a tabela cabe na coluna (larguras em %, campos que encolhem), o bloco não rola e o cabeçalho fica logo abaixo
   da barra do topo (--topo). Celular: cada custo vira um cartão com o nome de cada campo em cima (sem rolar para o lado) e
   a faixa da categoria (nome, total e "+ Custo") fica presa logo abaixo da barra do topo enquanto a lista dela passa. */
.est-cat-t thead th { z-index: 3; }
@media (min-width: 761px) {
  .table-wrap.est-cat-w { overflow: visible; }
  .est-cat-w > .est-cat-t { table-layout: fixed; }
  /* a barra do topo em 2 linhas fica uns px mais baixa que o --topo: a sombra de cima cobre a fresta (nada aparece por cima do cabeçalho) */
  .est-cat-w > .est-cat-t thead th { top: var(--topo, 64px); white-space: normal; box-shadow: 0 1px 0 var(--line), 0 -6px 0 var(--cream-2, #F3EFE6); }
  .est-cat-w > .est-cat-t thead th:first-child { border-top-left-radius: 8px; }
  .est-cat-w > .est-cat-t thead th:last-child { border-top-right-radius: 8px; }
  .est-cat-w > .est-cat-t .f-input, .est-cat-w > .est-cat-t td:nth-child(1) .f-input, .est-cat-w > .est-cat-t td:nth-child(3) .f-input,
  .est-cat-w > .est-cat-t input[type=month], .est-cat-w > .est-cat-t .est-dia { width: 100%; min-width: 0; box-sizing: border-box; }
  .est-cat-fixos th:nth-child(1) { width: 25%; } .est-cat-fixos th:nth-child(2) { width: 14%; } .est-cat-fixos th:nth-child(3) { width: 12%; }
  .est-cat-fixos th:nth-child(4) { width: 12%; } .est-cat-fixos th:nth-child(5) { width: 16%; } .est-cat-fixos th:nth-child(6) { width: 15%; }
  .est-cat-fixos th:nth-child(7) { width: 6%; }
  .est-cat-pont th:nth-child(1) { width: 22%; } .est-cat-pont th:nth-child(2) { width: 19%; } .est-cat-pont th:nth-child(3) { width: 12%; }
  .est-cat-pont th:nth-child(4) { width: 13%; } .est-cat-pont th:nth-child(5) { width: 15%; } .est-cat-pont th:nth-child(6) { width: 13%; }
  .est-cat-pont th:nth-child(7) { width: 6%; }
  .est-cat-w > .est-cat-t tr.est-cat-cab td .est-cat-l .est-cat-nome { width: min(200px, 100%); }
  /* na janela "Custos da loja" quem rola é a própria janela: o cabeçalho prende no alto dela */
  .cfg-popup .est-cat-w > .est-cat-t thead th { top: -18px; } /* -18px = o padding da janela */
}
@media (max-width: 760px) {
  .table-wrap.est-cat-w { overflow: visible; max-height: none; }
  .est-cat-w > .est-cat-t, .est-cat-w > .est-cat-t > tbody, .est-cat-w > .est-cat-t > tfoot { display: block; width: 100%; }
  .est-cat-w > .est-cat-t > thead { display: none; }
  .est-cat-w > .est-cat-t > tbody > tr, .est-cat-w > .est-cat-t > tfoot > tr { display: block; }
  .est-cat-w > .est-cat-t > tbody > tr > td, .est-cat-w > .est-cat-t > tfoot > tr > td { display: block; border-bottom: 0; white-space: normal; }
  .est-cat-w > .est-cat-t > tbody > tr.est-cat-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 10px; padding: 10px; border-bottom: 1px solid var(--line); }
  .est-cat-w > .est-cat-t > tbody > tr.est-cat-item > td { padding: 0; min-width: 0; background: transparent; text-align: left; }
  .est-cat-w > .est-cat-t > tbody > tr.est-cat-item > td[data-l]::before { content: attr(data-l); display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
  .est-cat-w > .est-cat-t > tbody > tr.est-cat-item > td:first-child { grid-column: 1 / -1; }
  .est-cat-w > .est-cat-t > tbody > tr.est-cat-item > td.est-cat-rem { justify-self: end; align-self: end; }
  .est-cat-w .est-cat-rem .est-outro-rem { min-width: 40px; min-height: 40px; }
  .est-cat-w > .est-cat-t .f-input, .est-cat-w > .est-cat-t td:nth-child(1) .f-input, .est-cat-w > .est-cat-t td:nth-child(3) .f-input,
  .est-cat-w > .est-cat-t input[type=month], .est-cat-w > .est-cat-t .est-dia { width: 100%; min-width: 0; box-sizing: border-box; height: 40px; }
  .est-cat-w > .est-cat-t tr.est-cat-cab td .est-cat-l { gap: 6px 8px; }
  .est-cat-w > .est-cat-t tr.est-cat-cab td .est-cat-l .est-cat-nome { width: auto; flex: 1 1 110px; min-width: 0; padding-left: 4px; }
  .est-cat-w > .est-cat-t tr.est-cat-cab td .est-cat-tot { white-space: nowrap; }
  .est-cat-w > .est-cat-t tr.est-cat-cab td .est-cat-add { flex: none; }
  /* a faixa da categoria fica presa embaixo da barra do topo (a sombra de cima cobre a fresta da barra de 2 linhas) */
  .est-cat-w > .est-cat-fixos > tbody > tr.est-cat-cab { position: sticky; top: var(--topo, 104px); z-index: 3; background: #EEF4EE; box-shadow: 0 1px 0 var(--line), 0 -8px 0 #EEF4EE; }
  .est-cat-w > .est-cat-t > tfoot > tr > td { position: static; }
  .cfg-popup .est-cat-w > .est-cat-fixos > tbody > tr.est-cat-cab { top: -18px; }
}
/* Campos da mensagem (lista única TS.CAMPOS_MSG, TS.camposMsg em clientes.js; CAMPOS-MSG-01): chips + "Ver todos os campos" */
.cp-campos-box { display: grid; gap: 2px; min-width: 0; }
.cp-campos-box .cp-campos { margin: 4px 0 2px; }
.cp-campos-todos > .cp-campos-tab { color: var(--ink); margin-top: 6px; min-width: 0; }
.cp-campos-t .cp-campo-k { font-family: ui-monospace, monospace; font-size: 12px; color: var(--dark); white-space: nowrap; }
.cp-campos-t td.wrap { white-space: normal; overflow-wrap: anywhere; min-width: 0; }
@media (min-width: 761px) {
  .cp-campos-t { table-layout: fixed; }
  .cp-campos-t th { white-space: normal; }
  .cp-campos-t th:nth-child(1) { width: 19%; } .cp-campos-t th:nth-child(2) { width: 33%; }
  .cp-campos-t th:nth-child(3) { width: 20%; } .cp-campos-t th:nth-child(4) { width: 28%; }
}

/* Resultado: receita separada (Loja · Espaço Gourmet · taxa de serviço identificada) — RES-TAXA-01 */
.dre-t tr.dre-bruto td { font-weight: 700; }
.dre-t tr.dre-parte td:first-child { padding-left: 18px; color: #3D4A42; }
.dre-t tr.dre-taxa td { background: var(--gold-l) !important; color: var(--gold-t); font-weight: 600; }
.dre-t tr.dre-taxa td:first-child { padding-left: 18px; }
.dre-t tr.dre-repasse td:first-child { padding-left: 18px; color: #3D4A42; }
.dre-t tr[title] td:first-child { cursor: help; }

/* Conversas: responder pela conversa (fase 2) — caixa de texto + Enviar embaixo das mensagens */
.cv-resp { display: flex; gap: 8px; align-items: flex-end; margin-top: 10px; }
.cv-resp-txt { flex: 1; min-width: 0; resize: vertical; min-height: 44px; max-height: 200px; }
.cv-resp-bt { flex: none; }
.cv-resp-nao { margin-top: 10px; }
/* celular: a coluna dos nomes do Resultado quebra a linha, para a 1ª coluna de valores caber sem rolar (com a letra mais larga
   do servidor de testes ela ficava 8 px escondida e o "lançar o valor do mês" era clicado fora da vista — CLIQUE-VISTA-01) */
@media (max-width: 760px) {
  .dre-t td:first-child, .dre-t th:first-child { white-space: normal; min-width: 110px; max-width: 140px; }
  .dre-t tr.dre-filho td:first-child { padding-left: 24px; }
}
/* Resultado: royalties e marketing como linhas abaixo de "Royalties + marketing", com o valor real do mês editável (DRE-CALC-01) */
.dre-t tr.dre-calc td { font-size: 13px; color: #3D4A42; }
.dre-t tr.dre-calc td:first-child { padding-left: 36px; }
.dre-dica-edit { margin: 0 0 8px; font-size: 13px; }

/* HOMOLOG-01: faixa do painel de homologação (fixa embaixo, por cima de tudo, sem mexer na barra do topo) */
.faixa-homolog { position: fixed; left: 0; right: 0; bottom: 0; z-index: 1200; background: var(--gold); color: var(--dark); font-weight: 700; font-size: 13px; text-align: center; padding: 6px 12px; letter-spacing: .3px; }
body.em-homolog { padding-bottom: 34px; }
body.em-homolog .topbar { box-shadow: inset 0 -4px 0 var(--gold); }

/* Site: a etiqueta da situação quebra a linha ("Promoção + preço diferente" saía do cartão no celular — LARG-01) */
.badge.site-sit { white-space: normal; max-width: 100%; }

/* Cupons no celular (CUP-MOB-01): uma coluna só; hora, vendedora, CPF e itens embaixo do nome e o valor à direita */
.cup-mob { display: none; }
@media (max-width: 860px) {
  .cupons-t th:not(:first-child), .cupons-t td:not(:first-child) { display: none; }
  .cupons-t th:first-child, .cupons-t td:first-child { width: 100%; max-width: none; white-space: normal; position: static; }
  .cupons-t .tree-cell { display: flex; align-items: flex-start; width: 100%; }
  .cupons-t .tree-cell > span:last-child { display: block; flex: 1; min-width: 0; overflow-wrap: anywhere; }
  .cupons-t .cup-mob { width: 100%; }
  .cup-mob { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 2px; font-size: 12.5px; font-weight: 400; color: var(--muted); }
  .cup-mob-l { min-width: 0; overflow-wrap: anywhere; }
  .cup-mob-v { flex-shrink: 0; color: var(--ink); font-weight: 700; font-size: 14px; }
}

/* "O que mudou no painel" (NOV-01): janela por cima de tudo, lista com divisória */
.nov-caixa { background: #fff; border-radius: 14px; max-width: 520px; width: calc(100vw - 32px); max-height: calc(100vh - 64px); overflow: auto; padding: 22px 24px; box-shadow: 0 12px 40px rgba(0,0,0,.18); }
.nov-caixa h2 { margin: 0 0 10px; font-size: 19px; color: var(--dark); }
.nov-lista { list-style: none; margin: 0; padding: 0; }
.nov-item { padding: 10px 0; border-top: 1px solid var(--line); }
.nov-item:first-child { border-top: 0; }
.nov-tit { font-weight: 700; color: var(--dark); }
.nov-item p { margin: 4px 0 0; font-size: 14px; line-height: 1.45; }
.nov-acoes { display: flex; justify-content: flex-end; margin-top: 14px; }
@media (max-width: 860px) { .nov-caixa { padding: 18px; } .nov-acoes .btn { width: 100%; } }
