/* N.A. Entregas: apresentação responsiva, sem mudanças de dados ou cálculos. */
@media screen {
  body main .table-wrap { min-width: 0; max-width: 100%; overflow-x: auto; }
  body main table { table-layout: auto; }
  body main table th, body main table td {
    word-break: normal; overflow-wrap: normal; hyphens: none;
  }
  .na-cell-value { min-width: 0; }
  body main input[type="date"], body main input[type="time"],
  body main input[type="datetime-local"] {
    width: 100%; min-width: 0; max-width: 100%; box-sizing: border-box;
    -webkit-appearance: none; appearance: none;
  }
  body main input::-webkit-date-and-time-value {
    min-width: 0; max-width: 100%; text-align: left;
  }
}
@media screen and (max-width: 760px) {
  body { overflow-wrap: normal; word-break: normal; }
  body main, body main .panel, body main section, body main form,
  body main fieldset, body main .heading > *, body main .grid > *,
  body main .na-pay-grid > *, body main .na-details-grid > * {
    min-width: 0; max-width: 100%; box-sizing: border-box;
  }
  body main p, body main h1, body main h2, body main h3,
  body main summary, body main .na-details-grid, body main .na-order-details {
    overflow-wrap: break-word; word-break: normal;
  }
  body main input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
  body main select, body main textarea {
    width: 100%; min-width: 0; max-width: 100%; font-size: 16px;
    box-sizing: border-box;
  }
  body main .na-query > label, body main .route-controls > label,
  body main .na-tracking-tools > label { min-width: 0; flex: 1 1 100%; }
  body main .na-query details { max-width: 100%; min-width: 0; }
  body main .na-report-actions, body main .na-pay-actions {
    display: flex; flex-wrap: wrap; min-width: 0; max-width: 100%;
  }
  body main .na-report-actions > *, body main .na-pay-actions > * {
    min-width: 0; flex: 1 1 150px;
  }
  /* Tabelas complexas e navegação sem JavaScript mantêm rolagem interna. */
  body main .table-wrap > table:not(.na-mobile-records) {
    width: max-content; min-width: 100%; max-width: none;
  }
  body main .table-wrap > table:not(.na-mobile-records) th,
  body main .table-wrap > table:not(.na-mobile-records) td {
    min-width: 96px; max-width: 320px; white-space: normal;
  }
  body main .table-wrap > table:not(.na-mobile-records) th:first-child,
  body main .table-wrap > table:not(.na-mobile-records) td:first-child {
    min-width: 160px;
  }
  body main .table-wrap > table.na-mobile-records {
    display: block; width: 100%; min-width: 0; margin: 0;
    border-collapse: separate;
  }
  body main table.na-mobile-records > thead {
    position: absolute; width: 1px; height: 1px; padding: 0;
    margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap;
  }
  body main table.na-mobile-records > tbody,
  body main table.na-mobile-records > tfoot { display: block; width: 100%; }
  body main table.na-mobile-records > tbody > tr,
  body main table.na-mobile-records > tfoot > tr {
    display: block; width: 100%; padding: 12px;
    border-bottom: 1px solid #dbe4ea; background: #fff;
  }
  body main table.na-mobile-records > tbody > tr:nth-child(even) { background: #f7f9fb; }
  body main table.na-mobile-records > tfoot > tr { background: #edf4f8; }
  body main table.na-mobile-records > tbody > tr > td,
  body main table.na-mobile-records > tfoot > tr > td,
  body main table.na-mobile-records > tfoot > tr > th {
    display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr);
    gap: 12px; align-items: start; width: 100%;
    min-width: 0 !important; max-width: none; padding: 8px 0;
    border: 0; white-space: normal !important; text-align: left;
    font-size: 14px; line-height: 1.5; background: transparent;
  }
  body main table.na-mobile-records [data-na-label]::before {
    content: attr(data-na-label); color: #526b7b; font-size: 13px;
    font-weight: 600; overflow-wrap: normal; word-break: normal;
  }
  body main table.na-mobile-records .na-cell-value {
    min-width: 0; max-width: 100%; overflow-wrap: break-word;
    word-break: normal; font-variant-numeric: tabular-nums;
  }
  body main table.na-mobile-records > tbody > tr > td:first-child,
  body main table.na-mobile-records > tfoot > tr > :first-child,
  body main table.na-mobile-records .na-cell-full {
    display: block; width: 100%; padding: 8px 0;
  }
  body main table.na-mobile-records > tbody > tr > td:first-child::before {
    display: block; font-size: 12px; margin-bottom: 4px;
  }
  body main table.na-mobile-records > tbody > tr > td:first-child .na-cell-value {
    font-weight: 700; font-size: 16px;
  }
  body main table.na-mobile-records > tfoot > tr > :first-child::before,
  body main table.na-mobile-records .na-cell-message::before { display: none !important; }
  body main table.na-mobile-records .na-cell-message .na-cell-value {
    font-weight: 400 !important; font-size: 14px !important;
  }
  body main table.na-mobile-records .na-cell-full::before {
    display: block; margin-bottom: 6px;
  }
  body main table.na-mobile-records .na-pay-row-actions,
  body main table.na-mobile-records .na-km-readings {
    min-width: 0; max-width: 100%;
  }
  body main table.na-mobile-records .na-pay-row-actions .button,
  body main table.na-mobile-records .na-pay-row-actions button { width: 100%; }
}
@media screen and (max-width: 640px) {
  body main .na-pay-grid, body main .grid { grid-template-columns: minmax(0, 1fr); }
  body main .na-pay-grid > *, body main .grid > * { grid-column: auto; }
  body main .na-km-inputs fieldset { min-width: 0; max-width: 100%; }
}
