/* -------------------------------------------------------------------- */
/* Estilos de impressão — só entram em vigor dentro de @media print      */
/* -------------------------------------------------------------------- */
@media print {
  @page {
    size: A4;
    margin: 9mm;
  }

  body * {
    visibility: hidden;
  }

  #print-area, #print-area * {
    visibility: visible;
  }

  #print-area {
    display: block !important;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
  }

  html, body {
    background: #fff;
  }

  .print-sheet {
    font-family: 'Georgia', 'Times New Roman', serif;
    color: #000;
    background: #fff;
  }

  .print-head {
    text-align: center;
    border-bottom: 2px solid #000;
    padding-bottom: 5px;
    margin-bottom: 8px;
  }

  .print-head h1 {
    margin: 0;
    font-size: 20px;
    letter-spacing: 0.5px;
  }

  .print-head p {
    margin: 2px 0 0;
    font-size: 13px;
  }

  .print-info-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    margin-bottom: 8px;
  }

  .print-info-table td {
    padding: 2px 5px;
    border: 1px solid #999;
  }

  .print-section-title {
    font-size: 14px;
    margin: 8px 0 4px;
    border-bottom: 1px solid #000;
    padding-bottom: 2px;
  }

  .print-items-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
  }

  .print-items-table th, .print-items-table td {
    border: 1px solid #999;
    padding: 3px 6px;
    text-align: left;
  }

  .print-items-table .p-qty { width: 70px; font-weight: bold; }
  .print-items-table .p-check { width: 55px; text-align: center; font-size: 14px; }

  .print-notes-box {
    border: 1px solid #999;
    min-height: 36px;
    padding: 5px;
    font-size: 13px;
    margin-bottom: 4px;
  }

  /* Relatório por período */
  .report-summary-row {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
  }

  .report-summary-cell {
    flex: 1;
    border: 1px solid #999;
    padding: 5px;
    text-align: center;
  }

  .report-summary-cell .rs-value {
    display: block;
    font-size: 17px;
    font-weight: bold;
  }

  .report-summary-cell .rs-label {
    display: block;
    font-size: 11px;
    margin-top: 1px;
  }

  .report-orders-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
  }

  .report-orders-table th, .report-orders-table td {
    border: 1px solid #999;
    padding: 3px 6px;
    text-align: left;
  }

  .report-orders-table .ro-id { width: 60px; font-weight: bold; }
  .report-orders-table .ro-datetime { width: 150px; }
  .report-orders-table .ro-status { width: 130px; }
}

/* Fora do modo impressão, garante que a folha de impressão nunca apareça */
@media screen {
  #print-area { display: none; }
}
