/* EMF Gestão. Cores, fontes e raios do Design System da EMF Planners (cofre: 01 - EMF Planners/Design System/DESIGN.md). */
@font-face { font-family: "Lato"; src: url("/fontes/lato-400.woff") format("woff"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Lato"; src: url("/fontes/lato-700.woff") format("woff"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("/fontes/fraunces-titulo.woff") format("woff"); font-weight: 400 600; font-display: swap; }

:root {
  --creme: #f4eee9; --nude: #e9ddd2; --areia: #d9c0aa; --linha: #dccfc4; --cafe: #2b2420; --suave: #62544b; --taupe: #74584a;
  --dourado: #74572a; --ouro: #b08a4c; --ouro-claro: #e2c893; --oliva: #4b5a33; --oliva-claro: #e4e8d6; --rosa: #ecc3bb; --rosa-texto: #7d3b3f; --erro: #9b2c2c;
  --papel: #fbf8f5; --erro-fundo: #f6e3e1; --atencao-fundo: #f5ead3;
  --raio: 16px; --raio-p: 12px; --sombra: 0 1px 2px rgb(43 36 32 / .05), 0 8px 24px rgb(43 36 32 / .05);
  --titulo: "Fraunces", Georgia, "Times New Roman", serif; --texto: "Lato", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--creme); color: var(--cafe); font: 400 16px/1.5 var(--texto); -webkit-font-smoothing: antialiased; }
h1, h2 { font-family: var(--titulo); font-weight: 500; margin: 0; letter-spacing: -.01em; }
h1 { font-size: 30px; line-height: 1.15; }
h2 { font-size: 20px; margin: 28px 0 12px; }
b, strong { font-weight: 700; }
small { font-size: 12px; color: var(--suave); }
.sobre { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--dourado); font-weight: 700; }
.fraco { color: var(--suave); font-size: 14px; }
.erro { color: var(--erro); margin: 0 0 8px; min-height: 1em; font-weight: 700; }
.ok { color: var(--oliva); font-weight: 700; background: var(--oliva-claro); border-radius: var(--raio-p); padding: 12px 14px; }
.vazio { text-align: center; color: var(--suave); padding: 48px 0; }

/* formulários e botões */
label { display: grid; gap: 6px; font-size: 13px; font-weight: 700; color: var(--suave); margin-bottom: 14px; }
input, select { font: inherit; padding: 13px 14px; border: 1px solid var(--linha); border-radius: var(--raio-p); background: #fff; color: var(--cafe); width: 100%; }
input:focus-visible, select:focus-visible, button:focus-visible { outline: 2px solid var(--ouro); outline-offset: 2px; }
button { font: inherit; font-weight: 700; padding: 10px 16px; border-radius: 999px; border: 1px solid var(--cafe); background: transparent; color: var(--cafe); cursor: pointer; min-height: 44px; }
button.principal { background: var(--cafe); color: var(--creme); width: 100%; min-height: 50px; }
button.texto { border: 0; font-weight: 400; color: var(--suave); text-decoration: underline; text-underline-offset: 3px; min-height: 40px; padding: 6px 4px; }
button.texto.forte { font-weight: 700; color: var(--cafe); margin-right: 6px; }
button:disabled { opacity: .5; }

/* entrada */
main.centro { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.entrada { width: min(100%, 380px); background: var(--papel); border: 1px solid var(--linha); border-radius: 24px; padding: 28px 24px; box-shadow: var(--sombra); }
.entrada .logo { display: block; margin: 0 auto 12px; height: auto; }
.entrada .sobre, .entrada h1 { text-align: center; }
.entrada h1 { margin: 4px 0 22px; }
.entrada button.texto { width: 100%; margin-top: 6px; }

/* casca: abas embaixo no celular, na lateral em tela larga */
.conteudo main { padding: 16px 16px 104px; max-width: 880px; margin: 0 auto; }
.topo { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; padding: 18px 16px 12px; max-width: 880px; margin: 0 auto; }
.faixa { background: var(--nude); color: var(--suave); text-align: center; font-size: 13px; padding: 7px 12px; }
.faixa.velho { background: var(--erro); color: #fff; font-weight: 700; }
.abas { position: fixed; z-index: 5; left: 0; right: 0; bottom: 0; display: flex; background: var(--papel); border-top: 1px solid var(--linha); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); gap: 2px; }
.abas button { flex: 1; border: 0; border-radius: var(--raio-p); padding: 10px 2px; font-size: 13px; color: var(--suave); position: relative; min-width: 0; }
.abas button.ativo { background: var(--cafe); color: var(--creme); }
.abas em { position: absolute; top: 3px; right: 8%; min-width: 18px; height: 18px; border-radius: 9px; background: var(--erro); color: #fff; font: 700 11px/18px var(--texto); padding: 0 5px; }
.logo-lateral { display: none; }
@media (min-width: 900px) {
  .casca { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
  .abas { position: sticky; top: 0; height: 100vh; flex-direction: column; justify-content: flex-start; border-top: 0; border-right: 1px solid var(--linha); padding: 24px 14px; gap: 4px; }
  .abas button { flex: 0 0 auto; text-align: left; padding: 12px 14px; font-size: 15px; }
  .abas em { position: static; float: right; }
  .logo-lateral { display: block; width: 84px; height: auto; margin: 0 auto 20px; }
  .conteudo main { padding-bottom: 48px; }
}

/* cartões */
.cartao { background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); padding: 16px; margin: 0 0 14px; box-shadow: var(--sombra); }
.cartao.alerta, .pedido.atrasado { border-color: var(--erro); }
.pedido.vence_hoje { border-color: var(--ouro); }
.pedido header { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.rotulo { font: 500 22px/1.2 var(--titulo); margin-right: 8px; }
.selo { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .03em; padding: 3px 10px; border-radius: 999px; background: var(--nude); color: var(--suave); margin: 0 6px 4px 0; vertical-align: middle; }
.selo.atrasado { background: var(--erro); color: #fff; }
.selo.vence_hoje { background: var(--ouro-claro); color: var(--dourado); }
.selo.no_prazo { background: var(--oliva-claro); color: var(--oliva); }
.selo.agendado, .selo.cinza, .selo.sem_data { background: #e6e1dc; color: var(--suave); }
.prazo { font-weight: 700; margin: 8px 0 10px; font-size: 14px; color: var(--suave); }
.prazo.atrasado { color: var(--erro); } .prazo.vence_hoje { color: var(--dourado); } .prazo.no_prazo { color: var(--oliva); }
.fatos { display: grid; grid-template-columns: auto 1fr; gap: 4px 14px; margin: 0; font-size: 14px; }
.fatos dt { color: var(--suave); } .fatos dd { margin: 0; }
.conferir { color: var(--erro); background: var(--erro-fundo); border-radius: 10px; padding: 9px 12px 9px 28px; margin: 10px 0 0; font-weight: 700; font-size: 14px; }
div.conferir { padding-left: 12px; }
.itens { display: grid; gap: 12px; margin: 14px 0; border-top: 1px solid var(--linha); padding-top: 14px; }
.item { display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: start; font-size: 15px; }
.foto { width: 92px; height: 92px; object-fit: cover; border-radius: var(--raio-p); background: var(--nude); }
.foto.grande { width: 100%; height: auto; aspect-ratio: 1; }
.semfoto { display: grid; place-items: center; font-size: 12px; color: var(--erro); font-weight: 700; }
.modelo { font-weight: 700; font-size: 16px; }
.nome { color: var(--rosa-texto); background: #f8e7e3; border-radius: 8px; padding: 3px 8px; display: inline-block; margin-top: 3px; }
.codigo-item { font-family: ui-monospace, monospace; font-size: 12px; }
.etapas { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 4px; }
.etapa { border-color: var(--linha); border-radius: var(--raio-p); padding: 8px 4px; font-size: 13px; display: grid; justify-items: center; gap: 2px; background: #fff; min-height: 64px; }
.marca-etapa { width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--areia); display: grid; place-items: center; font-size: 13px; line-height: 1; }
.etapa.feita { background: var(--oliva-claro); border-color: var(--oliva); color: var(--oliva); }
.etapa.feita .marca-etapa { background: var(--oliva); border-color: var(--oliva); color: #fff; }
.etapa small { color: inherit; }

/* hoje */
.numeros { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
@media (min-width: 620px) { .numeros { grid-template-columns: repeat(4, 1fr); } }
.numero { background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); padding: 14px 12px; text-align: left; display: grid; gap: 2px; min-height: 92px; box-shadow: var(--sombra); font-weight: 400; }
.numero b { font: 500 32px/1.1 var(--titulo); }
.numeros.dois .numero b { font-size: 24px; }
.numero span { font-size: 13px; color: var(--suave); }
.numero.ruim { border-color: var(--erro); } .numero.ruim b { color: var(--erro); }
.numero.atencao { border-color: var(--ouro); } .numero.atencao b { color: var(--dourado); }
.numero.bom b { color: var(--oliva); }
.lista { display: grid; gap: 8px; margin-bottom: 14px; }
.linha-critica, .linha-menu { display: grid; gap: 2px; text-align: left; width: 100%; background: var(--papel); border: 1px solid var(--linha); border-left: 4px solid var(--areia); border-radius: var(--raio-p); padding: 12px 14px; font-weight: 400; min-height: 0; color: var(--cafe); }
.linha-critica.atraso, .linha-critica.atrasado, .linha-critica.aviso, .linha-critica.dados, .linha-critica.manual { border-left-color: var(--erro); }
.linha-critica.vence, .linha-critica.vence_hoje, .linha-critica.conferir, .linha-critica.observacao { border-left-color: var(--ouro); color: var(--cafe); background: var(--papel); font-size: 16px; margin: 0; }
.linha-critica.no_prazo { border-left-color: var(--oliva); }
.linha-critica strong, .linha-menu strong { font: 500 17px/1.2 var(--titulo); }
.linha-menu span { color: var(--suave); font-size: 14px; }
.problema { display: grid; gap: 8px; } .problema.resolvido { opacity: .65; }

/* pedidos */
.segmento { display: flex; background: var(--nude); border-radius: 999px; padding: 4px; gap: 4px; margin-bottom: 12px; overflow-x: auto; }
.segmento button { flex: 1; border: 0; min-height: 38px; padding: 6px 12px; font-size: 14px; color: var(--suave); white-space: nowrap; }
.segmento button.ativo { background: var(--papel); color: var(--cafe); box-shadow: var(--sombra); }
.filtros { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; }
.chip { white-space: nowrap; border-color: var(--linha); font-weight: 400; background: var(--papel); min-height: 38px; padding: 6px 14px; font-size: 14px; }
.chip.ativo { background: var(--cafe); color: var(--creme); border-color: var(--cafe); }
.grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.bloco { margin: 0; text-align: center; padding: 12px; }
.qtd { font: 500 34px/1.1 var(--titulo); margin: 10px 0 2px; }

/* admin */
table { width: 100%; border-collapse: collapse; background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio-p); overflow: hidden; font-size: 15px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--linha); }
th { font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--suave); background: var(--nude); }
td:not(:first-child), th:not(:first-child) { text-align: right; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
.barras { display: flex; align-items: flex-end; gap: 4px; height: 150px; background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio-p); padding: 12px 10px 6px; }
.barra { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; }
.barra i { display: block; width: 100%; max-width: 26px; background: var(--ouro); border-radius: 4px 4px 0 0; min-height: 2px; }
.barra small { font-size: 10px; }
.a0 { height: 0 } .a1 { height: 5% } .a2 { height: 10% } .a3 { height: 15% } .a4 { height: 20% } .a5 { height: 25% } .a6 { height: 30% } .a7 { height: 35% } .a8 { height: 40% } .a9 { height: 45% } .a10 { height: 50% }
.a11 { height: 55% } .a12 { height: 60% } .a13 { height: 65% } .a14 { height: 70% } .a15 { height: 75% } .a16 { height: 80% } .a17 { height: 85% } .a18 { height: 90% } .a19 { height: 95% } .a20 { height: 100% }
.linha-prazo { display: grid; grid-template-columns: 1fr 84px auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--linha); }
.linha-prazo:last-child { border-bottom: 0; }
.linha-prazo span { display: grid; }
.usuario.inativo { opacity: .6; }
.acoes { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.acoes button { font-size: 13px; min-height: 38px; padding: 6px 12px; }
.codigo { border-color: var(--ouro); text-align: center; }
.codigo .qtd { letter-spacing: .12em; user-select: all; }
ul { margin: 0; padding-left: 20px; } li { margin: 4px 0; }
.pendente { color: var(--suave); }
@media print { .abas, .topo button, .filtros, .segmento, .etapas { display: none; } .conteudo main { padding-bottom: 0; } }
/* BI */
.rolagem { overflow-x: auto; border-radius: var(--raio-p); margin-bottom: 4px; }
.numero em { font-style: normal; font-size: 12px; font-weight: 700; }
.numero em.sobe { color: var(--oliva); } .numero em.desce { color: var(--erro); }
.bloco-p { display: block; font-family: ui-monospace, monospace; font-size: 11px; }
td:first-child { white-space: normal; min-width: 120px; }
p.conferir { padding-left: 12px; }
