/* ============================================================================
   GEPL-ERP list tables - the component
   ----------------------------------------------------------------------------
   Everything js/erp-datatable.js draws around a list: the toolbar, the filter
   panel, the chips, the bulk bar, the rows, the states and the footer. Loaded
   after erp-theme.css, and written in its tokens only - there is not one
   colour, size or radius in this file that section 1 of erp-theme.css does not
   name, which is what makes the light theme work without a second copy.

   Scoped under .dtx (the frame) so nothing here reaches a table that is not a
   framed list - a form's line-item grid, a report printed on paper, a table
   inside a modal body that was never a DataTable.

   Design notes, in the order they matter:

   - Hierarchy by weight and ink before colour. The column that names the row
     is set heavier; codes are mono; numbers are mono, tabular and right-hand;
     a date's time is a step quieter than its day; "nothing here" is a dash in
     the faintest ink. Colour is left for state: badges, the selected row, the
     danger action.
   - Rows are divided by one hairline, not boxed. No zebra, no vertical rules:
     the hover and the divider do that job with less noise (UI-DESIGN-SYSTEM.md
     section 8), and eleven vertical rules across a list is a spreadsheet.
   - One control height across the toolbar (--ctl-h), one inside rows
     (--ctl-h-sm). Nothing floats; the only shadows are on things that sit
     above other things - the menu, the popovers, a pinned column while the
     rows slide under it.
   ========================================================================== */

/* ---- the frame ---------------------------------------------------------- */

.dtx {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  width: 100%;
  min-width: 0;
  flex: 1 1 100%;
  color: var(--ink);
  font-size: var(--t-sm);
}

/* DataTables still builds its own length menu, search box, info line, pager
   and "Processing" box - a screen that reaches for one finds it - but inside a
   frame they are the frame's job. Outside a frame (a table that opted out, or
   one the script could not frame) they stay exactly as they were. */
.dtx .dataTables_length,
.dtx .dataTables_filter,
.dtx .dataTables_info,
.dtx .dataTables_paginate,
.dtx .dataTables_processing {
  display: none !important;
}

.dtx .dataTables_wrapper {
  position: relative;
  padding: 0;
  overflow: visible;
  min-width: 0;
}

/* The views wrote spacing around the table by hand - <br><br>, mb-3 on every
   filter column. Inside the frame the gap is the frame's. */
.dtx .dataTables_wrapper > .row:empty,
.dtx .dataTables_wrapper > br {
  display: none;
}

/* ---- buttons the frame uses ---------------------------------------------- */

.dtx-btn,
.dtx-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s2);
  height: var(--ctl-h);
  min-height: var(--ctl-h);
  padding: 0 var(--s3);
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--t-sm);
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--dur-1) var(--ease), border-color var(--dur-1) var(--ease), color var(--dur-1) var(--ease);
}

.dtx-icon-btn {
  width: var(--ctl-h);
  padding: 0;
  color: var(--ink-2);
  font-size: var(--t-md);
}

.dtx-btn:hover,
.dtx-icon-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-weak);
}

.dtx-btn:focus-visible,
.dtx-icon-btn:focus-visible,
.dtx-link:focus-visible,
.dtx-page:focus-visible,
.dtx-more:focus-visible,
.dtx-chip-x:focus-visible,
.dtx-chip.is-fixed:focus-visible,
.dtx-pop-item:focus-visible,
.dtx .dt-scroll:focus-visible,
.dtx-clip:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

.dtx-btn.is-primary {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: var(--on-accent);
}

.dtx-btn.is-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--on-accent);
}

.dtx-btn i,
.dtx-icon-btn i {
  font-size: var(--t-md);
  line-height: 1;
}

/* Pressed, not merely hovered: a toggle's state has to be readable without
   pointing at it. */
.dtx-icon-btn.is-on,
.dtx-btn.is-on {
  background: var(--accent-weak);
  border-color: var(--accent);
  color: var(--accent);
}

.dtx-btn[disabled],
.dtx-icon-btn[disabled] {
  opacity: .45;
  cursor: not-allowed;
}

.dtx-link {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  height: var(--ctl-h-sm);
  padding: 0 var(--s2);
  margin: 0;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--accent);
  font-size: var(--t-sm);
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}

.dtx-link:hover {
  background: var(--accent-weak);
}

.dtx [hidden] {
  display: none !important;
}

/* ---- toolbar -------------------------------------------------------------
   One line: the search and the filters on the left, reading order; the tools
   on the right, least-used last. It wraps rather than squeezes. */
.dtx-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--s2) var(--s4);
  flex-wrap: wrap;
}

.dtx-lead {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-wrap: wrap;
  flex: 1 1 520px;
  min-width: 0;
}

.dtx-tools {
  display: flex;
  align-items: center;
  gap: var(--s1);
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.dtx-tools .dtx-extra {
  display: contents;
}

/* A screen's own buttons that sat in its filter row - Export to Excel, a
   report - brought into the toolbar at the toolbar's size, whatever class
   they came with. */
.dtx-tools .dtx-extra > .btn,
.dtx-tools .dtx-extra > a.btn,
.dtx-tools .dtx-extra > button,
.dtx-tools .dtx-extra .dt-button {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  height: var(--ctl-h);
  min-height: var(--ctl-h);
  padding: 0 var(--s3);
  margin: 0 var(--s1) 0 0;
  border: 1px solid var(--line-strong) !important;
  border-radius: var(--r-sm);
  background: var(--surface) !important;
  color: var(--ink) !important;
  font-size: var(--t-sm);
  font-weight: 500;
  box-shadow: none !important;
  white-space: nowrap;
}

.dtx-tools .dtx-extra > .btn:hover,
.dtx-tools .dtx-extra > button:hover,
.dtx-tools .dtx-extra .dt-button:hover {
  border-color: var(--accent) !important;
  color: var(--accent) !important;
  background: var(--accent-weak) !important;
}

.dtx-tools .dtx-extra .dt-buttons {
  display: inline-flex;
  gap: var(--s1);
  float: none;
  margin: 0;
}

/* ---- search ---- */
.dtx-search {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 1 340px;
  min-width: 220px;
}

.dtx-search > .fa-magnifying-glass {
  position: absolute;
  left: var(--s3);
  color: var(--ink-3);
  font-size: var(--t-base);
  pointer-events: none;
}

.dtx .dtx-search-input {
  width: 100%;
  height: var(--ctl-h);
  min-height: var(--ctl-h);
  margin: 0;
  padding: 0 calc(var(--s6) + var(--s1)) 0 calc(var(--s6) + var(--s1));
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--t-base);
  box-shadow: none;
  transition: border-color var(--dur-1) var(--ease), background var(--dur-1) var(--ease);
  -webkit-appearance: none;
  appearance: none;
}

.dtx .dtx-search-input::-webkit-search-cancel-button,
.dtx .dtx-search-input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

.dtx .dtx-search-input::placeholder {
  color: var(--ink-3);
}

.dtx .dtx-search-input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: var(--ring);
}

/* A search that is narrowing the rows looks like one, even when the box is
   not focused: the list is not the whole list. */
.dtx-search.is-active .dtx-search-input {
  border-color: var(--accent);
  background: var(--accent-weak);
}

.dtx-search.is-active > .fa-magnifying-glass {
  color: var(--accent);
}

.dtx-search-clear {
  position: absolute;
  right: var(--s1);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--ctl-h-sm);
  height: var(--ctl-h-sm);
  padding: 0;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink-2);
  cursor: pointer;
}

.dtx-search-clear:hover {
  background: var(--surface-alt);
  color: var(--ink);
}

.dtx-kbd {
  position: absolute;
  right: var(--s2);
  padding: 0 var(--s1);
  min-width: 18px;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink-3);
  font-family: var(--mono);
  font-size: var(--t-xs);
  line-height: 18px;
  text-align: center;
  pointer-events: none;
}

.dtx-search.is-active .dtx-kbd,
.dtx-search-input:focus ~ .dtx-kbd {
  display: none;
}

/* ---- the Filters button and its count ---- */
.dtx-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 var(--s1);
  border-radius: var(--r-pill);
  background: var(--accent-deep);
  color: var(--on-accent);
  font-family: var(--mono);
  font-size: var(--t-xs);
  font-weight: 600;
}

/* ---- chips ---- */
.dtx-chips {
  display: flex;
  align-items: center;
  gap: var(--s1) var(--s2);
  flex-wrap: wrap;
  min-width: 0;
}

.dtx-chips:empty {
  display: none;
}

.dtx-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  max-width: 100%;
  height: 28px;
  padding: 0 var(--s1) 0 var(--s2);
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-pill);
  background: var(--surface-2);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--t-sm);
  line-height: 1;
  white-space: nowrap;
}

.dtx-chip.is-fixed {
  padding-right: var(--s2);
  cursor: pointer;
}

.dtx-chip.is-fixed:hover {
  border-color: var(--accent);
}

.dtx-chip.is-column {
  border-style: dashed;
}

.dtx-chip-label {
  color: var(--ink-2);
}

.dtx-chip-label::after {
  content: ':';
}

.dtx-chip-label:last-child::after {
  content: '';
}

.dtx-chip-value {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 28ch;
  font-weight: 600;
}

.dtx-chip-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--ink-2);
  font-size: var(--t-sm);
  cursor: pointer;
}

.dtx-chip-x:hover {
  background: var(--danger-bg);
  color: var(--danger);
}

/* ---- popovers: export, columns ---- */
.dtx-drop {
  position: relative;
  display: inline-flex;
}

.dtx-pop {
  position: absolute;
  top: calc(100% + var(--s1));
  right: 0;
  z-index: var(--z-dropdown);
  min-width: 260px;
  max-width: min(340px, 90vw);
  padding: var(--s2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--bg-raised);
  box-shadow: var(--e2);
}

.dtx-pop-title {
  margin: 0;
  padding: var(--s1) var(--s2) var(--s2);
  color: var(--ink-2);
  font-family: var(--display);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.dtx-pop-item {
  display: flex;
  align-items: flex-start;
  gap: var(--s3);
  width: 100%;
  padding: var(--s2);
  margin: 0;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink);
  font-size: var(--t-sm);
  text-align: left;
  cursor: pointer;
}

.dtx-pop-item > i {
  width: 18px;
  margin-top: 2px;
  color: var(--ink-2);
  font-size: var(--t-md);
  text-align: center;
}

.dtx-pop-item span {
  display: flex;
  flex-direction: column;
  gap: 2px;
  font-weight: 500;
}

.dtx-pop-item small {
  color: var(--ink-2);
  font-size: var(--t-xs);
  font-weight: 400;
}

.dtx-pop-item:hover:not([disabled]) {
  background: var(--accent-weak);
}

.dtx-pop-item:hover:not([disabled]) > i {
  color: var(--accent);
}

.dtx-pop-item[disabled] {
  opacity: .45;
  cursor: not-allowed;
}

.dtx-pop-item.is-working > i {
  animation: erp-spin .8s linear infinite;
}

.dtx-pop-note {
  margin: var(--s1) 0 0;
  padding: var(--s2) var(--s2) var(--s1);
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: var(--t-xs);
  line-height: var(--lh-dense);
}

.dtx-col-list {
  display: flex;
  flex-direction: column;
  max-height: min(420px, 60vh);
  overflow-y: auto;
}

.dtx-col-opt {
  display: flex;
  align-items: center;
  gap: var(--s2);
  min-height: 34px;
  padding: 0 var(--s2);
  margin: 0;
  border-radius: var(--r-sm);
  color: var(--ink);
  font-size: var(--t-sm);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}

.dtx-col-opt:hover {
  background: var(--surface-alt);
}

.dtx-col-opt input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent-deep);
}

.dtx-col-opt span {
  flex: 1;
}

.dtx-col-opt.is-locked {
  color: var(--ink-2);
  cursor: default;
}

.dtx-col-opt.is-locked i {
  color: var(--ink-3);
  font-size: var(--t-xs);
}

.dtx-pop-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: var(--s1);
  padding-top: var(--s1);
  border-top: 1px solid var(--line);
}

/* ---- filter panel ----------------------------------------------------------
   The screen's own filter row, moved here. Whatever grid it was built with,
   in here it is one: fields at a readable width, labels above, as many to a
   line as fit. The screen's own Filter and Reset buttons are kept, hidden;
   the panel's buttons press them. */
.dtx-filters {
  padding: var(--s3) var(--s4);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
}

.dtx-filters-body > .dtx-filter-fields:not(.dtx-filter-group),
.dtx-filters-body > .dtx-filter-group > * {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: var(--s3) var(--s4);
  align-items: end;
  margin: 0;
  padding: 0;
  width: 100%;
}

/* A screen whose fields and buttons were in separate rows arrives as a group
   of rows; each row is laid out on the grid, one under the other. */
.dtx-filters-body > .dtx-filter-group {
  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

.dtx-filter-fields:not(.dtx-filter-group) > *,
.dtx-filter-group > * > * {
  width: auto;
  max-width: none;
  min-width: 0;
  flex: none;
  margin: 0 !important;
  padding: 0 !important;
}

.dtx-filter-fields .e-input-container,
.dtx-filter-fields .form-group {
  margin: 0 !important;
}

.dtx-filter-fields .dtx-filter-spent,
.dtx-filter-fields .dtx-orig {
  display: none !important;
}

.dtx-filter-fields > br {
  display: none;
}

/* A daterange trigger is a div, not an input; in the panel it is the same
   height as the fields beside it. */
.dtx-filter-fields .datepicker-container {
  display: flex;
  align-items: center;
  gap: var(--s2);
  min-height: var(--ctl-h);
  cursor: pointer;
}

.dtx-filters-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--s2);
  margin-top: var(--s3);
  padding-top: var(--s3);
  border-top: 1px solid var(--line);
}

.dtx-filters-note {
  margin-right: auto;
  color: var(--warning);
  font-size: var(--t-sm);
}

.dtx-filters-note::before {
  content: "\f06a";
  margin-right: var(--s1);
  font-family: "Font Awesome 6 Pro", "Font Awesome 6 Free", sans-serif;
  font-weight: 400;
}

.dtx-filters-apply.is-dirty {
  box-shadow: 0 0 0 3px var(--accent-weak);
}

/* ---- bulk bar ---- */
.dtx-bulk {
  display: flex;
  align-items: center;
  gap: var(--s3);
  flex-wrap: wrap;
  min-height: var(--ctl-h-lg);
  padding: var(--s1) var(--s2) var(--s1) var(--s3);
  border: 1px solid var(--accent);
  border-radius: var(--r-sm);
  background: var(--accent-weak);
}

.dtx-bulk-count {
  color: var(--ink);
  font-size: var(--t-sm);
  white-space: nowrap;
}

.dtx-bulk-count b {
  font-family: var(--mono);
}

.dtx-bulk-actions {
  display: flex;
  align-items: center;
  gap: var(--s2);
  flex-wrap: wrap;
  flex: 1;
}

.dtx-bulk-actions > * {
  display: inline-flex !important;
  align-items: center;
  gap: var(--s2);
  flex-wrap: wrap;
  margin: 0 !important;
}

.dtx-bulk-actions .btn {
  height: var(--ctl-h-sm);
  min-height: var(--ctl-h-sm);
  margin: 0 !important;
  padding: 0 var(--s3);
  font-size: var(--t-sm);
  text-transform: none !important;
}

.dtx-bulk-clear {
  margin-left: auto;
}

/* ---- the rows box ------------------------------------------------------ */

.dtx .dt-scroll {
  position: relative;
  overflow: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  background: var(--surface);
}

.dtx .dt-scroll > table {
  width: 100% !important;
  margin: 0 !important;
  border: 0;
  border-collapse: separate;
  border-spacing: 0;
  box-sizing: border-box;
}

/* ---- header ---- */
.dtx table.dataTable thead th,
.dtx table.dataTable thead td {
  position: sticky;
  top: 0;
  z-index: calc(var(--z-sticky) + 1);
  height: var(--row-h);
  padding: var(--s2) var(--s3);
  border: 0;
  border-bottom: 1px solid var(--line-strong) !important;
  background-color: var(--surface-alt);
  background-image: none !important;
  color: var(--ink-2);
  font-family: var(--display);
  font-size: var(--t-xs);
  font-weight: 600;
  letter-spacing: .08em;
  line-height: var(--lh-tight);
  text-transform: uppercase;
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

/* Sort state, drawn - the PNG arrows DataTables ships were dark-on-dark in
   the dark theme. Both chevrons faint until the column is sorted, then the
   one that applies in the accent, and the label goes to full ink so the
   sorted column can be found without reading the arrows. */
.dtx table.dataTable thead th.sorting,
.dtx table.dataTable thead th.sorting_asc,
.dtx table.dataTable thead th.sorting_desc {
  padding-right: calc(var(--s3) + 14px);
  cursor: pointer;
}

.dtx table.dataTable thead th.sorting::before,
.dtx table.dataTable thead th.sorting::after,
.dtx table.dataTable thead th.sorting_asc::before,
.dtx table.dataTable thead th.sorting_asc::after,
.dtx table.dataTable thead th.sorting_desc::before,
.dtx table.dataTable thead th.sorting_desc::after {
  content: "";
  position: absolute;
  right: var(--s3);
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  opacity: .35;
  bottom: auto;
  display: block;
}

.dtx table.dataTable thead th.sorting::before,
.dtx table.dataTable thead th.sorting_asc::before,
.dtx table.dataTable thead th.sorting_desc::before {
  top: calc(50% - 6px);
  border-bottom: 5px solid var(--ink-2);
}

.dtx table.dataTable thead th.sorting::after,
.dtx table.dataTable thead th.sorting_asc::after,
.dtx table.dataTable thead th.sorting_desc::after {
  top: calc(50% + 1px);
  border-top: 5px solid var(--ink-2);
}

.dtx table.dataTable thead th.sorting_asc::before,
.dtx table.dataTable thead th.sorting_desc::after {
  opacity: 1;
  border-bottom-color: var(--accent);
  border-top-color: var(--accent);
}

.dtx table.dataTable thead th.sorting_asc::after,
.dtx table.dataTable thead th.sorting_desc::before {
  opacity: .15;
}

.dtx table.dataTable thead th.sorting_asc,
.dtx table.dataTable thead th.sorting_desc {
  color: var(--ink);
}

.dtx table.dataTable thead th.sorting:hover {
  color: var(--ink);
}

.dtx table.dataTable thead th.sorting:hover::before,
.dtx table.dataTable thead th.sorting:hover::after {
  opacity: .7;
}

.dtx table.dataTable thead th:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--accent);
}

/* ---- body ---- */
.dtx table.dataTable tbody td {
  height: var(--row-h);
  padding: var(--s2) var(--s3);
  border: 0;
  border-bottom: 1px solid var(--line) !important;
  background-color: var(--surface);
  color: var(--ink);
  font-size: var(--t-sm);
  line-height: var(--lh-dense);
  vertical-align: middle;
}

/* No zebra and no vertical rules, whatever the view's markup asked for
   (table-striped, table-bordered): the divider and the hover do that job.
   Every cell carries the card's own fill rather than none - a pinned cell
   with no background shows the rows sliding under it. The theme tints the
   sorted column; here that would be a see-through pin as well. */
.dtx table.dataTable tbody tr.odd,
.dtx table.dataTable tbody tr.even {
  background-color: transparent;
}

.dtx table.dataTable tbody tr > .sorting_1 {
  background-color: var(--surface);
}

/* The theme sizes whatever column comes last as an action column - 1% wide,
   right-aligned, never wrapping. In a frame the action column is marked, and
   a last column that is data (a product list, remarks) is laid out as data. */
.dtx table.dataTable tbody td:last-child:not(.dtx-actions),
.dtx table.dataTable thead th:last-child:not(.dtx-actions) {
  width: auto;
  text-align: left;
}

.dtx table.dataTable tbody td:last-child:not(.dtx-actions) {
  white-space: normal;
}

.dtx table.dataTable tbody td:last-child:not(.dtx-actions) > * + * {
  margin-left: 0;
}

.dtx table.dataTable.table-bordered,
.dtx table.dataTable.table-bordered td,
.dtx table.dataTable.table-bordered th {
  border-left: 0;
  border-right: 0;
  border-top: 0;
}

.dtx table.dataTable tbody tr:last-child td {
  border-bottom-color: transparent !important;
}

.dtx table.dataTable tbody tr:hover > td,
.dtx table.dataTable tbody tr.dtx-row-menu > td {
  background-color: var(--surface-alt);
}

/* A ticked row: the fill says "selected", the bar at the edge says it without
   the colour. */
.dtx table.dataTable tbody tr.is-selected > td {
  background-color: var(--accent-weak);
}

.dtx table.dataTable tbody tr.is-selected > td:first-child {
  box-shadow: inset 3px 0 0 var(--accent);
}

/* A row that is hundreds of pixels tall - a request with fifteen items -
   centres its short cells in the middle of all that height, far from the
   first line of the tall one. They belong at the top, beside it. */
.dtx table.dataTable tbody tr:has(> td br + br) > td,
.dtx table.dataTable tbody tr:has(> td ul) > td {
  vertical-align: top;
}

.dtx table.dataTable tbody tr:has(> td br + br) > td.dtx-actions,
.dtx table.dataTable tbody tr:has(> td br + br) > td.dtx-select {
  vertical-align: top;
}

/* Keyboard focus inside a row is never hidden under the sticky header. */
.dtx tbody a:focus-visible,
.dtx tbody button:focus-visible,
.dtx tbody input:focus-visible {
  scroll-margin-top: calc(var(--row-h) + var(--s2));
}

.dtx tbody a {
  color: var(--accent);
}

/* ---- typed columns ---- */

/* Numbers line up on the decimal point, and the header sits over them. */
.dtx table.dataTable .dtx-num {
  text-align: right;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dtx table.dataTable thead th.dtx-num {
  font-family: var(--display);
  text-align: right;
}

.dtx table.dataTable thead th.dtx-num.sorting,
.dtx table.dataTable thead th.dtx-num.sorting_asc,
.dtx table.dataTable thead th.dtx-num.sorting_desc {
  padding-right: calc(var(--s3) + 14px);
}

.dtx table.dataTable td.dtx-date {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.dtx-time {
  color: var(--ink-3);
  font-size: var(--t-xs);
  margin-left: var(--s1);
}

/* Order, voucher and request numbers are copied constantly: mono, so a 0 and
   an O are different shapes, and selectable. */
.dtx table.dataTable td.dtx-code {
  font-family: var(--mono);
  font-size: var(--t-sm);
  letter-spacing: -.01em;
  white-space: nowrap;
}

/* The column that names the row, set a step heavier than the rest. */
.dtx table.dataTable td.dtx-key {
  font-weight: 600;
}

.dtx table.dataTable td.dtx-key a {
  font-weight: 600;
}

.dtx-none {
  color: var(--ink-3);
}

.dtx table.dataTable td.dtx-bool,
.dtx table.dataTable td.dtx-status {
  white-space: nowrap;
}

.dtx-yes {
  display: inline-flex;
  align-items: center;
  gap: var(--s1);
  color: var(--success);
  font-weight: 500;
}

.dtx-yes i {
  font-size: var(--t-xs);
}

.dtx-no {
  color: var(--ink-3);
}

.dtx-who {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  min-width: 0;
}

.dtx-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  border-radius: var(--r-pill);
  background: var(--surface-alt);
  border: 1px solid var(--line-strong);
  color: var(--ink-2);
  font-family: var(--display);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .02em;
}

.dtx-who-name {
  line-height: var(--lh-tight);
}

/* Wide enough that a three-part name - Sunilkumar Jayantibhai Solanki - takes
   two lines, not three: the table squeezed the column to one word a line, and
   a person's name was the tallest thing in half the rows. */
.dtx table.dataTable td.dtx-person {
  min-width: 190px;
}

/* ---- figure lists ----
   A cell that lists amounts - a purchase order's quotation, sub total, tax and
   grand total - as label and figure, the figures right-aligned under each
   other and the total last and heaviest. Rendered by the controllers as
   <dl class="dtx-kv">; each line stays on one line. */
.dtx-kv {
  display: grid;
  grid-template-columns: auto auto;
  column-gap: var(--s3);
  margin: 0;
  font-size: var(--t-xs);
  line-height: var(--lh-dense);
  white-space: nowrap;
}

.dtx-kv dt {
  margin: 0;
  color: var(--ink-3);
  font-weight: 400;
}

.dtx-kv dd {
  margin: 0;
  color: var(--ink-2);
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.dtx-kv .is-total {
  margin-top: 2px;
  padding-top: 2px;
  border-top: 1px solid var(--line);
  color: var(--ink);
  font-size: var(--t-sm);
  font-weight: 600;
}

/* A long remark on one line, the whole of it on hover and on a click - a
   single line with an ellipsis reads as "there is more", where the old
   four-line fade read as text that was missing. Only free-text columns
   (remarks, description, narration, notes, address, reason); a cell listing
   items is never cut. */
.dtx-clip {
  display: block;
  max-width: 32ch;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  border-radius: var(--r-sm);
}

.dtx-clip.is-open {
  max-width: 48ch;
  white-space: normal;
  overflow: visible;
}

/* ---- status badges ----
   One pill for every state in the ERP: tint, ink, and a dot so the state is
   carried by a shape as well as a colour. */
.dtx-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 2px var(--s2);
  border-radius: var(--r-pill);
  background: var(--surface-alt);
  color: var(--ink-2);
  font-size: var(--t-xs);
  font-weight: 600;
  line-height: 18px;
  white-space: nowrap;
}

.dtx-badge::before {
  content: "";
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.dtx-badge.is-success { background: var(--success-bg); color: var(--success); }
.dtx-badge.is-warning { background: var(--warning-bg); color: var(--warning); }
.dtx-badge.is-danger  { background: var(--danger-bg);  color: var(--danger); }
.dtx-badge.is-info    { background: var(--steel-bg);   color: var(--steel); }

/* ---- the tick-box column ---- */
.dtx table.dataTable th.dtx-select,
.dtx table.dataTable td.dtx-select {
  width: 40px;
  min-width: 40px;
  padding-left: var(--s3);
  padding-right: var(--s1);
  text-align: left;
}

.dtx th.dtx-select input[type=checkbox],
.dtx td.dtx-select input[type=checkbox] {
  width: 16px;
  height: 16px;
  margin: 0;
  vertical-align: middle;
  accent-color: var(--accent-deep);
  cursor: pointer;
}

/* ---- row actions -------------------------------------------------------- */
.dtx table.dataTable th.dtx-actions {
  width: 1%;
  text-align: right;
}

.dtx table.dataTable td.dtx-actions {
  width: 1%;
  text-align: right;
  white-space: nowrap;
}

.dtx td.dtx-actions > * + * {
  margin-left: var(--s1);
}

.dtx td.dtx-actions form {
  display: inline;
  margin: 0;
}

/* A controller that wraps its buttons in a flex box of its own (.po-actions)
   starts them at the left of the cell, under nothing, while the heading sits
   at the right. They line up under the heading like everyone else's. */
.dtx td.dtx-actions > div {
  justify-content: flex-end;
  text-align: right;
}

/* Every control in the cell one height, whatever it was built from. */
.dtx td.dtx-actions a:not(.dtx-menu-item):not(.badge),
.dtx td.dtx-actions button:not(.dtx-menu-item):not(.badge),
.dtx td.dtx-actions input[type=button],
.dtx td.dtx-actions input[type=submit] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s1);
  height: var(--ctl-h-sm);
  min-height: var(--ctl-h-sm);
  min-width: var(--ctl-h-sm);
  padding: 0 var(--s2);
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background: var(--surface);
  color: var(--ink);
  font-size: var(--t-sm);
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  vertical-align: middle;
  box-shadow: none;
}

/* Icon-only actions are quiet squares; the hover says which one you are on. */
.dtx td.dtx-actions a.is-icon-only:not(.dtx-menu-item),
.dtx td.dtx-actions button.is-icon-only:not(.dtx-menu-item) {
  width: var(--ctl-h-sm);
  padding: 0;
  border-color: var(--line);
  background: transparent !important;
  color: var(--ink-2) !important;
}

.dtx td.dtx-actions a:not(.dtx-menu-item):not(.badge):hover,
.dtx td.dtx-actions button:not(.dtx-menu-item):not(.badge):hover {
  border-color: var(--accent);
  background: var(--accent-weak) !important;
  color: var(--accent) !important;
}

.dtx td.dtx-actions .btn-delete:not(.dtx-menu-item):hover,
.dtx td.dtx-actions .btn-trash:not(.dtx-menu-item):hover,
.dtx td.dtx-actions .btn-danger:not(.dtx-menu-item):hover {
  border-color: var(--danger);
  background: var(--danger-bg) !important;
  color: var(--danger) !important;
}

.dtx td.dtx-actions i {
  font-size: var(--t-base);
  line-height: 1;
}

/* A coloured button (btn-primary, btn-info, btn-warning) in the row is one of
   several peers, not the page's primary action: outlined like the rest.
   Buttons and links only: the transaction list draws its status as a
   <span class="btn btn-label-success">, and outlining that took the colour
   out of every status pill - white on grey in the dark theme. */
.dtx td.dtx-actions a.btn:not(.dtx-menu-item):not(.badge),
.dtx td.dtx-actions button.btn:not(.dtx-menu-item):not(.badge) {
  background: var(--surface) !important;
  border-color: var(--line-strong) !important;
  color: var(--ink) !important;
}

.dtx td.dtx-actions a.btn:not(.dtx-menu-item):not(.badge):hover,
.dtx td.dtx-actions button.btn:not(.dtx-menu-item):not(.badge):hover {
  background: var(--accent-weak) !important;
  border-color: var(--accent) !important;
  color: var(--accent) !important;
}

/* The More button. */
.dtx td.dtx-actions button.dtx-more {
  width: var(--ctl-h-sm);
  padding: 0;
  border-color: var(--line);
  background: transparent;
  color: var(--ink-2);
}

.dtx td.dtx-actions button.dtx-more[aria-expanded="true"] {
  border-color: var(--accent);
  background: var(--accent-weak);
  color: var(--accent);
}

/* The menu. It stays inside the row's cell - the screens delegate their
   handlers from the table, so a menu moved to <body> would carry buttons that
   no longer do anything - and is drawn position: fixed so the rows box does
   not clip it. The cell it belongs to is lifted above the pinned column and
   the header while it is open. */
.dtx td.dtx-menu-open {
  z-index: var(--z-dropdown) !important;
}

.dtx .dtx-menu {
  position: fixed;
  z-index: var(--z-dropdown);
  margin: 0 !important;
  display: flex;
  flex-direction: column;
  min-width: 208px;
  max-width: 320px;
  padding: var(--s1);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  background: var(--bg-raised);
  box-shadow: var(--e2);
  text-align: left;
  white-space: normal;
}

.dtx .dtx-menu > * + * {
  margin-left: 0 !important;
}

.dtx .dtx-menu > form {
  display: block;
}

/* !important on the alignment too: the theme centres every .btn in a list's
   last column, and a menu of centred labels reads as a set of buttons. */
.dtx .dtx-menu .dtx-menu-item {
  display: flex !important;
  align-items: center;
  justify-content: flex-start !important;
  gap: var(--s3);
  width: 100%;
  height: auto !important;
  min-height: 36px !important;
  padding: var(--s2) var(--s3) !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: var(--r-sm) !important;
  background: transparent !important;
  box-shadow: none !important;
  color: var(--ink) !important;
  font-size: var(--t-sm) !important;
  font-weight: 400 !important;
  line-height: var(--lh-tight) !important;
  text-align: left !important;
  text-decoration: none;
  text-transform: none !important;
  white-space: nowrap;
  cursor: pointer;
}

.dtx .dtx-menu .dtx-menu-item i {
  flex: 0 0 16px;
  width: 16px;
  color: var(--ink-2);
  font-size: var(--t-base);
  text-align: center;
}

.dtx .dtx-menu .dtx-menu-item:hover,
.dtx .dtx-menu .dtx-menu-item:focus-visible {
  outline: none;
  background: var(--accent-weak) !important;
  color: var(--accent) !important;
}

.dtx .dtx-menu .dtx-menu-item:hover i,
.dtx .dtx-menu .dtx-menu-item:focus-visible i {
  color: var(--accent);
}

.dtx .dtx-menu .dtx-menu-item.is-danger,
.dtx .dtx-menu .dtx-menu-item.is-danger i {
  color: var(--danger) !important;
}

.dtx .dtx-menu .dtx-menu-item.is-danger:hover,
.dtx .dtx-menu .dtx-menu-item.is-danger:focus-visible {
  background: var(--danger-bg) !important;
}

/* A count badge riding on a button (Invoice Received Material 1) keeps its
   pill inside the menu row. */
.dtx .dtx-menu .dtx-menu-item .badge {
  margin-left: auto;
}

.dtx-menu-sep {
  height: 1px;
  margin: var(--s1) var(--s2);
  background: var(--line);
}

/* ---- pinned columns ----
   The actions stay at the right edge of the rows box while a wide table
   scrolls under them; the column that names the row stays at the left, but
   only while the table is wider than its box (js: markPinning). The shadow
   appears only once something is actually sliding under the pin. */
.dtx .dt-scroll:not(.no-pin) table.dataTable thead th.dtx-actions {
  position: sticky;
  right: 0;
  z-index: calc(var(--z-sticky) + 2);
}

.dtx .dt-scroll:not(.no-pin) table.dataTable tbody td.dtx-actions {
  position: sticky;
  right: 0;
  z-index: var(--z-sticky);
}

.dtx .dt-scroll:not(.no-pin):not(.is-scrolled-end) table.dataTable th.dtx-actions,
.dtx .dt-scroll:not(.no-pin):not(.is-scrolled-end) table.dataTable td.dtx-actions {
  box-shadow: -10px 0 10px -10px var(--edge-shadow), inset 1px 0 0 var(--line);
}

.dtx.pin-key table.dataTable thead th.dtx-key {
  position: sticky;
  left: var(--dtx-key-left, 0);
  z-index: calc(var(--z-sticky) + 2);
}

.dtx.pin-key table.dataTable tbody td.dtx-key {
  position: sticky;
  left: var(--dtx-key-left, 0);
  z-index: calc(var(--z-sticky) - 1);
}

.dtx.pin-key table.dataTable thead th.dtx-select {
  position: sticky;
  left: 0;
  z-index: calc(var(--z-sticky) + 2);
}

.dtx.pin-key table.dataTable tbody td.dtx-select {
  position: sticky;
  left: 0;
  z-index: calc(var(--z-sticky) - 1);
}

.dtx.pin-key .dt-scroll.is-scrolled-x table.dataTable th.dtx-key,
.dtx.pin-key .dt-scroll.is-scrolled-x table.dataTable td.dtx-key {
  box-shadow: 10px 0 10px -10px var(--edge-shadow), inset -1px 0 0 var(--line);
}

/* ---- busy, loading ----
   While a list is fetching, a thin bar runs along the top of the rows and the
   rows already there dim - they stay readable, and nothing jumps. */
.dtx .dataTables_wrapper::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: calc(var(--z-sticky) + 3);
  height: 2px;
  border-radius: var(--r-sm) var(--r-sm) 0 0;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  background-size: 40% 100%;
  background-repeat: no-repeat;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-2) var(--ease);
}

.dtx.is-loading .dataTables_wrapper::before {
  opacity: 1;
  animation: dtx-sweep 1.1s var(--ease) infinite;
}

.dtx.is-loading table.dataTable tbody tr:not(.skeleton-row) > td {
  opacity: .55;
  transition: opacity var(--dur-2) var(--ease);
}

@keyframes dtx-sweep {
  from { background-position: -40% 0; }
  to   { background-position: 140% 0; }
}

.dtx-refresh.is-spinning i {
  animation: erp-spin .8s linear infinite;
}

.dtx tr.skeleton-row > td {
  height: var(--row-h);
  padding: var(--s2) var(--s3);
  border-bottom: 1px solid var(--line) !important;
}

.dtx tr.skeleton-row .skeleton {
  display: block;
  width: 70%;
  height: 10px;
}

.dtx tr.skeleton-row > td:nth-child(3n + 1) .skeleton { width: 54%; }
.dtx tr.skeleton-row > td:nth-child(3n + 2) .skeleton { width: 82%; }
.dtx tr.skeleton-row:nth-child(even) > td:nth-child(odd) .skeleton { width: 64%; }
.dtx tr.skeleton-row > td:last-child .skeleton { width: 56px; margin-left: auto; }

/* ---- empty and error states ---- */
.dtx table.dataTable tbody td.dtx-state-cell,
.dtx table.dataTable tbody td.dataTables_empty {
  height: auto;
  padding: var(--s7) var(--s4) !important;
  background: var(--surface) !important;
  text-align: center;
  white-space: normal;
}

.dtx table.dataTable tbody tr.dtx-state-row:hover > td {
  background: var(--surface) !important;
}

/* The theme draws an icon before a bare "No data" cell; the state carries
   its own. */
.dtx td.dataTables_empty::before {
  content: none !important;
}

.dtx-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--s2);
  max-width: 460px;
  margin: 0 auto;
}

.dtx-state-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: var(--s1);
  border-radius: var(--r-pill);
  background: var(--surface-alt);
  color: var(--ink-2);
  font-size: var(--t-xl);
}

.dtx tr.is-error .dtx-state-icon {
  background: var(--danger-bg);
  color: var(--danger);
}

.dtx-state-title {
  margin: 0;
  color: var(--ink);
  font-size: var(--t-md);
  font-weight: 600;
}

.dtx-state-text {
  margin: 0;
  color: var(--ink-2);
  font-size: var(--t-sm);
  line-height: var(--lh-text);
}

.dtx-state-actions {
  display: flex;
  justify-content: center;
  gap: var(--s2);
  flex-wrap: wrap;
  margin-top: var(--s2);
}

/* ---- footer ------------------------------------------------------------ */
.dtx-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s2) var(--s4);
  flex-wrap: wrap;
  min-height: var(--ctl-h);
}

.dtx-info {
  color: var(--ink-2);
  font-size: var(--t-sm);
  font-variant-numeric: tabular-nums;
}

.dtx-info b {
  color: var(--ink);
  font-weight: 600;
}

.dtx-muted {
  color: var(--ink-3);
}

.dtx-paging {
  display: flex;
  align-items: center;
  gap: var(--s4);
  flex-wrap: wrap;
  margin-left: auto;
}

.dtx-length {
  display: inline-flex;
  align-items: center;
  gap: var(--s2);
  margin: 0;
  color: var(--ink-2);
  font-size: var(--t-sm);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  white-space: nowrap;
}

.dtx .dtx-length-select {
  width: auto;
  min-width: 68px;
  height: var(--ctl-h-sm);
  min-height: var(--ctl-h-sm);
  margin: 0;
  padding: 0 var(--s5) 0 var(--s2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm);
  background-color: var(--surface-2);
  color: var(--ink);
  font-family: var(--mono);
  font-size: var(--t-sm);
}

.dtx-pager {
  display: inline-flex;
  align-items: center;
  gap: 2px;
}

.dtx-pager:empty {
  display: none;
}

.dtx-page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--ctl-h-sm);
  height: var(--ctl-h-sm);
  padding: 0 var(--s2);
  margin: 0;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink);
  font-family: var(--mono);
  font-size: var(--t-sm);
  font-variant-numeric: tabular-nums;
  cursor: pointer;
}

.dtx-page:hover:not([disabled]):not(.is-current) {
  border-color: var(--line-strong);
  background: var(--surface-alt);
}

.dtx-page.is-current {
  background: var(--accent-deep);
  border-color: var(--accent-deep);
  color: var(--on-accent);
  font-weight: 600;
  cursor: default;
}

.dtx-page[disabled] {
  color: var(--ink-3);
  opacity: .5;
  cursor: not-allowed;
}

.dtx-page i {
  font-size: var(--t-sm);
}

.dtx-gap {
  min-width: 20px;
  color: var(--ink-3);
  text-align: center;
}

/* ---- the record count beside the page title ---- */
.page-title:has(+ .dtx-count) {
  display: inline-block;
  vertical-align: baseline;
}

.dtx-count {
  display: inline-block;
  margin-left: var(--s3);
  padding: 0 var(--s2);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: var(--t-xs);
  line-height: 20px;
  vertical-align: 3px;
  white-space: nowrap;
}

/* ---- density ----
   Compact takes the row padding down a step and the stacked pairs onto one
   line. It never hides a part of a cell. */
body.rows-compact .dtx table.dataTable tbody td,
body.rows-compact .dtx tr.skeleton-row > td {
  height: 32px;
  padding-top: var(--s1);
  padding-bottom: var(--s1);
  line-height: var(--lh-tight);
}

body.rows-compact .dtx table.dataTable thead th {
  height: 32px;
  padding-top: var(--s1);
  padding-bottom: var(--s1);
}

body.rows-compact .dtx td.dtx-actions a:not(.dtx-menu-item):not(.badge),
body.rows-compact .dtx td.dtx-actions button:not(.dtx-menu-item):not(.badge) {
  height: 26px;
  min-height: 26px;
  min-width: 26px;
}

body.rows-compact .dtx td.dtx-actions a.is-icon-only:not(.dtx-menu-item),
body.rows-compact .dtx td.dtx-actions button.is-icon-only:not(.dtx-menu-item),
body.rows-compact .dtx td.dtx-actions button.dtx-more {
  width: 26px;
}

body.rows-compact .dtx-avatar {
  flex-basis: 20px;
  width: 20px;
  height: 20px;
  font-size: 9px;
}

/* ---- full screen: the frame fills the content region ---- */
body.list-maximised .page.has-bound-list .dtx {
  gap: var(--s2);
}

/* ---- responsive ----
   The table never shrinks its columns to fit a small screen - that is what
   made rows five lines tall. It scrolls inside its box, with the column that
   names the row pinned once there is anything to scroll past. What changes
   with the width is the furniture around it. */
@media (max-width: 991.98px) {
  .dtx-lead {
    flex-basis: 100%;
  }

  .dtx-search {
    flex: 1 1 260px;
  }

  .dtx-tools {
    flex: 1 1 100%;
    justify-content: flex-end;
  }

  .dtx-kbd {
    display: none;
  }
}

@media (max-width: 767.98px) {
  .dtx {
    gap: var(--s2);
  }

  .dtx .dt-scroll {
    max-height: 70vh;
  }

  /* On a phone the actions scroll with the row: a pinned column is a third
     of the screen there. */
  .dtx .dt-scroll table.dataTable th.dtx-actions,
  .dtx .dt-scroll table.dataTable td.dtx-actions {
    position: static !important;
    box-shadow: none !important;
  }

  .dtx-foot {
    justify-content: center;
  }

  .dtx-info {
    flex: 1 1 100%;
    text-align: center;
  }

  .dtx-paging {
    margin: 0 auto;
    justify-content: center;
  }

  .dtx-length > span {
    display: none;
  }

  .dtx-filters-body > .dtx-filter-fields:not(.dtx-filter-group),
  .dtx-filters-body > .dtx-filter-group > * {
    grid-template-columns: 1fr;
  }

  .dtx-pop {
    position: fixed;
    top: auto;
    left: var(--s3);
    right: var(--s3);
    bottom: var(--s3);
    max-width: none;
  }
}

/* A phone: the pager keeps previous, the current page and next, as
   UI-DESIGN-SYSTEM.md section 9 has it - the numbers either side are what
   runs off the screen. */
@media (max-width: 575.98px) {
  .dtx-page.is-edge,
  .dtx-page.is-number,
  .dtx-gap {
    display: none;
  }
}

/* ---- paper ----
   A list printed from the browser is the rows, not the controls. */
@media print {
  .dtx-toolbar,
  .dtx-filters,
  .dtx-bulk,
  .dtx-paging,
  .dtx-more,
  .dtx-menu,
  .dtx-count {
    display: none !important;
  }

  .dtx .dt-scroll {
    max-height: none !important;
    overflow: visible !important;
    border: 0;
  }

  .dtx table.dataTable thead th {
    position: static;
  }

  .dtx table.dataTable th.dtx-actions,
  .dtx table.dataTable td.dtx-actions {
    display: none;
  }
}
