/* True black/white theme — loaded last, after every vendor stylesheet, so
   it wins regardless of the base template's own light-leaning defaults
   (including its mobile sidebar drawer, which resets to a light background
   on small screens no matter what .dark-sidebar says). */

/* Page-transition loading overlays — the template flashes these over the
   page on every internal navigation. Hidden outright rather than just
   re-colored: even dark, the flash/spinner over already-visible content
   read as a glitch, not a loading state worth showing. */
#loader,
#page-overlay {
  display: none !important;
}

html, body {
  background-color: #000 !important;
  color: #fff !important;
}
.main-wrapper,
.main-content,
.section,
#app,
.navbar-bg {
  background-color: #000 !important;
}

/* Sidebar */
.main-sidebar,
#sidebar-wrapper,
.sidebar-brand,
.sidebar-user {
  background-color: #000 !important;
  border-color: #262626 !important;
}
.sidebar-menu li a,
.sidebar-user-details .user-name,
.sidebar-userpic-btn a,
.sidebar-menu li a span {
  color: #fff !important;
}
.sidebar-menu li.active > a,
.sidebar-menu li a:hover,
.sidebar-menu li.dropdown.active > a {
  background-color: #141414 !important;
}
.sidebar-menu .menu-header,
.sidebar-user-details .user-role {
  color: #999 !important;
}
.sidebar-menu li ul.dropdown-menu {
  background-color: #000 !important;
}
.sidebar-menu li ul.dropdown-menu li a {
  color: #fff !important;
}

/* Top navbar's global search popup — white by default, shows up as a
   bright flash-of-white box whenever its search input gets focus. */
.navbar .form-inline .search-result {
  background-color: #000 !important;
}
.navbar .form-inline .search-result .search-header {
  color: #999 !important;
}
.navbar .form-inline .search-result .search-item a {
  color: #fff !important;
}
.navbar .form-inline .search-result .search-item a:hover {
  background-color: #141414 !important;
}

/* Top navbar */
.navbar {
  background-color: #000 !important;
  border-color: #262626 !important;
}
.navbar .nav-link {
  color: #fff !important;
}
.dropdown-menu {
  background-color: #000 !important;
  border-color: #262626 !important;
  color: #fff !important;
}
.dropdown-menu .dropdown-item {
  color: #fff !important;
}
.dropdown-menu .dropdown-item:hover,
.dropdown-menu .dropdown-item:focus {
  background-color: #141414 !important;
  color: #fff !important;
}
.dropdown-divider {
  border-color: #262626 !important;
}
.dropdown-title {
  color: #999 !important;
}

/* Cards / panels */
.card,
.card-header,
.card-body,
.card-footer {
  background-color: #000 !important;
  border-color: #262626 !important;
  color: #fff !important;
}

/* Forms */
.form-control,
.form-select,
select,
textarea,
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="search"],
.select2-container--default .select2-selection--single,
.select2-container--default .select2-selection--multiple {
  background-color: #000 !important;
  border-color: #262626 !important;
  color: #fff !important;
}
.form-control::placeholder {
  color: #888 !important;
}
label,
.form-group label,
.control-label {
  color: #fff !important;
}
.select2-dropdown {
  background-color: #000 !important;
  border-color: #262626 !important;
  color: #fff !important;
}
.select2-results__option {
  color: #fff !important;
}
.select2-container--default .select2-results__option--highlighted[aria-selected] {
  background-color: #141414 !important;
}

/* Tables */
.table {
  color: #fff !important;
}
.table thead th {
  background-color: #0a0a0a !important;
  color: #fff !important;
  border-color: #262626 !important;
}
.table td,
.table th {
  border-color: #262626 !important;
}
.table-hover tbody tr:hover {
  background-color: #141414 !important;
  color: #fff !important;
}
.table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(255, 255, 255, 0.03) !important;
}

/* Modals */
.modal-content {
  background-color: #000 !important;
  color: #fff !important;
  border-color: #262626 !important;
}
.modal-header,
.modal-footer {
  border-color: #262626 !important;
}
.btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
}

/* Misc text */
.text-muted {
  color: #999 !important;
}
h1, h2, h3, h4, h5, h6,
.section-title {
  color: #fff !important;
}
hr {
  border-color: #262626 !important;
}
.breadcrumb {
  background-color: transparent !important;
}
.breadcrumb-item.active {
  color: #999 !important;
}
.pagination .page-link {
  background-color: #000 !important;
  border-color: #262626 !important;
  color: #fff !important;
}
.nav-tabs {
  border-color: #262626 !important;
}
.nav-tabs .nav-link {
  color: #999 !important;
}
.nav-tabs .nav-link.active {
  background-color: #000 !important;
  color: #fff !important;
  border-color: #262626 !important;
}
.btn-light,
.btn-white,
.btn-outline-secondary {
  background-color: #141414 !important;
  color: #fff !important;
  border-color: #262626 !important;
}

::-webkit-scrollbar-track {
  background: #000;
}
::-webkit-scrollbar-thumb {
  background: #262626;
  border-radius: 6px;
}

/* The sidebar's custom scrollbar (niceScroll) draws its own rail/cursor
   divs with inline styles using its light-theme default colors (a near-
   white #ebebeb rail) — invisible to the native ::-webkit-scrollbar rules
   above since it isn't a native scrollbar at all. */
.nicescroll-rails {
  background-color: transparent !important;
}
.nicescroll-rails > .nicescroll-cursors,
.nicescroll-cursors {
  background-color: #444 !important;
  border-color: #444 !important;
}
