/* Top Menu Base (formerly Sidebar) */
.sidebar {
  background: #1e293b;
  color: #fff;
  position: fixed;
  top: 80px;                   /* Sit below your main header */
  left: 0;
  width: 100%;                 /* Full width */
  height: 45px;                /* Fixed height for the strip */
  display: flex;
  flex-direction: row;         /* Horizontal layout */
  align-items: center;         /* Vertically center items */
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  z-index: 1000;
  padding: 0 20px;             /* Horizontal padding */
  overflow: visible;           /* CRITICAL: Allows dropdowns to show outside */
}

/* Remove the old hover width expansion */
.sidebar:hover { width: 100%; }
.sidebar::after { display: none; }

/* Hide the old sidebar header text if you don't need it, 
   or style it as a logo label on the left */
.sidebar-header {
  display: none; 
}

/* Links Container */
.sidebar-links {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 5px;                    /* Space between menu items */
  height: 100%;
  overflow: visible;           /* Allow dropdowns */
}

/* Menu Items (Top Level) */
.menu-group {
  position: relative;          /* Anchor for the absolute dropdown */
  height: 100%;
  display: flex;
  align-items: center;
}

.sidebar-links a,
.sidebar-links button,
.menu-toggle {
  display: flex;
  align-items: center;
  height: 35px;                /* Slightly smaller than bar */
  padding: 0 15px;
  color: #cbd5e1;
  text-decoration: none;
  border: none;
  background: none;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
  border-radius: 4px;
  transition: all 0.2s;
}

/* Hover Effects */
.sidebar-links a:hover,
.sidebar-links button:hover,
.menu-toggle:hover {
  background: #334155;
  color: #ffffff;
  padding-left: 15px; /* Remove the slide effect, keep static padding */
}

/* Active Link */
.active-link {
  background: #475569;
  color: #ffffff;
  border-bottom: 3px solid #38bdf8; /* Bottom border instead of left */
  border-left: none;
}

/* --------------------------------------------------------- */
/* DROPDOWN SUBMENUS (The biggest logic change)              */
/* --------------------------------------------------------- */

.submenu {
  display: none;
  position: absolute;          /* Float on top of content */
  top: 100%;                   /* Push slightly down from parent */
  left: 0;
  background: #1e293b;         /* Match navbar bg */
  min-width: 200px;            /* Width of the dropdown */
  box-shadow: 0 8px 16px rgba(0,0,0,0.3);
  border-radius: 0 0 6px 6px;
  padding: 5px 0;
  flex-direction: column;
  z-index: 1100;
  border-left: none;           /* Remove old border */
}

/* Open state (toggled by JS) */
.submenu.open {
  display: flex;
}

.submenu-item {
  display: block;
  width: 100%;
  padding: 8px 15px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 12px;
  text-align: left;
}

.submenu-item:hover {
  background: #334155;
  color: #fff;
}

/* Add this to your CSS */
.menu-group:hover .submenu {
  display: flex;
}
.dashboard-container {
  margin-left: 0;              /* Reset the left gutter */
  /* Top padding = Header (80px) + Navbar (45px) + Gap (20px) */
  padding-top: 145px;          
  background: #f8fafc;
  min-height: 100vh;
}