.table > :not(caption) > * > * {
    background-color: var(--bs-white);
}

/*-----Custom Global theme Changes ----------*/
.sidebar-area {
  display: flex;
  flex-direction: column;
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

.sidebar-area > .layout-menu {
  flex: 1 1 auto;
  min-height: 0;
  height: auto;
}

#fullscreen-icon {
  transition: color 0.3s ease;
  user-select: none;
}

#fullscreen-icon:hover {
  opacity: 0.7;
}

.btn {
  padding: 10px 10px;
  font-size: 14px;
  border-radius: 4px;
}

.header-area {
  padding: 5px 10px !important;
  margin-top: 5px !important;
}

.form-control {
  background-color: #fff;
  border: 1px solid #dae0ec;
  height: 40px;
  color: #475569 !important;
  font-size: 14px;
  padding: 5px 15px;
  width: 100%;
  transition: all ease 0.5s;
  border-radius: 5px;
}

.custom_form .form-control {
  background-color: #fff;
  border: 1px solid #dae0ec;
  height: 40px;
  color: #475569 !important;
  font-size: 14px;
  padding: 5px 15px;
  width: 100%;
  transition: all ease 0.5s;
  border-radius: 5px;
}

.mic-icon.listening {
  color: #ff1d1d;
}

.mic-icon.listening::after {
  content: "";
  position: absolute;
  top: -5px;
  left: 0px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2px solid rgba(255, 0, 0, 0.62);
  animation: pulse 1.2s infinite ease-in-out;
}

@keyframes pulse {
  0% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  50% {
    transform: scale(1.1);
    opacity: 1;
  }
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
}

/* ============================================ */
/* CUSTOM DATATABLE STYLES - COMPLETE VERSION */
/* ============================================ */
:root {
  --cdt-bg-body: #f8f9fa;
  --cdt-bg-card: #ffffff;
  --cdt-bg-table: #ffffff;
  --cdt-bg-table-alt: #f8f9fa;
  --cdt-bg-table-hover: #e7f1ff;
  --cdt-text-primary: #1e293b;
  --cdt-text-secondary: #64748b;
  --cdt-text-table: #334155;
  --cdt-border-color: #f0f4f8;
  --cdt-border-table: #e2e8f0;
  --cdt-header-bg: #ffb637;
  --cdt-header-text: #000000;
  --cdt-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  --cdt-shadow-hover: 0 2px 8px rgba(13, 110, 253, 0.1);
  --cdt-scrollbar-track: #f1f3f5;
  --cdt-scrollbar-thumb: #cbd5e1;
  --cdt-scrollbar-thumb-hover: #94a3b8;
}

[data-theme="dark"] {
  --cdt-bg-body: #0f172a;
  --cdt-bg-card: #1e293b;
  --cdt-bg-table: #1e293b;
  --cdt-bg-table-alt: #334155;
  --cdt-bg-table-hover: #475569;
  --cdt-text-primary: #f1f5f9;
  --cdt-text-secondary: #94a3b8;
  --cdt-text-table: #e2e8f0;
  --cdt-border-color: #334155;
  --cdt-border-table: #475569;
  --cdt-header-bg: #000103;
  --cdt-header-text: #f1f5f9;
  --cdt-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  --cdt-shadow-hover: 0 2px 8px rgba(13, 110, 253, 0.3);
  --cdt-scrollbar-track: #1e293b;
  --cdt-scrollbar-thumb: #475569;
  --cdt-scrollbar-thumb-hover: #64748b;
}

/* Apply theme to body */
body {
  background-color: var(--cdt-bg-body) !important;
  transition: background-color 0.3s ease !important;
}

/* Custom DataTable Container */
.custom-data-table-container {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Oxygen, Ubuntu, sans-serif;
}

.custom-data-table-card {
  background: var(--cdt-bg-card);
  border-radius: 0px;
  /* box-shadow: var(--cdt-shadow); */
  padding: 5px;
  overflow: hidden;
  transition: all 0.3s ease;
}

.custom-data-table-header {
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--cdt-border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.custom-data-table-header-content h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--cdt-text-primary);
  margin-bottom: 4px;
  transition: color 0.3s ease;
}

.custom-data-table-header-content p {
  font-size: 14px;
  color: var(--cdt-text-secondary);
  margin-bottom: 0;
  transition: color 0.3s ease;
}

/* Theme Toggle Button */
.theme-toggle-btn {
  padding: 10px 16px;
  border-radius: 8px;
  border: 2px solid var(--cdt-border-color);
  background: var(--cdt-bg-card);
  color: var(--cdt-text-primary);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.theme-toggle-btn:hover {
  border-color: #0d6efd;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(13, 110, 253, 0.2);
}

.theme-icon {
  width: 18px;
  height: 18px;
}

/* Button Container */
.custom-data-table-buttons {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 5px;
}

/* Override DataTables default button styles - SCOPED */
.custom-data-table-buttons .dt-button {
  padding: 8px 16px !important;
  border-radius: 3px !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 8px !important;
  border: none !important;
  transition: all 0.3s ease !important;
  cursor: pointer !important;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1) !important;
}

.custom-data-table-buttons .dt-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.custom-data-table-buttons .dt-button:active {
  transform: translateY(0);
}

/* Bootstrap 5 Button Colors */
.custom-data-table-buttons .btn-copy {
  background-color: #6f42c1 !important;
  color: #fff !important;
}

.custom-data-table-buttons .btn-copy:hover {
  background-color: #5a32a3 !important;
}

.custom-data-table-buttons .btn-excel {
  background-color: #198754 !important;
  color: #fff !important;
}

.custom-data-table-buttons .btn-excel:hover {
  background-color: #157347 !important;
}

.custom-data-table-buttons .btn-csv {
  background-color: #fd7e14 !important;
  color: #fff !important;
}

.custom-data-table-buttons .btn-csv:hover {
  background-color: #e56b0c !important;
}

.custom-data-table-buttons .btn-pdf {
  background-color: #dc3545 !important;
  color: #fff !important;
}

.custom-data-table-buttons .btn-pdf:hover {
  background-color: #bb2d3b !important;
}

.custom-data-table-buttons .btn-print {
  background-color: #0d6efd !important;
  color: #fff !important;
}

.custom-data-table-buttons .btn-print:hover {
  background-color: #0b5ed7 !important;
}

.custom-data-table-btn-svg {
  width: 16px;
  height: 16px;
  display: inline-block;
  vertical-align: middle;
}

/* Scrollable Table Container with Custom Scrollbars */
.custom-data-table-scroll-container {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 600px;
  border-radius: 10px;
  position: relative;
}

.custom-data-table-wrapper table.custom-data-table thead th {
  position: sticky;
  top: 0;
  z-index: 10;
  background: var(--cdt-header-bg);
}

/* Custom Scrollbar Styles - Webkit browsers (Chrome, Safari, Edge) */
.custom-data-table-scroll-container::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.custom-data-table-scroll-container::-webkit-scrollbar-track {
  background: var(--cdt-scrollbar-track);
  border-radius: 10px;
}

.custom-data-table-scroll-container::-webkit-scrollbar-thumb {
  background: var(--cdt-scrollbar-thumb);
  border-radius: 10px;
  transition: background 0.3s ease;
}

.custom-data-table-scroll-container::-webkit-scrollbar-thumb:hover {
  background: var(--cdt-scrollbar-thumb-hover);
}

/* Custom Scrollbar for Firefox */
.custom-data-table-scroll-container {
  scrollbar-width: thin;
  scrollbar-color: var(--cdt-scrollbar-thumb) var(--cdt-scrollbar-track);
}

/* Table Styling - SCOPED under wrapper */
.custom-data-table-wrapper table.custom-data-table {
  width: 100% !important;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--cdt-bg-table);
  transition: background-color 0.3s ease;
  margin: 0 !important;
}

.table{
  background: var(--cdt-bg-table) !important; 
}

.custom-data-table-wrapper table.custom-data-table thead th {
  background: var(--cdt-header-bg);
  color: var(--cdt-header-text);
  /* font-weight: 600; */
  font-size: 12px;
  padding: 10px 10px;
  text-align: left;
  border: none;
  border-bottom: 2px solid var(--cdt-border-table);
  position: sticky;
  top: 0;
  z-index: 10;
  white-space: nowrap;
  transition: all 0.3s ease;
}

.custom-data-table-wrapper table.custom-data-table thead th:first-child {
  border-top-left-radius: 10px;
}

.custom-data-table-wrapper table.custom-data-table thead th:last-child {
  border-top-right-radius: 10px;
}

.custom-data-table-wrapper table.custom-data-table thead th.sorting,
.custom-data-table-wrapper table.custom-data-table thead th.sorting_asc,
.custom-data-table-wrapper table.custom-data-table thead th.sorting_desc {
  cursor: pointer;
  padding-right: 30px;
}

.custom-data-table-wrapper table.custom-data-table thead th.sorting:after,
.custom-data-table-wrapper table.custom-data-table thead th.sorting_asc:after,
.custom-data-table-wrapper table.custom-data-table thead th.sorting_desc:after {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.6;
  font-size: 11px;
  color: var(--cdt-header-text);
}

.custom-data-table-wrapper table.custom-data-table tbody tr {
  transition: all 0.2s ease;
  background: var(--cdt-bg-table);
}

.custom-data-table-wrapper table.custom-data-table tbody tr:nth-child(even) {
  background-color: var(--cdt-bg-table-alt);
}

.custom-data-table-wrapper table.custom-data-table tbody tr:hover {
  background-color: var(--cdt-bg-table-hover) !important;
  box-shadow: var(--cdt-shadow-hover);
}

.custom-data-table-wrapper table.custom-data-table tbody td {
  padding: 5px 5px;
  font-size: 13px;
  color: var(--cdt-text-table);
  border: none;
  border-bottom: 1px solid var(--cdt-border-table);
  transition: all 0.3s ease;
  white-space: nowrap;
}

.custom-data-table-wrapper table.custom-data-table tbody tr:last-child td {
  border-bottom: none;
}

.custom-data-table-wrapper
  table.custom-data-table
  tbody
  tr:last-child
  td:first-child {
  border-bottom-left-radius: 10px;
}

.custom-data-table-wrapper
  table.custom-data-table
  tbody
  tr:last-child
  td:last-child {
  border-bottom-right-radius: 10px;
}

/* Info text styling - applies at container level */
.custom-data-table-container .dataTables_info {
  margin-top: 20px;
  font-size: 14px;
  color: var(--cdt-text-secondary);
  padding: 8px 0;
  transition: color 0.3s ease;
}

/* Pagination container - applies at container level */
.custom-data-table-container .dataTables_paginate {
  margin-top: 20px;
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  margin-bottom: 20px; /* ✅ ADD THIS - Creates space below pagination */
  margin-right: 10px; /* ✅ ADD THIS - Creates space from right edge */
}

/* Pagination buttons - applies at container level */
.custom-data-table-container .dataTables_paginate .paginate_button {
  padding: 8px 14px !important;
  margin: 0 !important;
  border-radius: 6px !important;
  border: 1px solid var(--cdt-border-table) !important;
  background: var(--cdt-bg-card) !important;
  color: #0d6efd !important;
  font-weight: 500 !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
  display: inline-block !important;
  min-width: 38px !important;
  text-align: center !important;
  font-size: 14px !important;
  text-decoration: none !important;
}

.custom-data-table-container .dataTables_paginate .paginate_button:hover {
  background: #0d6efd !important;
  border-color: #0d6efd !important;
  color: #ffffff !important;
  box-shadow: 0 2px 4px rgba(13, 110, 253, 0.3) !important;
}

.custom-data-table-container .dataTables_paginate .paginate_button.current {
  background: #0d6efd !important;
  border-color: #0d6efd !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(13, 110, 253, 0.4) !important;
}

.custom-data-table-container
  .dataTables_paginate
  .paginate_button.current:hover {
  background: #0b5ed7 !important;
  border-color: #0b5ed7 !important;
  color: #ffffff !important;
}

.custom-data-table-container .dataTables_paginate .paginate_button.disabled,
.custom-data-table-container
  .dataTables_paginate
  .paginate_button.disabled:hover {
  opacity: 0.5 !important;
  cursor: not-allowed !important;
  background: var(--cdt-bg-table-alt) !important;
  border-color: var(--cdt-border-table) !important;
  color: var(--cdt-text-secondary) !important;
  box-shadow: none !important;
}

/* Hide search and length controls - SCOPED */
.custom-data-table-container .dataTables_filter,
.custom-data-table-container .dataTables_length {
  display: none !important;
}

/* Loading State - SCOPED */
.custom-data-table-container .dataTables_processing {
  top: 50%;
  left: 50%;
  background: #ffffff00;
  padding: 20px 40px;
  border-radius: 12px;
  font-size: 14px;
  color: #0d6efd;
  font-weight: 600;
  z-index: 100;
}

/* Responsive - SCOPED */
@media (max-width: 768px) {
  .custom-data-table-card {
    padding: 5px;
    border-radius: 0px;
  }

  .custom-data-table-header-content h1 {
    font-size: 20px;
  }

  .custom-data-table-buttons {
    justify-content: center;
  }

  .custom-data-table-wrapper table.custom-data-table thead th,
  .custom-data-table-wrapper table.custom-data-table tbody td {
    padding: 8px 12px;
    font-size: 12px;
  }

  .custom-data-table-container .dataTables_paginate {
    justify-content: center;
    flex-wrap: wrap;
  }

  .custom-data-table-container .dataTables_info {
    text-align: center;
  }

  .custom-data-table-scroll-container {
    max-height: 400px;
  }
}

/* ============================================ */
/* NO DATA STATE STYLING */
/* ============================================ */

.custom-data-table-no-data {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 20px;
  text-align: center;
}

.custom-data-table-no-data img {
  max-width: 300px;
  width: 100%;
  height: auto;
  margin-bottom: 20px;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

/* .custom-data-table-no-data img:hover {
  opacity: 1;
} */

.custom-data-table-no-data p {
  font-size: 16px;
  color: var(--cdt-text-secondary);
  font-weight: 500;
  margin: 0;
  transition: color 0.3s ease;
}

/* When table has no data, center the message */
.custom-data-table-scroll-container.no-data-state {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

/* Hide table elements when no data */
.custom-data-table-scroll-container.no-data-state table thead {
  display: none;
}

/* DataTables empty message styling */
.dataTables_empty {
  padding: 0 !important;
  border: none !important;
}

/* Responsive */
@media (max-width: 768px) {
  .custom-data-table-no-data {
    padding: 40px 20px;
  }

  .custom-data-table-no-data img {
    max-width: 200px;
  }

  .custom-data-table-no-data p {
    font-size: 14px;
  }

  .custom-data-table-scroll-container.no-data-state {
    min-height: 300px;
  }
}

/*===============Custom table for info*/

.custom-info-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #ffffff;
  border-radius: 5px;
  overflow: hidden;
  font-size: 12px;
}

/* Table cells */
.custom-info-table td {
  padding: 12px 14px;
  vertical-align: middle;
}

/* Label cells */
.custom-info-table .label {
  background: #f8f9fb;
  color: #6b7280;
  font-weight: 600;
  width: 20%;
  white-space: nowrap;
}

/* Value cells */
.custom-info-table .value {
  color: #111827;
  font-weight: 500;
  width: 30%;
}

/* Borders */
.custom-info-table tr:not(:last-child) td {
  border-bottom: 1px solid #e5e7eb;
}

.custom-info-table td:not(:last-child) {
  border-right: 1px solid #f1f5f9;
}

/* Hover effect */
.custom-info-table tr:hover {
  background: #f9fafb;
}

/* Responsive */
@media (max-width: 768px) {
  .custom-info-table td {
    padding: 10px;
  }

  .custom-info-table .label {
    font-size: 12px;
  }

  .custom-info-table .value {
    font-size: 13px;
  }
}

/*======VIP Badges=========*/
/* VIP Patient - Amber/Gold */
.badge-vip-patient {
  background-color: #ffc107 !important;
  color: #1a1a1a !important;
  font-weight: 600;
  padding: 8px;
}

/* Special Patient - Soft Blue */
.badge-special-patient {
  background-color: #64b5f6 !important;
  color: #0d47a1 !important;
  font-weight: 600;
  padding: 8px;
}

/* FOC Patient - Emerald Green */
.badge-foc-patient {
  background-color: #4caf50 !important;
  color: #ffffff !important;
  font-weight: 600;
  padding: 8px;
}

/* Urgent Patient - Vivid Red/Orange */
.badge-urgent-patient {
  background-color: #ff5722 !important;
  color: #ffffff !important;
  font-weight: 600;
  padding: 8px;
}

/* STATS Patient - Hot Pink/Magenta */
.badge-stats-patient {
  background-color: #ec407a !important;
  color: #ffffff !important;
  font-weight: 600;
  padding: 8px;
}

/* Out-Source Sample - Teal/Cyan */
.badge-outsource-patient {
  background-color: #26c6da !important; /* Cyan */
  color: #ffffff !important;
  font-weight: 600;
  padding: 8px;
}

/* Sample to Re-run - Coral/Peach */
.badge-rerun-sample {
  background-color: #e94c4c !important; /* Coral */
  color: #ffffff !important;
  font-weight: 600;
  padding: 8px;
}

/* Case Reopened - Lavender/Purple */
.badge-reopen-case {
  background-color: #ab47bc !important; /* Purple */
  color: #ffffff !important;
  font-weight: 600;
  padding: 8px;
}

/* Case Reopened - Lavender/Purple */
.badge-barcode-generated {
  background-color: #6cb849 !important; /* Purple */
  color: #ffffff !important;
  font-weight: 600;
  padding: 8px;
}

.badge-partially-collected {
  background-color: #dd7353 !important; /* Purple */
  color: #ffffff !important;
  font-weight: 600;
  padding: 8px;
}

.badge-re-collect {
  background-color: #ddc853 !important; /* Purple */
  color: #ffffff !important;
  font-weight: 600;
  padding: 8px;
}

/*=========Stats Card Design===========*/
.stats-card {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.stats-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.stats-card-header {
  padding: 12px;
  font-weight: 700;
  text-align: center;
  color: #fff;
}

.stats-card-primary .stats-card-header {
  background: linear-gradient(135deg, #1976d2 0%, #1565c0 100%);
}

.stats-card-info .stats-card-header {
  background: linear-gradient(135deg, #0097a7 0%, #00838f 100%);
}

.stats-card-success .stats-card-header {
  background: linear-gradient(135deg, #388e3c 0%, #2e7d32 100%);
}

.stats-card-warning .stats-card-header {
  background: linear-gradient(135deg, #f57c00 0%, #ef6c00 100%);
}

.stats-card-body {
  padding: 16px;
  background: #fff;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid #f0f0f0;
}

.stat-item:last-child {
  border-bottom: none;
}

.stat-label {
  font-size: 13px;
  color: #666;
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
  color: #002d78;
}

.modal-backdrop {
  background-color: rgba(0, 0, 0, 0.7) !important;
  backdrop-filter: blur(3px);
}



/*=====Sweet Alter =======*/
div:where(.swal2-container) div:where(.swal2-popup)
 {
    display: none;
    position: relative;
    box-sizing: border-box;
    grid-template-columns: minmax(0, 100%);
    width: var(--swal2-width);
    max-width: 100%;
    padding: var(--swal2-padding);
    border: var(--swal2-border);
    border-radius: var(--swal2-border-radius);
    background: var(--swal2-background);
    color: var(--swal2-color);
    font-family: inherit;
    font-size: 12px !important;
    container-name: swal2-popup;
}