.user-box {
  position: relative;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 8px;
  background: white;
  padding: 8px 12px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid #ddd;
  transition: all 0.2s;
  min-width: 180px;
}

.user-info:hover {
  background: #f8f9fa;
  border-color: #7c1331;
}

.user-avatar {
  font-size: 18px;
  color: #7c1331;
}

.user-details {
  flex: 1;
  min-width: 0;
}

.user-name {
  font-size: 13px;
  font-weight: 600;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-role {
  font-size: 11px;
  color: #666;
  text-transform: capitalize;
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  min-width: 200px;
  z-index: 1000;
  margin-top: 4px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.2s ease;
}

.user-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-section {
  padding: 8px 12px 4px;
  font-size: 11px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  border-bottom: 1px solid #eee;
  margin-bottom: 4px;
}

.dropdown-item {
  display: block;
  padding: 8px 12px;
  font-size: 13px;
  color: #333;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s;
}

.dropdown-item:hover {
  background: #f8f9fa;
}

.dropdown-item a {
  color: inherit;
  text-decoration: none;
}

.dropdown-divider {
  height: 1px;
  background: #eee;
  margin: 4px 0;
}

.logout-item {
  color: #dc3545;
  border-top: 1px solid #eee;
  margin-top: 4px;
}

.logout-item:hover {
  background: #fff5f5;
}

@media (max-width: 900px) {
  .row {
    grid-template-columns: 1fr;
  }
  .msgs {
    height: 50vh;
  }
  
  .user-info {
    min-width: 140px;
  }
  
  .user-dropdown {
    right: 0;
    min-width: 180px;
  }
}
