/* Impressão: ficha técnica limpa em A4 */
@page {
  size: A4;
  margin: 14mm 14mm 16mm;
}

@media print {
  html, body {
    height: auto;
    overflow: visible;
    background: #fff !important;
    font-size: 11pt;
    color: #000;
  }

  .fundo, .sidebar, .topo-mobile, .toasts, .modais, .nao-imprimir, .pag-acoes, .voltar-link, .btn, .btn-icone {
    display: none !important;
  }

  .app {
    display: block;
    width: auto;
    height: auto;
    margin: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    background: #fff;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    overflow: visible;
  }

  .conteudo { overflow: visible; padding: 0; }

  .ficha-cab-impressao {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 2px solid #4a2c1d;
    padding-bottom: 8px;
    margin-bottom: 14px;
    font-size: 10pt;
    color: #555;
  }

  .ficha-cab-impressao .estab { display: flex; align-items: center; gap: 10px; }
  .ficha-cab-impressao img { height: 40px; width: auto; }
  .ficha-cab-impressao strong { font-family: 'Fraunces', Georgia, serif; font-size: 14pt; color: #4a2c1d; }

  .pag-cab { margin-bottom: 10px; }
  .pag-cab h1 { font-size: 20pt; }

  .card, .kpi, .tabela-wrap {
    box-shadow: none !important;
    border: 1px solid #ccc;
    break-inside: avoid;
    background: #fff;
  }

  .card { padding: 10px 12px; }
  .card + .card { margin-top: 10px; }
  .tabela-wrap { max-height: none; overflow: visible; }
  th { position: static; background: #f1ebe2 !important; color: #333; }
  td, th { padding: 5px 8px; }
  tbody tr:hover td { background: none; }

  .grade-2 { grid-template-columns: 1fr 1fr; }
  .indicadores { grid-template-columns: repeat(4, 1fr); }
  .ind { background: #f6f1ea !important; }

  .barra-linha { grid-template-columns: 40% 1fr 60px; }
  .barra-linha::after { display: none !important; }

  th.esconde-mobile, td.esconde-mobile { display: table-cell !important; }

  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* Módulo Encomendas: produção do dia e telas com abas */
@media print {
  .abas, .destaques, .filtros { display: none !important; }
  .check-enc, .pers-prod { break-inside: avoid; }
  .checklist { grid-template-columns: 1fr 1fr; }
  .check-prod input, .check-item input { -webkit-appearance: none; appearance: none; width: 14px; height: 14px; border: 1.5px solid #333; border-radius: 3px; }
  .check-item input:checked, .check-prod input:checked { background: #5f7034; }
  .pers-prod-foto { width: 120px; height: 120px; }
  .kpis { grid-template-columns: repeat(4, 1fr) !important; }
}
