/* ============================================================================
   FISCAL — cadastro da empresa

   /!\ ESTE PAINEL NAO CARREGA BOOTSTRAP. As classes `form-control` e
   `form-select` so existem dentro de `#rbModal` (css/recebimento.css). Usa-las
   fora dali entrega caixa crua do navegador, estreita, com o texto cortado — foi
   exatamente o que aconteceu na primeira versao desta tela, em 30/09/2026.
   Aqui o estilo e proprio e o modal reaproveita `css/modais.css`, que e o
   padrao da casa.
   ========================================================================== */

/* ---------------------------------------------------------------- a lista  */
.fisc-topo {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 14px; gap: 12px; flex-wrap: wrap;
}
.fisc-topo .fisc-contagem { font-size: 13px; color: #6b7280; }

/* /!\ TABELA DE LARGURA CHEIA, e nao cartao. O painel inteiro (Compras,
   Frota, Contas a Pagar) lista em tabela; cartao estreito destoa e desperdica a
   largura, que e justamente o que sobra num cadastro de poucas linhas. */
.fisc-tabela { width: 100%; }
.fisc-tabela td { vertical-align: top; }
.fisc-tabela tr.inativo td { opacity: .5; }
.fisc-tabela tr:hover td { background: #fafbfd; }
/* NCM em uso: o contexto (posição, subposição) em cinza e o item em negrito. */
.fisc-ncm-ctx { color: #8b95a5; }
.fisc-ncm-pos { font-size: 11.5px; color: #8b95a5; }
.fisc-tabela tr.fisc-ncm-nao td { background: #fdf6f5; }
/* cClassTrib: a linha do CST separa os grupos, como na tabela oficial. */
.fisc-tabela tr.fisc-ctrib-g td { background: #f2f5f8; font-size: 11px; font-weight: 700;
                                  color: #5a6472; text-transform: uppercase; letter-spacing: .3px; }

.fisc-cnpj {
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 13.5px; font-weight: 600; color: #1a3c7d; letter-spacing: -.2px;
  white-space: nowrap;
}
.fisc-sub { font-size: 11.5px; color: #9aa3af; margin-top: 2px; }
/* O que impede a nota de sair aparece em vermelho na propria linha, sem clicar. */
.fisc-falta { color: #c62828; font-weight: 600; }

.fisc-tag {
  display: inline-block;
  font-size: 10px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
  padding: 2px 8px; border-radius: 10px; white-space: nowrap;
}
.fisc-tag.matriz { background: #eef2ff; color: #3949ab; }
.fisc-tag.filial { background: #e8f5ec; color: #2e7d46; }
.fisc-tag.homolog { background: #eef3ff; color: #3366cc; }
/* /!\ VERMELHO DE PROPOSITO: ambiente de producao emite documento fiscal de
   verdade, que so se desfaz com cancelamento e dentro do prazo. Tem de saltar. */
.fisc-tag.prod { background: #fdecec; color: #c62828; }
.fisc-tag.off { background: #f1f3f5; color: #868e96; }

.fisc-alerta {
  background: #fff8e6; border: 1px solid #ffdf9e; border-left: 4px solid #f0a500;
  border-radius: 8px; padding: 12px 16px; margin-top: 16px;
  font-size: 13px; color: #7a5200; line-height: 1.55;
}
.fisc-alerta b { color: #5c3d00; }
.fisc-alerta ul { margin: 6px 0 0; padding-left: 20px; }

/* ------------------------------------------------------------- formulario  */
/* /!\ `width:100%` E O QUE FALTOU NA 1a VERSAO. Sem isto o input fica no
   tamanho default do navegador e corta "FIBRAT DO BRASIL TECNO...". */
.fisc-form input, .fisc-form select {
  width: 100%; box-sizing: border-box;
  padding: 8px 11px; border: 1px solid #dde3ec; border-radius: 7px;
  font-size: 13.5px; font-family: inherit; color: #1f2937; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.fisc-form input:focus, .fisc-form select:focus {
  outline: none; border-color: #1a3c7d; box-shadow: 0 0 0 3px rgba(26,60,125,.10);
}
.fisc-form input::placeholder { color: #c3cad4; }
.fisc-form input[readonly] { background: #f7f8fa; color: #6b7280; }

.fisc-secao {
  font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase;
  color: #8b95a5; margin: 22px 0 10px; padding-bottom: 6px;
  border-bottom: 1px solid #eef1f5;
}
.fisc-secao:first-child { margin-top: 0; }

.fisc-grid { display: grid; gap: 12px 16px; }
.fisc-campo label {
  display: block; font-size: 11.5px; font-weight: 600; color: #6b7280;
  margin-bottom: 4px;
}
.fisc-campo label .req { color: #c62828; }
.fisc-dica { font-size: 11px; color: #9aa3af; margin-top: 4px; line-height: 1.4; }

.fisc-aviso-prod {
  background: #fdecec; border: 1px solid #f8c7c7; border-radius: 7px;
  padding: 9px 13px; font-size: 12px; color: #a13333; margin-top: 12px;
}

.fisc-erro {
  background: #fdecec; border: 1px solid #f5b5b5; border-radius: 7px;
  padding: 10px 14px; margin-top: 14px; font-size: 13px; color: #a01e1e;
  line-height: 1.6; display: none;
}
.fisc-erro.on { display: block; }
.fisc-erro ul { margin: 4px 0 0; padding-left: 18px; }

/* Telas estreitas: uma coluna. O cadastro fiscal se preenche no notebook, mas
   se confere no celular. */
@media (max-width: 720px) {
  .fisc-grid { grid-template-columns: 1fr !important; }
}

/* ------------------------------------------------------- certificado A1    */
.fisc-cert {
  background: #fff; border: 1px solid #e3e8ef; border-left: 4px solid #2e7d46;
  border-radius: 10px; padding: 16px 20px; margin-top: 16px;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
/* Vencido e vermelho, vencendo e ambar: o A1 vale um ano e nao avisa sozinho —
   quem descobre tarde fica sem emitir nota ate renovar. */
.fisc-cert.vencendo { border-left-color: #f0a500; background: #fffdf7; }
.fisc-cert.vencido  { border-left-color: #c62828; background: #fff8f8; }

.fisc-cert-topo { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.fisc-cert-topo .fisc-acao { margin-left: auto; }
.fisc-cert-titulo { font-size: 14px; font-weight: 700; color: #1a3c7d; }
.fisc-cert-texto { font-size: 13px; color: #6b7280; max-width: 480px; margin: 6px auto 16px; }

.fisc-linhas { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 13px; }
.fisc-linhas dt { color: #9aa3af; }
.fisc-linhas dd { color: #374151; margin: 0; }

.fisc-tag.ok     { background: #e8f5ec; color: #2e7d46; }
.fisc-tag.alerta { background: #fff4e0; color: #9a6700; }

/* O seletor de arquivo do navegador nao herda o estilo dos inputs. */
.fisc-form input[type=file] {
  padding: 7px 9px; background: #fafbfd; cursor: pointer; font-size: 12.5px;
}

/* ------------------------------------------------------- botao do certificado */
/* /!\ FICA NO TOPO, ao lado de "Novo estabelecimento". Como painel no rodape ele
   sai da primeira dobra assim que a lista cresce — e o certificado e justamente
   o item que vence sozinho e sem o qual nao sai nota. */
.fisc-botoes { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.fisc-btn-cert {
  background: #eef3ff; color: #1a3c7d; border: 1px solid #c7d6f5;
  font-weight: 600; white-space: nowrap;
}
.fisc-btn-cert:hover { background: #e2eaff; }

/* Dentro do modal o resumo nao precisa da moldura toda. */
.modal-body .fisc-cert { margin-top: 0; }

/* ---------------------------------------------------------- emitir NF-e    */
/* O que vale para a carteira inteira (emitente, certificado) fica em cima:
   os dois bloqueiam TODOS os pedidos de uma vez, e repetir isso em 28 linhas
   esconderia o que e especifico de cada pedido. */
.fisc-chks { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.fisc-chk {
  background: #fff; border: 1px solid #e3e8ef; border-left: 4px solid #2e7d46;
  border-radius: 9px; padding: 12px 16px; font-size: 13px;
}
.fisc-chk.falhou { border-left-color: #c62828; background: #fff8f8; }
.fisc-chk b { margin-left: 6px; color: #1f2937; }
.fisc-sub-txt { font-size: 12px; color: #9aa3af; margin-top: 4px; margin-left: 26px; }
.fisc-sub-txt.alerta { color: #9a6700; }

.fisc-faltas { margin: 0; padding-left: 16px; font-size: 12.5px; color: #a13333; }
.fisc-faltas li { margin: 1px 0; }

/* O XML cru, para o operador ver e copiar. `monospace` porque o alinhamento das
   tags e o que torna um documento de 4 KB legivel. */
.fisc-xml {
  width: 100%; box-sizing: border-box; height: 260px; resize: vertical;
  font-family: ui-monospace, "Cascadia Mono", Consolas, monospace;
  font-size: 11px; line-height: 1.45; color: #374151;
  border: 1px solid #dde3ec; border-radius: 7px; padding: 10px 12px;
  background: #fafbfd; white-space: pre; overflow-wrap: normal; overflow-x: auto;
}

/* ================================================ os 4 cartoes do topo      */
/* /!\ SAO OS DO PROTOTIPO 01, e contam o que decide o dia de quem opera:
   quantas emitem, quantas estao prontas, quantas travadas por dado obrigatorio,
   e quantas com certificado em risco. Certificado vencido = cliente parado,
   descobrindo pelo telefone. */
.fisc-kpis {
  display: grid; gap: 12px; margin-bottom: 16px;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.fisc-kpi {
  background: #fff; border: 1px solid #e3e8ef; border-left: 4px solid #3949ab;
  border-radius: 10px; padding: 12px 16px; box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.fisc-kpi.ok     { border-left-color: #2e7d46; }
.fisc-kpi.alerta { border-left-color: #f0a500; }
.fisc-kpi.erro   { border-left-color: #c62828; }
.fisc-kpi-t { font-size: 11px; font-weight: 700; letter-spacing: .5px;
              text-transform: uppercase; color: #8b95a5; }
.fisc-kpi-n { font-size: 28px; font-weight: 700; color: #1a3c7d; line-height: 1.25; }
.fisc-kpi.ok     .fisc-kpi-n { color: #2e7d46; }
.fisc-kpi.alerta .fisc-kpi-n { color: #b07800; }
.fisc-kpi.erro   .fisc-kpi-n { color: #c62828; }
.fisc-kpi-r { font-size: 11.5px; color: #9aa3af; }

/* ================================================ a barra de filtro         */
.fisc-busca, #fisc-filtro-situacao, #fisc-emi-situacao {
  padding: 7px 11px; border: 1px solid #dde3ec; border-radius: 7px;
  font-size: 13px; font-family: inherit; color: #1f2937; background: #fff;
}
.fisc-busca { width: 260px; }
.fisc-busca:focus, #fisc-filtro-situacao:focus, #fisc-emi-situacao:focus {
  outline: none; border-color: #1a3c7d; box-shadow: 0 0 0 3px rgba(26,60,125,.10);
}
.btn-verde { background: #2e7d46; color: #fff; border: 1px solid #2e7d46; }
.btn-verde:hover { background: #266a3b; }

/* ================================================ a coluna do certificado   */
/* A bolinha colorida e o que se le de relance numa lista de 200 empresas. */
.fisc-bola {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  margin-right: 7px; vertical-align: middle;
}
.fisc-bola.ok   { background: #2e7d46; }
.fisc-bola.venc { background: #f0a500; }
.fisc-bola.erro { background: #c62828; }

.fisc-sim { color: #2e7d46; font-weight: 700; }
.fisc-na  { color: #c3cad4; }
.fisc-cadeado { cursor: help; }

.fisc-sit {
  display: inline-block; font-size: 10.5px; font-weight: 700; letter-spacing: .4px;
  padding: 3px 9px; border-radius: 10px; line-height: 1.35;
}
.fisc-sit.ok     { background: #e8f5ec; color: #2e7d46; }
.fisc-sit.alerta { background: #fff4e0; color: #9a6700; }
.fisc-sit small  { font-weight: 500; opacity: .8; }

/* ============================================ as duas visoes                */
/* /!\ A SEPARACAO E DE SEGURANCA, nao de layout: o cliente nunca ve lista, nem
   o cadastro, nem o certificado, nem a numeracao de outra empresa. */
.fisc-visoes { display: flex; gap: 6px; margin-bottom: 16px; }
.fisc-visao {
  padding: 9px 18px; border: 1px solid #dde3ec; background: #fff; color: #8b95a5;
  border-radius: 8px; font-size: 13px; font-weight: 600; cursor: pointer;
  font-family: inherit;
}
.fisc-visao.on { background: #1a3c7d; color: #fff; border-color: #1a3c7d; }

.fisc-meu { background: #fff; border: 1px solid #e3e8ef; border-radius: 10px;
            padding: 20px 24px; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.fisc-meu-t { font-size: 15px; font-weight: 700; color: #1a3c7d; margin-bottom: 8px; }
.fisc-meu-p { font-size: 13px; color: #6b7280; margin: 0 0 14px; max-width: 640px; }

/* ============================================ a barra de requisitos         */
.fisc-barra { height: 7px; background: #eef1f5; border-radius: 4px; overflow: hidden; margin: 10px 0 5px; }
.fisc-barra-in { height: 100%; background: #f0a500; border-radius: 4px; transition: width .25s; }
.fisc-barra-t { font-size: 12px; color: #9a6700; }
.fisc-barra-t b { color: #7a5200; }

/* ============================================ o modal de 5 abas            */
.fisc-modal-sub { font-size: 11.5px; font-weight: 400; opacity: .82; margin-top: 2px; }
.fisc-abas { display: flex; gap: 2px; border-bottom: 1px solid #e3e8ef;
             padding: 0 20px; background: #fafbfd; flex-wrap: wrap; }
.fisc-aba {
  padding: 11px 16px; border: 0; background: none; color: #8b95a5; cursor: pointer;
  font-size: 13px; font-weight: 600; font-family: inherit;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.fisc-aba.on { color: #1a3c7d; border-bottom-color: #1a3c7d; }
.fisc-aba:hover { color: #1a3c7d; }

/* /!\ A PRONTIDAO FICA FIXA NA DIREITA, visivel em TODAS as abas: quem preenche
   o endereco precisa continuar vendo que falta a inscricao municipal. */
.fisc-modal-corpo { display: grid; grid-template-columns: 1fr 320px; gap: 18px; }
.fisc-painel { min-width: 0; }
.fisc-prontidao { background: #fafbfd; border: 1px solid #eef1f5; border-radius: 10px;
                  padding: 16px 18px; align-self: start; }
.fisc-pront-t { font-size: 13.5px; font-weight: 700; color: #1a3c7d; }
.fisc-pront-s { font-size: 11.5px; color: #9aa3af; margin: 2px 0 0; }
.fisc-reqs { list-style: none; margin: 14px 0 0; padding: 0; }
.fisc-reqs li { display: grid; grid-template-columns: 22px 1fr; gap: 2px 6px;
                font-size: 12.5px; padding: 7px 0; border-top: 1px solid #eef1f5; }
.fisc-reqs li:first-child { border-top: 0; }
.fisc-req-i { grid-row: span 2; font-size: 13px; }
.fisc-reqs b { color: #374151; font-weight: 600; }
.fisc-reqs div { color: #9aa3af; font-size: 11.5px; }

.fisc-cartao-t { font-size: 13.5px; font-weight: 700; color: #1a3c7d; margin-bottom: 12px; }
/* O bloco azul que explica o que aquela aba decide — e do prototipo, e e o que
   faz alguem entender por que o campo existe antes de errar. */
.fisc-nota { background: #f3f7ff; border-left: 3px solid #1a3c7d; border-radius: 6px;
             padding: 11px 14px; margin-top: 14px; font-size: 12px; color: #3a4a66;
             line-height: 1.6; }
.fisc-nota b { color: #1a3c7d; }
.fisc-ok-box { background: #eafaf1; border: 1px solid #b8e6c9; border-radius: 7px;
               padding: 10px 14px; margin-bottom: 14px; font-size: 12.5px; color: #1e6b3a; }

@media (max-width: 980px) { .fisc-modal-corpo { grid-template-columns: 1fr; } }

/* ============================================ cadastros fiscais (prototipo 06) */
/* Barra de versao no topo. /!\ O QUE ELA MOSTRA MUDA CONFORME QUEM OLHA: o
   mantenedor ve os botoes de carregar e publicar; o cliente le "mantido pela
   LOGYS — somente consulta". */
.fisc-barra-versao {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #fff; border: 1px solid #e3e8ef; border-radius: 10px;
  padding: 11px 16px; margin-bottom: 14px; font-size: 12.5px; color: #6b7280;
}
.fisc-barra-versao .v { font-weight: 700; color: #1a3c7d; }
.fisc-barra-versao .sep { color: #dde3ec; }

/* Mestre-detalhe: a lista a esquerda, o conteudo a direita. */
.fisc-cat-corpo { display: grid; grid-template-columns: 250px 1fr; gap: 16px; align-items: start; }
.fisc-cat-lista {
  background: #fff; border: 1px solid #e3e8ef; border-radius: 10px; overflow: hidden;
}
.fisc-cat {
  display: grid; grid-template-columns: 14px 1fr auto; align-items: center; gap: 8px;
  padding: 10px 14px; cursor: pointer; border-bottom: 1px solid #f2f5f9; font-size: 13px;
}
.fisc-cat:last-child { border-bottom: 0; }
.fisc-cat:hover { background: #fafbfd; }
.fisc-cat.on { background: #eef3ff; box-shadow: inset 3px 0 0 #1a3c7d; }
.fisc-cat-n { color: #374151; font-weight: 600; }
.fisc-cat.on .fisc-cat-n { color: #1a3c7d; }
/* O "carregados/oficial" e o que mostra o tamanho do buraco de relance. */
.fisc-cat-c { font-size: 11px; color: #9aa3af; font-family: ui-monospace, Consolas, monospace; }

.fisc-cat-painel {
  background: #fff; border: 1px solid #e3e8ef; border-radius: 10px; padding: 18px 20px;
  min-width: 0;
}
.fisc-cat-tit { font-size: 16px; font-weight: 700; color: #1a3c7d; }
.fisc-cat-sub { font-size: 12.5px; color: #8b95a5; margin-top: 2px; line-height: 1.5; }
.fisc-cat-ferramentas { display: flex; align-items: center; gap: 10px; margin: 14px 0 10px; flex-wrap: wrap; }

@media (max-width: 900px) { .fisc-cat-corpo { grid-template-columns: 1fr; } }

/* ============================================ REGRA NA LINHA DO TEMPO      */
/* Protótipo 07. A linha do tempo no topo, a tabela de tributos à esquerda, o
   simulador fixo à direita. */

/* /!\ A TRILHA FICA ATRAS DAS BOLHAS (z-index), e as bolhas tem borda branca:
   sem isso a linha atravessa a bolha e o marco do ano parece um ponto sobre um
   fio, nao um marco NA linha. */
.fisc-tempo {
  background: #fff; border: 1px solid #e3e8ef; border-radius: 12px;
  padding: 18px 20px; margin-bottom: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.05);
}
.fisc-tempo-t { font-size: 13px; color: #1a3c7d; font-weight: 700; }
.fisc-tempo-p { font-size: 12.5px; color: #7c848c; margin: 3px 0 15px; }
.fisc-anos { display: flex; gap: 0; position: relative; }
.fisc-trilho {
  position: absolute; top: 7px; left: 8%; right: 8%; height: 2px;
  background: #e2e6ea; z-index: 0;
}
.fisc-ano {
  flex: 1; text-align: center; cursor: pointer; padding: 0 4px; position: relative;
}
.fisc-ano .bolha {
  width: 15px; height: 15px; border-radius: 50%; background: #d3d8de;
  margin: 0 auto 9px; border: 3px solid #fff; box-shadow: 0 0 0 1px #d3d8de;
  transition: all .15s;
}
.fisc-ano.on .bolha {
  background: #1a3c7d;
  box-shadow: 0 0 0 1px #1a3c7d, 0 0 0 5px rgba(26,60,125,.14);
}
.fisc-ano .y {
  font-size: 16px; font-weight: 700; color: #aab0b8;
  font-family: ui-monospace, Consolas, monospace;
}
.fisc-ano.on .y { color: #1a3c7d; }
.fisc-ano .marco {
  font-size: 10.5px; color: #9aa1a9; margin-top: 2px; line-height: 1.35;
  min-height: 28px;
}
.fisc-ano.on .marco { color: #5a6068; }

.fisc-crono-layout {
  display: grid; grid-template-columns: 1fr 330px; gap: 16px; align-items: start;
}
.fisc-crono-painel { min-width: 0; }

/* /!\ AS TRES CORES DE LINHA SAO INFORMACAO, nao enfeite: apagada = nao existe
   naquele ano, verde = primeiro ano, ambar = ULTIMO ano. A ultima e a que
   importa — e o aviso de que a regra muda em 1o de janeiro. */
.fisc-crono-tab tr.morto td { opacity: .42; }
.fisc-crono-tab tr.nasce td { background: #f5fbf7; }
.fisc-crono-tab tr.ultimo td { background: #fffaf2; }
.fisc-crono-tab td { vertical-align: middle; }

.fisc-trib { font-weight: 700; font-size: 13.5px; }
.fisc-esfera { font-size: 10.5px; color: #9aa1a9; font-weight: 400; display: block; }
.fisc-doc { font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; color: #5a6068; }
.fisc-aliq { font-family: ui-monospace, Consolas, monospace; font-size: 14.5px; font-weight: 700; }
.fisc-vig { font-family: ui-monospace, Consolas, monospace; font-size: 11px; color: #8b929a; }
.fisc-obs { font-size: 11px; color: #8b929a; margin-top: 2px; }
.fisc-r { text-align: right; }

.fisc-st {
  display: inline-block; padding: 3px 9px; border-radius: 11px; font-size: 10px;
  font-weight: 700; text-transform: uppercase; letter-spacing: .3px; white-space: nowrap;
}
.fisc-st.vigente  { background: #e4f0ea; color: #1e6b4a; }
.fisc-st.ultimo   { background: #fdeee0; color: #a8600d; }
.fisc-st.primeiro { background: #e6f2fc; color: #1f5fa8; }
.fisc-st.extinto,
.fisc-st.futuro   { background: #f0f1f3; color: #9aa1a9; }

/* `referencia` marca PROJECAO, nao lei. A alíquota de IBS/CBS de 2027 em diante
   sera fixada por lei complementar e ainda nao foi — e quem le decide preco. */
.fisc-origem {
  font-size: 9.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px;
  padding: 2px 6px; border-radius: 4px; margin-left: 6px; vertical-align: middle;
}
.fisc-origem.referencia { background: #fff4e0; color: #9a6700; }
.fisc-origem.cliente    { background: #eef2ff; color: #3949ab; }
.fisc-origem.pendente   { background: #fdecec; color: #c62828; }

.fisc-lat {
  background: #fff; border: 1px solid #e3e8ef; border-radius: 12px;
  padding: 17px 19px; box-shadow: 0 1px 4px rgba(0,0,0,.05);
  position: sticky; top: 18px;
}
.fisc-lat-t { font-size: 12.5px; color: #1a3c7d; font-weight: 700; }
.fisc-lat-p { font-size: 11.5px; color: #8b929a; margin-bottom: 12px; }
.fisc-lin {
  display: flex; justify-content: space-between; align-items: baseline;
  padding: 7px 0; border-bottom: 1px dashed #f0f2f4; font-size: 12.5px;
}
.fisc-lin:last-of-type { border-bottom: none; }
.fisc-lin b { font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.fisc-tot {
  display: flex; justify-content: space-between; padding: 11px 0 3px; margin-top: 6px;
  border-top: 2px solid #eef0f3; font-weight: 700; font-size: 14.5px;
}
.fisc-carga {
  background: linear-gradient(135deg, #0f2b5e, #1a3c7d); color: #fff;
  border-radius: 10px; padding: 15px 17px; margin-top: 14px;
}
.fisc-carga .l { font-size: 10.5px; opacity: .8; text-transform: uppercase; letter-spacing: .4px; }
.fisc-carga .v {
  font-size: 30px; font-weight: 700; font-family: ui-monospace, Consolas, monospace;
  line-height: 1.1; margin-top: 3px;
}
.fisc-carga .d { font-size: 11.5px; opacity: .85; margin-top: 3px; }

.fisc-barra-ano { display: flex; align-items: center; gap: 10px; margin-bottom: 7px; font-size: 12px; }
.fisc-barra-ano .yy {
  width: 38px; font-family: ui-monospace, Consolas, monospace; font-weight: 700; color: #7c848c;
}
.fisc-barra-ano .track {
  flex: 1; height: 22px; background: #f2f4f6; border-radius: 4px; overflow: hidden; display: flex;
}
.fisc-barra-ano .seg { height: 100%; }
.fisc-barra-ano .pc {
  width: 62px; text-align: right; font-family: ui-monospace, Consolas, monospace;
  font-weight: 700; font-size: 12.5px;
}
.fisc-leg { display: flex; gap: 13px; flex-wrap: wrap; font-size: 11px; color: #7c848c; margin-top: 9px; }
.fisc-leg span { display: flex; align-items: center; gap: 5px; }
.fisc-leg i { width: 11px; height: 11px; border-radius: 2px; display: inline-block; }

.fisc-chave {
  font-family: ui-monospace, Consolas, monospace; font-size: 12px; color: #7c848c;
  background: #f4f6f8; padding: 3px 9px; border-radius: 5px;
}

@media (max-width: 980px) {
  .fisc-crono-layout { grid-template-columns: 1fr; }
  .fisc-lat { position: static; }
}

/* ============================================ MOTOR DE REGRAS (saída)      */
/* Protótipo 08. Cinco cartões clicáveis, filtros em aba, lista, e um modal de
   três abas (chave / tributos / histórico). */

.fisc-mot-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
  gap: 12px; margin-bottom: 15px;
}
.fisc-mot-card {
  background: #fff; border: 1px solid #e3e8ef; border-left: 4px solid #1a3c7d;
  border-radius: 10px; padding: 13px 15px; cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.fisc-mot-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,.10); }
.fisc-mot-card.on { box-shadow: 0 0 0 2px rgba(26,60,125,.22); }
.fisc-mot-card .l {
  font-size: 10.5px; color: #8b929a; text-transform: uppercase; letter-spacing: .3px;
}
.fisc-mot-card .v {
  font-size: 21px; font-weight: 700; margin-top: 3px;
  font-family: ui-monospace, Consolas, monospace;
}
.fisc-mot-card .s { font-size: 11px; color: #9aa1a9; }

.fisc-mot-tb {
  padding: 12px 16px; border-bottom: 1px solid #eef0f3; display: flex; gap: 9px;
  align-items: center; flex-wrap: wrap; background: #fbfcfd;
}
.fisc-mot-filtros {
  display: flex; gap: 2px; padding: 0 16px; border-bottom: 2px solid #eef0f3;
  background: #fff; flex-wrap: wrap;
}
.fisc-mot-filtros button {
  background: none; border: none; padding: 11px 14px; cursor: pointer;
  font-size: 12.5px; font-weight: 600; color: #8b929a; font-family: inherit;
  border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.fisc-mot-filtros button.on { color: #1a3c7d; border-bottom-color: #1a3c7d; }

.fisc-mot-tab tr.inativa td { opacity: .45; }
.fisc-mot-tab tbody tr { cursor: pointer; }
.fisc-mot-tab td { vertical-align: middle; }

/* O id da regra diz a fonte pela cor: azul é modelo LOGYS, roxo é da empresa. */
.fisc-mot-id {
  font-family: ui-monospace, Consolas, monospace; font-weight: 700; font-size: 12px;
}
.fisc-mot-id.logys { color: #1a3c7d; }
.fisc-mot-id.empresa { color: #8e44ad; }

.fisc-mot-chave {
  font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; color: #5a6068;
}
/* Curinga é o campo EM BRANCO da regra, e a tela diz "todos" em itálico em vez
   de deixar vazio: célula vazia parece dado faltando. */
.fisc-mot-curinga { color: #aab0b8; font-style: italic; }
.fisc-mot-trib { font-family: ui-monospace, Consolas, monospace; font-size: 11px; color: #5a6068; }
.fisc-mot-sobre { font-size: 10.5px; color: #8e44ad; margin-top: 2px; }

.fisc-bd {
  display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 10px;
  font-weight: 700; text-transform: uppercase; letter-spacing: .3px; margin-right: 3px;
}
.fisc-bd.logys   { background: #e6f2fc; color: #1f5fa8; }
.fisc-bd.empresa { background: #f2eafa; color: #7d3fb3; }
.fisc-bd.vigente { background: #e4f0ea; color: #1e6b4a; }
.fisc-bd.revisar { background: #fdeee0; color: #a8600d; }
.fisc-bd.inativa { background: #f0f1f3; color: #9aa1a9; }
.fisc-bd.pendente{ background: #fdecec; color: #c62828; }

/* A força é número, e número sem explicação é mágica: o `title` e a linha do
   modal mostram as parcelas. */
.fisc-forca {
  font-family: ui-monospace, Consolas, monospace; font-size: 11px; font-weight: 700;
  color: #1a3c7d; background: #eef2fa; padding: 2px 7px; border-radius: 9px;
}
.fisc-forca-g { font-size: 15px; padding: 4px 12px; }
.fisc-forca-calc { font-size: 11.5px; color: #9aa1a9; }

/* O CFOP derivado não é campo: é resultado. Por isso fundo cinza e sem borda de
   input — para ninguém tentar digitar nele. */
.fisc-cfop-out {
  padding: 8px 10px; background: #f4f6f8; border-radius: 7px;
  font-family: ui-monospace, Consolas, monospace; font-size: 12.5px; color: #374151;
}

.fisc-hist { display: flex; gap: 11px; padding: 11px 0; border-bottom: 1px solid #f2f4f6; font-size: 12.5px; }
.fisc-hist:last-child { border-bottom: none; }
.fisc-hist .when {
  font-family: ui-monospace, Consolas, monospace; font-size: 11px; color: #9aa1a9;
  width: 112px; flex-shrink: 0;
}
.fisc-hist .who { font-weight: 600; color: #374151; }
.fisc-hist .what { color: #5a6068; }
.fisc-hist .diff {
  font-family: ui-monospace, Consolas, monospace; font-size: 11.5px;
  background: #f8f9fb; padding: 2px 7px; border-radius: 4px;
  display: inline-block; margin-top: 3px; color: #374151;
}
.fisc-hist .motivo { font-size: 11.5px; color: #7c848c; margin-top: 4px; }

/* O alerta roxo é o da sobreposição — cor da própria fonte "empresa", porque é
   sempre uma regra da empresa vencendo uma mais genérica. */
.fisc-alerta-sobre {
  background: #f8f2fc; border-left: 4px solid #8e44ad; padding: 11px 14px;
  border-radius: 0 8px 8px 0; font-size: 12px; color: #5b3080;
  line-height: 1.6; margin-top: 12px;
}
.fisc-alerta-sobre b { color: #7d3fb3; }

.fisc-mot-ro {
  background: #f4f6f8; border-left: 4px solid #9aa1a9; padding: 11px 14px;
  border-radius: 0 8px 8px 0; font-size: 12px; color: #5a6068; line-height: 1.6;
}

/* ============================================ BENEFÍCIOS FISCAIS           */
/* Protótipo 09, mais o alerta cadastral que o dado exigiu. */

.fisc-ben-cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(205px, 1fr));
  gap: 13px; margin-bottom: 16px;
}
.fisc-ben-card {
  background: #fff; border: 1px solid #e3e8ef; border-left: 5px solid #1a3c7d;
  border-radius: 11px; padding: 15px 17px; box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.fisc-ben-card .l {
  font-size: 10.5px; color: #8b929a; text-transform: uppercase; letter-spacing: .3px;
}
.fisc-ben-card .v {
  font-size: 24px; font-weight: 700; margin-top: 3px;
  font-family: ui-monospace, Consolas, monospace;
}
.fisc-ben-card .s { font-size: 11px; color: #9aa1a9; margin-top: 2px; }

/* O bloco de risco do topo. Roxo-vermelho de propósito: não é "atenção,
   confira" — é "este número não é dinheiro disponível". */
.fisc-ben-risco {
  background: #fdf3f3; border: 1px solid #f3c9c9; border-left: 5px solid #c0392b;
  border-radius: 10px; padding: 14px 17px; margin-bottom: 4px;
}
.fisc-ben-risco .t { font-size: 13.5px; font-weight: 700; color: #a52222; }
.fisc-ben-risco .d {
  font-size: 12.5px; color: #6e3030; line-height: 1.65; margin-top: 6px;
}
.fisc-ben-risco b { color: #8c1d1d; }

.fisc-ben-lei {
  font-family: ui-monospace, Consolas, monospace; font-size: 11.5px;
  color: #5a6068; background: #f4f6f8; padding: 5px 10px; border-radius: 6px;
  margin-top: 9px; display: inline-block;
}

.fisc-ben-tab td { vertical-align: top; }
/* A linha com alerta fica num fundo próprio: quem varre a lista vê antes de ler. */
.fisc-ben-tab tr.com-alerta td { background: #fffafa; }
.fisc-ben-tab tr.com-alerta:hover td { background: #fff5f5; }

.fisc-ben-ncm {
  font-family: ui-monospace, Consolas, monospace; font-weight: 700; font-size: 12px;
  color: #1a3c7d;
}
.fisc-ben-efeito {
  font-family: ui-monospace, Consolas, monospace; font-weight: 700; color: #1e6b4a;
}
/* ⚠️ EFEITO PRESO FICA CINZA, não verde. Verde ao lado de um alerta vermelho é
   lido como dinheiro disponível — e é exatamente o número que não se pode usar. */
.fisc-ben-efeito-preso {
  font-family: ui-monospace, Consolas, monospace; font-weight: 700; color: #aab0b8;
  text-decoration: line-through;
}

.fisc-ben-al {
  background: #fff4f4; border: 1px solid #f3cccc; border-radius: 7px;
  padding: 8px 10px;
}
.fisc-ben-al .t { font-size: 11.5px; font-weight: 700; color: #a52222; }
.fisc-ben-al .d { font-size: 11.5px; color: #6e3030; margin-top: 3px; line-height: 1.5; }
.fisc-ben-al .m { font-size: 11px; color: #8b6a6a; margin-top: 3px; }
.fisc-ben-al .r {
  font-size: 10px; font-weight: 700; color: #c0392b; text-transform: uppercase;
  letter-spacing: .3px; margin-top: 5px;
}

.fisc-ben-sobre { font-size: 11px; color: #a8600d; margin-top: 3px; }
.fisc-ben-motivo { font-size: 11.5px; color: #7c848c; margin-top: 4px; }

/* O bloqueio dentro do modal: é o que fica ENTRE a intenção e o efeito. */
.fisc-ben-bloqueio {
  background: #fdf3f3; border: 2px solid #c0392b; border-radius: 9px;
  padding: 13px 15px; margin-bottom: 14px;
}
.fisc-ben-bloqueio .t {
  font-size: 13.5px; font-weight: 700; color: #a52222; margin-bottom: 7px;
}
.fisc-ben-bloqueio .d { font-size: 12.5px; color: #6e3030; line-height: 1.65; }
.fisc-ben-bloqueio b { color: #8c1d1d; }
.fisc-ben-par {
  display: grid; grid-template-columns: 170px 1fr; gap: 8px; padding: 3px 0;
  font-size: 12.5px;
}
.fisc-ben-par span { color: #8b6a6a; }

/* /!\ O BOTAO DE CONFIRMAR SOB ALERTA MUDA DE COR. Verde diz "siga"; aqui a
   pessoa precisa parar e decidir de olhos abertos. */
.btn-perigo { background: #c0392b; color: #fff; border: 1px solid #c0392b; }
.btn-perigo:hover { background: #a52222; }
.btn-mini { padding: 4px 9px; font-size: 11px; }

/* O pop-up da hora de emitir — âmbar, como no protótipo. */
.fisc-ben-pop {
  border: 2px solid #e67e22; background: #fffaf3; border-radius: 9px;
  padding: 13px 15px; margin-top: 11px;
}
.fisc-ben-pop .t { font-size: 13px; font-weight: 700; color: #a8600d; margin-bottom: 5px; }
.fisc-ben-pop .d { font-size: 12.5px; color: #7a5c1e; line-height: 1.6; }
.fisc-ben-acoes { display: flex; gap: 8px; margin-top: 11px; flex-wrap: wrap; }
.fisc-ben-rodape {
  font-size: 11.5px; color: #8b7a55; margin-top: 9px; line-height: 1.55;
  border-top: 1px dashed #e8d5b5; padding-top: 8px;
}

/* ============================================ AS ABAS DE DENTRO (nível 2)   */
/* ⚠️ VISUALMENTE MENORES QUE AS DE CIMA, de propósito. Duas barras do mesmo
   peso competem e a pessoa perde de vista em qual nível está — a de cima é
   navegação entre assuntos, a de baixo é entre vistas do mesmo assunto. */
.fisc-int-barra {
  display: flex; gap: 6px; margin-bottom: 14px; flex-wrap: wrap;
  padding-bottom: 2px;
}
.fisc-int {
  padding: 6px 13px; cursor: pointer; font-size: 12.5px; font-weight: 600;
  color: #8b95a5; background: #f4f6f8; border: 1px solid #e3e8ef;
  border-radius: 16px; user-select: none;
}
.fisc-int:hover { background: #eef2f7; color: #5a6068; }
.fisc-int.fisc-int-on {
  background: #1a3c7d; color: #fff; border-color: #1a3c7d;
}

/* ======================================================== matriz de saida  */
/* Protótipo 19, com prefixo próprio: `.trava`, `.card` e `.regra` do protótipo
   são nomes genéricos demais para um painel que carrega 20 folhas de estilo. */
.fisc-mat-trava { background: #fff; border-left: 4px solid #c0392b; border-radius: 0 10px 10px 0;
                  padding: 15px 19px; margin-bottom: 6px; box-shadow: 0 1px 4px rgba(0,0,0,.05); }
.fisc-mat-trava h3 { font-size: 15px; color: #c0392b; margin: 0 0 8px; }
.fisc-mat-trava p { font-size: 13px; line-height: 1.7; margin: 0; color: #2b3138; }
.fisc-mat-trava .n { display: grid; grid-template-columns: repeat(4, 1fr); gap: 11px; margin-top: 13px; }
.fisc-mat-trava .n > div { background: #fdf6f5; border: 1px solid #f3ddd9; border-radius: 9px; padding: 11px 14px; }
.fisc-mat-trava .k { font-size: 9.5px; color: #a8695c; text-transform: uppercase; letter-spacing: .4px; font-weight: 700; }
.fisc-mat-trava .v { font-size: 22px; font-weight: 700; font-family: Consolas, monospace; color: #c0392b; margin-top: 2px; }
.fisc-mat-trava .s { font-size: 11px; color: #9a7068; margin-top: 1px; }

.fisc-mat-h2 { font-size: 11px; color: #8a929b; text-transform: uppercase; letter-spacing: .55px;
               font-weight: 700; margin: 24px 0 11px; }
.fisc-mat-card { background: #fff; border-radius: 11px; box-shadow: 0 1px 4px rgba(0,0,0,.07); overflow: hidden; }
.fisc-mat-cp { padding: 17px 19px; }

.fisc-mat-t { width: 100%; border-collapse: collapse; font-size: 13px; }
.fisc-mat-t th { background: #f2f5f8; padding: 8px 11px; text-align: left; font-size: 9.5px; color: #5a6472;
                 text-transform: uppercase; letter-spacing: .35px; border-bottom: 1px solid #e0e5ea; font-weight: 700; }
.fisc-mat-t td { padding: 8px 11px; border-bottom: 1px solid #f0f3f6; }
.fisc-mat-t tr:last-child td { border-bottom: none; }
.fisc-mat-t .num { text-align: right; font-family: Consolas, monospace; white-space: nowrap; }
.fisc-mat-t .mono { font-family: Consolas, monospace; }
.fisc-mat-t tbody tr:hover td { background: #f8fafb; }
.fisc-mat-t tr.zero td { opacity: .6; }
.fisc-mat-t tr.abre { cursor: pointer; }
.fisc-mat-t tr.on td { background: #eef2f9; }
.fisc-mat-t tr.on td:first-child { box-shadow: inset 3px 0 0 #1a3c7d; }
.fisc-mat-t tr.ruim td { background: #fdf6f5; }
.fisc-mat-t-ncm { margin-top: 11px; background: #fff; border-radius: 8px; }

.fisc-mat-aliq { display: inline-block; font-family: Consolas, monospace; font-weight: 700; font-size: 13px;
                 padding: 2px 9px; border-radius: 6px; }
.fisc-mat-aliq.a18 { background: #eaf1fb; color: #1f5fa8; }
.fisc-mat-aliq.a12 { background: #e9f4ef; color: #1f6b4a; }
.fisc-mat-aliq.a7  { background: #fdf3e2; color: #9a5b12; }
.fisc-mat-aliq.a0  { background: #eef0ec; color: #8d958f; }

.fisc-mat-cob { display: flex; align-items: center; gap: 14px; background: #e9f4ef; border: 1px solid #c9e3d7;
                border-radius: 10px; padding: 13px 17px; margin-top: 13px; }
.fisc-mat-cob .v { font-size: 21px; font-weight: 700; font-family: Consolas, monospace; color: #1f6b4a; white-space: nowrap; }
.fisc-mat-cob .b { flex: 1; }
.fisc-mat-cob .ba { height: 7px; border-radius: 4px; background: #d3e8dd; overflow: hidden; }
.fisc-mat-cob .ba i { display: block; height: 100%; background: #1f6b4a; }
.fisc-mat-cob .tx { font-size: 12px; color: #2b4a3c; margin-top: 6px; line-height: 1.5; }

.fisc-mat-regra { border: 1px solid #e0e5ea; border-radius: 10px; overflow: hidden; }
.fisc-mat-regra .rh { background: #f2f5f8; padding: 11px 15px; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fisc-mat-regra .rh b { font-size: 13.5px; }
.fisc-mat-regra .ch { font-family: Consolas, monospace; font-size: 11.5px; color: #5a6472; background: #fff;
                      border: 1px solid #e0e5ea; border-radius: 6px; padding: 2px 8px; }
.fisc-mat-lt { display: grid; grid-template-columns: 86px 1.5fr 150px 86px 1.4fr; gap: 11px; padding: 9px 15px;
               font-size: 12.5px; border-top: 1px solid #f0f3f6; align-items: center; }
.fisc-mat-lt.hd { background: #fafbfc; font-size: 9.5px; font-weight: 700; color: #5a6472;
                  text-transform: uppercase; letter-spacing: .35px; }
.fisc-mat-lt .tr { font-weight: 700; font-family: Consolas, monospace; }
.fisc-mat-lt .al { font-family: Consolas, monospace; }
.fisc-mat-lt .vg { font-family: Consolas, monospace; font-size: 11px; color: #8a929b; }
.fisc-mat-lt .vg b { color: #2b3138; }
.fisc-mat-lt.morre { opacity: .45; }
.fisc-mat-lt.morre .tr, .fisc-mat-lt.morre .al { text-decoration: line-through; }
.fisc-mat-lt.teste { background: #fefaf0; }
.fisc-mat-lt.nasce { background: #f4f9fd; }
.fisc-mat-lt.pendente { background: #fdf6f5; color: #a93226; }
.fisc-mat-ref { font-family: 'Segoe UI', Tahoma, sans-serif; font-size: 9.5px; font-weight: 700;
                text-transform: uppercase; letter-spacing: .3px; background: #fff4e0; color: #9a6700;
                padding: 1px 6px; border-radius: 8px; }
.fisc-mat-leg { display: flex; gap: 16px; flex-wrap: wrap; font-size: 11px; color: #8a929b; margin-top: 9px; }
.fisc-mat-leg i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px;
                  vertical-align: -1px; border: 1px solid #e0e5ea; }
.fisc-mat-leg i.vale { background: #fff; }
.fisc-mat-leg i.morre { background: #eef0f2; }
.fisc-mat-leg i.teste { background: #fefaf0; }
.fisc-mat-leg i.nasce { background: #f4f9fd; }
.fisc-mat-leg i.pendente { background: #fdf6f5; }

.fisc-mat-sim { display: grid; grid-template-columns: 290px 1fr; }
.fisc-mat-ped { border-right: 1px solid #eef1f4; }
.fisc-mat-ped-t { font-size: 10px; color: #8a929b; text-transform: uppercase; letter-spacing: .45px;
                  font-weight: 700; padding: 11px 15px 7px; }
.fisc-mat-pi { padding: 12px 15px; border-bottom: 1px solid #f0f3f6; cursor: pointer; }
.fisc-mat-pi:hover { background: #f8fafb; }
.fisc-mat-pi.on { background: #eef2f9; box-shadow: inset 3px 0 0 #1a3c7d; }
.fisc-mat-pi .nu { font-family: Consolas, monospace; font-size: 12px; color: #1a3c7d; font-weight: 700; }
.fisc-mat-pi .cl { font-size: 12.5px; font-weight: 600; margin-top: 2px; line-height: 1.3; }
.fisc-mat-pi .de { font-size: 11px; color: #8a929b; margin-top: 3px; }
.fisc-mat-pi .de.erro { color: #c0392b; }
.fisc-mat-pi .vl { font-family: Consolas, monospace; font-size: 12px; margin-top: 3px; }
.fisc-mat-res { padding: 17px 19px; min-width: 0; }
.fisc-mat-res .tit { font-size: 11px; color: #8a929b; text-transform: uppercase; letter-spacing: .45px;
                     font-weight: 700; margin-bottom: 11px; }
.fisc-mat-venceu { background: #e9f4ef; border: 1px solid #c9e3d7; border-radius: 9px; padding: 12px 15px; margin-bottom: 13px; }
.fisc-mat-venceu .q, .fisc-mat-nao .q { font-size: 10px; text-transform: uppercase; letter-spacing: .4px; font-weight: 700; }
.fisc-mat-venceu .q { color: #1f6b4a; }
.fisc-mat-venceu .r, .fisc-mat-nao .r { font-size: 14.5px; font-weight: 600; margin-top: 3px; }
.fisc-mat-venceu .pt { font-size: 11.5px; color: #3d6b56; margin-top: 5px; font-family: Consolas, monospace; }
.fisc-mat-nao { background: #fdecea; border: 1px solid #f5cfca; border-radius: 9px; padding: 14px 16px; }
.fisc-mat-nao .q { color: #c0392b; }
.fisc-mat-nao p { font-size: 12.5px; line-height: 1.7; color: #7d3a30; margin: 9px 0 0; }
.fisc-mat-nf { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px 16px; }
.fisc-mat-nf .it { display: flex; justify-content: space-between; font-size: 13px; padding: 6px 0;
                   border-bottom: 1px solid #f4f6f8; gap: 8px; }
.fisc-mat-nf .it .k { color: #8a929b; }
.fisc-mat-nf .it .v { font-weight: 600; font-family: Consolas, monospace; white-space: nowrap; }
.fisc-mat-nf .it .ano { font-size: 10px; color: #9a5b12; }
.fisc-mat-nf .it.big { grid-column: 1 / 3; border-bottom: 2px solid #e0e5ea; }
.fisc-mat-nf .it.big .v { font-size: 16px; color: #1a3c7d; }

.fisc-mat-buraco { background: #fff; border-left: 4px solid #d4a017; border-radius: 0 10px 10px 0;
                   padding: 14px 18px; margin-top: 13px; font-size: 12.5px; line-height: 1.7; color: #5a6472; }
.fisc-mat-buraco b { color: #2b3138; }
.fisc-mat-buraco ul { margin: 6px 0; padding-left: 20px; }
.fisc-mat-buraco code { font-family: Consolas, monospace; background: #f2f4f6; padding: 1px 5px;
                        border-radius: 4px; font-size: 11.5px; }
.fisc-mat-buraco h4 { font-size: 13.5px; color: #2b3138; margin: 0 0 7px; }
.fisc-mat-buraco.vm { border-left-color: #c0392b; }
.fisc-mat-bt { background: #1a3c7d; color: #fff; border: none; padding: 9px 17px; border-radius: 8px;
               font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; white-space: nowrap; }
.fisc-mat-bt:hover { background: #142f63; }
.fisc-mat-modal { font-size: 13px; line-height: 1.6; color: #2b3138; }
.fisc-mat-modal ul { margin: 8px 0; padding-left: 20px; }
.fisc-mat-modal li { margin-bottom: 7px; }
.fisc-mat-chave { font-family: Consolas, monospace; font-size: 11.5px; color: #5a6472; }
.fisc-mat-nota { font-size: 12px; color: #6b7480; }
.fisc-mat-buraco.verde { border-left-color: #1f6b4a; }
.fisc-mat-buraco.azul { border-left-color: #1a3c7d; }
.fisc-mat-card .fisc-mat-buraco { background: #fafbfc; }

@media (max-width: 860px) {
  .fisc-mat-trava .n { grid-template-columns: 1fr 1fr; }
  .fisc-mat-sim { grid-template-columns: 1fr; }
  .fisc-mat-ped { border-right: none; border-bottom: 1px solid #eef1f4; }
  .fisc-mat-nf { grid-template-columns: 1fr; }
  .fisc-mat-nf .it.big { grid-column: 1; }
  .fisc-mat-lt { grid-template-columns: 76px 1fr; }
  .fisc-mat-lt.hd { display: none; }
}

/* ========================================================= entrada fiscal  */
/* Protótipos 12, 13 e 14, com prefixo próprio. */
.fisc-ent-passos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 14px; }
.fisc-ent-passo { background: #fff; border-radius: 10px; padding: 11px 14px; border: 2px solid #e6e9ed;
                  box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.fisc-ent-passo.on { border-color: #1a3c7d; box-shadow: 0 2px 10px rgba(26,60,125,.16); }
.fisc-ent-passo.feito { border-color: #cfe3d6; background: #f8fdfa; }
.fisc-ent-passo .n { font-family: Consolas, monospace; font-size: 11px; font-weight: 700; color: #9aa1a9; }
.fisc-ent-passo.on .n { color: #1a3c7d; }
.fisc-ent-passo .t { font-size: 13.5px; font-weight: 700; margin-top: 2px; }
.fisc-ent-passo .d { font-size: 11.5px; color: #8b929a; margin-top: 2px; line-height: 1.45; }

.fisc-ent-layout { display: grid; grid-template-columns: 300px 1fr; gap: 14px; align-items: start; }
.fisc-ent-fila { background: #fff; border-radius: 11px; box-shadow: 0 1px 3px rgba(0,0,0,.07);
                 padding: 10px; position: sticky; top: 10px; max-height: calc(100vh - 40px);
                 display: flex; flex-direction: column; }
.fisc-ent-fila .fisc-busca { width: 100%; margin: 8px 0; box-sizing: border-box; }
.fisc-ent-fila-tabs { display: flex; gap: 4px; }
.fisc-ent-fila-tabs button { flex: 1; background: #f2f5f8; border: none; border-radius: 7px; padding: 7px;
                             font-size: 12.5px; font-weight: 600; color: #6b7480; cursor: pointer; }
.fisc-ent-fila-tabs button.on { background: #1a3c7d; color: #fff; }
#fisc-ent-lista { overflow-y: auto; flex: 1; }
.fisc-ent-cont { font-size: 11px; color: #9aa1a9; padding: 2px 4px 6px; }
.fisc-ent-item { padding: 9px 10px; border-radius: 8px; cursor: pointer; border-bottom: 1px solid #f2f4f6; }
.fisc-ent-item:hover { background: #f8fafd; }
.fisc-ent-item.on { background: #eef2f9; box-shadow: inset 3px 0 0 #1a3c7d; }
.fisc-ent-item .nu { font-family: Consolas, monospace; font-size: 12px; font-weight: 700; color: #1a3c7d;
                     display: flex; justify-content: space-between; gap: 6px; }
.fisc-ent-item .st { font-family: 'Segoe UI', Tahoma, sans-serif; font-size: 9.5px; font-weight: 700;
                     text-transform: uppercase; color: #9a6700; background: #fff4e0; padding: 1px 6px;
                     border-radius: 8px; white-space: nowrap; }
.fisc-ent-item .fo { font-size: 12.5px; font-weight: 600; margin-top: 2px; line-height: 1.3; }
.fisc-ent-item .me { font-size: 11px; color: #8b929a; margin-top: 2px; }
.fisc-ent-vazio { padding: 22px; text-align: center; color: #9aa1a9; font-size: 13px; }
.fisc-ent-vazio.grande { background: #fff; border-radius: 11px; padding: 60px 20px; font-size: 15px; color: #6b7480; }
.fisc-ent-vazio.grande span { font-size: 12.5px; color: #9aa1a9; }

.fisc-ent-nf { background: #fff; border-radius: 11px; box-shadow: 0 1px 3px rgba(0,0,0,.07); overflow: hidden; }
.fisc-ent-head { padding: 13px 17px; border-bottom: 1px solid #eef0f3; display: flex; gap: 18px;
                 flex-wrap: wrap; align-items: baseline; }
.fisc-ent-head .num { font-family: Consolas, monospace; font-size: 17px; font-weight: 700; color: #1a3c7d; }
.fisc-ent-head .forn { font-size: 14px; font-weight: 600; }
.fisc-ent-head .meta { font-size: 12px; color: #8b929a; }

.fisc-ent-p0 { padding: 14px 18px; border-bottom: 1px solid #eef0f3; }
.fisc-ent-p0.meu { background: #f4fbf6; border-bottom-color: #d6e7dc; }
.fisc-ent-p0.terceiro, .fisc-ent-p0.retorno { background: #fffaf3; border-bottom-color: #f3e2c9; }
.fisc-ent-p0 .rot { font-size: 10px; text-transform: uppercase; letter-spacing: .4px; font-weight: 700; color: #7c848c; }
.fisc-ent-p0 .nat { font-size: 15px; margin-top: 5px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fisc-ent-p0 .cons { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-top: 12px; }
.fisc-ent-p0 .c { background: #fff; border: 1px solid #e6e9ed; border-radius: 8px; padding: 8px 11px; }
.fisc-ent-p0 .c .k { font-size: 9.5px; color: #8b929a; text-transform: uppercase; letter-spacing: .3px; }
.fisc-ent-p0 .c .v { font-size: 13px; font-weight: 700; margin-top: 2px; }
.fisc-ent-p0 .sim, .fisc-ent-tab td.sim { color: #1e6b4a; }
.fisc-ent-p0 .nao, .fisc-ent-tab td.nao { color: #c0392b; }
.fisc-ent-p0 .fix { color: #1a3c7d; font-family: Consolas, monospace; }
.fisc-ent-nf .cfop { font-family: Consolas, monospace; font-weight: 700; font-size: 12.5px; }
.fisc-ent-nf .cfop.de { color: #9aa1a9; }
.fisc-ent-nf .cfop.para { color: #1e6b4a; }

.fisc-ent-quebra { padding: 13px 18px; background: #fdecea; border-bottom: 1px solid #f5cfca;
                   font-size: 13px; color: #7d2b23; line-height: 1.65; }
.fisc-ent-quebra b { color: #b03a2e; }
.fisc-ent-conf { display: flex; align-items: center; gap: 7px; margin-top: 9px; font-weight: 600;
                 color: #7d2b23; cursor: pointer; }

.fisc-ent-barra { padding: 13px 18px; background: #f6f9ff; border-bottom: 1px solid #e3ebf7;
                  display: flex; gap: 11px; align-items: flex-end; flex-wrap: wrap; }
.fisc-ent-barra label, .fisc-ent-lbl { display: block; font-size: 10px; color: #7c848c; font-weight: 700;
                                       margin-bottom: 4px; text-transform: uppercase; letter-spacing: .3px; }
.fisc-ent-barra select, .fisc-ent-sel { padding: 7px 9px; border: 1px solid #d8dce1; border-radius: 7px;
                                        font-size: 13px; background: #fff; }
.fisc-ent-barra select { min-width: 260px; }
.fisc-ent-barra .dica { font-size: 12px; color: #7c848c; align-self: center; }
.fisc-ent-sel { font-size: 12px; padding: 4px 6px; }

.fisc-ent-tab { max-height: 520px; overflow-y: auto; }
.fisc-ent-tab th { position: sticky; top: 0; z-index: 1; }
.fisc-ent-tab th.c, .fisc-ent-tab td.c { text-align: center; }
.fisc-ent-tab td { font-size: 12px; vertical-align: middle; }
.fisc-ent-tab td.seq { color: #c5c9ce; font-family: Consolas, monospace; font-size: 10px; }
.fisc-ent-tab .cod, .fisc-ent-painel .cod { font-family: Consolas, monospace; font-size: 10.5px; color: #9aa1a9; }
.fisc-ent-tab .vazio { color: #c5c9ce; font-style: italic; font-size: 11.5px; }
.fisc-ent-tab tr.jasabe td { background: #f6fbff; }
.fisc-ent-tab tr.exc td { background: #fffaf2; }
.fisc-ent-tab tr.quebra td { background: #fdf3f2; }
.fisc-ent-tab tr.pend td { background: #fdf6f5; }
.fisc-ent-orig { font-size: 10px; color: #9aa1a9; margin-left: 4px; }

.fisc-ent-bd { display: inline-block; padding: 1px 7px; border-radius: 9px; font-size: 9.5px; font-weight: 700;
               text-transform: uppercase; letter-spacing: .3px; white-space: nowrap; }
.fisc-ent-bd.meu { background: #e4f0ea; color: #1e6b4a; }
.fisc-ent-bd.ter { background: #fdeee0; color: #a8600d; }
.fisc-ent-bd.mp, .fisc-ent-bd.rev { background: #e6eef8; color: #1f5fa8; }
.fisc-ent-bd.uc { background: #fdeee0; color: #a8600d; }
.fisc-ent-bd.ativo { background: #e4f0ea; color: #1e6b4a; }
.fisc-ent-bd.svc { background: #f2eafa; color: #7d3fb3; }
.fisc-ent-bd.ret { background: #eceef0; color: #7c848c; }
.fisc-ent-bd.ex { background: #fdeee0; color: #a8600d; }
.fisc-ent-bd.al { background: #fadbd8; color: #a93226; }

.fisc-ent-rod { padding: 10px 17px; background: #fbfcfd; border-top: 1px solid #eef0f3; font-size: 12px;
                color: #7c848c; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
.fisc-ent-acoes { padding: 12px 17px; border-top: 1px solid #eef0f3; display: flex; align-items: center;
                  gap: 12px; justify-content: space-between; flex-wrap: wrap; font-size: 12.5px; }
.fisc-ent-acoes .falta { color: #a93226; font-weight: 600; }
.fisc-ent-acoes .pronto { color: #1e6b4a; }
.fisc-ent-acoes .ok { color: #1e6b4a; font-weight: 600; }
.fisc-ent-acoes .fisc-ent-op { color: #9a6700; background: #fff8e6; padding: 3px 9px; border-radius: 6px; }

.fisc-ent-grava { display: grid; grid-template-columns: repeat(3, 1fr); gap: 13px; margin-top: 14px; }
.fisc-ent-grava .g { background: #fff; border-radius: 10px; padding: 14px 16px; box-shadow: 0 1px 3px rgba(0,0,0,.06);
                     border-top: 4px solid #27ae60; }
.fisc-ent-grava h4 { font-size: 12.5px; color: #1a3c7d; font-weight: 700; margin: 0; }
.fisc-ent-grava .onde { font-size: 10.5px; color: #9aa1a9; text-transform: uppercase; letter-spacing: .3px; margin-top: 1px; }
.fisc-ent-grava .val { font-family: Consolas, monospace; font-size: 12.5px; margin-top: 8px; line-height: 1.6; }
.fisc-ent-grava .vale { font-size: 11.5px; color: #8b929a; margin-top: 7px; padding-top: 7px; border-top: 1px dashed #eef0f3; }

/* ---- vínculo em lote (protótipo 12) ---- */
.fisc-ent-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 13px; margin-bottom: 15px; }
.fisc-ent-card { background: #fff; border-radius: 11px; padding: 14px 16px; border-left: 5px solid #1a3c7d;
                 box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.fisc-ent-card .l { font-size: 10.5px; color: #8b929a; text-transform: uppercase; letter-spacing: .3px; }
.fisc-ent-card .v { font-size: 21px; font-weight: 700; margin-top: 3px; font-family: Consolas, monospace; }
.fisc-ent-card .s { font-size: 11px; color: #9aa1a9; margin-top: 1px; }
.fisc-ent-painel { background: #fff; border-radius: 11px; box-shadow: 0 1px 3px rgba(0,0,0,.07); overflow: hidden; }
.fisc-ent-ph { padding: 14px 17px; border-bottom: 1px solid #eef0f3; }
.fisc-ent-ph h2 { font-size: 15px; color: #1a3c7d; font-weight: 600; margin: 0; }
.fisc-ent-ph p { font-size: 12px; color: #8b929a; margin: 3px 0 0; }
.fisc-ent-filtros { display: flex; gap: 2px; padding: 0 17px; border-bottom: 2px solid #eef0f3;
                    flex-wrap: wrap; align-items: center; }
.fisc-ent-filtros button { background: none; border: none; padding: 11px 14px; cursor: pointer; font-size: 12.5px;
                           font-weight: 600; color: #8b929a; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.fisc-ent-filtros button.on { color: #1a3c7d; border-bottom-color: #1a3c7d; }
.fisc-ent-filtros .fisc-busca { margin: 6px 0; min-width: 260px; }
.fisc-ent-acoes-lote { display: none; padding: 10px 17px; background: #f6f9ff; border-bottom: 1px solid #e3ebf7;
                       gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12.5px; }
.fisc-ent-acoes-lote.on { display: flex; }
.fisc-ent-painel tr.sel td { background: #eef4ff !important; }
.fisc-ent-codv { font-family: Consolas, monospace; font-size: 11.5px; color: #1a3c7d; font-weight: 700; }
.fisc-ent-painel .sug { font-size: 11.5px; color: #1e6b4a; }
.fisc-ent-painel .sug i { font-style: normal; color: #8b929a; }
.fisc-ent-painel .sug.fraca { color: #a8600d; }
.fisc-ent-painel .sug.nada { color: #b5bac0; font-style: italic; }
.fisc-ent-mais { padding: 12px; text-align: center; border-top: 1px solid #eef0f3; }
.btn.fisc-ent-ok { background: #27ae60; color: #fff; border-color: #27ae60; }
.btn.fisc-ent-rox { background: #8e44ad; color: #fff; border-color: #8e44ad; }
.btn.fisc-ent-cin { background: #7c848c; color: #fff; border-color: #7c848c; }
.fisc-ent-nota-azul { background: #eef4ff; border-left: 4px solid #1a3c7d; padding: 12px 15px;
                      border-radius: 0 8px 8px 0; font-size: 12.5px; color: #3a4a66; line-height: 1.65; margin-top: 14px; }
.fisc-ent-nota-azul b { color: #1a3c7d; }

@media (max-width: 980px) {
  .fisc-ent-layout { grid-template-columns: 1fr; }
  .fisc-ent-fila { position: static; max-height: 360px; }
  .fisc-ent-passos, .fisc-ent-cards { grid-template-columns: 1fr 1fr; }
  .fisc-ent-p0 .cons { grid-template-columns: 1fr 1fr; }
  .fisc-ent-grava { grid-template-columns: 1fr; }
}
