/*
 * REFORTAX — sistema visual da aplicação.
 *
 * Esta folha fica depois dos estilos históricos dos templates. Assim a
 * interface pode evoluir sem tocar em nomes de campos, rotas ou regras do
 * produto. A direção é editorial e fiscal: contraste sóbrio, superfícies
 * precisas e hierarquia densa, sem o aspecto genérico de um dashboard pronto.
 */

:root {
  --tinta: #17212b;
  --tinta-suave: #354451;
  --pinho: #174f7f;
  --pinho-escuro: #0b2d49;
  --pinho-claro: #e8f0f6;
  --papel: #f2f3f1;
  --branco: #ffffff;
  --superficie-suave: #f8f8f6;
  --fio: #d8dde0;
  --fio-forte: #bbc5cc;
  --cinza: #64727d;
  --ouro: #c7932f;
  --ouro-suave: #f5edda;
  --ambar: #72500f;
  --ambar-fundo: #faf5e7;
  --ambar-fio: #e4d3a9;
  --tijolo: #913b32;
  --tijolo-fundo: #fbf0ed;
  --tijolo-fio: #e7c8c2;
  --ok: #176048;
  --ok-fundo: #edf6f1;
  --ok-fio: #c7ded3;
  --sans: "Aptos", "Segoe UI Variable", "Segoe UI", -apple-system,
    BlinkMacSystemFont, system-ui, Arial, sans-serif;
  --mono: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  --sombra: 0 1px 2px rgba(16, 34, 48, .05),
    0 10px 28px rgba(16, 34, 48, .045);
}

* {
  box-sizing: border-box;
}

html {
  color-scheme: light;
  scroll-behavior: smooth;
}

body {
  color: var(--tinta);
  background: var(--papel);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  text-rendering: optimizeLegibility;
}

a {
  color: var(--pinho);
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

a:hover {
  color: var(--pinho-escuro);
}

/* --------------------------------------------------------------------------
   Estrutura e navegação
   -------------------------------------------------------------------------- */

.app-shell .site-header {
  position: relative;
  z-index: 40;
  display: block;
  padding: 0;
  color: #fff;
  background: linear-gradient(
    180deg,
    #1c5c91 0%,
    var(--pinho) 48%,
    var(--pinho-escuro) 100%
  );
  border: 0;
  border-top: 4px solid var(--pinho-escuro);
  box-shadow: 0 2px 8px rgba(7, 31, 51, .18);
}

.app-shell .barra-principal {
  width: min(1180px, calc(100% - 44px));
  min-height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}

.app-shell .marca {
  display: inline-flex;
  align-items: center;
  padding: 0;
  color: #fff;
  text-decoration: none;
}

.app-shell .marca .rc-marca {
  color: #fff;
  font-size: 22px;
}

.app-shell .marca small {
  margin-top: 6px;
  color: #bfd1df;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .18em;
}

.app-shell .conta {
  min-width: 0;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 13px;
  color: #d9e5ed;
  border: 0;
  font-size: 12.5px;
}

.app-shell .conta-identidade {
  display: flex;
  min-width: 0;
  max-width: 280px;
  flex-direction: column;
  align-items: flex-end;
  line-height: 1.25;
}

.app-shell .conta-email,
.app-shell .conta-perfil {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-shell .conta-perfil {
  margin-top: 3px;
  color: #bfd1df;
  font-size: 11px;
  font-weight: 650;
}

.app-shell .conta form {
  display: block;
  margin: 0;
}

.app-shell .conta .sair {
  width: auto;
  margin: 0;
  padding: 6px 0 6px 13px;
  color: #fff;
  background: transparent;
  border: 0;
  border-left: 1px solid rgba(255, 255, 255, .25);
  border-radius: 0;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0;
}

.app-shell .conta .sair:hover {
  color: #fff;
  background: rgba(255, 255, 255, .08);
  text-decoration: none;
}

.app-shell .faixa-navegacao {
  background: var(--pinho-escuro);
}

.app-shell .nav-modulos {
  width: min(1180px, calc(100% - 44px));
  min-height: 47px;
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: #557089 transparent;
}

.app-shell .nav-modulos a {
  position: relative;
  flex: 0 0 auto;
  margin: 0;
  padding: 14px 13px 12px;
  color: #c6d2dc;
  border: 0;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.65;
  text-decoration: none;
  white-space: nowrap;
}

.app-shell .nav-modulos a::after {
  content: "";
  position: absolute;
  right: 13px;
  bottom: 0;
  left: 13px;
  height: 3px;
  background: transparent;
}

.app-shell .nav-modulos a:hover {
  color: #fff;
  background: rgba(255, 255, 255, .055);
}

.app-shell .nav-modulos a.ativa {
  color: #fff;
  background: rgba(255, 255, 255, .035);
  border: 0;
}

.app-shell .nav-modulos a.ativa::after {
  background: var(--ouro);
}

.app-shell main {
  width: min(1180px, calc(100% - 44px));
  max-width: none;
  min-height: calc(100vh - 240px);
  margin: 0 auto;
  padding: 42px 0 76px;
}

.app-shell footer {
  padding: 23px 22px 27px;
  color: #73808a;
  background: #e9ecec;
  border-top: 1px solid var(--fio);
  font-size: 12px;
  letter-spacing: .01em;
}

/* --------------------------------------------------------------------------
   Tipografia e ritmo
   -------------------------------------------------------------------------- */

.app-shell h1,
.app-shell h2,
.app-shell h3 {
  color: var(--tinta);
  font-family: var(--sans);
}

.app-shell main > h1,
.app-shell .abc-topo h1 {
  position: relative;
  max-width: 900px;
  margin: 0 0 9px;
  padding-top: 14px;
  font-size: clamp(28px, 3vw, 38px);
  font-weight: 720;
  line-height: 1.12;
  letter-spacing: -.035em;
}

.app-shell main > h1::before,
.app-shell .abc-topo h1::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 46px;
  height: 3px;
  background: var(--ouro);
}

.app-shell main > .sub {
  max-width: 78ch;
  margin: 0 0 32px;
  color: var(--tinta-suave);
  font-size: 15.5px;
  line-height: 1.7;
}

.app-shell h2 {
  margin: 0 0 11px;
  font-size: 17px;
  font-weight: 720;
  line-height: 1.35;
  letter-spacing: -.01em;
}

.app-shell h3 {
  margin: 0 0 9px;
  font-size: 15px;
  font-weight: 720;
}

.app-shell p {
  text-wrap: pretty;
}

.app-shell .dica {
  color: var(--cinza);
  font-size: 12.5px;
  line-height: 1.55;
}

.app-shell code,
.app-shell pre {
  font-family: var(--mono);
}

.app-shell code {
  padding: 1px 4px;
  color: #30495c;
  background: #edf0f1;
  border-radius: 2px;
  font-size: .9em;
}

/* --------------------------------------------------------------------------
   Superfícies, grades e página inicial
   -------------------------------------------------------------------------- */

.app-shell .cartao {
  margin-bottom: 20px;
  padding: 24px 26px;
  background: var(--branco);
  border: 1px solid var(--fio);
  border-radius: 3px;
  box-shadow: var(--sombra);
}

.app-shell .grade {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(265px, 1fr));
  gap: 18px;
}

.app-shell .duas {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
}

.app-shell a.cartao-link {
  position: relative;
  min-height: 190px;
  padding: 26px 28px 28px;
  display: flex;
  flex-direction: column;
  color: inherit;
  background: var(--branco);
  border-top: 3px solid var(--pinho);
  text-decoration: none;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.app-shell a.cartao-link::after {
  content: "→";
  width: 30px;
  height: 30px;
  margin-top: auto;
  display: grid;
  place-items: center;
  color: var(--pinho);
  border: 1px solid var(--fio-forte);
  font-size: 17px;
  line-height: 1;
}

.app-shell a.cartao-link h2 {
  color: var(--pinho-escuro);
  font-size: 19px;
}

.app-shell a.cartao-link p {
  margin: 0 0 24px;
  color: var(--tinta-suave);
  font-size: 13.5px;
  line-height: 1.65;
}

.app-shell a.cartao-link:hover {
  border-color: var(--ouro);
  box-shadow: 0 12px 32px rgba(16, 34, 48, .10);
  transform: translateY(-2px);
}

.app-shell a.cartao-link:hover::after {
  color: #fff;
  background: var(--pinho);
  border-color: var(--pinho);
}

.app-shell .inicio-ferramentas {
  counter-reset: ferramenta;
}

.app-shell .inicio-ferramentas a.cartao-link {
  min-height: 390px;
  padding: 0 24px 24px;
  overflow: hidden;
  counter-increment: ferramenta;
}

.app-shell .inicio-ferramentas a.cartao-link::before {
  content: "0" counter(ferramenta);
  position: absolute;
  z-index: 2;
  top: 14px;
  left: 16px;
  margin: 0;
  padding: 6px 8px;
  color: #fff;
  background: rgba(11, 45, 73, .88);
  font: 760 11px/1 var(--mono);
  letter-spacing: .08em;
}

.app-shell .inicio-ferramentas .cartao-imagem {
  height: 154px;
  margin: 0 -24px 22px;
  overflow: hidden;
  background: var(--pinho-claro);
}

.app-shell .inicio-ferramentas .cartao-imagem img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(.86) contrast(.96);
  transition: filter .24s ease, transform .4s ease;
}

.app-shell .inicio-ferramentas .ferramenta-preco .cartao-imagem img {
  object-position: center 76%;
}

.app-shell .inicio-ferramentas a.cartao-link:hover .cartao-imagem img {
  filter: saturate(1) contrast(1);
  transform: scale(1.035);
}

.app-shell .inicio-ferramentas a.cartao-link h2 {
  margin-top: 0;
}

/* --------------------------------------------------------------------------
   Formulários e ações
   -------------------------------------------------------------------------- */

.app-shell label {
  margin: 17px 0 6px;
  color: #263541;
  font-size: 12.5px;
  font-weight: 720;
  letter-spacing: .012em;
}

.app-shell label .dica {
  display: inline;
  margin-left: 3px;
  font-weight: 450;
}

.app-shell input[type="text"],
.app-shell input[type="email"],
.app-shell input[type="password"],
.app-shell input[type="date"],
.app-shell input[type="number"],
.app-shell select,
.app-shell textarea {
  width: 100%;
  max-width: 480px;
  min-height: 42px;
  padding: 9px 12px;
  color: var(--tinta);
  background: #fff;
  border: 1px solid var(--fio-forte);
  border-radius: 2px;
  font: 14px/1.4 var(--sans);
  transition: border-color .12s ease, box-shadow .12s ease;
}

.app-shell textarea {
  min-height: 118px;
  resize: vertical;
}

.app-shell input::placeholder,
.app-shell textarea::placeholder {
  color: #8a949c;
  opacity: 1;
}

.app-shell input:focus,
.app-shell select:focus,
.app-shell textarea:focus {
  outline: 0;
  border-color: var(--pinho);
  box-shadow: 0 0 0 3px rgba(23, 79, 127, .12);
}

.app-shell input[type="file"] {
  width: 100%;
  max-width: 520px;
  margin: 5px 0 0;
  padding: 9px;
  color: var(--cinza);
  background: var(--superficie-suave);
  border: 1px dashed var(--fio-forte);
  border-radius: 2px;
  font-size: 12.5px;
}

.app-shell input[type="file"]::file-selector-button {
  margin-right: 11px;
  padding: 7px 11px;
  color: var(--pinho-escuro);
  background: #fff;
  border: 1px solid var(--fio);
  border-radius: 2px;
  font: 650 12px var(--sans);
  cursor: pointer;
}

.app-shell input[type="checkbox"],
.app-shell input[type="radio"] {
  width: 16px;
  height: 16px;
  margin: 0 5px 0 0;
  vertical-align: -3px;
  accent-color: var(--pinho);
}

.app-shell button {
  width: auto;
  min-height: 40px;
  margin-top: 18px;
  padding: 9px 18px;
  color: #fff;
  background: var(--pinho);
  border: 1px solid var(--pinho);
  border-radius: 2px;
  font: 700 13px/1.4 var(--sans);
  letter-spacing: .01em;
  box-shadow: none;
  cursor: pointer;
  transition: background .12s ease, border-color .12s ease, transform .05s ease;
}

.app-shell button:hover {
  background: var(--pinho-escuro);
  border-color: var(--pinho-escuro);
}

.app-shell button:active {
  transform: translateY(1px);
}

.app-shell button.secundario {
  color: var(--pinho);
  background: #fff;
  border-color: var(--fio-forte);
}

.app-shell button.secundario:hover {
  color: var(--pinho-escuro);
  background: var(--pinho-claro);
  border-color: var(--pinho);
}

.app-shell .botoes {
  gap: 9px;
  margin-top: 20px;
}

/* --------------------------------------------------------------------------
   Tabelas e dados
   -------------------------------------------------------------------------- */

.app-shell .tabela-responsiva {
  margin-right: -2px;
  overflow-x: auto;
  border: 1px solid var(--fio);
  border-radius: 2px;
}

.app-shell .tabela-responsiva table {
  margin-top: 0;
  border: 0;
}

.app-shell table {
  width: 100%;
  margin-top: 12px;
  border-collapse: separate;
  border-spacing: 0;
  font-variant-numeric: tabular-nums;
}

.app-shell th {
  padding: 9px 11px;
  color: #51616d;
  background: #f0f2f2;
  border-top: 1px solid var(--fio);
  border-bottom: 1px solid var(--fio-forte);
  font-size: 10.5px;
  font-weight: 780;
  line-height: 1.35;
  letter-spacing: .075em;
}

.app-shell th:first-child {
  border-left: 1px solid var(--fio);
}

.app-shell th:last-child {
  border-right: 1px solid var(--fio);
}

.app-shell td {
  padding: 10px 11px;
  color: #263541;
  background: #fff;
  border-bottom: 1px solid #e5e8e9;
  font-size: 13px;
  line-height: 1.48;
}

.app-shell tr:last-child td {
  border-bottom-color: var(--fio);
}

.app-shell tbody tr:hover td,
.app-shell table > tr:hover td {
  background: #fafbf9;
}

.app-shell .num {
  font-variant-numeric: tabular-nums;
}

.app-shell .preco {
  margin: 4px 0 12px;
  color: var(--pinho-escuro);
  font-size: clamp(32px, 5vw, 46px);
  font-weight: 760;
  letter-spacing: -.035em;
}

/* --------------------------------------------------------------------------
   Alertas, selos e conteúdo expansível
   -------------------------------------------------------------------------- */

.app-shell .faixa-erro,
.app-shell .faixa-aviso,
.app-shell .faixa-ok {
  margin: 12px 0 20px;
  padding: 13px 16px;
  border-radius: 2px;
  font-size: 13.5px;
  line-height: 1.55;
  box-shadow: none;
}

.app-shell .faixa-erro {
  color: var(--tijolo);
  background: var(--tijolo-fundo);
  border: 1px solid var(--tijolo-fio);
  border-left: 4px solid var(--tijolo);
}

.app-shell .faixa-aviso {
  color: var(--ambar);
  background: var(--ambar-fundo);
  border: 1px solid var(--ambar-fio);
  border-left: 4px solid var(--ouro);
}

.app-shell .faixa-ok {
  color: var(--ok);
  background: var(--ok-fundo);
  border: 1px solid var(--ok-fio);
  border-left: 4px solid var(--ok);
}

.app-shell .selo {
  margin: 1px 3px 1px 0;
  padding: 2px 7px;
  border-radius: 2px;
  font-size: 10px;
  font-weight: 780;
  line-height: 1.45;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.app-shell .selo-verde,
.app-shell .selo-ok {
  color: var(--ok);
  background: var(--ok-fundo);
  border-color: var(--ok-fio);
}

.app-shell .selo-amarelo,
.app-shell .selo-rev {
  color: var(--ambar);
  background: var(--ambar-fundo);
  border-color: var(--ambar-fio);
}

.app-shell .selo-vermelho {
  color: var(--tijolo);
  background: var(--tijolo-fundo);
  border-color: var(--tijolo-fio);
}

.app-shell details {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--fio);
}

.app-shell summary {
  color: var(--pinho-escuro);
  font-size: 12.5px;
  font-weight: 720;
}

/* --------------------------------------------------------------------------
   Autocomplete, filtros e módulos especiais
   -------------------------------------------------------------------------- */

.app-shell .ncm-autocomplete {
  max-width: 480px;
}

.app-shell .ncm-sugestoes {
  border-color: var(--fio-forte);
  border-radius: 2px;
  box-shadow: 0 12px 28px rgba(16, 34, 48, .16);
}

.app-shell .ncm-opcao {
  min-height: 0;
  padding: 10px 12px;
  border-radius: 0;
  font-weight: 500;
}

.app-shell .ncm-opcao:hover,
.app-shell .ncm-opcao.ativa {
  background: var(--pinho-claro);
}

.app-shell .filtros-fornecedores {
  padding: 9px;
  gap: 6px;
  background: #eef1f2;
  border: 1px solid var(--fio);
}

.app-shell .filtros-fornecedores button {
  min-height: 34px;
  padding: 6px 11px;
  color: #425360;
  background: transparent;
  border-color: transparent;
  border-radius: 2px;
}

.app-shell .filtros-fornecedores button:hover {
  color: var(--pinho-escuro);
  background: #fff;
  border-color: var(--fio);
}

.app-shell .filtros-fornecedores button.ativo {
  color: #fff;
  background: var(--pinho);
  border-color: var(--pinho);
}

.app-shell .cmp-lados {
  gap: 20px;
}

.app-shell .cmp-vencedor {
  border-top: 3px solid var(--pinho);
  border-right-color: var(--fio);
  border-bottom-color: var(--fio);
  border-left-color: var(--fio);
  box-shadow: var(--sombra);
}

.app-shell .cmp-liquido {
  color: var(--pinho-escuro);
  font-size: 31px;
  font-weight: 760;
}

.app-shell .abc-topo {
  margin-bottom: 24px;
  padding-bottom: 21px;
  border-bottom: 1px solid var(--fio);
}

.app-shell .abc-nova-conversa {
  padding: 8px 12px;
  color: var(--pinho);
  background: #fff;
  border: 1px solid var(--fio-forte);
  border-radius: 2px;
  font-size: 12px;
  text-decoration: none;
}

.app-shell .abc-nova-conversa:hover {
  background: var(--pinho-claro);
  text-decoration: none;
}

.app-shell .abc-empresa {
  margin-bottom: 18px;
  padding: 13px 15px;
  background: #e9edef;
  border: 1px solid var(--fio);
  border-radius: 2px;
}

.app-shell .abc-chat {
  border-radius: 3px;
}

.app-shell .abc-vazio {
  background: #fafbf9;
}

.app-shell .abc-bolha {
  border-radius: 3px;
}

.app-shell .abc-pergunta {
  background: var(--pinho-escuro);
  border-bottom-right-radius: 3px;
}

.app-shell .abc-resposta {
  background: #eef1f2;
  border-bottom-left-radius: 3px;
}

.app-shell .abc-compositor {
  padding: 8px 8px 8px 13px;
  border-color: var(--fio-forte);
  border-radius: 3px;
  box-shadow: none;
}

.app-shell .abc-compositor textarea {
  max-width: none;
}

.app-shell .abc-enviar {
  min-width: 38px;
  min-height: 38px;
  margin: 0 0 0 auto;
  padding: 0;
  border-radius: 2px;
}

/* --------------------------------------------------------------------------
   Autenticação
   -------------------------------------------------------------------------- */

.auth-shell {
  min-height: 100%;
  color: var(--tinta);
  background: #ecefee;
}

.auth-shell .auth {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(390px, 42%) minmax(0, 1fr);
}

.auth-shell .marca-painel {
  position: relative;
  min-height: 100vh;
  padding: clamp(34px, 5vw, 64px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  color: #edf3f7;
  background: var(--pinho-escuro);
}

.auth-shell .marca-painel::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 7px;
  background: var(--ouro);
}

.auth-shell .marca-painel::after {
  content: "";
  position: absolute;
  top: auto;
  right: -170px;
  bottom: -230px;
  left: auto;
  width: 510px;
  height: 510px;
  opacity: .065;
  background: transparent;
  border: 1px solid #fff;
  border-radius: 50%;
}

.auth-shell .marca {
  position: relative;
  z-index: 1;
}

.auth-shell .marca .rc-marca {
  color: #fff;
  font-size: 25px;
}

.auth-shell .marca small {
  margin-top: 8px;
  color: #a8bac9;
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: .2em;
}

.auth-shell .lema {
  position: relative;
  z-index: 1;
  max-width: 510px;
  margin: 48px 0 36px;
}

.auth-shell .lema h2 {
  max-width: 13ch;
  margin: 0;
  color: #fff;
  font-size: clamp(31px, 4.2vw, 48px);
  font-weight: 650;
  line-height: 1.08;
  letter-spacing: -.04em;
}

.auth-shell .lema .digitacao {
  min-height: 23px;
  margin-top: 22px;
  color: #e2bd65;
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.auth-shell .lema .resumo {
  max-width: 46ch;
  margin-top: 11px;
  color: #bdcbd5;
  font-size: 13px;
  line-height: 1.65;
}

.auth-shell .trilho {
  position: relative;
  z-index: 1;
  margin-top: 26px;
  padding: 18px 0 0;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  border-top: 1px solid rgba(255, 255, 255, .20);
}

.auth-shell .trilho::before {
  display: none;
}

.auth-shell .marco {
  margin: 0;
  padding: 0;
}

.auth-shell .marco::before {
  top: -25px;
  left: 0;
  width: 9px;
  height: 9px;
  background: var(--pinho-escuro);
  border: 2px solid #7890a3;
}

.auth-shell .marco.atual::before {
  background: var(--ouro);
  border-color: var(--ouro);
  box-shadow: 0 0 0 4px rgba(199, 147, 47, .18);
}

.auth-shell .marco .ano {
  color: #fff;
  font-size: 13px;
}

.auth-shell .marco.atual .ano {
  color: #e2bd65;
}

.auth-shell .marco .oq {
  max-width: 15ch;
  margin-top: 6px;
  color: #99adbd;
  font-size: 10.5px;
  line-height: 1.45;
}

.auth-shell .rodape-marca {
  position: relative;
  z-index: 1;
  color: #90a5b5;
  font-size: 10.5px;
  letter-spacing: .02em;
}

.auth-shell .rodape-marca strong {
  color: #c5d2db;
}

.auth-shell .form-painel {
  min-height: 100vh;
  padding: 46px clamp(26px, 7vw, 96px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ecefee;
}

.auth-shell .form-caixa {
  width: 100%;
  max-width: 460px;
  padding: clamp(28px, 4vw, 44px);
  background: #fff;
  border: 1px solid var(--fio);
  border-top: 4px solid var(--pinho);
  border-radius: 2px;
  box-shadow: var(--sombra);
}

.auth-shell .form-caixa h1 {
  margin: 0 0 8px;
  color: var(--tinta);
  font-size: 31px;
  font-weight: 720;
  line-height: 1.1;
  letter-spacing: -.035em;
}

.auth-shell .form-caixa .sub {
  margin: 0 0 26px;
  color: var(--tinta-suave);
  font-size: 13.5px;
  line-height: 1.65;
}

.auth-shell label {
  margin: 17px 0 6px;
  color: #263541;
  font-size: 12.5px;
  font-weight: 720;
}

.auth-shell label .dica {
  color: var(--cinza);
  font-weight: 450;
}

.auth-shell label .esqueci {
  color: var(--pinho);
  font-size: 12px;
}

.auth-shell input[type="email"],
.auth-shell input[type="password"],
.auth-shell input[type="text"] {
  min-height: 44px;
  padding: 10px 12px;
  color: var(--tinta);
  background: #fff;
  border: 1px solid var(--fio-forte);
  border-radius: 2px;
  font: 14px var(--sans);
}

.auth-shell input:focus {
  outline: 0;
  border-color: var(--pinho);
  box-shadow: 0 0 0 3px rgba(23, 79, 127, .12);
}

.auth-shell button {
  min-height: 44px;
  margin-top: 24px;
  padding: 10px 18px;
  color: #fff;
  background: var(--pinho);
  border: 1px solid var(--pinho);
  border-radius: 2px;
  font: 720 13.5px var(--sans);
  box-shadow: none;
}

.auth-shell button:hover {
  background: var(--pinho-escuro);
}

.auth-shell .troca {
  margin-top: 26px;
  padding-top: 19px;
  color: var(--cinza);
  border-top: 1px solid var(--fio);
  font-size: 12.5px;
}

.auth-shell .troca a {
  color: var(--pinho);
  font-weight: 720;
}

.auth-shell .faixa-erro,
.auth-shell .faixa-ok {
  margin: 0 0 19px;
  padding: 12px 14px;
  border-radius: 2px;
  font-size: 12.5px;
}

/* --------------------------------------------------------------------------
   Responsividade
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   Administração de clientes e acessos
   -------------------------------------------------------------------------- */

.app-shell .cabecalho-pagina,
.app-shell .cabecalho-secao {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.app-shell .cabecalho-pagina {
  margin-bottom: 26px;
}

.app-shell .cabecalho-pagina h1,
.app-shell .cabecalho-secao h2 {
  margin-bottom: 5px;
}

.app-shell .cabecalho-pagina .sub {
  max-width: 720px;
  margin: 0;
}

.app-shell .sobretitulo {
  margin: 0 0 5px;
  color: var(--ouro);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: .105em;
  text-transform: uppercase;
}

.app-shell .form-admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 17px 24px;
  margin-top: 20px;
}

.app-shell .form-admin-grid > label {
  display: flex;
  min-width: 0;
  margin: 0;
  flex-direction: column;
  gap: 6px;
}

.app-shell .form-admin-grid input,
.app-shell .form-admin-grid select,
.app-shell .form-admin-grid textarea {
  max-width: none;
  margin: 0;
}

.app-shell .admin-consulta-receita {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: 18px;
  padding: 16px 18px;
  background: #f3f7fa;
  border-left: 3px solid var(--pinho);
}

.app-shell .admin-consulta-receita strong,
.app-shell .admin-consulta-receita span {
  display: block;
}

.app-shell .admin-consulta-receita span,
.app-shell .admin-subtitulo-grid small {
  margin-top: 3px;
  color: var(--cinza);
  font-size: 12px;
}

.app-shell .admin-consulta-receita a {
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 700;
}

.app-shell .admin-acao-consulta {
  display: flex;
  align-items: end;
}

.app-shell .admin-acao-consulta button {
  margin: 0;
}

.app-shell .admin-subtitulo-grid {
  grid-column: 1 / -1;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
  padding: 11px 0 5px;
  border-bottom: 1px solid var(--fio);
  color: var(--pinho-escuro);
  font-size: 13px;
  font-weight: 800;
}

.app-shell .admin-subtitulo-grid small {
  font-weight: 500;
}

.app-shell .form-admin-grid > .admin-campo-largo {
  grid-column: 1 / -1;
}

.app-shell .form-admin-grid .admin-checkbox {
  flex-direction: row;
  align-items: center;
  align-self: end;
  min-height: 40px;
}

.app-shell .admin-acoes {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 18px;
}

.app-shell .admin-acoes button {
  margin: 0;
}

.app-shell .admin-linha {
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--fio);
}

.app-shell .admin-linha:last-child {
  border-bottom: 1px solid var(--fio);
}

.app-shell .admin-linha > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 4px;
  cursor: pointer;
  list-style: none;
}

.app-shell .admin-linha > summary::-webkit-details-marker {
  display: none;
}

.app-shell .admin-linha > summary strong,
.app-shell .admin-linha > summary small {
  display: block;
}

.app-shell .admin-linha > summary small,
.app-shell .admin-linha-simples span {
  margin-top: 3px;
  color: var(--cinza);
  font-size: 12px;
  font-weight: 500;
}

.app-shell .admin-edicao {
  margin: 0 4px 22px;
  padding: 22px;
  background: var(--superficie-suave);
  border: 1px solid var(--fio);
}

.app-shell .admin-linha-simples {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 4px;
}

.app-shell .admin-linha-simples strong,
.app-shell .admin-linha-simples span {
  display: block;
}

.app-shell .botao-link {
  display: inline-block;
  margin-top: 17px;
  padding: 9px 16px;
  color: #fff;
  background: var(--pinho);
  border: 1px solid var(--pinho);
  border-radius: 2px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
}

.app-shell .botao-link:hover {
  color: #fff;
  background: var(--pinho-escuro);
}

@media (max-width: 900px) {
  .app-shell .duas {
    grid-template-columns: 1fr;
  }

  .app-shell .nav-modulos a {
    padding-right: 12px;
    padding-left: 12px;
  }

  .auth-shell .auth {
    grid-template-columns: 1fr;
  }

  .auth-shell .marca-painel {
    min-height: auto;
    padding: 23px 26px;
    display: block;
  }

  .auth-shell .marca-painel::before {
    right: auto;
    bottom: 0;
    width: 100%;
    height: 4px;
  }

  .auth-shell .lema,
  .auth-shell .trilho,
  .auth-shell .rodape-marca {
    display: none;
  }

  .auth-shell .form-painel {
    min-height: calc(100vh - 86px);
    padding: 34px 22px 48px;
    justify-content: center;
  }
}

@media (max-width: 640px) {
  .app-shell .cabecalho-pagina {
    display: block;
  }

  .app-shell .cabecalho-pagina > .selo {
    display: inline-block;
    margin-top: 10px;
  }

  .app-shell .form-admin-grid {
    grid-template-columns: 1fr;
  }

  .app-shell .admin-acoes {
    grid-column: 1;
    align-items: flex-start;
    flex-direction: column;
  }

  .app-shell .admin-consulta-receita,
  .app-shell .admin-subtitulo-grid {
    align-items: flex-start;
    flex-direction: column;
  }

  .app-shell .form-admin-grid > .admin-campo-largo {
    grid-column: 1;
  }

  .app-shell .admin-edicao {
    margin-right: 0;
    margin-left: 0;
    padding: 17px 14px;
  }

  .app-shell .barra-principal,
  .app-shell .nav-modulos,
  .app-shell main {
    width: min(100% - 28px, 1180px);
  }

  .app-shell .barra-principal {
    min-height: 64px;
  }

  .app-shell .marca .rc-marca {
    font-size: 18px;
  }

  .app-shell .marca small {
    font-size: 8.5px;
  }

  .app-shell .conta-identidade {
    display: none;
  }

  .app-shell .conta .sair {
    padding-left: 0;
    border-left: 0;
  }

  .app-shell .nav-modulos a {
    padding-top: 12px;
    padding-bottom: 10px;
    font-size: 12px;
  }

  .app-shell main {
    padding-top: 30px;
    padding-bottom: 58px;
  }

  .app-shell main > h1,
  .app-shell .abc-topo h1 {
    font-size: 29px;
  }

  .app-shell main > .sub {
    margin-bottom: 25px;
    font-size: 14px;
  }

  .app-shell .cartao {
    margin-bottom: 16px;
    padding: 20px 18px;
  }

  .app-shell .grade {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .app-shell a.cartao-link {
    min-height: 0;
    padding: 22px 20px;
  }

  .app-shell .tabela-responsiva {
    margin-right: 0;
  }

  .app-shell .filtros-fornecedores .resultado-filtro {
    width: 100%;
    margin: 3px 4px 0;
  }

  .app-shell .abc-topo {
    padding-bottom: 16px;
  }

  .app-shell .abc-bolha {
    max-width: 92%;
  }

  .auth-shell .marca-painel {
    padding: 19px 21px;
  }

  .auth-shell .marca .rc-marca {
    font-size: 20px;
  }

  .auth-shell .form-painel {
    padding: 24px 14px 38px;
    align-items: flex-start;
  }

  .auth-shell .form-caixa {
    padding: 26px 21px 28px;
  }

  .auth-shell .form-caixa h1 {
    font-size: 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
  }
}

@media print {
  .app-shell .site-header,
  .app-shell footer,
  .app-shell button {
    display: none !important;
  }

  .app-shell main {
    width: 100%;
    padding: 0;
  }

  .app-shell .cartao {
    box-shadow: none;
    break-inside: avoid;
  }
}

/* Linha de identificação: número da nota, cobertura da soma, regime do
   fornecedor. Não é subtítulo explicativo — é dado, e some junto com a
   explicação se usar a mesma classe. Discreta, mas presente. */
.identificacao {
  margin: -6px 0 16px;
  color: var(--cinza, #5b6672);
  font-size: 13.5px;
}
.cartao .identificacao { margin: 2px 0 12px; }

/* Eduardo: ajuda contextual persistida, disponível sem tirar a pessoa da tela. */
.eduardo-widget {
  position: fixed;
  right: 24px;
  bottom: 22px;
  z-index: 120;
  font-family: var(--sans, system-ui, sans-serif);
}

.eduardo-widget .eduardo-gatilho {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin: 0;
  padding: 7px;
  border: 1px solid #d2dde4;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 10px 28px rgba(12, 53, 82, .28);
  transition: transform .18s ease, box-shadow .18s ease;
}

.eduardo-widget .eduardo-gatilho:hover {
  background: #fff;
  border-color: #aac0ce;
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(12, 53, 82, .32);
}
.eduardo-gatilho-icone,
.eduardo-avatar {
  display: grid;
  place-items: center;
  flex: none;
  border-radius: 50%;
  background: #fff;
}
.eduardo-gatilho-icone { width: 46px; height: 46px; }
.eduardo-gatilho-icone img { width: 34px; height: 34px; }

.eduardo-painel {
  position: absolute;
  right: 0;
  bottom: 70px;
  width: min(390px, calc(100vw - 28px));
  height: min(610px, calc(100vh - 120px));
  overflow: hidden;
  border: 1px solid #ccd7df;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 22px 55px rgba(13, 38, 56, .25);
}

.eduardo-painel:not([hidden]) { display: flex; flex-direction: column; }
.eduardo-cabecalho {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 15px;
  background: linear-gradient(135deg, #0c3552, #195d91);
  color: #fff;
}
.eduardo-avatar { width: 38px; height: 38px; }
.eduardo-avatar img { width: 25px; height: 25px; }
.eduardo-cabecalho > span:nth-child(2) { display: flex; flex: 1; flex-direction: column; }
.eduardo-cabecalho strong { font-size: 15px; }
.eduardo-cabecalho small { color: rgba(255,255,255,.75); font-size: 11.5px; }
.eduardo-widget .eduardo-nova,
.eduardo-widget .eduardo-fechar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 50%;
  background: transparent;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  text-align: center;
}
.eduardo-widget .eduardo-nova:hover,
.eduardo-widget .eduardo-fechar:hover { background: rgba(255,255,255,.12); }

.eduardo-mensagens {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 14px;
  overflow-y: auto;
  padding: 18px 15px;
  background: #f6f8f9;
}
.eduardo-boas-vindas {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: auto 0;
  color: #52636f;
  text-align: center;
}
.eduardo-boas-vindas strong { color: #0c3552; font-size: 18px; }
.eduardo-boas-vindas span { font-size: 13px; }
.eduardo-mensagem { max-width: 88%; font-size: 13.5px; line-height: 1.55; }
.eduardo-mensagem-usuario {
  align-self: flex-end;
  padding: 10px 13px;
  border-radius: 14px 14px 3px 14px;
  background: #0c3552;
  color: #fff;
  white-space: pre-wrap;
}
.eduardo-mensagem-assistente {
  display: flex;
  align-self: flex-start;
  gap: 8px;
  max-width: 96%;
  color: #172a38;
}
.eduardo-mensagem-assistente > img { width: 22px; height: 22px; margin-top: 3px; }
.eduardo-mensagem-assistente.entrando {
  animation: eduardo-entrada .42s ease-out both;
}
@keyframes eduardo-entrada {
  from { opacity: 0; transform: translateY(7px); }
  to { opacity: 1; transform: translateY(0); }
}
.eduardo-resposta-formatada { min-width: 0; }
.eduardo-resposta-formatada p { margin: 0 0 9px; }
.eduardo-resposta-formatada p:last-child { margin-bottom: 0; }
.eduardo-resposta-formatada h3 { margin: 4px 0 8px; font-size: 14px; }
.eduardo-resposta-formatada ul,
.eduardo-resposta-formatada ol { margin: 5px 0 9px; padding-left: 20px; }
.eduardo-resposta-formatada .abc-tabela-responsiva { max-width: 100%; overflow-x: auto; }
.eduardo-resposta-formatada table { font-size: 12px; }
.eduardo-aviso { display: block; margin-top: 8px; color: #9a6500; }
.eduardo-espera span { display: flex; gap: 4px; padding-top: 9px; }
.eduardo-espera i {
  width: 6px; height: 6px; border-radius: 50%; background: #7890a1;
  animation: eduardo-ponto 1s ease-in-out infinite;
}
.eduardo-espera i:nth-child(2) { animation-delay: .15s; }
.eduardo-espera i:nth-child(3) { animation-delay: .3s; }
@keyframes eduardo-ponto { 50% { opacity: .25; transform: translateY(-3px); } }

.eduardo-formulario {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  margin: 0;
  padding: 12px 12px 5px;
  border-top: 1px solid #dbe3e8;
  background: #fff;
}
.eduardo-formulario textarea {
  min-height: 42px;
  max-height: 112px;
  margin: 0;
  padding: 10px 11px;
  resize: none;
  border-color: #bdcad3;
  border-radius: 9px;
  font: 13.5px/1.45 var(--sans, system-ui, sans-serif);
}
.eduardo-widget .eduardo-formulario button {
  width: 42px;
  height: 42px;
  flex: none;
  margin: 0;
  padding: 0;
  border-radius: 9px;
  font-size: 18px;
}
.eduardo-widget .eduardo-formulario button:disabled { cursor: wait; opacity: .55; }
.eduardo-atalho { padding: 0 15px 10px; background: #fff; color: #7a8790; font-size: 10px; }
.sr-only {
  position: absolute !important; width: 1px !important; height: 1px !important;
  overflow: hidden !important; clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
}

@media (max-width: 620px) {
  .eduardo-widget { right: 14px; bottom: 14px; }
  .eduardo-painel { bottom: 64px; height: min(580px, calc(100vh - 92px)); }
}

@media print {
  .eduardo-widget { display: none !important; }
}


/* Lápis de corrigir ficha. Discreto na tabela e evidente no hover: é ação de
   administrador, não algo que se clique sem querer enquanto se lê. */
.lapis {
  display: inline-grid; place-items: center; width: 28px; height: 28px;
  border-radius: 8px; color: var(--cinza, #5b6672);
  font-size: 15px; line-height: 1; text-decoration: none;
}
.lapis:hover, .lapis:focus-visible {
  background: var(--papel, #f1f4f7); color: var(--pinho, #14477e);
  outline: none;
}

/* O botao do PDF abre o cartao da nota inteira: sem isto ele herda o
   margin-top de 18px pensado para botao que vem DEPOIS de campos. */
.app-shell .acoes-nota form { margin: 0; }
.app-shell .acoes-nota button { margin-top: 0; }
.app-shell .acoes-nota p { margin-top: 12px; }

/* Rotulo com caixa de marcacao. Sem isto o label herda o display de bloco
   dos outros campos e a caixa fica numa linha, o texto em outra. */
.app-shell label.marcavel {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  margin-top: 14px;
  font-weight: 400;
  cursor: pointer;
}
.app-shell label.marcavel input[type="checkbox"] {
  width: auto;
  margin: 2px 0 0;
  flex: none;
}
/* Perfil próprio: foto, conta e dados cadastrais sem misturar com a área
   administrativa que gerencia todos os clientes. */
.perfil-cabecalho { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; }
.perfil-identidade { display:flex; align-items:center; gap:24px; }
.perfil-foto { width:92px; height:92px; flex:0 0 92px; border-radius:50%; overflow:hidden;
  display:grid; place-items:center; background:#e8f3f7; color:#0e5672; font-size:34px; font-weight:750; }
.perfil-foto img { width:100%; height:100%; object-fit:cover; display:block; }
.perfil-foto-controles { min-width:0; flex:1; }
.perfil-foto-controles label { margin-top:6px; }
.perfil-remover { font-weight:400; }
.perfil-grade { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:4px 24px; }
.perfil-grade input, .perfil-grade select { max-width:none; }
.perfil-grade input[readonly] { background:#eef2f5; color:#52606c; cursor:not-allowed; }
.perfil-administrador p { margin:4px 0 0; color:var(--cinza); }
@media (max-width:680px) {
  .perfil-identidade { align-items:flex-start; }
  .perfil-grade { grid-template-columns:1fr; }
}
