/* Agent layout — normalize nested content wrappers to prevent horizontal scroll */

.content-wrapper {
  overflow-x: hidden !important;
  overflow-y: auto;
}

.content-wrapper > .content {
  box-sizing: border-box;
  max-width: 100%;
  padding: 16px;
}

.content-wrapper .row_container {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  float: none;
  margin: 0;
  padding: 0;
}

.content-wrapper .bodyContent {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  float: none;
  margin: 0;
  padding: 0;
}

/* Modern agent pages: one inner card only — no extra outer padding */
.bodyContent.agent-markup-page,
.bodyContent.agent-ledger-page,
.bodyContent.agent-txn-logs-page,
.bodyContent.agent-pnr-search-page,
.bodyContent.agent-balance-page,
.bodyContent.agent-credit-page,
.bodyContent.agent-bank-page,
.bodyContent.agent-balance-alert-page,
.bodyContent.agent-profile-page,
.bodyContent.agent-logo-page,
.bodyContent.agent-notification-page {
  padding: 0;
  overflow: visible;
}

/* Legacy nested wrappers — stop float + width blowout */
.bodyContent .table_outer_wrper,
.bodyContent .panel_bdy,
.bodyContent .panel_custom_heading,
.bodyContent .panel.panel-default {
  float: none;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* Horizontal scroll for all wide agent tables */
.content-wrapper .table-responsive,
.content-wrapper #tableList,
.content-wrapper .table-responsive.col-md-12,
.content-wrapper .agent-balance-table-wrap,
.content-wrapper .dataTables_wrapper,
.bodyContent .table-responsive,
.bodyContent #tableList,
.bodyContent .table-responsive.col-md-12,
.bodyContent .agent-balance-table-wrap,
.bodyContent .dataTables_wrapper,
.bodyContent .panel_bdy .table-responsive {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto !important;
  overflow-y: hidden !important;
  -webkit-overflow-scrolling: touch;
}

.content-wrapper .table-responsive > .table:not(.agent-txn-logs-table),
.content-wrapper #tableList > .table,
.content-wrapper #tableList .table,
.bodyContent #tableList > .table,
.bodyContent #tableList .table,
.bodyContent .panel_bdy .table-responsive > .table:not(.agent-txn-logs-table),
.bodyContent .panel_bdy .table.table-condensed:not(.agent-txn-logs-table) {
  width: max-content;
  min-width: 100%;
}

.content-wrapper #tableList .sup-report-toolbar,
.bodyContent #tableList .sup-report-toolbar {
  width: 100%;
  min-width: 100%;
  box-sizing: border-box;
}

.content-wrapper .table-responsive .table td:last-child,
.content-wrapper #tableList .table td:last-child,
.bodyContent #tableList .table td:last-child,
.bodyContent .panel_bdy .table td:last-child {
  position: relative;
  overflow: visible;
}

.content-wrapper .table-responsive::-webkit-scrollbar,
.content-wrapper #tableList::-webkit-scrollbar,
.bodyContent .table-responsive::-webkit-scrollbar,
.bodyContent #tableList::-webkit-scrollbar {
  height: 8px;
  width: 0;
}

.content-wrapper .table-responsive::-webkit-scrollbar-thumb,
.content-wrapper #tableList::-webkit-scrollbar-thumb,
.bodyContent .table-responsive::-webkit-scrollbar-thumb,
.bodyContent #tableList::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.content-wrapper .table-responsive::-webkit-scrollbar-track,
.content-wrapper #tableList::-webkit-scrollbar-track,
.bodyContent .table-responsive::-webkit-scrollbar-track,
.bodyContent #tableList::-webkit-scrollbar-track {
  background: #f1f5f9;
}
