/* ADMINLTE & TABLER DARK MODE FULL ENHANCEMENTS */
/* Place after adminlte.css in your <head> */

body.dark-mode {
  background-color: #181c20 !important;
  color: #f5f6fa !important;
}

/* Navbar & Sidebar */
body.dark-mode .main-header,
body.dark-mode .main-sidebar,
body.dark-mode .sidebar {
  background-color: #181c20 !important;
  color: #f5f6fa !important;
  border-color: #222;
}

body.dark-mode .brand-link,
body.dark-mode .user-panel,
body.dark-mode .sidebar-search,
body.dark-mode .sidebar-menu,
body.dark-mode .sidebar-mini.sidebar-collapse .sidebar {
  background-color: #1b2228 !important;
  color: #c8ccd0 !important;
}

body.dark-mode .sidebar a,
body.dark-mode .nav-sidebar .nav-link {
  color: #c8ccd0 !important;
}

body.dark-mode .nav-sidebar .nav-link.active,
body.dark-mode .nav-sidebar .nav-link:active {
  background: #23272b !important;
  color: #ffe082 !important;
}

body.dark-mode .nav-sidebar .nav-treeview > .nav-item > .nav-link {
  background: #212529 !important;
}

body.dark-mode .nav-pills .nav-link.active, 
body.dark-mode .nav-pills .show > .nav-link {
  background: #23272b !important;
  color: #ffe082 !important;
}

/* Cards & Widgets */
body.dark-mode .card,
body.dark-mode .card-body,
body.dark-mode .card-header,
body.dark-mode .card-footer,
body.dark-mode .widget-user-header,
body.dark-mode .info-box,
body.dark-mode .small-box {
  background-color: #222d32 !important;
  color: #f5f6fa !important;
  border-color: #30363d !important;
}

/* Tables & DataTables */
body.dark-mode table,
body.dark-mode .table,
body.dark-mode .dataTable {
  background-color: #1a2226 !important;
  color: #f5f6fa !important;
}

body.dark-mode .table th,
body.dark-mode .table td,
body.dark-mode .dataTable th,
body.dark-mode .dataTable td {
  background-color: #1a2226 !important;
  color: #f5f6fa !important;
  border-color: #333 !important;
}

body.dark-mode .table-striped tbody tr:nth-of-type(odd) {
  background-color: #23272b !important;
}

body.dark-mode .table-hover tbody tr:hover {
  background-color: #343a40 !important;
}

body.dark-mode .dataTables_wrapper .dataTables_filter input,
body.dark-mode .dataTables_wrapper .dataTables_length select {
  background-color: #23272b;
  color: #fff;
  border: 1px solid #444;
}

body.dark-mode .pagination .page-link {
  background: #23272b !important;
  color: #ffe082 !important;
  border-color: #222;
}

body.dark-mode .pagination .page-link.active,
body.dark-mode .pagination .active > .page-link {
  background: #357ca5 !important;
  color: #fff !important;
}

/* Alerts, Callouts, Badges */
body.dark-mode .alert,
body.dark-mode .callout {
  background-color: #24292f !important;
  color: #eaeaea !important;
  border-color: #333 !important;
}

body.dark-mode .badge,
body.dark-mode .badge-pill {
  background: #23272b;
  color: #ffe082;
}

body.dark-mode .badge-primary { background: #357ca5; color: #fff; }
body.dark-mode .badge-success { background: #28a745; color: #fff; }
body.dark-mode .badge-danger  { background: #dc3545; color: #fff; }
body.dark-mode .badge-warning { background: #ffc107; color: #222d32; }

/* Breadcrumbs */
body.dark-mode .breadcrumb {
  background: #23272b !important;
  color: #b0b4ba !important;
}

/* Forms */
body.dark-mode .form-control,
body.dark-mode .form-select,
body.dark-mode .input-group-text,
body.dark-mode .custom-select {
  background-color: #23272b !important;
  color: #f5f6fa !important;
  border: 1px solid #444 !important;
}

body.dark-mode .form-control:focus {
  background-color: #181c20 !important;
  color: #fff !important;
  border-color: #357ca5 !important;
  box-shadow: 0 0 0 0.2rem #357ca580;
}

body.dark-mode .custom-control-label::before {
  background-color: #23272b !important;
  border-color: #444 !important;
}

body.dark-mode .custom-control-input:checked~.custom-control-label::before {
  background-color: #357ca5 !important;
  border-color: #357ca5 !important;
}

body.dark-mode ::placeholder {
  color: #aaa !important;
  opacity: 1 !important;
}

/* Buttons */
body.dark-mode .btn,
body.dark-mode .btn-default,
body.dark-mode .btn-secondary {
  background-color: #343a40 !important;
  color: #ffe082 !important;
  border-color: #222 !important;
}

body.dark-mode .btn-primary {
  background-color: #357ca5 !important;
  border-color: #357ca5 !important;
  color: #fff !important;
}
body.dark-mode .btn-success {
  background-color: #28a745 !important;
  border-color: #28a745 !important;
}
body.dark-mode .btn-danger {
  background-color: #dc3545 !important;
  border-color: #dc3545 !important;
}
body.dark-mode .btn-warning {
  background-color: #ffc107 !important;
  border-color: #ffc107 !important;
  color: #222d32 !important;
}
body.dark-mode .btn-info {
  background-color: #17a2b8 !important;
  border-color: #17a2b8 !important;
  color: #fff !important;
}

/* Modals */
body.dark-mode .modal-content {
  background-color: #23272b !important;
  color: #f5f6fa !important;
}
body.dark-mode .modal-header,
body.dark-mode .modal-footer {
  background-color: #222d32 !important;
  color: #ffe082 !important;
}
body.dark-mode .modal-title {
  color: #ffe082 !important;
}

/* Popovers and Tooltips */
body.dark-mode .popover {
  background-color: #23272b !important;
  color: #ffe082 !important;
  border-color: #357ca5 !important;
}
body.dark-mode .tooltip-inner {
  background-color: #23272b !important;
  color: #ffe082 !important;
}

/* Dropdowns & Menus */
body.dark-mode .dropdown-menu {
  background-color: #23272b !important;
  color: #f5f6fa !important;
  border-color: #444 !important;
}

body.dark-mode .dropdown-item {
  color: #f5f6fa !important;
}
body.dark-mode .dropdown-item:hover, 
body.dark-mode .dropdown-item.active {
  background-color: #357ca5 !important;
  color: #fff !important;
}

/* Code, Pre, KBD */
body.dark-mode pre,
body.dark-mode code,
body.dark-mode kbd {
  background-color: #23272b !important;
  color: #ffe082 !important;
  border-radius: 4px;
}

/* Control Sidebar */
body.dark-mode .control-sidebar {
  background: #15181b !important;
  color: #fff !important;
}

/* Misc: HR, Separator, Borders */
body.dark-mode hr {
  border-top: 1px solid #444 !important;
}
body.dark-mode .border {
  border-color: #333 !important;
}
body.dark-mode .list-group-item {
  background-color: #1a2226 !important;
  color: #f5f6fa !important;
  border-color: #23272b !important;
}

/* Pagination */
body.dark-mode .pagination .page-link {
  background: #23272b !important;
  color: #ffe082 !important;
  border-color: #222 !important;
}
body.dark-mode .pagination .page-item.active .page-link {
  background: #357ca5 !important;
  color: #fff !important;
  border-color: #357ca5 !important;
}

/* Scrollbar for sidebar/main */
body.dark-mode ::-webkit-scrollbar-thumb {
  background: #23272b;
}
body.dark-mode ::-webkit-scrollbar-track {
  background: #181c20;
}

body.dark-mode ::selection {
  background: #357ca5;
  color: #fff;
}

/* Add more rules as needed for plugins and custom widgets! */
