/* Casca do Click: área de login, janela principal com menu, abas e barra de status (estilo Windows). */
.c-corpo { background: #3a6ea5; overflow: hidden; }
#app { height: 100%; }
.c-area-login { height: 100%; display: grid; place-items: center; background: linear-gradient(135deg, #2b5797, #3a6ea5); }
.c-principal { height: 100%; display: grid; grid-template-rows: auto auto auto 1fr auto; background: #f0f0f0; }
.c-titulo { height: 24px; }
.c-menu { background: #f6f6f6; border-bottom: 1px solid #d7d7d7; font: 12px "Segoe UI", Tahoma, sans-serif; position: relative; z-index: 20; user-select: none; }
.c-menu ul { list-style: none; margin: 0; padding: 0; }
.c-raiz { display: flex; }
.c-raiz > li { position: relative; padding: 3px 9px; cursor: default; }
.c-raiz > li:hover { background: #e5f3ff; outline: 1px solid #cce8ff; }
.c-sub { display: none; position: absolute; left: 0; top: 100%; min-width: 220px; background: #f2f2f2; border: 1px solid #979797; box-shadow: 2px 2px 4px rgba(0,0,0,.25); padding: 2px; }
.c-sub .c-sub { left: 100%; top: -3px; }
.c-menu.aberto .c-raiz > li:hover > .c-sub, .c-sub li:hover > .c-sub { display: block; }
.c-sub li { position: relative; padding: 3px 28px 3px 26px; white-space: nowrap; cursor: default; }
.c-sub li:hover { background: #91c9f7; }
.c-sub li.c-tem-sub::after { content: '▸'; position: absolute; right: 8px; }
.c-sub li.c-sep { padding: 0; margin: 3px 2px 3px 26px; border-top: 1px solid #d7d7d7; }
.c-sub li.c-sep:hover { background: none; }
.c-abas { display: flex; gap: 2px; padding: 3px 4px 0; background: #dfe6ee; border-bottom: 1px solid #a9b8c8; min-height: 26px; }
.c-aba { display: inline-flex; gap: 8px; align-items: center; border: 1px solid #a9b8c8; border-bottom: 0; background: #edf1f5; padding: 3px 8px; font: 11px Tahoma, sans-serif; border-radius: 3px 3px 0 0; }
.c-aba.ativa { background: #fff; }
.c-aba b { font-weight: normal; color: #777; }
.c-aba b:hover { color: #c00; }
.c-paginas { position: relative; overflow: auto; background: #f0f0f0; }
.c-desktop { position: absolute; inset: 0; background: #e8edf2; }
.c-pagina { position: absolute; inset: 0; overflow: auto; background: #f0f0f0; }
.c-pagina > .d-cliente { margin: 0 auto; }
.c-status { height: 22px; align-items: center; }
.c-relogio { margin-left: auto; }
.c-fundo { position: fixed; inset: 0; background: rgba(0,0,0,.25); display: grid; place-items: center; z-index: 50; }
.c-msg { min-width: 320px; max-width: 520px; }
.c-msg-corpo { padding: 16px 18px 12px; background: #fff; font: 12px "Segoe UI", Tahoma, sans-serif; }
.c-msg-corpo p { margin: 0 0 16px; white-space: pre-wrap; }
.c-msg-bts { display: flex; gap: 8px; justify-content: flex-end; padding-top: 10px; border-top: 1px solid #e5e5e5; margin: 0 -18px; padding: 10px 18px 0; }
.c-msg-bts .d-botao { min-width: 75px; height: 23px; }

/* Caixa padrão do Windows 10 (MessageBox) — medidas da captura do Click */
.w-msg { position: relative; min-width: 160px; max-width: 520px; background: #fff; border: 1px solid #8a8a8a; box-shadow: 0 6px 24px rgba(0,0,0,.35); font: 12px "Segoe UI", Tahoma, sans-serif; color: #000; }
.w-titulo { display: flex; align-items: center; justify-content: space-between; height: 30px; padding-left: 8px; }
.w-fechar { width: 46px; height: 30px; border: 0; background: transparent; font-size: 12px; cursor: pointer; }
.w-fechar:hover { background: #e81123; color: #fff; }
.w-corpo { display: flex; align-items: center; gap: 9px; padding: 23px 28px 24px 21px; min-height: 32px; }
.w-corpo.sem-icone { padding-left: 11px; }
.w-icone { flex: 0 0 32px; height: 32px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font: bold 18px "Segoe UI", sans-serif; }
.w-icone.erro { background: radial-gradient(circle at 35% 30%, #f47c7c, #d42020 70%); box-shadow: 0 0 0 1px #a31515 inset; }
.w-icone.erro::before { content: "✕"; }
.w-icone.questao { background: #1c6bd0; } .w-icone.questao::before { content: "?"; }
.w-icone.aviso { background: #f2c811; color: #000; border-radius: 3px; } .w-icone.aviso::before { content: "!"; }
.w-icone.info { background: #1c6bd0; } .w-icone.info::before { content: "i"; }
.w-texto { white-space: pre-wrap; }
.w-rodape { display: flex; justify-content: flex-end; gap: 7px; padding: 9px 15px; background: #f0f0f0; }
.w-botao { width: 75px; height: 23px; border: 1px solid #adadad; background: #e1e1e1; font: 12px "Segoe UI", Tahoma, sans-serif; }
.w-botao.padrao, .w-botao:focus { border-color: #0078d7; outline: none; }
.w-botao:hover { background: #e5f1fb; border-color: #0078d7; }

/* Visualização de impressão dos relatórios (public/click/relatorio.js): folhas no tamanho do papel do modelo .fr3 */
.rel-fundo { position: fixed; inset: 0; z-index: 900; display: flex; flex-direction: column; background: #6b6b6b; outline: none; }
.rel-barra { display: flex; gap: 8px; align-items: center; padding: 6px 10px; background: #f0f0f0; border-bottom: 1px solid #999; }
.rel-barra .w-botao { width: auto; padding: 0 14px; }
.rel-titulo { flex: 1; font: 12px Tahoma, sans-serif; }
.rel-folhas { flex: 1; overflow: auto; padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.rel-pagina { position: relative; flex: none; overflow: hidden; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, .5); }
.rel-area { position: absolute; }
.rel-banda { position: absolute; left: 0; right: 0; }
.rel-obj { position: absolute; box-sizing: border-box; display: flex; overflow: hidden; line-height: 1.15; color: #000; }
.rel-figura { max-width: 100%; max-height: 100%; object-fit: contain; }
.rel-lista { min-width: 320px; font: 12px Tahoma, sans-serif; }
@page { margin: 0; }
@media print {
  body.rel-imprimindo > *:not(.rel-fundo) { display: none !important; }
  .rel-fundo { position: static; background: none; }
  .rel-barra { display: none; }
  .rel-folhas { display: block; overflow: visible; padding: 0; }
  .rel-pagina { box-shadow: none; break-after: page; }
}
/* Catálogo do ClickReport (árvore de grupos) */
.ger-arvore { list-style: none; margin: 0; padding: 4px; font: 12px Tahoma, sans-serif; }
.ger-arvore li { padding: 3px 6px; cursor: default; }
.ger-arvore li.sel { background: #0078d7; color: #fff; }
.rel-barras { flex-direction: column; align-items: center; justify-content: flex-start; }
.rel-barras svg { display: block; }
.rel-barras-texto { font-family: Arial, sans-serif; line-height: 1; letter-spacing: 1px; }
/* DACTE / DAMDFE / CC-e (public/click/modulos/transporte.js) e caixa de pergunta */
.dfe-pergunta { display: flex; flex-direction: column; gap: 6px; min-width: 360px; }
.dfe-campo { font: 12px Tahoma, sans-serif; width: 100%; box-sizing: border-box; }
.dfe-pagina { font: 10px Arial, sans-serif; color: #000; padding: 10mm; box-sizing: border-box; display: flex; flex-direction: column; gap: 4px; }
.dfe-cab { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; border: 1px solid #000; padding: 4px; }
.dfe-doc { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.dfe-chave { font: bold 10px 'Courier New', monospace; }
.dfe-homolog { grid-column: 1 / -1; text-align: center; font-weight: bold; color: #b00; }
.dfe-linha { display: flex; gap: 4px; }
.dfe-linha > .dfe-quadro { flex: 1; }
.dfe-quadro { border: 1px solid #000; padding: 2px 4px; }
.dfe-rotulo { font-size: 7px; text-transform: uppercase; }
.dfe-valor { font-size: 10px; min-height: 12px; }
.dfe-tab { width: 100%; border-collapse: collapse; }
.dfe-tab th, .dfe-tab td { border: 1px solid #000; padding: 1px 4px; text-align: left; font-size: 9px; }
.dfe-estados { max-height: 360px; overflow: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; }
.dfe-estado { font: 12px Tahoma, sans-serif; white-space: nowrap; }
.bol-cab { display: flex; align-items: flex-end; gap: 8px; border-bottom: 2px solid #000; padding-bottom: 2px; }
.bol-banco { font-size: 13px; } .bol-cod { font-size: 16px; border-left: 2px solid #000; border-right: 2px solid #000; padding: 0 6px; }
.bol-linha { margin-left: auto; font: bold 12px Arial, sans-serif; }
.bol-recibo, .bol-ficha { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8mm; }
.bol-corte { border-top: 1px dashed #000; text-align: right; font-size: 7px; padding-top: 2px; }
.bol-barras { padding: 4px 0; }
.c-crm { margin-left: auto; padding: 0 10px; color: #fff; font: bold 12px Tahoma, sans-serif; text-decoration: none; border-left: 1px solid rgba(255,255,255,.4); }
.c-crm:hover { text-decoration: underline; }
/* menu do botão direito (ex.: Nova Foto / Excluir Foto do Cadastro de Produto) */
.c-contexto { position: fixed; z-index: 1000; list-style: none; margin: 0; padding: 2px 0; background: #fff; border: 1px solid #a0a0a0; box-shadow: 2px 2px 4px rgba(0,0,0,.25); font: 12px "Segoe UI", Tahoma, sans-serif; min-width: 140px; }
.c-contexto li { padding: 4px 20px; cursor: default; }
.c-contexto li:hover { background: #cce8ff; }
.d-imagem img.foto-produto { width: 100%; height: 100%; object-fit: contain; }

/* DACTE e DAMDFE oficiais (Antigravity, tarefa 008) */
.dacte-folha, .damdfe-folha { width: 210mm; min-height: 297mm; padding: 6mm; box-sizing: border-box; font: 7.5pt Arial, Helvetica, sans-serif; color: #000; background: #fff; display: flex; flex-direction: column; gap: 2px; position: relative; }
.dacte-canhoto { border-bottom: 1px dashed #000; padding-bottom: 3px; margin-bottom: 2px; display: flex; flex-direction: column; gap: 0; }
.dacte-canhoto-topo { font-size: 6pt; font-weight: bold; text-transform: uppercase; border: 1px solid #000; padding: 2px 4px; }
.dacte-linha, .damdfe-linha { display: flex; width: 100%; box-sizing: border-box; }
.dacte-linha > *, .damdfe-linha > * { margin-left: -1px; margin-top: -1px; }
.dacte-linha > *:first-child, .damdfe-linha > *:first-child { margin-left: 0; }
.dacte-campo, .damdfe-campo { border: 1px solid #000; padding: 1.5px 3px; box-sizing: border-box; flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; }
.dacte-w-xs, .damdfe-w-xs { flex: 0 0 14mm; }
.dacte-w-sm, .damdfe-w-sm { flex: 0 0 22mm; }
.dacte-w-md, .damdfe-w-md { flex: 0 0 32mm; }
.dacte-w-lg, .damdfe-w-lg { flex: 0 0 44mm; }
.dacte-w-xl, .damdfe-w-xl { flex: 0 0 60mm; }
.dacte-w-2x { flex: 2 1 0; }
.dacte-w-3x { flex: 3 1 0; }
.dacte-rotulo, .damdfe-rotulo { font-size: 5.5pt; color: #111; text-transform: uppercase; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dacte-valor, .damdfe-valor { font-size: 7.2pt; line-height: 1.2; min-height: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dacte-valor.negrito, .damdfe-valor.negrito { font-weight: bold; }
.dacte-valor.centro, .damdfe-valor.centro { text-align: center; }
.dacte-valor.direita, .damdfe-valor.direita { text-align: right; }
.dacte-valor.quebra, .damdfe-valor.quebra { white-space: pre-wrap; font-size: 6.5pt; overflow: visible; }
.dacte-valor.mono, .damdfe-valor.mono { font: bold 6.2pt "Courier New", monospace; letter-spacing: 0px; }
.dacte-cab, .damdfe-cab { display: flex; width: 100%; border: 1px solid #000; box-sizing: border-box; }
.dacte-emit, .damdfe-emit { flex: 1 1 0; min-width: 0; display: flex; gap: 4px; padding: 3px; border-right: 1px solid #000; box-sizing: border-box; }
.dacte-logo-vazio, .damdfe-logo-vazio { flex: 0 0 18mm; height: 22mm; border: 1px dashed #bbb; box-sizing: border-box; }
.dacte-emit-dados, .damdfe-emit-dados { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 1px; font-size: 7pt; }
.dacte-emit-nome, .damdfe-emit-nome { font-size: 9pt; font-weight: bold; line-height: 1.15; }
.dacte-centro { flex: 0 0 36mm; border-right: 1px solid #000; display: flex; flex-direction: column; justify-content: space-between; text-align: center; box-sizing: border-box; }
.dacte-titulo, .damdfe-titulo { font-size: 12pt; font-weight: bold; letter-spacing: 0.5px; line-height: 1.1; margin-top: 2px; }
.dacte-subtitulo, .damdfe-subtitulo { font-size: 5.5pt; line-height: 1.1; padding: 0 2px; }
.dacte-modal-box { border-top: 1px solid #000; border-bottom: 1px solid #000; padding: 2px; font-size: 8pt; font-weight: bold; }
.dacte-fisco { flex: 0 0 104mm; display: flex; padding: 3px; gap: 4px; align-items: center; box-sizing: border-box; }
.damdfe-fisco { flex: 0 0 112mm; display: flex; padding: 3px; gap: 4px; align-items: center; box-sizing: border-box; }
.dacte-fisco-esq, .damdfe-fisco-esq { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.dacte-barras, .damdfe-barras { display: flex; justify-content: center; align-items: center; min-height: 34px; }
.dacte-barras svg, .damdfe-barras svg { max-width: 100%; height: auto; display: block; }
.dacte-qrcode, .damdfe-qrcode { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.dacte-qrcode svg, .damdfe-qrcode svg { display: block; }
.dacte-consulta, .damdfe-consulta { font-size: 5.5pt; text-align: center; line-height: 1.1; }
.dacte-faixa-aviso, .damdfe-faixa-aviso { border: 1.5px solid #b00; background: #fff4f4; color: #a00; font-size: 8.5pt; font-weight: bold; text-align: center; padding: 2px 4px; text-transform: uppercase; letter-spacing: 0.4px; }
.dacte-marca-cancelado, .damdfe-marca-cancelado { position: absolute; left: 0; right: 0; top: 44%; text-align: center; font-size: 46pt; font-weight: bold; color: rgba(200, 0, 0, 0.26); transform: rotate(-28deg); pointer-events: none; z-index: 5; letter-spacing: 4px; text-transform: uppercase; }
.dacte-secao, .damdfe-secao { background: #eaeaea; border: 1px solid #000; font-size: 6pt; font-weight: bold; text-transform: uppercase; text-align: center; padding: 1px 4px; letter-spacing: 0.3px; margin-top: 1px; }
.dacte-atores { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.dacte-ator { border: 1px solid #000; padding: 2px 3px; display: flex; flex-direction: column; gap: 1px; }
.dacte-ator-titulo { font-size: 6pt; font-weight: bold; text-transform: uppercase; border-bottom: 1px solid #ccc; margin-bottom: 1px; }
.dacte-ator-linha { display: flex; gap: 6px; font-size: 6.8pt; line-height: 1.15; }
.dacte-ator-par { flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dacte-ator-par b { font-size: 5.8pt; text-transform: uppercase; margin-right: 3px; }
.dacte-grade-dupla, .damdfe-grade-dupla { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.dacte-comp-painel { display: grid; grid-template-columns: 2fr 1fr; gap: 2px; }
.dacte-tabela, .damdfe-tabela { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 6.8pt; }
.dacte-tabela th, .damdfe-tabela th { border: 1px solid #000; background: #f3f3f3; font-size: 5.8pt; font-weight: bold; text-transform: uppercase; padding: 1.5px 3px; text-align: left; }
.dacte-tabela td, .damdfe-tabela td { border: 1px solid #000; padding: 1.5px 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; height: 12px; }
.dacte-tabela td.direita, .damdfe-tabela td.direita, .dacte-tabela th.direita, .damdfe-tabela th.direita { text-align: right; }
.dacte-tabela td.centro, .damdfe-tabela td.centro, .dacte-tabela th.centro, .damdfe-tabela th.centro { text-align: center; }
.dacte-tabela td.mono, .damdfe-tabela td.mono { font: 6.4pt "Courier New", monospace; }
.dacte-obs-box, .damdfe-obs-box { border: 1px solid #000; min-height: 14mm; padding: 2px 4px; font-size: 6.8pt; white-space: pre-wrap; box-sizing: border-box; }
.dacte-rodape, .damdfe-rodape { margin-top: auto; padding-top: 2px; border-top: 1px solid #000; display: flex; justify-content: space-between; font-size: 6pt; color: #222; }
@media print {
  .dacte-folha, .damdfe-folha { box-shadow: none; margin: 0; }
}
