/* Sidebar Styles */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 250px;
  height: 100%;
  background: #2c3e50;
  color: #ecf0f1;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 3px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar.collapsed {
  width: 70px;
}

.sidebar-header {
  padding: 20px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h3 {
  font-size: 18px;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logo {
  width: 30px;
  height: 30px;
  margin-right: 10px;
}

.sidebar-toggle {
  background: transparent;
  border: none;
  color: #ecf0f1;
  cursor: pointer;
  font-size: 18px;
}

.sidebar-user {
  padding: 20px 15px;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #34495e;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  font-size: 20px;
}

.user-info {
  overflow: hidden;
}

.user-info h4 {
  margin: 0;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-info p {
  margin: 0;
  font-size: 12px;
  opacity: 0.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-menu li {
  position: relative;
}

.sidebar-menu li a {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: #ecf0f1;
  text-decoration: none;
  transition: all 0.3s ease;
}

.sidebar-menu li a:hover {
  background: #34495e;
}

.sidebar-menu li.active a {
  background: #3498db;
}

.sidebar-menu li a i {
  font-size: 18px;
  width: 30px;
  text-align: center;
}

.sidebar-menu li a span {
  margin-left: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar.collapsed .sidebar-menu li a span,
.sidebar.collapsed .user-info,
.sidebar.collapsed .sidebar-header h3 {
  display: none;
}

.sidebar.collapsed .sidebar-menu li a {
  padding: 15px 20px;
  justify-content: center;
}

.sidebar-footer {
  position: absolute;
  bottom: 0;
  width: 100%;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer a {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  color: #ecf0f1;
  text-decoration: none;
  transition: all 0.3s ease;
}

.sidebar-footer a:hover {
  background: #e74c3c;
}

.sidebar-footer a i {
  font-size: 18px;
  width: 30px;
  text-align: center;
}

.sidebar-footer a span {
  margin-left: 10px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sidebar.collapsed .sidebar-footer a span {
  display: none;
}

.sidebar.collapsed .sidebar-footer a {
  justify-content: center;
}

/* Tooltip for collapsed sidebar */
.sidebar.collapsed .sidebar-menu li a::after,
.sidebar.collapsed .sidebar-footer a::after {
  content: attr(data-title);
  position: absolute;
  left: 70px;
  top: 50%;
  transform: translateY(-50%);
  background: #34495e;
  padding: 5px 10px;
  border-radius: 4px;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  z-index: 1001;
}

.sidebar.collapsed .sidebar-menu li a:hover::after,
.sidebar.collapsed .sidebar-footer a:hover::after {
  opacity: 1;
  visibility: visible;
}
