/* ====== Layout Basics ====== */
html, body {
  height: 100vh;
  margin: 0;
  overflow: hidden;
  background-color: #f8f9fa;
  display: flex;
  flex-direction: column;
}

/* ====== Navbar ====== */
.navbar {
  border-bottom: 1px solid #ddd;
}

/* ====== Main Content Layout ====== */
.container-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
  text-align: center;
}

/* ====== Custom Button Styling ====== */
.btn-custom {
  width: 100%;
  max-width: 300px;
  margin: 0.5rem 0;
  border-radius: 1.5rem;
  font-weight: 500;
}

/* ====== Footer ====== */
.footer {
  text-align: center;
  padding: 0 0;
  font-size: 0.875rem;
  color: #6c757d;
}

/* #topbar-container {
   height: 30px;
 
} */

/* ====== Sidebar ====== */
.sidebar {
  width: 200px;
  flex-shrink: 0;
  border-right: 1px solid #dee2e6;  
  transition: all 0.3s ease;
 
}
#sidebar-container {
  width: 200px;
  flex-shrink: 0;
  border-right: 1px solid #dee2e6;  
  transition: all 0.3s ease;
  overflow-y: hidden;  
  overflow-x: hidden;
  height: 100%
}

#sidebar {
  width: 100%;
  flex-shrink: 0;
  overflow-y: auto;     /*  Only show scroll when content exceeds*/
  overflow-x: hidden;
  max-height: 100%;    /*  Respect the viewport height*/
  transition: all 0.3s ease;
}
#sidebar-container.collapsed {
  width: 0 !important;
  min-width: 0 !important;
  max-width: 0 !important;
  overflow: hidden !important;
  padding: 0 !important;
  border: none !important;
}

/* ====== Main Content Area ====== */
#layoutContainer {
  flex: 1;
  display: flex;
  overflow: hidden;
}

#main-content {
  flex: 1;
  overflow-y: auto;
  transition: margin 0.3s ease;
}

/* ====== Sidebar Toggle Button ====== */
.sidebar-toggle-btn {
  margin-left: 1rem;
}

/* ====== Nav Links ====== */
.nav-link {
  padding: 10px 15px;
  color: #333;
  font-weight: 500;
  border-radius: 0.375rem;
  transition: background 0.2s;
}

.nav-link:hover,
.nav-link.active {
  background-color: #0d6efd;
  color: #fff !important;
}

/* Lighter hover only for sidebar links (not active state) */
.sidebar .nav-link:hover:not(.active) {
  background-color: #e9ecef;
}

/* ====== Responsive Behavior ====== */
@media (max-width: 991.98px) {
  /* .sidebar {
    display: none !important;
  } */

  .sidebar.show {
    display: block !important;
    position: absolute;
    top: 56px; /* adjust based on navbar height */
    left: 0;
    z-index: 1030;
    width: 200px;
    height: calc(100vh - 56px);
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  }

  main {
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
  }

  #sidebarToggle {
    display: inline-block;
  }
}
