.main-nav {
  display: block;
}

body.d-flex .main-content {
  margin-left: 270px;
}

body.d-flex .sidebar.collapsed ~ .main-content {
  margin-left: 0;
}

.sidebar-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 35px;
  width: 35px;
  border: none;
  border-radius: 8px;
  background: #fff;
  color: #151A2D;
  cursor: pointer;
  font-size: 1.2rem;
}

.sidebar-btn:hover {
  background: #dde4fb;
}

.sidebar-btn.close-sidebar {
  transform: rotate(0deg);
}

.sidebar-btn.open-sidebar {
  transform: rotate(0deg);
}

.sidebar-btn i {
  pointer-events: none;
  font-size: 1.25rem;
}

.sidebar {
  position: fixed;
  width: 270px;
  border-radius: 16px;
  border-bottom-left-radius: 0px;
  border-top-left-radius: 0px;
  background: #003766;
  height: 100vh;
  z-index: 500;
  overflow: hidden;
}

.sidebar-nav .nav-list.primary-nav {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;
  height: 65vh;
  max-height: 65vh;
}

.sidebar-nav .nav-list.primary-nav::-webkit-scrollbar {
  width: 0px;
  background: transparent;
}

.sidebar-nav .nav-list.primary-nav {
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.sidebar-nav .nav-list.primary-nav::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 20px;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 0.05));
  pointer-events: none;
}

@media (min-width: 1025px) {
  .sidebar-nav .nav-list.primary-nav::-webkit-scrollbar {
    width: 1px;
  }
  .sidebar-nav .nav-list.primary-nav::-webkit-scrollbar-track {
    background: transparent;
  }
  .sidebar-nav .nav-list.primary-nav::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 2px;
  }
  .sidebar-nav .nav-list.primary-nav {
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.7) transparent;
  }
}
.sidebar.collapsed {
  width: 0px;
}

.sidebar .sidebar-header {
  display: flex;
  position: relative;
  padding: 25px 20px;
  align-items: center;
  justify-content: space-between;
}

.sidebar-header .header-logo img {
  width: 46px;
  height: 46px;
  display: block;
  object-fit: contain;
  border-radius: 50%;
}

.sidebar-header .toggler {
  height: 35px;
  width: 35px;
  color: #151A2D;
  border: none;
  cursor: pointer;
  display: flex;
  background: #fff;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.sidebar-header .sidebar-toggler {
  position: absolute;
  right: 20px;
}

.sidebar-header .menu-toggler {
  display: none;
}

.sidebar.collapsed .sidebar-header .toggler {
  transform: translate(-4px, 65px);
}

.sidebar-header .toggler:hover {
  background: #dde4fb;
}

.sidebar-header .toggler span {
  font-size: 1.75rem;
}

.sidebar.collapsed .sidebar-header .toggler span {
  transform: rotate(180deg);
}

.sidebar-nav .nav-list {
  list-style: none;
  display: flex;
  gap: 4px;
  padding: 0 15px;
  flex-direction: column;
  transform: translateY(15px);
}

.sidebar.collapsed .sidebar-nav .primary-nav {
  transform: translateY(65px);
}

.sidebar-nav .nav-link {
  color: #fff;
  display: flex;
  gap: 12px;
  white-space: nowrap;
  border-radius: 8px;
  padding: 12px 15px;
  align-items: center;
  text-decoration: none;
}

.sidebar.collapsed .sidebar-nav .nav-link {
  border-radius: 12px;
}

.sidebar.collapsed .sidebar-nav .nav-link .nav-label {
  opacity: 0;
  pointer-events: none;
}

.sidebar-nav .nav-link:hover {
  color: #151A2D;
  background: #fff;
}

.sidebar-nav .nav-item {
  position: relative;
}

.sidebar-nav .nav-tooltip {
  position: absolute;
  top: -10px;
  opacity: 0;
  color: #003766;
  display: none;
  pointer-events: none;
  padding: 6px 12px;
  border-radius: 8px;
  white-space: nowrap;
  background: #fff;
  left: calc(100% + 25px);
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}

.sidebar.collapsed .sidebar-nav .nav-tooltip {
  display: block;
}

.sidebar-nav .nav-item:hover .nav-tooltip {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(50%);
}

.sidebar-nav .secondary-nav {
  position: absolute;
  bottom: 30px;
  width: 100%;
}

.ms-120 {
  margin-left: 120px !important;
  margin-top: 0px !important;
}

.sidebar .user-name {
  display: block;
}

.sidebar.collapsed .user-name {
  display: none;
}

@media (max-width: 1024px) {
  body.d-flex .main-content {
    margin-left: 0 !important;
    transition: margin-left 0.3s ease;
  }
  body.d-flex .sidebar.menu-active ~ .main-content {
    margin-left: 0;
  }
  .main-nav-title {
    display: none;
  }
}
#offcanvasResponsive {
  position: fixed !important;
  top: 0;
  left: 0;
  height: 100vh;
  width: 56px;
  z-index: 1045;
  overflow: hidden;
}

#offcanvasResponsive:hover {
  width: 281px;
}

.p-offcanvas-lg {
  padding-left: 56px !important;
}

@media (max-width: 991px) {
  .p-offcanvas-lg {
    padding-left: 0px !important;
  }
  #offcanvasResponsive {
    width: 281px;
  }
}
.nav-link i {
  width: 1.25rem;
  text-align: center;
  margin-right: 1rem;
}

.link-primary {
  color: black !important;
}

.link-primary:hover {
  background-color: rgba(0, 54, 102, 0.2274509804);
}

.link-primary-highlight {
  background-color: rgba(0, 54, 102, 0.2274509804);
  color: #003766 !important;
}

.badge-bg-red {
  background-color: rgba(220, 53, 69, 0.1215686275);
  border: 1px solid var(--bs-red);
  color: var(--bs-red);
  box-shadow: 0 0 20px rgba(220, 53, 69, 0.1215686275);
}

.badge-bg-yellow {
  background-color: rgba(255, 193, 7, 0.1215686275);
  border: 1px solid var(--bs-yellow);
  color: var(--bs-yellow);
  box-shadow: 0 0 20px rgba(255, 193, 7, 0.1215686275);
}

.badge-bg-cyan {
  background-color: rgba(13, 202, 240, 0.1215686275);
  border: 1px solid var(--bs-cyan);
  color: var(--bs-cyan);
  box-shadow: 0 0 20px rgba(13, 202, 240, 0.1215686275);
}

.badge-bg-purple {
  background-color: rgba(111, 66, 193, 0.1215686275);
  border: 1px solid var(--bs-purple);
  color: var(--bs-purple);
  box-shadow: 0 0 20px rgba(111, 66, 193, 0.1215686275);
}

.badge-bg-indigo {
  background-color: rgba(103, 16, 242, 0.1215686275);
  border: 1px solid var(--bs-indigo);
  color: var(--bs-indigo);
  box-shadow: 0 0 20px rgba(103, 16, 242, 0.1215686275);
}

.badge-bg-green {
  background-color: rgba(25, 135, 84, 0.1215686275);
  border: 1px solid var(--bs-green);
  color: var(--bs-green);
  box-shadow: 0 0 20px rgba(25, 135, 84, 0.1215686275);
}

.badge-bg-teal {
  background-color: rgba(32, 201, 151, 0.1215686275);
  border: 1px solid var(--bs-teal);
  color: var(--bs-teal);
  box-shadow: 0 0 20px rgba(32, 201, 151, 0.1215686275);
}

.badge-bg-blue {
  background-color: rgba(13, 110, 253, 0.1215686275);
  border: 1px solid var(--bs-blue);
  color: var(--bs-blue);
  box-shadow: 0 0 20px rgba(13, 110, 253, 0.1215686275);
}

.badge-bg-orange {
  background-color: rgba(253, 126, 20, 0.1215686275);
  border: 1px solid var(--bs-orange);
  color: var(--bs-orange);
  box-shadow: 0 0 20px rgba(253, 126, 20, 0.1215686275);
}

.badge-bg-dark {
  background-color: rgba(29, 38, 40, 0.1215686275);
  border: 1px solid var(--bs-dark);
  color: var(--bs-dark);
  box-shadow: 0 0 20px rgba(29, 38, 40, 0.1215686275);
}

.text-purple {
  color: var(--bs-purple);
}

.table {
  border-radius: var(--bs-border-radius-lg);
}

thead {
  position: sticky;
  top: 0;
  z-index: 10;
}

.table-responsive {
  max-height: 700px;
  overflow-y: auto;
}

.custom-tooltip-wrapper {
  position: relative;
  display: inline-block;
  cursor: pointer;
}

.custom-tooltip {
  visibility: hidden;
  opacity: 0;
  position: absolute;
  top: -2em;
  left: 50%;
  transform: translateX(-50%);
  background-color: #333;
  color: #fff;
  text-align: center;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 0.75rem;
  white-space: nowrap;
  z-index: 9999;
}

.custom-tooltip-wrapper:hover .custom-tooltip {
  visibility: visible;
  opacity: 1;
}

.editable-cell {
  border: 1px solid #dee2e6;
  padding: 0.5rem;
  min-width: 100px;
}

.editable-cell:focus {
  outline: none;
  box-shadow: 0 0 4px rgba(13, 110, 253, 0.5);
  background-color: #f0f8ff;
}

.status-ok {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.status-danger {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

select.status-ok {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

select.status-danger {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

select.status-orange {
  background-color: #ffe5b4;
  color: #8a4b08;
  border: 1px solid #ffcc80;
}

select.status-warning {
  background-color: #fff3cd;
  color: #856404;
  border: 1px solid #ffeeba;
}

select.status-info {
  background-color: #d1ecf1;
  color: #0c5460;
  border: 1px solid #bee5eb;
}
