/* Rolagem na grade, sem comprimir os nomes ou alargar a página. */
@media(max-width:767px) {
  .app-content { min-width:0; }
  .app-content .row > [class*="col-"] { min-width:0; }
  .app-content :is(.form-control,.form-select) { min-width:0; max-width:100%; font-size:1rem; }
  .table-responsive, .manager-overview-table-wrap, .mn-related-table-wrap { width:100%; max-width:100%; overflow-x:auto; -webkit-overflow-scrolling:touch; }
  .table-responsive > table { min-width:600px; }
  .table-responsive th, .table-responsive td { word-break:normal; overflow-wrap:normal; }
  .table-responsive th { white-space:nowrap; }
  .table-responsive td { vertical-align:middle; }
  .table-responsive, .mn-unified-manager #changelist .results { scrollbar-width:thin; scrollbar-color:#8fae9d #edf3ee; }
  .table-responsive::before, .mn-unified-manager #changelist .results::before {
    content:'↔ Deslize a tabela para ver todas as colunas';
    display:block; position:sticky; left:0; width:100%; padding:9px 12px;
    color:#4d6d5c; background:#edf4ee; font-size:.75rem; font-weight:600;
  }

  /* A grade editável precisa exibir cada campo inteiro, sem rolagem lateral. */
  [data-imported-installments] { min-width:0; padding:1rem; box-sizing:border-box; }
  [data-imported-installments] .table-responsive { overflow:visible; }
  [data-imported-installments] .table-responsive::before { display:none; }
  [data-imported-installments] .imported-installments-table {
    display:block; width:100%; min-width:0; border:0;
  }
  [data-imported-installments] .imported-installments-table thead { display:none; }
  [data-imported-installments] .imported-installments-table tbody {
    display:grid; gap:.85rem; width:100%;
  }
  [data-imported-installments] .imported-installments-table tr[data-imported-installment-row] {
    display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:.65rem;
    width:100%; padding:.9rem; border:1px solid #d8e0da;
    border-radius:.85rem; background:#fff; box-sizing:border-box;
  }
  [data-imported-installments] .imported-installments-table tr[data-imported-installment-row] > td {
    display:flex; flex-direction:column; justify-content:flex-end; gap:.3rem;
    width:100%; min-width:0; padding:0; border:0; white-space:normal;
  }
  [data-imported-installments] .imported-installments-table tr[data-imported-installment-row] > td::before {
    content:attr(data-label); color:#4d6d5c; font-size:.73rem;
    font-weight:700; line-height:1.2;
  }
  [data-imported-installments] .imported-installments-table td:is(
    [data-field="vencimento"], [data-field="emissao"], [data-field="situacao"],
    [data-field="pagamento"], [data-field="forma"], [data-field="acao"]
  ) { grid-column:1 / -1; }
  [data-imported-installments] .imported-installments-table td[data-field="acao"]::before { display:none; }
  [data-imported-installments] .imported-installments-table :is(input,select) {
    width:100%; min-width:0; max-width:100%; box-sizing:border-box; font-size:1rem;
  }
  [data-imported-installments] .imported-installments-table input[type="date"] { min-height:44px; }
  [data-imported-installments] .imported-installments-table tr[data-imported-installment-errors] {
    display:block; padding:.65rem; border-radius:.6rem;
  }
  [data-imported-installments] .imported-installments-table tr[data-imported-installment-errors] > td {
    display:block; padding:0; border:0; overflow-wrap:anywhere;
  }
}
