/* Universal 100% Table Resolution Fit */
.table-responsive,
.dataTables_wrapper,
.dataTables_wrapper .row,
.dataTables_wrapper .col-sm-12,
div.dataTables_scroll,
div.dataTables_scrollHead,
div.dataTables_scrollHeadInner,
div.dataTables_scrollBody,
div.dataTables_scrollFoot,
div.dataTables_scrollFootInner {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

table.dataTable,
table.table,
.table-responsive > table,
.dataTables_scrollHeadInner > table,
.dataTables_scrollBody > table,
.dashboard-custom-table {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 100% !important;
  box-sizing: border-box !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/* Headings Only Bold */
table.dataTable thead th,
table.table thead th,
.dashboard-custom-table thead th {
  font-weight: 700 !important;
  color: #334155 !important;
  padding: 12px 14px !important;
}

/* Table Data Rows Non-Bold */
table.dataTable tbody td,
table.table tbody td,
.dashboard-custom-table tbody td,
table.dataTable tbody td strong,
table.table tbody td strong,
table.dataTable tbody td b,
table.table tbody td b,
table.dataTable tbody td span:not(.badge-scheme-name):not(.status-pill),
table.table tbody td span:not(.badge-scheme-name):not(.status-pill),
.dashboard-custom-table tbody td strong,
.dashboard-custom-table tbody td b {
  font-weight: 400 !important;
  padding: 12px 14px !important;
}

/* Column Heading & Data Alignment Consistency */
table.dataTable thead th.text-center,
table.table thead th.text-center,
.dashboard-custom-table thead th.text-center,
table.dataTable tbody td.text-center,
table.table tbody td.text-center,
.dashboard-custom-table tbody td.text-center,
.text-center {
  text-align: center !important;
}

table.dataTable thead th.text-right,
table.table thead th.text-right,
.dashboard-custom-table thead th.text-right,
table.dataTable tbody td.text-right,
table.table tbody td.text-right,
.dashboard-custom-table tbody td.text-right,
.text-right {
  text-align: right !important;
}

table.dataTable thead th.text-left,
table.table thead th.text-left,
.dashboard-custom-table thead th.text-left,
table.dataTable tbody td.text-left,
table.table tbody td.text-left,
.dashboard-custom-table tbody td.text-left,
.text-left {
  text-align: left !important;
}

/* DataTables Scroll Synchronization - Allow DataTables to calculate matching column widths */
div.dataTables_scrollBody > table > thead {
  visibility: collapse !important;
  height: 0px !important;
}
div.dataTables_scrollBody > table > thead > tr {
  height: 0px !important;
  border: none !important;
}
div.dataTables_scrollBody > table > thead > tr > th,
div.dataTables_scrollBody > table > thead > tr > td {
  height: 0px !important;
  padding-top: 0px !important;
  padding-bottom: 0px !important;
  margin-top: 0px !important;
  margin-bottom: 0px !important;
  border-top: none !important;
  border-bottom: none !important;
  border-top-width: 0px !important;
  border-bottom-width: 0px !important;
}
div.dataTables_scrollBody > table > thead th div.dataTables_sizing,
div.dataTables_scrollBody > table > thead td div.dataTables_sizing {
  height: 0px !important;
  overflow: hidden !important;
}

/* ============================================================
   Excel-Style Table Header Filter System (Ultra-Light & Modern)
   ============================================================ */
.th-content-wrapper {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  width: 100% !important;
  gap: 4px !important;
  position: relative !important;
}

.th-title-text {
  flex: 1 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

/* Lightweight, Light-Color Filter Icon (Strictly NO Square, NO Box, Borderless) */
.dt-excel-filter-btn {
  all: unset !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  border: none !important;
  background: transparent !important;
  background-color: transparent !important;
  box-shadow: none !important;
  outline: none !important;
  padding: 0 !important;
  margin: 0 0 0 4px !important;
  line-height: 1 !important;
  width: auto !important;
  height: auto !important;
  min-width: 0 !important;
  vertical-align: middle !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.dt-excel-filter-btn:focus,
.dt-excel-filter-btn:active,
.dt-excel-filter-btn:hover {
  border: none !important;
  outline: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

.excel-filter-icon {
  width: 11px !important;
  height: 11px !important;
  stroke: #94a3b8 !important;
  fill: none !important;
  stroke-width: 2px !important;
  transition: all 0.2s ease !important;
  vertical-align: middle !important;
  display: inline-block !important;
}

.dt-excel-filter-btn:hover .excel-filter-icon {
  stroke: #0284c7 !important;
  transform: scale(1.2) !important;
}

.dt-excel-filter-btn.has-filter {
  background: transparent !important;
  border: none !important;
}

.dt-excel-filter-btn.has-filter .excel-filter-icon {
  stroke: #0284c7 !important;
  fill: #0284c7 !important;
  filter: drop-shadow(0 0 3px rgba(2, 132, 199, 0.4)) !important;
}

/* Premium Floating Excel Filter Popover */
.excel-filter-popup {
  position: fixed !important;
  z-index: 100050 !important;
  width: 270px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-radius: 12px;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow: 0 20px 25px -5px rgba(15, 23, 42, 0.15), 0 8px 10px -6px rgba(15, 23, 42, 0.08);
  padding: 14px;
  display: none;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  animation: excelFilterPopIn 0.18s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes excelFilterPopIn {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(-4px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.excel-filter-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid #f1f5f9;
  margin-bottom: 10px;
}

.excel-filter-title {
  font-size: 12px;
  font-weight: 700;
  color: #1e293b;
  display: flex;
  align-items: center;
  gap: 6px;
  max-width: 210px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.excel-filter-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.excel-filter-close:hover {
  color: #ef4444;
  background: #fef2f2;
}

.excel-filter-sort-group {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 10px;
}

.excel-sort-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
  color: #475569;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.excel-sort-btn:hover {
  background: #e0f2fe;
  color: #0284c7;
  border-color: #bae6fd;
}

.excel-filter-divider {
  height: 1px;
  background: #f1f5f9;
  margin: 8px 0;
}

.excel-filter-search-box {
  margin-bottom: 12px;
}

.excel-filter-label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  color: #64748b;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}

.excel-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.excel-input-icon {
  position: absolute;
  left: 10px;
  color: #94a3b8;
  font-size: 11px;
  pointer-events: none;
}

.excel-filter-input {
  width: 100%;
  padding: 7px 28px 7px 28px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  font-size: 12px;
  color: #1e293b;
  outline: none;
  background: #ffffff;
  transition: all 0.15s ease;
}

.excel-filter-input:focus {
  border-color: #0284c7;
  box-shadow: 0 0 0 3px rgba(2, 132, 199, 0.15);
}

.excel-input-clear {
  position: absolute;
  right: 8px;
  background: none;
  border: none;
  color: #94a3b8;
  font-size: 13px;
  cursor: pointer;
  line-height: 1;
  display: none;
}

.excel-input-clear:hover {
  color: #ef4444;
}

.excel-filter-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid #f1f5f9;
  gap: 8px;
}

.excel-filter-footer .btn {
  font-size: 11px;
  padding: 5px 12px;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-excel-clear {
  background: transparent !important;
  border: none !important;
  color: #ef4444 !important;
  padding: 5px 6px !important;
}

.btn-excel-clear:hover {
  background: #fef2f2 !important;
  border-radius: 4px !important;
}

.btn-excel-cancel {
  background: #f1f5f9 !important;
  border: 1px solid #e2e8f0 !important;
  color: #475569 !important;
}

.btn-excel-cancel:hover {
  background: #e2e8f0 !important;
}

.btn-excel-apply {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%) !important;
  border: none !important;
  color: #ffffff !important;
  box-shadow: 0 2px 6px rgba(2, 132, 199, 0.3) !important;
}

.btn-excel-apply:hover {
  box-shadow: 0 4px 10px rgba(2, 132, 199, 0.4) !important;
  transform: translateY(-1px);
}

/* ==========================================================================
   Sidebar & Sub-menu Uniform Dark Styling (Complete Override of White BG)
   ========================================================================== */
.main-sidebar,
body .main-sidebar,
body.light-sidebar .main-sidebar,
body.dark-sidebar .main-sidebar {
  background: #071e22 !important;
  background-color: #071e22 !important;
}

/* Dropdown Sub-menu Container */
.main-sidebar .sidebar-menu li ul.dropdown-menu,
.main-sidebar .sidebar-menu .dropdown-menu,
.sidebar-menu ul.dropdown-menu,
.sidebar-menu .dropdown-menu,
body .main-sidebar.sidebar-style-2 .sidebar-menu li ul.dropdown-menu,
body:not(.sidebar-mini) .sidebar-style-2 .sidebar-menu li ul.dropdown-menu,
body .main-sidebar .sidebar-menu li.active ul.dropdown-menu,
body.light-sidebar .main-sidebar .sidebar-menu li ul.dropdown-menu,
body.dark-sidebar .main-sidebar .sidebar-menu li ul.dropdown-menu {
  background: rgba(5, 24, 27, 0.85) !important;
  background-color: rgba(5, 24, 27, 0.85) !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-radius: 12px !important;
  padding: 6px !important;
  margin: 4px 0 8px 0 !important;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.35) !important;
  list-style: none !important;
}

/* Inactive Sub-menu list items */
.main-sidebar .sidebar-menu li ul.dropdown-menu li,
.sidebar-menu .dropdown-menu li {
  margin-bottom: 2px !important;
  background: transparent !important;
  background-color: transparent !important;
}

/* Inactive Sub-menu links */
.main-sidebar .sidebar-menu li ul.dropdown-menu li a,
.sidebar-menu .dropdown-menu li a.nav-link,
.sidebar-menu .dropdown-menu li a,
body:not(.sidebar-mini) .sidebar-style-2 .sidebar-menu li ul.dropdown-menu li a,
body .main-sidebar.sidebar-style-2 .sidebar-menu li ul.dropdown-menu li a,
body .main-sidebar .sidebar-menu li ul.dropdown-menu li a,
body.light-sidebar .main-sidebar .sidebar-menu li ul.dropdown-menu li a,
body.dark-sidebar .main-sidebar .sidebar-menu li ul.dropdown-menu li a {
  display: flex !important;
  align-items: center !important;
  padding: 9px 14px !important;
  height: auto !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  color: #88a2b3 !important;
  background: transparent !important;
  background-color: transparent !important;
  border-radius: 8px !important;
  border: none !important;
  border-left: 3px solid transparent !important;
  transition: all 0.2s ease !important;
  position: relative !important;
  text-decoration: none !important;
}

/* Enforce transparent/dark background for all non-hover, non-active sub-menu links */
.main-sidebar .sidebar-menu li ul.dropdown-menu li a:not(:hover):not(.active),
.main-sidebar .sidebar-menu li ul.dropdown-menu li:not(.active) > a:not(:hover),
body .main-sidebar .sidebar-menu li ul.dropdown-menu li a:not(:hover):not(.active),
body .main-sidebar .sidebar-menu li ul.dropdown-menu li:not(.active) > a:not(:hover),
body.light-sidebar .main-sidebar .sidebar-menu li ul.dropdown-menu li a:not(:hover):not(.active),
body.light-sidebar .main-sidebar .sidebar-menu li ul.dropdown-menu li:not(.active) > a:not(:hover) {
  background: transparent !important;
  background-color: transparent !important;
  color: #88a2b3 !important;
}

/* Submenu Hover state */
.main-sidebar .sidebar-menu li ul.dropdown-menu li a:hover,
.sidebar-menu .dropdown-menu li a.nav-link:hover,
body:not(.sidebar-mini) .sidebar-style-2 .sidebar-menu li ul.dropdown-menu li a:hover,
body .main-sidebar .sidebar-menu li ul.dropdown-menu li a:hover,
body.light-sidebar .main-sidebar .sidebar-menu li ul.dropdown-menu li a:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.07) !important;
  background-color: rgba(255, 255, 255, 0.07) !important;
  border-left: 3px solid rgba(0, 210, 211, 0.6) !important;
  padding-left: 16px !important;
  transform: translateX(3px) !important;
}

/* Submenu Active state */
.main-sidebar .sidebar-menu li ul.dropdown-menu li.active > a,
.sidebar-menu .dropdown-menu li.active > a,
.sidebar-menu .dropdown-menu li.active > a.nav-link,
.sidebar-menu .dropdown-menu li > a.nav-link.active,
body:not(.sidebar-mini) .sidebar-style-2 .sidebar-menu li.active ul.dropdown-menu li.active a,
body .main-sidebar .sidebar-menu li ul.dropdown-menu li.active > a,
body.light-sidebar .main-sidebar .sidebar-menu li ul.dropdown-menu li.active > a {
  color: #00d2d3 !important;
  background: linear-gradient(90deg, rgba(0, 210, 211, 0.22) 0%, rgba(0, 210, 211, 0.04) 100%) !important;
  background-color: rgba(0, 210, 211, 0.14) !important;
  font-weight: 600 !important;
  border-left: 3.5px solid #00d2d3 !important;
  padding-left: 16px !important;
  box-shadow: inset 0 0 12px rgba(0, 210, 211, 0.12) !important;
}

/* Universal Export CSV Button */
.btn-export-csv {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #ffffff !important;
  border: none;
  border-radius: 10px;
  padding: 9px 18px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.28);
  transition: all 0.25s ease;
  text-decoration: none !important;
  white-space: nowrap;
}
.btn-export-csv:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.38);
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
  color: #ffffff !important;
}
.btn-export-csv i {
  font-size: 14px;
}


