#roaddiary-sidebar {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  width: 240px;
  background: #f8f9fa;
  border-right: 1px solid #ddd;
  box-shadow: 2px 0 6px rgba(0,0,0,0.1);
  transition: width 0.3s ease, transform 0.3s ease;
  display: flex;
  flex-direction: column;
  z-index: 9999;
  padding-top: 10px;
}

#roaddiary-sidebar.collapsed {
  width: 50px;
}

#roaddiary-sidebar.collapsed h4,
#roaddiary-sidebar.collapsed button:not(#toggleSidebar):not(#pinSidebar) {
  display: none;
}

#roaddiary-sidebar .sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  border-bottom: 1px solid #ccc;
}

#roaddiary-sidebar .sidebar-header button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
}

#roaddiary-sidebar .sidebar-section {
  padding: 8px;
  border-bottom: 1px solid #eee;
}

#roaddiary-sidebar .sidebar-section h4 {
  margin: 4px 0;
  font-size: 15px;
  color: #333;
}

#roaddiary-sidebar .sidebar-section button {
  display: block;
  width: 100%;
  margin: 4px 0;
  padding: 6px;
  background: #0073aa;
  color: white;
  border: none;
  border-radius: 3px;
  cursor: pointer;
  text-align: left;
  transition: background 0.2s;
}

#roaddiary-sidebar .sidebar-section button:hover {
  background: #005f8d;
}

#roaddiary-sidebar.pinned {
  box-shadow: 4px 0 8px rgba(0,0,0,0.15);
}
