body {
  font-size: 0.875rem;
}

.feather {
  width: 16px;
  height: 16px;
  vertical-align: text-bottom;
}

.feather-custom {
  width: 24px;
  height: 24px;
  vertical-align: text-bottom;
}

/*
 * Sidebar
 */
.sidebar {
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 100; /* Behind the navbar */
  padding: 60px 0 0; /* Height of navbar */
  background: var(--nav-bg);
  border-right: 1px solid var(--divider-color);
}

/* Tablet Viewports */
@media only screen and (min-width: 768px) and (max-width: 992px) {
  .sidebar-sticky {
    padding-top: 0.5rem;
    overflow-x: auto;
    overflow-y: auto; /* Scrollable contents if viewport is shorter than content. */
    background: var(--nav-bg);
    position: fixed;
    top: 60px;
    height: 94%;
    z-index: 99999;
    width: 7.5%;
    max-width: 80px;
    min-width: 80px;
  }
}

/* Desktop Viewports */
@media only screen and (min-width: 992px) {
  .sidebar-sticky {
    padding-top: 0.5rem;
    overflow-x: auto;
    overflow-y: auto;
    background: var(--nav-bg);
    position: fixed;
    top: 60px;
    height: 93%;
    z-index: 99999;
    width: 7.5%;
    max-width: 80px;
    min-width: 80px;
  }
}

/* Mobile Viewports */
@media only screen and (max-width: 767px) {
  .sidebar-sticky {
    background: var(--nav-bg);
    padding-top: 60px !important;
    width: 100%; /* Consolidated from the broken bottom query */
  }

  .main-app-container .leftNav {
    max-width: 100% !important;
  }
}

/* Scrollbar styling */
.sidebar-sticky::-webkit-scrollbar {
  width: 5px;
  height: 5px;
  background: transparent;
}

.sidebar-sticky::-webkit-scrollbar-thumb {
  background-color: rgba(0, 0, 0, 0.3) !important;
  border-radius: 6px;
}

.sidebar .nav-link {
  font-weight: 500;
  color: var(--text-secondary);
}

.sidebar .nav-link .feather {
  margin-right: 4px;
  color: currentColor;
}

.sidebar .nav-link:active {
  color: var(--primary-color);
}

.sidebar .nav-link:hover .feather,
.sidebar .nav-link.active .feather {
  color: inherit;
}

.sidebar-heading {
  font-size: 0.75rem;
  text-transform: uppercase;
}

/*
 * Content
 */

/* FIXED: Added missing @media macro below */
@media only screen and (max-width: 370px) {
  .navbar-brand {
    max-width: 100% !important;
    width: 100% !important;
  }
}

@media all and (min-width: 370px) and (max-width: 576px) {
  [role='main'] {
    padding-top: 80px; /* Space for fixed navbar */
  }
  .navbar-brand {
    max-width: 100% !important;
    width: 100% !important;
  }
}

@media all and (min-width: 576px) and (max-width: 767px) {
  [role='main'] {
    padding-top: 88px; /* Space for fixed navbar */
  }
  .navbar-brand {
    max-width: 100% !important;
    width: 100% !important;
  }
}

@media all and (min-width: 768px) and (max-width: 991px) {
  [role='main'] {
    padding-top: 28px;
    margin-left: 90px !important; /* FIXED: Changed from 10% to clear the 80px sidebar cleanly */
  }
}

@media all and (min-width: 992px) {
  [role='main'] {
    margin-left: 90px !important; /* FIXED: Changed from 1% to prevent overlapping with the fixed 80px sidebar */
    padding-top: 28px;
  }
}

/*
 * Navbar
 */
.navbar-brand {
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  font-size: 1rem;
  background: var(--nav-bg);
  text-align: center;
  box-shadow: inset -0.25px 0 0 var(--divider-color);
  width: 7.5%;
  max-width: 80px;
  min-width: 80px;
}

.navbar-dark {
  border-bottom: 1px solid var(--divider-color);
}

.navbar .form-control {
  padding: 0.75rem 1rem;
  border-width: 0;
  border-radius: 0;
}

.form-control-dark {
  color: #fff;
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.1);
}

.form-control-dark:focus {
  border-color: transparent;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25);
}

nav.bg-dark {
  background-color: white !important;
}

.nav-item:hover {
  background-color: #f0f0ef;
  border-radius: 8px;
}

.nav-item.active-selected {
  background-color: var(--primary-soft);
  border-radius: 8px;
}

.nav-item.active-selected .nav-link,
.nav-item.active-selected .listItem div:first-child {
  color: var(--primary-strong) !important;
}

/*
 * Third-Party Overrides & Utilities
 */
.listItem div:first-child {
  margin-bottom: 0px !important;
  color: var(--text-secondary) !important;
}

input[id*='react-select-'] ~ div {
  width: 100% !important;
}

input[id*='react-select-'] {
  width: auto !important;
}
