/* AR Construções 2.6 — Celular sem rolagem para o lado */
@media screen and (max-width: 700px) {
  html, body { max-width: 100%; overflow-x: hidden; overflow-x: clip; }
  main, section, .card, details, .fin-grid, .fin-grid > *, .g > *, .kpis > * { min-width: 0; max-width: 100%; }
  .fin-grid { grid-template-columns: minmax(0, 1fr) !important; }
  img, svg, canvas, video, iframe:not(#nl-badge-frame) { max-width: 100%; }
  .bar, .fin-per, .per-in, .person-top, .ob-pagehead, .mp-head, .agd-btns, .agd-acts, .seg { flex-wrap: wrap; }
  .fin-per > div { flex: 1 1 0; min-width: 0; }
  .per-in input[type=date] { min-width: 0; flex: 1 1 130px; }
  .person-top > .person-name { flex: 1 1 0; min-width: 0; }
  .person-top input { min-width: 0; max-width: 100%; }
  p, small, span, b, td, th, label, h3, h4 { overflow-wrap: anywhere; }
  input, select, textarea { max-width: 100%; }

  /* Tabelas viram cartões */
  table.m-stack { display: block; width: 100%; overflow: visible; white-space: normal; background: transparent; }
  table.m-stack thead { display: none; }
  table.m-stack tbody, table.m-stack tfoot { display: block; width: 100%; }
  table.m-stack tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--border, #e2e8f0); }
  table.m-stack tr:last-child { border-bottom: 0; }
  table.m-stack td, table.m-stack th { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; width: 100%; padding: 3px 0; border: 0; text-align: right; white-space: normal; }
  table.m-stack td[data-label]::before { content: attr(data-label); color: var(--muted, #64748b); font-size: 12px; font-weight: 600; text-align: left; margin-right: auto; }
  table.m-stack td:not([data-label]) { justify-content: flex-start; text-align: left; }
  table.m-stack td:not([data-label]):first-child { font-weight: 600; }
  table.m-stack td.r:not([data-label]) { justify-content: flex-end; }
  table.m-stack td.m-empty { display: none; }
  table.m-stack td input, table.m-stack td select { flex: 1 1 140px; min-width: 0; }
  table.m-stack td .btn-s, table.m-stack td .btn-x { flex: 0 0 auto; }
}
