/* GestorAppMI - PADRÃO VISUAL DOS CARDS [PADRAO-2110] (Nicholas, 21/10: "confere TODOS OS CARDS do sistema, pra ver se precisa
   reorganizar o visual/campos e botões também, muda tudo no meu PC"). Carregado por ÚLTIMO no index (vence as regras antigas).
   Só o PC do Nicholas por enquanto. */

/* ---- FILTROS COM NOME na faixa (ABERTOS · ENTREGUES · FATURADOS…): a regra das bolinhas de 30px (app.css) vencia e os nomes
   ficavam grudados — agora são pílulas com folga (PEDIDOS / OS, PEDIDO DE COMPRA) ---- */
.g-win .gk-filtros.gk-filtros-nome { gap: 6px !important; }
.g-win .gk-filtros.gk-filtros-nome button { width: auto !important; height: 30px !important; padding: 0 14px !important; border-radius: 999px !important;
  white-space: nowrap; font-size: 11.5px !important; letter-spacing: .4px; border: 1px solid rgba(255,255,255,.55) !important; }

/* ---- CONDICIONAIS · TROCAS · VALES: filtros e cards em MAIÚSCULAS como o resto do sistema ---- */
#gcd-host .gcd-chips button, #gcd-host .gcd-rcard small { text-transform: uppercase; letter-spacing: .3px; }

/* ---- JANELA DE CADASTRO GENÉRICA (MARCAS, GRUPOS, VENDEDORES, LOTES, PROMOÇÕES, TRIBUTAÇÕES, USUÁRIOS…): o mesmo padrão das
   fichas de CLIENTE e PRODUTO — UM CAMPO POR LINHA, rótulo numa coluna fixa à esquerda, o campo na largura do que guarda.
   O cadastro.js põe a classe g-linhas nas grades da ficha. ---- */
.gk-ficha .g-linhas { display: flex !important; flex-direction: column; align-items: stretch; gap: 10px !important; --rot: 200px; padding: 6px 4px; }
.gk-ficha .g-linhas > [hidden], .gk-ficha .g-linhas > span:empty { display: none !important; }
.gk-ficha .g-linhas > label:not(.g-marca):not([hidden]) { display: grid !important; grid-template-columns: var(--rot) minmax(0, var(--w, 460px)); align-items: center;
  column-gap: 12px; margin: 0 !important; text-align: left !important; }
.gk-ficha .g-linhas > label:not(.g-marca) > span:first-child { text-align: left !important; font-size: 11.5px !important; font-weight: 800; letter-spacing: .3px; opacity: .9; padding: 0 !important; line-height: 1.2; }
.gk-ficha .g-linhas > label:not(.g-marca) > :not(span:first-child) { width: 100%; min-width: 0; }
.gk-ficha .g-linhas > .s1 { --w: 140px; } .gk-ficha .g-linhas > .s2 { --w: 200px; } .gk-ficha .g-linhas > .s3 { --w: 260px; } .gk-ficha .g-linhas > .s4 { --w: 340px; }
.gk-ficha .g-linhas > :is(.s5, .s6) { --w: 460px; } .gk-ficha .g-linhas > :is(.s7, .s8, .s9, .s10, .s11, .s12) { --w: 600px; }
.gk-ficha .g-linhas > label.g-marca:not([hidden]) { display: flex !important; align-items: center; gap: 10px; width: auto !important; margin: 0 0 0 calc(var(--rot) + 12px) !important;
  padding: 0 !important; min-height: 30px; border: 0 !important; background: none !important; justify-content: flex-start !important; }
.gk-ficha .g-linhas > label.g-marca > input[type=checkbox] { width: 20px !important; height: 20px !important; flex: 0 0 20px; margin: 0 !important; }
.gk-ficha .g-linhas > :not(label) { max-width: calc(var(--rot) + 612px); }
.gk-ficha .g-linhas :is(input, select, textarea) { text-align: left !important; text-align-last: auto !important; }
.gk-ficha .g-linhas :is(input[data-din], input[data-qtd], input[data-pct], input[inputmode=decimal]) { text-align: right !important; }
@media (max-width: 640px) {
  .gk-ficha .g-linhas > label:not(.g-marca):not([hidden]) { grid-template-columns: minmax(0, 1fr); row-gap: 3px; }
  .gk-ficha .g-linhas > label.g-marca:not([hidden]) { margin-left: 0 !important; }
}
/* com os filtros de nome, o título da faixa ocupa o espaço dele (não flutua por cima dos filtros) */
.g-win .gk-faixa:has(> .gk-filtros-nome) > h2 { position: static !important; transform: none !important; left: auto !important; justify-self: center; min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* SELO "TEM ATUALIZAÇÃO" do MaTIA dentro do cabeçalho (o atualizacao.js põe ali): não cobre mais os botões das janelas */
.g-cab-dir { display: flex; align-items: center; gap: 10px; }
.g-cab-dir .g-selo-atu.no-cab { position: static !important; box-shadow: none !important; padding: 3px 10px 3px 3px !important; font-size: 10px !important; white-space: nowrap; }
.g-cab-dir .g-selo-atu.no-cab img { width: 26px !important; height: 26px !important; }
@media (max-width: 900px) { .g-cab-dir .g-selo-atu.no-cab span { display: none; } .g-cab-dir .g-selo-atu.no-cab { padding: 3px !important; } }

/* [VENDAS-NFCE-2210] o DANFE da venda do PDV no CONSULTAR VENDAS (o papel do caixa, em bobina) */
.gvd-danfe { position: relative; width: calc(var(--col, 48) * 0.62em); max-width: 100%; margin: 0 auto 8px; padding: 10px 12px; background: #fff; color: #111;
  border: 1px solid #d9dee8; border-radius: 6px; font: 12px/1.3 'Courier New', monospace; text-align: left; }
.gvd-danfe .gvd-lin.peq { font-size: 10.5px; } .gvd-danfe .gvd-qr img { display: inline-block; }
.gvd-danfe .gvd-marca { position: absolute; top: 40%; left: 0; right: 0; text-align: center; font: 900 30px sans-serif; color: rgba(200,0,0,.35); transform: rotate(-20deg); pointer-events: none; }
dialog .g-info-texto:has(.gvd-danfe) { max-height: calc(70 * var(--vh, 1vh)); overflow-y: auto; }

/* [SELO-ATU-0811] (08/11, Mateus: "não pode cortar a cabeça do MaTIA ... TEM ATUALIZAÇÃO ! / CLIQUE PARA ATUALIZAR, tudo centralizado") os dois selos iguais */
.g-selo-atu img, #pdv-selo-atualizacao img { object-fit: cover !important; object-position: center top !important; background: #fff; }
.g-selo-atu span, #pdv-selo-atualizacao span { display: flex !important; flex-direction: column !important; align-items: center !important; text-align: center !important; }
.g-selo-atu, #pdv-selo-atualizacao { align-items: center !important; }

/* [ESPERA-BARRA-0811] a barra de percentual da espera (reiniciar / atualizar) */
.g-espera-barra { display: flex; align-items: center; gap: 10px; margin: 10px auto 2px; max-width: 320px; }
.g-espera-barra > div { flex: 1 1 auto; height: 12px; border-radius: 999px; background: rgba(255,255,255,.18); overflow: hidden; border: 1px solid rgba(255,255,255,.35); }
.g-espera-barra > div > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #63a6ff, #1668e3); transition: width .25s linear; }
.g-espera-barra > b { min-width: 44px; text-align: right; font-size: 14px; color: #fff; }
