.mobile-bottom-nav {
  z-index: 1030; /* above content */
  padding-bottom: env(safe-area-inset-bottom, 0px);
  background: linear-gradient(to bottom, #fff 0%, #fff calc(100% - env(safe-area-inset-bottom, 0px)), #000 calc(100% - env(safe-area-inset-bottom, 0px)), #000 100%);
}

.mobile-bottom-nav .nav-item {
  color: #6c757d;
  font-size: 12px;
  text-decoration: none;
  width: 25%;
}

.mobile-bottom-nav .nav-item i {
  font-size: 20px;
  display: block;
  margin-bottom: 2px;
}

.mobile-bottom-nav .nav-item.active {
  color: #b8904e; /* your gold brand colour */
}

.mobile-bottom-nav .nav-item.active i {
  color: #b8904e;
}
@media (max-width: 767.98px) {
  body {
    padding-bottom: calc(70px + env(safe-area-inset-bottom, 0px));
  }

  /* ===== Card Layout on Mobile for ALL DataTables ===== */

  /* Hide DataTables responsive child rows (we use our own card layout) */
  .dataTables_wrapper .dtr-details,
  .dataTables_wrapper td.dtr-control::before {
    display: none !important;
  }

  /* Hide DataTables length, search, info & pagination for cleaner look */
  .dataTables_wrapper .dataTables_length,
  .dataTables_wrapper .dataTables_filter,
  .dataTables_wrapper .dataTables_info,
  .dataTables_wrapper .dataTables_paginate {
    padding: 0 0.5rem;
  }

  /* Hide the table header */
  [id^="basic-datatable"] thead {
    display: none;
  }

  /* Make the table a block container */
  [id^="basic-datatable"],
  [id^="basic-datatable"] tbody {
    display: block;
    width: 100% !important;
  }

  /* Each row becomes a card */
  [id^="basic-datatable"] tbody tr {
    display: block;
    background: var(--bs-card-bg, #fff);
    border: 1px solid var(--bs-border-color, #e3e6f0);
    border-radius: 0.75rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: 1rem;
    padding: 1rem 1.1rem 0.75rem;
    transition: box-shadow 0.2s ease;
  }

  [id^="basic-datatable"] tbody tr:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
  }

  /* Override striping background inside cards */
  [id^="basic-datatable"].table-striped > tbody > tr:nth-of-type(odd) > *,
  [id^="basic-datatable"].table-striped > tbody > tr:nth-of-type(even) > * {
    --bs-table-bg-type: transparent !important;
    --bs-table-striped-bg: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
  }

  [id^="basic-datatable"].table-striped > tbody > tr {
    --bs-table-bg: transparent !important;
    --bs-table-striped-bg: transparent !important;
  }

  /* Each cell becomes a flex row */
  [id^="basic-datatable"] tbody td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.4rem 0;
    border: none !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    text-align: right !important;
    font-size: 0.9rem;
    white-space: normal !important;
    word-break: break-word;
  }

  /* Remove border from last cell */
  [id^="basic-datatable"] tbody td:last-child {
    border-bottom: none !important;
    padding-top: 0.65rem;
    justify-content: flex-end;
    gap: 0.5rem;
  }

  /* Label from data-label attribute */
  [id^="basic-datatable"] tbody td::before {
    content: attr(data-label);
    font-weight: 600;
    color: var(--bs-secondary-color, #6c757d);
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 0.04em;
    text-align: left;
    flex-shrink: 0;
    margin-right: 1rem;
  }

  /* Action buttons row: centered and full-width */
  [id^="basic-datatable"] tbody td:last-child::before {
    display: none;
  }

  /* Make buttons slightly larger for touch */
  [id^="basic-datatable"] tbody td:last-child .btn {
    padding: 0.4rem 0.85rem;
    font-size: 0.85rem;
    border-radius: 0.5rem;
  }

  /* Multi-line cell content (e.g. procedure name + performed by) */
  [id^="basic-datatable"] tbody td .td-multiline {
    display: block;
    text-align: right;
    line-height: 1.4;
  }

  /* Right-align DataTables responsive child row data */
  .dtr-details li {
    display: flex !important;
    justify-content: space-between !important;
    align-items: baseline;
  }
  .dtr-details .dtr-title {
    flex-shrink: 0;
    margin-right: 1rem;
  }
  .dtr-details .dtr-data {
    text-align: right !important;
    margin-left: auto;
  }
}
