#datatable_filter {
  float: left;
}

.dt-buttons {
  float: right !important;
}

div.dataTables_filter label {
  float: none;
}

.DTTT.btn-group {
  float: right;
  margin-bottom: 10px;
}

a.DTTT_button_csv,
a.DTTT_button_xls,
a.DTTT_button_copy,
a.DTTT_button_pdf,
a.DTTT_button_print {
  position: relative;
  margin-left: 5px;
}

.pagination ul {
  border: none;
}

.dataTables_processing {
  color: #333;
  background-color: #ffff88;
}

.controlled-width input,
.controlled-width select {
  width: 99%;
}

div.DTE_Field_Input label {
  float: none;
  margin-left: 5px;
}

/* Improved table responsiveness */
.dataTables_wrapper {
  width: 100%;
  overflow-x: auto;
}

.dataTables_scroll {
  width: 100%;
}

.dataTables_scrollHead,
.dataTables_scrollBody {
  width: 100%;
}

/* Better column width management */
table.dataTable {
  width: 100% !important;
  margin: 0 !important;
}

/* Ensure buttons don't wrap awkwardly */
.dt-buttons {
  white-space: nowrap;
}

/* Improve mobile experience */
@media (max-width: 768px) {
  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter {
    float: none;
    text-align: left;
    margin-bottom: 10px;
  }

  .dt-buttons {
    float: none !important;
    text-align: center;
    margin-bottom: 10px;
  }

  .dataTables_info,
  .dataTables_paginate {
    float: none;
    text-align: center;
    margin-top: 10px;
  }
}
