:root {
  --cor-primaria: #1d5fd1; --cor-primaria-esc: #1749a3;
  --fundo: #f3f5f9; --cartao: #fff; --borda: #dde2ea; --texto: #1f2733; --suave: #6b7686;
  --verde: #1e8e4e; --amarelo: #c98a00; --vermelho: #c62f2f; --azul: #1d5fd1;
}
* { box-sizing: border-box; }
body { margin: 0; font: 15px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--fundo); color: var(--texto); }
a { color: var(--cor-primaria); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font-size: 1.5rem; margin: .2rem 0 1rem; } h2 { font-size: 1.1rem; margin: 1.2rem 0 .6rem; }
main { width: 100%; max-width: 100%; margin: 0 auto; padding: 1.4rem 2.2rem; } main.estreito { max-width: 440px; margin-top: 8vh; padding: 1.2rem; }
.estreito-card { max-width: 640px; margin: 1.5rem auto; padding: 1.5rem 1.8rem; box-shadow: 0 4px 16px rgba(20, 33, 61, .06); }
.cartao-centralizado { max-width: 920px; margin: 0 auto 1.2rem; padding: 1.4rem 1.6rem; box-shadow: 0 4px 16px rgba(20, 33, 61, .05); }
.rotulo-campo { display: inline-flex; align-items: center; gap: .25rem; line-height: 1.2; }

.topo { display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; background: #14213d; color: #fff; padding: .65rem 2.2rem; }
.topo a { color: #fff; }
.marca { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.15rem; color: #fff; text-decoration: none; }
.marca:hover { text-decoration: none; opacity: .92; }
.logo-marca { width: 30px; height: 30px; object-fit: contain; display: block; flex-shrink: 0; filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3)); }
.topo-barra-mobile { display: flex; align-items: center; justify-content: space-between; gap: .8rem; }
.btn-menu-mobile, .barra-inferior-mobile { display: none; }
.topo nav { display: flex; gap: .2rem; flex-wrap: wrap; flex: 1; }
.topo nav a { padding: .4rem .7rem; border-radius: 6px; } .topo nav a:hover { background: #ffffff22; text-decoration: none; }
.topo nav a.ativo { background: #ffffff33; }
.usuario { display: flex; align-items: center; gap: .8rem; } .usuario form { margin: 0; }
.topo .btn.link { color: #cfd8ea; }

.cartao { background: var(--cartao); border: 1px solid var(--borda); border-radius: 10px; padding: 1.1rem 1.3rem; margin-bottom: 1.2rem; }
.cartao h2:first-child { margin-top: 0; }
.cabecalho { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .6rem; }
.acoes { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.grade-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 1.2rem; }
.grade-2 > .cartao { margin-bottom: 0; } .grade-2 { margin-bottom: 1.2rem; }

.btn { display: inline-block; padding: .45rem .9rem; border: 1px solid var(--borda); border-radius: 7px; background: #fff; color: var(--texto); cursor: pointer; font: inherit; }
.btn:hover { background: #eef2f8; text-decoration: none; }
.btn.primario { background: var(--cor-primaria); border-color: var(--cor-primaria); color: #fff; } .btn.primario:hover { background: var(--cor-primaria-esc); }
.btn.perigo { background: var(--vermelho); border-color: var(--vermelho); color: #fff; }
.btn.link { border: 0; background: none; color: var(--cor-primaria); padding: .3rem .5rem; }
.btn.pequeno { padding: .2rem .6rem; font-size: .85rem; }

.menu { position: relative; } .menu summary { list-style: none; } .menu summary::-webkit-details-marker { display: none; }
.menu-itens { position: absolute; right: 0; top: 110%; background: #fff; border: 1px solid var(--borda); border-radius: 8px; min-width: 220px; z-index: 10; box-shadow: 0 6px 18px #0002; overflow: hidden; }
.menu-itens a { display: block; padding: .6rem 1rem; color: var(--texto); } .menu-itens a:hover { background: #eef2f8; text-decoration: none; }

.aviso { padding: .7rem 1rem; border-radius: 8px; margin-bottom: 1rem; border: 1px solid; }
.aviso.ok { background: #e6f6ec; border-color: #9fd6b3; color: #14602f; }
.aviso.erro { background: #fdeaea; border-color: #eba5a5; color: #8e1d1d; }

.formulario { display: flex; flex-direction: column; gap: .9rem; }
.formulario label, .filtros label { display: flex; flex-direction: column; gap: .25rem; font-weight: 600; font-size: .9rem; flex: 1; }
.linha { display: flex; gap: .9rem; flex-wrap: wrap; } .linha > label { min-width: 180px; }
input, select { font: inherit; padding: .45rem .6rem; border: 1px solid #c3cad6; border-radius: 6px; background: #fff; width: 100%; font-weight: 400; }
input:focus, select:focus { outline: 2px solid #9db9f0; border-color: var(--cor-primaria); }
label.check { flex-direction: row; align-items: center; gap: .5rem; font-weight: 400; flex: 0 0 auto; } label.check input { width: auto; }
.filtros { display: flex; gap: .6rem; flex-wrap: wrap; align-items: end; margin-bottom: 1rem; }
.filtros input, .filtros select { width: auto; } .filtros label { flex: 0 0 auto; }

.tabela-rolavel { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--borda); vertical-align: top; }
th { font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--suave); white-space: nowrap; }
.num { text-align: right; white-space: nowrap; } tr.inativo td { color: var(--suave); }
tr.cancelada td { color: var(--suave); text-decoration: line-through; } tr.cancelada td small, tr.cancelada td a { text-decoration: none; }
table.itens input, table.itens select { min-width: 120px; } table.itens td { vertical-align: middle; }
.vazio { color: var(--suave); text-align: center; padding: 1.2rem; }
.suave { color: var(--suave); } .nota { color: var(--suave); font-size: .85rem; } .erro-texto { color: var(--vermelho); }

.badge { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .78rem; font-weight: 600; background: #e8ebf1; color: #46505f; }
.badge.verde { background: #dcf3e5; color: #14602f; } .badge.amarelo { background: #fff0cc; color: #7a5300; } .badge.vermelho { background: #fbdcdc; color: #8e1d1d; }
.badge.tipo-entrada, .badge.tipo-ajuste_mais { background: #dcf3e5; color: #14602f; }
.badge.tipo-saida { background: #dde8fb; color: #1749a3; }
.badge.tipo-baixa, .badge.tipo-ajuste_menos { background: #fbdcdc; color: #8e1d1d; }

.indicadores { display: grid; grid-template-columns: repeat(auto-fit, minmax(175px, 1fr)); gap: 1rem; margin-bottom: 1.3rem; }
.indicadores-painel { grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); }
.indicador { background: var(--cartao); border: 1px solid var(--borda); border-top: 3px solid var(--cor-primaria); border-radius: 10px; padding: .95rem 1.15rem; display: flex; flex-direction: column; justify-content: center; color: var(--texto); box-shadow: 0 2px 6px rgba(20, 33, 61, .04); transition: transform .12s, box-shadow .12s; }
a.indicador:hover { text-decoration: none; background: #fafbfd; transform: translateY(-1px); box-shadow: 0 4px 12px rgba(20, 33, 61, .08); }
.indicador .valor { font-size: 1.9rem; font-weight: 700; line-height: 1.2; color: #14213d; } .indicador span:last-child { color: var(--suave); font-size: .86rem; margin-top: .15rem; }
.indicador.alerta { border-color: #e9b949; border-top-color: #d9822b; background: #fff8e6; }

/* Painel em tela inteira */
.painel-topo { margin-bottom: 1rem; }
.painel-grade-principal {
  display: grid;
  grid-template-columns: minmax(380px, 1.45fr) minmax(320px, 1fr) minmax(300px, .95fr);
  gap: 1.25rem;
  margin-bottom: 1.3rem;
  align-items: stretch;
}
.painel-grade-principal > .cartao { margin-bottom: 0; display: flex; flex-direction: column; box-shadow: 0 2px 8px rgba(20, 33, 61, .04); }
.painel-lista-pedidos { display: flex; flex-direction: column; gap: .6rem; }
.painel-pedido-item {
  border: 1px solid var(--borda);
  border-left: 4px solid var(--azul);
  border-radius: 8px;
  padding: .65rem .85rem;
  background: #fafbfd;
}
.painel-pedido-item.status-novo { border-left-color: #e5484d; background: #fffafa; }
.painel-pedido-item.status-pendente { border-left-color: var(--amarelo); }
.painel-pedido-item.status-pronto { border-left-color: var(--verde); }
.painel-pedido-topo { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .2rem; }

/* Perfis e Permissões de Acesso */
.grade-perfis { display: grid; grid-template-columns: repeat(auto-fit, minmax(460px, 1fr)); gap: 1.2rem; align-items: start; }
.grade-perfis > .cartao { margin-bottom: 0; }
.card-novo-perfil { border-top: 4px solid var(--cor-primaria); background: #fcfdff; }
.card-perfil-admin { border-left: 4px solid var(--verde); }
.grade-permissoes { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .55rem; }
.item-permissao {
  display: flex !important;
  flex-direction: row !important;
  align-items: flex-start !important;
  gap: .55rem !important;
  padding: .55rem .7rem;
  border: 1px solid var(--borda);
  border-radius: 8px;
  background: #fafbfd;
  cursor: pointer;
  font-weight: 400 !important;
}
.item-permissao:hover { border-color: #9db9f0; background: #f2f6fc; }
.item-permissao.ativa { border-color: #b7d1fb; background: #f4f8ff; }
.item-permissao input[type=checkbox] { width: 1.1rem; height: 1.1rem; margin-top: .15rem; flex: 0 0 auto; cursor: pointer; }
.item-permissao strong { display: block; font-size: .88rem; color: #14213d; }
.item-permissao small { display: block; font-size: .78rem; color: var(--suave); line-height: 1.3; margin-top: .1rem; }

@media (max-width: 1200px) {
  .painel-grade-principal { grid-template-columns: 1fr 1fr; }
  .painel-cartao-pedidos { grid-column: 1 / -1; }
}

.barra { background: #e8ebf1; border-radius: 4px; height: 10px; min-width: 100px; overflow: hidden; }
.barra span { display: block; height: 100%; background: var(--vermelho); } .barra.azul span { background: var(--azul); } .barra.verde span { background: var(--verde); }
.barra:not(.azul):not(.verde):not(.vermelho) span { background: var(--azul); } .barra.vermelho span { background: var(--vermelho); }
.barra-celula { width: 30%; vertical-align: middle; }

details.cancelar summary { cursor: pointer; color: var(--suave); font-size: .85rem; }
details.cancelar form { display: flex; gap: .4rem; margin-top: .4rem; min-width: 260px; }
.paginacao { display: flex; gap: 1rem; align-items: center; justify-content: center; margin-top: 1rem; }

.comprovante table.dados th { text-transform: none; font-size: .85rem; width: 130px; } .declaracao { margin: 1.2rem 0 3rem; }
.assinaturas { display: flex; gap: 3rem; margin-top: 3rem; } .assinaturas div { flex: 1; text-align: center; }
.assinaturas span { display: block; border-top: 1px solid #000; margin-bottom: .3rem; }
.so-imprimir { display: none; }

@media print {
  .topo, .nao-imprimir, .acoes, .filtros, details.cancelar, .paginacao, .aviso { display: none !important; }
  body { background: #fff; } main { max-width: none; padding: 0; } .cartao { border: 0; padding: 0; }
  .so-imprimir { display: block; }
}

/* ---------------------------------------------------------------- Pedidos */
.contador { display: inline-block; min-width: 1.4rem; padding: 0 .4rem; border-radius: 999px; background: #e8ebf1; color: #46505f; font-size: .78rem; font-weight: 700; text-align: center; }
.topo .contador { background: #e5484d; color: #fff; } .contador.alerta { background: #e5484d; color: #fff; } .contador[hidden] { display: none; }
.abas { display: flex; gap: .3rem; border-bottom: 2px solid var(--borda); margin-bottom: 1.2rem; }
.abas a { padding: .5rem 1rem; border-radius: 8px 8px 0 0; color: var(--suave); } .abas a.ativa { background: var(--cartao); color: var(--texto); border: 1px solid var(--borda); border-bottom: 2px solid var(--cartao); margin-bottom: -2px; font-weight: 600; text-decoration: none; }
.grupo-pedidos h2 { display: flex; align-items: center; gap: .5rem; }
.grade-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1rem; margin-bottom: 1rem; }

.pedido-card { background: var(--cartao); border: 1px solid var(--borda); border-left: 5px solid #9aa5b5; border-radius: 10px; padding: .9rem 1rem; display: flex; flex-direction: column; gap: .5rem; }
.pedido-card.status-novo { border-left-color: #e5484d; } .pedido-card.status-pendente { border-left-color: var(--amarelo); }
.pedido-card.status-em_separacao { border-left-color: var(--azul); } .pedido-card.status-pronto { border-left-color: var(--verde); }
.pedido-card header { display: flex; justify-content: space-between; gap: .5rem; align-items: baseline; }
.pedido-titulo { font-weight: 700; color: var(--texto); }
.pedido-meta { font-size: .9rem; } .pedido-itens { margin: 0; padding-left: 1.1rem; } .pedido-itens li { margin: .15rem 0; }
.pedido-obs { margin: 0; padding: .5rem .7rem; background: #fff8e6; border-radius: 6px; font-size: .9rem; }
.ok-mini { color: var(--verde); font-weight: 700; margin-left: -1rem; padding-right: .2rem; }
.progresso-mini { font-size: .85rem; color: var(--azul); font-weight: 600; }
.pedido-card footer { margin-top: auto; } .pedido-card footer form { margin: 0; }
.badge.status-novo { background: #fbdcdc; color: #8e1d1d; } .badge.status-pendente { background: #fff0cc; color: #7a5300; }
.badge.status-em_separacao { background: #dde8fb; color: #1749a3; } .badge.status-pronto, .badge.status-retirado { background: #dcf3e5; color: #14602f; }

.dados-pedido { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.dados-pedido div { display: flex; flex-direction: column; } .dados-pedido span { font-size: .8rem; }
.pedido-cabecalho .pedido-obs { margin-top: 1rem; }
.checklist .chk-cel { width: 2.4rem; vertical-align: middle; } .checklist input[type=checkbox] { width: 1.5rem; height: 1.5rem; cursor: pointer; }
.checklist .item-nome { display: block; font-weight: 600; } .checklist tr.ignorado td { color: var(--suave); text-decoration: line-through; }
.checklist tr.ignorado td .badge, .checklist tr.ignorado td summary { text-decoration: none; }
details.editar-item summary { cursor: pointer; color: var(--cor-primaria); font-size: .88rem; }
.linha-form { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin: .5rem 0 0; }
.linha-form select { width: auto; max-width: 280px; } .linha-form input[type=number] { width: 80px; } .linha-form input:not([type]), .linha-form input[name=motivo] { width: auto; min-width: 240px; }
.btn.grande { font-size: 1.05rem; padding: .7rem 1.6rem; } .btn:disabled { opacity: .45; cursor: not-allowed; }
.destaque-pronto { border-left: 5px solid var(--verde); }
details.cancelar-pedido { margin-bottom: 2rem; } details.cancelar-pedido summary { cursor: pointer; color: var(--suave); }

#dock-pedidos { position: fixed; right: 1rem; bottom: 1rem; width: 340px; max-width: calc(100vw - 2rem); max-height: 80vh; display: flex; flex-direction: column; background: #fff; border: 2px solid #e5484d; border-radius: 12px; box-shadow: 0 10px 30px #0004; z-index: 50; }
#dock-pedidos[hidden] { display: none; }
.dock-cab { display: flex; justify-content: space-between; align-items: center; padding: .6rem .9rem; background: #e5484d; color: #fff; border-radius: 9px 9px 0 0; }
.dock-cab .btn.link { color: #fff; font-size: 1.2rem; line-height: 1; }
#dock-corpo { overflow-y: auto; padding: .7rem; display: flex; flex-direction: column; gap: .7rem; }
#dock-pedidos.minimizado #dock-corpo { display: none; }
@media print { #dock-pedidos { display: none !important; } }

/* ---------------------------------------------------------------- Formulário Público (/solicitar) */
.form-publico-container { max-width: 780px; margin: 0 auto; }
.topo-publico { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .6rem; margin-bottom: 1rem; padding: .6rem 1rem; background: #fff; border: 1px solid var(--borda); border-radius: 10px; }
.barra-compartilhar { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .8rem; background: #f8fafd; }
.barra-compartilhar code { background: #e8eef8; padding: .2rem .5rem; border-radius: 5px; color: #1749a3; font-size: .9rem; }
.cabecalho-forms { border-top: 6px solid var(--cor-primaria); }
.cabecalho-forms h1 { margin-top: 0; font-size: 1.6rem; color: #14213d; }
.cabecalho-forms p { margin: .4rem 0 0; }
.obrigatorio { color: var(--vermelho); font-weight: 700; }
.bloco-pergunta { display: flex; flex-direction: column; gap: .55rem; }
.titulo-pergunta { font-weight: 600; font-size: 1rem; color: #14213d; display: block; }
.subtitulo-pergunta { margin: -.2rem 0 .2rem; font-size: .86rem; color: var(--suave); }
.lista-opcoes { display: flex; flex-direction: column; gap: .4rem; }
.grade-opcoes-radio { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: .45rem; }
.opcao-item { display: flex; align-items: center; gap: .6rem; padding: .45rem .65rem; border: 1px solid #e3e8f0; border-radius: 7px; cursor: pointer; font-weight: 400; background: #fafbfd; transition: background .12s, border-color .12s; }
.opcao-item:hover { background: #eef3fb; border-color: #b8ccf0; }
.opcao-item.recomendado-cargo { background: #e6f6ec; border-color: #5bb97e; border-left: 4px solid var(--verde); color: #0f5126; font-weight: 600; }
.opcao-item.recomendado-cargo:hover { background: #d6f0e0; border-color: #3da363; }
.tag-recomendado { display: inline-block; margin-left: .35rem; padding: .1rem .55rem; background: var(--verde); color: #fff; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.tag-recomendado[hidden] { display: none !important; }
.sla-linha { display: flex; flex-wrap: wrap; gap: .3rem; }
.badge.sla-ok { background: #dcf3e5; color: #14602f; }
.badge.sla-risco { background: #fff0cc; color: #7a5300; }
.badge.sla-atrasado { background: #fbdcdc; color: #8e1d1d; }
.badge.sla-pausado { background: #e8ebf1; color: #46505f; }
.resumo-sla { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.resumo-sla .badge { font-size: .85rem; padding: .25rem .7rem; }
.faixa-complemento { font-size: .88rem; background: #f1f5fb; border-radius: 6px; padding: .4rem .6rem; }
.pedido-card.aguardando-estoque { border-left-color: #94a3b8; border-left-style: dashed; }
.pedido-card.estoque-chegou { border-left-color: var(--verde); border-left-style: solid; box-shadow: 0 0 0 2px #bfe8cf; }
.ok-texto { color: #14602f; }
.linha-tempo-sla { margin-top: .9rem; display: flex; flex-direction: column; gap: .45rem; }
.linha-tempo { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .35rem 1.2rem; font-size: .88rem; }
.linha-tempo li { display: flex; flex-direction: column; }
.linha-tempo li .suave { font-size: .76rem; }
.opcao-item:has(.unidades-vest:not([hidden])) { flex-wrap: wrap; }
.unidades-vest { flex-basis: 100%; display: flex; flex-wrap: wrap; gap: .4rem .6rem; padding-top: .45rem; margin-top: .1rem; border-top: 1px dashed #c9d6ea; font-weight: 400; color: var(--texto); cursor: default; }
.unidades-vest[hidden], .campo-unid[hidden] { display: none !important; }
.campo-unid { display: inline-flex; align-items: center; gap: .3rem; font-size: .85rem; }
.campo-unid select { width: auto; min-width: 4.2rem; padding: .25rem .4rem; }
.filtro-colaborador { margin-bottom: .4rem; }
.filtro-colaborador-info { margin: -.15rem 0 .4rem; font-size: .85rem; }
.filtro-colaborador-info[hidden] { display: none; }
.cartao-gestor {border-left: 4px solid #b26b00; }
.tag-fora-funcao {display: inline-block; margin-left: .35rem; padding: .1rem .55rem; background: #b26b00; color: #fff; border-radius: 999px; font-size: .78rem; font-weight: 700; }
.tag-fora-funcao[hidden], .opcao-item[hidden], .aviso-sem-itens[hidden], .bloco-pergunta[hidden] { display: none !important; }
.opcao-item input[type=checkbox], .opcao-item input[type=radio] { width: 1.15rem; height: 1.15rem; flex: 0 0 auto; margin: 0; cursor: pointer; }
.matriz-tamanhos th.centro, .matriz-tamanhos td.centro { text-align: center; vertical-align: middle; }
.matriz-tamanhos input[type=radio] { width: 1.15rem; height: 1.15rem; cursor: pointer; margin: 0; }
.subbloco-condicional { margin-top: .8rem; padding: 1rem; background: #f4f7fc; border: 1px solid #c9d8f0; border-left: 4px solid var(--cor-primaria); border-radius: 8px; display: flex; flex-direction: column; gap: .6rem; }
.abas-calcados { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .8rem; }
.aba-calcado-card { background: #fff; border: 1px solid var(--borda); border-radius: 8px; padding: .75rem .9rem; display: flex; flex-direction: column; gap: .4rem; }
.aba-calcado-titulo { font-weight: 700; color: var(--cor-primaria-esc); font-size: .95rem; border-bottom: 1px solid #eef2f8; padding-bottom: .3rem; }
.aba-calcado-card label { font-size: .85rem; font-weight: 600; color: var(--texto); }
.subbloco-condicional[hidden], .aba-calcado-card[hidden], tr[hidden] { display: none !important; }
textarea { font: inherit; padding: .5rem .65rem; border: 1px solid #c3cad6; border-radius: 6px; background: #fff; width: 100%; resize: vertical; }
textarea:focus { outline: 2px solid #9db9f0; border-color: var(--cor-primaria); }

/* Opções de EPI com imagem no formulário público (/solicitar) */
.grade-opcoes-epi-imagem { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .6rem; }
.opcao-item.opcao-com-imagem { padding: .55rem .7rem; gap: .7rem; min-height: 4.8rem; }
.moldura-img-epi { position: relative; flex: 0 0 auto; width: 64px; height: 64px; border-radius: 8px; border: 1px solid #d5deec; background: #fff; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.img-opcao-epi { width: 100%; height: 100%; object-fit: contain; display: block; }
.btn-zoom-img { position: absolute; right: 2px; bottom: 2px; background: #14213dcc; color: #fff; border: none; border-radius: 5px; font-size: .72rem; padding: .1rem .25rem; cursor: pointer; line-height: 1; }
.btn-zoom-img:hover { background: var(--cor-primaria); }
.texto-opcao-epi { display: flex; flex-direction: column; gap: .15rem; line-height: 1.25; }
.texto-opcao-epi strong { font-weight: 600; font-size: .95rem; }

/* Modal de zoom da imagem do EPI */
.modal-zoom-epi { position: fixed; inset: 0; background: #0b1324b8; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 1rem; }
.modal-zoom-epi[hidden] { display: none !important; }
.modal-zoom-conteudo { background: #fff; border-radius: 12px; padding: 1.1rem 1.25rem; max-width: 480px; width: 100%; box-shadow: 0 12px 36px #0005; }

/* Construtor / Personalizador do Formulário (/solicitar/personalizar) */
.editor-forms-container { max-width: 880px; }
.editor-bloco { border-left: 4px solid var(--cor-primaria); }
.editor-badge-topo { font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--cor-primaria); margin-bottom: .15rem; }
.rotulo-editor { display: flex; flex-direction: column; gap: .25rem; font-weight: 600; font-size: .88rem; color: #1e293b; width: 100%; }
.input-titulo-forms { font-size: 1.15rem; font-weight: 700; }
.subsecao-editor { background: #f8fafd; border: 1px solid #dce4f2; border-radius: 8px; padding: .8rem .95rem; display: flex; flex-direction: column; gap: .55rem; }
.grade-opcoes-editor { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: .45rem; }
.lista-opcoes-editor { display: flex; flex-direction: column; gap: .4rem; }
.grade-tamanhos-editor { display: flex; flex-wrap: wrap; gap: .45rem; }
.item-opcao-editavel { display: flex; align-items: center; gap: .35rem; background: #fff; border: 1px solid #d5deec; border-radius: 6px; padding: .25rem .4rem; }
.item-opcao-editavel.curto { width: 115px; }
.item-opcao-editavel input { border: none; padding: .25rem .35rem; font-size: .9rem; width: 100%; background: transparent; }
.item-opcao-editavel input:focus { outline: 1px solid var(--cor-primaria); border-radius: 4px; background: #fff; }
.icone-radio-falso { color: var(--suave); font-size: .9rem; user-select: none; }
.linha-adicionar-opcao { display: flex; gap: .45rem; align-items: center; flex-wrap: wrap; margin-top: .2rem; }
.linha-adicionar-opcao input { flex: 1; min-width: 200px; }
.perigo-suave { color: var(--vermelho); border-color: #f3c2c4; background: #fff5f5; padding: .15rem .45rem; }
.perigo-suave:hover { background: var(--vermelho); color: #fff; border-color: var(--vermelho); }

.lista-epis-editor { display: flex; flex-direction: column; gap: .55rem; }
.card-epi-editor { display: flex; align-items: center; gap: .85rem; padding: .65rem .8rem; background: #fbfcfe; border: 1px solid #dce4f2; border-radius: 8px; }
.card-epi-editor.inativo-forms { opacity: .62; background: #f3f5f8; }
.epi-editor-preview { flex: 0 0 auto; width: 68px; height: 68px; display: flex; align-items: center; justify-content: center; }
.miniatura-epi-form { width: 68px; height: 68px; object-fit: contain; border-radius: 8px; border: 1px solid #cbd5e1; background: #fff; padding: 2px; }
.sem-imagem-placeholder { width: 68px; height: 68px; border-radius: 8px; border: 1px dashed #b4c2d8; background: #f1f5f9; color: var(--suave); font-size: .74rem; font-weight: 600; display: flex; align-items: center; justify-content: center; text-align: center; padding: .2rem; }
.epi-editor-campos { flex: 1; display: flex; flex-direction: column; gap: .45rem; min-width: 0; }
.linha-nome-visivel { display: flex; align-items: center; gap: .65rem; flex-wrap: wrap; }
.input-nome-epi-editor { flex: 1; min-width: 180px; font-weight: 600; }
.linha-upload-epi { display: flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.input-url-img-curto { flex: 1; min-width: 170px; font-size: .84rem; padding: .3rem .5rem; }
.btn-arquivo-img { cursor: pointer; margin: 0; }
.remover-img-check { font-size: .82rem; color: var(--vermelho); margin: 0; }

/* Sinalização "Analisar" e "Finalizar com ressalva" na separação de pedidos */
.badge-analisar { background: #fff7ed; color: #c2410c; border: 1px solid #fdba74; font-weight: 700; }
.alerta-analise { background: #fffbeb; border-color: #f59e0b; border-left: 4px solid #d97706; color: #78350f; }
tr.linha-analisar { background: #fffdf5; }
.btn.aviso-btn { background: #fff7ed; color: #9a3412; border-color: #fb923c; font-weight: 700; }
.btn.aviso-btn:hover:not(:disabled) { background: #ffedd5; border-color: #ea580c; }
.painel-ressalva { margin-top: 1rem; padding: 1rem 1.15rem; background: #fffbeb; border: 1px solid #f59e0b; border-left: 4px solid #d97706; border-radius: 8px; }
.painel-ressalva[hidden] { display: none !important; }

/* ================================================================
   INTERFACE WEB MOBILE & TABLET (Responsividade Desktop + Mobile)
   ================================================================ */
@media (max-width: 768px) {
  body[data-csrf] { padding-bottom: 4.5rem; }
  main { padding: .85rem; }
  main.estreito { margin-top: 3vh; padding: .85rem; }
  h1 { font-size: 1.28rem; margin: .1rem 0 .75rem; }
  h2 { font-size: 1.05rem; }

  /* Topo com menu hambúrguer retrátil */
  .topo { flex-direction: column; align-items: stretch; gap: .6rem; padding: .65rem .9rem; position: sticky; top: 0; z-index: 40; box-shadow: 0 2px 10px #0002; }
  .topo-barra-mobile { width: 100%; }
  .btn-menu-mobile { display: inline-flex; align-items: center; gap: .3rem; background: #ffffff1f; color: #fff; border: 1px solid #ffffff38; border-radius: 7px; padding: .38rem .75rem; font: inherit; font-size: .9rem; font-weight: 600; cursor: pointer; }
  .topo .nav-principal, .topo .usuario { display: none; width: 100%; }
  .topo.menu-aberto .nav-principal { display: grid; grid-template-columns: repeat(2, 1fr); gap: .35rem; padding-top: .4rem; border-top: 1px solid #ffffff24; }
  .topo.menu-aberto .nav-principal a { padding: .55rem .7rem; background: #ffffff12; font-size: .92rem; }
  .topo.menu-aberto .nav-principal a.ativo { background: var(--cor-primaria); }
  .topo.menu-aberto .usuario { display: flex; flex-wrap: wrap; justify-content: space-between; padding-top: .5rem; border-top: 1px solid #ffffff24; gap: .6rem; }
  .topo .menu-itens { left: 0; right: auto; min-width: 240px; }

  /* Barra de navegação rápida inferior estilo App Mobile */
  .barra-inferior-mobile {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 3.9rem;
    background: #14213d;
    border-top: 1px solid #ffffff24;
    box-shadow: 0 -4px 14px #0003;
    z-index: 45;
  }
  .barra-inferior-mobile a {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .12rem;
    color: #b8c4dc;
    font-size: .72rem;
    font-weight: 600;
    text-decoration: none;
    padding: .25rem .1rem;
  }
  .barra-inferior-mobile a.ativo { color: #fff; background: #ffffff1c; border-top: 3px solid #5ea0ff; }
  .barra-inferior-mobile .icone-mob { font-size: 1.15rem; line-height: 1.1; position: relative; }
  .badge-mob {
    position: absolute;
    top: -5px; right: -12px;
    background: #e5484d; color: #fff;
    font-style: normal; font-size: .68rem; font-weight: 700;
    padding: 0 .35rem; border-radius: 999px; min-width: 1.15rem; text-align: center;
  }
  .badge-mob[hidden] { display: none; }

  /* Cards, grades e indicadores adaptados para tela vertical */
  .cartao { padding: .9rem 1rem; margin-bottom: .9rem; border-radius: 9px; }
  .grade-2, .grade-cards, .abas-calcados, .painel-grade-principal, .grade-perfis, .grade-permissoes { grid-template-columns: 1fr; gap: .85rem; }
  .indicadores { grid-template-columns: repeat(2, 1fr); gap: .65rem; }
  .indicador { padding: .7rem .85rem; }
  .indicador .valor { font-size: 1.45rem; }
  .dados-pedido { grid-template-columns: repeat(2, 1fr); gap: .75rem; }

  /* Cabeçalhos, abas roláveis no toque e botões táteis */
  .cabecalho { align-items: stretch; flex-direction: column; gap: .55rem; margin-bottom: .75rem; }
  .cabecalho .acoes { width: 100%; }
  .cabecalho .acoes > .btn, .cabecalho .acoes > details { flex: 1 1 auto; text-align: center; }
  .abas { overflow-x: auto; white-space: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; gap: .2rem; padding-bottom: 1px; }
  .abas::-webkit-scrollbar { display: none; }
  .abas a { flex: 0 0 auto; padding: .5rem .8rem; font-size: .9rem; }

  /* Formulários e filtros com fonte 16px (evita zoom automático no iOS/Android) e altura de toque */
  input, select, textarea, .btn { font-size: 16px; min-height: 2.65rem; }
  .btn.pequeno { font-size: .86rem; min-height: 2.15rem; padding: .35rem .65rem; }
  .linha { flex-direction: column; gap: .75rem; }
  .linha > label { min-width: 0; width: 100%; }
  .filtros { flex-direction: column; align-items: stretch; gap: .55rem; }
  .filtros input, .filtros select, .filtros .btn { width: 100%; }
  .linha-form { flex-direction: column; align-items: stretch; gap: .5rem; }
  .linha-form select, .linha-form input[type=number], .linha-form input:not([type]), .linha-form input[name=motivo], .linha-form .btn {
    width: 100% !important; max-width: none !important; min-width: 0 !important;
  }

  /* Tabelas e checklists no mobile */
  th, td { padding: .48rem .5rem; font-size: .9rem; }
  td[style*="min-width"] { min-width: 200px !important; }
  .checklist input[type=checkbox] { width: 1.55rem; height: 1.55rem; }
  .pedido-card footer .acoes, .pedido-card footer { display: flex; gap: .5rem; width: 100%; }
  .pedido-card footer form, .pedido-card footer > a.btn { flex: 1; text-align: center; }
  .pedido-card footer form .btn { width: 100%; }
  .btn.grande { width: 100%; text-align: center; padding: .8rem 1.2rem; }

  /* Formulário público (/solicitar) otimizado para celular */
  .topo-publico, .barra-compartilhar { flex-direction: column; align-items: stretch; text-align: center; }
  .topo-publico .btn, .barra-compartilhar .btn { width: 100%; text-align: center; }
  .cabecalho-forms h1 { font-size: 1.35rem; }
  .opcao-item { padding: .6rem .75rem; font-size: .95rem; }
  .opcao-item input[type=checkbox], .opcao-item input[type=radio], .matriz-tamanhos input[type=radio] { width: 1.3rem; height: 1.3rem; }
  .matriz-tamanhos th, .matriz-tamanhos td { padding: .45rem .28rem; font-size: .85rem; }

  /* Dock de novos pedidos posicionado acima da barra mobile inferior */
  #dock-pedidos { right: .6rem; left: .6rem; bottom: 4.3rem; width: auto; max-width: none; max-height: 62vh; }
  .assinaturas { flex-direction: column; gap: 2rem; }
}

@media (max-width: 480px) {
  .indicadores, .dados-pedido, .grade-opcoes-radio { grid-template-columns: 1fr; }
  .indicadores { grid-template-columns: repeat(2, 1fr); }
  .tag-recomendado { display: inline-block; margin-top: .2rem; }
}
