/* Automação › Dashboard Financeiro do Armazém da Gula II.
   A tela usa os componentes do portal (faixa, chip, cartao, indicador, bloco, tabela, selo,
   vazio, mensagem-erro). Aqui ficam só os detalhes que o portal ainda não tinha. */
.g2 { display: flex; flex-direction: column; gap: 12px; transition: opacity .15s; }
.g2.carregando, .g2-carregando { opacity: .45; }
.g2.defasado .cartao { opacity: .7; }

button.chip { cursor: pointer; font: inherit; font-size: 12.5px; }
button.chip:hover:not(.destaque) { color: var(--texto); }

/* Título do bloco com o período/recorte à direita. */
.g2-cab { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.g2-cab h2 { margin: 0; font-size: 14px; font-weight: 600; }
.g2-cab small { margin-left: auto; color: var(--suave); font-size: 12.5px; }

.g2 .indicador { display: flex; flex-direction: column; }
.g2 .indicador strong { font-size: 24px; }
.g2-sobe { color: var(--verde); font-weight: 600; }
.g2-desce { color: var(--vermelho); font-weight: 600; }
.g2-spark { display: block; width: 100%; height: 36px; margin-top: 10px; }

.g2 td.num, .g2 td.nowrap { white-space: nowrap; }
.g2 tfoot td { border-bottom: 0; border-top: 1px solid var(--borda); }
/* Vendas por meio de pagamento: uma coluna por meio, lado a lado (quebra no celular). */
.g2-meios { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 18px 24px;
            border-top: 1px solid var(--borda); padding-top: 14px; }
.g2-meio { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.g2-meio small { color: var(--suave); font-size: 10.5px; letter-spacing: .04em; text-transform: uppercase;
                 white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g2-meio strong { font-size: 17px; font-weight: 600; white-space: nowrap; }
.g2-meio-barra { display: block; height: 3px; margin-top: 4px; }
.g2-meio-barra i { display: block; height: 100%; border-radius: 2px; background: var(--laranja); }
.g2-meio-info { color: var(--fraco); font-size: 11px; }

.g2-filtro { margin-bottom: 10px; }
.g2-paginas { margin-top: 10px; }
.g2-pos { color: var(--fraco); }
.g2-neg-valor { color: var(--vermelho); font-weight: 600; }
.g2-selos { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.g2-selos .selo { font-size: 11px; padding: 1px 8px; font-weight: 500; }
.g2 .vazio { margin: 12px auto; }
/* No celular as tabelas rolam de lado (como as outras do portal), sem quebrar o nome do produto. */
.g2, .g2 > * { min-width: 0; }
.g2 .rolagem > table { min-width: 480px; }
.g2 .rolagem > table.g2-neg { min-width: 900px; }

/* ── Abas da loja (Dashboard Financeiro · Contas a Pagar · …) ── */
/* flex: none — com rolagem própria, numa coluna flex a faixa encolhia até sumir quando a tela passava da altura da janela */
.g2-abas { flex: none; padding: 0; overflow-x: auto; overflow-y: hidden; margin-bottom: 4px; }

/* ── Topo (como na Azeha): à direita, relógio da última leitura + período em bloco segmentado ── */
.g2-topo { flex: none; display: flex; justify-content: flex-end; align-items: flex-start; gap: 18px; flex-wrap: wrap; }
.g2-relogio { display: flex; align-items: center; gap: 9px; min-height: 40px; }
.g2-relogio__pulso { width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--verde); box-shadow: 0 0 0 3px var(--verde-fundo); }
@media (prefers-reduced-motion: no-preference) {
  .g2-relogio__pulso { animation: g2-pisca 2.4s ease-in-out infinite; }
  @keyframes g2-pisca { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
}
.g2-relogio.defasado .g2-relogio__pulso { background: var(--vermelho); box-shadow: 0 0 0 3px rgba(239, 68, 68, .15); animation: none; }
.g2-relogio__txt { display: flex; flex-direction: column; line-height: 1.25; }
.g2-relogio__rotulo { font-size: 10.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--fraco); }
.g2-relogio__hora { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.g2-relogio__hora em { font-style: normal; margin-left: 7px; color: var(--vermelho); }
.g2-periodo { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.segmentado { display: inline-flex; flex-wrap: wrap; padding: 3px; border-radius: 9px; background: var(--painel-2); border: 1px solid var(--borda); }
.segmentado button { padding: 6px 16px; border: 0; border-radius: 6px; background: none; font: inherit; font-size: 13px; font-weight: 600;
                     color: var(--suave); cursor: pointer; white-space: nowrap; transition: background .15s, color .15s; }
.segmentado button:hover:not(.ativo) { color: var(--texto); }
.segmentado button.ativo { background: var(--hover); color: var(--texto); box-shadow: 0 1px 2px rgba(0, 0, 0, .25); }
/* Contas a Pagar usa o ERP mas não o período; Escala e Funcionários não usam o ERP. */
[data-aba="contas"] .g2-periodo, [data-aba="escala"] .g2-topo, [data-aba="funcionarios"] .g2-topo,
[data-aba="escala"] .g2-aviso, [data-aba="funcionarios"] .g2-aviso { display: none !important; }
.g2-aviso { display: flex; align-items: flex-start; gap: 11px; padding: 13px 16px; border-radius: 10px; font-size: 13.5px; line-height: 1.5;
            color: var(--vermelho); background: rgba(239, 68, 68, .1); border: 1px solid rgba(239, 68, 68, .25); }
.g2-aviso[hidden] { display: none; }
.g2-aviso__ico { width: 19px; height: 19px; flex: none; display: grid; place-items: center; margin-top: 1px; border-radius: 50%;
                 background: var(--vermelho); color: #fff; font-size: 12px; font-weight: 700; }
@media (max-width: 640px) { .g2-topo { justify-content: stretch; } .g2-periodo { align-items: stretch; } }
[data-aba-corpo] { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.g2-abas .aba { display: inline-flex; align-items: center; gap: 7px; padding: 10px 12px; }
.g2-abas .aba svg.i { width: 15px; height: 15px; }

/* ── Contas a Pagar: calendário de vencimentos ── */
.g2-cab--nav { align-items: center; }
.g2-mesnav { display: flex; align-items: center; gap: 4px; }
.g2-mesnav__seta { width: 28px; height: 28px; flex: none; display: grid; place-items: center; padding: 0;
                   border: 1px solid var(--borda); border-radius: 8px; background: var(--painel-2); color: var(--suave); cursor: pointer; }
.g2-mesnav__seta:hover { background: var(--hover); color: var(--texto); }
.g2-mesnav__seta svg.i { width: 16px; height: 16px; }
.g2-mesnav__mes { min-width: 148px; text-align: center; font-size: 13px; font-weight: 600; color: var(--suave); }
.g2-mesnav__hoje { margin-left: 4px; padding: 5px 11px; border: 1px solid var(--borda); border-radius: 8px; background: var(--painel-2);
                   color: var(--suave); font: inherit; font-size: 12px; cursor: pointer; white-space: nowrap; }
.g2-mesnav__hoje:hover { background: var(--hover); color: var(--texto); }

.g2-cal__rolagem { overflow-x: auto; }
.g2-cal { min-width: 700px; border: 1px solid var(--borda); border-radius: 10px; overflow: hidden; background: var(--painel-2); }
.g2-cal__cab, .g2-cal__corpo { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)) minmax(86px, .9fr); }
.g2-cal__cab { background: var(--hover); border-bottom: 1px solid var(--borda); }
.g2-cal__cab span { padding: 10px 12px; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--fraco); }
.g2-cal__cab .g2-cal__cab--semana { color: var(--suave); font-weight: 700; }
.g2-cel { min-width: 0; min-height: 104px; padding: 9px 11px 11px; text-align: left; display: flex; flex-direction: column; gap: 3px;
          border: 0; border-right: 1px solid var(--borda); border-bottom: 1px solid var(--borda); background: var(--painel); }
.g2-cel:nth-child(8n) { border-right: 0; }
.g2-cel--semana { background: var(--hover); align-items: center; justify-content: center; text-align: center; }
.g2-cel--semana .g2-cel__valor, .g2-cel--semana .g2-cel__travessao { margin-top: 0; }
.g2-cel--fora, .g2-cel--vazio { background: var(--painel-2); }
button.g2-cel { width: 100%; font: inherit; color: inherit; cursor: pointer; }
button.g2-cel:hover { background: var(--hover); }
button.g2-cel:hover .g2-cel__valor { color: var(--laranja-texto); }
.g2-cel__num { width: 25px; height: 25px; display: grid; place-items: center; flex: none; border-radius: 50%;
               font-size: 12.5px; font-weight: 600; color: var(--suave); font-variant-numeric: tabular-nums; }
.g2-cel.hoje .g2-cel__num { background: var(--laranja); color: #fff; }
.g2-cel--fora .g2-cel__num, .g2-cel--vazio .g2-cel__num { color: var(--fraco); opacity: .6; }
.g2-cel__valor { margin-top: auto; font-size: 15px; font-weight: 600; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.g2-cel__qtd { font-size: 11px; color: var(--fraco); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.g2-cel__travessao { margin-top: auto; font-size: 15px; color: var(--fraco); opacity: .5; }
.g2-cel__barra { display: block; height: 3px; margin-top: 8px; border-radius: 2px; background: var(--hover); }
.g2-cel__barra i { display: block; height: 100%; border-radius: 2px; background: var(--laranja); opacity: .85; }
.g2-cel.passou { background: var(--verde-fundo); }
.g2-cel.passou .g2-cel__valor { color: var(--verde); }
.g2-cel.passou .g2-cel__barra i { background: var(--verde); }
button.g2-cel.passou:hover .g2-cel__valor { color: var(--verde); }
.g2-legenda { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; margin-top: 16px; }
.g2-legenda span { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--suave); }
.g2-legenda i { display: block; flex: none; width: 9px; height: 9px; border-radius: 3px; }

/* ── a lista de boletos do dia (e a pergunta das parcelas) ── */
.g2-dia { padding: 0; }
.g2-dia__topo { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 20px 20px 14px;
                border-bottom: 1px solid var(--borda); }
.g2-dia__topo h2, .g2-parcelas h2 { margin: 0; }
.g2-dia__sub { margin: 3px 0 0; font-size: 12.5px; color: var(--fraco); font-variant-numeric: tabular-nums; }
.g2-dia__corpo { max-height: min(60vh, 520px); overflow-y: auto; }
.g2-dia__corpo .vazio { margin: 20px; }
.g2-dia__fora { color: var(--fraco); }
.g2-dia__recado { color: var(--laranja-texto); font-weight: 600; }
.g2-linha { display: flex; align-items: center; gap: 14px; padding: 13px 20px; border-bottom: 1px solid var(--borda); }
.g2-linha:last-child { border-bottom: 0; }
.g2-linha__qual { flex: 1; min-width: 0; }
.g2-linha__nome { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g2-linha__sob { margin-top: 2px; font-size: 11.5px; font-weight: 700; color: var(--suave); font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
                 overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g2-linha__emissao { color: var(--vermelho); font-size: 13px; font-weight: 700; }
.g2-linha__val { font-size: 14.5px; font-weight: 600; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.g2-linha--ignorada .g2-linha__nome, .g2-linha--ignorada .g2-linha__val { text-decoration: line-through; opacity: .55; }
.g2-linha--ignorada .g2-linha__sob { opacity: .75; }
.g2-linha--ignorada .g2-linha__sob b { color: var(--suave); font-weight: 600; }
.g2-linha__acao { flex: none; width: 28px; height: 28px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
                  border: 0; border-radius: 50%; background: var(--laranja-fundo); color: var(--laranja-texto); cursor: pointer; }
.g2-linha__acao:hover { background: var(--laranja); color: #fff; }
.g2-linha__acao:disabled { opacity: .4; cursor: default; }
.g2-linha__acao svg.i { width: 15px; height: 15px; }
.g2-parcelas .g2-dia__corpo { max-height: min(42vh, 320px); margin: 12px -22px 0; border-top: 1px solid var(--borda); border-bottom: 1px solid var(--borda); }

@media (max-width: 640px) {
  .g2-cab--nav .g2-mesnav { width: 100%; order: 3; }
  .g2-mesnav__mes { flex: 1; min-width: 0; }
  .g2-linha { padding: 12px 16px; gap: 10px; }
  .g2-parcelas .botoes { flex-direction: column-reverse; align-items: stretch; }
}

/* ── Escala de folgas (loja-equipe.js) ── */
.eq-aviso { margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; background: var(--laranja-fundo); color: var(--laranja-texto); font-size: 13px; }
.eq-cal { min-width: 640px; border: 1px solid var(--borda); border-radius: 10px; overflow: hidden; background: var(--painel-2); }
.eq-cal__cab, .eq-cal__grade { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.eq-cal__cab { background: var(--hover); border-bottom: 1px solid var(--borda); }
.eq-cal__cab span { padding: 10px 12px; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--fraco); }
.eq-cel { min-width: 0; min-height: 96px; padding: 8px 10px 10px; display: flex; flex-direction: column; gap: 6px; text-align: left;
          border: 0; border-right: 1px solid var(--borda); border-bottom: 1px solid var(--borda); background: var(--painel); color: inherit; font: inherit; }
.eq-cel:nth-child(7n) { border-right: 0; }
.eq-cel--fora { background: var(--painel-2); }
.eq-cel.fds { background: var(--painel-2); }
button.eq-cel { cursor: pointer; }
button.eq-cel:hover:not(:disabled) { background: var(--hover); }
button.eq-cel:disabled { cursor: default; }
.eq-cel__num { width: 25px; height: 25px; display: grid; place-items: center; flex: none; border-radius: 50%; font-size: 12.5px; font-weight: 600; color: var(--suave); }
.eq-cel.hoje .eq-cel__num { background: var(--laranja); color: #fff; }
.eq-cel__folgas { display: flex; flex-wrap: wrap; gap: 4px; }
.eq-folga { padding: 2px 7px; border-radius: 999px; background: var(--laranja-fundo); color: var(--laranja-texto); font-size: 11px; font-weight: 600; white-space: nowrap; }
.eq-folga--mais { background: var(--hover); color: var(--suave); }
.eq-dia__lista { display: flex; flex-direction: column; gap: 2px; max-height: 50vh; overflow-y: auto; }
.eq-dia__pessoa { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.eq-dia__pessoa:hover { background: var(--hover); }
.eq-dia__pessoa input { width: 16px; height: 16px; accent-color: var(--laranja); }
.eq-dia__pessoa span { display: flex; flex-direction: column; }
.eq-dia__pessoa small { color: var(--fraco); font-size: 11.5px; }

/* ── Funcionários e documentos ── */
.eq-check { display: inline-flex; align-items: center; gap: 6px; color: var(--suave); font-size: 13px; white-space: nowrap; }
.eq-check input { accent-color: var(--laranja); }
.eq-tabela td { padding: 10px 14px; border-bottom: 1px solid var(--borda); }
.eq-tabela tbody tr:last-child td { border-bottom: 0; }
.eq-func tbody tr { cursor: pointer; }
.eq-func tbody tr:hover td { background: var(--hover); }
.eq-func tr.inativo td { opacity: .6; }
.eq-tabela td.nowrap { white-space: nowrap; }
.eq-docs { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--borda); }
.eq-docs h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 14px; }
.eq-docs h3 svg.i { width: 16px; height: 16px; }
.eq-docs__envio { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.eq-docs__envio label.botao { cursor: pointer; }
.eq-docs .mensagem-erro { margin-bottom: 12px; }
.eq-docs__nome { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eq-docs__acoes { white-space: nowrap; text-align: right; }
.eq-docs__acoes .icone-btn { display: inline-grid; width: 30px; height: 30px; vertical-align: middle; }
