:root {
  color-scheme: light;
}

html[data-theme='dark'] {
  color-scheme: dark;
  --dt-html-background: #0f172a;
  --dt-th-background: #111827;
  --dt-row-stripe: 148, 163, 184;
  --dt-row-hover: 148, 163, 184;
}

html.dark {
  color-scheme: dark;
  --dt-html-background: #0f172a;
  --dt-th-background: #111827;
  --dt-row-stripe: 148, 163, 184;
  --dt-row-hover: 148, 163, 184;
}

.topbar-theme-toggle {
  align-items: center;
  border: 1px solid #d1d5db;
  border-radius: 999px;
  display: inline-flex;
  font-size: 0.72rem;
  font-weight: 700;
  gap: 0.35rem;
  line-height: 1;
  padding: 0.4rem 0.75rem;
  transition: all 0.2s ease;
}

.topbar-theme-toggle:hover {
  text-decoration: none;
}

.login-theme-toggle {
  position: fixed;
  right: 1rem;
  top: 1rem;
  z-index: 1100;
}

html[data-theme='dark'] body,
html[data-theme='dark'] #wrapper #content-wrapper,
html[data-theme='dark'] #wrapper #content-wrapper #content,
html[data-theme='dark'] #wrapper #content-container {
  background-color: #0f172a;
  color: #dbe4f0;
}

html[data-theme='dark'] #wrapper #content-wrapper {
  border-left: 1px solid #1f2937;
}

html[data-theme='dark'] .bg-gray {
  background-color: #111827 !important;
}

html[data-theme='dark'] .topbar {
  border-bottom: 1px solid #334155;
}

html[data-theme='dark'] .topbar.navbar-light .navbar-nav .nav-item .nav-link,
html[data-theme='dark'] .topbar .nav-item .nav-link,
html[data-theme='dark'] .text-gray-600,
html[data-theme='dark'] .text-gray-700,
html[data-theme='dark'] .text-gray-800 {
  color: #dbe4f0 !important;
}

html[data-theme='dark'] .text-gray-400,
html[data-theme='dark'] .text-muted {
  color: #94a3b8 !important;
}

html[data-theme='dark'] .topbar-theme-toggle {
  background-color: #0f172a;
  border-color: #334155;
  color: #e2e8f0;
}

html[data-theme='light'] .topbar-theme-toggle {
  background-color: #ffffff;
  color: #4b5563;
}

html[data-theme='dark'] .sidebar {
  background-color: #0b1220;
  background-image: linear-gradient(180deg, #0f172a 10%, #020617 100%);
}

html[data-theme='dark'] .sidebar .nav-links li:hover,
html[data-theme='dark'] .sidebar .profile-details,
html[data-theme='dark'] .sidebar .nav-links li .sub-menu {
  background: #1e293b;
}

html[data-theme='dark'] .sidebar .nav-links li .sub-menu a,
html[data-theme='dark'] .sidebar .nav-links li a .link_name,
html[data-theme='dark'] .sidebar .nav-links li i,
html[data-theme='dark'] .sidebar .logo-details .logo_name {
  color: #e2e8f0;
}

html[data-theme='dark'] .card,
html[data-theme='dark'] .modal-content,
html[data-theme='dark'] .dropdown-menu,
html[data-theme='dark'] .list-group-item,
html[data-theme='dark'] .input-group-text {
  background-color: #1f2937;
  border-color: #334155;
  color: #dbe4f0;
}

html[data-theme='dark'] .dropdown-item {
  color: #dbe4f0;
}

html[data-theme='dark'] .dropdown-item:hover,
html[data-theme='dark'] .dropdown-item:focus {
  background-color: #334155;
  color: #f8fafc;
}

html[data-theme='dark'] .card-header,
html[data-theme='dark'] .card-footer,
html[data-theme='dark'] .modal-header,
html[data-theme='dark'] .modal-footer {
  border-color: #334155;
}

html[data-theme='dark'] .form-control,
html[data-theme='dark'] .custom-select,
html[data-theme='dark'] textarea,
html[data-theme='dark'] input[type='text'],
html[data-theme='dark'] input[type='password'],
html[data-theme='dark'] input[type='number'],
html[data-theme='dark'] input[type='date'],
html[data-theme='dark'] .select2-container--default .select2-selection--single,
html[data-theme='dark'] .select2-container--bootstrap4 .select2-selection {
  background-color: #0f172a !important;
  border-color: #334155 !important;
  color: #e2e8f0 !important;
}

html[data-theme='dark'] .select2-container--default .select2-selection--single .select2-selection__rendered,
html[data-theme='dark'] .select2-container--bootstrap4 .select2-selection__rendered {
  color: #e2e8f0 !important;
}

html[data-theme='dark'] .form-control::placeholder,
html[data-theme='dark'] input::placeholder,
html[data-theme='dark'] textarea::placeholder {
  color: #94a3b8;
}

html[data-theme='dark'] .form-control:focus,
html[data-theme='dark'] .custom-select:focus {
  border-color: #64748b;
  box-shadow: 0 0 0 0.12rem rgba(148, 163, 184, 0.25);
}

html[data-theme='dark'] .table {
  color: #dbe4f0;
}

html[data-theme='dark'] .table-responsive,
html[data-theme='dark'] table.table,
html[data-theme='dark'] table.dataTable {
  background-color: #0f172a !important;
  color: #dbe4f0 !important;
}

html[data-theme='dark'] .table thead th,
html[data-theme='dark'] .table th,
html[data-theme='dark'] .table td,
html[data-theme='dark'] .table-bordered th,
html[data-theme='dark'] .table-bordered td {
  border-color: #334155;
}

html[data-theme='dark'] .table thead th,
html[data-theme='dark'] table.dataTable thead th,
html[data-theme='dark'] table.dataTable thead td {
  background-color: #111827 !important;
  color: #e2e8f0 !important;
}

html[data-theme='dark'] .table tbody th,
html[data-theme='dark'] .table tbody td,
html[data-theme='dark'] table.dataTable tbody th,
html[data-theme='dark'] table.dataTable tbody td,
html[data-theme='dark'] table.dataTable tfoot th,
html[data-theme='dark'] table.dataTable tfoot td {
  background-color: #0f172a !important;
  color: #dbe4f0 !important;
}

html[data-theme='dark'] .table [style*='background'],
html[data-theme='dark'] .table [style*='background-color'],
html[data-theme='dark'] table.dataTable [style*='background'],
html[data-theme='dark'] table.dataTable [style*='background-color'] {
  background-color: #111827 !important;
  color: #e2e8f0 !important;
}

html[data-theme='dark'] .table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(148, 163, 184, 0.08);
}

html[data-theme='dark'] .table-hover tbody tr:hover {
  background-color: rgba(148, 163, 184, 0.14);
  color: #f8fafc;
}

html[data-theme='dark'] .page-link {
  background-color: #1f2937;
  border-color: #334155;
  color: #dbe4f0;
}

html[data-theme='dark'] .page-item.disabled .page-link {
  background-color: #111827;
  border-color: #1f2937;
  color: #64748b;
}

html[data-theme='dark'] .dataTables_wrapper .dataTables_filter input,
html[data-theme='dark'] .dataTables_wrapper .dataTables_length select {
  background-color: #0f172a;
  border: 1px solid #334155;
  color: #dbe4f0;
}

html[data-theme='dark'] div.dt-container,
html[data-theme='dark'] div.dt-container .dt-info,
html[data-theme='dark'] div.dt-container .dt-search label,
html[data-theme='dark'] div.dt-container .dt-length label {
  color: #dbe4f0 !important;
}

html[data-theme='dark'] table.dataTable thead > tr > th,
html[data-theme='dark'] table.dataTable thead > tr > td,
html[data-theme='dark'] table.table thead > tr > th,
html[data-theme='dark'] table.table thead > tr > td,
html[data-theme='dark'] table.dataTable.table-bordered th {
  color: #e2e8f0 !important;
}

html[data-theme='dark'] table.dataTable thead > tr > th .dt-column-title,
html[data-theme='dark'] table.dataTable thead > tr > td .dt-column-title,
html[data-theme='dark'] table.dataTable thead > tr > th span,
html[data-theme='dark'] table.dataTable thead > tr > td span {
  color: inherit !important;
}

html[data-theme='dark'] table.dataTable thead > tr > th span.dt-column-order:before,
html[data-theme='dark'] table.dataTable thead > tr > th span.dt-column-order:after,
html[data-theme='dark'] table.dataTable thead > tr > td span.dt-column-order:before,
html[data-theme='dark'] table.dataTable thead > tr > td span.dt-column-order:after {
  color: #94a3b8 !important;
  opacity: 0.8 !important;
}

html[data-theme='dark'] table.dataTable thead > tr > th.dt-ordering-asc span.dt-column-order:before,
html[data-theme='dark'] table.dataTable thead > tr > th.dt-ordering-desc span.dt-column-order:after,
html[data-theme='dark'] table.dataTable thead > tr > td.dt-ordering-asc span.dt-column-order:before,
html[data-theme='dark'] table.dataTable thead > tr > td.dt-ordering-desc span.dt-column-order:after {
  color: #e2e8f0 !important;
  opacity: 1 !important;
}

html[data-theme='dark'] table.dataTable thead > tr > th[style*='color'],
html[data-theme='dark'] table.dataTable thead > tr > td[style*='color'],
html[data-theme='dark'] table.table thead > tr > th[style*='color'],
html[data-theme='dark'] table.table thead > tr > td[style*='color'] {
  color: #e2e8f0 !important;
}

html[data-theme='dark'] table.dataTable.fixedHeader-floating,
html[data-theme='dark'] table.dataTable.fixedHeader-locked {
  background-color: #111827 !important;
  color: #e2e8f0 !important;
}

html[data-theme='dark'] .dataTables_wrapper table.dataTable thead th,
html[data-theme='dark'] .dataTables_wrapper table.dataTable thead td,
html.dark .dataTables_wrapper table.dataTable thead th,
html.dark .dataTables_wrapper table.dataTable thead td,
html[data-theme='dark'] div.dt-scroll-head table.dataTable thead th,
html[data-theme='dark'] div.dt-scroll-head table.dataTable thead td,
html.dark div.dt-scroll-head table.dataTable thead th,
html.dark div.dt-scroll-head table.dataTable thead td,
html[data-theme='dark'] table.dataTable thead tr > .dtfc-fixed-start,
html[data-theme='dark'] table.dataTable thead tr > .dtfc-fixed-end,
html[data-theme='dark'] table.dataTable tfoot tr > .dtfc-fixed-start,
html[data-theme='dark'] table.dataTable tfoot tr > .dtfc-fixed-end,
html.dark table.dataTable thead tr > .dtfc-fixed-start,
html.dark table.dataTable thead tr > .dtfc-fixed-end,
html.dark table.dataTable tfoot tr > .dtfc-fixed-start,
html.dark table.dataTable tfoot tr > .dtfc-fixed-end {
  background-color: #111827 !important;
  color: #e2e8f0 !important;
  border-color: #334155 !important;
}

html[data-theme='dark'] .dataTables_wrapper table.dataTable thead th *,
html[data-theme='dark'] .dataTables_wrapper table.dataTable thead td *,
html.dark .dataTables_wrapper table.dataTable thead th *,
html.dark .dataTables_wrapper table.dataTable thead td * {
  color: #e2e8f0 !important;
}

html[data-theme='dark'] .dataTables_wrapper table.dataTable tbody th,
html[data-theme='dark'] .dataTables_wrapper table.dataTable tbody td,
html[data-theme='dark'] .dataTables_wrapper table.dataTable tfoot th,
html[data-theme='dark'] .dataTables_wrapper table.dataTable tfoot td,
html.dark .dataTables_wrapper table.dataTable tbody th,
html.dark .dataTables_wrapper table.dataTable tbody td,
html.dark .dataTables_wrapper table.dataTable tfoot th,
html.dark .dataTables_wrapper table.dataTable tfoot td,
html[data-theme='dark'] table.dataTable tbody tr > .dtfc-fixed-start,
html[data-theme='dark'] table.dataTable tbody tr > .dtfc-fixed-end,
html.dark table.dataTable tbody tr > .dtfc-fixed-start,
html.dark table.dataTable tbody tr > .dtfc-fixed-end {
  background-color: #0f172a !important;
  color: #dbe4f0 !important;
  border-color: #334155 !important;
}

html[data-theme='dark'] .dataTables_wrapper table.dataTable thead .sorting:before,
html[data-theme='dark'] .dataTables_wrapper table.dataTable thead .sorting:after,
html[data-theme='dark'] .dataTables_wrapper table.dataTable thead .sorting_asc:before,
html[data-theme='dark'] .dataTables_wrapper table.dataTable thead .sorting_asc:after,
html[data-theme='dark'] .dataTables_wrapper table.dataTable thead .sorting_desc:before,
html[data-theme='dark'] .dataTables_wrapper table.dataTable thead .sorting_desc:after,
html.dark .dataTables_wrapper table.dataTable thead .sorting:before,
html.dark .dataTables_wrapper table.dataTable thead .sorting:after,
html.dark .dataTables_wrapper table.dataTable thead .sorting_asc:before,
html.dark .dataTables_wrapper table.dataTable thead .sorting_asc:after,
html.dark .dataTables_wrapper table.dataTable thead .sorting_desc:before,
html.dark .dataTables_wrapper table.dataTable thead .sorting_desc:after {
  color: #94a3b8 !important;
  opacity: 0.9 !important;
}

html[data-theme='dark'] a {
  color: #93c5fd;
}

html[data-theme='dark'] a:hover {
  color: #bfdbfe;
}

html[data-theme='dark'] .scroll-to-top {
  background: #334155;
}

html[data-theme='dark'] .bg-gradient-primary {
  background-color: #0f172a;
  background-image: linear-gradient(180deg, #0f172a 10%, #020617 100%);
}

html[data-theme='dark'] #loginLogo {
  filter: brightness(0) invert(1);
}
